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

OPTIONS AND ARGUMENTS

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

Other Options

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

BUGS

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

SEE ALSO

192       latexml, latexmlpost, LaTeXML
193
194
195
196perl v5.38.0                      2023-07-19                    LATEXMLMATH(1)
Impressum