1LaTeXML::Core(3)      User Contributed Perl Documentation     LaTeXML::Core(3)
2
3
4

NAME

6       "LaTeXML" - transforms TeX into XML.
7

SYNOPSIS

9           use LaTeXML::Core;
10           my $latexml = LaTeXML::Core->new();
11           $latexml->convertAndWrite("adocument");
12
13       But also see the convenient command line script latexml which suffices
14       for most purposes.
15

DESCRIPTION

17   METHODS
18       "my $latexml = LaTeXML::Core->new(%options);"
19           Creates a new LaTeXML object for transforming TeX files into XML.
20
21            verbosity  : Controls verbosity; higher is more verbose,
22                         smaller is quieter. 0 is the default.
23            strict     : If true, undefined control sequences and
24                         invalid document constructs give fatal
25                         errors, instead of warnings.
26            includecomments : If false, comments will be excluded
27                         from the result document.
28            preload    : an array of modules to preload
29            searchpath : an array of paths to be searched for Packages
30                         and style files.
31
32           (these generally set config variables in the LaTeXML::Core::State
33           object)
34
35       "$latexml->convertAndWriteFile($file);"
36           Reads the TeX file $file.tex, digests and converts it to XML, and
37           saves it in $file.xml.
38
39       "$doc = $latexml->convertFile($file);"
40           Reads the TeX file $file, digests and converts it to XML and
41           returns the resulting XML::LibXML::Document.
42
43       "$doc = $latexml->convertString($string);"
44           OBSOLETE Use "$latexml-"convertFile("literal:$string");> instead.
45
46       "$latexml->writeDOM($doc,$name);"
47           Writes the XML document to $name.xml.
48
49       "$box = $latexml->digestFile($file);"
50           Reads the TeX file $file, and digests it returning the
51           LaTeXML::Core::Box representation.
52
53       "$box = $latexml->digestString($string);"
54           OBSOLETE Use "$latexml-"digestFile("literal:$string");> instead.
55
56       "$doc = $latexml->convertDocument($digested);"
57           Converts $digested (the LaTeXML::Core::Box reprentation) into XML,
58           returning the XML::LibXML::Document.
59
60   Customization
61       In the simplest case, LaTeXML will understand your source file and
62       convert it automatically.  With more complicated (realistic) documents,
63       you will likely need to make document specific declarations for it to
64       understand local macros, your mathematical notations, and so forth.
65       Before processing a file doc.tex, LaTeXML reads the file doc.latexml,
66       if present.  Likewise, the LaTeXML implementation of a TeX style file,
67       say style.sty is provided by a file style.ltxml.
68
69       See LaTeXML::Package for documentation of these customization and
70       implementation files.
71

SEE ALSO

73       See latexml for a simple command line script.
74
75       See LaTeXML::Package for documentation of these customization and
76       implementation files.
77
78       For cases when the high-level declarations described in
79       LaTeXML::Package are not enough, or for understanding more of LaTeXML's
80       internals, see
81
82       LaTeXML::Core::State
83         maintains the current state of processing, bindings or variables,
84         definitions, etc.
85
86       LaTeXML::Core::Token, LaTeXML::Core::Mouth and LaTeXML::Core::Gullet
87         deal with tokens, tokenization of strings and files, and basic TeX
88         sequences such as arguments, dimensions and so forth.
89
90       LaTeXML::Core::Box and  LaTeXML::Core::Stomach
91         deal with digestion of tokens into boxes.
92
93       LaTeXML::Core::Document, LaTeXML::Common::Model, LaTeXML::Core::Rewrite
94         dealing with conversion of the digested boxes into XML.
95
96       LaTeXML::Core::Definition and LaTeXML::Core::Parameters
97         representation of LaTeX macros, primitives, registers and
98         constructors.
99
100       LaTeXML::MathParser
101         the math parser.
102
103       LaTeXML::Global, LaTeXML::Common::Error, LaTeXML::Common::Object
104         other random modules.
105

AUTHOR

107       Bruce Miller <bruce.miller@nist.gov>
108
110       Public domain software, produced as part of work done by the United
111       States Government & not subject to copyright in the US.
112
113
114
115perl v5.32.1                      2021-01-25                  LaTeXML::Core(3)
Impressum