blob: e89753d5cb2316f413a112b90a61252006a787b5 [file] [log] [blame]
JJ Allaired708ef02016-01-30 14:30:26 -05001% Generated by roxygen2: do not edit by hand
junkkad4b3a162015-03-16 07:49:11 +01002% Please edit documentation in R/revealjs_presentation.R
JJ Allaire2ec40242014-09-15 09:18:39 -04003\name{revealjs_presentation}
4\alias{revealjs_presentation}
5\title{Convert to a reveal.js presentation}
6\usage{
Atsushi Yasumoto7053f452020-02-15 00:08:46 +09007revealjs_presentation(
8 incremental = FALSE,
9 center = FALSE,
10 slide_level = 2,
11 fig_width = 8,
12 fig_height = 6,
13 fig_retina = if (!fig_caption) 2,
14 fig_caption = FALSE,
Atsushi Yasumoto7053f452020-02-15 00:08:46 +090015 self_contained = TRUE,
16 theme = "simple",
17 transition = "default",
18 background_transition = "default",
19 reveal_options = NULL,
20 reveal_plugins = NULL,
21 highlight = "default",
22 mathjax = "default",
23 template = "default",
24 css = NULL,
25 includes = NULL,
26 keep_md = FALSE,
27 lib_dir = NULL,
28 pandoc_args = NULL,
29 extra_dependencies = NULL,
30 md_extensions = NULL,
31 ...
32)
JJ Allaire2ec40242014-09-15 09:18:39 -040033}
34\arguments{
35\item{incremental}{\code{TRUE} to render slide bullets incrementally. Note
36that if you want to reverse the default incremental behavior for an
JJ Allaire29152752016-03-08 15:06:38 -050037individual bullet you can precede it with \code{>}. For example:
JJ Allaire2ec40242014-09-15 09:18:39 -040038\emph{\code{> - Bullet Text}}}
39
40\item{center}{\code{TRUE} to vertically center content on slides}
41
JJ Allaire4c178052016-01-30 19:35:39 -050042\item{slide_level}{Level of heading to denote individual slides. If
43\code{slide_level} is 2 (the default), a two-dimensional layout will be
44produced, with level 1 headers building horizontally and level 2 headers
45building vertically. It is not recommended that you use deeper nesting of
46section levels with reveal.js.}
47
JJ Allaire2ec40242014-09-15 09:18:39 -040048\item{fig_width}{Default width (in inches) for figures}
49
Atsushi Yasumoto7053f452020-02-15 00:08:46 +090050\item{fig_height}{Default height (in inches) for figures}
JJ Allaire2ec40242014-09-15 09:18:39 -040051
JJ Allaire82a8dee2016-07-12 10:25:36 -040052\item{fig_retina}{Scaling to perform for retina displays (defaults to 2, which
53currently works for all widely used retina displays). Set to \code{NULL} to
54prevent retina scaling. Note that this will always be \code{NULL} when
55\code{keep_md} is specified (this is because \code{fig_retina} relies on
56outputting HTML directly into the markdown document).}
JJ Allaire2ec40242014-09-15 09:18:39 -040057
58\item{fig_caption}{\code{TRUE} to render figures with captions}
59
Atsushi Yasumoto7053f452020-02-15 00:08:46 +090060\item{self_contained}{Whether to generate a full LaTeX document (\code{TRUE})
61or just the body of a LaTeX document (\code{FALSE}). Note the LaTeX
62document is an intermediate file unless \code{keep_tex = TRUE}.}
JJ Allaire2ec40242014-09-15 09:18:39 -040063
JJ Allaire4c178052016-01-30 19:35:39 -050064\item{theme}{Visual theme ("simple", "sky", "beige", "serif", "solarized",
65"blood", "moon", "night", "black", "league" or "white").}
JJ Allaire2ec40242014-09-15 09:18:39 -040066
JJ Allaire35c0b492017-02-10 09:30:24 -050067\item{transition}{Slide transition ("default", "none", "fade", "slide",
junkkad4b3a162015-03-16 07:49:11 +010068"convex", "concave" or "zoom")}
69
JJ Allaire4c178052016-01-30 19:35:39 -050070\item{background_transition}{Slide background-transition ("default", "none",
71"fade", "slide", "convex", "concave" or "zoom")}
JJ Allaire2ec40242014-09-15 09:18:39 -040072
JJ Allaire35c0b492017-02-10 09:30:24 -050073\item{reveal_options}{Additional options to specify for reveal.js (see
Atsushi Yasumoto9a7e65a2020-08-10 21:56:31 +090074\href{https://revealjs.com/config/}{https://revealjs.com/config/}
JJ Allaire4c178052016-01-30 19:35:39 -050075for details).}
JJ Allaire37f45b72016-01-30 18:17:45 -050076
JJ Allaire35c0b492017-02-10 09:30:24 -050077\item{reveal_plugins}{Reveal plugins to include. Available plugins include
Atsushi Yasumoto7053f452020-02-15 00:08:46 +090078"notes", "search", "zoom", "chalkboard", and "menu". Note that
JJ Allaire35c0b492017-02-10 09:30:24 -050079\code{self_contained} must be set to \code{FALSE} in order to use Reveal
80plugins.}
JJ Allaire82a8dee2016-07-12 10:25:36 -040081
JJ Allaire2ec40242014-09-15 09:18:39 -040082\item{highlight}{Syntax highlighting style. Supported styles include
83"default", "tango", "pygments", "kate", "monochrome", "espresso",
84"zenburn", and "haddock". Pass \code{NULL} to prevent syntax highlighting.}
85
Atsushi Yasumoto7053f452020-02-15 00:08:46 +090086\item{mathjax}{Include mathjax. The "default" option uses an https URL from a
87MathJax CDN. The "local" option uses a local version of MathJax (which is
88copied into the output directory). You can pass an alternate URL or pass
89\code{NULL} to exclude MathJax entirely.}
JJ Allaire2ec40242014-09-15 09:18:39 -040090
JJ Allaire4c178052016-01-30 19:35:39 -050091\item{template}{Pandoc template to use for rendering. Pass "default" to use
92the rmarkdown package default template; pass \code{NULL} to use pandoc's
93built-in template; pass a path to use a custom template that you've
94created. Note that if you don't use the "default" template then some
95features of \code{revealjs_presentation} won't be available (see the
96Templates section below for more details).}
JJ Allaire2ec40242014-09-15 09:18:39 -040097
Christophe Dervieux21239cf2021-09-15 15:34:01 +020098\item{css}{CSS and/or Sass files to include. Files with an extension of .sass
99or .scss are compiled to CSS via \code{sass::sass()}. Also, if \code{theme} is a
100\code{\link[bslib:bs_theme]{bslib::bs_theme()}} object, Sass code may reference the relevant Bootstrap
101Sass variables, functions, mixins, etc.}
JJ Allairefad55232015-10-19 07:47:26 -0400102
JJ Allaire2ec40242014-09-15 09:18:39 -0400103\item{includes}{Named list of additional content to include within the
Atsushi Yasumoto7053f452020-02-15 00:08:46 +0900104document (typically created using the \code{\link[rmarkdown]{includes}} function).}
JJ Allaire2ec40242014-09-15 09:18:39 -0400105
106\item{keep_md}{Keep the markdown file generated by knitting.}
107
108\item{lib_dir}{Directory to copy dependent HTML libraries (e.g. jquery,
JJ Allaire091cb122016-02-09 13:04:23 -0500109bootstrap, etc.) into. By default this will be the name of the document with
110\code{_files} appended to it.}
JJ Allaire2ec40242014-09-15 09:18:39 -0400111
112\item{pandoc_args}{Additional command line options to pass to pandoc}
JJ Allaire8d1c2f42016-01-30 14:56:45 -0500113
JJ Allaire35c0b492017-02-10 09:30:24 -0500114\item{extra_dependencies}{Additional function arguments to pass to the base R
115Markdown HTML output formatter \code{\link[rmarkdown:html_document_base]{rmarkdown::html_document_base()}}.}
JJ Allaire375805c2016-11-15 08:56:43 -0500116
Atsushi Yasumoto7053f452020-02-15 00:08:46 +0900117\item{md_extensions}{Markdown extensions to be added or removed from the
118default definition or R Markdown. See the \code{\link[rmarkdown]{rmarkdown_format}} for
119additional details.}
120
JJ Allaire8d1c2f42016-01-30 14:56:45 -0500121\item{...}{Ignored}
JJ Allaire2ec40242014-09-15 09:18:39 -0400122}
123\value{
124R Markdown output format to pass to \code{\link{render}}
125}
126\description{
127Format for converting from R Markdown to a reveal.js presentation.
128}
129\details{
JJ Allaire4c178052016-01-30 19:35:39 -0500130In reveal.js presentations you can use level 1 or level 2 headers for slides.
131If you use a mix of level 1 and level 2 headers then a two-dimensional layout
132will be produced, with level 1 headers building horizontally and level 2
133headers building vertically.
JJ Allaire2ec40242014-09-15 09:18:39 -0400134
JJ Allaire4c178052016-01-30 19:35:39 -0500135For additional documentation on using revealjs presentations see
136\href{https://github.com/rstudio/revealjs}{https://github.com/rstudio/revealjs}.
JJ Allaire2ec40242014-09-15 09:18:39 -0400137}
JJ Allaire2ec40242014-09-15 09:18:39 -0400138\examples{
139\dontrun{
140
141library(rmarkdown)
142library(revealjs)
143
144# simple invocation
145render("pres.Rmd", revealjs_presentation())
146
147# specify an option for incremental rendering
148render("pres.Rmd", revealjs_presentation(incremental = TRUE))
149}
JJ Allaired708ef02016-01-30 14:30:26 -0500150
JJ Allaire2ec40242014-09-15 09:18:39 -0400151}