1

I'm using the memoir class and need to align the bottom of the pages in a page spread. By default, the memoir class does this by inserting spaces between paragraphs, which I don't want. So, I'm using the \raggedbottom command and inserting vertical spacing only where I want it.

I'm running into situations such as below where I want to add roughly half a line of vertical space, so I want to add just a tad of space above the two section titles on the right page.

enter image description here

I inserted the command \vspace{\fill} above both section titles, but it's only working for me if the space at the bottom of the page is more than a line or so. If it's small, like in the above example, I get this:

enter image description here

Can \vspace{\fill} solve this use case? If not, is there a better way?

Here's my MWE:

\documentclass{memoir}

\clubpenalty=10000
\widowpenalty=10000

\usepackage{lipsum}
\raggedbottom
\begin{document}

\lipsum[1-10]

\subsection{Subsection Two}
\lipsum[1-1]

\vspace{\fill}
\section{Section Five}
\lipsum[1-1]

\vspace{\fill}
\section{Section Six}
\lipsum[1-1]

\section{Section Seven}
\lipsum[1-1]

\end{document}

EDIT

Here's an example of when \vspace{\fill} works great. I added the command \enlargethispage{2\baselineskip} to line 11 and 23 of my MWE, which gives this:

enter image description here

Adding \vspace{\fill} above the section titles fixes things nicely, as shown below. So, I'd like to accomplish the same thing regardless of how small the space is at the bottom of the page.

enter image description here

24
  • it seems it's not the minimum but maximum value you want to adjust, something like \vspace{0pt plus 1\baselineskip} Commented Oct 24, 2023 at 14:02
  • Pretty sure I mean minimum value. I'll update my OP to elaborate. Commented Oct 24, 2023 at 14:07
  • also you definitely don't want \vspace* use \vspace as you want to lose this space at a page break Commented Oct 24, 2023 at 14:08
  • 2
    your title still doesn't match your need, the smallest allowable amount added by vfill is 0pt and skillmon's command is identical except the smallest allowable amount is 1cm, in what way does that not answer the question in the title? I really can not guess what you are asking, I'm not just being argumentative for the sake of it:-) Commented Oct 24, 2023 at 15:58
  • 1
    The bottom of pages 2 and 3 of your answer do not align. The bottom of page 3 is 8pts higher than the bottom of page 2. Commented Oct 24, 2023 at 20:22

3 Answers 3

3

This answers the question "How to adjust the setting for the smallest allowable space inserted by \vspace{\fill}?" In the meantime it was made clear that this wasn't what was actually needed. The answer is kept for posterity.

Instead of \vspace*{\fill} you could use \vspace*{1cm plus 1fill}.

4
  • Unfortunately, this didn't work for me.I still got the section moved to the next page. I tried a smaller value \vspace{0.1mm plus \fill} but that seemed to just add the 0.1mm and nothing else. Commented Oct 24, 2023 at 14:02
  • 2
    this does what the OP asks for, but isn't want the OP wanted, see my comment under the question/ Commented Oct 24, 2023 at 14:03
  • @DavidCarlisle This answer didn't answer my OP. I updated my OP to clarify. Commented Oct 24, 2023 at 14:27
  • 1
    @buttonsrtoys it exactly answers the question in the title, changing the minimum value from 0pt to 1cm, but what you ask for does not address the problem you show in the example. Commented Oct 24, 2023 at 14:31
2

You are allowing the space to grow arbitrarily large so introducing the large gaps before the section

\vspace{0pt plus \baselineskip}

would give penalties for growing more than a baselineskip and produces this:

enter image description here

where you see the page with the section headings is more reasonable and does have the page flush to the bottom, however the first page is a line short due to the setting


\clubpenalty=10000
\widowpenalty=10000

which is always problematic.

On that page you either need to allow the page (and perhaps so the double spread) to be short, or give up on the 10000 penalties or adjust the linebreaking with \looseness but in this text there is no easy paragraph to force to be a line longer.

\documentclass{memoir}

\clubpenalty=10000
\widowpenalty=10000

\usepackage{lipsum}
\raggedbottom
\begin{document}

{\emergencystretch=1em
\looseness=1
\lipsum[1]


}

\lipsum[2-4]


\lipsum[5]

\lipsum[6-10]

\subsection{Subsection Two}
\lipsum[1-1]

\vspace{0pt plus \baselineskip}
\section{Section Five}
\lipsum[1-1]

\vspace{0pt plus \baselineskip}
\section{Section Six}
\lipsum[1-1]

\section{Section Seven}
\lipsum[1-1]

\end{document}

is

enter image description here

which is not clearly an improvement

2
  • Since I'm only filling small spaces at the bottom of pages, I want to allow the space to grow arbitrarily large. I also do not want orphans or widows, which is why I'm using the penalties. I just want to shrink the smallest value that \vspace{\fill} adds. So, this answer doesn't answer my OP. Commented Oct 24, 2023 at 15:17
  • @buttonsrtoys the smallest space that vfill adds is 0pt, what do you want it to shrink 0pt to? (this answer balances the baselines of the three pages shown, not sure why it has a downvote. Commented Oct 24, 2023 at 19:26
1

I was going about this all wrong. As mentioned in my question, I want flush bottoms but no spaces between paragraphs. The default memoir class gives this output with the para spacing I don't want, like this:

enter image description here

So, I was using \raggedbottom to keep the paras together and then fixing the spacing between. Here's the same text with raggedbottom:

enter image description here

I now see I can use the default flush bottom spacing and get rid of the para spacing without using \raggedbottom by setting \setlength{\parskip}{0pt}, which works great but understandably give a big space above the section title:

enter image description here

Which can be reduced by shortening the both pages by one line with \enlargethispage{-1\baselineskip}:

enter image description here

My manuscript has lots of quoted text, sections, and figures, so lots of opportunities to add spacing that's not between paras. I'm sure this won't suit everyone's needs, but I tested it on the first 100 pages of my manuscript and it's working great for me.

Here's the code for the above examples


\clubpenalty=10000
\widowpenalty=10000

\usepackage{lipsum}

% \raggedbottom

\setlength{\parskip}{0pt}

\begin{document}

\lipsum[1-9]

\subsection{Subsection Two}

\enlargethispage{-1\baselineskip}
\lipsum[1-1]

\section{Section Five}

\enlargethispage{-1\baselineskip}
\lipsum[1-3]

\section{Section Six}
\lipsum[1-1]

\section{Section Seven}
\lipsum[1-1]

\end{document}
4
  • this addresses your use case but is completely unrelated to the question in the title, which is answered by Skillmon's answer who showed a command that does what you ask for, a command like \vfill but with a different minimum length. So you should accept that answer to get this off the list of unanswered questions. Commented Oct 25, 2023 at 14:40
  • None of the solutions fixed my MWE, including Skillmon's. My OP may have been poorly worded, but none of the solutions answered my question satisfactorily. I could certainly be wrong, but it appears that Skillmon and other's didn't bother to test their solutions on my MWE. If they did, they would have seen the problem I was encountering and addressed it in their answers. Commented Oct 25, 2023 at 16:52
  • Your MWE had nothing to do with the question in the title. Skillmon ignored the example and answered the question, I ignored the question and tried to answer the implied problem in the example (although that wasn't very clear). The best way to resolve it is for you to accept skillmon's answer here and if you still have issues open a new question. It's not Skillman's fault that you posted an unrelated example. vfill is a space of minimum width 0pt and arbitrary stretch and you asked how to change the minimum width. Skillman showd a command with minimum width 1cm and arbitrary stretch. Commented Oct 25, 2023 at 17:04
  • @DavidCarlisle good point. I updated my OP title to align with my MWE and clarified my question. Should be GTG now. Commented Oct 26, 2023 at 14:39

You must log in to answer this question.

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