DE version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
86% Positive
Analyzed from 1315 words in the discussion.
Trending Topics
#typst#pandoc#latex#markdown#template#article#https#don#templates#pdf

Discussion (21 Comments)Read Original on HackerNews
And a couple of docs I converted from latex went from about 10s to compile in latex to 10ms to compile in typst. I didn't think this would be a big deal since my docs aren't that big and I didn't feel like I was waiting long for compile but I'm already much more productive as a result.
Having said all of that, I have no idea why you would want pandoc or markdown involved. Typst (unlike latex) is really no harder than markdown to type, so you should just be using typst rather than markdown if that's what you want. Then you don't need pandoc in the mix at all.
Typst is great. I had been using Markdown with Pandoc to write a book. I frequently needed to use raw LaTeX commands, and it was mostly OK but I had a few frustrations with my setup. The biggest was time — my Makefile process was taking several (like 10+) seconds to render everything and that was really tedious when I was trying to get TikZ drawings perfect. My other frustrations were floating figures never appearing where I wanted (common complaint, I think) and weird font issues with certain math symbols in code. (I settled on JuliaMono, which was OK but the experience wasn't a happy memory.)
Maybe six months ago I decided to try Typst. I went through the tutorials and made something basic the same day. Got comfortable and eventually pasted my entire book into Typst and started the tedious process of finding and replacing until it compiled. I still occasionally find a \times or something that I missed.
Unlearning backslashes was the hardest thing for me.
The next hardest thing was switching from TikZ to Cetz. Cetz is pretty good, but just like TikZ it takes an investment to learn. I tried to have AI translate my figures and it was not very successful. Someone wrote a webapp that can translate Typst to LaTeX and the reverse. It is a good way to get started on changing figures, but you'll have to clean up its output by hand a lot.
Though I used LUA LaTeX, I never did find any uses for its scripting. With Typst, I use it all the time. Functions are really easy to write. I recently wrote a REPL formatter to show inputs and outputs in code. I'm happy with it and ought to publish it. My only complaint is that all functions are pure functions; there is not a way (that I know of) to share state from one function invocation to the next.
The templates on the Typst universe are pretty OK, but we need more. I will have to change some of the formatting decisions in the book template I'm using.
One thing I've encountered that I could do in LaTeX that I can't (easily) do in Typst is labels on a NiceMatrix. Otherwise, I've felt like I could do everything in Typst that I needed from LaTeX.
Indeed user-defined functions are pure. You can work around it like the suiji package[1] does: have the function return a value that you pass as argument to the next call.
[1] Random number generator in Typst: https://typst.app/universe/package/suiji/
[0]: https://ctan.org/pkg/lectures
[1]: https://github.com/SeniorMars/dotfiles/tree/main/latex_templ...
https://typst.app/docs/tutorial/advanced-styling/
And his template here:
https://imaginarytext.ca/posts/2025/img/article.typ
This works very, very well. I get linked in-document references, diagrams, tables, table of contents — everything I need for my design documents (and consulting work).
[0]: https://www.bobek.cz/til/pandoc-markdown-typst/
Last summer … Fast-forward to spring 2025. In the intervening months, Typst has been upgraded twice (to v0.13) and Pandoc has upgraded at least 3 times (currently at v3.6.4), and my templates don’t work anymore.
This template is from March 2025, and we're now May 2026, with four more releases to Typst 0.14.2 (December 12, 2025), and with Pandoc 3.9.0.2 (2026-03-19).
> Last summer I spent a lot of time with Typst (at that point v0.11) and Pandoc, working on a flexible and reusable workflow to typeset markdown-formatted articles to PDF.
I understand that Typst is a markup language that can output a pdf file (big Typst fan btw).
I understand Pandoc is a thing that transforms documents of one kind to documents of another, ie markdown to html.
But the author wants to "typeset markdown-formatted article to PDF". Which makes me wonder what this has to do with typst at all.
I write Python, software engineering, and data science books in Jupyter. (Because I want both text and code). I've written my own toolchain (multiple times, don't ask, yes, I've tried the one you're thinking of and it didn't work for me).
I need to convert the notebooks into chapters in my books (PDF so I can print them). In the past, I used code to convert to LaTeX. (It was horrible).
Now, I use code to convert the Jupyter file to markdown, then (I use pandoc too) to typst. (It is 100x better than LaTeX).
(I also use pandoc to convert markdown to epub).
I know you didn't want questions, but maybe you can save me some trouble?
Assuming you're talking about quarto, may I ask what you didn't like about it? I've been converting some of my course materials to it and have been enjoying it immensely.
[1]: https://pandoc.org/demo/example33/6-templates.html
[2]: https://imaginarytext.ca/posts/2024/pandoc-typst-tutorial/
(This actually interferes with Typst's math mode. But you can manually construct math blocks, so no real problem. Pandoc variables are only valid within templates anyway.)
https://pandoc.org/MANUAL.html#variables-set-automatically