A chapter is written once. The book renders it a single time into an intermediate HTML where
numbers, cross-references and notes are already resolved; only its serialisation changes with the
output.
Output
What the chapter becomes
Web
One page per chapter, notes at its end with a link back to each call, the table of contents as the sidebar.
EPUB 3
One XHTML file per chapter, notes as aside epub:type="footnote", the table of contents in nav.xhtml.
PDF
The printable view of the print chain (plan 15): named pages, running heads, page numbers.
The web edition
The third chapter of the novella, as the web edition shows it; the first is on the
home page.
Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit.
Temporibus autem quibusdam et aut officiis debitis1.
Notes
Itaque earum rerum hic tenetur a sapiente delectus.
Each command writes one EPUB per language and lists it in the exports.json beside the book, with
its size and its SHA-256. Two exports of the same book give the same bytes.
On the site, the "Downloads" panel under the first page of the novella and of
the handbook offers each book's EPUB and PDF, written by the same export after the
build.
Opened, the EPUB of the novella holds the same chapters as the web edition, one XHTML file each,
beside its cover and its table of contents:
Code
book.en.epub├── mimetype application/epub+zip, first and uncompressed├── META-INF/container.xml points to the package document└── OEBPS/ ├── content.opf title, author, language, the manifest and the reading order ├── nav.xhtml the table of contents and the landmarks ├── cover.xhtml the cover, images/cover.svg ├── styles.css ├── preface.xhtml, lorem.xhtml, ipsum.xhtml, dolor.xhtml └── images/
The JSON twin
Every file of a book has a typed JSON twin, checked by the schema of the format:
Bash
npx recit convert book.md --to json --chapters
writes book.json to the standard output and 01-lorem.json, 02-ipsum.json… next to their
chapters. The book assembled from the JSON files is the same book, page for page.