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 = "auto",
fig_caption = TRUE,
dev = "pdf",
df_print = "default",
template = NULL,
keep_tex = FALSE,
keep_md = FALSE,
citation_package = c("default", "natbib", "biblatex"),
includes = NULL,
md_extensions = NULL,
output_extensions = NULL,
pandoc_args = NULL,
context_path = NULL,
context_args = NULL,
ext = c(".pdf", ".tex")
)

## Arguments

toc TRUE to include a table of contents in the output Depth of headers to include in table of contents TRUE to number section headings Default width (in inches) for figures Default height (in inches) for figures TRUE to automatically apply the pdfcrop utility (if available) to pdf figures TRUE to render figures with captions Graphics device to use for figure output (defaults to pdf) 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 print, typically print.data.frame. The "kable" method uses the knitr::kable function. The "tibble" method uses the tibble package to print a summary of the data frame. The "paged" method creates a paginated HTML table (note that this method is only valid for formats that produce HTML). In addition to the named methods you can also pass an arbitrary function to be used for printing data frames. You can disable the df_print behavior entirely by setting the option rmarkdown.df_print to FALSE. See Data frame printing section in bookdown book for examples. Pandoc template to use for rendering. Pass "default" to use the rmarkdown package default template; pass NULL to use pandoc's built-in template; pass a path to use a custom template that you've created. See the documentation on pandoc online documentation for details on creating custom templates. Keep the intermediate tex file used in the conversion to PDF Keep the markdown file generated by knitting. The LaTeX package to process citations, natbib or biblatex. Use default if neither package is to be used, which means citations will be processed via the command pandoc-citeproc. Named list of additional content to include within the document (typically created using the includes function). Markdown extensions to be added or removed from the default definition or R Markdown. See the rmarkdown_format for additional details. Pandoc extensions to be added or removed from the output format, e.g., "-smart" means the output format will be latex-smart. Additional command line options to pass to pandoc Path of the ConTeXt executable. If not provided, ConTeXt has to be available from the PATH environment variable. Command line arguments passed to ConTeXt. Format of the output document (defaults to ".pdf").

## Value

R Markdown output format to pass to render.

## Details

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.

## Examples

if (FALSE) {
library(rmarkdown)

# simple invocation
render("input.Rmd", context_document())
}