blob: 02f569c3be6243c578a206b9d43885062836e985 [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{
JJ Allaire4c178052016-01-30 19:35:39 -05007revealjs_presentation(incremental = FALSE, center = FALSE,
8 slide_level = 2, fig_width = 8, fig_height = 6, fig_retina = if
9 (!fig_caption) 2, fig_caption = FALSE, smart = TRUE,
10 self_contained = TRUE, theme = "simple", transition = "default",
JJ Allaire82a8dee2016-07-12 10:25:36 -040011 background_transition = "default", reveal_options = NULL,
12 reveal_plugins = NULL, highlight = "default", mathjax = "default",
JJ Allaire8bfd3642016-03-21 13:43:13 -040013 template = "default", css = NULL, includes = NULL, keep_md = FALSE,
JJ Allaire375805c2016-11-15 08:56:43 -050014 lib_dir = NULL, pandoc_args = NULL, extra_dependencies = NULL, ...)
JJ Allaire2ec40242014-09-15 09:18:39 -040015}
16\arguments{
17\item{incremental}{\code{TRUE} to render slide bullets incrementally. Note
18that if you want to reverse the default incremental behavior for an
JJ Allaire29152752016-03-08 15:06:38 -050019individual bullet you can precede it with \code{>}. For example:
JJ Allaire2ec40242014-09-15 09:18:39 -040020\emph{\code{> - Bullet Text}}}
21
22\item{center}{\code{TRUE} to vertically center content on slides}
23
JJ Allaire4c178052016-01-30 19:35:39 -050024\item{slide_level}{Level of heading to denote individual slides. If
25\code{slide_level} is 2 (the default), a two-dimensional layout will be
26produced, with level 1 headers building horizontally and level 2 headers
27building vertically. It is not recommended that you use deeper nesting of
28section levels with reveal.js.}
29
JJ Allaire2ec40242014-09-15 09:18:39 -040030\item{fig_width}{Default width (in inches) for figures}
31
32\item{fig_height}{Default width (in inches) for figures}
33
JJ Allaire82a8dee2016-07-12 10:25:36 -040034\item{fig_retina}{Scaling to perform for retina displays (defaults to 2, which
35currently works for all widely used retina displays). Set to \code{NULL} to
36prevent retina scaling. Note that this will always be \code{NULL} when
37\code{keep_md} is specified (this is because \code{fig_retina} relies on
38outputting HTML directly into the markdown document).}
JJ Allaire2ec40242014-09-15 09:18:39 -040039
40\item{fig_caption}{\code{TRUE} to render figures with captions}
41
42\item{smart}{Produce typographically correct output, converting straight
43quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to
44ellipses.}
45
46\item{self_contained}{Produce a standalone HTML file with no external
47dependencies, using data: URIs to incorporate the contents of linked
JJ Allaired708ef02016-01-30 14:30:26 -050048scripts, stylesheets, images, and videos. Note that even for self contained
49documents MathJax is still loaded externally (this is necessary because of
50it's size).}
JJ Allaire2ec40242014-09-15 09:18:39 -040051
JJ Allaire4c178052016-01-30 19:35:39 -050052\item{theme}{Visual theme ("simple", "sky", "beige", "serif", "solarized",
53"blood", "moon", "night", "black", "league" or "white").}
JJ Allaire2ec40242014-09-15 09:18:39 -040054
JJ Allaire35c0b492017-02-10 09:30:24 -050055\item{transition}{Slide transition ("default", "none", "fade", "slide",
junkkad4b3a162015-03-16 07:49:11 +010056"convex", "concave" or "zoom")}
57
JJ Allaire4c178052016-01-30 19:35:39 -050058\item{background_transition}{Slide background-transition ("default", "none",
59"fade", "slide", "convex", "concave" or "zoom")}
JJ Allaire2ec40242014-09-15 09:18:39 -040060
JJ Allaire35c0b492017-02-10 09:30:24 -050061\item{reveal_options}{Additional options to specify for reveal.js (see
JJ Allaire4c178052016-01-30 19:35:39 -050062\href{https://github.com/hakimel/reveal.js#configuration}{https://github.com/hakimel/reveal.js#configuration}
63for details).}
JJ Allaire37f45b72016-01-30 18:17:45 -050064
JJ Allaire35c0b492017-02-10 09:30:24 -050065\item{reveal_plugins}{Reveal plugins to include. Available plugins include
66"notes", "search", "zoom", and "chalkboard". Note that
67\code{self_contained} must be set to \code{FALSE} in order to use Reveal
68plugins.}
JJ Allaire82a8dee2016-07-12 10:25:36 -040069
JJ Allaire2ec40242014-09-15 09:18:39 -040070\item{highlight}{Syntax highlighting style. Supported styles include
71"default", "tango", "pygments", "kate", "monochrome", "espresso",
72"zenburn", and "haddock". Pass \code{NULL} to prevent syntax highlighting.}
73
74\item{mathjax}{Include mathjax. The "default" option uses an https URL from
JJ Allaire091cb122016-02-09 13:04:23 -050075the official MathJax CDN. The "local" option uses a local version of MathJax
76(which is copied into the output directory). You can pass an alternate URL
77or pass \code{NULL} to exclude MathJax entirely.}
JJ Allaire2ec40242014-09-15 09:18:39 -040078
JJ Allaire4c178052016-01-30 19:35:39 -050079\item{template}{Pandoc template to use for rendering. Pass "default" to use
80the rmarkdown package default template; pass \code{NULL} to use pandoc's
81built-in template; pass a path to use a custom template that you've
82created. Note that if you don't use the "default" template then some
83features of \code{revealjs_presentation} won't be available (see the
84Templates section below for more details).}
JJ Allaire2ec40242014-09-15 09:18:39 -040085
JJ Allairefad55232015-10-19 07:47:26 -040086\item{css}{One or more css files to include}
87
JJ Allaire2ec40242014-09-15 09:18:39 -040088\item{includes}{Named list of additional content to include within the
89document (typically created using the \code{\link{includes}} function).}
90
91\item{keep_md}{Keep the markdown file generated by knitting.}
92
93\item{lib_dir}{Directory to copy dependent HTML libraries (e.g. jquery,
JJ Allaire091cb122016-02-09 13:04:23 -050094bootstrap, etc.) into. By default this will be the name of the document with
95\code{_files} appended to it.}
JJ Allaire2ec40242014-09-15 09:18:39 -040096
97\item{pandoc_args}{Additional command line options to pass to pandoc}
JJ Allaire8d1c2f42016-01-30 14:56:45 -050098
JJ Allaire35c0b492017-02-10 09:30:24 -050099\item{extra_dependencies}{Additional function arguments to pass to the base R
100Markdown HTML output formatter \code{\link[rmarkdown:html_document_base]{rmarkdown::html_document_base()}}.}
JJ Allaire375805c2016-11-15 08:56:43 -0500101
JJ Allaire8d1c2f42016-01-30 14:56:45 -0500102\item{...}{Ignored}
JJ Allaire2ec40242014-09-15 09:18:39 -0400103}
104\value{
105R Markdown output format to pass to \code{\link{render}}
106}
107\description{
108Format for converting from R Markdown to a reveal.js presentation.
109}
110\details{
JJ Allaire4c178052016-01-30 19:35:39 -0500111In reveal.js presentations you can use level 1 or level 2 headers for slides.
112If you use a mix of level 1 and level 2 headers then a two-dimensional layout
113will be produced, with level 1 headers building horizontally and level 2
114headers building vertically.
JJ Allaire2ec40242014-09-15 09:18:39 -0400115
JJ Allaire4c178052016-01-30 19:35:39 -0500116For additional documentation on using revealjs presentations see
117\href{https://github.com/rstudio/revealjs}{https://github.com/rstudio/revealjs}.
JJ Allaire2ec40242014-09-15 09:18:39 -0400118}
JJ Allaire2ec40242014-09-15 09:18:39 -0400119\examples{
120\dontrun{
121
122library(rmarkdown)
123library(revealjs)
124
125# simple invocation
126render("pres.Rmd", revealjs_presentation())
127
128# specify an option for incremental rendering
129render("pres.Rmd", revealjs_presentation(incremental = TRUE))
130}
JJ Allaired708ef02016-01-30 14:30:26 -0500131
132
JJ Allaire2ec40242014-09-15 09:18:39 -0400133}