Targets
A target is a bundle of document class, page layout, and validation rules.
Set one value in pandoc.yaml and the infrastructure handles the rest:
target: book
target is an author-friendly abstraction over LaTeX's documentclass — it
also pins the preamble, the page-layout package, and which metadata fields are
required, so you set one thing instead of assembling several.
The six targets
Each standard target has a KOMA-Script counterpart — same role, modern European
book typography. book is the default.
| Target | Top-level heading | Layout | Requires |
|---|---|---|---|
book |
chapter | two-sided | description |
scrbook |
chapter | two-sided | description |
report |
chapter | single-sided | abstract |
scrreprt |
chapter | single-sided | abstract |
article |
section | single-sided | abstract |
scrartcl |
section | single-sided | abstract |
Every target also requires title and author. The chapter-vs-section split is
what makes a # heading a chapter (book, report) or a section (article).
Pick by shape of work:
book— chaptered works with recto/verso layout (novels, monographs).report— chaptered, single-sided (theses, manuals).article— shorter, section-level work (essays, papers).
Standard vs KOMA
The scr* targets compile the same manuscript with the same handlers,
shortcuts, and metadata — only the typography differs. KOMA-Script carries an
opinionated set of defaults tuned for European book publishing; choosing a KOMA
target opts into them. The most-noticed differences:
- Running headers and footers are italicized.
- Wider margins and a narrower text column (KOMA computes margins as a proportion of the page), so the same manuscript runs a few pages longer.
- Adjusted chapter and section heading spacing.
If a KOMA default looks unexpected, the answer is almost always in the KOMA-Script documentation rather than in Keystone — Keystone's contribution is the page-furniture contract, which is identical on both.
Base font size
fontsize in pandoc.yaml sets the PDF base size. The accepted sizes are a
property of the target's document class:
- Standard (
book,report,article) —10pt,11pt,12pt. - KOMA (
scrbook,scrreprt,scrartcl) —10pt,11pt,12pt,13pt,14pt,17pt,20pt.
An unsupported size falls back to the nearest allowed one with a warning — or a hard error under strict builds. To set a size above 12pt, switch to the KOMA counterpart of your target.
Two-sided layout
book and scrbook are two-sided (twoside): right-hand (recto) and left-hand
(verso) pages can carry different running content. The convention is book title
on the verso, chapter title on the recto, and the page number on the outside
edge. The other targets are single-sided.
Flip either default without changing the class:
classoption: oneside # or: twoside
On a single-sided layout, the verso variants of running headers compile but never render (every page is treated as recto). See Running headers & footers.
Required fields
Validation runs against the active target and stops the build if a required field is missing:
book/scrbookneeddescription.article/report(and KOMA variants) needabstract.
For the non-book targets, a single abstract flows through to the EPUB
description and PDF subject automatically — you don't set those separately unless
you want different text in each. See Book metadata.