I am using \flushbottom
to get pages of equal height. When I now insert a tcolorbox
which is set to be unbreakable such that a page break becomes necessary, only the spaces between paragraphs on the page right before it (third page in the figure) are stretched, while on all pages before the spacing between paragraphs is normal:
I would like to have all spaces between paragraphs on all pages before equally stretched, so that the spacing between paragraphs is uniform across all pages, like this:
Here is my MWE, which contains the examples shown in the figures:
\documentclass[12pt]{book}
\usepackage{parskip}
\usepackage{tcolorbox}
\usepackage{lipsum}
\begin{document}
\paragraph{In this example, we see small gaps between paragraphs on the first two pages and large ones on the third page:}
\lipsum[1-4]
\begin{tcolorbox}
\lipsum[2]
\end{tcolorbox}
\lipsum[1-6]
\begin{tcolorbox}
{}
\lipsum[4]
\end{tcolorbox}
\pagebreak
\setlength{\parskip}{0.5cm plus 0.125cm}
\paragraph{I prefer to have the gaps between paragraphs uniform like this:}
\lipsum[1-4]
\begin{tcolorbox}
\lipsum[2]
\end{tcolorbox}
\lipsum[1-6]
\begin{tcolorbox}
{}
\lipsum[4]
\end{tcolorbox}
\end{document}