quarto-design
Create beautiful Quarto documents including academic articles (Distill-inspired), data blog posts with modern styling, and RevealJS presentations. Use when users request Quarto content, .qmd files, academic papers, blog posts, presentations, or modern styled documents.
Quarto Design Skill
Description: Create professional Quarto documents with three distinct styles: academic articles (Distill-inspired for research papers), data blogs (modern web design for technical writing), and RevealJS presentations (conference-ready slides).
When to use: When users request:
- Academic papers or research articles (→ Academic Article style)
- Blog posts, tutorials, or technical documentation (→ Data Blog style)
- Presentations or slide decks (→ RevealJS style)
- Any request mentioning "Quarto" or "
.qmdfiles"
Prerequisites
Required tools: Quarto CLI (installed via bash_tool if needed)
Installation:
Bundled Resources
References (references/)
Load these when implementing specific document types or needing detailed guidance:
- troubleshooting.md - Common issues and solutions for Quarto documents
- quick-reference.md - YAML headers, slide layouts, and common patterns
Assets (assets/)
Production-ready Quarto templates and examples to copy:
- academic/ - Academic article templates with Distill-inspired design
article.qmd- Complete academic article template (HTML)distillish.scss- Academic theme stylesheet (wider 1050px layout)refs.bib- BibTeX bibliography examplepaper-pdf.qmd- Basic PDF output templateacademic-pdf.qmd- Enhanced PDF template with KOMA-Script, professional tables, math environments
- blog/ - Data blog post templates with modern styling
post.qmd- Blog post templateblog.scss- Blog theme stylesheet
- presentation/ - RevealJS presentation templates
presentation.qmd- Slide deck templatecustom.scss- Presentation theme
- presentation-template.qmd - Standalone presentation template
- index.qmd - Landing page template
- custom.scss - Reusable custom theme
- site.scss - Website theme stylesheet
- _quarto.yml - Project configuration example
Core Quarto Concepts
Document Formats
Quarto supports multiple output formats from a single source:
- HTML: Web pages, documentation sites, interactive content
- PDF: Academic papers, reports (requires LaTeX)
- RevealJS: Modern HTML presentations
- MS Word/PowerPoint: Office compatibility
YAML Front Matter Structure
Every .qmd file starts with YAML metadata:
Document Type 1: Academic Articles (Distill-Inspired)
Overview
Use this style for:
- Research papers and academic articles
- Technical reports with citations
- Documents needing margin notes and figures
- Publications requiring DOI and author affiliations
Key Features
- Distill-inspired layout: Balanced body column (1050px) optimized for modern screens
- Serif typography: Source Serif 4 for body, Inter for UI elements
- Margin notes: Side annotations like the original Distill framework (HTML only)
- Academic metadata: Full author affiliations, ORCID, DOI support
- Citation support: BibTeX bibliography with inline citations
- Figure captions: Margin or side placement options (HTML only)
- Responsive figures: Full-width layout classes for optimal readability
- Wider container: 1600px max-width for better screen utilization
⚠️ IMPORTANT: HTML vs PDF Features
- Margin notes (
::: {.column-margin}) are HTML-only - do NOT use in PDF documents - Side figures (
fig-cap-location: margin) are HTML-only - usefig-cap-location: bottomfor PDFs - Use
article.qmdfor HTML output with margin features - Use
academic-pdf.qmdfor PDF output without margin features
CRITICAL: Common Pitfalls to Avoid
⚠️ SCSS Layer Boundaries Required
- SCSS files MUST include
/*-- scss:defaults --*/and/*-- scss:rules --*/boundaries - Without these, Quarto will fail with "doesn't contain at least one layer boundary" error
- See TROUBLESHOOTING.md for details
⚠️ Use page-layout: full Not article
- Modern screens need
page-layout: fullwithmax-width: 1600px - Old
page-layout: articlecreates excessive white space (760px body on 1920px screens) - Update both YAML (
page-layout: full) and SCSS (main.content max-width: 1050px)
⚠️ Figures Too Small by Default
- Add figure layout classes (
.page-full,.body-outset) to SCSS - Ensure
figure img { width: 100%; height: auto; }for proper scaling - Without this, figures appear tiny and unreadable
See TROUBLESHOOTING.md for complete solutions
File Structure
Required files:
article.qmd- Main documentdistillish.scss- Academic theme stylesheetrefs.bib- BibTeX bibliography (optional but recommended)
Complete Example
File: article.qmd
Event Study
Results
Table: Summary statistics.
| Group | Mean | SD |
|---|---|---|
| A | 5.1 | 1.2 |
| B | 4.7 | 1.4 |
::: {.column-margin}

::: callout-important Result. We reject the null at 1% across all specifications. :::
Discussion
We find substantial heterogeneity by baseline infrastructure and seasonality. See robustness in Appendix.
References
**File: `distillish.scss`**
```scss
/*-- scss:defaults --*/
/* IMPORTANT: Quarto requires these layer boundaries */
/* Type & palette */
:root {
--font-serif: "Source Serif 4", ui-serif, Georgia, "Times New Roman", serif;
--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
--ink-900: #111827;
--ink-700: #374151;
--ink-500: #6b7280;
--brand-600: #4f46e5; /* subtle indigo accent */
--ring: rgba(79,70,229,.35);
}
/*-- scss:rules --*/
html, body {
background: #ffffff;
color: var(--ink-800, #1f2937);
scroll-behavior: smooth;
}
body {
font-family: var(--font-serif);
font-size: 1.05rem;
line-height: 1.65;
max-width: 100%;
}
/* IMPROVED: Wider layout for better screen usage and readability */
.quarto-container {
max-width: 1600px !important;
margin: 0 auto;
}
/* IMPROVED: Increased from 760px to 1050px for better readability */
main.content {
max-width: 1050px;
padding: 2rem 3rem 3rem;
margin: 0 auto;
}
article {
max-width: 1600px;
margin: 0 auto;
}
/* Floating ToC on the right; keep airy */
#TOC.toc-active {
background: #fff;
border: 1px solid rgba(2,6,23,.06);
border-radius: 12px;
box-shadow: 0 6px 18px rgba(2,6,23,.06);
padding: 0.8rem 0.8rem 0.9rem;
}
#TOC .toc-title { font-weight: 700; color: var(--ink-900); }
#TOC a { text-decoration: none; border-bottom: none; }
/* Title block: academic byline look */
.quarto-title-block {
margin-bottom: 1.8rem;
}
.quarto-title h1, .quarto-title .title {
font-family: var(--font-serif);
font-weight: 700;
letter-spacing: -0.01em;
color: var(--ink-900);
font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
line-height: 1.15;
}
.quarto-title .subtitle { color: var(--ink-500); margin-top: .25rem; }
.quarto-title .quarto-title-authors { margin-top: .6rem; }
.quarto-title .quarto-title-affiliations { color: var(--ink-500); }
/* Abstract block */
.abstract, .abstract > p {
background: #fbfbff;
border: 1px solid rgba(79,70,229,.12);
border-radius: 12px;
padding: 1rem 1.1rem;
box-shadow: 0 6px 20px rgba(15,23,42,.04);
}
.abstract > .abstract-title {
font-family: var(--font-sans);
font-weight: 700;
color: var(--ink-900);
margin-bottom: .35rem;
}
/* Headings: serif with subtle rule under h2 to echo Distill */
h2 {
font-family: var(--font-serif);
font-weight: 700;
color: var(--ink-900);
margin-top: 2.2rem;
padding-bottom: .2rem;
border-bottom: 1px solid rgba(2,6,23,.08);
}
h3 {
font-family: var(--font-serif);
font-weight: 600;
color: var(--ink-700);
margin-top: 1.6rem;
}
/* Links */
a {
color: var(--brand-600);
text-decoration: none;
border-bottom: 1px solid rgba(79,70,229,.25);
transition: color .2s ease, border-color .2s ease;
}
a:hover { color: #4338ca; border-bottom-color: rgba(79,70,229,.5); }
a:focus { outline: 3px solid var(--ring); outline-offset: 2px; }
/* Figures: margin captions (Quarto handles placement) */
.figure, figure { margin: 1.2rem 0; }
figcaption {
font-family: var(--font-sans);
font-size: .92rem;
color: var(--ink-500);
}
/* Figure layout classes (Distill-style) - prevents figures from being too small */
figure.page-full {
width: 100%;
max-width: 100%;
margin: 2rem 0;
}
figure.body-outset {
width: calc(100% + 200px);
margin-left: -100px;
}
figure.page-outset {
width: calc(100% + 400px);
margin-left: -200px;
}
/* Ensure all images scale properly */
figure img {
width: 100%;
height: auto;
display: block;
}
/* Tables: clean, numeric-friendly */
table {
border-collapse: collapse; width: 100%;
margin: 1rem 0;
font-size: .98rem;
}
thead th {
text-transform: uppercase;
letter-spacing: .035em;
font-family: var(--font-sans);
font-weight: 700;
color: var(--ink-700);
border-bottom: 1px solid rgba(2,6,23,.1);
}
td, th { padding: .55rem .6rem; }
tbody tr:nth-child(even) { background: rgba(2,6,23,.025); }
/* Code: sober blocks, serif body + mono code */
code, pre, kbd, samp {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
code {
background: #f5f7ff;
border: 1px solid rgba(79,70,229,.12);
border-radius: 6px;
padding: .12rem .34rem;
}
pre code {
display: block;
background: #0c1224;
color: #e8ebfb;
border-radius: 10px;
padding: 1rem 1.1rem;
box-shadow: inset 0 12px 28px rgba(0,0,0,.35);
}
/* Callouts: muted academic colors */
.callout { border-radius: 12px; }
.callout-note { border-left: 5px solid #2563eb; background: #eef2ff; }
.callout-tip { border-left: 5px solid #059669; background: #ecfdf5; }
.callout-important { border-left: 5px solid #b91c1c; background: #fef2f2; }
/* Margin notes/figures (Distill hallmark) */
.column-margin {
font-family: var(--font-sans);
color: var(--ink-700);
font-size: .95rem;
}
.column-margin .figure img { width: 100%; border-radius: 8px; }
/* Footnotes: compact, readable */
.footnotes {
border-top: 1px solid rgba(2,6,23,.08);
margin-top: 2rem; padding-top: .8rem;
font-size: .95rem;
}
.footnotes ol { padding-left: 1rem; }
/* Dark mode */
.quarto-dark {
body { background: #0b1020; color: #e6e9f6; }
main.content { box-shadow: none; }
#TOC.toc-active { background: #0f152c; border-color: rgba(255,255,255,.08); }
a { color: #a5b4fc; border-bottom-color: rgba(165,180,252,.35); }
a:hover { color: #c7d2fe; }
.abstract { background: #0f152c; border-color: rgba(165,180,252,.18); }
h2 { border-bottom-color: rgba(255,255,255,.08); color: #f3f4f6; }
thead th { border-bottom-color: rgba(255,255,255,.1); color: #e5e7eb; }
tbody tr:nth-child(even) { background: rgba(255,255,255,.03); }
code { background: rgba(255,255,255,.06); color: #eaeaff; border-color: rgba(255,255,255,.08); }
pre code { background: #0b1020; }
.callout-note { background: rgba(99,102,241,.12); }
.callout-tip { background: rgba(16,185,129,.12); }
.callout-important { background: rgba(239,68,68,.12); }
}
File: refs.bib (Example bibliography)
Academic Article Patterns
Margin Notes
Margin Figures
Math Equations
Footnotes
Citations
Multiple Authors
Academic PDF Output (Enhanced)
For submission to journals or preprint archives, use the enhanced academic-pdf.qmd template which provides publication-quality output suitable for economics, statistics, and social science journals.
⚠️ PDF-SPECIFIC GUIDANCE:
- DO NOT use margin notes (
::: {.column-margin}) - these are HTML-only features - DO NOT use
fig-cap-location: margin- usefig-cap-location: bottomfor PDFs - DO NOT use side charts - place all figures inline within the text
- PDF documents use standard single-column layout without margin annotations
Key Features of Enhanced PDF Template:
- KOMA-Script (
scrartcl) document class for professional typography - Palatino font (mathpazo) with matching mathematics
- Professional tables with booktabs, dcolumn for decimal alignment
- Standard layout - no margin features, optimized for print and journal submission
- Comprehensive math packages (amsmath, amssymb, amsthm)
- Custom environments for theorems, propositions, definitions
- Better spacing with microtype, optimized margins (1.25" left/right)
- Publication-ready with proper citations, footnotes, and appendices
Quick Start:
The template includes example content showing regression tables, equations, appendices, and proper academic formatting. Customize the YAML front matter for your paper.
Academic PDF Output (Standard)
For submission to journals or preprint archives, you can also create PDFs from scratch. Quarto can generate beautiful PDFs that rival LaTeX documents.
Prerequisites: Install a LaTeX distribution:
- macOS:
brew install --cask mactexor BasicTeX - Linux:
sudo apt-get install texlive-full - Windows: Install MiKTeX from https://miktex.org/
PDF-Ready YAML Configuration
File: paper.qmd (for PDF output)
Dual Output (HTML + PDF)
For maximum flexibility, configure both HTML and PDF outputs:
Render both:
Or render all formats:
PDF-Specific Formatting Options
Document Classes (common in economics/academia):
Journal-Specific Styles:
Fonts (professional options):
Spacing and Margins:
Table of Contents:
PDF Tables and Figures
Professional Tables:
Regression Tables (with code):
Figures:
PDF-Specific Features
Page Breaks:
Landscape Pages (for wide tables):
Appendix:
Custom Headers/Footers:
Citation Styles for PDFs
Download CSL files from https://github.com/citation-style-language/styles
Common styles:
Math and Equations
Inline math: $\beta_1 x_i + \epsilon_i$
Display equations:
Aligned equations:
Common PDF Issues and Solutions
Issue: Long URLs breaking page margins
Issue: Code blocks too wide
Issue: Tables too wide
Issue: Figures not appearing
Rendering Commands
Render PDF:
Keep intermediate files (for debugging):
Verbose output (see LaTeX errors):
Academic PDF Template
Complete submission-ready example:
Tips for Academic PDFs
- Use simple table syntax - Complex HTML tables won't render well in PDF
- Keep code output clean - Hide or format code output for readability
- Use PDF-compatible images - Convert SVGs to PDF or PNG
- Test early - Render PDF frequently to catch formatting issues
- Keep .tex file - Use
keep-tex: truefor journal submission requirements - Use standard LaTeX packages - Stick to well-supported packages
- Preview before final - Check page breaks, widows/orphans, figure placement
Document Type 2: Data Blogs (Modern Web Design)
Overview
Use this style for:
- Blog posts and tutorials
- Technical documentation
- Data science notebooks
- Modern web content with interactive elements
Key Features
- Modern MDX-inspired design: Hero sections, feature cards, badges
- Sans-serif typography: Inter for readability
- Interactive elements: Code tabs, collapsible sections, callout boxes
- Gradients and shadows: Professional depth without clutter
- Responsive grid layouts: Multi-column content organization
- Dark mode support: Accessible across preferences
File Structure
Required files:
post.qmdorindex.qmd- Main blog postblog.scss- Modern blog stylesheet- Optional:
_quarto.ymlfor multi-post blogs
Complete Example
File: post.qmd
conda
poetry
:::
Your First Chart
Key Features
::: {.features} ::: {.feature-card}
🎨 Beautiful
Modern design that looks great everywhere :::
::: {.feature-card}
⚡ Fast
Optimized rendering for instant results :::
::: {.feature-card}
🔧 Flexible
Customize every aspect of your charts ::: :::
Advanced Topics
<details> <summary>Click to expand: Performance optimization</summary>When working with large datasets:
- Use data sampling for initial exploration
- Enable caching with
freeze: auto - Consider using Parquet format for data storage
::: callout-warning
Breaking Change
Version 2.0 introduces a new API. See the migration guide. :::
Conclusion
<span class="badge">Advanced</span> <span class="badge good">Recommended</span>
You're now ready to create stunning visualizations!
Further Reading
**File: `blog.scss`**
```scss
/*-- scss:defaults --*/
// Modern blog color palette
$body-bg: #fafbfc;
$body-color: #1e293b;
$link-color: #2563eb;
$link-color-hover: #1d4ed8;
$code-bg: #f8fafc;
$code-color: #e11d48;
// Typography - Inter for modern look
$font-family-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
$font-family-monospace: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
/*-- scss:rules --*/
// Import Inter font
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
body {
font-family: $font-family-sans-serif;
font-size: 1.05rem;
line-height: 1.7;
color: $body-color;
background: $body-bg;
}
// Hero section
.hero {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 4rem 2rem;
border-radius: 16px;
margin-bottom: 3rem;
box-shadow: 0 20px 60px rgba(0,0,0,0.15);
text-align: center;
h1 {
font-size: clamp(2rem, 5vw, 3.5rem);
font-weight: 700;
letter-spacing: -0.02em;
margin-bottom: 1rem;
}
p {
font-size: 1.25rem;
opacity: 0.95;
margin-bottom: 2rem;
}
}
.hero-buttons {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
margin-top: 1.5rem;
.btn-primary, .btn-secondary {
padding: 0.75rem 1.5rem;
border-radius: 8px;
text-decoration: none;
font-weight: 600;
transition: all 0.2s;
}
.btn-primary {
background: white;
color: #667eea;
&:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(255,255,255,0.3);
}
}
.btn-secondary {
background: rgba(255,255,255,0.1);
color: white;
border: 2px solid rgba(255,255,255,0.3);
&:hover {
background: rgba(255,255,255,0.2);
border-color: rgba(255,255,255,0.5);
}
}
}
// Typography
h1, h2, h3, h4, h5, h6 {
font-weight: 600;
letter-spacing: -0.01em;
color: #0f172a;
}
h2 {
font-size: 1.875rem;
margin-top: 2.5rem;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 3px solid #e2e8f0;
}
h3 {
font-size: 1.5rem;
margin-top: 2rem;
color: #334155;
}
// Links
a {
color: $link-color;
text-decoration: none;
transition: color 0.2s ease;
&:hover {
color: $link-color-hover;
text-decoration: underline;
}
}
// Feature cards
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
background: white;
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 2rem;
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
transition: all 0.3s ease;
&:hover {
transform: translateY(-4px);
box-shadow: 0 12px 28px rgba(0,0,0,0.12);
border-color: #cbd5e1;
}
h3 {
font-size: 1.25rem;
margin-top: 0;
margin-bottom: 0.5rem;
}
p {
color: #64748b;
margin: 0;
}
}
// Code styling
code {
background: $code-bg;
border: 1px solid #e2e8f0;
border-radius: 6px;
padding: 0.2em 0.4em;
font-size: 0.9em;
font-family: $font-family-monospace;
color: $code-color;
}
pre {
background: #0f172a;
border-radius: 12px;
padding: 1.5rem;
overflow-x: auto;
box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
code {
background: transparent;
border: none;
color: #e2e8f0;
padding: 0;
}
}
// Code folding
.code-with-filename .code-with-filename-file {
background: #1e293b;
color: #94a3b8;
padding: 0.5rem 1rem;
border-radius: 8px 8px 0 0;
font-family: $font-family-monospace;
font-size: 0.875rem;
}
// Callout boxes
.callout {
border-radius: 12px;
padding: 1rem 1.25rem;
margin: 1.5rem 0;
border-left: 4px solid;
&.callout-note {
background: #eff6ff;
border-color: #3b82f6;
.callout-icon { color: #3b82f6; }
}
&.callout-tip {
background: #f0fdf4;
border-color: #10b981;
.callout-icon { color: #10b981; }
}
&.callout-warning {
background: #fef3c7;
border-color: #f59e0b;
.callout-icon { color: #f59e0b; }
}
&.callout-important {
background: #fef2f2;
border-color: #ef4444;
.callout-icon { color: #ef4444; }
}
.callout-title {
font-weight: 600;
margin-bottom: 0.5rem;
}
}
// Badges
.badge {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.875rem;
font-weight: 600;
background: #e2e8f0;
color: #475569;
margin-right: 0.5rem;
&.good {
background: #dcfce7;
color: #166534;
}
&.warn {
background: #fef3c7;
color: #92400e;
}
&.info {
background: #dbeafe;
color: #1e40af;
}
}
// Tabset styling
.panel-tabset {
border: 1px solid #e2e8f0;
border-radius: 12px;
overflow: hidden;
margin: 1.5rem 0;
.panel-tabset-tabby {
background: #f8fafc;
border-bottom: 2px solid #e2e8f0;
}
.nav-link {
padding: 0.75rem 1.5rem;
color: #64748b;
font-weight: 500;
border: none;
border-bottom: 3px solid transparent;
transition: all 0.2s;
&:hover {
color: #334155;
background: #f1f5f9;
}
&.active {
color: $link-color;
border-bottom-color: $link-color;
background: white;
}
}
}
// Tables
table {
width: 100%;
border-collapse: collapse;
margin: 1.5rem 0;
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
thead {
background: #f8fafc;
border-bottom: 2px solid #e2e8f0;
}
th {
padding: 0.75rem 1rem;
text-align: left;
font-weight: 600;
color: #0f172a;
}
td {
padding: 0.75rem 1rem;
border-bottom: 1px solid #f1f5f9;
}
tbody tr:hover {
background: #f8fafc;
}
}
// Details/Summary (collapsible sections)
details {
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 1rem;
margin: 1rem 0;
background: white;
summary {
cursor: pointer;
font-weight: 600;
color: $link-color;
user-select: none;
&:hover {
color: $link-color-hover;
}
}
&[open] summary {
margin-bottom: 0.75rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid #e2e8f0;
}
}
// Dark mode
@media (prefers-color-scheme: dark) {
body {
background: #0f172a;
color: #e2e8f0;
}
h1, h2, h3, h4, h5, h6 {
color: #f1f5f9;
}
.feature-card {
background: #1e293b;
border-color: #334155;
}
code {
background: #1e293b;
border-color: #334155;
color: #f87171;
}
.callout {
&.callout-note { background: rgba(59,130,246,0.1); }
&.callout-tip { background: rgba(16,185,129,0.1); }
&.callout-warning { background: rgba(245,158,11,0.1); }
&.callout-important { background: rgba(239,68,68,0.1); }
}
details {
background: #1e293b;
border-color: #334155;
}
table {
background: #1e293b;
thead { background: #0f172a; }
td { border-color: #334155; }
tbody tr:hover { background: #334155; }
}
}
Data Blog Patterns
Hero Section
Feature Grid
Code Tabs
R
Julia
:::
**Badges**
```markdown
<span class="badge">Tutorial</span>
<span class="badge good">Beginner-Friendly</span>
<span class="badge warn">Beta</span>
<span class="badge info">Updated</span>
Collapsible Details
Code Folding
## Document Type 3: RevealJS Presentations
### Overview
Use this style for:
- Conference presentations
- Lecture slides
- Business presentations
- Interactive demos
### Key Features
- **Modern slide design**: Clean layouts with subtle gradients
- **Title slide gradient**: Eye-catching opening
- **Multiple layouts**: Two-column, three-column, quote slides, image slides
- **Incremental reveals**: Animated list items and fragments
- **Speaker notes**: Hidden presenter information
- **Code highlighting**: Line-by-line code emphasis
### File Structure
**Required files**:
1. `presentation.qmd` - Main presentation
2. `custom.scss` - Presentation theme
### Complete Example
**File: `presentation.qmd`**
```yaml
---
title: "Modern Data Science"
subtitle: "Tools and Techniques for 2025"
author: "Your Name"
institute: "Your Organization"
date: today
format:
revealjs:
theme: [default, custom.scss]
slide-number: true
transition: slide
transition-speed: fast
highlight-style: github
preview-links: true
controls: true
progress: true
history: true
center: true
footer: "<span>Your Organization</span><span>{title}</span>"
logo: images/logo.png
css: extras.css
---
# Introduction {.section-header background-color="#1e3a5f"}
## About This Talk
::: incremental
- Modern data science landscape
- Key tools and frameworks
- Practical examples
- Best practices
:::
::: notes
Remember to introduce yourself and mention the agenda.
Ask if anyone has questions before starting.
:::
## Two-Column Layout
::: columns
::: column
### Left Side
- Point 1
- Point 2
- Point 3
:::
::: column
### Right Side

:::
:::
# Key Concepts {.section-header background-color="#2563eb"}
## Feature Cards
::: {.grid-3}
::: {.feature-card}
**Fast**
Lightning-quick processing
:::
::: {.feature-card}
**Scalable**
Handles any data size
:::
::: {.feature-card}
**Simple**
Easy to learn and use
:::
:::
## Quote Slide
::: {.quote-slide}
> "The best way to predict the future is to invent it."
>
> — Alan Kay
:::
## Code Example
```{.python code-line-numbers="1-2|3-4|5"}
import pandas as pd
import numpy as np
data = pd.read_csv('large_dataset.csv')
result = data.groupby('category').mean()
Fragments
::: {.fragment} This appears first :::
::: {.fragment .fade-in} This fades in :::
::: {.fragment .highlight-red} This gets highlighted :::
Conclusion {.section-header background-color="#059669"}
Summary
- Covered modern tools
- Showed practical examples
- Shared best practices
::: notes Thank the audience. Mention where slides will be available. Open for questions. :::
**File: `custom.scss`**
```scss
/*-- scss:defaults --*/
// Color palette
$body-bg: #f8f9fa;
$body-color: #333333;
$link-color: #4a90e2;
$link-color-hover: #357abd;
$presentation-heading-color: #1e3a5f;
$code-block-bg: #f5f5f5;
$code-color: #e83e8c;
// Typography
$presentation-font-size-root: 40px;
$presentation-heading-font: 'Inter', system-ui, -apple-system, sans-serif;
$presentation-font: 'Inter', system-ui, -apple-system, sans-serif;
/*-- scss:rules --*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
.reveal {
font-family: $presentation-font;
color: $body-color;
background: $body-bg;
// Headings
h1, h2, h3, h4, h5, h6 {
font-family: $presentation-heading-font;
letter-spacing: -0.02em;
font-weight: 600;
}
h2 {
color: $presentation-heading-color;
border-bottom: 3px solid $link-color;
padding-bottom: 0.5rem;
margin-bottom: 1.5rem;
}
// Code styling
code {
background-color: #f0f0f0;
padding: 0.2em 0.4em;
border-radius: 3px;
font-size: 0.85em;
}
pre code {
background-color: $code-block-bg;
padding: 1rem;
border-radius: 8px;
border-left: 4px solid $link-color;
}
// Emphasis
strong {
color: $presentation-heading-color;
font-weight: 600;
}
em {
color: #555;
font-style: italic;
}
// Links
a {
color: $link-color;
text-decoration: none;
transition: color 0.2s;
&:hover {
color: $link-color-hover;
text-decoration: underline;
}
}
// Slides
.slides section {
transition: all 0.3s ease;
text-align: left;
}
// Lists
ul, ol {
line-height: 1.8;
}
li {
margin-bottom: 0.5rem;
}
}
// Title slide gradient
.reveal .slide-background.title-slide {
background: linear-gradient(135deg, #1e3a5f 0%, #4a90e2 100%);
}
.title-slide h1,
.title-slide h2,
.title-slide p {
color: white !important;
border: none !important;
}
/*-- Layout Utilities --*/
.columns {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
align-items: start;
}
.grid-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.5rem;
}
.quote-slide {
display: grid;
place-items: center;
text-align: center;
background: linear-gradient(135deg, #dbeafe, #eef2ff);
border-radius: 1rem;
padding: 3rem;
height: 100%;
}
.quote-slide blockquote {
font-size: 1.8rem;
font-style: italic;
color: $presentation-heading-color;
border: none;
margin: 0;
}
// Feature cards
.feature-card {
background: white;
border: 1px solid #e5e7eb;
border-radius: 12px;
padding: 1.5rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
transition: transform 0.2s, box-shadow 0.2s;
&:hover {
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
}
// Section headers
.section-header h1 {
color: white;
font-size: 3rem;
}
// Dark mode
.reveal.dark-mode {
background: #1a202c;
color: #e2e8f0;
h1, h2, h3, h4, h5, h6 {
color: #f7fafc;
}
code {
background-color: #2d3748;
color: #f7fafc;
}
.feature-card {
background: #2d3748;
border-color: #4a5568;
}
}
Presentation Patterns
Section Divider
Two Columns
Three-Column Grid
Incremental Lists
Speaker Notes
Code Highlighting
**Fragments**
```markdown
::: {.fragment}
Default fragment
:::
::: {.fragment .fade-in}
Fade in
:::
::: {.fragment .highlight-red}
Highlight red
:::
Best Practices
Choosing the Right Document Type
Use Academic Articles when:
- Writing research papers or technical reports
- Need citations and bibliography
- Want margin notes and side figures
- Targeting academic journals or preprints
Use Data Blogs when:
- Creating tutorials or how-to guides
- Building technical documentation
- Writing blog posts or articles
- Need modern web design with interactive elements
Use RevealJS when:
- Presenting at conferences or meetings
- Creating lecture slides
- Building pitch decks
- Need speaker notes and incremental reveals
File Organization
project/
├── _quarto.yml # Project configuration
├── academic/ # Academic articles
│ ├── article.qmd
│ ├── distillish.scss
│ └── refs.bib
├── blog/ # Blog posts
│ ├── post-1/
│ │ ├── index.qmd
│ │ └── blog.scss
│ └── post-2/
│ └── index.qmd
├── presentations/ # Slide decks
│ ├── talk-1.qmd
│ └── custom.scss
└── images/ # Shared assets
Common Metadata Options
All document types:
Academic articles only:
Blog posts only:
Presentations only:
Rendering Commands
Preview (live reload):
Render to HTML:
Render entire project:
Render to PDF (requires LaTeX):
Troubleshooting
Issue: Styles not applying
- Solution: Ensure SCSS file is in same directory or properly referenced in YAML
- Check YAML indentation (use spaces, not tabs)
Issue: Fonts not loading
- Solution: Check internet connection for Google Fonts
- Add font import in
include-in-headersection
Issue: Images not displaying
- Solution: Use relative paths from document location
- Ensure image files exist in specified location
Issue: Code not executing
- Solution: Verify language kernel is installed (R, Python, Julia)
- Check
executeoptions in YAML
Issue: Citations not working
- Solution: Verify
refs.bibfile exists and is referenced in YAML - Ensure citation keys match those in .bib file
- Use
@citationkeysyntax for in-text citations
Output Instructions
When using this skill, Claude should:
-
Determine document type by asking or inferring from context:
- Academic paper/research → Academic Article
- Blog post/tutorial → Data Blog
- Presentation/slides → RevealJS
-
Create complete, working files:
- Main
.qmdfile with appropriate YAML - Corresponding
.scsstheme file - Any supporting files (bibliography, images)
- Optional
_quarto.ymlfor multi-document projects
- Main
-
Include in YAML:
- All necessary format options
- Appropriate metadata for document type
- Font imports if using custom fonts
- Theme reference
-
Add helpful comments:
- Explain YAML options
- Note customization points in SCSS
- Provide usage instructions
-
Structure content appropriately:
- Use document-appropriate patterns
- Include example content/placeholders
- Demonstrate key features of the style
-
Save files to
/mnt/user-data/outputs/with descriptive names -
Provide clear instructions:
- How to preview:
quarto preview file.qmd - How to render:
quarto render file.qmd - Customization guidance
- Next steps for content development
- How to preview:
Quick Start Templates
Minimal Academic Article
Minimal Blog Post
Minimal Presentation
Resources
- Official Documentation: https://quarto.org/docs/
- Gallery: https://quarto.org/docs/gallery/
- RevealJS Guide: https://quarto.org/docs/presentations/revealjs/
- Publishing: https://quarto.org/docs/publishing/
- Extensions: https://quarto.org/docs/extensions/
Remember: The goal is to create beautiful, functional Quarto documents that match the requested style. Always provide complete working examples with all necessary files, and ensure users can immediately preview and customize the output.