# 按单调正字法断词的希腊语小说

> 把Theotokis《Η τιμή και το χρήμα》第一章排成13.5 × 20.5 cm的书：单调希腊语断词、«»引号、不带重音的大写书眉。

- HTML版本: https://postext.dev/zh/cookbook/monotonic-greek-novel
- 食谱 No. 201 · 字体与文字 · 难度 2 (中级) · 输出: Canvas, PDF
- 体裁: 小说、戏剧与文学散文
- 需要 postext ≥ 1.99.1, postext-pdf ≥ 1.99.1 · 已用 1.99.1, postext-pdf 1.99.1 测试，日期 2026-11-29
- 页面: [1](https://postext.dev/cookbook/monotonic-greek-novel/en/p01.webp?v=beab86c3), [2](https://postext.dev/cookbook/monotonic-greek-novel/en/p02.webp?v=beab86c3), [3](https://postext.dev/cookbook/monotonic-greek-novel/en/p03.webp?v=beab86c3), [4](https://postext.dev/cookbook/monotonic-greek-novel/en/p04.webp?v=beab86c3), [5](https://postext.dev/cookbook/monotonic-greek-novel/en/p05.webp?v=beab86c3), [6](https://postext.dev/cookbook/monotonic-greek-novel/en/p06.webp?v=beab86c3), [7](https://postext.dev/cookbook/monotonic-greek-novel/en/p07.webp?v=beab86c3)
- 在沙盒中打开: https://postext.dev/zh/sandbox#recipe=monotonic-greek-novel&lang=en (.postext: https://postext.dev/cookbook/monotonic-greek-novel/en/monotonic-greek-novel.postext)
- 最后更新: 2026-11-29
- 其他语言: [en](https://postext.dev/en/cookbook/monotonic-greek-novel.md), [es](https://postext.dev/es/cookbook/monotonic-greek-novel.md), [ca](https://postext.dev/ca/cookbook/monotonic-greek-novel.md), [de](https://postext.dev/de/cookbook/monotonic-greek-novel.md), [el](https://postext.dev/el/cookbook/monotonic-greek-novel.md), [fr](https://postext.dev/fr/cookbook/monotonic-greek-novel.md), [it](https://postext.dev/it/cookbook/monotonic-greek-novel.md), [pt](https://postext.dev/pt/cookbook/monotonic-greek-novel.md), [ja](https://postext.dev/ja/cookbook/monotonic-greek-novel.md), [ar](https://postext.dev/ar/cookbook/monotonic-greek-novel.md)

## 简单来说

一部1914年希腊语小说的第一章，排成小开本。行末断词遵照希腊学校语法，书眉用大写字母，而希腊语大写不带重音。

## 成品一览

Konstantinos Theotokis的长篇小说《Η τιμή και το χρήμα》（《荣誉与金钱》，1914年）第一章，取自希腊语维基文库，排成13.5 × 20.5 cm的书。前面是书名页和一则文本说明；正文在右页开始，章号Αʹ用GFS Didot，下沉十行。正文是Literata 9.7/14.2 pt，每页31行，两端对齐，按单调希腊语的断词模式断行。书眉左页印作者、右页印书名，用加了字距的大写字母，并按希腊语大写的规矩去掉重音。说明和版权页随版本的语言变化；小说本身在三个版本里都是希腊语。

**这份食谱回答的问题:**

- 怎样排现代希腊语小说，让断词正确、书眉用大写？
- 怎样设置书眉：左页放书名，右页放章名，页码在外侧？
- 怎样写对话破折号、段首的年份、价格和字面符号，而不被Markdown误读？

## 简短回答

```js
// script.js, 行 51–65
// locale 'el' picks the monotonic patterns, which keep the digraphs and the diphthongs
// whole (μπρά-τσα, ευ-τυ-χί-α) and divide between two consonants the way a Greek school
// grammar does (κάρ-βου-να, αν-θρώ-πους). The same tag gives the Greek labels and tags the
// PDF as Greek. The defaults justify, hyphenate in config().locale and break by Knuth–Plass.
const LOCALE = 'el';
const bodyText = { // config().bodyText
  fontFamily: TEXT, fontSize: pt(BODY), lineHeight: pt(LEAD), color: col('ink'),
  boldColor: col('ink'), italicColor: col('ink'), referenceColor: col('ink'),
  firstLineIndent: em(1.2), indentAfterHeading: false,
  // Two letters at least on either side of a break (ξα-νά, not ξ-ανά) and no page that ends
  // on a divided word. Greek words run long: spaces from 0.8× to 1.6× of the face's own,
  // then up to 12‰ of tracking, and a last line under about eleven letters is a runt.
  hyphenation: { leftMin: 2, rightMin: 2 }, hyphenateAcrossColumns: false,
  maxWordSpacing: 1.6, minWordSpacing: 0.8, maxJustifyTracking: 12, runtMinCharacters: 22,
};
```

## 用料

**讲解**

- [断词与文档语言](https://postext.dev/zh/docs/justification.md#支持的语言): 基于TeX模式的九种语言断词（包括希腊语），由文档的locale选择；locale同时决定表格续表字样和带标签PDF的语言。
- [最优断行（Knuth–Plass）](https://postext.dev/zh/docs/justification.md#knuth-plass通观整个段落): 把每个段落作为整体断行，在词间距限度内使词间距均匀，而不是逐行填满。
- [书眉与页码](https://postext.dev/zh/docs/configuration-headers-footers.md#页眉与页脚): 带占位符（{pageNumber}、{chapterTitle}、{title}……）的页眉和页脚位置，按右页或左页分别设置，过长的标题会截断或换行。

**还用到**

- [正文字体](https://postext.dev/zh/docs/configuration-text.md#正文)
- [缩进、对齐与段落间距](https://postext.dev/zh/docs/configuration-text.md#正文)
- [段末孤行、段首孤行与孤字](https://postext.dev/zh/docs/configuration-page-flow.md#段首孤行段末孤行孤字与不拆分规则)
- [设计过的章首页](https://postext.dev/zh/docs/configuration-headings.md#通栏与高级设计)
- [标题样式](https://postext.dev/zh/docs/configuration-styles.md#标题样式)
- [标题属性](https://postext.dev/zh/docs/document-format.md#标题属性)
- [页面设计中的文字、线条和框](https://postext.dev/zh/docs/configuration-headers-footers.md#页眉与页脚)
- [按页面角色显示书眉](https://postext.dev/zh/docs/configuration-headers-footers.md#文本元素)
- [对称页边距](https://postext.dev/zh/docs/configuration-page-layout.md#对称页边距)
- [纸张颜色](https://postext.dev/zh/docs/configuration-page-layout.md#页面)
- [段落样式](https://postext.dev/zh/docs/configuration-styles.md#段落样式)
- [文档元数据](https://postext.dev/zh/docs/document-format.md#前置元数据)
- [语义调色板](https://postext.dev/zh/docs/configuration-fonts-colors-viewers.md#调色板)
- [导出PDF](https://postext.dev/zh/docs/configuration-pdf-output.md#生成pdf)
- [嵌入PDF的字体](https://postext.dev/zh/docs/configuration-pdf-output.md#为什么需要字体提供函数)
- [分节书眉](https://postext.dev/zh/docs/configuration-styles.md#标题样式)

**配置一览**

- [`bodyText`](https://postext.dev/zh/docs/configuration-text.md#正文), [`colorPalette`](https://postext.dev/zh/docs/configuration-fonts-colors-viewers.md#调色板), [`footer`](https://postext.dev/zh/docs/configuration-headers-footers.md#页眉与页脚), [`header`](https://postext.dev/zh/docs/configuration-headers-footers.md#页眉与页脚), [`headingStyles`](https://postext.dev/zh/docs/configuration-styles.md#标题样式), [`headings`](https://postext.dev/zh/docs/configuration-headings.md#标题), [`layout`](https://postext.dev/zh/docs/configuration-page-layout.md#版式), [`locale`](https://postext.dev/zh/docs/configuration-language.md#断词), [`page`](https://postext.dev/zh/docs/configuration-page-layout.md#页面), [`paragraphStyles`](https://postext.dev/zh/docs/configuration-styles.md#段落样式)

**API**

- [`buildDocumentWithFonts`](https://postext.dev/zh/docs/configuration-programmatic-usage.md#排版前加载字体), [`decompressWoff2`](https://postext.dev/zh/docs/configuration-pdf-output.md#浏览器字体提供函数fontsource--woff2), [`renderPageToCanvas`](https://postext.dev/zh/docs/configuration-programmatic-usage.md#把页面渲染为位图), [`renderToPdf`](https://postext.dev/zh/docs/configuration-pdf-output.md#生成pdf)

**字体**

- Literata (OFL-1.1), GFS Didot (OFL-1.1)

## 做法

### 1 · 指定语言：el

代码就是上面的[简短回答](https://postext.dev/zh/cookbook/monotonic-greek-novel.md#简短回答)。`locale: 'el'`选用单调希腊语的断词模式（[断词](https://postext.dev/zh/docs/configuration-language.md)）。它保留μπ、ντ、γκ、τσ、τζ这些二合字母和双元音不拆开，在两个辅音之间断开，和希腊学校语法一致：第3页断成εση-κώθηκε和μεσο-φόρι。`leftMin`和`rightMin`设为2，断点两侧至少各留两个字母；`hyphenateAcrossColumns: false`不让一页以断开的词结束。希腊语单词长，词距允许在字体本身的0.8到1.6倍之间，再加最多12‰的字距，让各行均匀。

### 2 · 大写的书眉

```js
// script.js, 行 69–88
// textTransform 'uppercase' in a Greek document writes ΚΩΝΣΤΑΝΤΙΝΟΣ ΘΕΟΤΟΚΗΣ for
// Κωνσταντίνος Θεοτόκης: Greek capitals carry no accent, and the engine removes the tonos
// (and keeps a dialytika, ΑΫΠΝΙΑ) as it sets the letters. The Markdown keeps the accents,
// so search and the PDF's text read the words as written.
const caps = (size, tracking, color = 'muted') => ({ fontFamily: TEXT, fontSize: pt(size),
  fontWeight: 500, letterSpacing: pt(tracking), textTransform: 'uppercase', color: col(color) });
const SHIFT = (INNER - OUTER) / 2; // mm: the text block's centre is off the page's centre
const head = (id, content, parity, edge, x, y = 11.5, pages = 'body') => ({
  kind: 'text', id, content, parity, pages, ...caps(7.5, 1.4), placement: at('page', edge, x, y),
});
const folio = { fontWeight: 400, letterSpacing: pt(0), color: col('ink') }; // digits: no case
const header = { elements: [
  { ...head('verso-folio', '{pageNumber}', 'even', 'top-left', OUTER), ...folio },
  head('verso-author', '{author}', 'even', 'top', -SHIFT),
  head('recto-title', '{title}', 'odd', 'top', SHIFT),
  { ...head('recto-folio', '{pageNumber}', 'odd', 'top-right', -OUTER), ...folio },
] };
const drop = (parity, x) => ({ ...head(`drop-${parity}`, '{pageNumber}', parity, 'bottom', x,
  -11, 'opener'), ...folio });
const footer = { elements: [drop('odd', SHIFT), drop('even', -SHIFT)] };
```

在希腊语文档里，`textTransform: 'uppercase'`把Κωνσταντίνος Θεοτόκης排成ΚΩΝΣΤΑΝΤΙΝΟΣ ΘΕΟΤΟΚΗΣ：希腊语大写不带tonos，引擎在排字时去掉它，分音符保留（ΑΫΠΝΙΑ）。Markdown和PDF里的文字仍保留带重音的词，所以搜索能找到。页码没有大小写之分，保持400字重。

### 3 · 用Didot排的章号

```js
// script.js, 行 92–103
// # Α΄ {style="chapter"}: the numeral is the heading's text, a capital and the Greek numeral
// sign ʹ (U+0374), as Greek books number their chapters.
const chapter = { id: 'chapter', breakBefore: { enabled: true, parity: 'odd' },
  marginBottom: pt(0), // the opener's own height already ends on a line
  advancedDesign: { enabled: true, minHeight: pt(10 * LEAD), slot: { elements: [
    text('book', '{title}', TEXT, 8, at('container', 'top', 0, 2 * LINE),
      caps(8, 2.2, 'muted')),
    text('numeral', '{titleText}', DISPLAY, 30, at('container', 'top', 0, 3.6 * LINE),
      { color: col('accent'), lineHeight: 1 }),
    rule('rule', 6.4 * LINE, 10),
  ] } },
};
```

标题`# Αʹ {style="chapter"}`本身就是章号：一个大写字母加上数字记号ʹ，希腊图书就这样给章编号。设计把它以30 pt的GFS Didot放在书名下面，配一条短线，`minHeight`让正文下沉十行。`breakBefore`的`parity`设为`odd`，章从右页开始；标题样式自己决定分页落在哪一侧。

## 完整食谱

一个文件，由食谱文件夹合成，示例文本和排版食谱的公共工具包都已内联；它自己排出页面。要运行它，把它放进空白页面的`<script type="module">`，或粘贴到新建CodePen的JS面板里（设为模块）。它从esm.sh导入postext，不需要安装或构建。

- 食谱文件夹: https://github.com/drnachio/postext/tree/main/cookbook/monotonic-greek-novel

### script.js

```js
// ═══ Postext Cookbook · Nº 201 · A Greek novel page, hyphenated in monotonic Greek ═══════
// https://postext.dev/en/cookbook/monotonic-greek-novel
// Code: MIT · Text: K. Theotokis, Η τιμή και το χρήμα, 1914 (PD, el.wikisource) · Pictures: none
// Fonts: Literata, GFS Didot (SIL OFL 1.1) · Needs postext ≥ 1.99.1
import { buildDocumentWithFonts, renderPageToCanvas } from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';

const LANG = 'en'; // @lang: the language of the note on the text ('en' | 'es' | 'el')
const RECIPE = 'monotonic-greek-novel';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// Black text on an ivory paper and one blue-grey accent, as the Athens literary presses
// set their novels between the wars.
const palette = {
  ink: '#1f1d1b', // text
  accent: '#2f4f6b', // chapter numeral, rules, the title on the title page
  muted: '#6a645c', // running heads, the note on the text, the colophon
  paper: '#fbf8f1', // an ivory book paper
};
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: 'accent (defaults)', value: { hex: palette.accent, model: 'hex' } },
];
const [TEXT, DISPLAY] = ['Literata', 'GFS Didot']; // a text face with Greek; a Greek Didot
const [BODY, LEAD] = [9.7, 14.2]; // pt
const LINE = (LEAD * 25.4) / 72; // mm: one line, 5.01
const at = (to, edge, x = 0, y = 0) => ({ anchor: { to, edge }, offset: { x: mm(x), y: mm(y) } });
// Hung under another element, centred on it.
const under = (id, y) => ({ anchor: { to: id, edge: 'below', at: 'center' },
  offset: { y: mm(y) } });
const text = (id, content, fontFamily, size, placement, extra = {}) => ({ kind: 'text', id,
  content, fontFamily, fontSize: pt(size), color: col('ink'), align: 'center',
  overflow: 'wrap', placement, ...extra });
const rule = (id, y, width) => ({ kind: 'rule', id, direction: 'horizontal', thickness: pt(0.5),
  color: col('accent'),
  placement: { ...at('container', 'top', 0, y), size: { width: mm(width) } } });

// #region page: a 13.5 × 20.5 cm novel; the text block holds 31 whole lines
const TRIM = { width: 135, height: 205 }; // mm
const [TOP, INNER, OUTER, LINES] = [20, 18, 21, 31];
const page = {
  width: mm(TRIM.width), height: mm(TRIM.height), dpi: 150, backgroundColor: col('paper'),
  margins: { top: mm(TOP), bottom: mm(TRIM.height - TOP - LINES * LINE),
    left: mm(INNER), right: mm(OUTER), mirror: true }, // left is the inner margin on a recto
};
// 96 mm of measure: about 60 characters of Literata, nine or ten Greek words.
// #endregion

// #region answer: monotonic Greek, justified and hyphenated by its own patterns
// locale 'el' picks the monotonic patterns, which keep the digraphs and the diphthongs
// whole (μπρά-τσα, ευ-τυ-χί-α) and divide between two consonants the way a Greek school
// grammar does (κάρ-βου-να, αν-θρώ-πους). The same tag gives the Greek labels and tags the
// PDF as Greek. The defaults justify, hyphenate in config().locale and break by Knuth–Plass.
const LOCALE = 'el';
const bodyText = { // config().bodyText
  fontFamily: TEXT, fontSize: pt(BODY), lineHeight: pt(LEAD), color: col('ink'),
  boldColor: col('ink'), italicColor: col('ink'), referenceColor: col('ink'),
  firstLineIndent: em(1.2), indentAfterHeading: false,
  // Two letters at least on either side of a break (ξα-νά, not ξ-ανά) and no page that ends
  // on a divided word. Greek words run long: spaces from 0.8× to 1.6× of the face's own,
  // then up to 12‰ of tracking, and a last line under about eleven letters is a runt.
  hyphenation: { leftMin: 2, rightMin: 2 }, hyphenateAcrossColumns: false,
  maxWordSpacing: 1.6, minWordSpacing: 0.8, maxJustifyTracking: 12, runtMinCharacters: 22,
};
// #endregion

// #region caps: running heads in capitals, which drop the tonos by themselves
// textTransform 'uppercase' in a Greek document writes ΚΩΝΣΤΑΝΤΙΝΟΣ ΘΕΟΤΟΚΗΣ for
// Κωνσταντίνος Θεοτόκης: Greek capitals carry no accent, and the engine removes the tonos
// (and keeps a dialytika, ΑΫΠΝΙΑ) as it sets the letters. The Markdown keeps the accents,
// so search and the PDF's text read the words as written.
const caps = (size, tracking, color = 'muted') => ({ fontFamily: TEXT, fontSize: pt(size),
  fontWeight: 500, letterSpacing: pt(tracking), textTransform: 'uppercase', color: col(color) });
const SHIFT = (INNER - OUTER) / 2; // mm: the text block's centre is off the page's centre
const head = (id, content, parity, edge, x, y = 11.5, pages = 'body') => ({
  kind: 'text', id, content, parity, pages, ...caps(7.5, 1.4), placement: at('page', edge, x, y),
});
const folio = { fontWeight: 400, letterSpacing: pt(0), color: col('ink') }; // digits: no case
const header = { elements: [
  { ...head('verso-folio', '{pageNumber}', 'even', 'top-left', OUTER), ...folio },
  head('verso-author', '{author}', 'even', 'top', -SHIFT),
  head('recto-title', '{title}', 'odd', 'top', SHIFT),
  { ...head('recto-folio', '{pageNumber}', 'odd', 'top-right', -OUTER), ...folio },
] };
const drop = (parity, x) => ({ ...head(`drop-${parity}`, '{pageNumber}', parity, 'bottom', x,
  -11, 'opener'), ...folio });
const footer = { elements: [drop('odd', SHIFT), drop('even', -SHIFT)] };
// #endregion

// #region opener: the chapter's numeral in Didot, sunk ten lines, under the book's title
// # Α΄ {style="chapter"}: the numeral is the heading's text, a capital and the Greek numeral
// sign ʹ (U+0374), as Greek books number their chapters.
const chapter = { id: 'chapter', breakBefore: { enabled: true, parity: 'odd' },
  marginBottom: pt(0), // the opener's own height already ends on a line
  advancedDesign: { enabled: true, minHeight: pt(10 * LEAD), slot: { elements: [
    text('book', '{title}', TEXT, 8, at('container', 'top', 0, 2 * LINE),
      caps(8, 2.2, 'muted')),
    text('numeral', '{titleText}', DISPLAY, 30, at('container', 'top', 0, 3.6 * LINE),
      { color: col('accent'), lineHeight: 1 }),
    rule('rule', 6.4 * LINE, 10),
  ] } },
};
// #endregion

// #region front: the title page and, behind it, the note on the text
const front = (id, elements, { minHeight, ...extra } = {}) => ({ id,
  breakBefore: { enabled: true, parity: 'any' }, marginBottom: pt(0),
  header: { elements: [] }, footer: { elements: [] }, ...extra,
  advancedDesign: { enabled: true, ...(minHeight && { minHeight }), slot: { elements } } });
const headingStyles = [
  front('title-page', [
    text('author', '{author}', TEXT, 9.5, at('container', 'top', 0, 6 * LINE),
      caps(9.5, 2.4, 'ink')),
    // The title wraps in a long book; the subtitle and the rule hang from whatever it takes.
    text('title', '{titleText}', DISPLAY, 27, { ...at('container', 'top', 0, 9 * LINE),
      size: { width: 'fill' } }, { color: col('accent'), lineHeight: 1.15 }),
    text('subtitle', '{subtitle}', DISPLAY, 13, under('#title', 3)),
    { kind: 'rule', id: 'rule', direction: 'horizontal', thickness: pt(0.5), color: col('accent'),
      placement: { ...under('#subtitle', 6), size: { width: mm(14) } } },
    text('date', '{attr.year}', TEXT, 9, at('container', 'top', 0, 26 * LINE),
      { color: col('muted') }),
  ]),
  // The note sits low on the verso behind the title page, under a small label.
  front('note-page', [text('label', '{titleText}', TEXT, 7.5,
    at('container', 'top', 0, 15 * LINE), caps(7.5, 1.6, 'accent'))],
  { minHeight: pt(17 * LEAD) }),
  chapter,
];
// #endregion

const paragraphStyles = [
  // The note is in the edition's language, hyphenated with that language's patterns.
  { id: 'note', fontSize: pt(8.5), lineHeight: pt(LEAD * 0.85), color: col('muted'),
    italicColor: col('muted'), firstLineIndent: em(1.2), hyphenation: { locale: LANG } },
  { id: 'colophon', fontSize: pt(7), lineHeight: pt(10), color: col('muted'),
    italicColor: col('muted'), textAlign: 'center', firstLineIndent: pt(0),
    marginTop: pt(LEAD), hyphenation: { enabled: false } },
];

const config = () => ({
  locale: LOCALE, // written out, never LANG: the novel is Greek in every edition
  colorPalette, page, bodyText, paragraphStyles, headingStyles, header, footer,
  layout: { layoutType: 'single' }, // the default is two columns
  headings: { // the designs paint every title; this keeps Open Sans unloaded
    fontFamily: DISPLAY, fontWeight: 400,
    levels: [{ level: 1, breakBefore: { enabled: true, parity: 'any' } }],
  },
});

// ─── 2 · Content ────────────────────────────────────────────────────────────
// The title page and the note (content.<lang>.md), then chapter Α΄ (content.text.<lang>.md).
const markdown = [String.raw`---
title: "Η τιμή και το χρήμα"
subtitle: "Μυθιστόρημα"
author: "Κωνσταντίνος Θεοτόκης"
---

# Η τιμή και το χρήμα {style="title-page" year="1914"}

# A note on the text {style="note-page"}

:::paragraphs{style="note"}
Konstantinos Theotokis (1872–1923), of Corfu, published *Η τιμή και το χρήμα* (*Honour and Money*) in 1914. Its first chapter is given here whole, from the monotonic transcription of Greek Wikisource. The Corfiot speech of the women, and the northern speech of the two gendarmes, with its dropped vowels, are kept as Theotokis wrote them. One misprint is corrected and one opening guillemet restored; each line of dialogue is a paragraph of its own.
:::

:::paragraphs{style="colophon"}
Set in Literata and GFS Didot (SIL OFL) · Text: K. Theotokis, public domain, from el.wikisource
:::
`, String.raw`# Αʹ {style="chapter"}

Σαν καλή νοικοκυρά η σιόρα Επιστήμη η Τρινκούλαινα εσηκώθηκε πρωί πρωί από το κρεβάτι, εφόρεσε μόνο το μεσοφόρι της, έσιαξε λίγο τα μαλλιά της, άνοιξε την πόρτα της κ’ εβγήκε μία στιγμή στο λιθόστρωτο καντούνι της. Οι γειτόνοι εκοιμούνταν ακόμη· εκοίταξε ψηλά το μικρό κομμάτι του ουρανού που ολοένα εφώτιζε κι όπου έλαμπαν ακόμα δύο ή τρία αστέρια, εκοίταξε κιόλας στην άκρη του στενού του δρόμου τη θάλασσα, που απλωνότουν ως τα απέναντι βουνά της Στεριάς σταχτιά κ’ ήσυχη, κ’ εξαναμπήκε πάλι στο σπίτι της για να ανάψει φωτιά στο μικρό μαγειριό της. Είταν γυναίκα μισόκοπη, έως σαράντα πέντε χρονώ, λιγνή και ψηλή, με ζαρωμένο πρόσωπο, με πολλά μαλλιά άσπρα· αλλά τα μάτια της είταν ζωερά κι ακόμα νέα.

«Θα κάμει ζέστα σήμερα» εσυλλογίστηκε ανοίγοντας το μικρό παράθυρο του μαγειριού. Και βλέποντας πως το φως δεν είταν ακόμη αρκετό, άναψε μ’ ένα σπίρτο το κατάμαυρο λυχνάρι που εκρεμότουν από ένα καρφί στον κοκκινωπό και καπνισμένον τοίχο πάνωθε από την ογνήστρα, έπειτα εκοίταξε τριγύρου, γυρεύοντας με το βλέμμα την κούκουμα του καφέ, έσκυψε κ’ επήρε κάρβουνα και τ’ άναψε επιδέξια σε λίγες στιγμές στο σιδερένιο φουρνέλο, φυσώντας τα με το στόμα πρώτα και στερνά με το βέντουλο. Και εσυλλογιζότουν:

«Έξη στήματα σφυρίδες από τέσσερα φράνκα το στήμα κάνουνε… έξη, κ’ έξη, δώδεκα· και δώδεκα, εικοστέσσερα φράνκα· ως το σάββατο μεθαύριο, θα γένουνε άλλα τρία, τρεις ντουζίνες όλα όλα, τριάντα έξη φράνκα· θα πάνε κι αυτά μαζί με τ’ άλλα στον κομό, και σα γενούν εκατό του τα δίνω και τα παίρνει στην τράπεζα. Μην τα ιδεί όμως πρώτα ο μεθύστακάς μου, γιατί τα παίρνει και τα κάνει στάχτη ευτύς στην ταβέρνα! Ωχ, τόνε γνοιάζει εκείνονε για τα παιδιά μας, για τσι κοπέλες μας! τα μαυρισμένα μεγαλώνουνε ωστόσο. Να η Ρήνη μου, εγίνηκε, πάει, γυναίκα· αν επρόσμενα από ’φτόνε, αλλίμονό της! Ό,τι εκάμανε τούτα τα μπράτσα, αλλιώς ουδέ ποκάμισο ν’ αλλάξουμε δε θα ’χαμε.» Κι αναστέναξε κουνώντας το κεφάλι.

Όλο παίζοντας με το βέντουλο εφώναξε στην κρεβατοκάμαρη:

«Ε Ρήνη, τι έπαθες σήμερα! Ασηκώσου, μωρή κοπέλα! Με το νου πλουταίνει η κόρη, με τον ύπνο η ακαμάτρα. Δεν ακούς, ε! Ή κάνεις που δεν ακούς; Ξύπνα, λέω, ξύπνα.»

«Ακόμα δεν εχάραξε, μητέρα» αποκρίθηκε από μέσα χασμουριώντας η Ρήνη που ήθελε να πάρει ακόμα ένα γλυκό σουρούπι.

«Είναι μεσημέρι» της εφώναξε άσπλαχνα η μάνα της· «σήκω! Πρέπει να το πάρεις μάθημα να σηκώνεσαι πρωί· θα πας σε αντρός χέρια, και ανάθεμα δε θέλω να ’χω από τους γαμπρούς μου.»

Ολομεμιάς στο καντούνι ακούστηκε βιαστικό ποδοβολητό.

«Τι να ’ναι» έκαμε η νοικοκυρά προσέχοντας.

Κι αφήνοντας το βέντουλο εξαναβγήκε στην πόρτα.

Από το γιαλό ανέβαιναν βιαστικά στο καντούνι τρεις άνθρωποι. Ο ένας τους είταν φορτωμένος μ’ ένα βαρύ τσουβάλι που τον έσκυφτε· οι άλλοι δύο τον εβοηθούσαν με τα χέρια για να μπορεί να τρέχει. Κι αμέσως η νοικοκυρά εκατάλαβε τι εσυνέβαινε.

«Είναι λαθρέμποροι» είπε με το νου της· «θα τους έλαχε κάποιος μπελάς στο δρόμο· πώς λεχομανάνε, οι καημένοι, από το φόβο τους κι από τον κόπο.»

Ωστόσο οι άνθρωποι είχαν ζυγώσει το σπίτι της κυράς Επιστήμης και μπρος στην πόρτα της, καθαυτό στο κατώφλι, εξεβοήθησαν με μιας το σακί.

«Γλύτωσέ μας» της είπε ο ένας βιαστικά· «κρούψε το».

Τον εγνώρισε ποιος ήταν. «Δε μπορώ, Αντρέα μου, να σε χαρώ» του ’πε γλυκά· «η αρχή μάς υποψιάζεται.»

Μα αυτήν την στιγμή ήρθε σιμά της κ’ η θυγατέρα της, ακόμα από τον ύπνο, άντυτη κι αυτή και ξέπλεκη, και επρόβαλε το ξανθό της κεφάλι με τα ρόδινα μάγουλα πάνου από τον ώμο της μάνας της, και της είπε με σπλάχνος:

«Θα το αρνηθείς του Αντρέα;»

Κι ο Αντρέας ωστόσο αποκρενότουν: «Η ώρα βιάζει· μας κυνηγούνε· κάμε ό,τι θέλεις· κατάδωσέ μας, α σου το λέει η καρδιά.» Κι αμέσως με τους συντρόφους του επήρε το φυγί προς τον ανήφορο.

«Εκατάλαβες μπελιάς αμπονώρα, αμπονώρα, που να μην είχα σηκωθεί!» είπε η κυρά Επιστήμη σταυρώνοντας ανάποδα τα χέρια της και κοιτάζοντας λυπητερά το τσουβάλι «θέλεις και δε θέλεις πιε γάιδαρε αγιάσμα. Και να σου λέω, μωρή κοπέλα να σηκώνεσαι πρωί!»

«Έλα, μάνα» της είπε χαμογελώντας η Ρήνη, «πιάσ’ το να το κυλήσουμε μέσα.»

Και χωρίς να ειπούν άλλο λόγο τό ’πιασαν και οι δύο με δύναμη και τό ’συραν με προφύλαξη στο σπίτι.

Η Ρήνη έκλεισε την πόρτα, έβγαλε από το πάτωμα, που σ’ ένα μέρος ήταν κινητό, δύο τρεις σανίδες, και σε μία στιγμή το σακί έπεφτε μέσα στο κατώγι και το πάτωμα ξαναρχότουν στη θέση του, σαν να μην είχε γίνει τίποτα. Μα ο πατέρας τώρα εφώναζε από το κρεβάτι:

«Τι κάνετε, μωρές παραδερμένες; θα σας βάλουνε στη φυλακή και μένα μαζί σας, θα πάρεις και τα παιδιά μας στο λαιμό σου.»

«Το δικό μου τ’ όνομα πάρ’ το εσύ γειτόνισσα!» του αποκρίθηκε η κυρά Επιστήμη κάνοντας πως θυμώνει «αφόντις μας εκατέστρεψες, κ’ εσπατάλησες ό,τι κι αν είχες στον τζιόγο, στο πιοτό και ο Θεός το ξέρεις πού αλλού, τώρα χλιέσαι τα παιδιά μας, μεθούα! Πώς θα βγει το θεόψωμο;»

«Μα δε μας λείπει, μωρή γυναίκα» της αποκρίθηκε καθίζοντας στο κρεβάτι και κοιτάζοντας την πόρτα της κάμαρας όπου τώρα η νοικοκυρά εστεκότουν τρομερή, παρέτοιμη να μαλλώσει περισσότερο.

«Το φέρνεις βλέπεις εσύ κάθε μέρα» του αποκρίθηκε βάζοντας το γρόθο της στη ζώση. «Πού είσουνα εψές και επροψές και πού θα πας απόψε; Στην ταβέρνα ε; Κι ακόμα έχεις μούτρο και μιλείς!»

«Ό,τι λάχει κι απολάχει» της απάντησε δειλά δειλά, θέλοντας να τελειώσει «η ίδια θα ’χεις το φταίξιμο. Μα ας αφήσουμε τώρα τσι κουβέντες, άμε να μου φτιάξεις τον καφέ να πάμε στη δουλειά μας.»

«Δε γνοιάζεσαι παρά για την κοιλιά σου» του απάντησε με ημερότερη φωνή· «γιατί νά ’σαι έτσι, καημένε;»

Και εξαναγύρισε στο μαγειριό της όπου τώρα τα αθράκια εξεψύχιζαν, και το νερό δεν είχε ζεστάνει.

Μα ένας νέος ποδοβολημός την έφερε πάλι στην πόρτα.

«Είναι οι χωροφυλάκοι» είπε με το νου της χωρίς κανένα φόβο «ας πάνε να τσου μιλήσουμε.»

«Κιουρία» της εφώναξε ο ένας «μήπους πέρασαν δώθ’ νις;»

«Ποιοι;» του αποκρίθηκε χαμογελώντας.

«Δεν άκ’σις τίπ’τς; Μας χτ’πήσανι, ανάθιμ’ τουν πατέρα τ’ς, του νουματάρχ’ και μας ’φ’γαν. Δεν τις είδις να διαβούνι;»

«Εγώ;» απολογήθηκε κάνοντας το σταυρό της «τώρα σηκώθηκα· με βλέπετε που ’μαι άντυτη ακόμα… Μα πιστεύω ν’ άκουσα τρεχατά στ’ άλλο το καντούνι· πηγαίνετε ιδέστε· πάνε προς τη χώρα, λογιάζω· αν τρέξετε γλήγορα τσου πιαίνεται.»

Οι χωροφύλακες εκοιτάχτηκαν σα να ρωτούσαν ο ένας τη γνώμη του άλλου:

«Άμι γύριβε τ’ς τώρα» έκαμε ένας «μας φύγανι, χαλάλ’ τ’ς για τούτ’ τ’ν φουρά.»

«Άλλοντ’ς, βρε πιδιά, κάτ’ κουλνούσ’ κι για μας, τώρα αντί ξύλου!»

Κ’ εχαιρέτησαν τη νοικοκυρά πηγαίνοντας αφρόντιστα προς το γιαλό και παίζοντας με τα κομπολόγια τους.
`].join('\n\n');

// ─── 3 · Fonts ──────────────────────────────────────────────────────────────
const FONTS = { // every face the pages use, loaded before the build
  Literata: ['400', '400i', '500'], // TEXT: the novel, the note, the heads and the folios
  'GFS Didot': ['400'], // DISPLAY: the title and the chapter numeral
};

// ─── 4 · Build & show ───────────────────────────────────────────────────────
const doc = await buildDocumentWithFonts({ markdown }, config(), kitFonts(FONTS));
showPages(doc, { title: 'Η τιμή και το χρήμα' });
offerPdf(() => renderToPdf(doc, { fontProvider: fontsourceProvider }), `${RECIPE}.pdf`);

// ─── Kit ── helpers shared by every Cookbook recipe · postext.dev/cookbook ─────

// ─── Kit · core v1 ── the same in every recipe · postext.dev/cookbook
function mm(value) { return { value, unit: 'mm' }; }
function pt(value) { return { value, unit: 'pt' }; }
function em(value) { return { value, unit: 'em' }; }
/** The sample language's string: t({ en: 'Figure', es: 'Figura' }). */
function t(strings) { return strings[LANG] ?? Object.values(strings)[0]; }
/** A file in this recipe's assets folder, served from the Postext repo by jsDelivr. */
function asset(file) { return `https://cdn.jsdelivr.net/gh/drnachio/postext@main/cookbook/${RECIPE}/assets/${file}`; }

// ─── Kit · fonts v3 ── the same in every recipe · postext.dev/cookbook
// Postext loads the faces a config asks for before layout and asks the kit
// for Fontsource's files, the ones the PDF embeds too.

/** buildDocumentWithFonts' options: the resolver, and FONTS' faces loaded
 *  with the config's. FONTS = { 'Family Name': ['400', '400i', '700'] }. */
function kitFonts(FONTS = {}) {
  const faces = Object.entries(FONTS).flatMap(([family, specs]) => specs.map((spec) =>
    ({ family, weight: parseInt(spec, 10), style: spec.endsWith('i') ? 'italic' : 'normal' })));
  return { resolve: fontsourceResolver, faces };
}

/** A face's files with their ranges: latin, then latin-ext and greek when
 *  `text` needs them (kitSubsetsFor). Null for a face Fontsource lacks. */
async function fontsourceResolver(family, weight, style, { text = '' } = {}) {
  const id = fontsourceId(family);
  const meta = await fontsourceMeta(family);
  if (meta && !(await fontsourceWeights(family, style)).includes(weight)) return null;
  kitStatus('Loading fonts…');
  const at = await fontsourceAt(id);
  return ['latin', ...kitSubsetsFor(text, meta)].map((subset) => ({
    source: `${at}files/${id}-${subset}-${weight}-${style}.woff2`,
    unicodeRange: kitRanges()[subset],
  }));
}

/** Each file's unicode-range (a function: the kit runs after the pen's code). */
function kitRanges() {
  return {
    latin: 'U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,'
      + 'U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD',
    'latin-ext': 'U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,'
      + 'U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF',
    greek: 'U+0370-03FF',
  };
}

/** For the cjk, arabic and comics blocks: loads `faces` (as FONTS) for the
 *  sample `text`; `optional` skips a face Fontsource lacks. Files are added in
 *  the order asked, the last winning a shared character. Resolves to the count. */
async function loadFonts(faces, text = '', { optional = false } = {}) {
  kitStatus('Loading fonts…');
  const ranges = kitRanges();
  const jobs = [];
  for (const [family, specs] of Object.entries(faces)) {
    const id = fontsourceId(family);
    const todo = [...new Set(specs)].map((spec) => [parseInt(spec, 10), spec.endsWith('i') ? 'italic' : 'normal'])
      .filter(([weight, style]) => !hasFace(family, weight, style)); // before any await
    const at = fontsourceAt(id);
    const meta = optional || /[^\0-ÿ]/u.test(text) ? await fontsourceMeta(family) : null;
    const subsets = ['latin', ...kitSubsetsFor(text, meta)];
    for (const [weight, style] of todo) {
      if (optional && !(meta && (await fontsourceWeights(family, style)).includes(weight))) continue;
      for (const subset of subsets) {
        const url = `${await at}files/${id}-${subset}-${weight}-${style}.woff2`;
        const face = new FontFace(family, `url(${url}) format('woff2')`,
          { weight: String(weight), style, unicodeRange: ranges[subset] });
        jobs.push(face.load().catch(() => {
          if (subset === 'latin' && !optional) throw new Error(`Fontsource has no ${family} ${weight} ${style}`);
        }));
      }
    }
  }
  const ready = await Promise.all(jobs).catch((error) => { kitFail(error); throw error; });
  return ready.filter((face) => face && document.fonts.add(face)).length;
}

/** A loaded FontFace covers this face (fonts.check() says yes to any family). */
function hasFace(family, weight, style) {
  for (const face of document.fonts) {
    if (face.status !== 'loaded' || face.style !== style) continue;
    if (face.family.replace(/^["']|["']$/g, '') !== family) continue;
    const [low, high = low] = face.weight.split(' ').map(Number);
    if (weight >= low && weight <= high) return true;
  }
  return false;
}

/** The files beyond latin `text` needs that `meta`'s family ships. */
function kitSubsetsFor(text, meta) {
  return [[/[Ā-˿ᴀ-ᶿḀ-ỿ†ℓⱠ-Ɀ꜠-ꟿ]/u, 'latin-ext'], [/[Ͱ-Ͽ]/u, 'greek']]
    .filter(([re, x]) => re.test(text) && meta?.subsets?.includes(x)).map(([, x]) => x);
}

/** Fontsource's id for a family: 'Source Serif 4' → 'source-serif-4'. */
function fontsourceId(family) { return family.toLowerCase().replace(/\s+/g, '-'); }

/** A package's folder at the one version @5 names now (#766). */
function fontsourceAt(id, u = `https://cdn.jsdelivr.net/npm/@fontsource/${id}@`) {
  return (fontsourceAt.c ??= {})[id] ??= fetch(u + '5/package.json').then((r) => r.json())
    .then((p) => p.version || 5, () => 5).then((v) => `${u}${v}/`);
}

/** The family's Fontsource metadata (weights, styles, subsets), or null. */
function fontsourceMeta(family, id = fontsourceId(family)) {
  return (fontsourceMeta.c ??= {})[id] ??= fetch(`https://api.fontsource.org/v1/fonts/${id}`)
    .then((res) => (res.ok ? res.json() : null), () => null);
}

/** The weights the package ships in `style`: the API pairs none (no Libre
 *  Caslon 700 italic file), so italics are read from latin-italic.css. */
function fontsourceWeights(family, style, id = fontsourceId(family)) {
  return (fontsourceWeights.c ??= {})[id + style] ??= fontsourceMeta(family).then(async (m) => {
    if (!m?.styles.includes(style)) return m ? [] : [400, 700];
    const css = style === 'italic' ? await fetch(`${await fontsourceAt(id)}latin-italic.css`).then((r) => (r.ok ? r.text() : ''), () => '') : '';
    const w = [...css.matchAll(/weight: (\d+)/g)].map((x) => +x[1]);
    return w.length ? w : m.weights;
  });
}

// ─── Kit · viewer v2 ── the same in every recipe · postext.dev/cookbook
/** The pages as spreads on a dark desk, page 1 alone, then verso | recto,
 *  each painted when it scrolls near. Other options go to renderPageToCanvas. */
function showPages(docs, { title, width = 460, ...render } = {}) {
  const root = viewer(title);
  const pages = [docs].flat().flatMap((doc) =>
    doc.pages.map((page) => ({ doc, page, n: (doc.pageIndexOffset ?? 0) + page.index })));
  const spreads = [];
  let verso = null;
  for (const p of pages) {
    if (p.n % 2 === 1) { if (verso) spreads.push([verso, null]); verso = p; }
    else { spreads.push([verso, p]); verso = null; }
  }
  if (verso) spreads.push([verso, null]);
  const density = Math.min(window.devicePixelRatio || 1, 2);
  showPages.painter?.disconnect();
  const painter = new IntersectionObserver((entries) => {
    for (const { isIntersecting, target } of entries) {
      if (!isIntersecting) continue;
      painter.unobserve(target);
      const { doc, page } = target.postext;
      renderPageToCanvas(page, doc, target, { ...render, scale: (width * density) / page.width });
    }
  }, { rootMargin: '800px' });
  showPages.painter = painter;
  root.replaceChildren(...spreads.map((pair) => {
    const spread = document.createElement('div');
    spread.className = 'pt-spread';
    for (const p of pair) {
      const figure = document.createElement('figure');
      if (p) {
        const label = p.page.pageLabel || String(p.n + 1);
        const canvas = document.createElement('canvas');
        canvas.postext = p;
        canvas.style.aspectRatio = `${p.page.width} / ${p.page.height}`;
        canvas.setAttribute('role', 'img');
        canvas.setAttribute('aria-label', `Page ${label}`);
        const folio = document.createElement('figcaption');
        folio.textContent = label;
        figure.append(canvas, folio);
        painter.observe(canvas);
      } else figure.className = 'pt-blank';
      spread.append(figure);
    }
    return spread;
  }));
  kitStatus(`${pages.length} ${pages.length === 1 ? 'page' : 'pages'}`);
  document.documentElement.dataset.postext = 'ready';
  return pages.length;
}

/** The desk, the bar and the error reporting, created once. */
function viewer(title) {
  if (!document.getElementById('pt-kit')) {
    document.head.insertAdjacentHTML('beforeend', `<style id="pt-kit">
      :root { color-scheme: dark; }
      body { margin: 0; background: #0e1014; color: #b9bcc4; font: 13px/1.45 system-ui, sans-serif; }
      #pt-bar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center;
        gap: 6px 16px; padding: 10px 16px; background: rgb(14 16 20 / .92); backdrop-filter: blur(6px);
        border-bottom: 1px solid #23262d; }
      #pt-bar strong { color: #f4f1ea; font-weight: 600; }
      #pt-actions { display: flex; gap: 12px; margin-left: auto; }
      #pt-actions a, #pt-actions button { color: #d8a21a; font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
      #pages { display: grid; justify-items: center; gap: 48px; padding: 32px 16px 72px; }
      .pt-spread { display: flex; }
      .pt-spread figure { margin: 0; width: min(460px, 44vw); }
      .pt-spread canvas { display: block; width: 100%; background: #fff;
        box-shadow: 0 1px 2px rgb(0 0 0 / .5), 0 22px 44px -16px rgb(0 0 0 / .8); }
      .pt-spread figure:first-child canvas { box-shadow: inset -14px 0 14px -14px rgb(0 0 0 / .18), 0 1px 2px rgb(0 0 0 / .5), 0 22px 44px -16px rgb(0 0 0 / .8); }
      .pt-spread figcaption { margin-top: 10px; text-align: center; font: 600 10px/1 system-ui, sans-serif;
        letter-spacing: .18em; text-transform: uppercase; color: #6c7079; }
      .pt-blank { visibility: hidden; }
      @media (max-width: 760px) {
        .pt-spread { flex-direction: column; gap: 32px; }
        .pt-spread figure { width: min(460px, 92vw); }
        .pt-blank { display: none; }
      }
    </style>`);
    document.body.insertAdjacentHTML('afterbegin',
      '<header id="pt-bar"><strong id="pt-title"></strong><span id="pt-status" role="status"></span><span id="pt-actions"></span></header>');
    document.getElementById('pt-title').textContent = document.title || 'Postext';
    addEventListener('error', (event) => kitFail(event.error ?? event.message));
    addEventListener('unhandledrejection', (event) => kitFail(event.reason));
  }
  if (title) document.getElementById('pt-title').textContent = title;
  return document.getElementById('pages')
    ?? document.body.appendChild(Object.assign(document.createElement('main'), { id: 'pages' }));
}

function kitStatus(text) {
  viewer();
  document.getElementById('pt-status').textContent = text;
}

function kitFail(error) {
  document.documentElement.dataset.postext = 'error';
  kitStatus(`Error: ${error?.message ?? error}`);
}

// ─── Kit · pdf v3 ── the same in every recipe that exports a PDF
/** The Fontsource files the screen used, as TrueType, with their range and
 *  place: the nearest weight the family ships in that style, upright with no italic;
 *  latin, then what its letters need (kitSubsetsFor). */
async function fontsourceProvider(family, weight, style, request) {
  const id = fontsourceId(family);
  const meta = await fontsourceMeta(family);
  const s = style === 'italic' && meta && !meta.styles.includes('italic') ? 'normal' : style;
  const shipped = meta ? await fontsourceWeights(family, s) : [];
  const weights = shipped.length ? shipped : [400, 700];
  const w = weights.reduce((a, b) => (Math.abs(b - weight) < Math.abs(a - weight) ? b : a));
  const text = String.fromCodePoint(...(request?.codePoints ?? []));
  const files = await Promise.all(['latin', ...kitSubsetsFor(text, meta)].map(async (subset, order) => {
    const res = await fetch(`${await fontsourceAt(id)}files/${id}-${subset}-${w}-${s}.woff2`);
    if (!res.ok) throw new Error(`Fontsource has no ${family} ${w} ${s} ${subset}`);
    return Object.assign(await decompressWoff2(new Uint8Array(await res.arrayBuffer())),
      { unicodeRange: kitRanges()[subset], order });
  }));
  return files.length === 1 ? files[0] : files;
}

/** A "Build the PDF" button; then "Open the PDF" (a new tab: CodePen's frame
 *  shows no PDFs) and a download link. */
function offerPdf(makePdf, filename) {
  viewer();
  const button = Object.assign(document.createElement('button'), { type: 'button', textContent: 'Build the PDF' });
  button.dataset.postextPdf = filename;
  button.addEventListener('click', async () => {
    button.disabled = true;
    button.textContent = 'Building the PDF…';
    try {
      const bytes = await makePdf();
      const url = URL.createObjectURL(new Blob([bytes], { type: 'application/pdf' }));
      const size = `${Math.max(1, Math.round(bytes.length / 1024))} KB`;
      button.replaceWith(
        Object.assign(document.createElement('a'), { href: url, target: '_blank', rel: 'noopener', textContent: 'Open the PDF ↗' }),
        Object.assign(document.createElement('a'), { href: url, download: filename, textContent: `Download ${filename} · ${size}` }));
    } catch (error) {
      button.disabled = false;
      button.textContent = 'Build the PDF';
      kitFail(error);
    }
  });
  document.getElementById('pt-actions').append(button);
}

// ─── /Kit ───────────────────────────────────────────────────────────────────────
```

## 常见问题

- **标题样式会继承其级别的分页设置.** headingStyles中的条目没有写出的字段都取自它所属的标题级别，breakBefore也不例外。在:::pagebreak之后以H1设置样式的目录页或版权页会继承parity 'odd'，结果落在一张空白页之后。给这类样式设置breakBefore: { enabled: false }。

- 正文里位于词首的大写字母保留tonos，写在字母左侧（Ό,τι、Ή κάνεις）。只有`textTransform: 'uppercase'`才去掉重音；Markdown里要一直写上重音。
- GFS Didot没有❦花饰，也没有斜体。用这款字体排花饰或*强调*，会落到别的字体或倾斜的正体上；本例只在书名和章号上用Didot。
- 96 mm行宽里的短对白给断行留的余地小。捕获统计97行中有3行超过正常词距的1.6倍，最差的在第4页；加宽行宽或缩小字号可以减少。

## 致谢

- 食谱: Ignacio Ferro ([@drnachio](https://github.com/drnachio))
- 文字: Η τιμή και το χρήμα (1914), chapter I, complete, from the monotonic transcription of el.wikisource (revision 101144), with one misprint corrected, one opening guillemet restored, elision marks as ’ and each line of dialogue a paragraph: Konstantinos Theotokis ([来源](https://el.wikisource.org/wiki/Η_Τιμή_και_το_Χρήμα/Κεφάλαιο_Α')), 公有领域
- 文字: The note on the text and the colophon: Postext Cookbook, 原创
- 字体: Literata (OFL-1.1), GFS Didot (OFL-1.1)
- 代码: MIT · 示例内容: MIT

## 相关食谱

- [No. 104 · 按IEC规则断词的加泰罗尼亚语中篇小说](https://postext.dev/zh/cookbook/catalan-pocket-novella.md): 把Narcís Oller的《El transplantat》全文排成32页口袋本：按IEC规则划分加泰罗尼亚语音节，l·l断为il- | lusió，每章一幅版画。 · 难度 2 (中级) · 小说、戏剧与文学散文
- [No. 016 · 口袋本小说里两端对齐的西班牙语](https://postext.dev/zh/cookbook/spanish-pocket-novel.md): 把《Marianela》第一章开头排成口袋本：西班牙语断词，词间距小于1.7倍，没有孤字，抬高的首字，地图作为Figura 1。 · 难度 2 (中级) · 小说、戏剧与文学散文
- [No. 014 · 窄栏两端对齐中的均匀词间距](https://postext.dev/zh/cookbook/justification-lab.md): 用Knuth–Plass断行，把词间距限制在正常值的0.8至1.6倍之间，旁边是一份贪心断行的对照版，其中过松的行、孤行和孤字都根据VDT标出。 · 难度 3 (高级) · 杂志与小志
