Debian Codegraph @

man/pandoc_available.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/pandoc.R
3 \name{pandoc_available}
4 \alias{pandoc_available}
5 \alias{pandoc_version}
6 \title{Check pandoc availability and version}
7 \usage{
8 pandoc_available(version = NULL, error = FALSE)
9
10 pandoc_version()
11 }
12 \arguments{
13 \item{version}{Required version of pandoc}
14
15 \item{error}{Whether to signal an error if pandoc with the required version
16 is not found}
17 }
18 \value{
19 \code{pandoc_available} returns a logical indicating whether the
20 required version of pandoc is available. \code{pandoc_version} returns a
21 \code{\link[base]{numeric_version}} with the version of pandoc found.
22 }
23 \description{
24 Determine whether pandoc is currently available on the system (optionally
25 checking for a specific version or greater). Determine the specific version
26 of pandoc available.
27 }
28 \details{
29 The system environment variable \samp{PATH} as well as the version of pandoc
30 shipped with RStudio (its location is set via the environment variable
31 \samp{RSTUDIO_PANDOC} by RStudio products like the RStudio IDE, RStudio
32 Server, Shiny Server, and RStudio Connect, etc) are scanned for pandoc and
33 the highest version available is used. Please do not modify the environment
34 variable \samp{RSTUDIO_PANDOC} unless you know what it means.
35 }
36 \examples{
37 \dontrun{
38 library(rmarkdown)
39
40 if (pandoc_available())
41 cat("pandoc", as.character(pandoc_version()), "is available!\n")
42
43 if (pandoc_available("1.12.3"))
44 cat("required version of pandoc is available!\n")
45 }
46 }