انتقل إلى المحتوى الرئيسي
الوصفة رقم 70

دليل الوصفات · الفصل 9 · منشورات كاملة

نص مسرحي: قائمة الشخصيات والمتكلمون والإرشادات المسرحية

مسرحية وايلد في طبعة للممثلين: الأسماء برقوقية عريضة، والإرشادات بمائل رمادي، وفي قائمة الشخصيات صفّ نقاط إلى كل ممثل على موضع جدولة.

في هذه الصفحة
  • نموذج باللغة الإنجليزية: لا توجد طبعة عربية بعد
  • مقاس القص 140 × 216 مم
  • عمود واحد
  • Libre Baskerville 9.4/13.6
  • Abril Fatface
  • Playfair Display SC
  • 5 صفحات
  • المستوى
  • Postext 1.57.1
  • أُخرجت في 85 ms
  • أسطر الشيفرة: 160

باختصار

افتتاح ملهاة شهيرة لأوسكار وايلد، مطبوعة للممثلين. تبرز أسماء المتكلمين بلون عريض، والإرشادات المسرحية بالرمادي فيسهل تخطّيها.

ما الذي ستنضده

افتتاح The Importance of Being Earnest لأوسكار وايلد، منضّدًا طبعةً للممثلين في خمس صفحات بقياس 140 × 216 مم. صفحة العنوان ملصق مسرحي برقوقي في إطار ذهبي مزدوج، وImportance وEarnest بحروف كبيرة سميكة، وقرنفلة ذهبية تحت العنوان. وفي مقابل الفصل الأول تذكر قائمة الشخصيات الممثل الذي أدّى كل دور أول مرة على مسرح St James’s Theatre سنة 1895. يبدأ كل قول باسم المتكلم بلون برقوقي عريض ويعلّق أسطره التالية 5 مم، فيجد الممثل إشارته التالية بنظرة. والإرشادات المسرحية، داخل القول أو بين قولين، بمائل رمادي، وتستطيع العين تخطّيها في أثناء مراجعة الأدوار. أما الطبعة الإسبانية فترجمة جديدة تتبع عرف المسرح الإسباني، بشرطة بعد كل اسم والإرشادات بين قوسين.

تجيب هذه الوصفة عن

  • كيف أنضد سيناريو أو مسرحية: عناوين المشاهد، وأسماء الشخصيات، وحوار بمسافة بادئة من الجانبين؟
  • كيف ألوّن المصطلحات الرئيسية (العريضة أو المائلة) في المتن أو داخل الإطارات؟
  • كيف أنضد رسومًا غير مرقّمة: زخارف، وحليات، وشعارات؟

الجواب المختصر

script.js · الأسطر 34–54في الشيفرة الكاملة
// Speeches are plain paragraphs, the speaker's name in bold and each stage direction in
// italic; a direction between two speeches is a paragraph of its own, in a container:
//   **LANE.** Yes, sir. *[Hands them on a salver.]*
//   :::paragraphs{style="direction"}
//   *[Enter Lane.]*
//   :::
// The body's two emphasis colours then mark who speaks (plum) and what is done (grey).
const dialogue = {
  fontFamily: TEXT, fontSize: pt(BODY), lineHeight: pt(LEAD), color: col('ink'),
  boldColor: col('plum'), // **ALGERNON.**
  italicColor: col('muted'), // *[Languidly.]*, in a speech or a paragraph of its own
  minWordSpacing: 0.65, maxWordSpacing: 1.8, // justified (the default); limits inside 0.6–2
  // A runt fix tracks by 5/1000 em at most (default 10). At 10, “that?” went up beside “as”
  // and the speech stood darker than the ones around it; at 5 the word turns over.
  maxRuntTracking: 5,
  firstLineIndent: mm(5), hangingIndent: true, // the name at the margin, the turnovers hung
};
// Directions: smaller and centred, on the same grid. They are written *…* like the ones
// inside a speech, so both take the body's italic grey.
const direction = { id: 'direction', fontSize: pt(8.6),
  textAlign: 'center', firstLineIndent: pt(0) };

المكونات

الميزات
أنماط الفقراتالغامق والمائل وألوانهمامواضع الجدولة ونقاط التوجيهالمسافات البادئة والمحاذاة والتباعد بين الفقراتمستويات العناوينفصول تبدأ في صفحة فرديةأنواع موارد مخصّصةأشكال في هذا الموضع بالضبطأنماط العناوينالأغلفة وصفحات العنوان وبيانات النشرسمات العنوانالصور في تصاميم الصفحةالنصوص والخطوط والمربعات في تصاميم الصفحةالترويسات وأرقام الصفحاتالترويسات بحسب دور الصفحةالبيانات الوصفية للمستندلون الورقلوحة ألوان دلالية
الخطوط
Libre Baskerville, Abril Fatface, Playfair Display SC (SIL OFL 1.1)
الأصول
  • The title page’s frame and the carnation fleuron, drawn in code in the page’s palette (Ignacio Ferro, MIT)

طريقة التحضير

#1 · الفصل عنوان عادي

script.js · الأسطر 58–69في الشيفرة الكاملة
const headings = {
  fontFamily: LABEL, fontWeight: 400, color: col('ink'),
  textAlign: 'center', // every level: the act, the cast list's heads, the scene
  lineHeight: pt(LEAD), marginTop: pt(LEAD), marginBottom: pt(0), // whole lines of the grid
  levels: [
    { level: 1, fontFamily: DISPLAY, fontSize: pt(24), lineHeight: pt(3 * LEAD),
      color: col('plum'), textTransform: 'uppercase',
      breakBefore: { enabled: true, parity: 'odd' } }, // a recto, facing the cast list
    { level: 2, fontSize: pt(13), lineHeight: pt(2 * LEAD) },
    { level: 3, fontSize: pt(9.5), color: col('plum') },
  ],
};

عنوان الفصل عنوان من المستوى الأول بخط Abril Fatface بحجم 24 نقطة، بلا خانة تصميم. يجعله textTransform بحروف كبيرة، وأسطر شبكته الثلاثة من 13.6 نقطة تضع الحروف الكبيرة 5.5 مم تحت أعلى كتلة النص (العناوين). لا يمكن ضبط textAlign: 'center' لكل مستوى على حدة، فهو يضع في الوسط أيضًا عناوين قائمة الشخصيات وتسمية Scene. ويبدأ breakBefore مع الزوجية 'odd' الفصل على صفحة فردية، مقابل قائمة الشخصيات. أما القيمة الافتراضية 'always-odd' فتترك صفحتين فارغتين بينهما (الفصل قبل العنوان).

#2 · قائمة الشخصيات صفّ من النقاط إلى كل ممثل

script.js · الأسطر 73–85في الشيفرة الكاملة
// A tab sends the actor to a stop at the end of the measure that ends the text there; the stop's
// leader fills the room before it with dots, from half an em after the person to half an em
// before the actor. The bill's head is a centred line in the face's own small capitals.
const person = { id: 'person', fontSize: pt(8.8), firstLineIndent: pt(0), textAlign: 'left',
  tabStops: [{ position: 'end', align: 'end', leader: '.' }],
  spaceBetween: pt(LEAD / 2) }; // a person every line and a half
const billHead = { id: 'bill-head', fontFamily: LABEL, fontSize: pt(8.5), color: col('plum'),
  textAlign: 'center', firstLineIndent: pt(0), marginTop: pt(LEAD / 2),
  marginBottom: pt(LEAD / 2) };
// The scenes: two stops, so `:tab Act I :tab Algernon’s flat` ends the act on the first
// (15 mm in) and starts the place on the second, 2 mm after it, as a two-column list would.
const scene = { id: 'scene', textAlign: 'left', firstLineIndent: pt(0), marginTop: pt(LEAD / 2),
  tabStops: [{ position: mm(15), align: 'end' }, { position: mm(17) }] };

كل شخصية فقرة من النمط person، والممثل بعد :tab (الجدولة ومواضع الجدولة). للنمط موضع جدولة واحد، عند 'end'، أي نهاية عرض السطر، ومع align: 'end' ينتهي اسم الممثل عنده. ويملأ leader: '.' المساحة التي قبل الموضع بالنقاط، على بعد نصف em من الشخصية ومن الممثل، ويضع spaceBetween شخصية كل سطر ونصف. أسماء الشخصيات عريضة، فتُطبع بالبرقوقي كما تُطبع أسماء المتكلمين في الحوار. ويتصدّر القائمةَ الممثلون الأصليون والمسرح والتاريخ بالنمط bill-head، في الوسط بخط Playfair Display SC الذي حروفه الصغيرة حروف كبيرة مصغّرة. وللمشاهد موضعان: :tab Act I :tab … يُنهي Act I عند الأول، على بعد 15 مم، مع align: 'end'، فتقف الفصول الثلاثة محاذاة إلى اليمين في عمود واحد، ويبدأ المكان عند الثاني بعده بـ 2 مم. وزمن الأحداث سطر في الوسط بنمط الإرشادات.

#3 · زخارف بلا رقم ولا تعليق

script.js · الأسطر 89–94في الشيفرة الكاملة
// ::resource{id="fleuron"} sets it where it stands (gotcha: resource-double-quotes).
const unnumbered = (id, name, defaultPlacement) => ({ id, name, shortLabel: '', captionPrefix: '',
  numberingTemplate: '{n}', resetOn: 'never', counterFormat: 'decimal', defaultPlacement });
const resourceTypes = [
  unnumbered('ornament', 'Ornament', { position: 'here', width: 0.24, align: 'center' }),
];

نوع المورد الذي له captionPrefix وshortLabel فارغان يطبع صوره مجرّدة (أنواع الموارد). ويضع defaultPlacement الخاص به القرنفلة حيث يقف ::resource{id="fleuron"}، في الوسط وبعرض 0.24 من عرض السطر البالغ 107 مم، أي نحو 26 مم.

#4 · صفحة العنوان نمط عنوان

script.js · الأسطر 98–120في الشيفرة الكاملة
// # The Importance of Being Earnest {style="playbill" small="The" big="Importance" …}
// Each attribute is a playbill line in its own face and size. The ground is an image that
// fills the sheet: the heading reserves down to its foot, so the cast list starts on page 2.
const line = (id, content, font, size, y, color, extra = {}) => ({ kind: 'text', id, content,
  fontFamily: font, fontSize: pt(size), lineHeight: 1, color: col(color), align: 'center',
  placement: { anchor: { to: 'page', edge: 'top' }, offset: { y: mm(y) } }, ...extra });
const tracked = (track) => ({ textTransform: 'uppercase', letterSpacing: pt(track) });
const playbill = {
  id: 'playbill', span: 'page', // kept in the column, its foot would cut the ground
  header: { elements: [] }, footer: { elements: [] }, // no heads on p. 2, no folio on p. 1
  advancedDesign: { enabled: true, slot: { elements: [
    { kind: 'image', id: 'ground', resourceId: 'playbill',
      placement: { anchor: { to: 'bleed', edge: 'top-left' }, size: { width: 'fill' } } },
    line('kicker', '{subtitle}', LABEL, 8.5, 36, 'gilt', tracked(1.7)),
    line('small', '{attr.small}', TEXT, 17, 51, 'paper', { italic: true }),
    line('big', '{attr.big}', DISPLAY, 40, 60, 'paper', { textTransform: 'uppercase' }),
    line('link', '{attr.link}', TEXT, 17, 78, 'gilt', { italic: true }),
    line('name', '{attr.name}', DISPLAY, 60, 87, 'paper', { textTransform: 'uppercase' }),
    line('author', '{author}', LABEL, 13, 133, 'paper', tracked(3)),
    line('theatre', '{attr.theatre}', LABEL, 8, 170, 'gilt', tracked(1.6)),
    line('premiere', '{attr.premiere}', TEXT, 8.5, 176, 'paper', { italic: true }),
  ] } },
};

يتضمّن # The Importance of Being Earnest {style="playbill" …} العنوان في أربع سمات، ينضّدها التصميم بخطين: Abril Fatface بحجمي 40 و60 نقطة للأسماء، وLibre Baskerville المائل بحجم 17 نقطة لـThe وof Being (سمات العنوان). الأرضية البرقوقية والإطار والقرنفلة ملف SVG واحد مرسوم بالشيفرة ومربوط بالنزف (عناصر الصورة). ويضبط النمط span: 'page' مع أن الكتاب بعمود واحد. فلو بقي التصميم في العمود لقُطع عند أسفل كتلة النص، أي 23.3 مم فوق أسفل الورقة. ويُبعد header الفارغ في النمط الترويسات عن قائمة الشخصيات، التي تنتمي إلى القسم نفسه، ويُبعد footer الفارغ رقم الصفحة في الذيل عن صفحة العنوان، حيث كان سيُطبع برقوقيًّا على برقوقي (أنماط العناوين).

الأرضية عنصر صورة، وصفحة الافتتاح تحجز ارتفاعًا حتى أسفل صورها، فيمسك العنوان الورقة كلها: تبدأ The Persons of the Play على الصفحة 2 بلا :::pagebreak بعد العنوان، أينما وقعت أسطر صفحة العنوان. ولا يحتاج السطر الموسَّط الذي له letterSpacing إلى تصحيح. فالتباعد الذي يلي حرفه الأخير لا يدخل في التوسيط، ويقع OSCAR WILDE في وسط الصفحة.

#5 · ترويسات تتخطى الصفحة الأولى من الفصل

script.js · الأسطر 124–140في الشيفرة الكاملة
const head = (id, content, parity, edge, x, style) => ({
  kind: 'text', id, content, parity, pages: 'body', // never on openers or blank pages
  fontFamily: LABEL, fontSize: pt(8.5), letterSpacing: pt(0.8), color: col('muted'),
  textTransform: 'uppercase', ...style,
  placement: { anchor: { to: 'page', edge }, offset: { x: mm(x), y: mm(11) } },
});
const folio = { fontFamily: TEXT, letterSpacing: pt(0), color: col('plum') };
const header = { elements: [
  head('verso-folio', '{pageNumber}', 'even', 'top-left', OUTER, folio),
  head('verso-title', '{title}', 'even', 'top-left', OUTER + 8),
  head('recto-act', '{chapterTitle}', 'odd', 'top-right', -(OUTER + 8)),
  head('recto-folio', '{pageNumber}', 'odd', 'top-right', -OUTER, folio),
] };
// The act's first page carries a drop folio instead, centred under the text block.
const footer = { elements: [{ ...head('drop-folio', '{pageNumber}', 'all', 'top', 0, folio),
  pages: 'opener', align: 'center',
  placement: { anchor: { to: 'container', edge: 'top' }, offset: { y: mm(8) } } }] };

على الصفحة الزوجية عنوان المسرحية من البيانات التمهيدية (frontmatter)، وعلى الفردية الفصلُ من {chapterTitle}، كلاهما بحروف Playfair Display SC الكبيرة ورقم الصفحة بالبرقوقي على الحافة الخارجية (العناصر النصية). وتُحتسب الصفحة الأولى من الفصل صفحة افتتاح لأن أول كتلة فيها عنوان يكسر الصفحة، فيُبعد pages: 'body' الترويسات عنها، ويضع فيها التذييل رقم صفحة في الذيل بدلًا منها.

الوصفة كاملة

Sandbox
// ═══ Postext Cookbook · Nº 070 · Play script: cast list, speakers and stage directions ═══
// https://postext.dev/en/cookbook/stage-play
// Code: MIT · Text: Oscar Wilde, 1895 (PD, Gutenberg #844), Spanish: the Cookbook · Art: in code
// Fonts: Libre Baskerville, Abril Fatface, Playfair Display SC (OFL 1.1) · Needs postext ≥ 1.25.0
import {
  buildDocumentWithFonts, renderPageToCanvas, registerResourceImage,
} from 'https://esm.sh/postext';

const LANG = 'en'; // @lang: the language of the sample document ('en' | 'es')
const RECIPE = 'stage-play';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
const palette = { // every colour in the config links to one of these
  ink: '#221b1f', // the dialogue: a near-black with a little plum in it
  plum: '#5b2349', // the one accent: speakers' names, act titles, the title page's ground
  gold: '#b48a45', // rules and ornaments
  gilt: '#c9aa77', // gold lightened for small type on the plum ground (5.3:1)
  muted: '#6c6168', // stage directions and running heads (5.5:1 on the paper)
  paper: '#fbf6ec', // a cream stock
};
// A colour is its hex and the palette entry it follows.
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 accent, so nothing prints blue.
  { id: 'main-color', name: 'plum (defaults)', value: { hex: palette.plum, model: 'hex' } },
];
const [TEXT, DISPLAY, LABEL] = ['Libre Baskerville', 'Abril Fatface', 'Playfair Display SC'];
const [BODY, LEAD] = [9.4, 13.6]; // pt: the dialogue and its leading, the pitch of the grid
const TRIM = { width: 140, height: 216 }; // mm: 5½ × 8½ in, the acting-edition size
const [TOP, INNER, OUTER, LINES] = [20, 18, 15, 36]; // mm, and 36 lines to a full page

// #region answer: a speech is a paragraph: the name in bold, the directions in italic
// Speeches are plain paragraphs, the speaker's name in bold and each stage direction in
// italic; a direction between two speeches is a paragraph of its own, in a container:
//   **LANE.** Yes, sir. *[Hands them on a salver.]*
//   :::paragraphs{style="direction"}
//   *[Enter Lane.]*
//   :::
// The body's two emphasis colours then mark who speaks (plum) and what is done (grey).
const dialogue = {
  fontFamily: TEXT, fontSize: pt(BODY), lineHeight: pt(LEAD), color: col('ink'),
  boldColor: col('plum'), // **ALGERNON.**
  italicColor: col('muted'), // *[Languidly.]*, in a speech or a paragraph of its own
  minWordSpacing: 0.65, maxWordSpacing: 1.8, // justified (the default); limits inside 0.6–2
  // A runt fix tracks by 5/1000 em at most (default 10). At 10, “that?” went up beside “as”
  // and the speech stood darker than the ones around it; at 5 the word turns over.
  maxRuntTracking: 5,

يعمل ملف script.js المجمّع كما هو: الصقه في سكربت الوحدة (module) لأي صفحة، أو افتح الوصفة على CodePen. مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)

تنويعات

#حاذِ الإرشادات مع الأسطر التالية

حين تُنضَّد الإرشادات محاذاة إلى اليسار بإزاحة للسطر الأول قدرها 5 مم، يبدأ الإرشاد ذو السطر الواحد حيث تبدأ الأسطر التالية من الأقوال، ويصير وصف المشهد فقرتين بمسافة بادئة تحت تسميته الموسَّطة.

 const direction = { id: 'direction', fontSize: pt(8.6),
-  textAlign: 'center', firstLineIndent: pt(0) };
+  textAlign: 'left', firstLineIndent: mm(5) };

#اترك سطرًا بين الأقوال

يضيف paragraphSpacing: true سطر شبكة فارغًا بعد كل قول. عندئذٍ يمتد الفصل الإنجليزي إلى خمس صفحات بدل ثلاث، والإسباني إلى أربع.

   firstLineIndent: mm(5), hangingIndent: true, // the name at the margin, the turnovers hung
+  paragraphSpacing: true,
 };

أخطاء شائعة

خطأ شائع

::resource{id="…"} لا يقبل إلا علامتي الاقتباس المزدوجتين

لا يُتعرَّف على التضمين الكتلي إلا بالصيغة ::resource{id="…"} بعلامتي اقتباس مزدوجتين؛ وأي صيغة أخرى تبقى في النص سطرًا ظاهرًا. أشكال في هذا الموضع بالضبط →

  • كل مقطع مائل في الحوار يأخذ italicColor، بما فيه التوكيد، فتُطبع كلمة Lane المؤكَّدة is برمادي الإرشادات. ويوضع الرمادي على bodyText لأن أكثر الإرشادات يقع داخل القول، في الفقرة نفسها مع التوكيد؛ ولن يُبقي is بالحبر إلا الخط القائم.
  • ثلاثة من أقوال وايلد تنتهي بكلمة وحدها: information. وyou. وthat?. يمكن أن ترتفع الثالثة إلى السطر السابق، لكن بتتبّع سالب قدره 1 % فقط، وهو ما يسمح به bodyText.maxRuntTracking افتراضيًّا، فيبدو القول أدكن من الأقوال التي حوله. لذا يُنزل maxRuntTracking: 5 هذا الحدّ إلى النصف: تنزل that? إلى سطر لها، وتتّسع مسافات السطر الذي فوقها إلى 1.78 ضعف المسافة العادية بين الكلمات، ضمن الحدّ البالغ 1.8. وتُبقي الصفحات الإنجليزية الكلمات الثلاث المعزولة بدل تغيير كلمات وايلد. أما الترجمة الإسبانية فأعيدت صياغتها حيثما انتهى سطر بكلمة من حرف واحد أو بقي مقطع وحده.
  • الأسماء تُقسَّم بالواصلة كأي كلمة أخرى: Au-gusta وGwen-dolen تنكسران بين سطرين في الصفحة 5. رابط الكلمات (U+2060) داخل Augusta يُبقيها كاملة، لكنه يمدّ السطر الذي فوقها إلى 1.71 ضعف المسافة العادية بين الكلمات، لذا يُبقي النص الإنجليزي الواصلات.
  • يرسم Playfair Display SC الحرفين fi ربطًا بحروف صغيرة في Canvas، فكانت first ستُطبع بـfi صغيرة بين حروف كبيرة مصغّرة. لهذا يُكتب في السطر الذي يتصدّر قائمة الشخصيات The original cast.

الحقوق

الوصفة
Ignacio Ferro
النص
  • The Importance of Being Earnest (1895): the persons and scenes of the play, the first cast and the opening of the first act · Oscar Wilde · ملك عام
  • The Spanish translation of the extract, the cast list and the scenes · Postext Cookbook · أصلي
الصور
  • The title page’s frame and the carnation fleuron, drawn in code in the page’s palette · Ignacio Ferro · MIT
الخطوط
Libre Baskerville (SIL OFL 1.1) · Abril Fatface (SIL OFL 1.1) · Playfair Display SC (SIL OFL 1.1)
الشيفرة
MIT، مثل Postext
Sandbox