mdwright_mathrender/lib.rs
1//! Math-renderer compatibility profiles and math-body checking.
2//!
3//! `mdwright-latex` owns the TeX vocabulary and the math-body lexer; this
4//! crate owns the *renderer* question: given a configured profile, which
5//! commands and environments in a body would actually render? The tables and
6//! the package-mask machinery stay private; the public surface is a
7//! `Renderer` enum, a `RenderProfile` builder, a single `check_math_body`
8//! function, and a small `RenderIssue` enum.
9//!
10//! Today MathJax v3 and KaTeX are modeled. Adding a new renderer (MathJax v4,
11//! typst, …) happens by adding a `Renderer` variant, a constructor on
12//! `RenderProfile`, and a new pair of overlay tables in `tables`.
13
14#![forbid(unsafe_code)]
15#![allow(
16 clippy::doc_markdown,
17 reason = "names like MathJax, KaTeX, TeX appear in prose; backticking each one would add noise"
18)]
19
20mod check;
21mod profile;
22mod tables;
23
24pub use check::{RenderIssue, check_math_body};
25pub use mdwright_latex::SourceSpan;
26pub use profile::{RenderProfile, Renderer};