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

Examples
⌘ / Ctrl + Enter to render

RaTeX output Loading…

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

  1. 01

    Native and server rendering

    Render with CoreGraphics on Apple platforms, Android Canvas, Flutter Canvas, or server-side PNG and SVG output.

  2. 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.

  3. 03

    Tested scientific notation

    \ce / \pu / prooftree and 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.

Verify your formulas, then integrate the same core