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