//! Mathematical formulas. pub mod accent; mod attach; mod cancel; mod equation; mod frac; mod lr; mod matrix; mod op; mod root; mod style; mod underover; pub use self::accent::{Accent, AccentElem}; pub use self::attach::*; pub use self::cancel::*; pub use self::equation::*; pub use self::frac::*; pub use self::lr::*; pub use self::matrix::*; pub use self::op::*; pub use self::root::*; pub use self::style::*; pub use self::underover::*; use typst_utils::singleton; use unicode_math_class::MathClass; use crate::foundations::{elem, Content, Module, NativeElement, Scope}; use crate::introspection::Locatable; use crate::layout::{Em, HElem}; use crate::text::TextElem; // Spacings. pub const THIN: Em = Em::new(1.0 / 6.0); pub const MEDIUM: Em = Em::new(2.0 / 9.0); pub const THICK: Em = Em::new(5.0 / 18.0); pub const QUAD: Em = Em::new(1.0); pub const WIDE: Em = Em::new(2.0); /// Create a module with all math definitions. pub fn module() -> Module { let mut math = Scope::deduplicating(); math.start_category(crate::Category::Math); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_elem::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::(); math.define_func::