LaTeXML The Manual

Chapter 4. Customization

The processsing of the LaTeX document and its conversion into XML is affected by the definitions of control sequences, either as macros, primitives or constructors, and other declarations specifying the document type, properties of XML tags, ligatures, …. These definitions and declarations are typically contained in `packages' which provide the implementation of LaTeX classes and packages. For example, the LaTeX directive \usepackage{foo} would cause LaTeXML to load the file foo.sty.ltxml. This file would be sought in any of the directories in perl's @INC list (typically including the current directory), or in a LaTeXML/Package subdirectory of any of those directories. If no such file is found, LaTeXML would look for foo.sty and attempt to process it.

When processing a typical file, say jobname.tex, the following packages are loaded:

  1. the core TeX package

  2. any packages named with the --preload option,

  3. a file jobname.latexml, if present; this provides for document-specific declarations.

Document processing then commences; by default, LaTeXML assumes that the document is plain TeX. However, if a \documentclass directive is encountered, the LaTeX package, as well as a package for the named document class are loaded.

LaTeXML implementations are provided for a number of the standard LaTeX packages, although many implement only part of the functionality. Contributed implementations are, of course, welcome. These files, as well as the document specific jobname.latexml, are essentially Perl modules, but use the facilities described in LaTeXML::Package.

Much more needs to be explained here, but for the time being, please consult the documentation for the module LaTeXML::Package, and the various implementations of packages included with the distribution.