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

دليل الوصفات · الفصل 2 · الحروف والنص

تنسيق السيناريو

سيناريو تصوير بخط Courier Prime مقاس 12 على US Letter، كل حوار فيه إطار بلا حدود بحشوة تحدّد كتلة الحوار، وكل مشهد مرقّم في الهامشين.

في هذه الصفحة
النوع
أي نوع
المُخرَج
Canvas
المستوى
متوسط
Postext
اختُبرت مع Postext 1.65.0
تتطلب ≥ 1.25.0
الترخيص
حُدّثت في 11 أكتوبر 2026
الشيفرة MIT · النص CC BY 4.0

ص 2–1 · 2–3 من 5

  • نموذج باللغة الإنجليزية: لا توجد طبعة عربية بعد
  • مقاس القص 215.9 × 279.4 مم
  • عمود واحد
  • Courier Prime 12/12
  • Oswald
  • Special Elite
  • 5 صفحات
  • المستوى
  • Postext 1.57.1
  • أُخرجت في 59 ms
  • أسطر الشيفرة: 149

باختصار

سيناريو فيلم قصير منسّق كما تتوقعه استوديوهات السينما. يستخدم خطًا يشبه خط الآلة الكاتبة، وتوضع فيه الحوارات وأرقام المشاهد على مسافات ثابتة من حافة الورقة.

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

مسودة التصوير لـ Lost Property، فيلم قصير متخيَّل من ثلاث صفحات، مجلّدة كما تُجلَّد سيناريوهات الاستوديوهات: غلاف من الورق المقوّى بلون ذهبي مصفرّ فيه مسماران نحاسيان وملصق مكتوب بالآلة، وباطنه مختوم بـ COPY 07، ثم السيناريو منضّدًا 12 على 12 بخط Courier Prime على ورق US Letter مثقوب. المقاسات هي مقاسات برامج كتابة السيناريو: وصف الحدث من 1.5 إلى 7.5 بوصات، والحوار من 2.5 إلى 6 تحت اسم الشخصية عند 3.7، والإرشاد بين قوسين من 3.1، وCUT TO: وFADE OUT. ينتهيان عند الهامش الأيمن. لكل عنوان مشهد رقمه في الهامشين. الصفحة 1 من السيناريو بلا رقم؛ والبقية تطبع رقمها أعلى اليمين متبوعًا بنقطة. كل حوار إطار بلا حدود، واسم الشخصية فيه على تباعد المتن نفسه، 12 نقطة، فيحافظ وصف الحدث والحوار على ستة أسطر في البوصة.

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

  • كيف أنضد سيناريو أو مسرحية: عناوين المشاهد، وأسماء الشخصيات، وحوار بمسافة بادئة من الجانبين؟

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

script.js · الأسطر 43–64في الشيفرة الكاملة
// Positions from the left edge of the sheet, in inches, as screenwriting software gives them.
const DIALOGUE = { left: 2.5, right: 6 }; // the block of speech, 3.5 inches wide
const CUE = 3.7; // the character's name
const TEXT_RIGHT = 8.5 - MARGIN.right; // 7.5: where action lines end
const dialogue = {
  id: 'dialogue',
  backgroundEnabled: false, // no fill and no border: the box is only a measure
  padding: { top: pt(0), bottom: pt(0),
    left: mm((DIALOGUE.left - MARGIN.left) * IN), // 1 inch in from the action
    right: mm((TEXT_RIGHT - DIALOGUE.right) * IN) }, // 1.5 inches short of it
  // The fence's title is the cue: title="Dora (cont’d)" prints DORA (CONT’D) at 3.7 inches,
  // in the headings' Courier, with no gap under it (the default is half a line). On the
  // body's 12-pt leading (the default is 1.2 times its size, 14.4 pt), the name sits on a
  // grid line and a speech is a whole number of lines.
  titleStyle: { fontWeight: 400, textTransform: 'uppercase', lineHeight: pt(LEAD),
    indent: mm((CUE - DIALOGUE.left) * IN), gap: pt(0) },
  body: { paragraphSpacing: false }, // no blank line before a parenthetical mid-speech
  marginTop: pt(LEAD), marginBottom: pt(LEAD), // one blank line above and below
  // Snapped to the grid, a box keeps its bottom margin and the next speech adds its top
  // margin: two blank lines between speeches. Unsnapped, the two margins collapse into one.
  snapToGrid: false,
};

المكونات

الخطوط
Courier Prime, Oswald (SIL OFL 1.1) · Special Elite (Apache 2.0)
الأصول
لا شيء: كل صورة مرسومة بالشيفرة

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

#1 · احشُ إطارًا بلا حدود حتى كتلة الحوار

الشيفرة في الجواب المختصر أعلاه. تُقاس حشوة الإطار من كتلة النص، فبوصة واحدة على اليسار و1.5 بوصة على اليمين تتركان كتلة عرضها 3.5 بوصات تبدأ على بعد 2.5 بوصة من حافة الورقة (أنماط الإطارات). اسم الشخصية هو عنوان الإطار، مكتوبًا في سطر الفتح على هيئة title="Dora (cont’d)". يطبعه textTransform بحروف كبيرة، ويحرّكه indent مسافة 1.2 بوصة بعد الحشوة، إلى 3.7 بوصات. وgap قيمته 0 لأن القيمة الافتراضية تترك نصف em، أي 6 نقاط، بين الاسم والحوار. افتراضيًا يقع عنوان الإطار على سطر يساوي 1.2 ضعف حجمه، أي 14.4 نقطة هنا. ويضعه titleStyle.lineHeight على تباعد المتن، 12 نقطة، فيقع الاسم على سطر من الشبكة ويصبح الحوار عددًا صحيحًا من الأسطر ذات 12 نقطة؛ أما بالقيمة الافتراضية فكان كل حوار سيدفع النص الذي يليه 2.4 نقطة أبعد عن الشبكة. ومع إيقاف snapToGrid يندمج الهامش السفلي لحوار والهامش العلوي للحوار التالي في سطر فارغ واحد. الإطار يبقى كاملًا افتراضيًا، فالحوار الذي لم يعد يتسع ينتقل إلى الصفحة التالية مع اسمه.

#2 · اضبط الصفحة بالبوصات

script.js · الأسطر 33–39في الشيفرة الكاملة
const MARGIN = { top: 1, bottom: 1, left: 1.5, right: 1 }; // inches: the left one takes the brads
const page = { sizePreset: 'custom', width: mm(8.5 * IN), height: mm(11 * IN), dpi: 150,
  margins: { top: mm(MARGIN.top * IN), bottom: mm(MARGIN.bottom * IN),
    left: mm(MARGIN.left * IN), right: mm(MARGIN.right * IN) } };
const bodyText = { fontFamily: TEXT, fontSize: pt(12), lineHeight: pt(LEAD), color: col('ink'),
  textAlign: 'left', firstLineIndent: pt(0), // action: flush left, never justified
  paragraphSpacing: true }; // a blank line between paragraphs

US Letter بهامش أيسر قدره 1.5 بوصة تمر منه المسامير، وبوصة واحدة على الجوانب الثلاثة الأخرى. Courier Prime خط أحادي المسافة: بمقاس 12 نقطة يبلغ عرض كل حرف عُشر بوصة، فيتسع سطر وصف الحدث لـ 60 حرفًا وسطر الحوار لـ 35، وبتباعد أسطر 12 نقطة تتسع الصفحة لـ 54 سطرًا. النص محاذى إلى اليسار بحافة يمنى حرّة، ويضع paragraphSpacing سطرًا فارغًا بين الفقرات. لا تُقسَّم الكلمات بالواصلة في النص ذي الحافة الحرّة إلا إذا طلب ذلك bodyText.hyphenation.ragged، فلا تنقسم أي كلمة في السيناريو، كما يقتضي التنسيق.

#3 · اجعل الإرشادات بين قوسين والانتقالات أنماط فقرات

script.js · الأسطر 68–72في الشيفرة الكاملة
const PAREN = 3.1;
const paragraphStyles = [
  { id: 'paren', firstLineIndent: mm((PAREN - DIALOGUE.left) * IN) }, // inside a speech
  { id: 'transition', textAlign: 'right' }, // CUT TO:, flush with the action's right edge
];

حاوية :::paragraphs{style="paren"} داخل الحوار تزيح سطرها الأول 0.6 بوصة بعد حافة الحوار، إلى 3.1 بوصات (أنماط الفقرات). اجعل كل إرشاد بين قوسين في سطر واحد: النمط يزيح السطر الأول وحده. ويُبقي body.paragraphSpacing: false في نمط الحوار السطرَ الفارغ الخاص بفقرات وصف الحدث خارج الإطار، فتقع (then) مباشرة تحت السطر الذي قبلها. وتوضع CUT TO: وFADE OUT. في حاويات transition تجعلها قيمة textAlign: 'right' فيها على محاذاة نهاية أسطر وصف الحدث. تعيد الحاوية التدفق إلى شبكة خطوط الأساس بعد آخر فقرة فيها؛ وهذا السيناريو لا يغادر الشبكة أبدًا، فيحتفظ العنوان الذي يلي CUT TO: بسطريه الفارغين.

#4 · علّق أرقام المشاهد في الهامشين

script.js · الأسطر 76–105في الشيفرة الكاملة
// Each number sits in a box half an inch wide, text aligned left, so that 9, 12 and an
// inserted 12A start at the same place on both sides.
const NUMBER_W = 0.5; // inches
const number = (id, edge, x) => ({ kind: 'text', id, content: '{number}', fontFamily: TEXT,
  fontSize: pt(12), fontWeight: 700, lineHeight: 1, color: col('ink'), align: 'left',
  placement: { ...at('container', edge, x * IN), size: { width: mm(NUMBER_W * IN) } } });
// The heading's own text is not painted but still measured: at the level's default 15 pt,
// scene 1's heading would wrap and reserve a second line.
const slugline = { level: 2, fontSize: pt(12), lineHeight: pt(LEAD),
  marginTop: pt(2 * LEAD), marginBottom: pt(LEAD), // two blank lines above, one below
  numberingTemplate: '{2}', // the scene count, which {number} prints
  advancedDesign: { enabled: true, slot: { elements: [
    { kind: 'text', id: 'heading', content: '{titleText}', fontFamily: TEXT, fontSize: pt(12),
      fontWeight: 700, lineHeight: 1, color: col('ink'), align: 'left', overflow: 'wrap',
      placement: { ...at('container', 'top-left'), size: { width: 'fill' } } },
    number('left', 'top-left', -0.6), // starts at 0.9 inches from the edge of the sheet
    number('right', 'top-right', 0.25 + NUMBER_W), // starts a quarter inch past the text
  ] } } };
const headings = {
  // The family of the speech titles, and the one the headings' unpainted text is measured
  // in (left unset, a sixth face, Open Sans Bold, would be loaded for nothing).
  fontFamily: TEXT,
  // Script pages end where the last whole speech or paragraph ends. Balancing would add
  // blank lines above the sluglines to fill them.
  balancing: { enabled: false },
  levels: [
    // 'any': the cover, its inside and the title each open the next page, with no blank.
    { level: 1, breakBefore: { enabled: true, parity: 'any' } },
    slugline,
  ] };

يعدّ numberingTemplate: '{2}' عناوين المستوى 2، ويطبع {number} العدد في التصميم (الإعدادات الخاصة بكل مستوى). العنوان ذو التصميم المتقدم يحتفظ بمكانه في العمود ويرسم عناصره بدلًا من نصه (الامتداد والتصميم المتقدم)، فيمكن أن يقف الرقمان في الهامشين بجانب العنوان العريض. كل منهما مربوط بمستطيل العنوان نفسه ومدفوع خارجه، 0.6 بوصة إلى اليسار وربع بوصة بعد نهاية النص إلى اليمين، في مستطيل عرضه نصف بوصة ونصه محاذى إلى اليسار، كي تبدأ الأرقام ذات الخانة الواحدة وذات الخانتين من الموضع نفسه في سيناريو يتجاوز المشهد 9. نص العنوان نفسه لا يُرسم لكنه يُقاس، لذا يُضبط المستوى على 12 نقطة: بالمقاس الافتراضي، 15 نقطة، كان عنوان المشهد 1 سيلتف ويحجز سطرًا ثانيًا. موازنة الأعمدة متوقفة: فهي كانت ستضيف أسطرًا فارغة فوق عناوين المشاهد لملء الصفحة القصيرة، وصفحة السيناريو تنتهي حيث ينتهي آخر حوار أو آخر فقرة فيها.

#5 · اثقب صفحات السيناريو ورقّمها وحدها

script.js · الأسطر 109–129في الشيفرة الكاملة
// Three holes down the bound edge, 4.25 inches apart, as a three-hole punch leaves them.
const HOLES = [1.25, 5.5, 9.75].map((y) => y * IN); // mm: hole centres from the top
const EDGE = 0.375 * IN; // mm: from the bound edge to the centre of each hole
const HOLE = 7; // mm across
const punched = HOLES.map((y, i) => ({ kind: 'box', id: `punch${i}`,
  style: { backgroundColor: col('hole'), borderRadius: mm(HOLE / 2) },
  placement: { ...at('page', 'top-left', EDGE - HOLE / 2, y - HOLE / 2),
    size: { width: mm(HOLE), height: mm(HOLE) } } }));
// The script's first page opens with its title, an H1 that breaks the page, so the page is
// an 'opener' and pages: 'body' leaves it unnumbered, as the format asks.
const folio = { kind: 'text', id: 'folio', content: '{pageNumber}.', pages: 'body',
  fontFamily: TEXT, fontSize: pt(12), color: col('ink'), align: 'right',
  placement: at('page', 'top-right', -MARGIN.right * IN, 0.5 * IN) };
// The title's style carries the header of its section: the pages from the title to the end.
const title = { id: 'script', header: { elements: [...punched, folio] },
  advancedDesign: { enabled: true, slot: { elements: [
    { kind: 'text', id: 'title', content: '{titleText}', fontFamily: TEXT, fontSize: pt(12),
      lineHeight: 1, textTransform: 'uppercase', color: col('ink'), align: 'center',
      placement: { ...at('container', 'top'), size: { width: 'fill' } } },
  ] } }, // H1's own line, 1.2 × 18 pt, would reserve 21.6 pt and drop FADE IN: 9.6 pt
  lineHeight: pt(LEAD), marginBottom: pt(LEAD) };

لنمط عنوان السيناريو header خاص به، يحل محل ترويسة المستند في صفحات قسمه، من العنوان حتى النهاية (أنماط العناوين). ترويسة المستند نفسها فارغة، فلا تُطبع الثقوب ورقم الصفحة إلا على السيناريو. رقم الصفحة موضوع على بعد نصف بوصة من أعلى الورقة، وpages: 'body' يبعده عن صفحات الافتتاح (عناصر النص). العنوان عنوان من المستوى 1 يكسر الصفحة، فالصفحة 1 صفحة افتتاح ولا تطبع رقمًا، كما يقتضي التنسيق. والغلافان عنوانان من المستوى 1 أيضًا؛ و:::numbering{startAt=1} بين باطن الغلاف والعنوان يجعل لصفحة العنوان الرقم 1، وتطبع الصفحة التالية 2. يضبط نمط العنوان سطرًا من 12 نقطة؛ وبمقاس المستوى 1 الأصلي، 18 نقطة، كان العنوان سيقع على سطر من 21.6 نقطة ويدفع FADE IN: إلى الأسفل 9.6 نقاط.

الوصفة كاملة

Sandbox
// ═══ Postext Cookbook · Nº 061 · Screenplay format ═══════════════════════════════
// https://postext.dev/en/cookbook/screenplay-format
// Code: MIT · Text: original (CC BY 4.0) · Pictures: none
// Fonts: Courier Prime, Oswald (SIL OFL 1.1), Special Elite (Apache 2.0) · Needs postext ≥ 1.25.0
import { buildDocumentWithFonts, renderPageToCanvas } from 'https://esm.sh/postext';

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

// ─── 1 · Design ─────────────────────────────────────────────────────────────
const palette = { // black type on white bond, and a card cover in goldenrod
  ink: '#1b1b1b', // every line of the script
  paper: '#ffffff',
  hole: '#e3e1db', // the punched holes down the left edge of each script page
  card: '#e6b84a', // the cover stock
  cardDark: '#b98a2a', // the label's shadow and the rims of the punched holes
  cardInk: '#4a3510', // the small print on the cover (6.3:1 on the card)
  brass: '#a8812f', // the brads
  brassLight: '#e9cf82', // the glint on each brad
  stamp: '#8f231c', // the draft stamp (4.7:1 on the card)
};
// Every colour is linked to its palette entry by id.
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
// The engine's defaults link to main-color: pointed at the ink, anything left unset prints black.
const colorPalette = Object.entries({ ...palette, 'main-color': palette.ink })
  .map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));
const TEXT = 'Courier Prime';
const IN = 25.4; // mm in an inch: the format is specified in inches
const LEAD = 12; // pt: 12-point Courier at six lines to the inch, so one line is one grid line
const at = (to, edge, x = 0, y = 0) => ({ anchor: { to, edge }, offset: { x: mm(x), y: mm(y) } });

// #region page: US Letter, a 1.5-inch binding margin, Courier 12 on 12, ragged right
const MARGIN = { top: 1, bottom: 1, left: 1.5, right: 1 }; // inches: the left one takes the brads
const page = { sizePreset: 'custom', width: mm(8.5 * IN), height: mm(11 * IN), dpi: 150,
  margins: { top: mm(MARGIN.top * IN), bottom: mm(MARGIN.bottom * IN),
    left: mm(MARGIN.left * IN), right: mm(MARGIN.right * IN) } };
const bodyText = { fontFamily: TEXT, fontSize: pt(12), lineHeight: pt(LEAD), color: col('ink'),
  textAlign: 'left', firstLineIndent: pt(0), // action: flush left, never justified
  paragraphSpacing: true }; // a blank line between paragraphs
// #endregion

// #region answer: a speech is a callout with no frame, padded to the 3.5-inch dialogue block
// Positions from the left edge of the sheet, in inches, as screenwriting software gives them.
const DIALOGUE = { left: 2.5, right: 6 }; // the block of speech, 3.5 inches wide
const CUE = 3.7; // the character's name
const TEXT_RIGHT = 8.5 - MARGIN.right; // 7.5: where action lines end
const dialogue = {
  id: 'dialogue',

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

تنويعات

#أعِد الحوارات إلى الشبكة

عندئذ يحتفظ كل حوار بهامشه السفلي ويضيف الحوار التالي هامشه العلوي، فيبقى سطران فارغان بين الحوارات (وثلاثة قبل عنوان المشهد)، ويُدفع السيناريو إلى صفحة رابعة.

-  snapToGrid: false,
 };

#اكتب عناوين المشاهد بوزن عادي

كانت عناوين المشاهد في السيناريوهات المكتوبة بالآلة الكاتبة بحروف كبيرة عادية؛ وجاء الخط العريض مع برامج كتابة السيناريو.

-  fontSize: pt(12), fontWeight: 700, lineHeight: 1, color: col('ink'), align: 'left',
+  fontSize: pt(12), fontWeight: 400, lineHeight: 1, color: col('ink'), align: 'left',
-      fontWeight: 700, lineHeight: 1, color: col('ink'), align: 'left', overflow: 'wrap',
+      fontWeight: 400, lineHeight: 1, color: col('ink'), align: 'left', overflow: 'wrap',

أخطاء شائعة

  • لا يطبع Postext (MORE) تحت حوار ينكسر بين صفحتين، ولا يكرر الاسم فوق بقيته. اترك keepTogether على قيمته الافتراضية كي ينتقل الحوار كاملًا إلى الصفحة التالية.
  • تضيف برامج كتابة السيناريو (CONT'D) إلى الاسم تلقائيًا. أما هنا فهي جزء من title في سطر الفتح، فاكتبها بنفسك حيث يستأنف حوار شخصية بعد سطر من وصف الحدث.
  • لا يُبقي titleStyle.lineHeight الحوار على الشبكة إلا ما دام مساويًا لتباعد أسطر المتن. والاسم المنضّد بحجم أكبر أو أصغر يحتاج إلى هذه النقاط الاثنتي عشرة نفسها؛ وإلا أخرج كل حوار الأسطر التي تليه عن الشبكة.

الحقوق

الوصفة
Ignacio Ferro
النص
نص أصلي, CC BY 4.0
الخطوط
Courier Prime (SIL OFL 1.1) · Special Elite (Apache 2.0) · Oswald (SIL OFL 1.1)
الشيفرة
MIT، مثل Postext
Sandbox