[Tex/LaTex] Beamer – list items replace one another

beameritemizelistsvertical alignment

In a certain frame, I would like to have a picture at the bottom of the frame and several list items that describe it. So my plan is to divide the frame vertically, put the picture at bottom and the list items on top. However because of room issue, I would like the first item to appear, then be replaced by the second item, and so on.

That is, my first slide in that frame should look like:

\begin{frame}[t]{System overview}
    \begin{minipage}{\textwidth}
            \begin{itemize}
                \item item1
            \end{itemize}
    \end{minipage}
    \vfill
    \begin{minipage}{\textwidth}
        \begin{center}
            \includegraphics[scale=0.65]{picture.jpg}
        \end{center}
    \end{minipage}
\end{frame}

and the second slide:

\begin{frame}[t]{System overview}
    \begin{minipage}{\textwidth}
            \begin{itemize}
                \item item2
            \end{itemize}
    \end{minipage}
    \vfill
    \begin{minipage}{\textwidth}
        \begin{center}
            \includegraphics[scale=0.65]{picture.jpg}
        \end{center}
    \end{minipage}
\end{frame}

and so on. Any ideas?

Best Answer

You can simply use overlay specifications on the items. As follows:

\begin{frame}[t]{System overview}
  \begin{minipage}{\textwidth}
    \begin{itemize}
      \item<1> item1
      \item<2> item2
    \end{itemize}
  \end{minipage}
  \vfill
  \begin{minipage}{\textwidth}
    \centering
    \includegraphics[scale=0.65]{picture.jpg}
  \end{minipage}
\end{frame}

Note that I replaced the center environment with \centering, it deals better with space. If you want elements to be visible on more than one slide, you can use ranges like <1-4> for slides 1 through 4 and <3-> for from slide 3 onwards.

Edit: I misunderstood the quesiton, to keep the items in place you need an \only specification. You can renew the \item macro to be "overlay-aware" like this:

\documentclass{beamer}
\renewcommand<>{\item}[1]{\only#2{\beameroriginal{\item}{#1}}}
\begin{document}
  \begin{frame}[t]{System overview}
  \begin{minipage}{\textwidth}
    \begin{itemize}
      \item<1>{item1}
      \item<2>{item2}
    \end{itemize}
  \end{minipage}
  \vfill
  \begin{minipage}{\textwidth}
    \centering
    \includegraphics[scale=0.65]{picture.jpg}
  \end{minipage}
\end{frame}
\end{document}

Note that you need the {} around the argument to \item.

If for some reason you don't want to have to use curly braces to delimit the argument to \item or you don't want to renew the item command you can use the action specification like follows:

\documentclass{beamer}
\begin{document}
  \begin{frame}[t]{System overview}
  \begin{minipage}{\textwidth}
    \begin{itemize}
      \item<1|only@1> item1
      \item<2|only@2> item2
      \item<3|only@3> item3
    \end{itemize}
  \end{minipage}
  \vfill
  \begin{minipage}{\textwidth}
    \centering
    \includegraphics[scale=0.65]{picture.jpg}
  \end{minipage}
\end{frame}
\end{document}