This document shows the current project structure and verifies the dual-format rendering setup.
.
├── README.md # Main project documentation
├── DUAL_FORMAT_GUIDE.md # Detailed guide for dual-format rendering
├── _quarto.yml # Main Quarto configuration
├── .gitignore # Git ignore for build artifacts
├── index.qmd # Book homepage
├── styles.css # Custom CSS for HTML format
└── chapters/
├── 01-introduction.qmd # Chapter 1: Introduction
└── 02-randomized-experiments.qmd # Chapter 2: Randomized Experiments
The _quarto.yml file is configured with:
- Project Type:
book- for multi-chapter organization - Output Directory:
_book- where rendered files go - Dual Formats:
html: Full book format with sidebar navigationrevealjs: Presentation slides for each chapter
HTML Format:
- Theme: cosmo
- Table of contents enabled
- Number sections
- Custom CSS styling
RevealJS Format:
- Theme: simple
- Slide numbers enabled
- Chalkboard plugin enabled
- Output filename pattern:
{stem}-slides.html
Each chapter uses:
---
title: "Chapter Title"
format:
html:
toc: true
revealjs:
slide-number: true
---Format-specific content uses:
::: {.content-visible when-format="html"}
Content for HTML book version
:::
::: {.content-visible when-format="revealjs"}
Content for RevealJS slides
:::After running quarto render, the _book/ directory will contain:
_book/
├── index.html # Homepage
├── chapters/
│ ├── 01-introduction.html # Chapter 1 HTML
│ ├── 01-introduction-slides.html # Chapter 1 Slides
│ ├── 02-randomized-experiments.html # Chapter 2 HTML
│ └── 02-randomized-experiments-slides.html # Chapter 2 Slides
├── site_libs/ # Quarto dependencies
└── search.json # Search index
quarto renderquarto render --to html
quarto render --to revealjsquarto previewThis implementation follows the dual-format pattern by:
- Single Source Files: Each chapter is a single
.qmdfile - Format Declarations: Both formats declared in
_quarto.yml - Conditional Content: Using
when-formatfor format-specific content - Distinct Filenames: RevealJS uses
-slides.htmlsuffix - Shared Navigation: Book sidebar for HTML, slide navigation for RevealJS
-
_quarto.ymlexists with dual formats configured - Both
htmlandrevealjsformats declared - Output filename pattern set for RevealJS:
{stem}-slides.html - At least two example chapters created
- Chapters use format-specific content blocks
- Documentation created (README and DUAL_FORMAT_GUIDE)
-
.gitignoreconfigured to exclude build artifacts - Custom CSS created for HTML format
- Book structure with index page
- Chapters listed in book configuration
All elements are in place for dual-format rendering!