2

I want to animate a complicated process which in general works very well with the "visible on" keyword, but I want to briefly interrupt the animation and insert a slide to introduce a new concept / method... with which it is now possible to conclude the process.

However, with "visible on", it will generate the whole process and I have no control over the single slides or where to put them. Is there a way to achieve this goal?

The most flexible and desirable solution would be if I could generate slides based on a range... e.g.:

\begin{frame}{Primitive process}
\begin{tikzpicture}[range=<1-2>] % range: only generate slides 1-2 of this diagram

  \node[visible on=<1>] {Primitive};
  \node[visible on=<2>] {elements};

  \node[visible on=<3>] {Very complicated};
  \node[visible on=<4>] {elements};
\end{tikzpicture}
\end{frame}

\begin{frame}{Introducing new complicated concept}
  \bi
    \ii some
    \ii explanation
  \ii
\end{frame}

\begin{frame}{Now we're ready!}
  \begin{tikzpicture}[range=<2->] % generate all the slides except the first
    % the same as above (as \input'ed from an external file)
  \end{tikzpicture}
\end{frame}
Danyel
  • 123

1 Answers1

4

To display only a subset of overlays, beamer provides the possibility to specify \begin{frame}<1-2>. To display the missing frames, you don't need to rewrite everything, simply use \againframe.

\documentclass{beamer}
\usepackage{tikz}


  \tikzset{
    invisible/.style={opacity=0},
    visible on/.style={alt=#1{}{invisible}},
    alt/.code args={<#1>#2#3}{%
      \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
    },
  }

\begin{document}

\begin{frame}<1-2>[label=complicate]
\frametitle{Primitive process}
\begin{tikzpicture}

  \node[visible on=<1>] {Primitive};
  \node[visible on=<2>] {elements};

  \node[visible on=<3>] {Very complicated};
  \node[visible on=<4>] {elements};
\end{tikzpicture}
\end{frame}

\begin{frame}{Introducing new complicated concept}
  test
\end{frame}

\againframe<2->{complicate}


\end{document}

(I borrowed the definition for visible on from https://tex.stackexchange.com/a/99122/36296 as you did not give us any clue how you might have defined this)