Hyphenation opportunity (source code)

= Hyphenation opportunity

A \b[hyphenation opportunity] is a position where the language and chosen <hyphenation> rules permit a word to be divided across lines. An explicit <soft hyphen> can supply one; automatic <hyphenation> can find others using a language-appropriate resource. These permitted positions become choices for <line breaking>.<CSS Text Module Level 3 by World Wide Web Consortium>[§5.3: explicit and automatic language-appropriate hyphenation opportunities]{ref}

Two tests must then be applied. First, is the division permitted by the linguistic rules? Second, does the resulting geometry and cost make it a useful choice? If the material before a break has width 20, an inserted hyphen adds 2, and the available <typesetting line width> is 21, the resulting 22-unit line fails the rigid-width fitting test despite the linguistic permission.

A <discretionary break> represents the alternative printed material. The <Knuth-Plass line-breaking algorithm> can compare that option with later or earlier permitted breaks using <typesetting badness> and <typesetting penalties>.