Quarto: Introduction
Objectives
💡 You know what Quarto is and what it can be used for.
💡 You can create a new Quarto file and render it to HTML.
💡 You understand the basics of Markdown syntax (text formatting, headings, lists, links).
💡 You can add a YAML header to a Quarto file to configure title, author, and output format.
💡 You can integrate Quarto with Git by tracking .qmd files and ignoring generated output files.
Tasks
In this session, you will work on the following tasks:
- Reading: Read the chapter(s) Quarto Documentation in the Version Control Book.
- Implementation: Try out the commands in the chapter.
- Exercises: Work on the exercises.
As always:
- Try out the commands of this session and play around with them.
- Check whether you have achieved the learning objectives.
- Ask questions!
Exercises
Getting started with Quarto
- Create a new empty Quarto file called
my-project.qmdand save it in yourmy-projectrepository. - Write a short introduction note to your
my-projectrepository. - Switch between Quarto’s visual and source mode.
- Render the file to HTML.
Markdown formatting
- Add a new entry to the
my-project.qmdfile. - Format the text by applying at least three types of Markdown syntax.
YAML header
- Add a YAML header to your Quarto file.
- Include your name, a title, an output format (e.g., HTML), and a theme.
Slides
To export the slides to PDF, do the following:
- Toggle into Print View using the E key (or using the Navigation Menu).
- Open the in-browser print dialog (CTRL/CMD+P).
- Change the Destination setting to Save as PDF.
- Change the Layout to Landscape.
- Change the Margins to None.
- Enable the Background graphics option.
- Click Save.
Note: This feature has been confirmed to work in Google Chrome, Chromium as well as in Firefox.
Here’s what the Chrome print dialog would look like with these settings enabled:
These instructions were copied from the Quarto documentation (MIT License) and slightly modified.
Resources
- Official Quarto Documentation
- Quarto Markdown Basics
- Quartaki - 6 hour introduction to Quarto by Dr. Mowinckel
- Awesome Quarto (resource collection)
- Quarto for Academics by Mine Çetinkaya-Rundel