blob: b97422e488eaa7cae31f495a01e3d06fe3b812d1 [file] [log] [blame]
JJ Allaire2ec40242014-09-15 09:18:39 -04001% Generated by roxygen2 (4.0.2): do not edit by hand
2\name{revealjs_presentation}
3\alias{revealjs_presentation}
4\title{Convert to a reveal.js presentation}
5\usage{
6revealjs_presentation(incremental = FALSE, center = FALSE, fig_width = 8,
7 fig_height = 6, fig_retina = if (!fig_caption) 2, fig_caption = FALSE,
8 smart = TRUE, self_contained = TRUE, theme = "default",
9 transition = "default", highlight = "default", mathjax = "default",
10 template = "default", includes = NULL, keep_md = FALSE,
11 lib_dir = NULL, pandoc_args = NULL, ...)
12}
13\arguments{
14\item{incremental}{\code{TRUE} to render slide bullets incrementally. Note
15that if you want to reverse the default incremental behavior for an
16individual bullet you can preceded it with \code{>}. For example:
17\emph{\code{> - Bullet Text}}}
18
19\item{center}{\code{TRUE} to vertically center content on slides}
20
21\item{fig_width}{Default width (in inches) for figures}
22
23\item{fig_height}{Default width (in inches) for figures}
24
25\item{fig_retina}{Scaling to perform for retina displays (defaults to 2 when
26\code{fig_caption} is \code{FALSE}, which currently works for all widely
27used retina displays). Set to \code{NULL} to prevent retina scaling. Note
28that this will always be \code{NULL} when \code{keep_md} is specified (this
29is because \code{fig_retina} relies on outputting HTML directly into the
30markdown document).}
31
32\item{fig_caption}{\code{TRUE} to render figures with captions}
33
34\item{smart}{Produce typographically correct output, converting straight
35quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to
36ellipses.}
37
38\item{self_contained}{Produce a standalone HTML file with no external
39dependencies, using data: URIs to incorporate the contents of linked
40scripts, stylesheets, images, and videos. Note that even for self
41contained documents MathJax is still loaded externally (this is
42necessary because of it's size).}
43
44\item{theme}{Visual theme ("default", "simple", sky", "beige", "serif", or
45"solarized").}
46
47\item{transition}{Slide transition ("default", "cube", "page", "concave",
48"zoom", "linear", "fade", or "none")}
49
50\item{highlight}{Syntax highlighting style. Supported styles include
51"default", "tango", "pygments", "kate", "monochrome", "espresso",
52"zenburn", and "haddock". Pass \code{NULL} to prevent syntax highlighting.}
53
54\item{mathjax}{Include mathjax. The "default" option uses an https URL from
55the official MathJax CDN. The "local" option uses a local version of
56MathJax (which is copied into the output directory). You can pass an
57alternate URL or pass \code{NULL} to exclude MathJax entirely.}
58
59\item{template}{Pandoc template to use for rendering. Pass "default"
60 to use the rmarkdown package default template; pass \code{NULL}
61 to use pandoc's built-in template; pass a path to use a custom template
62 that you've created. Note that if you don't use the "default" template
63 then some features of \code{revealjs_presentation} won't be available
64 (see the Templates section below for more details).}
65
66\item{includes}{Named list of additional content to include within the
67document (typically created using the \code{\link{includes}} function).}
68
69\item{keep_md}{Keep the markdown file generated by knitting.}
70
71\item{lib_dir}{Directory to copy dependent HTML libraries (e.g. jquery,
72bootstrap, etc.) into. By default this will be the name of the document
73with \code{_files} appended to it.}
74
75\item{pandoc_args}{Additional command line options to pass to pandoc}
76
77\item{...}{Additional function arguments to pass to the base R Markdown HTML
78 output formatter}
79}
80\value{
81R Markdown output format to pass to \code{\link{render}}
82}
83\description{
84Format for converting from R Markdown to a reveal.js presentation.
85}
86\details{
87In reveal.js presentations you can use level 1 or level 2 headers for
88slides. If you use a mix of level 1 and level 2 headers then a
89two-dimensional layout will be produced, with level 1 headers building
90horizontally and level 2 headers building vertically.
91
92For more information on markdown syntax for presentations see
93\href{http://johnmacfarlane.net/pandoc/demo/example9/producing-slide-shows-with-pandoc.html}{producing
94slide shows with pandoc}.
95}
96\section{Templates}{
97
98
99You can provide a custom HTML template to be used for rendering. The syntax
100for templates is described in the documentation on
101\href{http://johnmacfarlane.net/pandoc/demo/example9/templates.html}{pandoc
102templates}. You can also use the basic pandoc template by passing
103\code{template = NULL}.
104
105Note however that if you choose not to use the "default" reveal.js template
106then several aspects of reveal.js presentation rendering will behave
107differently:
108
109\itemize{
110 \item{The \code{center} parameter does not work (you'd need to
111 set this directly in the template).
112 }
113 \item{The built-in template includes some additional tweaks to styles
114 to optimize for output from R, these won't be present.
115 }
116 \item{MathJax will not work if \code{self_contained} is \code{TRUE}
117 (these two options can't be used together in normal pandoc templates).
118 }
119}
120}
121\examples{
122\dontrun{
123
124library(rmarkdown)
125library(revealjs)
126
127# simple invocation
128render("pres.Rmd", revealjs_presentation())
129
130# specify an option for incremental rendering
131render("pres.Rmd", revealjs_presentation(incremental = TRUE))
132}
133}
134