# [texhax] penalties

tom sgouros tomfool at as220.org
Fri May 1 04:11:09 CEST 2009

Thank you, those are helpful hints.  But still, I have a couple of
paragraphs I can't reword, and some text sticking stubbornly out into
the right margin.  Not only don't I know what to do, I can't get *any*
affect the offending paragraph.  Can they not be applied this way?

Thanks,

-tom

pierre.mackay at comcast.net wrote:

>> ----- Original Message -----
>> From: "Tom Sgouros" <tomfool at as220.org>
>> To: texhax at tug.org
>> Sent: Thursday, April 30, 2009 2:49:56 PM GMT -05:00 US/Canada Eastern
>> Subject: [texhax] penalties
>>
>> Hi All:
>>
>> I've never really had to mess with penalties in all the time I've used
>> TeX, but now I have to, and I don't really get how to go about it.  I
>> have a long document (~150 pages), and there are only about four places
>> where the line-breaking isn't working right.  But in those places, I
>> don't really know what to do.  The FAQ suggests changing some penalties,
>> but the other 500 paragraphs look fine, and I don't want to make global
>> changes.  I thought I could do this:
>>
>>   {\hyphenpenalty5000 Text of offending paragraph.}
>>
> Too sophisticated.  I usually \hbox{the last two or three words,}
> of the paragraph.  I do that throughout the article, to avoid clubs.
>
>> But that seems to have no effect, whatever I set the value to.  The FAQ
>> also suggests appending "\looseness=-1" to the last word of the
>> paragraph
>
> \looseness is a great tool for page balancing, but it goes at the start of
> the paragraph
> you are loosening.  I always put it after anything else, but before
> \noindent.
> If it doesn't work, that means that the linebreaking has not found any
> workable
> values.  I hunt for last lines that almost fill the page as indications
> that \looseness=1 will work
> and use \looseness=1 on almost all paragraphs with short clubs.
>
> I don't see how I could do page balancing without it.
>
> Pierre MacKay

--
------------------------
tomfool at as220 dot org
http://sgouros.com
http://whatcheer.net