module

MathJax

Constants

VERSION = "1.1.0"

Class methods

css

CSS for the HTML output.

Source
from_mathml(mathml : String) : Mml::Node

Parse a MathML string into an MML tree.

Source
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.

Source
parse_asciimath(input : String, display : Bool = false) : Mml::Node

Parse an AsciiMath expression into an MML tree (subset).

Source
parse_or_error(tex : String, display : Bool = false) : Mml::Node

Parse and return an <merror> node instead of raising.

Source
to_html(tex : String, display : Bool = false, physics : Bool = false) : String

TeX -> HTML string (spans with mjx-* classes; see .css).

Source
to_mathml(tex : String, display : Bool = false, physics : Bool = false) : String

TeX -> MathML string.

Source
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.

Source

Nested types