# Εικονικό ποίημα: τα Easter Wings του Herbert στίχο στίχο

> Τα Easter Wings και The Altar του Herbert ως κεντραρισμένο κυρίως κείμενο, μία παράγραφος ανά στίχο, ώστε το μήκος των στίχων να σχεδιάζει τα δύο σχήματα.

- Έκδοση HTML: https://postext.dev/el/cookbook/shaped-verse
- Συνταγή Αρ. 062 · Τυπογραφία και κείμενο · Επίπεδο 1 (Βασικό) · Έξοδοι: Canvas
- Είδη: Ποίηση
- Απαιτεί postext ≥ 1.25.0 · δοκιμασμένη με 1.65.0 στις 2026-10-31
- Σελίδες: [1](https://postext.dev/cookbook/shaped-verse/en/p01.webp?v=d6089659), [2](https://postext.dev/cookbook/shaped-verse/en/p02.webp?v=d6089659), [3](https://postext.dev/cookbook/shaped-verse/en/p03.webp?v=d6089659), [4](https://postext.dev/cookbook/shaped-verse/en/p04.webp?v=d6089659)
- Άνοιγμα στο Sandbox: https://postext.dev/el/sandbox#recipe=shaped-verse&lang=en (.postext: https://postext.dev/cookbook/shaped-verse/en/shaped-verse.postext)
- Τελευταία ενημέρωση: 2026-10-11
- Άλλες γλώσσες: [en](https://postext.dev/en/cookbook/shaped-verse.md), [es](https://postext.dev/es/cookbook/shaped-verse.md), [ca](https://postext.dev/ca/cookbook/shaped-verse.md), [de](https://postext.dev/de/cookbook/shaped-verse.md), [fr](https://postext.dev/fr/cookbook/shaped-verse.md), [it](https://postext.dev/it/cookbook/shaped-verse.md), [pt](https://postext.dev/pt/cookbook/shaped-verse.md), [zh](https://postext.dev/zh/cookbook/shaped-verse.md), [ja](https://postext.dev/ja/cookbook/shaped-verse.md), [ar](https://postext.dev/ar/cookbook/shaped-verse.md)

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

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

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

Ένα αναμνηστικό τεσσάρων σελίδων A5, ένα φύλλο A4 διπλωμένο μία φορά, με δύο εικονικά ποιήματα από το *The Temple* του George Herbert στην ορθογραφία της πρώτης έκδοσης του 1633. Η σελίδα τίτλου ακολουθεί εκείνη του 1633, ως και το μότο της από τον Ψαλμό 29. Μέσα, το *The Altar* βλέπει το *Easter Wings*. Κανένας στίχος των δύο ποιημάτων δεν έχει εσοχή ούτε γεμίζεται με διαστήματα· ο καθένας κεντράρεται, έτσι ο βωμός στέκεται πάνω σε έναν στενό πεσσό και κάθε στροφή των φτερών στενεύει σε δύο λέξεις και φαρδαίνει πάλι. Στην τελευταία σελίδα, κάτω από το μότο του Herbert, ένα σημείωμα λέει πώς οι τυπογράφοι του 1633 στοιχειοθέτησαν τα φτερά πλαγιαστά, και ο κολοφώνας κονταίνει γραμμή προς γραμμή. Όλα στοιχειοθετούνται ως κυρίως κείμενο ή ως ένα από τρία επίπεδα επικεφαλίδων στα στοιχεία IM Fell, χωρίς επώνυμα στιλ και χωρίς σχεδιάσεις σελίδων. Η ισπανική έκδοση στοιχειοθετεί μια μετάφραση στίχο προς στίχο που κρατά και τα δύο σχήματα.

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

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

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

```js
// script.js, γραμμές 26–38
// Postext joins the lines of a Markdown paragraph, so every line of the poem is a paragraph
// of its own, with a blank line after it. Centred, each line keeps its natural width on the
// axis of the measure, and the lengths Herbert gave his lines draw the figure:
//   Lord, who createdst man in wealth and store,
//
//   Though foolishly he lost the same,
//
//   Decaying more and more,
const verse = {
  fontFamily: 'IM Fell English', fontSize: pt(12.4), lineHeight: pt(LEAD), color: col('ink'),
  textAlign: 'center', // ragged on both sides; only justified text is hyphenated by default
  firstLineIndent: pt(0), // the default 1.5 em moves every line 3.3 mm off the titles' axis
};
```

## Υλικά

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

- [Εσοχές, στοίχιση και διάστημα παραγράφων](https://postext.dev/el/docs/configuration-text.md#κυρίως-κείμενο): Κείμενο σε πλήρη στοίχιση ή στοίχιση αριστερά, εσοχές πρώτης γραμμής με την πρώτη παράγραφο χωρίς εσοχή μετά από επικεφαλίδα, ή παράγραφοι-μπλοκ με διάστημα ανάμεσά τους.
- [Επίπεδα επικεφαλίδων](https://postext.dev/el/docs/configuration-headings.md#παρακάμψεις-ανά-επίπεδο): Γραμματοσειρά, κλίμακα μεγέθους, χρώμα, βάρος, περιθώρια, πλάγια και κεφαλαία για κάθε επίπεδο επικεφαλίδας, από H1 έως H6.
- [Ρητό κατακόρυφο διάστημα](https://postext.dev/el/docs/document-format-directives.md#space): Προσθέτει ακέραιες ή κλασματικές γραμμές διαστήματος ανάμεσα σε δύο μπλοκ, εκεί όπου οι κενές γραμμές δεν προσθέτουν τίποτα· παραλείπεται στην κορυφή στήλης.

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

- [Αλλαγές σελίδας και στήλης](https://postext.dev/el/docs/document-format-directives.md#pagebreak)
- [Κεφάλαια που ανοίγουν σε δεξιά σελίδα](https://postext.dev/el/docs/configuration-headings.md#αλλαγή-σελίδας-πριν-από-επικεφαλίδα)
- [Γράμματα κυρίως κειμένου](https://postext.dev/el/docs/configuration-text.md#κυρίως-κείμενο)
- [Έντονα, πλάγια και τα χρώματά τους](https://postext.dev/el/docs/configuration-text.md#κυρίως-κείμενο)
- [Διάσταση σελίδας](https://postext.dev/el/docs/configuration-page-layout.md#προκαθορισμένα-μεγέθη-σελίδας)
- [Συμμετρικά περιθώρια](https://postext.dev/el/docs/configuration-page-layout.md#κατοπτρικά-περιθώρια)
- [Μία ή δύο στήλες](https://postext.dev/el/docs/configuration-page-layout.md#τύποι-διάταξης)
- [Χρώμα χαρτιού](https://postext.dev/el/docs/configuration-page-layout.md#σελίδα)
- [Σημασιολογική χρωματική παλέτα](https://postext.dev/el/docs/configuration-fonts-colors-viewers.md#παλέτα-χρωμάτων)
- [Σελίδες σε καμβά](https://postext.dev/el/docs/configuration-programmatic-usage.md#απόδοση-σελίδας-σε-bitmap)

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

- [`bodyText`](https://postext.dev/el/docs/configuration-text.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#συλλαβισμός), [`page`](https://postext.dev/el/docs/configuration-page-layout.md#σελίδα)

**API**

- [`buildDocumentWithFonts`](https://postext.dev/el/docs/configuration-programmatic-usage.md#φόρτωση-γραμματοσειρών-πριν-από-τη-σελιδοποίηση), [`renderPageToCanvas`](https://postext.dev/el/docs/configuration-programmatic-usage.md#απόδοση-σελίδας-σε-bitmap)

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

- IM Fell English (OFL-1.1), IM Fell Great Primer (OFL-1.1), IM Fell English SC (OFL-1.1)

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

### 1 · Ένας στίχος είναι μια κεντραρισμένη παράγραφος

Ο κώδικας είναι η [σύντομη απάντηση](https://postext.dev/el/cookbook/shaped-verse.md#η-σύντομη-απάντηση) παραπάνω. Το Postext ενώνει τις γραμμές μιας παραγράφου του Markdown σε μία, έτσι κάθε στίχος είναι μια παράγραφος, με μια κενή γραμμή μετά από αυτόν. Το `textAlign: 'center'` τοποθετεί κάθε γραμμή στο φυσικό της πλάτος πάνω στον άξονα του πλάτους στοιχειοθεσίας, και αφού συλλαβίζεται μόνο το κείμενο με πλήρη στοίχιση, εκτός αν είναι ενεργό το `hyphenation.ragged`, καμία λέξη δεν κόβεται ([κυρίως κείμενο](https://postext.dev/el/docs/configuration-text.md#κυρίως-κείμενο)). Κάθε στίχος είναι η πρώτη γραμμή της παραγράφου του, έτσι η προεπιλεγμένη εσοχή πρώτης γραμμής του 1,5 em θα τον έσπρωχνε 3,3 mm δεξιά από τον άξονα των τίτλων· το `firstLineIndent: pt(0)` κρατά ποιήματα και τίτλους σε έναν άξονα.

### 2 · Το πλάτος στοιχειοθεσίας χωρά τον μακρύτερο στίχο

```js
// script.js, γραμμές 42–47
// A line too long for the measure wraps, and both halves are centred, which adds a step to
// the outline.
// The widest line, 'Lord, who createdst man in wealth and store,', is 80.7 mm in 12.4 pt
// Fell, so the 110 mm measure takes every line of both poems whole.
const TRIM = { w: 148, h: 210 }; // mm: A5, one A4 sheet folded once
const MARGIN = { top: 22, bottom: 24, inner: 17, outer: 21 }; // mm: the measure is 110 mm
```

Ένας στίχος που δεν χωρά γυρίζει στην επόμενη γραμμή, και τα δύο μισά κεντράρονται, έτσι το περίγραμμα αποκτά ένα σκαλοπάτι που δεν υπάρχει στο σχήμα του Herbert. Με πλάτος στοιχειοθεσίας 75 mm, τρεις στίχοι του *The Altar* και δύο του *Easter Wings* γυρίζουν, και το αναμνηστικό φτάνει τις έξι σελίδες. Ο φαρδύτερος στίχος εδώ, ο πρώτος του *Easter Wings*, έχει 80,7 mm στα αγγλικά και 80,0 mm στα ισπανικά, έτσι το πλάτος στοιχειοθεσίας των 110 mm της σελίδας A5 χωρά κάθε στίχο ακέραιο.

### 3 · Απλές επικεφαλίδες, κεντραρισμένες

```js
// script.js, γραμμές 51–71
// headings.textAlign centres every level. The Fell faces ship weight 400 only, so no level
// asks for bold.
const titles = {
  fontFamily: 'IM Fell Great Primer', fontWeight: 400, color: col('violet'), textAlign: 'center',
  levels: [
    // The keepsake's title opens page 1, where a break changes nothing; a second # title
    // would open on a recto.
    { level: 1, fontSize: pt(40), lineHeight: pt(LEAD * 3), textTransform: 'uppercase',
      marginBottom: pt(LEAD), breakBefore: { enabled: true, parity: 'odd' } },
    // A poem opens the next page, recto or verso: The Altar (page 2) faces Easter Wings.
    // A heading that opens a page drops its top margin, so the title is lowered by its
    // line box instead: three lines deep, it sets the title about 5 mm down. The default
    // half-em margin under it rounds up to a whole line, and each poem starts on line 5.
    { level: 2, fontSize: pt(24), lineHeight: pt(LEAD * 3), textTransform: 'uppercase',
      breakBefore: { enabled: true, parity: 'any' } },
    // The small-capital labels on pages 1 and 4: the sister face at the body size, with no
    // margins, since the :::space lines place them.
    { level: 3, fontFamily: 'IM Fell English SC', fontSize: pt(12.4), lineHeight: pt(LEAD),
      marginTop: pt(0), marginBottom: pt(0) },
  ],
};
```

Κανένα επίπεδο δεν έχει σχεδίαση, μόνο ρυθμίσεις στοιχείων, και το `headings.textAlign` κεντράρει και τα τρία ([επικεφαλίδες](https://postext.dev/el/docs/configuration-headings.md#επικεφαλίδες)). Η ισοτιμία `'any'` ανοίγει κάθε ποίημα στην επόμενη σελίδα, δεξιά ή αριστερή, έτσι ο βωμός της σελίδας 2 βλέπει τα φτερά της σελίδας 3. Ένα `marginTop` δεν μπορεί να χαμηλώσει αυτούς τους τίτλους, επειδή ο χώρος πάνω από μια επικεφαλίδα που ανοίγει σελίδα παραλείπεται. Αντί γι’ αυτό, το κουτί γραμμής του δεύτερου επιπέδου, βάθους τριών γραμμών, χαμηλώνει κάθε τίτλο περίπου 5 mm, και τα δύο ποιήματα αρχίζουν στη γραμμή 5 της επιφάνειας στοιχειοθεσίας. Το πρώτο επίπεδο ανοίγει το έγγραφο και δεν χρειάζεται αλλαγή εδώ· έχει πάντως μία, ώστε ένας δεύτερος τίτλος `#` να ανοίγει σε δεξιά σελίδα. Το τρίτο επίπεδο στοιχειοθετεί τις τέσσερις ετικέτες των σελίδων 1 και 4 στα μικρά κεφαλαία της IM Fell English SC, στο μέγεθος του κυρίως κειμένου.

### 4 · Το Markdown δίνει τις αποστάσεις και αλλάζει τις σελίδες

```js
// script.js, γραμμές 75–92
// A blank line adds no space, so every gap on these pages is a :::space{lines=N}, which adds
// N lines of the 17 pt grid (one without the attribute). ## opens a page for each poem, and
// :::pagebreak opens the last page.
const config = () => ({
  colorPalette,
  locale: t({ en: 'en-us', es: 'es' }), // the language of each edition, and of its bundle
  page: { // mirror: left is the inner margin; 150 dpi is for the screen
    sizePreset: 'custom', width: mm(TRIM.w), height: mm(TRIM.h), dpi: 150,
    backgroundColor: col('paper'),
    margins: { top: mm(MARGIN.top), bottom: mm(MARGIN.bottom), left: mm(MARGIN.inner),
      right: mm(MARGIN.outer), mirror: true },
  },
  layout: { layoutType: 'single' }, // the default is two columns
  bodyText: verse, // a :ref added to these pages takes main-color, the ink, like bold and italic
  headings: titles,
  header: { elements: [] }, // a folded keepsake of four pages: no running heads,
  footer: { elements: [] }, // and no folios
});
```

Μια κενή γραμμή ανάμεσα σε παραγράφους δεν προσθέτει χώρο, έτσι κάθε κενό σε αυτές τις σελίδες έρχεται από το `:::space`: μία γραμμή ανάμεσα στις στροφές του *Easter Wings*, και στη σελίδα τίτλου πέντε γραμμές πάνω από την ετικέτα του Ψαλμού και δέκα κάτω από το μότο ([`:::space`](https://postext.dev/el/docs/document-format-directives.md#space)). Με αυτούς τους αριθμούς η σημείωση του τυπογράφου στη σελίδα 1 τελειώνει στην τελευταία γραμμή της επιφάνειας στοιχειοθεσίας, και οι ετικέτες πάνω από τον Ψαλμό και πάνω από το σημείωμα στέκονται και οι δύο στη γραμμή 13, 94 mm από την κορυφή της σελίδας. Το `:::pagebreak` ανοίγει την τελευταία σελίδα ([`:::pagebreak`](https://postext.dev/el/docs/document-format-directives.md#pagebreak)). Και ο κολοφώνας στοιχειοθετείται μία παράγραφος για κάθε γραμμή, κομμένη εκεί όπου τελειώνει μια φράση, έτσι οι τέσσερις γραμμές του στενεύουν σε κοσμητικό τέλους.

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

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

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

### script.js

```js
// ═══ Postext Cookbook · Nº 062 · Shaped verse: Herbert's Easter Wings, centred line by line ═
// https://postext.dev/en/cookbook/shaped-verse
// Code: MIT · Text: G. Herbert, The Temple, 1633 (PD; EEBO-TCP, CC0) · Spanish version: CC BY 4.0
// Fonts: IM Fell English, Great Primer and English SC (SIL OFL 1.1) · Needs postext ≥ 1.25.0
import { buildDocumentWithFonts, renderPageToCanvas } from 'https://esm.sh/postext';

const LANG = 'en'; // @lang: the language of the sample document ('en' | 'es')
const RECIPE = 'shaped-verse';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
const palette = { // every colour in the config links to one of these
  ink: '#241d29', // the text: a violet-black
  violet: '#5c2a6f', // the one accent: the titles and the small-capital labels
  paper: '#fbf7ee', // the sheet: an uncoated cream
};
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' } })),
  // Italic and bold take their colour from 'main-color' unless set. With 'main-color' in ink,
  // the italic subtitle, epigraph and motto print in ink instead of the default blue.
  { id: 'main-color', name: 'ink (defaults)', value: { hex: palette.ink, model: 'hex' } },
];
const LEAD = 17; // pt: the leading of every line, verse and prose alike

// #region answer: centred text, one line of verse to a paragraph
// Postext joins the lines of a Markdown paragraph, so every line of the poem is a paragraph
// of its own, with a blank line after it. Centred, each line keeps its natural width on the
// axis of the measure, and the lengths Herbert gave his lines draw the figure:
//   Lord, who createdst man in wealth and store,
//
//   Though foolishly he lost the same,
//
//   Decaying more and more,
const verse = {
  fontFamily: 'IM Fell English', fontSize: pt(12.4), lineHeight: pt(LEAD), color: col('ink'),
  textAlign: 'center', // ragged on both sides; only justified text is hyphenated by default
  firstLineIndent: pt(0), // the default 1.5 em moves every line 3.3 mm off the titles' axis
};
// #endregion

// #region measure: an A5 leaf whose measure holds the longest line whole
// A line too long for the measure wraps, and both halves are centred, which adds a step to
// the outline.
// The widest line, 'Lord, who createdst man in wealth and store,', is 80.7 mm in 12.4 pt
// Fell, so the 110 mm measure takes every line of both poems whole.
const TRIM = { w: 148, h: 210 }; // mm: A5, one A4 sheet folded once
const MARGIN = { top: 22, bottom: 24, inner: 17, outer: 21 }; // mm: the measure is 110 mm
// #endregion

// #region titles: plain headings, centred, in the display face and the accent
// headings.textAlign centres every level. The Fell faces ship weight 400 only, so no level
// asks for bold.
const titles = {
  fontFamily: 'IM Fell Great Primer', fontWeight: 400, color: col('violet'), textAlign: 'center',
  levels: [
    // The keepsake's title opens page 1, where a break changes nothing; a second # title
    // would open on a recto.
    { level: 1, fontSize: pt(40), lineHeight: pt(LEAD * 3), textTransform: 'uppercase',
      marginBottom: pt(LEAD), breakBefore: { enabled: true, parity: 'odd' } },
    // A poem opens the next page, recto or verso: The Altar (page 2) faces Easter Wings.
    // A heading that opens a page drops its top margin, so the title is lowered by its
    // line box instead: three lines deep, it sets the title about 5 mm down. The default
    // half-em margin under it rounds up to a whole line, and each poem starts on line 5.
    { level: 2, fontSize: pt(24), lineHeight: pt(LEAD * 3), textTransform: 'uppercase',
      breakBefore: { enabled: true, parity: 'any' } },
    // The small-capital labels on pages 1 and 4: the sister face at the body size, with no
    // margins, since the :::space lines place them.
    { level: 3, fontFamily: 'IM Fell English SC', fontSize: pt(12.4), lineHeight: pt(LEAD),
      marginTop: pt(0), marginBottom: pt(0) },
  ],
};
// #endregion

// #region pages: four pages, spaced and broken from the Markdown
// A blank line adds no space, so every gap on these pages is a :::space{lines=N}, which adds
// N lines of the 17 pt grid (one without the attribute). ## opens a page for each poem, and
// :::pagebreak opens the last page.
const config = () => ({
  colorPalette,
  locale: t({ en: 'en-us', es: 'es' }), // the language of each edition, and of its bundle
  page: { // mirror: left is the inner margin; 150 dpi is for the screen
    sizePreset: 'custom', width: mm(TRIM.w), height: mm(TRIM.h), dpi: 150,
    backgroundColor: col('paper'),
    margins: { top: mm(MARGIN.top), bottom: mm(MARGIN.bottom), left: mm(MARGIN.inner),
      right: mm(MARGIN.outer), mirror: true },
  },
  layout: { layoutType: 'single' }, // the default is two columns
  bodyText: verse, // a :ref added to these pages takes main-color, the ink, like bold and italic
  headings: titles,
  header: { elements: [] }, // a folded keepsake of four pages: no running heads,
  footer: { elements: [] }, // and no folios
});
// #endregion

// ─── 2 · Content ────────────────────────────────────────────────────────────
const markdown = String.raw`---
title: "The Temple"
author: "George Herbert"
---

# The Temple

*Sacred Poems and Private Ejaculations*

:::space

By Mr. George Herbert

:::space{lines=5}

### Psal. 29.

*In his Temple doth every man speak of his honour.*

:::space{lines=10}

### Two shaped poems

in the text of the first edition

Cambridge, 1633

## The Altar

A broken ALTAR, Lord, thy servant reares,

Made of a heart, and cemented with teares:

Whose parts are as thy hand did frame;

No workmans tool hath touch’d the same.

A HEART alone

Is such a stone,

As nothing but

Thy pow’r doth cut.

Wherefore each part

Of my hard heart

Meets in this frame,

To praise thy name.

That if I chance to hold my peace,

These stones to praise thee may not cease.

O let thy blessed SACRIFICE be mine,

And sanctifie this ALTAR to be thine.

## Easter Wings

Lord, who createdst man in wealth and store,

Though foolishly he lost the same,

Decaying more and more,

Till he became

Most poore:

With thee

O let me rise

As larks, harmoniously,

And sing this day thy victories:

Then shall the fall further the flight in me.

:::space

My tender age in sorrow did beginne:

And still with sicknesses and shame

Thou didst so punish sinne,

That I became

Most thinne.

With thee

Let me combine,

And feel this day thy victorie:

For, if I imp my wing on thine,

Affliction shall advance the flight in me.

:::pagebreak

### Herbert’s motto

*Lesse then the least of Gods mercies.*

:::space

With it, his printers wrote, he used to conclude “all things that might seem to tend any way to his own honour”.

:::space{lines=7}

### A note on the text

The poems keep the spelling of the first edition, printed at Cambridge in 1633. There “The Altar” stands upright on page 18, and the two stanzas of “Easter Wings” lie sideways on pages 34 and 35. Here they stand upright; give the booklet a quarter turn and each opens into a pair of wings.

:::space{lines=5}

Set in IM Fell English, English SC and Great Primer,

Igino Marini’s revivals of the types

John Fell gathered at Oxford.

Text from EEBO-TCP.
`; // content.<lang>.md, inlined by the Cookbook

// ─── 3 · Fonts ──────────────────────────────────────────────────────────────
// Every face the design uses. Layout measures with the browser's fonts, so the
// kit loads them from Fontsource before the first build.
const FONTS = {
  'IM Fell English': ['400', '400i'],
  'IM Fell Great Primer': ['400'],
  'IM Fell English SC': ['400'],
};

// ─── 4 · Build & show ───────────────────────────────────────────────────────
const doc = await buildDocumentWithFonts({ markdown }, config(), kitFonts(FONTS));
showPages(doc, { title: t({ en: 'Easter Wings and The Altar', es: 'Alas de Pascua y El altar' }) });

// ─── 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 ───────────────────────────────────────────────────────────────────────
```

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

### Κάθε ποίημα σε δεξιά σελίδα

Με την ισοτιμία `'odd'` τα *The Altar* και *Easter Wings* ανοίγουν στις σελίδες 3 και 5, και οι δύο δεξιές, και το αναμνηστικό φτάνει τις έξι σελίδες με τις σελίδες 2 και 4 λευκές.

```diff
-      breakBefore: { enabled: true, parity: 'any' } },
+      breakBefore: { enabled: true, parity: 'odd' } },
```

### Στίχοι με στοίχιση αριστερά

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

```diff
-  textAlign: 'center', // ragged on both sides; only justified text is hyphenated by default
+  textAlign: 'left', // ragged right; only justified text is hyphenated by default
```

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

- Ένας στίχος πολύ μακρύς για το πλάτος στοιχειοθεσίας γυρίζει στην επόμενη γραμμή, και τα δύο μισά κεντράρονται το καθένα μόνο του. Μετρήστε τον φαρδύτερο στίχο πριν επιλέξετε το μέγεθος των στοιχείων και τα περιθώρια. Για στίχους με στοίχιση αριστερά, με κρεμαστές συνέχειες, δείτε τη συνταγή [Ποιήματα στοιχειοθετημένα στίχο προς στίχο](https://postext.dev/el/cookbook/poetry-collection.md).
- Τα αρχικά διαστήματα αφαιρούνται από μια παράγραφο, έτσι δεν μπορείτε να δώσετε σχήμα σε έναν στίχο γεμίζοντάς τον με διαστήματα. Το πλάτος κάθε στίχου έρχεται μόνο από τις λέξεις του, και μια μετάφραση πρέπει να βρει στίχους περίπου όσο φαρδιούς είναι του πρωτοτύπου, όπως κάνει η ισπανική έκδοση.
- Το κεντράρισμα κρατά κάθε στίχο στο φυσικό του πλάτος, έτσι η πλάκα και η βάση του *The Altar* δεν βγαίνουν τετράγωνες: ο τρίτος και ο τέταρτος στίχος της πλάκας είναι στενότεροι από τους δύο πρώτους. Ούτε η πλήρης στοίχιση μπορεί να τις τετραγωνίσει, επειδή η τελευταία γραμμή μιας παραγράφου με πλήρη στοίχιση κρατά το φυσικό της πλάτος και καθένας από αυτούς τους στίχους είναι μια δική του παράγραφος.
- Η σελίδα τίτλου και η τελευταία σελίδα είναι γεμάτες ως την τελευταία γραμμή του πλέγματος. Μία γραμμή ακόμη στη σελίδα τίτλου, από ένα μακρύτερο μότο, έναν στίχο που γυρίζει ή ένα μεγαλύτερο `:::space`, μετακινεί την ετικέτα στη βάση της και τις δύο γραμμές κάτω από αυτήν σε δική τους σελίδα· μία γραμμή ακόμη στην τελευταία σελίδα μετακινεί μόνη της την τελευταία γραμμή του κολοφώνα σε πέμπτη σελίδα. Για να προσθέσετε μια γραμμή σε οποιαδήποτε από τις δύο σελίδες, αφαιρέστε μία από ένα `:::space` πάνω της.
- Το Postext δεν στοιχειοθετεί κείμενο πλαγιαστά, όπως οι τυπογράφοι του 1633 στοιχειοθέτησαν το *Easter Wings*: περιστρέφονται μόνο ολόκληρες εικόνες και πίνακες. Εδώ οι στροφές στέκονται όρθιες, και το σημείωμα της σελίδας 4 το λέει.

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

- Συνταγή: Ignacio Ferro ([@drnachio](https://github.com/drnachio))
- Κείμενο: “The Altar” and “Easter wings”, the title, subtitle, byline and epigraph of the title page, and Herbert’s motto with a clause of the printers’ preface, from the first edition of The Temple (Cambridge, 1633) in the EEBO-TCP transcription (CC0 1.0); the letters and stops it marks as illegible or unknown at six line ends (four in The Altar, two in Easter wings) are supplied: George Herbert; Text Creation Partnership ([πηγή](https://github.com/textcreationpartnership/A03058)), κοινό κτήμα
- Κείμενο: Psalm 29:9 in the Spanish edition, from the Reina-Valera Bible of 1909: Reina-Valera 1909 ([πηγή](https://es.wikisource.org/wiki/Biblia_Reina-Valera_1909/Salmos/29)), κοινό κτήμα
- Κείμενο: The Spanish versions of both poems, of the subtitle, the motto and the printers’ clause, and the title-page imprint, the note on the text and the colophon of both editions, written for this recipe: Ignacio Ferro, CC-BY-4.0
- Γραμματοσειρές: IM Fell English (OFL-1.1), IM Fell Great Primer (OFL-1.1), IM Fell English SC (OFL-1.1)
- Κώδικας: MIT · Δείγμα περιεχομένου: CC-BY-4.0

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

- [Αρ. 015 · Ποιήματα στοιχειοθετημένα στίχο προς στίχο](https://postext.dev/el/cookbook/poetry-collection.md): Κάθε ποίημα είναι μπλοκ :::verse όπως τυπώθηκε: οι εσοχές του 1918 είναι αρχικά κενά, οι αναδιπλώσεις κρέμονται 2 em πιο μέσα, κενές γραμμές χωρίζουν στροφές. · Επίπεδο 2 (Μεσαίο) · Ποίηση
- [Αρ. 043 · Μετάφραση απέναντι στο πρωτότυπο, στροφή προς στροφή](https://postext.dev/el/cookbook/bilingual-facing-verse.md): Κάθε ποίημα, πλαίσιο δύο στηλών χωρίς περίγραμμα: σταθερή αλλαγή στήλης ξεκινά τα αγγλικά στον τίτλο και το :::space κρατά κάθε στροφή στο ύψος της. · Επίπεδο 2 (Μεσαίο) · Ποίηση
- [Αρ. 044 · Κριτική έκδοση: αριθμοί στίχων και σημειώσεις ανά στίχο](https://postext.dev/el/cookbook/critical-edition-line-numbers.md): Το Lycidas του Μίλτον του 1645: το lineNumbers αριθμεί κάθε πέμπτο στίχο στην πλευρική στήλη, και κάθε σημείωση ανοίγει με τον στίχο της σε ετικέτα. · Επίπεδο 3 (Προχωρημένο) · Ποίηση
