# Εικονογραφημένο χρονολόγιο σε δισέλιδο

> Πρότυπο δισέλιδου για το χρονολόγιο σχολικού βιβλίου: ζώνη πάνω από τη ράχη, πλέγμα με μία κάρτα ανά χρονολογία, γραμμή σύνδεσης ως κάθε κάρτα.

- Έκδοση HTML: https://postext.dev/el/cookbook/illustrated-timeline-spread
- Συνταγή Αρ. 158 · Σχολικά βιβλία · Επίπεδο 3 (Προχωρημένο) · Έξοδοι: Canvas, PDF
- Είδη: Σχολικά βιβλία
- Απαιτεί postext ≥ 1.49.0, postext-pdf ≥ 1.49.0 · δοκιμασμένη με 1.65.0, postext-pdf 1.65.0 στις 2026-10-31
- Σελίδες: [48](https://postext.dev/cookbook/illustrated-timeline-spread/en/p01.webp?v=282ec879), [49](https://postext.dev/cookbook/illustrated-timeline-spread/en/p02.webp?v=282ec879)
- PDF: https://postext.dev/cookbook/illustrated-timeline-spread/en/illustrated-timeline-spread.pdf?v=282ec879
- Άνοιγμα στο Sandbox: https://postext.dev/el/sandbox#recipe=illustrated-timeline-spread&lang=en (.postext: https://postext.dev/cookbook/illustrated-timeline-spread/en/illustrated-timeline-spread.postext)
- Τελευταία ενημέρωση: 2026-10-21
- Άλλες γλώσσες: [en](https://postext.dev/en/cookbook/illustrated-timeline-spread.md), [es](https://postext.dev/es/cookbook/illustrated-timeline-spread.md), [ca](https://postext.dev/ca/cookbook/illustrated-timeline-spread.md), [de](https://postext.dev/de/cookbook/illustrated-timeline-spread.md), [fr](https://postext.dev/fr/cookbook/illustrated-timeline-spread.md), [it](https://postext.dev/it/cookbook/illustrated-timeline-spread.md), [pt](https://postext.dev/pt/cookbook/illustrated-timeline-spread.md), [zh](https://postext.dev/zh/cookbook/illustrated-timeline-spread.md), [ja](https://postext.dev/ja/cookbook/illustrated-timeline-spread.md), [ar](https://postext.dev/ar/cookbook/illustrated-timeline-spread.md)

## Με λίγα λόγια

Δύο αντικριστές σελίδες σχολικού βιβλίου ιστορίας φτιαγμένες ως μία: μια χρωματιστή ζώνη διασχίζει τη μέση του βιβλίου και κρατά έξι κάρτες με εικόνες· το πρότυπο σχεδιάζει μία κάρτα και μία γραμμή, όσες κι αν είναι οι χρονολογίες.

## Τι θα στοιχειοθετήσετε

Τις σελίδες 48 και 49 ενός βιβλίου ιστορίας του γυμνασίου: *The paper road*, χίλια χρόνια χαρτοποιίας από το εργαστήριο του Τσάι Λουν ως τον μυλόλιθο του Keller. Η αριστερή σελίδα ανοίγει με τον τίτλο και δύο παραγράφους, η δεξιά με ένα πλαίσιο για το πώς φτιαχνόταν ένα φύλλο με το χέρι. Στη μέση τρέχει το χρονολόγιο: μια λουλακί ζώνη για την Ασία και μια ζώνη στο χρώμα της τερακότας για την Ευρώπη, που αρχίζει στην αριστερή σελίδα και περνά πάνω από τη ράχη. Από κάτω, έξι κάρτες με μία εικόνα η καθεμία, κρεμασμένες από τη ζώνη με έναν κρίκο και μια κατακόρυφη γραμμή. Το πρότυπο σχεδιάζει μία ασιατική κάρτα, μία ευρωπαϊκή κάρτα και μία γραμμή σύνδεσης ανά ζώνη: ένα πλέγμα τοποθετεί μια κάρτα για κάθε χρονολογία που δίνει το Markdown, και η γραμμή σύνδεσης βρίσκει κάθε κάρτα που τοποθέτησε το πλέγμα. Κάθε λέξη βρίσκεται στο Markdown, στα ισπανικά, τα αγγλικά και τα ιαπωνικά.

**Αυτή η συνταγή απαντά:**

- Πώς στήνω ένα χρονολόγιο σε δισέλιδο, με κάρτες και στις δύο σελίδες;
- Πώς αφήνω μια σειρά πλαισίων να μοιράζεται το πλάτος της, ώστε αυτό με το μεγαλύτερο κείμενο να φαρδαίνει;

## Η σύντομη απάντηση

```js
// script.js, γραμμές 54–81
const pageTemplates = [{
  id: 'timeline',
  spread: true, // two facing pages laid as one sheet; it opens on a verso
  gutter: mm(10), // the band round the spine that frames keep off
  grid: { columns: 2, rows: ROWS, columnGap: mm(2 * PAGE.inner), rowGap: mm(ROW_GAP) },
  frames: [
    { name: 'title', takes: 'h1' },
    { name: 'lead', flow: true, fit: { minScale: 0.8 } },
    { name: 'box', style: 'box', grid: { col: 2, row: 1, rows: 4 }, height: 'fill',
      padding: { right: mm(66) }, fit: { minScale: 0.85 } },
    { name: 'box-picture', layer: 2, width: mm(56), placement: at('#box', 'top-right', -5, 10) },
    { name: 'band-1', style: 'band-asia', grid: { col: 1, row: 5 }, height: mm(BAND) },
    { name: 'band-2', style: 'band-europe', crossGutter: true, width: 'fill', height: mm(BAND),
      padding: { left: mm(2 * PAGE.inner + 4) }, // the colour crosses the fold, the words do not
      placement: at('#band-1', 'right-of') },
    card('asia', 'card-asia'), card('europe', 'card-europe'),
    { name: 'colophon', style: 'colophon', optional: true, width: mm(170),
      placement: at('page', 'bottom-right', -PAGE.outer, -7) },
  ],
  groups: [
    { name: 'opening', kind: 'stack', grid: { col: 1, row: 1, rows: 4 }, gap: mm(4),
      frames: ['title', 'lead'] },
    // A row of cards under each band, as many as the Markdown has: a longer text makes its
    // row taller, and the other cards of the row stretch to the same height.
    row('asia', 1), row('europe', 2),
  ],
  decoration: { elements: [ground(), ticks('band-1', 'asia'), ticks('band-2', 'europe')] },
}];
```

## Υλικά

**Διδάσκει**

- [Πρότυπα δισέλιδων](https://postext.dev/el/docs/composed-pages.md#δισέλιδα): Ένα πρότυπο με spread: true απλώνει δύο αντικριστές σελίδες ως ένα φύλλο ξεκινώντας από αριστερή σελίδα· ένα πλαίσιο κειμένου με crossGutter διασχίζει τη ράχη, και τα υπόλοιπα μένουν έξω από τη ζώνη του εσωτερικού περιθωρίου.
- [Πλέγματα που επαναλαμβάνουν ένα σύνολο πλαισίων](https://postext.dev/el/docs/configuration-composed-pages.md#πλέγματα-που-επαναλαμβάνουν-ένα-σύνολο-πλαισίων): Μια ομάδα grid δηλώνει μία φορά ένα σύνολο πλαισίων κειμένου, μια κάρτα και τη λεζάντα της, και το ξανατοποθετεί για κάθε στοιχείο που της δίνει το Markdown της σελίδας, σε σειρές από ίσες στήλες, ονομάζοντας τα αντίγραφα #card[1], #card[2]…
- [Συνδέσεις ανάμεσα σε πλαίσια κειμένου](https://postext.dev/el/docs/configuration-composed-pages.md#σύνδεσμοι): Μια σύνδεση της διακόσμησης ενός προτύπου σχεδιάζει μια γραμμή από ένα πλαίσιο κειμένου προς ένα ή περισσότερα άλλα, ευθεία, με ορθές γωνίες ή σε μορφή δέντρου, με κουκκίδες ή βέλη στα άκρα της· τοποθετείται μετά τα πλαίσια κειμένου, οπότε τα ακολουθεί όταν ένα κείμενο μεγαλώνει.

**Χρησιμοποιεί επίσης**

- [Στοιχειοθετημένες σελίδες](https://postext.dev/el/docs/composed-pages.md#στοιχειοθετημένες-σελίδες)
- [Πλαίσια κειμένου που μεγαλώνουν σε ομάδα](https://postext.dev/el/docs/composed-pages.md#όταν-το-κείμενο-μεγαλώνει)
- [Διακόσμηση αγκυρωμένη σε πλαίσια κειμένου](https://postext.dev/el/docs/composed-pages.md#διακόσμηση-τρέχουσες-κεφαλίδες-και-επίπεδα)
- [Αριθμημένες καρτέλες πλαισίων](https://postext.dev/el/docs/configuration-callouts.md#στιλ-πλαισίων)
- [Πλαίσια σημειώσεων](https://postext.dev/el/docs/configuration-callouts.md#στιλ-πλαισίων)
- [Αγκύρωση στοιχείων σχεδίασης](https://postext.dev/el/docs/configuration-headers-footers.md#τοποθέτηση-στοιχείων)
- [Τρέχουσες κεφαλίδες και αριθμοί σελίδας](https://postext.dev/el/docs/configuration-headers-footers.md#κεφαλίδες-και-υποσέλιδα)
- [Συμμετρικά περιθώρια](https://postext.dev/el/docs/configuration-page-layout.md#κατοπτρικά-περιθώρια)
- [Αριθμημένες λίστες](https://postext.dev/el/docs/configuration-lists-math.md#αριθμημένες-λίστες)
- [Κινεζικές, ιαπωνικές και κορεατικές γραμματοσειρές](https://postext.dev/el/docs/configuration-pdf-output.md#γραμματοσειρές-για-κινεζικά-ιαπωνικά-και-κορεατικά)
- [Σημασιολογική χρωματική παλέτα](https://postext.dev/el/docs/configuration-fonts-colors-viewers.md#παλέτα-χρωμάτων)
- [Σελίδες σε καμβά](https://postext.dev/el/docs/configuration-programmatic-usage.md#απόδοση-σελίδας-σε-bitmap)
- [Εξαγωγή PDF](https://postext.dev/el/docs/configuration-pdf-output.md#παραγωγή-pdf)
- [Εικόνες ακριβώς εδώ](https://postext.dev/el/docs/document-format-resources.md#ενσωμάτωση-μπλοκ-προαιρετική-ρητή-τοποθέτηση-μέσα-στη-ροή)
- [Γραμματοσειρές ενσωματωμένες στο PDF](https://postext.dev/el/docs/configuration-pdf-output.md#γιατί-πάροχος-γραμματοσειρών)
- [Προσαρμοσμένοι τύποι πόρων](https://postext.dev/el/docs/configuration-resources.md#τύποι-πόρων)
- [Εικόνες και πίνακες ως πόροι](https://postext.dev/el/docs/document-format-resources.md#πόροι)

**Η διαμόρφωση με μια ματιά**

- [`bodyText`](https://postext.dev/el/docs/configuration-text.md#κυρίως-κείμενο), [`calloutStyles`](https://postext.dev/el/docs/configuration-callouts.md#στιλ-πλαισίων), [`canvasViewer`](https://postext.dev/el/docs/configuration-fonts-colors-viewers.md#προβολή-καμβά), [`colorPalette`](https://postext.dev/el/docs/configuration-fonts-colors-viewers.md#παλέτα-χρωμάτων), [`footer`](https://postext.dev/el/docs/configuration-headers-footers.md#κεφαλίδες-και-υποσέλιδα), [`header`](https://postext.dev/el/docs/configuration-headers-footers.md#κεφαλίδες-και-υποσέλιδα), [`headings`](https://postext.dev/el/docs/configuration-headings.md#επικεφαλίδες), [`layout`](https://postext.dev/el/docs/configuration-page-layout.md#διάταξη), [`locale`](https://postext.dev/el/docs/configuration-language.md#συλλαβισμός), [`orderedLists`](https://postext.dev/el/docs/configuration-lists-math.md#αριθμημένες-λίστες), [`page`](https://postext.dev/el/docs/configuration-page-layout.md#σελίδα), [`pageTemplates`](https://postext.dev/el/docs/configuration-composed-pages.md#πρότυπα-σελίδας), [`resourceTypes`](https://postext.dev/el/docs/configuration-resources.md#τύποι-πόρων)

**API**

- [`buildDocument`](https://postext.dev/el/docs/configuration-programmatic-usage.md#κατασκευή-εγγράφου), [`decompressWoff2`](https://postext.dev/el/docs/configuration-pdf-output.md#πάροχος-γραμματοσειρών-για-τον-browser-fontsource--woff2), [`registerResourceImage`](https://postext.dev/el/docs/architecture.md#η-επιφάνεια-του-api), [`renderPageToCanvas`](https://postext.dev/el/docs/configuration-programmatic-usage.md#απόδοση-σελίδας-σε-bitmap), [`renderToPdf`](https://postext.dev/el/docs/configuration-pdf-output.md#παραγωγή-pdf), [`withLoadedFonts`](https://postext.dev/el/docs/configuration-programmatic-usage.md#φόρτωση-γραμματοσειρών-πριν-από-τη-σελιδοποίηση)

**Γραμματοσειρές**

- Literata (OFL-1.1), Archivo (OFL-1.1), Noto Serif JP (OFL-1.1), Noto Sans JP (OFL-1.1)

## Προετοιμασία

### 1 · Ένα φύλλο για δύο σελίδες

```js
// script.js, γραμμές 54–81
const pageTemplates = [{
  id: 'timeline',
  spread: true, // two facing pages laid as one sheet; it opens on a verso
  gutter: mm(10), // the band round the spine that frames keep off
  grid: { columns: 2, rows: ROWS, columnGap: mm(2 * PAGE.inner), rowGap: mm(ROW_GAP) },
  frames: [
    { name: 'title', takes: 'h1' },
    { name: 'lead', flow: true, fit: { minScale: 0.8 } },
    { name: 'box', style: 'box', grid: { col: 2, row: 1, rows: 4 }, height: 'fill',
      padding: { right: mm(66) }, fit: { minScale: 0.85 } },
    { name: 'box-picture', layer: 2, width: mm(56), placement: at('#box', 'top-right', -5, 10) },
    { name: 'band-1', style: 'band-asia', grid: { col: 1, row: 5 }, height: mm(BAND) },
    { name: 'band-2', style: 'band-europe', crossGutter: true, width: 'fill', height: mm(BAND),
      padding: { left: mm(2 * PAGE.inner + 4) }, // the colour crosses the fold, the words do not
      placement: at('#band-1', 'right-of') },
    card('asia', 'card-asia'), card('europe', 'card-europe'),
    { name: 'colophon', style: 'colophon', optional: true, width: mm(170),
      placement: at('page', 'bottom-right', -PAGE.outer, -7) },
  ],
  groups: [
    { name: 'opening', kind: 'stack', grid: { col: 1, row: 1, rows: 4 }, gap: mm(4),
      frames: ['title', 'lead'] },
    // A row of cards under each band, as many as the Markdown has: a longer text makes its
    // row taller, and the other cards of the row stretch to the same height.
    row('asia', 1), row('europe', 2),
  ],
  decoration: { elements: [ground(), ticks('band-1', 'asia'), ticks('band-2', 'europe')] },
}];
```

Το `spread: true` κάνει το πρότυπο ένα φύλλο τόσο φαρδύ όσο και οι δύο σελίδες, και ο φράχτης της σελίδας λέει το ίδιο με το `spread`. Ένα δισέλιδο ανοίγει σε αριστερή σελίδα, γι’ αυτό η κατασκευή περνά `continuation: { pageIndexOffset: 1, pageNumbering: { startAt: 48 } }`: η σελίδα 1 αυτού του αποσπάσματος είναι η σελίδα 48 του βιβλίου, μια αριστερή σελίδα, και δεν προηγείται καμία λευκή σελίδα. Το πλέγμα έχει μία στήλη ανά σελίδα, με διάκενο διπλάσιο από το εσωτερικό περιθώριο, ώστε τίποτε άλλο εκτός από τη ζώνη να μην πλησιάζει το δίπλωμα. Η δεύτερη ζώνη ορίζει `crossGutter` και αριστερό εσωτερικό διάστημα 36 mm: το χρώμα της τρέχει από το τέλος της πρώτης ζώνης πάνω από τη ράχη, και οι λέξεις της αρχίζουν στη δεξιά σελίδα, εκεί όπου τις διαβάζει η σελιδοποίηση.

### 2 · Μία κάρτα, επαναλαμβανόμενη από ένα πλέγμα

```js
// script.js, γραμμές 46–50
// Each `:::frame{slot="asia"}` of the page is an item of the `asia` grid: the grid lays the
// card frame once per item, three to a row, and names the copies `#asia[1]`, `#asia[2]`…
const card = (name, style) => ({ name, style, minHeight: mm(CARD) }); // auto above that height
const row = (name, col) => ({ name: `${name}-row`, kind: 'grid', columns: 3, columnGap: mm(5),
  grid: { col, row: 6, rows: ROWS - 5 }, repeat: { frames: [name] } });
```

Μια ομάδα `kind: 'grid'` με `repeat: { frames: ['asia'] }` τοποθετεί το πλαίσιο κειμένου `asia` μία φορά για κάθε `:::frame{slot="asia"}` της σελίδας, τρία ανά σειρά, στο κελί `col: 1` του πλέγματος του προτύπου, σειρές 6 έως 12. Τα αντίγραφα ονομάζονται `#asia[1]`, `#asia[2]` και `#asia[3]`, και το καθένα παίρνει το `label` του δικού του φράχτη, τη χρονολογία στην καρτέλα του. Μια κάρτα έχει ύψος τουλάχιστον `minHeight` και `auto` πάνω από αυτό: όταν ένα κείμενο μακραίνει, όπως της κάρτας του 1844 στα ισπανικά και τα ιαπωνικά, η σειρά του ψηλώνει και οι άλλες κάρτες της σειράς τεντώνονται στο ίδιο ύψος (το `rowAlign` είναι `'stretch'` από προεπιλογή). Μια τέταρτη χρονολογία στο Markdown ανοίγει δεύτερη σειρά κάτω από την πρώτη· το πρότυπο δεν αλλάζει.

### 3 · Μια γραμμή σύνδεσης για κάθε ζώνη

```js
// script.js, γραμμές 85–91
// `routing: 'tree'` with `trunk: 0` draws no bar of its own: each drop hangs from the band's
// foot straight down to the middle of a card's top, and `#asia[*]` names every card laid.
function ticks(band, cards) {
  return { kind: 'connector', id: `${cards}-ticks`, routing: 'tree', trunk: 0,
    from: { to: `#${band}`, side: 'bottom', gap: mm(2.4) }, to: { to: `#${cards}[*]`, side: 'top' },
    color: col(cards), width: pt(1), startCap: 'ring', capSize: mm(3.6) };
}
```

Οι κατακόρυφες γραμμές είναι ένα `connector` ανά ζώνη στη `decoration` του προτύπου. Το `routing: 'tree'` ενώνει έναν γονέα με πολλά παιδιά· με `trunk: 0` δεν σχεδιάζει δική του μπάρα, μόνο μια ευθεία γραμμή από το πόδι της ζώνης ως τη μέση της πάνω πλευράς κάθε κάρτας, και το `startCap: 'ring'` βάζει έναν κρίκο στην κορυφή κάθε γραμμής, 2,4 mm κάτω από τη ζώνη (`gap`). Ο κρίκος είναι μια κούφια κουκκίδα σχεδιασμένη στο πάχος της γραμμής, 3,6 mm στην εξωτερική της άκρη (`capSize`), και η γραμμή σταματά σε αυτήν την άκρη, ώστε το κρεμ φόντο να φαίνεται μέσα στην τρύπα. Το `#asia[*]` ονομάζει κάθε κάρτα που τοποθέτησε το πλέγμα στη σελίδα, οπότε μια χρονολογία που προστίθεται ή αφαιρείται στο Markdown προσθέτει ή αφαιρεί τη γραμμή της. Οι γραμμές σύνδεσης τοποθετούνται μετά τα πλαίσια κειμένου, έτσι όταν μια σειρά ψηλώνει οι γραμμές συναντούν ακόμη τις κάρτες. Και το κρεμ φόντο είναι διακόσμηση, ένα πλαίσιο αγκυρωμένο στο πόδι του περιθωρίου αιμορραγίας του οποίου το ύψος φτάνει ως το πόδι του `#band-1` (`size: { height: { to: '#band-1', edge: 'bottom' } }`), οπότε ακολουθεί τη ζώνη.

### 4 · Εικόνες στο μέγεθος που τυπώνονται

```js
// script.js, γραμμές 253–295
const ART = {
  v105: t({ es: 'Un funcionario de la corte Han mira cómo un artesano saca de la tina un molde '
      + 'de bambú lleno de pasta, junto a corteza, trapos y redes viejas.',
    en: 'A Han court official watches a craftsman lift a bamboo mould full of pulp from a vat, '
      + 'beside bark, rags and old nets.',
    ja: '漢の役人が見守るなか、職人が竹のすき枠を漉き舟から引き上げる。そばに樹皮、ぼろ布、古い網。' }),
  v610: t({ es: 'Un monje enseña a dos cortesanos japoneses a sostener el molde sobre una tina, '
      + 'con ramas de kozo en una estera.',
    en: 'A monk shows two Japanese courtiers how to hold the mould over a tub, with kozo '
      + 'branches on a mat.',
    ja: '僧が二人の宮廷人に、桶の上ですき枠を持つ手つきを見せる。むしろの上に楮の枝。' }),
  v751: t({ es: 'Papeleros de Samarcanda junto a un canal; las hojas se secan al sol contra un '
      + 'muro de adobe.',
    en: 'Samarkand papermakers by a canal; the sheets dry in the sun against a mud-brick wall.',
    ja: '水路のそばで働くサマルカンドの紙すき職人。日干しれんがの壁に紙が張られて乾いている。' }),
  v1150: t({ es: 'Un taller de Xàtiva bajo el castillo: un operario golpea trapos en una pila '
      + 'de piedra y las hojas cuelgan de cuerdas.',
    en: 'A workshop in Xàtiva below the castle: a worker pounds rags in a stone trough and the '
      + 'sheets hang on ropes.',
    ja: '城の下のシャティバの工房。職人が石の槽でぼろ布をたたき、紙が綱につるされている。' }),
  v1282: t({ es: 'Un molino de Fabriano con su rueda hidráulica y sus mazos; un papelero mira '
      + 'una filigrana al trasluz.',
    en: 'A Fabriano mill with its water wheel and hammers; a papermaker holds a watermark up '
      + 'to the light.',
    ja: '水車と木づちのあるファブリアーノの製紙場。職人が紙を光にかざして透かしを見ている。' }),
  v1844: t({ es: 'Un artesano aprieta un tronco de abeto contra una muela que gira; debajo se '
      + 'amontonan las fibras.',
    en: 'A craftsman presses a spruce log against a turning grindstone; the fibres pile up '
      + 'below.',
    ja: '職人がトウヒの丸太を回る砥石に押し当て、その下に木の繊維が積もっていく。' }),
  forma: t({ es: 'Dos manos sacan de la tina el molde con una capa fina de fibras.',
    en: 'Two hands lift the mould from the vat with a thin layer of fibres on it.',
    ja: '両手ですき枠を引き上げる。網の上に繊維の薄い層ができている。' }),
};
const SIZE = { forma: [800, 800, 363] }; // pixels and ppi: 56 mm wide; the cards' are 46 mm
const resources = await Promise.all(Object.entries(ART).map(async ([id, altText]) => {
  const px = SIZE[id] ?? [1000, 667, 550];
  const fileId = `${id}-${px[0]}.jpg`;
  await loadImage(fileId, asset(fileId));
  return { id, typeId: 'picture', kind: 'bitmap', caption: '', altText, createdAt: 0,
    updatedAt: 0,
    bitmap: { fileId, format: 'jpeg', width: px[0], height: px[1], resolution: px[2] } };
}));
```

Οι βινιέτες έχουν πλάτος 1.000 px στα 550 ppi, 46 mm στη σελίδα, και μια εικόνα δεν μεγεθύνεται ποτέ. Οι τρεις ίσες στήλες του πλέγματος έχουν πλάτος 56,3 mm σε κάθε σελίδα, οπότε κάθε εικόνα κάθεται μέσα στο εσωτερικό διάστημα 3,5 mm της κάρτας της στο δικό της μέγεθος και η υπόλοιπη κάρτα είναι κείμενο.

## Η πλήρης συνταγή

Ένα αρχείο, συντεθειμένο από τον φάκελο της συνταγής με το δείγμα κειμένου και το κοινό κιτ του Συνταγολογίου ενσωματωμένα· φτιάχνει τη δική του σελίδα. Για να το εκτελέσετε, βάλτε το σε ένα `<script type="module">` σε μια κενή σελίδα, ή επικολλήστε το στο πάνελ JS ενός νέου CodePen (ως module). Εισάγει το postext από το esm.sh, οπότε δεν χρειάζεται εγκατάσταση ούτε build.

- Φάκελος πηγής: https://github.com/drnachio/postext/tree/main/cookbook/illustrated-timeline-spread

### script.js

```js
// ═══ Postext Cookbook · Nº 158 · An illustrated timeline across a double page ═══════
// https://postext.dev/en/cookbook/illustrated-timeline-spread
// Code: MIT · Text: original (CC BY 4.0) · Pictures: generated with diffusion models
// Fonts: Literata, Archivo, Noto Serif JP, Noto Sans JP (SIL OFL 1.1) · Needs postext ≥ 1.49.0
import {
  buildDocument, withLoadedFonts, renderPageToCanvas, registerResourceImage,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';

const LANG = 'en'; // @lang: the language of the sample document ('es' | 'en' | 'ja')
const RECIPE = 'illustrated-timeline-spread';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: one ink, an accent for each half of the timeline, a pale ground
const palette = {
  ink: '#22201d', // text
  asia: '#2f4f7a', // indigo: the Asian half of the timeline
  europe: '#a2412a', // terracotta: the European half
  ground: '#f1ebdf', // the cream under the cards
  rule: '#c9bfae', // hairlines and the card borders
  muted: '#6b6359', // running heads and the colophon
  paper: '#ffffff',
};
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: 'europe (defaults)', value: { hex: palette.europe, model: 'hex' } },
];
// #endregion

const JA = LANG === 'ja';
const SERIF = JA ? 'Noto Serif JP' : 'Literata';
const SANS = JA ? 'Noto Sans JP' : 'Archivo';
// A Western textbook page is 210 × 280 mm; a Japanese one is AB判, 210 × 257 mm.
const PAGE = { w: 210, h: JA ? 257 : 280, top: 22, bottom: 20, inner: 16, outer: 15 };
const ROWS = 12;
const ROW_GAP = 3;
const ROW = (PAGE.h - PAGE.top - PAGE.bottom - (ROWS - 1) * ROW_GAP) / ROWS; // one grid row, mm
const BAND = 9; // the timeline band, in grid row 5
const CARD_TOP = 5 * (ROW + ROW_GAP); // grid row 6
// The drawn height of a card; 16 mm of the area stay free for a longer text.
const CARD = PAGE.h - PAGE.top - PAGE.bottom - CARD_TOP - 16;
const at = (to, edge, x = 0, y = 0) => ({ anchor: { to, edge }, offset: { x: mm(x), y: mm(y) } });

// #region cards: one card frame per row, repeated by a grid once for each card of the Markdown
// Each `:::frame{slot="asia"}` of the page is an item of the `asia` grid: the grid lays the
// card frame once per item, three to a row, and names the copies `#asia[1]`, `#asia[2]`…
const card = (name, style) => ({ name, style, minHeight: mm(CARD) }); // auto above that height
const row = (name, col) => ({ name: `${name}-row`, kind: 'grid', columns: 3, columnGap: mm(5),
  grid: { col, row: 6, rows: ROWS - 5 }, repeat: { frames: [name] } });
// #endregion

// #region answer: one sheet for two pages, a band across the spine, two rows of cards
const pageTemplates = [{
  id: 'timeline',
  spread: true, // two facing pages laid as one sheet; it opens on a verso
  gutter: mm(10), // the band round the spine that frames keep off
  grid: { columns: 2, rows: ROWS, columnGap: mm(2 * PAGE.inner), rowGap: mm(ROW_GAP) },
  frames: [
    { name: 'title', takes: 'h1' },
    { name: 'lead', flow: true, fit: { minScale: 0.8 } },
    { name: 'box', style: 'box', grid: { col: 2, row: 1, rows: 4 }, height: 'fill',
      padding: { right: mm(66) }, fit: { minScale: 0.85 } },
    { name: 'box-picture', layer: 2, width: mm(56), placement: at('#box', 'top-right', -5, 10) },
    { name: 'band-1', style: 'band-asia', grid: { col: 1, row: 5 }, height: mm(BAND) },
    { name: 'band-2', style: 'band-europe', crossGutter: true, width: 'fill', height: mm(BAND),
      padding: { left: mm(2 * PAGE.inner + 4) }, // the colour crosses the fold, the words do not
      placement: at('#band-1', 'right-of') },
    card('asia', 'card-asia'), card('europe', 'card-europe'),
    { name: 'colophon', style: 'colophon', optional: true, width: mm(170),
      placement: at('page', 'bottom-right', -PAGE.outer, -7) },
  ],
  groups: [
    { name: 'opening', kind: 'stack', grid: { col: 1, row: 1, rows: 4 }, gap: mm(4),
      frames: ['title', 'lead'] },
    // A row of cards under each band, as many as the Markdown has: a longer text makes its
    // row taller, and the other cards of the row stretch to the same height.
    row('asia', 1), row('europe', 2),
  ],
  decoration: { elements: [ground(), ticks('band-1', 'asia'), ticks('band-2', 'europe')] },
}];
// #endregion

// #region ticks: one connector per band, a drop with a ring down to every card of its row
// `routing: 'tree'` with `trunk: 0` draws no bar of its own: each drop hangs from the band's
// foot straight down to the middle of a card's top, and `#asia[*]` names every card laid.
function ticks(band, cards) {
  return { kind: 'connector', id: `${cards}-ticks`, routing: 'tree', trunk: 0,
    from: { to: `#${band}`, side: 'bottom', gap: mm(2.4) }, to: { to: `#${cards}[*]`, side: 'top' },
    color: col(cards), width: pt(1), startCap: 'ring', capSize: mm(3.6) };
}
// #endregion

// The cream ground under the cards: from the foot of the band down to the bleed.
function ground() {
  return { kind: 'box', id: 'ground',
    placement: { ...at('bleed', 'bottom-left'), size: { width: 'fill',
      height: { to: '#band-1', edge: 'bottom' } } },
    style: { backgroundColor: col('ground') } };
}

const tab = (ink) => ({ position: 'top-left', background: col(ink), color: col('paper'),
  fontFamily: SANS, fontSize: pt(10), fontWeight: 700, height: mm(6), paddingX: mm(2.6),
  offset: mm(3.5), inset: mm(0), rule: { enabled: false } });
const cardStyle = (id, ink) => ({ id, backgroundEnabled: true, background: col('paper'),
  border: { enabled: true, color: col('rule'), width: pt(0.5) }, borderRadius: mm(1.5),
  stripe: { enabled: true, side: 'top', width: pt(2.5), color: col(ink) },
  padding: { top: mm(8), right: mm(3.5), bottom: mm(3.5), left: mm(3.5) },
  label: tab(ink),
  body: { fontFamily: SERIF, fontSize: pt(JA ? 8.6 : 9.4), lineHeight: pt(JA ? 15 : 12.8),
    color: col('ink'), boldColor: col(ink), italicColor: col('ink'),
    textAlign: JA ? 'justify' : 'left', hyphenation: !JA, firstLineIndent: pt(0),
    boldFontWeight: 700 } });
const bandStyle = (id, ink) => ({ id, backgroundEnabled: true, background: col(ink),
  border: { enabled: false }, padding: { top: mm(1.6), right: mm(4), bottom: mm(1), left: mm(4) },
  body: { fontFamily: SANS, fontSize: pt(9.5), lineHeight: pt(12), fontWeight: 700,
    color: col('paper'), firstLineIndent: pt(0) } });

const head = (id, content, parity, edge, x) => ({ kind: 'text', id, content, parity,
  fontFamily: SANS, fontSize: pt(8), fontWeight: 600, letterSpacing: pt(JA ? 0 : 0.8),
  color: col('muted'), placement: at('page', edge, x, 11) });
const folio = (id, parity, edge, x) => ({ kind: 'text', id, content: '{pageNumber}', parity,
  fontFamily: SANS, fontSize: pt(9), fontWeight: 700, color: col('ink'),
  placement: at('page', edge, x, -10) });

const config = {
  canvasViewer: { pageGap: 0 }, // the Canvas joins the two pages of a spread
  locale: t({ es: 'es', en: 'en-gb', ja: 'ja' }),
  resourceTypes: [{ id: 'picture', name: t({ es: 'Ilustración', en: 'Illustration',
    ja: 'イラスト' }), shortLabel: '', numberingTemplate: '', resetOn: 'never',
  counterFormat: 'decimal', captionPrefix: '', defaultPlacement: { position: 'here' } }],
  colorPalette,
  page: {
    sizePreset: 'custom', width: mm(PAGE.w), height: mm(PAGE.h), dpi: 150,
    margins: { top: mm(PAGE.top), bottom: mm(PAGE.bottom), left: mm(PAGE.inner),
      right: mm(PAGE.outer), mirror: true },
  },
  layout: { layoutType: 'single' },
  bodyText: {
    fontFamily: SERIF, fontSize: pt(JA ? 10.5 : 12.4), lineHeight: pt(JA ? 18.5 : 17),
    paragraphSpacing: !JA,
    color: col('ink'), boldColor: col('ink'), italicColor: col('ink'),
    referenceColor: col('ink'), textAlign: JA ? 'justify' : 'left',
    firstLineIndent: JA ? em(1) : pt(0), // Japanese paragraphs open with a one-character indent
    hyphenation: { enabled: !JA },
  },
  headings: {
    fontFamily: SANS, color: col('ink'), fontWeight: 800,
    levels: [{ level: 1, fontSize: pt(JA ? 44 : 58), lineHeight: pt(JA ? 54 : 60),
      color: col('asia'), marginTop: pt(0), marginBottom: pt(0),
      breakBefore: { enabled: false } }],
  },
  orderedLists: { numberFormat: 'arabic', color: col('europe'), fontWeight: 700 },
  calloutStyles: [
    { id: 'box', backgroundEnabled: true, background: col('paper'),
      border: { enabled: true, color: col('rule'), width: pt(0.5) },
      borderRadius: mm(1.5), padding: { top: mm(9), right: mm(5), bottom: mm(4), left: mm(5) },
      label: tab('europe'),
      body: { fontFamily: SERIF, fontSize: pt(JA ? 9.5 : 10.4), lineHeight: pt(JA ? 16.5 : 14.2),
        color: col('ink'), boldColor: col('ink'), italicColor: col('ink'), textAlign: 'left',
        firstLineIndent: pt(0), paragraphSpacing: true },
      lists: { color: col('europe'), gap: mm(1.5), itemSpacing: mm(1.2) } },
    cardStyle('card-asia', 'asia'), cardStyle('card-europe', 'europe'),
    bandStyle('band-asia', 'asia'), bandStyle('band-europe', 'europe'),
    { id: 'colophon', backgroundEnabled: false, border: { enabled: false },
      padding: { top: mm(0), right: mm(0), bottom: mm(0), left: mm(0) },
      body: { fontFamily: SANS, fontSize: pt(6.5), lineHeight: pt(8), color: col('muted'),
        firstLineIndent: pt(0) } },
  ],
  header: { elements: [
    head('subject', '{attr.subject}', 'even', 'top-left', PAGE.outer),
    head('unit', '{attr.unit}', 'odd', 'top-right', -PAGE.outer),
  ] },
  footer: { elements: [
    folio('verso-folio', 'even', 'bottom-left', PAGE.outer),
    folio('recto-folio', 'odd', 'bottom-right', -PAGE.outer),
  ] },
  pageTemplates,
};
// The spread opens on a verso: page 1 of this excerpt is book page 48.
const continuation = { pageIndexOffset: 1, pageNumbering: { startAt: 48 } };

// ─── 2 · Content ────────────────────────────────────────────────────────────
const markdown = String.raw`::::page{template="timeline" spread subject="History · Year 8" unit="Unit 5 · Trade routes"}
# The paper road

For centuries, making paper was a craft kept in Chinese workshops. It took more than a thousand years to travel from there to the mills of Europe.

Every people who learnt it changed the recipe to suit what they had to hand: mulberry bark in China, kozo in Japan, flax and rags in Samarkand and al-Andalus, and wood in the nineteenth century.

:::frame{slot="box" label="How a sheet was made"}
1. The fibres are chopped and left to soak until they break down into a pulp.
2. The mould, a fine screen on a wooden frame, is dipped into the vat and lifted out full of pulp.
3. The mould is shaken: the water drains away and the fibres lock together in an even layer.
4. The sheet is pressed between felts and hung up to dry.

The wires of the mould leave their print in the sheet: they are the fine lines you see when you hold paper up to the light.
:::

::resource{id="forma" slot="box-picture"}

:::frame{slot="band-1"}
In Asia, from the 2nd to the 8th century
:::

:::frame{slot="band-2"}
Around the Mediterranean and in Europe, from the 12th to the 19th century
:::

:::frame{slot="asia" label="105"}
::resource{id="v105"}

**China.** Cai Lun, an official at the Han court, presents the emperor with paper made from mulberry bark, scraps of hemp, rags and old fishing nets. It costs less than silk and weighs far less than strips of bamboo. Archaeologists have found Chinese paper two centuries older, but Cai Lun's is the one copied across the empire.
:::

:::frame{slot="asia" label="610"}
::resource{id="v610"}

**Japan.** According to the chronicle *Nihon shoki*, the monk Damjing, from the Korean kingdom of Goguryeo, teaches the court how to make paper and ink. Japanese papermakers turn the bark of the kozo shrub into *washi*, thin and very strong. The Shōsōin in Nara still keeps household registers written on paper in 702.
:::

:::frame{slot="asia" label="751"}
::resource{id="v751"}

**Samarkand.** A tradition says that after the Battle of Talas, Chinese prisoners taught the craft in this Silk Road city. Samarkand's papermakers use flax and cotton rags. By about 800, Baghdad has workshops of its own, and paper replaces parchment in the caliph's archives.
:::

:::frame{slot="europe" label="1150"}
::resource{id="v1150"}

**Xàtiva.** The geographer al-Idrisi writes that this town of al-Andalus makes a paper with no equal anywhere in the world, sold to East and West. When James I takes the town in 1244, the workshops carry on.
:::

:::frame{slot="europe" label="1282"}
::resource{id="v1282"}

**Fabriano.** The mills of this Italian town use the river to drive hammers that beat rags to pulp. They size their sheets with gelatine, which stops the ink from spreading, and mark them with a watermark, a design that only shows against the light. By the 14th century, Italian paper is sold across half of Europe.
:::

:::frame{slot="europe" label="1844"}
::resource{id="v1844"}

**Saxony.** After printing come the newspapers, and there are no longer rags enough for so much paper. In 1798, Louis-Nicolas Robert had built a machine in France that made one continuous sheet, with no mould. In 1844 the weaver Friedrich Gottlob Keller presses spruce logs against a grindstone and gets wood pulp. From then on paper is cheap and plentiful, and a daily paper costs no more than a loaf of bread.
:::

:::frame{slot="colophon"}
Set in Literata and Archivo (SIL OFL) · Original text (CC BY 4.0) · Illustrations generated with diffusion models
:::
::::
`; // content.<lang>.md, inlined by the Cookbook

// #region art: seven pictures at the size they print, with what each shows
const ART = {
  v105: t({ es: 'Un funcionario de la corte Han mira cómo un artesano saca de la tina un molde '
      + 'de bambú lleno de pasta, junto a corteza, trapos y redes viejas.',
    en: 'A Han court official watches a craftsman lift a bamboo mould full of pulp from a vat, '
      + 'beside bark, rags and old nets.',
    ja: '漢の役人が見守るなか、職人が竹のすき枠を漉き舟から引き上げる。そばに樹皮、ぼろ布、古い網。' }),
  v610: t({ es: 'Un monje enseña a dos cortesanos japoneses a sostener el molde sobre una tina, '
      + 'con ramas de kozo en una estera.',
    en: 'A monk shows two Japanese courtiers how to hold the mould over a tub, with kozo '
      + 'branches on a mat.',
    ja: '僧が二人の宮廷人に、桶の上ですき枠を持つ手つきを見せる。むしろの上に楮の枝。' }),
  v751: t({ es: 'Papeleros de Samarcanda junto a un canal; las hojas se secan al sol contra un '
      + 'muro de adobe.',
    en: 'Samarkand papermakers by a canal; the sheets dry in the sun against a mud-brick wall.',
    ja: '水路のそばで働くサマルカンドの紙すき職人。日干しれんがの壁に紙が張られて乾いている。' }),
  v1150: t({ es: 'Un taller de Xàtiva bajo el castillo: un operario golpea trapos en una pila '
      + 'de piedra y las hojas cuelgan de cuerdas.',
    en: 'A workshop in Xàtiva below the castle: a worker pounds rags in a stone trough and the '
      + 'sheets hang on ropes.',
    ja: '城の下のシャティバの工房。職人が石の槽でぼろ布をたたき、紙が綱につるされている。' }),
  v1282: t({ es: 'Un molino de Fabriano con su rueda hidráulica y sus mazos; un papelero mira '
      + 'una filigrana al trasluz.',
    en: 'A Fabriano mill with its water wheel and hammers; a papermaker holds a watermark up '
      + 'to the light.',
    ja: '水車と木づちのあるファブリアーノの製紙場。職人が紙を光にかざして透かしを見ている。' }),
  v1844: t({ es: 'Un artesano aprieta un tronco de abeto contra una muela que gira; debajo se '
      + 'amontonan las fibras.',
    en: 'A craftsman presses a spruce log against a turning grindstone; the fibres pile up '
      + 'below.',
    ja: '職人がトウヒの丸太を回る砥石に押し当て、その下に木の繊維が積もっていく。' }),
  forma: t({ es: 'Dos manos sacan de la tina el molde con una capa fina de fibras.',
    en: 'Two hands lift the mould from the vat with a thin layer of fibres on it.',
    ja: '両手ですき枠を引き上げる。網の上に繊維の薄い層ができている。' }),
};
const SIZE = { forma: [800, 800, 363] }; // pixels and ppi: 56 mm wide; the cards' are 46 mm
const resources = await Promise.all(Object.entries(ART).map(async ([id, altText]) => {
  const px = SIZE[id] ?? [1000, 667, 550];
  const fileId = `${id}-${px[0]}.jpg`;
  await loadImage(fileId, asset(fileId));
  return { id, typeId: 'picture', kind: 'bitmap', caption: '', altText, createdAt: 0,
    updatedAt: 0,
    bitmap: { fileId, format: 'jpeg', width: px[0], height: px[1], resolution: px[2] } };
}));
// #endregion

// ─── 3 · Fonts ──────────────────────────────────────────────────────────────
const FONTS = {
  Literata: ['400', '400i', '700'], Archivo: ['400', '600', '700', '800'], // es, en
  'Noto Serif JP': ['400', '700'], 'Noto Sans JP': ['400', '600', '700', '800'], // ja
};

// ─── 4 · Build & show ───────────────────────────────────────────────────────
await loadFonts(FONTS, markdown); // the latin files of every face
await loadCjkFonts({ [SERIF]: FONTS[SERIF], [SANS]: FONTS[SANS] }, markdown); // ja only
const doc = await withLoadedFonts(
  () => buildDocument({ markdown, resources, continuation }, config),
  { ...kitFonts(FONTS), text: markdown });
showPages(doc, { title: t({ es: 'Una cronología ilustrada a doble página',
  en: 'An illustrated timeline across a double page', ja: '見開きの絵入り年表' }) });
offerPdf(() => renderToPdf(doc, { fontProvider: cjkPdfProvider, resourceBytes: imageBytes }),
  `${RECIPE}.pdf`);

// ─── 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 · pdf v3 ── the same in every recipe that exports a PDF
/** The Fontsource files the screen used, as TrueType, with their range and
 *  place: the nearest weight the family ships in that style, upright with no italic;
 *  latin, then what its letters need (kitSubsetsFor). */
async function fontsourceProvider(family, weight, style, request) {
  const id = fontsourceId(family);
  const meta = await fontsourceMeta(family);
  const s = style === 'italic' && meta && !meta.styles.includes('italic') ? 'normal' : style;
  const shipped = meta ? await fontsourceWeights(family, s) : [];
  const weights = shipped.length ? shipped : [400, 700];
  const w = weights.reduce((a, b) => (Math.abs(b - weight) < Math.abs(a - weight) ? b : a));
  const text = String.fromCodePoint(...(request?.codePoints ?? []));
  const files = await Promise.all(['latin', ...kitSubsetsFor(text, meta)].map(async (subset, order) => {
    const res = await fetch(`${await fontsourceAt(id)}files/${id}-${subset}-${w}-${s}.woff2`);
    if (!res.ok) throw new Error(`Fontsource has no ${family} ${w} ${s} ${subset}`);
    return Object.assign(await decompressWoff2(new Uint8Array(await res.arrayBuffer())),
      { unicodeRange: kitRanges()[subset], order });
  }));
  return files.length === 1 ? files[0] : files;
}

/** A "Build the PDF" button; then "Open the PDF" (a new tab: CodePen's frame
 *  shows no PDFs) and a download link. */
function offerPdf(makePdf, filename) {
  viewer();
  const button = Object.assign(document.createElement('button'), { type: 'button', textContent: 'Build the PDF' });
  button.dataset.postextPdf = filename;
  button.addEventListener('click', async () => {
    button.disabled = true;
    button.textContent = 'Building the PDF…';
    try {
      const bytes = await makePdf();
      const url = URL.createObjectURL(new Blob([bytes], { type: 'application/pdf' }));
      const size = `${Math.max(1, Math.round(bytes.length / 1024))} KB`;
      button.replaceWith(
        Object.assign(document.createElement('a'), { href: url, target: '_blank', rel: 'noopener', textContent: 'Open the PDF ↗' }),
        Object.assign(document.createElement('a'), { href: url, download: filename, textContent: `Download ${filename} · ${size}` }));
    } catch (error) {
      button.disabled = false;
      button.textContent = 'Build the PDF';
      kitFail(error);
    }
  });
  document.getElementById('pt-actions').append(button);
}

// ─── Kit · images v3 ── recipes with pictures · postext.dev/cookbook
/** Registers a photo or PNG for the canvas and keeps its bytes for the PDF.
 *  fetch → ImageBitmap never taints the canvas (a plain cross-origin <img> would). */
async function loadImage(fileId, url) {
  const res = await fetch(url);
  if (!res.ok) throw new Error(`Image not found (${res.status}): ${url}`);
  const bytes = new Uint8Array(await res.arrayBuffer());
  registerResourceImage(fileId, await createImageBitmap(new Blob([bytes])));
  (loadImage.bytes ??= new Map()).set(fileId, bytes);
}

/** Registers SVG markup as a vector image, its fonts inside (inlineSvgFonts, ≥ 1.25).
 *  `options` go to registerResourceImage: { singleInk: true } tints it on the canvas. */
async function loadSvg(fileId, svg, options) {
  if (typeof inlineSvgFonts === 'function') svg = await inlineSvgFonts(svg, svgFaces);
  const img = new Image();
  img.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
  await img.decode();
  registerResourceImage(fileId, img, options);
  (loadImage.bytes ??= new Map()).set(fileId, new TextEncoder().encode(svg));
}

/** A face's Fontsource files: nearest weight; latin + what the SVG sets. */
async function svgFaces(family, weight, style, { codePoints = [] } = {}) {
  const [id, m] = [fontsourceId(family), await fontsourceMeta(family)];
  const w = m?.weights.reduce((a, b) => (Math.abs(b - weight) < Math.abs(a - weight) ? b : a)) ?? weight;
  const s = m?.styles.includes(style) === false ? 'normal' : style;
  return Promise.all(['latin', ...kitSubsetsFor(String.fromCodePoint(...codePoints), m)].map(async (x) => new Uint8Array(
    await (await fetch(`${await fontsourceAt(id)}files/${id}-${x}-${w}-${s}.woff2`)).arrayBuffer())));
}

/** renderToPdf({ resourceBytes: imageBytes }) */
function imageBytes(fileId) { return loadImage.bytes?.get(fileId); }

/** renderToHtml({ resourceImageUrl: imageUrl }) */
function imageUrl(fileId) {
  const bytes = imageBytes(fileId);
  if (!bytes) return undefined;
  imageUrl.urls ??= new Map();
  if (!imageUrl.urls.has(fileId)) {
    const type = /\.svg$/i.test(fileId) ? 'image/svg+xml' : /\.png$/i.test(fileId) ? 'image/png' : 'image/jpeg';
    imageUrl.urls.set(fileId, URL.createObjectURL(new Blob([bytes], { type })));
  }
  return imageUrl.urls.get(fileId);
}

// ─── Kit · cjk v2 ── Chinese, Japanese and Korean books · postext.dev/cookbook
// Fontsource ships a CJK family as about a hundred files per weight, each
// declared in its stylesheet with the unicode-range it covers. The screen
// loads the files the sample touches; the PDF gets the same files for the
// characters its pages set in each face, and embeds each as a subset.
// A book bound on the right (vertical text) is shown with its spreads
// mirrored: page 1 alone on the left of the spine, then [3 | 2].

/** The files of a Fontsource face, read from its stylesheet: { url, range,
 *  ranges }, the last declared first (the order the browser tries them in). */
function cjkSlices(family, weight, style) {
  cjkSlices.cache ??= new Map();
  const id = fontsourceId(family);
  const css = `${id}/${weight}${style === 'italic' ? '-italic' : ''}.css`;
  if (!cjkSlices.cache.has(css)) {
    let at;
    cjkSlices.cache.set(css, fontsourceAt(id).then((a) => fetch(at = a + css.slice(id.length + 1)))
      .then((res) => {
        if (!res.ok) throw new Error(`Fontsource has no ${family} ${weight} ${style} (${res.status})`);
        return res.text();
      })
      .then((text) => [...text.matchAll(/@font-face\s*{([^}]*)}/g)].map(([, rule]) => {
        const range = /unicode-range:\s*([^;]+);/.exec(rule)?.[1].trim() ?? 'U+0-10FFFF';
        const ranges = range.split(',').map((part) => {
          const [lo, hi = lo] = part.trim().slice(2).split('-');
          return [parseInt(lo, 16), parseInt(hi, 16)];
        });
        return { url: new URL(/url\(([^)]+?\.woff2)\)/.exec(rule)[1], at).href, range, ranges };
      }).reverse()));
  }
  return cjkSlices.cache.get(css);
}

/** The file of `slices` the screen sets code point `cp` in, if any: the
 *  last one loadCjkFonts adds whose range holds it. A numbered file that
 *  repeats a letter of latin is added after latin, and wins it. */
function cjkSliceFor(slices, cp) {
  const holds = (slice) => slice.ranges.some(([lo, hi]) => cp >= lo && cp <= hi);
  return slices.reduce((last, slice) => (holds(slice) ? slice : last), undefined);
}

/** Whether Fontsource serves `family` as a Chinese, Japanese or Korean
 *  family (its subsets name the script). Fails when the API does not
 *  answer: a CJK face taken for a Latin one would paint in a system face. */
async function isCjkFamily(family) {
  const meta = await fontsourceMeta(family);
  if (!meta) throw new Error(`api.fontsource.org did not describe ${family}: reload to try again`);
  return !!meta.subsets?.some((subset) => /^(chinese|japanese|korean)/.test(subset));
}

/** faces = { 'Noto Serif TC': ['400', '700'] }, as for loadFonts: the
 *  whole FONTS object may be passed, its other families are left to
 *  loadFonts. Adds one FontFace per file of each CJK face with its
 *  unicodeRange, then loads the files `text` touches. `text` is what the
 *  faces set: the sample for the text face; a book in several voices calls
 *  it once per voice (loadCjkFonts({ 'LXGW WenKai TC': ['400'] }, quotes)),
 *  so the heading and quotation faces fetch and check only their own
 *  characters. Fails when a character of `text` is in no file of a face.
 *  List every weight the pages use: a weight left to the engine's later round
 *  gets the latin file only. With { vertical: true } it also loads each
 *  family's vertical forms (brackets, quotes, pause marks) for the canvas,
 *  which needs loadVerticalAlternates imported from postext. Resolves to
 *  the number of files loaded. */
async function loadCjkFonts(faces, text, { vertical = false } = {}) {
  kitStatus('Loading fonts…');
  let loaded = 0;
  try {
    if (vertical && typeof loadVerticalAlternates !== 'function') {
      throw new Error('loadCjkFonts(…, { vertical: true }) needs loadVerticalAlternates imported from postext');
    }
    for (const [family, specs] of Object.entries(faces)) {
      if (!(await isCjkFamily(family))) continue;
      const twin = [];
      for (const spec of new Set(specs)) {
        const weight = parseInt(spec, 10);
        const style = spec.endsWith('i') ? 'italic' : 'normal';
        const slices = await cjkSlices(family, weight, style);
        const missing = [...new Set(text)].filter((ch) => /\S/.test(ch) && !cjkSliceFor(slices, ch.codePointAt(0)));
        if (missing.length) {
          throw new Error(`${family} ${spec} has no file for ${missing.slice(0, 12).join(' ')}: `
            + `give each face the text it sets (loadCjkFonts({ '${family}': ['${spec}'] }, text))`);
        }
        for (const slice of slices) {
          document.fonts.add(new FontFace(family, `url(${slice.url}) format('woff2')`,
            { weight: String(weight), style, unicodeRange: slice.range }));
          twin.push({ source: slice.url, weight: String(weight), style, unicodeRange: slice.range });
        }
        const font = `${style === 'italic' ? 'italic ' : ''}${weight} 16px "${family}"`;
        loaded += (await document.fonts.load(font, text)).length;
        if (!document.fonts.check(font, text)) throw new Error(`${family} ${spec} did not load for the sample`);
      }
      // The same files under a twin name with the `vert` feature on: the
      // canvas paints the punctuation of vertical lines with it.
      if (vertical && twin.length) await loadVerticalAlternates(family, twin);
    }
  } catch (error) {
    kitFail(error);
    throw error;
  }
  return loaded;
}

/** The PDF font provider for recipes with CJK faces: a family whose
 *  Fontsource subsets are Chinese, Japanese or Korean gets the files the
 *  screen set its pages' characters in (`request.codePoints`), each marked
 *  with its unicode-range and its place in the order loadCjkFonts added
 *  them: postext-pdf sets a character two files hold in the one added
 *  last, as the browser does. Any other family gets the latin file
 *  fontsourceProvider fetches (the "pdf" block) and, when the face sets
 *  letters only latin-ext has, that file too. */
async function cjkPdfProvider(family, weight, style, request) {
  if (!(await isCjkFamily(family))) return cjkLatinPdfFiles(family, weight, style, request);
  const meta = await fontsourceMeta(family);
  const weights = meta.weights?.length ? meta.weights : [400, 700];
  const w = weights.reduce((a, b) => (Math.abs(b - weight) < Math.abs(a - weight) ? b : a));
  const s = style === 'italic' && !meta.styles.includes('italic') ? 'normal' : style;
  const slices = await cjkSlices(family, w, s);
  const picked = new Set();
  for (const cp of request?.codePoints ?? []) {
    const slice = cjkSliceFor(slices, cp);
    if (slice) picked.add(slice);
  }
  if (!picked.size) picked.add(slices[0]);
  return Promise.all(slices.map(async (slice, order) => {
    if (!picked.has(slice)) return null;
    const res = await fetch(slice.url);
    if (!res.ok) throw new Error(`Fontsource file ${slice.url} (${res.status})`);
    const bytes = await decompressWoff2(new Uint8Array(await res.arrayBuffer()));
    return Object.assign(bytes, { unicodeRange: slice.range, order });
  })).then((files) => files.filter(Boolean));
}

/** A Latin family set next to the CJK faces: its latin file, then its
 *  latin-ext file when the face sets letters only latin-ext has (ō ū in
 *  Hepburn rōmaji, ǎ in pinyin), the file loadFonts adds on screen for
 *  them, each marked with its unicode-range and its place in that order:
 *  the PDF sets a character in the file the browser took it from. A face
 *  Fontsource ships without latin-ext, or whose file does not come, gets
 *  latin alone, and the PDF names the letters it lacks. */
async function cjkLatinPdfFiles(family, weight, style, request) {
  const meta = await fontsourceMeta(family);
  const beyond = [...(request?.codePoints ?? [])].some(cjkLatinExtOnly);
  if (!beyond || !meta?.subsets?.includes('latin-ext')) return fontsourceProvider(family, weight, style);
  const weights = meta.weights?.length ? meta.weights : [400, 700];
  const w = weights.reduce((a, b) => (Math.abs(b - weight) < Math.abs(a - weight) ? b : a));
  const s = style === 'italic' && !meta.styles.includes('italic') ? 'normal' : style;
  const id = fontsourceId(family);
  const url = `${await fontsourceAt(id)}files/${id}-latin-ext-${w}-${s}.woff2`;
  const [latin, ext] = await Promise.all([fontsourceProvider(family, weight, style), fetch(url)
    .then(async (res) => (res.ok ? decompressWoff2(new Uint8Array(await res.arrayBuffer())) : null), () => null)]);
  const ranges = kitRanges();
  return ext ? [Object.assign(latin, { unicodeRange: ranges.latin, order: 0 }),
    Object.assign(ext, { unicodeRange: ranges['latin-ext'], order: 1 })] : latin;
}

/** Whether code point `cp` is in Fontsource's latin-ext file and not in
 *  its latin file: Latin Extended-A and -B, IPA, the spacing modifiers and
 *  Latin Extended Additional (loadFonts's test for latin-ext), less the
 *  few latin holds too (ı Œ œ ʻ ʼ ˆ ˚ ˜). */
function cjkLatinExtOnly(cp) {
  if (!((cp >= 0x100 && cp <= 0x2ff) || (cp >= 0x1e00 && cp <= 0x1eff))) return false;
  return ![0x131, 0x152, 0x153, 0x2bb, 0x2bc, 0x2c6, 0x2da, 0x2dc].includes(cp);
}

/** showPages for a book bound on either edge. A right-bound book (the
 *  document says so: doc.binding is 'right' for page.binding 'right' and
 *  for vertical text) lies on the desk as it opens: page 1 alone on the
 *  left of the spine, then [3 | 2], the spine shade on each page's inner
 *  edge. `binding` ('left' | 'right') overrides the document's. */
function showBook(docs, { binding, ...options } = {}) {
  const count = showPages(docs, options);
  const right = (binding ?? [docs].flat()[0]?.binding) === 'right';
  if (!document.getElementById('pt-kit-cjk')) {
    // The pages keep direction ltr: a canvas draws text in the direction its
    // element inherits, and under rtl each run would end where the engine
    // starts it, its brackets mirrored.
    document.head.insertAdjacentHTML('beforeend', `<style id="pt-kit-cjk">
      .pt-spread[dir="rtl"] canvas { direction: ltr; }
      .pt-spread[dir="rtl"] 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); }
    </style>`);
  }
  // Each pair stays [verso, recto] in the page; right to left, the verso
  // sits on the right. Phones stack the pages in reading order either way.
  for (const spread of document.querySelectorAll('#pages > .pt-spread')) spread.dir = right ? 'rtl' : 'ltr';
  document.getElementById('pages').dataset.binding = right ? 'right' : 'left';
  return count;
}

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

## Παραλλαγές

### Τέσσερις κάρτες ανά σειρά

Με `columns: 4` κάθε ζώνη παίρνει τέσσερις χρονολογίες τη μία δίπλα στην άλλη· οι κάρτες στενεύουν και τα κείμενά τους μακραίνουν, οπότε οι σειρές ψηλώνουν.

```diff
-const row = (name, col) => ({ name: `${name}-row`, kind: 'grid', columns: 3, columnGap: mm(5),
+const row = (name, col) => ({ name: `${name}-row`, kind: 'grid', columns: 4, columnGap: mm(5),
```

### Βέλη αντί για κρίκους

Το `endCap: 'arrow'` βάζει μια αιχμή βέλους εκεί όπου κάθε γραμμή συναντά την κάρτα της, και το `startCap: 'none'` αφαιρεί τους κρίκους.

## Συνήθη λάθη

- Ένα πλέγμα τοποθετεί ένα κελί ανά στοιχείο, και στοιχείο είναι ένας δικός του φράχτης `:::frame{slot="asia"}`: τα κείμενα δύο καρτών μέσα σε έναν φράχτη κάνουν μία κάρτα.
- Το `#asia` χωρίς `[*]` είναι το πλαίσιο του πλέγματος, όχι οι κάρτες του: μια γραμμή σύνδεσης προς αυτό σχεδιάζει μία γραμμή ως τη μέση της σειράς.
- Ένα μέγεθος που φτάνει ως την άκρη ενός άλλου πλαισίου μετριέται από το σημείο αγκύρωσης του ίδιου του στοιχείου: το φόντο είναι αγκυρωμένο στο πόδι του περιθωρίου αιμορραγίας και μεγαλώνει προς τα πάνω ως το `#band-1`. Μια άκρη πίσω από το σημείο αγκύρωσης δίνει ύψος 0.

## Ευχαριστίες

- Συνταγή: Ignacio Ferro ([@drnachio](https://github.com/drnachio))
- Κείμενο: The paper road, a double-page timeline written for this recipe in Spanish, English and Japanese: Postext Cookbook, CC-BY-4.0
- Εικόνες: A Han court official watches a craftsman lift a bamboo mould from a vat.: Generated With Diffusion Models, πρωτότυπο
- Εικόνες: A monk shows two Japanese courtiers how to hold a papermaking mould.: Generated With Diffusion Models, πρωτότυπο
- Εικόνες: Papermakers by a canal in Samarkand, sheets drying on a wall.: Generated With Diffusion Models, πρωτότυπο
- Εικόνες: A paper workshop below the castle of Xàtiva.: Generated With Diffusion Models, πρωτότυπο
- Εικόνες: A Fabriano mill with its water wheel; a sheet held up to the light.: Generated With Diffusion Models, πρωτότυπο
- Εικόνες: A craftsman grinds a spruce log against a stone into wood pulp.: Generated With Diffusion Models, πρωτότυπο
- Εικόνες: Two hands lift a papermaker's mould from a vat of pulp.: Generated With Diffusion Models, πρωτότυπο
- Γραμματοσειρές: Literata (OFL-1.1), Archivo (OFL-1.1), Noto Serif JP (OFL-1.1), Noto Sans JP (OFL-1.1)
- Κώδικας: MIT · Δείγμα περιεχομένου: CC-BY-4.0

## Σχετικές συνταγές

- [Αρ. 154 · Μια σελίδα κόμικ σε ένα δισέλιδο](https://postext.dev/el/cookbook/comic-double-spread.md): Ένα :::page με τη σημαία spread απλώνει ένα δέντρο διαίρεσης σε δύο αντικριστές σελίδες: ένα πανόραμα περνά τη ράχη και η σειρά από κάτω χωρίζεται στην πτυχή. · Επίπεδο 2 (Μεσαίο) · Κόμικ
- [Αρ. 156 · Μια ενότητα παιδικού σχολικού βιβλίου σε δέκα γλώσσες](https://postext.dev/el/cookbook/children-textbook-pages.md): Εννέα σελίδες της Γ΄ Δημοτικού σε δέκα γλώσσες, από δεξιά προς αριστερά στα αραβικά, κατακόρυφα στα κινεζικά και ιαπωνικά: χρωματιστά δισέλιδα, πλαίσια, χάρτης. · Επίπεδο 3 (Προχωρημένο) · Σχολικά βιβλία
- [Αρ. 159 · Τετράδιο δραστηριοτήτων με πλαίσια που μεγαλώνουν](https://postext.dev/el/cookbook/activity-book-growing-boxes.md): Τετράδιο δραστηριοτήτων σε πρότυπα σελίδας: πλαίσια σε στοίβα μεγαλώνουν με το κείμενο, γραμμές απαντήσεων σε κενά πλαίσια, μια εργασία συνεχίζει πίσω. · Επίπεδο 3 (Προχωρημένο) · Τετράδια και ασκήσεις, Σχολικά βιβλία
