Crate mathemascii

Source
Expand description

Crate for parsing and rendering of AsciiMath.

Structs§

AsciiMath
Iterator that parses AsciiMath input and yields Expressions.
Binary
Binary operator in Ascii math.
Expression
The main AsciiMath expression.
GroupingExpr
AsciiMath grouping expression - any number of Expressions grouped between two grouping symbols, such as parentheses, brackets, etc.
Unary
Unary operator in Ascii math.
Var
Variable in Ascii math, meaning a symbol that stands on it’s own.

Enums§

SimpleExpr
Simple AsciiMath expression that can be one of the following:
VarKind
Kinds of “variables” in Ascii math.

Traits§

Writer
Trait for writing MathML elements. Each method in this trait has a default implementation that does nothing.

Functions§

parse
Parse asciimath content into an abstract syntax tree. The whole input is interpreted as a single math block. The result is a list of expressions.
render_mathml
Render the abstract syntax tree into a string of mathml.
write_mathml
Write an abstract syntax tree into the Writer. The resulting output is controlled by the implementation of passed in Writer.