Overview
graphitepdf-math converts LaTeX input into typed SVG scene data that can flow through the same downstream pipeline as ordinary SVG content.
Scope
graphitepdf-math contains:
MathOptionsfor inline/display, dimensions, color, and debug outputMathRenderfor the original source, raw SVG, and parsedSvgNoderender_math()andrender_math_with_options()MathDimensionfor numeric or unit-bearing width/height values
Installation
API Summary
| Category | Items |
|---|---|
| Options | MathOptions, MathDimension |
| Render result | MathRender |
| SVG integration | SvgNode, SvgNodeKind |
| Entry points | render_math(), render_math_with_options() |
Example
use ;
Design Principles
- keep math rendering separate from PDF output concerns
- reuse the SVG pipeline instead of inventing a parallel scene format
- expose display and inline behavior explicitly
- keep the public surface small and easy to integrate
Role In GraphitePDF
This crate feeds layout, render, and kit indirectly through typed SVG output. It is the workspace's math scene producer.
License
MIT