blob: 6a72e1be7d58e2a7d084423fd196e762e76e725f [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 -->
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +02007
christophe dervieux42886a12021-09-16 11:36:01 +02008[![CRAN status](https://www.r-pkg.org/badges/version/revealjs)](https://CRAN.R-project.org/package=revealjs)
9[![R-CMD-check](https://github.com/rstudio/revealjs/workflows/R-CMD-check/badge.svg)](https://github.com/rstudio/revealjs/actions)
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020010[![revealjs](https://img.shields.io/badge/revealjs-`r revealjs:::revealjs_version()`-yellow)](https://github.com/rstudio/revealjs/tree/master/inst/reveal.js-`r revealjs:::revealjs_version()`)
11
christophe dervieux42886a12021-09-16 11:36:01 +020012<!-- badges: end -->
13
JJ Allaire5dc9fe02016-01-30 18:44:51 -050014## Overview
15
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020016This 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 -050017
18You can use this format in R Markdown documents by installing this package as follows:
19
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020020``` r
21install.packages("revealjs")
JJ Allaire5dc9fe02016-01-30 18:44:51 -050022```
23
Atsushi Yasumotoe734cd82020-08-10 21:48:18 +090024To 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 -050025
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020026``` markdown
27---
28title: "Habits"
29author: John Doe
30date: March 22, 2005
31output: revealjs::revealjs_presentation
32---
JJ Allaire5dc9fe02016-01-30 18:44:51 -050033
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020034# In the morning
JJ Allaire5dc9fe02016-01-30 18:44:51 -050035
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020036## Getting up
JJ Allaire5dc9fe02016-01-30 18:44:51 -050037
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020038- Turn off alarm
39- Get out of bed
JJ Allaire5dc9fe02016-01-30 18:44:51 -050040
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020041## Breakfast
JJ Allaire5dc9fe02016-01-30 18:44:51 -050042
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020043- Eat eggs
44- Drink coffee
JJ Allaire5dc9fe02016-01-30 18:44:51 -050045
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020046# In the evening
JJ Allaire5dc9fe02016-01-30 18:44:51 -050047
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020048## Dinner
JJ Allaire5dc9fe02016-01-30 18:44:51 -050049
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020050- Eat spaghetti
51- Drink wine
JJ Allaire5dc9fe02016-01-30 18:44:51 -050052
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020053## Going to sleep
JJ Allaire5dc9fe02016-01-30 18:44:51 -050054
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020055- Get in bed
56- Count sheep
57```
JJ Allaire5dc9fe02016-01-30 18:44:51 -050058
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020059## Rendering
Daniel Chen46087c32016-03-21 17:58:14 -040060
Daniel Chen81a14342016-03-21 18:00:56 -040061Depending on your use case, there are 3 ways you can render the presentation.
Daniel Chen46087c32016-03-21 17:58:14 -040062
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200631. RStudio
642. R console
653. Terminal (e.g., bash)
Daniel Chen46087c32016-03-21 17:58:14 -040066
67### RStudio
68
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020069When 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 -040070
71### R Console
72
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020073The `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 -040074
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020075``` r
Daniel Chen46087c32016-03-21 17:58:14 -040076rmarkdown::render('my_reveal_presentation.Rmd')
77```
78
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020079There 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 -040080
81### Command Line
82
83When you need the presentation to be rendered from the command line:
84
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020085``` bash
Daniel Chen46087c32016-03-21 17:58:14 -040086Rscript -e "rmarkdown::render('my_reveal_presentation.Rmd')"
87```
88
JJ Allaire5dc9fe02016-01-30 18:44:51 -050089## Display Modes
90
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020091The following single character keyboard shortcuts enable alternate display modes:
JJ Allaire5dc9fe02016-01-30 18:44:51 -050092
93- `'f'` enable fullscreen mode
94
95- `'o'` enable overview mode
96
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020097- `'b'` enable pause mode with a black screen hiding slide content
98
99- `'?'` enable help mode to show keyboard shortcut cheatsheet
100
101- `'s'` enable presentation mode with speaker notes when the Notes plugin is activated
102
103- `'m'` enable menu mode when the 'menu' plugin is activated
104
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500105Pressing `Esc` exits all of these modes.
106
107## Incremental Bullets
108
109You can render bullets incrementally by adding the `incremental` option:
110
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200111``` yaml
112---
113output:
114 revealjs::revealjs_presentation:
115 incremental: true
116---
117```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500118
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200119If you want to render bullets incrementally for some slides but not others you can use this syntax:
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500120
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200121``` markdown
122::: incremental
123
124- Eat spaghetti
125- Drink wine
126
127:::
128```
129
130or
131
132``` markdown
133::: nonincremental
134
135- Eat spaghetti
136- Drink wine
137
138:::
139```
140
141## Incremental Revealing
142
143You can also add pauses between content on a slide using `. . .`
144
145``` markdown
146# Slide header
147
148Content shown first
149
150. . .
151
152Content shown next on the same slide
153```
154
155Using Fragments explicitly is also possible
156
157``` markdown
158# Slide header
159
160Content shown first
161
162::: fragment
163Content shown next on the same slide
164:::
165```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500166
167## Appearance and Style
168
169There are several options that control the appearance of revealjs presentations:
170
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200171- `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 -0500172
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200173- `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 -0500174
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200175- `center` specifies whether you want to vertically center content on slides (this defaults to false).
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500176
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500177For example:
178
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200179``` yaml
180output:
181 revealjs::revealjs_presentation:
182 theme: sky
183 highlight: pygments
184 center: true
185```
186
187[Revealjs documentation about themes](https://revealjs.com/themes/)
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500188
JJ Allaire41921d32016-01-30 19:11:43 -0500189## Slide Transitions
190
Jon Caldera35857d2017-04-11 16:38:58 +0200191You can use the `transition` and `background_transition` options to specify the global default slide transition style:
JJ Allaire41921d32016-01-30 19:11:43 -0500192
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200193- `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 -0500194
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200195- `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 -0500196
197For example:
198
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200199``` yaml
200output:
201 revealjs::revealjs_presentation:
202 transition: fade
203 background_transition: slide
204```
JJ Allaire41921d32016-01-30 19:11:43 -0500205
206You can override the global transition for a specific slide by using the data-transition attribute, for example:
207
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200208``` markdown
209## Use a zoom transition {data-transition="zoom"}
210
211## Use a faster speed {data-transition-speed="fast"}
212```
213
JJ Allaire41921d32016-01-30 19:11:43 -0500214You can also use different in and out transitions for the same slide, for example:
215
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200216``` markdown
217## Fade in, Slide out {data-transition="slide-in fade-out"}
JJ Allaire41921d32016-01-30 19:11:43 -0500218
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200219## Slide in, Fade out {data-transition="fade-in slide-out"}
220```
221
222This works also for background transition
223
224``` markdown
225## Use a zoomed background transition {data-background-transition="zoom"}
226```
227
228[Revealjs documentation about transitions](https://revealjs.com/transitions/)
JJ Allaire41921d32016-01-30 19:11:43 -0500229
JJ Allaire8382c3e2016-01-30 19:04:31 -0500230## Slide Backgrounds
231
232Slides 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.
233
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200234``` markdown
235## CSS color background {data-background-color=#ff0000}
236
237## Full size image background {data-background-image="background.jpeg"}
238
239## Video background {data-background-video="background.mp4"}
240
241## Embed a web page as a background {data-background-iframe="https://example.com"}
242```
243
244Backgrounds 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.
245
246[Revealjs documentation about backgrounds](https://revealjs.com/backgrounds/)
JJ Allaire8382c3e2016-01-30 19:04:31 -0500247
Jon Caldera35857d2017-04-11 16:38:58 +0200248## 2-D Presentations
JJ Allairede1ed652016-01-30 19:41:18 -0500249
250You 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:
251
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200252``` markdown
253# Horizontal Slide 1
JJ Allairede1ed652016-01-30 19:41:18 -0500254
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200255## Vertical Slide 1
JJ Allairede1ed652016-01-30 19:41:18 -0500256
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200257## Vertical Slide 2
JJ Allairede1ed652016-01-30 19:41:18 -0500258
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200259# Horizontal Slide 2
260```
261
262With 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 -0500263
JJ Allaire5f514242016-07-12 10:28:23 -0400264## Reveal Options
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500265
JJ Allaire064552c2017-02-10 10:28:41 -0500266Reveal.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 -0500267
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200268``` yaml
269---
270title: "Habits"
271output:
272 revealjs::revealjs_presentation:
273 self_contained: false
274 reveal_options:
275 slideNumber: true
276 previewLinks: true
277---
278```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500279
280You can find documentation on the various available Reveal.js options here: <https://github.com/hakimel/reveal.js#configuration>.
281
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500282## Figure Options
283
284There are a number of options that affect the output of figures within reveal.js presentations:
285
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200286- `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 -0500287
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200288- `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 -0500289
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200290- `fig_caption` controls whether figures are rendered with captions
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500291
292For example:
293
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200294``` yaml
295---
296title: "Habits"
297output:
298 revealjs::revealjs_presentation:
299 fig_width: 7
300 fig_height: 6
301 fig_caption: true
302---
303```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500304
305## MathJax Equations
306
307By 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:
308
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200309- Specify "default" to use an https URL from the official MathJax CDN.
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500310
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200311- 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 -0500312
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200313- Specify an alternate URL to load MathJax from another location.
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500314
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200315- Specify null to exclude MathJax entirely.
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500316
317For example, to use a local copy of MathJax:
318
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200319``` yaml
320---
321title: "Habits"
322output:
323 revealjs::revealjs_presentation:
324 mathjax: local
325 self_contained: false
326---
327```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500328
329To use a self-hosted copy of MathJax:
330
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200331``` yaml
332---
333title: "Habits"
334output:
335 revealjs::revealjs_presentation:
336 mathjax: "http://example.com/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
337---
338```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500339
340To exclude MathJax entirely:
341
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200342``` yaml
343---
344title: "Habits"
345output:
346 revealjs::revealjs_presentation:
347 mathjax: null
348---
349```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500350
351## Document Dependencies
352
Jon Caldera35857d2017-04-11 16:38:58 +0200353By 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 -0500354
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200355``` yaml
356---
357title: "Habits"
358output:
359 revealjs::revealjs_presentation:
360 self_contained: false
361---
362```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500363
364Note 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`.
365
366One 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:
367
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200368``` yaml
369---
370title: "Habits"
371output:
372 revealjs::revealjs_presentation:
373 self_contained: false
374 lib_dir: libs
375---
376```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500377
JJ Allaire5f514242016-07-12 10:28:23 -0400378## Reveal Plugins
JJ Allaire82a8dee2016-07-12 10:25:36 -0400379
380You can enable various reveal.js plugins using the `reveal_plugins` option. Plugins currently supported include:
381
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200382| Plugin | Description |
383|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
384| [notes](https://revealjs.com/speaker-view/) | Present per-slide notes in a separate browser window. Open Note view pressing `S`. |
385| [zoom](http://lab.hakim.se/zoom-js/) | Zoom in and out of selected content with `Alt+Click.` |
386| [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`. |
387| [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. |
388| [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 -0400389
390Note 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:
391
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200392``` yaml
393---
394title: "Habits"
395output:
396 revealjs::revealjs_presentation:
397 self_contained: false
398 reveal_plugins: ["notes", "search"]
399---
400```
JJ Allaire82a8dee2016-07-12 10:25:36 -0400401
JJ Allaire064552c2017-02-10 10:28:41 -0500402You can specify additional options for the `chalkboard` and `menu` plugins using `reveal_options`, for example:
JJ Allaire375805c2016-11-15 08:56:43 -0500403
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200404``` yaml
405---
406title: "Habits"
407output:
408 revealjs::revealjs_presentation:
409 self_contained: false
410 reveal_plugins: ["chalkboard", "menu"]
411 reveal_options:
412 chalkboard:
413 theme: whiteboard
414 toggleNotesButton: false
415 menu:
416 side: right
417---
418```
JJ Allaire375805c2016-11-15 08:56:43 -0500419
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200420No 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 -0500421
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500422## Advanced Customization
423
424### Includes
425
426You 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:
427
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200428``` yaml
429---
430title: "Habits"
431output:
432 revealjs::revealjs_presentation:
433 includes:
434 in_header: header.html
435 before_body: doc_prefix.html
436 after_body: doc_suffix.html
437---
438```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500439
440### Pandoc Arguments
441
Jon Caldera35857d2017-04-11 16:38:58 +0200442If 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 -0500443
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200444``` yaml
445---
446title: "Habits"
447output:
448 revealjs::revealjs_presentation:
449 pandoc_args: [
450 "--title-prefix", "Foo",
451 "--id-prefix", "Bar"
452 ]
453---
454```
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500455
Atsushi Yasumotoe734cd82020-08-10 21:48:18 +0900456Documentation 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 -0500457
458## Shared Options
459
Jon Caldera35857d2017-04-11 16:38:58 +0200460If 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 -0500461
462**\_output.yaml**
463
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200464``` yaml
JJ Allaire5dc9fe02016-01-30 18:44:51 -0500465revealjs::revealjs_presentation:
466 theme: sky
467 transition: fade
468 highlight: pygments
469```
470
471All 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 +0200472
473## Code of Conduct
474
475Please 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.