[texhax] \nobreaks shrinks following text

Oleg Katsitadze olegkat at gmail.com
Mon Mar 30 03:56:30 CEST 2009

On Sun, Mar 29, 2009 at 08:36:41PM +0100, Rodolfo Medina wrote:
> Rodolfo Medina wrote:
> >> I correct myself: it's not that \nobreaks adds extra vertical glue, but that
> >> it shrinks the text that follows in the current paragraph.  Can anybody
> >> explain why?

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

> 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.

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

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.


More information about the texhax mailing list