1

In the MWE below, a \flushbottom is requested. However, because \parskip is unstretchable, LaTeX fails to deliver a flush bottom on the second page.

\documentclass[a5paper]{article}

\usepackage[showframe]{geometry}
\usepackage{lipsum}
\setlength\parskip{0.1em plus 0em minus 0em}
\flushbottom

\begin{document}
\lipsum[1]\lipsum[1]\lipsum[1]

\lipsum[11]

\lipsum[11]

\lipsum[11]

\lipsum[11]

\lipsum[11]
\end{document}

Is there any way to allow LaTeX to automatically stretch line spacing to achieve a \flushbottom?

(For some users, manual approaches using \usepackage{setspace} and \setstretch might suffice, but here I asking whether LaTeX can determine how much to stretch line spacing.)

1
  • 1
    I believe that the page size of article is defined to hold an integral number of lines spaced at the expected \baselineskip. By adding \parskip (with no stretch) that is not an exact multiple of \baselineskip you have made it nearly impossible to achieve \flushbottom. LaTeX on its own cannot determine how much to stretch the ordinary line spacing; you have to define that yourself. Commented Jul 10, 2021 at 2:24

1 Answer 1

1

baselineskip is a skip so can be stretchy if you really want this but it is somewhat odd setting.

enter image description here

\documentclass[a5paper]{article}

\usepackage[showframe]{geometry}
\usepackage{lipsum}
\setlength\parskip{0.1em plus 0em minus 0em}

\flushbottom

\begin{document}
\setlength\baselineskip{1\baselineskip plus5pt minus 1pt}

\lipsum[1]\lipsum[1]\lipsum[1]

\lipsum[11]

\lipsum[11]

\lipsum[11]

\lipsum[11]

\lipsum[11]
\end{document}

It is better to make the textheight such that a page full of text fits exactly at the standard baseline which geometry will do automatically with the heightrounded option.

2
  • Thank you, David. One follow-up if I may: Suppose now that I change the \parskip setting to \setlength\parskip{1\parskip plus 5pt minus 1pt}. (More generally, we could consider other skips and seps.) Is there a rule of thumb for how LaTeX stretches or shrinks these for a given page? For example, can we expect proportional stretching for all skips and seps, are all skips and seps stretched by the same absolute amount, or are some skips or seps stretched before others?
    – SapereAude
    Commented Jul 10, 2021 at 7:04
  • 1
    all skips of the same order stretch the same amount so if you add finite stretch as here then on each page all such skips (and other stretchy skips with finite skip such as around math display) will all stretch the same amount, in proportion to their stretch. but vertical skips in nested boxes eg a minipage or figure will not stetch, and if there is infinite stetch like the \vfill from \end{document} on page 3 that will stop any skip with finite stretch from stretching Commented Jul 10, 2021 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .