| LaTeXML::Common::Config(3pm) | User Contributed Perl Documentation | LaTeXML::Common::Config(3pm) |
"LaTeXML::Common::Config" - Configuration logic for LaTeXML
use LaTeXML::Common::Config;
my $config = LaTeXML::Common::Config->new(
profile=>'name',
timeout=>60,
... );
$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.
latexmlc [options]
Options:
--VERSION show version number.
--help shows this help message.
--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 current working directory
--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: RecDescent, no
--profile=name specify profile as defined in
LaTeXML::Common::Config
Supported: standard|math|fragment|...
(default: standard)
--mode=name Alias for profile
--cache_key=name Provides a name for the current option set,
to enable daemonized conversions without
needing re-initializing
--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
--nopost forbids followup post-processing
--validate, --novalidate Enables (the default) or disables
validation of the source xml.
--omitdoctype omits the Doctype declaration,
--noomitdoctype disables the omission (the default)
--numbersections enables (the default) the inclusion of
section numbers in titles, crossrefs.
--nonumbersections disables the above
--timestamp provides a timestamp (typically a time and date)
to be embedded in the comments
--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
--javascript=jsfile adds a link to a javascript file into
html/html5/xhtml (can be repeated)
--icon=iconfile specify a file to use as a "favicon"
--xsltparameter=name:value passes parameters to the XSLT.
--split requests splitting each document
--nosplit disables the above (default)
--splitat sets level to split the document
--splitpath=xpath sets xpath expression to use for
splitting (default splits at
sections, if splitting is enabled)
--splitnaming=(id|idrelative|label|labelrelative) specifies
how to name split files (idrelative).
--scan scans documents to extract ids,
labels, etc.
section titles, etc. (default)
--noscan disables the above
--crossref fills in crossreferences (default)
--nocrossref disables the above
--urlstyle=(server|negotiated|file) format to use for urls
(default server).
--navigationtoc=(context|none) generates a table of contents
in navigation bar
--index requests creating an index (default)
--noindex disables the above
--splitindex Splits index into pages per initial.
--nosplitindex disables the above (default)
--permutedindex permutes index phrases in the index
--nopermutedindex disables the above (default)
--bibliography=file sets a bibliography file
--splitbibliography splits the bibliography into pages per
initial.
--nosplitbibliography disables the above (default)
--prescan carries out only the split (if
enabled) and scan, storing
cross-referencing data in dbfile
(default is complete processing)
--dbfile=dbfile sets file to store crossreferences
--sitedirectory=dir sets the base directory of the site
--sourcedirectory=dir sets the base directory of the
original TeX source
--source=input as an alternative to passing the input as
the last argument, after the option set
you can also specify it as the value here.
useful for predictable API calls
--mathimages converts math to images
(default for html4 format)
--nomathimages disables the above
--mathimagemagnification=mag specifies magnification factor
--presentationmathml converts math to Presentation MathML
(default for xhtml & html5 formats)
--pmml alias for --presentationmathml
--nopresentationmathml disables the above
--linelength=n formats presentation mathml to a
linelength max of n characters
--contentmathml converts math to Content MathML
--nocontentmathml disables the above (default)
--cmml alias for --contentmathml
--openmath converts math to OpenMath
--noopenmath disables the above (default)
--om alias for --openmath
--keepXMath preserves the intermediate XMath
representation (default is to remove)
--mathtex adds TeX annotation to parallel markup
--nomathtex disables the above (default)
--unicodemath adds UnicodeMath annotation to parallel markup
--nounicodemath disables the above (default)
--parallelmath use parallel math annotations (default)
--noparallelmath disable parallel math annotations
--plane1 use plane-1 unicode for symbols
(default, if needed)
--noplane1 do not use plane-1 unicode
--graphicimages converts graphics to images (default)
--nographicimages disables the above
--graphicsmap=type.type specifies a graphics file mapping
--pictureimages converts picture environments to
images (default)
--nopictureimages disables the above
--svg converts picture environments to SVG
--nosvg disables the above (default)
--nocomments omit comments from the output
--inputencoding=enc specify the input encoding.
--debug=package enables debugging output for the named
package
If you want to provide a TeX snippet directly on input, rather than supply a filename, use the "literal:" protocol to prefix your snippet.
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.
The "html5" format converts the material to html5 form with mathematics as MathML; "html5" supports SVG. "html4" format converts the material to the earlier html form, version 4, and the mathematics to png images. "xhtml" format converts to xhtml and uses presentation MathML (after attempting to parse the mathematics) for representing the math. "html5" similarly converts math to presentation MathML. In these cases, any graphics will be converted to web-friendly formats and/or copied to the destination directory. If you simply specify "html", it will treat that as "html5".
For the default, "xml", the output is left in LaTeXML's internal xml, although the math can be converted by enabling one of the math postprocessors, such as --pmml to obtain presentation MathML. For html, html5 and xhtml, a default stylesheet is provided, but see the "--stylesheet" option.
Example: "latexmlc --profile=math 'literal:1+2=3'"
Some stylesheets included in the distribution are
--css=navbar-left Puts a navigation bar on the left.
(default omits navbar)
--css=navbar-right Puts a navigation bar on the left.
--css=theme-blue A blue coloring theme for headings.
--css=amsart A style suitable for journal articles.
Specifying
--splitpath="//ltx:section | //ltx:subsection
| //ltx:bibliography | //ltx:appendix | //ltx:index"
would split the document at subsections as well as sections.
Note that this option provides the bibliography to be used to fill in the bibliography element (generated by "\bibliography"); latexmlpost does not (currently) directly process and format such a bibliography.
These options specify how math should be converted into other formats. Multiple formats can be requested; how they will be combined depends on the format and other options.
When this option is used, it overrides and replaces the defaults and provides a mapping of sourcetype to desttype. The option can be repeated to provide several mappings, with the earlier formats preferred. If the desttype is omitted, it specifies copying files of type sourcetype, unchanged.
The default settings is equivalent to having supplied the
options:
svg png gif jpg jpeg eps.png ps.png ai.png pdf.png
The first formats are preferred and used unchanged, while the latter ones are converted to png.
Options used only for daemonized conversions, e.g. talking to a remote server via latexmlc, or local processing via the "LaTeXML::Plugin::latexmls" plugin.
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).
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.
| 2024-02-27 | perl v5.38.2 |