Chapter 2 Using

The main commands provided by the  system are

latexml

for converting  and BibTeX sources to xml.

latexmlpost

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

latexmlc

combines both latexml and latexmlpost into a single command, with some extra functionality.

The usage of these commands can be as simple as

latexmlc doc.tex --dest=doc.html

to convert a single document into HTML5 document, Or if you want to examine the xml, for some reason (I usually do)

latexml --dest=doc.xml doc ; latexmlpost doc --dest=doc.html

Or can be as complicated as

# Conversion
latexml --dest=main.xml main.tex
latexml --dest=A.xml A
                      
# Scan
latexmlpost --prescan --db=my.db --dest=/site/main.html main
latexmlpost --prescan --db=my.db --dest=/site/A.html A
                      
# Pagination
latexmlpost --noscan --db=my.db --dest=/site/main.html main
latexmlpost --noscan --db=my.db --dest=/site/A.html A
                      

to convert a whole set of documents, including a bibliography, into a complete interconnected site. See 2.4 for details.

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  sources can be converted into one or more web documents or a complete site.

The command latexmlc can also create ePub documents:

latexmlc --dest=doc.epub doc

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