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