quarto authoring

Skill

Use when the user is explicitly working with Quarto, .qmd files, _quarto.yml, Quarto projects, or Quarto features such as callouts, cross-references, citations, Mermaid diagrams, extensions, websites, books, presentations, and reports. Also use for explicit migration from or comparison with R Markdown, bookdown, blogdown, xaringan, distill, or Jupyter notebooks to Quarto. Do not use for general R Markdown or related-format questions unless Quarto or migration to Quarto is explicitly mentioned.

Files22
  • @skills/quarto-authoring/SKILL.md
  • @skills/quarto-authoring/references/callouts.md
  • @skills/quarto-authoring/references/citations.md
  • @skills/quarto-authoring/references/code-cells.md
  • @skills/quarto-authoring/references/conditional-content.md
  • @skills/quarto-authoring/references/conversion-blogdown.md
  • @skills/quarto-authoring/references/conversion-bookdown.md
  • @skills/quarto-authoring/references/conversion-distill.md
  • @skills/quarto-authoring/references/conversion-jupyter.md
  • @skills/quarto-authoring/references/conversion-rmarkdown.md
  • @skills/quarto-authoring/references/conversion-xaringan.md
  • @skills/quarto-authoring/references/cross-references.md
  • @skills/quarto-authoring/references/diagrams.md
  • @skills/quarto-authoring/references/divs-and-spans.md
  • @skills/quarto-authoring/references/engines.md
  • @skills/quarto-authoring/references/extensions.md
  • @skills/quarto-authoring/references/figures.md
  • @skills/quarto-authoring/references/layout.md
  • @skills/quarto-authoring/references/markdown-linting.md
  • @skills/quarto-authoring/references/shortcodes.md
  • @skills/quarto-authoring/references/tables.md
  • @skills/quarto-authoring/references/yaml-front-matter.md

Quarto Authoring

This skill is based on Quarto CLI v1.9.36 (2026-03-24).

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 [blocked]
Task: Configure code cells Use: references/code-cells.md [blocked]
Task: Add figures with captions Use: references/figures.md [blocked]
Task: Create tables Use: references/tables.md [blocked]
Task: Add citations and bibliography Use: references/citations.md [blocked]
Task: Add callout blocks Use: references/callouts.md [blocked]
Task: Add diagrams (Mermaid, Graphviz) Use: references/diagrams.md [blocked]
Task: Control page layout Use: references/layout.md [blocked]
Task: Use shortcodes Use: references/shortcodes.md [blocked]
Task: Add conditional content Use: references/conditional-content.md [blocked]
Task: Use divs and spans Use: references/divs-and-spans.md [blocked]
Task: Configure YAML front matter Use: references/yaml-front-matter.md [blocked]
Task: Find and use extensions Use: references/extensions.md [blocked]
Task: Apply markdown linting rules Use: references/markdown-linting.md [blocked]
Task: Choose or configure a compute engine (knitr, jupyter, julia) Use: references/engines.md [blocked]

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 [blocked]
  • bookdown project: references/conversion-bookdown.md [blocked]
  • xaringan slides: references/conversion-xaringan.md [blocked]
  • distill article: references/conversion-distill.md [blocked]
  • blogdown site: references/conversion-blogdown.md [blocked]
  • Jupyter notebook (.ipynb) to/from Quarto: references/conversion-jupyter.md [blocked]

QMD Essentials

Basic Document Structure

markdown
---
title: "Document Title"
author: "Author Name"
date: today
format: html
---

Content goes here.
A Quarto document consists of two main parts:
  1. YAML Front Matter: Metadata and configuration at the top, enclosed by ---.
  2. Markdown Content: Main body using standard markdown syntax.

Divs and Spans

Divs use fenced syntax with three colons:
markdown
::: {.class-name}
Content inside the div.
:::
Spans use bracketed syntax:
markdown
This is [important text]{.highlight}.
Details: references/divs-and-spans.md [blocked]

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: //|
markdown
```{language}
#| label: fig-example
#| echo: false
#| fig-cap: "A scatter plot example."

# code that produces a figure
```
Set document-level defaults in YAML front matter:
yaml
execute:
  echo: false
  warning: false
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):
yaml
execute:
  cache: true
Details: references/code-cells.md [blocked]

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
markdown
```{language}
#| label: fig-plot
#| fig-cap: "A caption for the plot."

# code that produces a figure
```

See @fig-plot for the results.
Details: references/cross-references.md [blocked]

Callout Blocks

Five types: note, warning, important, tip, caution.
markdown
::: {.callout-note}
This is a note callout.
:::

::: {.callout-warning}

## Custom Title

This is a warning with a custom title.

:::
Details: references/callouts.md [blocked]

Figures

markdown
![Caption text](image.png){#fig-name fig-alt="Alt text"}
Subfigures:
markdown
::: {#fig-group layout-ncol=2}
![Sub caption 1](image1.png){#fig-sub1}

![Sub caption 2](image2.png){#fig-sub2}

Main caption for the group.
:::
Details: references/figures.md [blocked]

Tables

markdown
::: {#tbl-example}

| Column 1 | Column 2 |
| -------- | -------- |
| Data 1   | Data 2   |

Table caption.
:::
Details: references/tables.md [blocked]

Citations

markdown
According to @smith2020, the results show...
Multiple citations [@smith2020; @jones2021].
Configure in YAML:
yaml
bibliography: references.bib
csl: apa.csl
Details: references/citations.md [blocked]

Common Workflows

Creating an HTML Document

yaml
title: "My Report"
author: "Your Name"
date: today
format:
  html:
    toc: true
    code-fold: true
    theme: cosmo

Creating a PDF Document

yaml
title: "My Report"
format:
  pdf:
    documentclass: article
    papersize: a4

Creating a RevealJS Presentation

markdown
---
title: "My Presentation"
format: revealjs
---

## First Slide

Content here.

## Second Slide

More content.

Setting Up a Quarto Project

Create _quarto.yml in the project root:
yaml
project:
  type: website

website:
  title: "My Site"
  navbar:
    left:
      - href: index.qmd
        text: Home
      - href: about.qmd
        text: About

format:
  html:
    theme: cosmo

Resources

quarto-authoring — Kortix Marketplace | Kortix