math_core_renderer_internal/lib.rs
1//! Internal library for the `math-core` crate for rendering MathML.
2//!
3//! This library allows you to construct an AST representing MathML and then render it to a string.
4//!
5//! # Example
6//!
7//! ```rust
8//! use math_core_renderer_internal::ast::Node;
9//! use math_core_renderer_internal::symbol;
10//! use math_core_renderer_internal::attribute::{MathSpacing, LetterAttr};
11//!
12//! let ast = Node::Row {
13//! nodes: &[
14//! &Node::Underset {
15//! target: &Node::Operator {
16//! op: symbol::N_ARY_SUMMATION.as_op(),
17//! attr: None,
18//! left: Some(MathSpacing::Zero),
19//! right: None,
20//! },
21//! symbol: &Node::IdentifierChar('i', LetterAttr::Default),
22//! },
23//! &Node::IdentifierChar('i', LetterAttr::Default),
24//! ],
25//! attr: None,
26//! };
27//!
28//! let mut output = String::new();
29//! ast.emit(&mut output, 0).unwrap();
30//! assert_eq!(
31//! output,
32//! "<mrow><munder><mo lspace=\"0\">∑</mo><mi>i</mi></munder><mi>i</mi></mrow>"
33//! );
34//! ```
35pub mod arena;
36pub mod ast;
37pub mod attribute;
38mod fmt;
39mod itoa;
40pub mod length;
41pub mod symbol;
42pub mod table;