YOUR AMAZING PRESENTATION TITLE

First Last

TWRI, Texas A&M AgriLife Extension

Michael Schramm

TWRI, Texas A&M AgriLife Research

February 15, 2024

Install

Start from scratch:

quarto install extension txwri/quarto-revealjs-txwri

Or install and include this template:

quarto use template txwri/quarto-revealjs-txwri

Install

In RStudio, install using the Terminal tab:

Example slide

This is a subtitle

Here we have some text that may run over several lines of the slide frame, depending on how long it is.

  • first item
    • A sub item

Render figures

Include output from R or Python directly as figures:

library(ggplot2)
library(tidyr)
library(dplyr)
library(stringr)
library(scico)
data("volcano")

volcano |> 
  as_tibble(.name_repair = "universal") |> 
  mutate(latitude = 1:n()) |> 
  pivot_longer(!latitude, names_to = "longitude", values_to = "altitude") |> 
  mutate(longitude = longitude |>  
           str_remove("[\\.]{3}") |> 
           as.numeric()) |> 
  ggplot() +
  geom_contour_filled(aes(latitude, longitude, z = altitude),
                      bins = 20) +
  scale_fill_scico_d(palette = "batlowW") +
  theme_void() +
  theme(legend.position = "none")

Render tables

library(knitr)

kable(head(cars))
Table 1: Cars
speed dist
4 2
4 10
7 4
7 22
8 16
9 10

Math

Feel free to include some math: \[ \left( \prod_{i=1}^{n} \right)^{\frac{1}{n}} =\sqrt[n]{x_1, x_2, ... x_n} \] or, equivalently: \[ \exp\left(\frac{1}{n} \sum_{i=1}^n \ln{a_i} \right) \]

More info

The Quarto website provides more guidance on revealjs slides and Quarto in general:

https://quarto.org/docs/presentations/

Additional theme classes

Some extra things you can do with the txwri-revealjs theme

Special classes for emphasis

  • .alert class for default emphasis, e.g. important note.
  • .fg class for custom colour, e.g. important note.
  • .bg class for custom background, e.g. important note.

Cross-references

  • .button class provides a Beamer-like button, e.g. Appendix
  • Quarto’s native cross-ref syntax, e.g., “See Section 2.5.”

Components

Citations

Citations follow the standard Quarto format and be sourced from BibLaTex, BibTeX, or CLS files. For example:

Components

Blocks

Quarto provides dedicated environments for theorems, lemmas, and so forth.

But in presentation format, it’s arguably more effective just to use a Callout Block.

Regression Specification

The main specification is as follows:

\[ y_{it} = X_{it} \beta + \mu_i + \varepsilon_{it} \]

Components

Multicolumn I: Text only

Column 1

Here is a long sentence that will wrap onto the next line as it hits the column width, and continue this way until it stops.

Column 2

Some other text in another column.

A second paragraph.

Multicolumn support is very flexible and we can continue with a single full span column in the same slide.

Components

Multicolumn II: Text and figures

  • A point about the figure that is potentially important.
  • Another point about the figure that is also potentially important.

Note that sub- and multi-panel figures are also natively supported by Quarto. See here.

Components

Multicolumn III: Code and output

palette("Classic Tableau")

par(
  family = "HersheySans",
  las = 1, pch = 19, cex = 1.5
)

pairs(
  iris[,1:4],
  col=iris$Species
)
Figure 1: Pairwise scatterplot

Figures

Figure

Photo courtesy of Ed Rhodes

Figure

Full-size Figures

You can use the {.background-image} container environment to completely fill the slide background with an image.

Ideally, your figure will be the same aspect ratio as the screen that you’re presenting on.

  • This can be a bit tricky because of the dynamic nature of reveal.js / HTML. But it’s probably something close to 16:9.
  • Aspect ratio can also matter for a regular full-frame images (previous slide).

Tables

Table

Quarto provides support for creating tables with markdown, html, R, Python and more: https://quarto.org/docs/authoring/tables.html

Table

With a little effort you can create amazing html tables using the gt R package.

Global Population Increase
Top 50 countries by total population change (1960-2020)

Contact us

We’d love to talk about all things water

References

Biddle, Jennifer C. 2017. “Improving the Effectiveness of Collaborative Governance Regimes: Lessons from Watershed Partnerships.” Journal of Water Resources Planning and Management 143 (9): 04017048. https://doi.org/10.1061/(ASCE)WR.1943-5452.0000802.
Helsel, Dennis R, Robert M Hirsch, Karen R. Ryberg, Stacey A. Archfield, and E J Gilroy. 2020. Statistical Methods in Water Resources: U.S. Geological Survey Techniques and Methods, Book 4, Chapter A3. Reston, VA: USGS. https://doi.org/10.3133/tm4a3.
Schramm, Michael, Anna Gitter, and Lucas Gregory. 2022. “Total Maximum Daily Loads and Escherichia Coli Trends in Texas Freshwater Streams.” Journal of Contemporary Water Research & Education 176 (1): 36–49. https://doi.org/10.1111/j.1936-704X.2022.3374.x.

Appendix

You can add an appendix after a reference slide like this.