Widows and orphans control

From ConTeXt wiki
Jump to: navigation, search

Contents

Introduction

In typesetting, widows and orphans are lines at the beginning or end of a paragraph, which are left dangling at the top or bottom of a column, separated from the rest of the paragraph. They interrupt the reader's flow, and are generally considered bad.

When only the last line of the paragraph appears at the top of the next page, that line is called a widow. When only the first line of the paragraph appears at the bottom of the first page, that line is called an orphan. One of mnemonics is "An orphan starts alone, a widow ends alone".

Syntax

TeX takes some precautions using \widowpenalty and \clubpenalty commands to avoid them. These penalties are usually set to the moderate value of 150 which offers mild discouragement of bad breaks.

Typical Use

For typical layouts, there are only two sensible settings for the penalties: default (150) to allow widows and orphans, and infinite (10000 or greater) to forbid them.

The former approach is used especially in scenarios when occurrences are solved selectively only in places where they are causing a visible problem. It is preferred way by some authors arguing that blank lines at the bottom of the page are more annoying than the widows.

Example

Example how to keep at least 2 lines together:

\startsetups[grid][mypenalties]
    \setdefaultpenalties
    \setpenalties\widowpenalties{2}{10000}
    \setpenalties\clubpenalties {2}{10000}
\stopsetups

\setuplayout[grid=yes, setups=mypenalties]

C O N T E X T G A R D E N

Personal tools
Namespaces
Variants
Actions
Help
External Help
Installation
Navigation
Toolbox