باختصار
قصة مصوّرة تمتد على صفحتين متقابلتين كأنهما صفحة واحدة: رسم عريض لسوق مزدحم يعبر وسط الكتاب، وتحته ثلاثة إطارات.
ما الذي ستنضده
القصة الثانية من ألبوم الوصفة 152، «جدي!»، مرويّة على صفحتين متقابلتين. في يوم سبت من ديسمبر يزدحم السوق، فتضيع لولا من جدها بين الناس. النصف الأعلى من الصفحتين لقطة بانورامية واحدة بعرض 432 مم: لولا صغيرة في أقصى اليسار، وباكو يبحث عنها في أقصى اليمين، وبينهما ممر السوق يمتد حتى الطيّة. وتحتها ثلاثة إطارات: لولا وحدها بين سيقان الكبار، وباكو يصفّر بأصابعه واقفًا على صندوق فاكهة، ثم اللقاء والقبعة تطير في الهواء. يُكتب التقسيم مرة واحدة للصفحتين، فتعبر البانوراما الكعب ويقع فاصل الصف السفلي على الطيّة. الأصل إسباني، وتكتب الطبعات الإنجليزية والكتالونية والصينية والعربية واليابانية والبرتغالية والفرنسية والألمانية والإيطالية حوارها على الصفحتين نفسيهما.
تجيب هذه الوصفة عن
- كيف أمدّ صفحة قصة مصورة على صفحتين متقابلتين؟
الجواب المختصر
// The content writes :::page{spread split="55 / * [25 | 25 | *]"}: one frame from the verso's
// outer margin to the recto's (the inner margins drop out), split as one page. The panorama
// crosses the spine; the line at 50 % of the lower tier is the spine itself, so its gutter
// straddles the fold and no panel is cut by it.
const comics = {
gutter: { horizontal: mm(5), vertical: mm(4) }, // 2 mm of white on each side of the fold
panel: { borderWidth: pt(0.75), borderColor: col('ink'), background: col('paper') },
lettering: { fontFamily: LETTER, fontSize: pt(LATIN ? 9.5 : 8.5), lineHeight: 1.1,
color: col('ink') },
runningHeads: true, // folios on both halves
};
// A spread opens on a verso, an even page. Page 1 of a document is a recto, so the engine
// would leave it blank and start on page 2; this episode continues an album at page 2.
const continuation = { pageIndexOffset: 1, pageNumbering: { startAt: 2 } };
المكونات
- الميزات
- الصفحات المزدوجة في القصص المصورةتقسيم الإطاراترسم الإطار وقصّهالشخصيات ونقاط الارتكازصفحات القصص المصورةكتابة نصوص القصص المصورةإعادة كتابة النصوص بلغات أخرىأنماط الفقاعاتحدود الإطارات والفواصلهوامش متناظرةلوحة ألوان دلاليةصفحات على اللوحة (Canvas)التصدير إلى PDF
- تستخدم أيضًا
- أشكال الأرقام في الأعداد المولَّدةلون الورقالترويسات بحسب دور الصفحةالخطوط المضمَّنة في PDFالأشكال والجداول بوصفها مواردكتب مجلّدة من اليمينالمؤثرات الصوتيةالنص من اليمين إلى اليسار
- الخطوط
- Patrick Hand, Bangers, Noto Sans SC, ZCOOL KuaiLe, Zen Antique, Dela Gothic One, Playpen Sans Arabic, Lalezar (SIL OFL 1.1)
- الأصول
ds1-1900.jpgds2.jpgds3.jpgds4.jpg- Panorama of the crowded market hall: tiny Lola stands lost on the far left; far right, her grandfather searches the crowd. (Generated With Diffusion Models, أصلي)
- Lola, tearful, stands among grown-ups' legs and shopping bags. (Generated With Diffusion Models, أصلي)
- Paco stands on a fruit crate and whistles through his fingers; shoppers turn to look. (Generated With Diffusion Models, أصلي)
- Lola leaps into her grandfather's arms; his beret flies off and the stallholders smile. (Generated With Diffusion Models, أصلي)
طريقة التحضير
#1 · تقسيم واحد للصفحتين
الشيفرة في الجواب المختصر. القصة كلها توجيه واحد بعلامة spread:
:::page{spread split="55 / * [25 | 25 | *]"}
::panel{art=ds1}
caption: في يوم سبت من ديسمبر، كان السوق مزدحمًا عن آخره.
lola: جدي؟
paco{shout}: لولا؟ لولااا!يمتد الإطار من الهامش الخارجي للصفحة الزوجية إلى الهامش الخارجي للفردية، وتختفي الهوامش الداخلية. الصف الأول، 55 % من الارتفاع، إطار واحد يعبر الكعب. وفي الثاني يضع 25 | 25 | * خطه الأول عند 25 % والثاني عند 50 %، أي عند الكعب نفسه: إطاران مربعان في صفحة واللقاء في الأخرى. تبدأ الصفحتان المتقابلتان بصفحة زوجية، والصفحة الأولى من المستند فردية، لذلك يمرّر البناء continuation: { pageIndexOffset: 1 }: تكمل هذه الحلقة الألبوم من الصفحة 2، ولا تسبقها صفحة بيضاء.
#2 · بانوراما تكفي صفحتين
// The panorama is 1,900 px wide: across the 432 mm of the spread it prints at about 112 dpi.
const box = ([x, y, width, height]) => ({ x, y, width, height });
const who = (id, x, y, head, face) => ({ id, x, y,
...(head && { head: { x: head[0], y: head[1] } }), ...(face && { face: box(face) }) });
const ART = {
ds1: { width: 1900, height: 633, safeArea: box([.03, .27, .93, .53]),
alt: t({ en: 'Panorama of the crowded market hall: tiny Lola stands lost on the far left; '
+ 'far right, her grandfather searches the crowd.',
es: 'Panorámica del mercado lleno de gente: a la izquierda del todo, Lola, '
+ 'diminuta, está perdida; a la derecha del todo, su abuelo la busca entre la multitud.',
ca: 'Panoràmica del mercat ple de gent: a l’extrem esquerre, la Lola, petitíssima, '
+ 'està perduda; a l’extrem dret, el seu avi la busca entre la gentada.',
zh: '拥挤的市场全景:最左边,小小的萝拉迷了路;最右边,她的爷爷在人群中寻找她。',
ar: 'منظر واسع للسوق المزدحم: لولا الصغيرة تائهة في أقصى اليسار، وفي أقصى اليمين '
+ 'جدّها يبحث عنها بين الناس.',
ja: '人でいっぱいの市場のパノラマ。左端に小さなローラが迷子になって立ち、右端では祖父が人ごみの中を探している。',
pt: 'Panorama do mercado lotado: na ponta esquerda, a pequena Lola está perdida; na ponta '
+ 'direita, o avô a procura no meio da multidão.',
fr: 'Panorama de la halle du marché bondée : tout à gauche, la petite Lola est perdue ; '
+ 'tout à droite, son grand-père la cherche dans la foule.',
de: 'Panorama der vollen Markthalle: Ganz links steht die kleine Lola verloren da; ganz '
+ 'rechts sucht ihr Großvater die Menge ab.',
it: 'Panoramica del mercato coperto pieno di gente: all’estrema sinistra la piccola Lola si '
+ 'è persa; all’estrema destra suo nonno la cerca tra la folla.' }),
anchors: [
who('lola', .065, .58, [.063, .55], [.045, .51, .04, .11]),
who('paco', .925, .38, [.925, .34], [.9, .3, .05, .12]),
],
faces: [box([.062, .305, .022, .055])], // the fishmonger behind Lola, who says nothing
},
ds2: { width: 1152, height: 1152, safeArea: box([.31, .08, .35, .62]),
alt: t({ en: "Lola, tearful, stands among grown-ups' legs and shopping bags.",
es: 'Lola, con lágrimas en los ojos, está de pie entre piernas de mayores y bolsas '
+ 'de la compra.',
ca: 'La Lola, amb llàgrimes als ulls, és dreta entre cames de grans i bosses de la compra.',
zh: '萝拉含着眼泪,站在大人们的腿和购物袋之间。',
ar: 'لولا والدموع في عينيها واقفة بين سيقان الكبار وأكياس التسوّق.',
ja: '涙ぐんだローラが、大人の足と買い物袋のあいだに立っている。',
pt: 'Lola, com lágrimas nos olhos, está de pé entre pernas de adultos e sacolas '
+ 'de compras.',
fr: 'Lola, les larmes aux yeux, se tient entre des jambes d’adultes et des sacs de '
+ 'courses.',
de: 'Lola steht mit Tränen in den Augen zwischen Erwachsenenbeinen und Einkaufstaschen.',
it: 'Lola, con le lacrime agli occhi, è in piedi tra gambe di adulti e borse della '
+ 'spesa.' }),
anchors: [
who('lola', .505, .24, [.48, .17], [.4, .1, .18, .19]),
],
},
ds3: { width: 1000, height: 1000, safeArea: box([.34, .07, .47, .23]),
alt: t({ en: 'Paco stands on a fruit crate and whistles through his fingers; shoppers '
+ 'turn to look.',
es: 'Paco, subido a una caja de fruta, silba con los dedos; la gente se vuelve a mirar.',
ca: 'En Paco, enfilat a una caixa de fruita, xiula amb els dits; la gent es gira a mirar.',
zh: '帕科站在水果箱上,用手指吹口哨;买东西的人都回过头来看。',
ar: 'باكو واقف على صندوق فاكهة ويصفّر بأصابعه، والمتسوّقون يلتفتون لينظروا.',
ja: 'パコが果物の木箱に乗って指笛を吹き、買い物客がふり返る。',
pt: 'Paco, em cima de um caixote de frutas, assobia com os dedos; as pessoas se viram '
+ 'para olhar.',
fr: 'Paco, debout sur une cagette de fruits, siffle avec ses doigts ; les clients se '
+ 'retournent.',
de: 'Paco steht auf einer Obstkiste und pfeift auf den Fingern; die Leute drehen sich um.',
it: 'Paco, in piedi su una cassetta della frutta, fischia con le dita; la gente si volta a '
+ 'guardare.' }),
anchors: [
who('paco', .5, .2, [.47, .14], [.38, .08, .17, .16]),
who('sfx', .62, .17),
],
},
ds4: { width: 1200, height: 800, safeArea: box([.33, .05, .48, .57]),
alt: t({ en: "Lola leaps into her grandfather's arms; his beret flies off and the "
+ "stallholders smile.",
es: 'Lola salta a los brazos de su abuelo; la boina sale volando y los tenderos sonríen.',
ca: 'La Lola salta als braços del seu avi; la boina surt volant i els paradistes somriuen.',
zh: '萝拉扑进爷爷怀里;他的贝雷帽飞了出去,摊主们都笑了。',
ar: 'لولا تقفز إلى ذراعي جدّها، وقبعته تطير، والباعة يبتسمون.',
ja: 'ローラが祖父の腕に飛びこむ。ベレー帽が飛び、店の人たちがほほえむ。',
pt: 'Lola pula nos braços do avô; a boina sai voando e os feirantes sorriem.',
fr: 'Lola saute dans les bras de son grand-père ; son béret s’envole et les marchands '
+ 'sourient.',
de: 'Lola springt ihrem Großvater in die Arme; seine Baskenmütze fliegt davon, und die '
+ 'Händler lächeln.',
it: 'Lola salta in braccio al nonno; il basco gli vola via e i bancarellai sorridono.' }),
anchors: [
who('lola', .51, .27, [.47, .2], [.42, .14, .13, .19]),
who('paco', .595, .31, [.62, .22], [.55, .14, .15, .22]),
],
avoid: [box([.67, .06, .13, .22])],
},
};
البانوراما هي الرسم الوحيد الذي يُطبع عبر الطيّة، بقياس 432 × 144 مم، ولذلك عرضها 1900 بكسل (380 كيلوبايت)، والرسوم الثلاثة الأخرى بين 1000 و1200 بكسل. منطقتها الآمنة شريط يكاد يمتد على عرضها كله، وشخصيتاها عند الطرفين، عند 6 % و92 % من العرض، بعيدًا عن الكعب حيث يبتلع التجليد أي فقاعة. رُسمت الصورة ووسطها خالٍ من الوجوه: ممر السوق يمتد حتى الطيّة. الحشد مليء بوجوه لا تقول شيئًا: بائع السمك خلف لولا معلَّم في faces، قائمة وجوه من لا يقولون شيئًا، فتقف فقاعتها الأولى بجانبه ولا تقع أبدًا على وجهه ولا على قبعته، والطبعة اليابانية تثبّت عمودها هناك (at="2.8% 37%").
#3 · فقاعات الألبوم
comics.balloonStyles = [
{ id: 'speech', fill: col('balloon'), stroke: col('ink'), strokeWidth: pt(0.6) },
{ id: 'caption', fill: col('cartouche'), stroke: col('ink'), strokeWidth: pt(0.6),
padding: em(0.45), aspect: 3.4 },
{ id: 'shout', fill: col('balloon'), stroke: col('ink'), burstPoints: 16, fontScale: 1.2 },
{ id: 'whisper', fill: col('balloon'), stroke: col('ink') },
{ id: 'sfx', fontFamily: DISPLAY, color: col('orange'), halo: pt(1.6), haloColor: col('ink'),
fontScale: 3.2 },
];
comics.cast = [
{ id: 'lola', name: 'Lola' },
{ id: 'paco', name: t({ es: 'el abuelo Paco', en: 'Grandpa Paco', ca: "l'avi Paco",
zh: '帕科爷爷', ar: 'الجد باكو', ja: 'パコおじいちゃん', pt: 'o vovô Paco', fr: 'papi Paco',
de: 'Opa Paco',
it: 'nonno Paco' }) },
];
أنماط الفقاعات هي أنماط الوصفة 152: فقاعات بيضاء، ومربعات سرد صفراء باهتة، وانفجار لصرخة باكو، وحدّ متقطع لهمس لولا، والصفير بخط المؤثرات الصوتية في الألبوم (Bangers في الطبعات بالحروف اللاتينية، وLalezar في العربية). يزوّد cast ملفَّي PDF وEPUB بالأسماء التي يقرآنها قبل كل جملة.
الوصفة كاملة
// ═══ Postext Cookbook · Nº 154 · One comic page across a double spread ═══════════════
// https://postext.dev/en/cookbook/comic-double-spread
// Code: MIT · Story: written for the recipe (CC BY 4.0) · Pictures: generated with diffusion models
// Fonts: Patrick Hand, Bangers, the comic faces of each script (OFL) · Needs postext ≥ 1.34.0
// One split tree laid across two facing pages: a panorama runs over the spine, and the
// tier under it splits at the spine's gutter. Same album, same lettering as Nº 152.
import {
buildDocument, withLoadedFonts, renderPageToCanvas, registerResourceImage, defaultComicFont,
defaultComicSfxFont,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
const LANG = 'ar'; // @lang: 'es' | 'en' | 'ca' | 'zh' | 'ar' | 'ja' | 'pt' | 'fr' | 'de' | 'it'
const RECIPE = 'comic-double-spread';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: the album's flat colours
const palette = {
ink: '#1d1b19', // outlines, lettering, folios
orange: '#d9601a', // the sound effect
cartouche: '#fbe8a6', // narration boxes
balloon: '#ffffff',
muted: '#5f5a54', // the colophon
paper: '#fffdf8',
};
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' } })),
{ id: 'main-color', name: 'orange (defaults)', value: { hex: palette.orange, model: 'hex' } },
];
// #endregion
const LOCALE = t({ es: 'es', en: 'en-gb', ca: 'ca', zh: 'zh-Hans', ar: 'ar', ja: 'ja',
pt: 'pt-BR', fr: 'fr', de: 'de', it: 'it' });
const LATIN = ['es', 'en', 'ca', 'pt', 'fr', 'de', 'it'].includes(LANG);
const LETTER = LATIN ? 'Patrick Hand' : defaultComicFont(LOCALE); // mixed-case hand lettering
const DISPLAY = defaultComicSfxFont(LOCALE); // Bangers, Dela Gothic One, ZCOOL KuaiLe, Lalezar
// #region answer: one split across two facing pages, opened on a verso
// The content writes :::page{spread split="55 / * [25 | 25 | *]"}: one frame from the verso's
// outer margin to the recto's (the inner margins drop out), split as one page. The panorama
// crosses the spine; the line at 50 % of the lower tier is the spine itself, so its gutter
// straddles the fold and no panel is cut by it.
const comics = {
gutter: { horizontal: mm(5), vertical: mm(4) }, // 2 mm of white on each side of the fold
panel: { borderWidth: pt(0.75), borderColor: col('ink'), background: col('paper') },
lettering: { fontFamily: LETTER, fontSize: pt(LATIN ? 9.5 : 8.5), lineHeight: 1.1,
color: col('ink') },
يعمل ملف script.js المجمّع كما هو: الصقه في سكربت الوحدة (module) لأي صفحة، أو افتح الوصفة على CodePen. مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)
تنويعات
#ابدأ الكتاب بالصفحتين المتقابلتين
احذف الاستمرار فيترك المحرك الصفحة 1 بيضاء (الدور blank)، وتبقى الصفحتان المتقابلتان في الصفحتين 2 و3.
-const continuation = { pageIndexOffset: 1, pageNumbering: { startAt: 2 } };
+const continuation = {};أخطاء شائعة
- لا تدخل الفقاعات شريطًا عرضه 8 مم حول الكعب، حتى المثبّتة منها بـ
at: الشخصية الواقفة على الطيّة تُدفع فقاعتها إلى أحد الجانبين. أبعد الشخصيات عن وسط الإطار الذي يعبر الكعب. - لا تقع الفقاعة فوق شخصين تتلامس وجوههما، في عناق أو عراك، ولو كان أحدهما المتكلّم. في الطبعتين اليابانية والعربية تُقرأ الصفحتان من اليمين، وينتقل إطار اللقاء إلى الصفحة اليسرى، وتشغل القبعة الطائرة زاويته العليا اليمنى؛ فتذهب فقاعتا باكو إلى السوق بجانب رأسه لا فوق العناق. علّم الوجهين في الرسم (
face) ليرى المحرّك أنهما يتلامسان.
الحقوق
- الوصفة
- Ignacio Ferro
- النص
- ¡Abuelo! (Grandpa!), a two-page comic written for this recipe, in six languages · Postext Cookbook · CC BY 4.0
- الصور
- Panorama of the crowded market hall: tiny Lola stands lost on the far left; far right, her grandfather searches the crowd. · Generated With Diffusion Models · أصلي
- Lola, tearful, stands among grown-ups' legs and shopping bags. · Generated With Diffusion Models · أصلي
- Paco stands on a fruit crate and whistles through his fingers; shoppers turn to look. · Generated With Diffusion Models · أصلي
- Lola leaps into her grandfather's arms; his beret flies off and the stallholders smile. · Generated With Diffusion Models · أصلي
- الخطوط
- Patrick Hand (SIL OFL 1.1) · Bangers (SIL OFL 1.1) · Noto Sans SC (SIL OFL 1.1) · ZCOOL KuaiLe (SIL OFL 1.1) · Zen Antique (SIL OFL 1.1) · Dela Gothic One (SIL OFL 1.1) · Playpen Sans Arabic (SIL OFL 1.1) · Lalezar (SIL OFL 1.1)
- الشيفرة
- MIT، مثل Postext
حرّر هذا الشرح ↗ (يفتح في تبويب جديد)مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)


