= Natural line width
{title2=$N$}
The \b[natural line width] is the width a candidate line occupies before any stretch or shrink of its <typesetting glue>. In a simple horizontal model with fixed <typesetting box> widths $w_i$ and nominal glue widths $g_j$,
$$
\boxed{N=\sum_i w_i+\sum_j g_j.}
$$
Additional fixed positioning adjustments must be included when the model contains them. If a <discretionary break> inserts a hyphen at the chosen endpoint, its width belongs to that candidate's natural width.
For example, boxes of widths 8, 6 and 10 and two nominal gaps of width 3 give $N=30$. To reach a <typesetting line width> $W=32$, the glue must absorb $W-N=2$. A total finite stretch coefficient $S=4$ gives <line adjustment ratio> $r=(W-N)/S=1/2$. The <typesetting glue> diagram shows the resulting adjustment.
Computing the natural width first separates the dimensions of the selected material from its later spacing adjustment. This also lets a <line breaking> algorithm compare several endpoints before committing to a final line. In the fixed-space model, <prefix sums> make repeated width calculations efficient.
Back to article page