Pandoc is a great way of generating PDF content from markdown. It uses LaTeX as an intermediate format; by default this uses hyphenation at the ends of lines for justified text where it deems it necessary.

I found this hyphenation a bit intrusive (in particular, I’m generating a script for a training course and for readability I would rather have wider spacing between words than have to deal with hyphenation).

There’s a straightforward way to remove the hyphens, but I couldn’t find it documented anywhere. So here it is.

First, create a text file with a couple of LaTeX commands to inhibit hyphenation. I called it nohyphenation.

\exhyphenpenalty=10000 \hyphenpenalty=10000

Then just include this file as a parameter to the pandoc command:


And that’s it: no more words splitting across lines in the generated output.