Skip to main content

mt_core/
lib.rs

1//! Model layer for the equation editor: the tree that parsers build, the editor mutates and the
2//! renderers draw.
3//!
4//! ```
5//! use mt_core::{Math, Node, Path};
6//!
7//! let mut equation = Math::new(Node::row([Node::variable('a')]));
8//! equation.body.insert_at(&Path::root(), Node::variable('b'));
9//! assert_eq!(equation.body.slot_count(), 2);
10//! ```
11#![forbid(unsafe_code)]
12
13pub mod ast;
14pub mod faces;
15
16pub use ast::{
17    Accent, AccentKind, ArrowKind, BigOp, Char, Class, Delim, Fence, FenceAlign, Font, Frac,
18    FracKind, LabeledArrow, Limits, LineStyle, Math, MathStyle, Matrix, MatrixKind, Node, Nudge,
19    Path, Row, Scripts, Side, Size, Space, Sqrt, StyleRef, Styled, TextRun, VerticalAlign,
20};
21pub use faces::{
22    Convention, class_of_char, class_of_char_with, extra_letter, is_cjk, is_extra_face,
23    is_large_op_with, is_symbol_face,
24};