Expand description
Math-renderer compatibility profiles and math-body checking.
mdwright-latex owns the TeX vocabulary and the math-body lexer; this
crate owns the renderer question: given a configured profile, which
commands and environments in a body would actually render? The tables and
the package-mask machinery stay private; the public surface is a
Renderer enum, a RenderProfile builder, a single check_math_body
function, and a small RenderIssue enum.
Today MathJax v3 and KaTeX are modeled. Adding a new renderer (MathJax v4,
typst, …) happens by adding a Renderer variant, a constructor on
RenderProfile, and a new pair of overlay tables in tables.
Structs§
- Render
Profile - A configured renderer profile: which renderer, which packages it has loaded, and which user-declared macros are in scope.
- Source
Span - Byte span in the original math body.
Enums§
- Render
Issue - One compatibility issue found in a math body. Spans are byte ranges into
the math-body source given to
check_math_body. - Renderer
- Math renderer that consumes the TeX-shaped source.
Functions§
- check_
math_ body - Check
source(one math body, no enclosing delimiters) againstprofile.