My question is essentially the same as How to prevent a page break before an itemize list?. First, I don't undestand how the proposed solution (\par\nobreak\@afterheading
) works. Why doesn't just \par\nobreak
work? \nobreak
should put there impossible penalty to pagebreak at the following glue. What does \@afterheading
do?
Another thing is that it seems that the solution consumes the space between the paragraph and itemize environment. Minimal example showing the problem follows.
\documentclass[12pt, a4paper]{article}
\makeatletter
\newcommand*{\NoBreakPar}{\par\nobreak\@afterheading}
\makeatother
\begin{document}
Let's see the following list:\NoBreakPar
\begin{itemize}
\item First.
\item Second.
\item Third.
\end{itemize}
\end{document}
Best Answer