かんたんな説明
新聞の漫画面の2ページ。表紙は大きなカラー漫画、中面は漫画家へのインタビューを4段で組み、その下に毎日の4コマ漫画を置きます。
できあがり
週末の新聞『コリントン・デスパッチ』の漫画別刷りで、230 × 310 mmに折ってあります。表紙は『ピップとオットー』の日曜版の半ページ。流氷の上でパン屋を営むペンギンとセイウチの話で、下に目次を置きます。中面は漫画家へのインタビューを4段で組み、読者の手紙と広告を添え、その週の4コマ(正方形のコマが四つ)を記事の下にページ幅で通します。どちらの漫画も新聞の本文にある:::stripのブロックで、別刷りは十言語で出ます。
このレシピが答える質問
- 新聞の紙面に帯漫画を載せるには?
手短な答え
// In the Markdown each strip is a fenced block, where the paper wants it:
// :::strip{split="55 / * [40 | *]" height=210mm} the Sunday half page, on the cover
// :::strip{split="* | * | * | *" span=page} the daily: four square panels
// On the one-column cover the Sunday strip is set in the text, 210 mm deep. Inside, the daily
// follows the article, as wide as its four columns, and the columns of the article end
// level above it (placement=bottom would float it to the page's foot). A strip never
// splits; one that does not fit moves to the next page.
// The panels, gutters and balloons come from the comics settings, as on a comic page.
const comics = {
gutter: { horizontal: mm(3), vertical: mm(3) },
panel: { borderWidth: pt(0.75), borderColor: col('ink'), background: col('paper') },
lettering: { fontFamily: LETTERING, fontSize: pt(7.5), color: col('ink'), inset: mm(1) },
balloonStyles: [
{ id: 'speech', fill: col('paper'), stroke: col('ink') },
{ id: 'whisper', fill: col('paper'), stroke: col('ink') },
{ id: 'shout', fill: col('paper'), stroke: col('ink') },
{ id: 'caption', fill: col('accent'), stroke: col('accent'), color: col('paper'),
fontFamily: LABEL, bold: true },
{ id: 'sfx', fontFamily: SFX, color: col('accent'), haloColor: col('paper') },
],
};
const layout = { layoutType: 'multiple', columnCount: 4, gutterWidth: mm(GUTTER),
columnRule: { enabled: true, color: col('rule'), lineWidth: pt(0.4) } };
材料
- 機能
- 本文中の帯漫画3段以上の段組み段間罫コマの枠線と間白話者とアンカー漫画のページ漫画の写植他言語への写植し直し吹き出しのスタイルデザインした章扉柱とノンブル囲み段落スタイルセマンティックカラーパレットPDFの書き出し節ごとのページ構成図の配置
- 種類
- Newsreader, Archivo Narrow, Comic Neue, Bangers, Noto Serif SC, Noto Sans SC, ZCOOL KuaiLe, ZCOOL QingKe HuangYou, Noto Serif JP, Noto Sans JP, Zen Antique, Dela Gothic One, Noto Naskh Arabic, Noto Kufi Arabic, Playpen Sans Arabic, Lalezar (SIL OFL 1.1)
- 素材
po1.jpgpo2.jpgpo3.jpgpo4.jpgpo5.jpgpo6.jpgpo7.jpg- Strip panel: Pip walks into the bakery (Generated With Diffusion Models, オリジナル)
- Strip panel: Otto and the big croissant (Generated With Diffusion Models, オリジナル)
- Strip panel: Pip and the croissant on the counter (Generated With Diffusion Models, オリジナル)
- Strip panel: Otto eats the croissant (Generated With Diffusion Models, オリジナル)
- Strip panel: fishing on the floe (Generated With Diffusion Models, オリジナル)
- Strip panel: Pip and his fish (Generated With Diffusion Models, オリジナル)
- Strip panel: Otto lands a boot (Generated With Diffusion Models, オリジナル)
作り方
#1 · 新聞が置きたい場所に漫画を書く
コードは前の手短な答えにあります。:::stripの中身は漫画のページと同じ(split、::panelの行、台本)ですが、本文の中のブロックです(帯漫画)。1段組みの表紙では、日曜版は書かれた位置に高さ210 mmで組まれ、目次がその後に続きます。割り方55 / * [40 | *]で、横長の釣りの場面に1段を使い、二つのギャグをその下に並べます。帯漫画は分割されません。入らなければ、まるごと次のページへ移ります。

#2 · 毎日の4コマを段の上にフロートさせる
中面はH1で始まり、その見出しスタイルがこの節を4段組みに切り替えます。4コマは記事の後にspan=pageで書きます。本文が終わる位置に4段ぶんの幅で組まれ、記事の段はその上でそろって終わります。heightもaspectもなければ、帯漫画はコマが正方形になる比率をとり、ここでは4対1です。placement=bottomを足すとページの下にフロートします。記事がそこまで届く長さのときに向く書き方です。placement=topと書くと次のページの頭に出ます。フロートは、書かれた位置より上には行かないからです。
#3 · 絵をそれぞれのコマに合わせる
// From the art manifest; fractions of each picture, the same in every language.
const face = (x, y, width, height) => ({ x, y, width, height });
const ART = {
po1: { width: 1024, height: 1024, safeArea: face(0.11, 0.22, 0.71, 0.45),
anchors: [{ id: 'pip', x: 0.27, y: 0.58, face: face(0.11, 0.44, 0.22, 0.2) },
{ id: 'otto', x: 0.67, y: 0.37, face: face(0.56, 0.23, 0.24, 0.22) }] },
po2: { width: 1024, height: 1024, safeArea: face(0.07, 0.14, 0.79, 0.56),
anchors: [{ id: 'pip', x: 0.23, y: 0.62, face: face(0.07, 0.5, 0.22, 0.18) },
{ id: 'otto', x: 0.75, y: 0.31, face: face(0.52, 0.14, 0.33, 0.22) }],
avoid: [face(0.28, 0.17, 0.38, 0.39)] },
po3: { width: 1024, height: 1024, safeArea: face(0.03, 0.18, 0.72, 0.56),
anchors: [{ id: 'pip', x: 0.275, y: 0.36, face: face(0.1, 0.19, 0.25, 0.21) }],
avoid: [face(0.34, 0.41, 0.64, 0.41)] },
po4: { width: 1024, height: 1024, safeArea: face(0.07, 0.19, 0.84, 0.53),
anchors: [{ id: 'pip', x: 0.23, y: 0.61, face: face(0.07, 0.48, 0.22, 0.18) },
{ id: 'otto', x: 0.69, y: 0.36, face: face(0.53, 0.19, 0.39, 0.23) }],
avoid: [face(0.31, 0.63, 0.05, 0.08), face(0.39, 0.32, 0.29, 0.18)] },
po5: { width: 1400, height: 600, safeArea: face(0.16, 0.17, 0.6, 0.66),
anchors: [{ id: 'pip', x: 0.345, y: 0.53, face: face(0.29, 0.4, 0.09, 0.18) },
{ id: 'otto', x: 0.625, y: 0.33, face: face(0.58, 0.17, 0.12, 0.23) }] },
po6: { width: 1152, height: 1152, safeArea: face(0.3, 0.21, 0.43, 0.35),
anchors: [{ id: 'pip', x: 0.46, y: 0.39, face: face(0.35, 0.25, 0.2, 0.18) },
{ id: 'fish', x: 0.66, y: 0.46, face: face(0.64, 0.41, 0.07, 0.12) }] },
po7: { width: 1400, height: 933, safeArea: face(0.07, 0.15, 0.81, 0.65),
anchors: [{ id: 'pip', x: 0.195, y: 0.64, face: face(0.1, 0.56, 0.15, 0.14) },
{ id: 'otto', x: 0.795, y: 0.35, face: face(0.7, 0.18, 0.18, 0.22) },
{ id: 'sfx', x: 0.62, y: 0.7 }],
avoid: [face(0.44, 0.3, 0.15, 0.32)] },
};
const ALT = {
po1: t({ en: 'Pip the penguin waddles into Otto the walrus’s tiny bakery, waving.',
es: 'Pip, el pingüino, entra saludando en la pequeña panadería de Otto, la morsa.',
ca: 'En Pip, el pingüí, entra saludant a la petita fleca de l’Otto, la morsa.',
zh: '企鹅皮普摇摇摆摆走进海象奥托的小面包店,挥着手。',
ar: 'البطريق بيب يدخل مخبز الفظّ أوتو الصغير وهو يلوّح.',
ja: 'ペンギンのピップが手を振りながら、セイウチのオットーの小さなパン屋に入ってくる。',
pt: 'O pinguim Pip entra acenando na padariazinha da morsa Otto.',
fr: 'Pip le manchot entre en saluant de la main dans la petite boulangerie d’Otto le morse.',
de: 'Der Pinguin Pip watschelt winkend in die kleine Bäckerei des Walrosses Otto.',
it: 'Il pinguino Pip entra salutando con la mano nella piccola panetteria del tricheco '
+ 'Otto.' }),
po2: t({ en: 'Otto proudly holds up a croissant as big as Pip.',
es: 'Otto enseña orgulloso un cruasán tan grande como Pip.',
ca: 'L’Otto ensenya orgullós un croissant tan gran com en Pip.',
zh: '奥托得意地举起一个和皮普一样大的羊角面包。',
ar: 'أوتو يرفع بفخر كرواسونًا بحجم بيب.',
ja: 'オットーが、ピップと同じくらい大きなクロワッサンを得意げに持ち上げる。',
pt: 'Otto ergue, todo orgulhoso, um croissant do tamanho do Pip.',
fr: 'Otto brandit fièrement un croissant aussi grand que Pip.',
de: 'Otto hält stolz ein Croissant hoch, so groß wie Pip.',
it: 'Otto mostra tutto fiero un cornetto grande quanto Pip.' }),
po3: t({ en: 'Pip stands on the counter next to the giant croissant, scratching his head.',
es: 'Pip, de pie en el mostrador junto al cruasán gigante, se rasca la cabeza.',
ca: 'En Pip, dret al taulell al costat del croissant gegant, es grata el cap.',
zh: '皮普站在柜台上,挨着巨大的羊角面包挠头。',
ar: 'بيب واقف على المنضدة بجانب الكرواسون العملاق يحكّ رأسه.',
ja: 'ピップがカウンターの巨大なクロワッサンの横に立ち、頭をかいている。',
pt: 'Pip, de pé no balcão ao lado do croissant gigante, coça a cabeça.',
fr: 'Pip, debout sur le comptoir à côté du croissant géant, se gratte la tête.',
de: 'Pip steht auf der Ladentheke neben dem Riesencroissant und kratzt sich am Kopf.',
it: 'Pip, in piedi sul bancone accanto al cornetto gigante, si gratta la testa.' }),
po4: t({ en: 'Otto munches the big half of the croissant; Pip holds a tiny end piece.',
es: 'Otto se come la mitad grande del cruasán; Pip sostiene una punta diminuta.',
ca: 'L’Otto es menja la meitat gran del croissant; en Pip aguanta una punta minúscula.',
zh: '奥托大口吃着大半个羊角面包;皮普手里拿着一小截面包尖。',
ar: 'أوتو يلتهم النصف الكبير من الكرواسون، وبيب يمسك طرفًا صغيرًا.',
ja: 'オットーがクロワッサンの大きいほうをほおばり、ピップは小さな端っこを持っている。',
pt: 'Otto devora a metade grande do croissant; Pip segura uma pontinha.',
fr: 'Otto dévore la grosse moitié du croissant ; Pip tient un minuscule bout.',
de: 'Otto mampft die große Hälfte des Croissants; Pip hält ein winziges Endstück.',
it: 'Otto divora la metà grande del cornetto; Pip tiene in mano una punta minuscola.' }),
po5: t({ en: 'Pip and Otto fish through a hole in an ice floe beside a tiny bakery hut.',
es: 'Pip y Otto pescan por un agujero en un témpano, junto a una caseta de panadería.',
ca: 'En Pip i l’Otto pesquen per un forat en un glaç, al costat d’una caseta de fleca.',
zh: '皮普和奥托在浮冰的冰洞里钓鱼,旁边是一间小面包屋。',
ar: 'بيب وأوتو يصطادان من ثقب في جليد طافٍ بجانب كوخ مخبز صغير.',
ja: '流氷の穴でピップとオットーが釣りをしている。そばに小さなパン屋の小屋。',
pt: 'Pip e Otto pescam num buraco do bloco de gelo, ao lado de uma padariazinha.',
fr: 'Pip et Otto pêchent par un trou dans la banquise, à côté d’une petite cabane de '
+ 'boulangerie.',
de: 'Pip und Otto angeln durch ein Loch in einer Eisscholle, neben einer winzigen '
+ 'Bäckerhütte.',
it: 'Pip e Otto pescano da un buco nella banchisa, accanto a una casetta che fa da '
+ 'panetteria.' }),
po6: t({ en: 'Pip proudly holds up a tiny, unimpressed fish.',
es: 'Pip levanta orgulloso un pez diminuto y nada impresionado.',
ca: 'En Pip aixeca orgullós un peix minúscul i gens impressionat.',
zh: '皮普得意地举起一条小小的、一脸不屑的鱼。',
ar: 'بيب يرفع بفخر سمكة صغيرة لا يبدو عليها أي إعجاب.',
ja: 'ピップが、少しもうれしそうでない小さな魚を得意げに持ち上げる。',
pt: 'Pip ergue, todo orgulhoso, um peixinho nada impressionado.',
fr: 'Pip brandit fièrement un poisson minuscule, pas impressionné du tout.',
de: 'Pip hält stolz einen winzigen Fisch hoch, der wenig beeindruckt aussieht.',
it: 'Pip mostra tutto fiero un pesciolino minuscolo, per niente impressionato.' }),
po7: t({ en: 'Otto reels in a soggy boot; Pip has fallen on his back laughing.',
es: 'Otto saca del agua una bota empapada; Pip se ha caído de espaldas de la risa.',
ca: 'L’Otto treu de l’aigua una bota xopa; en Pip ha caigut d’esquena de riure.',
zh: '奥托钓上来一只湿透的靴子;皮普笑得仰面摔倒。',
ar: 'أوتو يسحب حذاءً مبتلًا، وبيب سقط على ظهره من الضحك.',
ja: 'オットーがずぶぬれの長靴を釣り上げ、ピップは笑いころげてあおむけに倒れている。',
pt: 'Otto puxa uma bota encharcada; Pip caiu de costas de tanto rir.',
fr: 'Otto remonte une botte détrempée ; Pip est tombé à la renverse de rire.',
de: 'Otto holt einen triefenden Stiefel ein; Pip ist vor Lachen auf den Rücken gefallen.',
it: 'Otto tira su uno stivale fradicio; Pip è caduto all’indietro dal ridere.' }),
};
絵は正方形か横長に描かれていますが、日曜版の割り方のセルはそうではありません。長靴のギャグは112 × 88 mmのセルに入ります。セーフエリアはギャグに必要なもの(ピップ、オットー、長靴)だけに絞ってあるので、トリミングで余白が出ることはありません(コマと絵)。
#4 · 同じページを十の新聞で刷る
const [TEXT, LABEL, LETTERING, SFX] = t({
en: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
es: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
ca: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
pt: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
fr: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
de: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
it: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
zh: ['Noto Serif SC', 'Noto Sans SC', 'ZCOOL KuaiLe', 'ZCOOL QingKe HuangYou'],
ja: ['Noto Serif JP', 'Noto Sans JP', 'Zen Antique', 'Dela Gothic One'],
ar: ['Noto Naskh Arabic', 'Noto Kufi Arabic', 'Playpen Sans Arabic', 'Lalezar'],
});
const CJK = LANG === 'zh' || LANG === 'ja';
// Design text aligns to physical sides: an Arabic page starts on the right.
const [START, END] = LANG === 'ar' ? ['right', 'left'] : ['left', 'right'];
各版はその文字に合った書体で新聞を組み、それぞれの漫画用書体で写植します。日本語の吹き出しは縦組み。日本語版とアラビア語版は漫画を右から左へ読むので、各段のコマの並びが左右逆になります。右から左へ組むアラビア語版では、ページの段も左右が逆になります。絵と割り方は同じで、変わるのはcontent.<lang>.mdだけです(読む方向)。
レシピの全体
// ═══ Postext Cookbook · Nº 146 · A daily strip and a Sunday half page in the newspaper ═══
// https://postext.dev/en/cookbook/newspaper-daily-strip
// Code: MIT · Text: original (CC BY 4.0) · Pictures: generated with diffusion models
// Fonts: Newsreader, Archivo Narrow, Comic Neue, Bangers and 12 more (OFL) · Needs postext ≥ 1.30.0
//
// Two pages of a newspaper's pull-out comics section: a four-panel daily strip across a
// four-column page, under its article, and a Sunday half page with its own panel grid. Both
// are :::strip blocks in the text: the columns end level over one as over a page-wide figure.
import {
buildDocument, withLoadedFonts, renderPageToCanvas, registerResourceImage,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
const LANG = 'ja'; // @lang: 'en' | 'es' | 'ca' | 'zh' | 'ar' | 'ja' | 'pt' | 'fr' | 'de' | 'it'
const RECIPE = 'newspaper-daily-strip';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: newsprint, ink and the paper's red
const palette = {
ink: '#16181b', // text, rules, panel borders and the lettering
paper: '#f6f3ec', // newsprint
accent: '#b3261e', // section flags, kickers and the sound effects
tint: '#e9e4d8', // the advert's box
rule: '#8f9196', // the column rules
muted: '#575b61', // bylines and the folio line
};
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: 'ink (defaults)', value: { hex: palette.ink, model: 'hex' } },
];
// #endregion
// #region editions: the newspaper's text, label and lettering faces in each script
const [TEXT, LABEL, LETTERING, SFX] = t({
en: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
es: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
ca: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
pt: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
fr: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
de: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
it: ['Newsreader', 'Archivo Narrow', 'Comic Neue', 'Bangers'],
zh: ['Noto Serif SC', 'Noto Sans SC', 'ZCOOL KuaiLe', 'ZCOOL QingKe HuangYou'],
ja: ['Noto Serif JP', 'Noto Sans JP', 'Zen Antique', 'Dela Gothic One'],
ar: ['Noto Naskh Arabic', 'Noto Kufi Arabic', 'Playpen Sans Arabic', 'Lalezar'],
});
const CJK = LANG === 'zh' || LANG === 'ja';
// Design text aligns to physical sides: an Arabic page starts on the right.
組み立てたscript.jsはそのまま動きます。任意のページのモジュールスクリプトに貼り付けるか、レシピをCodePenで開いてください。 GitHub上のレシピのフォルダー ↗ (新しいタブで開きます)
アレンジ
よくあるつまずき
つまずき
'top'のフロートは参照ページの先頭を許さない限り次のページに置かれる
既定では、フロートが自分の参照より上に置かれることはありません。そのため、Nページで参照したページ幅の'top'フロートはN+1ページの頭に置かれます。リソースまたはその種類のdefaultPlacementにplacement.citingPage: trueを設定すると(本全体ならlayout.floatsAtCitingPage、postext 1.25から)、layout.maxTopFraction以内に収まり参照行がそのページに残る場合は代わりにNページの先頭に置かれ、参照より前の本文はその下に送られます。章の最初のページと強制改ページの後のページの先頭には置かれません。その場合は次のページに置かれ、'auto'または'bottom'なら参照したページの下端に入れられます。 図の配置 →
- 題字はページのヘッダーが描いていて、扉デザインのあるH1ではありません。そのため表紙の漫画の上にはノンブルの行しかありません。
- セーフエリアがセルの形より横に広いと、絵の上下にコマの地色の余白が出て、
comicPanelLetterboxの警告が出ます。
クレジット
- 本文
- 書き下ろしの文章, CC BY 4.0
- 画像
- Strip panel: Pip walks into the bakery · Generated With Diffusion Models · オリジナル
- Strip panel: Otto and the big croissant · Generated With Diffusion Models · オリジナル
- Strip panel: Pip and the croissant on the counter · Generated With Diffusion Models · オリジナル
- Strip panel: Otto eats the croissant · Generated With Diffusion Models · オリジナル
- Strip panel: fishing on the floe · Generated With Diffusion Models · オリジナル
- Strip panel: Pip and his fish · Generated With Diffusion Models · オリジナル
- Strip panel: Otto lands a boot · Generated With Diffusion Models · オリジナル
- フォント
- Newsreader (SIL OFL 1.1) · Archivo Narrow (SIL OFL 1.1) · Comic Neue (SIL OFL 1.1) · Bangers (SIL OFL 1.1) · Noto Serif SC (SIL OFL 1.1) · Noto Sans SC (SIL OFL 1.1) · ZCOOL KuaiLe (SIL OFL 1.1) · ZCOOL QingKe HuangYou (SIL OFL 1.1) · Noto Serif JP (SIL OFL 1.1) · Noto Sans JP (SIL OFL 1.1) · Zen Antique (SIL OFL 1.1) · Dela Gothic One (SIL OFL 1.1) · Noto Naskh Arabic (SIL OFL 1.1) · Noto Kufi Arabic (SIL OFL 1.1) · Playpen Sans Arabic (SIL OFL 1.1) · Lalezar (SIL OFL 1.1)


