MiTeX is a Rust + WASM tool that parses LaTeX into an abstract syntax tree and converts that AST into Typst code, allowing LaTeX content to be rendered natively inside Typst. It emphasizes correctness, compactness, and speed: the WASM build is about 185 KB (versus 17 MB for texmath) and, in a real-world test converting 32.5k equations from OI Wiki, texmath took ~109 s while MiTeX WASM took 2.28 s and a native x86 build took 0.085 s. The project demonstrates high-fidelity transformations (for example representing fractions and delimiters in Typst-style expressions rather than flattened ASCII approximations) and credits a contributor for developing the core parser.
MiTeX is available as a Typst package (functions like mitex-convert, mi, mitex/mimath, mitext), a CLI (mitex compile), and a web WASM converter with an Underleaf proof-of-concept editor. Implemented features include user-defined macros, coloring, aligned/matrix/cases environments, basic text-mode constructs (sections, bold, emphasis), labels/refs, lists, figures/tables, and inline/block math. Planned work covers dynamic command specs, package support, and richer text-mode handling. Extensions and missing commands can be contributed via issues or pull requests, and users can add per-document preambles to define custom macros.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.