Skip to contents

This function is useful to retrieve the supported languages by Pandoc's syntax highlighter. These are the values that can be used as fenced code attributes to trigger the highlighting of the block for the requested language. See fenced_code_attributes extensions flag.

Usage

pandoc_list_highlight_languages(version = "default")

Arguments

version

Version to use. Default will be the "default" version. Other possible value are

  • A version number e.g "2.14.1"

  • The nightly version called "nightly"

  • The latest installed version with "latest"

  • Pandoc binary shipped with RStudio IDE with "rstudio"

  • Pandoc binary found in PATH with "system"

Value

a character vector of supported languages to use as fenced code attributes.

Examples

pandoc_list_highlight_languages()
#>   [1] "abc"             "actionscript"    "ada"             "agda"           
#>   [5] "apache"          "asn1"            "asp"             "ats"            
#>   [9] "awk"             "bash"            "bibtex"          "boo"            
#>  [13] "c"               "changelog"       "clojure"         "cmake"          
#>  [17] "coffee"          "coldfusion"      "comments"        "commonlisp"     
#>  [21] "cpp"             "cs"              "css"             "curry"          
#>  [25] "d"               "default"         "diff"            "djangotemplate" 
#>  [29] "dockerfile"      "dot"             "doxygen"         "doxygenlua"     
#>  [33] "dtd"             "eiffel"          "elixir"          "elm"            
#>  [37] "email"           "erlang"          "fasm"            "fortranfixed"   
#>  [41] "fortranfree"     "fsharp"          "gcc"             "glsl"           
#>  [45] "gnuassembler"    "go"              "graphql"         "groovy"         
#>  [49] "hamlet"          "haskell"         "haxe"            "html"           
#>  [53] "idris"           "ini"             "isocpp"          "j"              
#>  [57] "java"            "javadoc"         "javascript"      "javascriptreact"
#>  [61] "json"            "jsp"             "julia"           "kotlin"         
#>  [65] "latex"           "lex"             "lilypond"        "literatecurry"  
#>  [69] "literatehaskell" "llvm"            "lua"             "m4"             
#>  [73] "makefile"        "mandoc"          "markdown"        "mathematica"    
#>  [77] "matlab"          "maxima"          "mediawiki"       "metafont"       
#>  [81] "mips"            "modelines"       "modula2"         "modula3"        
#>  [85] "monobasic"       "mustache"        "nasm"            "nim"            
#>  [89] "noweb"           "objectivec"      "objectivecpp"    "ocaml"          
#>  [93] "octave"          "opencl"          "orgmode"         "pascal"         
#>  [97] "perl"            "php"             "pike"            "postscript"     
#> [101] "povray"          "powershell"      "prolog"          "protobuf"       
#> [105] "pure"            "purebasic"       "python"          "qml"            
#> [109] "r"               "raku"            "relaxng"         "relaxngcompact" 
#> [113] "rest"            "rhtml"           "roff"            "ruby"           
#> [117] "rust"            "sass"            "scala"           "scheme"         
#> [121] "sci"             "scss"            "sed"             "sgml"           
#> [125] "sml"             "spdxcomments"    "sql"             "sqlmysql"       
#> [129] "sqlpostgresql"   "stan"            "stata"           "swift"          
#> [133] "systemverilog"   "tcl"             "tcsh"            "texinfo"        
#> [137] "toml"            "typescript"      "verilog"         "vhdl"           
#> [141] "xml"             "xorg"            "xslt"            "xul"            
#> [145] "yacc"            "yaml"            "zsh"            
# check languages available in a specific Pandoc's version
pandoc_list_highlight_languages("2.11.4")
#>   [1] "abc"             "actionscript"    "ada"             "agda"           
#>   [5] "apache"          "asn1"            "asp"             "ats"            
#>   [9] "awk"             "bash"            "bibtex"          "boo"            
#>  [13] "c"               "changelog"       "clojure"         "cmake"          
#>  [17] "coffee"          "coldfusion"      "comments"        "commonlisp"     
#>  [21] "cpp"             "cs"              "css"             "curry"          
#>  [25] "d"               "default"         "diff"            "djangotemplate" 
#>  [29] "dockerfile"      "dot"             "doxygen"         "doxygenlua"     
#>  [33] "dtd"             "eiffel"          "elixir"          "elm"            
#>  [37] "email"           "erlang"          "fasm"            "fortranfixed"   
#>  [41] "fortranfree"     "fsharp"          "gcc"             "glsl"           
#>  [45] "gnuassembler"    "go"              "graphql"         "groovy"         
#>  [49] "hamlet"          "haskell"         "haxe"            "html"           
#>  [53] "idris"           "ini"             "isocpp"          "j"              
#>  [57] "java"            "javadoc"         "javascript"      "javascriptreact"
#>  [61] "json"            "jsp"             "julia"           "kotlin"         
#>  [65] "latex"           "lex"             "lilypond"        "literatecurry"  
#>  [69] "literatehaskell" "llvm"            "lua"             "m4"             
#>  [73] "makefile"        "mandoc"          "markdown"        "mathematica"    
#>  [77] "matlab"          "maxima"          "mediawiki"       "metafont"       
#>  [81] "mips"            "modelines"       "modula2"         "modula3"        
#>  [85] "monobasic"       "mustache"        "nasm"            "nim"            
#>  [89] "noweb"           "objectivec"      "objectivecpp"    "ocaml"          
#>  [93] "octave"          "opencl"          "pascal"          "perl"           
#>  [97] "php"             "pike"            "postscript"      "povray"         
#> [101] "powershell"      "prolog"          "protobuf"        "pure"           
#> [105] "purebasic"       "python"          "qml"             "r"              
#> [109] "relaxng"         "relaxngcompact"  "rest"            "rhtml"          
#> [113] "roff"            "ruby"            "rust"            "scala"          
#> [117] "scheme"          "sci"             "sed"             "sgml"           
#> [121] "sml"             "spdxcomments"    "sql"             "sqlmysql"       
#> [125] "sqlpostgresql"   "stata"           "tcl"             "tcsh"           
#> [129] "texinfo"         "toml"            "typescript"      "verilog"        
#> [133] "vhdl"            "xml"             "xorg"            "xslt"           
#> [137] "xul"             "yacc"            "yaml"            "zsh"