6 ms·
Pandoc is an impressive piece of software but I could never quite get PDF generation working nicely with it. Table layouts were often broken, with text overlap
by chlaunchla 5mo ago
Pandoc is an impressive piece of software but I could never quite get PDF generation working nicely with it.
Table layouts were often broken, with text overlapping into adjacent fields. Unicode font fallback didn't work properly, with characters like "→" being silently dropped because they didn't exist in the main font. Having predictable control of page breaks, to avoid situations where header text didn't stick to the following paragraph and instead had header and paragraph text split over a page boundary, was pretty much impossible.
I ended up concluding that Markdown isn't a sufficiently powerful markup language for page-based documents, and went back to using Word in all its WYSIWYG delight.
That said, maybe there were ways of doing all of the above but I couldn't figure it out and found the whole process of wrestling with with both Markdown and LaTeX templates, and Pandoc configuration, unintuitive and annoying.
- cwmoore 5mo agoI broke out a little HTML/CSS for this with page-break: after, now deprecated but the improved directives look better: https://stackoverflow.com/questions/1664049/can-i-force-a-page-break-in-html-printing https://stackoverflow.com/questions/1664049/can-i-force-a-pa...
- thibaut_barrere 5mo agoTo address that, a long while back I used a Markdown to Ruby Prawn to PDF generator. I could not find a generic mainstream tool supporting this…
- Ametrin 5mo ago[flagged]
- __mharrison__ 5mo agoUse Pandoc w/ Typst. I've published many books using it. In fact, just had a friend with a traditionally published book who is now self-pubbing ask me yesterday about my tools. I recommended Pandoc and Typst. He (surprisingly to me) had never heard of Typst, but within the hour replied that (with the use of AI) he had a great-looking template for the book. (Try doing that with LaTeX).
- mrkwse 5mo agoCould you elaborate on your workflow? Which tool do you start in (presumably it's a sequential flow?)? When is it that you go across the tools?
- __mharrison__ 5mo agoJupyter to markdown to typst. Pandoc does the last conversation. (Pandoc also creates epubs for me). I have some custom filters for index entries and code formatting.
- jcheng 5mo agoI'm curious if Quarto could coordinate all of that for you automatically. It supports both code execution via Jupyter, and output via Typst (including books). https://quarto.org/docs/computations/python.html https://quarto.org/docs/computations/python.html https://quarto.org/docs/output-formats/typst.html https://quarto.org/docs/output-formats/typst.html https://quarto.org/docs/books/book-output.html#typst-output https://quarto.org/docs/books/book-output.html#typst-output https://quarto.org/docs/output-formats/typst-custom.html#book-format-extensions https://quarto.org/docs/output-formats/typst-custom.html#boo...
- Ametrin 5mo ago[dead]
- applicative 5mo ago"→" is standard unicode; pandoc would have put it into the internal AST. If you were writing a pdf e.g. via pdflatex and tex fonts in olden times, a number of things might have gone wrong. Such a thing will pass unproblematically into the things like the going luatex - but similarly if you write the pdf via e.g. typst or one of the other engines. It is true one ends up familiarizing oneself with peculiarities of the typesetting engine. The LLMs are lately teaching me bits and pieces about typst and typst+pandoc which I'm using for a writing project. They all seem infallible about pandoc curiosa. Tables I agree are a nightmare in any plain text representation whatsoever - except with editor support which alas Word makes easy.