1

We all know the standard transitions for the beamer class (e.g. \transblindhorizontal and so on). But I was wondering if it is possible to make a custom transition. Here is an example: Consider the following MWE (very rough, but just an example).

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usetheme{Singapore}
\usepackage{tikzpeople,tikz}
\setbeamertemplate{navigation symbols}{}
\usetikzlibrary{positioning,shapes,calc,arrows}
\definecolor{gruen}{RGB}{18,133,66}
\definecolor{hell}{RGB}{55,181,74}
\tikzset{
    dollar/.style={
        append after command={
            \pgfextra{
                \node[draw,minimum width=1cm,minimum height=.5cm] (a) at (\tikzlastnode)
                {};
                \fill[gruen] (a.north west) rectangle (a.south east);
                \fill[white,radius=.04] ([xshift=.1cm,yshift=-.1cm]a.north west) circle;
                \fill[white,radius=.04] ([xshift=.1cm,yshift=.1cm]a.south west) circle;
                \fill[white,radius=.04] ([xshift=-.1cm,yshift=.1cm]a.south east) circle;
                \fill[white,radius=.04] ([xshift=-.1cm,yshift=-.1cm]a.north east) circle;
                \fill[hell] ([xshift=-.1cm,yshift=.2cm]a.south east) arc(90:180:.1) -- ([xshift=.2cm,yshift=.1cm]a.south west) arc(0:90:.1) -- ([xshift=.1cm,yshift=-.2cm]a.north west) arc(270:360:.1) -- ([xshift=-.2cm,yshift=-.1cm]a.north east) arc(180:270:.1) -- cycle;
                \fill[gruen,radius=.1cm] ($(a.north west)!.5!(a.south east)$) circle;
                \node[white] at ($(a.north west)!.5!(a.south east)$) {\tiny\sf\$};
            }
        }
    }
}
\begin{document}
    \begin{frame}
        \resizebox{\textwidth}{!}{
        \begin{tikzpicture}[>=stealth]
            \node[yshift=-.5cm,label=above:{\tiny Geldgeber},dave] (dave) {};
            \node[label=below right:{\scalebox{1}[1]{\tiny eig. Empfänger}},businessman,right=2 of dave] (businessman) {};
            \node[label=above:{\tiny Kriminelle},criminal,right=1 of dave,yshift=-1.5cm] (criminal) {};
                \draw[->] (dave) |- (criminal);;
                \draw[<-] (criminal) to[bend right=45] (businessman);
            \uncover<2>{\scalebox{.4}[.4]{\node[dollar] at (1.05,-1.05) {};}\scalebox{.4}[.4]{\node[dollar] at (1.2,-1.2) {};}\scalebox{.4}[.4]{\node[dollar] at (1.35,-1.35) {};}}
            \uncover<3->{
                \scalebox{.4}[.4]{\node[dollar] (b) at (2.5,-6) {};}
                \scalebox{.4}[.4]{\node[dollar] (a) at (4.7,-1.1) {};}\scalebox{.4}[.4]{\node[dollar] at (4.8,-1.2) {};}
                }
            \uncover<3>{\draw[<-,very thin,dashed] ([scale=.4,yshift=.12cm]b.north) -- (dave);\draw[->,very thin,dashed] (dave) -- ([scale=.4,xshift=-.1cm]a.west);}
            \uncover<4>{\node[ellipse callout,draw,yshift=.4cm,callout absolute pointer={(businessman.mouth)},font=\tiny] at (3.3,0) {Hey!};}
        \end{tikzpicture}
    }
    \end{frame}
\end{document}

How can I make an transition that shows how the dollar bills "walk" on their path. I think there is a possibility with the animateline but I would really appreciate to use this transition via the \walkalong option (e.g. \transboxout).

AndréC
  • 24,137
current_user
  • 5,235

1 Answers1

2

Transitions are not embedded in the pdf itself, merely the information for the pdf viewer to use one of the transitions recognised in the pdf standard.

This means that you cannot add custom transitions to your beamer presentation unless you can also convince the creators of pdf viewers etc. to recognise your new transition.


That said you can use other techniques to create an animation for your dollar bills, see e.g. How to moves two or more parallel images towards to meet at a fixed position in beamer

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usetheme{Singapore}
\usepackage{tikzpeople,tikz}
\setbeamertemplate{navigation symbols}{}
\usetikzlibrary{positioning,shapes,calc,arrows}
\definecolor{gruen}{RGB}{18,133,66}
\definecolor{hell}{RGB}{55,181,74}
\tikzset{
    dollar/.style={
        append after command={
            \pgfextra{
                \node[draw,minimum width=1cm,minimum height=.5cm] (a) at (\tikzlastnode)
                {};
                \fill[gruen] (a.north west) rectangle (a.south east);
                \fill[white,radius=.04] ([xshift=.1cm,yshift=-.1cm]a.north west) circle;
                \fill[white,radius=.04] ([xshift=.1cm,yshift=.1cm]a.south west) circle;
                \fill[white,radius=.04] ([xshift=-.1cm,yshift=.1cm]a.south east) circle;
                \fill[white,radius=.04] ([xshift=-.1cm,yshift=-.1cm]a.north east) circle;
                \fill[hell] ([xshift=-.1cm,yshift=.2cm]a.south east) arc(90:180:.1) -- ([xshift=.2cm,yshift=.1cm]a.south west) arc(0:90:.1) -- ([xshift=.1cm,yshift=-.2cm]a.north west) arc(270:360:.1) -- ([xshift=-.2cm,yshift=-.1cm]a.north east) arc(180:270:.1) -- cycle;
                \fill[gruen,radius=.1cm] ($(a.north west)!.5!(a.south east)$) circle;
                \node[white] at ($(a.north west)!.5!(a.south east)$) {\tiny\sf\$};
            }
        }
    }
}
\begin{document}
    \begin{frame}
    \transduration<0-9>{0.1}
        \begin{tikzpicture}[>=stealth,scale=2]
            \node[yshift=-.5cm,label=above:{\tiny Geldgeber},dave] (dave) {};
            \node[label=below right:{\tiny eig. Empfänger},businessman,right=2 of dave] (businessman) {};
            \node[label=above:{\tiny Kriminelle},criminal,right=1 of dave,yshift=-1.5cm] (criminal) {};
            \draw[->] (dave) |- (criminal);;
            \draw[<-] (criminal) to[bend right=45] (businessman);
            \foreach \x in{1,1.1,...,2}{
                \scalebox{.4}[.4]{\node<+>[dollar] at (\x,-1.05) {};}
            }
        \end{tikzpicture}
    \end{frame}
\end{document}

enter image description here