Debian Codegraph @

texmf-dist/doc/latex/beamer-reveal/beamer-reveal-example.tex

raw
1 %%
2 %% This is file `beamer-reveal-example.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% beamer-reveal.dtx (with options: `example')
8 %%
9 %% This is a generated file.
10 %%
11 %% Copyright (C) Walter Daems <[email protected]>
12 %%
13 %% This work may be distributed and/or modified under the conditions of
14 %% the LaTeX Project Public License, either version 1.3 of this license
15 %% or (at your option) any later version. The latest version of this
16 %% license is in:
17 %%
18 %% http://www.latex-project.org/lppl.txt
19 %%
20 %% and version 1.3 or later is part of all distributions of LaTeX version
21 %% 2005/12/01 or later.
22 %%
23 %% This work has the LPPL maintenance status `maintained'.
24 %%
25 %% The Current Maintainer of this work is Walter Daems.
26 %%
27 %%
28
29 \documentclass[11pt,aspectratio=169,t]{beamer}%
30 \setbeamertemplate{navigation symbols}{}
31
32 \usepackage[width=1920,autoslide=4000]{beamer-reveal}
33 \usepackage{tikz}
34 \usepackage{siunitx}
35
36 \newcommand\eu{\mathrm{e}}
37 \newcommand\ju{\mathrm{j}}
38
39 \title{Test slide deck}
40 \subtitle{\textsc{beamer-reveal}}
41 \author{Walter Daems}
42
43 \setbeamertemplate{note page}{\insertnote}
44
45 \setvoiceovertts{azuretts.py}
46 \setvoiceover{en-GB:neural:Ryan}
47 \setvoiceoverext{.ogg}
48
49 \begin{document}
50
51 \begin{frame}[titleslide]
52 \titlepage
53 \end{frame}
54
55 \AtBeginSection{
56 \begin{frame}[sectionslide]{Overview}
57 \tableofcontents[currentsection]
58 \end{frame}
59 }
60 \AtBeginSubsection{
61 \begin{frame}[subsectionslide]{Overview}
62 \tableofcontents[currentsection,currentsubsection]
63 \end{frame}
64 }
65
66 \section{Introduction}
67 \subsection{Slide making}
68
69 \begin{frame}
70 {Good news}
71 {}
72 \voiceover {Slide making is fun}
73 You can keep on making your slides the way you are used to!
74 \begin{itemize}
75 \item all the nice \LaTeX{} stuff at your fingertips
76 \item no tempation to use too much unnecessary animation
77 \end{itemize}
78 \bigskip
79
80 Indeed, there are no tools that can typeset equations like the tools form the \TeX-ecosystem:
81 \begin{equation}
82 \eu^{-\ju\pi}+1=0
83 \end{equation}
84
85 \note[item]{Make joke about fingertips}
86 \note[item]{Don't speak about your personal temptations!}
87 \end{frame}
88
89 \begin{frame}[transition=concave,embed,autoslide=2000]
90 {Pr\^et-\`a-porter}
91 {A dummy slide}
92 \vfill
93 Showing off the 'concave' slide transition animation. Not recommended!
94 \vfill
95 \end{frame}
96
97 \begin{frame}[transition=convex]
98 {Très chique}
99 {A dummy slide}
100 \vfill
101 Showing off the 'convex' slide transition animation. Not recommended!
102 \vfill
103 \end{frame}
104
105 \subsection{Pimping your slides}
106
107 \begin{frame}
108 {And even more good news}
109 {\ldots almost seems to good to be true\ldots}
110 \small
111 However, now you can pimp your slides like never before. You can incorporate:
112 \begin{itemize}
113 \item videos and audio fragments
114 \item animated GIFs and LaTeX animations
115 \item iframe content
116 \end{itemize}
117 without being tied to Acrobat reader.
118 In addition, there are some extra features
119 \begin{itemize}
120 \item press '?' for keyboard help, amongst which you will find:
121 \item press 'm' to open the slide menu on the left
122 \item press 'o' to get an overview of the slides
123 \item press 's' to start a speaker view
124 \item press 'g' to go to a specific slide by typing its slide number
125 \end{itemize}
126 The pancake menu on the bottom left also opens the menu.
127 \end{frame}
128
129 \note{
130 Don't spend too much time on this slide
131 }
132
133
134 \begin{frame}[transition=zoom]
135 {A dymmy slide}
136 {number three}
137 \vfill
138 Showing off the 'zoom slide transition animation. Not recommended!
139 \vfill
140 \end{frame}
141
142 \section{In detail}
143
144 \subsection{Candy for the eye}
145
146 \begin{frame}
147 {Placing videos}
148 {}
149 \only<1>{On this first slide there is nothing to see. On the next animation frame, a video will appear.}
150 \only<2>{Here it is!}
151 \video<2>[above,draw,autoplay,height=0.7,aspectratio=16/9,
152 background=yellow,fit=contain]
153 (myvid) \at (0.5,0.1) {Media/beamer-reveal-testvideo.mp4}
154 \tikz[remember picture,overlay] \node<2>[anchor=north,font=\tiny] at (myvid.south)
155 {An example video (C) Walter Daems};
156 \end{frame}
157
158 \begin{frame}
159 {Placing images (possibly animated)}
160 {}
161 \begin{columns}
162 \column[T]{0.45\textwidth}
163 Below you will find a png (for which you don't need reveal, BTW).
164 \vspace*{1cm}
165
166 Of course, you can exploit the transparency of the background layer in the PNG!
167 \vspace*{2cm}
168
169 And on the top right you will find a swinging pendulum (an animated GIF).
170 \column[T]{0.45\textwidth}
171 % this is a image whose box consumes area on your slide
172 \image[width=0.33,aspectratio=1,fit=contain,draw] (myimage) {Media/beamer-reveal-AnimatedPendulum.gif}
173 \end{columns}
174 % this is an overlayed image (not consuming any space)
175 \image[width=0.25,aspectratio=1,fit=contain] \at (0.1,0.6) {Media/beamer-reveal-WiresTp.png}
176 \image[width=0.1,aspectratio=1,fit=contain] \at (0.9,0.1) {https://www.digmanwaves.net/About/Pictures/WalterDaems.jpg}
177 \end{frame}
178
179 \begin{frame}
180 {Placing iframe material (possibly animated)}
181 {e.g. generated with asymptote}
182
183 Click and drag on the iframe below. You can manipulate it! Use your mouse
184 scroll-wheel to zoom in or out.
185 \iframe[draw,anchor=north,height=0.6,aspectratio=16/9,embed,
186 fit=cover] \at (0.5,0.7) {Media/beamer-reveal-PCB.html}
187 \end{frame}
188
189 \note{
190 Don't mention the amount of hours that went into this iframe!
191 }
192
193 \subsection{Resonance for the ear}
194
195 \begin{frame}
196 {Adding audio to your slides}
197 {}
198 Below, there is an audio block
199 that automatically starts playing.\\
200 \audio[autoplay,controls,width=0.1,aspectratio=16/9,
201 background=blue,fit=cover] {Media/beamer-reveal-AudioSample.ogg}
202 \end{frame}
203
204 \subsection{Make (video) animations with LaTeX}
205
206 \newcommand\myanimation{%
207 \begin{tikzpicture}[font=\footnotesize,transform shape,scale=0.75]
208 \pgfmathsetmacro\angle{\progress*540}%
209 \clip (-2,-5.25) rectangle (8,2);
210 \node[below left,inner sep=1pt] at (0,0) {\tiny 0};
211 \node[below left,inner sep=1pt] at (2.5,0) {\tiny 0};
212 \node[above right,inner sep=1pt] at (0,-2) {\tiny 0};
213
214 \begin{scope}[every node/.style={right}]
215 \node[thick,draw,rectangle] at (2.5,-2)
216 {\large $x(t) = A \cdot \eu^{j\omega t}$};
217 \node at (3.5,-3)
218 {\large $\eu^{j\alpha} = \cos\alpha+j\sin\alpha$};
219 \node at (2.5,-4)
220 {\large $x(t) = \underbrace{A \cos \omega t}_{\text{\textcolor{orange}{real}}}
221 + \underbrace{j A \sin \omega t}_{\text{\textcolor{olive}{imaginary}}}$};
222 \end{scope}
223 \draw[->,thick] (3,-2.4) -- (3,-3.4);
224 \draw[blue,thick] (0,0) circle (1);
225
226 \draw[->] (-1.25,0) -- (1.25,0) node[below] {Re};
227 \draw[->] (0,-1.25) -- (0,1.25) node[left] {Im};
228
229 % circle
230 \draw[olive,very thick] (0,0) -- (0,{sin(\angle)});
231 \draw[orange,very thick] (0,0) -- ({cos(\angle)},0);
232 \draw[blue,thick,->] (0,0) -- node[left,font=\tiny] {A} +(\angle:1);
233 \draw[->] (0.4,0) arc (0:\angle:0.4);
234 \node at (0.5*\angle:0.7) {\scriptsize $\omega \tilde t$};
235
236 % right graph
237 \draw[very thick,olive] ({2.5+\angle/180},0) -- +(0,{sin(\angle)});
238 \draw[densely dotted] ({min(0,cos(\angle))},{sin(\angle)})
239 -- ({2.5+\angle/180},{sin(\angle)});
240 \draw[thick] ({2.5+\angle/180},0) +(0,1pt) -- +(0,-1pt) node[below] {$\tilde t$};
241
242 % bottom graph
243 \draw[very thick,orange] (0,{-2-\angle/180}) -- +({cos(\angle)},0);
244 \draw[densely dotted] ({cos(\angle)},{max(0,sin(\angle))})
245 -- ({cos(\angle)},{-2-\angle/180});
246 \draw[thick] (0,{-2-\angle/180}) +(1pt,0) -- +(-1pt,0) node[left] {$\tilde t$};
247
248 % right graph
249 \foreach \y/\l in {-1/-A,1/A} {
250 \draw[gray,densely dotted] (2.5,\y) -- (6.25,\y);
251 \draw (2.5,\y) +(+1pt,0) -- +(-1pt,0) node[left] {$\l$};
252 }
253 \draw[->] (2.0,0) -- (6.5,0) node[below] {$t$};
254 \draw[->] (2.5,-1.25) -- (2.5,1.25) node[left] {$Im(x(t))$};
255 \draw[olive,thick,domain=-0.25:3.5,samples=30,smooth] plot
256 ({\x+2.5},{sin(pi*\x r)});
257
258 % bottom graph
259 \foreach \y/\l in {-1/-A,1/A} {
260 \draw[gray,densely dotted] (\y,-2) -- (\y,-4.5);
261 \draw (2.5,\y) +(+1pt,0) -- +(-1pt,0) node[left] {$\l$};
262 }
263 \draw[->] (-1.25,-2) -- (1.25,-2) node[above] {$Re(x(t))$};
264 \draw[->] (0,-1.5) -- (0,-5) node[left] {$t$};
265
266 \draw[orange,thick,domain=-0.25:2.6,samples=30,smooth] plot
267 ({cos(pi*\x r)},{-2-\x});
268 \end{tikzpicture}%
269 }
270
271 \begin{frame}
272 {Making animations with LaTeX (using TikZ as example)}
273 {It is easier than ever before}
274 \small The animation content is exported to a standalone \LaTeX-document that creates a
275 loop over it, for a \texttt{duration} seconds at
276 \texttt{framerate} frames per second providing a \texttt{\textbackslash{}progress}
277 variable that goes gradually from 0 to 1 in \texttt{duration} $\times$
278 \texttt{framerate} frames. The beamer-reveal.pl script transforms it
279 to mp4 maximally exploiting your multi-core CPU.
280
281 \begin{center}
282 \animation<1|handout:1-3>[framerate=25,duration=7.5,autoplay,
283 progress={0.1|handout:1/0,2/0.2,3/0.5},expand once] {\myanimation}
284 \end{center}
285 \end{frame}
286
287 \begin{frame}
288 {Making animations with LaTeX (using TikZ as example)}
289 {Another slide with just a 'still' - but with some music!}
290 \small The animation content is exported to a standalone \LaTeX-document that creates a
291 loop over it, for a \texttt{duration} seconds at
292 \texttt{framerate} frames per second providing a \texttt{\textbackslash{}progress}
293 variable that goes gradually from 0 to 1 in \texttt{duration} $\times$
294 \texttt{framerate} frames. The beamer-reveal.pl script transforms it
295 to mp4 maximally exploiting your multi-core CPU.
296
297 \begin{center}
298 \still[progress=0.75,expand once] {\myanimation}
299 \end{center}
300 \audio[width=0.1,aspectratio=16/9,fit=cover,autoplay] \at (0,0)
301 {Media/beamer-reveal-AudioSample.ogg}
302 \end{frame}
303
304 \end{document}
305
306 \endinput
307 %%
308 %% End of file `beamer-reveal-example.tex'.