pandoc_convert | R Documentation |
Convert documents to and from various formats using the pandoc utility.
pandoc_convert(
input,
to = NULL,
from = NULL,
output = NULL,
citeproc = FALSE,
options = NULL,
verbose = FALSE,
wd = NULL
)
input |
Character vector containing paths to input files (files must be UTF-8 encoded) |
to |
Format to convert to (if not specified, you must specify
|
from |
Format to convert from (if not specified then the format is
determined based on the file extension of |
output |
Output file (if not specified then determined based on format being converted to). |
citeproc |
|
options |
Character vector of command line options to pass to pandoc. |
verbose |
|
wd |
Working directory in which code will be executed. If not
supplied, defaults to the common base directory of |
Supported input and output formats are described in the pandoc user guide.
The system path as well as the version of pandoc shipped with RStudio (if running under RStudio) are scanned for pandoc and the highest version available is used.
## Not run:
library(rmarkdown)
# convert markdown to various formats
pandoc_convert("input.md", to = "html")
pandoc_convert("input.md", to = "latex")
# process citations
pandoc_convert("input.md", to = "html", citeproc = TRUE)
# add some pandoc options
pandoc_convert("input.md", to = "latex", options = c("--listings"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.