In short
The front page of an imaginary Greek local newspaper: the paper's name across the top, a big headline in capitals, the main story in three columns starting with a large letter, a small map, a ferry timetable and short news at the bottom.
What you'll build
The front page of Ο Φάρος, an imaginary daily of an imaginary harbour town, on a 246 × 328 mm compact. The nameplate is GFS Didot between two ears; the lead story runs under a two-line headline in condensed capitals and a standfirst, then down three ruled columns of Noto Serif from a three-line drop cap. A one-column map of the bay sits in the middle column. A second story with a sailing timetable and a strip of briefs, laid in three columns of its own, close the page. All of the copy is original Greek; the imprint follows the edition's language.
This recipe answers
- Can Postext set three or more text columns, or wrap text around an image?
- How do I add an author line, a standfirst or a lead with a drop cap to an opener?
- How do I set a chapter title across the page while the body runs in two columns below?
- How do I get good justification and hyphenation for Spanish, French or German text?
The short answer
// locale 'el' hyphenates the narrow columns with the monotonic patterns and makes every
// capital setting drop the tonos: the lead headline is written «Ο φάρος του Αγίου Νικολάου
// ανάβει ξανά» in the Markdown and printed ΑΝΑΒΕΙ ΞΑΝΑ, never ΑΝΆΒΕΙ.
const LOCALE = 'el';
const layout = { layoutType: 'multiple', columnCount: 3, gutterWidth: mm(5),
columnRule: { enabled: true, color: col('rule'), lineWidth: pt(0.5) } };
const headline = { id: 'lead', fontSize: pt(30), lineHeight: pt(34), fontWeight: 800,
textTransform: 'uppercase', letterSpacing: em(0.01), marginBottom: pt(6) };
// :::paragraphs{style="lede"} opens the story: a drop cap three lines deep and its first
// four words in capitals, which drop the tonos the same way (ΜΕ ΜΙΑ ΓΙΟΡΤΗ).
const lede = { id: 'lede', firstLineIndent: pt(0),
dropCap: { lines: 3, fontFamily: NAME, color: col('aegean'), gap: mm(1.2),
leadIn: { words: 4, uppercase: true } } };
Greek in three columns, the headline in capitals, the story under a drop cap
Ingredients
- Features
- Drop caps in body paragraphsThree or more columnsHyphenation and document languageColumn ruleBoxes across the pageColumns in a box or in the textFloated boxesCallout boxesHeading stylesHeading attributesDesigned openersText, rules and boxes in page designsCustom resource typesTables from dataCaption styleParagraph stylesPDF export
- Also uses
- Figures exactly hereFull-width chapter bandPaper colourFonts embedded in the PDFFigures and tables as resourcesRunning heads per section
- Type
- GFS Didot, Fira Sans Condensed, Noto Serif (SIL OFL 1.1)
- Assets
- None: every picture is drawn in code
Method
#1 · Three columns of Greek
The code is the short answer above. layoutType: 'multiple' with columnCount: 3 sets three columns with a hairline between them (page layout). locale: 'el' hyphenates them with the monotonic patterns, which matters in a 69 mm column where a Greek word often fills a third of the line. Spaces from 0.8 to 1.6 times normal and up to 14 ‰ of tracking leave one line on the page past 1.6 times.
#2 · A headline in capitals, written in lower case
The headline is written «Ο φάρος του Αγίου Νικολάου ανάβει ξανά ύστερα από σαράντα χρόνια» and its style sets textTransform: 'uppercase'. In a Greek document the capitals drop the tonos, so the page prints ΑΝΑΒΕΙ ΞΑΝΑ and ΥΣΤΕΡΑ, as Greek headlines are written. The kicker, the ears and the briefs' title take the same transform.
const banner = { id: 'banner', backgroundEnabled: false, span: 'page',
padding: { top: pt(0), right: pt(0), bottom: pt(0), left: pt(0) },
titleStyle: { ...sans(9, 700, 'aegean', { letterSpacing: pt(1.6),
textTransform: 'uppercase' }), gap: mm(1.5) }, // the kicker, from the fence's title
marginTop: pt(LEAD), marginBottom: pt(LEAD / 2),
body: { fontFamily: TEXT, fontSize: pt(12), lineHeight: pt(17), textAlign: 'left',
firstLineIndent: pt(0) } };
The headline and its standfirst sit in a banner box with span: 'page' and no frame (boxes): the columns under it start level, and the second story repeats the device.
#3 · The drop cap and its lead-in
The lede paragraph style gives the first paragraph of its group a drop cap three lines deep in GFS Didot, and leadIn sets the next four words in capitals: ΜΕ ΜΙΑ ΓΙΟΡΤΗ ΠΟΥ. They lose their accents the same way (drop caps). The story opens on Μ; with a story that opens on an accented capital (Έ, Ό), look at the initial on the page, since Greek books set their initials without the accent.
#4 · The nameplate
const ear = (id, side, lines) => lines.map(([key, content, look], i) => text(`${id}-${key}`,
content, { ...look, align: side }, { ...(i === 0 ? at('container', `top-${side}`, 0, 6)
: at(`#${id}-${lines[i - 1][0]}`, 'below', 0, 1)), size: { width: mm(52) } }));
const caps = { letterSpacing: pt(1.4), textTransform: 'uppercase' };
const nameplate = { enabled: true, minHeight: mm(38), slot: { elements: [
text('name', '{titleText}', { fontFamily: NAME, fontSize: pt(60), lineHeight: 1.1,
color: col('aegean'), align: 'center', ...caps, letterSpacing: pt(4) },
{ ...at('container', 'top', 0, 1), size: { width: 'fill' } }),
...ear('start', 'left', [['k', '{attr.issue}', sans(8, 700, 'aegean', caps)],
['d', '{publishDate}', sans(9, 400)]]),
...ear('end', 'right', [['k', '{attr.city}', sans(8, 700, 'aegean', caps)],
['p', '{attr.price}', sans(9, 400)]]),
{ kind: 'rule', id: 'thick', thickness: pt(2.5), color: col('ink'),
placement: { ...at('container', 'top-left', 0, 32), size: { width: 'fill' } } },
{ kind: 'rule', id: 'thin', thickness: pt(0.5), color: col('ink'),
placement: { ...at('#thick', 'below', 0, 0.8), size: { width: 'fill' } } },
] } };
The paper's title, «Ο Φάρος» in the frontmatter, is set in spaced Didot capitals: ΦΑΡΟΣ. The ears read the heading's attributes, issue, city and price, and the frontmatter's publishDate.
The whole recipe
// ═══ Postext Cookbook · Nº 204 · A Greek daily's front page in three columns ═══════════
// https://postext.dev/en/cookbook/greek-daily-front-page
// Code: MIT · Text: original Greek news copy (CC BY 4.0) · Map: drawn in code (CC BY 4.0)
// Fonts: GFS Didot, Fira Sans Condensed, Noto Serif (SIL OFL 1.1) · Needs postext ≥ 1.99.1
import {
buildDocumentWithFonts, renderPageToCanvas, registerResourceImage,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
const LANG = 'en'; // @lang: the language of the imprint's last line; the paper is Greek
const RECIPE = 'greek-daily-front-page';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: newsprint, black ink and the paper's Aegean blue
const palette = {
ink: '#141518', // text and the heavy rules
aegean: '#1d4f91', // the accent: the nameplate, kickers, the ferry lines
foam: '#e4e9f0', // the In brief strip, the map's sea
land: '#efe9dc', // the map's land
rule: '#9a9890', // hairlines: the column rules, the imprint's rule
muted: '#5a5852', // bylines, captions' notes, the imprint
paper: '#f9f7f1', // newsprint
};
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.ink })
.map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));
// #endregion
const [NAME, HEAD, TEXT] = ['GFS Didot', 'Fira Sans Condensed', 'Noto Serif']; // all with Greek
const TRIM = { width: 246, height: 328 }; // mm: a 3 : 4 compact
const SIDE = 12; // mm: newspaper margins, narrow and not mirrored
const LEAD = 13.5; // pt: the body leading, 1.5 × a 9 pt Noto Serif
const sans = (size, weight, colour = 'ink', extra = {}) => ({ fontFamily: HEAD, fontSize: pt(size),
fontWeight: weight, color: col(colour), ...extra });
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, overflow: 'wrap',
...look, placement });
// #region answer: Greek in three columns, the headline in capitals, the story under a drop cap
// locale 'el' hyphenates the narrow columns with the monotonic patterns and makes every
// capital setting drop the tonos: the lead headline is written «Ο φάρος του Αγίου Νικολάου
// ανάβει ξανά» in the Markdown and printed ΑΝΑΒΕΙ ΞΑΝΑ, never ΑΝΆΒΕΙ.
const LOCALE = 'el';
const layout = { layoutType: 'multiple', columnCount: 3, gutterWidth: mm(5),
columnRule: { enabled: true, color: col('rule'), lineWidth: pt(0.5) } };
const headline = { id: 'lead', fontSize: pt(30), lineHeight: pt(34), fontWeight: 800,
textTransform: 'uppercase', letterSpacing: em(0.01), marginBottom: pt(6) };
// :::paragraphs{style="lede"} opens the story: a drop cap three lines deep and its first
// four words in capitals, which drop the tonos the same way (ΜΕ ΜΙΑ ΓΙΟΡΤΗ).
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)
Pitfalls
- A box that asks for a drop cap is set without one: a story's first paragraph must stand in the flow, after the box, not inside it.
- The briefs are a box with
placement="bottom": when the page runs over by a line, the whole strip moves to the next page. Trim the copy until it fits. - The ears are 52 mm wide. A longer issue line wraps, and its second line runs under the nameplate's first letter; measure the ears against the room the name leaves.
Credits
- Recipe
- Ignacio Ferro
- Text
- Original prose, CC BY 4.0
- Fonts
- GFS Didot (SIL OFL 1.1) · Fira Sans Condensed (SIL OFL 1.1) · Noto Serif (SIL OFL 1.1)
Edit this write-up ↗ (opens in a new tab)Recipe folder on GitHub ↗ (opens in a new tab)


