# Vertical spacing below block quote should be retained even if footnote follows

In my text, block quotes have noticeable vertical spacing from the text above and below. When there is a footnote, this property is violated; I would like to restore it. (And I think this formatting option makes sense from an aesthetic point of view.)

In other words: If a block quote ends a page (and doesn't continue onto the next page) but a footnote follows on the same page, I would like that footnote to be spaced further apart than it would otherwise be, to preserve the property that below a block quote there is always a certain amount of space.

Here is sample code illustrating the issue:

\documentclass[12pt]{memoir} % the issue is clearly visible for a font size of 12pt
\usepackage{lipsum}

% quotes with twice the standard \parindent as indentation from both sides
% (the example works the same if you prefer the "quote" environment instead)
\newenvironment{myquote}%
{\par\setSpacing{1}\list{}{\leftmargin=2\parindent \rightmargin\leftmargin}%
\item[]%
\small%
\fontfamily{ppl}\selectfont}%
{\endlist}

\begin{document}

\begin{myquote}
This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote.\footnote{A footnote. The vertical spacing is as it should be, as the block quote continues onto the next page.}

\vspace*{10\baselineskip}

\lipsum[1]

\begin{myquote}
This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.\footnote{A footnote. It should have more vertical distance from the block quote, as that block quote terminates here.}

\vspace*{6\baselineskip}

\lipsum[1]

\begin{myquote}
This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.

\end{document}

• The first page displays the desired spacing below (and above) a block quote.
• The footnote at the bottom of page 1 has close vertical spacing to the preceding body text, as the block quote at the bottom of page 1 continues onto page 2.
• The footnote at the bottom of page 2 should (in my preference) have wider vertical spacing (ideally the same as if text were to follow), to indicate that the block quote ends at the bottom of page 2.

Notes on the generality of the solution:

• The example works equally well if the three occurrences of \begin{myquote} and \end{myquote} are replaced by \begin{quote} and \end{quote}. I figured that since there is a chance that the environment needs modification anyways, I might as well expose the internals of a self-defined environment. Nonetheless it's now occurring to me that a solution that tells the user how to perform such a modification for the standard quote environment might be more useful to others. But I am also assuming that the fix is essentially the same.
• I normally use \raggedbottom in my preamble; it will be good if a solution is compatible with that.
• The vertical spacing for block quotes at the top of a page is okay and doesn't require amending, as their distance from a header (if there is one) is already large (and larger than the distance between a block quote and text above it would be).
-

Here are two approaches.

# 1. Inserting an unremovable skip

Adding \showout to you file reveals that the block quote is followed by

....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
...\penalty -51
...\glue 12.56712 plus 6.2829 minus 4.35004
...\glue(\parskip) 0.0 plus 1.0


The problem is that there is a negative penalty before the main vertical glue of 12.56712pt. This can be adjusted by adding an appropriate \par\vspace*{...} before your \endlist and placing an \unskip just after, resulting in:

....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
...\rule(0.0+0.0)x*
...\penalty 10000
...\glue 12.56712 plus 6.2829 minus 4.35004
...\glue 0.0
...\penalty -51
...\glue(\parskip) 0.0 plus 1.0


on page 1, and visually we get the following at the bottom of page 2:

It turns out that this glue expression is the value of \topsep plus \partopsep in your list, so this is what I have used in the code:

\documentclass[12pt]{memoir}

\usepackage{lipsum}

\newenvironment{myquote}%
{\par\setSpacing{1}\list{}{\leftmargin=2\parindent \rightmargin\leftmargin}%
\item[]%
\small%
\fontfamily{ppl}\selectfont}%
{\par\vspace*{\topsep}\vspace*{\partopsep}%
\endlist\unskip}

\begin{document}

\begin{myquote}
This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote.\footnote{A footnote. The vertical spacing is as it should be, as the block quote continues onto the next page.}

\vspace*{10\baselineskip}

\lipsum[1]

\begin{myquote}
This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.\footnote{A footnote. It should have more vertical distance from the block quote, as that block quote terminates here.}

\vspace*{5\baselineskip}

\lipsum[1]

\begin{myquote}
This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.

\end{document}


An alternative approach, stealing ideas from the definition of \samepage, you could try setting some appropriate pentalties before closing your list. If you are just using your environment for text material then \@endparpenalty seems to be a good knob to tweak. Setting this high will discourage a page break before the following text.

Here is the bottom of page 2 in the document below.

Adjusting the space on that page up to e.g. 5.5\baselineskip results in the page break being placed within the quoted material.

\documentclass[12pt]{memoir}

\usepackage{lipsum}

\makeatletter
\newenvironment{myquote}%
{\par\setSpacing{1}\list{}{\leftmargin=2\parindent \rightmargin\leftmargin}%
\item[]%
\small%
\fontfamily{ppl}\selectfont}%
{\@endparpenalty\@M\endlist}
\makeatother

\begin{document}

\begin{myquote}
This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote.\footnote{A footnote. The vertical spacing is as it should be, as the block quote continues onto the next page.}

\vspace*{10\baselineskip}

\lipsum[1]

\begin{myquote}
This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.\footnote{A footnote. It should have more vertical distance from the block quote, as that block quote terminates here.}

\vspace*{5\baselineskip}

\lipsum[1]

\begin{myquote}
This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote. This is a block quote. This is a block
quote. This is a block quote.
\end{myquote}

\noindent Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote. Text after the block quote.

\end{document}

-