Hacker News new | ask | show | jobs
by enricozb 375 days ago
It works really well, I've written three blog posts using typst.

Post: https://ezb.io/thoughts/interaction_nets/lambda_calculus/202...

Typst source: https://github.com/enricozb/enricozb.github.io/blob/master/t...

2 comments

That Typst source looks really clean. I may go back to look into its HTML support.

Thanks for sharing!

Thanks! The main thing that I had difficulty with, which you can see from the typst source, is the rendering and spacing around inline math symbols. They are rendered as SVGs, which is fine but then copying them doesn't work. Their spacing is sometimes unpredictable so I'll add something like $thick x + y$ to pad on the left hand side. I'm not sure what parts of the math symbol contribute to the dimensions of the SVG and I'm sure it's rather complex, but other than that the experience has been solid.
Looks like typst has a "programming language" to do diagrams inline... that's a lot of effort to learn!
It's very much worth it, but absolutely not necessary. You can always generate images/figures beforehand and include them in Typst. There are also packages for various styles of diagrams, e.g. diagraph ships with a Graphviz renderer.

There is also CeTZ, which this article uses. It is highly inspired by TikZ and is just as powerful.

> There is also CeTZ, which this article uses. It is highly inspired by TikZ and is just as powerful.

It's definitely not "just as powerful", and will likely not be so for years. TikZ is an absolutely monumental work.