.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "LATEXML 1p" .TH LATEXML 1p 2024-02-27 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME "latexml" \- transforms a TeX/LaTeX file into XML. .SH SYNOPSIS .IX Header "SYNOPSIS" latexml [options] \fItexfile\fR .PP .Vb 10 \& Options: \& \-\-destination=file sets destination file (default stdout). \& \-\-output=file [obsolete synonym for \-\-destination] \& \-\-preload=module requests loading of an optional module; \& can be repeated \& \-\-preamble=file sets a preamble file which will \& effectively be prepended to the main file. \& \-\-postamble=file sets a postamble file which will \& effectively be appended to the main file. \& \-\-includestyles allows latexml to load raw *.sty file; \& by default it avoids this. \& \-\-path=dir adds to the paths searched for files, \& modules, etc; \& \-\-log=file specifies log file (default is file named after job name) \& \-\-documentid=id assign an id to the document root. \& \-\-quiet suppress messages (can repeat) \& \-\-verbose more informative output (can repeat) \& \-\-strict makes latexml less forgiving of errors \& \-\-bibtex processes as a BibTeX bibliography. \& \-\-xml requests xml output (default). \& \-\-tex requests TeX output after expansion. \& \-\-box requests box output after expansion \& and digestion. \& \-\-noparse suppresses parsing math \& \-\-nocomments omit comments from the output \& \-\-inputencoding=enc specify the input encoding. \& \-\-VERSION show version number. \& \-\-debug=package enables debugging output for the named \& package \& \-\-help shows this help message. .Ve .PP If \fItexfile\fR is '\-', latexml reads the TeX source from standard input. If \fItexfile\fR has an explicit extension of \f(CW\*(C`.bib\*(C'\fR, it is processed as a BibTeX bibliography. .SH "OPTIONS AND ARGUMENTS" .IX Header "OPTIONS AND ARGUMENTS" .ie n .IP """\-\-destination""=\fIfile\fR" 4 .el .IP \f(CW\-\-destination\fR=\fIfile\fR 4 .IX Item "--destination=file" Specifies the destination file; by default the XML is written to stdout. .ie n .IP """\-\-preload""=\fImodule\fR" 4 .el .IP \f(CW\-\-preload\fR=\fImodule\fR 4 .IX Item "--preload=module" Requests the loading of an optional module or package. This may be useful if the TeX code does not specifically require the module (eg. through input or usepackage). For example, use \f(CW\*(C`\-\-preload=LaTeX.pool\*(C'\fR to force LaTeX mode. .ie n .IP """\-\-preamble""=\fIfile\fR, ""\-\-postamble""=\fIfile\fR" 4 .el .IP "\f(CW\-\-preamble\fR=\fIfile\fR, \f(CW\-\-postamble\fR=\fIfile\fR" 4 .IX Item "--preamble=file, --postamble=file" Specifies a file whose contents will effectively be prepended or appended to the main document file's content. This can be useful when processing TeX fragments, in which case the preamble would contain documentclass and begindocument control sequences. This option is not used when processing BibTeX files. .ie n .IP """\-\-includestyles""" 4 .el .IP \f(CW\-\-includestyles\fR 4 .IX Item "--includestyles" This optional allows processing of style files (files with extensions \f(CW\*(C`sty\*(C'\fR, \&\f(CW\*(C`cls\*(C'\fR, \f(CW\*(C`clo\*(C'\fR, \f(CW\*(C`cnf\*(C'\fR). By default, these files are ignored unless a latexml implementation of them is found (with an extension of \f(CW\*(C`ltxml\*(C'\fR). .Sp These style files generally fall into two classes: Those that merely affect document style are ignorable in the XML. Others define new markup and document structure, often using deeper LaTeX macros to achieve their ends. Although the omission will lead to other errors (missing macro definitions), it is unlikely that processing the TeX code in the style file will lead to a correct document. .ie n .IP """\-\-path""=\fIdir\fR" 4 .el .IP \f(CW\-\-path\fR=\fIdir\fR 4 .IX Item "--path=dir" Add \fIdir\fR to the search paths used when searching for files, modules, style files, etc; somewhat like TEXINPUTS. This option can be repeated. .ie n .IP """\-\-documentid""=\fIid\fR" 4 .el .IP \f(CW\-\-documentid\fR=\fIid\fR 4 .IX Item "--documentid=id" Assigns an ID to the root element of the XML document. This ID is generally inherited as the prefix of ID's on all other elements within the document. This is useful when constructing a site of multiple documents so that all nodes have unique IDs. .ie n .IP """\-\-quiet""" 4 .el .IP \f(CW\-\-quiet\fR 4 .IX Item "--quiet" Reduces the verbosity of output during processing, used twice is pretty silent. .ie n .IP """\-\-verbose""" 4 .el .IP \f(CW\-\-verbose\fR 4 .IX Item "--verbose" Increases the verbosity of output during processing, used twice is pretty chatty. Can be useful for getting more details when errors occur. .ie n .IP """\-\-strict""" 4 .el .IP \f(CW\-\-strict\fR 4 .IX Item "--strict" Specifies a strict processing mode. By default, undefined control sequences and invalid document constructs (that violate the DTD) give warning messages, but attempt to continue processing. Using \-\-strict makes them generate fatal errors. .ie n .IP """\-\-bibtex""" 4 .el .IP \f(CW\-\-bibtex\fR 4 .IX Item "--bibtex" Forces latexml to treat the file as a BibTeX bibliography. Note that the timing is slightly different than the usual case with BibTeX and LaTeX. In the latter case, BibTeX simply selects and formats a subset of the bibliographic entries; the actual TeX expansion is carried out when the result is included in a LaTeX document. In contrast, latexml processes and expands the entire bibliography; the selection of entries is done during postprocessing. This also means that any packages that define macros used in the bibliography must be specified using the \f(CW\*(C`\-\-preload\*(C'\fR option. .ie n .IP """\-\-xml""" 4 .el .IP \f(CW\-\-xml\fR 4 .IX Item "--xml" Requests XML output; this is the default. .ie n .IP """\-\-tex""" 4 .el .IP \f(CW\-\-tex\fR 4 .IX Item "--tex" Requests TeX output for debugging purposes; processing is only carried out through expansion and digestion. This may not be quite valid TeX, since Unicode may be introduced. .ie n .IP """\-\-box""" 4 .el .IP \f(CW\-\-box\fR 4 .IX Item "--box" Requests Box output for debugging purposes; processing is carried out through expansion and digestions, and the result is printed. .ie n .IP """\-\-nocomments""" 4 .el .IP \f(CW\-\-nocomments\fR 4 .IX Item "--nocomments" Normally latexml preserves comments from the source file, and adds a comment every 25 lines as an aid in tracking the source. The option \-\-nocomments discards such comments. .ie n .IP """\-\-inputencoding=""\fIencoding\fR" 4 .el .IP \f(CW\-\-inputencoding=\fR\fIencoding\fR 4 .IX Item "--inputencoding=encoding" Specify the input encoding, eg. \f(CW\*(C`\-\-inputencoding=iso\-8859\-1\*(C'\fR. The encoding must be one known to Perl's Encode package. Note that this only enables the translation of the input bytes to UTF\-8 used internally by LaTeXML, but does not affect catcodes. It is usually better to use LaTeX's inputenc package. Note that this does not affect the output encoding, which is always UTF\-8. .ie n .IP """\-\-VERSION""" 4 .el .IP \f(CW\-\-VERSION\fR 4 .IX Item "--VERSION" Shows the version number of the LaTeXML package.. .ie n .IP """\-\-debug""=\fIpackage\fR" 4 .el .IP \f(CW\-\-debug\fR=\fIpackage\fR 4 .IX Item "--debug=package" Enables debugging output for the named package. The package is given without the leading LaTeXML::. .ie n .IP """\-\-help""" 4 .el .IP \f(CW\-\-help\fR 4 .IX Item "--help" Shows this help message. .SH "SEE ALSO" .IX Header "SEE ALSO" latexmlpost, latexmlmath, LaTeXML