1

I would like to redefine my proof environment so that if the content of the proof environment is only, say, 3 lines or fewer, then the entire proof environment will just start on a new page. Here is a MWE:

\documentclass[11pt]{article}

\usepackage{lipsum}
\usepackage{amsthm}

\begin{document}

\lipsum[1-4]

\begin{proof}
\lipsum[1]
\end{proof}

\end{document}

In this case, there are only 2 lines of a proof on the first page, so I would like the new proof environment to automatically start the proof on the next page. If the proof environment contained 4 or more lines on a page, then it will behave as normal.

I found a thread here where they gave an example of defining an environment with different spacing and page breaking rules, but I do not understand the solution well enough to adapt it to what I am trying to do with the proof environment. Is there a way to adapt this solution to my problem?

1

One way would be to use the needspace package

enter image description here

Code:

\documentclass[11pt]{article}

\usepackage{lipsum}
\usepackage{amsthm}
\usepackage{needspace}

\newenvironment{MyProof}{%
    \needspace{3\baselineskip}%
    \begin{proof}%
}{%
    \end{proof}%
}%

\begin{document}

\lipsum[1-4]

\begin{MyProof}
\lipsum[1]
\end{MyProof}

\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.