Browser support to print HTML sucked. No page counter / max pages, no way to properly style headers and footers. Chrome 131 recently added CSS support for @page [1][2] and cross-references in the same doc (giving you the page number), which is a great step forward. I think this simplifies Markdown → PDF even more on the tooling side.
> From a technical point of view, WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing. WeasyPrint is free software made available under a BSD license.
Hmm, I wonder if you could use servo for a similar purpose.
I really wish there were more resources for Typst out there. The reference documentation seems comprehensive, but as somebody who is neither a developer nor experienced in LaTeX, I seem to need a bit more handholding.
I've similarly found the combination of pandoc + typst to be quite exciting. I've found it particularly useful for typesetting academic papers - I'm quite averse to word in general, don't require extensive mathematical typesetting support, and find latex to generally be quite unapproachable (just look at the size of the default pandoc template!), and so it gives me a method of making a decent pdf whilst simultaneously producing a .docx for my collaborators. Being able to track changes with git is also a huge advantage, although never had the chance to work with someone who is comfortable using git :(
The recently added support for PDF/A is also quite exciting, as I've never found a satisfactory solution to this with latex. Now I just wish journals would support markdown submissions...
I can see why someone would prefer Typst over LaTeX when the source is written in Typst or LaTeX, but what are the advantages if your source document is in Markdown? Is there anything else beyond the (presumably) smaller install size of Typst?
When compiling the Markdown to PDF, you might want to customize the PDF template. That's arguably easier and more pleasant to do with a Typst template than a Latex template. Also the compilation with Typst is often much faster.
Something I found useful is that you can create a much more minimal pandoc template for typst than for latex. Obviously if familiar with latex it probably won't be an issue, but when I tried to make my own barebones pandoc template (i.e., stripping out beamer) I gave up.
Typst is 2-3 orders of magnitude faster than latex, which for book-sized projects can be the difference between a minute and sub-second compilation time.
Currently it only outputs PDF, PNG and SVG. The next release will have preliminary support for HTML. This will be a structured output so from there it will be easier to support other formats either directly or in post-processing e.g. through pandoc. Pandoc itself supports Typst input but I'm not sure how reliable that is.
Don’t know either, but some things are unrepresentable in the pandoc internal format. It can internally represent an intersection of all its supported formats.
Browser support to print HTML sucked. No page counter / max pages, no way to properly style headers and footers. Chrome 131 recently added CSS support for @page [1][2] and cross-references in the same doc (giving you the page number), which is a great step forward. I think this simplifies Markdown → PDF even more on the tooling side.
[1] https://developer.chrome.com/blog/print-margins
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/@page
An alternative stack that circumvents LaTeX and that I've successfully used for a book-scale project would be pandoc+weasyprint.
https://github.com/Kozea/WeasyPrint
> From a technical point of view, WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing. WeasyPrint is free software made available under a BSD license.
Hmm, I wonder if you could use servo for a similar purpose.
I really wish there were more resources for Typst out there. The reference documentation seems comprehensive, but as somebody who is neither a developer nor experienced in LaTeX, I seem to need a bit more handholding.
There is a community project called typst by examples, see this link https://sitandr.github.io/typst-examples-book/book/
I've similarly found the combination of pandoc + typst to be quite exciting. I've found it particularly useful for typesetting academic papers - I'm quite averse to word in general, don't require extensive mathematical typesetting support, and find latex to generally be quite unapproachable (just look at the size of the default pandoc template!), and so it gives me a method of making a decent pdf whilst simultaneously producing a .docx for my collaborators. Being able to track changes with git is also a huge advantage, although never had the chance to work with someone who is comfortable using git :(
The recently added support for PDF/A is also quite exciting, as I've never found a satisfactory solution to this with latex. Now I just wish journals would support markdown submissions...
I can see why someone would prefer Typst over LaTeX when the source is written in Typst or LaTeX, but what are the advantages if your source document is in Markdown? Is there anything else beyond the (presumably) smaller install size of Typst?
When compiling the Markdown to PDF, you might want to customize the PDF template. That's arguably easier and more pleasant to do with a Typst template than a Latex template. Also the compilation with Typst is often much faster.
Something I found useful is that you can create a much more minimal pandoc template for typst than for latex. Obviously if familiar with latex it probably won't be an issue, but when I tried to make my own barebones pandoc template (i.e., stripping out beamer) I gave up.
Typst is 2-3 orders of magnitude faster than latex, which for book-sized projects can be the difference between a minute and sub-second compilation time.
Nice, does it work with images? Like can I render images and place text on top of them, well positioned?
Can Typst only produce PDFs? Are other output formats on the development roadmap?
(I know that pandoc is incredibly flexible.)
Currently it only outputs PDF, PNG and SVG. The next release will have preliminary support for HTML. This will be a structured output so from there it will be easier to support other formats either directly or in post-processing e.g. through pandoc. Pandoc itself supports Typst input but I'm not sure how reliable that is.
Don’t know either, but some things are unrepresentable in the pandoc internal format. It can internally represent an intersection of all its supported formats.