Skip to main content
Recipe number 133

Cookbook · Chapter 1 · Page & grid

A broadsheet on six columns

Four pages of a daily on a broadsheet: six ruled columns, photos and boxes across two to five of them, page-wide ads and an opinion page in five columns.

  • Trim 375 × 597 mm
  • 6 columns, 4 mm gutter
  • Newsreader 9/12.2
  • Archivo Narrow
  • Playfair Display
  • 4 pages
  • Level
  • Postext 1.65.0
  • Laid out in 140 ms
  • 247 lines of code

In short

Four pages of a big daily newspaper, set in six narrow columns. It shows how to run a photo or a box across several columns and how to give one page five columns.

What you'll build

Four pages of The Corrington Despatch, an invented daily, on a 375 × 597 mm broadsheet. The body runs in six columns of 55.2 mm with 4 mm gutters and a hairline in each: a measure of about 38 characters at 9 pt, the measure of a real broadsheet. The front page carries a nameplate with two ears, a strip of teasers, a lead whose headline and photograph take four columns, a second story with a two-column photograph, a column of briefs, a funding table and a fact box across two columns, and an advertisement across the foot. Page 2 opens on a jump from the front, page 3 switches to five columns for the leaders, a comment piece and the letters, and the back page carries a theatre review and the weather.

This recipe answers

  • How do I set a newspaper page: five columns on a broadsheet, a picture across two of them and a story box across three?
  • Can Postext set three or more text columns, or wrap text around an image?

The short answer

script.js · lines 69–85in full code
const layout = { layoutType: 'multiple', columnCount: 6, gutterWidth: mm(GUTTER),
  columnRule: { enabled: true, color: col('rule'), lineWidth: pt(0.4) } };
// A float across k columns takes the head of the first run of k empty columns that start
// level, counted left to right from the column the text is in, or the foot of that column
// and the empty ones after it. So the order of the fences places them:
//   :::callout{type="head" placement="top" columns="4"}  ← columns 1–4, the text not begun
//   ::resource{id="quays"}                              ← columns 1–4 again, under the box
//   …the lead runs in columns 1–4…
//   :::callout{type="head" placement="top" columns="2"}  ← columns 5–6: 1–4 hold text now
const photo = (id, file, [w, h], columns, extra) => ({ id, typeId: 'photo', kind: 'bitmap',
  createdAt: 0, updatedAt: 0, bitmap: { fileId: file, format: 'jpeg', width: w, height: h },
  placement: { position: 'top', span: 'column', columns },
  note: 'Photograph: Despatch picture desk', ...extra });
// A table across two columns, at the foot of the column that cites it and the next one.
const panel = (id, model, extra) => ({ id, typeId: 'panel', kind: 'table', createdAt: 0,
  updatedAt: 0, table: { model }, placement: { position: 'bottom', columns: 2 }, ...extra });
// As many columns as the page has (or more) is page-wide: columns: 6 = span: 'page'.

Six equal columns, and floats that take k of them

Ingredients

Type
Newsreader, Playfair Display, Archivo Narrow (SIL OFL 1.1)
Assets
  • barrier-1152.jpg
  • baths-1536x768.jpg
  • quays-1440.jpg
  • stage-1800.jpg
  • terrace-1440.jpg
  • The Eastern Quays at sunrise (the front-page lead photograph) (Generated With Diffusion Models, CC BY 4.0)
  • Engineers watching a river flood gate (front page, second story) (Generated With Diffusion Models, CC BY 4.0)
  • A terraced street on moving day (page 2) (Generated With Diffusion Models, CC BY 4.0)
  • A Victorian swimming baths on a weekday morning (page 3) (Generated With Diffusion Models, CC BY 4.0)
  • A period drama on a theatre stage (page 4) (Generated With Diffusion Models, CC BY 4.0)

Method

#1 · Six columns on a broadsheet trim

The code for this step is the short answer above. page.sizePreset: 'broadsheet' sets the 375 × 597 mm trim, and layoutType: 'multiple' with columnCount: 6 cuts the 351 mm text width into six equal columns (Layout types). Each is (351 − 5 × 4) / 6 = 55.2 mm wide, which at 9 pt Newsreader holds about 38 characters, so the text needs hyphenation, minWordSpacing: 0.8 to keep spaces open and maxJustifyTracking: 15 to spread a loose line through its letters. The column rule draws a 0.4 pt hairline in every gutter, cut where a float or a box crosses it. Up to postext 1.17 a body had two columns at most, and Nº 027 set its four columns of briefs inside a box for that reason.

#2 · A float across k columns takes the first run of empty columns

script.js · lines 257–286in full code
const resources = [
  photo('quays', 'quays-1440.jpg', [1440, 1080], 4, {
    altText: 'A cobbled harbour quay at sunrise, with old rail tracks, three dockside cranes '
      + 'and brick warehouses beside calm water.',
    caption: '**The end of the line.** The Eastern Quays at sunrise. The trams will run on '
      + 'the old dock railway’s route past the bonded warehouses.' }),
  photo('barrier', 'barrier-1152.jpg', [1152, 1152], 2, {
    altText: 'Three engineers in orange jackets watch a steel flood gate hold back a high '
      + 'tide between two concrete towers.',
    caption: '**Holding.** Engineers watch the gate at 6.40 yesterday morning.' }),
  photo('terrace', 'terrace-1440.jpg', [1440, 1080], 4, {
    altText: 'A woman carries a box up the steps of a red-brick terraced house on an '
      + 'autumn street.',
    caption: '**Moving day** on Albion Terrace, where a two-bedroom flat now lets for £1,240.' }),
  photo('baths', 'baths-1536x768.jpg', [1536, 768], 3, {
    altText: 'A long Victorian swimming pool under an iron and glass roof, with one woman '
      + 'swimming and wooden cubicles along both sides.',
    caption: '**Forty lengths.** The Albert Baths, opened in 1894, on a weekday morning.' }),
  photo('stage', 'stage-1800.jpg', [1800, 1350], 5, {
    altText: 'Three actors in 1920s costume in a shipping office set on a theatre stage.',
    caption: '**Ledgers and lies.** The shipping office of *The Tally Clerk*.',
    note: 'Photograph: Corrington Playhouse' }),
  panel('funding', funding, { caption: '**Paying for the line**',
    note: 'Source: Corrington City Council, cabinet report, October 2026.' }),
  { ...panel('forecast', forecast(), { placement: { position: 'here' },
    caption: '**The next five days in Corrington**',
    note: 'High water at Salter’s Cut, Arle gate. Forecast: Despatch weather desk.' }) },
  ...Object.keys(SKY).map((id) => ({ id, typeId: 'photo', kind: 'svg', createdAt: 0,
    updatedAt: 0, svg: { fileId: `${id}.svg`, width: 240, height: 120 }, altText: id.slice(4) })),
];

placement.columns gives a photo or a table its width in columns, gutters included: four columns of the front page are 232.7 mm. The engine looks for its slot from the column the text is in, left to right. A top float takes the head of the first run of k columns that hold no text yet and start level; a bottom float takes the foot of the column the text is in and of the empty ones after it. So the funding table, cited in a paragraph of column 3, sits at the foot of columns 3 and 4, and on page 2 the fact box, fenced first, takes columns 1 and 2, which leaves columns 3 to 6 as the first level run for the four-column photo fenced after it. Fenced the other way round, the box would stack under the photo. A k as large as the page's column count (or larger) is page-wide, the same as span: 'page'.

#3 · Headline boxes, fact boxes and advertisements

script.js · lines 89–119in full code
const NO_PAD = { top: pt(0), right: pt(0), bottom: pt(0), left: pt(0) };
const head = { id: 'head', backgroundEnabled: false, padding: NO_PAD, // a headline and its deck
  titleStyle: { ...caps(8.5, 700, 'accent'), gap: mm(1.5) }, // the kicker: the fence's title
  marginBottom: pt(LEAD), keepTogether: true,
  body: { fontFamily: 'Newsreader', fontSize: pt(13), lineHeight: pt(16.5), italic: true,
    textAlign: 'left', firstLineIndent: pt(0) } };
const jump = { ...head, id: 'jump', marginTop: pt(LEAD), // a page-wide head under a 1 pt rule
  stripe: { enabled: true, side: 'top', width: pt(1), color: col('ink') },
  padding: { ...NO_PAD, top: mm(2.5) } };
const facts = { id: 'facts', background: col('tint'), keepTogether: true,
  stripe: { enabled: true, side: 'top', width: pt(2.5), color: col('accent') },
  padding: { top: mm(2.5), right: mm(3), bottom: mm(3), left: mm(3) },
  titleStyle: { ...caps(8.5, 700, 'accent'), gap: mm(1.5) }, marginBottom: pt(LEAD),
  body: { fontFamily: 'Archivo Narrow', fontSize: pt(9), lineHeight: pt(11.5),
    textAlign: 'left', firstLineIndent: pt(0), paragraphSpacing: true } };
const weather = { ...facts, id: 'weather', keepTogether: true,
  padding: { top: mm(3), right: mm(4), bottom: mm(4), left: mm(4) },
  body: { ...facts.body, fontFamily: 'Newsreader', fontSize: pt(10.5), lineHeight: pt(14) } };
const ad = { id: 'ad', backgroundEnabled: false, keepTogether: true,
  border: { enabled: true, color: col('ink'), width: pt(0.75) },
  padding: { top: mm(5), right: mm(6), bottom: mm(5), left: mm(6) },
  titleStyle: { ...caps(7, 600, 'muted'), gap: mm(3) }, // "Advertisement"
  body: { fontFamily: 'Archivo Narrow', fontSize: pt(13), lineHeight: pt(17),
    textAlign: 'left', firstLineIndent: pt(0), paragraphSpacing: true } };
const sky = { id: 'sky', background: col('tint'), columnGap: mm(GUTTER), // the teaser strip
  padding: { top: mm(2.5), right: mm(3), bottom: mm(2.5), left: mm(3) }, marginBottom: pt(LEAD),
  body: { fontFamily: 'Archivo Narrow', fontSize: pt(9.5), lineHeight: pt(12),
    textAlign: 'left', firstLineIndent: pt(0) } };
const headline = (id, size, look = {}) => ({ id, fontFamily: 'Playfair Display', fontWeight: 700,
  fontSize: pt(size), lineHeight: pt(size * 1.06), marginTop: pt(0),
  marginBottom: pt(size * 0.22), ...look });

A :::callout with placement="top" and columns="4" floats across four columns as a photo does. The lead's headline and deck are such a box, fenced before the lead's text, so it takes columns 1 to 4 and the photograph stacks under it. The second story's headline box comes after the lead in the text, behind a :::columnbreak: the text is in column 5 by then, and columns 5 and 6 are the first empty pair. Each advertisement is a box with columns="6", page-wide, fenced first on its page so that its foot is reserved before any text arrives, and the jump heads on pages 2 and 4 are page-span boxes, as in Nº 027. balancing.trailing: false lets every page fill its columns to the foot, since every page here closes a section. fillShortColumns: true gives a column that the widow and orphan rules left a line short a line of its own paragraphs: on page 4 it levels the third column of the review.

#4 · The nameplate is the front page's H1

script.js · lines 45–65in full code
const ear = (side, lines) => lines.map(([id, content, look], i) => text(id, content,
  { ...look, align: side }, { ...(i === 0 ? at('container', `top-${side}`, 0, 4)
    : at(`#${lines[i - 1][0]}`, 'below', 0, 0.8)), size: { width: mm(30) } }));
const nameplate = { enabled: true, slot: { elements: [
  depth(9), // nine grid lines; the rules and the dateline hang from the foot
  { kind: 'rule', id: 'foot', thickness: pt(0.5), color: col('ink'),
    placement: { ...at('#depth', 'align-bottom', 0, -2), size: { width: 'fill' } } },
  ...[['left', '{attr.issue}'], ['center', '{publishDate}'], ['right', '{attr.price}']].map(
    ([align, content]) => text(`date-${align}`, content, { ...caps(8, 600), align },
      { ...at('#foot', 'above', 0, -1.5), size: { width: 'fill' } })),
  rule('thin', '#date-left', 0.5, 1.6), rule('heavy', '#thin', 3, 0.7),
  text('name', '{titleText}', { fontFamily: 'Playfair Display', fontSize: pt(64),
    fontWeight: 900, lineHeight: 1, align: 'center' },
  { ...at('#heavy', 'above', 0, -2.5), size: { width: 'fill' } }),
  ...ear('left', [['w-kicker', 'Weather', caps(7.5, 700, 'accent')],
    ['w-outlook', '{attr.outlook}', { fontFamily: 'Newsreader', fontSize: pt(9.5), italic: true,
      lineHeight: 1.25 }], ['w-temps', '{attr.temps}', sans(17, 700)]]),
  ...ear('right', [['t-kicker', 'Tides', caps(7.5, 700, 'accent')],
    ['t-times', '{attr.tides}', { fontFamily: 'Newsreader', fontSize: pt(9.5), italic: true,
      lineHeight: 1.25 }], ['t-height', '{attr.height}', sans(17, 700)]]),
] } };

# The Corrington Despatch takes the front heading style: the name in Playfair Display Black at 64 pt, two ears filled from the heading's attributes, the dateline between a thin and a heavy rule. The opener is nine grid lines deep. The tinted teaser strip under it is a page-span box, a front-page element of its own: it closes the opener's band, and the lead's headline box takes columns 1 to 4 of the band it opens. Without the strip the box would take the same four columns right under the nameplate, since the head of column 1 under an opener is a slot like the heads of the other columns (up to postext 1.24 it was not, and the box landed from column 2).

#5 · The opinion page runs in five columns

script.js · lines 123–144in full code
const flag = { enabled: true, slot: { elements: [
  depth(4),
  { kind: 'rule', id: 'bar', thickness: pt(3), color: col('ink'),
    placement: { ...at('#depth', 'align-bottom', 0, -2.5), size: { width: 'fill' } } },
  text('flag', '{titleText}', { fontFamily: 'Playfair Display', fontSize: pt(30),
    fontWeight: 900, lineHeight: 1 }, at('#bar', 'above', 0, -1.5)),
  text('tag', '{attr.tag}', { ...caps(8, 600, 'muted'), align: 'right' },
    { ...at('#bar', 'above', 0, -2), size: { width: 'fill' } }),
] } };
const FOLIO = 8; // mm from the top edge to the folio line, its rule 4.5 mm lower
const folio = (parity, side, s) => [ // s: +1 on a verso, −1 on a recto
  text(`n-${parity}`, '{pageNumber}', { ...sans(10, 700), align: side },
    at('page', `top-${side}`, s * MARGIN.side, FOLIO)),
  text(`t-${parity}`, '{title} · {publishDate}', { ...caps(7.5, 600, 'muted'), align: side },
    at(`#n-${parity}`, s > 0 ? 'right-of' : 'left-of', s * 3, 0.9)),
].map((element) => ({ ...element, parity }));
const header = { elements: [...folio('even', 'left', 1), ...folio('odd', 'right', -1),
  { kind: 'rule', id: 'folio-rule', thickness: pt(0.5), color: col('ink'),
    placement: { ...at('page', 'top-left', MARGIN.side, FOLIO + 4.5),
      size: { width: mm(375 - 2 * MARGIN.side) } } }] };
const opinion = { id: 'opinion', advancedDesign: flag, // its section runs in five columns
  layout: { layoutType: 'multiple', columnCount: 5 } }; // 67 mm: a 47-character measure

# Opinion {style="opinion"} opens a section whose heading style sets layout: { layoutType: 'multiple', columnCount: 5 }. The section keeps the document's gutter and column rule and changes only the count, so the leaders, the comment piece and the letters run on a 67 mm measure, about 47 characters. The comment's headline box is columns="3", fenced once the leader has begun in column 1, so it lands on columns 2 to 4 with its photograph under it, and two :::columnbreak lines send the column to column 2 and the letters to column 5.

The whole recipe

Sandbox
// ═══ Postext Cookbook · Nº 133 · A broadsheet on six columns ════════════════════
// https://postext.dev/en/cookbook/broadsheet-six-columns
// Code: MIT · Text: original (CC BY 4.0) · Photos: generated (CC BY 4.0)
// Fonts: Newsreader, Playfair Display, Archivo Narrow (SIL OFL 1.1) · Needs postext ≥ 1.65.0
import {
  buildDocumentWithFonts, renderPageToCanvas, registerResourceImage,
} from 'https://esm.sh/postext';

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

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: newsprint, a cool ink and one blue
const palette = {
  ink: '#15171a', // text, headlines and the heavy rules
  paper: '#f7f5ef', // newsprint; also type reversed out of a band
  accent: '#164a72', // the paper's blue: kickers, section flags, the fact boxes' stripe
  tint: '#e6ebef', // the fact boxes
  rule: '#8e9196', // hairlines: the column rules, table rules
  muted: '#55595f', // bylines, credits, the folio line
};
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = [ // defaults link to 'main-color': point it at the ink
  ...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
const MARGIN = { top: 16, bottom: 14, side: 12 }; // mm: a broadsheet's narrow, even margins
const GUTTER = 4; // mm: six columns of 55.2 mm on the 351 mm text width
const LEAD = 12.2; // pt: the baseline grid under 9 pt text (× 1.36)
const sans = (size, weight, look = {}) => ({ fontFamily: 'Archivo Narrow', fontSize: pt(size),
  fontWeight: weight, color: col('ink'), ...look });
const caps = (size, weight, colour = 'ink') => sans(size, weight, { color: col(colour),
  textTransform: 'uppercase', letterSpacing: pt(size * 0.14) });
const at = (to, edge, x = 0, y = 0) => ({ anchor: { to, edge }, offset: { x: mm(x), y: mm(y) } });
const text = (id, content, look, placement) => ({ kind: 'text', id, content, align: 'left',
  overflow: 'wrap', color: col('ink'), ...look, placement });
const rule = (id, under, weight, gap = 0) => ({ kind: 'rule', id, thickness: pt(weight),
  color: col('ink'), placement: { ...at(under, 'above', 0, -gap), size: { width: 'fill' } } });
// An empty box sets each opener's depth: a whole number of grid lines.
const depth = (lines) => ({ kind: 'box', id: 'depth', style: {}, placement: {
  ...at('container', 'top-left'), size: { width: 'fill', height: pt(lines * LEAD) } } });

// #region nameplate: the front page's H1 is the paper's name, between two ears
const ear = (side, lines) => lines.map(([id, content, look], i) => text(id, content,
  { ...look, align: side }, { ...(i === 0 ? at('container', `top-${side}`, 0, 4)
    : at(`#${lines[i - 1][0]}`, 'below', 0, 0.8)), size: { width: mm(30) } }));
const nameplate = { enabled: true, slot: { elements: [

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

#Set a Berliner in five columns

The same paper on a 315 × 470 mm Berliner: five columns of 55 mm, the measure of the broadsheet's six. The folio rule takes the narrower width too; then refit each page.

-const layout = { layoutType: 'multiple', columnCount: 6, gutterWidth: mm(GUTTER),
+const layout = { layoutType: 'multiple', columnCount: 5, gutterWidth: mm(GUTTER),
-      size: { width: mm(375 - 2 * MARGIN.side) } }] };
+      size: { width: mm(315 - 2 * MARGIN.side) } }] };
-  page: { sizePreset: 'broadsheet', dpi: 150, backgroundColor: col('paper'), // 375 × 597 mm
+  page: { sizePreset: 'berliner', dpi: 150, backgroundColor: col('paper'), // 315 × 470 mm

Pitfalls

Pitfall

Bitmaps take their print size from a resolution: declare it, not print-size pixels

A bitmap without a resolution is laid out one pixel per layout pixel at the document's dpi, so a 2400 px photo is 406 mm wide on a 150 dpi page. Declare the file's real pixels and give the picture its resolution (bitmap.resolution: 300), or set layout.bitmapResolution for every bitmap: a ppi, or 'file' to read the one the file states. The column still caps the picture. Figures and tables as resources →

  • A float fenced after the text has passed its columns finds no slot on the page and opens the next one. On the front page the lead must end in column 4: one paragraph more and the second story's headline box and photograph move to page 2.
  • Each page here is fitted by hand, as a sub-editor fits a newspaper: the advertisements' :::space lines and the length of each story set where the columns end. Change a story and refit its page.

Credits

Text
Original prose, CC BY 4.0
Images
  • The Eastern Quays at sunrise (the front-page lead photograph) · Generated With Diffusion Models · CC BY 4.0
  • Engineers watching a river flood gate (front page, second story) · Generated With Diffusion Models · CC BY 4.0
  • A terraced street on moving day (page 2) · Generated With Diffusion Models · CC BY 4.0
  • A Victorian swimming baths on a weekday morning (page 3) · Generated With Diffusion Models · CC BY 4.0
  • A period drama on a theatre stage (page 4) · Generated With Diffusion Models · CC BY 4.0
Fonts
Newsreader (SIL OFL 1.1) · Playfair Display (SIL OFL 1.1) · Archivo Narrow (SIL OFL 1.1)
Sandbox