Define an R Markdown output format based on a combination of knitr and pandoc options.
output_format( knitr, pandoc, keep_md = FALSE, clean_supporting = TRUE, df_print = NULL, pre_knit = NULL, post_knit = NULL, pre_processor = NULL, intermediates_generator = NULL, post_processor = NULL, on_exit = NULL, file_scope = NULL, base_format = NULL )
Knitr options for an output format (see
Pandoc options for an output format (see
Keep the markdown file generated by knitting. Note that if
clean_supporting will always be
Cleanup any supporting files after conversion see
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.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
frame printing section in bookdown book for examples.
An optional function that runs before knitting which receives
input (input filename passed to
(for future expansion) arguments.
An optional function that runs after knitting which receives
future expansion) arguments. This function can return additional arguments
to pass to pandoc and can call
knitr::knit_meta_add to add
additional dependencies based on the contents of the input_file or on other
assets side by side with it that may be used to produce html with
dependencies during subsequent processing.
An optional pre-processor function that receives the
output_dir and can return additional arguments
to pass to pandoc.
An optional function that receives the
input_file, and the intermediates directory (i.e. the
intermediates_dir argument to
render). The function
should generate and return the names of any intermediate files required to
An optional post-processor function that receives the
verbose parameters, and can return an alternative
A function that will split markdown input to pandoc into
multiple named files. This is useful when the caller has concatenated a set
of Rmd files together (as bookdown does), and those files may need to
processed by pandoc using the
--file-scope option. The function
should return a named list of files w/
An optional format to extend.
An R Markdown output format definition that can be passed to