I often introduce new text with the last line of a paragraph, terminated by a colon. Perhaps the text before and after is ordinary text (between pages 1 and 2 in the example), or the text thereafter is a list (between pages 3 and 4 in the example), or the first paragraph is within a list with the next one being in a nested list (between pages 5 and 6 in the example). I would like to keep the last line of the first paragraph with the subsequent paragraph because that last line is often of an introductory nature. How can I do this? (I know about \Needspace
, but I don't know how to use it for a solution here.)
I believe this question makes most sense in a \raggedbottom
-context; this is also where I need this resolved. Here is an example:
\documentclass{memoir}
\usepackage{lipsum}
\raggedbottom
\begin{document}
\lipsum[1-4]
Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text:
Some filler text. Some filler text.
\newpage
\lipsum[1-4]
Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text:
\begin{itemize}
\item Some text.
\item Some text.
\item Some text.
\end{itemize}
\newpage
\begin{itemize}
\item \lipsum[1-4]
\item Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Some filler text. Now a nested list:
\begin{itemize}
\item Some text.
\item Some text.
\item Some text.
\end{itemize}
\end{itemize}
\end{document}
Here I would specifically like the last lines of pages 1, 3, and 5 kept together with the first lines of pages 2, 4, and 6, respectively. \nopagebreak
works in the first case, but not in the two list cases.
:
then the list is part of the same sentence so part of the same paragraph, LaTeX goes to a lot of effort to distinguish in-paragraph lists from end or start of paragraph lists