blob: 67843086ce140ed59a0036f2c5009e535dda6c69 [file] [log] [blame]
JJ Allaire5dc9fe02016-01-30 18:44:51 -05001---
2title: "R Markdown Format for reveal.js Presentations"
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +02003output: github_document
JJ Allaire5dc9fe02016-01-30 18:44:51 -05004---
5
christophe dervieux42886a12021-09-16 11:36:01 +02006<!-- badges: start -->
7[![CRAN status](https://www.r-pkg.org/badges/version/revealjs)](https://CRAN.R-project.org/package=revealjs)
Christophe Dervieux7d613ee2023-03-24 17:35:02 +01008[![R-CMD-check](https://github.com/rstudio/revealjs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rstudio/revealjs/actions/workflows/R-CMD-check.yaml)
Christophe Dervieux8043a482021-10-28 11:51:47 +02009[![reveal.js](https://img.shields.io/badge/reveal.js-`r revealjs:::revealjs_version()`-yellow)](https://github.com/rstudio/revealjs/tree/main/inst/reveal.js-`r revealjs:::revealjs_version()`)
christophe dervieux42886a12021-09-16 11:36:01 +020010<!-- badges: end -->
11
JJ Allaire5dc9fe02016-01-30 18:44:51 -050012## Overview
13
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020014This 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:::revealjs_version()`
JJ Allaire5dc9fe02016-01-30 18:44:51 -050015
16You can use this format in R Markdown documents by installing this package as follows:
17
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020018``` r
19install.packages("revealjs")
JJ Allaire5dc9fe02016-01-30 18:44:51 -050020```
21
Atsushi Yasumotoe734cd82020-08-10 21:48:18 +090022To 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 Allaire5dc9fe02016-01-30 18:44:51 -050023
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020024``` markdown
25---
26title: "Habits"
27author: John Doe
28date: March 22, 2005
29output: revealjs::revealjs_presentation
30---
JJ Allaire5dc9fe02016-01-30 18:44:51 -050031
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020032# In the morning
JJ Allaire5dc9fe02016-01-30 18:44:51 -050033
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020034## Getting up
JJ Allaire5dc9fe02016-01-30 18:44:51 -050035
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020036- Turn off alarm
37- Get out of bed
JJ Allaire5dc9fe02016-01-30 18:44:51 -050038
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020039## Breakfast
JJ Allaire5dc9fe02016-01-30 18:44:51 -050040
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020041- Eat eggs
42- Drink coffee
JJ Allaire5dc9fe02016-01-30 18:44:51 -050043
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020044# In the evening
JJ Allaire5dc9fe02016-01-30 18:44:51 -050045
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020046## Dinner
JJ Allaire5dc9fe02016-01-30 18:44:51 -050047
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020048- Eat spaghetti
49- Drink wine
JJ Allaire5dc9fe02016-01-30 18:44:51 -050050
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020051## Going to sleep
JJ Allaire5dc9fe02016-01-30 18:44:51 -050052
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020053- Get in bed
54- Count sheep
55```
JJ Allaire5dc9fe02016-01-30 18:44:51 -050056
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020057## Rendering
Daniel Chen46087c32016-03-21 17:58:14 -040058
Daniel Chen81a14342016-03-21 18:00:56 -040059Depending on your use case, there are 3 ways you can render the presentation.
Daniel Chen46087c32016-03-21 17:58:14 -040060
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200611. RStudio
622. R console
633. Terminal (e.g., bash)
Daniel Chen46087c32016-03-21 17:58:14 -040064
65### RStudio
66
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020067When 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 Chen46087c32016-03-21 17:58:14 -040068
69### R Console
70
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020071The `Knit` button is actually calling the `rmarkdown::render()` function. So, to render the document within the R console:
Daniel Chen46087c32016-03-21 17:58:14 -040072
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020073``` r
Daniel Chen46087c32016-03-21 17:58:14 -040074rmarkdown::render('my_reveal_presentation.Rmd')
75```
76
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020077There 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 Chen46087c32016-03-21 17:58:14 -040078
79### Command Line
80
81When you need the presentation to be rendered from the command line:
82
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020083``` bash
Daniel Chen46087c32016-03-21 17:58:14 -040084Rscript -e "rmarkdown::render('my_reveal_presentation.Rmd')"
85```
86
JJ Allaire5dc9fe02016-01-30 18:44:51 -050087## Display Modes
88
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020089The following single character keyboard shortcuts enable alternate display modes:
JJ Allaire5dc9fe02016-01-30 18:44:51 -050090
91- `'f'` enable fullscreen mode
92
93- `'o'` enable overview mode
94
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020095- `'b'` enable pause mode with a black screen hiding slide content
96
97- `'?'` enable help mode to show keyboard shortcut cheatsheet
98
99- `'s'` enable presentation mode with speaker notes when the Notes plugin is activated
100
101- `'m'` enable menu mode when the 'menu' plugin is activated
102
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500103Pressing `Esc` exits all of these modes.
104
105## Incremental Bullets
106
107You can render bullets incrementally by adding the `incremental` option:
108
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200109``` yaml
110---
111output:
112 revealjs::revealjs_presentation:
113 incremental: true
114---
115```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500116
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200117If you want to render bullets incrementally for some slides but not others you can use this syntax:
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500118
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200119``` markdown
120::: incremental
121
122- Eat spaghetti
123- Drink wine
124
125:::
126```
127
128or
129
130``` markdown
131::: nonincremental
132
133- Eat spaghetti
134- Drink wine
135
136:::
137```
138
139## Incremental Revealing
140
141You can also add pauses between content on a slide using `. . .`
142
143``` markdown
144# Slide header
145
146Content shown first
147
148. . .
149
150Content shown next on the same slide
151```
152
153Using Fragments explicitly is also possible
154
155``` markdown
156# Slide header
157
158Content shown first
159
160::: fragment
161Content shown next on the same slide
162:::
163```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500164
165## Appearance and Style
166
167There are several options that control the appearance of revealjs presentations:
168
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200169- `theme` specifies the theme to use for the presentation (available themes are `r knitr::combine_words(setdiff(revealjs:::revealjs_themes(), "default"), before = '"', and = " or ")`
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500170
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200171- `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 Allaire5dc9fe02016-01-30 18:44:51 -0500172
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200173- `center` specifies whether you want to vertically center content on slides (this defaults to false).
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500174
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500175For example:
176
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200177``` yaml
178output:
179 revealjs::revealjs_presentation:
180 theme: sky
181 highlight: pygments
182 center: true
183```
184
185[Revealjs documentation about themes](https://revealjs.com/themes/)
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500186
JJ Allaire41921d32016-01-30 19:11:43 -0500187## Slide Transitions
188
Jon Caldera35857d2017-04-11 16:38:58 +0200189You can use the `transition` and `background_transition` options to specify the global default slide transition style:
JJ Allaire41921d32016-01-30 19:11:43 -0500190
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200191- `transition` specifies the visual effect when moving between slides. Available transitions are `r (trans <- knitr::combine_words(setdiff(revealjs:::revealjs_transitions(), "default"), before = '"', and = " or "))`.
JJ Allaire41921d32016-01-30 19:11:43 -0500192
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200193- `background_transition` specifies the background transition effect when moving between full page slides. Available transitions are `r trans`
JJ Allaire41921d32016-01-30 19:11:43 -0500194
195For example:
196
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200197``` yaml
198output:
199 revealjs::revealjs_presentation:
200 transition: fade
201 background_transition: slide
202```
JJ Allaire41921d32016-01-30 19:11:43 -0500203
204You can override the global transition for a specific slide by using the data-transition attribute, for example:
205
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200206``` markdown
207## Use a zoom transition {data-transition="zoom"}
208
209## Use a faster speed {data-transition-speed="fast"}
210```
211
JJ Allaire41921d32016-01-30 19:11:43 -0500212You can also use different in and out transitions for the same slide, for example:
213
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200214``` markdown
215## Fade in, Slide out {data-transition="slide-in fade-out"}
JJ Allaire41921d32016-01-30 19:11:43 -0500216
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200217## Slide in, Fade out {data-transition="fade-in slide-out"}
218```
219
220This works also for background transition
221
222``` markdown
223## Use a zoomed background transition {data-background-transition="zoom"}
224```
225
226[Revealjs documentation about transitions](https://revealjs.com/transitions/)
JJ Allaire41921d32016-01-30 19:11:43 -0500227
JJ Allaire8382c3e2016-01-30 19:04:31 -0500228## Slide Backgrounds
229
230Slides 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.
231
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200232``` markdown
233## CSS color background {data-background-color=#ff0000}
234
235## Full size image background {data-background-image="background.jpeg"}
236
237## Video background {data-background-video="background.mp4"}
238
239## Embed a web page as a background {data-background-iframe="https://example.com"}
240```
241
242Backgrounds 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.
243
244[Revealjs documentation about backgrounds](https://revealjs.com/backgrounds/)
JJ Allaire8382c3e2016-01-30 19:04:31 -0500245
Jon Caldera35857d2017-04-11 16:38:58 +0200246## 2-D Presentations
JJ Allairede1ed652016-01-30 19:41:18 -0500247
248You 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:
249
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200250``` markdown
251# Horizontal Slide 1
JJ Allairede1ed652016-01-30 19:41:18 -0500252
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200253## Vertical Slide 1
JJ Allairede1ed652016-01-30 19:41:18 -0500254
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200255## Vertical Slide 2
JJ Allairede1ed652016-01-30 19:41:18 -0500256
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200257# Horizontal Slide 2
258```
259
260With 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 Allairede1ed652016-01-30 19:41:18 -0500261
JJ Allaire5f514242016-07-12 10:28:23 -0400262## Reveal Options
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500263
JJ Allaire064552c2017-02-10 10:28:41 -0500264Reveal.js has many additional options to configure it's behavior. You can specify any of these options using `reveal_options`, for example:
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500265
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200266``` yaml
267---
268title: "Habits"
269output:
270 revealjs::revealjs_presentation:
271 self_contained: false
272 reveal_options:
273 slideNumber: true
274 previewLinks: true
275---
276```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500277
Darren Tsaic2969582022-03-11 22:33:33 +0800278You can find documentation on the various available Reveal.js options here: <https://revealjs.com/config/>.
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500279
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500280## Figure Options
281
282There are a number of options that affect the output of figures within reveal.js presentations:
283
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200284- `fig_width` and `fig_height` can be used to control the default figure width and height (7x5 is used by default)
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500285
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200286- `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 Allaire5dc9fe02016-01-30 18:44:51 -0500287
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200288- `fig_caption` controls whether figures are rendered with captions
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500289
290For example:
291
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200292``` yaml
293---
294title: "Habits"
295output:
296 revealjs::revealjs_presentation:
297 fig_width: 7
298 fig_height: 6
299 fig_caption: true
300---
301```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500302
303## MathJax Equations
304
305By 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:
306
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200307- Specify "default" to use an https URL from the official MathJax CDN.
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500308
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200309- 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 Allaire5dc9fe02016-01-30 18:44:51 -0500310
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200311- Specify an alternate URL to load MathJax from another location.
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500312
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200313- Specify null to exclude MathJax entirely.
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500314
315For example, to use a local copy of MathJax:
316
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200317``` yaml
318---
319title: "Habits"
320output:
321 revealjs::revealjs_presentation:
322 mathjax: local
323 self_contained: false
324---
325```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500326
327To use a self-hosted copy of MathJax:
328
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200329``` yaml
330---
331title: "Habits"
332output:
333 revealjs::revealjs_presentation:
334 mathjax: "http://example.com/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
335---
336```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500337
338To exclude MathJax entirely:
339
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200340``` yaml
341---
342title: "Habits"
343output:
344 revealjs::revealjs_presentation:
345 mathjax: null
346---
347```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500348
349## Document Dependencies
350
Jon Caldera35857d2017-04-11 16:38:58 +0200351By 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 Allaire5dc9fe02016-01-30 18:44:51 -0500352
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200353``` yaml
354---
355title: "Habits"
356output:
357 revealjs::revealjs_presentation:
358 self_contained: false
359---
360```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500361
362Note 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`.
363
364One 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:
365
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200366``` yaml
367---
368title: "Habits"
369output:
370 revealjs::revealjs_presentation:
371 self_contained: false
372 lib_dir: libs
373---
374```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500375
JJ Allaire5f514242016-07-12 10:28:23 -0400376## Reveal Plugins
JJ Allaire82a8dee2016-07-12 10:25:36 -0400377
378You can enable various reveal.js plugins using the `reveal_plugins` option. Plugins currently supported include:
379
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200380| Plugin | Description |
381|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
382| [notes](https://revealjs.com/speaker-view/) | Present per-slide notes in a separate browser window. Open Note view pressing `S`. |
383| [zoom](http://lab.hakim.se/zoom-js/) | Zoom in and out of selected content with `Alt+Click.` |
384| [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`. |
385| [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. |
386| [menu](https://github.com/denehyg/reveal.js-menu) | Include a navigation menu within a presentation. Press `m` to open the menu. |
JJ Allaire82a8dee2016-07-12 10:25:36 -0400387
388Note that the use of plugins requires that the `self_contained` option be set to false. For example, this presentation includes both the "notes" and "search" plugins:
389
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200390``` yaml
391---
392title: "Habits"
393output:
394 revealjs::revealjs_presentation:
395 self_contained: false
396 reveal_plugins: ["notes", "search"]
397---
398```
JJ Allaire82a8dee2016-07-12 10:25:36 -0400399
JJ Allaire064552c2017-02-10 10:28:41 -0500400You can specify additional options for the `chalkboard` and `menu` plugins using `reveal_options`, for example:
JJ Allaire375805c2016-11-15 08:56:43 -0500401
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200402``` yaml
403---
404title: "Habits"
405output:
406 revealjs::revealjs_presentation:
407 self_contained: false
408 reveal_plugins: ["chalkboard", "menu"]
409 reveal_options:
410 chalkboard:
411 theme: whiteboard
412 toggleNotesButton: false
413 menu:
414 side: right
415---
416```
JJ Allaire375805c2016-11-15 08:56:43 -0500417
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200418No 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 Allaire375805c2016-11-15 08:56:43 -0500419
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500420## Advanced Customization
421
422### Includes
423
424You 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:
425
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200426``` yaml
427---
428title: "Habits"
429output:
430 revealjs::revealjs_presentation:
431 includes:
432 in_header: header.html
433 before_body: doc_prefix.html
434 after_body: doc_suffix.html
435---
436```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500437
438### Pandoc Arguments
439
Jon Caldera35857d2017-04-11 16:38:58 +0200440If 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 Allaire5dc9fe02016-01-30 18:44:51 -0500441
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200442``` yaml
443---
444title: "Habits"
445output:
446 revealjs::revealjs_presentation:
447 pandoc_args: [
448 "--title-prefix", "Foo",
449 "--id-prefix", "Bar"
450 ]
451---
452```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500453
Atsushi Yasumotoe734cd82020-08-10 21:48:18 +0900454Documentation on all available pandoc arguments can be found in the [pandoc user guide](https://pandoc.org/MANUAL.html#options).
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500455
456## Shared Options
457
Jon Caldera35857d2017-04-11 16:38:58 +0200458If 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 Allaire5dc9fe02016-01-30 18:44:51 -0500459
460**\_output.yaml**
461
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200462``` yaml
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500463revealjs::revealjs_presentation:
464 theme: sky
465 transition: fade
466 highlight: pygments
467```
468
469All 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 Dervieux7f1add52021-09-15 15:42:07 +0200470
471## Code of Conduct
472
473Please 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.