I've been meaning to check out Typst for over a year now. The premise was intriguing: what if we rewrote \(\TeX\) (and \(\LaTeX\)) from the ground up, discarding the parts that made sense fifty years ago and taking everything we've learned in the meantime to make a simpler, clearer markup language? (And also wrote it in Rust for blazing speed.)
I've mentioned \(\LaTeX\) and my love for it many times on this blog. I think I was first introduced to it during the spring semester of 2010, and my immediate thought was: where has this been all my life? \(\LaTeX\) is a markup language (built as an extension of the earlier \(\TeX\)) where documents written in it are compiled to output a nicely typeset version (usually in a format like .pdf or .ps). One of its big selling points is its ability to handle complex mathematics; for scientific writing in particular, which may need to include complex equations with highly specific formatting, it's a lifesaver. I've got a Javascript library called MathJax on this blog which lets me use (some) \(\LaTeX\) formatting to display mathematical output such as:
\[\text{Coulomb's Law: } F=k\frac{q_1 q_2}{r^2}\hat{r}\text{ where the Coulomb constant } k=8.988\times10^9\frac{\text{N}\cdot\text{m}^2}{\text{C}^2}.\]
I was initially drawn to \(\LaTeX\) for the beauty of its output. It was also practical: you can write pretty much any kind of document in \(\LaTeX\), and most scientific journals allow (or require) manuscripts to be submitted in it. I wrote my thesis in it, then turned it into two papers for publication.
At the same time, \(\LaTeX\) is not without its weaknesses. The underlying language \(\TeX\) is both very powerful and very complex (\(\LaTeX\) is essentially an addon for \(\TeX\) to make it easier to use), has a famously steep learning curve, doesn't natively handle UTF-8 characters, and even after years of using \(\LaTeX\) I occasionally run into bizarre issues. Perhaps the strangest was discovering that a hyperlink which spanned a page break in my thesis caused the whole document to fail with a very obscure error message – one I actually never found a real fix for despite much searching. The only advice I could find which worked was to adjust the length of the text before the hyperlink such that it no longer crossed two pages!
This is not to disparage \(\LaTeX\) – it's still worth knowing, I think, has been immensely useful for many people around the world, and it still feels a little magical to watch it take a series of abstruse text and turn it into something beautifully formatted. However, I'm cognizant of its flaws, and open to new experiences.
Enter Typst.
There's something of a pattern in software development, where after developing a piece of complex software, sometimes the best way to improve is to start over from scratch using the lessons learned rather than try to continue patching and editing it. Typst is essentially that rewrite for \(\LaTeX\), taking lessons learned from the last forty years and improving upon it (at least in theory).
Over the summer I read through the Typst tutorial, though Hurricane Lala knocking out power for two days the week before the semester started put a crimp in my plans to try writing my syllabi with it. A practical demonstration of Typst is that I sat down Sunday afternoon the day before I was due to begin teaching and attempted to write a syllabus in it (based on an existing \(\LaTeX\) template I had), and within an hour or two I'd created something which mimicked ~95% of the original's look while requiring much less text to pull off. I was seriously impressed, and then hooked.
It's a little hard to show off what Typst can do, since by design it's often used to mimic the look of \(\LaTeX\) documents. What I can say, however, is that it's much easier to use. This morning in some free time I followed the tutorial instruction to turn my syllabi into a template for future syllabi to use, something I've never even attempted in \(\LaTeX\).
It's also a real joy to use due to lightning-fast compilation. With \(\LaTeX\) you have to run a compiling command, which even for relatively short documents often takes a few seconds. Typst compiles incredibly quickly due to an incremental compilation system, allowing you to see the output of what you're typing in basically real time. And coming back to writing \(\LaTeX\) for this post, I find myself appreciating that all the more; it's amazing what a shorter feedback loops does, allowing you to more easily experiment and try things and see the result immediately.
I could wax lyrical about other features of Typst*, but this post is getting long and I have a feeling I'll be talking about it more in the future. I find myself drawn back to it, wanting to experiment and see what else I can get it to do. And that's perhaps the greatest endorsement I can give Typst: using it is fun. I'm reminded of the heady days when I first discovered \(\LaTeX\), and I can hardly wait to write more in Typst and see what interesting and beautiful things I can create with it. Hopefully I can show some off in the future when I've learned more! A hui hou!
*Typst's syntax is generally lighter and simpler than \(\LaTeX\)'s, its error messages when something is broken are extremely helpful in pointing you to the problem, it has a powerful and flexible CSS-like functionality built-in which makes it a snap to style elements, etc.














