Escape LaTeX's Math Maze: How Typst and Pandoc Streamline Equation Typesetting
Share this article
For decades, LaTeX has dominated technical and academic publishing, offering unparalleled typesetting precision—especially for complex mathematics. Yet its verbose, arcane syntax for equations remains a notorious pain point. Enter Typst, a rising open-source typesetting system designed as a LaTeX successor. With its streamlined, readable markup for math, Typst promises to make document creation faster and less error-prone. But there's a catch: most journals and conferences still mandate LaTeX submissions, locking authors into outdated workflows.
This is where Pandoc—the universal document converter—shines. As developer Lee Phillips details in a recent article, a simple Lua filter can transform Typst's elegant math syntax into LaTeX-compatible output within Pandoc workflows. Here's why this matters:
- Typst's Math Advantage: Typst replaces LaTeX's cluttered
\frac{1}{2}with concise1/2, using intuitive Unicode-like symbols (e.g.,αinstead of\alpha). This reduces cognitive load and minimizes typos, accelerating writing. - The Pandoc Bridge: By integrating a custom filter, Pandoc users can write documents in Markdown with Typst-style equations. During conversion, the filter automatically translates math elements into LaTeX, preserving compatibility with journal templates like RevTeX.
- Real-World Impact: Developers and researchers gain modern ergonomics without sacrificing submission readiness. Phillips notes this is particularly valuable for collaborative projects where readability and maintainability are critical.
The filter, hosted in a Git repository, is intentionally minimal. Phillips invites improvements, acknowledging its simplicity:
git clone https://lee-phillips.org/typstfilters/code
While elegant, this solution underscores a broader industry tension: innovation often outpaces institutional adoption. Tools like Typst represent the future of technical communication—leaner, more accessible, and developer-friendly. Yet the academic ecosystem's inertia with LaTeX demands such pragmatic bridges. As open-source contributions refine these filters, they don't just ease document pain; they subtly push legacy systems toward obsolescence, one equation at a time. For now, though, this Pandoc-Typst synergy offers the best of both worlds: write with modern ease, publish with ancient requirements.