View source: R/pandoc-convert.R
pandoc_convert | R Documentation |
Main usage of Pandoc is to convert some text from a format into another. This function will do just that:
converting from a file or directly from text
writing to a file or directly to console
pandoc_convert(
file = NULL,
text = NULL,
from = "markdown",
to,
output = NULL,
standalone = FALSE,
args = c(),
version = "default"
)
file, text |
One or the other should be provided |
from |
Format to convert from. This must be one of the format supported
by Pandoc. Default will be |
to |
Format to convert to. This must be one of the format supported by
Pandoc. This correspond to the |
output |
Pass a path to a file to write the result from Pandoc
conversion into a file. This corresponds to the |
standalone |
Should appropriate header and footer be included ?
This corresponds to |
args |
Any other flag supported by Pandoc CLI. See https://pandoc.org/MANUAL.html#options |
version |
Version to use. Default will be the
|
output
is provided, the absolute file path. If not, the output of
pandoc
binary run.
pandoc::pandoc_convert(text = "_This will be emphasize_", to = "latex")
pandoc::pandoc_convert(text = "**This will be bold**", to = "html", version = "2.11.4")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.