1

I have a few long headings in R Markdown. Some of them end up with a word split across lines by a hyphen when knitted to pdf.

Is there a way to prevent this?

I'm guessing standard markdown would have a similar issue?

vuzun
  • 942
  • 2
  • 8
  • 15
  • Is "cut the headings short" not an option? – TC Zhang Nov 30 '18 at 07:42
  • No, unfortunately. It seems there is way to push words in the next line in titles of R Markdown files (https://stackoverflow.com/questions/51559106/split-title-in-two-lines-in-rmarkdown-for-word-output/51570546), but I haven't found anything for headings yet – vuzun Nov 30 '18 at 09:33
  • 1
    This might help: https://stackoverflow.com/a/52193443/2425163 One can pass raw pandoc options via the `pandoc_args` YAML array. – tarleb Nov 30 '18 at 09:37
  • r-markdown uses pandoc, which in turn uses LaTeX for PDF creation. You can pass along LaTeX instructions in `includes: header`... – mb21 Nov 30 '18 at 14:30

0 Answers0