LaTeXML The Manual

Chapter 2 Using LaTeXML

The main commands provided by the LaTeXML system are


for converting TeX and BibTeX sources to XML.


for various postprocessing tasks including conversion to HTML, processing images, conversion to MathML and so on.

The usage of these commands can be as simple as

latexml doc.tex | latexmlpost --dest=doc.html

to convert a single document into HTML5 document, or as complicated as

latexml --dest=1.xml ch1
latexml --dest=2.xml ch2
latexml --dest=b.xml b
latexml --dest=B.bib.xml B.bib
latexmlpost --prescan --db=my.db --dest=1.html 1
latexmlpost --prescan --db=my.db --dest=2.html 2
latexmlpost --prescan --db=my.db --dest=b.html b
latexmlpost --noscan --db=my.db  --dest=1.html 1
latexmlpost --noscan --db=my.db  --dest=2.html 2
latexmlpost --noscan --db=my.db  --dest=b.html b

to convert a whole set of documents, including a bibliography, into a complete interconnected site.

How best to use the commands depends, of course, on what you are trying to achieve. In the next section, we’ll describe the use of latexml, which performs the conversion to XML. The following sections consider a sequence of successively more complicated postprocessing situations, using latexmlpost, by which one or more TeX sources can be converted into one or more web documents or a complete site.

Additionally, there is a convenience command latexmlmath for converting individual formula into various formats.