1LATEXMLMATH(1)        User Contributed Perl Documentation       LATEXMLMATH(1)
2
3
4

NAME

6       "latexmlmath" - transforms a TeX/LaTeX math expression into various
7       formats.
8

SYNOPSIS

10       latexmlmath [options] texmath
11
12        Options:
13        --mathimage=file           converts to image in file
14        --mathsvg=file             converts to svg image in file
15        --magnification=mag        specifies magnification factor
16        --presentationmathml=file  converts to Presentation MathML
17        --pmml=file                alias for --presentationmathml
18        --linelength=n             do linewrapping of pMML
19        --contentmathml=file       convert to Content MathML
20        --cmml=file                alias for --contentmathml
21        --openmath=file            convert to OpenMath
22        --om=file                  alias for --openmath
23        --XMath=file               output LaTeXML's internal format
24        --noparse                  disables parsing of math
25                                   (not useful for cMML or openmath)
26        --preload=file             loads a style file.
27        --includestyles            allows processing raw *.sty files
28                                   (normally it avoids this)
29        --path=dir                 adds a search path for style files.
30        --quiet                    reduces verbosity (can repeat)
31        --verbose                  increases verbosity (can repeat)
32        --strict                   be more strict about errors.
33        --documentid=id            assign an id to the document root.
34        --debug=package            enables debugging output for the
35                                   named package
36        --inputencoding=enc specify the input encoding.
37        --VERSION                  show version number and exit.
38        --help                     shows this help message.
39        --                         ends options
40
41       If texmath is '-', "latexmlmath" reads the TeX from standard input.  If
42       any of the output files are '-', the result is printed on standard
43       output.
44
45   Input notes
46       Note that, unless you are reading texmath from standard input, the
47       texmath string will be processed by whatever shell you are using before
48       "latexmlmath" even sees it.  This means that many so-called meta
49       characters, such as backslash and star,  may confuse the shell or be
50       changed.  Consequently, you will need to quote and/or slashify the
51       input appropriately.  Most particularly, "\" will need to be doubled to
52       "\\" for "latexmlmath" to see it as a control sequence.
53
54       Using "--" to explicitly end the option list is useful for cases when
55       the math starts with a minus (and would otherwise be interpreted as an
56       option, probably an unrecognized one). Alternatively, wrapping the
57       texmath with {} will hide the minus.
58
59       Simple examples:
60
61         latexmlmath \\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}
62         echo "\\sqrt{b^2-4ac}" | latexmlmath --pmml=quad.mml -
63

OPTIONS AND ARGUMENTS

65   Conversion Options
66       These options specify what formats the math should be converted to.  In
67       each case, the destination file is given.  Except for mathimage, the
68       file can be given as '-', in which case the result is printed to
69       standard output.
70
71       If no conversion option is specified, the default is to output
72       presentation MathML to standard output.
73
74       "--mathimage"=file
75           Requests conversion to png images.
76
77       "--mathsvg"=file
78           Requests conversion to svg images.
79
80       "--magnification="factor
81           Specifies the magnification used for math image. Default is 1.75.
82
83       "--presentationmathml"=file
84           Requests conversion to Presentation MathML.
85
86       "--linelength"=number
87           (Experimental) Line-breaks the generated Presentation MathML so
88           that it is no longer than number `characters'.
89
90       "--plane1"
91           Converts the content of Presentation MathML token elements to the
92           appropriate Unicode Plane-1 codepoints according to the selected
93           font, when applicable.
94
95       "--hackplane1"
96           Converts the content of Presentation MathML token elements to the
97           appropriate Unicode Plane-1 codepoints according to the selected
98           font, but only for the mathvariants double-struck, fraktur and
99           script.  This gives support for current (as of August 2009)
100           versions of Firefox and MathPlayer, provided a sufficient set of
101           fonts is available (eg. STIX).
102
103       "--contentmathml"=file
104           Requests conversion to Content MathML.  Note that this conversion
105           is only partially implemented.
106
107       "--openmath"=file
108           Requests conversion to OpenMath.  Note that this conversion is only
109           partially implemented.
110
111       "--XMath"=file
112           Requests conversion to LaTeXML's internal format.
113

Other Options

115       "--preload"=module
116           Requests the loading of an optional module or package.  This may be
117           useful if the TeX code does not specifically require the module
118           (eg. through input or usepackage).  For example, use
119           "--preload=LaTeX.pool" to force LaTeX mode.
120
121       "--includestyles"
122           This optional allows processing of style files (files with
123           extensions "sty", "cls", "clo", "cnf").  By default, these files
124           are ignored  unless a latexml implementation of them is found (with
125           an extension of "ltxml").
126
127           These style files generally fall into two classes:  Those that
128           merely affect document style are ignorable in the XML.  Others
129           define new markup and document structure, often using deeper LaTeX
130           macros to achieve their ends.  Although the omission will lead to
131           other errors (missing macro definitions), it is unlikely that
132           processing the TeX code in the style file will lead to a correct
133           document.
134
135       "--path"=dir
136           Add dir to the search paths used when searching for files, modules,
137           style files, etc; somewhat like TEXINPUTS.  This option can be
138           repeated.
139
140       "--documentid"=id
141           Assigns an ID to the root element of the XML document.  This ID is
142           generally inherited as the prefix of ID's on all other elements
143           within the document.  This is useful when constructing a site of
144           multiple documents so that all nodes have unique IDs.
145
146       "--quiet"
147           Reduces the verbosity of output during processing, used twice is
148           pretty silent.
149
150       "--verbose"
151           Increases the verbosity of output during processing, used twice is
152           pretty chatty.  Can be useful for getting more details when errors
153           occur.
154
155       "--strict"
156           Specifies a strict processing mode. By default, undefined control
157           sequences and invalid document constructs (that violate the DTD)
158           give warning messages, but attempt to continue processing.  Using
159           --strict makes them generate fatal errors.
160
161       "--inputencoding="encoding
162           Specify the input encoding, eg. "--inputencoding=iso-8859-1".  The
163           encoding must be one known to Perl's Encode package.  Note that
164           this only enables the translation of the input bytes to UTF-8 used
165           internally by LaTeXML, but does not affect catcodes.  It is usually
166           better to use LaTeX's inputenc package.  Note that this does not
167           affect the output encoding, which is always UTF-8.
168
169       "--VERSION"
170           Shows the version number of the LaTeXML package..
171
172       "--debug"=package
173           Enables debugging output for the named package. The package is
174           given without the leading LaTeXML::.
175
176       "--help"
177           Shows this help message.
178

BUGS

180       This program runs much slower than would seem justified.  This is a
181       result of the relatively slow initialization including loading TeX and
182       LaTeX macros and the schema.  Normally, this cost would be ammortized
183       over large documents, whereas, in this case, we're processing a single
184       math expression.
185

SEE ALSO

187       latexml, latexmlpost, LaTeXML
188
189
190
191perl v5.34.0                      2022-01-19                    LATEXMLMATH(1)
Impressum