2

I use the following code to display items sequentially

\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\begin{frame}[fragile,t]
 \frametitle{}
{\textcolor {blue}{\Large {Items on a List}}}
\begin{enumerate}
\item<2>
{item 1}
\item<3>
{item 2}
\item<4>
{item 3}
\item<5>
{item 4}
\item<6>
{item 5}
\item<7>
{item 6}
\end{enumerate}
\end{frame} 
\end{document}

When making a list using enumerate environment, their numbering is adjusted automatically; and when adding new items in the middle, their numbering is re-adjusted automatically.

When displaying these items sequentially, I use \item<2>{...}, \item<3>{...} and so on. But, when I need to insert new items in the middle of the list (for example, when adding an item between 4 and 5), I have to re-adjust the order of the display of each subsequent item.

Is there a way to make the order of their display re-adjusted automatically as their numbering is re-adjusted automatically.

  • 1
    samcarter or another beamer expert can give you a more authoritative answer, but there is \item<+> which looks suspiciously like it could help you. – moewe Aug 6 '18 at 7:54
  • 2
    You can also use \begin{enumerate}[<+->] and then just regular \item commands. – Max Aug 6 '18 at 7:55
  • 1
    Or even better: \begin{enumerate}[<+>] \item item 1 \item item 2 \item item 3 \item item 4 \item item 5 \item item 6 \end{enumerate} possibly with \stepcounter{beamerpauses} see tex.stackexchange.com/q/86678/35864 – moewe Aug 6 '18 at 7:58
6

You can give the enumerate environment an <+-> overlay specification like this:

\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\begin{frame}[t]
 \frametitle{}
{\textcolor {blue}{\Large {Items on a List}}}
\begin{enumerate}[<+->]
\item item 1
\item item 2
\item item 3
\item item 4
\item item 5
\item item 6
\end{enumerate}
\end{frame} 
\end{document}

enter image description here

Alternatively if you want only the current item to show, you can use <+> as specification as mentioned by @moewe:

enter image description here

In the latter I used \pause before the \begin{enumerate} to make the first sheet empty:

\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\begin{frame}[t]
 \frametitle{}
{\textcolor {blue}{\Large {Items on a List}}}
\pause
\begin{enumerate}[<+>]
\item item 1
\item item 2
\item item 3
\item item 4
\item item 5
\item item 6
\end{enumerate}
\end{frame} 
\end{document}
  • 1
    I think the OP only wants <+> and not <+->, at least that is what the MWE shows. And in their example the first slide is empty, but I don't know if that is a requirement. – moewe Aug 6 '18 at 8:02
  • 1
    @moewe You are right, I must've overlooked that! I adjusted the answer accordingly. – Max Aug 6 '18 at 8:06
  • 1
    +1 But I think it would be a nice touch to add the code for the second output as well. That makes it easier for people looking for a copy-and-paste solution. – moewe Aug 6 '18 at 8:09
  • 1
    @moewe Again, you are right :) – Max Aug 6 '18 at 8:10
  • Thank you very much; this is what I wanted. Just one comment, instead of using \pause before the \begin{enumerate}, I used \begin{enumerate}[<+(1)>] – Hany Aug 6 '18 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.