Live data from Hacker News

Typst: A Possible LaTeX Replacement

lwn.net

241–250 of 390 posts

Re: Typst: A Possible LaTeX Replacement

#241
Anyone have success with typesetting in HTML and then printing to PDF? This works really well for me and if your application is web centric then it's an easy win if you need to generate PDFs as well.

Re: Typst: A Possible LaTeX Replacement

#242
From the article: "Typst... can, for example, easily split large tables across page breaks, something that LaTeX struggles with even with specialized packages." That would be nice. I remember when I first started working with LaTeX that I was surprised that I needed to decide ahead of time whether a table would fit on one page or not. If Typst can make that decision on its own, that's a step forward.

One thing I have not seen mentioned as yet: cross-references. In LaTeX, I can create cross references to anything: page number, table or figure number, even an item in a numbered list. Does Typst have that capability? I saw a package for cross-referencing numbered boxes (it's called statementsp), but it wasn't clear how you xref other things. (Not saying it's not there, it just doesn't jump out at me.)

Re: Typst: A Possible LaTeX Replacement

#243
post #18

Earlier quoted context omitted.

8. Programming with it is lovely. Its got a little interpreted language built in, with helper functions like json("some_file.json"). I wrote a paper in it, and used that extensively to populate all my result tables. (Benchmark script -> JSON files -> typst compiled the results directly into the PDF).

I've said that in Typst, when you're writing, it feels like writing, and when you're programming, it feels like programming. Whereas LaTeX always feels almost, but not quite, entirely unlike programming.

Nice Hitchhiker's Guide to the Galaxy reference! That's my favourite quote from it :)

For others, here's the quote being referenced:

> After a fairly shaky start to the day, Arthur's mind was beginning to reassemble itself from the shellshocked fragments the previous day had left him with. He had found a Nutri-­‐Matic machine which had provided him with a plastic cup filled with a liquid that was almost, but not quite, entirely unlike tea. The way it functioned was very interesting. When the Drink button was pressed it made an instant but highly detailed examination of the subject's taste buds, a spectroscopic analysis of the subject's metabolism and then sent tiny experimental signals down the neural pathways to the taste centres of the subject's brain to see what was likely to go down well. However, no one knew quite why it did this because it invariably delivered a cupful of liquid that was almost, but not quite, entirely unlike tea.

Re: Typst: A Possible LaTeX Replacement

#244
> Another drawback is the difficulty of learning Typst. The official documentation is confusingly organized, with information scattered unpredictably among "Tutorial", "Reference", and "Guides" sections.

They should add Dosu[0] to their repo. Dosu works with a lot of open source packages already.

[0] https://dosu.dev

Re: Typst: A Possible LaTeX Replacement

#245

It's night and day. I'm a PhD student currently writing my thesis in Typst. On paper this is an absurdly risky decision: it's a new technology without a huge user-base, it's not totally stable yet, etc. But I tried Typst and I had no choice. It was obviously the right thing to do, even though I'm going to have to make a pixel-perfect clone of my university's LaTeX template. I've been using LaTeX for over ten years an…

I suspect it is getting better but I've experienced some breaking changes with Typst. Nothing that was terribly difficult to fix, debugging it wasn't obvious though. There seems to be a huge amount of folks that want typst to work. I respect TeX and LaTeX, immensely, but it's so vast and byzantine. Maybe I don't know where or what, but some kind of clean LaTeX "distribution" is needed. It seems like you could build i…

Sounds like they could benefit from the R (language) build model that checks library changes against registered consumers of that library before merging.

https://jtibs.substack.com/p/if-all-the-world-were-a-monorep...

Re: Typst: A Possible LaTeX Replacement

#246
Like other commentators, I have worked with LaTeX for a long time (> 10 years) and have to say that it very much shows its age.

For once, the compilation time is terrible - it can take several minutes to compile a typical document. I recently tried to create a poster for a conference - a single A0 page - and even this took more than a minute to compile. Because positioning in images and figures in LaTeX is not obvious, this made iteration extremely slow.

Additionally, by forgetting a single bracket, one can easily encounter cryptic error messages relating to boxes. In the past, I have also worked on LaTeXML (the LaTeX-to-HTML "converter" amongst other things being used to power ar5iv [1]). Even though this exposed me to some of (La)TeX's internals, it is still extremely difficult trying to decipher error messages.

Typst, on the other hand, is much faster when compiling and provides much clearer error messages.

For this reason, I also decided to write my 130-something PhD dissertation in Typst [2]. My university only provided a LaTeX and a Word template, but I ended up copying that in Typst extremely quickly. My thesis compiles in about 7 seconds on my laptop - I cannot imagine how long it would take had I chosen LaTeX instead. Not only that, when I showed an initial draft of my dissertation to my supervisor - also a decades-long LaTeX user - he could not tell that I wasn't using LaTeX.

I only really encountered one problem with Typst so far - citation styles. In particular, the alphanumeric style preferred by my field produced duplicate citation keys, making the output unreadable in printed form. But given all the other benefits Typst offered, I ended up switching to IEEE's citation style instead.

I am also hoping that Typst improves its HTML export - it is very barebones at the moment - but that seems to be in the works [3].

[1] https://news.ycombinator.com/item?id=36947004

[2] https://doi.org/10.25593/open-fau-1825

[3] https://github.com/typst/typst/issues/5512

Re: Typst: A Possible LaTeX Replacement

#247
I'm becoming acutely aware of the first-mover problem in open source software: Nobody truly knows how the software is going to be used in half a century. And once that time is past, the accumulated tech debt of the first-generation tool should probably just be thrown out entirely, for a new second-generation tool that easily does what people have shown they actually want do with it.

I've been using Typst for work documentation and hobby authorship. It is unreal how powerful it is out of the box, with no plugins. It's a Turing-complete programming language where you can switch between a code context and a document context with a simple change of brackets. Everything you WISH Latex did out of the box, it does. Highly recommend the VSCode plugin with live PDF generation and automatic scrolling.

Re: Typst: A Possible LaTeX Replacement

#248

Like other commentators, I have worked with LaTeX for a long time (> 10 years) and have to say that it very much shows its age. For once, the compilation time is terrible - it can take several minutes to compile a typical document. I recently tried to create a poster for a conference - a single A0 page - and even this took more than a minute to compile. Because positioning in images and figures in LaTeX is not obviou…

Hey, I've had the same problem with duplicate citation keys! I couldn't find an issue on it. One of us should file a bug report.

Re: Typst: A Possible LaTeX Replacement

#249
Another stamp of approval for Typst here.

It's simple enough that I can easily typeset CS theory homework (with all the fancy notation that entails) without having to subject myself to the insanity of LaTeX or the friction of a standard word processor.

But at the same time, I can also crank out a full paper in a (professor mandated, LaTeX templated) style without raising any eyebrows.

The fact that it's a "real" programming language is also lovely - I have a very simple template (took me an ~hour to write) that ingests TOML descriptions of recipes and marshals them into pretty, standardized PDFs for my recipe binder.

Re: Typst: A Possible LaTeX Replacement

#250

It's night and day. I'm a PhD student currently writing my thesis in Typst. On paper this is an absurdly risky decision: it's a new technology without a huge user-base, it's not totally stable yet, etc. But I tried Typst and I had no choice. It was obviously the right thing to do, even though I'm going to have to make a pixel-perfect clone of my university's LaTeX template. I've been using LaTeX for over ten years an…

> even though I'm going to have to make a pixel-perfect clone of my university's LaTeX template

I'm not sure if you really mean pixel perfect or if it's just an exaggeration. There are packages in latex which are almost impossible to replicate in a pixel perfect way, one widely used example is microtype, which is especially useful in scientific works.

Post reply on HN