Line breaking and hyphenation
Three narrow justified columns: Japanese breaks between characters but keeps punctuation and small kana off the start of a line; Thai, written without spaces, breaks between words found in a dictionary; English breaks at spaces, hyphens and slashes. This is the Unicode Line Breaking Algorithm. Below, English and German are hyphenated with hyphens: auto and TeX’s patterns, next to the same English without hyphenation.
Standards: PDF/A-2b · PDF/UA-1, checked with veraPDF on every change. Download the PDF.

As a workbook
Section titled “As a workbook”The same report as an Excel workbook (download it), from tagua render line-breaking.report.yaml --out line-breaking.xlsx;
see Excel export.
| A | B | C | |
|---|---|---|---|
| 1 | Line breaking | ||
| 2 | Lines break where the Unicode Line Breaking Algorithm allows. Japanese and Chinese break between characters, except before closing punctuation and small kana or after opening brackets; Thai breaks between dictionary words. Justified text takes up the slack between characters in Japanese and Thai, and between words elsewhere. | ||
| 3 | Japanese | Thai | Latin |
| 4 | 日本語や中国語の文章は、単語の間に空白を入れずに書きます。そのため、行は文字と文字の間で折り返されますが、句読点「、」「。」や閉じ括弧、小さい仮名(ッ、ャ)、長音記号「ー」は行頭に来ないように、開き括弧は行末に来ないように調整します。これを禁則処理といいます。 | ภาษาไทยเขียนต่อกันโดยไม่เว้นวรรคระหว่างคำ ระบบจึงใช้พจนานุกรมเพื่อหาขอบเขตของคำ และตัดบรรทัดระหว่างคำเท่านั้น ไม่ตัดกลางคำ ใบแจ้งหนี้เลขที่ INV-0042 ครบกำหนดชำระภายในสามสิบวัน | Latin text breaks at spaces, after hyphens and after slashes, as in well-known addresses such as https://acme.example/reports/2026/line-breaking, but never inside numbers such as INV-0042, 1,234.50 or (12.35). |
| 5 | Hyphenation | ||
| 6 | With hyphens: auto, a word that does not fit the rest of its line breaks where its language's hyphenation patterns allow, so justified columns keep even spacing. The language is the element's, or the document's. | ||
| 7 | English, hyphenated | German, hyphenated | English, not hyphenated |
| 8 | Hyphenation breaks long words such as documentation, accessibility and internationalization at the syllables their language allows, so that narrow, justified columns keep an even spacing between their words. | Die Silbentrennung teilt lange Wörter wie Rechnungsbetrag, Zahlungsbedingungen und Umsatzsteuer-Identifikationsnummer nach den Regeln der Sprache, damit der Blocksatz gleichmäßige Wortabstände behält. | Hyphenation breaks long words such as documentation, accessibility and internationalization at the syllables their language allows, so that narrow, justified columns keep an even spacing between their words. |
What it shows
Section titled “What it shows”- Japanese line breaking rules (kinsoku)
- Thai word breaking with a dictionary
- Justification between characters for Japanese and Thai
- Hyphenation in English and German
- PDF/A-2b and PDF/UA-1
The template
Section titled “The template”# yaml-language-server: $schema=../schema/template.schema.json# Line breaking by the Unicode Line Breaking Algorithm (UAX #14): Japanese breaks between characters but# keeps punctuation, small kana and closing brackets off the start of a line (kinsoku); Thai, written# without spaces, breaks between words found with a dictionary; Latin breaks at spaces, after hyphens and# after slashes. Three narrow, justified columns make every paragraph wrap: Japanese and Thai are# justified between characters, Latin between words. Below, English and German are hyphenated# (hyphens: auto) with TeX's patterns, next to the same English without hyphenation. PDF/A-2b and PDF/UA-1.version: 1title: Line breakingculture: en-GB
document: author: Acme Ltd compliance: [pdf-a-2b, pdf-ua-1]
page: size: A4 margins: 22mm
fonts: Inter: regular: fonts/Inter-Regular.ttf bold: fonts/Inter-Bold.ttf fallback: [NotoThai, NotoJP] NotoThai: { regular: fonts/NotoSansThai-Regular.ttf } NotoJP: { regular: fonts/NotoSansJP-Regular-Subset.otf } # only the characters these samples use
styles: default: { font: Inter, fontSize: 11pt, lineHeight: 1.7, color: "#1F1F1F" } label: { fontSize: 8.5pt, color: "#6B6B6B", padding: 0 0 4pt 0 } column: { padding: 0 0 0 0 }
data: texts: fields: { Japanese: string, Thai: string, Latin: string, English: string, German: string }
body: dataset: texts
detail: - padding: 0 0 14pt 0 content: - { type: text, value: "Line breaking", fontSize: 18pt, fontWeight: bold, tag: h1 } - type: text value: >- Lines break where the Unicode Line Breaking Algorithm allows. Japanese and Chinese break between characters, except before closing punctuation and small kana or after opening brackets; Thai breaks between dictionary words. Justified text takes up the slack between characters in Japanese and Thai, and between words elsewhere.
- layout: row gap: 18pt content: - type: stack content: - { type: text, value: "Japanese", style: label } - { type: text, value: "{Japanese}", language: ja, align: justify } - type: stack content: - { type: text, value: "Thai", style: label } - { type: text, value: "{Thai}", language: th, align: justify } - type: stack content: - { type: text, value: "Latin", style: label } - { type: text, value: "{Latin}", align: justify }
- padding: 22pt 0 10pt 0 content: - { type: text, value: "Hyphenation", fontSize: 14pt, fontWeight: bold, tag: h2 } - type: text value: >- With hyphens: auto, a word that does not fit the rest of its line breaks where its language's hyphenation patterns allow, so justified columns keep even spacing. The language is the element's, or the document's.
- layout: row gap: 18pt content: - type: stack content: - { type: text, value: "English, hyphenated", style: label } - { type: text, value: "{English}", language: en, align: justify, hyphens: auto } - type: stack content: - { type: text, value: "German, hyphenated", style: label } - { type: text, value: "{German}", language: de, align: justify, hyphens: auto } - type: stack content: - { type: text, value: "English, not hyphenated", style: label } - { type: text, value: "{English}", language: en, align: justify }
pageFooter: - content: - { type: text, value: "Page {PageNumber} of {TotalPages}", align: right, color: "#6B6B6B", fontSize: 8pt }Render it yourself
Section titled “Render it yourself”Save the template, put the fonts it names next to it (Inter and the Noto fonts are free, under the SIL Open Font License), and run:
tagua render line-breaking.report.yaml --openWithout a data file, tagua render makes up sample rows from the field types; see Preview as you edit.