I am creating a presentation with beamer using relative overlays. When the order overlays should appear in is different from the order the tex code is parsed things become difficult (see e.g. relative overlays).
First Part
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.
Note that I do not care whether the overlays contain list items or tikz elements or something. It should be a general solution.
Currently:
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{itemize}
\item<+(2)-> First item, appears third
\item<+(-1)-> Second item, appears first
\item<+(1)-> Third item, appears fourth
\item<+(-2)-> Fourth item, appears second
\end{itemize}
\end{frame}
\end{document}
I would like to know if there is a way to define the order of overlays independent of the order of appearance in the document. A possible example is given at below.
Wanted (Does not compile)
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{itemize}
\item<foo1> First item, appears third
\item<foo2> Second item, appears first
\item<foo3> Third item, appears fourth
\item<foo4> Fourth item, appears second
\end{itemize}
\setorder{foo2, foo4, foo1, foo3}
\end{frame}
\end{document}
Second Part
Additionally, I would like that overlays also can disappear. Consider the following command. The intention is that the first overlay shows the items labeled by foo1 and foo3. The second overlay shows the items labeled by foo1 and foo2, etc.
\setorder{ {foo1, foo3}, {foo1, foo2}, {foo3, foo4}, {foo2, foo4} }
\begin{frame}<2,4,1,3> ...– yo' Feb 27 '15 at 16:43\begin{frame}<1-4>. – Daniel Feb 28 '15 at 23:19