Quantcast
Channel: Stack Exchange TeX Blog » LaTeX
Viewing all articles
Browse latest Browse all 5

Control widows and orphans easily

$
0
0

In a question some time ago, I was trying to implement a wrapper around the \widowpenalties command in order provide an easier interface to limiting orphans and widows in LaTeX.

Thanks to Martin Scharrer’s answer, this question gave birth to a new package called nowidow, which is now available in TeXLive 2011.

Simple usage

To limit widows and orphans in your whole document, you can simply load the package with the all option. You can specify the default amount of minimal lines to be kept in the end (orphans) or beginning (widows) of pages (the default value is 2):

\usepackage[all,defaultlines]{nowidow}

Fine tuning

If you wish to set a specific penalty for a given paragraph, the \nowidow (the subject of the original question) and \noclub macros will help you. They both take an optional argument to override the default value:

This is a paragraph at the end of a page
which will look ugly if I don't set
a widow penalty to force 3 lines to appear
on the next page.
\nowidow[3]

The full documentation can be found on the CTAN.

Suggestions and bug reports are welcome!


Viewing all articles
Browse latest Browse all 5

Trending Articles