Chapter 9 · Part II · The craft
Cyrillic layout
How Postext sets Russian, Ukrainian, Belarusian, Bulgarian, Serbian, Macedonian and the other languages written in Cyrillic: hyphenation, words kept together, dialogue, notes counted by page, table titles, letter numbering, number words, citations to GOST, sheet formats and spines
In short
This page explains how Postext lays out books in Russian and in the other languages written with Cyrillic letters. The document's language sets most of it: where words are divided, which short words stay with the next one, how notes are numbered and how tables are titled. Each language follows its own custom, so a Serbian book does not look like a Russian one. Any of these settings can be changed. The page ends with examples in several languages and with the limits that remain.
A Russian page is recognised before it is read: by its indents, its dashes, its asterisks at the foot and the words it refuses to part.
Postext sets the languages written in Cyrillic from the same Markdown and configuration as any other, left to right, with the line breaker described in Justification. What changes is custom. Editors and compositors in Moscow, Kyiv, Sofia or Belgrade work to rules of their own, and the document language brings them: locale: 'ru' gives a book the notes, table titles, ties between words and built-in strings a Russian compositor would set. This page lists what each language gets, the setting behind it and how to change it. The configuration reference has every key with its default.
The Russian rules follow the Справочная книга редактора и корректора of Milchin and Cheltsova, the GOST standards for books, and the practice of twentieth-century Russian printing; the sources are listed at the end.
#Starting a book in Cyrillic
Set the document language and a face with Cyrillic letters. Everything else on this page follows from the language or has a default:
const config: PostextConfig = {
locale: 'ru',
bodyText: {
fontFamily: 'PT Serif',
textAlign: 'justify',
firstLineIndent: { value: 1.5, unit: 'em' },
indentAfterHeading: true, // every paragraph is indented, the first included
},
headings: { fontFamily: 'PT Sans' },
};The tag may carry a region (ru-RU, uk-UA, sr-RS). A language also written in another script takes the customs of Cyrillic only when its tag reads as Cyrillic: sr and sr-Cyrl do, sr-Latn does not; kk and mn do, kk-Latn and mn-Mong do not.
| Language | Tag | Hyphenation | Figure, table | Notes | Table title |
|---|---|---|---|---|---|
| Russian | ru | patterns | Рис., Таблица | by page | on two lines |
| Ukrainian | uk | patterns | Рис., Таблиця | by page | on two lines |
| Belarusian | be | patterns | Мал., Табліца | by page | on two lines |
| Bulgarian | bg | patterns | Фиг., Таблица | by chapter | on two lines |
| Serbian | sr | patterns | Слика, Табела | by chapter | on one line |
| Macedonian | mk | by syllable | Слика, Табела | by chapter | on one line |
| Kazakh | kk | by syllable | Сурет, Кесте | by page | on two lines |
| Kyrgyz | ky | by syllable | Сүрөт, Таблица | by page | on two lines |
| Tatar | tt | by syllable | Рәсем, Таблица | by page | on two lines |
| Bashkir | ba | by syllable | Һүрәт, Таблица | by page | on two lines |
| Tajik | tg | by syllable | Расм, Ҷадвал | by page | on two lines |
| Mongolian | mn | patterns | Зураг, Хүснэгт | by page | on two lines |
Serbo-Croatian, Bosnian and Montenegrin written in Cyrillic (sh-Cyrl, bs-Cyrl, cnr-Cyrl) read as Serbian. Any other language written in Cyrillic (Chuvash, Ossetian, Uzbek in Cyrillic…) gets the customs, with no hyphenation patterns of its own: set bodyText.hyphenation.enabled: false and pass the resource types in its language.
#Hyphenation in twelve languages
Russian, Ukrainian, Belarusian, Bulgarian, Serbian and Mongolian are divided with the patterns of the hyph-utf8 project; Macedonian, Kazakh, Kyrgyz, Tatar, Bashkir and Tajik, which have none under an open licence, by the syllable rules of their orthographies. In every one of them:
- no line starts with ь, ъ or a й that closes a syllable, and no letter is left alone at either end of a word;
- an apostrophe belongs to its word and no break falls beside it (Ukrainian об’єднання, Belarusian аб’ява);
- a stress mark is ignored when the break is sought and stays with its vowel (за́мок, замо́к);
- a soft hyphen typed in the Markdown settles the word by hand.
A word divided by the patterns reads as its readers divide it: Russian типо-гра-фия, Ukrainian дру-кар-ня, Bulgarian кни-го-пе-чат, Serbian штам-па-ри-ја, Kazakh мек-теп, Mongolian хэв-лэл. A block in another language takes that language's patterns when its container names it, :::paragraphs{lang=uk}, and so does a run in an isolate, :ltr[…]{lang=uk} (see Hyphenation).
#Words kept together
Russian editors do not part certain words at the end of a line, and neither do those of the neighbouring languages. bodyText.wordTies keeps them together (since postext 1.100):
- short words: a preposition, conjunction or particle of a few letters stays with the next word (в лесу, и он, не знал), and an enclitic particle with the one before (сказал бы, он же);
- names: initials with the surname, on either side (А. С. Пушкин, Пушкин А. С.);
- numbers: a number with its unit or sign (5 кг, XIX в., 1812 г., № 7, § 3), and the groups of a large one (1 000 000);
- abbreviations: the parts of и т. д. and н. э., and an abbreviation with what it announces (рис. 5, с. 14, им. Чехова);
- the dash, which starts no line: жизнь — это.
Each language has its own list of words; a language with none (Kazakh, Kyrgyz, Tatar, Bashkir, Mongolian) keeps the numbers, the names and the dash. The ties hold in paragraphs, headings, captions, notes and table cells, which saves typing no-break spaces through a whole book.
The setting takes the levels of the other composition rules: 'avoid', the default in these languages, prices a break there by wordTiePenalty (a short word costs half of it), so the line breaker sets the paragraph another way wherever the word spacing allows; 'warn' sets the lines as they come and reports each such break; 'allow' turns the rule off. Under 'avoid' a tie of the strict kind (a name, a number, an abbreviation, a dash, a short word that opens a sentence) that had to be broken is reported as a wordTie warning; a short word is not, since a narrow column cannot always keep it.
bodyText: { wordTies: 'avoid', wordTiePenalty: 100000 } // looser lines, fewer broken ties#Dialogue and the dash
A line of dialogue opens with an em dash and a space. In a Cyrillic document that space keeps its own width on a justified line, so the dashes of a conversation and the words after them stand in one column, and it never breaks:
— Куда вы идёте? — спросил он.
— На станцию, — ответила она, не оборачиваясь.Inside a sentence the dash is written with a space on each side and stays with the word before it. Quotation marks are typed as the language wants them: « » with „ “ inside in Russian, « » in Ukrainian and Belarusian, „ “ in Bulgarian, „ ” in Serbian.
#Notes counted by page
A Russian book numbers its footnotes again on every page, sets each with a first-line indent, number included, and prints asterisks when a page has only a few. The document language gives the three (Ukrainian, Belarusian and every other language of the table marked by page too):
| Setting | In a Russian document | Elsewhere |
|---|---|---|
footnotes.numbering | 'page' for notes at the column foot | 'chapter' |
footnotes. | 1.5em | 0 |
footnotes.symbols | ['*'] | ['*', '†', '‡', '§', '‖', '¶'] |
To number with asterisks, set footnotes: { numberFormat: 'symbols' }. The mark stands where the Markdown puts it, and the Russian rule puts it before a full stop, comma, colon or semicolon and after a question mark, exclamation mark or ellipsis:
Он вернулся в Петербург[^1]. Кто его ждал?[^2]
[^1]: Ныне Санкт-Петербург.
[^2]: См. письмо от 5 мая 1837 г.A mark never leaves the stop after it at the head of the next line.
#Captions and table titles
A figure reads Рис. 1. Подпись under the picture. A table carries its label over it, on a line of its own at the right, and its title centred on the next line, without the stop between them:
resourceTypes: defaultResourceTypes('ru'); // what the document language gives
// the table type's caption style:
// { position: 'above', labelLine: 'own', labelAlign: 'right', align: 'center' }captionStyle.labelLine: 'own' and labelAlign can be set on any resource type in any language, and labelLine: 'inline' brings a Russian table back to one line. No full stop closes a caption: type none. Serbian and Macedonian tables keep the label and the title on one line.
In the text a :ref prints the label in lower case, рис. 1 or табл. 2, in every language of the table above; case="capitalize" or style="full" opens a sentence with it.
#Numbering in letters and words
A list, a heading or a page can count in the letters of an alphabet. Each series leaves out the letters its lists do not use (Russian ё, й, ъ, ы, ь):
| Number format | Counts |
|---|---|
lower-russian, upper-russian | а, б, в, г, д, е, ж, з, и, к… |
lower-ukrainian, upper-ukrainian | а, б, в, г, д, е, є, ж, з, и, і… |
lower-belorussian, upper-belorussian | а, б, в, г, д, е, ё, ж, з, і, й… |
lower-bulgarian, upper-bulgarian | а, б, в, г, д, е, ж, з, и, й, к… |
lower-serbian, upper-serbian | а, б, в, г, д, ђ, е, ж, з, и, ј… |
lower-macedonian, upper-macedonian | а, б, в, г, д, ѓ, е, ж, з, ѕ, и… |
In a numbering template or a page number format, а and А (the Cyrillic letters) name the series of the document's language. The classic Russian list counts 1), а), with a bracket and no stop:
orderedLists: {
levels: [
{ level: 1, numberFormat: 'decimal', separator: ')' },
{ level: 2, numberFormat: 'lower-russian', separator: ')' },
],
},Chapter numbers can be spelled out in Russian, Ukrainian, Belarusian, Bulgarian, Serbian and Macedonian (Spelled-out numbers), agreeing with the noun a chapter has in each: Глава {1:ordinal} gives Глава первая and Глава двадцать первая, Розділ {1:ordinal} gives Розділ перший, Глава {1:ordinal} in Bulgarian Глава двадесет и първа, Поглавље {1:ordinal} Поглавље прво. The modifiers -masculine, -feminine and -neuter agree the words with another noun: Часть {1:ordinal} is right as it stands, Том {1:ordinal-masculine} gives Том первый.
#Citations, bibliography and index
citations.style takes two styles of the Russian standard ГОСТ Р 7.0.5-2008, gost-r-7-0-5-2008 (author and year in square brackets) and gost-r-7-0-5-2008-numeric (numbers), with the CSL locales for Russian, Ukrainian, Bulgarian, Serbian in both scripts and Mongolian. The other languages of the table take the locale citations.locale names. The bibliography is titled Список литературы in Russian, and likewise in the others.
The index files ё with е and keeps й apart in Russian, gives Ukrainian ґ, є, і, ї and Serbian ђ, ј, љ, њ, ћ, џ letters of their own, and prints См. and См. также before its cross-references after a comma.
#Mathematics
Formulas know the operators of Russian textbooks: \tg, \ctg, \cosec, \arctg, \arcctg, \arcsec, \arccosec, \sh, \ch, \th and \cth, upright like \sin. Write the decimal comma as 3{,}14, so that no space follows it, and ⩽ ⩾ as \leqslant and \geqslant. Cyrillic letters are set in the formula's own design, upright in F_{\text{тр}} or \text{если} and italic where they stand bare.
#Formats and spines
Russian-language printing names a book by its sheet and the leaves it makes. page.sizePreset takes the sheet formats of GOST 5773, trimmed:
| Preset | Page | Use |
|---|---|---|
70x90/32 | 107 × 165 mm | pocket book |
84x108/32 | 130 × 200 mm | novel |
60x90/16 | 145 × 215 mm | textbook, essay |
70x108/16 | 170 × 260 mm | reference book |
84x108/16 | 205 × 260 mm | illustrated book, magazine |
60x84/8 | 205 × 290 mm | album, magazine |
The lettering of a printed spine rises, from the foot up, in a book in any of these languages (spineText.direction: 'bottomToTop'), where an English book's falls.
#Emphasis, stress and verse
- Spaced letters (разрядка), the old emphasis of Russian printing, are a character style with
letterSpacing, called in the text as:span[слово]{style="razryadka"}. - Stress marks are typed as U+0301 after the vowel (сто́ит, стои́т); hyphenation and search pass over them, and a face without the mark's anchors shows it in Checks as a missing glyph.
- Stepped verse (лесенка) starts each step with
+inside a verse: the step begins where the one before it ended, and no page parts it from its line. - Local letterforms: the text is shaped in the language of the document, so a face with them draws the Bulgarian forms of в г д ж з и й к л п т ц ш щ ю, and the Serbian and Macedonian italic б г д п т, of that language (
bodyText.shapingLanguage). A block whose container names a language (:::paragraphs{lang=bg}) takes the forms and the tied words of that language.
#Examples in six languages
Each line below opens a book in its language, with locale, or a passage of another book, with :::paragraphs{lang=…}; it is then hyphenated as that language asks.
- Russian — Все счастливые семьи похожи друг на друга, каждая несчастливая семья несчастлива по-своему. (Толстой)
- Ukrainian — Реве та стогне Дніпр широкий, сердитий вітер завива. (Шевченко)
- Bulgarian — Тая прохладна майска вечер чорбаджи Марко, гологлав, по халат, вечеряше с челядта си на двора. (Вазов)
- Serbian — Пиши као што говориш и читај како је написано. (Вук Караџић)
- Kazakh — Ғылым таппай мақтанба, орын таппай баптанба. (Абай)
- Macedonian — Како на вратот ѓердани ниски камења студени, така на плешки легнале та натежнале. (Рацин)
The Cookbook has whole pages in these languages, and the Sandbox's own guide has a Russian edition.
#In the Sandbox
Design › Writing system sets the document language; the choice of Русский, Українська or any other language of the table brings the defaults of this page. The ties between words are under Design › Composition › Line starts and ends, the first-line indent of notes under Footnotes, the label on its own line under the caption style of each resource type, and the Cyrillic letters in every number format picker. The sheet formats are listed under GOST sheet formats in the page format.
#Known limits
- Citations: the CSL project ships no Belarusian, Kazakh, Kyrgyz, Tatar, Bashkir, Tajik or Macedonian locale; those documents print English terms unless
citations.localenames another, such asru-RU. - GOST bibliography: the 2018 standard for bibliographic records (ГОСТ Р 7.0.100) has no style here yet.
- Number words: spelled for the six Slavic languages only; the others print digits or English words.
- Ties: a tie is not read across a change of style between the two words that leaves no plain space between them, nor inside display text of a design.
- Word files: a
.docxkeeps a table's label on the line of its title. - Church Slavonic is not supported: there is no numeral system, abbreviation mark or patterns for it.
#Sources
- А. Э. Мильчин, Л. К. Чельцова, Справочная книга редактора и корректора, 2nd ed., 1985; Справочник издателя и автора.
- ГОСТ 5773-90, Издания книжные и журнальные. Форматы.
- ГОСТ Р 7.0.5-2008, Библиографическая ссылка.
- The hyph-utf8 patterns of Russian, Ukrainian, Belarusian, Bulgarian, Serbian and Mongolian.
- W3C, Ready-made Counter Styles.
- The Citation Style Language styles and locales.
#Examples in the Cookbook
Recipes that use what this page describes, each under the section it suits best. A recipe shows its pages beside the whole script.





