When I create a presentation with `beamer` using relative overlays sometimes is difficult. Especially, when the order overlays should appear in is different from the order the `tex` code is parsed.
Consider the following example. It is not easy to understand the order of appearance, and neither is it easy to come up with the code to achieve the desired order. With more complicated code things become very unwieldy.
Code: Select all
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\begin{itemize}
\item<+(2)-> First item, appears third
\item<+(-1)-.(1)> Second item, appears first, stays 2 slides
\item<+(1)-> Third item, appears fourth
\item<+(-2)> Fourth item, appears second, stays 1 slide
\end{itemize}
\setcounter{beamerpauses}{1}
\begin{tikzpicture}
\node<+-.(2)> (foo1) [draw] {For second item};
\node<+> (foo2) [draw, below of=foo1] {For fourth item};
\node<+-> (foo3) [draw, right of=foo1, node distance=3.5cm] {For first item};
\node<+-> (foo4) [draw, below of=foo3] {For third item};
\end{tikzpicture}
\end{frame}
\end{document}
Code: Select all
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\setorderuncover{ {seconditem-2, secondnode-2}, {fourthitem, fourthnode}, {firstitem-, firstnode-}, {thirditem-, thirdnode-} }
\begin{itemize}
\item<firstitem> First item, appears third
\item<seconditem> Second item, appears first
\item<thirditem> Third item, appears fourth
\item<fourthitem> Fourth item, appears second
\end{itemize}
\begin{tikzpicture}
\node<firstnode> (foo1) [draw] {For second item};
\node<secondnode> (foo2) [draw, below of=foo1] {For fourth item};
\node<thirdnode> (foo3) [draw, right of=foo1, node distance=3.5cm] {For first item};
\node<fourthnode> (foo4) [draw, below of=foo3] {For third item};
\end{tikzpicture}
\end{frame}
\end{document}
[1]: http://tex.stackexchange.com/questions/ ... -in-beamer