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.
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):
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:
which will look ugly if I don't set<br />
a widow penalty to force 3 lines to appear<br />
on the next page.<br />
The full documentation can be found on the CTAN.
Suggestions and bug reports are welcome!