The output format is HTML5 in general. If framework = "bootstrap" is given, the output format becomes HTML4 and comparable to rmarkdown::html_document except for the behavior of the code_folding option.

mini_document(
  framework = "sakura",
  theme = "default",
  toc = FALSE,
  toc_float = FALSE,
  code_folding = c("none", "show", "hide"),
  results_folding = c("none", "show", "hide"),
  code_download = FALSE,
  self_contained = TRUE,
  math = "katex",
  template = "default",
  extra_dependencies = NULL,
  includes = list(),
  keep_md = FALSE,
  pandoc_args = NULL,
  ...
)

Arguments

framework, theme

A string to specify the name of a framework (default: "sakura") and its theme (default: "default"). Note that theme = "default" is a special keyword which selects a theme defined as default internally. See frameworks for available light weight CSS frameworks and their themes.

toc

TRUE to include a table of contents in the output

toc_float

TRUE to float the table of contents to the left of the main document content.

code_folding

Setup code folding by a string or a named list. A choice for the string are "none" to disable, "show" to enable and show all by default), and "hide" to enable and hide all by default. If a named list, each element may have one of the above strings. Names are some of "source", "output", "message", "warning", and "error". If the list does not have some of the element with the above name, they are treated as "none".

results_folding

Setup results folding by a string, "none", "show", or "hide". This feature will fold entire results, including side effects such as figures and tables.

code_download

If TRUE and framework = "bootstrap", the output includes Rmd file itself and supplies download button of it.

self_contained

Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. Note that even for self contained documents MathJax is still loaded externally (this is necessary because of its size).

math

A string to specify math rendering engine (default: "katex"). If the value is other than "katex", the result depends on the framework option. When the given framework is "bootstrap", the math option is passed to the mathjax option of rmarkdown::html_document. Otherwise, pandoc's built-in feature renders math expressions to unicode characters.

template

Pandoc template. If "default", the package's internal template is used. If a path, user's original template is used. If NULL, pandoc's internal template is used.

extra_dependencies

Additional function arguments to pass to the base R Markdown HTML output formatter html_document_base

includes

Named list of additional content to include within the document (typically created using the includes function).

keep_md

Keep the markdown file generated by knitting.

pandoc_args

Additional command line options to pass to pandoc

...

Arguments passed to rmarkdown::html_document

Examples

if (FALSE) { library(rmarkdown) library(minidown) render("input.Rmd", mini_document) }