The R Markdown book lists many syntax highlighting color schemes:
highlightspecifies the syntax highlighting style. Supported styles includedefault,tango,pygments,kate,monochrome,espresso,zenburn,haddock, andtextmate. Pass null to prevent syntax highlighting.
Which is the same as running pandoc --list-highlight-styles (see Syntax Highlighting in the pandoc manual).1
But I couldn’t find a gallery for choosing among these syntax styles, so here’s a quick comparison.
Update: rmarkdown::pdf_document() doesn’t currently accept breezedark as a highlight style, but you can use the pandoc_args parameter to request this style (added in pandoc 1.19.2):
---
output:
pdf_document:
pandoc_args: "--highlight=breezedark"
---Footnotes
Note that at the time of this writing 2023-02-05, pandoc has a new highlighting style
breezedarkthatrmarkdown::pdf_documentrejects. Also,textmateseems to have been deprecated because itis an HTML higlight style, so it is also rejected bypdf_document.↩︎








