7

I want an enumeration list. The list should however be fixed at its position. Furthermore at all time only 1 item should shown. So what I want is sort of this

\documentclass{beamer}
\begin{document}
\begin{frame}{Test}
\only<1>{%
  \begin{enumerate}
    \item[1.]<1> Item 1
   \end{enumerate}
}
\only<2>{%
  \begin{enumerate}
    \item[2.]<2> Item 2
  \end{enumerate}
}
\only<3>{%
  \begin{enumerate}
    \item[3.]<3> Item 3
  \end{enumerate}
}
\end{frame}
\end{document}

Can this be achieved in an easy manner? For example, is there an option? Such that you could just use

\documentclass{beamer}
\begin{document}
\begin{frame}{Test}
\begin{enumerate}
\item<1> Item 1
\item<2> Item 2
\item<3> Item 3
\end{frame}
\end{document}

3 Answers 3

2

You could pass <only@+> as default action to the enumerate environment to automatically show one item at a time:

\documentclass{beamer}
\begin{document}
\begin{frame}
  \begin{enumerate}[<only@+>]
    \item Item 1
    \item Item 2
    \item Item 3
  \end{enumerate}
\end{frame}
\end{document}

enter image description here

2
9

Buiding on Werner's answer, but without hard-coding the item numbers:

enter image description here

The code:

\documentclass{beamer}
\usepackage{etoolbox}

\makeatletter
\def\c@slideinframe{\beamer@slideinframe}
\def\beamerslideinframe{\beamer@slideinframe}
\makeatother
\def\AdvCnt{\setcounter{enumi}{\numexpr\arabic{slideinframe}-1\relax}}
\pretocmd{\item}{\AdvCnt}{}{}

\begin{document}
\begin{frame}{Test}
  \begin{enumerate}
    \only<+>{\item Item 1}
    \only<+>{\item Item 2}
    \only<+>{\item Item 3}
  \end{enumerate}
\end{frame}
\end{document}
0
8

An easier way would be to use

enter image description here

\documentclass{beamer}
\usepackage{lmodern}% http://tex.stackexchange.com/q/58087/5764
\begin{document}
\begin{frame}{Test}
  \begin{enumerate}
    \only<1>{\item[1.] Item 1}
    \only<2>{\item[2.] Item 2}
    \only<3>{\item[3.] Item 3}
  \end{enumerate}
\end{frame}
\end{document}
0

You must log in to answer this question.

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