Remix.run Logo
mr-karan 11 hours ago

It's great to see Typst getting more visibility. We migrated a real-world workload to it a couple of years back: generating and e-mailing 1.5M+ PDFs daily at my org, Zerodha.

Our previous pipeline was LaTeX-based (first pdflatex, then lualatex), but we were constantly fighting cryptic memory errors on large documents and huge Docker image sizes that slowed down boot times of our ephemeral workers.

Switching to Typst was a massive win for us. The single static binary resulted in tiny images and faster boot times. More importantly, the performance gains were huge. Overall compile times were ~3–4× faster than LaTeX. On really large documents (2000+ pages, mostly tables), Typst compiles in ~1 minute vs. ~18 minutes with lualatex.

Beyond performance, the better developer experience and good error messages was a nice bonus too.

We wrote a detailed post about the entire architecture - from the job orchestration with Nomad to the S3 optimizations and the Typst migration in particular. If you're curious, you can read it here: https://zerodha.tech/blog/1-5-million-pdfs-in-25-minutes

Archelaos 9 hours ago | parent | next [-]

I am using a LaTeX pipeline for creating text, invoices, forms, etc. from snippets stored in a database. It was quite complicated to set up, but the results are very satisfying. In principle, I would like an easier markup language, but am afraid to wast my time trying out something new, just to run into limitations after awhile.

Here are my most important requirements: Multiple columns configurable for meaningful column and page breaks (minimum number of lines in a new column or page). Reliable automatic hyphenation for multiple languages (at least English and German, perhaps French, Italian and Spanish in the future). Pictures in columns with dynamic placing according to the available space. Complex tables and forms with sensible automatic page breaks. Background images. Different areas on the page which are treated like mini-pages. -- Is Typst capable of all that?

jijijijij 7 hours ago | parent | next [-]

Now, this isn't really an alternative, but I can recommend using pandoc instead of pure LaTex. Personally, I think text blocks are much easier to handle and read in markdown and pandoc allows you to use in-line LaTex wherever markdown is insufficient, without making basic text styling unnecessarily verbose. In my opinion, the result is a better/friendlier LaTex, or limitless markdown respectively. Especially for writing papers and such, you can always start actually writing in basic markdown, which is trivial and almost-WYSIWYG, and later worry about presentation. In my experience, with pure LaTex you easily get lost in sidequests and it's much harder to get into a writing flow and find your way around your own words in the editor.

henrebotha 6 hours ago | parent [-]

If you're going to do this, might as well go with AsciiDoc instead. It's vastly superior as a syntax. Markdown breaks down at the mere mention of something as trivial as a nested list item containing a table of blockquotes.

GavinMcG 2 hours ago | parent [-]

Not that it couldn’t be trivial in the abstract, but I’m struggling to imagine a use for a nested list item containing a table of blockquotes. It doesn’t seem at all surprising that a tool wouldn’t anticipate that.

__mharrison__ 8 hours ago | parent | prev [-]

I haven't done pictures in columns but the rest should be doable.

I've migrated my invoicing (and all my other publishing/slides) to typst from latex and couldn't be more happy.

lloydatkinson 6 hours ago | parent | prev | next [-]

I’ve worked places that will regularly send generated PDFs of things like statistics or small reports or other generic boring business stuff every week or month.

It’s always been some combination of MJML, inline DIY HTML, or PDFs generated with Puppeteer etc.

Do you think Typst would be a good fit there too?

lupire 10 hours ago | parent | prev [-]

For your use case, why were you using LaTeX in the first place? That is more surprising than finding a replacement for LaTeX.

Etheryte 9 hours ago | parent | next [-]

If you're compiling millions of documents, many with thousands of pages, you probably need something very universal. LaTeX is boring tech, off the shelf, ready to use. It might take some work to figure out the initial setup with regards to templating and everything else, but after that, you can be generally pretty content that it will handle most things you throw at it just fine.

constantcrying 9 hours ago | parent [-]

LaTeX is notoriously bad at being boring tech. It has a lot of very rough edges, especially when it comes to longer documents.

ab5tract an hour ago | parent [-]

And yet this very post positions Typst as a potential alternative to LaTeX. In other words, LaTeX is still in the top position.

Personally I think ConTeXt is a far superior tool, though its documentation is always trailing quite a distance behind its current capabilities.

smartmic 9 hours ago | parent | prev | next [-]

I am currently preparing to switch to DITA. The learning curve is steeper at the beginning, but I find the overall concept of topic-oriented, information-typed authoring with content reuse very attractive.

Some people might say that writing in XML is annoying, but it isn't if you have a decent XML editor. In my case, it is Emacs nXML mode. Customisation is possible with DITA-OT [1] and plugins, and yes, it is also based on XSLT. Overall, I think DITA is an industry-proven XML powerhouse. It may be boring, but it has huge potential for anyone with advanced documentation requirements.

[0] https://dita-lang.org/dita/archspec/base/introduction-to-dit...

[1] https://www.dita-ot.org/

sixtyj 9 hours ago | parent | prev | next [-]

I’d suggest LaTeX because of its strengths with tables, mathematical notation, and similar content.

LaTeX notation works well for this and can be easily converted to both web and PDF formats.

But compilation speed definitely needs improvement.

On the other hand, how often do you actually need to compile thousands of pages into a single document? That’s really an edge case.

xigoi 10 hours ago | parent | prev [-]

What else would you use to generate PDFs from a text-based template?

jayknight 10 hours ago | parent | next [-]

20-ish years ago I wrote a system to do that with xslt. Would not recommend.

pepa65 2 hours ago | parent | prev | next [-]

Apart from typst, I've used weasyprint.

sixtyj 9 hours ago | parent | prev | next [-]

E.g. Pandoc, universal tool…

dfc 9 hours ago | parent | next [-]

You will be surprised to learn that pandoc uses latex for generating the PDF. It's barely hidden:

https://www.pandoc.org/demo/example33/2.4-creating-a-pdf.htm...

xigoi 9 hours ago | parent | prev | next [-]

Doesn’t Pandoc just use LaTeX under the hood?

__mharrison__ 8 hours ago | parent | prev [-]

Pandoc works with typst too.

chromanoid 8 hours ago | parent | prev | next [-]

A good XSL-FO impl with docbook or something like that?

smartmic 9 hours ago | parent | prev | next [-]

DITA, see my other comment on level up.

henrebotha 6 hours ago | parent | prev | next [-]

Asciidoctor?

Iwan-Zotow 6 hours ago | parent | prev | next [-]

Docbook

spider-mario 8 hours ago | parent | prev [-]

ReportLab?