# beamer block inside an itemize environment with overlays

I have a frame like this, there is a block inside the itemize environment, and there is an overlay :

\begin{frame}   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frametitle{Comparing two Gaussian means: equality}

\begin{itemize}

\item<1-> Assume for instance that each measurement is $\approx 1000$

\item<1-> Would you mind if $\mu_1=1000$ and $\mu_2=1000.1$ ?

\item<1->[]
\begin{alertblock}{Significant difference does not mean important difference}
"The mean of the Gaussian distribution is well estimated whenever $n \geq 30$
"Significant difference" is a shortcut for \emph{significantly different from $0$}.
The presence of a significant difference shows that there is a strong evidence that
$\boxed{\mu_1 \neq \mu_2}$
\end{alertblock}

\vspace{-13pt}
\item<1->[]
\begin{columns}[T]
\column{.5\linewidth}
\begin{itemize}
\item<1-> Whether $\mu_1=\mu_2$ or  $\mu_1 \neq \mu_2$  is \emph{not} the question of interest
\item<2-> xx
\end{itemize}
\column{.5\linewidth}
\only<2->{\begin{figure}
...
\end{figure}
}
\end{columns}
\end{itemize}

\end{frame}


You can see the rendering here. The problem is that the two slides are not well superposed, and I have done many unsuccessful attempts to solve that.

## 1 Answer

That's exactly the purpose of the overlay area environment; in my example I used a dummy-image at the bottom:

\documentclass{beamer}
\usetheme{Boadilla}
\begin{document}

\begin{frame}   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frametitle{Comparing two Gaussian means: equality}

\begin{overlayarea}{\textwidth}{\textheight}
\begin{itemize}
\item<1-> Assume for instance that each measurement is $\approx 1000$
\item<1-> Would you mind if $\mu_1=1000$ and $\mu_2=1000.1$ ?
\item<1->[]
\begin{alertblock}{Significant difference does not mean important difference}
"The mean of the Gaussian distribution is well estimated whenever $n \geq 30$
"Significant difference" is a shortcut for \emph{significantly different from $0$}.
The presence of a significant difference shows that there is a strong evidence that
$\boxed{\mu_1 \neq \mu_2}$
\end{alertblock}
\vspace{-13pt}
\item<1->[]
\begin{columns}[T]
\column{.5\linewidth}
\begin{itemize}
\item<1-> Whether $\mu_1=\mu_2$ or  $\mu_1 \neq \mu_2$  is \emph{not} the question of interest
\item<2-> xx
\end{itemize}
\column{.5\linewidth}
\only<2->{\begin{figure}
\includegraphics[height=2cm]{example-image-a}
\end{figure}
}
\end{columns}
\end{itemize}
\end{overlayarea}
\end{frame}

\end{document}


• Great ! By the way, how have you (generated and) included this animated output here ? – Stéphane Laurent Sep 3 '13 at 13:20
• Ooopppss... in case there are some reader of my slide, the sentence "The mean of the Gaussian distribution is well estimated whenever $n \geq 30$" (is wrong and) has nothing to do here. – Stéphane Laurent Sep 3 '13 at 13:22
• @StéphaneLaurent to generate the animation I used ImageMagick and convert -density 300 -delay 100 test.pdf test.gif . I then inserted the resulting .gif animation using the button above the answer window. – Gonzalo Medina Sep 3 '13 at 13:26
• looks nice. Do you know, how to get the two subitems below the alertbox to correct indentation? (They should be one itemize indent further right) – hardmooth Aug 28 '14 at 12:46