Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I looked at the Typst documentation and from what I could tell, it has 3 hard-coded "Modes" for 3 hard-coded kinds of syntax (normal, math, code). I couldn't find any way to add any custom syntax - is there a way to do this?

Tex/LaTeX are completely syntactically extensible. For example, a logician might want to use the software with any number of their notations, or a physicist drawing Feynmann diagrams, etc. I think at one point Lillypad used it for typesetting sheet music.

Edit: i found it! https://typst.app/docs/guides/guide-for-latex-users/#package...



I hated most Latex syntactic extensions that I ever has to deal with. They basically force you to learn completly different languages, each with their own quirks. I found simple function-looking macros to most often be more intuitive and reliable.


Inside certain boundaries, you can define custom markup syntax in a way, including abbreviations or more scary regex matching style rules.

But code syntax can not be changed an no you can't redefine if @ is a letter or not and flip flop that in your code like latex does.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: