Here's a MWE:










My point is that there's a lot more vertical space between the paragraphs on page 2 than on page 1 or 3. If I look at pages 2 and 3 side by side, I think that the difference is annoying.

However, it seems pretty obvious that this could be fixed by moving the first line of page 3 to the end of page 2 without creating orphans or widows and without exceeding the available height for page 2. Why doesn't TeX do that?

  • 2
    Typically \parskip uses (expandable) glue. Use \the\parskip for details. Try using \raggedbottom to make vertical expansion unnecessary. Oct 2 '20 at 16:13
  • This is for a book. I can't use \raggedbottom.
    – Frunobulax
    Oct 2 '20 at 16:42
  • Is tex.stackexchange.com/questions/401778/… sort of where you are headed? Note: a better solution might be possible using \pagetotal and \pagegoal. Oct 2 '20 at 17:10
  • Not really. I think the solution I describe below is fine with me, though. Thanks.
    – Frunobulax
    Oct 2 '20 at 17:32

I found something in the Mittelbach/Goossens book (which I admit is on my bookshelf but rarely looked at). I'm not sure if this is the "best" way to do it but it seems to fix my problem. Use this at the beginning of the document:

\newcounter{tempc} \newcounter{tempcc}

You also need to use the calc package for this to work.

EDIT: As David Carlisle suggested, the heightrounded option of the geometry package provides a similar solution.

  • 1
    the geometry package will do that for you Oct 2 '20 at 16:58
  • @DavidCarlisle Are you referring to the heightrounded option (that I just found in the documentation)? It seems the Mittelbach/Goossens solution produces a more pleasing result. It is also my understanding that heightrounded might enlarge textheight which is not what I want.
    – Frunobulax
    Oct 2 '20 at 17:17
  • 2
    Probably. I couldn't remember the name was going to check:-) either way the intention is to ensure that textheight-topskip is a multiple of \baselineskip Oct 2 '20 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.