Definitionintro
Widows and orphans
Also called widow and orphan lines.
Lines of a paragraph left alone by a page break: the last line at the top of a page and the first line at the bottom. Names vary; TeX calls the first line a club line.
Widows and orphans are lines of a paragraph that a page break leaves alone: the last line of a paragraph at the top of a new page, or the first line of a paragraph at the bottom of a page. Both look bad, because the eye loses the paragraph at the break. Page breaking methods avoid them with a penalty on the breaks that make them, or with a hard rule on the number of lines that must stay together. The names are not used the same way in all style guides, so a program should state which line it means.
Definition
Take a paragraph of lines, numbered , and a page break between line and line , with .
- The break leaves a widow when : the last line of the paragraph is alone at the top of the next page. This is the common meaning in typography, in TeX (the
\widowpenalty) and in CSS. - The break leaves an orphan when : the first line of the paragraph is alone at the bottom of the page. TeX calls this line a club line and its penalty
\clubpenalty; CSS calls it an orphan.
Some guides swap the two words, and some use "widow" for a very short last line of a paragraph (one word alone on its line, also called a runt), with no page break at all. The definitions above are the ones used on this site.
The rule with lines. CSS generalizes the idea: the property orphans is the least number of lines of a block that must stay on a page before a break, and widows is the least number that must go to the next page. Both have the initial value 2. A break after line is allowed only if orphans and widows. With both values 2, this forbids exactly the breaks after line 1 and after line .
The penalty model. TeX puts a penalty between each pair of lines of a paragraph, in the box, glue and penalty model. The penalty after line is \interlinepenalty, plus \clubpenalty if , plus \widowpenalty if (or \displaywidowpenalty if the paragraph goes on after a display), plus \brokenpenalty if line ends with a hyphen. A one-line paragraph gets none of these. Plain TeX sets \clubpenalty=150, \widowpenalty=150, \displaywidowpenalty=50, \brokenpenalty=100 and \interlinepenalty=0; these are design choices, not results. A value of 10000 forbids the break, which gives the hard rule.
Examples and non-examples
- A paragraph of five lines broken after line 4: line 5 starts the next page alone. This is a widow. In plain TeX the break costs 150 more than a break in the middle of the paragraph.
- The same paragraph broken after line 1: line 1 ends the page alone. This is an orphan, or a club line in TeX.
- Broken after line 2 or line 3: neither. At least two lines stay on each side.
- A two-line paragraph broken after line 1: and , so the break makes both, and TeX adds both penalties, .
- A paragraph whose last line holds one short word, with no page break: not a widow in the sense of this page, though some guides call it one.
- A heading at the bottom of a page with its text on the next page: not a widow or an orphan, but a similar fault. TeX and CSS handle it with a penalty or a rule that keeps the heading with the next line.
Related definitions
- The page breaking problem uses these penalties as part of the cost of a page break.
- The best-fit page builder of TeX adds the penalty at a break to the badness of the page, and optimal pagination adds it to the total cost.
- In line breaking, the same model of penalties marks hyphens and forbidden breaks; see Knuth-Plass line breaking.
References
- Donald E. Knuth, The TeXbook, Addison-Wesley, 1984, the parameters \clubpenalty, \widowpenalty, \displaywidowpenalty and \brokenpenalty, and their values in the plain format of appendix B
- Donald E. Knuth, TeX, The Program, Addison-Wesley, 1986, part 39, Breaking paragraphs into lines, continued (the penalty put between two lines of a paragraph)
- CSS Fragmentation Module Level 3, W3C, section 3.3, Breaks Between Lines: orphans, widows
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag XDPBX8 Edit this page History Report an error Markdown