[texhax] Checking the length of paragraph last line

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Fri Oct 14 22:48:44 CEST 2005

> Fifteen or so years back, someone came up with a macro that would, in 
> effect, measure the last line of a paragraph so that you could decide 
> whether to put an identifying tag (like an author's name) in the white 
> space after a short final line or on the next line if the paragraph 
> final line stretched near the right margin. 
>                        ppppppppppppppppppppppppppppppppppp
>                        pppp                                           
> nnnnnnnnn
> or
>                       pppppppppppppppppppppppppppppppppppp
>                       ppppppppppppppppppppppppppppppp
> nnnnnnnnnn

i think something went a bit wrong there...

> Does anyone remember this? or have a copy of the macro available?

you don't mean the thing in the texbook, do you?  my copy's isolated
from my by the stairs and the arthritis, but the source has

\def\signed #1 (#2){{\unskip\nobreak\hfil\penalty50\hskip2em
  \hbox{}\nobreak\hfil\sl#1\/ \rm(#2)
  \parfillskip=0pt \finalhyphendemerits=0 \endgraf}}

which he then uses as

\vbox{\hsize 3.0in \parindent0pt
  This is a case where the name and address fit in nicely with the review.
  \signed A. Reviewer (Ann Arbor, Mich.)
  But sometimes an extra line must be added. \signed N. Bourbaki (Paris)}

find the discussion via the index entry for bourbaki.

More information about the texhax mailing list