A Multiformat Document Workflow With Docutils

1,680 views

Published on

Docutils is my method for producing web pages in multiple formats, notable html and pdf. These are slides I gave for a 15-minute talk at the Joint Mathematics meetings in San Francisco in January 2009.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,680
On SlideShare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

A Multiformat Document Workflow With Docutils

  1. 1. A Multiformat Document Workflow using Docutils Matthew Leingang New York University MAA Session on Publishing Math on the Web San Francisco, CA January 15, 2010
  2. 2. Multiformat
  3. 3. Multiformat ∞ 1 π2 2 = n=1 n 6
  4. 4. Multiformat ∞ 1 π2 2 = n=1 n 6 ∞ 1 π2 2 = n=1 n 6
  5. 5. HTML
  6. 6. HTML
  7. 7. Take a Picture?
  8. 8. (From Wikipedia) MathML?
  9. 9. Firefox
  10. 10. Google Chrome
  11. 11. LaTeX
  12. 12. A third way?
  13. 13. Docutils ∞ 1 π2 http://docutils.sourceforge.net/ n 2 = 6 n=1
  14. 14. Docutils has many products Python Code
  15. 15. Docutils has many products Python ReST Code
  16. 16. Docutils has many products XHTML Python ReST Code
  17. 17. Docutils has many products XHTML Python ReST Code LaTeX
  18. 18. Docutils has many products XHTML Python ReST Code LaTeX PDF
  19. 19. Docutils has many products XHTML Python ReST Code LaTeX troff PDF
  20. 20. Docutils has many products XHTML Python ReST Code LaTeX PDF troff PDF
  21. 21. Docutils has many products XHTML XHTML Python ReST Code LaTeX PDF troff PDF
  22. 22. Docutils has many products XHTML XHTML ReST LaTeX PDF
  23. 23. ReStuctured Text is human- and machine-readable
  24. 24. ReStuctured Text is human- and machine-readable San Francisco is emph{beautiful} LAT EX in January!
  25. 25. ReStuctured Text is human- and machine-readable San Francisco is emph{beautiful} LAT EX in January! San Francisco is HTML strongbeautiful/strong in January!
  26. 26. ReStuctured Text is human- and machine-readable San Francisco is emph{beautiful} LAT EX in January! San Francisco is *beautiful* in ReST January! San Francisco is HTML strongbeautiful/strong in January!
  27. 27. Sections Title !!!!! Introduction ============ Math on the Web =============== XHTML ----- XHTML is an application ...
  28. 28. Sections Title !!!!! Introduction ============ Configured by your Math on the Web usage =============== XHTML ----- XHTML is an application ...
  29. 29. I'm going to JMM_ this year to give a talk__ on docutils. It’s Links a text format and suite of scripts with multiple output formats. ReST .. _JMM: http://www.ams.org/ amsmtgs/2124_intro.html __ http://www.ams.org/amsmtgs/ 2124_abstracts/1056-n5-630.pdf
  30. 30. I'm going to JMM_ this year to give a talk__ on docutils. It’s Links a text format and suite of scripts with multiple output formats. ReST .. _JMM: http://www.ams.org/ amsmtgs/2124_intro.html __ http://www.ams.org/amsmtgs/ 2124_abstracts/1056-n5-630.pdf I'm going to JMM this year to give a talk on Rendered docutils. It’s a text format and suite of scripts HTML with multiple output formats.
  31. 31. Demonstration ∞ 1 π2 2 = n=1 n 6
  32. 32. Adding LaTeX to ReST Do an example such as :latex:`$int x^2 e^x,dx$` where they have to integrate by parts twice, an example such as :latex:`$int e^x sin x,dx$` where they have to integrate by parts twice then solve for the original integral, and an example where :latex:`$dv = dx$` works.
  33. 33. Adding a role to docutils def latex_role(role, rawtext, text, lineno, inliner,options={}, content=[]): Latex role. i = rawtext.find('`') tex = rawtext[i+1:-1] return latex_math(tex), [] def register(): register_canonical_role('latex', latex_role)
  34. 34. Adding a role to docutils def latex_role(role, rawtext, text, lineno, inliner,options={}, content=[]): Latex role. i = rawtext.find('`') tex = rawtext[i+1:-1] return latex_math(tex), [] def register(): register_canonical_role('latex', latex_role)
  35. 35. Adding a role to docutils def latex_role(role, rawtext, text, lineno, inliner,options={}, content=[]): Latex role. i = rawtext.find('`') tex = rawtext[i+1:-1] return latex_math(tex), [] def register(): register_canonical_role('latex', latex_role)
  36. 36. Processing LaTeX ∞ 1 π2 2 = n=1 n 6 with demos
  37. 37. Processing LaTeX •latex + dvipng ∞ 1 π2 2 = n=1 n 6 with demos
  38. 38. Processing LaTeX •latex + dvipng •docutils MathML writer ∞ 1 n 2 = π2 6 n=1 with demos
  39. 39. Processing LaTeX •latex + dvipng •docutils MathML writer ∞ 1 = π2 •tth n 2 6 n=1 with demos
  40. 40. TTH http://hutchinson.belmont.ma.us/tth/
  41. 41. Thanks ∞ 1 π2 2 = n=1 n 6 @mleingang #JointMath

×