Live data from Hacker News

Typst: A Possible LaTeX Replacement

lwn.net

161–170 of 390 posts

Re: Typst: A Possible LaTeX Replacement

#161
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 and I still wouldn't say that I "know" TeX in any meaningful way. I was not only productive but proficient in Typst in a day or two. If there isn't a package for something that I need (and, surprisingly often, there are packages for what I need, and excellent ones!), I find that I can just do it myself. Quickly. Things that never would have been possible for me with LaTeX are within easy reach. In ways I'd be happy to talk about if anyone's curious, it's been a huge enabler of my productivity as a researcher. I owe this tool so much.

Interestingly, I spend far, far less time yak-shaving in Typst than in TeX, since I can just Do The Thing That I Want. I'm actually focusing on writing instead of figuring out why package A conflicts with package B, and then how to install a different version of just a single package to override one of them, and then... [this sort of thing doesn't/can't happen in Typst; it's a real programming language with real modules] I could go on and on about the (relative) quality of the ergonomics and devex: fast compilation times, as others have said, but so much more than that. Try it out. Just try it out.

I should also say that it's not perfect. There are some funky design decisions for sure. There are some missing features, like including pdfs as images in your document (that one's on its way, I believe). Critically, the quality of the typesetting is maybe... 95% as good as TeX, which is perfect every time. Sometimes things don't kern quite right, and you have to adjust them by hand. It's a work in progress. I'm optimistic that it will achieve parity on that front.

Re: Typst: A Possible LaTeX Replacement

#162
post #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.

Theres experimental support for HTML export: https://typst.app/docs/reference/html/

I tried this out about 6 or so months ago; it was pretty bad unfortunately. I was willing to put my money where my mouth is and pay a bit to dedicate resources for it like a bounty, but typst organisation doesn't seem to have something like that. I have actually donated to the project AND paid for a subscription to their web service though.

Re: Typst: A Possible LaTeX Replacement

#164

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 "…

This is a nonissue. I've written several lengthy documents mixing up all sorts of pieces in Typst over a year, created my own template, modules, functions...

Re: Typst: A Possible LaTeX Replacement

#166
post #159

[deleted]

Typst is entirely open-source as well. Only the online overleaf-like system is proprietary.

> Compilation is faster, but so much more time is spent writing than typesetting.

Continuing in your vein of writing dismissive comments, the moment you actually start caring about how things look in your documents (you know, the reason why people use LaTeX), typesetting starts taking up a non-trivial amount of time. Not in the act of setting up the typesetting, but actually debugging it.

Re: Typst: A Possible LaTeX Replacement

#167
Whenever someone creates a "better and lightweight" successor to latex they will over time be asked to, or by themselves need to add another small feature to extend its capabilities will over time move closer and closer to the LaTex features set.

Or someone will use it and create a large document and find that Typst just does not have enough features they need, they will get frustrated and feel the need to move over to Latex.

Just like the original markup definition was fine, but then we have a forrest over forks or similar projects that add specific features someone needed.

That said if your needs are covered by Typst it's certainly easier to learn.

Re: Typst: A Possible LaTeX Replacement

#168

Whenever someone creates a "better and lightweight" successor to latex they will over time be asked to, or by themselves need to add another small feature to extend its capabilities will over time move closer and closer to the LaTex features set. Or someone will use it and create a large document and find that Typst just does not have enough features they need, they will get frustrated and feel the need to move over…

Are you implying latex is a global optimum?

Re: Typst: A Possible LaTeX Replacement

#169
I've used Typst to produce books (for https://printstack.net) and it's been excellent.

I started with this: https://news.ycombinator.com/item?id=42271078

But wouldn't recommend going via Pandoc, for example for this reason: https://github.com/jgm/pandoc/discussions/10438

Some things like #show rules can be a bit confusing. And obviously LLMs can't really help you.

Re: Typst: A Possible LaTeX Replacement

#170
post #13

Among alternative typesetting systems, there is also SILE, which supports two syntaxes (XML-based and TeX-style), supports scripting in lua, comes with freely available sort-of-specification (unlike (La)TeX or Typst, unless one counts program sources as specification). For formulae, it additionally allows direct MathML input. I have not used either Typst or SILE though, only looked into their documentation. HTML with…

> HTML with MathML may make a decent system as well HTML is fine to write by hand (especially when you take advantage of tag omission [0]), but I can't imagine handwriting MathML, since even simple equations need lots of tags [1]. [0]: https://html.spec.whatwg.org/multipage/syntax.html#syntax-ta... [1]: https://en.wikipedia.org/wiki/MathML#Presentation_and_semant...

I also had problems with MathML verbosity, and the culprit is the markup for the individual character classes (mi, mn, mo, ms.) I wrote a little filter that pulls apart character sequences and applies the respective character markup tags using a lookup table, so I can write MathML without using character markup. If any character markup is already present then it is skipped, so the automatic behavior can be bypassed by explicitly tagging characters and symbols as needed. This drastically reduces the character markup and makes it quite readable, even to my dyslexic eyes. As a bonus I'm not tied to some other tool that I have to game from time to time to get a particular MathML expression, I can say exactly what I want. BoBW.
Post reply on HN