It happens that LaTeX, to fill a page vertically, adds extra spaces around equation environments (and other vertical spaces). Now suppose I have a theorem environment (using amsthm) which ends with an equation, like:
\begin{theorem}
It holds
\begin{equation}
2+2=4
\end{equation}
\end{theorem}
\begin{proof}
Straightforward.
\end{proof}
and suppose that this piece of code rendered inside a page which is strechted vertically by LaTeX. Then LaTeX adds the extra vertical space only BEFORE the equation, and not after, and this looks ugly. Where is the problem?
EDIT: The problem appears only if I use a customized theorem style. So the question is: how should I use the command \newtheoremstyle so that the spacing is handled properly? For example
\newtheoremstyle{myplain} {2cm}% ⟨Space above⟩
{2cm}% ⟨Space below⟩
{\itshape}% ⟨Body font⟩
{}% ⟨Indent amount⟩
{\bfseries}% ⟨Theorem head font⟩
{.}% ⟨Punctuation after theorem head⟩
{.5em}% ⟨Space after theorem head⟩2
{}% ⟨Theorem head spec (can be left empty, meaning ‘normal’)⟩
gives the problem above, while
\newtheoremstyle{myplain} {\topsep}% ⟨Space above⟩
{\topsep}% ⟨Space below⟩
{\itshape}% ⟨Body font⟩
{}% ⟨Indent amount⟩
{\bfseries}% ⟨Theorem head font⟩
{.}% ⟨Punctuation after theorem head⟩
{.5em}% ⟨Space after theorem head⟩2
{}% ⟨Theorem head spec (can be left empty, meaning ‘normal’)⟩
does not.
EDIT2: A working example:
\documentclass[a4paper]{amsart}
\usepackage{amsthm}
\newtheoremstyle{myplain} {2cm}% ⟨Space above⟩
{2cm}% ⟨Space below⟩
{\itshape}% ⟨Body font⟩
{}% ⟨Indent amount⟩
{\bfseries}% ⟨Theorem head font⟩
{.}% ⟨Punctuation after theorem head⟩
{.5em}% ⟨Space after theorem head⟩2
{}% ⟨Theorem head spec (can be left empty, meaning ‘normal’)⟩
\theoremstyle{myplain}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
It holds
\begin{equation}
2+2=4
\end{equation}
\end{theorem}
\begin{proof}
Straightforward.
\end{proof}
\bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip
\bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip
\bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip
\bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip
\bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip
\bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip
\bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip
\bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip \bigskip
\begin{gather}
2\\
2\\
2\\
\end{gather}
\end{document}
amsthm
,ntheorem
,thmtools
, etc.).\bigskip
s\bigskip
's just to produce a short working example. Notice that you don't see the space generated by the bigskips: this space is ignored by LaTeX since it is between two pages. The point is that the space over the equation is much bigger than the space under.