跳到主要内容
食谱编号152

排版食谱 · 第11章 · 漫画与连环画

带旁白框的清线风格欧式漫画页

一页四排的法比式漫画:细边框、贴角的黄色旁白框、大小写混排的对话框,全部来自 comics 配置。

本页内容
类型
漫画
输出
Canvas · PDF
难度
中级
Postext
已用Postext 1.65.0测试
需要≥ 1.25.0 · postext-pdf ≥ 1.25.0
许可证
更新于2026年10月10日
代码MIT · 文本CC BY 4.0

页码2–3 · 第1–2页,共2页

  • 成品尺寸230 × 300 mm
  • 1栏
  • Noto Sans SC 11/15
  • ZCOOL KuaiLe
  • 2页
  • 难度
  • Postext 1.65.0
  • 排版用时640 ms
  • 140行代码

简单来说

一页欧洲漫画画册:叙述者的话放在黄色方框里,对白放在对白框里,用纯文本写成,由 Postext 用十种语言嵌字。

成品一览

一本西班牙漫画画册的第一个故事《卡门的橙子》:偶数页是扉页,对面是一页七格、分四排的漫画,正是法比漫画画册的画法。九岁的萝拉星期天跟帕科爷爷去菜市场,从卡门的橙子塔最底下抽了一个橙子。画面是平涂色彩的清线风格;边框细而直角,旁白放在贴住格角的黄色方框里,对白按欧洲嵌字师的习惯大小写混排。文字写在 Markdown 里,每种语言一个文件:西班牙语原文,然后是英语、加泰罗尼亚语、中文、阿拉伯语、日语、葡萄牙语、法语、德语和意大利语,引擎在同一套分格、同一批画面上逐一嵌字。

这道食谱解答

  • 怎样排一页带旁白框的欧式漫画画册?
  • 怎样用Markdown写对话框?

简短回答

script.js · 第42–66行在完整代码中
const comics = {
  gutter: { horizontal: mm(4.5), vertical: mm(3.5) }, // between tiers, between panels
  panel: { borderWidth: pt(0.75), borderColor: col('ink'), background: col('paper') },
  panelStyles: [{ id: 'open', borderStyle: 'none' }], // the last panel: an epilogue, unframed
  lettering: { fontFamily: LETTER, fontSize: pt(LATIN ? 9 : 8), lineHeight: 1.1,
    color: col('ink'), textTransform: 'none' }, // European letterers write in mixed case
  balloonStyles: [
    { id: 'speech', fill: col('balloon'), stroke: col('ink'), strokeWidth: pt(0.6) },
    // Narration: rectangles butted into a corner of the panel, never with a tail.
    { 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: 'thought', fill: col('balloon'), stroke: col('ink') },
    { id: 'sfx', fontFamily: DISPLAY, color: col('orange'), halo: pt(1.6), haloColor: col('ink'),
      fontScale: 2.8 },
  ],
  cast: [ // names for the tagged PDF and EPUB, which read the balloons aloud
    { 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' }) },
    { id: 'carmen', name: 'Carmen' },
  ],
  runningHeads: true, // the folio prints on the comic page too
};

用料

类型
Patrick Hand, Bangers, Noto Sans SC, ZCOOL KuaiLe, Zen Antique, Dela Gothic One, Playpen Sans Arabic, Lalezar(SIL OFL 1.1)
素材
  • t1.jpg
  • t2.jpg
  • t3.jpg
  • t4.jpg
  • t5.jpg
  • t6.jpg
  • t7.jpg
  • A sunny Sunday in Madrid: an iron-and-glass market hall on a plaza with shoppers and pigeons. (Generated With Diffusion Models, 原创)
  • Inside the market, Lola pulls her grandfather Paco by the hand, pointing ahead between the stalls. (Generated With Diffusion Models, 原创)
  • Lola gazes up at a towering pyramid of oranges while Carmen, the fruit seller, polishes an orange. (Generated With Diffusion Models, 原创)
  • Lola reaches for an orange at the bottom of the pile; Paco, alarmed, raises a hand to stop her. (Generated With Diffusion Models, 原创)
  • The orange pyramid collapses: oranges roll everywhere, Paco's beret flies off, Carmen throws up her hands, pigeons scatter. (Generated With Diffusion Models, 原创)
  • Lola, Paco and Carmen kneel to gather the oranges into the beret and the apron, laughing; a pigeon pecks one. (Generated With Diffusion Models, 原创)
  • On a park bench, Lola and Paco peel oranges and laugh; a pigeon sits on Paco's beret. (Generated With Diffusion Models, 原创)

做法

#1 · 画册的样子就是一份 comics 配置

代码就是上面的简短回答。comics.panel 设定所有边框(0.75 pt 的墨线、直角),panelStyles 再加一个无边框的命名样式,最后一格用 style=open 取用它:公园长椅上的尾声,已经离开了市场。内置的对话框样式按 id 重新定义:caption 变成带细边的淡黄色方框,shout 是十六个尖角的爆炸框,sfx 用橙子的橙色加墨色描边。嵌字保留 textTransform: 'none';美式漫画会设成 'uppercase'。

这一页在内容里只是一个指令:一棵分格树和七个画格,每格带自己的台词:

:::page{split="25 [60 | *] / 25 [55 | *] / 24 / * [50 | *]"}
::panel{art=t1}
caption: 每个星期天,帕科爷爷和我都去菜市场。
caption{at=bottom-end}: 总是同一个时间,总是走同一扇门。
::panel{art=t4}
lola{thought}: 最下面那个最大。
paco{shout}: 萝拉,别拿那个!

caption 是旁白框(第一个放在阅读起始一侧的上角),{at=bottom-end} 把第二个送到对角,lola、paco 这样的说话人 id 会画出对话框,尾巴指向画面声明的嘴巴位置。

#2 · 画面知道谁在哪里说话

script.js · 第163–337行在完整代码中
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 = {
  t1: { width: 1100, height: 733, safeArea: box([.22, .17, .62, .6]),
    alt: t({ en: 'A sunny Sunday in Madrid: an iron-and-glass market hall on a plaza with shoppers '
        + 'and pigeons.',
      es: 'Un domingo de sol en Madrid: un mercado de hierro y cristal en una plaza, con gente de '
        + 'compras y palomas.',
      ca: 'Un diumenge de sol a Madrid: un mercat de ferro i vidre en una plaça, amb gent '
        + 'comprant i coloms.',
      zh: '马德里一个晴朗的星期天:广场上一座铁架玻璃顶的市场,有买菜的人和鸽子。',
      ar: 'يوم أحد مشمس في مدريد: سوق من الحديد والزجاج في ساحة، فيها متسوّقون وحمام.',
      ja: '晴れた日曜日のマドリード。広場に鉄とガラスの市場が建ち、買い物客とハトがいる。',
      pt: 'Um domingo de sol em Madri: um mercado de ferro e vidro numa praça, com gente fazendo '
        + 'compras e pombos.',
      fr: 'Un dimanche ensoleillé à Madrid : une halle de fer et de verre sur une place, avec des '
        + 'passants qui font leurs courses et des pigeons.',
      de: 'Ein sonniger Sonntag in Madrid: eine Markthalle aus Eisen und Glas an einem Platz, mit '
        + 'Leuten beim Einkaufen und Tauben.',
      it: 'Una domenica di sole a Madrid: un mercato coperto di ferro e vetro in una piazza, '
        + 'con gente che fa la spesa e piccioni.' }),
  },
  t2: { width: 1000, height: 1000, safeArea: box([.2, .13, .71, .46]),
    alt: t({ en: 'Inside the market, Lola pulls her grandfather Paco by the hand, pointing ahead '
        + 'between the stalls.',
      es: 'Dentro del mercado, Lola tira de la mano de su abuelo Paco y señala adelante, entre '
        + 'los puestos.',
      ca: 'Dins del mercat, la Lola estira el seu avi Paco de la mà i assenyala endavant, entre '
        + 'les parades.',
      zh: '市场里,萝拉拉着爷爷帕科的手,指着摊位之间的前方。',
      ar: 'داخل السوق تشدّ لولا جدّها باكو من يده وتشير إلى الأمام بين الأكشاك.',
      ja: '市場の中、ローラが祖父パコの手を引き、売り場のあいだの先を指さしている。',
      pt: 'Dentro do mercado, Lola puxa o avô Paco pela mão e aponta adiante, entre as '
        + 'bancas.',
      fr: 'Dans le marché, Lola tire son grand-père Paco par la main et montre du doigt les étals, '
        + 'devant eux.',
      de: 'In der Markthalle zieht Lola ihren Großvater Paco an der Hand und zeigt nach vorn, '
        + 'zwischen die Stände.',
      it: 'Dentro il mercato, Lola tira per mano il nonno Paco e indica davanti a sé, tra le '
        + 'bancarelle.' }),
    anchors: [
      who('paco', .315, .28, [.32, .2], [.22, .13, .17, .19]),
      who('lola', .7, .415, [.66, .33], [.6, .3, .17, .17]),
    ],
    avoid: [box([.82, .4, .1, .06])],
  },
  t3: { width: 1200, height: 800, safeArea: box([.13, .12, .79, .58]),
    alt: t({ en: 'Lola gazes up at a towering pyramid of oranges while Carmen, the fruit seller, '
        + 'polishes an orange.',
      es: 'Lola mira hacia arriba una pirámide altísima de naranjas mientras Carmen, la frutera, '
        + 'saca brillo a una naranja.',
      ca: 'La Lola mira amunt una piràmide altíssima de taronges mentre la Carmen, la fruitera, '
        + 'fa brillar una taronja.',
      zh: '萝拉仰头望着一座高高的橙子金字塔,水果摊主卡门正在擦亮一个橙子。',
      ar: 'لولا تنظر إلى هرم عالٍ من البرتقال، بينما كارمن بائعة الفاكهة تلمّع برتقالة.',
      ja: 'ローラがそびえるオレンジのピラミッドを見上げ、果物屋のカルメンはオレンジをみがいている。',
      pt: 'Lola olha para cima, para uma pirâmide altíssima de laranjas, enquanto Carmen, a '
        + 'feirante, lustra uma laranja.',
      fr: 'Lola lève les yeux vers une immense pyramide d’oranges pendant que Carmen, la '
        + 'marchande de fruits, fait briller une orange.',
      de: 'Lola blickt zu einer riesigen Orangenpyramide hinauf, während Carmen, die '
        + 'Obsthändlerin, eine Orange blank reibt.',
      it: 'Lola alza lo sguardo verso un’altissima piramide di arance, mentre Carmen, la '
        + 'fruttivendola, lucida un’arancia.' }),
    anchors: [
      who('lola', .235, .43, [.19, .36], [.14, .3, .13, .18]),
      who('carmen', .795, .27, [.8, .19], [.74, .12, .13, .19]),
    ],
    avoid: [box([.4, .2, .2, .15])],
  },
  t4: { width: 1152, height: 1152, safeArea: box([.08, .08, .76, .65]),
    alt: t({ en: 'Lola reaches for an orange at the bottom of the pile; Paco, alarmed, raises a '
        + 'hand to stop her.',
      es: 'Lola alarga la mano hacia una naranja de la base del montón; Paco, alarmado, levanta '
        + 'la mano para detenerla.',
      ca: 'La Lola allarga la mà cap a una taronja de la base de la pila; en Paco, alarmat, '
        + 'aixeca la mà per aturar-la.',
      zh: '萝拉伸手去拿最底下的一个橙子;帕科吓了一跳,举手想拦住她。',
      ar: 'لولا تمدّ يدها إلى برتقالة في أسفل الكومة، وباكو مذعورًا يرفع يده ليوقفها.',
      ja: 'ローラが山のいちばん下のオレンジに手をのばし、あわてたパコが止めようと手を上げる。',
      pt: 'Lola estica a mão para uma laranja da base da pilha; Paco, assustado, levanta a mão '
        + 'para impedi-la.',
      fr: 'Lola tend la main vers une orange tout en bas de la pile ; Paco, alarmé, lève la main '
        + 'pour l’arrêter.',
      de: 'Lola greift nach einer Orange ganz unten im Stapel; Paco hebt erschrocken die Hand, '
        + 'um sie aufzuhalten.',
      it: 'Lola allunga la mano verso un’arancia in fondo alla pila; Paco, allarmato, alza la '
        + 'mano per fermarla.' }),
    anchors: [
      who('paco', .31, .3, [.28, .17], [.17, .1, .2, .26]),
      who('lola', .635, .485, [.61, .38], [.48, .28, .27, .27]),
    ],
    // Lola's reaching arm and her hand on the orange: the thought balloon keeps off them.
    avoid: [box([.62, .58, .17, .22]), box([.7, .78, .15, .1]), box([.1, .36, .15, .19])],
  },
  t5: { width: 1100, height: 733, safeArea: box([.06, .16, .9, .41]),
    alt: t({ en: "The orange pyramid collapses: oranges roll everywhere, Paco's beret flies off, "
        + "Carmen throws up her hands, pigeons scatter.",
      es: 'La pirámide se derrumba: las naranjas ruedan por todas partes, la boina de Paco sale '
        + 'volando, Carmen levanta los brazos y las palomas huyen.',
      ca: 'La piràmide s’enfonsa: les taronges rodolen per tot arreu, la boina d’en Paco surt '
        + 'volant, la Carmen aixeca els braços i els coloms fugen.',
      zh: '橙子金字塔塌了:橙子滚得到处都是,帕科的贝雷帽飞了出去,卡门举起双手,鸽子四散飞走。',
      ar: 'ينهار هرم البرتقال: البرتقال يتدحرج في كل مكان، وقبعة باكو تطير، وكارمن ترفع يديها، '
        + 'والحمام يتفرّق.',
      ja: 'オレンジのピラミッドがくずれる。オレンジが転がり、パコのベレー帽が飛び、カルメンが両手を上げ、ハトが散る。',
      pt: 'A pirâmide de laranjas desaba: laranjas rolam por toda parte, a boina de Paco sai '
        + 'voando, Carmen ergue os braços e os pombos fogem.',
      fr: 'La pyramide d’oranges s’effondre : les oranges roulent partout, le béret de Paco '
        + 's’envole, Carmen lève les bras et les pigeons s’égaillent.',
      de: 'Die Orangenpyramide stürzt ein: Überall rollen Orangen, Pacos Baskenmütze fliegt '
        + 'davon, Carmen reißt die Arme hoch, und die Tauben flattern auf.',
      it: 'La piramide di arance crolla: le arance rotolano dappertutto, il basco di Paco vola '
        + 'via, Carmen alza le braccia e i piccioni si sparpagliano.' }),
    anchors: [
      who('lola', .15, .44, [.14, .37], [.08, .32, .12, .15]),
      who('paco', .34, .31, [.33, .27], [.27, .22, .12, .14]),
      who('carmen', .81, .37, [.8, .3], [.74, .22, .13, .18]),
      who('sfx', .55, .45),
    ],
    avoid: [box([.24, .12, .09, .1])],
  },
  t6: { width: 1200, height: 800, safeArea: box([.15, .1, .68, .58]),
    alt: t({ en: 'Lola, Paco and Carmen kneel to gather the oranges into the beret and the apron, '
        + 'laughing; a pigeon pecks one.',
      es: 'Lola, Paco y Carmen, de rodillas, recogen las naranjas en la boina y el delantal entre '
        + 'risas; una paloma picotea una.',
      ca: 'La Lola, en Paco i la Carmen, de genolls, recullen les taronges a la boina i al '
        + 'davantal entre rialles; un colom en picoteja una.',
      zh: '萝拉、帕科和卡门跪在地上,笑着把橙子捡进贝雷帽和围裙里;一只鸽子在啄一个橙子。',
      ar: 'لولا وباكو وكارمن جاثون يجمعون البرتقال في القبعة والمريلة وهم يضحكون، وحمامة تنقر '
        + 'واحدة.',
      ja: 'ローラとパコとカルメンがひざをつき、笑いながらオレンジをベレー帽とエプロンに集める。ハトが一つつついている。',
      pt: 'Lola, Paco e Carmen, de joelhos, juntam as laranjas na boina e no avental, rindo; um '
        + 'pombo bica uma delas.',
      fr: 'Lola, Paco et Carmen, à genoux, ramassent en riant les oranges dans le béret et le '
        + 'tablier ; un pigeon en picore une.',
      de: 'Lola, Paco und Carmen knien und sammeln lachend die Orangen in die Mütze und die '
        + 'Schürze; eine Taube pickt an einer.',
      it: 'Lola, Paco e Carmen, in ginocchio, raccolgono ridendo le arance nel basco e nel '
        + 'grembiule; un piccione ne becca una.' }),
    anchors: [
      who('lola', .245, .42, [.24, .33], [.17, .27, .14, .2]),
      who('paco', .49, .3, [.48, .22], [.42, .14, .14, .2]),
      who('carmen', .73, .28, [.73, .2], [.67, .12, .13, .19]),
    ],
    avoid: [box([.74, .75, .14, .2])],
  },
  t7: { width: 1300, height: 867, safeArea: box([.19, .17, .56, .58]),
    alt: t({ en: "On a park bench, Lola and Paco peel oranges and laugh; a pigeon sits on Paco's "
        + "beret.",
      es: 'En un banco del parque, Lola y Paco pelan naranjas y se ríen; una paloma se ha posado '
        + 'en la boina de Paco.',
      ca: 'En un banc del parc, la Lola i en Paco pelen taronges i riuen; un colom s’ha posat a '
        + 'la boina d’en Paco.',
      zh: '公园长椅上,萝拉和帕科剥着橙子笑着;一只鸽子停在帕科的贝雷帽上。',
      ar: 'على مقعد في الحديقة يقشّر لولا وباكو البرتقال ويضحكان، وحمامة تقف على قبعة باكو.',
      ja: '公園のベンチでローラとパコがオレンジをむいて笑っている。パコのベレー帽にハトがとまっている。',
      pt: 'Num banco de praça, Lola e Paco descascam laranjas e riem; um pombo pousou na boina '
        + 'de Paco.',
      fr: 'Sur un banc du parc, Lola et Paco épluchent des oranges en riant ; un pigeon s’est posé '
        + 'sur le béret de Paco.',
      de: 'Auf einer Parkbank schälen Lola und Paco Orangen und lachen; auf Pacos Mütze sitzt '
        + 'eine Taube.',
      it: 'Su una panchina del parco, Lola e Paco sbucciano arance ridendo; un piccione si è '
        + 'posato sul basco di Paco.' }),
    anchors: [
      who('lola', .32, .45, [.31, .35], [.24, .3, .15, .22]),
      who('paco', .6, .38, [.65, .25], [.54, .2, .19, .24]),
    ],
    avoid: [box([.6, .01, .13, .15])],
  },

};

每幅画都声明裁切时必须保留的部分(safeArea)、每个说话人的嘴、头和脸的位置(anchors),以及不许被对话框遮住的地方(avoid),全部用画面的比例表示。橙子塔倒塌的那一格占满第三排,200 毫米宽、63 毫米高,所以它的安全区是人脸和飞起的橙子那一条;方形的画格则裁掉地面。这些都与语言无关,十个版本共用。

#3 · 扉页对着故事

script.js · 第70–86行在完整代码中
const centred = (id, y) => ({ anchor: { to: id, edge: 'below' }, offset: { y: mm(y) },
  size: { width: 'fill', height: 'auto' } }); // full width, so align: 'center' centres it
const titlePage = {
  id: 'title-page', numbered: false, toc: false, breakBefore: { enabled: true, parity: 'any' },
  advancedDesign: { enabled: true, minHeight: mm(212), slot: { elements: [
    { kind: 'text', id: 'series', content: '{attr.series}', fontFamily: LETTER, fontSize: pt(17),
      color: col('ink'), align: 'center', overflow: 'wrap',
      placement: { anchor: { to: 'container', edge: 'top-left' }, offset: { y: mm(24) },
        size: { width: 'fill', height: 'auto' } } },
    { kind: 'text', id: 'title', content: '{titleText}', fontFamily: DISPLAY, fontSize: pt(58),
      lineHeight: 1.05, color: col('orange'), align: 'center', overflow: 'wrap',
      placement: centred('#series', 5) },
    { kind: 'image', id: 'vignette', resourceId: 't3', decorative: true, // 3 : 2, uncropped
      placement: { anchor: { to: '#title', edge: 'below' }, offset: { x: mm(10), y: mm(14) },
        size: { width: mm(180), height: mm(120) } } },
  ] } },
};

扉页是一个标题样式:系列名用嵌字字体,书名用拟声词的字体(Bangers,其他文字分别是 Dela Gothic One、ZCOOL KuaiLe 和 Lalezar),下面是一幅卡门水果摊的小图,保持 3 : 2 的原比例。构建时传入 continuation: { pageIndexOffset: 1 },扉页就落在偶数页,故事从对面的第 3 页开始。

完整食谱

沙盒
// ═══ Postext Cookbook · Nº 152 · An album page in clear line, with narration captions ═══
// https://postext.dev/en/cookbook/tebeo-album-page
// 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.25.0
// A Spanish album page in the Franco-Belgian way: four tiers, yellow narration boxes, and
// balloons lettered in upper and lower case. Every edition re-letters the same split and art.
import {
  buildDocument, withLoadedFonts, renderPageToCanvas, registerResourceImage, defaultComicFont,
  defaultComicSfxFont,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';

const LANG = 'zh'; // @lang: 'es' | 'en' | 'ca' | 'zh' | 'ar' | 'ja' | 'pt' | 'fr' | 'de' | 'it'
const RECIPE = 'tebeo-album-page';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: flat clear-line colours: ink, the oranges, the yellow of the cartouches
const palette = {
  ink: '#1d1b19', // outlines, lettering
  orange: '#d9601a', // the title and the sound effect (3.6:1 on paper, display sizes only)
  cartouche: '#fbe8a6', // narration boxes
  balloon: '#ffffff',
  muted: '#5f5a54', // credits
  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' });
// A hand that letters in upper and lower case for the Latin editions; the engine's comic
// faces for Chinese, Japanese and Arabic, which a Latin hand cannot set.
const LATIN = ['es', 'en', 'ca', 'pt', 'fr', 'de', 'it'].includes(LANG);
const LETTER = LATIN ? 'Patrick Hand' : defaultComicFont(LOCALE);
const DISPLAY = defaultComicSfxFont(LOCALE); // Bangers, Dela Gothic One, ZCOOL KuaiLe, Lalezar

// #region answer: the album's look: thin square frames, yellow cartouches, mixed-case lettering
const comics = {
  gutter: { horizontal: mm(4.5), vertical: mm(3.5) }, // between tiers, between panels
  panel: { borderWidth: pt(0.75), borderColor: col('ink'), background: col('paper') },
  panelStyles: [{ id: 'open', borderStyle: 'none' }], // the last panel: an epilogue, unframed
  lettering: { fontFamily: LETTER, fontSize: pt(LATIN ? 9 : 8), lineHeight: 1.1,
    color: col('ink'), textTransform: 'none' }, // European letterers write in mixed case
  balloonStyles: [

组合好的script.js可以直接运行:把它粘贴到任何页面的模块脚本中,或在CodePen上打开这道食谱。 GitHub上的食谱文件夹 ↗ (在新标签页中打开)

变化

#像美式漫画那样用大写字母嵌字

把嵌字设为大写;旁白和对白都随之改变,没有大小写的文字(中文、日文、阿拉伯文)保持原样。

-    color: col('ink'), textTransform: 'none' }, // European letterers write in mixed case
+    color: col('ink'), textTransform: 'uppercase' },

常见问题

  • 全书的嵌字字号只有一个:译文更长时,对话框会变大、挪位置,但字不会缩小。改动分格之后,请检查加泰罗尼亚语和阿拉伯语的页面。日文的竖排对这些扁格子来说太高:content.ja.md 里有三行带着 at=,让对话框避开帕科,也避开最后一格里说到的橙子。
  • 每格的替代文字以十种语言写在画面清单里,由 t({ … }) 选取;列表里缺的语言会读第一种。在内容文件里写 ::panel{alt="…"} 可以替换某一格的替代文字。

致谢

文本
  • Las naranjas de Carmen (Carmen's Oranges), a one-page comic written for this recipe, in six languages · Postext Cookbook · CC BY 4.0
图片
  • A sunny Sunday in Madrid: an iron-and-glass market hall on a plaza with shoppers and pigeons. · Generated With Diffusion Models · 原创
  • Inside the market, Lola pulls her grandfather Paco by the hand, pointing ahead between the stalls. · Generated With Diffusion Models · 原创
  • Lola gazes up at a towering pyramid of oranges while Carmen, the fruit seller, polishes an orange. · Generated With Diffusion Models · 原创
  • Lola reaches for an orange at the bottom of the pile; Paco, alarmed, raises a hand to stop her. · Generated With Diffusion Models · 原创
  • The orange pyramid collapses: oranges roll everywhere, Paco's beret flies off, Carmen throws up her hands, pigeons scatter. · Generated With Diffusion Models · 原创
  • Lola, Paco and Carmen kneel to gather the oranges into the beret and the apron, laughing; a pigeon pecks one. · Generated With Diffusion Models · 原创
  • On a park bench, Lola and Paco peel oranges and laugh; a pigeon sits on Paco's beret. · 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)
沙盒PDF