Convert LaTeX to HTML with MathML

One of the things I have to do at work occasionally is take LaTeX documents and convert them to HTML5, with any mathematical formulas or expressions converted to MathML within the HTML5 document.

Hands down the best tool I’ve found to do this is LaTeXML.

  1. Open up a virtual machine running Debian-based Linux and install LaTeXML with:
$ sudo apt-get install latexml

2. Navigate to the directory where the LaTeX files are located and:

$ latexml --dest=mydoc.xml mydoc
$ latexmlpost --dest=somewhere/mydoc.html mydoc.xml

Leave a Reply