TeX/penalty
Appearance
< TeX
Synopsis
[edit | edit source]\penalty<number> \binoppenalty=<number> \brokenpenalty=<number> \clubpenalty=<number> \displaywidowpenalty=<number> \exhyphenpenalty=<number> \floatingpenalty=<number> \hyphenpenalty=<number> \interlinepenalty=<number> \linepenalty=<number> \postdisplaypenalty=<number> \predisplaypenalty=<number> \relpenalty=<number> \widowpenalty=<number>
Description
[edit | edit source]\penalty sets the penalty for a line or page break at that point.
Some penalties are built in to the TeX system and inserted automatically:
\binoppenaltyfor a line break in math mode after a binary operator.\brokenpenaltyfor a page break, where the last line of the previous page contains a hyphenation.\clubpenaltyfor a broken page, with a single line of a paragraph (called “club”) remaining on the bottom of the preceding page.\displaywidowpenaltyfor a break before last line of a paragraph.\exhyphenpenaltyfor hyphenating a word which already contains a hyphen.\floatingpenaltyfor splitting an insertion.\hyphenpenaltyfor line breaking at an automatically inserted hyphen.\interlinepenaltyfor the penalty added after each line of a paragraph.\linepenaltythe badness of each line within a paragraph.\postdisplaypenaltyfor a break after a display.\predisplaypenaltyfor a break before a display.\relpenaltyfor a line break at a relation.\widowpenaltyfor a broken page, with a single line of a paragraph (called “widow”) remaining on the top of the succeeding page.
Default
[edit | edit source]LaTeX for example sets these default values for built in penalties:
\binoppenalty=700 \brokenpenalty=100 \clubpenalty=150 \displaywidowpenalty=50 \exhyphenpenalty=50 \floatingpenalty=20000 \hyphenpenalty=50 \interlinepenalty=0 \linepenalty=10 \postdisplaypenalty=0 \predisplaypenalty=10000 \relpenalty=500 \widowpenalty=150