R/mini-document.R
mini_document.Rd
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,
...
)
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"
.
TRUE
to include a table of contents in the output
TRUE to float the table of contents to the left of the main document content.
This is an experimental feature. TRUE
highlights the
table of contents according to the browser's viewport.
Wrap sections in <div>
tags, and attach identifiers to the
enclosing <div>
rather than the header itself.
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"
.
Setup results folding by a string, "none"
, "show"
,
or "hide"
. This feature will fold entire results, including side effects
such as figures and tables.
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
.
If TRUE
and framework = "bootstrap"
, the output
includes Rmd file itself and supplies download button of it.
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).
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
.
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.
Additional function arguments to pass to the
base R Markdown HTML output formatter html_document_base
Named list of additional content to include within the
document (typically created using the includes
function).
Keep the markdown file generated by knitting.
Additional command line options to pass to pandoc
Arguments passed to rmarkdown::html_document