Hello Quarto

Quarto - authoring and publishing tools for collaborative scientific writing

Lars Schöbitz

April 3, 2024

This class is being recorded. Access to the recording is restricted to course participants on the Moodle platform.

Welcome! 👋

Meet the lecturers

Margaux Götschmann

Headshot of Margaux Götschmann

Lars Schöbitz

Headshot of Lars Schöbitz

Learning objectives

  1. Learn to use the Quarto file format and the RStudio IDE visual editing mode to produce scholarly documents with citations, footnotes, cross-references, figures, and tables.

  2. Learn to use Quarto Pub to publish a website and share research with a broader audience.

Your turn

Think about the last time you published a written document:

  • Which tasks gave you joy?
  • Which tasks were challenging or frustrating?

Take some written notes.

02:00

Quarto

authoring and publishing workflows for collaborative scientific writing

Every student will have a personal, published, free website that links to their (academic) profiles, shows slides, and has the potential to be used as a (scientific) blog.

Quarto
RStudio IDE on Posit Cloud
Quarto Pub

Why? -> Reproduciblity

Course structure

  • My turn: Lecture segments + live coding
  • Our turn: Live coding + follow along
  • Your turn: Exercises in break-out rooms

Getting help

  • During my turn and our turn segments: Please keep your microphone on mute. Send message to the Zoom chat and we will try to support you.

  • During your turn segments: Due to the large number of participants, it will not be feasible to join individual break-out rooms, but you will always be working in pairs.

Hello Quarto

Meeting you where you are

I’ll assume you

  • do not have R experience

  • have not worked in an IDE before (e.g. RStudio IDE)

  • want to learn about Quarto

I’ll teach you

  • Quarto syntax and formats

  • Markdown

  • Some R along the way!

What is Quarto?

Quarto …

  • is a new, open-source, scientific, and technical publishing system
  • aims to make the process of creating and collaborating dramatically better
A schematic representing the multi-language input (e.g. Python, R, Observable, Julia) and multi-format output (e.g. PDF, html, Word documents, and more) versatility of Quarto.

Artwork from “Hello, Quarto” keynote by Julia Lowndes and Mine Çetinkaya-Rundel, presented at RStudio Conference 2022. Illustrated by Allison Horst.

A tour of Quarto



Sit back and enjoy!

Your turn

  • Open posit.cloud & login with your details
  • Open the workspace for the course: https://posit.cloud/spaces/497061/content/all?sort=name_asc
  • Click “Start” next to the exercises project
  • Wait until the project has deployed
  • Open hello-penguins.qmd in RStudio from the Files tab in the bottom-right window
  • Render the document
  • Update your name and re-render
  • Inspect components of the document and make one more update and re-render.
10:00

From the comfort of your own workspace

A screenshot of a Quarto document rendered inside RStudio

A screenshot of a Quarto document rendered inside JupyterLab

A screenshot of a Quarto document rendered inside VSCode

Quarto formats

One install, “Batteries included”

  • RMarkdown grew into a large ecosystem, with varying syntax.
  • Quarto comes “batteries included” straight out of the box

    • HTML reports and websites
    • PDF reports
    • MS Office (Word, Powerpoint)
    • Presentations (Powerpoint, Beamer, revealjs)
    • Books
  • Any language, exact same approach and syntax

Many Quarto formats

Feature R Markdown Quarto
Basic Formats

html_document

pdf_document

word_document

html

pdf

docx

Beamer beamer_presentation beamer
PowerPoint powerpoint_presentation pptx
HTML Slides

xaringan

ioslides

revealjs

revealjs
Advanced Layout

tufte

distill

Quarto Article Layout

Many Quarto formats

Feature R Markdown Quarto
Cross References

html_document2

pdf_document2

word_document2

Quarto Crossrefs
Websites & Blogs

blogdown

distill

Quarto Websites

Quarto Blogs

Books bookdown Quarto Books
Interactivity Shiny Documents Quarto Interactive Documents
Journal Articles rticles Journal Articles
Dashboards flexdashboard Coming soon!

Your turn

In your exercises project in RStudio on Posit Cloud, go to File > New File > Quarto document to create a Quarto document with HTML output. Render the document, which will ask you to give it a name – you can use my-first-document.qmd. Use the visual editor for the next steps.

  • In the YAML header at the top of the document, add a title in the title: field and your name to the author: field.

  • Create three sections in the document formatted as Heading 2, name these sections

    • Joyful tasks
    • Challenging tasks
    • A fact to learn
  • Stretch goal: In the YAML header add a table of contents in the format: field. Tipp: Check quarto.org and use search function with “HTML table of contents”

  • Stretch goal: Change the html theme to sketchy. Tipp: Check quarto.org and use search function with “HTML theming”

10:00

Take a break

Please get up and move! Let your emails rest in peace.

This is the prompt generated by DALL-E 3 by OpenAI: A pixel art scene representing the concept of taking a break. The scene shows a serene outdoor setting with a clear blue sky. In the center, a small pixelated character is sitting comfortably on a bright green grassy hill, under the shade of a large, leafy tree. The character is depicted in a relaxed pose, perhaps sipping a warm beverage from a small cup. Nearby, a gentle stream flows, and a few fluffy white clouds drift in the sky. The overall mood of the image is peaceful and calming, emphasizing the tranquility of taking a break in nature.
10:00

Thanks! 🌻

Slides created via revealjs and Quarto: https://quarto.org/docs/presentations/revealjs/

Access slides as PDF on GitHub

All material is licensed under Creative Commons Attribution Share Alike 4.0 International.