Mickaël Canouil (@mcanouil)
Quarto Authoring
This skill is based on Quarto CLI v1.9.36, released 2026-03-19.
When to Use What
Task: Write a new Quarto document Use: Follow “QMD Essentials” below, then see specific reference files
Task: Add cross-references Use: references/cross-references.md
Task: Configure code cells Use: references/code-cells.md
Task: Add figures with captions Use: references/figures.md
Task: Create tables Use: references/tables.md
Task: Add citations and bibliography Use: references/citations.md
Task: Add callout blocks Use: references/callouts.md
Task: Add diagrams (Mermaid, Graphviz) Use: references/diagrams.md
Task: Control page layout Use: references/layout.md
Task: Use shortcodes Use: references/shortcodes.md
Task: Add conditional content Use: references/conditional-content.md
Task: Use divs and spans Use: references/divs-and-spans.md
Task: Configure YAML front matter Use: references/yaml-front-matter.md
Task: Find and use extensions Use: references/extensions.md
Task: Apply markdown linting rules Use: references/markdown-linting.md
Task: Choose or configure a compute engine (knitr, jupyter, julia) Use: references/engines.md
Migration (only when converting an existing project)
Do NOT read these references when writing new Quarto documents. Only read the one matching the source format when the user explicitly asks to convert or migrate an existing project.
- R Markdown (.Rmd) to Quarto: references/conversion-rmarkdown.md
- bookdown project: references/conversion-bookdown.md
- xaringan slides: references/conversion-xaringan.md
- distill article: references/conversion-distill.md
- blogdown site: references/conversion-blogdown.md
- Jupyter notebook (.ipynb) to/from Quarto: references/conversion-jupyter.md
QMD Essentials
Basic Document Structure
A Quarto document consists of two main parts:
- YAML Front Matter: Metadata and configuration at the top, enclosed by
---. - Markdown Content: Main body using standard markdown syntax.
Divs and Spans
Divs use fenced syntax with three colons:
Spans use bracketed syntax:
Details: references/divs-and-spans.md
Code Cell Options Syntax
A code cell starts with triple backticks and a language identifier between curly braces. Code cells are code blocks that can be executed to produce output.
Quarto uses the language’s comment symbol + | for cell options. Options use dashes, not dots (e.g., fig-cap not fig.cap).
- R, Python, Julia:
#| - Mermaid:
%%| - Graphviz/DOT:
//|
Set document-level defaults in YAML front matter:
Caching — critical engine difference: Only suggest #| cache: true for R code cells (knitr engine). Never suggest it for other language cells — it does not work and will be silently ignored. The only correct approach is execute: cache: true in the top-level YAML front matter when using engines other than knitr. Python/Jupyter requires jupyter-cache (pip install jupyter-cache):
Details: references/code-cells.md
Cross-References
Labels must start with a type prefix. Reference with @:
- Figure:
fig-prefix, e.g.,#| label: fig-plot→@fig-plot - Table:
tbl-prefix, e.g.,#| label: tbl-data→@tbl-data - Section:
sec-prefix, e.g.,{#sec-intro}→@sec-intro - Equation:
eq-prefix, e.g.,{#eq-model}→@eq-model
Details: references/cross-references.md
Callout Blocks
Five types: note, warning, important, tip, caution.
Details: references/callouts.md
Figures
Subfigures:
Details: references/figures.md
Tables
Details: references/tables.md
Citations
Configure in YAML:
Details: references/citations.md
Common Workflows
Creating an HTML Document
Creating a PDF Document
Creating a RevealJS Presentation
Setting Up a Quarto Project
Create _quarto.yml in the project root:
Relationship to other skills
This skill covers general Quarto authoring and documents the upstream chunk-option syntax (#| label: fig-..., #| fig-cap: "...") that Quarto itself supports for figure and table captions. This repo overrides that convention for its own .qmd files: shared/writing/quarto-figure-captions.md requires div syntax (::: {#fig-...} / ::: {#tbl-...}) instead, and that lab-specific rule takes precedence over the chunk-option examples in this skill’s references/figures.md and references/tables.md whenever the document under edit belongs to this repo.