13.4 Widow and club lines in listings

- DEPRECATED - (Should only happen with the useLongtable option.)

Sometimes it can happen that a listing starts at the end of a page only with the listing header, but without a single line of the listing. Or it may happen that a listings ends at the beginning of a page with nothing else but a listing header. These phenomena are called 'widow line' and 'club line' in typography.

There are two things to say about them. First of all, there is no general solution available, but second, there is a workaround which helps in most of the cases. The problem is not native to ProgDoc, but a problem of the tables generated by the longtable package. If you recall, the ProgDoc system uses the longtable environment to lay out the listings.

The workaround promised above is the following. Don't care to much about widow and club lines, until you really finished to write your document. If you finished the last version and the problem still persists, insert an \enlargethispage{ 3pt} command just before or just after the corresponding \sourcebegin environment. Use a positive or negative length as appropriate. Usually a length of some points should be enough to avoid the problem.

Volker Simonis 2003-03-05