Live data from Hacker News

Typst: A Possible LaTeX Replacement

lwn.net

111–120 of 390 posts

Re: Typst: A Possible LaTeX Replacement

#111
post #75
post #59

Earlier quoted context omitted.

I moved from Pandoc+Lua filters to Typst. Having the scripting language integrated is just nicer, though I sometimes miss the separation between data (from Pandoc markdown) and code.

Is it as good for generating EPUB or HTML for instance? Or just plain text?

I use it to generate PDF. The last release introduced experimental HTML output which is promising but still immature. Work on EPUB support hasn't started as far as I know but it's on the roadmap, and I guess it will be relatively easy once the ongoing work on HTML and accessibility is done.

Re: Typst: A Possible LaTeX Replacement

#112

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…

Obviously the drawing capabilities aren't equivalent yet.

bibtex files can be used in typst.

Re: Typst: A Possible LaTeX Replacement

#113
post #94

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…

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

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.

Re: Typst: A Possible LaTeX Replacement

#114
I also recently published a book written with Typst. It was absolutely a joy to work with, especially because the book was a collection of student essays. I converted them from docx to Typst and then getting all the figures and tables setup nicely and uniformly was easy. The PDF generation was perfect but converting to docx/epub I ran into a few bugs in pandoc. I reported them and a few were fixed and a few are still open. Overall, a very positive experience.

Book: https://thelabofthought.co/shop/p/nbmi3

Bugs: https://github.com/jgm/pandoc/issues?q=is%3Aissue%20state%3A...

Re: Typst: A Possible LaTeX Replacement

#115

TBH, I'm sick about LaTeX: - compilation is heavy - it's not friendly for writing (far from the dominant markup languages) - poor support to HTML / Epub / mobile outputs - output (PDF) not friendly for parsing / digesting. - tonnes of templates, lot of mess. We should just use human friendly markups like MyST Markdown [1] or Org Mode [2]. Unfortunately, whitepapers are predominantly written in LaTeX. Thankfully, arXi…

Typst wants to target both PDF and HTML, making it trivial to have a PDF document and a HTML page with identical content.

That way you get the best out of both worlds.

Re: Typst: A Possible LaTeX Replacement

#116

Earlier quoted context omitted.

I was with you when you explained how you got them off of MS Word (even worse if it was the web version!!), until you brought up VSCode. I get it, you are probably advocating very practical choices. Just that I wouldn't recommend students to become dependent on VSCode (due to its vendor and "telemetry"). Basically, that makes the students again dependent on MS. But I guess since you recommend an extension, you cannot…

There is a language server for Typst: https://github.com/Myriad-Dreamin/tinymist I have not tried this one, but the predecessor (typst-lsp) was working fine with Neovim for me when I did my little Typst experiment last year. Whatever the VSCode plugin is offering should be possible to replicate on top of tinymist.

Tinymist is working very well with Neovim too - and there is a preview plugin based off of tinymist, too, for Neovim.

Re: Typst: A Possible LaTeX Replacement

#117
post #94

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…

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

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.

Re: Typst: A Possible LaTeX Replacement

#118
post #94

Earlier quoted context omitted.

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

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.

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

Re: Typst: A Possible LaTeX Replacement

#119
post #104
post #94

Earlier quoted context omitted.

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

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

E.g. Pandoc, universal tool…

Re: Typst: A Possible LaTeX Replacement

#120

Typst seems to be the product of a commercial company - fully controlled by it. That's not appropriate as a foundation for document authoring by "the public". I am also worried about the rust-centricity, seeing how rust is somewhat of a moving target.

[flagged]

Can you clarify what you mean when you say it can be taken closed-source at any moment?

Do you mean that future iterations of the software could be closed source?

As far as I understand, they can't just revoke the existing open source license for the existing already distributed software, and if they did decide to move forward from here with closed source distribution, the community would be free to just fork the existing codebase and continue working on it.

Post reply on HN