Skip to content

Output formats

One manuscript, four formats. You choose at build time, not in your source:

make publish              # PDF
make publish format=epub
make publish format=docx
make publish format=odt
make all                  # PDF, EPUB, and DOCX

The same content, handlers, and shortcuts feed every format. The differences below are inherent to the formats, not configuration you manage.

PDF

The print-ready format, typeset with XeLaTeX. Fixed pages, embedded fonts, full typographic control. PDF is the only format with:

This is what you send to a printer or distribute as the canonical edition.

EPUB

The reflowable e-book format. There are no fixed pages, so there are no page numbers or running headers — the reader's device paginates. EPUB-specific behavior:

  • Fonts embed via CSS @font-face (built-in TeX Live fonts and your registered fonts; the DejaVu system fonts fall back rather than embed).
  • A cover image comes from cover-image in pandoc.yaml.
  • Notes are always section-end (no page bottoms to anchor to).

DOCX and ODT

Editable word-processor formats — Word (.docx) and LibreOffice/OpenOffice (.odt) — for handing a manuscript to an editor or collaborator who works in a word processor. They use a styled reference document, so headings, callouts, and font overrides map to named paragraph and character styles.

Because word processors can't use the TeX Live fonts, each font maps to a system fallback (e.g. Georgia for Libertine). Notes use the writer's native footnotes, and PDF-only features (running headers, note placement, watermark, raw LaTeX) are simply absent.

What carries everywhere

Most of what you write is format-independent: structure and headings, fonts and styles, quotes, dialogue, figures, asides, alignment, columns, citations and the bibliography, and conditional content all render in every format. Syntax highlighting themes apply to PDF and EPUB.

When something is format-specific, the reference and the relevant guide say so. To deliberately include or exclude content per format, use the format-only shortcuts in Conditional content.

Importing existing documents

Keystone also reads into Markdown — converting an existing .docx, .odt, or .html draft with make import so you can adopt the workflow without retyping. See Importing existing documents for the full process.