Zum Hauptinhalt springen
Rezept Nummer 205

Rezepte · Kapitel 2 · Schrift und Text

Ein russischer Roman mit Anmerkungen je Seite

Das erste Kapitel von Krieg und Frieden auf 130 × 200 mm: Dialogstriche, Tolstois Übersetzungen als Sternchennoten und Wörter, die zusammenbleiben.

Auf dieser Seite
Ausgabe
Canvas · PDF
Stufe
Mittel
Postext
Getestet mit Postext 1.100.0
Erfordert ≥ 1.100.0 · postext-pdf ≥ 1.100.0
Lizenz
Aktualisiert am 2. Dez. 2026
Code MIT · Text MIT

S. 4–5 von 10

  • Englisches Beispiel: noch keine deutsche Ausgabe
  • Endformat 130 × 200 mm
  • 1 Spalte
  • Old Standard TT 10,5/13,2
  • Oranienbaum
  • 10 Seiten
  • Stufe
  • Postext 1.100.0
  • In 33 ms gesetzt
  • 149 Zeilen Code

Kurz gesagt

Der Anfang von Krieg und Frieden auf Russisch, als gebundenes Buch alter Schule. Die französischen Reden sind am Fuß jeder Seite übersetzt, mit Sternchen, die auf der nächsten Seite neu beginnen.

Was Sie setzen

Band I, Teil I, Kapitel I von Война и мир (Krieg und Frieden), vollständig nach der Gesamtausgabe (Band 9, 1937), auf 130 × 200 mm, dem Format des russischen Bogens 84 × 108/32. Der Text steht in Old Standard, 10,5 auf 13,2 pt, 34 Zeilen zu 100 mm. Anna Pawlowna und Fürst Wassili sprechen halb französisch; Tolstois eigene Übersetzungen stehen am Fuß, mit Sternchen, die auf jeder Seite neu beginnen. Die Überschriften in Oranienbaum schreiben Том первый und Часть первая aus. Voran geht ein Titelblatt in Schwarz und Ziegelrot, auf dessen Rückseite eine Notiz in der Sprache der Ausgabe steht.

Dieses Rezept beantwortet

  • Wie setze ich einen russischen Roman: Gedankenstriche im Dialog, seitenweise mit Sternchen gezählte Anmerkungen, Wörter, die zusammenbleiben?
  • Wie mache ich Fußnoten?
  • Wie schreibe ich Dialogstriche, Jahreszahlen am Absatzanfang, Preise und wörtliche Symbole, ohne dass Markdown sie falsch liest?
  • Wie setze ich Kolumnentitel: Buchtitel auf der linken Seite, Kapiteltitel auf der rechten, Seitenzahl außen?

Die kurze Antwort

script.js · Zeilen 45–62im vollständigen Code
// The language hyphenates by the Russian patterns, keeps a preposition with its word and a
// dash off the line start (bodyText.wordTies 'avoid'), holds the space after a dialogue's
// opening dash at its own width, counts the notes again on every page and indents their
// first line. The indents below are the Russian ones: 1,5 em, the first paragraph included.
const LOCALE = 'ru';
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.5), indentAfterHeading: true, // the default leaves the first one flush
  hyphenation: { leftMin: 2, rightMin: 2 }, maxWordSpacing: 1.6, minWordSpacing: 0.8,
  wordTies: 'avoid', // the default in these languages
  maxJustifyTracking: 15, // room for the ties in a 100 mm line
};
const footnotes = { // config().footnotes: *, **, ***, again from * on the next page
  numberFormat: 'symbols', // locale 'ru' gives symbols: ['*'] and numbering: 'page'
  fontSize: pt(8.6), lineHeight: pt(10.6),
  separator: { width: 0.25, lineWidth: pt(0.4), color: col('ink') },
};

Zutaten

Schrift
Old Standard TT, Oranienbaum (SIL OFL 1.1)
Dateien
Keine: Jedes Bild wird im Code gezeichnet

Zubereitung

#1 · Sprache und Sternchen einstellen

Der Code steht oben in der kurzen Antwort. locale: 'ru' trennt nach den russischen Mustern, hält eine Präposition, eine Zahl oder einen Gedankenstrich bei ihrem Wort und zählt die Anmerkungen je Seite. numberFormat: 'symbols' setzt sie mit Sternchen. Das Zeichen wird getippt, wo das Russische es verlangt, vor Punkt oder Komma und nach dem Fragezeichen; der Punkt fällt nie auf die nächste Zeile. Ein Satzspiegel von 100 mm ist eng für so viele Bindungen, darum etwas Laufweite. Jede französische Stelle steht in :ltr[…]{lang=fr} und wird nach französischen Mustern getrennt.

#2 · Die Seite aus dem Bogen gewinnen

script.js · Zeilen 36–41im vollständigen Code
const [TOP, INNER, OUTER, LINES] = [22, 15, 15, 34];
const page = {
  sizePreset: '84x108/32', dpi: 150, backgroundColor: col('paper'), // the sheet of GOST 5773
  margins: { top: mm(TOP), bottom: mm(200 - TOP - LINES * LINE), // 130 × 200 mm
    left: mm(INNER), right: mm(OUTER), mirror: true },
};

sizePreset: '84x108/32' gibt die 130 × 200 mm der GOST 5773. Der Fußsteg ergibt sich aus 34 Zeilen, und mirror kehrt die Stege auf linken Seiten um.

#3 · Ein Wort sperren, einen Vokal betonen

script.js · Zeilen 66–68im vollständigen Code
// The edition's italics (грипп, рап) are spaced here, as Russian books set an emphasis
// before italics took over. A stress is U+0301 after its vowel: что́, сто́ите.
const characterStyles = [{ id: 'razryadka', name: 'Разрядка', letterSpacing: em(0.16) }];

Russische Bücher jener Zeit sperrten ein Wort, um es hervorzuheben. Die разрядка ist ein Zeichenstil mit letterSpacing; hier tragen ihn die beiden Wörter, die die Ausgabe kursiv setzt, грипп und рап. Die Betonung ist U+0301 nach dem Vokal, wie in что́ und сто́ит.

#4 · Band und Teil ausschreiben

script.js · Zeilen 72–90im vollständigen Code
// The Markdown has # Том, ## Часть and ### Глава; 'replace' prints the number alone. Том is
// masculine, so its ordinal asks for -masculine; Часть is feminine, the Russian default.
const level = (n, numberingTemplate, design, minHeight, extra = {}) => ({ level: n,
  numberingTemplate, numberPosition: 'replace', marginTop: pt(0), marginBottom: pt(0),
  breakBefore: { enabled: false },
  advancedDesign: { enabled: true, minHeight: pt(minHeight * LEAD), slot: { elements: design } },
  ...extra });
const levels = [
  level(1, 'Том {1:ordinal-masculine}', [
    text('volume', '{titleText}', DISPLAY, 17, at('container', 'top', 0, 2.2 * LINE),
      caps(2.4, 'red')),
    { kind: 'rule', id: 'rule', direction: 'horizontal', thickness: pt(0.6), color: col('red'),
      placement: { ...at('container', 'top', 0, 4.5 * LINE), size: { width: mm(18) } } },
  ], 5, { breakBefore: { enabled: true, parity: 'odd' } }),
  level(2, 'Часть {2:ordinal}', [text('part', '{titleText}', DISPLAY, 11.5,
    at('container', 'top', 0, 0.4 * LINE), caps(1.6))], 2),
  level(3, '{3:upper-roman}', [text('chapter', '{titleText}', DISPLAY, 13,
    at('container', 'top', 0, 0.9 * LINE), {})], 3),
];

{1:ordinal-masculine} und {2:ordinal} schreiben die Zähler in der Sprache des Dokuments aus, und numberPosition: 'replace' druckt sie anstelle der Überschrift. Im Markdown stehen # Том und ## Часть; niemand muss eine Zahl neu tippen.

#5 · Die Kolumnentitel

script.js · Zeilen 94–106im vollständigen Code
const head = (id, content, parity, edge, x, extra = {}) => ({ kind: 'text', id, content, parity,
  pages: 'body', fontFamily: TEXT, fontSize: pt(9), color: col('ink'),
  placement: at('page', edge, x, 13), ...extra });
const header = { elements: [
  head('verso-folio', '{pageNumber}', 'even', 'top-left', OUTER),
  head('verso-author', '{author}', 'even', 'top', 0, { italic: true }),
  head('recto-title', '{title}. {chapterTitle}', 'odd', 'top', 0, { italic: true }),
  head('recto-folio', '{pageNumber}', 'odd', 'top-right', -OUTER),
  { kind: 'rule', id: 'under', direction: 'horizontal', thickness: pt(0.4), color: col('ink'),
    pages: 'body', placement: { ...at('page', 'top', 0, 18), size: { width: mm(100) } } },
] };
const footer = { elements: [{ ...head('drop', '{pageNumber}', 'all', 'bottom', 0),
  pages: 'opener', placement: at('page', 'bottom', 0, -11) }] };

Der Autor steht über den linken Seiten, Titel und Band über den rechten, kursiv über einer feinen Linie. pages: 'body' hält den Anfang frei, der seine Seitenzahl unten trägt.

#6 · Ein Titelblatt in zwei Farben

script.js · Zeilen 110–130im vollständigen Code
const front = (id, elements, furniture = [], extra = {}) => ({ id, numbered: false,
  runningChapter: false, breakBefore: { enabled: true, parity: 'any' }, numberPosition: 'before',
  header: { elements: furniture }, footer: { elements: [] },
  advancedDesign: { enabled: true, slot: { elements }, ...extra } });
const frame = (id, inset, width) => ({ kind: 'box', id,
  style: { borderColor: col('red'), borderWidth: pt(width) },
  placement: { ...at('page', 'top-left', inset, inset),
    size: { width: mm(130 - 2 * inset), height: mm(200 - 2 * inset) } } });
const headingStyles = [
  front('title-page', [
    text('author', '{attr.first}', DISPLAY, 17, at('page', 'top', 0, 30), caps(1.6)),
    text('title', '{titleText}', DISPLAY, 40, { ...at('page', 'top', 0, 66),
      size: { width: mm(98) } }, { ...caps(0.6, 'red'), lineHeight: 1.1 }),
    text('subtitle', '{subtitle}', TEXT, 11, at('page', 'top', 0, 92), { italic: true }),
    text('imprint', '{attr.imprint}', DISPLAY, 10, at('page', 'bottom', 0, -29), caps(1.6)),
    text('year', '{attr.year}', DISPLAY, 10, at('page', 'bottom', 0, -23)),
  ], [frame('outer', 10, 2.2), frame('inner', 12.2, 0.5)]), // the section's header: whole page
  // The note sits low on the verso of the title page, under its label.
  front('note-page', [text('label', '{titleText}', DISPLAY, 10,
    at('container', 'top', 0, 17 * LINE), caps(1.2, 'red'))], [], { minHeight: pt(19 * LEAD) }),
];

Der Rahmen liegt im Kopf des Abschnitts, wo er die ganze Seite fassen kann; die Texte kommen aus dem Titel und seinen Attributen.

Das ganze Rezept

Sandbox
// ═══ Postext Cookbook · Nº 205 · A Russian novel with its notes counted by page ═══════
// https://postext.dev/en/cookbook/russian-novel-notes-by-page
// Code: MIT · Text: L. Tolstoy, Война и мир, I, I, I, PSS vol. 9, 1937 (PD, ru.wikisource)
// Fonts: Old Standard TT, Oranienbaum (SIL OFL 1.1) · Needs postext ≥ 1.100.0
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' | 'ru')
const RECIPE = 'russian-novel-notes-by-page';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// Black on a warm paper and the brick red of a title page printed in two inks, as the
// Leningrad presses of the thirties set their classics.
const palette = {
  ink: '#1e1a17', // text, the running heads, the folios
  red: '#a3301f', // the title, the frame, the volume
  muted: '#675e55', // the note on the text, the colophon
  paper: '#faf5ea', // a cream 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: 'red (defaults)', value: { hex: palette.red, model: 'hex' } },
];
const [TEXT, DISPLAY] = ['Old Standard TT', 'Oranienbaum']; // обыкновенная; a display antiqua
const [BODY, LEAD] = [10.5, 13.2]; // pt
const LINE = (LEAD * 25.4) / 72; // mm: one line, 4.66
const at = (to, edge, x = 0, y = 0) => ({ anchor: { to, edge }, offset: { x: mm(x), 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 caps = (tracking, color = 'ink') => ({ textTransform: 'uppercase',
  letterSpacing: pt(tracking), color: col(color) });

// #region page: 84 × 108/32, 130 × 200 mm trimmed; 34 lines of 13.2 pt, 100 mm wide
const [TOP, INNER, OUTER, LINES] = [22, 15, 15, 34];
const page = {
  sizePreset: '84x108/32', dpi: 150, backgroundColor: col('paper'), // the sheet of GOST 5773
  margins: { top: mm(TOP), bottom: mm(200 - TOP - LINES * LINE), // 130 × 200 mm
    left: mm(INNER), right: mm(OUTER), mirror: true },
};
// #endregion

// #region answer: what locale 'ru' brings, and the notes set with asterisks
// The language hyphenates by the Russian patterns, keeps a preposition with its word and a
// dash off the line start (bodyText.wordTies 'avoid'), holds the space after a dialogue's
// opening dash at its own width, counts the notes again on every page and indents their
// first line. The indents below are the Russian ones: 1,5 em, the first paragraph included.

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

  • Mehr als drei oder vier Sternchen auf einer Seite halten den Leser auf, und Seite 9 kommt auf fünf. Fassen Sie die Übersetzungen einer Rede in einer Anmerkung zusammen, wie dieses Rezept es tut, oder nehmen Sie Ziffern mit numberFormat: 'decimal'.
  • Ein Notenzeichen, das nach dem Punkt getippt ist, bleibt dort. Die Reihenfolge bestimmt das Markdown.

Nachweise

Text
  • Война и мир, volume I, part I, chapter I, complete, after the Complete Works (PSS, vol. 9, 1937) in the transcription of ru.wikisource, with slips of the transcription corrected, Tolstoy’s translations placed as in current editions and the note mark set before the stop · Leo Tolstoy · gemeinfrei
  • The note on the text and the colophon · Postext Cookbook · eigener Text
Schriften
Old Standard TT (SIL OFL 1.1) · Oranienbaum (SIL OFL 1.1)
Sandbox