باختصار
صفحات افتتاح الفصول في كتاب مدرسي عن علم الأرض. يمتد شريط ملوّن عليه رقم فصل كبير حتى الحافة العليا للصفحة، ويُضبط التصميم مرة واحدة لكل الفصول.
ما الذي ستنضده
صفحات افتتاح الفصول في Earth in Motion، كتاب مدرسي تمهيدي في علم الأرض على صفحة 210 × 280 مم. يفتتح الفصل الثالث تحت شريط بلون الطين المحروق يمتد إلى ما بعد الحافة العليا للصفحة. على الشريط سطر تمهيدي متباعد الحروف، والعنوان مكسورًا حيث اختار المؤلف، ومقدمة مائلة، ورقم فصل بحجم 168 pt يقف على قاعدة الشريط الداكنة جهة الحافة الأمامية. يبدأ عمودان مضبوطان تحت الشريط، ويحتل أسفل الصفحة مقطع عرضي لصفيحة غائصة. ويكرر الفصل الرابع التصميم باللون الأزرق المخضر، حتى علامة الحافة وأرقام الأقسام والإحالات وتسمية شكله. يُضبط التصميم مرة واحدة، على عنوان المستوى الأول. ويقدّم سطر عنوان كل فصل موضوع السطر التمهيدي والمقدمة في صورة سمات، ويحدّد نمطًا حين يأخذ الفصل لونًا آخر.
تجيب هذه الوصفة عن
- كيف أصمم صفحة افتتاح فصل فيها شريط لوني ممتد حتى النزف ورقم فصل كبير والعنوان؟
- كيف أنضد عنوان الفصل بعرض الصفحة بينما يجري المتن في عمودين تحته؟
- كيف أضيف إلى صفحة الافتتاح سطر المؤلف أو مقدمة تمهيدية أو فقرة أولى بحرف استهلالي؟
- كيف أعطي كل فصل صورته أو لونه أو شكل افتتاحه الخاص؟
- كيف أرقّم العناوين (1، 1.1، 1.1.1) وأنسّق كل مستوى بطريقة مختلفة؟
الجواب المختصر
const TOP = 24; // top margin, mm: the opener's container starts here
const OUTER = 16; // outer margin, mm: the numeral and the folios line up on it
const BLEED = 0; // mm: 0 on screen; about 3 for print, which also switches on page.cutLines
const BAND = 100; // mm from the trim to the foot of the band
const NUMERAL = 168; // pt; the baseline of a design text sits 0.8 down its line box
const PT = 25.4 / 72; // mm in a point
const AIR = 12; // mm, foot to text: ≥ 0.2 × NUMERAL × PT ≈ 11.9, the numeral box below its baseline
const BEARING = 2; // mm past the text edge: a rough optical nudge, as each digit's bearing differs
const bleedTop = { to: 'bleed', edge: 'top-left' }; // the trim's corner, pushed out by BLEED
// Design text centres by default; in a heading design it wraps by default too.
const onBand = { color: col('paper'), align: 'left' };
const below = (id, y, width) => ({ anchor: { to: `#${id}`, edge: 'below' }, offset: { y: mm(y) },
size: { width: mm(width) } }); // chained: a longer title pushes the standfirst down
const opener = { enabled: true,
// The text starts below the lowest element or minHeight (gotcha: opener-reserves-anchored).
minHeight: mm(BAND - TOP + AIR), // clears the numeral, so the text starts AIR below the foot
slot: {
elements: [ // array order is paint order: the band first, the type on top
{ kind: 'box', id: 'band', style: { backgroundColor: col('band') }, placement: {
anchor: bleedTop, size: { height: mm(BLEED + BAND) } } }, // no width: runs to the far edge
{ kind: 'rule', id: 'foot', color: col('ink'), thickness: mm(1.6), placement: {
anchor: bleedTop, offset: { y: mm(BLEED + BAND) } } },
{ kind: 'text', id: 'numeral', content: '{chapterNumber}', ...onBand,
fontFamily: 'Archivo', fontWeight: 800, fontSize: pt(NUMERAL),
lineHeight: 1, // a box as tall as the type: the y below counts on it
placement: { anchor: { to: 'page', edge: 'top-right' }, // the fore-edge of a recto
offset: { x: mm(BEARING - OUTER), y: mm(BAND - 0.8 * NUMERAL * PT) } } }, // on the foot
{ kind: 'text', id: 'kicker', ...onBand, fontFamily: 'Archivo Narrow', fontWeight: 600,
content: `${t({ en: 'Chapter', es: 'Capítulo' })} {chapterNumber} · {attr.topic}`,
fontSize: pt(8.5), letterSpacing: pt(2), textTransform: 'uppercase',
placement: { anchor: { to: 'container', edge: 'top-left' }, offset: { y: mm(7) } } },
{ kind: 'text', id: 'title', content: '{titleText}', ...onBand, // breaks at the \\
fontFamily: 'Archivo', fontWeight: 800, fontSize: pt(34), lineHeight: 1.02,
placement: below('kicker', 3, 118) },
{ kind: 'text', id: 'lead', content: '{attr.lead}', ...onBand, fontFamily: 'Roboto Serif',
italic: true, fontSize: pt(10.5), lineHeight: 1.36, placement: below('title', 6, 100) },
],
},
}; // hook-up: headings.levels[0] = { span: 'page', breakBefore, advancedDesign: opener }
المكونات
- الميزات
- صفحات افتتاح مصمَّمةشريط فصل بعرض الصفحةسمات العنوانفواصل الأسطر في العناوينأنماط العناوينألوان لكل جزءالعناوين المرقّمةفصول تبدأ في صفحة فرديةتثبيت عناصر التصميمالنصوص والخطوط والمربعات في تصاميم الصفحةأشرطة النزف وألسنة الإبهاملوحة ألوان دلاليةالترويسات وأرقام الصفحاتالترويسات بحسب دور الصفحةاستشهادات تضع الأشكالموضع الأشكالالأشكال والجداول بوصفها مواردكتب تُبنى فصلًا فصلًاصفحات على اللوحة (Canvas)
- تستخدم أيضًا
- النزف وعلامات القصأنماط الفقرات
- الخطوط
- Roboto Serif, Archivo, Archivo Narrow (SIL OFL 1.1)
- الأصول
- لا شيء: كل صورة مرسومة بالشيفرة
طريقة التحضير
#1 · علّق الشريط والرقم على الصفحة
الشيفرة هي الجواب المختصر أعلاه. يُربط الشريط وقاعدته بالزاوية العليا اليسرى للنزف. وككل صندوق أو خط لا يُعطى عرضًا، يمتدان إلى الحافة البعيدة لذلك الإطار، فيبلغان حدّ القص، ثم النزف متى ضُبط BLEED. ويُربط الرقم بالزاوية العليا اليمنى للصفحة: y: BAND - 0.8 * NUMERAL * PT يضع خط أساسه على القاعدة، وBEARING يحرّك مستطيله 2 مم إلى داخل الهامش تعويضًا عن الفراغ الجانبي للرقم، فيصطف الحبر تقريبًا مع حافة النص. ويُربط السطر التمهيدي بالحاوية. ويُربط العنوان تحت السطر التمهيدي، والمقدمة تحت العنوان، عبر موضع الربط below، وتصميم العنوان يلفّ نصه افتراضيًا، فالعنوان الأطول يدفع المقدمة إلى الأسفل. والمقدمة عنصر نصي يُملأ من السمة lead في العنوان؛ وسطر المؤلف سيكون عنصرًا آخر، {attr.author}، يُربط بالطريقة نفسها. يحدد minHeight: BAND - TOP + AIR موضع بدء المتن. يمتد مستطيل الرقم تحت القاعدة بمقدار 0.2 × حجمه (11.9 مم)، وصفحة الافتتاح تحجز المساحة حتى أدنى عناصرها، فيجب ألّا يقل AIR عن 11.9 مم؛ وإن قلّ، حدّد مستطيل الرقم موضع بدء النص.
#2 · أعطِ عنوان الفصل الصفحة
headings: {
fontFamily: 'Archivo', color: col('band'),
levels: [
// parity: 'odd' keeps openers on rectos, so the numeral's right-edge anchor is the
// fore-edge. The copy is fitted so no chapter spills a few lines onto a page of its own,
// which would leave that page and a blank verso before the next opener.
{ level: 1, span: 'page', breakBefore: { enabled: true, parity: 'odd' },
// 0: the hidden title's default 0.5 em would add a grid line, and AIR alone sets the gap
marginBottom: pt(0), advancedDesign: opener },
{ level: 2, fontSize: pt(11.5), lineHeight: pt(LEAD), numberingTemplate: '{1}.{2}',
marginTop: pt(LEAD), marginBottom: pt(0) }, // one grid line above, none below
],
},
يفتح span: 'page' كل فصل في صفحة جديدة ويضع عنوان المستوى الأول عبر العمودين؛ ويرسم advancedDesign صفحة الافتتاح مكان نص العنوان، ويبدأ المتن تحت الارتفاع المحجوز. ويضع breakBefore مع parity: 'odd' كل صفحة افتتاح على صفحة فردية، حيث يكون مرسى الرقم الأيمن هو الحافة الأمامية. وفي المستوى الثاني يرقّم numberingTemplate: '{1}.{2}' الأقسام 3.1، 3.2… بلون الشريط؛ ومستوى ثالث مع '{1}.{2}.{3}' سيتابع إلى 3.1.1.
#3 · سمِّ لون الفصل مرة واحدة
const palette = {
ink: '#1b1f23', // text: a cool near-black
band: '#c2562b', // the chapter colour: band, tab, section numbers, references, captions
band2: '#2e6f73', // the second chapter colour, a teal; the sea in Figure 3.1
land: '#d5cbc0', // the crust in the drawings
muted: '#6b6259', // running heads and the colophon
paper: '#ffffff', // type on the band
};
// col(id): a colour linked to its palette entry, with the entry's hex beside the link.
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' } })),
// The engine's defaults link to 'main-color': point it at the band, so nothing prints blue.
{ id: 'main-color', name: 'band (defaults)', value: { hex: palette.band, model: 'hex' } },
];
// {style="teal"} on a heading line swaps 'band' up to the next level-1 heading: the style's
// palette reaches design slots through their link and repaints every text colour equal to
// the base 'band'.
const headingStyles = [{ id: 'teal', palette: { band: palette.band2 } }];
كل لون في الإعدادات مرتبط بأحد هذه المدخلات. والقيم الافتراضية للمحرّك نفسه مرتبطة بـmain-color، فتوجيه هذا المدخل إلى لون الشريط يعيد أيضًا تلوين كل قيمة افتراضية تتركها الإعدادات دون ضبط. سطر عنوان الفصل الرابع، # Fire from \\ Below {style="teal" topic="Volcanoes" lead="…"}، يختار النمط، فيستبدل band حتى عنوان المستوى الأول التالي. تتبع خانات التصميم الاستبدال عبر ارتباطها بلوحة الألوان، ويُعاد تلوين النص الذي يساوي لونه band الأساسي، فتصير علامة الحافة وأرقام الأقسام والقوائم والإحالات وتسمية التعليق ورقم الصفحة السفلي زرقاء مخضرة في الصفحتين 43 و44. ويملأ السطر نفسه {attr.topic} و{attr.lead}، و\\ فيه يكسر {titleText} حيث يريد المؤلف (سمات العنوان، كسر الأسطر في العناوين).
#4 · دع الاستشهاد الأول يضع كل شكل
const figure = (id, placement, caption) => ({ id, typeId: 'figure', kind: 'svg', createdAt: 0,
updatedAt: 0, svg: { fileId: `${id}.svg`, width: ART[id].width, height: ART[id].height },
placement, caption, altText: ALT[id] }); // altText: read aloud in a PDF or HTML edition
const resources = [
// 'auto' may take the citing page's foot, 'top' never can (gotcha: top-float-next-page)
figure('plate-cycle', { position: 'auto', span: 'page' },
t({ en: 'A plate’s life in cross-section: born at a ridge (left), it cools as it drifts away '
+ 'and sinks under a continent; dots mark earthquakes.',
es: 'La vida de una placa, en corte: nace en la dorsal (izquierda), se enfría al alejarse y '
+ 'se hunde bajo el continente; los puntos son terremotos.' })),
figure('two-volcanoes', { position: 'bottom', span: 'page' }, // under the text on a last page
t({ en: 'Two volcanoes in cross-section: a broad shield built of runny basalt flows (left) '
+ 'and a steep stratovolcano of lava and ash layers (right).',
es: 'Dos volcanes en corte: un escudo ancho, de coladas de basalto fluido (izquierda), y un '
+ 'estratovolcán de capas de lava y ceniza (derecha).' })),
];
يرقّم :ref شكله ويضعه في أول موضع شاغر بعد الفقرة التي تستشهد به. الشكل 3.1 مضبوط على auto. يُستشهد به في صفحة الافتتاح والعمودان ما زال فيهما متسع، فيأخذ أسفل تلك الصفحة؛ ولو كان عنصرًا عائمًا top لافتتح الصفحة 42، لأن العنصر العائم لا يصعد أبدًا فوق إحالته. ويُستشهد بالشكل 4.1 في أسفل العمود الثاني من الصفحة 43، حيث لم يعد شريط بعرض الصفحة يتسع، فيرسله bottom إلى الصفحة 44. تلك هي الصفحة الأخيرة من الفصل، وفي الصفحة الأخيرة يرفع المحرّك العناصر العائمة السفلية لتقع تحت آخر أسطر النص مباشرة، بلا فجوة فوقها.
#5 · الترويسات وعلامة الحافة ورقم الصفحة السفلي
const HEAD = 15.5; // mm from the trim to the folio's and the head's baseline: 8.5 above TOP
const INSET = 9; // mm from the folio's edge to the head: room for a three-digit folio
const TAB = { y: 36, w: 9, h: 26 }; // the thumb tab, mm: its top, its width, its height
const tabSize = (w) => ({ width: mm(w), height: mm(TAB.h) });
const baseline = (size) => mm(HEAD - 0.96 * size * PT); // box: 1.2 × size, baseline 0.8 down
const label = { fontFamily: 'Archivo Narrow', fontSize: pt(7.5), fontWeight: 600,
letterSpacing: pt(1.3), textTransform: 'uppercase', color: col('muted') };
const folio = { fontFamily: 'Archivo', fontSize: pt(9), fontWeight: 800, color: col('ink') };
const side = (parity) => { // the fore-edge is a verso's left edge and a recto's right edge
const [edge, s] = parity === 'even' ? ['left', 1] : ['right', -1]; // s: into the page
const at = (to, x, y, size) => ({ anchor: { to, edge: `top-${edge}` },
offset: { x: mm(s * x), y }, ...(size && { size }) });
return [
{ kind: 'text', id: `folio-${parity}`, content: '{pageNumber}', ...folio,
placement: at('page', OUTER, baseline(9)) },
// Textbooks name the chapter on the verso and the section on the recto: {firstMark.h2}
// is the first level-2 heading that starts on the page, or the one in force.
{ kind: 'text', id: `head-${parity}`, content: s > 0 ? '{chapterTitle}' : '{firstMark.h2}',
...label, placement: at('page', OUTER + INSET, baseline(7.5)) },
{ kind: 'box', id: `tab-${parity}`, style: { backgroundColor: col('band') }, // off the trim
placement: at('bleed', 0, mm(BLEED + TAB.y), tabSize(BLEED + TAB.w)) },
{ kind: 'text', id: `tab-no-${parity}`, content: '{chapterNumber}', ...folio, fontSize: pt(13),
color: col('paper'), // design text centres by default: here, on the trimmed tab
placement: at('page', 0, mm(TAB.y), tabSize(TAB.w)) },
].map((element) => ({ ...element, parity, pages: 'body' })); // never on an opener
};
const header = { elements: [...side('even'), ...side('odd')] };
const footer = { elements: [{ kind: 'text', id: 'drop-folio', content: '{pageNumber}',
...folio, color: col('band'), pages: 'opener', // centred by its anchor
placement: { anchor: { to: 'container', edge: 'top' }, offset: { y: mm(10) } } }] };
كل عنصر من عناصر الترويسة يُربط بزاوية عليا من الصفحة ويُرشَّح بـparity، فيقع رقم الصفحة والعلامة دائمًا على الحافة الأمامية. أما صندوق العلامة فيُربط بزاوية النزف ويتسع مع BLEED، فيبقى ممتدًا إلى ما بعد الحافة بعد القص. ويُبقي pages: 'body' هذه العناصر كلها بعيدة عن صفحات الافتتاح، التي تأخذ رقم صفحة سفليًا من التذييل. تذكر الصفحة الزوجية الفصل بـ{chapterTitle}، على سطر واحد، لأن \\ لا يكسر العنوان إلا في صفحة الافتتاح. والكتب المدرسية تذكر القسم عادة في الصفحة الفردية. وتطبعه ترويسة الصفحة الفردية بـ{firstMark.h2}: أول عنوان قسم يبدأ في الصفحة، أو القسم الجاري إن لم يبدأ فيها قسم. ولا يظهر في هذه الصفحات الأربع، لأن صفحتيها الفرديتين كلتيهما صفحتا افتتاح.
#6 · ابدأ الكتاب من الفصل الثالث
const continuation = { pageNumbering: { startAt: 41 }, // an odd folio: page 1 is still a recto
headings: { h1: 2, h2: 0, h3: 0, h4: 0, h5: 0, h6: 0 } }; // the next # is chapter 3
const doc = await buildDocumentWithFonts({ markdown, resources, continuation }, config(),
kitFonts(FONTS));
showPages(doc, { title: t({ en: 'Chapter opener on a full-bleed band',
es: 'Apertura de capítulo sobre banda a sangre' }) });
هذه الصفحات هي الفصلان الثالث والرابع من كتاب أطول، فيأخذ buildDocument كائن continuation فيه العدّادات كما تركها الفصلان الأول والثاني. ومع h1: 2 في headings الخاص به، يكون # التالي الفصل الثالث: يطبع {chapterNumber} الرقم 3، وتُرقَّم الأقسام من 3.1، ويصير الشكل الأول 3.1. ويبدأ pageNumbering.startAt: 41 أرقام الصفحات من 41. وتبقى الصفحة الأولى فردية أيًّا كان رقمها، لأن الزوجية تُحسب على الصفحة الفعلية وpageIndexOffset متروك على 0؛ والرقم الأول، 41، فردي ليتوافق معها.
الوصفة كاملة
// ═══ Postext Cookbook · Nº 003 · Chapter opener on a full-bleed band ══════════════
// https://postext.dev/en/cookbook/chapter-opener-bleed-band
// Code: MIT · Text: original (CC BY 4.0) · Drawings: generated in code (CC BY 4.0)
// Fonts: Roboto Serif, Archivo, Archivo Narrow (SIL OFL 1.1) · Needs postext ≥ 1.57.0
// Two chapters of a geology textbook. Every level-1 heading becomes a colour band bled off the
// top of the page, its number standing on the band's foot; a heading style recolours chapter 4.
import {
buildDocumentWithFonts, renderPageToCanvas, registerResourceImage,
} from 'https://esm.sh/postext';
const LANG = 'en'; // @lang: the language of the sample document ('en' | 'es')
const RECIPE = 'chapter-opener-bleed-band';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: semantic colours, and the style that swaps a chapter's
const palette = {
ink: '#1b1f23', // text: a cool near-black
band: '#c2562b', // the chapter colour: band, tab, section numbers, references, captions
band2: '#2e6f73', // the second chapter colour, a teal; the sea in Figure 3.1
land: '#d5cbc0', // the crust in the drawings
muted: '#6b6259', // running heads and the colophon
paper: '#ffffff', // type on the band
};
// col(id): a colour linked to its palette entry, with the entry's hex beside the link.
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' } })),
// The engine's defaults link to 'main-color': point it at the band, so nothing prints blue.
{ id: 'main-color', name: 'band (defaults)', value: { hex: palette.band, model: 'hex' } },
];
// {style="teal"} on a heading line swaps 'band' up to the next level-1 heading: the style's
// palette reaches design slots through their link and repaints every text colour equal to
// the base 'band'.
const headingStyles = [{ id: 'teal', palette: { band: palette.band2 } }];
// #endregion
// #region answer: the opener: a bleed band, the numeral on its foot, texts from the heading
const TOP = 24; // top margin, mm: the opener's container starts here
const OUTER = 16; // outer margin, mm: the numeral and the folios line up on it
const BLEED = 0; // mm: 0 on screen; about 3 for print, which also switches on page.cutLines
const BAND = 100; // mm from the trim to the foot of the band
const NUMERAL = 168; // pt; the baseline of a design text sits 0.8 down its line box
const PT = 25.4 / 72; // mm in a point
const AIR = 12; // mm, foot to text: ≥ 0.2 × NUMERAL × PT ≈ 11.9, the numeral box below its baseline
const BEARING = 2; // mm past the text edge: a rough optical nudge, as each digit's bearing differs
const bleedTop = { to: 'bleed', edge: 'top-left' }; // the trim's corner, pushed out by BLEED
// Design text centres by default; in a heading design it wraps by default too.
const onBand = { color: col('paper'), align: 'left' };
يعمل ملف script.js المجمّع كما هو: الصقه في سكربت الوحدة (module) لأي صفحة، أو افتح الوصفة على CodePen. مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)
تنويعات
#اجعل الشريط أعمق
يحدد BAND عمق الشريط وموضع الرقم والارتفاع المحجوز فوق النص. الشريط الأعمق يدفع النص إلى الصفحة التالية، فأعد ضبط طول كل فصل (انظر آخر الأخطاء الشائعة) أو دع الفصول تتوالى.
-const BAND = 100; // mm from the trim to the foot of the band
+const BAND = 128; // mm from the trim to the foot of the band#اطبعه مع النزف
مع نزف 3 مم، يتجاوز الشريط وقاعدته والعلامة حدّ القص بمقدار 3 مم، ويبقى الرقم على القاعدة، ويُفعَّل page.cutLines بالقيمة نفسها.
-const BLEED = 0; // mm: 0 on screen; about 3 for print, which also switches on page.cutLines
+const BLEED = 3; // mm: 0 on screen; about 3 for print, which also switches on page.cutLines#أضف لونًا لفصل آخر
كل لون فصل مدخل إضافي في لوحة الألوان ونمط إضافي؛ اكتب {style="slate"} في سطر عنوان ذلك الفصل.
band2: '#2e6f73', // the second chapter colour, a teal; the sea in Figure 3.1
+ band3: '#3d4f6b', // a third chapter colour, a slate blue
@@
-const headingStyles = [{ id: 'teal', palette: { band: palette.band2 } }];
+const headingStyles = [{ id: 'teal', palette: { band: palette.band2 } },
+ { id: 'slate', palette: { band: palette.band3 } }];#دع الفصول تتوالى
مع 'any' يُفتتح الفصل في الصفحة التالية. فبعد فصل ينتهي في صفحة فردية يُفتتح في الصفحة الزوجية، بلا صفحة بيضاء قبله، ويقف رقمه بجوار الكعب، لأنه معلّق بالحافة اليمنى للصفحة. وتبقى هذه الصفحات كما هي، إذ ينتهي الفصل الثالث أصلًا في صفحة زوجية.
- { level: 1, span: 'page', breakBefore: { enabled: true, parity: 'odd' },
+ { level: 1, span: 'page', breakBefore: { enabled: true, parity: 'any' },أخطاء شائعة
خطأ شائع
تحجز الافتتاحية ارتفاعًا يصل إلى أدنى عناصرها المثبّتة على الصفحة
تحجز الافتتاحية ذات التصميم المتقدّم ارتفاع أدنى عناصرها، وتُحتسب كذلك العناصر المثبّتة على الصفحة أو على النزف تحت العنوان، فالزخرفة في أسفل الصفحة تدفع النص إلى الصفحة التالية. أعطِ مثل هذا العنصر reserve: false (منذ postext 1.5): يُرسَم حيث ثُبّت ولا يحجز شيئًا. أما العناصر التي تتبع الشريط نفسه (المثبّتة على أسفله، أو التي ارتفاعها 'fill') فلا تحدّد ارتفاعه أبدًا. صفحات افتتاح مصمَّمة →
خطأ شائع
قيم السمات: لا { ولا }؛ ضع القيمة التي فيها " بين علامتي اقتباس مفردتين
تنتهي قيمة السمة عند القوس المعقوف الختامي، فلا يمكن أن تحتوي { أو }. القيمة التي فيها علامة اقتباس مزدوجة توضع بين علامتي اقتباس مفردتين؛ أما علامة الدولار فلا مشكلة فيها. سمات العنوان →
خطأ شائع
العنصر العائم 'top' يذهب إلى الصفحة التالية لإحالته ما لم يُسمح له بتصدر صفحة الإحالة
افتراضيًا لا يصعد العنصر العائم أبدًا فوق الإحالة إليه، فالعنصر العائم 'top' الممتد بعرض الصفحة والمُحال إليه في الصفحة N يفتتح الصفحة N+1. اضبط placement.citingPage: true على المورد أو على defaultPlacement لنوعه (أو layout.floatsAtCitingPage للكتاب كله، منذ postext 1.25) فيتصدر الصفحة N بدلًا من ذلك، وينزل النص الذي فوق الإحالة تحته، إذا اتسع له المكان في حدود layout.maxTopFraction وبقي سطر الإحالة في تلك الصفحة. ولا يتصدر أبدًا الصفحة الأولى من فصل ولا صفحة بعد فاصل قسري: فهناك يظل يفتتح الصفحة التالية، ويمكن للموضع 'auto' أو 'bottom' أن يشغل أسفل صفحة الإحالة. موضع الأشكال →
- للشريط ارتفاع ثابت، بينما يتعلق السطر التمهيدي والعنوان والمقدمة بالهامش العلوي وتنمو إلى الأسفل، فالمقدمة الأطول أو العنوان ذو الأسطر الثلاثة يصطدم بالقاعدة. أبقِ المقدمات في حدود خمسة أسطر، كما تفعل الطبعتان، أو اشتقّ
BANDمن أطول صفحة افتتاح. - صيغة
yالخاصة بالرقم تفترضlineHeight: 1. يقع خط أساس نص التصميم عند 0.8 من ارتفاع مستطيل سطره، ولا يساوي0.8 * NUMERALهذه المسافة إلا حين يكون المستطيل بطول الحرف. غيّر ارتفاع السطر أو موضع الربط، وعليك أن تغيّر الصيغة معه. ويُضبطBEARINGبالعين، لأن لكل رقم فراغه الجانبي الخاص (هنا ينتهي الرقمان 3 و4 بفارق 0.8 مم). - لوحة النمط تعيد تلوين عناصر التصميم والنص. أما الصورة فتحتفظ بالألوان التي رُسمت بها: الشكل 4.1 أزرق مخضر لأن الشيفرة ترسمه من
band2، والشكل المرسوم بلون الطين المحروق إن وُضع في الفصل الرابع يبقى بلونه. - مع
parity: 'odd'، الفصل الذي يتجاوز صفحته الأخيرة ببضعة أسطر يترك صفحة شبه فارغة وصفحة زوجية بيضاء قبل صفحة الافتتاح التالية. اضبط طول النص، كما تفعل الطبعتان هنا، وافحص الصفحة الأخيرة من كل فصل كلما تغيّر النص أوBAND.
الحقوق
- الوصفة
- Ignacio Ferro
- النص
- نص أصلي, CC BY 4.0
- الخطوط
- Roboto Serif (SIL OFL 1.1) · Archivo (SIL OFL 1.1) · Archivo Narrow (SIL OFL 1.1)
- الشيفرة
- MIT، مثل Postext
حرّر هذا الشرح ↗ (يفتح في تبويب جديد)مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)


