Skip to content

Temml

API reference

Rendering TeX to MathML: options, macros, errors, the build tree, and the embedded assets.

Type Summary
AnchorNode An a element. Maps to AnchorNode in src/domTree.js.
DocumentFragment A list of nodes that has no markup of its own. Maps to DocumentFragment in src/tree.js.
DomPropertyMap The attributes or the style of a node: names to values in the order JavaScript enumerates object keys. A null value is upstream’s undefined and prints as “undefined”.
HtmlTextNode A text node of the HTML tree. Maps to TextNode in src/domTree.js.
Img An img element. Maps to Img in src/domTree.js.
MathDomNode The base of the nodes of a build tree. Maps to the node classes of src/tree.js, src/domTree.js and src/mathMLTree.js.
MathNode A MathML element, such as mo or mspace. Maps to MathNode.
ParseError The main error thrown by Temml when something has gone wrong in the expression. Maps to src/ParseError.js.
Span A span element. Maps to Span in src/domTree.js.
TemmlAssets The style sheets and the font that upstream ships in dist, as embedded resources.
TemmlMacro A macro definition: a string body, a token list, or a function. Maps to the values of upstream’s macros objects.
TemmlMacroDictionary Macro name to definition, in insertion order. Maps to upstream’s prototype-less macros objects. A name may be present with a null value, which is upstream’s explicit undefined. An instance passed in TemmlOptions.Macros is written to by definitions such as \gdef, so do not share one between threads.
TemmlMacroExpansion The token list form of a macro, as \def produces. Maps to upstream’s { tokens, numArgs, delimiters, unexpandable } objects.
TemmlOptions The rendering options. Maps to the options object of upstream’s Settings.
TemmlRenderer Converts TeX math to MathML. Maps to temml.js, the main entry point of Temml.
TemmlToken The token returned by the lexer, with its position. Maps to the Token class in src/Token.js.
TemmlTrustContext What a trust function is asked about. Maps to the context object passed to upstream’s settings.trust.
TextNode A piece of text in the MathML tree. Maps to TextNode.
Type Summary
ITemmlMacroContext What a function macro can do. Maps to the public methods of upstream’s MacroExpander.
Type Summary
TemmlMode The parsing mode. Maps to the “math” and “text” mode strings.
TemmlWrap Where soft line breaks go. Maps to the wrap setting.

MIT · Copyright 2020 Ron Kok · unofficial community port of Temml