# Question about exercise 14.31 in TeXbook

The following example uses \signed macro from page 106 of TeXbook:

\tracingonline=1
\tracingparagraphs=1
\def\signed #1 (#2){{\unskip\nobreak\hfil\penalty50
\hskip2em\hbox{}\nobreak\hfil\sl#1\/ \rm(#2)
\parfillskip=0pt \finalhyphendemerits=0 \par}}
\hsize 3.0in \noindent
But sometimes an extra line must be added. \signed N. Bourbaki (Paris)
\bye


Tracing shows:

@firstpass
\tenrm But sometimes an extra line must be added.
@\penalty via @@0 b=0 p=50 d=2600
@@1: line 1.2 t=2600 -> @@0
[] \tensl N.
@ via @@0 b=96 p=0 d=11236
@ via @@1 b=0 p=0 d=100
@@2: line 2.2 t=2700 -> @@1
@@3: line 1.3 t=11236 -> @@0
Bourbaki
@\kern via @@1 b=0 p=0 d=100
@@4: line 2.2 t=2700 -> @@1
\tenrm (Paris)
@\par via @@1 b=0 p=-10000 d=100
@@5: line 2.2- t=2700 -> @@1


When empty hbox is removed, tracing shows

@firstpass
\tenrm But sometimes an extra line must be added.
@\penalty via @@0 b=0 p=50 d=2600
@@1: line 1.2 t=2600 -> @@0
\tensl N.
@ via @@0 b=96 p=0 d=11236
@@2: line 1.3 t=11236 -> @@0


and then first pass fails. Why?

• it's some way like if you replace \signed with \hskip2em. Jun 27 '19 at 5:22
• @touhami interestingly, if \signed is defined as \def\signed{\unskip\nobreak\hfil\penalty50 \hskip2em\hbox{}\nobreak\hfil}, first pass always succeeds Jun 27 '19 at 5:58
• OK but this is not what i meant. What i mean is that as far as lines breaking is concerned you can get the same behaviour with \signed replaced with \hskip2em and with \hskip2em\hbox{} Jun 27 '19 at 6:07

Glue and penalties are discardable, so without the box the entire

\nobreak\hfil\penalty50\hskip2em\nobreak\hfil


If the break happens at the p50 then you would have N Bourbarki (Paris) on the second line, so you get badness from stretching two word spaces to fill the line"
But actually it takes the break after N. as that is penalty 0 which in this case is enough to compensate that Bourbarki (Paris) has only one word space to stretch so more badness from that but no penalty at the break.
Conversely, the \hbox{} is non discardable so if the break is taken at the penalty50, the 2em glue is discarded and the \hbox{} ends up at the start of the next line with the glue expanding to flush the text to the right. (This is basically the difference between \hspace and \hspace* in latex)
• So, without \hbox{}, if the author name is shorter than \hsize, break will never be done at any finite penalty? Jun 27 '19 at 8:42
• I'm asking about the case without \hbox{}. Jun 27 '19 at 9:00