1

I have a book document with \flushbottom. I use expex for linguistic examples. When an example is the first item on a page, the previous page ends with some spurious whitespace, as can be seen in the MWE below.

\ex (which starts an example) inserts \exbreak, which is defined as:

\def\exbreak{\endgraf\bgroup\@getoptionalarg\exbreak@a}
\def\exbreak@a{%
   \ifx\@optionalarg\empty
         \skip255=\lingexbreakfil
      \else
         \skip255= 0pt plus\@optionalarg
      \fi
   \vskip\skip255
   \penalty\lingexbreakpenalty
   \vskip-\skip255
   \egroup
}

(By default, \lingexbreakfil=0pt plus 4ex and \lingexbreakpenalty=-50 (contra the documentation).)

The behaviour of \exbreak is explained as follows in the documentation:

It not only ends the current paragraph and awards a penalty (a reward if the penalty is negative) if a page break is taken at that point, but makes it easier for a satisfactory page break to be taken by allowing the page to end with some vertical fill, allowing some whitespace to appear at the bottom of the broken page.

I can get the desired \flushbottom effect by removing the \vskip\skip255. I am not sure what the purpose of the negative \vskip after the penalty is. This means I can also get the desired effect using \lingset{exbreakfil=0pt}.

What I do not understand is why this happens. According to this answer, "spacing inserted with \vskip will always disappear at a page break". So why does the space inserted by the first \vskip not disappear here?

enter image description here

\documentclass[a4paper]{book}
\usepackage[showframe,margin=4cm,top=6cm,bottom=6cm]{geometry}
\usepackage{blindtext}
\usepackage{expex}
\begin{document}

\Blindtext[4][1]

\ex \begingl \glpreamble A rather long example // \gla with glosses // \glb explaining the // \glc meaning of // \glft `the text' // \endgl \xe

\end{document}

Keelan
  • 5,425
  • vskip after the break (and so at the begin of the begin of the page) disappears (that's why you don't go up on the second page as the negative vskip has not effect). The negative vskip is needed in case you are in the middle of the page: if there is not break between both it negates the effect of the positive vskip. – Ulrike Fischer Sep 05 '23 at 09:27
  • @UlrikeFischer thank you, I'd say that qualifies as an answer! – Keelan Sep 05 '23 at 09:31

0 Answers0