[Tex/LaTex] Problem with vertical spacing of equations in itemize after the first \item

equationsitemizelistsspacing

I found one similar thread here (Removing strange vertical space after first (customized) \item), but I still could not resolve my problem. Please help.

Description of the problem:

  1. I used beamer class.

  2. In a frame, in itemize environment, if the text after the first \item is short, then the numbered equations are placed equidistantly in vertical direction. Up till now, no problem.

  3. However, if the text after the first \item is long, then the spacing of numbered equations are off. The vertical space after the first equation is unintendedly larger than that between the second and third equations.

Here is the MWE:

\documentclass{beamer}
\usetheme{Frankfurt}

\begin{document}

\begin{frame}
\begin{itemize}
\item blah
\begin{equation}
a=b
\end{equation}
\begin{equation}
b=c
\end{equation}
\begin{equation}
c=d
\end{equation}
\end{itemize}
\end{frame}


\begin{frame}
\begin{itemize}
\item blah blah blah blah blah blah blah blah blah blah:
\begin{equation}
a=b
\end{equation}
\begin{equation}
b=c
\end{equation}
\begin{equation}
c=d
\end{equation}
\end{itemize}
\end{frame}

\end{document}

Your help is appreciated!

Best Answer

You should never stack math display environments; instead of consecutive equation environments use gather:

\documentclass{beamer}
\usetheme{Frankfurt}

\begin{document}

\begin{frame}
\begin{itemize}
\item blah
\begin{gather}
a=b\\
b=c\\
c=d
\end{gather}
\end{itemize}
\end{frame}


\begin{frame}
\begin{itemize}
\item blah blah blah blah blah blah blah blah blah blah:
\begin{gather}
a=b\\
b=c\\
c=d
\end{gather}
\end{itemize}
\end{frame}

\end{document}

enter image description here

If you want to color math, the correct procedure is to add

\setbeamercolor{math text displayed}{fg=magenta}
\setbeamercolor{math text inlined}{fg=blue}

before \begin{document}. Acting on \everymath or \everydisplay doesn't guarantee correct results.