pandoc is currently an experimental R package primarily develop to help maintainers of R Markdown ecosystem.
Indeed, the R Markdown ecosystem is highly dependent on Pandoc (https://pandoc.org/) changes and it is designed to be as version independent as possible. R Markdown is best used with the latest Pandoc version but any rmarkdown package version should work with previous version of Pandoc, and new change in Pandoc should not break any rmarkdown features.
This explains the needs for a more focused tooling to:
This package can also be useful to advanced developers that are working around Pandoc through rmarkdown or not.
Install from CRAN:
install.packages("pandoc")
The development version can be install from GitHub with:
# install.packages("pak")
::pak("cderv/pandoc") pak
All functions are prefixed with pandoc_
and you will
find below their main usage. See Get
started for usage examples and Reference
page for full details of functions.
Most functions follows these following rules:
pandoc_
.version
argument."2.14.2"
), or one special alias
(default
, nightly
, rstudio
,
system
) .Available functions allows:
pandoc_install()
,
pandoc_install_nightly()
, pandoc_uninstall()
,
…version=
argument.
pandoc_activate()
, with_pandoc()
,
….pandoc_installed_versions()
,
pandoc_installed_latest
,
pandoc::pandoc_is_installed()
,
pandoc_locate()
, pandoc_available()
, …rmarkdown::render()
will
use the version activated by this pandoc)
pandoc::pandoc_activate(rmarkdown = TRUE)
pandoc_bin("system")
), or the version shipped
with RStudio (pandoc_bin("rstudio")
).pandoc_run()
pandoc_version()
, pandoc_list_extensions()
, pandoc_export_template()
, and all other wrappers…pandoc::pandoc_browse_manual()
,
pandoc::pandoc_browse_extension()
, ….library(pandoc)
# Install version
pandoc_install("2.7.3")
#> ✔ Pandoc 2.7.3 already installed.
#> Use 'force = TRUE' to overwrite.
pandoc_install("2.11.4")
#> ✔ Pandoc 2.11.4 already installed.
#> Use 'force = TRUE' to overwrite.
# Highest install is used
pandoc_version()
#> [1] '3.1.6'
See detailed examples in Get started.
Please note that the pandoc project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.