[Tex/LaTex] Beamer animation including images

beamer

Good morning everybody,
I've got an issue with the beamer animations including pictures. Here's the code I'm writing:

\item<7-> $kT \ll m_{W^{\pm}}$ $\Longrightarrow$ $W$ bosons neglected and 
\begin{center} 
  \includegraphics[scale=0.3]{Img/elecweak} 
\end{center}

So, what I have are 7 \item (inside an enumerate if it is of some interest) that should appear one after the other, the last one of which should appear together with the picture. Probably I'm doing something wrong because the picture is always visible during all the animations.

Can you help me find the problem?
Thank you very much!!!

Best Answer

Here are two approaches you can use. In the first, the image exists within the list, but I don't know of a nicer way to center it. In the second approach, the image is separate from the list, but appears only with the desired item (in this case, item seven). Using something like \visible rather than \only will prevent the list from shifting on the page when the image appears.

\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Image included in list}
\begin{enumerate}
\item<+-> Item 1
\item<+-> Item 2
\item<+-> Item 3
\item<+-> Item 4
\item<+-> Item 5
\item<+-> Item 6
\item<+-> $kT \ll m_{W^{\pm}}$ $\Longrightarrow$ $W$ bosons neglected and \\
\hfill
\includegraphics[height=3cm]{example-image}
\hspace*{\fill}
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Image visible with last item}
\begin{enumerate}
\item<+-> Item 1
\item<+-> Item 2
\item<+-> Item 3
\item<+-> Item 4
\item<+-> Item 5
\item<+-> Item 6
\item<+-> $kT \ll m_{W^{\pm}}$ $\Longrightarrow$ $W$ bosons neglected and 
\end{enumerate}
\visible<7>{%
\centering
\includegraphics[height=3cm]{example-image}
}
\end{frame}
\end{document}
Related Question