A discretionary break describes an optional line breaking choice whose printed material may depend on whether the break is selected. In TeX, \discretionary{pre}{post}{none} supplies material before a chosen break, after it, or in the unbroken case.[ref]
For a purely mechanical example, ab\discretionary{-}{X}{Y}cd can produce abYcd without the break, or ab- followed on the next line by Xcd when it is selected. The arbitrary strings make all three branches visible. A common hyphenation case simply inserts a hyphen before the break and supplies no material afterward.
Each alternative has its own geometry. A typesetting box used only in the pre-break branch must contribute its width when that branch is tested. The natural line width, typesetting glue and typesetting penalty calculation must therefore use the selected representation. Treating the choice merely as an invisible marker could miss the width of the inserted hyphen.

Articles by others on the same topic (0)

There are currently no matching articles.