باختصار
كتاب مقالات لمؤلفين مختلفين. تُظهر كل مقالة اسم كاتبها تحت العنوان، وتنتهي بقائمة مراجعها الخاصة، كما تفعل الكتب الجماعية.
ما الذي ستنضده
The Working Page، مجموعة صغيرة من المقالات في تاريخ الطباعة، حرّرها باحثان وكتبها ثلاثة. تصل كل مقالة من صاحبها ملف Markdown فيه كتلة BibTeX خاصة به، وهكذا يحفظها الكتاب: مجلد بمقاس 155 × 235 مم بخط Libre Caslon، وصفحة عنوان حمراء، وفصول تبدأ برقم وعنوان واسم المساهم. ويُختم كل فصل بقائمة References خاصة به بنمط Chicago للمؤلف والسنة، لا تضم إلا الأعمال التي تستشهد بها تلك المقالة. يستشهد مساهمان بكتاب Eisenstein Printing Press as an Agent of Change، فيظهر في قائمتيهما كلتيهما؛ ويتكرر الأمر مع كتاب Gaskell New Introduction to Bibliography في الفصلين 1 و3.
تجيب هذه الوصفة عن
- كيف أعطي كل فصل من كتاب جماعي مؤلفه وقائمة مراجعه الخاصة؟
- كيف أستشهد بالأعمال وأبني قائمة المراجع بأسلوب APA أو IEEE أو أسلوب استشهاد آخر؟
الجواب المختصر
// Citations are [@key] in the text; each contributor's BibTeX goes in a :::references block
// in their own chapter. Register the engine once, before the first build.
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = {
style: 'chicago-author-date', // the humanities' author-date: (Eisenstein 1979)
bibliography: {
// 'chapter': a :::bibliography lists the works its own document cites, so a work two
// contributors cite appears in both lists. 'book' (the default) would print one list,
// after the last chapter. The scope is per document, not per H1: each essay must be a
// document of its own in buildBundle (see the chapters region).
scope: 'chapter',
title: '', // no bold title paragraph: each chapter has its own ## References heading
fontSize: em(0.9), lineHeight: pt(12.4), hangingIndent: mm(5), entrySpacing: pt(2.6),
},
};
// Numbering and disambiguation still see the whole book: two Smiths of 2001 in different
// chapters would print 2001a and 2001b, as one bibliography would.
المكونات
- الميزات
- قائمة المراجع من البيانات المرجعيةالاستشهادات بأسلوب توثيقكتب تُبنى فصلًا فصلًاسمات العنوانصفحات افتتاح مصمَّمةجدول المحتوياتالترويسات وأرقام الصفحاتالترويسات بحسب دور الصفحةأنماط العناوينفصول بلا أرقامالأغلفة وصفحات العنوان وبيانات النشرتثبيت عناصر التصميمإطارات عائمةهوامش متناظرةلوحة ألوان دلاليةالتصدير إلى PDF
- الخطوط
- Libre Caslon Text, Libre Caslon Display, IBM Plex Sans Condensed (SIL OFL 1.1)
- الأصول
- لا شيء: كل صورة مرسومة بالشيفرة
طريقة التحضير
#1 · مستند لكل مساهم
// A chapter's :::bibliography lists what that document cites; one Markdown file holding all
// three essays would make every list repeat the works of the chapters before it.
const chapters = [front, lowe, okafor, ferrer].map((markdown) => ({ markdown }));
const book = () => buildBundle({ chapters, config: config(), resources: [] });
النطاق في الجواب المختصر هو نطاق المستند. يُخرج buildBundle المستندات الأربعة كتابًا واحدًا، فتتواصل أرقام الصفحات وأرقام الفصول والمحتويات، بينما يجمع كل :::bibliography استشهادات ملفه. وتبقى المراجع حيث كتبها المساهم: المفتاح المعرَّف في أي فصل يسري على الكتاب كله، فكان مدخل مشترك واحد سيكفي، لكن الفصول المكتفية بذاتها يمكن تبديلها أو إعادة ترتيبها دون أن تنكسر قائمة مقالة أخرى.
#2 · اسم الكاتب سمة على العنوان
// # The Compositor's Day {author="Margaret Lowe" short="The Compositor's Day"}
const byline = text('byline', '{attr.author}', { fontFamily: TEXT, italic: true,
fontSize: pt(12), color: col('ink'), align: 'left' }, below('title', 4));
const versoAuthor = head('verso-author', '{attr.author}', 'even',
at('page', 'top-left', MARGIN.outer + 8, 13)); // in the running head
const tocAuthor = { enabled: true, attr: 'author', fontFamily: TEXT, fontSize: pt(9.5),
color: col('muted') }; // a line under each title in the contents (italic by default)
في عنوان كل مقالة author="…" وعنوان مختصر short="…" للترويسة. تطبع صفحة الافتتاح اسم الكاتب تحت العنوان، وتذكر ترويسة الصفحة الزوجية كاتب المقالة التي تنتمي إليها الصفحة، وتطبع المحتويات الاسم سطرًا تحت كل مدخل. ولا شيء في الصفحات التمهيدية للكتاب يسرد المساهمين مرتين.
#3 · صفحة الافتتاح
// Nine lines of reserve and a line of margin under them (the level's marginBottom): ten
// lines, 48 mm, under a one-line title. A two-line title reaches past the reserve, and the
// margin then carries the text a line lower, clear of the rule.
const opener = { enabled: true, minHeight: pt(LEAD * 9), slot: { elements: [
text('kicker', t({ en: 'Chapter {number}', es: 'Capítulo {number}' }), { ...label,
fontSize: pt(8.5), letterSpacing: pt(1.7), color: col('accent') },
at('container', 'top-left', 0, 4)),
text('title', '{titleText}', { fontFamily: DISPLAY, fontSize: pt(28), lineHeight: 1.08,
color: col('ink'), align: 'left', overflow: 'wrap' }, below('kicker', 3, { width: 'fill' })),
byline,
{ kind: 'rule', id: 'rule', direction: 'horizontal', thickness: pt(1.2), color: col('accent'),
placement: { ...below('byline', 6), size: { width: mm(16) } } },
] } };
يتراصّ العنوان التمهيدي والعنوان واسم الكاتب من أعلى منطقة النص، كل منها مربوط تحت سابقه، فالعنوان ذو السطرين، كعنوان الفصل 3، يدفع اسم الكاتب والخط معه إلى الأسفل. ويُنزل الحجزُ النصَّ 48 مم، أي عشرة أسطر، تحت عنوان من سطر واحد؛ والعنوان ذو السطرين يأخذ سطرًا إضافيًا، فلا يلامس الخط النص ويبدأ الفصل 3 أدنى بسطر من الفصلين الآخرين.
#4 · ترويسات لكتاب متعدد المؤلفين
function head(id, content, parity, placement, look = {}) { // hoisted: the byline uses it
return { ...text(id, content, { ...label, fontWeight: 500, fontSize: pt(7.5),
letterSpacing: pt(1.1), color: col('muted'), ...look }, placement), parity, pages: 'body' };
}
const folio = { fontWeight: 600, color: col('ink') };
const header = { elements: [
head('verso-folio', '{pageNumber}', 'even', at('page', 'top-left', MARGIN.outer, 13), folio),
versoAuthor,
head('recto-title', '{attr.short}', 'odd', at('page', 'top-right', -(MARGIN.outer + 8), 13),
{ align: 'right' }),
head('recto-folio', '{pageNumber}', 'odd', at('page', 'top-right', -MARGIN.outer, 13),
{ ...folio, align: 'right' }),
] };
const footer = { elements: [{ ...head('drop-folio', '{pageNumber}', 'all',
at('container', 'top', 0, 9), { ...folio, align: 'center' }), pages: 'opener' }] };
يذكر الكتاب الجماعي المساهم في الصفحة الزوجية والفصل في الفردية، حيث يطبع الكتاب ذو المؤلف الواحد عنوان الكتاب والفصل. والترويسات مقصورة بالترشيح على pages: 'body'، فليس في صفحات الافتتاح إلا رقم صفحة في أسفلها.
#5 · الصفحات التمهيدية
const bare = { numbered: false, toc: false, header: { elements: [] }, footer: { elements: [] } };
const cover = { enabled: true, slot: { elements: [
{ kind: 'box', id: 'field', style: { backgroundColor: col('accent') },
placement: { ...at('bleed', 'top-left'), size: { width: 'fill', height: mm(150) } } },
text('title', '{titleText}', { fontFamily: DISPLAY, fontSize: pt(58), lineHeight: 1,
color: col('paper'), align: 'left', overflow: 'wrap' },
{ ...at('page', 'top-left', MARGIN.inner, 64), size: { width: mm(118) } }),
text('subtitle', '{subtitle}', { fontFamily: TEXT, italic: true, fontSize: pt(15),
color: col('paper'), align: 'left' }, below('title', 5)),
text('editors', '{attr.editors}', { ...label, fontSize: pt(9), letterSpacing: pt(1.8),
color: col('accent') }, at('page', 'top-left', MARGIN.inner, 162)),
text('contributors', '{attr.contributors}', { fontFamily: TEXT, italic: true, fontSize: pt(12),
color: col('ink'), align: 'left' }, below('editors', 3)),
text('imprint', '{attr.imprint}', { ...label, fontWeight: 500, fontSize: pt(7.5),
letterSpacing: pt(1.5), color: col('muted') }, at('page', 'bottom-left', MARGIN.inner, -16)),
] } };
const contentsOpener = { enabled: true, minHeight: mm(40), slot: { elements: [
text('kicker', '{title}', { ...label, fontSize: pt(8.5), letterSpacing: pt(1.7),
color: col('accent') }, at('container', 'top-left', 0, 4)),
text('title', '{titleText}', { fontFamily: DISPLAY, fontSize: pt(28), color: col('ink'),
align: 'left' }, below('kicker', 3)),
] } };
const contents = {
levels: [{ level: 1, fontFamily: TEXT, fontSize: pt(12.5), lineHeight: pt(LEAD),
numberFontFamily: LABEL, numberFontSize: pt(10), numberFontWeight: 600,
numberColor: col('accent'), numberWidth: mm(6), numberGap: mm(3), marginBottom: pt(LEAD) }],
pageNumber: { fontFamily: LABEL, fontSize: pt(9), fontWeight: 600, color: col('ink'),
width: mm(7) },
leader: { char: '. ', gap: mm(2) },
subtitle: tocAuthor,
};
صفحة العنوان والمحتويات عنوانان غير مرقّمين في المستند الأول، بلا ترويسات ولا مدخل في المحتويات. يقرأ تصميماهما {title} و{subtitle} من البيانات التمهيدية، ويقرآن المحرّرين والمساهمين من سمات العنوان نفسه.
الوصفة كاملة
// ═══ Postext Cookbook · Nº 098 · An edited volume with a bibliography per chapter ═════
// https://postext.dev/en/cookbook/edited-volume-chapter-bibliographies
// Code: MIT · Text: original (CC BY 4.0) · Pictures: none
// Fonts: Libre Caslon Text & Display, IBM Plex Sans Condensed (OFL 1.1) · Needs postext ≥ 1.28.0
// Three essays by three contributors, each a Markdown document of its own with its own
// BibTeX block, laid out by buildBundle as one volume: every chapter closes on its own list.
import {
buildBundle, prepareFonts, withLoadedFonts, renderPageToCanvas, registerCitationEngine,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
import { createCiteprocEngine, STYLES, LOCALES } from 'https://esm.sh/postext-citeproc';
const LANG = 'en'; // @lang: the language of the sample document ('en' | 'es')
const RECIPE = 'edited-volume-chapter-bibliographies';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: printer's red on a warm paper, the rest in ink
const palette = {
ink: '#211c19', // text: a warm near-black
accent: '#8e2b1f', // printer's red: the cover field, kickers, the references heading
rule: '#cdbfb2', // hairlines
muted: '#6b5f57', // running heads, the contents' contributors, the colophon
paper: '#fcfaf6', // the page, and the type on the red field
};
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.accent })
.map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));
// #endregion
const TEXT = 'Libre Caslon Text', DISPLAY = 'Libre Caslon Display';
const LABEL = 'IBM Plex Sans Condensed';
const MARGIN = { top: 23, bottom: 22, inner: 20, outer: 18 }; // mm, mirrored
const LEAD = 13.8; // body leading in pt: the baseline grid
const label = { fontFamily: LABEL, fontWeight: 600, textTransform: 'uppercase', align: 'left' };
const at = (to, edge, x = 0, y = 0) => ({ anchor: { to, edge }, offset: { x: mm(x), y: mm(y) } });
const below = (id, y, size) => ({ ...at(`#${id}`, 'below', 0, y), ...(size && { size }) });
const text = (id, content, look, placement) => ({ kind: 'text', id, content, ...look, placement });
// #region answer: one list per chapter: scope 'chapter' over a book of separate documents
// Citations are [@key] in the text; each contributor's BibTeX goes in a :::references block
// in their own chapter. Register the engine once, before the first build.
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = {
style: 'chicago-author-date', // the humanities' author-date: (Eisenstein 1979)
bibliography: {
// 'chapter': a :::bibliography lists the works its own document cites, so a work two
// contributors cite appears in both lists. 'book' (the default) would print one list,
// after the last chapter. The scope is per document, not per H1: each essay must be a
// document of its own in buildBundle (see the chapters region).
يعمل ملف script.js المجمّع كما هو: الصقه في سكربت الوحدة (module) لأي صفحة، أو افتح الوصفة على CodePen. مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)
تنويعات
#قائمة واحدة للكتاب كله
يجمع بعض الناشرين كل الأعمال في قائمة مراجع واحدة في آخر الكتاب. غيّر النطاق واحذف عناوين ## References الثلاثة؛ فتأتي القائمة بعد الفصل الأخير.
- scope: 'chapter',
- title: '', // no bold title paragraph: each chapter has its own ## References heading
+ scope: 'book',
+ title: 'Bibliography',#استشهد بنمط APA بدلًا من ذلك
الكتاب في العلوم الاجتماعية يغيّر النمط ولا شيء غيره.
- style: 'chicago-author-date', // the humanities' author-date: (Eisenstein 1979)
+ style: 'apa',أخطاء شائعة
خطأ شائع
المفتاح المعرَّف مرتين يحتفظ بمُدخله الأول، دون تنبيه
المراجع تُحتسب للكتاب كله: المفتاح المكتوب في فصلين يحتفظ بالتعريف الأول ويُتجاهَل الثاني دون تحذير. في كتاب متعدد المؤلفين، أضف بادئة إلى مفاتيح كل مساهم. قائمة المراجع من البيانات المرجعية →
خطأ شائع
قيم السمات: لا { ولا }؛ ضع القيمة التي فيها " بين علامتي اقتباس مفردتين
تنتهي قيمة السمة عند القوس المعقوف الختامي، فلا يمكن أن تحتوي { أو }. القيمة التي فيها علامة اقتباس مزدوجة توضع بين علامتي اقتباس مفردتين؛ أما علامة الدولار فلا مشكلة فيها. سمات العنوان →
خطأ شائع
يرث نمط العنوان فاصل الصفحة من مستواه
يأخذ مُدخل headingStyles كل حقل يتركه من مستوى عنوانه، بما فيه breakBefore. فصفحة المحتويات أو صفحة بيانات النشر المنسّقة على H1 بعد :::pagebreak ترث الزوجية 'odd' وتقع بعد صفحة فارغة. أعطِ هذا النمط breakBefore: { enabled: false }. أنماط العناوين →
- يسرد
scope: 'chapter'ما يستشهد به المستند قبل:::bibliography، لا ما يستشهد به قسم H1 الخاص به. فإذا وُضعت المقالات كلها في ملف Markdown واحد، كررت القائمة الثانية أعمال المقالة الأولى، وكررت الثالثة أعمال الاثنتين. - أول تعريف للمفتاح هو الذي يسري في الكتاب كله. فإذا استعمل مساهمان كلاهما
smith2001لعملين مختلفين، استشهدت المقالة اللاحقة بكتاب المساهم الأسبق دون أي تحذير: أضف إلى مفاتيح كل مساهم بادئة، أو قابل القوائم بالمخطوطات. - يجري التمييز بين الأعمال المتشابهة على مستوى الكتاب كله. فعملان مختلفان لـSmith من سنة 2001 في فصلين مختلفين قد يُطبعان 2001a و2001b، حتى لو لم تضم قائمة الفصل إلا واحدًا منهما.
- العنوان الفرعي الذي يفتتح صفحة يفقد افتراضيًا المسافة التي فوقه كلها، فيضع الانضباط على الشبكة تحته جزء السطر الذي يحتاج إليه: فيبتعد Whose letters في رأس الصفحة 10 عن نصه أكثر مما يبتعد What the reader sees في أسفل الصفحة نفسها. يُبقي
headings.columnHeadSpace: 'remainder'هذا الجزء من السطر فوق العنوان الفرعي (العناوين). وهو يناسب كتابًا بعمود واحد، حيث لا عمود مجاور يُظهر أن العنوان الفرعي يبدأ أدنى قليلًا.
الحقوق
- الوصفة
- Ignacio Ferro
- النص
- نص أصلي, CC BY 4.0
- الخطوط
- Libre Caslon Text (SIL OFL 1.1) · Libre Caslon Display (SIL OFL 1.1) · IBM Plex Sans Condensed (SIL OFL 1.1)
- الشيفرة
- MIT، مثل Postext
حرّر هذا الشرح ↗ (يفتح في تبويب جديد)مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)


