[Tex/LaTex] Page-breaking over titles of theorems that have lists

#enumeratelistspage-breakingtheorems

When I have multiple part theorems, I use an enumerate environment inside my theorem environment. However, I don't like the list to start at the same level as the theorem title, since this produces an ugly indent, and also because part (1) is then never lined up with the other parts. So I typeset this as follows:

\begin{theorem}
\
  \begin{enumerate}
    \item First item.
    \item Second item.
  \end{enumerate}
\end{enumerate}

The problem is that if the theorem occurs near the bottom of a page, LaTeX will break the page right after the Theorem title, producing something that looks like

Theorem 1.


  1. First item
  2. Second item

Any way to prevent this? (I don't care if a pagebreak occurs before the theorem title or if it occurs after the first item.) Maybe I should be using something else besides a "\"? Many thanks for any help.

Best Answer

You can use the \Needspace* macro of the needspace package to tell LaTeX that the following material needs at least a certain amount of space left on the current page, otherwise force a page break. The amount of 3\baselineskip means more or less three lines, i.e. the theorem heading, a separation line and the first item line.

See also the answers to How to avoid heading orphan? which might be a duplicate.

\documentclass{article}
\usepackage{amsthm}
\usepackage{lipsum}
\usepackage{needspace}
\newtheorem{theorem}{Theorem}
\newenvironment{Theorem}{%
    \Needspace*{3\baselineskip}%
    \theorem
}{\endtheorem}


\begin{document}
\lipsum[1-10]

\begin{Theorem}
  \ 
  \begin{enumerate}
    \item First item.
    \item Second item.
  \end{enumerate}
\end{Theorem}
\end{document}