かんたんな説明
行の並びがそのまま絵に見えるように印刷する、英語の古い詩を2編組みます。祭壇と一対の翼です。各行を中央にそろえるだけで、行の長さが形を描きます。
できあがり
A5判4ページの記念冊子です。A4の紙1枚を二つ折りにし、ジョージ・ハーバートの『The Temple』から形の詩を2編、1633年の初版の綴りで収めます。扉ページは1633年版のものにならい、詩篇第29篇のエピグラフまで再現しています。中を開くと、『The Altar』と『Easter Wings』が向かい合います。どちらの詩も、字下げしたりスペースで詰めたりした行はありません。各行を中央にそろえるだけで、祭壇は細い柱の上に立ち、翼の各連は2語まで細くなってまた広がります。最後のページでは、ハーバートのモットーの下に、1633年の刷り手たちが翼を横向きに組んだいきさつを記した注記があり、奥付は1行ごとに短くなります。すべてをIM Fellの書体で、本文か3つのレベルの見出しのどれかとして組み、名前つきのスタイルもページのデザインも使っていません。スペイン語版では、両方の形を保った1行対1行の訳を組んでいます。
このレシピが答える質問
- 空行を入れても効かないとき、2つのブロックの間に縦のスペースを追加するには?
- 詩を組むには(1行に1詩行、連の間のアキ、折り返した行のぶら下げインデント、ハイフネーションなし)?
- エピグラフ、献辞、署名、大きな引用符の付いたプルクオートを組むには?
- 改ページや改段を強制し、すべての章を右ページから始めるには?
手短な答え
// 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
};
材料
- 機能
- 字下げ、行そろえ、段落間隔見出しの階層明示的な縦のアキ改ページと改段奇数ページから始まる章本文の書体太字・イタリックとその色仕上がりサイズ見開きの余白1段組みと2段組み用紙の色セマンティックカラーパレットキャンバス上のページ
- 種類
- IM Fell English, IM Fell Great Primer, IM Fell English SC (SIL OFL 1.1)
- 素材
- なし:画像はすべてコードで描画
作り方
#1 · 詩の1行は中央にそろえた1段落
コードは上の手短な答えにあります。PostextはMarkdownの段落の中の行をひとつにつなぐので、詩の行はそれぞれ1段落とし、後ろに空行を置きます。textAlign: 'center'は各行を自然な幅のまま行長の軸に置きます。hyphenation.raggedを有効にしないかぎり、ハイフネーションされるのは両端そろえのテキストだけなので、分割される単語もありません(本文)。各行はその段落の1行目なので、既定の1.5 emの字下げがあると、表題の軸より3.3 mm右へずれます。firstLineIndent: pt(0)で、詩と表題を同じ軸にそろえます。
#2 · 行長はいちばん長い行で決める
// 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
収まらない行は折り返し、前半も後半も中央にそろうので、輪郭にハーバートの図形にはない段差ができます。行長を75 mmにすると、『The Altar』の3行と『Easter Wings』の2行が折り返し、冊子は6ページになります。ここでいちばん幅の広い行は『Easter Wings』の1行目で、英語で80.7 mm、スペイン語で80.0 mmです。A5判の110 mmの行長なら、どの行も折り返さずに収まります。
#3 · 飾りのない見出しを中央に
// 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が3つのレベルすべてを中央にそろえます(見出し)。パリティ'any'で各詩は奇数・偶数を問わず次のページから始まるので、2ページの祭壇と3ページの翼が向かい合います。marginTopでこれらの表題を下げることはできません。ページの先頭に来た見出しの上のアキは捨てられるからです。代わりに、3行分あるレベル2の行ボックスが各表題を約5 mm下げ、どちらの詩も版面の5行目から始まります。レベル1は文書の先頭にあり、ここでは改ページは要りませんが、2つ目の#表題を置いたときに奇数ページから始まるように、改ページを指定してあります。レベル3は、1ページと4ページの4つのラベルを、本文と同じ大きさのIM Fell English SCのスモールキャピタルで組みます。
#4 · アキと改ページは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
});
段落のあいだの空行ではアキが入らないので、これらのページのアキはすべて:::spaceで作っています。『Easter Wings』の連のあいだに1行、扉ページでは詩篇のラベルの上に5行、エピグラフの下に10行です(:::space)。この行数で、1ページの刊記は版面の最後の行で終わり、詩篇の上のラベルと注記の上のラベルはどちらも13行目、ページの上端から94 mmに立ちます。最後のページは:::pagebreakで始めます(:::pagebreak)。奥付も1行を1段落とし、句の切れ目で改行しているので、4行がしだいに細くなってテールピースの形になります。
レシピの全体
// ═══ 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
組み立てたscript.jsはそのまま動きます。任意のページのモジュールスクリプトに貼り付けるか、レシピをCodePenで開いてください。 GitHub上のレシピのフォルダー ↗ (新しいタブで開きます)
アレンジ
#各詩を右ページから始める
パリティを'odd'にすると、『The Altar』と『Easter Wings』はどちらも奇数ページの3ページと5ページから始まり、冊子は6ページになって、2ページと4ページは白ページになります。
- breakBefore: { enabled: true, parity: 'any' } },
+ breakBefore: { enabled: true, parity: 'odd' } },#詩を左そろえで組む
textAlign: 'left'にすると、各行は余白から始まり、2編の詩には右側の輪郭だけが残ります。副題から奥付までのほかの本文も左そろえになり、中央にそろうのは見出しだけです。
- textAlign: 'center', // ragged on both sides; only justified text is hyphenated by default
+ textAlign: 'left', // ragged right; only justified text is hyphenated by defaultよくあるつまずき
- 行長に収まらない詩の行は折り返し、前半と後半がそれぞれ中央にそろいます。書体の大きさと余白を決める前に、いちばん幅の広い行を測ってください。左そろえで、折り返しを字下げして組む詩については、詩を1行ずつ組むを参照してください。
- 段落の先頭のスペースは取り除かれるので、スペースを詰めて行の形を作ることはできません。各行の幅は語だけで決まります。翻訳では、スペイン語版がしているように、原文とほぼ同じ幅の行を見つける必要があります。
- 中央そろえでは各行が自然な幅を保つので、『The Altar』の天板と台座は四角くなりません。天板の3行目と4行目は最初の2行より狭くなります。両端そろえにしても四角にはなりません。両端そろえの段落の最終行は自然な幅のまま残り、ここではどの行もそれだけで1段落だからです。
- 扉ページと最後のページは、グリッドの最後の行まで埋まっています。扉ページに1行増えると(エピグラフが長くなる、行が折り返す、
:::spaceを大きくするなど)、地のラベルとその下の2行が次のページに送られます。最後のページに1行増えると、奥付の最後の1行だけが5ページ目に送られます。どちらかのページに行を足すときは、その上の:::spaceから1行減らしてください。 - Postextは、1633年の刷り手たちが『Easter Wings』を組んだように文字を横向きに組むことはできません。回転できるのは図と表の全体だけです。ここでは連を正立させて組み、4ページの注記にもそう書いています。
クレジット
- 本文
- “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 · パブリックドメイン
- Psalm 29:9 in the Spanish edition, from the Reina-Valera Bible of 1909 · Reina-Valera 1909 · パブリックドメイン
- 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 (SIL OFL 1.1) · IM Fell Great Primer (SIL OFL 1.1) · IM Fell English SC (SIL OFL 1.1)


