Book directives
A chapter is Markdown; four directives and the footnotes give it what a book needs. Their numbers and labels are computed by the book, the same in the web edition, the EPUB and the PDF.
::figure
Markdown
A numbered figure: Figure 2.3 is the third figure of chapter 2 (1, 2… in an unnumbered
chapter). The label is the caption; a container (:::figure{…} … :::) takes a longer one.
| Attribute | Meaning |
|---|---|
src | The image, relative to the chapter; it must exist |
id | The id a :ref cites |
alt | The text alternative, required |
width | A print length (8cm) or a percentage of the measure (50%) |
:ref
Markdown
A cross-reference to a chapter, a section, a figure or a note, anywhere in the book. It prints the
label of its target (Chapter 1, Figure 1.1) and links to it, on its own page in the web edition.
An unknown id is an error with its file, its line and the closest id:
✖ 02-. show=page and
show=both print the page number in the PDF.
:index
Markdown
The term stays in the text; the occurrence joins the index, a page A–Z when back lists index,
sorted in the language of the book. sub files it under a sub-entry, see adds a cross-reference.
:::epigraph
Markdown
A quotation at the head of a chapter, its source under it.
:::dialogue
Markdown
A line of a character of the book's bible (cast: in the entry), set as a paragraph of dialogue in
the language of the page: « Lorem. — Sed ut… » in French, the speaker's name in small caps as a play
sets it; « Lorem: “Sed ut…” » elsewhere. The name comes from the bible, in the page's language; a
book with no bible shows the id. Each paragraph of the line is one paragraph of dialogue.
Notes
Markdown
GitHub footnotes. They are numbered per chapter, or through the whole book with
noteNumbering:. On the web each chapter ends with its notes, each with a link back to its
call; in the EPUB and the PDF they go to the notes page when back lists it.
Formulas, code and tables
A chapter takes what any Récit story takes: fenced code with its highlighting, GitHub tables and
KaTeX formulas ($x^2$, $$…$$). The EPUB declares MathML on the pages that hold a formula.