Hacker News new | ask | show | jobs
by thomas34298 691 days ago
FWIW there is already partial LaTeX support for Typst via the mitex package:

https://github.com/mitex-rs/mitex

2 comments

This is interesting! However, I suspect general TeX support in Typst is probably impossible unless you re-implement the entirety of TeX within Typst somehow. The TeX language has some really terrible properties. For example, the tokenization rules can be dynamically changed at runtime based on the output that has already been produced. E.g. you can write a TeX file that says "typeset this paragraph, and if the result is an odd number of lines, change the meaning of A from letter to open brace". Thus, fully supporting TeX within Typst would seem to require making all of the internals of Typst available to the TeX runtime.
Is that just common constructs, or can I pull in amsmath and other similar packages?