4

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!

1 Answer 1

6

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.

8
  • In using gather environment, I could not colour (automatically) the math expressions and equations anymore with: \everymath{\color{blue}} and \everydisplay{\color{magenta}}. How to solve this problem? Commented Oct 21, 2014 at 17:16
  • @ThanhNguyen I added the way to get colors in math
    – egreg
    Commented Oct 21, 2014 at 17:53
  • Yes, I am searching for the answer. This problem is often met problem and the answer should be somewhere in this website. Commented Oct 21, 2014 at 17:55
  • @ThanhNguyen The two lines of code I added are the answer you're looking for.
    – egreg
    Commented Oct 21, 2014 at 17:59
  • Great! But there is still one thing that I would like to ask: With your added solution, the number of the equations in gather environment is also coloured in magenta. Could it be coloured in different colour? Commented Oct 21, 2014 at 18:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .