Rendered at 06:55:25 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
zaqr 43 seconds ago [-]
TIL of this wonderful tool, how did I never used this before, boggles the mind
adamddev1 8 hours ago [-]
> by writing N parsers (“readers”) and M renderers (“writers”), one could support N × M conversions.
Beautiful writeup for a wonderful project. In an age of vibe-coding hype it's also so nice to see how things can be extended and snowball in usefulness when things are built correctly, by hand, from basic principles.
> Perhaps, then, in the future, people will no longer have a need for tools like pandoc.
I think we will need wonderful things like pandoc more and more. As mentioned there is a huge ecological and practical difference. Even if LLMs could get infintisamally close to deterministic-level reliability, it's still so many more orders of magnitude better in efficiency, especially with big batch jobs etc.
vatsachak 5 hours ago [-]
Well the difficult part is finding a good intermediate representation, which they did
aanet 7 hours ago [-]
That a professor of philosophy [1] made tools [2] that are used by millions around the world... that's just mind boggling. In a good (great!) way.
To top it all off Pandoc has a great experience for contributors. Over the past few years I've opened several bug reports related to Typst and docx and all of them got responses that were kind and helpful. I even had a few PRs merged in despite knowing almost nothing of Haskell.
malkosta 7 hours ago [-]
Love pandoc, I use it for all sorts of stuff…here is my minimal static site generator:
find . -name '*.md' -type f -exec sh -c '
for file do
out="docs/${file#./}"
out="${out%.md}.html"
mkdir -p "$(dirname "$out")"
pandoc --quiet --template template.html "$file" -o "$out"
done
which strips out styling, wrapper divs, spans, inline attributes, etc from (for instance) HTML copied from a google or word doc. Just the semantic goodness!
darthoctopus 11 hours ago [-]
Thank you for pandoc. I made the (at the time perhaps not transparently wise) choice to go all in on it when I started my PhD, and that decision has paid nothing but dividends since. I owe my career as a scientist to it.
aaplok 6 hours ago [-]
One thing I like with pandoc is that it produces clean html or latex code (it can also produce clean markdown with the right option).
If you compare this with the HTML produced by typst or hevea, this is super useful, as we can then roll out our own styles.
Pandoc is awesome. My fav usage is configuring git to use it to normalize binary docs to markdown (like a .docx) so they can be diffed. Works amazing for redlining contacts.
rao-v 8 hours ago [-]
I have at times mused that writing the internal state of pandoc to disk (yes 13th standard etc) would be the most interoperable file format
boramalper 32 minutes ago [-]
I don’t think it has backward compatibility / stability guarantees though, does it?
mjmas 5 hours ago [-]
pandoc document.md --to native
applicative 1 hours ago [-]
Since your document is a haskell value, syntax highlighting gives added value to the terminal drug trip
pandoc -f html -t native "https://news.ycombinator.com/item?id=49156750" | bat -l hs --style=plain --paging=never
jack0111 1 hours ago [-]
It's not easy to maintain so many parsers and renderers, and at the same time to keep the qualities of them.
graemep 9 hours ago [-]
Pandoc is amazing. I have HTML and want a PDF? One command and it just works painlessly. That was just my last use of pandoc this weekend. I do not use it that often, but when I do its perfect.
Curiositry 3 hours ago [-]
Pandoc is a fantastic piece of software. I have never had any issues with it, and it's the tool I reach for anytime I need to covert documents. I'm super grateful to John MacFarlane for creating it and maintaining it for all these years!
w10-1 3 hours ago [-]
unending thanks, as much for pandoc as for the example of a clear design+implementation that lasts.
BeetleB 7 hours ago [-]
pandoc was (and still is) critical to some of my flows. I hope it never dies!
oytech 8 hours ago [-]
Effort worth admiration. Thank you for creating pandoc! It allowed me to write my CV in more readable markdown, but also get nice pdf with latex.
Beautiful writeup for a wonderful project. In an age of vibe-coding hype it's also so nice to see how things can be extended and snowball in usefulness when things are built correctly, by hand, from basic principles.
> Perhaps, then, in the future, people will no longer have a need for tools like pandoc.
I think we will need wonderful things like pandoc more and more. As mentioned there is a huge ecological and practical difference. Even if LLMs could get infintisamally close to deterministic-level reliability, it's still so many more orders of magnitude better in efficiency, especially with big batch jobs etc.
Pandoc is my go-to tool. Thank you, Sir!
[1] https://johnmacfarlane.net/index.html
[2] https://johnmacfarlane.net/tools.html
https://gist.github.com/rahimnathwani/210b1f9cb6ce731a304322...
find . -name '*.md' -type f -exec sh -c '
' sh {} +tidyhtml () { pandoc -f html-native_divs-native_spans -t markdown-raw_html-raw_attribute | pandoc -f markdown -t html }
which strips out styling, wrapper divs, spans, inline attributes, etc from (for instance) HTML copied from a google or word doc. Just the semantic goodness!
If you compare this with the HTML produced by typst or hevea, this is super useful, as we can then roll out our own styles.
I never heard about djot [0], is anyone using it?
[0]: https://djot.net/
[0] https://github.com/gn0/nvim-web-server