logoalt Hacker News

chlaunchlatoday at 1:32 PM3 repliesview on HN

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.


Replies

__mharrison__today at 3:45 PM

Use 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).

show 1 reply
cwmooretoday at 2:25 PM

I 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-pa...

thibaut_barreretoday at 3:41 PM

To 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…