3 Architecture

§ 3.2 latexmlpost architecture

LaTeXML’s postprocessor is primarily for format conversion. It operates by applying a sequence of filters responsible for transforming or splitting documents, or their parts, from one format to another.

Exactly which postprocessing filter modules are applied depends on the commandline options to latexmlpost. Postprocessing filter modules are generally applied in the following order:


splits the document into several ‘page’ documents, according to --split or --splitxpath options.


scans the document for all ID’s, labels and cross-references. This data may be stored in an external database, depending on the --db option.


fills in the index element (due to a \printindex) with material generated by index.


fills in the bibliography element (from \bibliography) with material extracted from the file specified by the --bibilography option, for all \cite’d items.


establishes all cross-references between documents and parts thereof, filling in the references with appropriate text for the hyperlink.

MathImages, MathML, OpenMath

performs various conversions of the internal Math representation.

PictureImages, Graphics, SVG

performs various graphics conversions.


applies an XSLT transformation to each document.


writes the document to a file in the appropriate location.

See 4.2 for how to customize the postprocessing.