باختصار
قائمة قراءات لحلقة دراسية جامعية. يلصق المدرّس الملف الذي يصدّره Zotero، فيطبع Postext الاستشهادات وقائمة تضم أيضًا كتبًا لا يذكرها النص.
ما الذي ستنضده
قائمة قراءات لحلقة دراسية مدتها ستة أسابيع في تاريخ العلم وعلم اجتماعه، منضّدة على صفحة بمقاس 210 × 280 مم في عمودين. تشغل مساحة خضراء داكنة النصف الأعلى من الصفحة الأولى، وفيها عنوان المقرر بخط Spectral Light بحجم 50 نقطة؛ والنص تحتها دليل منسّق الحلقة إلى كل أسبوع. المراجع هي مجموعة الحلقة في Zotero، مصدَّرة بصيغة BibTeX وملصوقة في المستند من غير المساس بأي سطر: مفاتيح الاستشهاد التي صنعها Zotero، والأقواس المعقوفة حول الحروف الكبيرة، وتشكيلات {\"o}، وmonth = dec، والحقول file وkeywords وurldate. يستشهد النص بثمانية من الأعمال. أما الخمسة الأخرى، وهي قراءات خلفية لا تناقشها الحلقة، فتصل إلى القائمة عبر nocite.
تجيب هذه الوصفة عن
- كيف أستعمل ملف BibTeX مصدَّرًا من Zotero وأدرج أعمالًا لا يستشهد بها النص؟
- كيف أستشهد بالأعمال وأبني قائمة المراجع بأسلوب APA أو IEEE أو أسلوب استشهاد آخر؟
الجواب المختصر
// The works come from a :::references{format=bibtex} block: the Zotero export pasted as it
// is. The text cites some of them; `nocite` in the front matter adds the rest by key, and
// `nocite: "@*"` would add the whole export. citeproc-js writes both in the style named.
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = {
style: 'chicago-author-date', // '(Gieryn 1983)', 'Shapin and Schaffer (1985)'
link: true, // a citation jumps to its entry
bibliography: {
// includeUncited: true is the same as nocite: "@*", set from the design side.
fontSize: em(0.94), lineHeight: pt(12.4), hangingIndent: mm(5), entrySpacing: pt(3.5),
doi: 'link', // Zotero's doi field prints as https://doi.org/…; its url field is dropped
},
};
المكونات
- الميزات
- قائمة المراجع من البيانات المرجعيةالاستشهادات بأسلوب توثيقصفحات افتتاح مصمَّمةسمات العنوانعمود واحد أو عمودانالترويسات وأرقام الصفحاتأنماط الفقراتلوحة ألوان دلالية
- تستخدم أيضًا
- شريط فصل بعرض الصفحةالترويسات بحسب دور الصفحة
- الخطوط
- Spectral, IBM Plex Sans Condensed (SIL OFL 1.1)
- الأصول
- لا شيء: كل صورة مرسومة بالشيفرة
طريقة التحضير
#1 · سمِّ الأسلوب مرة واحدة
الشيفرة هي الجواب المختصر أعلاه. يُسجَّل محرّك الاستشهاد قبل البناء الأول، والأسلوب إعداد واحد: يكتب أسلوب Chicago مؤلف-تاريخ «(Shapin 1984)» مقابل [@shapin_pump_1984]، و«Shapin and Schaffer (1985)» مقابل @shapin_leviathan_1985 داخل الجملة. المفاتيح هي التي بناها Zotero من المؤلف الأول وأول كلمة ذات معنى في العنوان والسنة، فيحتفظ gieryn_boundary-work_1983 بواصلته؛ ويقرأ Postext الواصلة أو الشرطة السفلية داخل المفتاح جزءًا منه.
#2 · الصق الملف المصدَّر كما يكتبه Zotero
آخر كتلة في المستند فيها الملف المصدَّر، مدخلًا لكل عمل، بإزاحة بمفتاح الجدولة كما يكتبه Zotero:
@article{gieryn_boundary-work_1983,
title = {Boundary-{Work} and the {Demarcation} of {Science} from {Non}-{Science}: …},
url = {https://www.jstor.org/stable/2095325},
doi = {10.2307/2095325},
urldate = {2026-08-21},
journal = {American Sociological Review},
author = {Gieryn, Thomas F.},
month = dec,
year = {1983},
keywords = {demarcation, week 4},
pages = {781--795},
file = {JSTOR Full Text PDF:/Users/hps214/Zotero/storage/2HJ8M6PA/Gieryn - 1983 - ….pdf:application/pdf},
}يُسقط القارئ الأقواس المعقوفة التي تحمي الحروف الكبيرة، ويركّب {\"o} و{\'e} إلى ö وé، ويحوّل -- إلى شرطة متوسطة، ويقرأ month = dec اسم شهر مجردًا. ويصير urldate تاريخ الاطلاع، وlanguage لغة المادة؛ أما file وkeywords وabstract وshorttitle فيتخطاها، فلا يصل إلى الصفحة شيء من قرصك الصلب.
#3 · أدخِل الأعمال التي لا يستشهد بها النص
تسردها البيانات التمهيدية بمفاتيحها:
---
title: "Science as a Social Practice"
nocite: "@fleck_genesis_1979, @merton_sociology_1973, @latour_science_1987, @rheinberger_toward_1997, @lopez_pinero_ciencia_1979"
---تضم القائمة كل عمل مستشهَد به مع هذه الخمسة، مرتبة معًا بحسب المؤلف كما يطلب أسلوب Chicago؛ ولا شيء يميّز مدخلًا بأنه غير مستشهَد به. يُدرج nocite: "@*" الملف المصدَّر كله، ويفعل bibliography.includeUncited: true الشيء نفسه من الإعدادات، لتصميم يطبع المكتبة كلها دائمًا.
#4 · مساحة خضراء للبطاقة
const BAND = 132; // mm from the trim's top to the band's foot
const onBand = { color: col('paper'), align: 'left', overflow: 'wrap' };
const opener = {
enabled: true,
minHeight: mm(BAND - TOP + 9), // the columns start 9 mm under the band
slot: { elements: [
{ kind: 'box', id: 'band', style: { backgroundColor: col('accent') },
placement: { anchor: { to: 'page', edge: 'top-left' },
size: { width: 'fill', height: mm(BAND) } } },
{ kind: 'text', id: 'kicker', content: '{attr.kicker}', ...onBand, fontFamily: LABEL,
fontSize: pt(8.5), fontWeight: 600, letterSpacing: pt(1.7), textTransform: 'uppercase',
placement: { anchor: { to: 'container', edge: 'top-left' }, offset: { y: mm(14) } } },
{ kind: 'text', id: 'title', content: '{titleText}', ...onBand, fontFamily: TEXT,
fontSize: pt(50), fontWeight: 300, lineHeight: 1.02,
placement: { anchor: { to: '#kicker', edge: 'below' }, offset: { y: mm(7) },
size: { width: mm(150), height: 'auto' } } },
{ kind: 'rule', id: 'rule', direction: 'horizontal', thickness: pt(1), color: col('tint'),
placement: { anchor: { to: '#title', edge: 'below' }, offset: { y: mm(7) },
size: { width: mm(18) } } },
{ kind: 'text', id: 'lead', content: '{attr.lead}', ...onBand, fontFamily: TEXT,
italic: true, fontSize: pt(13), lineHeight: 1.3, color: col('tint'),
placement: { anchor: { to: '#rule', edge: 'below' }, offset: { y: mm(6) },
size: { width: mm(128), height: 'auto' } } },
] },
};
الشريط إطار مربوط بحدّ القص، بعمق 132 مم، ويبدأ العمودان تحته بـ9 مم. والعنوان والخط والمقدمة مسلسلة بمواضع ربط من نوع below، فيدفع عنوانُ مقرر أطول المقدمةَ إلى الأسفل بدل أن يصطدم بها.
const palette = {
ink: '#1c211f', accent: '#2d5b48', tint: '#dfe9e2', rule: '#c3cdc6', muted: '#5c6862',
paper: '#ffffff',
};
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' } }));
الوصفة كاملة
// ═══ Postext Cookbook · Nº 097 · A reading list from a Zotero BibTeX export ═══════
// https://postext.dev/en/cookbook/zotero-bibtex-nocite
// Code: MIT · Text: original (CC BY 4.0) · Pictures: none
// Fonts: Spectral, IBM Plex Sans Condensed (SIL OFL 1.1) · Needs postext ≥ 1.65.0
import {
buildDocumentWithFonts, renderPageToCanvas, registerCitationEngine,
} from 'https://esm.sh/postext';
import { createCiteprocEngine, STYLES, LOCALES } from 'https://esm.sh/postext-citeproc';
const LANG = 'en'; // @lang: the language of the sample document ('en' | 'es')
const RECIPE = 'zotero-bibtex-nocite';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: a department green, one tint, everything else in ink
const palette = {
ink: '#1c211f', accent: '#2d5b48', tint: '#dfe9e2', rule: '#c3cdc6', muted: '#5c6862',
paper: '#ffffff',
};
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, LABEL] = ['Spectral', 'IBM Plex Sans Condensed'];
const LEAD = 13.4; // pt
const [TOP, OUTER] = [24, 18]; // mm
// #region answer: Chicago author-date, and a list that holds more than the text cites
// The works come from a :::references{format=bibtex} block: the Zotero export pasted as it
// is. The text cites some of them; `nocite` in the front matter adds the rest by key, and
// `nocite: "@*"` would add the whole export. citeproc-js writes both in the style named.
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = {
style: 'chicago-author-date', // '(Gieryn 1983)', 'Shapin and Schaffer (1985)'
link: true, // a citation jumps to its entry
bibliography: {
// includeUncited: true is the same as nocite: "@*", set from the design side.
fontSize: em(0.94), lineHeight: pt(12.4), hangingIndent: mm(5), entrySpacing: pt(3.5),
doi: 'link', // Zotero's doi field prints as https://doi.org/…; its url field is dropped
},
};
// #endregion
// #region opener: a green field over the top half, the course in white on it
const BAND = 132; // mm from the trim's top to the band's foot
const onBand = { color: col('paper'), align: 'left', overflow: 'wrap' };
const opener = {
enabled: true,
minHeight: mm(BAND - TOP + 9), // the columns start 9 mm under the band
يعمل ملف script.js المجمّع كما هو: الصقه في سكربت الوحدة (module) لأي صفحة، أو افتح الوصفة على CodePen. مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)
تنويعات
#أدرج مجموعة Zotero كاملة
حين يكون الملف المصدَّر هو القائمة نفسها، استغنِ عن المفاتيح: يُطبع كل مدخل في الكتلة، مستشهَدًا به أو لا.
-nocite: "@fleck_genesis_1979, @merton_sociology_1973, @latour_science_1987, …"
+nocite: "@*"#غيّر الأسلوب
المفاتيح نفسها تُنتج قائمة بأسلوب Harvard (Cite Them Right) من غير أي تغيير آخر.
- style: 'chicago-author-date', // '(Gieryn 1983)', 'Shapin and Schaffer (1985)'
+ style: 'harvard-cite-them-right',أخطاء شائعة
خطأ شائع
مفتاح nocite الذي لا يطابق شيئًا يُحذف دون تنبيه
المفتاح المُستشهَد به دون مرجع يرفع unknownCitationKey، لكن المفتاح في nocite الذي لا يطابق أي مُدخل يُتخطى دون تحذير. انسخ المفاتيح من ملف التصدير وعُدّ المُدخلات في القائمة. قائمة المراجع من البيانات المرجعية →
- المفتاح في
nociteالذي لا يطابق أي مدخل يُسقَط من غير تحذير. انسخ المفاتيح من الملف المصدَّر بدل أن تكتبها، وعُدّ المداخل على الصفحة. - يبني Zotero المفاتيح من البيانات: صحّح اسم مؤلف أو عنوانًا في Zotero، وقد يغيّر التصدير التالي المفتاح، فينكسر كل استشهاد به. ثبّت المفاتيح قبل كتابة النص: يقرأ Zotero سطرًا
Citation Key: …في حقل Extra للمادة. - يصدّر Zotero بترميز UTF-8 افتراضيًا، والتشكيلات كما هي. وقد صُدّرت الكتلة هنا بخيار الترميز الغربي، الذي يكتب
{\"o}؛ ويقرأ Postext الصيغتين. - تُسقط الطبعة الثامنة عشرة من دليل Chicago مكان النشر، فلا يُطبع الحقل
address، والمقالة التي لها DOI تطبع معرّف DOI لاurlالخاص بـJSTOR.
الحقوق
- الوصفة
- Ignacio Ferro
- النص
- نص أصلي, CC BY 4.0
- الخطوط
- Spectral (SIL OFL 1.1) · IBM Plex Sans Condensed (SIL OFL 1.1)
- الشيفرة
- MIT، مثل Postext
حرّر هذا الشرح ↗ (يفتح في تبويب جديد)مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)


