.\" -*- 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 "LATEXMLMATH 1p" .TH LATEXMLMATH 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 "latexmlmath" \- transforms a TeX/LaTeX math expression into various formats. .SH SYNOPSIS .IX Header "SYNOPSIS" latexmlmath [options] \fItexmath\fR .PP .Vb 10 \& Options: \& \-\-mathimage=file converts to image in file \& \-\-mathsvg=file converts to svg image in file \& \-\-magnification=mag specifies magnification factor \& \-\-presentationmathml=file converts to Presentation MathML \& \-\-pmml=file alias for \-\-presentationmathml \& \-\-linelength=n do linewrapping of pMML \& \-\-contentmathml=file convert to Content MathML \& \-\-cmml=file alias for \-\-contentmathml \& \-\-openmath=file convert to OpenMath \& \-\-om=file alias for \-\-openmath \& \-\-unicodemath=file convert to UnicodeMath \& \-\-XMath=file output LaTeXML\*(Aqs internal format \& \-\-noparse disables parsing of math \& (not useful for cMML or openmath) \& \-\-preload=file loads a style file. \& \-\-includestyles allows processing raw *.sty files \& (normally it avoids this) \& \-\-path=dir adds a search path for style files. \& \-\-quiet reduces verbosity (can repeat) \& \-\-verbose increases verbosity (can repeat) \& \-\-strict be more strict about errors. \& \-\-documentid=id assign an id to the document root. \& \-\-debug=package enables debugging output for the \& named package \& \-\-inputencoding=enc specify the input encoding. \& \-\-VERSION show version number and exit. \& \-\-help shows this help message. \& \-\- ends options .Ve .PP If \fItexmath\fR is '\-', \f(CW\*(C`latexmlmath\*(C'\fR reads the TeX from standard input. If any of the output files are '\-', the result is printed on standard output. .SS "Input notes" .IX Subsection "Input notes" Note that, unless you are reading \fItexmath\fR from standard input, the \fItexmath\fR string will be processed by whatever shell you are using before \f(CW\*(C`latexmlmath\*(C'\fR even sees it. This means that many so-called meta characters, such as backslash and star, may confuse the shell or be changed. Consequently, you will need to quote and/or slashify the input appropriately. Most particularly, \f(CW\*(C`\e\*(C'\fR will need to be doubled to \f(CW\*(C`\e\e\*(C'\fR for \f(CW\*(C`latexmlmath\*(C'\fR to see it as a control sequence. .PP Using \f(CW\*(C`\-\-\*(C'\fR to explicitly end the option list is useful for cases when the math starts with a minus (and would otherwise be interpreted as an option, probably an unrecognized one). Alternatively, wrapping the \fItexmath\fR with {} will hide the minus. .PP Simple examples: .PP .Vb 2 \& latexmlmath \e\efrac{\-b\e\epm\e\esqrt{b^2\-4ac}}{2a} \& echo "\e\esqrt{b^2\-4ac}" | latexmlmath \-\-pmml=quad.mml \- .Ve .SH "OPTIONS AND ARGUMENTS" .IX Header "OPTIONS AND ARGUMENTS" .SS "Conversion Options" .IX Subsection "Conversion Options" These options specify what formats the math should be converted to. In each case, the destination file is given. Except for mathimage, the file can be given as '\-', in which case the result is printed to standard output. .PP If no conversion option is specified, the default is to output presentation MathML to standard output. .ie n .IP """\-\-mathimage""=\fIfile\fR" 4 .el .IP \f(CW\-\-mathimage\fR=\fIfile\fR 4 .IX Item "--mathimage=file" Requests conversion to png images. .ie n .IP """\-\-mathsvg""=\fIfile\fR" 4 .el .IP \f(CW\-\-mathsvg\fR=\fIfile\fR 4 .IX Item "--mathsvg=file" Requests conversion to svg images. .ie n .IP """\-\-magnification=""\fIfactor\fR" 4 .el .IP \f(CW\-\-magnification=\fR\fIfactor\fR 4 .IX Item "--magnification=factor" Specifies the magnification used for math image. Default is 1.75. .ie n .IP """\-\-presentationmathml""=\fIfile\fR" 4 .el .IP \f(CW\-\-presentationmathml\fR=\fIfile\fR 4 .IX Item "--presentationmathml=file" Requests conversion to Presentation MathML. .ie n .IP """\-\-linelength""\fI=number\fR" 4 .el .IP \f(CW\-\-linelength\fR\fI=number\fR 4 .IX Item "--linelength=number" (Experimental) Line-breaks the generated Presentation MathML so that it is no longer than \fInumber\fR `characters'. .ie n .IP """\-\-plane1""" 4 .el .IP \f(CW\-\-plane1\fR 4 .IX Item "--plane1" Converts the content of Presentation MathML token elements to the appropriate Unicode Plane\-1 codepoints according to the selected font, when applicable. .ie n .IP """\-\-hackplane1""" 4 .el .IP \f(CW\-\-hackplane1\fR 4 .IX Item "--hackplane1" Converts the content of Presentation MathML token elements to the appropriate Unicode Plane\-1 codepoints according to the selected font, but only for the mathvariants double-struck, fraktur and script. This gives support for current (as of August 2009) versions of Firefox and MathPlayer, provided a sufficient set of fonts is available (eg. STIX). .ie n .IP """\-\-contentmathml""=\fIfile\fR" 4 .el .IP \f(CW\-\-contentmathml\fR=\fIfile\fR 4 .IX Item "--contentmathml=file" Requests conversion to Content MathML. \&\fBNote\fR that this conversion is only partially implemented. .ie n .IP """\-\-openmath""=\fIfile\fR" 4 .el .IP \f(CW\-\-openmath\fR=\fIfile\fR 4 .IX Item "--openmath=file" Requests conversion to OpenMath. \&\fBNote\fR that this conversion is only partially implemented. .ie n .IP """\-\-unicodemath""=\fIfile\fR" 4 .el .IP \f(CW\-\-unicodemath\fR=\fIfile\fR 4 .IX Item "--unicodemath=file" Requests conversion to UnicodeMath (an unstructured Unicode string). .ie n .IP """\-\-XMath""=\fIfile\fR" 4 .el .IP \f(CW\-\-XMath\fR=\fIfile\fR 4 .IX Item "--XMath=file" Requests conversion to LaTeXML's internal format. .SH "Other Options" .IX Header "Other Options" .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 """\-\-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 """\-\-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 BUGS .IX Header "BUGS" This program runs much slower than would seem justified. This is a result of the relatively slow initialization including loading TeX and LaTeX macros and the schema. Normally, this cost would be ammortized over large documents, whereas, in this case, we're processing a single math expression. .SH "SEE ALSO" .IX Header "SEE ALSO" latexml, latexmlpost, LaTeXML