At the entry inside the environment, enumitem executes :
\addpenalty \@beginparpenalty
As a result, an unwanted page break may occur :
% ---------------------------------
Some text \par \nobreak
\begin{itemize}% < A page break may occur here ! >
\item ...
\end{itemize}
% ---------------------------------
As a turnaround, I usually say in this case :
% ---------------------------------
Some text \par \nobreak
\begin{itemize}[beginpenalty=\lastpenalty]
\item ...
\end{itemize}
% ---------------------------------
It would be usefull to test, at the entry in the environment,
if \lastpenalty is 10000 or higher, and avoid to add an unwanted
\@beginpenalty if this is the case.
If there is some enhancement happening here then probably checking the @nobreak switch should be done too ie to account for the case when a list is the first element in a headed section.
Reported by CHERVET Florent.
At the entry inside the environment, enumitem executes :
As a result, an unwanted page break may occur : % --------------------------------- Some text \par \nobreak \begin{itemize}% < A page break may occur here ! > \item ... \end{itemize} % ---------------------------------
As a turnaround, I usually say in this case : % --------------------------------- Some text \par \nobreak \begin{itemize}[beginpenalty=\lastpenalty] \item ... \end{itemize} % ---------------------------------
It would be usefull to test, at the entry in the environment, if \lastpenalty is 10000 or higher, and avoid to add an unwanted \@beginpenalty if this is the case.