Format for converting from R Markdown to PDF using ConTeXt.
context_document( toc = FALSE, toc_depth = 2, number_sections = FALSE, fig_width = 6.5, fig_height = 4.5, fig_crop = TRUE, fig_caption = TRUE, dev = "pdf", df_print = "default", template = NULL, keep_tex = FALSE, keep_md = FALSE, citation_package = c("none", "natbib", "biblatex"), includes = NULL, md_extensions = NULL, output_extensions = NULL, pandoc_args = NULL, context_path = NULL, context_args = NULL, ext = c(".pdf", ".tex") )
toc |
|
---|---|
toc_depth | Depth of headers to include in table of contents |
number_sections |
|
fig_width | Default width (in inches) for figures |
fig_height | Default height (in inches) for figures |
fig_crop |
|
fig_caption |
|
dev | Graphics device to use for figure output (defaults to pdf) |
df_print | Method to be used for printing data frames. Valid values
include "default", "kable", "tibble", and "paged". The "default" method
uses a corresponding S3 method of |
template | Pandoc template to use for rendering. Pass "default" to use
the rmarkdown package default template; pass |
keep_tex | Keep the intermediate tex file used in the conversion to PDF |
keep_md | Keep the markdown file generated by knitting. |
citation_package | The LaTeX package to process citations, |
includes | Named list of additional content to include within the
document (typically created using the |
md_extensions | Markdown extensions to be added or removed from the
default definition or R Markdown. See the |
output_extensions | Pandoc extensions to be added or removed from the
output format, e.g., |
pandoc_args | Additional command line options to pass to pandoc |
context_path | Path of the ConTeXt executable. If not provided, ConTeXt has
to be available from the |
context_args | Command line arguments passed to ConTeXt. |
ext | Format of the output document (defaults to ".pdf"). |
R Markdown output format to pass to render
.
ConTeXt needs to be installed. To install the most recent version, see
https://wiki.contextgarden.net/Installation. A less recent version is
also available in TeX Live, you can install it with
tinytex::tlmgr_install("context")
.
R Markdown documents can have optional metadata that is used to generate a document header that includes the title, author, and date. For more details see the documentation on R Markdown metadata.
R Markdown documents also support citations. You can find more information on the markdown syntax for citations in the Bibliographies and Citations article in the online documentation.