Postprocesses an xml file generated by latexml to perform common tasks, such as convert math to images and processing graphics inclusions for the web.
latexmlpost [options] xmlfile
If xmlfile is ’-’, latexmlpost reads the XML from standard input.
Requests informative output as processing proceeds. Can be repeated to increase the amount of information.
Shows the version number of the LaTeXML package..
Shows this help message.
Specifies the directory where the original latex source is located. Unless latexmlpost is run from that directory, or it can be determined from the xml filename, it may be necessary to specify this option in order to find graphics and style files.
Enables (or disables) the validation of the source XML document (the default).
Specifies the output format for post processing. By default, it will be guessed from the file extension of the destination (if given), with html implying html5, xhtml implying xhtml and the default being xml, which you probably don’t want.
The html5 format converts the material to html5 form with mathematics as MathML; html5 supports SVG. html4 format converts the material to the earlier html form, version 4, and the mathematics to png images. xhtml format converts to xhtml and uses presentation MathML (after attempting to parse the mathematics) for representing the math. html5 similarly converts math to presentation MathML. In these cases, any graphics will be converted to web-friendly formats and/or copied to the destination directory. If you simply specify html, it will treat that as html5.
For the default, xml, the output is left in LaTeXML’s internal xml, but the math is parsed and converted to presentation MathML. For html, html5 and xhtml, a default stylesheet is provided, but see the --stylesheet option.
Specifies the destination file and directory. The directory is needed for mathimages, mathsvg and graphics processing.
Omits (or includes) the document type declaration. The default is to include it if the document model was based on a DTD.
Includes (default), or disables the inclusion of section, equation, etc, numbers in the formatted document and crossreference links.
Requests the XSL transformation of the document using the given xslfile as stylesheet. If the stylesheet is omitted, a ‘standard’ one appropriate for the format (html4, html5 or xhtml) will be used.
Adds cssfile as a css stylesheet to be used in the transformed html/html5/xhtml. Multiple stylesheets can be used; they are included in the html in the order given, following the default ltx-LaTeXML.css (unless --nodefaultcss). The stylesheet is copied to the destination directory, unless it is an absolute url.
Some stylesheets included in the distribution are –css=navbar-left Puts a navigation bar on the left. (default omits navbar) –css=navbar-right Puts a navigation bar on the left. –css=theme-blue A blue coloring theme for headings. –css=amsart A style suitable for journal articles.
Copies iconfile to the destination directory and sets up the linkage in the transformed html/html5/xhtml to use that as the ”favicon”.
Provides a timestamp (typically a time and date) to be embedded in the comments by the stock XSLT stylesheets. If you don’t supply a timestamp, the current time and date will be used. (You can use --timestamp=0 to omit the timestamp).
Passes parameters to the XSLT stylesheet. See the manual or the stylesheet itself for available parameters.
Enables or disables (default) the splitting of documents into multiple ‘pages’. If enabled, the the document will be split into sections, bibliography, index and appendices (if any) by default, unless --splitpath is specified.
Specifies what level of the document to split at. Should be one of chapter, section (the default), subsection or subsubsection. For more control, see --splitpath.
Specifies an XPath expression to select nodes that will generate separate pages. The default splitpath is //ltx:section | //ltx:bibliography | //ltx:appendix | //ltx:index
--splitpath="//ltx:section | //ltx:subsection | //ltx:bibliography | //ltx:appendix | //ltx:index"
would split the document at subsections as well as sections.
Specifies how to name the files for subdocuments created by splitting. The values id and label simply use the id or label of the subdocument’s root node for it’s filename. idrelative and labelrelative use the portion of the id or label that follows the parent document’s id or label. Furthermore, to impose structure and uniqueness, if a split document has children that are also split, that document (and it’s children) will be in a separate subdirectory with the name index.
Enables (default) or disables the scanning of documents for ids, labels, references, indexmarks, etc, for use in filling in refs, cites, index and so on. It may be useful to disable when generating documents not based on the LaTeXML doctype.
Enables (default) or disables the filling in of references, hrefs, etc based on a previous scan (either from --scan, or --dbfile) It may be useful to disable when generating documents not based on the LaTeXML doctype.
This option determines the way that URLs within the documents are formatted, depending on the way they are intended to be served. The default, server, eliminates unneccessary trailing index.html. With negotiated, the trailing file extension (typically html or xhtml) are eliminated. The scheme file preserves complete (but relative) urls so that the site can be browsed as files without any server.
Generates a table of contents in the navigation bar; default is none. The ‘context’ style of TOC, is somewhat verbose and reveals more detail near the current page; it is most suitable for navigation bars placed on the left or right. Other styles of TOC should be developed and added here, such as a short form.
Enables (default) or disables the generation of an index from indexmarks embedded within the document. Enabling this has no effect unless there is an index element in the document (generated by printindex).
Enables or disables (default) the splitting of generated indexes into separate pages per initial letter.
Specifies a bibliography generated from a BibTeX file to be used to fill in a bibliography element. Hand-written bibliographies placed in a thebibliography environment do not need this. The option has no effect unless there is an bibliography element in the document (generated by bibliography).
Note that this option provides the bibliography to be used to fill in the bibliography element (generated by bibliography); latexmlpost does not (currently) directly process and format such a bibliography.
Enables or disables (default) the splitting of generated bibliographies into separate pages per initial letter.
By default latexmlpost processes a single document into one (or more; see --split) destination files in a single pass. When generating a complicated site consisting of several documents it may be advantageous to first scan through the documents to extract and store (in dbfile) cross-referencing data (such as ids, titles, urls, and so on). A later pass then has complete information allowing all documents to reference each other, and also constructs an index and bibliography that reflects the entire document set. The same effect (though less efficient) can be achieved by running latexmlpost twice, provided a dbfile is specified.
Specifies a filename to use for the crossreferencing data when using two-pass processing. This file may reside in the intermediate destination directory.
Specifies the base directory of the overall web site. Pathnames in the database are stored in a form relative to this directory to make it more portable.
These options specify how math should be converted into other formats. Multiple formats can be requested; how they will be combined depends on the format and other options.
Requests or disables the conversion of math to images (png by default). Conversion is the default for html4 format.
Requests or disables the conversion of math to svg images.
Specifies the magnification used for math images (both png and svg), if they are made. Default is 1.75.
Requests or disables conversion of math to Presentation MathML. Conversion is the default for xhtml and html5 formats.
(Experimental) Line-breaks the generated Presentation MathML so that it is no longer than number ‘characters’.
Converts the content of Presentation MathML token elements to the appropriate Unicode Plane-1 codepoints according to the selected font, when applicable (the default).
Converts the content of Presentation MathML token elements to the appropriate Unicode Plane-1 codepoints according to the selected font, but only for the mathvariants double-struck, fraktur and script. This gives support for current (as of August 2009) versions of Firefox and MathPlayer, provided a sufficient set of fonts is available (eg. STIX).
Requests or disables conversion of math to Content MathML. Conversion is disabled by default. Note that this conversion is only partially implemented.
Requests or disables conversion of math to OpenMath. Conversion is disabled by default. Note that this conversion is only partially implemented.
By default, when any of the MathML or OpenMath conversions are used, the intermediate math representation will be removed; this option preserves it; it will be used as secondary parallel markup, when it follows the options for other math representations.
Enables (default) or disables the conversion of graphics to web-appropriate format (png).
Specifies a mapping of graphics file types. Typically, graphics elements specify a graphics file that will be converted to a more appropriate file target format; for example, postscript files used for graphics with LaTeX will be converted to png format for use on the web. As with LaTeX, when a graphics file is specified without a file type, the system will search for the most appropriate target type file.
When this option is used, it overrides and replaces the defaults and provides a mapping of sourcetype to desttype. The option can be repeated to provide several mappings, with the earlier formats preferred. If the desttype is omitted, it specifies copying files of type sourcetype, unchanged.
The default settings is equivalent to having supplied the options:
--graphicsmap=svg --graphicsmap=png --graphicsmap=gif --graphicsmap=jpg --graphicsmap=jpeg --graphicsmap=eps.png --graphicsmap=ps.png --graphicsmap=ai.png --graphicsmap=pdf.png
The first formats are preferred and used unchanged, while the latter ones are converted to png.
Enables (default) or disables the conversion of picture environments and pstricks material into images.
Enables or disables (default) the conversion of picture environments and pstricks material to SVG.