Rust layout core · native + WASM
LaTeX math layout from one Rust core
Parse and lay out math once, then draw the same display-list model with CoreGraphics, Android Canvas, Flutter Canvas, Canvas 2D, tiny-skia, or your own backend.
- Core
- Rust
- Targets
- Native + WASM
- License
- MIT
KaTeX compatibility: RaTeX aims to match KaTeX as closely as possible, using versioned golden cases to compare syntax coverage, layout, and rendered reference images. The support table shows the current compatibility level, live browser output, and offline ink scores.
Live WASM preview
RaTeX output Loading…
One pipeline · multiple hosts
Choose your integration surface
Use the WebAssembly package, native platform bindings, or server renderers. Installation, font setup, and current package versions are in Get started.
What RaTeX is built for
- 01
Native and server rendering
Render with CoreGraphics on Apple platforms, Android Canvas, Flutter Canvas, or server-side PNG and SVG output.
- 02
A shared layout pipeline
Lexer, parser, layout, and display-list generation stay in Rust across native bindings and WebAssembly. Inspect output in the live demo.
- 03
Tested scientific notation
\ce/\pu/prooftreeand the implemented bussproofs-style proof-tree subset are covered alongside ordinary math in dedicated golden cases.
Try it in the browser
Pursuing KaTeX compatibility
RaTeX aims to match KaTeX as closely as possible across syntax, layout semantics, and visual output. The live comparison, versioned support table, and golden-suite galleries make current compatibility visible and track formulas that still need alignment.
Live comparison
Edit one LaTeX line and compare RaTeX canvas output with KaTeX side by side—status, errors, and the same WASM bundle as the galleries.
Golden suiteSupport table
Opens the full-page benchmark: every golden-suite line vs KaTeX 0.16.45, with batch IoU scores and a live RaTeX column in your browser—best for coverage and regression triage.