First impressions with Typst
by Sam Estep, 2025-03-27
Typst is a modern alternative to LaTeX. I've been interested in it for a while: it promises to be both more user-friendly and far more performant than LaTeX. Unfortunately, though, it'll probably be quite some time before it's a real option for academic publishing in computer science. arXiv requires TeX source code, as do many conferences.
But today I had an excuse to try it out: I'm not required to use TeX for my thesis proposal! What better way to procrastinate than by trying a new tool? Actually, I've gone through the Typst tutorial before, but I forgot everything since then, so I still count this as a first impression.
The good
It's so easy to just get started writing: unlike LaTeX, you can just type in a completely empty file and those words will show up immediately in the rendered document. And obviously the near-instant rendering speed is just night and day compared to every LaTeX engine I've used.
I've never considered myself "good at" TeX so this is probably just a skill issue, but I found it quite easy to getting some basic formatting going (e.g. for the first page of a thesis proposal), since the syntax feels familiar (kinda similar to Markdown) and is generally lighter-weight than LaTeX.
There seems to be some pretty smart behavior for automatically
scrolling the rendered view to where you're typing. For instance, I
was looking at the autogenerated table of contents, and I added a new
#pagebreak()
and section heading at the bottom of the
document; the view stayed where it was and continuously updated as I
typed the section title. Then when I hit Enter and started typing the
section contents, it immediately scrolled down to the bottom
of the document.
-
I tested this further by going back and forth between typing in a couple different sections, and I noticed that it only jumped when I typed a non-whitespace character. At first I thought this was because it only jumps on a "visible" change, but then I realized that's not the case: I tried typing an extra space in the middle of a sentence, and it still jumped even though that space didn't appear in the rendered output. So I guess it just trims whitespace from the end of a paragraph.
-
Interestingly, it only seems to jump when adding characters, not when deleting them.
-
Unlike Overleaf, I don't see a button you can just click to scroll the rendered output to the point corresponding to a location in the source. This doesn't really matter though, since you can just type in the source to make it automatically scroll.
Just like with LaTeX, you can click on a reference number to jump to
the corresponding bibliography item. I kind of wish there were a
keyboard shortcut to jump back (similar to
^-
in VS Code), but again, I can achieve that by just typing in the source.
The "Hayagriva" YAML-based bibliography format seems fine. It's nice to have an actually-machine-readable data format. Plenty of people have their gripes with YAML, but personally I don't mind it.
The bad
The dictionary is case-sensitive which I think is generally good, but in this case that actually becomes bad because it's limited to 100 words. It's not even sorted, which seems absurd! There's a GitHub issue about this.
It is a bit annoying to debug parse errors in the bibliography YAML.
For instance, one paper's title had a colon in it (a fairly common
occurrence), and the error message said "Failed to parse YAML
(mapping values are not allowed in this context at line 3 column
14)", which is the right location for the error in my
actual refs.yml
file; but the error message says it comes
from main.typ
, and after that message it says "(line
73)" which is just the line number for the
#bibliography
command at the end of my
main.typ
file. When I click on it, it brings me there
instead of to the actual error location in the
refs.yml
file. And when I go to refs.yml
,
there are no red squigglies at all (even though it's just a generic
YAML parsing error), so I have to look back at the line and column
number from the error message to locate it and fix it (by wrapping in
double quotes).
Overall, I like it! My current prediction is that it'll be a relatively smooth experience for this thesis proposal. This is a pretty short post since I want to get comfortable with posting more frequently. Maybe later I'll write a followup after I've used Typst more.