| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 1 | --- |
| Marc Kupietz | fbf254d | 2023-10-09 15:10:42 +0200 | [diff] [blame] | 2 | title: "R Markdown Format for reveal.js Presentations – Extended by an IDS Mannheim CD Theme" |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 3 | output: github_document |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 4 | --- |
| 5 | |
| christophe dervieux | 42886a1 | 2021-09-16 11:36:01 +0200 | [diff] [blame] | 6 | <!-- badges: start --> |
| 7 | [](https://CRAN.R-project.org/package=revealjs) |
| Christophe Dervieux | 7d613ee | 2023-03-24 17:35:02 +0100 | [diff] [blame] | 8 | [](https://github.com/rstudio/revealjs/actions/workflows/R-CMD-check.yaml) |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 9 | [`-yellow)](https://github.com/rstudio/revealjs/tree/main/inst/reveal.js-`r revealjs.ids:::revealjs_version()`) |
| christophe dervieux | 42886a1 | 2021-09-16 11:36:01 +0200 | [diff] [blame] | 10 | <!-- badges: end --> |
| 11 | |
| Marc Kupietz | fbf254d | 2023-10-09 15:10:42 +0200 | [diff] [blame] | 12 | ## Screenshots |
| 13 | |
| Marc Kupietz | 24a129b | 2023-10-10 14:04:32 +0200 | [diff] [blame] | 14 | Generated from [examples/ids.Rmd](./examples/ids.Rmd), see live demo [here](http://10.0.1.45/slides/2023-10-08-Revealjs-demo/ids.html). |
| Marc Kupietz | 2aa8063 | 2023-10-09 23:19:46 +0200 | [diff] [blame] | 15 | |
| Marc Kupietz | fbf254d | 2023-10-09 15:10:42 +0200 | [diff] [blame] | 16 |  |
| 17 | |
| 18 |  |
| Marc Kupietz | 4cd43b1 | 2026-08-28 14:41:51 +0300 | [diff] [blame] | 19 |  |
| Marc Kupietz | fbf254d | 2023-10-09 15:10:42 +0200 | [diff] [blame] | 20 | |
| 21 |  |
| 22 | |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 23 | ## Overview |
| 24 | |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 25 | This repository provides an [R Markdown](http://rmarkdown.rstudio.com) custom format for [reveal.js](https://revealjs.com/) HTML presentations. The packages includes _reveal.js_ library in version `r revealjs.ids:::revealjs_version()` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 26 | |
| 27 | You can use this format in R Markdown documents by installing this package as follows: |
| 28 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 29 | ``` r |
| Marc Kupietz | e45ed91 | 2026-05-04 19:45:29 +0200 | [diff] [blame] | 30 | remotes::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/revealjs") |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 31 | ``` |
| 32 | |
| Marc Kupietz | 569b902 | 2026-08-28 07:29:16 +0300 | [diff] [blame] | 33 | > **Package renamed — migration note:** This package, the IDS corporate design fork of [rstudio/revealjs](https://github.com/rstudio/revealjs), was called `revealjs` before version 0.9.1.9009 and was renamed to `revealjs.ids` so that it can be installed alongside the upstream package. To migrate existing documents, replace `revealjs::revealjs_presentation` with `revealjs.ids::revealjs_presentation` in the YAML header. (Alternatively, install upstream `revealjs` and keep the old header for documents that should use the upstream format.) |
| 34 | |
| Atsushi Yasumoto | e734cd8 | 2020-08-10 21:48:18 +0900 | [diff] [blame] | 35 | To create a [reveal.js](https://revealjs.com/) presentation from R Markdown you specify the `revealjs_presentation` output format in the front-matter of your document. You can create a slide show broken up into sections by using the `#` and `##` heading tags (you can also create a new slide without a header using a horizontal rule (`----`). For example here's a simple slide show: |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 36 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 37 | ``` markdown |
| 38 | --- |
| 39 | title: "Habits" |
| 40 | author: John Doe |
| 41 | date: March 22, 2005 |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 42 | output: revealjs.ids::revealjs_presentation |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 43 | --- |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 44 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 45 | # In the morning |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 46 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 47 | ## Getting up |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 48 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 49 | - Turn off alarm |
| 50 | - Get out of bed |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 51 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 52 | ## Breakfast |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 53 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 54 | - Eat eggs |
| 55 | - Drink coffee |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 56 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 57 | # In the evening |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 58 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 59 | ## Dinner |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 60 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 61 | - Eat spaghetti |
| 62 | - Drink wine |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 63 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 64 | ## Going to sleep |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 65 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 66 | - Get in bed |
| 67 | - Count sheep |
| 68 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 69 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 70 | ## Rendering |
| Daniel Chen | 46087c3 | 2016-03-21 17:58:14 -0400 | [diff] [blame] | 71 | |
| Daniel Chen | 81a1434 | 2016-03-21 18:00:56 -0400 | [diff] [blame] | 72 | Depending on your use case, there are 3 ways you can render the presentation. |
| Daniel Chen | 46087c3 | 2016-03-21 17:58:14 -0400 | [diff] [blame] | 73 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 74 | 1. RStudio |
| 75 | 2. R console |
| 76 | 3. Terminal (e.g., bash) |
| Daniel Chen | 46087c3 | 2016-03-21 17:58:14 -0400 | [diff] [blame] | 77 | |
| 78 | ### RStudio |
| 79 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 80 | When creating the presentation in RStudio, there will be a `Knit` button right below the source tabs. By default, it will render the current document and place the rendered `HTML` file in the same directory as the source file, with the same name. |
| Daniel Chen | 46087c3 | 2016-03-21 17:58:14 -0400 | [diff] [blame] | 81 | |
| 82 | ### R Console |
| 83 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 84 | The `Knit` button is actually calling the `rmarkdown::render()` function. So, to render the document within the R console: |
| Daniel Chen | 46087c3 | 2016-03-21 17:58:14 -0400 | [diff] [blame] | 85 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 86 | ``` r |
| Daniel Chen | 46087c3 | 2016-03-21 17:58:14 -0400 | [diff] [blame] | 87 | rmarkdown::render('my_reveal_presentation.Rmd') |
| 88 | ``` |
| 89 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 90 | There are many other output tweaks you can use by directly calling `render`. You can read up on the [documentation](https://pkgs.rstudio.com/rmarkdown/reference/render.html) for more details. |
| Daniel Chen | 46087c3 | 2016-03-21 17:58:14 -0400 | [diff] [blame] | 91 | |
| 92 | ### Command Line |
| 93 | |
| 94 | When you need the presentation to be rendered from the command line: |
| 95 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 96 | ``` bash |
| Daniel Chen | 46087c3 | 2016-03-21 17:58:14 -0400 | [diff] [blame] | 97 | Rscript -e "rmarkdown::render('my_reveal_presentation.Rmd')" |
| 98 | ``` |
| 99 | |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 100 | ## Display Modes |
| 101 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 102 | The following single character keyboard shortcuts enable alternate display modes: |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 103 | |
| 104 | - `'f'` enable fullscreen mode |
| 105 | |
| 106 | - `'o'` enable overview mode |
| 107 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 108 | - `'b'` enable pause mode with a black screen hiding slide content |
| 109 | |
| 110 | - `'?'` enable help mode to show keyboard shortcut cheatsheet |
| 111 | |
| 112 | - `'s'` enable presentation mode with speaker notes when the Notes plugin is activated |
| 113 | |
| Marc Kupietz | 010db0b | 2026-08-26 09:56:45 +0300 | [diff] [blame] | 114 | On mobile browsers (touch devices), a speech-bubble button next to the fullscreen button overlays the current slide with its speaker notes -- useful for practicing a talk on a phone or tablet, where the separate speaker view window of the `'s'` shortcut is awkward. The overlay shows the slide title, its planned time (if annotated with a timing comment), and the notes, and follows along as you change slides. It appears only if the deck contains notes at all. Next to it, a list button opens the transcript view (same as pressing `r`), so the whole talk including notes can be read (aloud) on mobile devices, too. |
| Marc Kupietz | 8879918 | 2026-08-24 09:22:33 +0300 | [diff] [blame] | 115 | |
| Marc Kupietz | eaaa2b4 | 2026-08-26 09:41:27 +0300 | [diff] [blame] | 116 | - `'r'` toggle the transcript view: a single scrollable page containing every slide's content and speaker notes, so text-to-speech ("read aloud") browser extensions can read the whole presentation -- they cannot walk a reveal.js deck themselves, since hidden slides are not part of the visible page text |
| 117 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 118 | - `'m'` enable menu mode when the 'menu' plugin is activated |
| 119 | |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 120 | Pressing `Esc` exits all of these modes. |
| 121 | |
| Marc Kupietz | b066e74 | 2026-08-23 09:57:06 +0300 | [diff] [blame] | 122 | ## Slide Timing |
| 123 | |
| 124 | You can plan the time budget of a talk by adding timing comments to your slides: a comment with an optional speaker code and the expected duration (`MM:SS`, `HH:MM:SS`, or plain seconds), ported from the old Google-Docs-based slide workflow: |
| 125 | |
| 126 | ``` markdown |
| 127 | ## My slide title |
| 128 | |
| 129 | Some content |
| 130 | |
| 131 | <!-- JD 00:30 --> |
| 132 | ``` |
| 133 | |
| Marc Kupietz | 6b65c03 | 2026-08-25 09:43:28 +0300 | [diff] [blame] | 134 | This means John Doe will need 30 seconds for that slide. For talks presented by a single speaker, the speaker code can be omitted: Comments placed before the first heading are applied to the title slide, so you can give the title itself a time budget and a welcome note: |
| Marc Kupietz | b066e74 | 2026-08-23 09:57:06 +0300 | [diff] [blame] | 135 | |
| 136 | ``` markdown |
| 137 | ## My slide title |
| 138 | |
| 139 | Some content |
| 140 | |
| 141 | <!-- 00:30 --> |
| 142 | ``` |
| 143 | |
| 144 | Typically you start from a known total time budget and adjust the individual slides to it. You can set this budget yourself with the `totalTime` option (in seconds): |
| 145 | |
| 146 | ``` yaml |
| 147 | output: |
| 148 | revealjs.ids::revealjs_presentation: |
| 149 | reveal_options: |
| 150 | totalTime: 3600 # one hour |
| 151 | ``` |
| 152 | |
| 153 | When rendering, the comments are converted into [`data-timing` attributes](https://revealjs.com/speaker-view/) on the slides, and the calculated grand total is passed to reveal.js as the `totalTime` config value (unless you set `totalTime` yourself). This activates the pacing timer in the [speaker view](https://revealjs.com/speaker-view/) (press `s`), showing how you are doing relative to your plan. Several speakers per slide are supported, and a summary with the total time per speaker is printed: |
| 154 | |
| 155 | ``` |
| 156 | Slide timing -- JD: 0:30, AB: 1:00 -- total 1:30 |
| 157 | ``` |
| 158 | |
| 159 | To compute the time budget without rendering the presentation, you can call `slide_timing()` directly on the `.Rmd` source file. |
| 160 | |
| Marc Kupietz | 4fc867c | 2026-08-25 10:30:18 +0300 | [diff] [blame] | 161 | ## Overview Slides |
| 162 | |
| Marc Kupietz | 24057e5 | 2026-08-25 10:51:06 +0300 | [diff] [blame] | 163 | Like in the old Google-Docs-based slide workflow, a slide titled "Overview" or "Überblick" is automatically turned into a table of contents: its body content is replaced with a list of all `#` chapter headings, and each entry links to the corresponding slide. |
| Marc Kupietz | 4fc867c | 2026-08-25 10:30:18 +0300 | [diff] [blame] | 164 | |
| 165 | ``` markdown |
| 166 | ## Overview |
| 167 | |
| 168 | (any placeholder content -- replaced automatically) |
| 169 | ``` |
| 170 | |
| Marc Kupietz | 4eb0320 | 2026-08-25 10:58:10 +0300 | [diff] [blame] | 171 | To also include the `##` sub-headings below their chapters, add `{data-overview-subheadings=true}` to the heading; the list is then laid out in two columns. References and appendix chapters (References/Literatur/Literaturverzeichnis/Appendix/Anhang) are left out, together with their sub-slides. |
| Marc Kupietz | 24057e5 | 2026-08-25 10:51:06 +0300 | [diff] [blame] | 172 | |
| 173 | ``` markdown |
| 174 | ## Overview {data-overview-subheadings=true} |
| 175 | ``` |
| 176 | |
| Marc Kupietz | 4fc867c | 2026-08-25 10:30:18 +0300 | [diff] [blame] | 177 | The TOC is generated when the presentation is opened, so it always reflects the deck it is part of. Slides without a heading and the title slide are left out. |
| 178 | |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 179 | ## Incremental Bullets |
| 180 | |
| 181 | You can render bullets incrementally by adding the `incremental` option: |
| 182 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 183 | ``` yaml |
| 184 | --- |
| 185 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 186 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 187 | incremental: true |
| 188 | --- |
| 189 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 190 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 191 | If you want to render bullets incrementally for some slides but not others you can use this syntax: |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 192 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 193 | ``` markdown |
| 194 | ::: incremental |
| 195 | |
| 196 | - Eat spaghetti |
| 197 | - Drink wine |
| 198 | |
| 199 | ::: |
| 200 | ``` |
| 201 | |
| 202 | or |
| 203 | |
| 204 | ``` markdown |
| 205 | ::: nonincremental |
| 206 | |
| 207 | - Eat spaghetti |
| 208 | - Drink wine |
| 209 | |
| 210 | ::: |
| 211 | ``` |
| 212 | |
| 213 | ## Incremental Revealing |
| 214 | |
| 215 | You can also add pauses between content on a slide using `. . .` |
| 216 | |
| 217 | ``` markdown |
| 218 | # Slide header |
| 219 | |
| 220 | Content shown first |
| 221 | |
| 222 | . . . |
| 223 | |
| 224 | Content shown next on the same slide |
| 225 | ``` |
| 226 | |
| 227 | Using Fragments explicitly is also possible |
| 228 | |
| 229 | ``` markdown |
| 230 | # Slide header |
| 231 | |
| 232 | Content shown first |
| 233 | |
| 234 | ::: fragment |
| 235 | Content shown next on the same slide |
| 236 | ::: |
| 237 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 238 | |
| 239 | ## Appearance and Style |
| 240 | |
| 241 | There are several options that control the appearance of revealjs presentations: |
| 242 | |
| Marc Kupietz | 9fdf0f7 | 2026-08-28 07:04:25 +0300 | [diff] [blame] | 243 | - `theme` specifies the visual theme for the presentation. The dedicated IDS corporate design theme (`"ids"`) is the default and the only supported theme. |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 244 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 245 | - `highlight` specifies the syntax highlighting style. Supported styles include `r knitr::combine_words(rmarkdown:::highlighters(), before = '"', and = " or ")`. Pass null to prevent syntax highlighting. |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 246 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 247 | - `center` specifies whether you want to vertically center content on slides (this defaults to false). |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 248 | |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 249 | For example: |
| 250 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 251 | ``` yaml |
| 252 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 253 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 254 | highlight: pygments |
| 255 | center: true |
| 256 | ``` |
| 257 | |
| JJ Allaire | 41921d3 | 2016-01-30 19:11:43 -0500 | [diff] [blame] | 258 | ## Slide Transitions |
| 259 | |
| Jon Calder | a35857d | 2017-04-11 16:38:58 +0200 | [diff] [blame] | 260 | You can use the `transition` and `background_transition` options to specify the global default slide transition style: |
| JJ Allaire | 41921d3 | 2016-01-30 19:11:43 -0500 | [diff] [blame] | 261 | |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 262 | - `transition` specifies the visual effect when moving between slides. Available transitions are `r (trans <- knitr::combine_words(setdiff(revealjs.ids:::revealjs_transitions(), "default"), before = '"', and = " or "))`. |
| JJ Allaire | 41921d3 | 2016-01-30 19:11:43 -0500 | [diff] [blame] | 263 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 264 | - `background_transition` specifies the background transition effect when moving between full page slides. Available transitions are `r trans` |
| JJ Allaire | 41921d3 | 2016-01-30 19:11:43 -0500 | [diff] [blame] | 265 | |
| 266 | For example: |
| 267 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 268 | ``` yaml |
| 269 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 270 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 271 | transition: fade |
| 272 | background_transition: slide |
| 273 | ``` |
| JJ Allaire | 41921d3 | 2016-01-30 19:11:43 -0500 | [diff] [blame] | 274 | |
| 275 | You can override the global transition for a specific slide by using the data-transition attribute, for example: |
| 276 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 277 | ``` markdown |
| 278 | ## Use a zoom transition {data-transition="zoom"} |
| 279 | |
| 280 | ## Use a faster speed {data-transition-speed="fast"} |
| 281 | ``` |
| 282 | |
| JJ Allaire | 41921d3 | 2016-01-30 19:11:43 -0500 | [diff] [blame] | 283 | You can also use different in and out transitions for the same slide, for example: |
| 284 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 285 | ``` markdown |
| 286 | ## Fade in, Slide out {data-transition="slide-in fade-out"} |
| JJ Allaire | 41921d3 | 2016-01-30 19:11:43 -0500 | [diff] [blame] | 287 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 288 | ## Slide in, Fade out {data-transition="fade-in slide-out"} |
| 289 | ``` |
| 290 | |
| 291 | This works also for background transition |
| 292 | |
| 293 | ``` markdown |
| 294 | ## Use a zoomed background transition {data-background-transition="zoom"} |
| 295 | ``` |
| 296 | |
| 297 | [Revealjs documentation about transitions](https://revealjs.com/transitions/) |
| JJ Allaire | 41921d3 | 2016-01-30 19:11:43 -0500 | [diff] [blame] | 298 | |
| JJ Allaire | 8382c3e | 2016-01-30 19:04:31 -0500 | [diff] [blame] | 299 | ## Slide Backgrounds |
| 300 | |
| 301 | Slides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page backgrounds outside of the slide area by adding a data-background attribute to your slide header element. Four different types of backgrounds are supported: color, image, video and iframe. Below are a few examples. |
| 302 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 303 | ``` markdown |
| 304 | ## CSS color background {data-background-color=#ff0000} |
| 305 | |
| 306 | ## Full size image background {data-background-image="background.jpeg"} |
| 307 | |
| 308 | ## Video background {data-background-video="background.mp4"} |
| 309 | |
| 310 | ## Embed a web page as a background {data-background-iframe="https://example.com"} |
| 311 | ``` |
| 312 | |
| 313 | Backgrounds transition using a fade animation by default. This can be changed to a linear sliding transition by specifying the `background-transition: slide`. Alternatively you can set `data-background-transition` on any slide with a background to override that specific transition. |
| 314 | |
| 315 | [Revealjs documentation about backgrounds](https://revealjs.com/backgrounds/) |
| JJ Allaire | 8382c3e | 2016-01-30 19:04:31 -0500 | [diff] [blame] | 316 | |
| Jon Calder | a35857d | 2017-04-11 16:38:58 +0200 | [diff] [blame] | 317 | ## 2-D Presentations |
| JJ Allaire | de1ed65 | 2016-01-30 19:41:18 -0500 | [diff] [blame] | 318 | |
| 319 | You can use the `slide_level` option to specify which level of heading will be used to denote individual slides. If `slide_level` is 2 (the default), a two-dimensional layout will be produced, with level 1 headers building horizontally and level 2 headers building vertically. For example: |
| 320 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 321 | ``` markdown |
| 322 | # Horizontal Slide 1 |
| JJ Allaire | de1ed65 | 2016-01-30 19:41:18 -0500 | [diff] [blame] | 323 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 324 | ## Vertical Slide 1 |
| JJ Allaire | de1ed65 | 2016-01-30 19:41:18 -0500 | [diff] [blame] | 325 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 326 | ## Vertical Slide 2 |
| JJ Allaire | de1ed65 | 2016-01-30 19:41:18 -0500 | [diff] [blame] | 327 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 328 | # Horizontal Slide 2 |
| 329 | ``` |
| 330 | |
| 331 | With this layout horizontal navigation will proceed directly from "Horizontal Slide 1" to "Horizontal Slide 2", with vertical navigation to "Vertical Slide 1", etc. presented as an option on "Horizontal Slide 1". Global reveal option [`navigationMode`](https://revealjs.com/vertical-slides/#navigation-mode) can be tweaked to change this behavior. |
| JJ Allaire | de1ed65 | 2016-01-30 19:41:18 -0500 | [diff] [blame] | 332 | |
| JJ Allaire | 5f51424 | 2016-07-12 10:28:23 -0400 | [diff] [blame] | 333 | ## Reveal Options |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 334 | |
| JJ Allaire | 064552c | 2017-02-10 10:28:41 -0500 | [diff] [blame] | 335 | Reveal.js has many additional options to configure it's behavior. You can specify any of these options using `reveal_options`, for example: |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 336 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 337 | ``` yaml |
| 338 | --- |
| 339 | title: "Habits" |
| 340 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 341 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 342 | self_contained: false |
| 343 | reveal_options: |
| 344 | slideNumber: true |
| 345 | previewLinks: true |
| 346 | --- |
| 347 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 348 | |
| Darren Tsai | c296958 | 2022-03-11 22:33:33 +0800 | [diff] [blame] | 349 | You can find documentation on the various available Reveal.js options here: <https://revealjs.com/config/>. |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 350 | |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 351 | ## Figure Options |
| 352 | |
| 353 | There are a number of options that affect the output of figures within reveal.js presentations: |
| 354 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 355 | - `fig_width` and `fig_height` can be used to control the default figure width and height (7x5 is used by default) |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 356 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 357 | - `fig_retina` Specifies the scaling to perform for retina displays (defaults to 2, which currently works for all widely used retina displays). Note that this only takes effect if you are using knitr >= 1.5.21. Set to `null` to prevent retina scaling. |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 358 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 359 | - `fig_caption` controls whether figures are rendered with captions |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 360 | |
| 361 | For example: |
| 362 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 363 | ``` yaml |
| 364 | --- |
| 365 | title: "Habits" |
| 366 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 367 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 368 | fig_width: 7 |
| 369 | fig_height: 6 |
| 370 | fig_caption: true |
| 371 | --- |
| 372 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 373 | |
| Marc Kupietz | cf6e998 | 2026-08-15 15:37:40 +0200 | [diff] [blame] | 374 | ## Lightbox |
| 375 | |
| 376 | reveal.js 5.2 added a [lightbox](https://revealjs.com/lightbox/): any element on a slide can be turned into a clickable trigger that opens an image or video full-size in a dimmed overlay, without leaving the slide. This is useful for dense figures or tables that should stay readable in the slide layout but be inspectable at full size during a presentation. |
| 377 | |
| 378 | Add the corresponding data attribute to an image: |
| 379 | |
| 380 | ```markdown |
| 381 | {data-preview-image} |
| 382 | ``` |
| 383 | |
| 384 | or set it on knitr-generated figures via `out.extra`: |
| 385 | |
| 386 | ````markdown |
| 387 | ```{r, out.extra='data-preview-image'} |
| 388 | plot(cars) |
| 389 | ``` |
| 390 | ```` |
| 391 | |
| 392 | Clicking the image on the slide opens it full-size; `Esc` or another click closes the overlay. |
| 393 | |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 394 | ## MathJax Equations |
| 395 | |
| 396 | By default [MathJax](http://www.mathjax.org/) scripts are included in reveal.js presentations for rendering LaTeX and MathML equations. You can use the `mathjax` option to control how MathJax is included: |
| 397 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 398 | - Specify "default" to use an https URL from the official MathJax CDN. |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 399 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 400 | - Specify "local" to use a local version of MathJax (which is copied into the output directory). Note that when using "local" you also need to set the `self_contained` option to false. |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 401 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 402 | - Specify an alternate URL to load MathJax from another location. |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 403 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 404 | - Specify null to exclude MathJax entirely. |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 405 | |
| 406 | For example, to use a local copy of MathJax: |
| 407 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 408 | ``` yaml |
| 409 | --- |
| 410 | title: "Habits" |
| 411 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 412 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 413 | mathjax: local |
| 414 | self_contained: false |
| 415 | --- |
| 416 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 417 | |
| 418 | To use a self-hosted copy of MathJax: |
| 419 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 420 | ``` yaml |
| 421 | --- |
| 422 | title: "Habits" |
| 423 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 424 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 425 | mathjax: "http://example.com/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML" |
| 426 | --- |
| 427 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 428 | |
| 429 | To exclude MathJax entirely: |
| 430 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 431 | ``` yaml |
| 432 | --- |
| 433 | title: "Habits" |
| 434 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 435 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 436 | mathjax: null |
| 437 | --- |
| 438 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 439 | |
| 440 | ## Document Dependencies |
| 441 | |
| Jon Calder | a35857d | 2017-04-11 16:38:58 +0200 | [diff] [blame] | 442 | By default R Markdown produces standalone HTML files with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. This means you can share or publish the file just like you share Office documents or PDFs. If you'd rather keep dependencies in external files you can specify `self_contained: false`. For example: |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 443 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 444 | ``` yaml |
| 445 | --- |
| 446 | title: "Habits" |
| 447 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 448 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 449 | self_contained: false |
| 450 | --- |
| 451 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 452 | |
| 453 | Note that even for self contained documents MathJax is still loaded externally (this is necessary because of it's size). If you want to serve MathJax locally then you should specify `mathjax: local` and `self_contained: false`. |
| 454 | |
| 455 | One common reason keep dependencies external is for serving R Markdown documents from a website (external dependencies can be cached separately by browsers leading to faster page load times). In the case of serving multiple R Markdown documents you may also want to consolidate dependent library files (e.g. Bootstrap, MathJax, etc.) into a single directory shared by multiple documents. You can use the `lib_dir` option to do this, for example: |
| 456 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 457 | ``` yaml |
| 458 | --- |
| 459 | title: "Habits" |
| 460 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 461 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 462 | self_contained: false |
| 463 | lib_dir: libs |
| 464 | --- |
| 465 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 466 | |
| JJ Allaire | 5f51424 | 2016-07-12 10:28:23 -0400 | [diff] [blame] | 467 | ## Reveal Plugins |
| JJ Allaire | 82a8dee | 2016-07-12 10:25:36 -0400 | [diff] [blame] | 468 | |
| 469 | You can enable various reveal.js plugins using the `reveal_plugins` option. Plugins currently supported include: |
| 470 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 471 | | Plugin | Description | |
| 472 | |------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| |
| 473 | | [notes](https://revealjs.com/speaker-view/) | Present per-slide notes in a separate browser window. Open Note view pressing `S`. | |
| 474 | | [zoom](http://lab.hakim.se/zoom-js/) | Zoom in and out of selected content with `Alt+Click.` | |
| 475 | | [search](https://github.com/hakimel/reveal.js/blob/master/plugin/search/search.js) | Find a text string anywhere in the slides and show the next occurrence to the user. Open search box using `CTRL + SHIFT + F`. | |
| 476 | | [chalkboard](https://github.com/rajgoel/reveal.js-plugins/tree/master/chalkboard) | Include handwritten notes within a presentation. Press `c` to write on slides, Press `b` to open a whiteboard or chalkboard to write. | |
| 477 | | [menu](https://github.com/denehyg/reveal.js-menu) | Include a navigation menu within a presentation. Press `m` to open the menu. | |
| JJ Allaire | 82a8dee | 2016-07-12 10:25:36 -0400 | [diff] [blame] | 478 | |
| Marc Kupietz | b9a8cba | 2026-08-28 06:51:28 +0300 | [diff] [blame] | 479 | The plugins `notes`, `search`, `menu`, and `zoom` are activated by default; only `chalkboard` is opt-in. Setting `reveal_plugins` yourself replaces the default set, so to add `chalkboard` while keeping the defaults, list them all explicitly. Set `reveal_plugins: null` to render without any plugins. |
| 480 | |
| 481 | Note that the use of plugins requires that the `self_contained` option be set to false. For example, this presentation uses only the "notes" and "search" plugins (dropping "menu" and "zoom" from the default set): |
| JJ Allaire | 82a8dee | 2016-07-12 10:25:36 -0400 | [diff] [blame] | 482 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 483 | ``` yaml |
| 484 | --- |
| 485 | title: "Habits" |
| 486 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 487 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 488 | self_contained: false |
| 489 | reveal_plugins: ["notes", "search"] |
| 490 | --- |
| 491 | ``` |
| JJ Allaire | 82a8dee | 2016-07-12 10:25:36 -0400 | [diff] [blame] | 492 | |
| JJ Allaire | 064552c | 2017-02-10 10:28:41 -0500 | [diff] [blame] | 493 | You can specify additional options for the `chalkboard` and `menu` plugins using `reveal_options`, for example: |
| JJ Allaire | 375805c | 2016-11-15 08:56:43 -0500 | [diff] [blame] | 494 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 495 | ``` yaml |
| 496 | --- |
| 497 | title: "Habits" |
| 498 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 499 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 500 | self_contained: false |
| 501 | reveal_plugins: ["chalkboard", "menu"] |
| 502 | reveal_options: |
| 503 | chalkboard: |
| 504 | theme: whiteboard |
| 505 | toggleNotesButton: false |
| 506 | menu: |
| 507 | side: right |
| 508 | --- |
| 509 | ``` |
| JJ Allaire | 375805c | 2016-11-15 08:56:43 -0500 | [diff] [blame] | 510 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 511 | No other plugins can be added in `revealjs_presentation()`. You can open feature request for new plugins or you would need to use a custom template to write your own HTML format including custom plugins. |
| JJ Allaire | 375805c | 2016-11-15 08:56:43 -0500 | [diff] [blame] | 512 | |
| Marc Kupietz | 26096d3 | 2026-08-15 15:03:33 +0200 | [diff] [blame] | 513 | ## Bibliography and Appendix Slides |
| 514 | |
| Marc Kupietz | ad0f24b | 2026-08-23 10:09:05 +0300 | [diff] [blame] | 515 | When you cite with `[@key]` and set a `bibliography:` in the yaml header, the references are formatted with the bundled IDS citation style by default (based on the style developed for ICLC-10 2023 in Mannheim). To use a different style, specify it as usual with `csl:` in the yaml header. |
| 516 | |
| 517 | Pandoc/citeproc generates the reference list **at the very end of the document body**. That is fine when the references are your last content: |
| Marc Kupietz | 26096d3 | 2026-08-15 15:03:33 +0200 | [diff] [blame] | 518 | |
| 519 | ```markdown |
| 520 | # References |
| 521 | |
| 522 | ## References |
| 523 | ``` |
| 524 | |
| 525 | If you want slides to follow the references -- typically an appendix with spare slides -- the bibliography would otherwise end up inside your last appendix slide. Place it explicitly with a `::: {#refs}` fenced div, and the appendix forms its own chapter group after the references; navigation and slide numbering keep working: |
| 526 | |
| 527 | ```markdown |
| 528 | # References |
| 529 | |
| 530 | ## References |
| 531 | |
| 532 | ::: {#refs} |
| 533 | ::: |
| 534 | |
| 535 | # Appendix |
| 536 | |
| 537 | ## Spare slide |
| 538 | |
| 539 | - Some backup material |
| 540 | ``` |
| 541 | |
| 542 | The `{#refs}` placeholder itself does not produce a slide. |
| 543 | |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 544 | ## Advanced Customization |
| 545 | |
| 546 | ### Includes |
| 547 | |
| 548 | You can do more advanced customization of output by including additional HTML content or by replacing the core pandoc template entirely. To include content in the document header or before/after the document body you use the `includes` option as follows: |
| 549 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 550 | ``` yaml |
| 551 | --- |
| 552 | title: "Habits" |
| 553 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 554 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 555 | includes: |
| 556 | in_header: header.html |
| 557 | before_body: doc_prefix.html |
| 558 | after_body: doc_suffix.html |
| 559 | --- |
| 560 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 561 | |
| 562 | ### Pandoc Arguments |
| 563 | |
| Jon Calder | a35857d | 2017-04-11 16:38:58 +0200 | [diff] [blame] | 564 | If there are pandoc features you want to use that lack equivalents in the YAML options described above you can still use them by passing custom `pandoc_args`. For example: |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 565 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 566 | ``` yaml |
| 567 | --- |
| 568 | title: "Habits" |
| 569 | output: |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 570 | revealjs.ids::revealjs_presentation: |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 571 | pandoc_args: [ |
| 572 | "--title-prefix", "Foo", |
| 573 | "--id-prefix", "Bar" |
| 574 | ] |
| 575 | --- |
| 576 | ``` |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 577 | |
| Atsushi Yasumoto | e734cd8 | 2020-08-10 21:48:18 +0900 | [diff] [blame] | 578 | Documentation on all available pandoc arguments can be found in the [pandoc user guide](https://pandoc.org/MANUAL.html#options). |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 579 | |
| 580 | ## Shared Options |
| 581 | |
| Jon Calder | a35857d | 2017-04-11 16:38:58 +0200 | [diff] [blame] | 582 | If you want to specify a set of default options to be shared by multiple documents within a directory you can include a file named `_output.yaml` within the directory. Note that no YAML delimiters or enclosing output object are used in this file. For example: |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 583 | |
| 584 | **\_output.yaml** |
| 585 | |
| Christophe Dervieux | e1893ae | 2021-10-07 17:09:02 +0200 | [diff] [blame] | 586 | ``` yaml |
| Marc Kupietz | e195cea | 2026-08-17 13:17:33 +0200 | [diff] [blame] | 587 | revealjs.ids::revealjs_presentation: |
| JJ Allaire | 5dc9fe0 | 2016-01-30 18:44:51 -0500 | [diff] [blame] | 588 | transition: fade |
| 589 | highlight: pygments |
| 590 | ``` |
| 591 | |
| 592 | All documents located in the same directory as `_output.yaml` will inherit it's options. Options defined explicitly within documents will override those specified in the shared options file. |
| Christophe Dervieux | 7f1add5 | 2021-09-15 15:42:07 +0200 | [diff] [blame] | 593 | |
| 594 | ## Code of Conduct |
| 595 | |
| 596 | Please note that the revealjs project is released with a [Contributor Code of Conduct](https://pkgs.rstudio.com/revealjs/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. |