Expand description
mathra: equations as a tree of meaning, drawn with explicit rules.
let svg = mathra::tex_to_svg("3.14").unwrap();
assert!(svg.contains("-speech\">3.14</title>"));Re-exports§
pub use locale::Locale;pub use output::braille::BrailleCode;pub use rules::Applied;pub use tree::Class;pub use tree::Node;
Modules§
- font
- Math font embedded in the binary. Nothing is read from the user’s system.
- input
- layout
- From the tree to positioned boxes. Follows Appendix G of the TeXbook, with parameters taken from the font’s MATH table (as MathML Core describes).
- locale
- Writing conventions per language. The tree does not change; only how it is written and read.
- output
- rules
- Ids of the rules in
spec/rules.md. The code cites the rule it applies, and the CLI’s--explainshows which rules changed the result. - tree
- Tree of meaning: each node says what the thing is, not how it is drawn. The form (comma or dot, “sen” or “sin”, where limits go) is decided later, by the locale and the style.
Structs§
Enums§
Constants§
Functions§
- convert
- Converts an equation (LaTeX by default; see
Options::input) to SVG, speech, text and tree. - tex_
to_ svg - Shortcut with the default locale (English).
- typeset
- The composed box, without generating SVG: for callers that draw the equation inside something else (tikra’s figure labels). Also returns the tolerant mode’s warnings.