1LATEXML(1) User Contributed Perl Documentation LATEXML(1)
2
3
4
6 "latexml" - transforms a TeX/LaTeX file into XML.
7
9 latexml [options] texfile
10
11 Options:
12 --destination=file sets destination file (default stdout).
13 --output=file [obsolete synonym for --destination]
14 --preload=module requests loading of an optional module;
15 can be repeated
16 --preamble=file sets a preamble file which will
17 effectively be prepended to the main file.
18 --postamble=file sets a postamble file which will
19 effectively be appended to the main file.
20 --includestyles allows latexml to load raw *.sty file;
21 by default it avoids this.
22 --path=dir adds to the paths searched for files,
23 modules, etc;
24 --log=file specifies log file (default is file named after job name)
25 --documentid=id assign an id to the document root.
26 --quiet suppress messages (can repeat)
27 --verbose more informative output (can repeat)
28 --strict makes latexml less forgiving of errors
29 --bibtex processes as a BibTeX bibliography.
30 --xml requests xml output (default).
31 --tex requests TeX output after expansion.
32 --box requests box output after expansion
33 and digestion.
34 --noparse suppresses parsing math
35 --nocomments omit comments from the output
36 --inputencoding=enc specify the input encoding.
37 --VERSION show version number.
38 --debug=package enables debugging output for the named
39 package
40 --help shows this help message.
41
42 If texfile is '-', latexml reads the TeX source from standard input.
43 If texfile has an explicit extension of ".bib", it is processed as a
44 BibTeX bibliography.
45
47 "--destination"=file
48 Specifies the destination file; by default the XML is written to
49 stdout.
50
51 "--preload"=module
52 Requests the loading of an optional module or package. This may be
53 useful if the TeX code does not specifically require the module
54 (eg. through input or usepackage). For example, use
55 "--preload=LaTeX.pool" to force LaTeX mode.
56
57 "--preamble"=file, "--postamble"=file
58 Specifies a file whose contents will effectively be prepended or
59 appended to the main document file's content. This can be useful
60 when processing TeX fragments, in which case the preamble would
61 contain documentclass and begindocument control sequences. This
62 option is not used when processing BibTeX files.
63
64 "--includestyles"
65 This optional allows processing of style files (files with
66 extensions "sty", "cls", "clo", "cnf"). By default, these files
67 are ignored unless a latexml implementation of them is found (with
68 an extension of "ltxml").
69
70 These style files generally fall into two classes: Those that
71 merely affect document style are ignorable in the XML. Others
72 define new markup and document structure, often using deeper LaTeX
73 macros to achieve their ends. Although the omission will lead to
74 other errors (missing macro definitions), it is unlikely that
75 processing the TeX code in the style file will lead to a correct
76 document.
77
78 "--path"=dir
79 Add dir to the search paths used when searching for files, modules,
80 style files, etc; somewhat like TEXINPUTS. This option can be
81 repeated.
82
83 "--documentid"=id
84 Assigns an ID to the root element of the XML document. This ID is
85 generally inherited as the prefix of ID's on all other elements
86 within the document. This is useful when constructing a site of
87 multiple documents so that all nodes have unique IDs.
88
89 "--quiet"
90 Reduces the verbosity of output during processing, used twice is
91 pretty silent.
92
93 "--verbose"
94 Increases the verbosity of output during processing, used twice is
95 pretty chatty. Can be useful for getting more details when errors
96 occur.
97
98 "--strict"
99 Specifies a strict processing mode. By default, undefined control
100 sequences and invalid document constructs (that violate the DTD)
101 give warning messages, but attempt to continue processing. Using
102 --strict makes them generate fatal errors.
103
104 "--bibtex"
105 Forces latexml to treat the file as a BibTeX bibliography. Note
106 that the timing is slightly different than the usual case with
107 BibTeX and LaTeX. In the latter case, BibTeX simply selects and
108 formats a subset of the bibliographic entries; the actual TeX
109 expansion is carried out when the result is included in a LaTeX
110 document. In contrast, latexml processes and expands the entire
111 bibliography; the selection of entries is done during
112 postprocessing. This also means that any packages that define
113 macros used in the bibliography must be specified using the
114 "--preload" option.
115
116 "--xml"
117 Requests XML output; this is the default.
118
119 "--tex"
120 Requests TeX output for debugging purposes; processing is only
121 carried out through expansion and digestion. This may not be quite
122 valid TeX, since Unicode may be introduced.
123
124 "--box"
125 Requests Box output for debugging purposes; processing is carried
126 out through expansion and digestions, and the result is printed.
127
128 "--nocomments"
129 Normally latexml preserves comments from the source file, and adds
130 a comment every 25 lines as an aid in tracking the source. The
131 option --nocomments discards such comments.
132
133 "--inputencoding="encoding
134 Specify the input encoding, eg. "--inputencoding=iso-8859-1". The
135 encoding must be one known to Perl's Encode package. Note that
136 this only enables the translation of the input bytes to UTF-8 used
137 internally by LaTeXML, but does not affect catcodes. It is usually
138 better to use LaTeX's inputenc package. Note that this does not
139 affect the output encoding, which is always UTF-8.
140
141 "--VERSION"
142 Shows the version number of the LaTeXML package..
143
144 "--debug"=package
145 Enables debugging output for the named package. The package is
146 given without the leading LaTeXML::.
147
148 "--help"
149 Shows this help message.
150
152 latexmlpost, latexmlmath, LaTeXML
153
154
155
156perl v5.38.0 2023-07-19 LATEXML(1)