Live data from Hacker News

Typst: A Possible LaTeX Replacement

lwn.net

321–330 of 390 posts

Re: Typst: A Possible LaTeX Replacement

#321

Earlier quoted context omitted.

Oh definitely, let’s do a PhD in Latex and its worthless toolchain before start writing the actual thesis. Software should be invisible and not a hindrance to our ability to express ourselves.

Reading a single book is not equivalent to a PhD in LaTeX.

A single book on latex only covers you until the introduction of your thesis. Then you will need to add a table. That’s a different book. Then you will need to align your equations. That is another book. Then you will need a graph. This is a freaking library of books.

I mourn for the time I wasted on Latex. For nothing.

Re: Typst: A Possible LaTeX Replacement

#322

Earlier quoted context omitted.

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

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.

If you're going to do this, why not generate Pandoc ASTs directly? You can do so from a number of languages and they support (by definition) a superset of any given markup's features, with blocks to call out directly for things you can only do in Latex.

I assume the original question is asking about programmatic document generation, in which case working with a real AST is probably also a productivity and reliability win as well.

Re: Typst: A Possible LaTeX Replacement

#323
post #172

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'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. That's an interesting insight. Do you have an idea why this is? Do you have a CS background?

I have a CS background, I have used LaTeX for over ten years, and I also don't know TeX in any meaningful way. I feel like I'm copy-pasting snippets of code and trying random stuff until I get the outcome I want

Re: Typst: A Possible LaTeX Replacement

#324

Earlier quoted context omitted.

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

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

I wrote my dissertation this way. As long as you’re already comfortable with latex, it’s amazing. Huge time saver not to have to write latex formatting when you don’t have to, but an equally huge time saver to be able to control formatting when you need it.

Re: Typst: A Possible LaTeX Replacement

#325

Almost all my computer science students are using Typst on my recommendation to write up their programming projects, vs most using Microsoft Word last year. Specifically, writing in VSCode with the Tinymist Typist extension. All going very well so far and no complaints.

Surprised you had to.

I found Latex all by myself back then. I have never seen the reason so well visualized than this short video https://www.youtube.com/shorts/26BDVgIXkTo

Jokes aside, I'm sure your students are very thankful to you for introducing a better system.

Re: Typst: A Possible LaTeX Replacement

#326

Earlier quoted context omitted.

Typst still does not natively support floating images. You can put images at the top of a page, or at the bottom, but there is no native way to declare an image as floating with text wrapping around it.

“Natively” is important here because it’s actually relatively easy to get it working with a package: https://github.com/ntjess/wrap-it

I encountered some weirdness with wrap-it when my content is a bullet list

Re: Typst: A Possible LaTeX Replacement

#327

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

nonissue for me. This is an advantage in most cases, and the way to tell typst to just render literally is quite obvious (backslash in markup mode, quoting text in math mode). The only slightly annoying thing is that in math mode "/" becomes a binary operator for rendering like \frac, and you need to use the ugly and hard to read "\/" for an actual forward slash for tighter division.

Re: Typst: A Possible LaTeX Replacement

#328

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…

For physics2 (which I only skimmed the manual), it seems like most of the functionality is either in the Typst standard library, or availble in physica

https://github.com/Leedehai/typst-physics/blob/master/physic...

Re: Typst: A Possible LaTeX Replacement

#329

Earlier quoted context omitted.

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?

We are a python shop and use WeasyPrint. It works well for invoice type things. I suppose it depends on how much web dev experience is on hand.

Same, used to work at a place that used to use ghostscript + chromedriver and went to Weasyprint.

Weasyprint is quite wonderful, fast, and you can file upstream tickets and get good clarity on what's going on.

And you're writing your templates in CSS + HTML, which generally flows well.

At the end of the day the problems are rarely "CSS + HTML vs Latex vs Typst", but more just about making decisions about how you want something to be laid out when you have dynamic input.

"What should happen when I have a huge blob of text here" is often a non-trivial question. "What should I do on a page break here" is a non-trivial question. And they often involve having to, at the high level, make decisions. People whine about CSS, sometimes you just gotta read the spec and figure things out (rather than stop at your intuition for how certain fields work).

Nice thing about CSS + HTML is you can open up your output in a browser and futz about with it very easily.

Re: Typst: A Possible LaTeX Replacement

#330
post #174

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 That's lucky. Most of us had to do a LaTeX pixel perfect clone of our university's MS Word template.

You went to the wrong university :)
Post reply on HN