LATEXMLPOST(1)
๐ LATEXMLPOST ๐
okay so bestie, welcome to latexmlpost โ yes, that's LATEXMLPOST(1) if you're reading the manpage header, but we're on a first-name basis here ๐
โจ 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.
like, latexml does its thing and hands you an xml file, and then this little icon picks it up and makes it web-ready. math โ images? graphics inclusions โ handled? she does all of it. ๐
๐ธ SYNOPSIS ๐ธ
latexmlpost [options] xmlfile
and the options are giving so much, let's get into it:
--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)
and one more lil thing: if xmlfile is-,latexmlpostreads the XML from standard input. so pipe it in, queen ๐ซถ
๐ OPTIONS AND ARGUMENTS ๐
๐ General Options ๐
--verboseโ Requests informative output as processing proceeds. Can be repeated to increase the amount of information. so like, once is "oh cute, it's working", and more times is "okay now I want the full tea" ๐--VERSIONโ Shows the version number of the LaTeXML package.. (yes, two dots, that's canon)--helpโ Shows this help message. the classic "help me pls" button ๐ฅบ
๐ฆ 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. basically: if she can't figure out where your source lives, tell her or your graphics will be ghosting you ๐ญ--validate,--novalidateโ Enables (or disables) the validation of the source XML document (the default). so validation is on by default, and--novalidateis your "I live dangerously" pass ๐
โจ 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), withhtmlimplyinghtml5,xhtmlimplyingxhtmland the default beingxml, 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, 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.
ngl, the default xml is giving "I left it in the drafts folder". you probably don't want that one, bestie.
--destination=destination โ Specifies the destination file and directory. The directory is needed for mathimages, mathsvg and graphics processing. ๐--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. numbered sections stay winning by default ๐ข--stylesheet=xslfile โ 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.--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 defaultltx-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.
the way there's a whole theme situation in here?? theme-blue is so cute ๐
--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 thefavicon. tiny tab icon moment ๐--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--cssor--javascriptoptions.--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=0to omit the timestamp).--xsltparameter=name:value โ Passes parameters to the XSLT stylesheet. See the manual or the stylesheet itself for available parameters. iykyk โจ
๐ 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. (and yes, "the the" โ we keep it exactly as written, fr fr)--splitat=unit โ Specifies what level of the document to split at. Should be one ofchapter,section(the default),subsectionorsubsubsection. For more control, see--splitpath. so like, pick your granularity, bestie โ how small are we chopping this salad ๐ช- *
--splitpath=xpath* ** โ hands you the aux cord for splitting: this XPath expression picks which nodes get their very own separate pages. The default splitpath is literally
//ltx:section | //ltx:bibliography | //ltx:appendix | //ltx:index
so bestie, if you want subsections to get their own pages too, you'd say
--splitpath="//ltx:section | //ltx:subsection
| //ltx:bibliography | //ltx:appendix | //ltx:index"
and boom, the doc splits at subsections as well as sections. ๐
- *
--splitnaming=(id|idrelative|label|labelrelative)* ** โ the naming glow-up for files created by splitting.idandlabeljust use the id or label of the subdocument's root node for its filename, simple as.idrelativeandlabelrelativeuse only the portion of the id or label that comes after the parent document's id or label. And to keep things structured and unique, if a split document has children that are also split, that document (plus its children) gets tucked into a separate subdirectory namedindex. ๐ --scan,--noscanโ turns scanning of documents ON (that's the default, bestie) or OFF. Scanning hunts for ids, labels, references, indexmarks, etc, so it can fill in refs, cites, index and all that good stuff. Lowkey useful to disable when you're generating documents that aren't based on the LaTeXML doctype. โจ--crossref,--nocrossrefโ enables (default) or disables filling in references, hrefs, etc, based on a previous scan (either from--scanor from--dbfile). Again, it may be useful to disable when you're generating documents not based on the LaTeXML doctype. ๐ธ- *
--urlstyle=(server|negotiated|file)* ** โ decides how URLs inside your documents get formatted, depending on how you're planning to serve them. The default,server, eliminates those unnecessary trailingindex.htmlbits. Withnegotiated, the trailing file extension (typicallyhtmlorxhtml) gets eliminated. And thefilescheme preserves complete (but relative) urls so the whole site can be browsed as files, no server required. ๐ฆ - *
--navigationtoc=(context|none)* ** โ generates a table of contents up in the navigation bar; default isnone. Thecontextstyle of TOC is a lil verbose ngl and reveals more detail near the current page, so it's 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. ๐ --index,--noindexโ enables (default) or disables generating an index from indexmarks embedded within the document. Pro tip: enabling this has no effect unless there's an index element in the document (the one generated by\printindex). ๐--splitindex,--nosplitindexโ enables or disables (default) splitting generated indexes into separate pages per initial letter. ๐--bibliography=pathname ** โ specifies a bibliography generated from a BibTeX file to be used to fill in a bibliography element. Hand-written bibliographies living in athebibliographyenvironment do **not need this. Heads up: the option has no effect unless there's a bibliography element in the document (generated by\bibliography).
Not me being the messenger but: this option provides the bibliography to be used to fill in the bibliography element (generated by\bibliography);latexmlpostdoes not (currently) directly process and format such a bibliography. ๐ญ
--splitbibliography,--nosplitbibliographyโ enables or disables (default) splitting generated bibliographies into separate pages per initial letter. โจ--prescanโ by defaultlatexmlpostprocesses a single document into one (or more; go peek at--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 cross-referencing data (ids, titles, urls, and so on) indbfile. A later pass then has complete information, letting all documents reference each other, and it also constructs an index and bibliography that reflects the entire document set. The same effect (though less efficient) can be achieved by runninglatexmlposttwice, provided adbfileis specified. ๐ฅ--dbfile=file โ specifies a filename to use for the crossreferencing data when using 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 to make it more portable. ๐
๐งฎ Math Options ๐งฎ
These options specify how math should be converted into other formats. Multiple formats can be requested; how they'll be combined depends on the format and other options. It's giving โจchoose your own adventureโจ.
--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 are 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 that it is 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โ same idea, 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). ๐ซถ--contentmathml,--nocontentmathmlโ requests or disables conversion of math to Content MathML. Conversion is disabled by default. Note that this conversion is only partially implemented. ๐--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, the intermediate math representation gets removed. This option preserves it; it will be used as secondary parallel markup, when it follows the options for 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 will be converted to a more appropriate file target format; for example, postscript files used for graphics with LaTeX will be converted topngformat 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. ๐
--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 ๐
latexmllatexmlmathLaTeXML
okay bestie that's the whole page, you ate that fr fr ๐ this came from the perl v5.40.0 era, dated 2025-01-16, so go forth and latexmlpost your little heart out. mwah ๐ซถโจ
๐ฆ where this page comes from
- fedora 43: LaTeXML 0.8.8-3.fc42 ยท LicenseRef-Fedora-Public-Domain
- fedora 44: LaTeXML 0.8.8-3.fc42 ยท LicenseRef-Fedora-Public-Domain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms