I think the motivation for why you’d want to use Typst as pandoc’s PDF engine is lost on me.
LaTeX is powerful but can be a pain to write. pandoc “solves” that issue by letting you author your documents in Markdown and transparently use LaTeX to produce PDF output. And the output is “good enough” even with the defaults.
As far as I understand, Typst’s pitch is that it’s typesetting system that’s comparable to LaTeX but significantly easier to write. What are the “thorns” in Typst’s workflow that would make you want to avoid writing Typst but still want to generate PDFs with Typst.
I’m the main author of a Typst competitor (SILE) but I think I can answer a couple possible motivations:
Typst is fast. WAY faster that anything in the TeX family by orders of magnitude.
Typst is a lot lighter to install: a few tens of MB in a single binary vs. multiple gigabytes spread over hundreds of files for anything TeX related.
Furthermore any time you are trying to typeset to PDF, you probably care a bit about the presentation. You say the output of LaTeX is good enough for you unmodified, but that may or not be the case for everybody and LaTeX styling is notoriously a pain to fine tune.
Genuine question: why does this matter? My first impression is “I have plenty of storage.” Does it matter for the average user? When does the advantage of a smaller installation outweigh the feature gap?
For me it’s not about storage. I have plenty of storage, but it was ~1000 small packages and that really slowed down updating my system. It’s simply annoying.
Perhaps I could install only those I need, but I don’t know which are those and when I first tried I had to gradually hunt down those that were missing. It seemed like a lot of work and I didn’t bother. Yes it’s my fault because I’m lazy, but I don’t normally write papers,etc I just occasionally need to update and render some templates I have.
At this point in time, Markdown is a lot more versatile as a document format and supported by many platforms (e.g. previewing on most source forges.) Typst also doesn’t have HTML output just yet.
This is true(ish), but Pandoc also has a Typst reader, so you can get HTML conversion that way (at least up to a similar standard of content being processed as for other formats to Typst) so in the context of why use Typst vs. Markdown that isn’t a clear win/loose. You could just as easily use Pandoc to create HTML from your Typst input as PDF from your Markdown input. There may be smaller tradeoffs along the way where styling and semantics translate better one way than another, but it isn’t open and shut case just based on that.
More platforms and tooling being able to use the canonical source directly (forges, editors, etc.) is useful to consider for sure.
What predictions do people have for how long the PDF format will be with us? Non-reflowable text is a bit of a curse; most physical books (and PDFs printed out on letter-size paper) have far too small of font for my preference. I guess what I’m getting at is - is HTML without JavaScript and with MathML & SVG (EPUBs for example are just zipped xhtml files - go ahead and unzip one, take a look!) the PDF of the future as we leave printers behind?
The PDF format was created in 1992, 32 years ago, so by the Lindy principle we can assume it will around until 2056. However, things like widespread adoption of large(r)-format e-ink displays and even further reduction in number of printers might accelerate its decline.
I don’t know about PDF specifically, but fixed-format content will be here forever as something that lots of (most?) people feel very strongly about. In many contexts, it’s important that different viewers see the same thing and that it conveys the author’s intent, and HTML/EPUB is horrible for anything that isn’t just simple linear flow text because the formatting is all wrong looking with overly short/long lines, or diagrams are in the wrong spot, or worse: nothing is paginated and everything is impossible to reference!
PDF isn’t going anywhere until HTML/CSS absorbs the feature set of PDF and it becomes widely implemented. And at that point you’ll just have a funny format that takes a ginormous browser to view instead of something wrapping mupdf/poppler.
What predictions do people have for how long the PDF format will be with us
Hopefully forever.
There is absolutely no replacement for it, no other format comes even close to a well-designed and typeset PDF document, e.g. a study, or a scientific book. Without it figures will be illogically placed far from where they make sense and help understanding, and often look plain ugly.
As others mentioned, I would much rather add some basic reflow capability to PDF (what might be realistic is to simply let it make a single column from multiple ones accurately), then throw it out the window. Also, physical printing won’t stop being a thing.
I think the motivation for why you’d want to use Typst as pandoc’s PDF engine is lost on me.
LaTeX is powerful but can be a pain to write.
pandoc
“solves” that issue by letting you author your documents in Markdown and transparently use LaTeX to produce PDF output. And the output is “good enough” even with the defaults.As far as I understand, Typst’s pitch is that it’s typesetting system that’s comparable to LaTeX but significantly easier to write. What are the “thorns” in Typst’s workflow that would make you want to avoid writing Typst but still want to generate PDFs with Typst.
I’m the main author of a Typst competitor (SILE) but I think I can answer a couple possible motivations:
Furthermore any time you are trying to typeset to PDF, you probably care a bit about the presentation. You say the output of LaTeX is good enough for you unmodified, but that may or not be the case for everybody and LaTeX styling is notoriously a pain to fine tune.
This is exactly the reason why I’m looking into typst these days ..
Genuine question: why does this matter? My first impression is “I have plenty of storage.” Does it matter for the average user? When does the advantage of a smaller installation outweigh the feature gap?
For me it’s not about storage. I have plenty of storage, but it was ~1000 small packages and that really slowed down updating my system. It’s simply annoying.
Perhaps I could install only those I need, but I don’t know which are those and when I first tried I had to gradually hunt down those that were missing. It seemed like a lot of work and I didn’t bother. Yes it’s my fault because I’m lazy, but I don’t normally write papers,etc I just occasionally need to update and render some templates I have.
At this point in time, Markdown is a lot more versatile as a document format and supported by many platforms (e.g. previewing on most source forges.) Typst also doesn’t have HTML output just yet.
This is true(ish), but Pandoc also has a Typst reader, so you can get HTML conversion that way (at least up to a similar standard of content being processed as for other formats to Typst) so in the context of why use Typst vs. Markdown that isn’t a clear win/loose. You could just as easily use Pandoc to create HTML from your Typst input as PDF from your Markdown input. There may be smaller tradeoffs along the way where styling and semantics translate better one way than another, but it isn’t open and shut case just based on that.
More platforms and tooling being able to use the canonical source directly (forges, editors, etc.) is useful to consider for sure.
What predictions do people have for how long the PDF format will be with us? Non-reflowable text is a bit of a curse; most physical books (and PDFs printed out on letter-size paper) have far too small of font for my preference. I guess what I’m getting at is - is HTML without JavaScript and with MathML & SVG (EPUBs for example are just zipped xhtml files - go ahead and unzip one, take a look!) the PDF of the future as we leave printers behind?
The PDF format was created in 1992, 32 years ago, so by the Lindy principle we can assume it will around until 2056. However, things like widespread adoption of large(r)-format e-ink displays and even further reduction in number of printers might accelerate its decline.
There are a few initiatives by the PDF Association to enable better derivation of PDF content, i.e. to make it easier to e.g. reflow PDF documents.
For one, there is a derivation algorithm specified at https://pdfa.org/resource/deriving-html-from-pdf/. And the Well-tagged PDF spec WTPDF-1.0 (https://pdfa.org/wp-content/uploads/2024/02/Well-Tagged-PDF-WTPDF-1.0.pdf) was recently released which should make this process still easier.
So the industry is aware of this problem and I expect that it will get better over time.
I don’t know about PDF specifically, but fixed-format content will be here forever as something that lots of (most?) people feel very strongly about. In many contexts, it’s important that different viewers see the same thing and that it conveys the author’s intent, and HTML/EPUB is horrible for anything that isn’t just simple linear flow text because the formatting is all wrong looking with overly short/long lines, or diagrams are in the wrong spot, or worse: nothing is paginated and everything is impossible to reference!
PDF isn’t going anywhere until HTML/CSS absorbs the feature set of PDF and it becomes widely implemented. And at that point you’ll just have a funny format that takes a ginormous browser to view instead of something wrapping mupdf/poppler.
Hopefully forever.
There is absolutely no replacement for it, no other format comes even close to a well-designed and typeset PDF document, e.g. a study, or a scientific book. Without it figures will be illogically placed far from where they make sense and help understanding, and often look plain ugly.
As others mentioned, I would much rather add some basic reflow capability to PDF (what might be realistic is to simply let it make a single column from multiple ones accurately), then throw it out the window. Also, physical printing won’t stop being a thing.
Hopefully at least until we get good hyphenation and justification in HTML!