前書いたかもしれないけど。
とりあえず、出力の例はここで確認できる。
詳しくはマニュアルを読むのが良い。何事も。
さて、RStudioで使用しているPandocがどのhighlightのスタイル?を利用できるかは以下のようにして確認できる。
"C:/Program Files/RStudio/bin/pandoc/pandoc" --list-highlight-styles pygments tango espresso zenburn kate monochrome breezedark haddock
マニュアルより、The Haskell library skylighting is used for highlighting.
とあるように、Haskellのskylightingライブラリが使用されている。
ハイライトされる言語は下記のように確認できる。
"C:/Program Files/RStudio/bin/pandoc/pandoc" --list-highlight-languages abc asn1 asp ats awk actionscript ada agda alertindent apache bash bibtex boo c cs cpp cmake css changelog clojure coffee coldfusion commonlisp curry d dtd default diff djangotemplate dockerfile doxygen doxygenlua eiffel elixir email erlang fsharp fortran gcc glsl gnuassembler m4 go html hamlet haskell haxe ini isocpp idris fasm nasm j json jsp java javascript javadoc julia kotlin llvm latex lex lilypond literatecurry literatehaskell lua mips makefile markdown mathematica matlab maxima mediawiki metafont modelines modula2 modula3 monobasic ocaml objectivec objectivecpp octave opencl php povray pascal perl pike postscript powershell prolog protobuf pure purebasic python r relaxng relaxngcompact roff ruby rhtml rust sgml sml sql sqlmysql sqlpostgresql scala scheme tcl tcsh texinfo mandoc typescript vhdl verilog xml xul yaml yacc zsh dot noweb rest sci sed xorg xslt
かなりの数の言語に対応していることがわかる。
また、マニュアルにCurrently highlighting is supported only for HTML, EPUB, Docx, Ms, and LaTeX/PDF output.
と書いてあるように、現時点では4つの出力フォーマットにのみ適用されるようだ。
長くなったので一旦ここまで。