LATEXMLPOST(1p)
๐ฆ LATEXMLPOST(1p) โ User Contributed Perl Documentation ๐
okay bestie, pull up a chair, because this is the glow-up page for latexmlpost. (yes, the manual name is literally "latexmlpost", quotes and all, she's quirky like that ๐
)
โจ NAME โจ
"latexmlpost" โ postprocesses an xml file generated by "latexml" to perform common tasks, such as convert math to images and processing graphics inclusions for the web. ๐
๐ธ SYNOPSIS ๐ธ
latexmlpost [options] xmlfile
Options (yes, the whole squad, no cuts, no skips ๐):
--verboseโ shows progress during processing.--VERSIONโ show version number.--helpโ shows help message.--sourcedirectory=sourcedirโ sets directory of the original source TeX file.--validate,--novalidateโ Enables (the default) or disables validation of the source xml.--format=html|html5|html4|xhtml|xmlโ requests the output format. (html defaults to html5)--destination=fileโ sets output file (and directory).--omitdoctypeโ omits the Doctype declaration,--noomitdoctypeโ disables the omission (the default)--numbersectionsโ enables (the default) the inclusion of section numbers in titles, crossrefs.--nonumbersectionsโ disables the above--stylesheet=xslfileโ requests the XSL transform using the given xslfile as stylesheet.--css=cssfileโ adds css stylesheet to (x)html(5) (can be repeated)--nodefaultresourcesโ disables processing built-in resources--javascript=jsfileโ adds a link to a javascript file into html4/html5/xhtml (can be repeated)--xsltparameter=name:valueโ passes parameters to the XSLT.--splitโ requests splitting each document--nosplitโ disables the above (default)--splitatโ sets level to split the document--splitpath=xpathโ sets xpath expression to use for splitting (default splits at sections, if splitting is enabled)--splitnaming=(id|idrelative|label|labelrelative)โ specifies how to name split files (idrelative).--scanโ scans documents to extract ids, labels, etc. section titles, etc. (default)--noscanโ disables the above--crossrefโ fills in crossreferences (default)--nocrossrefโ disables the above--urlstyle=(server|negotiated|file)โ format to use for urls (default server).--navigationtoc=(context|none)โ generates a table of contents in navigation bar--indexโ requests creating an index (default)--noindexโ disables the above--splitindexโ Splits index into pages per initial.--nosplitindexโ disables the above (default)--permutedindexโ permutes index phrases in the index--nopermutedindexโ disables the above (default)--bibliography=fileโ sets a bibliography file--splitbibliographyโ splits the bibliography into pages per initial.--nosplitbibliographyโ disables the above (default)--prescanโ carries out only the split (if enabled) and scan, storing cross-referencing data in dbfile (default is complete processing)--dbfile=dbfileโ sets file to store crossreferences--sitedirectory=dirโ sets the base directory of the site--mathimagesโ converts math to images (default for html4 format)--nomathimagesโ disables the above--mathsvgโ converts math to svg images--nomathsvgโ disables the above--mathimagemagnification=magโ sets magnification factor--presentationmathmlโ converts math to Presentation MathML (default for xhtml & html5 formats)--pmmlโ alias for--presentationmathml--nopresentationmathmlโ disables the above--linelength=nโ formats presentation mathml to a linelength max of n characters--contentmathmlโ converts math to Content MathML--nocontentmathmlโ disables the above (default)--cmmlโ alias for--contentmathml--openmathโ converts math to OpenMath--noopenmathโ disables the above (default)--omโ alias for--openmath--keepXMathโ preserves the intermediate XMath representation (default is to remove)--mathtexโ adds TeX annotation to parallel markup--nomathtexโ disables the above (default)--unicodemathโ adds TeX annotation to parallel markup--nounicodemathโ disables the above (default)--plane1โ use plane-1 unicode for symbols (default, if needed)--noplane1โ do not use plane-1 unicode--graphicimagesโ converts graphics to images (default)--nographicimagesโ disables the above--graphicsmap=type.typeโ specifies a graphics file mapping--pictureimagesโ converts picture environments to images (default)--nopictureimagesโ disables the above--svgโ converts picture environments to SVG--nosvgโ disables the above (default)
okay and the little plot twist ๐ซถ: if xmlfile is -, latexmlpost reads the XML from standard input. like, literally just pipes it in. iconic.
๐ OPTIONS AND ARGUMENTS ๐
๐ง General Options ๐ง
--verboseโ Requests informative output as processing proceeds. Can be repeated to increase the amount of information. (so like, spam it as many times as you want for maximum yapping ๐ข)--VERSIONโ Shows the version number of the LaTeXML package.. (two periods, she's dramatic, we respect it ๐)--helpโ Shows this help message.
๐ Source Options ๐
--sourcedirectory=source โ Specifies the directory where the original latex source is located. Unlesslatexmlpostis 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. (ngl if she can't find the source, the graphics and style files just ghost you ๐)--validate,--novalidateโ Enables (or disables) the validation of the source XML document (the default).
๐ Format Options ๐
--format="(html|html5|html4|xhtml|xml)" โ 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.
So here's the tea on the formats โ:
- 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, although the math can be converted by enabling one of the math postprocessors, such as --pmml to obtain presentation MathML. For html, html5 and xhtml, a default stylesheet is provided, but see the "--stylesheet" option. โจ
--destination=destination โ Specifies the destination file and directory. The directory is needed for mathimages, mathsvg and graphics processing. (she needs a whole place to put her little guys ๐ซถ)--omitdoctype,--noomitdoctypeโ Omits (or includes) the document type declaration. The default is to include it if the document model was based on a DTD.--numbersections,--nonumbersectionsโ Includes (default), or disables the inclusion of section, equation, etc, numbers in the formatted document and crossreference links. ๐ข--stylesheet=xslfile โ Requests the XSL transformation of the document using the given xslfile as stylesheet. If the stylesheet is omitted, astandardone appropriate for the format (html4, html5 or xhtml) will be used.--css=cssfile โ 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". 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.
(yes navbar-right really does say "left" in the source, bestie. we did not touch it. she said what she said ๐)
--javascript=jsfile โ Includes a link to the javascript file jsfile, to be used in the transformed html/html5/xhtml. Multiple javascript files can be included; they are linked in the html in the order given. The javascript file is copied to the destination directory, unless it is an absolute url.--icon=iconfile โ Copies iconfile to the destination directory and sets up the linkage in the transformed html/html5/xhtml to use that as the"favicon". ๐ (tiny little tab icon, so cute)--nodefaultresourcesโ Disables the copying and inclusion of resources added by the binding files; This includes CSS, javascript or other files. This does not affect resources explicitly requested by the"--css"or"--javascript"options.--timestamp=timestamp โ 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).--xsltparameter=name:value โ Passes parameters to the XSLT stylesheet. See the manual or the stylesheet itself for available parameters.
๐ Site & Crossreferencing Options ๐
--split,--nosplitโ Enables or disables (default) the splitting of documents into multiplepages. If enabled, the the document will be split into sections, bibliography, index and appendices (if any) by default, unless"--splitpath"is specified. (yes, "the the", she's excited, let her live ๐ญ)--splitat=unit โ 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".
part 1 of 2, bestie โ hold on, there's more coming ๐
--splitpath=xpath โ bestie, this is how you tell it which nodes get their own separate page. The default splitpath is:
//ltx:section | //ltx:bibliography | //ltx:appendix | //ltx:index
And if you wanted to split at subsections too, you'd hand it something like:
--splitpath="//ltx:section | //ltx:subsection
| //ltx:bibliography | //ltx:appendix | //ltx:index"
now the doc gets chopped at subsections as well as sections. ๐
--splitnaming=(id|idrelative|label|labelrelative)โ the โจnamingโจ aesthetic for the files of all those subdocuments created by splitting.idandlabelare the simple ones: they just take the id or label of the subdocument's root node and use it as the filename.idrelativeandlabelrelativeare the glow-up versions: they use only the chunk of the id or label that comes after the parent document's id or label. And because we love structure + uniqueness, if a split document has children that are also split, that document (and its children) get tucked into their own separate subdirectory namedindex. ๐--scan,--noscanโ turns the scanning of documents for ids, labels, references, indexmarks, etc. on (that's the default) or off. What's the scan even for? Filling in refs, cites, index and all that good stuff. Ngl it may be useful to disable this one when you're generating documents that aren't based on the LaTeXML doctype. ๐ธ--crossref,--nocrossrefโ turns the filling-in of references, hrefs, etc. on (default) or off, based on a previous scan (either from--scan, or from--dbfile). Again: it may be useful to disable when generating documents not based on the LaTeXML doctype. ๐ฆ--urlstyle=(server|negotiated|file)โ this one decides how URLs inside your documents get formatted, depending on how you're planning to serve them. The default,server, drops those unnecessary trailingindex.htmlbits. Withnegotiated, the trailing file extension (usuallyhtmlorxhtml) gets eliminated. And the schemefilepreserves complete (but relative) urls so you can browse the whole site straight as files, no server needed. ๐--navigationtoc=(context|none)โ generates a table of contents in the navigation bar; default isnone. Thecontextstyle of TOC is kind of verbose and reveals more detail near the current page, so it's most suitable for navigation bars placed on the left or right. And, direct quote energy: other styles of TOC should be developed and added here, such as a short form. ๐--index,--noindexโ enables (default) or disables generating an index from the indexmarks embedded in the document. Heads up though: enabling this does literally nothing unless there's an index element in the document (the one generated by\printindex). ๐ซถ--splitindex,--nosplitindexโ enables, or disables (default), the splitting of generated indexes into separate pages per initial letter. ๐ค--bibliography=pathname โ hands over a bibliography generated from a BibTeX file, to be used to fill in a bibliography element. Hand-written bibliographies sitting in a"thebibliography"environment don't need this at all. And this option has no effect unless there's a bibliography element in the document (the one generated by\bibliography).
โ ๏ธ Also note: this option provides the bibliography that gets used to fill in the bibliography element (generated by "\bibliography"); latexmlpost does not (currently) directly process and format such a bibliography.
--splitbibliography,--nosplitbibliographyโ enables or disables (default) the splitting of generated bibliographies into separate pages per initial letter. ๐--prescanโ okay so by defaultlatexmlpostprocesses a single document into one (or more โ see--split) destination files in a single pass. But when you're generating a complicated site made of several documents, it may be advantageous to first scan through the documents to extract and store (indbfile) cross-referencing data โ ids, titles, urls, and so on. Then a later pass has complete info, letting all the documents reference each other, plus it constructs an index and bibliography that reflects the entire document set. The same effect (though less efficient, fr) can be achieved by runninglatexmlposttwice, as long as you specify adbfile. โจ--dbfile=file โ specifies a filename to use for the crossreferencing data when you're doing two-pass processing. This file may reside in the intermediate destination directory. ๐๏ธ--sitedirectory=dir โ specifies the base directory of the overall web site. Pathnames in the database are stored relative to this directory, which makes it way more portable. ๐
๐งฎ Math Options ๐งฎ
These options specify how math should be converted into other formats. Multiple formats can be requested โ how they'll get combined depends on the format and the other options. ๐ฅ
--mathimages,--nomathimagesโ requests or disables the conversion of math to images (pngby default). Conversion is the default forhtml4format. ๐ผ๏ธ--mathsvg,--nomathsvgโ requests or disables the conversion of math tosvgimages. โจ--mathimagemagnification=factor โ specifies the magnification used for math images (bothpngandsvg), if they're made. Default is1.75. ๐--presentationmathml,--nopresentationmathmlโ requests or disables conversion of math to Presentation MathML. Conversion is the default forxhtmlandhtml5formats. ๐--linelength=number โ (Experimental) line-breaks the generated Presentation MathML so it's no longer than number characters. ๐--plane1โ converts the content of Presentation MathML token elements to the appropriate Unicode Plane-1 codepoints according to the selected font, when applicable (this is the default). ๐ธ--hackplane1โ 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). no cap, that date is really in there ๐ญ--contentmathml,--nocontentmathmlโ requests or disables conversion of math to Content MathML. Conversion is disabled by default. Note that this conversion is only partially implemented โ so, lowkey, don't expect the full thing. ๐--openmathโ requests or disables conversion of math to OpenMath. Conversion is disabled by default. Note that this conversion is only partially implemented. ๐--keepXMathโ by default, when any of the MathML or OpenMath conversions are used, that intermediate math representation gets removed. This option preserves it, and it'll be used as secondary parallel markup when it follows the options for the other math representations. ๐ซถ
๐จ Graphics Options ๐จ
--graphicimages,--nographicimagesโ enables (default) or disables the conversion of graphics to web-appropriate format (png). ๐ผ๏ธ--graphicsmap=sourcetype.desttypeโ specifies a mapping of graphics file types. Typically, graphics elements specify a graphics file that'll be converted to a more appropriate file target format; for example, postscript files used for graphics with LaTeX get converted topngformat for use on the web. Same as with LaTeX: when a graphics file is specified without a file type, the system searches for the most appropriate target type file. ๐
When this option is used, it overrides and replaces the defaults, giving you a mapping of sourcetype to desttype. The option can be repeated to provide several mappings, with the earlier formats preferred. And if the desttype is omitted, it specifies copying files of type sourcetype, unchanged.
The default setting 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 get converted to png. ๐
--pictureimages,--nopictureimagesโ enables (default) or disables the conversion of picture environments and pstricks material into images. ๐ผ๏ธ--svg,--nosvgโ enables or disables (default) the conversion of picture environments and pstricks material to SVG. โจ
๐ SEE ALSO ๐
latexml, latexmlmath, LaTeXML
okay bestie that's the whole page, we ate and left no crumbs ๐ this one's from perl v5.40.1 and it's dated 2025-11-16 โ LATEXMLPOST(1p), iconic behavior, go forth and convert ๐๐
๐ฆ where this page comes from
- ubuntu resolute: latexml 0.8.8-4 ยท PD
- ubuntu stonking: latexml 0.8.8-4 ยท PD
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms