html_format | R Documentation |
The primary output formats of litedown are HTML and LaTeX. These output
formats can be configured in the output
field of the YAML metadata of the
Markdown document.
html_format(options = NULL, meta = NULL, template = NULL, keep_md = FALSE)
latex_format(
options = NULL,
meta = NULL,
template = NULL,
keep_md = FALSE,
keep_tex = FALSE,
latex_engine = "xelatex",
citation_package = "natbib"
)
meta , options |
Arguments to be passed to |
template |
A template file path. |
keep_md , keep_tex |
Whether to keep the intermediate ‘.md’ and ‘.tex’ files generated from ‘.Rmd’. |
latex_engine |
The LaTeX engine to compile ‘.tex’ to ‘.pdf’. |
citation_package |
The LaTeX package for processing citations. Possible
values are |
The output format functions have two purposes. The main purpose is to make it possible (and easier) to configure the output formats using YAML metadata inside a document, e.g.,
--- output: litedown::html_format: options: toc: true keep_md: true litedown::latex_format: latex_engine: pdflatex ---
The secondary purpose is for rmarkdown users to render R Markdown via
knitr::knit()
and mark()
(instead of Pandoc), and also use the Knit
button in RStudio. Although you can render R Markdown to Markdown via either
knitr::knit()
or fuse()
, please note that the two ways are not 100%
compatible with each other. If you choose to use litedown, we recommend
that you use fuse()
instead. If you want fuse()
to work with the Knit
button in RStudio, you have to add a special field to YAML:
--- knit: litedown:::knit ---
Without this field, RStudio will use knitr to render R Markdown.
An R Markdown output format.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.