← Back to context

Comment by giovannibonetti

17 hours ago

For those of you using a browser to generate PDFs, the Rust crate you should look into is Typst [1]. Regardless of your application language, you can use their CLI.

It takes some time to get used to their DSL to write PDFs, but nowadays with AI that shouldn't take too long.

[1] https://crates.io/crates/typst

Just used it to automate some reporting today. Claude Code worked pretty well though sometimes I had to point it to Typst docs to understand what I wanted.

I keep hearing about this one as a LaTeX alternative. I shall have to take a proper look.

  • Typst is what Rust is to C++ but for Latex. Saner syntax, well thought extensibility (including scripting and macros), tables that are sane, a package manager. I am happy that I switched to it for documentation purposes. I am looking forward to compiling web pages with it too.

I recently deployed typst to generate PDF letters automatically. Being familiar with (La)TeX (I've typeset everything from letters to my PhD thesis), I was shocked at the speed. It's quick enough to use in an HTTP request cycle. The language was also super easy to learn.

Not sure if it's quite as good as TeX at typesetting, but it seems good enough. When I did my thesis, TikZ was even more valuable. I don't know if there's any replacement for that.