There are a lot of questions about skip control before and after theorem and align environments, see, please, solution with hack of theorem environment, general solution for align environments, however unexpected mysterious skip has come back.
As a MWE we can use a mixture of MWEs given here and here.
It happens that only white \hrule
can slightly improve the situation, however this solution is a little bit ugly.
The question is how not to get unexpected skip in a simple and reasonable way?
Here is a MWE:
MisteriousSkip.tex
:
\documentclass[11pt,a4paper]{report}
\usepackage{amsmath,amssymb,amsthm,xpatch}
\setlength{\topsep}{0pt}
\setlength{\partopsep}{0pt plus 0pt minus 0pt}
\setlength{\parskip}{0pt}
\setlength{\parindent}{0pt}
\newtheoremstyle{mytheoremstyle}{0pt}{0pt}{\itshape}{}{\bfseries}{.}{.5em}{}
\theoremstyle{mytheoremstyle}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{lemma}[theorem]{Lemma}
\makeatletter
\xpatchcmd{\proof}{\topsep6\p@\@plus6\p@\relax}{}{}{}
\makeatother
\begin{document}
\setlength{\abovedisplayskip}{0pt}%
\setlength{\belowdisplayskip}{0pt}%
\setlength{\abovedisplayshortskip}{0pt}%
\setlength{\belowdisplayshortskip}{0pt}%
Some normal text goes here, with a lemma immediately below.
\begin{lemma}
This is the statement of the lemma.
\end{lemma}
%\hrule % if we \hrule, the skip becomes smaller!
\begin{align*}
x_1+x_2+x_3+x_4 &\leq 10 \\
x_5+x_5 &\leq 8 \\
x_7+x_8 &\leq 5
\end{align*}
\begin{proof}
This is the proof of the lemma, with a mysterious space above.
\end{proof}
Some normal text goes here, with a mysterious space above. \par
The next paragraph comes immediately below.
\end{document}
A screenshot of MysteriousSkip.pdf is below:
align*
as part of yourlemma
?lemma
, doesn't it? So, keep it that way, otherwise it's just an equation between alemma
and aproof
, breaking up the two. No one wants to be broken up.