باختصار
قصيدتان إنجليزيتان قديمتان طُبعت أسطرهما بحيث تبدو كل قصيدة صورة: مذبح وزوج من الأجنحة. كل سطر في الوسط لا أكثر، وطوله هو الذي يرسم الشكل.
ما الذي ستنضده
تذكار من أربع صفحات بقياس A5، أي ورقة A4 مطوية مرة واحدة، يضم قصيدتين مُشكَّلتين من The Temple لجورج هربرت بإملاء الطبعة الأولى سنة 1633. تتبع صفحة العنوان صفحة 1633، حتى تصديرها من المزمور 29. وفي الداخل تقابل The Altar قصيدة Easter Wings. لا يُزاح أي سطر من القصيدتين ولا يُحشى بمسافات؛ كل سطر في الوسط، فيقف المذبح على عمود ضيق، ويضيق كل مقطع من الجناحين إلى كلمتين ثم يتسع من جديد. وفي الصفحة الأخيرة، تحت شعار هربرت، تروي ملاحظة كيف نضّد طابعو 1633 الجناحين بالعرض، وتقصر بيانات الطبع سطرًا بعد سطر. كل شيء منضّد نصَّ متن أو بأحد مستويات العناوين الثلاثة بحروف IM Fell، بلا أنماط مسمّاة ولا تصاميم صفحات. وتنضّد الطبعة الإسبانية ترجمة سطرًا بسطر تحافظ على الشكلين.
تجيب هذه الوصفة عن
- كيف أضيف فراغًا رأسيًّا إضافيًّا بين كتلتين، إذا لم تُجدِ الأسطر الفارغة شيئًا؟
- كيف أنضد الشعر: سطر لكل بيت، وفراغ بين المقاطع، ومسافة بادئة معلّقة للأسطر الملتفّة، وبلا تقسيم كلمات؟
- كيف أنضد نصًّا تصديريًّا أو إهداءً أو توقيعًا أو اقتباسًا بارزًا بعلامة اقتباس كبيرة؟
- كيف أفرض فاصل صفحة أو عمود، وأبدأ كل فصل على صفحة يمنى؟
الجواب المختصر
// 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
};
المكونات
- الميزات
- المسافات البادئة والمحاذاة والتباعد بين الفقراتمستويات العناوينمسافة عمودية صريحةفواصل الصفحات والأعمدةفصول تبدأ في صفحة فرديةخط المتنالغامق والمائل وألوانهمامقاس القطعهوامش متناظرةعمود واحد أو عمودانلون الورقلوحة ألوان دلاليةصفحات على اللوحة (Canvas)
- الخطوط
- IM Fell English, IM Fell Great Primer, IM Fell English SC (SIL OFL 1.1)
- الأصول
- لا شيء: كل صورة مرسومة بالشيفرة
طريقة التحضير
#1 · البيت فقرة في الوسط
الشيفرة هي الجواب المختصر أعلاه. يضم Postext أسطر فقرة Markdown في سطر واحد، فكل بيت فقرة، يليها سطر فارغ. ويضع textAlign: 'center' كل سطر بعرضه الطبيعي على محور عرض السطر، ولأن القسمة بالواصلة لا تُطبَّق إلا على النص المضبوط ما لم يُفعَّل hyphenation.ragged، لا تنكسر أي كلمة (نص المتن). وكل سطر هو الأول في فقرته، فالإزاحة الافتراضية للسطر الأول، 1.5 em، كانت ستدفعه 3.3 مم يمين محور العناوين؛ ويُبقي 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 مم تنقلب ثلاثة أسطر من The Altar وسطران من Easter Wings، ويمتد التذكار إلى ست صفحات. وأعرض سطر هنا، وهو الأول في Easter Wings، طوله 80.7 مم بالإنجليزية و80.0 مم بالإسبانية، فيتسع عرض السطر البالغ 110 مم في صفحة A5 لكل سطر كاملًا.
#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 المستويات الثلاثة (العناوين). وزوجية 'any' تفتح كل قصيدة على الصفحة التالية، فردية كانت أو زوجية، فيقابل المذبح في الصفحة 2 الجناحين في الصفحة 3. لا يستطيع marginTop أن يُنزل هذين العنوانين، لأن الفراغ فوق العنوان الذي يفتتح صفحة يُسقَط. بدلًا من ذلك يُنزل مستطيل سطر المستوى 2، وعمقه ثلاثة أسطر، كل عنوان نحو 5 مم، وتبدأ القصيدتان على السطر 5 من كتلة النص. والمستوى 1 يفتتح المستند ولا يحتاج إلى فاصل هنا؛ ومع ذلك له فاصل كي يُفتتح عنوان # ثانٍ، لو وُجد، على صفحة فردية. وينضّد المستوى 3 التسميات الأربع في الصفحتين 1 و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، وفي صفحة العنوان خمسة أسطر فوق تسمية المزمور وعشرة تحت التصدير (:::space). بهذه الأعداد ينتهي بيان الطبع في الصفحة 1 على آخر سطر من كتلة النص، وتقف التسميتان فوق المزمور وفوق الملاحظة كلتاهما على السطر 13، على بعد 94 مم من أعلى الصفحة. ويفتح :::pagebreak الصفحة الأخيرة (:::pagebreak). وبيانات الطبع منضّدة أيضًا فقرةً لكل سطر، مكسورةً حيث تنتهي العبارة، فتتناقص أسطره الأربعة إلى حلية ختام.
الوصفة كاملة
// ═══ 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 المجمّع كما هو: الصقه في سكربت الوحدة (module) لأي صفحة، أو افتح الوصفة على CodePen. مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)
تنويعات
#افتح كل قصيدة على صفحة فردية
مع زوجية 'odd' تُفتتح The Altar وEaster Wings على الصفحتين 3 و5، وكلتاهما فردية، ويمتد التذكار إلى ست صفحات تبقى فيها الصفحتان 2 و4 فارغتين.
- breakBefore: { enabled: true, parity: 'any' } },
+ breakBefore: { enabled: true, parity: 'odd' } },#نضّد الشعر محاذى إلى اليسار
مع textAlign: 'left' يبدأ كل سطر عند الهامش ولا تحتفظ القصيدتان إلا بمحيطهما الأيمن؛ ويُحاذى بقية نص المتن إلى اليسار أيضًا، من العنوان الفرعي إلى بيانات الطبع، ولا يبقى في الوسط إلا العناوين.
- textAlign: 'center', // ragged on both sides; only justified text is hyphenated by default
+ textAlign: 'left', // ragged right; only justified text is hyphenated by defaultأخطاء شائعة
- البيت الأطول من عرض السطر ينقلب، ويُوسَّط كل من نصفيه وحده. قِس أعرض سطر قبل أن تختار حجم الحرف والهوامش. وللشعر المحاذى إلى اليسار، بأسطر منقلبة معلّقة، انظر قصائد منضّدة سطرًا سطرًا.
- تُحذف المسافات في أول الفقرة، فلا تستطيع أن تحشو سطرًا بمسافات لتشكّله. عرض كل سطر يأتي من كلماته وحدها، وعلى الترجمة أن تجد أسطرًا بعرض أسطر الأصل تقريبًا، كما تفعل الطبعة الإسبانية.
- التوسيط يُبقي كل سطر بعرضه الطبيعي، فلا تخرج بلاطة The Altar وقاعدته مربّعتين: السطران الثالث والرابع من البلاطة أضيق من الأولين. ولا يستطيع الضبط تربيعهما أيضًا، لأن السطر الأخير من الفقرة المضبوطة يبقى بعرضه الطبيعي، وكل سطر من هذه الأسطر فقرة قائمة بذاتها.
- صفحة العنوان والصفحة الأخيرة ممتلئتان حتى آخر سطر في الشبكة. سطر واحد زائد في صفحة العنوان، من تصدير أطول أو سطر ينقلب أو
:::spaceأكبر، ينقل التسمية التي في أسفلها والسطرين تحتها إلى صفحة خاصة بها؛ وسطر واحد زائد في الصفحة الأخيرة ينقل آخر سطر من بيانات الطبع وحده إلى صفحة خامسة. لتضيف سطرًا إلى أي من الصفحتين، انزع سطرًا من:::spaceفوقه. - لا ينضّد Postext النص بالعرض، كما نضّد طابعو 1633 قصيدة Easter Wings: لا يدور إلا الأشكال والجداول الكاملة. وهنا تقف المقاطع منتصبة، وتذكر الملاحظة في الصفحة 4 ذلك.
الحقوق
- الوصفة
- Ignacio Ferro
- النص
- “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)
- الشيفرة
- MIT، مثل Postext
حرّر هذا الشرح ↗ (يفتح في تبويب جديد)مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)


