7

How to make phantom item in itemize environment? I want to 'animate' items in my beamer slides, so when I go from one slide to another new item pop up in a right place. I have workaround for one item but it does not work for two items:

\documentclass[10pt]{beamer}
\usetheme{Warsaw} 
\usecolortheme{whale}
\usepackage{tikz}

\tikzset{sequencestyle/.style={minimum size=0.5cm, draw=gray, line width=1pt, inner sep = 2pt}}{}
\begin{document}

\begin{frame}{first slide}
\begin{itemize}
    \item This is first item.                                                   
    \item[]
    \item[]
\end{itemize}
\begin{tikzpicture}
\node [sequencestyle, fill=red, anchor=west, xshift=-\pgflinewidth] (node1) {A};
\node [sequencestyle, fill=blue, anchor=west, xshift=-\pgflinewidth] at (node1.east) (node1) {B};
\end{tikzpicture}
\end{frame}

\begin{frame}{second slide}
\begin{itemize}
    \item This is first item.
    \item This is second item.
    \item[]
\end{itemize}
\begin{tikzpicture}
\node [sequencestyle, fill=red, anchor=west, xshift=-\pgflinewidth] (node1) {A};
\node [sequencestyle, fill=blue, anchor=west, xshift=-\pgflinewidth] at (node1.east) (node1) {C};
\end{tikzpicture}
\end{frame}

\end{document}

I bet this question is answered somewhere, but I could not find.

EDIT: I updated the code. Besides of adding bullets I update some graphics elements. I added few things as an example.

1
  • Wouldn't this be enough? \begin{frame}{first slide} \begin{itemize}[<+->] \item This is first item. \item This is second item. \item This is third item. \end{itemize} \end{frame} Commented May 7, 2013 at 19:45

2 Answers 2

5

You can simply use the fact that itemize is overlay-aware and use the [<+->] overlay option. For the elements of the tikzpicture, you can also use the fact that TikZ's commands are overlay aware:

\documentclass[10pt]{beamer}
\usepackage{tikz}

\usetheme{Warsaw} 
\usecolortheme{whale}

\tikzset{
sequencestyle/.style={minimum size=0.5cm, draw=gray, line width=1pt, inner sep = 2pt}
}

\begin{document}

\begin{frame}{first slide}
\begin{itemize}[<+->]
    \item This is the first item.
    \item This is the second item.
    \item This is the third item.
\end{itemize}

\begin{tikzpicture}
\node<1-> [sequencestyle, fill=red, anchor=west, xshift=-\pgflinewidth] (node1) {A};
\node<2-> [sequencestyle, fill=blue, anchor=west, xshift=-\pgflinewidth] at (node1.east) (node2) {B};
\node<3-> [sequencestyle, fill=green, anchor=west, xshift=-\pgflinewidth] at (node1.east) (node2) {C};
\end{tikzpicture}
\end{frame}

\end{document}

enter image description here

8
  • I like your answer. The problem is that among bullets I have some graphics which updates with appearence of each bullet. Is there way to adapt your solution?
    – ashim
    Commented May 7, 2013 at 20:00
  • @msh could you please update your example code in the question, so we can have a better ides of the inclusion of the graphics? Commented May 7, 2013 at 20:02
  • Essentially the pictures are various nodes drawn using tikz library. I am updating the code.
    – ashim
    Commented May 7, 2013 at 20:09
  • @msh Ah, OK. In the meantime I updated my answer with some images. Is it something different what you need? Commented May 7, 2013 at 20:10
  • I've updated the code. My pictures don't belong to items, I have one separate picture which is updated on adding bullets.
    – ashim
    Commented May 7, 2013 at 20:21
4

If you wish to keep the bullets but only display the item contents, you can use any of the slide-specific overlays. Here's one using \onslide<overlay>{<stuff>}:

enter image description here

\documentclass[10pt]{beamer}% http://ctan.org/pkg/beamer
\usetheme{Warsaw} 
\usecolortheme{whale}

\begin{document}

\begin{frame}{Itemized slide}
\begin{itemize}
  \item This is the first item.
  \item \mbox{}\onslide<2->{This is the second item.}
  \item \mbox{}\onslide<3->{This is the third item.}
\end{itemize}
\end{frame}

\end{document}

You must log in to answer this question.

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