Example presentation

An example of using {revealjs} with Quarto

Jerid Francom

Wake Forest University

Joe Biggs-Schüt

State University

Apr 18, 2024

Overview

  • Global features
  • Slide-level features
  • Slide elements

Global features

Leveraging the YAML frontmatter

Metadata

We can add more options to include metadata in the presentation.

title: "Example presentation"
1subtitle: "An example of using {revealjs} with Quarto"
2author:
  - name: "Jerid Francom"
    email: "francojc@wfu.edu"
    affiliation: "Wake Forest University"
  - name: "Joe Biggs-Schaut"
    email: "biggssj@uni.edu"
    affiliation: "State University"
bibliography: ../../bibliography.bib
date: "2024-04-18"
3date-format: medium
1
Add a subtitle
2
Extended (multiple) authorship information
3
Modified date format

Reveal.js options

As with other output formats, we can specify options for the reveal.js presentation.

format:
  revealjs:
1    theme: simple
2    slide-number: c/t
3    hash-type: number
    logo: "logo.jpg"
    footer: "Recipe 11: Sharing research"
    incremental: false
1
Change the theme (built-in themes)
2
Slide numbering (c/t for current/total)
3
Hash type for slide URLs (number for slide number URL)

Reveal.js options

As with other output formats, we can specify options for the reveal.js presentation.

format:
  revealjs:
    theme: simple
    slide-number: c/t
    hash-type: number
4    logo: "logo.jpg"
5    footer: "Recipe 11: Sharing research"
6    incremental: false
4
Add a logo to the presentation
5
Add a footer to the presentation
6
Specify if slide elements (bullets) should be revealed incrementally

Slide-level features

Using # and ## for creating/ adjusting slides

Slide types

There are two primary slide types.

Section slides

# Section slide

Subtitle (optional)

Subsection slides

## Subsection slide

Markdown content goes here.

- Bullet 1
- Bullet 2

Slide features

Slides can be customized with additional options:

  • Add incremental bullets
## Slide Title {.incremental}
  • Make elements appear smaller
## Slide Title {.smaller}
  • Make the slide scrollable for long content
## Slide Title {.scrollable}

These options can be combined as needed.

Slide elements

Using Markdown/ Quarto to create slide content

Markdown content

You can use standard Markdown syntax to create slide content. This includes images, tables, links, and more.

Images

![Caption for the image](image.jpg)

Tables

| Header 1 | Header 2 |
|----------|----------|
| Cell 1   | Cell 2   |

: Caption for the table

Quarto features

You can also use Quarto to create elements.

Code blocks

```{r}
#| label: hello
print("Hello, world!")
```

Figures

```{r}
#| label: fig-plot
plot(1:10)
```

Citations

[@Francom2014]

Columns

If you want to add columns to a slide, you can use the following syntax:

:::: {.columns}
::: {.column width="50%"}
Content for the first column
:::

::: {.column width="50%"}
Content for the second column
:::
::::

You can adjust the width as needed and/ or add more columns.

Speaker notes

You can add speaker notes to a slide using the following syntax:

::: {.notes}
Speaker notes go here.
:::

Wrap up

Final thoughts

  • Presentations can be customized at the global and slide level
  • Use Markdown and Quarto to create slide content
  • Add speaker notes and other elements as needed