Kurz gesagt
Das erste Kapitel eines griechischen Romans von 1914 als Taschenbuch. Die Wörter werden getrennt, wie es die griechische Schulgrammatik lehrt; die Kolumnentitel stehen in Versalien, die im Griechischen keine Akzente tragen.
Was Sie setzen
Das erste Kapitel von Konstantinos Theotokis’ Roman Η τιμή και το χρήμα (Ehre und Geld, 1914), aus dem griechischen Wikisource, als Buch in 13,5 × 20,5 cm. Davor stehen eine Titelseite und eine Notiz zum Text; das Kapitel beginnt auf einer rechten Seite unter seiner Ziffer Αʹ in GFS Didot, zehn Zeilen abgesenkt. Der Text ist Literata 9,7 auf 14,2 pt, 31 Zeilen je Seite, im Blocksatz und mit den monotonischen Mustern getrennt. Die Kolumnentitel tragen den Autor links und den Titel rechts, in gesperrten Versalien, die ihre Akzente verlieren, wie es griechische Großbuchstaben verlangen. Notiz und Kolophon folgen der Sprache der Ausgabe; der Roman bleibt in allen dreien griechisch.
Dieses Rezept beantwortet
- Wie erreiche ich guten Blocksatz und gute Silbentrennung für spanischen, französischen oder deutschen Text?
- Wie setze ich Kolumnentitel: Buchtitel auf der linken Seite, Kapiteltitel auf der rechten, Seitenzahl außen?
- Wie schreibe ich Dialogstriche, Jahreszahlen am Absatzanfang, Preise und wörtliche Symbole, ohne dass Markdown sie falsch liest?
Die kurze Antwort
// 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,
};
Zutaten
- Funktionen
- Silbentrennung und DokumentspracheOptimaler Zeilenumbruch (Knuth-Plass)Kolumnentitel und SeitenzahlenGrundschriftEinzüge, Ausrichtung und AbsatzabständeWitwen, Waisen und kurze AusgangszeilenGestaltete AuftakteÜberschriftenformateÜberschriftenattributeText, Linien und Kästen in SeitengestaltungenKopfzeilen nach SeitenrolleGespiegelte RänderPapierfarbeAbsatzformateDokument-MetadatenSemantische FarbpalettePDF-ExportIm PDF eingebettete Schriften
- Nutzt außerdem
- Kolumnentitel je Abschnitt
- Schrift
- Literata, GFS Didot (SIL OFL 1.1)
- Dateien
- Keine: Jedes Bild wird im Code gezeichnet
Zubereitung
#1 · Die Sprache angeben: el
Der Code steht in der kurzen Antwort oben. locale: 'el' wählt die monotonischen griechischen Muster (Silbentrennung). Sie lassen die Digraphe μπ, ντ, γκ, τσ, τζ und die Diphthonge ganz und trennen zwischen zwei Konsonanten wie eine griechische Schulgrammatik: Seite 3 trennt εση-κώθηκε und μεσο-φόρι. leftMin und rightMin mit 2 verbieten einen einzelnen Buchstaben vor oder nach der Trennung, und hyphenateAcrossColumns: false lässt keine Seite mit einem getrennten Wort enden. Griechische Wörter sind lang; Wortabstände vom 0,8- bis 1,6-Fachen des Schriftabstands und danach bis 12 ‰ Laufweite gleichen die Zeilen aus.
#2 · Kolumnentitel in Versalien
// 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)] };
In einem griechischen Dokument schreibt textTransform: 'uppercase' ΚΩΝΣΤΑΝΤΙΝΟΣ ΘΕΟΤΟΚΗΣ für Κωνσταντίνος Θεοτόκης: Griechische Großbuchstaben tragen keinen Tonos, und die Engine entfernt ihn beim Setzen, während das Trema bleibt (ΑΫΠΝΙΑ). Das Markdown und der Text des PDF behalten die akzentuierten Wörter, die Suche findet sie. Die Seitenzahlen haben keine Groß- und Kleinform und behalten das Gewicht 400.
#3 · Eine Kapitelziffer in Didot
// # Α΄ {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),
] } },
};
Die Überschrift # Αʹ {style="chapter"} ist die Ziffer selbst: ein Großbuchstabe und die Keraia ʹ, wie griechische Bücher ihre Kapitel zählen. Das Design setzt sie in GFS Didot 30 pt unter den Buchtitel, mit einer kurzen Linie, und minHeight senkt den Text um zehn Zeilen ab. breakBefore mit der Parität odd öffnet das Kapitel rechts; ein Überschriftenstil legt die Seite seines Umbruchs selbst fest.
Das ganze Rezept
// ═══ 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
Das zusammengesetzte script.js läuft unverändert: Fügen Sie es in das Modulskript einer beliebigen Seite ein, oder öffnen Sie das Rezept auf CodePen. Ordner des Rezepts auf GitHub ↗ (öffnet sich in einem neuen Tab)
Häufige Fehler
Häufiger Fehler
Ein Überschriftenformat erbt den Seitenumbruch seiner Ebene
Ein Eintrag in headingStyles übernimmt jedes Feld, das er auslässt, von seiner Überschriftenebene, breakBefore eingeschlossen. Ein Inhaltsverzeichnis oder Impressum, das nach einem :::pagebreak über eine H1 gestaltet wird, erbt die Parität 'odd' und landet hinter einer Vakatseite. Geben Sie einem solchen Format breakBefore: { enabled: false }. Überschriftenformate →
- Ein Großbuchstabe am Wortanfang im Fließtext behält seinen Tonos, links davon (Ό,τι, Ή κάνεις). Nur ein
textTransform: 'uppercase'entfernt die Akzente; das Markdown sollte sie immer tragen. - GFS Didot hat weder das Fleuron ❦ noch eine Kursive. Ein Schmuckzeichen oder eine Betonung in dieser Schrift fällt auf eine andere Schrift oder eine schräg gestellte Antiqua zurück; dieses Rezept nutzt die Didot nur für Titel und Ziffer.
- Kurze Dialogzeilen in einer Satzbreite von 96 mm lassen dem Umbruch wenig Spiel. Die Aufnahme zählt 3 von 97 Zeilen über dem 1,6-Fachen des normalen Abstands, die schlimmste auf Seite 4; eine breitere Satzbreite oder ein kleinerer Grad senken die Zahl.
Nachweise
- Rezept
- Ignacio Ferro
- Text
- Η τιμή και το χρήμα (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 · gemeinfrei
- The note on the text and the colophon · Postext Cookbook · eigener Text
- Schriften
- Literata (SIL OFL 1.1) · GFS Didot (SIL OFL 1.1)
- Code
- MIT, wie Postext
Diesen Text bearbeiten ↗ (öffnet sich in einem neuen Tab)Ordner des Rezepts auf GitHub ↗ (öffnet sich in einem neuen Tab)


