Using Quarto as a Teaching Tool

Brown Bag - 30 September 2026

Luc Bridet, David Jaeger & Neil Lloyd

Posit

From the company that brought you RStudio, R Markdown, and more recently Positron, comes

an open-source scientific and technical publishing system.

Basics

Everything is prepared in a Quarto markdown file (.qmd). For example,

## New slide title

Add a list of

1. item 1
2. item 2

   a. sub-item 1
   
Add some maths: $\hat{\beta}$ is defined as

$$
  \hat{\beta} = (X'X)^{-1}X'Y
$$

:::{.callout-important}
This is the most important equation in this module.
:::

```{r}
#| echo: true
x <- 1:10
sum(x)
```

New slide title

Add a list of

  1. item 1

  2. item 2

    1. sub-item 1

Add some maths: \(\hat{\beta}\) is defined as

\[ \hat{\beta} = (X'X)^{-1}X'Y\]

Important

This is the most important equation in this module.

Add some code:

x <- 1:10
sum(x)
[1] 55

Here’s a few things we’ve learnt…

Code management and programming

Example: Luc’s PP5000 webpage

Content management and workflow

Example: David’s PP5001 webpage

Design and formatting

Example: Neil’s EC3301 webpage

Summary

Pros

  1. Accessibility: Creating digital resources solves a well known problem of screen readibility of PDF documents. Solve this problem by publishing simultaneously

    • multiple formats: .docx, .pdf, .html, etc.
  2. Flexibility: write in markdown, publish as website, document, presentations, blog, dashboard, etc.

    • more authentic and creative modes of assessment (in the age of AI)
    • more modern, engaging material
  3. Reproducibility: Incorporate reproducible code directly into your documents.

    • ‘single source of truth’
    • using a range of languages: R, Python, Julia, even software like Stata
    • integration with AI-assisted workflow
  4. Interactivity: Create “live” interactive documents that allow you to interact with data in real time.

Cons

Here are a few things you will need to consider:

  • Formatting html documents requires the use of a CSS/SCSS style sheet

    • AI can help with this, or just ‘keep it simple stupid’
    • Markdown is an intentionally simple (easy-to-learn) language
    • Can enhance with html
  • Coding within a markdown file requires the use of code blocks

    • Not how you order research/analysis
    • Not necessarily how you want your students to engage with code
    • Debugging can be inefficient
    • Replacement more for .tex/.pptx than .do/.R/.py
  • Numbered lists and footnotes: 🤦‍♂️+😭+🤬

A quick guide:

David has created a helpful Quarto (and Positron) guide for the MPP students:

Questions

neil.lloyd@st-andrews.ac.uk / https://neil-lloyd.github.io/digital-resources/ david.jaeger@st-andrews.ac.uk / https://www.djaeger.org/teaching/mpp/quarto/ luc.bridet@st-andrews.ac.uk /