KaTeX-compatible LaTeX math renderer in pure Rust. No JavaScript, no WebView, no DOM. One Rust core → iOS, Android, Flutter, Web, PNG. C ABI · WASM · Server-side PNG. ~99% KaTeX syntax coverage. - GitHub - erweixin/RaTeX: KaTeX-compatible LaTeX math renderer in pure Rust. No JavaScript, no WebView, no DOM. One Rust core → iOS, Android, Flutter, Web, PNG. C ABI · WASM · Server-side PNG. ~99% KaTeX syntax coverage.
No reviews yetBe the first to leave a review for RaTeX
Maker
📌
hi, I built a cross-platform native LaTeX math renderer written in Rust.
Most mobile math rendering relies on WebViews with KaTeX/MathJax. I wanted a fully native alternative shared across all platforms.
Pipeline:LaTeX → AST → TeX layout → DisplayList
Layout is computed once in Rust, then natively rendered everywhere:iOS (CoreGraphics), Android (Canvas), Flutter, React Native, Web (WASM + Canvas) — no WebViews at all.
I builded a “golden test” pipeline that compares ~1000 formulas against KaTeX using a simple ink-diff metric. It’s currently around ~0.9 similarity (higher for simpler layouts, lower for things like CD diagrams), support-table has the similarity score.
Feature-wise, it covers most KaTeX-style math, and in practice handles a wider range of syntax than libraries like iosMath / SwiftMath — especially for mhchem-style expressions like \ce、\pu and CD diagrams.
RaTeX is under active development. Found something wrong? Open an issue.