[texhax] \nobreaks shrinks following text

Rodolfo Medina rodolfo.medina at gmail.com
Mon Mar 30 19:22:01 CEST 2009


Rodolfo Medina wrote:

>> >> [...] \nobreaks [...] shrinks the text that follows in the current
>> >> paragraph.  Can anybody explain why?



Oleg Katsitadze <olegkat at gmail.com> writes:

> Not really, it doesn't shrink text.  It causes (shrinkable) vertical
> glue to shrink, see below.



Rodolfo:

>> if you comment out the line `\nobreak'
>> in the definition of \myparagraph, then page 1 will contain less text: this
>> means that the presence there of \nobreak shrinks the page.



Oleg:

> When you add \nobreak, TeX has two options.  First, it can take the
> first line of the following paragraph and fit it on the same page as
> the heading line (and maybe more than one line, depending on your
> settings of \clubpenalty; in your case, it also has to fit the
> displayed formula).  Or, TeX can just move the heading line to the
> next page, to keep it with the following paragraph.  TeX decides that
> the former is more pleasing to the eye (actually, it decides that it
> better satisfies the restrictions you specified), probably because
> without \nobreak the glue on that page was already stretched quite a
> bit.
>
> Why TeX only puts the beginning of that paragraph on page 1 when you
> specify \nobreak?  Because \nobreak adds penalty to the glue, and that
> causes recalculation of the "merits" of the viable pagebreaks.
> Without the added penalty, those lines weren't "good enough" to fit on
> page 1; with the penalty, it became "more attractive" than to move the
> heading line to the next page.



Donald Arseneau <asnd at triumf.ca> writes:

> No, \nobreak doesn't shrink text either.  (...unless you redefined it)
>
> [...] Prevents page breaks (gasp!) that fit the page better, forcing
> TeX to use alternate break points that do not fit as well.  In order
> for the page contents to fit, flexible glue will stretch or shrink.


Thanks for your help.  Now it is quite clear.
Rodolfo



More information about the texhax mailing list