| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/pandoc.R |
| 3 |
\name{find_pandoc} |
| 4 |
\alias{find_pandoc} |
| 5 |
\title{Find the \command{pandoc} executable} |
| 6 |
\usage{ |
| 7 |
find_pandoc(cache = TRUE, dir = NULL, version = NULL) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{cache}{Whether to search for \command{pandoc} again if a Pandoc |
| 11 |
directory containing the \command{pandoc} executable of the expected |
| 12 |
version (if provided) has been found previously. Search again if |
| 13 |
\code{cache = FALSE}.} |
| 14 |
|
| 15 |
\item{dir}{A character vector of potential directory paths under which |
| 16 |
\command{pandoc} may be found. If not provided, this function searches for |
| 17 |
\command{pandoc} from the environment variable \var{RSTUDIO_PANDOC} (the |
| 18 |
RStudio IDE will set this variable to the directory of Pandoc bundled with |
| 19 |
the IDE), the environment variable \var{PATH}, and the directory |
| 20 |
\file{~/opt/pandoc/}.} |
| 21 |
|
| 22 |
\item{version}{The version of Pandoc to look for (e.g., \code{"2.9.2.1"}). If |
| 23 |
not provided, this function searches for the highest version under the |
| 24 |
potential directories.} |
| 25 |
} |
| 26 |
\value{ |
| 27 |
A list containing the directory and version of Pandoc (if found). |
| 28 |
} |
| 29 |
\description{ |
| 30 |
Searches for the \command{pandoc} executable in a few places and use the |
| 31 |
highest version found, unless a specific version is requested. |
| 32 |
} |
| 33 |
\note{ |
| 34 |
Usually you do not need to install Pandoc if you use the RStudio IDE, |
| 35 |
because the IDE has bundled a version of Pandoc. If you have installed a |
| 36 |
version of Pandoc by yourself and want to use this version instead, you may |
| 37 |
use the \code{dir} argument of this function. |
| 38 |
} |
| 39 |
\examples{ |
| 40 |
rmarkdown::find_pandoc() |
| 41 |
rmarkdown::find_pandoc(dir = '~/Downloads/Pandoc') |
| 42 |
rmarkdown::find_pandoc(version = '2.7.3') |
| 43 |
} |