Hi HN, author here.
I built Tylax because I wanted to migrate my old LaTeX papers to Typst but found existing regex-based scripts too fragile for nested environments.
Tylax parses LaTeX into an AST (using mitex-parser) and converts it to Typst code. It supports:
- Full document structure (not just math snippets)
- Complex math (matrices, integrals)
- Experimental TikZ -> CeTZ graphics conversion
- Runs in browser via WASM
Repo: https://github.com/scipenai/tylax
Web Demo: https://convert.silkyai.cn/
Happy to answer any questions!
\newcommand{\foo}[1]{\bar{#1}} \renewcommand{\bar}[1]{\foo{#1}} % mutual recursion \foo{x} \def\x{\y}\def\y{z}\x % chained expansion
+>
#set page(paper: "a4") #set heading(numbering: "1.") #set math.equation(numbering: "(1)") /* \foo / / \y /
\foo{x} → \bar{x} → \foo{x} → ∞ Expected: hit depth limit, emit warning, output either x or the unexpanded \foo{x} Actual: / \foo */ — silently converted to a comment, lost the argument x entirely