2

I using RStudio and Pandoc to output my document created in markdown to PDF. Pandoc always convert the code blocks in markdown using verbatim environment. Does anyone know how to switch the default conversion environment from verbatim to listing?

1
  • I uses Knitr to generate the output, I understand that I can use --listings command, but have not figured how. Anyone know how?
    – Justintosh
    Dec 27, 2017 at 0:34

1 Answer 1

2

pandoc 1.8 released[1] in 2011 added a --listings option to "Use the listings package for LaTeX code blocks" instead of doing the highlighting in pandoc. Refer to the manual: https://pandoc.org/MANUAL.html.

[1] https://pandoc.org/releases.html#pandoc-1.8-2011-01-30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .