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{ |
Atsushi Yasumoto | 7053f45 | 2020-02-15 00:08:46 +0900 | [diff] [blame] | 7 | revealjs_presentation( |
| 8 | incremental = FALSE, |
| 9 | center = FALSE, |
| 10 | slide_level = 2, |
| 11 | fig_width = 8, |
| 12 | fig_height = 6, |
| 13 | fig_retina = if (!fig_caption) 2, |
| 14 | fig_caption = FALSE, |
| 15 | smart = TRUE, |
| 16 | self_contained = TRUE, |
| 17 | theme = "simple", |
| 18 | transition = "default", |
| 19 | background_transition = "default", |
| 20 | reveal_options = NULL, |
| 21 | reveal_plugins = NULL, |
| 22 | highlight = "default", |
| 23 | mathjax = "default", |
| 24 | template = "default", |
| 25 | css = NULL, |
| 26 | includes = NULL, |
| 27 | keep_md = FALSE, |
| 28 | lib_dir = NULL, |
| 29 | pandoc_args = NULL, |
| 30 | extra_dependencies = NULL, |
| 31 | md_extensions = NULL, |
| 32 | ... |
| 33 | ) |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 34 | } |
| 35 | \arguments{ |
| 36 | \item{incremental}{\code{TRUE} to render slide bullets incrementally. Note |
| 37 | that if you want to reverse the default incremental behavior for an |
JJ Allaire | 2915275 | 2016-03-08 15:06:38 -0500 | [diff] [blame] | 38 | individual bullet you can precede it with \code{>}. For example: |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 39 | \emph{\code{> - Bullet Text}}} |
| 40 | |
| 41 | \item{center}{\code{TRUE} to vertically center content on slides} |
| 42 | |
JJ Allaire | 4c17805 | 2016-01-30 19:35:39 -0500 | [diff] [blame] | 43 | \item{slide_level}{Level of heading to denote individual slides. If |
| 44 | \code{slide_level} is 2 (the default), a two-dimensional layout will be |
| 45 | produced, with level 1 headers building horizontally and level 2 headers |
| 46 | building vertically. It is not recommended that you use deeper nesting of |
| 47 | section levels with reveal.js.} |
| 48 | |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 49 | \item{fig_width}{Default width (in inches) for figures} |
| 50 | |
Atsushi Yasumoto | 7053f45 | 2020-02-15 00:08:46 +0900 | [diff] [blame] | 51 | \item{fig_height}{Default height (in inches) for figures} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 52 | |
JJ Allaire | 82a8dee | 2016-07-12 10:25:36 -0400 | [diff] [blame] | 53 | \item{fig_retina}{Scaling to perform for retina displays (defaults to 2, which |
| 54 | currently works for all widely used retina displays). Set to \code{NULL} to |
| 55 | prevent retina scaling. Note that this will always be \code{NULL} when |
| 56 | \code{keep_md} is specified (this is because \code{fig_retina} relies on |
| 57 | outputting HTML directly into the markdown document).} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 58 | |
| 59 | \item{fig_caption}{\code{TRUE} to render figures with captions} |
| 60 | |
Christophe Dervieux | 21239cf | 2021-09-15 15:34:01 +0200 | [diff] [blame^] | 61 | \item{smart}{Produce typographically correct output, converting straight |
| 62 | quotes to curly quotes, \code{---} to em-dashes, \code{--} to en-dashes, and |
| 63 | \code{...} to ellipses.} |
| 64 | |
Atsushi Yasumoto | 7053f45 | 2020-02-15 00:08:46 +0900 | [diff] [blame] | 65 | \item{self_contained}{Whether to generate a full LaTeX document (\code{TRUE}) |
| 66 | or just the body of a LaTeX document (\code{FALSE}). Note the LaTeX |
| 67 | document is an intermediate file unless \code{keep_tex = TRUE}.} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 68 | |
JJ Allaire | 4c17805 | 2016-01-30 19:35:39 -0500 | [diff] [blame] | 69 | \item{theme}{Visual theme ("simple", "sky", "beige", "serif", "solarized", |
| 70 | "blood", "moon", "night", "black", "league" or "white").} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 71 | |
JJ Allaire | 35c0b49 | 2017-02-10 09:30:24 -0500 | [diff] [blame] | 72 | \item{transition}{Slide transition ("default", "none", "fade", "slide", |
junkka | d4b3a16 | 2015-03-16 07:49:11 +0100 | [diff] [blame] | 73 | "convex", "concave" or "zoom")} |
| 74 | |
JJ Allaire | 4c17805 | 2016-01-30 19:35:39 -0500 | [diff] [blame] | 75 | \item{background_transition}{Slide background-transition ("default", "none", |
| 76 | "fade", "slide", "convex", "concave" or "zoom")} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 77 | |
JJ Allaire | 35c0b49 | 2017-02-10 09:30:24 -0500 | [diff] [blame] | 78 | \item{reveal_options}{Additional options to specify for reveal.js (see |
Atsushi Yasumoto | 9a7e65a | 2020-08-10 21:56:31 +0900 | [diff] [blame] | 79 | \href{https://revealjs.com/config/}{https://revealjs.com/config/} |
JJ Allaire | 4c17805 | 2016-01-30 19:35:39 -0500 | [diff] [blame] | 80 | for details).} |
JJ Allaire | 37f45b7 | 2016-01-30 18:17:45 -0500 | [diff] [blame] | 81 | |
JJ Allaire | 35c0b49 | 2017-02-10 09:30:24 -0500 | [diff] [blame] | 82 | \item{reveal_plugins}{Reveal plugins to include. Available plugins include |
Atsushi Yasumoto | 7053f45 | 2020-02-15 00:08:46 +0900 | [diff] [blame] | 83 | "notes", "search", "zoom", "chalkboard", and "menu". Note that |
JJ Allaire | 35c0b49 | 2017-02-10 09:30:24 -0500 | [diff] [blame] | 84 | \code{self_contained} must be set to \code{FALSE} in order to use Reveal |
| 85 | plugins.} |
JJ Allaire | 82a8dee | 2016-07-12 10:25:36 -0400 | [diff] [blame] | 86 | |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 87 | \item{highlight}{Syntax highlighting style. Supported styles include |
| 88 | "default", "tango", "pygments", "kate", "monochrome", "espresso", |
| 89 | "zenburn", and "haddock". Pass \code{NULL} to prevent syntax highlighting.} |
| 90 | |
Atsushi Yasumoto | 7053f45 | 2020-02-15 00:08:46 +0900 | [diff] [blame] | 91 | \item{mathjax}{Include mathjax. The "default" option uses an https URL from a |
| 92 | MathJax CDN. The "local" option uses a local version of MathJax (which is |
| 93 | copied into the output directory). You can pass an alternate URL or pass |
| 94 | \code{NULL} to exclude MathJax entirely.} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 95 | |
JJ Allaire | 4c17805 | 2016-01-30 19:35:39 -0500 | [diff] [blame] | 96 | \item{template}{Pandoc template to use for rendering. Pass "default" to use |
| 97 | the rmarkdown package default template; pass \code{NULL} to use pandoc's |
| 98 | built-in template; pass a path to use a custom template that you've |
| 99 | created. Note that if you don't use the "default" template then some |
| 100 | features of \code{revealjs_presentation} won't be available (see the |
| 101 | Templates section below for more details).} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 102 | |
Christophe Dervieux | 21239cf | 2021-09-15 15:34:01 +0200 | [diff] [blame^] | 103 | \item{css}{CSS and/or Sass files to include. Files with an extension of .sass |
| 104 | or .scss are compiled to CSS via \code{sass::sass()}. Also, if \code{theme} is a |
| 105 | \code{\link[bslib:bs_theme]{bslib::bs_theme()}} object, Sass code may reference the relevant Bootstrap |
| 106 | Sass variables, functions, mixins, etc.} |
JJ Allaire | fad5523 | 2015-10-19 07:47:26 -0400 | [diff] [blame] | 107 | |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 108 | \item{includes}{Named list of additional content to include within the |
Atsushi Yasumoto | 7053f45 | 2020-02-15 00:08:46 +0900 | [diff] [blame] | 109 | document (typically created using the \code{\link[rmarkdown]{includes}} function).} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 110 | |
| 111 | \item{keep_md}{Keep the markdown file generated by knitting.} |
| 112 | |
| 113 | \item{lib_dir}{Directory to copy dependent HTML libraries (e.g. jquery, |
JJ Allaire | 091cb12 | 2016-02-09 13:04:23 -0500 | [diff] [blame] | 114 | bootstrap, etc.) into. By default this will be the name of the document with |
| 115 | \code{_files} appended to it.} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 116 | |
| 117 | \item{pandoc_args}{Additional command line options to pass to pandoc} |
JJ Allaire | 8d1c2f4 | 2016-01-30 14:56:45 -0500 | [diff] [blame] | 118 | |
JJ Allaire | 35c0b49 | 2017-02-10 09:30:24 -0500 | [diff] [blame] | 119 | \item{extra_dependencies}{Additional function arguments to pass to the base R |
| 120 | Markdown HTML output formatter \code{\link[rmarkdown:html_document_base]{rmarkdown::html_document_base()}}.} |
JJ Allaire | 375805c | 2016-11-15 08:56:43 -0500 | [diff] [blame] | 121 | |
Atsushi Yasumoto | 7053f45 | 2020-02-15 00:08:46 +0900 | [diff] [blame] | 122 | \item{md_extensions}{Markdown extensions to be added or removed from the |
| 123 | default definition or R Markdown. See the \code{\link[rmarkdown]{rmarkdown_format}} for |
| 124 | additional details.} |
| 125 | |
JJ Allaire | 8d1c2f4 | 2016-01-30 14:56:45 -0500 | [diff] [blame] | 126 | \item{...}{Ignored} |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 127 | } |
| 128 | \value{ |
| 129 | R Markdown output format to pass to \code{\link{render}} |
| 130 | } |
| 131 | \description{ |
| 132 | Format for converting from R Markdown to a reveal.js presentation. |
| 133 | } |
| 134 | \details{ |
JJ Allaire | 4c17805 | 2016-01-30 19:35:39 -0500 | [diff] [blame] | 135 | In reveal.js presentations you can use level 1 or level 2 headers for slides. |
| 136 | If you use a mix of level 1 and level 2 headers then a two-dimensional layout |
| 137 | will be produced, with level 1 headers building horizontally and level 2 |
| 138 | headers building vertically. |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 139 | |
JJ Allaire | 4c17805 | 2016-01-30 19:35:39 -0500 | [diff] [blame] | 140 | For additional documentation on using revealjs presentations see |
| 141 | \href{https://github.com/rstudio/revealjs}{https://github.com/rstudio/revealjs}. |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 142 | } |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 143 | \examples{ |
| 144 | \dontrun{ |
| 145 | |
| 146 | library(rmarkdown) |
| 147 | library(revealjs) |
| 148 | |
| 149 | # simple invocation |
| 150 | render("pres.Rmd", revealjs_presentation()) |
| 151 | |
| 152 | # specify an option for incremental rendering |
| 153 | render("pres.Rmd", revealjs_presentation(incremental = TRUE)) |
| 154 | } |
JJ Allaire | d708ef0 | 2016-01-30 14:30:26 -0500 | [diff] [blame] | 155 | |
| 156 | |
JJ Allaire | 2ec4024 | 2014-09-15 09:18:39 -0400 | [diff] [blame] | 157 | } |