Expand description
Presentation MathML rendering rules.
Port of LaTeXML::Post::MathML::Presentation (146 lines) +
the presentation portion of LaTeXML::Post::MathML (main module, ~1000 lines).
Converts XMath nodes to Presentation MathML elements (mi, mo, mn, mrow, etc.).
Key concepts:
pmml(node)dispatches conversion by tag (XMTok, XMApp, XMDual, etc.)stylizeContent(item, tag)determines text, mathvariant, size, spacing- Scripts (sub/sup/under/over) handle pre/mid/post positioning
- Style context tracks display/text/script/scriptscript levels
Enums§
- Math
Style - Math style levels.
Functions§
- adjust_
spacing - Walk the MathML tree and adjust spacing. Port of Perl
adjust_spacing/space_walk(MathML.pm L1079-1133): resolves the difference between TeX’s inter-atom spacing and MathML’s operator-dictionary spacing. - clean_
internal_ attrs - Clean up internal _role/_lspace/_rspace attributes before serialization.
- convert_
to_ pmml - Convert an XMath tree to Presentation MathML.
- font_
to_ mathvariant - Map a LaTeXML font name to a MathML mathvariant value.
- set_
invisible_ times - Set whether to emit invisible times (called by MathML processor before rendering).
- set_
plane1 - Set the Plane-1 remapping mode (called by the MathML processor before
rendering). Mirrors Perl
preprocessL69-71:hackplane1impliesplane1.