Page LayoutHow to use \penalty

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
llewellyn
Posts: 17
Joined: Mon Feb 04, 2008 8:20 pm

How to use \penalty

Post by llewellyn »

I want to cause TEX/Latex to try always to end a page at a period.
In the Book TEX for the Impatient I find the following.
Quote
\penalty (number)
This command produces a penalty item. The penalty item makes TEX
more or less willing to break a page at the point where that item occurs. A
negative penalty, i.e., a bonus, encourages a page break; a positive penalty
discourages a page break. A penalty of 10000 or more prevents a break
Unquote

I understand that the (number) will be the penalty that I want applied when pages are being made up. I may even make TEx favour a break at a period by making the penalty negative.
I have to define the penalty eg i think \def \period but how do I make it look for a period so as to apply the penalty.
I will put something like \periodpenalty=1000 in the preamble.
I expect I will have to juggle values of Widowpenalty and Clubpenalty to make it all work.
Help will be very much appreciated

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply