In short
Two pages of a newspaper's comics section: a large colour comic on the cover, then an article about the cartoonist in four columns with the daily four-panel strip under it.
What you'll build
The comics pull-out of a weekend newspaper, The Corrington Despatch, folded to 230 × 310 mm. The cover holds the Sunday half page of Pip & Otto, a penguin and a walrus who run a bakery on an ice floe, with the contents under it. Inside, an interview with the strip's cartoonist runs in four columns, with readers' letters and an advert, and the week's daily strip, four square panels, runs across the page under it. Both comics are :::strip blocks in the newspaper's text, and the pull-out comes in ten languages.
This recipe answers
- How do I put a comic strip on a newspaper page?
The short answer
// 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) } };
A page-wide daily strip and a Sunday half page, set in the columns
Ingredients
- Features
- Comic strips in the textThree or more columnsColumn rulePanel borders and guttersSpeakers and anchorsComic pagesComic letteringRe-lettering in other languagesBalloon stylesDesigned openersRunning heads and foliosCallout boxesParagraph stylesSemantic colour palettePDF exportSection geometryFigure placement
- Also uses
- Boxes that split or stay wholePanel art and cropsHeading attributesHeading stylesFull-width chapter bandPaper colourFonts embedded in the PDFFigures and tables as resourcesSound effects
- Type
- 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)
- Assets
po1.jpgpo2.jpgpo3.jpgpo4.jpgpo5.jpgpo6.jpgpo7.jpg- Strip panel: Pip walks into the bakery (Generated With Diffusion Models, original)
- Strip panel: Otto and the big croissant (Generated With Diffusion Models, original)
- Strip panel: Pip and the croissant on the counter (Generated With Diffusion Models, original)
- Strip panel: Otto eats the croissant (Generated With Diffusion Models, original)
- Strip panel: fishing on the floe (Generated With Diffusion Models, original)
- Strip panel: Pip and his fish (Generated With Diffusion Models, original)
- Strip panel: Otto lands a boot (Generated With Diffusion Models, original)
Method
#1 · Write the strip where the paper wants it
The code is the short answer above. A :::strip has the body of a comic page (its split, its ::panel lines and their script), but it is a block in the text (strips). On the one-column cover the Sunday strip is set where it is written, 210 mm deep, and the contents follow it. Its split, 55 / * [40 | *], gives the wide fishing scene a tier of its own and the two gags a row below. A strip never splits: one that does not fit moves whole to the next page.

#2 · Float the daily across the columns
The inside page opens with an H1 whose heading style switches the section to four columns. The daily strip is written after the article with span=page: it is set across the four columns where the text ends, and the columns of the article end level above it. Without height or aspect, a strip takes the shape that makes its panels square, four to one here. With placement=bottom it would float to the foot of the page, which suits an article long enough to reach it; with placement=top it would open the next page, because a float never goes above the point it is written at.
#3 · Fit each picture to its cell
// 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.' }),
};
The pictures were drawn square or wide, and the cells of the Sunday split are not: the boot gag sits in a cell 112 × 88 mm. Each safe area is cut to what the joke needs, Pip and Otto and the boot, so the crop never letterboxes the picture (panels and art).
#4 · Print the same page in ten papers
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'];
Each edition sets the newspaper in faces for its script and letters the strips in its own comic faces. The Japanese balloons run vertically. The Japanese and Arabic editions read the strips right to left, so the panels of every row change places; the Arabic one, set right to left, also mirrors the columns of the page. The pictures and the split stay the same; only content.<lang>.md changes (reading direction).
The whole recipe
// ═══ 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 = 'en'; // @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.
The composed script.js runs as it is: paste it into any page’s module script, or open the recipe on CodePen. Recipe folder on GitHub ↗ (opens in a new tab)
Variations
#Give the daily strip a fixed height
-:::strip{split="* | * | * | *" span=page}
+:::strip{split="* | * | * | *" span=page height=45mm}#Run a one-column strip in the text
Without span=page a strip is as wide as its column and is set where it is written, like an inline figure.
-:::strip{split="* | * | * | *" span=page}
+:::strip{split="* / * / * / *" aspect=0.25}Pitfalls
Pitfall
A 'top' float goes to the page after its citation unless it may head the citing page
By default a float never goes above its own reference, so a page-wide 'top' float cited on page N opens page N+1. Set placement.citingPage: true on the resource or its type's defaultPlacement (or layout.floatsAtCitingPage for the whole book, since postext 1.25) and it heads page N instead, the text above the reference moving down under it, when it fits within layout.maxTopFraction and the citing line stays on that page. It never heads a chapter's first page or a page after a forced break: there it still opens the next page, and 'auto' or 'bottom' can take the foot of the citing page. Figure placement →
- The section flag is drawn by the header, not by an H1 opener, so nothing but the folio line sits above the cover's strip.
- A safe area wider than its cell's shape letterboxes the picture with the panel's background, and the build warns
comicPanelLetterbox.
Credits
- Recipe
- Ignacio Ferro
- Text
- Original prose, CC BY 4.0
- Images
- Strip panel: Pip walks into the bakery · Generated With Diffusion Models · original
- Strip panel: Otto and the big croissant · Generated With Diffusion Models · original
- Strip panel: Pip and the croissant on the counter · Generated With Diffusion Models · original
- Strip panel: Otto eats the croissant · Generated With Diffusion Models · original
- Strip panel: fishing on the floe · Generated With Diffusion Models · original
- Strip panel: Pip and his fish · Generated With Diffusion Models · original
- Strip panel: Otto lands a boot · Generated With Diffusion Models · original
- Fonts
- 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)
Edit this write-up ↗ (opens in a new tab)Recipe folder on GitHub ↗ (opens in a new tab)


