2

I have a frame with some text popping and transfoming as slides are flowing using only :

\begin{frame}
  A is 
  \only<1>{Y}
  \only<2>{Z}
\end{frame}

Assume that I want to add first an X in my text, popping before Y, I cannot do

\only<0>{X}

Is there a way to renumber properly in \only?

1 Answers1

2

In simple terms, what you want is a relative specification. The beamer class supports them using the + syntax. Thus for example your example could be made into

\begin{frame}
  A is 
  \only<+>{Y}
  \only<+>{Z}
\end{frame}

and then into

\begin{frame}
  A is
  \only<+>{X} 
  \only<+>{Y}
  \only<+>{Z}
\end{frame}

Each time + is found, it is replaced by an incremented slide number: the first use is therefore slide 1. There is a lot of subtlety to this process, which I've covered in Relative overlay specification in beamer?.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036