# How to avoid page breaks before enumerate/itemize by default?

Basically the same as this question, except I don't want to have to remember to write \mynobreakpar (or anything else) everywhere.

How do I set this as the default option for all itemize/enumerate/etc. environments?

-

Here's an alternative solution. I would create my own version of the environments for which you want this feature to apply:

\makeatletter
\makeatother
\newenvironment{myitemize}{\mynobreakpar\begin{itemize}}{\end{itemize}}

-
I just tried it with you MWE. It seems to work. – A.Ellett Dec 8 '12 at 15:35
Hmmm... Strange. It does now as well it should. I wonder what happened to my compilation earlier. I would upvote this but I am out of votes for now. – hpesoj626 Dec 8 '12 at 15:40
Worked for me. I did need to add an extra \\ to the end of the paragraph before the itemize to get the spacing I wanted. – jhclark Sep 1 '14 at 18:28

I don't know if this is overkill but one workaround is by using etoolbox package. I took the liberty of copying Ulrike Fischer's macro from your link.

\documentclass{article}
\makeatletter
\makeatother

\usepackage{etoolbox}
\BeforeBeginEnvironment{itemize}{
\mynobreakpar
}
\usepackage{lipsum}
\begin{document}
Some text
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\lipsum[1-4]
Here is an intervening paragraph. Does this answer your needs? Because the quick brown fox jumps over the head of the lazy dog. And the quick brown fox jumps over the head of the lazy dog.
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{document}

-
Oh interesting, I hadn't seen etoolbox before, +1 thanks. – Mehrdad Dec 8 '12 at 4:29

I do not understand why a new paragraph should be lauched before the list. Actually, it seems that you need to take into account the effects of \par to get what you want.

There is only one situation where I do not like page breaks before lists. Furthermore, I do not like list tags not being aligned. This has led to the following.

\makeatletter

\@afterheading is probably just what a \begin{proof} generates, so that the first list item is started right after the \proofname command without any linebreak or vertical space in between.