19 comments

[ 5.4 ms ] story [ 67.0 ms ] thread
(comment deleted)
This is awesome, is there a way to render the graphics/chart in svg so that we can implement something like hover & popup (with data information)?
Typst is the most important open source project of the last 5 years.

I predict a future where markdown and latex are largely replaced by typst. And I couldn't be more excited.

It is such a stepup from markdown and latex. Try it today if you are intrigued.

How is it an step-up from markdown? Markdown (w/o any embedded html) is a simple text formatting that lets you read it as a plain text file with some minor formatting when rendered. Typst source files are not human readable in the same way and would be terrible at it. Typst is great when you need typesetting, but if you just want plain text, readable files it isn't it. E.g. markdown for notes, typst for papers.
Why are all the parameters full words except 'labs'? I find it jarring because to me 'lab' is short for laboratory, not label.
Jesters would say it's because author's a fan of labradors. (source: he's my neighbour)
What’s with the slanted figures until you hover over them?
Always pleased to see Typst mentioned. TeX made a lot of choices that made sense at the time, but TeX macros and C #defines especially when nested and/or not properly bracketed to allow nesting are a mess when things go wrong.
It is fun how in computer science terms, TeX and Typst are so incredibly far apart. TeX is a macro language that could be implemented in very little memory, while Typst literally memoizes every typst function's result; to the point where it will eat all available memory if the document and its editing increments needs it.

This reflects the time in which they were developed.

Interesting! If I get it right, the API is in the spirit of Observable Plot (https://observablehq.com/plot/), less ggplot2.

In any case, I'm curious whether aes is necessary, or whether it would suffice to drop this function entirely and just use keys in the mapping (similarly for labs). Or, more broadly, whether using patterns from other implementations of the Grammar of Graphics is a conscious decision, or some sort of legacy baggage.

That's still an open question to be honest. Whether or not I should still surface aes() or just drop it in favour of the plain dictionnary. it's indeed not really necessary, but makes it way easier for all ggplot2 (R), plotnine (Python), ggsql (SQL) users to switch or adopt Gribouille in typst.
It seems to be fully written in native Typst, without any WASM backend. I wonder how is the performance like for complex plots or for documents with a large number of figures.
Is ggplot2 considered to be a nice interface to plot things compared to say matplotlib in Python? I'm asking out of curiosity, I haven't touched R much
I find matplotlib to be clunky and verbose compared to ggplot. When using python, I will often use https://plotnine.org/ because it gives me a nice ggplot like API.
Is typst a good tool for something like a flyer (eg, printable respecting fold lines) or more generically one-page posters?

I see PDF as a blessed output, but it seems mostly in context of longer form typesetting-heavy workflows (books, papers), rather than design-heavy.

Depends on what the poster is. If it's still mostly text content, just arranged in a certain way, then by all means you can. For example:

https://typst.app/universe/package/poster-syndrome

And here's one for foldable cards:

https://typst.app/universe/package/keepsake

(Not endorsing those specific packages, they're just the first ones I managed to find)

For more free-form layouts, I just use Inkscape. It has built-in PDF export which works great. I assume other similar tools like Figma or Illustrator would also work well.

I actually think that with LLM we may very well hit a plateau in innovation here, because now the ugly syntax is not a hurdle anymore, since you don’t write it anymore by hand.