[comp.text] Poor line breaks from TeX

cudcv@warwick.UUCP (02/19/87)

<munch>

Some time ago I posted an article complaining about poor line breaks
from TeX (actually LaTeX) when the line length was short (table
entries with p{1.7in}).  I received a couple of suggestions, and one
offer of help from a <dennis@uw-warp.uucp> who I never managed to get
mail back to (thanks for the offer anyway).  Grovelling through the
TeXbook has found me a solution - it seems you have to make the space
in paragraphs more stretchy to save the demerits hitting the magic
10000 mark when it completely gives up and sets one line badly with
and 'Underfull hbox' message.

Here's my solution

\renewcommand{\sloppy}{
	\tolerance=10000
	\spaceskip=3.3333pt plus 16.667pt minus 1.1111pt
	\hfuzz=.5pt \vfuzz=.5pt
}

LaTeX uses \sloppy when setting such paragraphs, \sloppy normally sets
the \tolerance, \hfuzz, and \vfuzz.  The \spaceskip makes the
interword spaces stretchier than normal.

This turns				into

	Main   production    bottle-	Main  production   bottle-
	necks  caused  by  lack   of	necks   caused   by   lack
	pro-				of  processing  power  and
	cessing   power  and  queues	queues   for  laserprinter
	for laserprinter (serious at	(serious at busy periods).
	busy periods).

	Commands               em-	Commands    embedded    in
	bedded in text; processing	text; processing needed to
	and printing needed to see	see the results.
	results.

Can anyone improve on this, and how can I make it more general - i.e.,
I'd like to say "increase stretchability by 15 times" rather than the
built-in constants above ?

	Rob
-- 
UUCP:   ...!mcvax!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv@uk.ac.warwick.daisy       ARPA:   cudcv@daisy.warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England