Skip to main content
Recipe number 62

Cookbook · Chapter 2 · Type & text

Shaped verse: Herbert’s Easter Wings, centred line by line

George Herbert’s Easter Wings and The Altar set as centred body text, a paragraph to each line of verse, so the lengths of the lines draw the two figures.

On this page
Genre
Poetry
Output
Canvas
Level
Basic
Postext
Tested with Postext 1.65.0
Needs ≥ 1.25.0
Licence
Updated 11 Oct 2026
Code MIT · Text CC BY 4.0

pp. 2–3 of 4

  • Trim 148 × 210 mm
  • 1 column
  • IM Fell English 12.4/17
  • IM Fell English SC
  • IM Fell Great Primer
  • 4 pages
  • Level
  • Postext 1.57.1
  • Laid out in 50 ms
  • 99 lines of code

In short

Two old English poems whose lines are printed so each poem looks like a picture: an altar and a pair of wings. Each line is simply centred, and its length draws the shape.

What you'll build

A keepsake of four A5 pages, one A4 sheet folded once, holding two shaped poems from George Herbert’s The Temple in the spelling of the 1633 first edition. The title page follows the 1633 one, down to its Psalm 29 epigraph. Inside, The Altar faces Easter Wings. No line of either poem is indented or padded with spaces; each is centred, so the altar stands on a narrow pillar and each stanza of the wings narrows to two words and widens again. On the last page, under Herbert’s motto, a note tells how the 1633 printers set the wings sideways, and the colophon gets shorter line by line. Everything is set as body text or as one of three heading levels in the IM Fell types, with no named styles and no page designs. The Spanish edition sets a line-for-line version that keeps both shapes.

This recipe answers

  • How do I add extra vertical space between two blocks, when blank lines do nothing?
  • How do I set poetry: one line per verse, stanza gaps, hanging indents for wrapped lines, no hyphenation?
  • How do I set an epigraph, a dedication, a signature, or a pull quote with a big quote mark?
  • How do I force a page or column break, and start every chapter on a right-hand page?

The short answer

script.js · lines 26–38in full code
// 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
};

Centred text, one line of verse to a paragraph

Ingredients

Type
IM Fell English, IM Fell Great Primer, IM Fell English SC (SIL OFL 1.1)
Assets
None: every picture is drawn in code

Method

#1 · A line of verse is a centred paragraph

The code is the short answer above. Postext joins the lines of a Markdown paragraph into one, so every line of verse is a paragraph, with a blank line after it. textAlign: 'center' sets each line at its natural width on the axis of the measure, and since only justified text is hyphenated unless hyphenation.ragged is on, no word is broken (body text). Each line is the first of its paragraph, so the default first-line indent of 1.5 em would push it 3.3 mm right of the titles’ axis; firstLineIndent: pt(0) keeps poems and titles on one axis.

#2 · The measure takes the longest line

script.js · lines 42–47in full code
// 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

A line that does not fit turns over, and both halves are centred, so the outline gets a step that is not in Herbert’s figure. With a 75 mm measure, three lines of The Altar and two of Easter Wings turn over, and the keepsake runs to six pages. The widest line here, the first of Easter Wings, is 80.7 mm in English and 80.0 mm in Spanish, so the 110 mm measure of the A5 page takes every line whole.

#3 · Plain headings, centred

script.js · lines 51–71in full code
// 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) },
  ],
};

No level has a design, only type settings, and headings.textAlign centres all three (headings). Parity 'any' opens each poem on the next page, recto or verso, so the altar on page 2 faces the wings on page 3. A marginTop cannot lower those titles, because the space above a heading that opens a page is dropped. The line box of level 2, three lines deep, lowers each title about 5 mm instead, and both poems start on line 5 of the text block. Level 1 opens the document and needs no break here; it carries one all the same, so that a second # title would open on a recto. Level 3 sets the four labels of pages 1 and 4 in the small capitals of IM Fell English SC, at the body size.

#4 · The Markdown spaces and breaks the pages

script.js · lines 75–92in full code
// 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
});

A blank line between paragraphs adds no space, so every gap on these pages comes from :::space: one line between the stanzas of Easter Wings, and on the title page five lines above the Psalm label and ten under the epigraph (:::space). With those counts the imprint on page 1 ends on the last line of the text block, and the labels over the Psalm and over the note both stand on line 13, 94 mm from the top of the page. :::pagebreak opens the last page (:::pagebreak). The colophon is also set a paragraph to each line, broken where a phrase ends, so its four lines taper to a tailpiece.

The whole recipe

Sandbox
// ═══ 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

The composed script.js runs as it is: paste it into any page’s module script, or open the recipe on CodePen. Recipe folder on GitHub ↗ (opens in a new tab)

Variations

#Open each poem on a right-hand page

With parity 'odd' The Altar and Easter Wings open on pages 3 and 5, both rectos, and the keepsake runs to six pages with pages 2 and 4 blank.

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

#Set the verse flush left

With textAlign: 'left' every line starts at the margin and the two poems keep only their right-hand outline; the rest of the body text, from the subtitle to the colophon, goes flush left too, and only the headings stay centred.

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

Pitfalls

  • A line of verse too long for the measure turns over, and both halves are centred on their own. Measure the widest line before you choose the type size and the margins. For verse set flush left, with turnovers that hang, see Poems set line by line.
  • Leading spaces are trimmed from a paragraph, so you cannot pad a line into shape with spaces. The width of each line comes from its words alone, and a translation has to find lines about as wide as the original’s, as the Spanish edition does.
  • Centring keeps each line at its natural width, so the slab and the base of The Altar do not come out square: the third and fourth lines of the slab are narrower than the first two. Justifying cannot square them either, because the last line of a justified paragraph keeps its natural width and each of these lines is a paragraph of its own.
  • The title page and the last page are filled to the last line of the grid. One more line on the title page, from a longer epigraph, a line that turns over or a larger :::space, moves the label at its foot and the two lines under it onto a page of their own; one more line on the last page moves the colophon’s last line alone onto a fifth page. To add a line to either page, take one out of a :::space above it.
  • Postext does not set text sideways, as the 1633 printers set Easter Wings: only whole figures and tables rotate. Here the stanzas stand upright, and the note on page 4 says so.

Credits

Text
  • “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 · public domain
  • Psalm 29:9 in the Spanish edition, from the Reina-Valera Bible of 1909 · Reina-Valera 1909 · public domain
  • 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
Fonts
IM Fell English (SIL OFL 1.1) · IM Fell Great Primer (SIL OFL 1.1) · IM Fell English SC (SIL OFL 1.1)
Sandbox