[texhax] use of \rightskip

D. R. Evans doc.evans at gmail.com
Wed Jul 28 21:37:31 CEST 2010

I was typesetting something this morning and wasn't happy with the look of
a chapter subheading. I decided that such headings should be set with the
following properties:

flush left
no hyphens
ragged right

The basic idea being that there should be no overfull boxes, and that TeX
should simply add glue at the right side of the line after as many words as
possible have been fitted on to the line.

I thought this would be simple, but I haven't found a way to do it.

The flush left is easy: \noindent.
The no hyphens is easy: \hyphenchar\subchapnamefont=-1
But forcing TeX not to create overfull boxes has defeated me so far.

I thought that something like
  \rightskip=0pt plus 50pt
would to it. In fact, the TeXbook says: "a person can set
  \rightskip=0pt plus1fil
and every line will be filled with space on the right". But when I try that
example (which certainly seems like it should work), I get an overfull box.
There's no sign of any space on the right.

So there's clearly something I'm not understanding about \rightskip. Would
someone please enlighten me as to what I'm missing?


Web:  http://www.sff.net/people/N7DR

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://tug.org/pipermail/texhax/attachments/20100728/035bd29b/attachment.bin>

More information about the texhax mailing list