MathJax
Constants
VERSION = "1.1.0"
Class methods
parse(tex : String, display : Bool = false, physics : Bool = false) : Mml::Node
Parse a TeX expression into an MML tree ( root).
Raises TeX::TexError on invalid input.
physics: true enables the physics macro subset.
parse_asciimath(input : String, display : Bool = false) : Mml::Node
Parse an AsciiMath expression into an MML tree (subset).
parse_or_error(tex : String, display : Bool = false) : Mml::Node
Parse and return an <merror> node instead of raising.
to_html(tex : String, display : Bool = false, physics : Bool = false) : String
TeX -> HTML string (spans with mjx-* classes; see .css).
to_mathml(tex : String, display : Bool = false, physics : Bool = false) : String
TeX -> MathML string.
to_svg(tex : String, display : Bool = false, physics : Bool = false, paths : Bool = false) : String
TeX -> SVG string (metrics-based layout, see MathJax::Fonts).
With paths: true, emits the MathJax v3 structure instead: glyph
outline paths in a single <defs> + <use xlink:href>, sized in ex,
colored via currentColor — rasterizes by nanosvg.cr without
system fonts.