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