This function is a thin wrapper around the pandoc binary and allow to pass any arguments supported by the Pandoc binary.
Arguments
- args
Character vector, arguments to the pandoc CLI command
- version
Version to use. Default will be the
"default"
version. Other possible value areA 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"
Examples
# Run any command line argument (prefer `pandoc_convert()` for conversion )
pandoc::pandoc_run(c("--version"))
#> [1] "pandoc 2.18"
#> [2] "Compiled with pandoc-types 1.22.2, texmath 0.12.5, skylighting 0.12.3,"
#> [3] "citeproc 0.7, ipynb 0.2, hslua 2.2.0"
#> [4] "Scripting engine: Lua 5.4"
#> [5] "User data directory: /home/runner/.local/share/pandoc"
#> [6] "Copyright (C) 2006-2022 John MacFarlane. Web: https://pandoc.org"
#> [7] "This is free software; see the source for copying conditions. There is no"
#> [8] "warranty, not even for merchantability or fitness for a particular purpose."
pandoc::pandoc_run(c("--list-input-formats"), version = "system")
#> [1] "biblatex" "bibtex" "commonmark"
#> [4] "commonmark_x" "creole" "csljson"
#> [7] "csv" "docbook" "docx"
#> [10] "dokuwiki" "endnotexml" "epub"
#> [13] "fb2" "gfm" "haddock"
#> [16] "html" "ipynb" "jats"
#> [19] "jira" "json" "latex"
#> [22] "man" "markdown" "markdown_github"
#> [25] "markdown_mmd" "markdown_phpextra" "markdown_strict"
#> [28] "mediawiki" "muse" "native"
#> [31] "odt" "opml" "org"
#> [34] "ris" "rst" "rtf"
#> [37] "t2t" "textile" "tikiwiki"
#> [40] "tsv" "twiki" "vimwiki"