Quarto Includes

Session 4: More Quarto for Academics

Cynthia Huang

Tuesday, July 18, 2023

Listings

Listings…

  • generate summaries using metadata from:
    • existing documents and/or
    • items specified in YAML files
  • have 3 built-in types:
    • default
    • grid
    • table
  • can sort, filter and categorise your content

YAML Quick Ref

---
title: "Listing Example"
listing:
  id: sample-listings
  type: table
  contents: 
    - posts
    - archived-items.yml
  categories: true
  sort: "date desc"
  filter-ui: false
---

Learn More

Includes

Reusing Content

  • There are multiple ways to generate, combine and re-use content in Quarto
  • Basic reuse includes inserting images, raw Latex, and references from a .bib file
  • More advanced features allow you to reuse existing text content through YAML options, shortcodes, and filters
  • New features are always being introduced to Quarto

Syntax Highlighting

Add .stata to code-blocks to activate syntax highlighting:

```{.stata}
use "C:\data\data-sets\GSS2016.dta"
tab postlife
tab postlife sex,column 
```

Shortcodes and Filters

  • Quarto offers a huge variety of features with more coming!
  • Includes are a great way to re-use existing content
  • The shortcode {{< include >}} copy and pastes text for you
  • The extension include-code-files allows you to scripts with syntax highlighting

Request time!

Your turn to request!

What other aspects / features of a Quarto website would you like to learn about?