Using Quarto for Making and Organizing Teaching Materials

Joint Statistical Meeting

Maria Tackett

August 7, 2023

Outline

  • Why use Quarto to make teaching materials?

  • What teaching materials can I make using Quarto?

  • How do I get started?

Why use Quarto to make teaching materials?

Benefits for instructor

  • Reproducible course materials that are easier to update

  • Integrate narrative, executable code, images, and interactive elements

  • Easily share course materials with students and more broadly

  • Regularly use the same technology as your students

Benefits for students

  • Navigation menu on all documents

  • Search capabilities on website to more easily find content

  • Option to export PDF of slides

  • Read course materials on multiple devices

What teaching materials can I make using Quarto?

Teaching materials in Quarto

Course websites

Slides

Teaching materials in Quarto

Long-form notes

Assignment instructions

Slides

Slide menu

  • Slide navigation

  • Print to PDF

  • Speaker view

  • Annotation

  • Chalkboard

Slide with code + output

Published slide

Source code

Slide with mathematical notation

Published slide

Source code

Websites

Example website file structure

Interactive documents with webR

“Run R code in the browser without the need for an R server to execute the code”

webR source code

YAML

---
title: "webR document"
format: html
filters:
  - webr
webr:
  packages: ['dplyr', 'ggplot2']
  Cross-Origin-Opener-Policy: same-origin
  Cross-Origin-Embedder-Policy: require-corp
---

Executable code chunk

{webr-r}
mpg |>
  count(manufacturer, _____)

Caution

WebR is in active development. Learn more at github.com/coatless/quarto-webr

How do I get started?

Getting started: slides + documents

---
title: "Lecture 01"
subtitle: "Statistics 101"
author: "Instructor"
date: "August 7, 2023"
format: revealjs
---

Tip

Easily produce multiple types of documents by changing the format in the YAML.

---
title: "Lecture 01"
subtitle: "Statistics 101"
author: "Instructor"
date: "August 7, 2023"
date-format: long
footer: "URL to course website"
format: 
  revealjs:
    theme: slides.scss
    transition: fade
    slide-number: false
    incremental: false 
    chalkboard: true
    code-link: true
editor: visual
execute: 
  eval: true
  echo: true
---

Getting started: websites

  • Make a website repo on GitHub

  • Clone the repo and start a new RStudio project

  • Run the following code in the Terminal

    quarto create-project --type website

You will see the standard files for a new website in the Files pane. See Creating a Website on quarto.org for more information.

Publishing materials

Run the following code in the Terminal

GitHub pages

quarto publish gh-pages

Quarto pub

quarto publish quarto-pub

Netlify

quarto publish netlify


See Publishing Basics on quarto.org for more information and publishing options.

Course websites created with Quarto

Course slides created with Quarto

Learn more!

Thank you!

🔗 bit.ly/teach-quarto

💻 github.com/mine-cetinkaya-rundel/teach-with-quarto

📧 maria.tackett@duke.edu