Remix.run Logo
raybb 7 hours ago

I'm currently working on my fourth book produced using Typst, and it has been nothing but amazing. LLMs struggle with Typst a bit but other than that it has been an absolute joy to work with.

I have a pretty good workflow set up for publishing these books, which are mostly collections of student essays. I use Pandoc to convert the students' Word documents into Typst, then unify the formatting, styles, and headers (mostly via LLMs). From there, I generate both a nice digital PDF and a print-ready PDF using Typst, and then use Pandoc again to convert the Typst into what ultimately becomes an EPUB.

It all works quite beautifully. Most of the challenges I've run into are related to Typst features that don't map cleanly to Pandoc, so I end up adding a few funky conditionals so those features aren't hit when converting via Pandoc. sys.inputs makes that very easy https://github.com/jgm/pandoc/issues/11588

The books in question: https://thelabofthought.co/shop

weinzierl 7 hours ago | parent | next [-]

"LLMs struggle with Typst a bit"

My experience is the opposite. Especially when instructing the LLM to do very fine grained and detailed adjustments. Works like a charm.

Typst is my go-to format if I need more than plain text.

echoangle 7 hours ago | parent | next [-]

I had the same experience as the root commenter. Sometimes ChatGPT seems to generate invalid typst code that doesn’t even compile. Maybe the syntax changed and it did work at some point but some stuff looked so wrong that I would guess it just doesn’t have enough training data for proper typst generation without feeding examples into the context first.

cagey 3 hours ago | parent | prev [-]

My experience is the same. It was agonizing directing Claude Code (Opus 4.7 at that time) to create a (non-mathematical) preso using LaTex. After banging my head against that wall for too long, I asked why this process (placing entities on the output PDF page according to specific requirements) was so error prone, and received the answer "LaTex is really the wrong tool for this job". I chose Typst from among the offered alternatives, and it has been a MUCH better experience. I switched my resume to Typst too.

elsoja 5 hours ago | parent | prev | next [-]

Using skills can help a lot. They can guide agents to not use LaTeX syntax (a common problem) and provide access to the full documentation.

https://github.com/apcamargo/typst-skills/

__mharrison__ 3 hours ago | parent | prev | next [-]

Frontier LLMs work great with Typst. (Have published multiple books using it).

wtb04 6 hours ago | parent | prev [-]

I’ve been using Typst pretty heavily for the past few months after a few years of LaTeX, and I’ve had a similar experience. I do really love Typst though. It feels nimble, pleasant to work with and like a huge improvement over LaTeX in a lot of ways.

That said, LLMs have been noticeably better with LaTeX than with Typst for me. Typst works fine for the basics: loops, functions, small layout tweaks and that kind of thing. The problems mostly show up with more niche features.

What helped me was pointing the LLM to the current Typst docs, either the website or as they mention in their blog about the new update they also have a PDF export of the docs now (https://github.com/typst/typst/releases/download/v0.15.0/typ...). The docs are very good, and I suspect older training data plus Typst’s breaking changes are part of the problem.

One downside is that because I started using Typst with LLMs right away, I got a big head start but never became fully fluent in the language. I still find myself going back to the docs, the internet or an LLM more often than I’d like.