باختصار
تعليق قصير على حكم محكمة إنجليزية بشأن الشرطة. كل قضية وقانون ومقالة يستند إليها مذكورة في حاشية مرقّمة في أسفل الصفحة، بالأسلوب الذي تستعمله كليات الحقوق البريطانية.
ما الذي ستنضده
مستلّة من سلسلة التعليقات على الأحكام في مجلة قانونية: أربع صفحات عن Robinson v Chief Constable of West Yorkshire Police، حكم المحكمة العليا سنة 2018 في متى تقع على الشرطة واجب العناية. الصفحة بمقاس 162 × 240 مم، معكوسة، بخط Libre Baskerville بحجم 9.4/13.6 نقطة، وتبدأ الصفحة الأولى بشريط أحمر عنابي عليه اسم القضية منضّدًا بحروف مائلة بحجم 60 نقطة. يكتب المؤلف كل مرجع مفتاحًا مع موضعه الدقيق، [@caparo1990, 617–18]، فينضّد Postext ثلاثًا وعشرين حاشية سفلية وفق OSCOLA، معيار الاستشهاد في كليات الحقوق البريطانية: أسماء القضايا مائلة، والقوانين بخط قائم، ولا نقاط بعد AC أو HL أو edn، وibid لمرجع الحاشية السابقة، وRobinson (n 1) [55] بعد ذلك. المراجع حقيقية؛ أما المؤلف والمجلة فلا.
تجيب هذه الوصفة عن
- كيف أستشهد بالقضايا والتشريعات في الحواشي السفلية، بأسلوب OSCOLA في الكتابة القانونية البريطانية؟
- كيف أنضد الاستشهادات حواشي سفلية، بأسلوب Chicago، مع صيغ مختصرة للاستشهادات اللاحقة؟
الجواب المختصر
// The text cites with [@robinson2018, para 21]; OSCOLA is a note style, so each citation
// becomes a footnote: the case in full the first time, "ibid" when the note before cites
// the same authority, "Robinson (n 1) [55]" after that. Case names come out italic,
// statutes roman, and no abbreviation takes a full stop (AC, HL, UKSC, edn, n, s).
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = {
style: 'custom', customStyle: OSCOLA, // the bundled 'oscola', patched above
locale: 'en-GB', // OSCOLA's words stay English in the Spanish edition too
notes: 'footnote',
link: false, // a case comment has no bibliography to link to
bibliography: { auto: false }, // OSCOLA articles cite in the notes only
};
// The citation notes share the numbering and the look of the author's own [^notes].
const footnotes = {
placement: 'column', numbering: 'chapter',
fontSize: pt(7.8), lineHeight: pt(10.2), spaceBetween: pt(2.2),
textAlign: 'left', // ragged: long report citations would open wide gaps if justified
separator: { width: 0.25, lineWidth: pt(0.5), color: col('rule') },
};
المكونات
- الميزات
- الاستشهادات في الحواشيالاستشهادات بأسلوب توثيقالحواشي السفليةشريط فصل بعرض الصفحةصفحات افتتاح مصمَّمةسمات العنوانالترويسات وأرقام الصفحاتهوامش متناظرةأنماط الفقراتلوحة ألوان دلاليةالتصدير إلى PDF
- تستخدم أيضًا
- موازنة الأعمدةالإحالاتقائمة المراجع من البيانات المرجعيةلون الورقالترويسات بحسب دور الصفحةالخطوط المضمَّنة في PDF
- الخطوط
- Libre Baskerville, Libre Caslon Display, Libre Franklin (SIL OFL 1.1)
- الأصول
- لا شيء: كل صورة مرسومة بالشيفرة
طريقة التحضير
#1 · حاشية OSCOLA لكل مرجع
الشيفرة هي الجواب المختصر أعلاه. OSCOLA أسلوب حواشٍ، فيترك [@robinson2018, para 21] رقمًا مرفوعًا بعد النقطة وتذهب كلماته إلى أسفل الصفحة. تذكر الحاشية 1 القضية كاملة، Robinson v Chief Constable of West Yorkshire Police [2018] UKSC 4, [2018] AC 736؛ والحاشية 2، التي تستشهد بها مجددًا على الفور، نصها ibid [21]؛ والحاشية 8، بعد أن تخللتها قضايا أخرى، نصها Robinson (n 1) [26–27]. ومقالة المجلة القانونية لا تستشهد إلا في حواشيها، فيُبعد bibliography.auto: false قائمة الأعمال عن الصفحة الأخيرة.
#2 · القضية بيانات، تُكتب كما تطبعها مجموعات الأحكام
القضية مادة CSL من type: legal_case: اسمها في title، والمحكمة في authority، وسلسلة مجموعة الأحكام في container-title، والصفحة الأولى في page. يضع OSCOLA سنة المجموعة بين قوسين معقوفين حين تكون السنة هي ما يحدد المجلد، كما في Appeal Cases، لذا تكتب الوصفة تلك السنة في volume يليها رقم المجلد: volume: "[1990] 2" يُنتج [1990] 2 AC 605 (HL). والقضية التي حُكم فيها بعد 2001 لها أيضًا استشهاد محايد: authority: UKSC وnumber: "4" وissued: 2018 تُنتج [2018] UKSC 4، يليها موضعها في المجموعة. والقانون من type: legislation وسنته في عنوانه بلا issued، فلا تُطبع السنة مرتين، و[@hra1998, § 6] يستشهد بمادة في صورة s 6.
#3 · تعديلان على النمط المرفق
// The bundled oscola.csl writes a paragraph pinpoint in brackets only in a case's first
// note: a later note printed "Robinson (n 1) para 55" and "ibid 27", and a repeated
// statute "ibid 7". These two replacements give "Robinson (n 1) [55]", "ibid [27]" and
// "ibid s 7", as OSCOLA prints them.
const LOCATOR = `<macro name="label-locator"><choose>
<if type="legal_case" locator="paragraph">
<text variable="locator" prefix="[" suffix="]"/></if>
<else-if locator="page"><text variable="locator"/></else-if>
<else><group delimiter=" "><label form="short" strip-periods="true" variable="locator"/>
<text variable="locator"/></group></else>
</choose></macro>`;
const OSCOLA = STYLES.oscola
.replace(/<macro name="label-locator">[\s\S]*?<\/macro>/, LOCATOR)
.replace(/(<if position="ibid-with-locator">[\s\S]*?)<text variable="locator"\/>/,
'$1<text macro="label-locator"/>');
ملف oscola.csl المرفق لا يضع الموضع الدقيق للفقرة بين قوسين إلا في الحاشية الأولى للقضية. فطبعت الحواشي اللاحقة para 55 وibid 27، وفقدت حاشية ثانية إلى القانون نفسه حرف s. يستبدل التعديل ماكرو واحدًا وسطرًا واحدًا من XML النمط قبل البناء ويمرّر الناتج نمطًا مخصّصًا، فلا يتغير النص ولا المراجع.
#4 · اسم القضية على الشريط
const BAND = 124; // mm from the trim's top
const big = (id, content, family, size, color, y, extra = {}) => ({
kind: 'text', id, content, fontFamily: family, fontSize: pt(size), lineHeight: 1.08, color,
align: 'left', overflow: 'wrap', ...extra,
placement: { ...at('container', 'top-left', 0, y), size: { width: mm(118), height: 'auto' } },
});
const opener = {
enabled: true,
minHeight: mm(BAND - MARGIN.top + 8), // the text starts 8 mm under the band
slot: { elements: [
{ kind: 'box', id: 'band', style: { backgroundColor: col('claret') },
placement: { ...at('page', 'top-left'), size: { width: 'fill', height: mm(BAND) } } },
big('kicker', '{attr.kicker}', LABEL, 7.4, col('tint'), 2,
{ fontWeight: 600, letterSpacing: pt(1.4), textTransform: 'uppercase' }),
big('case', '{attr.case}', TEXT, 60, col('paper'), 9, { italic: true }),
big('parties', '{attr.parties}', TEXT, 12.5, col('tint'), 33, { italic: true }),
big('citation', '{attr.citation}', TEXT, 10.5, col('tint'), 40),
{ kind: 'box', id: 'hairline', style: { backgroundColor: col('tint') },
placement: { ...at('container', 'top-left', 0, 51),
size: { width: mm(30), height: pt(0.6) } } },
big('title', '{titleText}', DISPLAY, 27, col('paper'), 57),
big('byline', '{attr.byline}', LABEL, 8.5, col('tint'), 82,
{ fontWeight: 500, letterSpacing: pt(0.5) }),
] },
};
يمتد الشريط 124 مم نزولًا من حدّ القص. اسم القضية والأطراف والاستشهاد سمات للعنوان، فلا يغيّر تعليق آخر في السلسلة إلا Markdown الخاص به. ويُنضَّد Robinson بخط Libre Baskerville Italic بحجم 60 نقطة لأن OSCOLA يميل أسماء القضايا، ويبقى الاستشهاد تحته قائمًا، كما هو في الحواشي.
const palette = {
ink: '#1f1b1a', claret: '#5e1b26', tint: '#ecdcd8', rule: '#bfb4ad', muted: '#6b625d',
paper: '#fcfaf6',
};
// Each colour carries its hex and the palette entry it follows.
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.claret })
.map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));
الوصفة كاملة
// ═══ Postext Cookbook · Nº 099 · A legal opinion cited in OSCOLA ══════════════════
// https://postext.dev/en/cookbook/legal-opinion-oscola
// Code: MIT · Text: original (CC BY 4.0) · Pictures: none
// Fonts: Libre Baskerville, Libre Caslon Display, Libre Franklin (OFL 1.1) · Needs postext ≥ 1.65.0
import {
buildDocumentWithFonts, 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 = 'legal-opinion-oscola';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: a law-report claret for the band, ink and cream paper for the rest
const palette = {
ink: '#1f1b1a', claret: '#5e1b26', tint: '#ecdcd8', rule: '#bfb4ad', muted: '#6b625d',
paper: '#fcfaf6',
};
// Each colour carries its hex and the palette entry it follows.
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.claret })
.map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));
// #endregion
const TEXT = 'Libre Baskerville', DISPLAY = 'Libre Caslon Display', LABEL = 'Libre Franklin';
const TRIM = { width: 162, height: 240 }; // a law-journal offprint
const MARGIN = { top: 23, bottom: 22, inner: 19, outer: 21 };
const LEAD = 13.6; // pt
const at = (to, edge, x = 0, y = 0) => ({ anchor: { to, edge }, offset: { x: mm(x), y: mm(y) } });
// #region oscola: two patches to the bundled OSCOLA style, applied before the build
// The bundled oscola.csl writes a paragraph pinpoint in brackets only in a case's first
// note: a later note printed "Robinson (n 1) para 55" and "ibid 27", and a repeated
// statute "ibid 7". These two replacements give "Robinson (n 1) [55]", "ibid [27]" and
// "ibid s 7", as OSCOLA prints them.
const LOCATOR = `<macro name="label-locator"><choose>
<if type="legal_case" locator="paragraph">
<text variable="locator" prefix="[" suffix="]"/></if>
<else-if locator="page"><text variable="locator"/></else-if>
<else><group delimiter=" "><label form="short" strip-periods="true" variable="locator"/>
<text variable="locator"/></group></else>
</choose></macro>`;
const OSCOLA = STYLES.oscola
.replace(/<macro name="label-locator">[\s\S]*?<\/macro>/, LOCATOR)
.replace(/(<if position="ibid-with-locator">[\s\S]*?)<text variable="locator"\/>/,
'$1<text macro="label-locator"/>');
// #endregion
يعمل ملف script.js المجمّع كما هو: الصقه في سكربت الوحدة (module) لأي صفحة، أو افتح الوصفة على CodePen. مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)
تنويعات
#اطبع النمط كما يأتي
للمقارنة مع الناتج غير المعدَّل، استعمل المعرّف المرفق. عندئذٍ تقرأ المواضع الدقيقة للفقرات في الحواشي اللاحقة para 55.
- style: 'custom', customStyle: OSCOLA, // the bundled 'oscola', patched above
+ style: 'oscola',#اجمع الحواشي في النهاية
بعض المجلات تطبع حواشيها بعد النص. تحتفظ الاستشهادات بصيغتيها الكاملة والمختصرة وبأرقامها.
- placement: 'column', numbering: 'chapter',
+ placement: 'chapterEnd', numbering: 'chapter',أخطاء شائعة
- المجموعة التي مجلدها رقم مجرد،
volume: "2"، تطبع السنة بين قوسين هلاليين، (1990) 2 AC، وهو ما يحفظه OSCOLA للسلاسل المرقّمة عبر السنين مثل Commonwealth Law Reports (الحاشية 7). اكتب السنة بين قوسين معقوفين فيvolumeلـAppeal Cases وWeekly Law Reports. - حرف
sقبل الموضع يعني صفحة (Seite الألمانية)، لا مادة: اكتب§ 6. والفقرة الفرعية مثل6(1)لا تُقرأ موضعًا؛ سمِّها في الجملة واستشهد بالمادة. - لا قائمة مراجع في مقالة وفق OSCOLA، وليس في النمط جداول منفصلة للقضايا والتشريعات. والأطروحة التي تحتاج تلك الجداول تحصل من
:::bibliographyعلى قائمة واحدة مرتبة، المصادر الثانوية أولًا ثم القضايا والقوانين مختلطة.
الحقوق
- الوصفة
- Ignacio Ferro
- النص
- نص أصلي, CC BY 4.0
- الخطوط
- Libre Baskerville (SIL OFL 1.1) · Libre Caslon Display (SIL OFL 1.1) · Libre Franklin (SIL OFL 1.1)
- الشيفرة
- MIT، مثل Postext
حرّر هذا الشرح ↗ (يفتح في تبويب جديد)مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)


