mcpField
Q
quarto-book

quarto-book

github.com/htlin222Documents7845 installsUpdated 3w ago
Repository

About quarto-book

quarto-book is a skill for generating Quarto Book project structures, aimed at authors of books, multi-chapter documents, technical manuals, and documentation. It includes configuration and chapter templates, with output options including HTML, PDF, EPUB, and MS Word.

Key features

  1. 01Generate Quarto Book project structure
  2. 02Provide a _quarto.yml template
  3. 03Provide chapter templates
  4. 04Output HTML, PDF, EPUB, and MS Word

Use cases

  1. 01Create a multi-chapter book project
  2. 02Set up a technical manual structure
  3. 03Generate documentation project configuration
  4. 04Render a manuscript to a chosen format

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/htlin222/dotfiles --skill quarto-book

After installing, type/quarto-bookin Claude Code to confirm it loaded.

Bundled filesscripts/generate.py

Details

From the project README

Quarto Book Generator

Generate complete Quarto Book project structure with proper configuration.

When to use

  • User wants to create a book or multi-chapter document
  • User asks to set up a Quarto book project
  • User needs a technical manual or documentation structure
  • User mentions "quarto book" or "book project"

Quick generation

Run the generator script with book name:

python3 ~/.claude/skills/quarto-book/scripts/generate.py <book-name> [--chapters N] [--author "Name"]

Or use Quarto CLI directly:

quarto create project book <book-name>

Project structure

mybook/
├── _quarto.yml      # Book configuration
├── index.qmd        # Preface/Introduction
├── intro.qmd        # Chapter 1
├── methods.qmd      # Chapter 2
├── results.qmd      # Chapter 3
├── summary.qmd      # Summary/Conclusion
├── references.qmd   # References
├── references.bib   # Bibliography
└── _book/           # Output directory (generated)

_quarto.yml template

project:
  type: book
  output-dir: _book

book:
  title: "Book Title"
  author: "Author Name"
  date: today
  chapters:
    - index.qmd
    - intro.qmd
    - methods.qmd
    - results.qmd
    - summary.qmd
    - references.qmd

bibliography: references.bib
csl: apa.csl

format:
  html:
    theme: cosmo
    toc: true
  pdf:
    documentclass: scrbook
    papersize: a4
  epub:
    toc: true

Chapter template

# Chapter Title {#sec-chapter-id}

## Section 1

Content here...

## Section 2

More content...

## References

::: {#refs}
:::

Commands

CommandDescription
quarto previewLive preview in browser
quarto renderRender all formats
quarto render --to htmlRender HTML only
quarto render --to pdfRender PDF only

Multi-part structure

For books with parts:

book:
  chapters:
    - index.qmd
    - part: "Part I: Foundation"
      chapters:
        - basics.qmd
        - theory.qmd
    - part: "Part II: Application"
      chapters:
        - methods.qmd
        - results.qmd
    - references.qmd

Output formats

  • HTML: Interactive web book with search
  • PDF: Print-ready document (requires LaTeX)
  • EPUB: E-reader format
  • MS Word: Editable document

Comments

Markdown supported