Expand description
MathML conversion processor.
Port of LaTeXML::Post::MathML (2162 lines) + submodules:
Presentation.pm(146 lines) — Presentation MathML rendering rulesContent.pm(31 lines) — Content MathML rendering rulesLinebreaker.pm(1053 lines) — MathML line-breaking algorithmOperatorDictionary.pm(252 lines) — Operator symbol table
This is the primary math conversion format for web output. Converts XMath parsed math into Presentation MathML and/or Content MathML.
Modules§
- content
- Content MathML rendering rules.
- linebreaker
- MathML line-breaking algorithm.
- operator_
dictionary - MathML Operator Dictionary.
- presentation
- Presentation MathML rendering rules.
Structs§
- MathML
- MathML post-processor.
- Text
Attrs - Perl’s
%attrforpmml_text_aux— the presentation attributes an enclosingltx:*element contributes to them:mtextelements below it.
Enums§
- Apply
Handler - Presentation handler type for XMApp nodes.
Functions§
- apply_
handler_ for_ meaning - Determine the presentation handler for a specific meaning.
- apply_
handler_ for_ role - Determine the presentation handler for an XMApp based on operator role.
- cmml_
element_ for_ meaning - Known Content MathML elements for specific meanings.
- convert_
xm_ text_ content - Eagerly materialize an XMText-or-picture subtree into owned NodeData.
- encoding_
for_ mimetype - MathML encoding names for parallel markup annotation-xml.
- find_
inherited_ attribute - Find an inherited attribute by walking up the LaTeXML ancestor chain.
- get_
xm_ hint_ spacing - Convert an XMHint spacing attribute to em value.
- has_
dedicated_ cmml_ structure - Whether an XMApp with this meaning has a dedicated Content MathML structure.
- is_
bigop_ role - Whether a role should use the “big operator” presentation style.
- pmml_
parenthesize - Parenthesize an expression with open/close delimiters.
- pmml_
punctuate - Punctuate a list of items with separators.
- pmml_
row - Wrap items in an mrow, filtering out ignorable items.
- pmml_
tag_ for_ role - Presentation MathML tag for a token role.
- pmml_
text_ aux - Convert a text node within XMText to Presentation MathML.
- pmml_
unrow - Unwrap an mrow if it has no attributes.
- rebuild_
text_ subtree - Rebuild a libxml2 subtree into owned
NodeData, dropping internal_*,xml:id, andfragidattributes. Shared betweenconvert_xm_text_content(PerlconvertXMTextContent, Post.pm L456-489) andpmml_text_auxfor cases where Perl callscloneNode($node, 'nest')(MathML.pm L1073) — i.e. when an unhandled element likeltx:refappears inside a text-mode fragment and must survive into the output so the XSLT can transform it (e.g.ltx:ref→<a>). - rebuild_
text_ subtree_ with_ doc - Same as
rebuild_text_subtree, but consults the post-document’s namespace map to resolve elements whose sourcexmlns="…"carries an empty prefix.add_nodesonly emits elements whose tag isprefix:local; without a prefix the element is dropped with amalformed:namespacewarning. libxml2 reports an emptyNamespace::get_prefix()for the default-namespace branch even when the doc has altx:prefix declared elsewhere, so we reverse-lookup the URI inPostDocument::namespacesto recover the canonical prefix. - style_
size - Size percentage for math styles.
- style_
step - Math style step-down table.