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,
  toc_highlight = FALSE,
  section_divs = TRUE,
  code_folding = c("none", "show", "hide"),
  results_folding = c("none", "show", "hide"),
  tabset = FALSE,
  code_download = FALSE,
  self_contained = TRUE,
  math = "katex_serverside",
  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. If you want to scratch styles by yourself, use framework = "none".

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.

toc_highlight

This is an experimental feature. TRUE highlights the table of contents according to the browser's viewport.

section_divs

Wrap sections in <div> tags, and attach identifiers to the enclosing <div> rather than the header itself.

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.

tabset

TRUE converts sections to tabs if they belong to the tabset-class section. The tabs inherit names from the corresponding sections. Unlike rmarkdown::html_document, the tabs can be navigated by table of contents, and can be shared by unique URLs. Note that framework = "bootstrap" falls back to the native feature of rmarkdown::html_document. This feature also requires section_divs = TRUE.

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

This is a good choice when you want to exclude JavaScript from the output. The default value "katex" attempts client-side rendreing, but falls back to server-side rendering, i.e. "katex_serverside", when runtime is shiny or shiny_prerendered. Otherwise, if the framework is "bootstrap", this option is passed to the mathjax argument of rmarkdown::html_document.

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)
}