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