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

GPT 5 and Gemini 2.5 Pro are usually unable to write compiling Typst code, getting it confused with Markdown. Claude Opus 4.1 and Sonnet 4 manage to produce compiling Typst code more often than not, but is far from being able to follow instructions.

I assume there is just next to no Typst code on the internet as of their training and the similarities to MD + MathJax result in LLMs hallucinating Typst syntax, often using `#` for headings or `\` and `{ ... }` in math mode.

Therefore, I must say that LLMs are more of a hindrance than help when writing Typst code. The syntax is nice enough though that I can fully understand that writing something oneself is very simple once you understand the concepts (content as a type; `show:` vs `show [rule]:` vs `set`; control flows with `if`, `for`, `while`). And for any questions there is an active discord channel with helpful real people.



Presumably it works fairly well if you include a syntax cheatsheet and some example typst markup in the context you send to the LLM?




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: