MathBook: An XML Application

A specification for XML tags and stylesheets to create usable output.

Shuttleworth Funded

Rob Beezer, [email protected]

Design Goals:

  1. Simple for authors to use - no more complicated logically than LaTeX
  2. Capture the structure of writing about mathematics and Sage
  3. Processing into a variety of formats
  4. A limited number of rational tags, with simple names
  5. Minimal use of external shell scripts
  6. XSLT 1.0 compatible: ideally the only required tool is xsltproc

Output Formats:

  1. HTML web pages, enhanced with MathJax, Sage Cell server, knowls

  2. LaTeX input to create PDFs and print with pdflatex

  3. Doctesting of Sage code examples
  4. E-Books, once technically feasible
  5. Maybe a DocBook representation for conversion to other outputs

Examples

  1. A short sample article: XML Source-Author Format HTML Output PDF Output

  2. A skeletal mock book: XML Source-Author Format HTML Output PDF Output

Project Status:

Commentary

High-level commentary is recorded on my blog.

Implemented Features

Files and Examples

Updated: June 29, 2013

HTML output: MathJax does the math, Sage Cell Server does the code, knowls do the citations. Use the following command and files below to create (X)HTML output and view in your browser by opening the output file.

xsltproc mathbook-html.xsl calculus-article.xml > calculus-article.html

PDF: Same XML source file. Use a different XSLT file to process. View PDF as you please. Issue the following to produce.

xsltproc mathbook-latex.xsl calculus-article.xml > calculus-article.tex
pdflatex calculus-article.tex

More: repeat above with the mock book, graph-theory-book.xml, linked above.

Advanced: create a Sage Cloud worksheet from the same source. I have this working in the lab. Posted soon.

Files: Use your browser to save these files locally, do not simply click on them. If you are an author, the only file you need to understand is the first one, the XML source.

  1. XSL transform to HTML

  2. XSL transform to LaTeX

To Do

Other Projects