flowchart LR qmd --> J([Jupyter]) qmd --> K([knitr]) J --> md K --> md md --> P([pandoc]) P --> pdf P --> html P --> docx
Session 2
Saturday, the 7th of February, 2026
This session focuses on building foundational skills in Quarto authoring, covering enhanced markdown capabilities, YAML configuration, and document structuring best practices.
By the end of this session, participants will be able to:
Basic text formatting you’ll use every day:
**bold** or __bold__.*italic* or _italic_.***text***.superscript^2^.subscript~2~.Verbatim code with backticks.Headers create your document structure and enable automatic table of contents generation.
Tip
Add a empty lines before and after!
Important
Quarto requires empty lines before and after lists to ensure proper rendering!
Important
The number of spaces for indentation does not matter, but the list marker must be aligned with the first character of the parent item. Items marked bad below show incorrect alignment of nested content.
Code blocks: Use triple backticks with optional language
Note
The syntax highlighting is provided by skylighting
Use colons (:) to control alignment:
:--- for left alignment.---: for right alignment.:---: for centre alignment.See Table basics for more.
Inline maths: $E = mc^2$ renders as \(E = mc^2\).
Define custom LaTeX macros in hidden blocks for reuse across your document, see Markdown Basics - Equations
Important
Footnote identifiers must be unique within the document.
Size and alignment
Alternative text and titles
See Figure basics for more.
See Divs and Spans for more.
Quarto extends standard markdown with powerful features designed specifically for computational documents.
Shortcodes are special markdown directives that generate various types of content.
They provide a simple, standardised way to insert dynamic or complex content into your Quarto documents without requiring complex markdown syntax or HTML knowledge.
| Shortcode | Description |
|---|---|
| version | Print Quarto CLI version. |
| var | Print value from _variables.yml file. |
| meta | Print value from document metadata. |
| env | Print system environment variable. |
| pagebreak | Insert a native page-break. |
| kbd | Describe keyboard shortcuts. |
| video | Embed a video in a document. |
| include | Include contents of another qmd. |
| embed | Embed cells from a Jupyter Notebook. |
| placeholder | Add placeholder images to your document. |
| lipsum | Add placeholder text to your document. |
| contents | Rearrange content in your document. |
include ShortcodeTip
Prefix your file or directory with an underscore (_) to hide from Quarto’s rendering process.
Important
The include shortcode is a plain copy-paste of the file content. Any YAML header in the included file will replace the current document’s YAML header.
flowchart LR qmd --> J([Jupyter]) qmd --> K([knitr]) J --> md K --> md md --> P([pandoc]) P --> pdf P --> html P --> docx
flowchart LR qmd --> J([Jupyter]) qmd --> K([knitr]) J --> md K --> md md --> P([pandoc]) P --> pdf P --> html P --> docx
See Diagrams for more.
Five types of callouts for better communication: note, tip, warning, caution, important.
See Callout Blocks for more.
Source
Output
r
penguins, and then,
See Code Annotation for more.
This is a figure
Figure 1 is the reference to a figure.
Any label/ID starting with fig- will be treated as a figure cross-reference.
See Basic Cross-Reference - Figures for more.
This is a table
Table 2 is the reference to a table.
Any label/ID starting with tbl- will be treated as a table cross-reference.
See Basic Cross-Reference - Tables for more.
Define a new custom cross-reference type:
float.
@txt-example).
This is text
Text 1 is the reference to a text.
See Custom Float Cross-Reference Types for more.
.bib, .bibtex, etc.).## References {#refs} for custom placement.nocite: "@*" includes all references.[@author2023] → (Author 2023)[@author2023, p. 15] → (Author 2023, 15)[@smith2020; @jones2021] → (Smith 2020; Jones 2021)@author2023 says... → Author (2023) says…[-@author2023] → (2023) - suppress authorThe YAML header serves as the configuration hub for your documents, controlling output formats, execution behaviour, and visual presentation.
Metadata Inheritance:
_quarto.yml (lowest priority)._metadata.yml (medium priority).yaml
Configure multiple output formats simultaneously and share options:
yaml
Discover more extensions at:
Objective: Enhance your Session 1 project with advanced Quarto markdown features, demonstrating authoring essentials and creating a comprehensive personal portfolio document.
Example Code:
Building on your Session 1 project, enhance your document with these new authoring features:
Add these enhanced markdown elements to your “Learning Progress” section:
Create a skills tracking table:
markdown
## Learning Progress
| Feature | Confidence Level | Notes |
|---------|:---------------:|-------|
| Basic Markdown | ⭐⭐⭐ | Comfortable with headers, lists |
| YAML Configuration | ⭐⭐ | Learning multi-format setup |
| Cross-references | ⭐ | Just discovered this! |
: My Quarto Skills Progress {#tbl-skills}
As shown in @tbl-skills, I'm making steady progress!Add callout blocks for key insights:
markdown
::: {.callout-tip}
## Today's Biggest Discovery
I learned that Quarto can render to multiple formats simultaneously -
this will revolutionise my workflow!
:::
::: {.callout-note collapse="true"}
## Session Notes
- Enhanced markdown features are powerful
- Cross-references work across formats
- YAML controls everything!
:::Create a “Skills Showcase” section demonstrating your new capabilities:
Mathematical expressions:
Code blocks with annotations:
Cross-referenced figure:
Footnotes for additional context:
Test your enhanced document:
Render to HTML
Try PDF output
Compare the outputs
✅ You’ve successfully completed the exercise if you can: