# Homer polytonisch, gegenüber seiner Übersetzung

> Der Anfang der Odyssee auf den linken Seiten und Eftaliotis’ neugriechische Fassung auf den rechten, mit den grc-Mustern getrennt und alle fünf Verse gezählt.

- HTML-Fassung: https://postext.dev/de/cookbook/homer-polytonic-facing-translation
- Rezept Nº 202 · Schrift und Text · Stufe 2 (Mittel) · Ausgaben: Canvas
- Gattungen: Lyrik
- Benötigt postext ≥ 1.99.1 · getestet mit 1.99.1 am 2026-11-29
- Seiten: [1](https://postext.dev/cookbook/homer-polytonic-facing-translation/en/p01.webp?v=ccab6327), [2](https://postext.dev/cookbook/homer-polytonic-facing-translation/en/p02.webp?v=ccab6327), [3](https://postext.dev/cookbook/homer-polytonic-facing-translation/en/p03.webp?v=ccab6327), [4](https://postext.dev/cookbook/homer-polytonic-facing-translation/en/p04.webp?v=ccab6327), [5](https://postext.dev/cookbook/homer-polytonic-facing-translation/en/p05.webp?v=ccab6327), [6](https://postext.dev/cookbook/homer-polytonic-facing-translation/en/p06.webp?v=ccab6327)
- In der Sandbox öffnen: https://postext.dev/de/sandbox#recipe=homer-polytonic-facing-translation&lang=en (.postext: https://postext.dev/cookbook/homer-polytonic-facing-translation/en/homer-polytonic-facing-translation.postext)
- Zuletzt aktualisiert: 2026-11-29
- Andere Sprachen: [en](https://postext.dev/en/cookbook/homer-polytonic-facing-translation.md), [es](https://postext.dev/es/cookbook/homer-polytonic-facing-translation.md), [ca](https://postext.dev/ca/cookbook/homer-polytonic-facing-translation.md), [el](https://postext.dev/el/cookbook/homer-polytonic-facing-translation.md), [fr](https://postext.dev/fr/cookbook/homer-polytonic-facing-translation.md), [it](https://postext.dev/it/cookbook/homer-polytonic-facing-translation.md), [pt](https://postext.dev/pt/cookbook/homer-polytonic-facing-translation.md), [zh](https://postext.dev/zh/cookbook/homer-polytonic-facing-translation.md), [ja](https://postext.dev/ja/cookbook/homer-polytonic-facing-translation.md), [ar](https://postext.dev/ar/cookbook/homer-polytonic-facing-translation.md)

## Kurz gesagt

Die ersten Verse von Homers Odyssee auf Altgriechisch, mit allen Akzenten und Hauchzeichen, auf den linken Seiten, und eine neugriechische Versübersetzung rechts, jeder Vers auf der Höhe des Verses, den er übersetzt.

## Was Sie setzen

Ein kleiner Klassiker in 14 × 21,5 cm, in GFS Didot, der polytonischen Schrift der Greek Font Society. Am Anfang steht eine Seite der byzantinischen *Vita Homers*, die die Suda unter dem Namen des Hesychios von Milet überliefert, mit Homers Grabepigramm von Ios. Es folgen zwei Doppelseiten: die Verse 1 bis 27 des ersten Gesangs der *Odyssee* links und Argyris Eftaliotis’ neugriechische Fassung in Fünfzehnsilblern rechts, Vers für Vers, alle fünf Verse am Außenrand gezählt. Alle drei Texte sind gemeinfrei und stammen aus dem griechischen Wikisource. Kolumnentitel und Eröffnungen setzen die Titel in Versalien, die jeden Spiritus und Akzent verlieren.

**Dieses Rezept beantwortet:**

- Wie setze ich polytonisches Altgriechisch mit eigener Trennung und Verszahlen gegenüber einer Übersetzung?
- Wie nummeriere ich jede fünfte Zeile eines Gedichts am Rand und beziehe meine Anmerkungen auf diese Zeilennummern?
- Wie setze ich Lyrik: eine Zeile pro Vers, Abstand zwischen Strophen, hängende Einzüge für umbrochene Zeilen, keine Silbentrennung?
- Wie erreiche ich guten Blocksatz und gute Silbentrennung für spanischen, französischen oder deutschen Text?

## Die kurze Antwort

```js
// script.js, Zeilen 31–51
// locale 'grc' takes the polytonic patterns, which read breathings, circumflexes, the iota
// subscript and the diaeresis as the letters they sit on (Πει-σι-στρά-του, ὀφ-θαλ-μῶν,
// ἀ-ναμ-φί-λε-κτα). Eftaliotis's modern Greek is written polytonic too; under 'el' a
// polytonic word would be divided by the same patterns, so the two pages hyphenate alike.
// The labels are the modern Greek ones (Εικόνα, Πίνακας), as for 'el'.
const LOCALE = 'grc';
// Fontsource cuts each face into files by script, and loadFonts adds latin and greek. The
// accented letters of polytonic Greek (ἀ ὃ ῷ, U+1F00–1FFF) are in a third file, greek-ext:
// each face takes it too before the build, so no letter falls to a system font.
async function loadGreekExtended(faces) {
  const jobs = Object.entries(faces).flatMap(([family, specs]) => specs.map(async (spec) => {
    const id = fontsourceId(family);
    const style = spec.endsWith('i') ? 'italic' : 'normal';
    const file = `${id}-greek-ext-${parseInt(spec, 10)}-${style}.woff2`;
    const url = `${await fontsourceAt(id)}files/${file}`;
    const face = new FontFace(family, `url(${url}) format('woff2')`,
      { weight: String(parseInt(spec, 10)), style, unicodeRange: 'U+1F00-1FFF' });
    document.fonts.add(await face.load());
  }));
  await Promise.all(jobs);
}
```

## Zutaten

**Zeigt**

- [Silbentrennung und Dokumentsprache](https://postext.dev/de/docs/justification.md#unterstützte-sprachen): Silbentrennung nach TeX-Mustern in neun Sprachen, darunter Griechisch, gewählt über das Dokument-Locale, das auch die Fortsetzungshinweise von Tabellen und die Sprache des getaggten PDF festlegt.
- [Zeilennummern](https://postext.dev/de/docs/configuration-notes-references.md#zeilennummern): lineNumbers druckt die Nummer jeder fünften (oder jeder n-ten) Zeile in den Rand, den Spaltenabstand oder die Nebenspalte: die Zeilen von :::verse-Gedichten oder jede Zeile des Texts, neu beginnend bei jedem Gedicht, jeder Seite, jedem Kapitel oder Abschnitt oder durchlaufend durch das Buch, ohne eine Zeile zu verschieben.
- [Verse Zeile für Zeile](https://postext.dev/de/docs/document-format-directives.md#verse): :::verse setzt ein Gedicht so, wie es geschrieben ist: eine Verszeile pro Markdown-Zeile, Leerzeilen zwischen Strophen, führende Leerzeichen als Einzüge; eine überlange Zeile bricht mit hängendem Einzug oder rechtsbündig hinter einer Klammer um, wird an einem Seitenumbruch nie von ihrer Zeile getrennt, und kurze Strophen lassen sich zusammenhalten.

**Verwendet außerdem**

- [Schriften vor dem Layout](https://postext.dev/de/docs/configuration-programmatic-usage.md#schriften-vor-dem-layout-laden)
- [Überschriftenformate](https://postext.dev/de/docs/configuration-styles.md#überschriftenstile)
- [Überschriftenattribute](https://postext.dev/de/docs/document-format.md#attribute-von-überschriften)
- [Gestaltete Auftakte](https://postext.dev/de/docs/configuration-headings.md#seitenbreite-und-erweiterte-gestaltung)
- [Text, Linien und Kästen in Seitengestaltungen](https://postext.dev/de/docs/configuration-headers-footers.md#kopf--und-fußzeilen)
- [Kolumnentitel und Seitenzahlen](https://postext.dev/de/docs/configuration-headers-footers.md#kopf--und-fußzeilen)
- [Kopfzeilen nach Seitenrolle](https://postext.dev/de/docs/configuration-headers-footers.md#textelemente)
- [Seiten- und Spaltenumbrüche](https://postext.dev/de/docs/document-format-directives.md#pagebreak)
- [Gespiegelte Ränder](https://postext.dev/de/docs/configuration-page-layout.md#gespiegelte-ränder)
- [Papierfarbe](https://postext.dev/de/docs/configuration-page-layout.md#seite)
- [Absatzformate](https://postext.dev/de/docs/configuration-styles.md#absatzformate)
- [Dokument-Metadaten](https://postext.dev/de/docs/document-format.md#frontmatter)
- [Semantische Farbpalette](https://postext.dev/de/docs/configuration-fonts-colors-viewers.md#farbpalette)
- [Seiten auf einem Canvas](https://postext.dev/de/docs/configuration-programmatic-usage.md#eine-seite-als-bitmap-rendern)
- [Literaturverzeichnisse und Glossare](https://postext.dev/de/docs/configuration-styles.md#absatzformate)
- [Kolumnentitel je Abschnitt](https://postext.dev/de/docs/configuration-styles.md#überschriftenstile)

**Die Konfiguration auf einen Blick**

- [`bodyText`](https://postext.dev/de/docs/configuration-text.md#fließtext), [`colorPalette`](https://postext.dev/de/docs/configuration-fonts-colors-viewers.md#farbpalette), [`footer`](https://postext.dev/de/docs/configuration-headers-footers.md#kopf--und-fußzeilen), [`header`](https://postext.dev/de/docs/configuration-headers-footers.md#kopf--und-fußzeilen), [`headingStyles`](https://postext.dev/de/docs/configuration-styles.md#überschriftenstile), [`headings`](https://postext.dev/de/docs/configuration-headings.md#überschriften), [`layout`](https://postext.dev/de/docs/configuration-page-layout.md#layout), [`lineNumbers`](https://postext.dev/de/docs/configuration-notes-references.md#zeilennummern), [`locale`](https://postext.dev/de/docs/configuration-language.md#silbentrennung), [`page`](https://postext.dev/de/docs/configuration-page-layout.md#seite), [`paragraphStyles`](https://postext.dev/de/docs/configuration-styles.md#absatzformate)

**APIs**

- [`buildDocumentWithFonts`](https://postext.dev/de/docs/configuration-programmatic-usage.md#schriften-vor-dem-layout-laden), [`renderPageToCanvas`](https://postext.dev/de/docs/configuration-programmatic-usage.md#eine-seite-als-bitmap-rendern)

**Schriften**

- GFS Didot (OFL-1.1)

## Zubereitung

### 1 · Den Text als grc auszeichnen und seine Akzentbuchstaben laden

Der Code steht in [der kurzen Antwort](https://postext.dev/de/cookbook/homer-polytonic-facing-translation.md#die-kurze-antwort) oben. `locale: 'grc'` wählt die polytonischen Muster ([Silbentrennung](https://postext.dev/de/docs/configuration-language.md)), die einen Spiritus, einen Zirkumflex, ein Iota subscriptum oder ein Trema als Teil des Buchstabens lesen, auf dem sie stehen. Seite 1 trennt Βατρα-χομυομαχία, ἐπι-δειξάμενος und τυράν-νου. Fontsource teilt jede Schrift nach Schriftsystemen, und `loadFonts` lädt nur die Dateien latin und greek. Die vorkomponierten polytonischen Buchstaben, U+1F00–1FFF, liegen in einer dritten Datei, greek-ext, die `loadGreekExtended` vor dem Satz für jede Schrift nachlädt. Rufen Sie sie nach `loadFonts` auf, sonst hält die Engine die Schrift für geladen und überspringt die Datei greek.

### 2 · Jeden fünften Vers am Außenrand zählen

```js
// script.js, Zeilen 67–73
// Each page of verse is its own :::verse block. The Greek and the translation of a spread
// both open with {lineStart=11}, so the numbers on the two pages agree: restart 'poem'
// counts each block from its own start, and the epitaph, {numbered=false}, is not counted.
const lineNumbers = {
  enabled: true, count: 'verse', interval: 5, restart: 'poem', position: 'outer',
  gap: mm(6), fontFamily: DIDOT, fontSize: em(0.8), color: col('rubric'),
};
```

`count: 'verse'` zählt nur Verse, und `restart: 'poem'` zählt jeden `:::verse`-Block von seinem eigenen Anfang. Jede Versseite ist ein eigener Block. Das Griechische und die Übersetzung der zweiten Doppelseite beginnen beide mit `{lineStart=11}`, so stimmen die Zahlen gegenüberliegender Seiten überein. `position: 'outer'` stellt sie auf linken Seiten an den linken, auf rechten an den rechten Rand ([Zeilennummern](https://postext.dev/de/docs/configuration-text.md)). Das Epigramm trägt `{numbered=false}` und bleibt ohne Zahl.

### 3 · Eröffnungen und Kolumnentitel in Versalien

```js
// script.js, Zeilen 83–124
// textTransform 'uppercase' turns Ὀδύσσεια into ΟΔΥΣΣΕΙΑ and Ῥαψῳδία into ΡΑΨΩΔΙΑ: Greek
// capitals take no breathing, no accent and no iota subscript (a dialytika stays, Ϊ Ϋ).
const caps = (size, tracking, color = 'muted') => ({ fontFamily: DIDOT, fontSize: pt(size),
  letterSpacing: pt(tracking), textTransform: 'uppercase', color: col(color) });
const opener = (title) => ({ enabled: true, minHeight: pt(5 * LEAD), slot: { elements: [
  { kind: 'text', id: 'kicker', content: '{attr.kicker}', align: 'center', ...caps(8, 2, 'rubric'),
    placement: { ...at('container', 'top', 0, LINE), size: { width: 'fill' } } },
  { kind: 'text', id: 'title', content: title, align: 'center', ...caps(17, 3.5, 'ink'),
    placement: { ...at('container', 'top', 0, 2.2 * LINE), size: { width: 'fill' } } },
] } });
// # Ὀδύσσεια {style="original"} opens a verso, {style="translation"} the recto facing it;
// a style sets its own break side (gotcha: style-inherits-break).
const headingStyles = [
  { id: 'original', breakBefore: { enabled: true, parity: 'even' }, marginBottom: pt(0),
    advancedDesign: opener('{titleText}') },
  { id: 'translation', breakBefore: { enabled: true, parity: 'odd' }, marginBottom: pt(0),
    advancedDesign: opener('{titleText}') },
  { id: 'life', breakBefore: { enabled: true, parity: 'odd' }, marginBottom: pt(0),
    advancedDesign: { enabled: true, minHeight: pt(6 * LEAD), slot: { elements: [
      { kind: 'text', id: 'title', content: '{titleText}', align: 'center', ...caps(15, 3, 'ink'),
        placement: { ...at('container', 'top', 0, 1.6 * LINE), size: { width: 'fill' } } },
      { kind: 'text', id: 'source', content: '{attr.source}', align: 'center', fontFamily: DIDOT,
        fontSize: pt(10), color: col('muted'),
        placement: { ...at('container', 'top', 0, 3.2 * LINE), size: { width: 'fill' } } },
    ] } } },
  { id: 'note-page', breakBefore: { enabled: true, parity: 'even' }, marginBottom: pt(LEAD),
    header: { elements: [] }, advancedDesign: { enabled: true, minHeight: pt(3 * LEAD),
      slot: { elements: [{ kind: 'text', id: 'label', content: '{titleText}', align: 'center',
        ...caps(7.5, 1.6, 'rubric'), placement: { ...at('container', 'top', 0, LINE),
          size: { width: 'fill' } } }] } } },
];
// The author and the title over the versos, the translator over the rectos; folios outside.
const head = (id, content, parity, edge, x, extra = {}) => ({ kind: 'text', id, content, parity,
  pages: 'body', ...caps(7.5, 1.5), ...extra, placement: at('page', edge, x, 12) });
const folio = { textTransform: 'none', letterSpacing: pt(0), fontSize: pt(9), color: col('ink') };
const SHIFT = (INNER - OUTER) / 2; // mm: the text block's centre is off the page's centre
const header = { elements: [
  head('verso-folio', '{pageNumber}', 'even', 'top-left', OUTER, folio),
  head('verso-head', '{author} · {title}', 'even', 'top', -SHIFT),
  head('recto-head', '{subtitle}', 'odd', 'top', SHIFT),
  head('recto-folio', '{pageNumber}', 'odd', 'top-right', -OUTER, folio),
] };
```

`textTransform: 'uppercase'` macht aus Ὀδύσσεια ΟΔΥΣΣΕΙΑ und aus Ῥαψῳδία ΡΑΨΩΔΙΑ: Griechische Großbuchstaben tragen weder Spiritus noch Akzent noch Iota subscriptum, und die Engine entfernt sie beim Setzen. Der Stil `original` öffnet das Griechische auf einer linken Seite, `translation` die Fassung auf der rechten gegenüber. `:::pagebreak{parity="even"}` und `{parity="odd"}` tun dasselbe für die zweite Doppelseite. Der Text der Überschrift und der des PDF bleiben, wie sie geschrieben sind, mit allen Zeichen.

## Das ganze Rezept

Eine Datei, aus dem Ordner des Rezepts zusammengesetzt, mit dem Beispieltext und dem gemeinsamen Baukasten der Rezepte bereits eingebettet; sie baut ihre eigene Seite auf. Zum Ausführen setzen Sie sie in ein `<script type="module">` auf einer leeren Seite oder fügen sie in das JS-Feld eines neuen CodePen-Pens ein (als Modul). Sie importiert postext von esm.sh, es gibt also nichts zu installieren oder zu bauen.

- Quellordner: https://github.com/drnachio/postext/tree/main/cookbook/homer-polytonic-facing-translation

### script.js

```js
// ═══ Postext Cookbook · Nº 202 · Homer in polytonic Greek, facing its translation ═══════
// https://postext.dev/en/cookbook/homer-polytonic-facing-translation
// Code: MIT · Texts: Homer, Hesychius, A. Eftaliotis (PD, el.wikisource) · Pictures: none
// Fonts: GFS Didot (SIL OFL 1.1) · Needs postext ≥ 1.99.1
// The opening of the Odyssey on the versos, Eftaliotis's line-for-line modern Greek on the
// rectos, both numbered every fifth line, after a page of the Byzantine Life of Homer.
import { buildDocumentWithFonts, renderPageToCanvas } from 'https://esm.sh/postext';

const LANG = 'en'; // @lang: the language of the note on the text ('en' | 'es' | 'el')
const RECIPE = 'homer-polytonic-facing-translation';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// Black text on a warm white, and the dull red of a classical text's rubrics.
const palette = {
  ink: '#1c1a18', // the texts
  rubric: '#8c2f23', // line numbers, headings, rules
  muted: '#6b6359', // running heads, the note on the text, the colophon
  paper: '#fcfaf5',
};
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = [
  ...Object.entries(palette).map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } })),
  { id: 'main-color', name: 'rubric (defaults)', value: { hex: palette.rubric, model: 'hex' } },
];
const DIDOT = 'GFS Didot'; // the Greek Font Society's Didot: polytonic, with its own Latin
const [BODY, LEAD] = [10.2, 15]; // pt
const LINE = (LEAD * 25.4) / 72; // mm: one line, 5.29
const at = (to, edge, x = 0, y = 0) => ({ anchor: { to, edge }, offset: { x: mm(x), y: mm(y) } });

// #region answer: Ancient Greek is 'grc', with the polytonic accents written in the text
// locale 'grc' takes the polytonic patterns, which read breathings, circumflexes, the iota
// subscript and the diaeresis as the letters they sit on (Πει-σι-στρά-του, ὀφ-θαλ-μῶν,
// ἀ-ναμ-φί-λε-κτα). Eftaliotis's modern Greek is written polytonic too; under 'el' a
// polytonic word would be divided by the same patterns, so the two pages hyphenate alike.
// The labels are the modern Greek ones (Εικόνα, Πίνακας), as for 'el'.
const LOCALE = 'grc';
// Fontsource cuts each face into files by script, and loadFonts adds latin and greek. The
// accented letters of polytonic Greek (ἀ ὃ ῷ, U+1F00–1FFF) are in a third file, greek-ext:
// each face takes it too before the build, so no letter falls to a system font.
async function loadGreekExtended(faces) {
  const jobs = Object.entries(faces).flatMap(([family, specs]) => specs.map(async (spec) => {
    const id = fontsourceId(family);
    const style = spec.endsWith('i') ? 'italic' : 'normal';
    const file = `${id}-greek-ext-${parseInt(spec, 10)}-${style}.woff2`;
    const url = `${await fontsourceAt(id)}files/${file}`;
    const face = new FontFace(family, `url(${url}) format('woff2')`,
      { weight: String(parseInt(spec, 10)), style, unicodeRange: 'U+1F00-1FFF' });
    document.fonts.add(await face.load());
  }));
  await Promise.all(jobs);
}
// #endregion

// #region page: a 14 × 21.5 cm classical text, 28 lines of 15 pt
const TRIM = { width: 140, height: 215 }; // mm
const [TOP, INNER, OUTER, LINES] = [22, 16, 21, 28];
const page = {
  width: mm(TRIM.width), height: mm(TRIM.height), dpi: 150, backgroundColor: col('paper'),
  margins: { top: mm(TOP), bottom: mm(TRIM.height - TOP - LINES * LINE),
    left: mm(INNER), right: mm(OUTER), mirror: true },
};
// 103 mm of measure: the longest line of Eftaliotis, 59 letters, sets in 97 mm at 10.2 pt,
// so no line turns over and the two pages of a spread keep their lines level.
// #endregion

// #region lines: every fifth line numbered at the outer edge, the count kept by each page
// Each page of verse is its own :::verse block. The Greek and the translation of a spread
// both open with {lineStart=11}, so the numbers on the two pages agree: restart 'poem'
// counts each block from its own start, and the epitaph, {numbered=false}, is not counted.
const lineNumbers = {
  enabled: true, count: 'verse', interval: 5, restart: 'poem', position: 'outer',
  gap: mm(6), fontFamily: DIDOT, fontSize: em(0.8), color: col('rubric'),
};
// #endregion

// #region verse: hexameters and fifteen-syllable lines, centred on the longest
// A blank space in the source would start a stanza: neither text has any, so each block
// is one run of lines. A line too long for the measure would turn over and hang 2 em in.
const verseStyle = { id: 'verse', hangingIndent: em(2) };
// #endregion

// #region heads: kicker and title in capitals, which drop breathings and accents
// textTransform 'uppercase' turns Ὀδύσσεια into ΟΔΥΣΣΕΙΑ and Ῥαψῳδία into ΡΑΨΩΔΙΑ: Greek
// capitals take no breathing, no accent and no iota subscript (a dialytika stays, Ϊ Ϋ).
const caps = (size, tracking, color = 'muted') => ({ fontFamily: DIDOT, fontSize: pt(size),
  letterSpacing: pt(tracking), textTransform: 'uppercase', color: col(color) });
const opener = (title) => ({ enabled: true, minHeight: pt(5 * LEAD), slot: { elements: [
  { kind: 'text', id: 'kicker', content: '{attr.kicker}', align: 'center', ...caps(8, 2, 'rubric'),
    placement: { ...at('container', 'top', 0, LINE), size: { width: 'fill' } } },
  { kind: 'text', id: 'title', content: title, align: 'center', ...caps(17, 3.5, 'ink'),
    placement: { ...at('container', 'top', 0, 2.2 * LINE), size: { width: 'fill' } } },
] } });
// # Ὀδύσσεια {style="original"} opens a verso, {style="translation"} the recto facing it;
// a style sets its own break side (gotcha: style-inherits-break).
const headingStyles = [
  { id: 'original', breakBefore: { enabled: true, parity: 'even' }, marginBottom: pt(0),
    advancedDesign: opener('{titleText}') },
  { id: 'translation', breakBefore: { enabled: true, parity: 'odd' }, marginBottom: pt(0),
    advancedDesign: opener('{titleText}') },
  { id: 'life', breakBefore: { enabled: true, parity: 'odd' }, marginBottom: pt(0),
    advancedDesign: { enabled: true, minHeight: pt(6 * LEAD), slot: { elements: [
      { kind: 'text', id: 'title', content: '{titleText}', align: 'center', ...caps(15, 3, 'ink'),
        placement: { ...at('container', 'top', 0, 1.6 * LINE), size: { width: 'fill' } } },
      { kind: 'text', id: 'source', content: '{attr.source}', align: 'center', fontFamily: DIDOT,
        fontSize: pt(10), color: col('muted'),
        placement: { ...at('container', 'top', 0, 3.2 * LINE), size: { width: 'fill' } } },
    ] } } },
  { id: 'note-page', breakBefore: { enabled: true, parity: 'even' }, marginBottom: pt(LEAD),
    header: { elements: [] }, advancedDesign: { enabled: true, minHeight: pt(3 * LEAD),
      slot: { elements: [{ kind: 'text', id: 'label', content: '{titleText}', align: 'center',
        ...caps(7.5, 1.6, 'rubric'), placement: { ...at('container', 'top', 0, LINE),
          size: { width: 'fill' } } }] } } },
];
// The author and the title over the versos, the translator over the rectos; folios outside.
const head = (id, content, parity, edge, x, extra = {}) => ({ kind: 'text', id, content, parity,
  pages: 'body', ...caps(7.5, 1.5), ...extra, placement: at('page', edge, x, 12) });
const folio = { textTransform: 'none', letterSpacing: pt(0), fontSize: pt(9), color: col('ink') };
const SHIFT = (INNER - OUTER) / 2; // mm: the text block's centre is off the page's centre
const header = { elements: [
  head('verso-folio', '{pageNumber}', 'even', 'top-left', OUTER, folio),
  head('verso-head', '{author} · {title}', 'even', 'top', -SHIFT),
  head('recto-head', '{subtitle}', 'odd', 'top', SHIFT),
  head('recto-folio', '{pageNumber}', 'odd', 'top-right', -OUTER, folio),
] };
// #endregion

const config = () => ({
  locale: LOCALE, // written out, never LANG: the texts are Greek in every edition
  colorPalette, page, lineNumbers, header, headingStyles, footer: { elements: [] },
  layout: { layoutType: 'single' }, // the default is two columns
  bodyText: {
    fontFamily: DIDOT, fontSize: pt(BODY), lineHeight: pt(LEAD), color: col('ink'),
    boldColor: col('ink'), italicColor: col('ink'), referenceColor: col('ink'),
    firstLineIndent: em(1.5), indentAfterHeading: false, hyphenateAcrossColumns: false,
    maxWordSpacing: 1.6, minWordSpacing: 0.8, maxJustifyTracking: 10,
    verse: { indentStep: em(1) },
  },
  headings: { fontFamily: DIDOT, fontWeight: 400,
    levels: [{ level: 1, breakBefore: { enabled: true, parity: 'any' } }] },
  paragraphStyles: [verseStyle,
    // The note is in the edition's language, hyphenated with that language's patterns.
    { id: 'note', fontSize: pt(9), lineHeight: pt(13), color: col('muted'),
      italicColor: col('muted'), firstLineIndent: em(1.5), hyphenation: { locale: LANG } },
    { id: 'colophon', fontSize: pt(7.5), lineHeight: pt(10), color: col('muted'),
      textAlign: 'center', firstLineIndent: pt(0), marginTop: pt(LEAD),
      hyphenation: { enabled: false } },
  ],
});

// ─── 2 · Content ────────────────────────────────────────────────────────────
// The Life and the two spreads of verse (content.text.<lang>.md), then the note on the text
// in the edition's language (content.<lang>.md).
const markdown = [String.raw`---
title: "Ὀδύσσεια"
author: "Ὅμηρος"
subtitle: "Μετάφραση Ἀργύρη Ἐφταλιώτη"
---

# Βίος Ὁμήρου {style="life" source="Ἡσυχίου τοῦ Μιλησίου, ἐκ τῆς Σούδας"}

ποιήματα δ’ αὐτοῦ ἀναμφίλεκτα Ἰλιὰς καὶ Ὀδύσσεια. ἔγραψε δὲ τὴν Ἰλιάδα οὐχ ἅμα οὐδὲ κατὰ τὸ συνεχές, καθάπερ σύγκειται, ἀλλ’ αὐτὸς μὲν ἑκάστην ῥαψῳδίαν γράψας καὶ ἐπιδειξάμενος ἐν τῷ περινοστεῖν τὰς πόλεις τροφῆς ἕνεκεν ἀπέλιπεν. ὕστερον δὲ συνετέθη καὶ συνετάχθη ὑπὸ πολλῶν καὶ μάλιστα ὑπὸ Πεισιστράτου τοῦ τῶν Ἀθηναίων τυράννου. ἀναφέρεται δὲ εἰς αὐτὸν καὶ ἄλλα τινὰ ποιήματα, Ἀμαζονία, Ἰλιὰς μικρά, Νόστοι, Ἐπικιχλίδες, Ἠθιέπακτος ἤτοι Ἴαμβοι, Βατραχομυομαχία, Ἀραχνομαχία, Γερανομαχία, Κεραμίς, Ἀμφιαράου ἐξέλασις, παίγνια, Οἰχαλίας ἅλωσις, Ἐπιθαλάμια, Κύκλος, Ὕμνοι, Κύπρια.

γηραιὸς δὲ τελευτήσας ἐν τῇ νήσῳ τῇ Ἴῳ τέθαπται, τυφλὸς ἐκ παίδων γεγονώς, τὸ δ’ ἀληθὲς ὅτι οὐχ ἡττήθη ἐπιθυμίας, ἣ διὰ τῶν ὀφθαλμῶν ἄρχεται· καὶ παρὰ τοῦτο ἱστορήθη τυφλός. ἐπιγέγραπται δ’ ἐν τῷ τάφῳ αὐτοῦ τόδε τὸ ἐλεγεῖον, ὃ ὑπὸ τῶν Ἰητῶν ἐποιήθη χρόνῳ·

:::verse{numbered=false}
ἐνθάδε τὴν ἱερὰν κεφαλὴν κατὰ γαῖα καλύπτει,
ἀνδρῶν ἡρώων κοσμήτορα, θεῖον Ὅμηρον.
:::

# Ὀδύσσεια {style="original" kicker="Ῥαψῳδία α"}

:::verse
Ἄνδρα μοι ἔννεπε, Μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσε·
πολλῶν δ’ ἀνθρώπων ἴδεν ἄστεα καὶ νόον ἔγνω,
πολλὰ δ’ ὅ γ’ ἐν πόντῳ πάθεν ἄλγεα ὃν κατὰ θυμόν,
ἀρνύμενος ἥν τε ψυχὴν καὶ νόστον ἑταίρων.
ἀλλ’ οὐδ’ ὣς ἑτάρους ἐρρύσατο, ἱέμενός περ·
αὐτῶν γὰρ σφετέρῃσιν ἀτασθαλίῃσιν ὄλοντο,
νήπιοι, οἳ κατὰ βοῦς Ὑπερίονος Ἠελίοιο
ἤσθιον· αὐτὰρ ὁ τοῖσιν ἀφείλετο νόστιμον ἦμαρ.
τῶν ἁμόθεν γε, θεά, θύγατερ Διός, εἰπὲ καὶ ἡμῖν.
:::

# Ὀδύσσεια {style="translation" kicker="Μετάφραση Ἀργύρη Ἐφταλιώτη"}

:::verse
Τὸν ἄντρα τὸν πολύπραγο τραγούδησέ μου, ὦ Μοῦσα,
ποὺ περισσὰ πλανήθηκε, σὰν κούρσεψε τῆς Τροίας
τὸ ἱερὸ κάστρο, καὶ πολλῶν ἀνθρώπων εἶδε χῶρες
κι ἔμαθε γνῶμες, καὶ πολλὰ στὰ πέλαα βρῆκε πάθια,
γιὰ μιὰ ζωὴ παλεύοντας καὶ γυρισμὸ συντρόφων.
Μὰ πάλε δὲν τοὺς γλύτωσε, κι ἂν τὸ ποθοῦσε, ἐκείνους,
τὶ ἀπὸ δική τους χάθηκαν οἱ κούφιοι ἀμυαλωσύνη,
τοῦ Ἥλιου τοῦ Ὑπερίονα σὰν ἔφαγαν τὰ βόδια,
κι αὐτὸς τοὺς πῆρε τὴ γλυκειὰ τοῦ γυρισμοῦ τους μέρα.
Ἀπ’ ὅπου ἂν τά ’χης, πές μας τα, ὦ θεά, τοῦ Δία κόρη.
:::

:::pagebreak{parity="even"}

:::verse{lineStart=11}
ἔνθ’ ἄλλοι μὲν πάντες, ὅσοι φύγον αἰπὺν ὄλεθρον,
οἴκοι ἔσαν, πόλεμόν τε πεφευγότες ἠδὲ θάλασσαν·
τὸν δ’ οἶον, νόστου κεχρημένον ἠδὲ γυναικός,
νύμφη πότνι’ ἔρυκε Καλυψώ, δῖα θεάων,
ἐν σπέεσι γλαφυροῖσι, λιλαιομένη πόσιν εἶναι.
ἀλλ’ ὅτε δὴ ἔτος ἦλθε περιπλομένων ἐνιαυτῶν,
τῷ οἱ ἐπεκλώσαντο θεοὶ οἶκόνδε νέεσθαι
εἰς Ἰθάκην, οὐδ’ ἔνθα πεφυγμένος ἦεν ἀέθλων
καὶ μετὰ οἷσι φίλοισι· θεοὶ δ’ ἐλέαιρον ἅπαντες
νόσφι Ποσειδάωνος· ὁ δ’ ἀσπερχὲς μενέαινεν
ἀντιθέῳ Ὀδυσῆϊ πάρος ἣν γαῖαν ἱκέσθαι.
ἀλλ’ ὁ μὲν Αἰθίοπας μετεκίαθε τηλόθ’ ἐόντας,
Αἰθίοπας, τοὶ διχθὰ δεδαίαται, ἔσχατοι ἀνδρῶν,
οἱ μὲν δυσομένου Ὑπερίονος, οἱ δ’ ἀνιόντος,
ἀντιόων ταύρων τε καὶ ἀρνειῶν ἑκατόμβης.
ἔνθ’ ὅ γε τέρπετο δαιτὶ παρήμενος· οἱ δὲ δὴ ἄλλοι
Ζηνὸς ἐνὶ μεγάροισιν Ὀλυμπίου ἁθρόοι ἦσαν.
:::

:::pagebreak{parity="odd"}

:::verse{lineStart=11}
Ὅλοι ποὺ τότες τὸν πολὺ τὸ χαλασμὸ ξεφύγαν
γυρίσανε, ἀπὸ πόλεμο καὶ θάλασσα σωσμένοι,
καὶ μόνο ἐκειόνε, σπιτικὸ καὶ ταίρι στερημένο,
ἡ Καλυψὼ ἡ τρισέμορφη θεὰ τόνε κρατοῦσε,
γιατὶ ἄντρα της τὸν ἤθελε στὶς βαθουλὲς σπηλιές της.
Μὰ ὁ γῦρος σὰν τελέστηκε τῶν χρόνων, κι ἦρθε ἡ ὥρα,
ποὺ τό ’χανε οἱ θεοὶ γραφτὸ στὸ Θιάκι νὰ ξανάρθη
στὸ σπιτικό του, μήτ’ ἐκεῖ δὲν τοῦ ’λειψαν οἱ ἀγῶνες,
καὶ σὲ δικοὺς κοντά. Κι οἱ θεοὶ τὸν συμπονοῦσαν ὅλοι,
ἐξὸν τὸν Ποσειδώνα· αὐτὸς βαριὰ ἦταν χολωμένος
μὲ τὸ Δυσσέα τὸ θεϊκό, στὸν τόπο του πρὶν φτάση.
Βρισκόταν στοὺς Αἰθίοπες ὁ Ποσειδώνας τότες,
ποὺ ζοῦνε μοιραστοὶ μακριὰ στοῦ κόσμου τὶς ἀκροῦλες,
στοῦ Ἡλιοῦ τὸ βούλημα οἱ μισοί, στ’ ἀνάβλεμμά του οἱ ἄλλοι,
γιὰ νὰ δεχτῆ ἑκατοβοδιὰ ἀπὸ ταύρους καὶ κριάρια.
Ἐκεῖ γλυκοξεφάντωνε· οἱ θεοὶ ὡς τόσο οἱ ἄλλοι
στοὺς πύργους μαζωχτήκανε τοῦ Δία τοῦ Ὀλυμπήσου,
:::
`, String.raw`# A note on the text {style="note-page"}

:::paragraphs{style="note"}
The opening of the Odyssey, lines 1–27 of Book I, faces the modern Greek of Argyris Eftaliotis (1849–1923), who rendered Homer line for line in the fifteen-syllable verse of the folk songs, so that each line of the translation stands level with its original. Both are polytonic: the Homer in the text of Greek Wikisource, the translation in Eftaliotis’s own spelling, from the same library, with one accent corrected. Before them stand the last two sections of the Life of Homer that the Suda keeps from Hesychius of Miletus (ed. A. Westermann, 1845), with four slips corrected, and the epitaph on Homer’s grave on Ios.
:::

:::paragraphs{style="colophon"}
Set in GFS Didot (SIL OFL) · Texts: Homer, Hesychius and A. Eftaliotis, public domain, from el.wikisource
:::
`].join('\n\n');

// ─── 3 · Fonts ──────────────────────────────────────────────────────────────
const FONTS = { 'GFS Didot': ['400'] }; // DIDOT: every text on the pages; it has one weight

// ─── 4 · Build & show ───────────────────────────────────────────────────────
await loadFonts(FONTS, markdown); // latin and greek
await loadGreekExtended(FONTS); // and the polytonic letters
const doc = await buildDocumentWithFonts({ markdown }, config(), kitFonts(FONTS));
showPages(doc, { title: 'Ὀδύσσεια · Ῥαψῳδία α' });

// ─── Kit ── helpers shared by every Cookbook recipe · postext.dev/cookbook ─────

// ─── Kit · core v1 ── the same in every recipe · postext.dev/cookbook
function mm(value) { return { value, unit: 'mm' }; }
function pt(value) { return { value, unit: 'pt' }; }
function em(value) { return { value, unit: 'em' }; }
/** The sample language's string: t({ en: 'Figure', es: 'Figura' }). */
function t(strings) { return strings[LANG] ?? Object.values(strings)[0]; }
/** A file in this recipe's assets folder, served from the Postext repo by jsDelivr. */
function asset(file) { return `https://cdn.jsdelivr.net/gh/drnachio/postext@main/cookbook/${RECIPE}/assets/${file}`; }

// ─── Kit · fonts v3 ── the same in every recipe · postext.dev/cookbook
// Postext loads the faces a config asks for before layout and asks the kit
// for Fontsource's files, the ones the PDF embeds too.

/** buildDocumentWithFonts' options: the resolver, and FONTS' faces loaded
 *  with the config's. FONTS = { 'Family Name': ['400', '400i', '700'] }. */
function kitFonts(FONTS = {}) {
  const faces = Object.entries(FONTS).flatMap(([family, specs]) => specs.map((spec) =>
    ({ family, weight: parseInt(spec, 10), style: spec.endsWith('i') ? 'italic' : 'normal' })));
  return { resolve: fontsourceResolver, faces };
}

/** A face's files with their ranges: latin, then latin-ext and greek when
 *  `text` needs them (kitSubsetsFor). Null for a face Fontsource lacks. */
async function fontsourceResolver(family, weight, style, { text = '' } = {}) {
  const id = fontsourceId(family);
  const meta = await fontsourceMeta(family);
  if (meta && !(await fontsourceWeights(family, style)).includes(weight)) return null;
  kitStatus('Loading fonts…');
  const at = await fontsourceAt(id);
  return ['latin', ...kitSubsetsFor(text, meta)].map((subset) => ({
    source: `${at}files/${id}-${subset}-${weight}-${style}.woff2`,
    unicodeRange: kitRanges()[subset],
  }));
}

/** Each file's unicode-range (a function: the kit runs after the pen's code). */
function kitRanges() {
  return {
    latin: 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,'
      + 'U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
    'latin-ext': 'U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,'
      + 'U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF',
    greek: 'U+0370-03FF',
  };
}

/** For the cjk, arabic and comics blocks: loads `faces` (as FONTS) for the
 *  sample `text`; `optional` skips a face Fontsource lacks. Files are added in
 *  the order asked, the last winning a shared character. Resolves to the count. */
async function loadFonts(faces, text = '', { optional = false } = {}) {
  kitStatus('Loading fonts…');
  const ranges = kitRanges();
  const jobs = [];
  for (const [family, specs] of Object.entries(faces)) {
    const id = fontsourceId(family);
    const todo = [...new Set(specs)].map((spec) => [parseInt(spec, 10), spec.endsWith('i') ? 'italic' : 'normal'])
      .filter(([weight, style]) => !hasFace(family, weight, style)); // before any await
    const at = fontsourceAt(id);
    const meta = optional || /[^\0-ÿ]/u.test(text) ? await fontsourceMeta(family) : null;
    const subsets = ['latin', ...kitSubsetsFor(text, meta)];
    for (const [weight, style] of todo) {
      if (optional && !(meta && (await fontsourceWeights(family, style)).includes(weight))) continue;
      for (const subset of subsets) {
        const url = `${await at}files/${id}-${subset}-${weight}-${style}.woff2`;
        const face = new FontFace(family, `url(${url}) format('woff2')`,
          { weight: String(weight), style, unicodeRange: ranges[subset] });
        jobs.push(face.load().catch(() => {
          if (subset === 'latin' && !optional) throw new Error(`Fontsource has no ${family} ${weight} ${style}`);
        }));
      }
    }
  }
  const ready = await Promise.all(jobs).catch((error) => { kitFail(error); throw error; });
  return ready.filter((face) => face && document.fonts.add(face)).length;
}

/** A loaded FontFace covers this face (fonts.check() says yes to any family). */
function hasFace(family, weight, style) {
  for (const face of document.fonts) {
    if (face.status !== 'loaded' || face.style !== style) continue;
    if (face.family.replace(/^["']|["']$/g, '') !== family) continue;
    const [low, high = low] = face.weight.split(' ').map(Number);
    if (weight >= low && weight <= high) return true;
  }
  return false;
}

/** The files beyond latin `text` needs that `meta`'s family ships. */
function kitSubsetsFor(text, meta) {
  return [[/[Ā-˿ᴀ-ᶿḀ-ỿ†ℓⱠ-Ɀ꜠-ꟿ]/u, 'latin-ext'], [/[Ͱ-Ͽ]/u, 'greek']]
    .filter(([re, x]) => re.test(text) && meta?.subsets?.includes(x)).map(([, x]) => x);
}

/** Fontsource's id for a family: 'Source Serif 4' → 'source-serif-4'. */
function fontsourceId(family) { return family.toLowerCase().replace(/\s+/g, '-'); }

/** A package's folder at the one version @5 names now (#766). */
function fontsourceAt(id, u = `https://cdn.jsdelivr.net/npm/@fontsource/${id}@`) {
  return (fontsourceAt.c ??= {})[id] ??= fetch(u + '5/package.json').then((r) => r.json())
    .then((p) => p.version || 5, () => 5).then((v) => `${u}${v}/`);
}

/** The family's Fontsource metadata (weights, styles, subsets), or null. */
function fontsourceMeta(family, id = fontsourceId(family)) {
  return (fontsourceMeta.c ??= {})[id] ??= fetch(`https://api.fontsource.org/v1/fonts/${id}`)
    .then((res) => (res.ok ? res.json() : null), () => null);
}

/** The weights the package ships in `style`: the API pairs none (no Libre
 *  Caslon 700 italic file), so italics are read from latin-italic.css. */
function fontsourceWeights(family, style, id = fontsourceId(family)) {
  return (fontsourceWeights.c ??= {})[id + style] ??= fontsourceMeta(family).then(async (m) => {
    if (!m?.styles.includes(style)) return m ? [] : [400, 700];
    const css = style === 'italic' ? await fetch(`${await fontsourceAt(id)}latin-italic.css`).then((r) => (r.ok ? r.text() : ''), () => '') : '';
    const w = [...css.matchAll(/weight: (\d+)/g)].map((x) => +x[1]);
    return w.length ? w : m.weights;
  });
}

// ─── Kit · viewer v2 ── the same in every recipe · postext.dev/cookbook
/** The pages as spreads on a dark desk, page 1 alone, then verso | recto,
 *  each painted when it scrolls near. Other options go to renderPageToCanvas. */
function showPages(docs, { title, width = 460, ...render } = {}) {
  const root = viewer(title);
  const pages = [docs].flat().flatMap((doc) =>
    doc.pages.map((page) => ({ doc, page, n: (doc.pageIndexOffset ?? 0) + page.index })));
  const spreads = [];
  let verso = null;
  for (const p of pages) {
    if (p.n % 2 === 1) { if (verso) spreads.push([verso, null]); verso = p; }
    else { spreads.push([verso, p]); verso = null; }
  }
  if (verso) spreads.push([verso, null]);
  const density = Math.min(window.devicePixelRatio || 1, 2);
  showPages.painter?.disconnect();
  const painter = new IntersectionObserver((entries) => {
    for (const { isIntersecting, target } of entries) {
      if (!isIntersecting) continue;
      painter.unobserve(target);
      const { doc, page } = target.postext;
      renderPageToCanvas(page, doc, target, { ...render, scale: (width * density) / page.width });
    }
  }, { rootMargin: '800px' });
  showPages.painter = painter;
  root.replaceChildren(...spreads.map((pair) => {
    const spread = document.createElement('div');
    spread.className = 'pt-spread';
    for (const p of pair) {
      const figure = document.createElement('figure');
      if (p) {
        const label = p.page.pageLabel || String(p.n + 1);
        const canvas = document.createElement('canvas');
        canvas.postext = p;
        canvas.style.aspectRatio = `${p.page.width} / ${p.page.height}`;
        canvas.setAttribute('role', 'img');
        canvas.setAttribute('aria-label', `Page ${label}`);
        const folio = document.createElement('figcaption');
        folio.textContent = label;
        figure.append(canvas, folio);
        painter.observe(canvas);
      } else figure.className = 'pt-blank';
      spread.append(figure);
    }
    return spread;
  }));
  kitStatus(`${pages.length} ${pages.length === 1 ? 'page' : 'pages'}`);
  document.documentElement.dataset.postext = 'ready';
  return pages.length;
}

/** The desk, the bar and the error reporting, created once. */
function viewer(title) {
  if (!document.getElementById('pt-kit')) {
    document.head.insertAdjacentHTML('beforeend', `<style id="pt-kit">
      :root { color-scheme: dark; }
      body { margin: 0; background: #0e1014; color: #b9bcc4; font: 13px/1.45 system-ui, sans-serif; }
      #pt-bar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center;
        gap: 6px 16px; padding: 10px 16px; background: rgb(14 16 20 / .92); backdrop-filter: blur(6px);
        border-bottom: 1px solid #23262d; }
      #pt-bar strong { color: #f4f1ea; font-weight: 600; }
      #pt-actions { display: flex; gap: 12px; margin-left: auto; }
      #pt-actions a, #pt-actions button { color: #d8a21a; font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
      #pages { display: grid; justify-items: center; gap: 48px; padding: 32px 16px 72px; }
      .pt-spread { display: flex; }
      .pt-spread figure { margin: 0; width: min(460px, 44vw); }
      .pt-spread canvas { display: block; width: 100%; background: #fff;
        box-shadow: 0 1px 2px rgb(0 0 0 / .5), 0 22px 44px -16px rgb(0 0 0 / .8); }
      .pt-spread figure:first-child canvas { box-shadow: inset -14px 0 14px -14px rgb(0 0 0 / .18), 0 1px 2px rgb(0 0 0 / .5), 0 22px 44px -16px rgb(0 0 0 / .8); }
      .pt-spread figcaption { margin-top: 10px; text-align: center; font: 600 10px/1 system-ui, sans-serif;
        letter-spacing: .18em; text-transform: uppercase; color: #6c7079; }
      .pt-blank { visibility: hidden; }
      @media (max-width: 760px) {
        .pt-spread { flex-direction: column; gap: 32px; }
        .pt-spread figure { width: min(460px, 92vw); }
        .pt-blank { display: none; }
      }
    </style>`);
    document.body.insertAdjacentHTML('afterbegin',
      '<header id="pt-bar"><strong id="pt-title"></strong><span id="pt-status" role="status"></span><span id="pt-actions"></span></header>');
    document.getElementById('pt-title').textContent = document.title || 'Postext';
    addEventListener('error', (event) => kitFail(event.error ?? event.message));
    addEventListener('unhandledrejection', (event) => kitFail(event.reason));
  }
  if (title) document.getElementById('pt-title').textContent = title;
  return document.getElementById('pages')
    ?? document.body.appendChild(Object.assign(document.createElement('main'), { id: 'pages' }));
}

function kitStatus(text) {
  viewer();
  document.getElementById('pt-status').textContent = text;
}

function kitFail(error) {
  document.documentElement.dataset.postext = 'error';
  kitStatus(`Error: ${error?.message ?? error}`);
}

// ─── /Kit ───────────────────────────────────────────────────────────────────────
```

## Häufige Fehler

- **Ein Überschriftenformat erbt den Seitenumbruch seiner Ebene.** Ein Eintrag in headingStyles übernimmt jedes Feld, das er auslässt, von seiner Überschriftenebene, breakBefore eingeschlossen. Ein Inhaltsverzeichnis oder Impressum, das nach einem :::pagebreak über eine H1 gestaltet wird, erbt die Parität 'odd' und landet hinter einer Vakatseite. Geben Sie einem solchen Format breakBefore: { enabled: false }.

- Ohne die Datei greek-ext fällt jeder akzentuierte Vokal auf eine Systemschrift, die selten passt. Die Aufnahme prüft jede Glyphe gegen die geladenen Dateien (C36) und lehnt eine solche Seite ab.
- GFS Didot hat nur einen Schnitt und keine Kursive: Eine Betonung würde der Renderer schräg stellen. Die Notiz zum Text steht deshalb aufrecht.
- Der PDF-Schriftlieferant des Kits lädt nur latin und greek, daher zeigt dieses Rezept die Canvas-Ansicht und bietet kein PDF an.
- Kein Vers der Übersetzung darf breiter sein als die Satzbreite. Ein umbrechender Vers schiebt den Rest der Seite um eine Zeile nach unten, und die beiden Seiten stehen nicht mehr Vers für Vers gegenüber; 103 mm bei 10,2 pt fassen Eftaliotis’ längsten Vers, 59 Buchstaben.

## Nachweise

- Rezept: Ignacio Ferro ([@drnachio](https://github.com/drnachio))
- Text: Odyssey, Book I, lines 1–27, in the polytonic text of el.wikisource (revision 165777): Homer ([Quelle](https://el.wikisource.org/wiki/Οδύσσεια/α)), gemeinfrei
- Text: The modern Greek translation of the same lines, line for line, from el.wikisource (revision 166701), with one accent corrected: Argyris Eftaliotis ([Quelle](https://el.wikisource.org/wiki/Οδύσσεια_(Μετάφραση_Εφταλιώτη)/α)), gemeinfrei
- Text: Life of Homer, §§ 6–7 and the epitaph, from the Suda (ed. A. Westermann, 1845), via el.wikisource (revision 152483), with four slips corrected: Hesychius of Miletus ([Quelle](https://el.wikisource.org/wiki/Ησυχίου_Βίος_Ομήρου)), gemeinfrei
- Text: The note on the text and the colophon: Postext Cookbook, Original
- Schrift: GFS Didot (OFL-1.1)
- Code: MIT · Beispielinhalt: CC-BY-4.0

## Verwandte Rezepte

- [Nº 083 · Tang-Gedichte gegenüber ihren englischen Versen](https://postext.dev/de/cookbook/tang-poems-facing-english.md): Jedes Tang-Gedicht eröffnet eine getönte rechte Seite, Giles’ Englisch die linke gegenüber: Ein Stil bricht auf gerade Seiten um, der andere auf ungerade. · Stufe 2 (Mittel) · Lyrik
- [Nº 044 · Kritische Ausgabe: Zeilenzählung und Noten nach Zeilen](https://postext.dev/de/cookbook/critical-edition-line-numbers.md): Miltons „Lycidas“ im Text von 1645: lineNumbers setzt jede fünfte Zeilennummer in die Seitenspalte, und jede Note beginnt mit ihrer Zeilennummer als Chip. · Stufe 3 (Fortgeschritten) · Lyrik
- [Nº 043 · Übersetzung gegenüber, Strophe für Strophe](https://postext.dev/de/cookbook/bilingual-facing-verse.md): Jedes Gedicht ist ein randloser Kasten mit zwei Spalten; ein fester Spaltenumbruch setzt den englischen Titel oben in die zweite, :::space gleicht Strophen an. · Stufe 2 (Mittel) · Lyrik
