111 comments

[ 3.6 ms ] story [ 88.4 ms ] thread
Typst is great. I'm sure it's not a complete LaTeX replacement, given the dominance of TeX for many decades, but for simple documents it's a breath of fresh air.

Not having to deal with the insanity of the LaTeX distribution system alone is worth the switch. Everything is contained in a single binary. The language itself is much simpler to read and write, and seems just as flexible. LLMs do a decent job of generating it. Compilation takes less than a second, making it so much faster to iterate.

Many thanks to the authors and contributors, and please don't ruin it. :)

Assuming it's at all desirable, it's an interesting and recurring problem of how to dislodge existing sub-optimal (sometimes even harmful) standards and notations.

Almost nobody wants to learn something new when they already know something similar.

Creates a heck of a momentum effect, not just from the practitioners resisting the change, but also available resources and so on.

Typst is fantastic and I recommend to dive into it to see how much value it offers. To me personally, the biggest strength is the ergonomics of both the tooling and the language, and how ergonomics persist even between documents of various complexity. Writing a paper in LaTeX is nice, but making something like a CV takes some patience. Meanwhile, in typst it was quick to get started and go all the way to building resumes, character sheets, and I know of at least one occurrence of implementing symbolic math in typst language. It's not without quirks, but still, very solid alternative
God it's so much easier than LaTeX. I wrote so many things in LaTeX over the years, and writing (and debugging) switching to Typst felt like, well, like somebody had been fighting me every step of the way, and then finally stopped. I'm not going back, if I can help it.

But I will say I've mostly written relatively simple documents in it, so maybe that colors my experience.

I've tried pushing Typst on my academic friends. One of them listened and eventually wrote his entire PhD thesis with it. He didn't seem to regret it.
These are some notes I wrote when I started out with typst when comparing with LaTeX:

1. It doesn't generate 5 bloody files when compiling.

2. Compiling is instant.

3. Diagnostics are way easier to understand (sort of like Rust compiler suggestion style).

4. List items can be either - item1 - item2, etc. or [item1], [item2]. The latter is way better because you can use anchoring to match on the braces (like "%" in vim), which means navigating long item entries is much easier.

5. In latex you have the \document{...} where you can't specify macros so they need to be at the top, in Typst you can specify the macros close to where you need them.

6. It's easier to version control and diff, especially if you use semantic line breaks.

7. Changing page layout, margins, spacing between things, etc., footers with page counters, etc. just seems way easier to do.

I used it for a presentation. Easy for the basics but it felt like a down grade from Latex or TeXmacs
Among alternative typesetting systems, there is also SILE, which supports two syntaxes (XML-based and TeX-style), supports scripting in lua, comes with freely available sort-of-specification (unlike (La)TeX or Typst, unless one counts program sources as specification). For formulae, it additionally allows direct MathML input. I have not used either Typst or SILE though, only looked into their documentation.

HTML with MathML may make a decent system as well; possibly with an XML source and XSLT for templating, which is apparently how OpenStax textbooks are composed (via CNXML, though that also has just a couple of rain frog pictures in its documentation repository -- seems to be a common pattern around typesetting systems).

Then there is troff with eqn(1), which looks simpler, but not sure if there is an actual specification for it around, either.

And then there are Texinfo, org-mode with LaTeX embedding, other TeX-adjacent options, perhaps Markdown with HTML and MathML embedding.

Tinymist plugin in vscode is all you need to install, no giant amorphous TexLive thing needed for local editing.
Since there are typist folks here, how do you work with hash and dollar signs?

If I want to write C# on my resume, I do C`#` but there has to be a better way?

I've changed all my teaching materials to Typst. It is such a breath of fresh air.
Typst is just wonderful, I hear maths majors now procrastinate on thesis writing by writing typst packages instead. Give it ten years and see how it developed.

Pros:

- Instant compile. It just sits there waiting, and once you save your .typ, boom, your .pdf is ready.

- Surprisingly often I find myself using it as markdown replacement, e.g., for random meeting notes. Syntax is as easy as markdown and without boilerplate it produces a nice pdf.

What's not to like?

- IMO debugging can be tricky with quite concise error messages. And it does not produce any pdf once there is a single syntax error, precluding one favourite latex debugging route.

- When using packages, one does encounter hickups, but no surprise here for long-time latex users.

I must say I really like the more straightforward syntax, semantics, and distribution model of Typst. LaTeX is akin to programming with the C preprocessor, it's both ridiculous and amazing what people have done with it but it gets quickly intractable. However, I really do enjoy the quality of graphics, diagrammatic, and scientific output from LaTeX, even if typing them is a pain (LLMs are a huge help here).

So asking the community here: what does Typst offer in place of PGF/TikZ[1], PGFPlots[2], Asymptote[3], chemfig[4], siunitx[5], physics2[6], and how does it work with existing bibliography providers? I use biber[7] with the Zotero Connector and Better BibTeX[8] so any paper I visit on the web is essentially instantly available to cite with one click on LaTeX.

A good test for Typst ought to be reproducing most of these typographic and diagrammatic exemplars: https://tex.stackexchange.com/questions/1319/

[1]: https://tikz.dev/

[2]: https://tikz.dev/pgfplots/

[3]: https://asymptote.sourceforge.io/

[4]: https://mirrors.ctan.org/macros/generic/chemfig/chemfig-en.p...

[5]: https://mirrors.ctan.org/macros/latex/contrib/siunitx/siunit...

[6]: https://mirrors.ctan.org/macros/latex/contrib/physics2/physi...

[7]: https://mirrors.ctan.org/biblio/biber/base/documentation/bib...

[8]: https://retorque.re/zotero-better-bibtex/

You know, this is good fodder for LLM training via Reinforcement Learning with Verifiable Results. Given complex LaTeX source code and complex PDF output, write. Typst document that reproduces the PDF.

Incorporating this into training would be a good way to improve LLM Typst support and also verify that reasoning is working (since there aren’t tons of typst examples to copy from)

Typst could be great for SSG blogging, but there doesn't seem to be much going on in that space.
I have written a couple of lecture notes in LaTeX and I wrote my master's thesis (mathematics) in LaTeX as well[1]. It's actually a fine language if all you want to do is write and rely on other people's templates. But actually writing my own package or understand how the underlying systems work has always seemed like black magic where individual packages have to avoid stepping on each other's toes, or add specific workarounds. Maybe I'm wrong, but that's the impression I got.

It would be nice if Typst could be a LaTeX replacement that makes actually layout and designing the document approachable. I have only used it once for a quick one-off experiment and I did like the language, but as I have said above the language is not the problem if you just want to write text.

[1] That's not quite true, actually. I first wrote my thesis in reStructuredText and used Pandoc to generate the LaTeX and subsequent PDF. This allowed me to get started without having to write a lengthy preamble first. Then after I had more than half of it written down and had a good idea of what I wanted the document to look like did I clean up the generated LaTeX, adjust the formatting to my needs, redid the drawing in TikZ, and then kept writing LaTeX from there. I still think the language is not the problem, but it's easy to get hung up in the design phase before even the first chapter is written.

Tex doesn’t attract software developers. The programming language has remained really old fashioned and clunky. The error system is particularly bad. I use it on a daily basis, and it doesn’t feel nice, far from the experience with Python or Rust.

The output is superb though, which is why everyone in academia keep using it. It’s just the tooling that is poor.

I think it needs to be modernized.

The modernized version is Typst though.. it's closing the gap to (La)TeX really fast
I have been planning to put out a quarterly Sanskrit newsletter for some time now, and was dreading having to deal with LaTeX. For basic stuff, LibreOffice PDF export works. But that is not a plain text workflow.

I then discovered typst and it is a breath of fresh air. Unicode/Dēvanāgarī support out-of-the-box, no installing gigabytes of packages, near-instant compilation.

My complements to those who got this done.

Fun fact: TeX was written closer in time to Alan Turing's famous paper introducing the Turing machine, than to present day.

The absolute staying power of TeX has been incredible.

Another unpronounceable project name. Well done.
Typst is a markdown plug-in. It is a productivity tool. It lacks the standalone nature of LaTeX as a language and proper extensibility.
Almost all my computer science students are using Typst on my recommendation to write up their programming projects, vs most using Microsoft Word last year. Specifically, writing in VSCode with the Tinymist Typist extension. All going very well so far and no complaints.
Surprised you had to.

I found Latex all by myself back then. I have never seen the reason so well visualized than this short video https://www.youtube.com/shorts/26BDVgIXkTo

Jokes aside, I'm sure your students are very thankful to you for introducing a better system.

I guess if Pandoc adds Typst output support I will consider using that, but "LaTeX replacement" sounds like something that is too low level to consider for most usecases? It was many years since I used LaTeX for anything other than at most short snippets embedded in other documents (e.g. md or org). Or would Typst replace something like Pandoc Markdown (with a long list of supported output formats and a convenient Lua filter API)?

* Submitted too fast. A quick search tells me Pandoc already added Typst input and output support (e.g. https://pandoc.org/typst-property-output.html), so guess I need to look into if I should switch to use that for generating PDFs.

I've ditched Pandoc + Latex for Typst for a book [1] that I'm writing. Typst is as easy to write a Markdown, and so much easier to program than Latex (though it is still a bit rough in some places). In Latex I would have to rely on a slew of packages to get anything done, and then work around their quirky interactions. With Typst it's feasible to just write it myself. It's also really fast and doesn't poo all over the file system. Strong recommend if you're producing technical documentation with PDF as your primary target.

[1]: https://github.com/scalawithcats/scala-with-cats/tree/featur...

No criticism, but just reading the title my brain said, rust, and… voila! Apart from that, neat project.