title: How to export syntax highlighted RMarkdown code to PDF?
body: <p>For a thesis, I would like to attach the <em>code</em> (not the output) of my .Rmd document, ideally with the pretty syntax highlighting that RStudio does.</p>
  
  <p>Is there a way to export highlighted RMarkdown code to a file, ideally PDF?</p>