Live data from Hacker News

Typst: A Possible LaTeX Replacement

lwn.net

131–140 of 390 posts

Re: Typst: A Possible LaTeX Replacement

#131
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 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/

Re: Typst: A Possible LaTeX Replacement

#132
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?

DITA, see my other comment on level up.

Re: Typst: A Possible LaTeX Replacement

#133

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.

Wants to, but still experimental:

https://typst.app/docs/reference/html/

Re: Typst: A Possible LaTeX Replacement

#134

I've started using typst for small local documents that I would previously have written in markdown (or R-markdown). Typst offers programming features that are very helpful for small writing tasks that need more customization than markdown provides but that don't need the wildly expansive set of templates available in the latex world. Like other academics, I plan to stick with latex for journal articles and books, un…

> Like other academics, I plan to stick with latex for journal articles and books, unless publishers provide support for typst. In my undergrad we sent all our essays etc as LaTeX and it was honestly very usable. I assume this was somewhat dependent on having a wealth of enthusiast professors and postgrads to develop the templates though...? Since then, I've used LaTeX in a "freeform" way and absolutely hated it, I w…

LaTeX absolutely shines when you have someone providing a template; hardly anything comes close.

When you're on your own, you need to either steal someone else's and modify it, learn to build your own, or just use something like the Memoir package (which is the first but designed for it.)

Even if you don't use LaTeX at all, "A Few Notes on Book Design" is worth the read: https://ctan.org/pkg/memdesign

Re: Typst: A Possible LaTeX Replacement

#135
One advantage of LaTeX is that it's virtually impossible to generate markup by accident. This contrasts with other platforms which often decide that I'm trying to create a bulleted list, write something in boldface, etc. -- which hasn't always been the case.

It seems that part of the design philosophy of Typst is to make more assumptions about what the user is trying to do. For example, apparently if the user wants "dif" to appear in a math formula, typing "dif" would instead produce a differential -- although I presume there is some easy way to handle this.

Anyone who has used Typst -- did this potential disadvantage materialize in any way which was at all significant? Or did it turn out to be a nonissue?

Re: Typst: A Possible LaTeX Replacement

#136

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…

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?

Re: Typst: A Possible LaTeX Replacement

#138
post #27

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.

With all due respect to your perspective on TeX, isn't it the whole point? There are weaknesses in TeX (like using $ for both beginning and ending the math mode) but they are quite minor. Quirkiness is not a weakness but being a standard (since 1986!) is a major strength. The fact that it does not change is a blessing, truly. Python may be a fine language with a great community of supporters and I use it because I pretty much must but programming in something that is essentially a moving target is no fun. And I would take TeX macros over Python ugly syntax any day, no offense. Not to say I am right just to point out that taste is not necessarily a reliable guide.

Re: Typst: A Possible LaTeX Replacement

#139
If Typst would also allow to create HTML it could become a successor of LaTeX. Without it it is just another kind of LaTeX, created for printing stuff on paper. But that is not what a digital future needs.

Re: Typst: A Possible LaTeX Replacement

#140

One advantage of LaTeX is that it's virtually impossible to generate markup by accident. This contrasts with other platforms which often decide that I'm trying to create a bulleted list, write something in boldface, etc. -- which hasn't always been the case. It seems that part of the design philosophy of Typst is to make more assumptions about what the user is trying to do. For example, apparently if the user wants "…

Text needs quotes in math mode, only single letters are rendered as text.

Markup is indicated by [].

Math by $$

Code by #

Accidentally entering markup mode hasn't happened to me so far.

Post reply on HN