Re:Show HN: Tylax – A bidirectional LaTeX to Typst converter...
by fiddlosopher on Saturday January 10, 2026 @05:45PM
(#46570702)
Pandoc does know how to expand LaTeX macros. For example, given the LaTeX
pandoc will give you the Typst
which is correct. Tylax, on the other hand, seems to have problems with this example, producing
which does not compile with typst. Going the other direction, pandoc also understands typst scripting. For example, from
pandoc produces this LaTeX:
With the same input, Tylax produces:
which is just an empty table.
[ Parent
| on HN ]
Re:Show HN: Tylax – A bidirectional LaTeX to Typst converter...
by democat on Sunday January 11, 2026 @05:35AM
(#46574312)
You are absolutely right. Thank you for pointing this out! Regarding your questions:
1. The `\pair` issue: This is definitely a bug. My macro expander is based on text replacement and obviously cannot handle nested parameters. I will fix the recursive logic.
2. The `fib` loop: Pandoc seems to use `typst-hs`, which contains a complete Typst evaluator. Tylax is strictly designed as a static AST transformer. We haven't implemented the Typst virtual machine, so loops or recursive functions cannot be executed. This will be gradually improved later to make it more usable; my claim of "better macro support" was clearly premature. This was a big mistake on my part, and we will strive to achieve this goal in future updates! Thank you very much for your feedback and for pointing out the bug!