A University of Warwick Presentation

Subtitle

Your Name

May 31, 2024

Introduction

This is a Quarto presentation format that is consistent with The University of Warwick’s brand, especially its colours and typography.

It also features the University of Warwick logo on the title slide.

Note

To remove the logo from the title slide, delete the replace lines 7-12 of this .qmd file and uncomment lines 15-16.

inverse class for section headings

inverse class is also useful for stressing key points.

Colours

There’s a colour for inline code such as x <- c(1, 3, 6) and {.inverse}.

There’s also a colour for short links and full ones like https://quarto.org/docs/presentations/revealjs/.

Colours

There’s a colour for inline code such as x <- c(1, 3, 6) and {.inverse}.

There’s also a colour for short links and full ones like https://quarto.org/docs/presentations/revealjs/.

  • The inline code and link colours change when the inverse class is applied.

Code

The extension includes a custom syntax highlighting theme:

library(dplyr)
library(palmerpenguins)

penguins %>%
  mutate(
    long_flipper = case_when(
      species == "Adelie" & flipper_length_mm > 195 ~ TRUE,
      species == "Chinstrap" & flipper_length_mm > 200 ~ TRUE,
      species == "Gentoo" & flipper_length_mm > 225 ~ TRUE,
      TRUE ~ FALSE
    )
  ) %>%
  mutate(
    body_mass_kg = body_mass_g / 1000,
    bill_length_cm = bill_length_mm / 10,
    bill_depth_cm = bill_depth_mm / 10
  )

warwickplots

For plotting, the warwickpres extension goes hand-in-hand with the warwickplots R package, which provides colour palettes and a ggplot2 theme, theme_warwick(), that are also consistent with the University of Warwick’s branding.

https://warwick-stats-resources.github.io/warwickplots/

warwickplots example

library(ggplot2)
library(warwickplots)
library(palmerpenguins)

ggplot(penguins, aes(flipper_length_mm, body_mass_g, group = species)) +
  geom_point(aes(colour = species, shape = species), 
             alpha = 0.8, 
             size = 2) +
  scale_color_palette_d(warwick_palettes$primary) +
  labs(title = "Penguin Size, Palmer Station LTER",
       subtitle = "Flipper length and body mass for **<span style = 'color:#3C1053;'>Adelie</span>**, **<span style = 'color:#6DCDB8;'>Chinstrap</span>** and **<span style = 'color:#CB333B;'>Gentoo</span>** Penguins. This is based on data made available in the **palmerpenguins** R package.",
       caption = "Visualization: Ella Kaye, Data: Gorman, Williams & Fraser (2014) DOI: 10.1371/journal.pone.009008",
       x = "flipper length (mm)",
       y = "body mass (g)") +
  theme_warwick() +
  theme(legend.position = 'none')

warwickplots example

Callouts

There are custom colours for callouts:

Note

A note

Warning

A warning

Important

Something important

Tip

This is a good idea

Caution

Be careful about doing this

These require a raw html chunk at the end of the presentation .qmd file (included in template). Callouts do not look good on the inverse background.

Non-Warwick-specific nice-to-haves

Alignment

There are classes to help with text alignment:

{.center-h} gives horizontally-centered text

{.right} gives right-aligned text

Note

For all revealjs Quarto presentations, applying {.center} to the slide title vertically centers the whole slide.

Sizing

There are classes to help size text by a given percentage:

{.smaller90}, {.smaller80}, {.smaller75} {.smaller70}, {.smaller60}, {.smaller50}

{.larger125}, {.larger150}, {.larger175}, {.larger200}, {.larger250}

More information

You can learn more about Quarto Revealjs presentations at https://quarto.org/docs/presentations/revealjs/

You can learn more about Quarto extensions at https://quarto.org/docs/extensions/

You can find these slides at https://warwick-stats-resources.github.io/warwickpres/