Can anybody explain where the extra spacing comes from when using an align instead of a equation? And does anybody know how to remove it?
\documentclass{article}
\usepackage{amsmath}
\usepackage{mdframed}
\mdfdefinestyle{myframe}{frametitlebackgroundcolor=green}
\begin{document}
\begin{mdframed}[style=myframe, frametitle={B}]
\begin{equation} c^2=a^2+b^2 \end{equation}
\end{mdframed}
\begin{mdframed}[style=myframe, frametitle={A}]
\begin{align} c^2 & =a^2+b^2 \\ & \geq a^2 \end{align}
\end{mdframed}
\end{document}


minipageinstead ofmdframed. The problem is thatalignshould never be used at the start of a paragraph; a remedy is to issue\vspace{-\baselineskip}before\begin{align}(buttcolorboxis much more powerful). – egreg Mar 21 '16 at 11:29