"LaTeXML::Common::Config"
Configuration logic for LaTeXML
- Provided by: latexml (Version: 0.8.1-1)
- Report a bug
Configuration logic for LaTeXML
use LaTeXML::Common::Config;
my $config = LaTeXML::Common::Config->new(
profile=>'name',
timeout=>number
... );
$config->read(\@ARGV);
$config->check;
my $value = $config->get($name);
$config->set($name,$value);
$config->delete($name);
my $bool = $config->exists($name);
my @keys = $config->keys;
my $options_hashref = $config->options;
my $config_clone = $config->clone;
Configuration management class for LaTeXML options.
* Responsible for defining the options interface
and parsing the usual Perl command-line options syntax
* Provides the intuitive getters, setters, as well as
hash methods for manipulating the option values.
* Also supports cloning into new configuration objects.
latexmls/latexmlc [options]
Options:
--destination=file specifies destination file.
--output=file [obsolete synonym for --destination]
--preload=module requests loading of an optional module;
can be repeated
--preamble=file loads a tex file containing document
frontmatter. MUST include \begin{document}
or equivalent
--postamble=file loads a tex file containing document
backmatter. MUST include \end{document}
or equivalent
--includestyles allows latexml to load raw *.sty file;
by default it avoids this.
--base=dir sets the base directory that the server
operates in. Useful when converting
documents that employ relative paths.
--path=dir adds dir to the paths searched for files,
modules, etc;
--log=file specifies log file (default: STDERR)
--autoflush=count Automatically restart the daemon after
"count" inputs. Good practice for vast
batch jobs. (default: 100)
--timeout=secs Timecap for conversions (default 600)
--expire=secs Timecap for server inactivity (default 600)
--address=URL Specify server address (default: localhost)
--port=number Specify server port (default: 3354)
--documentid=id assign an id to the document root.
--quiet suppress messages (can repeat)
--verbose more informative output (can repeat)
--strict makes latexml less forgiving of errors
--bibtex processes a BibTeX bibliography.
--xml requests xml output (default).
--tex requests TeX output after expansion.
--box requests box output after expansion
and digestion.
--format=name requests "name" as the output format.
Supported: tex,box,xml,html4,html5,xhtml
html implies html5
--noparse suppresses parsing math (default: off)
--parse=name enables parsing math (default: on)
and selects parser framework "name".
Supported: Marpa, RecDescent
--profile=name specify profile as defined in
LaTeXML::Common::Config
Supported: standard|math|fragment|...
(default: standard)
--mode=name Alias for profile
--whatsin=chunk Defines the provided input chunk,
choose from document (default), fragment
and formula
--whatsout=chunk Defines the expected output chunk,
choose from document (default), fragment
and formula
--post requests a followup post-processing
--embed requests an embeddable XHTML snippet
(requires: --post,--profile=fragment)
DEPRECATED: Use --whatsout=fragment
TODO: Remove completely
--stylesheet specifies a stylesheet,
to be used by the post-processor.
--css=cssfile adds a css stylesheet to html/xhtml
(can be repeated)
--nodefaultresources disables processing built-in resources
--javscript=jsfile adds a link to a javascript file into
html/html5/xhtml (can be repeated)
--xsltparameter=name:value passes parameters to the XSLT.
--sitedirectory=dir sets the base directory of the site
--sourcedirectory=dir sets the base directory of the
original TeX source
--mathimages converts math to images
(default for html4 format)
--nomathimages disables the above
--mathimagemagnification=mag specifies magnification factor
--plane1 use plane-1 unicode for symbols
(default, if needed)
--noplane1 do not use plane-1 unicode
--pmml converts math to Presentation MathML
(default for xhtml and html5 formats)
--cmml converts math to Content MathML
--openmath converts math to OpenMath
--keepXMath keeps the XMath of a formula as a MathML
annotation-xml element
--nocomments omit comments from the output
--inputencoding=enc specify the input encoding.
--VERSION show version number.
--debug=package enables debugging output for the named
package
--help shows this help message.
Note that the profiles come with a variety of preset options. To customize your own conversion setup, use --whatsin=math|fragment|document instead, respectively, as well as --whatsout=math|fragment|document.
If you want to provide a TeX snippet directly on input, rather than supply a filename, use the "literal:" protocol to prefix your snippet.
For reliable communication and a stable conversion experience, invoke latexmls only through the latexmlc client (you need to set --expire to a positive value, in order to request auto-spawning of a dedicated conversion server).
Note that the given file MUST contain \begin{document} or an
equivalent environment start,
when processing LaTeX documents.
If the file does not contain content to appear in the final
document, but only macro definitions and
setting of internal counters, it is more appropriate to use --preload
instead.
Note that the given file MUST contain \end{document} or an
equivalent environment end,
when processing LaTeX documents.
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.
Example: "latexmlc --profile=math '1+2=3'"
Bruce Miller <bruce.miller@nist.gov> Deyan Ginev <deyan.ginev@nist.gov>
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.