Debian Codegraph @

texmf-dist/source/latex/beamer-reveal/beamer-reveal.dtx

raw
1 %\iffalse meta-comment
2 %
3 % Copyright (C) Walter Daems <[email protected]>
4 %
5 % This work may be distributed and/or modified under the conditions of
6 % the LaTeX Project Public License, either version 1.3 of this license
7 % or (at your option) any later version. The latest version of this
8 % license is in:
9 %
10 % http://www.latex-project.org/lppl.txt
11 %
12 % and version 1.3 or later is part of all distributions of LaTeX
13 % version 2005/12/01 or later.
14 %
15 % This work has the LPPL maintenance status `maintained'.
16 %
17 % The Current Maintainer of this work is Walter Daems.
18 %
19 % \fi
20 %
21 % \iffalse
22 %
23 %<@@=beamerreveal>
24 %<*driver>
25 \NeedsTeXFormat{LaTeX2e}
26 \ProvidesFile{beamer-reveal.dtx}
27 [2026-04-08 v1.10 beamer-reveal]
28 %</driver>
29 %<*reveal>
30 \NeedsTeXFormat{LaTeX2e}
31 \ProvidesPackage{beamer-reveal}
32 [2026-04-08 v1.10 beamer-reveal]
33 \RequirePackage{expl3}
34 \RequirePackage{xparse}
35 \RequirePackage{tikz}
36 \usetikzlibrary{calc}
37 \RequirePackage{currfile}
38 %</reveal>
39 %<*driver>
40 \documentclass[a4paper,10pt]{ltxdoc}
41 \usepackage{geometry}
42 % In the preamble
43 \renewenvironment{macro}[1]{%
44 \par\addvspace{1.0\baselineskip}%
45 \begingroup
46 % Typeset the name as a paragraph heading
47 \hspace*{-0.75cm}
48 \begin{minipage}{\textwidth}
49 \rule{3cm}{1pt}\\
50 \hspace*{1ex}\texttt{\string#1}\\
51 \rule[0.25\baselineskip]{3cm}{1pt}
52 \end{minipage}
53 % Index it:
54 \SpecialMainIndex{#1}%
55 \endgroup
56 \ignorespaces
57 }{%
58 \par\addvspace{0.5\baselineskip}%
59 }
60 \usepackage{newpxtext,newpxmath}
61 \linespread{1.05}
62 \def\fileversion{v1.10}
63 \def\filedate{2026-04-08}
64 \usepackage{makeidx}
65 \usepackage{amsmath}
66 \usepackage{alltt}
67 \usepackage{booktabs}
68 \usepackage{metalogo}
69 \usepackage{enumitem}
70 \usepackage{rotating}
71 \usepackage{tikz}
72 \usetikzlibrary{arrows}
73 \tikzset{>=stealth'}
74 \IfFileExists{tocbibind.sty}{\usepackage{tocbibind}}{}
75 \IfFileExists{hyperref.sty}{
76 \usepackage[bookmarksopen]{hyperref}
77 \hypersetup{citecolor=blue,linkcolor=blue}
78 \hypersetup{hypertexnames=false}
79 }{}
80
81 \EnableCrossrefs
82 \CodelineIndex
83 \RecordChanges
84 \newlist{arguments}{description}{2}
85 \setlist[arguments]{leftmargin=3em,topsep=0pt,itemsep=0.5ex,parsep=0pt}
86 \newlist{options}{description}{2}
87 \setlist[options]{leftmargin=10em,style=nextline,topsep=0pt,itemsep=0.5ex,parsep=0pt}
88 \newcommand\beamerreveal{\textsc{beamer-reveal}}
89 \newcommand\beamer{\textsc{beamer}}
90 \newcommand\Beamer{\textsc{Beamer}}
91 \setlist[itemize]{itemsep=0.5ex,topsep=0pt,parsep=0pt}
92 \setlist[enumerate]{itemsep=0.5ex,topsep=0pt,parsep=0pt}
93 \begin{document}
94 \DocInput{beamer-reveal.dtx}
95 \end{document}
96 %</driver>
97 % \fi
98 %
99 % \changes{v0.80}{2025/12/21}{\@ alpha 1 embryonic demo version}
100 % \changes{v0.85}{2025/12/21}{\@ alpha 2 tested by Walter, functional
101 % on Linux}
102 % \changes{v0.90}{2025/12/24}{\@ beta 1 tested by Paul, not
103 % functional on MS-Windows}
104 % \changes{v0.95}{2025/12/17}{\@ beta 2 tested by Paul, functional on MS-Windows}
105 % \changes{v1.00}{2025/12/30}{\@ first appearance on CTAN}
106 % \changes{v1.01}{2026/01/02}{\@ bug fix release}
107 % \changes{v1.01}{2026/01/01}{\@- restored pdflatex compatibility (including macro-based accented characters)}
108 % \changes{v1.02}{2026/01/02}{\@ no changes - needed to correct faulty upload}
109 % \changes{v1.03}{2026/01/19}{\@ new feature release}
110 % \changes{v1.03}{2026/01/19}{\@- introduced new command-line options to accomodate users of latexmk}
111 % \changes{v1.04}{2026/01/22}{\@ bug fix release}
112 % \changes{v1.04}{2026/01/22}{\@- assigned mssing node name to rectangle boundingbox of video/animation/image/audio such that positioning relative to the bounding box (via its anchors) is possible}
113 % \changes{v1.05}{2026/01/23}{\@ new feature release}
114 % \changes{v1.05}{2026/01/23}{\@- implemented both overlay-mode and insert-mode media types}
115 % \changes{v1.05}{2026/01/23}{\@- breaking syntax change: 'at' must be replaced by '\textbackslash at')}
116 % \changes{v1.05}{2026/01/23}{\@- removed x-y distortion from animations}
117 % \changes{v1.06}{2026/01/25}{\@ new feature release}
118 % \changes{v1.06}{2026/01/25}{\@- regular bugfixes}
119 % \changes{v1.06}{2026/01/25}{\@- renamed extractloleft and extractupright to avoid nameclashes}
120 % \changes{v1.06}{2026/01/25}{\@- reverted to short versions of frametitle for menu entries}
121 % \changes{v1.06}{2026/01/25}{\@- improved animation generation space trimming and error logging}
122 % \changes{v1.06}{2026/01/27}{\@- implemented embedding of media files}
123 % \changes{v1.07}{2026/01/30}{\@ new feature release}
124 % \changes{v1.07}{2026/01/29}{\@- allow for multiple handout slides per animation}
125 % \changes{v1.07}{2026/01/29}{\@- enabled (full graphical) speaker notes}
126 % \changes{v1.08}{2026/02/04}{\@ mixed release}
127 % \changes{v1.08}{2026/02/01}{\@- implemented stills as a complementing feature to animations}
128 % \changes{v1.08}{2026/02/01}{\@- added pause key 'v' for video player
129 % and 'a' for audio player, 'i' to initialize/reset all videos/audios}
130 % \changes{v1.08}{2026/02/04}{\@- implemented autoslide mode, together
131 % with loop mode, that allows for kiosk presentations}
132 % \changes{v1.08}{2026/02/04}{\@- fixed notes being not only notes bug}
133 % \changes{v1.08}{2026/02/04}{\@- extended embedding mode to also work for slide backgrounds and notes (not yet for animations and stills)}
134 % \changes{v1.09}{2026/02/08}{\@ mixed release}
135 % \changes{v1.09}{2026/02/05}{\@- fixed problem of presentations without autoslide}
136 % \changes{v1.09}{2026/02/05}{\@- scrutinized invalid option detection for media elements}
137 % \changes{v1.09}{2026/02/06}{\@- added \texttt{-}\texttt{-}\texttt{debug} option to perl script}
138 % \changes{v1.09}{2026/02/06}{\@- removed requirement for stills to have a handout spec}
139 % \changes{v1.09}{2026/02/06}{\@- fixed handout generation for fixed (size) content (animations and stills)}
140 % \changes{v1.09}{2026/02/07}{\@- completed embedding mode, now everything except the quarto/reveal.js boilerplate can be embedded}
141 % \changes{v1.09}{2026/02/08}{\@- solved problem with non-uniqueness of reused animations and stills}
142 % \changes{v1.09}{2026/02/08}{\@- simplified \texttt{progress} key for animations/stills}
143 % \changes{v1.10}{2026/02/10}{\@ new feature release}
144 % \changes{v1.10}{2026/02/10}{\@- URL-style images/videos/audios/iframes now also work}
145 % \changes{v1.10}{2026/04/07}{\@- Slides containing animations or
146 % audio are visibly marked (bottom right)}
147 % \changes{v1.10}{2026/04/08}{\@- Autoplay voiceover using various tts services supported}
148 %
149 % \DoNotIndex{\group,\_,\AddToHook,\bool,\box,\c,\cs,\dim,\ExplSyntaxOn,\ExplSyntaxOff,\ProcessKeyOptions,\beamer@frametitle,\insertpagenumber,\insertframenumber,\insertoverlaynumber,\inserttitle,\int,\iow,\keys,\message,\msg,\newdimen,\only,\pageheight,\pagewidth,\path,\pgfmathsetmacro,\secname,\subsecname,\textcolor,\sys,\RequirePackage,\fp,\tl,\AtEndDocument,\newcommand,\newenvironment,\begin,\bfseries,\draw,\clip,\else,\fi,\if,\fill,\filldraw,\ifthenelse,\ifx,\textwidth,\node,\\,\@empty,\@tempdima,\@tempdimb,\@tempswatrue,\{,\},\ ,\bf,\BODY,\break,\Alph,\and,\define@key,\color,\dx,\dy,\g,\gdef,\hbox,\tiny,\scriptsize,\footnotesize,\small,\normalsize,\large,\Large,\LARGE,\huge,\Huge,\l,\LaTeX,\let,\p@,\relax,\renewcommand,\Requirepackage,\textbf,\textsf,\texttt,\textbackslash,\vspace,\hspace,\hfill,\hskip,\vskip,\hline,\vrule,\typeout,\usebox,\end,\paperheight,\paperwidth,\par,\NewDocumentCommand,\seq,\unexpanded,\p,\y,\x,\@ifundefined,\expandafter,\IfBooleanTF,\IfNoValueTF,\posx,\posy,\jobname,\pgfgetlastxy,\pgfextra,\pdfpageheight,\pdfpagewidth,\str,\use,\|,\currfilename,\regex,\AtBeginDocument}
150 % \setlength{\parindent}{0em}
151 % \addtolength{\parskip}{0.5\baselineskip}
152 %
153 % \title{\beamerreveal}
154 % \author{Walter Daems (|[email protected]|)}
155 % \date{Release \filedate{} --- \fileversion{}}
156 % \newgeometry{left=3cm,right=2cm,top=2cm,bottom=2.5cm}
157 % \maketitle
158 %
159 % \section{Introduction}
160 %
161 % \Beamer{} \cite{beamer} is a very powerful and convenient document class to create
162 % presentations and slides.
163 % However, integrating multimedia in it, is still a bit of a faff.
164 % On one side you have the integrated |multimedia| facility of \beamer{} \cite{beamer}
165 % and on the other side the |movie15| \cite{movie15} and |media9|
166 % \cite{media9} packages. But unless you use the stock acrobat reader on
167 % Microsoft Windows, these things barely work, if at all.
168 %
169 % Next to this \LaTeX{} ecosystem for slides, you have the |reveal.js| framework \cite{reveal}, that allows easy
170 % integration of multimedia content. Why not combine both worlds? With that I mean:
171 % \begin{itemize}
172 % \item make your slides in \beamer{}, using all the nice packages that
173 % come with \LaTeX{},
174 % \item include any browser-compatible multimedia content you'd like,
175 % even generate some \LaTeX{} animations,
176 % \item convert that presentation to the reveal.js framework.
177 % \end{itemize}
178 % That's exactly what this package does.
179 %
180 % Note that you are an \emph{early adopter} when using this package. Expect frequent changes.
181 %
182 % \section{Rationale}
183 %
184 % Let's talk about the elephant in the room: why not work in the |reveal.js|
185 % framework directly, e.g. using Quarto \cite{quarto}? I see two reasons:
186 % \begin{itemize}
187 % \item It avoids a new learning curve, allowing you to continue to
188 % build on your \LaTeX{} and \beamer{} expertise.
189 % \item It avoids that you have to convert your thousands of slides
190 % into a new format.
191 % \end{itemize}
192 % For me, those are all the reasons I need.
193 %
194 % \section{Synopsis}
195 %
196 % Figure~\ref{fig:flow} shows the overall flow. You start by making
197 % slides (frames) the usual way using the |beamer| class. Your
198 % source file (|slides.tex|) uses the package |beamer-reveal.sty| and references the
199 % multimedia files of your choice. These multimedia files
200 % (e.g. videos) can be super-imposed on any slide you like.
201 % Your favorite \LaTeX-compiler typesets your slides to PDF and
202 % produces an auxiliary |.rvl|-file containing extra information for
203 % the conversion script.
204 % The conversion script |beamer-reveal.pl| fuses the PDF and the
205 % auxiliary file into a reveal.js presentation, using the templates
206 % provided by the \beamerreveal{} package. In fact, this is done
207 % by converting your slides to |JPG| format and using them as the
208 % background on the \textsc{reveal}-slides. The multimedia content
209 % appears as HTML5 elements on that background.\\
210 % Notes are also converted to |JPG| format and available in the speaker
211 % view that is based on notes plugin of |reveal.js|.\\
212 % You then can use your favorite browser as your viewer instead of the
213 % good old PDF reader.
214 % \begin{figure}
215 % \centering
216 % \begin{tikzpicture}
217 % [scale=0.7,transform shape,
218 % doc/.style={rectangle,fill=black!10,align=center,minimum
219 % width=2cm,minimum height=2cm},
220 % tool/.style={rectangle,draw,align=center}]
221 % \draw (8.5,3.5) rectangle (12.5,5);
222 % \draw[dotted,->] (9,4.5) -- (10,4.5) node[right] {``references''};
223 % \draw[->] (9,4) -- (10,4) node[right] {data flow};
224 % \node [doc] (slides) at (-3,0) {|slides.tex|\\\footnotesize(source file)};
225 % \node [tool] (latex) at (0,0) {\LaTeX{}\\\footnotesize(compiler)};
226 % \node [doc] (class) at (0,3) {|beamer.cls|\\\footnotesize(class)};
227 % \node [doc] (package) at (0,-4) {|beamer-|\\|reveal.sty|\\\footnotesize(package)};
228 % \node [doc] (pdf) at (4,1.25) {|slides.pdf|\\\footnotesize(PDF-file)};
229 % \node [doc] (rvl) at (4,-1.25) {|slides.rvl|\\\footnotesize(reveal-file)};
230 % \node [tool] (script) at (8,0) {|beamer-reveal.pl|\\\footnotesize(script)};
231 % \node [doc] (reveal) at (12,0) {|slides.html|\\\footnotesize(reveal.js website)};
232 % \node [doc] (template) at (8,-4) {beamer-reveal-\\templates};
233 % \node [doc] (mm) at (6,4) {Multimedia\\files};
234 % \draw[->] (slides) -- (latex);
235 % \draw[->,dotted] (slides) -- (class);
236 % \draw[->,dotted] (slides) -- (package);
237 % \draw[->,dotted] (slides) -- (mm);
238 % \draw[->,dotted] (reveal) -- (mm);
239 % \draw[->,dotted] (pdf) -- (mm);
240 % \draw[->,dotted] (rvl.north east) -- (mm);
241 % \draw[->] (class) -- (latex);
242 % \draw[->] (package) -- (latex);
243 % \draw[->] (latex) edge[out=0,in=180] (pdf);
244 % \draw[->] (latex) edge[out=0,in=180] (rvl);
245 % \draw[->] (pdf) edge[out=0,in=180] (script);
246 % \draw[->] (rvl) edge[out=0,in=180] (script);
247 % \draw[->] (template) -- (script);
248 % \draw[->] (script) -- (reveal);
249 % \draw[thick,dashdotted] (-2,-5.5) coordinate(bl) -- (10,-5.5) -- (10,1) -- (6,1) --
250 % (6,-2.5) -- (-2,-2.5) -- cycle;
251 % \node[anchor=north west] at (bl) {The \beamerreveal{} package};
252 % \end{tikzpicture}
253 % \caption{Workflow imposed by the \beamerreveal{} package}
254 % \label{fig:flow}
255 % \end{figure}
256 %
257 % As a nice bonus, the \beamerreveal{} package allows you to generate
258 % \LaTeX{} animations. It's not on the level of Manim \cite{manim}, but for shorter animations
259 % inlined in your deck of slides it is more than functional!
260 %
261 % Finally, you can also include material in iframes. Iframes are HTML
262 % constructs that act as a mini-browser, allowing to incorporate multiple multimedia
263 % blocks in HTML.
264 % As an example, this allows incorporating asymptote material that has
265 % been generated for displaying as HTML using webGL.
266 % Note that in many cases, your browser will prohibit these iframes to load external
267 % web content. To solve this, you can run a local webserver and access your presentation
268 % through it, or you can embed the iframe in the main HTML file.
269 % This is explained in Section~\ref{sec:usingscript}.
270 %
271 % \section{Quirks}
272 % Combining \beamer{} and \textsc{reveal} posed one major challenge:
273 % how to make sure that the HTML5 elements appear exactly where you want
274 % them to be, i.e. perfectly aligned with your \LaTeX{} content as it
275 % has been converted to PDF. The core of the problem is twofold:
276 % \begin{itemize}
277 % \item In \beamer{} the aspectratio of the slides is
278 % determined by the class option |aspectratio|. Your PDF viewer uses
279 % letterboxing (black bars on the side) if the aspectratio of your
280 % presentation does not correspond to the aspectratio of your screen.
281 % To the other hand, \textsc{reveal} puts your slides fullscreen
282 % without letterboxing, and therefore the aspectratio is determined by
283 % the screen resolution.
284 %
285 % \item Given the vector-nature of \LaTeX{} and PDF, resolution is not
286 % a parameter you normally care about (everything is vector graphics anyway),
287 % while given the pixel-based nature of traditional multimedia files,
288 % resolution is an issue that you need to think about carefully.
289 % \end{itemize}
290 %
291 % There is only one good solution: ask the users to (1) set the correct
292 % aspectratio using the beamer class options and (2)
293 % specify the width or height of their displaying screen using a
294 % \textsc{beamer-reveal} class option.
295 %
296 % The latter ensures that (a) the background content and the multimedia
297 % files that are generated based on the \LaTeX{} source, are generated
298 % with sufficient resolution, and that (b) the file sizes stay within acceptable limits.
299 %
300 % Actually, there is a one more problem, and that is that the canvas
301 % size and aspectratio of the display area in your browser is
302 % dependent on whether you are viewing full screen or not.
303 % Therefore, an extra requirement arises: (3) when presenting a slide-deck
304 % only you must use your browser in full-screen mode. Otherwise, the alignment is off.
305 %
306 % In order not to have to care about resolutions or the actual
307 % |\pagewidth| or |\pageheight| of your presentation, I've chosen to
308 % impose another constraint: (4) if you want to add multimedia material in overlay mode,
309 % the user must specify locations on
310 % the screen (where to put the multimedia content) as relative
311 % fractions $(x,y)$ where $(0,0)$ corresponds to the bottom left of
312 % the screen and $(1,1)$ corresponds to the top right of the screen.
313 %
314 % \begin{center}
315 % \begin{tikzpicture}[scale=0.3,font=\footnotesize]
316 % \draw[thick] (0,0) rectangle (16,9);
317 % \draw[->] (2,2) node[above right] {coordinate $(0,0)$} -- (0,0);
318 % \draw[->] (14,7) node[below left] {coordinate $(1,1)$} -- (16,9);
319 % \draw[ultra thin] (16.1,9) -- (17,9);
320 % \draw[ultra thin] (16.1,0) -- (17,0);
321 % \draw[<->] (16.8,9) -- node[right] {|\textbackslash{}pageheight|} (16.8,0);
322 % \draw[ultra thin] (0,-0.1) -- (0,-1);
323 % \draw[ultra thin] (16,-0.1) -- (16,-1);
324 % \draw[<->] (0,-0.8) -- node[below] {|\textbackslash{}pagewidth|} (16,-0.8);
325 % \end{tikzpicture}
326 % \end{center}
327 %
328 % However, if you have to specify width and heights of the multimedia
329 % boxes that you want to overlay on your slides, you don't want to
330 % specify width and height as relative numbers (of the slide width and
331 % height). In that scenario, displaying a 16:9 video on a 16:10 slide
332 % with a width equal to a quarter of the slide width, would require
333 % you to specify: |width=0.25,height=0.225|, which is weird. In
334 % addition, if you'd have to present at a venue where the
335 % projector has a different aspectratio from the one you anticipated,
336 % you would be forced to recalculate all the widths and heights of every
337 % video or image. You
338 % don't want that. Presenting on itself already brings sufficient stress without that
339 % extra worry.\\
340 % Therefore, I imposed a fifth constraint: (5) the user must always specify either width or
341 % height of the box (as a fraction of the respective slide width or
342 % height) together with the aspectratio. Given width and aspectratio
343 % the \textsc{beamer-reveal} package can correctly determine its
344 % relative height; likewise height and aspectratio can be converted
345 % to the correct relative width. Therefore, it is illegal to specify
346 % both width and height at the same time. As the package knows the aspectratio
347 % of the screen (set correctly by the user) no recalculations need to
348 % be done. In the example above, that would mean specifying:
349 % |width=0.25,aspectratio=16/9|, which is very logical.
350 %
351 % When confronted with the situation where you need to present on an old
352 % |4:3| projector, instead of the |16:10| you are used to, this allows you
353 % to just change the beamer aspectratio to |43|, recompile, rerun
354 % |beamer-reveal.pl| and you are good to go on stage.
355 %
356 % So summarized, these are the five rules to go by:
357 % \begin{enumerate}
358 % \item Set the correct aspectratio as a beamer class option.
359 % \item Specify the X or Y-resolution of your displaying screen as a
360 % package option to the \textsc{beamer-reveal} package.
361 % \item Always put your browser in full-screen-mode when presenting.
362 % \item Specify positions relative to the slide width and height,
363 % $(0,0)$ being bottom left and $(1,1)$ being top right.
364 % \item Specify box sizes of the HTML5 content always as the width or
365 % length in combination with the aspectratio.
366 % \end{enumerate}
367 %
368 % One final remark: you can put multimedia boxes on your slides in two modes:
369 % \begin{description}[leftmargin=7em,style=nextline,topsep=0pt,itemsep=0.5ex,parsep=0pt]
370 % \item[overlay mode] in this mode the box is put on your slide like tikz puts an image
371 % in overlay mode on a document: it does not consume any space on the slide;
372 % \item[insert mode] in this mode the box is actually typeset by \LaTeX{} on your slide.
373 % The actual content (video, image, \ldots) will not be there, but the space will be consumed.
374 % \end{description}
375 % Note that for both modes --- to work properly --- your compiler must
376 % be run twice before running |beamer-reveal.pl|.
377 %
378 % \section{Portability}
379 % These class files should be ready to use with all common modern \LaTeX{}
380 % compilers that produce PDF (pdf\LaTeX{}, \XeLaTeX{}, \LuaLaTeX{}, \ldots)
381 % from the major \TeX{}-distributions (TeTeX, TexLive, MikTeX).
382 % If you experience problems with one of these, please inform the author.
383 %
384 % The script |beamer-reveal.pl| is a Perl script, that works on all
385 % major platforms (UNIX, Linux, BSD, Debian, MS-Windows, MAC-OS,
386 % \ldots).
387 % It makes use of the Poppler library and its |pdftoppm| tool, which
388 % is also available for those platforms.
389 % In case you want to use \LaTeX{} animations, it also uses your very own
390 % favorite \LaTeX{}-compiler, |pdfcrop|
391 % (which is part of the major TeX-distributions) and |ffmpeg| a
392 % well-known video conversion tool.
393 %
394 % If these tools are available on your platform, then all should be well.
395 %
396 % \section{Installing the \texttt{beamer-reveal.pl} script}
397 % \subsection{On Linux-like operating systems}
398 % Open a terminal with a shell. Below '|$|' represents your shell prompt.
399 % If needed, update your package list first. Then install the required tools:
400 % \begin{itemize}
401 % \item on a Debian-like OS:\\
402 % |$ sudo apt install -y perl cpanminus poppler-utils \|\\
403 % | texlive-extra-utils ffmpeg|
404 % \item on a Redhat-like OS:\\
405 % |$ sudo dnf install -y epel-release|\\
406 % |$ sudo dnf install -y \|\\
407 % | https://download1.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm|\\
408 % |$ sudo dnf install -y perl perl-App-cpanminus poppler-utils \|\\
409 % | texlive-pdfcrop ffmpeg|
410 % \item on openSUSE:\\
411 % |$ sudo zypper install -y perl perl-App-cpanminus \|\\
412 % | poppler-tools texlive-pdfcrop ffmpeg|
413 % \item on an Arch-like OS:\\
414 % |$ sudo pacman -Syu --needed perl cpanminus poppler \|\\
415 % | texlive-binextra ffmpeg|
416 % \item on Alpine:\\
417 % |$ sudo apk add perl cpan-app-cpanminus poppler-utils \|\\
418 % | texlive-extra-utils ffmpeg|
419 % \item on macOS:\\
420 % |$ brew install perl cpanminus poppler texlive ffmpeg|
421 % \end{itemize}
422 %
423 % \subsection{On MS windows operating systems}
424 % Open a powershell. Below '|$|' represents the powershell prompt.
425 % Install the required tools as follows:
426 %
427 % \begin{minipage}{\textwidth}
428 % |$ winget install StrawberryPerl.StrawberryPerl|\\
429 % |$ winget install -e --id oschwartz10612.Poppler|\\
430 % |$ winget install MiKTeX.MiKTeX|\\
431 % |$ winget install Gyan.FFmpeg|\\
432 % |$ winget install --id Python.Python.3 --source winget|
433 % \end{minipage}
434 %
435 % You probably need to answer 'Yes' quite some times. If you're asked to restart,
436 % you only need that before moving over to section~\ref{sec:checking} 'Checking your setup'.
437 % You probably already have MiKTeX installed. In that case you can skip
438 % that. However, make sure the 'pdfcrop' program (part of MiKTeX) is installed and available
439 % on your path.
440 %
441 % \subsection{Install \beamerreveal{}}
442 % Open a shell on Linux/macOS, or a powershell prompt on MS-Windows.
443 % Run the following command at the prompt:
444 %
445 % |$ cpanm BeamerReveal|
446 %
447 % This will take a while as this needs to install a number of extra Perl
448 % libraries that have been used in \beamerreveal. You can use the same command to update
449 % the script if a new release has been made.
450 %
451 % The number of the Perl package is: |20260408.1240|
452 %
453 % You will see that number appear during the installation.
454 % Any version more recent version number than this one will work. New
455 % releases will fix bugs that are reported.
456 % If there is a breaking change in the Perl package, a new CTAN update will be released as well.
457 %
458 % \subsection{Checking your setup}
459 % \label{sec:checking}
460 % Open a shell on Linux/macOS, or a command line or powershell prompt on MS-Windows.
461 % Then see whether you can invoke the help information for the tools.
462 %
463 % \begin{minipage}{\textwidth}
464 % |$ cpanm -h|\\
465 % |$ pdftoppm -h|\\
466 % |$ pdfcrop --help|\\
467 % |$ ffmpeg -h|\\
468 % \end{minipage}
469 %
470 % To test \beamerreveal{} on MS-Windows, run:\\
471 % |$ beamer-reveal -h|
472 %
473 % On any other platform, run:\\
474 % |$ beamer-reveal.pl -h|
475 %
476 % If they all display correct help info, you're good to go.
477 %
478 % \section{Using the \texttt{beamer-reveal.pl} script}
479 % \label{sec:usingscript}
480 % If you prepared your \beamer{}-presentation according to Section~\ref{sec:usage},
481 % then converting it into a reveal.js HTML presentation, is as simple as
482 % running the following command. Make sure the current directory of
483 % the shell is the directory your \LaTeX{}-source file and your
484 % compiled PDF-file is in.
485 % For all commands below, stay in that same working directory!
486 %
487 % \begin{minipage}{\textwidth}
488 % If you document is called |jobname.tex|, then just run:\\
489 % |$ lualatex jobname.tex|\\
490 % |$ lualatex jobname.tex|
491 % \end{minipage}
492 %
493 % On MS-Windows, run:\\
494 % |$ beamer-reveal jobname|
495 %
496 % On any other platform, run:\\
497 % |$ beamer-reveal.pl jobname|
498 %
499 % Conversion is very fast. Of course, if you need to render some \LaTeX{}
500 % animations, it may take a little more than a jiffy. Especially if
501 % you are working on MS-Windows, because there the generation is fully
502 % single-threaded.
503 %
504 % Some side notes:
505 % \begin{itemize}
506 % \item you need to run |beamer-reveal.pl| from the same working directory as your
507 % \LaTeX{}-compiler; the script needs to be able to access your source files from
508 % the same viewpoint as your compiler.
509 % \item |beamer-reveal.pl| also has some convenient command-line options
510 % to set the |aux| directory (that contains your |.rvl| file), the |pdf| directory
511 % that is the output directory of your \LaTeX{}-run and the |output| directory
512 % (in which it will place the resulting reveal site). This allows easy integration
513 % with some build frameworks such as |latexmk|. Checkout the help message to learn
514 % about it.\\
515 % |$ beamer-reveal.pl -h|
516 % \end{itemize}
517 %
518 % Next, you can load your document in your browser, e.g.:
519 %
520 % |$ firefox jobname.html|
521 %
522 % If your presentation contains iframe content, you need to start a
523 % local webserver. You don't need a network connection for that. This
524 % is how:
525 %
526 % |$ python -m http.server|
527 %
528 % Then, you can access it through: \url{http://localhost:8000}.
529 %
530 % As of v1.06 there is an alternative, and that is to make the iframe element
531 % 'embedded'. This will cause the iframe content to live as Base64-encoded ASCII
532 % string in the main |\jobname.html| file. Therefore it will be trusted by your
533 % browser and will load without any complaint.
534 %
535 % \section{Demo}
536 % If you want to see and try out the result of the example that is
537 % part of this documentation, check:
538 % \begin{itemize}
539 % \item a 16-by-9 version on: \url{https://www.digmanwaves.net/beamer-reveal/169}
540 % \item a 16-by-10 version on:
541 % \url{https://www.digmanwaves.net/beamer-reveal/1610}
542 % \end{itemize}
543 %
544 % \section{Open issues}
545 % Below, you'll find a list of open issues. I appreciate any input I
546 % can get on these matters.
547 % \begin{itemize}
548 % \item Regarding browsers, I'm a big fan of Firefox. However, I must admit
549 % that the Chrome/chromium line does a better job regarding smooth slide
550 % transitions. I can't seem to get preloading to work in Firefox
551 % browser, while in Chrome/chromium, it just works out of the box.
552 % \item I did not yet see any solutions to perform robust letterboxing on a
553 % browser (i.e. putting black stripes on the top and bottom if you are
554 % displaying a 16:9 presentation on a 16:10 screen). With robust, I
555 % mean a solution in which you don't have to change the content of
556 % your presentation html-file.
557 % \end{itemize}
558 %
559 % \section{Reach out}
560 % Is there any feature you are missing? Some problems you encounter?
561 % Some inconsistencies in the interface or the documentation? Some
562 % additional features that Reveal supports, but are not in
563 % \beamerreveal? Let me know by dropping me an e-mail.
564 %
565 % If you think \beamerreveal{} makes no sense, let me know why you think
566 % so. I'm keen to learn.
567 %
568 % On the other hand, if you like \beamerreveal{} and are using it, just
569 % send me a kind word. It keeps me going way better than wine or pizza.
570 %
571 % \section{Thanks}
572 %
573 % Thanks to Paul Levrie for proofreading this documentation and testing the package.
574 %
575 %
576 % \newpage
577 % \newgeometry{left=4cm,right=2cm,top=2cm,bottom=2.5cm}%
578 % \section{Usage}
579 % \label{sec:usage}
580 %
581 % \subsection{Package options}
582 % \subsubsection{Regarding dimensions}
583 % The following package options are available:
584 % \begin{options}
585 % \item[|width|] the width (in pixels) of the screen you will display
586 % the presentation on
587 % \item[|height|] the height (in pixels) of the screen you will
588 % display the presentation on
589 % \end{options}
590 % Only specify one of the two options. The other dimension will be
591 % deduced from the |aspectratio| option that passed onto the beamer
592 % class.\\
593 % Higher values will give higher resolution of the slides (in the
594 % background), but also larger file sizes. A safety factor is already
595 % used when converting the slides to jpg-format, so taking the true
596 % height or width is recommended. Only when you are bothered with
597 % jpg-artifacts in the final result, you should consider increasing
598 % the width- or height-value.
599 %
600 % \subsubsection{Reveal specific stuff}
601 % The following options are opening up some cool stuff that reveal enables:
602 % \begin{options}
603 % \item[|embed|] this causes all graphical material in your slides
604 % (|.jpg|, |.png|, |.mp4|, |.ogg|, |.wav|, \ldots) including the slide
605 % backgrounds and the notes slides to be embedded as Base64-encoded
606 % ASCII string into the HTML. Note however that this still is not the
607 % case for animations, stills and the |reveal.js| boilerplate
608 % javascripts.
609 % \item[|autoslide=<int>|] This causes your presentation to
610 % progress automatically, going from slides to slide every
611 % |<int>| milliseconds. You can override this value on an
612 % individual basis per slide, by providing the same option to the
613 % beamer |frame| environment.
614 % \item[|loop|] This causes your presentation to loop; this makes
615 % sense if you \emph{autoslide} it, enabling to run your presentation
616 % in \emph{kiosk} mode.
617 % \end{options}
618 %
619 % \subsection{An enhanced frame environment}
620 %
621 % \DescribeEnv{frame}
622 % The frame environment is defined by \beamer{}. However, it is
623 % equipped with four new environment options by the \beamerreveal{} package:
624 % \begin{options}
625 % \item[|titleslide|] specifies that this slide is a title slide. It
626 % will be on the top level of the reveal menu. This menu can be
627 % invoked by pressing 'm' in your presentation (or clicking on the
628 % pan-cake icon on the bottom left of your presentation).
629 % \item[|sectionslide|] specifies that this slide is a section slide.
630 % It will be on the second level of the reveal menu.
631 % \item[|subsectionslide|] specifies that this slide is a subsection
632 % slide. It will be on the third level of the reveal menu.
633 % \item[|transition|] one of |none| (default), |fade|, |zoom|, |concave| or
634 % |convex|; these correspond to the available reveal.js transitions.
635 % Not recommended for use. Why? Animation without purpose is bad
636 % practice.
637 % \item[|embed|] This will cause the slide background, the notes and
638 % all media elements on your slide to be embedded as a Base64-encode
639 % ASCII string in your HTML file.
640 % \item[|autoslide=<int>|] This will set the individual time for
641 % this slide to |<int>| milliseconds. This option only takes effect
642 % if you set the package option |autoslide| as well. If you set the
643 % value to 0, the presentation wil stop the autoslide mode at that
644 % slide. If your slide contains a video or audio fragment, or an
645 % animation that plays for a specific aumount of time, then this time
646 % will override the value you specify here. The slide show will only
647 % progress as soon as the animation or video/audio has finished!
648 % \end{options}
649 %
650 % Slides that are not titleslides, sectionslides or subsectionslides
651 % are ordinary slides. They will appear on the lowest level in the
652 % reveal menu.
653 %
654 % \subsection{The macros to use inside the frame environment}
655 % To understand the operation of the macros, it is important to
656 % realize that the slide content of your beamer-generated PDF will be
657 % put as a background image onto the reveal.js slides.
658 % The extra material such as videos, images and audio will be put as
659 % an overlay on top of that background. The macros allow you to define
660 % what material to put in overlay and where and how big it
661 % should appear.
662 % All macros take options. Some of the options need a value, some not.
663 % Options that take no value are marked with a dagger-symbol in
664 % superscript ($\dagger$).
665 %
666 % \DescribeMacro{\video}
667 % This macro will create a video box on the current slide.
668 % Of course a video box can cover the entire slide if desired.
669 %
670 % Its syntax is:
671 % \begin{itemize}
672 % \item overlay mode:\\
673 % \hspace*{2ex}|\video<overlay-spec>[options] (nodename) \at (x,y) { filename }|
674 % \item insert mode:\\
675 % \hspace*{2ex}|\video<overlay-spec>[options] (nodename) { filename }|
676 % \end{itemize}
677 %%
678 % The arguments are:
679 % \begin{arguments}
680 % \item[|overlay-spec|] a standard beamer overlay specification that
681 % allows you to determine on which overlays the video is to appear;
682 % this argument will end up in a traditional |\only<>{}| clause that
683 % beamer provides.
684 % \item[|options|] the following keys are available. In general they
685 % require a value: |key=value|.
686 % \paragraph{Size options:}\mbox{}\\*[-2ex]
687 % \begin{options}
688 % \item[|width|] the width of the video box (a fraction relative to
689 % the width of the slide)
690 % \item[|height|] the height of the video box (a fraction relative
691 % to the height of the slide)
692 % \item[|aspectratio|] the aspectratio of the video box
693 % \end{options}
694 % Remember that you never specify both |width| and |height|, only one of
695 % those two in combination with the |aspectratio|.
696 % \paragraph{Placement options:}\mbox{}\\*[-2ex]
697 % \begin{options}
698 % \item[|anchor|] value is one of |center|, |north|, |west|, |south|, |east|,
699 % |north east|, |north west|, |south east|, |south west|; this
700 % specifies where the anchor of the video is positioned; the anchor
701 % will be positioned at |(x,y)|
702 % \item[|above|$^\dagger$] synonym to |anchor=south|
703 % \item[|below|$^\dagger$] synonym to |anchor=north|
704 % \item[|left|$^\dagger$] synonym to |anchor=east|
705 % \item[|right|$^\dagger$] synonym to |anchor=west|
706 % \item[|above left|$^\dagger$] synonym to |anchor=south east|
707 % \item[|above right|$^\dagger$] synonym to |anchor=south west|
708 % \item[|below left|$^\dagger$] synonym to |anchor=north east|
709 % \item[|below right|$^\dagger$] synonym to |anchor=north west|
710 % \end{options}
711 % \paragraph{Appearance and sound options:}\mbox{}\\*[-2ex]
712 % \begin{options}
713 % \item[|fit|] the way the video should occupy the box: |fill|,
714 % |cover| or |fit|
715 % \item[|background|] the color of the background of the box
716 % \item[|draw|$^\dagger$] generates an outline around the box that allows you
717 % to inspect where the video will end up in your PDF-file
718 % \item[|autoplay|$^\dagger$] causes the video to start playing a soon as it
719 % appears on the slide
720 % \item[|controls|$^\dagger$] causes player controls to appear below your video
721 % \item[|loop|$^\dagger$] causes the video to run in loop mode
722 % \item[|muted|$^\dagger$] silences the audio of the player
723 % \end{options}
724 % \paragraph{Various options (only one for now):}\mbox{}\\*[-2ex]
725 % \begin{options}
726 % \item[|embed|$^\dagger$] causes the content of the video-file to be embedded
727 % as a Base64-encoded ASCII string in the main html file the script produces.
728 % I don't recommend this for video files.
729 % \end{options}
730 % \item[|nodename|] (optional) name to assign to the rectangular node corresponding to the bounding box of the video, such that you can later refer to that node
731 % (and its derived anchors (e.g. as '|(nodename.south)|') to position other material.
732 % \item[|x|, |y|] the $x$- and $y$-coordinate of the box, specified as a
733 % fraction of the slide width and slide height (dimensionless), fixing
734 % the anchor of the box, w.r.t. the bottom left of your slide.
735 % \item[|filename|] a filename that leads to the video file
736 % (e.g. an mp4 file). Any file playable by your browser will work. If
737 % the filename starts with |http://| or |https://|, it will be
738 % considerend to be a URL and your presentation will link to it.
739 % \end{arguments}
740 %
741 % Note that you can pause and (re)start your video by pressing 'v' when presenting
742 % your slide deck.
743 %
744 % \DescribeMacro{\audio}
745 % This macro will create an audio block on the current slide. This
746 % block is rather an abstract concept, unless you activate the
747 % controls of the player. Indeed, the audio block will be invisible
748 % unless you specify the option to display the controls of the player.
749 %
750 % Its syntax is:
751 % \begin{itemize}
752 % \item overlay mode:\\
753 % \hspace*{2ex}|\audio<overlay-spec>[options] (nodename) \at (x,y) { filename }|
754 % \item insert mode:\\
755 % \hspace*{2ex}|\audio<overlay-spec>[options] (nodename) { filename }|
756 % \end{itemize}
757 %
758 % The arguments are:
759 % \begin{arguments}
760 % \item[|overlay-spec|] a standard beamer overlay specification that
761 % allows you to determine on which overlays the audio is to appear;
762 % this argument will end up in a traditional |\only<>{}| clause that
763 % beamer provides.
764 % \item[|options|] the following keys are available. In general they
765 % require a value: |key=value|.
766 % \paragraph{Size options:}\mbox{}\\*[-2ex]
767 % \begin{options}
768 % \item[|width|] the width of the audio box (a fraction relative to
769 % the width of the slide)
770 % \item[|height|] the height of the audio box (a fraction relative
771 % to the height of the slide)
772 % \item[|aspectratio|] the aspectratio of the audio box
773 % \end{options}
774 % \paragraph{Placement options:}\mbox{}\\*[-2ex]
775 % \begin{options}
776 % \item[|anchor|] value is one of |center|, |north|, |west|, |south|, |east|,
777 % |north east|, |north west|, |south east|, |south west|; this
778 % specifies where the anchor of the audio box is positioned; the anchor
779 % will be positioned at |(x,y)|
780 % \item[|above|$^\dagger$] synonym to |anchor=south|
781 % \item[|below|$^\dagger$] synonym to |anchor=north|
782 % \item[|left|$^\dagger$] synonym to |anchor=east|
783 % \item[|right|$^\dagger$] synonym to |anchor=west|
784 % \item[|above left|$^\dagger$] synonym to |anchor=south east|
785 % \item[|above right|$^\dagger$] synonym to |anchor=south west|
786 % \item[|below left|$^\dagger$] synonym to |anchor=north east|
787 % \item[|below right|$^\dagger$] synonym to |anchor=north west|
788 % \end{options}
789 % \paragraph{Appearance and sound options:}\mbox{}\\*[-2ex]
790 % \begin{options}
791 % \item[|fit|] the way the audio block should occupy the box: |fill|,
792 % |cover| or |fit|
793 % \item[|background|] the color of the background of the box
794 % \item[|draw|$^\dagger$] generates an outline around the box that allows you
795 % to inspect where the audio box will end up in your PDF-file
796 % \item[|autoplay|$^\dagger$] causes the audio to start playing a soon as it
797 % appears on the slide
798 % \item[|controls|$^\dagger$] causes player controls to appear
799 % \item[|loop|$^\dagger$] causes the audio to run in loop mode
800 % \item[|muted|$^\dagger$] silences the audio of the player
801 % \end{options}
802 % \paragraph{Various options (only one for now):}\mbox{}\\*[-2ex]
803 % \begin{options}
804 % \item[|embed|$^\dagger$] causes the content of the audio-file to be embedded
805 % as a Base64-encoded ASCII string in the main html file the script produces.
806 % I don't recommend this for audio files.
807 % \end{options}
808 % \item[|nodename|] (optional) name to assign to the rectangular node corresponding to the bounding box of the audio, such that you can later refer to that node
809 % (and its derived anchors (e.g. as '|(nodename.south)|') to position other material.
810 % \item[|x|, |y|] the $x$- and $y$-coordinate of the box, specified as a
811 % fraction of the slide width and slide height (dimensionless), fixing
812 % the anchor of the box, w.r.t. the bottom left of your slide.
813 % \item[|filename|] a filename that leads to the audio file
814 % (e.g. an mp4 file). Any file playable by your browser will work. If
815 % the filename starts with |http://| or |https://|, it will be
816 % considerend to be a URL and your presentation will link to it.
817 % \end{arguments}
818
819 % Note that you can pause and (re)start your audio fragment by pressing 'a' when presenting
820 % your slide deck.
821 %
822 % \DescribeMacro{\iframe}
823 % This macro will create an iframe box on the current slide.
824 % Of course an iframe box can cover the entire slide if desired.
825 %
826 % Its syntax is:
827 % \begin{itemize}
828 % \item overlay mode:\\
829 % \hspace*{2ex}|\iframe<overlay-spec>[options] (nodename) \at (x,y) { filename }|
830 % \item insert mode:\\
831 % \hspace*{2ex}|\iframe<overlay-spec>[options] (nodename) { filename }|
832 % \end{itemize}
833 %
834 % The arguments are:
835 % \begin{arguments}
836 % \item[|overlay-spec|] a standard beamer overlay specification that
837 % allows you to determine on which overlays the iframe is to appear;
838 % this argument will end up in a traditional |\only<>{}| clause that
839 % beamer provides.
840 % \item[|options|] the following keys are available. In general they
841 % require a value: |key=value|.
842 % \paragraph{Size options:}\mbox{}\\*[-2ex]
843 % \begin{options}
844 % \item[|width|] the width of the iframe box (a fraction relative to
845 % the width of the slide)
846 % \item[|height|] the height of the iframe box (a fraction relative
847 % to the height of the slide)
848 % \item[|aspectratio|] the aspectratio of the iframe box
849 % \end{options}
850 % Remember that you never specify both |width| and |height|, only one of
851 % those two in combination with the |aspectratio|.
852 % \paragraph{Placement options:}\mbox{}\\*[-2ex]
853 % \begin{options}
854 % \item[|anchor|] value is one of |center|, |north|, |west|, |south|, |east|,
855 % |north east|, |north west|, |south east|, |south west|; this
856 % specifies where the anchor of the video is positioned; the anchor
857 % will be positioned at |(x,y)|
858 % \item[|above|] synonym to |anchor=south|;
859 % \item[|below|] synonym to |anchor=north|;
860 % \item[|left|$^\dagger$] synonym to |anchor=east|;
861 % \item[|right|$^\dagger$] synonym to |anchor=west|;
862 % \item[|above left|$^\dagger$] synonym to |anchor=south east|;
863 % \item[|above right|$^\dagger$] synonym to |anchor=south west|;
864 % \item[|below left|$^\dagger$] synonym to |anchor=north east|;
865 % \item[|below right|$^\dagger$] synonym to |anchor=north west|;
866 % \end{options}
867 % \paragraph{Appearance options:}\mbox{}\\*[-2ex]
868 % \begin{options}
869 % \item[|fit|] the way the iframe should occupy the box: |fill|,
870 % |cover| or |fit|
871 % \item[|background|] the color of the background of the box
872 % \item[|draw|] generates an outline around the box that allows you
873 % to inspect where the iframe will end up in your PDF-file;\footnotemark[\value{footnote}]
874 % \end{options}
875 % \paragraph{Various options (only one for now):}\mbox{}\\*[-2ex]
876 % \begin{options}
877 % \item[|embed|$^\dagger$] causes the content of the iframe html-file to be embedded
878 % as a Base64-encoded ASCII string in the main html file the script produces.
879 % For iframe material, I think this makes sense if you want to avoid using an
880 % auxiliary webbrowser (e.g. if your are presenting using someone else's computer).
881 % \end{options}
882 % \item[|nodename|] (optional) name to assign to the rectangular node corresponding to the bounding box of the iframe, such that you can later refer to that node
883 % (and its derived anchors (e.g. as '|(nodename.south)|') to position other material.
884 % \item[|x|, |y|] the $x$- and $y$-coordinate of the box, specified as a
885 % fraction of the slide width and slide height (dimensionless), fixing
886 % the anchor of the box, w.r.t. the bottom left of your slide.
887 % \item[|filename|] a filename that leads to the iframe file (e.g. an
888 % HTML file generated by asymptote).
889 % Note that for the content to work,
890 % you might need to serve your presentation through a local html server:\\
891 % |$ python -m http.server|\\
892 % If the filename starts with |http://| or |https://|, it will be
893 % considerend to be a URL and your presentation will link to it.
894 % \end{arguments}
895 %
896 % \DescribeMacro{\image}
897 % This macro will create an image box on the current slide.
898 % Of course an image box can cover the entire slide if desired.
899 %
900 % Note that using the |\includegraphics| command of the |graphicx|
901 % package is still preferred to include the standard image formats,
902 % such as PDF, PNG, TIFF and JPG. However, the |image| command also
903 % allows to include (animated) GIFs, webp and SVG files.
904 %
905 % Its syntax is:
906 % \begin{itemize}
907 % \item overlay mode:\\
908 % \hspace*{2ex}|\image<overlay-spec>[options] (nodename) \at (x,y) { filename }|
909 % \item insert mode:\\
910 % \hspace*{2ex}|\image<overlay-spec>[options] (nodename) { filename }|
911 % \end{itemize}
912 %
913 % The arguments are:
914 % \begin{arguments}
915 % \item[|overlay-spec|] a standard beamer overlay specification that
916 % allows you to determine on which overlays the image is to appear;
917 % this argument will end up in a traditional |\only<>{}| clause that
918 % beamer provides.
919 % \item[|options|] the following keys are available. In general they
920 % require a value: |key=value|.
921 % \paragraph{Size options:}\mbox{}\\*[-2ex]
922 % \begin{options}
923 % \item[|width|] the width of the image box (a fraction relative to
924 % the width of the slide)
925 % \item[|height|] the height of the image box (a fraction relative
926 % to the height of the slide)
927 % \item[|aspectratio|] the aspectratio of the image box
928 % \end{options}
929 % Remember that you never specify both |width| and |height|, only one of
930 % those two in combination with the |aspectratio|.
931 % \paragraph{Placement options:}\mbox{}\\*[-2ex]
932 % \begin{options}
933 % \item[|anchor|] value is one of |center|, |north|, |west|, |south|, |east|,
934 % |north east|, |north west|, |south east|, |south west|; this
935 % specifies where the anchor of the image is positioned; the anchor
936 % will be positioned at |(x,y)|
937 % \item[|above|$^\dagger$] synonym to |anchor=south|;
938 % \item[|below|$^\dagger$] synonym to |anchor=north|;
939 % \item[|left|$^\dagger$] synonym to |anchor=east|;
940 % \item[|right|$^\dagger$] synonym to |anchor=west|;
941 % \item[|above left|$^\dagger$] synonym to |anchor=south east|;
942 % \item[|above right|$^\dagger$] synonym to |anchor=south west|;
943 % \item[|below left|$^\dagger$] synonym to |anchor=north east|;
944 % \item[|below right|$^\dagger$] synonym to |anchor=north west|;
945 % \end{options}
946 % \paragraph{Appearance options:}\mbox{}\\*[-2ex]
947 % \begin{options}
948 % \item[|fit|] the way the image should occupy the box: |fill|,
949 % |cover| or |fit|
950 % \item[|background|] the color of the background of the box
951 % \item[|draw|] generates an outline around the box that allows you
952 % to inspect where the image will end up in your PDF-file;\footnotemark[\value{footnote}]
953 % \end{options}
954 % \paragraph{Various options (only one for now):}\mbox{}\\*[-2ex]
955 % \begin{options}
956 % \item[|embed|$^\dagger$] causes the content of the image-file to be embedded
957 % as a Base64-encoded ASCII string in the main html file the script produces.
958 % I don't recommend this for image files.
959 % \end{options}
960 % \item[|nodename|] (optional) name to assign to the rectangular node corresponding to the bounding box of the image, such that you can later refer to that node
961 % (and its derived anchors (e.g. as '|(nodename.south)|') to position other material.
962 % \item[|x|, |y|] the $x$- and $y$-coordinate of the box, specified as a
963 % fraction of the slide width and slide height (dimensionless), fixing
964 % the anchor of the box, w.r.t. the bottom left of your slide.
965 % \item[|filename|] a filename that leads to the image file
966 % (e.g. a GIF file). Any file displayable by your browser will work. If
967 % the filename starts with |http://| or |https://|, it will be
968 % considerend to be a URL and your presentation will link to it.
969 % \end{arguments}
970 % \clearpage
971 % \DescribeMacro{\animation}
972 % This macro will create an animation box on the current slide.
973 % Different from the other boxes, this box will determine its own width and
974 % height, based on the dimensions of the LaTeX content embedded in it.
975 % In fact, it is illegal to specify aspectratio, width or height.
976 %
977 % The animation is generated as follows: the content of macro will be
978 % written by the |beamer-reveal.pl| script
979 % to a separate LaTeX file using the |standalone| class.
980 % The preamble that it uses will be the part of the preamble in your
981 % beamer source file, in between the loading of the |beamer-reveal| package
982 % and the line containing |\begin{document}|. The animation block will be
983 % embedded in a loop that will be executed |duration| $\cdot$
984 % |framerate| times, providing a macro |\progress| that contains a
985 % fraction that goes up from $0$ (first iteration) to $1$ last
986 % iteration. The PDF-file that is generated with this standalone file,
987 % is converted to an mp4-file that is included as a video on your
988 % slide.\\
989 % The tools used for this are the \LaTeX{}-compiler you used for your beamer sourcefile,
990 % |pdfcrop| \cite{pdfcrop}, |pdftoppm| \cite{pdftoppm} and |ffmpeg| \cite{ffmpeg}.
991 %
992 % This animation generation takes advantage of the multicore nature of
993 % your computer, by simple, but smart parallelization (on
994 % non-MS-Windows operating systems).
995 %
996 % Its syntax is:
997 % \begin{itemize}
998 % \item overlay mode:\\
999 % \hspace*{2ex}|\animation<overlay-spec>[options] (nodename) \at (x,y) { content }|
1000 % \item insert mode:\\
1001 % \hspace*{2ex}|\animation<overlay-spec>[options] (nodename) { content }|
1002 % \end{itemize}
1003 %
1004 % The arguments are:
1005 % \begin{arguments}
1006 % \item[|overlay-spec|] a standard beamer overlay specification that
1007 % allows you to determine on which overlays the animation is to appear;
1008 % this argument will end up in a traditional |\only<>{}| clause that
1009 % beamer provides.
1010 % \item[|options|] the following keys are available. In general they
1011 % require a value: |key=value|.
1012 % \paragraph{Size options:} no size options; size is determined from
1013 % the \LaTeX{} code itself!
1014 % \paragraph{Generation options:}
1015 % \begin{options}
1016 % \item[|framerate|] number of frames per second that the animation
1017 % should contain.
1018 % \item[|duration|] duration (in seconds) of the animation
1019 % \item[|progress|] tokenlist shaped as \texttt{\{a\textbar{}handout:n1/b1,n2/b2,...\}}
1020 % with |a| the progress value for the PDF, and |b1|, |b2|, \ldots{} the progress values
1021 % for handouts |n1|, |n2|, \ldots{}.
1022 % This assumes that the overlay-spec of the |\animation| macro also specifies to generate
1023 % the required handout slide numbers. Take a look at the example in this manual for more
1024 % clarity on this. If the |handout:| section is missing, the |pdf progress| value will
1025 % be used for the/all handout(s).
1026 % \item[|expand once|] will cause the content to be expanded once; use
1027 % this if you described your animation in a macro and want to expand that macro.
1028 % \end{options}
1029 % The number of frames that will be generated for the animation is:
1030 % \begin{align}
1031 % \texttt{number-of-frames} = \texttt{framerate} \cdot \texttt{duration}
1032 % \end{align}
1033 % Your PDF file will contain a single shot of the animation (as if it
1034 % were a preview shot). For this frame, the value of the |\progress|
1035 % macro will be set to |pdf progress|.
1036 %
1037 % \paragraph{Placement options:}\mbox{}\\*[-2ex]
1038 % \begin{options}
1039 % \item[|anchor|] value is one of |center|, |north|, |west|, |south|, |east|,
1040 % |north east|, |north west|, |south east|, |south west|; this
1041 % specifies where the anchor of the animation is positioned; the anchor
1042 % will be positioned at |(x,y)|
1043 % \item[|above|$^\dagger$] synonym to |anchor=south|
1044 % \item[|below|$^\dagger$] synonym to |anchor=north|
1045 % \item[|left|$^\dagger$] synonym to |anchor=east|
1046 % \item[|right|$^\dagger$] synonym to |anchor=west|
1047 % \item[|above left|$^\dagger$] synonym to |anchor=south east|
1048 % \item[|above right|$^\dagger$] synonym to |anchor=south west|
1049 % \item[|below left|$^\dagger$] synonym to |anchor=north east|
1050 % \item[|below right|$^\dagger$] synonym to |anchor=north west|
1051 % \end{options}
1052 % \paragraph{Appearance options:}\mbox{}\\*[-2ex]
1053 % \begin{options}
1054 % \item[|background|] the color of the background of the box
1055 % \item[|draw|$^\dagger$] generates an outline around the box that allows you
1056 % to inspect where the video will end up in your PDF-file
1057 % \item[|autoplay|$^\dagger$] causes the video to start playing a soon as it
1058 % appears on the slide
1059 % \item[|controls|$^\dagger$] causes player controls to appear below your video
1060 % \item[|loop|$^\dagger$] causes the animation to run in loop mode
1061 % \end{options}
1062 % \item[|nodename|] (optional) name to assign to the rectangular node corresponding to the bounding box of the animation, such that you can later refer to that node
1063 % (and its derived anchors (e.g. as '|(nodename.south)|') to position other material.
1064 % \item[|x|, |y|] the $x$- and $y$-coordinate of the box, specified as a
1065 % fraction of the slide width and slide height (dimensionless), fixing
1066 % the anchor of the box, w.r.t. the bottom left of your slide.
1067 % \item[|content|] the LaTeX code that generates every
1068 % frame based on the |\progress| 'time variable'. Any macros used in
1069 % this content need to be defined in the content itself or in the
1070 % preamble of your slide deck in between the
1071 % |\usepackage{beamer-reveal}| and the |\begin{document}| as this
1072 % portion is also used when generation the animation. If that is not
1073 % the case, you can specify an extra option |expand once| to perform a
1074 % single expansion, such that the macros and environments on the top
1075 % level are expanded once. The example contained in this manual shows
1076 % you an example of this.
1077 % \end{arguments}
1078 %
1079 % Note that you can pause and (re)start your animation fragment by
1080 % pressing 'v' (as it is in fact a video) when presenting your slide
1081 % deck.
1082 %
1083 % \DescribeMacro{\still}
1084 % This macro will create the still (of an animation) box on the current slide.
1085 % The idea is that you can split your animation in parts and separate these parts
1086 % with a slide (or a subframe, if you are using multiple overlays)
1087 % containing a still corresponding to the point between the animation
1088 % parts. Just as the animation box, this box will determine its own width and
1089 % height, based on the dimensions of the LaTeX content embedded in it.
1090 % In fact, it is illegal to specify aspectratio, width or height.
1091 %
1092 % The still is generated as follows: the content of macro will be
1093 % written by the |beamer-reveal.pl| script
1094 % to a separate LaTeX file using the |standalone| class.
1095 % The preamble that it uses will be the part of the preamble in your
1096 % beamer source file, in between the loading of the |beamer-reveal| package
1097 % and the line containing |\begin{document}|. The animation block will be
1098 % embedded in an environment that sets the macro |\progress| to a value
1099 % in between $0$ and $1$. The PDF-file that is generated with this standalone file,
1100 % is converted to a jpg-file that is included as a still image on your
1101 % slide.\\
1102 % The tools used for this are the \LaTeX{}-compiler you used for your beamer sourcefile,
1103 % |pdfcrop| \cite{pdfcrop} and |pdftoppm| \cite{pdftoppm}.
1104 %
1105 % Its syntax is:
1106 % \begin{itemize}
1107 % \item overlay mode:\\
1108 % \hspace*{2ex}|\still<overlay-spec>[options] (nodename) \at (x,y) { content }|
1109 % \item insert mode:\\
1110 % \hspace*{2ex}|\still<overlay-spec>[options] (nodename) { content }|
1111 % \end{itemize}
1112 %
1113 % The arguments are:
1114 % \begin{arguments}
1115 % \item[|overlay-spec|] a standard beamer overlay specification that
1116 % allows you to determine on which overlays the still is to appear;
1117 % this argument will end up in a traditional |\only<>{}| clause that
1118 % beamer provides.
1119 % \item[|options|] the following keys are available. In general they
1120 % require a value: |key=value|.
1121 % \paragraph{Size options:} no size options; size is determined from
1122 % the \LaTeX{} code itself!
1123 % \paragraph{Generation options:}\mbox{}\\*[-2ex]
1124 % \begin{options}
1125 % \item[|progress|] tokenlist shaped as \texttt{\{a\textbar{}handout:n1/b1,n2/b2,...\}}
1126 % with |a| the progress value for the PDF, and |b1|, |b2|, \ldots{} the progress values
1127 % for handouts |n1|, |n2|, \ldots{}.
1128 % This assumes that the overlay-spec of the |\animation| macro also specifies to generate
1129 % the required handout slide numbers. Take a look at the example in this manual for more
1130 % clarity on this. If the |handout:| section is missing, the |pdf progress| value will
1131 % be used for the/all handout(s).
1132 % \item[|expand once|] will cause the content to be expanded once; use
1133 % this if you described your still in a macro and want to expand that macro.
1134 % \end{options}
1135 % Your PDF file will contain the image typeset by your LaTeX{} run.
1136 % In the reveal version of the presentation, the image will be overlaid
1137 % by the generated still, such that it aligns perfectly with a corresponding video
1138 % on an adjacent slide.
1139 % \paragraph{Placement options:}\mbox{}\\*[-2ex]
1140 % \begin{options}
1141 % \item[|anchor|] value is one of |center|, |north|, |west|, |south|, |east|,
1142 % |north east|, |north west|, |south east|, |south west|; this
1143 % specifies where the anchor of the animation is positioned; the anchor
1144 % will be positioned at |(x,y)|
1145 % \item[|above|$^\dagger$] synonym to |anchor=south|
1146 % \item[|below|$^\dagger$] synonym to |anchor=north|
1147 % \item[|left|$^\dagger$] synonym to |anchor=east|
1148 % \item[|right|$^\dagger$] synonym to |anchor=west|
1149 % \item[|above left|$^\dagger$] synonym to |anchor=south east|
1150 % \item[|above right|$^\dagger$] synonym to |anchor=south west|
1151 % \item[|below left|$^\dagger$] synonym to |anchor=north east|
1152 % \item[|below right|$^\dagger$] synonym to |anchor=north west|
1153 % \end{options}
1154 % \paragraph{Appearance options:}\mbox{}\\*[-2ex]
1155 % \begin{options}
1156 % \item[|background|] the color of the background of the box
1157 % \item[|draw|$^\dagger$] generates an outline around the box that allows you
1158 % to inspect where the video will end up in your PDF-file
1159 % \end{options}
1160 % \item[|nodename|] (optional) name to assign to the rectangular node corresponding to the bounding box of the animation, such that you can later refer to that node
1161 % (and its derived anchors (e.g. as '|(nodename.south)|') to position other material.
1162 % \item[|x|, |y|] the $x$- and $y$-coordinate of the box, specified as a
1163 % fraction of the slide width and slide height (dimensionless), fixing
1164 % the anchor of the box, w.r.t. the bottom left of your slide.
1165 % \item[|animation-LaTeX-content|] the LaTeX code that generates every
1166 % frame based on the |\progress| 'time variable'. Any macros used in
1167 % this content need to be defined in the content itself or in the
1168 % preamble of your slide deck in between the
1169 % |\usepackage{beamer-reveal}| and the |\begin{document}| as this
1170 % portion is also used when generation the still. If that is not
1171 % the case, you can specify an extra option |expand once| to perform a
1172 % single expansion, such that the macros and environments on the top
1173 % level are expanded once. The example contained in this manual shows
1174 % you an example of this.
1175 % \end{arguments}
1176 %
1177 % \clearpage
1178 %
1179 % \DescribeMacro{\voiceover}
1180 % This macro makes the |beamer-reveal.pl| script send the text of the
1181 % main argument to a text-to-speech engine. The macro itself inserts an
1182 % autplay audio block on the slide that will autoplay this audio file
1183 % generated by the text-to-speech engine. Using voiceover commands and
1184 % the autoplay feature for the slides (for every slide) enables you to
1185 % make a kiosk-style video-like presentation that can run autonomously.
1186 %
1187 % Its syntax is:\\
1188 % \hspace*{2ex}|\voiceover<overlay-spec>[options] { text-to-read-out-loud }|
1189 %
1190 % Currently no specific options are available, but that my change in the future.
1191 % For now, the option list is just passed on to the audio block that is generated.
1192 %
1193 % In order to make use of one of the text-to-speech engines, you need to set it up
1194 % before your first invocation of the |\voiceover| command, using all of the three macros below.
1195 % You may call these macros at any time in your slide deck to change the settings.
1196 %
1197 % \DescribeMacro{\voiceovertts}
1198 % Use this macro to select the script that will invoke text-to-speech service. You can choose:
1199 % \begin{itemize}
1200 % \item |awspolly.pl|: for the Amazon engine \cite{awspolly}
1201 % \item |azuretts.py|: for the Microsoft engine \cite{azuretts}
1202 % \item |balabolka.pl|: for the free MS-windows engine \cite{balabolka}
1203 % \item |festival.pl|: for the free UNIX/Linux engine by the University of Edinburgh \cite{festival}
1204 % \end{itemize}
1205 % Scripts to access these service are part of the Perl package.
1206 % Consult the documentation of these services to set them up. There is
1207 % no default, as I don't want to push anyone towards using a
1208 % particular service.
1209 %
1210 % \DescribeMacro{\setvoiceover}
1211 % Use this macro to select the voice to use. Invoke the tts script to see how the voice should be
1212 % formatted.
1213 % There is no default, as I don't want to push anyone towards using a particular service, or voice.
1214 %
1215 % \DescribeMacro{\setvoiceoverext}
1216 % This macro sets the audio file format that will be used. Examples are:
1217 % \begin{itemize}
1218 % \item |.ogg|
1219 % \item |.wav|
1220 % \item |.mp3|
1221 % \end{itemize}
1222 % There is no default, as I don't want to push anyone towards using a particular audio
1223 % format.
1224 %
1225 %
1226 % \subsection{Short overview of the options for the different media macros}
1227 % Most of the macros have very similar options, but some are not
1228 % common to all of them. Therefore, I made a small overview. I admit,
1229 % mostly to help myself to keep the overview while developing the
1230 % package.
1231 % \begin{table}[p]
1232 % \newcommand\ok{$\bullet$}
1233 % \newcommand\nok{$\times$}
1234 % \vspace*{25cm}\hspace*{7cm}
1235 % \begin{rotate}{90}
1236 % \begin{minipage}{25cm}
1237 % \footnotesize
1238 % \centering
1239 % \renewcommand\arraystretch{1.5}
1240 % \begin{tabular}{lcccccccccccccc}
1241 % \toprule
1242 % & \bf Size & \bf Placement &
1243 % \multicolumn{7}{c}{\bf Appearance and sound} &
1244 % \bf Various &
1245 % \multicolumn{4}{c}{\bf Generation} \\
1246 % \cmidrule(lr){2-2}
1247 % \cmidrule(lr){3-3}
1248 % \cmidrule(lr){4-10}
1249 % \cmidrule(lr){11-11}
1250 % \cmidrule(lr){12-15}
1251 % \bf Macro & \footnotesize |w| / |h| / |ar| & |anchor| &
1252 % |fit| & |background| & |draw| & |autoplay| & |controls| & |loop| & |muted| &
1253 % |embed| & |framerate| & |duration| & |progress| & |expand once|\\
1254 % \midrule
1255 % |\video| & \ok$^1$ & \ok & \ok & \ok & \ok & \ok & \ok & \ok & \ok &
1256 % \ok & \nok & \nok & \nok & \nok \\
1257 % |\audio| & \ok$^1$ & \ok & \ok & \ok & \ok & \ok & \ok & \ok & \ok &
1258 % \ok & \nok & \nok & \nok & \nok \\
1259 % |\iframe| & \ok$^1$ & \ok & \ok & \ok & \ok & \nok & \nok & \nok & \nok&
1260 % \ok & \nok & \nok & \nok & \nok \\
1261 % |\image| & \ok$^1$ & \ok & \ok & \ok & \ok & \nok & \nok & \nok & \nok&
1262 % \ok & \nok & \nok & \nok & \nok \\
1263 % |\animation| & \nok & \ok & \nok & \ok & \ok & \ok & \ok & \ok & \nok&
1264 % \ok & \ok & \ok & \ok & \ok \\
1265 % |\still| & \nok & \ok & \nok & \ok & \ok & \nok & \nok & \nok & \nok&
1266 % \ok & \nok & \nok & \ok & \ok \\
1267 % \bottomrule
1268 % \end{tabular}\\~\\
1269 % $^1$ |aspectratio| and |width|, or |aspectratio| and |height|, never
1270 % |width| and |height| together
1271 % \end{minipage}
1272 % \end{rotate}
1273 % \end{table}
1274 %
1275 % \clearpage
1276 %
1277 % \newgeometry{left=1.75cm,right=1.75cm,top=2cm,bottom=2.5cm}
1278 %
1279 % \section{Example}
1280 %
1281 % \subsection{Using the example}
1282 % An example will allow you to get an idea of the convenience of the package.
1283 % The following steps will allow you to observe it in your browser:
1284 %
1285 % |$ lualatex beamer-reveal-example.tex|\\
1286 % |$ beamer-reveal.pl beamer-reveal-example|\\
1287 % |$ python -m http.server|
1288 %
1289 % Then open in your browser: \url{localhost:8000} and enjoy!
1290 %
1291 % \subsection{The source code of the example}
1292 % \begin{verbatim}
1293 %<*example>
1294 \documentclass[11pt,aspectratio=169,t]{beamer}%
1295 \setbeamertemplate{navigation symbols}{}
1296
1297 \usepackage[width=1920,autoslide=4000]{beamer-reveal}
1298 \usepackage{tikz}
1299 \usepackage{siunitx}
1300
1301 \newcommand\eu{\mathrm{e}}
1302 \newcommand\ju{\mathrm{j}}
1303
1304 \title{Test slide deck}
1305 \subtitle{\textsc{beamer-reveal}}
1306 \author{Walter Daems}
1307
1308 \setbeamertemplate{note page}{\insertnote}
1309
1310 \setvoiceovertts{azuretts.py}
1311 \setvoiceover{en-GB:neural:Ryan}
1312 \setvoiceoverext{.ogg}
1313
1314 \begin{document}
1315
1316 \begin{frame}[titleslide]
1317 \titlepage
1318 \end{frame}
1319
1320 \AtBeginSection{
1321 \begin{frame}[sectionslide]{Overview}
1322 \tableofcontents[currentsection]
1323 \end{frame}
1324 }
1325 \AtBeginSubsection{
1326 \begin{frame}[subsectionslide]{Overview}
1327 \tableofcontents[currentsection,currentsubsection]
1328 \end{frame}
1329 }
1330
1331 \section{Introduction}
1332 \subsection{Slide making}
1333
1334
1335 \begin{frame}
1336 {Good news}
1337 {}
1338 \voiceover {Slide making is fun}
1339 You can keep on making your slides the way you are used to!
1340 \begin{itemize}
1341 \item all the nice \LaTeX{} stuff at your fingertips
1342 \item no tempation to use too much unnecessary animation
1343 \end{itemize}
1344 \bigskip
1345
1346 Indeed, there are no tools that can typeset equations like the tools form the \TeX-ecosystem:
1347 \begin{equation}
1348 \eu^{-\ju\pi}+1=0
1349 \end{equation}
1350
1351 \note[item]{Make joke about fingertips}
1352 \note[item]{Don't speak about your personal temptations!}
1353 \end{frame}
1354
1355 \begin{frame}[transition=concave,embed,autoslide=2000]
1356 {Pr\^et-\`a-porter}
1357 {A dummy slide}
1358 \vfill
1359 Showing off the 'concave' slide transition animation. Not recommended!
1360 \vfill
1361 \end{frame}
1362
1363 \begin{frame}[transition=convex]
1364 {Très chique}
1365 {A dummy slide}
1366 \vfill
1367 Showing off the 'convex' slide transition animation. Not recommended!
1368 \vfill
1369 \end{frame}
1370
1371 \subsection{Pimping your slides}
1372
1373 \begin{frame}
1374 {And even more good news}
1375 {\ldots almost seems to good to be true\ldots}
1376 \small
1377 However, now you can pimp your slides like never before. You can incorporate:
1378 \begin{itemize}
1379 \item videos and audio fragments
1380 \item animated GIFs and LaTeX animations
1381 \item iframe content
1382 \end{itemize}
1383 without being tied to Acrobat reader.
1384 In addition, there are some extra features
1385 \begin{itemize}
1386 \item press '?' for keyboard help, amongst which you will find:
1387 \item press 'm' to open the slide menu on the left
1388 \item press 'o' to get an overview of the slides
1389 \item press 's' to start a speaker view
1390 \item press 'g' to go to a specific slide by typing its slide number
1391 \end{itemize}
1392 The pancake menu on the bottom left also opens the menu.
1393 \end{frame}
1394
1395 \note{
1396 Don't spend too much time on this slide
1397 }
1398
1399 % \audiostop{}
1400
1401 \begin{frame}[transition=zoom]
1402 {A dymmy slide}
1403 {number three}
1404 \vfill
1405 Showing off the 'zoom slide transition animation. Not recommended!
1406 \vfill
1407 \end{frame}
1408
1409 \section{In detail}
1410
1411 \subsection{Candy for the eye}
1412
1413 \begin{frame}
1414 {Placing videos}
1415 {}
1416 \only<1>{On this first slide there is nothing to see. On the next animation frame, a video will appear.}
1417 \only<2>{Here it is!}
1418 \video<2>[above,draw,autoplay,height=0.7,aspectratio=16/9,
1419 background=yellow,fit=contain]
1420 (myvid) \at (0.5,0.1) {Media/beamer-reveal-testvideo.mp4}
1421 \tikz[remember picture,overlay] \node<2>[anchor=north,font=\tiny] at (myvid.south)
1422 {An example video (C) Walter Daems};
1423 \end{frame}
1424
1425 \begin{frame}
1426 {Placing images (possibly animated)}
1427 {}
1428 \begin{columns}
1429 \column[T]{0.45\textwidth}
1430 Below you will find a png (for which you don't need reveal, BTW).
1431 \vspace*{1cm}
1432
1433 Of course, you can exploit the transparency of the background layer in the PNG!
1434 \vspace*{2cm}
1435
1436 And on the top right you will find a swinging pendulum (an animated GIF).
1437 \column[T]{0.45\textwidth}
1438 % this is a image whose box consumes area on your slide
1439 \image[width=0.33,aspectratio=1,fit=contain,draw] (myimage) {Media/beamer-reveal-AnimatedPendulum.gif}
1440 \end{columns}
1441 % this is an overlayed image (not consuming any space)
1442 \image[width=0.25,aspectratio=1,fit=contain] \at (0.1,0.6) {Media/beamer-reveal-WiresTp.png}
1443 \image[width=0.1,aspectratio=1,fit=contain] \at (0.9,0.1) {https://www.digmanwaves.net/About/Pictures/WalterDaems.jpg}
1444 \end{frame}
1445
1446 \begin{frame}
1447 {Placing iframe material (possibly animated)}
1448 {e.g. generated with asymptote}
1449
1450 Click and drag on the iframe below. You can manipulate it! Use your mouse
1451 scroll-wheel to zoom in or out.
1452 \iframe[draw,anchor=north,height=0.6,aspectratio=16/9,embed,
1453 fit=cover] \at (0.5,0.7) {Media/beamer-reveal-PCB.html}
1454 \end{frame}
1455
1456 \note{
1457 Don't mention the amount of hours that went into this iframe!
1458 }
1459
1460 \subsection{Resonance for the ear}
1461
1462 \begin{frame}
1463 {Adding audio to your slides}
1464 {}
1465 Below, there is an audio block
1466 that automatically starts playing.\\
1467 \audio[autoplay,controls,width=0.1,aspectratio=16/9,
1468 background=blue,fit=cover] {Media/beamer-reveal-AudioSample.ogg}
1469 \end{frame}
1470
1471 \subsection{Make (video) animations with LaTeX}
1472
1473 \newcommand\myanimation{%
1474 \begin{tikzpicture}[font=\footnotesize,transform shape,scale=0.75]
1475 \pgfmathsetmacro\angle{\progress*540}%
1476 \clip (-2,-5.25) rectangle (8,2);
1477 \node[below left,inner sep=1pt] at (0,0) {\tiny 0};
1478 \node[below left,inner sep=1pt] at (2.5,0) {\tiny 0};
1479 \node[above right,inner sep=1pt] at (0,-2) {\tiny 0};
1480
1481 \begin{scope}[every node/.style={right}]
1482 \node[thick,draw,rectangle] at (2.5,-2)
1483 {\large $x(t) = A \cdot \eu^{j\omega t}$};
1484 \node at (3.5,-3)
1485 {\large $\eu^{j\alpha} = \cos\alpha+j\sin\alpha$};
1486 \node at (2.5,-4)
1487 {\large $x(t) = \underbrace{A \cos \omega t}_{\text{\textcolor{orange}{real}}}
1488 + \underbrace{j A \sin \omega t}_{\text{\textcolor{olive}{imaginary}}}$};
1489 \end{scope}
1490 \draw[->,thick] (3,-2.4) -- (3,-3.4);
1491 \draw[blue,thick] (0,0) circle (1);
1492
1493 \draw[->] (-1.25,0) -- (1.25,0) node[below] {Re};
1494 \draw[->] (0,-1.25) -- (0,1.25) node[left] {Im};
1495
1496 % circle
1497 \draw[olive,very thick] (0,0) -- (0,{sin(\angle)});
1498 \draw[orange,very thick] (0,0) -- ({cos(\angle)},0);
1499 \draw[blue,thick,->] (0,0) -- node[left,font=\tiny] {A} +(\angle:1);
1500 \draw[->] (0.4,0) arc (0:\angle:0.4);
1501 \node at (0.5*\angle:0.7) {\scriptsize $\omega \tilde t$};
1502
1503 % right graph
1504 \draw[very thick,olive] ({2.5+\angle/180},0) -- +(0,{sin(\angle)});
1505 \draw[densely dotted] ({min(0,cos(\angle))},{sin(\angle)})
1506 -- ({2.5+\angle/180},{sin(\angle)});
1507 \draw[thick] ({2.5+\angle/180},0) +(0,1pt) -- +(0,-1pt) node[below] {$\tilde t$};
1508
1509 % bottom graph
1510 \draw[very thick,orange] (0,{-2-\angle/180}) -- +({cos(\angle)},0);
1511 \draw[densely dotted] ({cos(\angle)},{max(0,sin(\angle))})
1512 -- ({cos(\angle)},{-2-\angle/180});
1513 \draw[thick] (0,{-2-\angle/180}) +(1pt,0) -- +(-1pt,0) node[left] {$\tilde t$};
1514
1515 % right graph
1516 \foreach \y/\l in {-1/-A,1/A} {
1517 \draw[gray,densely dotted] (2.5,\y) -- (6.25,\y);
1518 \draw (2.5,\y) +(+1pt,0) -- +(-1pt,0) node[left] {$\l$};
1519 }
1520 \draw[->] (2.0,0) -- (6.5,0) node[below] {$t$};
1521 \draw[->] (2.5,-1.25) -- (2.5,1.25) node[left] {$Im(x(t))$};
1522 \draw[olive,thick,domain=-0.25:3.5,samples=30,smooth] plot
1523 ({\x+2.5},{sin(pi*\x r)});
1524
1525 % bottom graph
1526 \foreach \y/\l in {-1/-A,1/A} {
1527 \draw[gray,densely dotted] (\y,-2) -- (\y,-4.5);
1528 \draw (2.5,\y) +(+1pt,0) -- +(-1pt,0) node[left] {$\l$};
1529 }
1530 \draw[->] (-1.25,-2) -- (1.25,-2) node[above] {$Re(x(t))$};
1531 \draw[->] (0,-1.5) -- (0,-5) node[left] {$t$};
1532
1533 \draw[orange,thick,domain=-0.25:2.6,samples=30,smooth] plot
1534 ({cos(pi*\x r)},{-2-\x});
1535 \end{tikzpicture}%
1536 }
1537
1538 \begin{frame}
1539 {Making animations with LaTeX (using TikZ as example)}
1540 {It is easier than ever before}
1541 \small The animation content is exported to a standalone \LaTeX-document that creates a
1542 loop over it, for a \texttt{duration} seconds at
1543 \texttt{framerate} frames per second providing a \texttt{\textbackslash{}progress}
1544 variable that goes gradually from 0 to 1 in \texttt{duration} $\times$
1545 \texttt{framerate} frames. The beamer-reveal.pl script transforms it
1546 to mp4 maximally exploiting your multi-core CPU.
1547
1548 \begin{center}
1549 \animation<1|handout:1-3>[framerate=25,duration=7.5,autoplay,
1550 progress={0.1|handout:1/0,2/0.2,3/0.5},expand once] {\myanimation}
1551 \end{center}
1552 \end{frame}
1553
1554 \begin{frame}
1555 {Making animations with LaTeX (using TikZ as example)}
1556 {Another slide with just a 'still' - but with some music!}
1557 \small The animation content is exported to a standalone \LaTeX-document that creates a
1558 loop over it, for a \texttt{duration} seconds at
1559 \texttt{framerate} frames per second providing a \texttt{\textbackslash{}progress}
1560 variable that goes gradually from 0 to 1 in \texttt{duration} $\times$
1561 \texttt{framerate} frames. The beamer-reveal.pl script transforms it
1562 to mp4 maximally exploiting your multi-core CPU.
1563
1564 \begin{center}
1565 \still[progress=0.75,expand once] {\myanimation}
1566 \end{center}
1567 \audio[width=0.1,aspectratio=16/9,fit=cover,autoplay] \at (0,0)
1568 {Media/beamer-reveal-AudioSample.ogg}
1569 \end{frame}
1570
1571 \end{document}
1572 %</example>
1573 % \end{verbatim}
1574 % \clearpage
1575 %
1576 % \StopEventually{\PrintChanges\PrintIndex}
1577 %
1578 % \section{Implementation}
1579 %
1580 % \subsection{The preamble of the package}
1581 %
1582 % \begin{macrocode}
1583 %<*reveal>
1584 \ExplSyntaxOn
1585 \tl_new:N \g_@@_fileversion_tl
1586 \tl_set:Nn \g_@@_fileversion_tl {v1.10}
1587 \tl_new:N \g_@@_filedate_tl
1588 \tl_set:Nn \g_@@_filedate_tl {2026-04-08}
1589 \RequirePackage{l3keys2e}
1590 %</reveal>
1591 % \end{macrocode}
1592 %
1593 % \subsection{Error/warning messages}
1594 %
1595 % \begin{macrocode}
1596 %<*reveal>
1597 \msg_new:nnn{ beamer-reveal } { inconsistent-dimensions } {
1598 aspect~ratio~of~beamer~(#1)~and~reveal~(#2:#3)~are~not~consistent.\\
1599 You~must~specify~consistent~values~for~width/height~and~aspectratio~
1600 otherwise~your~reveal~items~(videos/images/animations)~will~not~appear~
1601 on~the~right~locations~on~your~reveal-slidedeck.
1602 }
1603 \msg_new:nnn{ beamer-reveal } { missing-aspectratio } {
1604 missing~aspect~ratio.\\
1605 You~need~to~specify~at~least~an~aspect~ratio~for~a~beamer-reveal~item~
1606 you~want~to~put~on~the~reveal~slide.
1607 }
1608 \msg_new:nnn{ beamer-reveal } { missing-width-or-height } {
1609 missing~width~or~height.\\
1610 You~need~to~specify~at~least~a~width~or~a~height~for~a~beamer-reveal~item~
1611 you~want~to~put~on~the~reveal~slide.
1612 }
1613 \msg_new:nnn{ beamer-reveal } { overconstrained-box } {
1614 overconstrained~box.\\
1615 You~cannot~both~specify~the~width~and~the~height~of~a~beamer-reveal~item~
1616 you~want~to~put~on~the~slide.
1617 Specify~width~and~aspectratio~or~height~and~aspectratio.
1618 }
1619 \msg_new:nnn{ beamer-reveal } { dynamic-option-for-staticcontent } {
1620 dynamic~option~given~(autoplay,~controls,~loop,~muted)~for~static~
1621 content~(\image,~\iframe).\\
1622 These~options~make~no~sense~for~the~\image~command.~Remove~them.
1623 }
1624 \msg_new:nnn{ beamer-reveal } { animation-option-for-nonanimation } {
1625 duration~and~framerate~are~options~that~can~only~be~given~for~the~
1626 \animation~command.\\
1627 Remove~them~from~the~\video,~\audio,~\image~and~\iframe~commands.
1628 }
1629 \msg_new:nnn { beamerreveal / Syntax } { missing-coordinate }
1630 { you~specified~'\c_backslash_str at'~but~gave~no~coordinate. }
1631 \msg_new:nnn { beamerreveal / Syntax } { old-at-syntax }
1632 { I~choked~on~'a';~note~that~the~syntax~has~changed:~replace~'at'~with~'\c_backslash_str at'. }
1633 \msg_new:nnn { beamerreveal / Syntax } { missing-at }
1634 { you~specified~a~coordinate~but~not~an~'\c_backslash_str at'~token;~did~you~forget~that? }
1635 %</reveal>
1636 % \end{macrocode}
1637 %
1638 % \subsection{Some pdflatex backwards compatibility}
1639 %
1640 % \begin{macrocode}
1641 %<*reveal>
1642 \@ifundefined{pagewidth}{%
1643 \let\pagewidth\pdfpagewidth
1644 \let\pageheight\pdfpageheight
1645 }{}
1646 %</reveal>
1647 % \end{macrocode}
1648 %
1649 %
1650 %
1651 % \subsection{Package options}
1652 % First some global variables to store the global width and height of
1653 % the presentation, that can be specified as package options:
1654 % \begin{macrocode}
1655 %<*reveal>
1656 \tl_new:N \g_@@_beameraspectratio_tl
1657 \tl_set:Nn \g_@@_beameraspectratio_tl {43}
1658 \fp_new:N \g_@@_canvaswidth_fp
1659 \fp_set:Nn \g_@@_canvaswidth_fp { \dim_to_fp:n {\paperwidth} }
1660 \fp_new:N \g_@@_canvasheight_fp
1661 \fp_set:Nn \g_@@_canvasheight_fp { \dim_to_fp:n {\paperheight} }
1662 \fp_new:N \g_@@_canvasaspectratio_fp
1663 \fp_set:Nn \g_@@_canvasaspectratio_fp { \g_@@_canvaswidth_fp / \g_@@_canvasheight_fp }
1664 \int_new:N \g_@@_canvaswidth_int
1665 \int_set:Nn \g_@@_canvaswidth_int {0}
1666 \int_new:N \g_@@_canvasheight_int
1667 \int_set:Nn \g_@@_canvasheight_int {0}
1668 \bool_new:N \g_@@_embed_bool
1669 \bool_set:Nn \g_@@_embed_bool { \c_false_bool }
1670 \bool_new:N \g_@@_loop_bool
1671 \bool_set:Nn \g_@@_loop_bool { \c_false_bool }
1672 \int_new:N \g_@@_autoslide_int
1673 \int_set:Nn \g_@@_autoslide_int { -1 }
1674 \keys_define:nn { beamerreveal } {
1675 width .int_set:N = \g_@@_canvaswidth_int,
1676 width .value_required:n = true,
1677 height .int_set:N = \g_@@_canvasheight_int,
1678 height .value_required:n = true,
1679 embed .bool_set:N = \g_@@_embed_bool,
1680 loop .bool_set:N = \g_@@_loop_bool,
1681 autoslide .int_set:N = \g_@@_autoslide_int,
1682 autoslide .value_required:n = true,
1683 }
1684 \ProcessKeyOptions[beamerreveal]
1685 \int_compare:nNnTF { \g_@@_canvaswidth_int } = {0}
1686 {
1687 \int_compare:nNnTF { \g_@@_canvasheight_int } = {0}
1688 {
1689 % we assume 4x3 on an HD screen
1690 \int_set:Nn \g_@@_canvaswidth_int { 1920 }
1691 \int_set:Nn \g_@@_canvasheight_int
1692 { \fp_eval:n { round( \g_@@_canvaswidth_int / \g_@@_canvasaspectratio_fp ) } }
1693 }
1694 {
1695 % we assume 4x3
1696 \int_set:Nn \g_@@_canvaswidth_int
1697 { \fp_eval:n { round( \g_@@_canvasheight_int * \g_@@_canvasaspectratio_fp ) } }
1698 }
1699 }
1700 {
1701 \int_compare:nNnTF { \g_@@_canvasheight_int } = {0}
1702 {
1703 % we assume 4x3 on an HD screen
1704 \int_set:Nn \g_@@_canvasheight_int{ \fp_eval:n
1705 { round( \g_@@_canvaswidth_int / \g_@@_canvasaspectratio_fp ) } }
1706 }
1707 {
1708 % both are set, we're good to go
1709 \fp_new:N \l_@@_canvasaspectratioresidue_fp
1710 \fp_set:Nn \l_@@_canvasaspectratioresidue_fp
1711 { \fp_abs:n { \g_@@_canvaswidth_int / \g_@@_canvasheight_int - \g_@@_canvasaspectratio_fp } }
1712 \fp_compare:nNnTF { \l_@@_canvasaspectratioresidue_fp } > {0.001}
1713 {
1714 \msg_warning:nneee { beamer-reveal } { inconsistent-dimensions }
1715 { \tl_use:N \g_@@_beameraspectratio_tl }
1716 { \int_use:N \g_@@_canvaswidth_int }
1717 { \int_use:N \g_@@_canvasheight_int }
1718 }{}
1719 }
1720 }
1721 %</reveal>
1722 % \end{macrocode}
1723
1724 % \subsection{Extra options for the frame environment of \beamer{}}
1725 %
1726 % \begin{macrocode}
1727 %<*reveal>
1728 \bool_new:N \g_@@_titlepage_bool
1729 \define@key{beamerframe}{titleslide}[true]{%
1730 \ExplSyntaxOn
1731 \bool_gset_true:N \g_@@_titlepage_bool
1732 \ExplSyntaxOff
1733 }
1734 \bool_new:N \g_@@_sectionslide_bool
1735 \define@key{beamerframe}{sectionslide}[true]{%
1736 \ExplSyntaxOn
1737 \bool_gset_true:N \g_@@_sectionslide_bool
1738 \ExplSyntaxOff
1739 }
1740 \bool_new:N \g_@@_subsectionslide_bool
1741 \define@key{beamerframe}{subsectionslide}[true]{%
1742 \ExplSyntaxOn
1743 \bool_gset_true:N \g_@@_subsectionslide_bool
1744 \ExplSyntaxOff
1745 }
1746 \tl_new:N \g_@@_transition_tl
1747 \define@key{beamerframe}{transition}[none]{%
1748 \ExplSyntaxOn
1749 \tl_gset:Nn \g_@@_transition_tl { #1 }
1750 \ExplSyntaxOff
1751 }
1752 \define@key{beamerframe}{embed}[true]{%
1753 \ExplSyntaxOn
1754 \bool_gset_true:N \g_@@_embed_bool
1755 \ExplSyntaxOff
1756 }
1757 \define@key{beamerframe}{autoslide}[0]{%
1758 \ExplSyntaxOn
1759 \int_set:Nn \g_@@_autoslide_int {#1}
1760 \ExplSyntaxOff
1761 }
1762 %</reveal>
1763 % \end{macrocode}
1764 %
1765 % \subsection{File writing}
1766 % File handles and auxiliary functions to write data to the |.rvl|
1767 % file.
1768 %
1769 % \begin{macrocode}
1770 %<*reveal>
1771 \iow_new:N \g_@@_rvlfile
1772 \iow_open:Nn \g_@@_rvlfile {\jobname.rvl}
1773 %</reveal>
1774 % \end{macrocode}
1775 %
1776 % \begin{macro}{\writecomment\_@@:n}
1777 % \begin{macrocode}
1778 %<*reveal>
1779 \cs_new:Npn \writecomment_@@:n #1
1780 { \iow_now:Ne \g_@@_rvlfile {\c_percent_str\c_percent_str\c_space_tl #1} }
1781 %</reveal>
1782 % \end{macrocode}
1783 % \end{macro}
1784 %
1785 % \begin{macro}{\writecontrol\_@@:n}
1786 % \begin{macrocode}
1787 %<*reveal>
1788 \cs_new:Npn \writecontrol_@@:nn #1 #2
1789 { \iow_now:Ne \g_@@_rvlfile {@ @#1:~#2} }
1790 % \end{macrocode}
1791 % \end{macro}
1792 %
1793 % \begin{macro}{\writeliteral\_@@:n}
1794 % \begin{macrocode}
1795 \cs_new:Npn \writeliteral_@@:n #1
1796 { \iow_now:Nx \g_@@_rvlfile {#1} }
1797 % \end{macrocode}
1798 % \end{macro}
1799 %
1800 % \begin{macro}{\writeraw\_@@:n}
1801 % \begin{macrocode}
1802 \cs_new:Npn \writeraw_@@:n #1
1803 { \iow_now:Nn \g_@@_rvlfile { #1 } }
1804 % \end{macrocode}
1805 % \end{macro}
1806 %
1807 % \begin{macro}{\writeraw\_@@:n}
1808 % \begin{macrocode}
1809 \cs_generate_variant:Nn \iow_now:Nn {No }
1810 \cs_new:Npn \writeraw_@@:o #1
1811 { \iow_now:No \g_@@_rvlfile { #1 } }
1812 % \end{macrocode}
1813 % \end{macro}
1814 %
1815 % Now initialize our \texttt{.rvl} file.
1816 %
1817 % \begin{macrocode}
1818 \writecomment_@@:n {Beamer-reveal~driver~file~
1819 (\tl_use:N \g_@@_fileversion_tl - \tl_use:N \g_@@_filedate_tl)}
1820 \writecontrol_@@:nn {Presentation} {}
1821 \tl_new:N \l_@@_my_compiler_tl
1822 \tl_set:Nn \l_@@_my_compiler_tl { unknown }
1823 \sys_if_engine_pdftex:T { \tl_set:Nn \l_@@_my_compiler_tl { pdflatex } }
1824 \sys_if_engine_xetex:T { \tl_set:Nn \l_@@_my_compiler_tl { xelatex } }
1825 \sys_if_engine_luatex:T { \tl_set:Nn \l_@@_my_compiler_tl { lualatex } }
1826 \AtBeginDocument{
1827 \writeliteral_@@:n {-parameters:
1828 latexversion={\tl_use:N \g_@@_fileversion_tl},
1829 latexdate={\tl_use:N \g_@@_filedate_tl},
1830 sourcefilename={\currfilename},
1831 title={\inserttitle},
1832 author={\beamer@shortauthor},
1833 compiler={\tl_use:N \l_@@_my_compiler_tl },
1834 \bool_if:NT \g_@@_embed_bool {embed={},}
1835 \bool_if:NTF \g_@@_loop_bool {loop={true}}{loop={false}},
1836 \int_compare:nNnTF \g_@@_autoslide_int < {0} {}{autoslide={\int_use:N \g_@@_autoslide_int},}
1837 canvaswidth={\int_use:N \g_@@_canvaswidth_int},
1838 canvasheight={\int_use:N \g_@@_canvasheight_int}
1839 }
1840 }
1841 %</reveal>
1842 % \end{macrocode}
1843 %
1844 % \subsection{Frame generation}
1845 %
1846 % \begin{macrocode}
1847 %<*reveal>
1848 \AddToHook{ env / frame / begin} {
1849 \bool_gset_false:N \g_@@_titlepage_bool
1850 \bool_gset_false:N \g_@@_sectionslide_bool
1851 \bool_gset_false:N \g_@@_subsectionslide_bool
1852 \bool_gset_false:N \g_@@_embed_bool
1853 \int_gset:Nn \g_@@_autoslide_int {-1}
1854 \tl_gset:Nn \g_@@_transition_tl {none}
1855 }
1856 \bool_new:N \g_@@_animonslide_bool
1857 \bool_new:N \g_@@_audioonslide_bool
1858 \bool_new:N \g_@@_iframeonslide_bool
1859 \AddToHook{ env / beamer@frameslide / before} {
1860 \bool_gset_false:N \g_@@_animonslide_bool
1861 \bool_gset_false:N \g_@@_audioonslide_bool
1862 \bool_gset_false:N \g_@@_iframeonslide_bool
1863 \writecontrol_@@:nn {BeamerFrame} {}
1864 }
1865 \AddToHook{ env / beamer@frameslide / end } {
1866 \mode<presentation>{
1867 \dim_zero_new:N \l_@@_markercount_dim
1868 \bool_if:NTF \g_@@_animonslide_bool {
1869 \dim_sub:Nn \l_@@_markercount_dim { 1ex }
1870 \tikz[overlay,remember~picture] \node[anchor=south~east,shape=
1871 circle,draw,gray,minimum~size=1mm,inner~sep=0pt,outer~sep=0pt,font=\TINY]
1872 at ($(current~page.south~east)+(\dim_use:N \l_@@_markercount_dim,+1ex)$) {A};
1873 }{}
1874 \bool_if:NTF \g_@@_iframeonslide_bool {
1875 \dim_sub:Nn \l_@@_markercount_dim { 1ex }
1876 \tikz[overlay,remember~picture] \node[anchor=south~east,shape=
1877 circle,draw,gray,minimum~size=1mm,inner~sep=0pt,outer~sep=0pt,font=\TINY]
1878 at ($(current~page.south~east)+(\dim_use:N \l_@@_markercount_dim,+1ex)$) {I};
1879 }{}
1880 \bool_if:NTF \g_@@_audioonslide_bool {
1881 \dim_sub:Nn \l_@@_markercount_dim { 1ex }
1882 \tikz[overlay,remember~picture] \node[anchor=south~east,shape=
1883 circle,draw,gray,minimum~size=1mm,inner~sep=0pt,outer~sep=0pt,font=\TINY]
1884 at ($(current~page.south~east)+(\dim_use:N \l_@@_markercount_dim,+1ex)$) {S};
1885 }{}
1886 }
1887 }
1888 \AddToHook{ env / beamer@frameslide / after} {
1889 \writeliteral_@@:n {-parameters:
1890 rawpage={\insertpagenumber},
1891 truepage={\insertframenumber},
1892 overlay={\insertoverlaynumber},
1893 transition={\tl_use:N \g_@@_transition_tl},
1894 \bool_if:NT \g_@@_embed_bool {embed={},}
1895 \int_compare:nNnTF \g_@@_autoslide_int < {0} {} {autoslide={\int_use:N \g_@@_autoslide_int},}
1896 \bool_if:NT \g_@@_embed_bool {embed={},}
1897 \bool_if:NTF \g_@@_sectionslide_bool
1898 {
1899 title={\secname},toc={section}
1900 }
1901 {
1902 \bool_if:NTF \g_@@_subsectionslide_bool
1903 {
1904 title={\subsecname},toc={subsection}
1905 }
1906 {
1907 \bool_if:NTF \g_@@_titlepage_bool
1908 {
1909 title={\beamer@shorttitle},toc={titlepage}
1910 }
1911 {
1912 \sys_if_engine_pdftex:TF % avoid pdflatex screwing up old accents
1913 {title={\unexpanded\expandafter{\beamer@shortframetitle}}}
1914 {title={\beamer@shortframetitle}}
1915 }
1916 }
1917 }
1918 }
1919 }
1920 \AtBeginDocument {
1921 \AddToHook { cmd / note / before } {
1922 \writeliteral_@@:n
1923 {-hasnote:true}
1924 }
1925 }
1926 %</reveal>
1927 % \end{macrocode}
1928 %
1929 % \subsection{Common keys for the macros}
1930 %
1931 % \begin{macrocode}
1932 %<*reveal>
1933 \fp_new:N \l_@@_mediawidth_fp
1934 \fp_new:N \l_@@_mediaheight_fp
1935 \fp_new:N \l_@@_mediaframerate_fp
1936 \fp_new:N \l_@@_mediaduration_fp
1937 \fp_new:N \l_@@_mediapdfprogress_fp
1938 \tl_new:N \l_@@_mediafit_tl
1939 \tl_new:N \l_@@_mediabackground_tl
1940 \tl_new:N \l_@@_mediahandoutprogress_tl
1941 \tl_new:N \l_@@_mediaprogress_tl
1942 \fp_new:N \l_@@_xposdelta_fp
1943 \fp_new:N \l_@@_yposdelta_fp
1944 \bool_new:N \l_@@_mediaembed_bool
1945 \bool_new:N \l_@@_mediaautoplay_bool
1946 \bool_new:N \l_@@_medialoop_bool
1947 \bool_new:N \l_@@_mediaboxdraw_bool
1948 \bool_new:N \l_@@_mediamuted_bool
1949 \bool_new:N \l_@@_mediacontrols_bool
1950 \tl_new:N \l_@@_mediaanchor_tl
1951 \bool_new:N \l_@@_mediaexpandonce_bool
1952
1953 \msg_new:nnn { beamerreveal / Syntax } { unknown-key }
1954 { Unknown~key~'#1'~for~media~(video,~animated,~...)~command. }
1955 \msg_new:nnn { beamerreveal / Syntax } { illegal-keys-video }
1956 { Illegal~key(s)~'#1'~for~a~\video. }
1957 \msg_new:nnn { beamerreveal / Syntax } { illegal-keys-image }
1958 { Illegal~key(s)~'#1'~for~an~\image. }
1959 \msg_new:nnn { beamerreveal / Syntax } { illegal-keys-iframe }
1960 { Illegal~key(s)~'#1'~for~an~\iframe. }
1961 \msg_new:nnn { beamerreveal / Syntax } { illegal-keys-animation }
1962 { Illegal~key(s)~'#1'~for~an~\animation. }
1963 \msg_new:nnn { beamerreveal / Syntax } { key-syntax-changed }
1964 { The~syntax~of~the~key~of~'#1'~changed;~change~this~into~'#2'. }
1965 \keys_define:nn { beamerreveal / media } {
1966 width .fp_set:N = \l_@@_mediawidth_fp,
1967 width .value_required:n = true,
1968 width .initial:n = 0,
1969 width .groups:n = { size },
1970 height .fp_set:N = \l_@@_mediaheight_fp,
1971 height .value_required:n = true,
1972 height .initial:n = 0,
1973 height .groups:n = { size },
1974 aspectratio .fp_set:N = \l_@@_mediaaspectratio_fp,
1975 aspectratio .value_required:n = true,
1976 aspectratio .groups:n = { size },
1977 fit .tl_set:N = \l_@@_mediafit_tl,
1978 fit .value_required:n = true,
1979 fit .initial:n = fill,
1980 fit .groups:n = { fit },
1981 background .tl_set:N = \l_@@_mediabackground_tl,
1982 background .value_required:n = true,
1983 background .initial:n = white,
1984 background .groups:n = { draw },
1985 draw .bool_set:N = \l_@@_mediaboxdraw_bool,
1986 draw .initial:n = false,
1987 draw .groups:n = { draw },
1988 embed .bool_set:N = \l_@@_mediaembed_bool,
1989 embed .initial:n = false,
1990 autoplay .bool_set:N = \l_@@_mediaautoplay_bool,
1991 autoplay .initial:n = false,
1992 autoplay .groups:n = { dynamic },
1993 loop .bool_set:N = \l_@@_medialoop_bool,
1994 loop .initial:n = false,
1995 loop .groups:n = { dynamic },
1996 controls .bool_set:N = \l_@@_mediacontrols_bool,
1997 controls .initial:n = false,
1998 controls .groups:n = { dynamic },
1999 muted .bool_set:N = \l_@@_mediamuted_bool,
2000 muted .initial:n = false,
2001 muted .groups:n = { sound },
2002 duration .fp_set:N = \l_@@_mediaduration_fp,
2003 duration .initial:n = 0,
2004 duration .value_required:n = true,
2005 duration .groups:n = { animation },
2006 pdfprogress .code:n = { \msg_fatal:nnnn { beamerreveal / Syntax } { key-syntax-changed }
2007 { pdfprogress=#1 } { progress=#1 } },
2008 pdfprogress .groups:n = { animation },
2009 pdf~progress .code:n = { \msg_fatal:nnnn { beamerreveal / Syntax } { key-syntax-changed }
2010 { pdf~progress=#1 } { progress=#1 } },
2011 pdf~progress .groups:n = { animation },
2012 handout~progress .code:n = { \msg_fatal:nnnn { beamerreveal / Syntax } { key-syntax-changed }
2013 { handout~progress=#1 } { progress={0.1|handout:1/0.2,2/0.5,3/0.75} } },
2014 handout~progress .groups:n = { animation },
2015 progress .tl_set:N = \l_@@_mediaprogress_tl,
2016 progress .value_required:n = true,
2017 progress .groups:n = { animation },
2018 framerate .fp_set:N = \l_@@_mediaframerate_fp,
2019 framerate .initial:n = 0,
2020 framerate .value_required:n = true,
2021 framerate .groups:n = { animation },
2022 expand~once .bool_set:N = \l_@@_mediaexpandonce_bool,
2023 expand~once .initial:n = false,
2024 expand~once .groups:n = { animation },
2025 anchor .choice:,
2026 anchor / center .code:n = { \fp_set:Nn \l_@@_xposdelta_fp { -0.5 }
2027 \fp_set:Nn \l_@@_yposdelta_fp { -0.5 }
2028 \tl_set:Nn \l_@@_mediaanchor_tl {#1} },
2029 anchor / west .code:n = { \fp_set:Nn \l_@@_xposdelta_fp { 0 }
2030 \fp_set:Nn \l_@@_yposdelta_fp { -0.5 }
2031 \tl_set:Nn \l_@@_mediaanchor_tl {#1} },
2032 anchor / north~west .code:n = { \fp_set:Nn \l_@@_xposdelta_fp { 0 }
2033 \fp_set:Nn \l_@@_yposdelta_fp { 0 }
2034 \tl_set:Nn \l_@@_mediaanchor_tl {#1} },
2035 anchor / north .code:n = { \fp_set:Nn \l_@@_xposdelta_fp { -0.5 }
2036 \fp_set:Nn \l_@@_yposdelta_fp { 0 }
2037 \tl_set:Nn \l_@@_mediaanchor_tl {#1} },
2038 anchor / north~east .code:n = { \fp_set:Nn \l_@@_xposdelta_fp { -1 }
2039 \fp_set:Nn \l_@@_yposdelta_fp { 0 }
2040 \tl_set:Nn \l_@@_mediaanchor_tl {#1} },
2041 anchor / east .code:n = { \fp_set:Nn \l_@@_xposdelta_fp { -1 }
2042 \fp_set:Nn \l_@@_yposdelta_fp { -0.5 }
2043 \tl_set:Nn \l_@@_mediaanchor_tl {#1} },
2044 anchor / south~east .code:n = { \fp_set:Nn \l_@@_xposdelta_fp { -1 }
2045 \fp_set:Nn \l_@@_yposdelta_fp { -1 }
2046 \tl_set:Nn \l_@@_mediaanchor_tl {#1} },
2047 anchor / south .code:n = { \fp_set:Nn \l_@@_xposdelta_fp { -0.5 }
2048 \fp_set:Nn \l_@@_yposdelta_fp { -1 }
2049 \tl_set:Nn \l_@@_mediaanchor_tl {#1} },
2050 anchor / south~west .code:n = { \fp_set:Nn \l_@@_xposdelta_fp { 0 }
2051 \fp_set:Nn \l_@@_yposdelta_fp { -1 }
2052 \tl_set:Nn \l_@@_mediaanchor_tl {#1} },
2053 anchor .value_required:n = true,
2054 anchor .initial:n = center,
2055 anchor .groups:n = { position },
2056 above .meta:n = { anchor = south },
2057 above .groups:n = { position },
2058 below .code:n = { anchor = north },
2059 below .groups:n = { position },
2060 left .code:n = { anchor = east },
2061 left .groups:n = { position },
2062 right .code:n = { anchor = west },
2063 right .groups:n = { position },
2064 above~left .code:n = { anchor = south east },
2065 above~left .groups:n = { position },
2066 above~right .code:n = { anchor = south west },
2067 above~right .groups:n = { position },
2068 below~left .code:n = { anchor = north east },
2069 below~left .groups:n = { position },
2070 below~right .code:n = { anchor = north west },
2071 below~right .groups:n = { position },
2072 unknown .code:n =
2073 {
2074 \msg_fatal:nne { beamerreveal / Syntax } { unknown-key } {\l_keys_key_str}
2075 },
2076 }
2077 %</reveal>
2078 % \end{macrocode}
2079 %
2080 % \subsection{Fiddling with relative widths/heights}
2081 % As mentioned in the section 'quirks' the package only allows specifying
2082 % box dimensions as height and an apsect ratio, or width and an
2083 % aspectratio. \textsc{beamer-reveal} will recalculate these into
2084 % fractional values relative to the slide width and height.\\
2085 % In order not to get lost in the calculations, let's find the equations we need to implement.
2086 % Let's call the absolute width and height $W$ and $L$ and the relative width and height $w$ and $h$.
2087 % Let $W_P$ and $H_P$ be the absolute page width and height. Obviously:
2088 % \begin{align}
2089 % w &= \frac{W}{W_P} & h = \frac{H}{H_P}
2090 % \end{align}
2091 % Now let's denote the aspectratio of an object as $A$ and the aspectratio of the page as $A_P$.
2092 % \begin{align}
2093 % A &= \frac{W}{H} & A_P &=\frac{W_P}{H_P}
2094 % \end{align}
2095 % This allows to calculate $w$ from $h$ and vice versa:
2096 % \begin{align}
2097 % w &= \frac{W}{W_P} = \frac{AH}{A_P H_P} = \frac{A}{A_P} h &
2098 % h &= \frac{H}{H_P} = \frac{W/A}{W_P/A_P} = \frac{A_P}{A} w
2099 % \end{align}
2100 % The following macro calculates verifies if at least the aspectratio $A$ has been given otherwise
2101 % a fatal error is generated. It then calculates $w$ from $h$ or $h$ from $w$ unless both $w$ and $h$
2102 % are missing, or unless both have been specified.
2103 % \begin{macro}{\process\_a\_w\_h\_@@:NNN}
2104 % \begin{macrocode}
2105 %<*reveal>
2106 \cs_new:Npn \process_a_w_h_@@:NNN #1#2#3 {
2107 \fp_compare:nNnTF { #1 } = {0} {
2108 \msg_fatal:nn { beamer-reveal } { missing-aspectratio }
2109 } {
2110 \fp_compare:nNnTF { #2 } = {0} {
2111 \fp_compare:nNnTF { #3 } = {0} {
2112 \msg_fatal:nn { beamer-reveal } { missing-width-or-height }
2113 } {
2114 % calculating w
2115 \fp_gset:Nn \l_tmpa_fp { round( #1 / \g_@@_canvasaspectratio_fp * #3, 6 ) }
2116 \fp_gset:Nn \l_tmpb_fp { #3 }
2117 }
2118 } {
2119 \fp_compare:nNnTF { #3 } = {0} {
2120 % calculating h
2121 \fp_gset:Nn \l_tmpa_fp { #2 }
2122 \fp_gset:Nn \l_tmpb_fp { round( \g_@@_canvasaspectratio_fp / #1 * #2, 6 ) }
2123 } {
2124 \msg_fatal:nn { beamer-reveal } { overconstrained-box }
2125 }
2126 }
2127 }
2128 \fp_set_eq:NN #2 \l_tmpa_fp
2129 \fp_set_eq:NN #3 \l_tmpb_fp
2130 }
2131 %</reveal>
2132 % \end{macrocode}
2133 % \end{macro}
2134 %
2135 % \subsection{Auxiliary functions}
2136 %
2137 % \begin{macro}{\@@extractloleft}
2138 % \begin{macrocode}
2139 %<*reveal>
2140 \newdimen\xloleft
2141 \newdimen\yloleft
2142 \newcommand*\@@extractloleft[1]{\path (#1);\pgfgetlastxy{\xloleft}{\yloleft};}
2143 %</reveal>
2144 % \end{macrocode}
2145 % \end{macro}
2146 %
2147 % \begin{macro}{\@@extractupright}
2148 % \begin{macrocode}
2149 %<*reveal>
2150 \newdimen\xupright
2151 \newdimen\yupright
2152 \newcommand*\@@extractupright[1]{\path (#1);\pgfgetlastxy{\xupright}{\yupright};}
2153 %</reveal>
2154 % \end{macrocode}
2155 % \end{macro}
2156 %
2157 % Finally, some native l3exp fp variables to hold $x$ and $y$ position.
2158 %
2159 % \begin{macrocode}
2160 %<*reveal>
2161 \fp_new:N \l_@@_xpos_fp
2162 \fp_new:N \l_@@_ypos_fp
2163 %</reveal>
2164 % \end{macrocode}
2165 %
2166 % \subsection{Macros}
2167 % \subsubsection{Main macros}
2168 % The macro's fiddle with positions and sizes of boxes. Therefore it helps to have the following
2169 % pictures in mind when reading the code.
2170 %
2171 % The parameters |\posx| and |\posy| are the relative \textsc{beamer} coördinates of the box.
2172 % The parameters |\l_@@_xpos_fp| and |\l_@@_ypos_fp| are the HTML top and left distances
2173 % of the top left corner of the box. All parameters are relative to the screen canvas dimensions
2174 % (and therefore have values in between 0 and 1).
2175 %
2176 % \begin{center}
2177 % \begin{tikzpicture}[scale=0.4,font=\footnotesize,
2178 % inner sep=1pt]
2179 % \draw[thick] (0,0) node[below right] {Screen canvas} rectangle (18,10);
2180 % \coordinate (m) at (12,5);
2181 % \coordinate (c) at ($(m)+(-3,2)$);
2182 % \draw[semithick] ($(m)-(3,2)$) node[below right] {Box} rectangle ($(m)+(3,2)$);
2183 % \fill (m) circle[radius=2pt];
2184 % \draw[<->] (m|-0,0) -- node[right,pos=0.33] {|\textbackslash{}posy|} (m);
2185 % \draw[<->] (m-|0,0) -- node[below,pos=0.4] {|\textbackslash{}posx|} (m);
2186 % \draw[<->] (c|-0,10) -- node[right,pos=0.5] {|\textbackslash{}l\_@@\_ypos\_fp|} (c);
2187 % \draw[<->] (c-|0,10) -- node[below,pos=0.5] {|\textbackslash{}l\_@@\_xpos\_fp|} (c);
2188 % \end{tikzpicture}
2189 % \end{center}
2190 % The width and height of the box have dedicated parameters.
2191 % \begin{center}
2192 % \begin{tikzpicture}[scale=0.4,font=\footnotesize,
2193 % inner sep=1pt],
2194 % \draw[thick] (0,0) node[below right] {Screen canvas} rectangle (18,10);
2195 % \coordinate (m) at (12,5);
2196 % \coordinate (c) at ($(m)+(-3,2)$);
2197 % \draw[semithick] ($(m)-(3,2)$) node[below right] {Box} rectangle ($(m)+(3,2)$);
2198 % \fill (m) circle[radius=2pt];
2199 % \draw[ultra thin]
2200 % (9,7) -- (9,8.1)
2201 % (15,7) -- (15,8.1);
2202 % \draw[<->] (9,8) -- node[above] {|\textbackslash{}l\_@@\_mediawidth\_fp|} (15,8);
2203 % \draw[ultra thin]
2204 % (9,3) -- (7.9,3)
2205 % (9,7) -- (7.9,7);
2206 % \draw[<->] (8,3) -- node[left] {|\textbackslash{}l\_@@\_mediaheight\_fp|} (8,7);
2207 % \end{tikzpicture}
2208 % \end{center}
2209 % The anchor of a box can be any of the main 8 wind directions (north, east, south, west, and the ones in between those).
2210 % This anchor location in combination with the width and height of the box, allow for a correction on the HTML coordinates.
2211 % The correction coefficients (relative to width and height) are:
2212 %
2213 % \begin{center}
2214 % \begin{tikzpicture}[scale=0.4,font=\footnotesize,
2215 % inner sep=1pt]
2216 % \draw[thick] (0,0) node[below right] {Screen canvas} rectangle (18,10);
2217 % \coordinate (m) at (12,5);
2218 % \coordinate (c) at ($(m)+(-3,2)$);
2219 % \draw[semithick,gray] ($(m)-(3,2)$) rectangle ($(m)+(3,2)$);
2220 % \foreach \x/\xpos in {0/left,0.5/,1/right} {
2221 % \foreach \y/\ypos in {0/above,0.5/above,1/below} {
2222 % \coordinate (p) at ($(c)+({\x*6},{-\y*4})$);
2223 % \node[font=\tiny,\ypos] at (p) {$({-\x},{-\y})$};
2224 % \fill (p) circle[radius=2pt];
2225 % }
2226 % }
2227 % \fill (m) circle[radius=2pt];
2228 % \end{tikzpicture}
2229 % \end{center}
2230 %
2231 % The flow of the macros is as follows. We use the |\video| macro as example:\\[-2\baselineskip]
2232 % \begin{verbatim}
2233 % - |\video|:
2234 % - knows it is a |Dynamic| element (= XXX below)
2235 % - parses the appropriate keys from the option parameter list
2236 % - raises a fatal error if unknown keys have been detected
2237 % - hands over to the
2238 % |\contentDispatcher|:
2239 % - checks if this is overlay content (|\at (x,y)|); hands over to the
2240 % |\overlayXXXContent|: generates overlay content
2241 % - checks if this is insert content (no |\at (x,y)|); hands over to the
2242 % |\insertXXXContent|: generates insert content
2243 % - otherwise: raises correct fatal syntax errors
2244 % \end{verbatim}
2245 %
2246 % \begin{macro}{\video}
2247 % \begin{macrocode}
2248 %<*reveal>
2249 \tl_new:N \l_@@_keyoverflow_tl
2250 \NewDocumentCommand\video{D<>{1-} O{} d() t\at d() m }{
2251 \only<#1> {
2252 % begin group to keep the key setting local
2253 \group_begin:
2254 \keys_set_exclude_groups:nnnN { beamerreveal / media } { animation } { #2 } \l_@@_keyoverflow_tl
2255 \tl_if_empty:NTF \l_@@_keyoverflow_tl {} {
2256 \msg_fatal:nne { beamerreveal / Syntax } { illegal-keys-video } { \l_@@_keyoverflow_tl }
2257 }
2258 \contentDispatcher_@@:nnnnnNN {#3} {#4} {#5} {#6} {video}
2259 \overlayDynamicContent_@@:nnnn
2260 \insertDynamicContent_@@:nnn
2261 \group_end:
2262 }
2263 }
2264 %</reveal>
2265 % \end{macrocode}
2266 % \end{macro}
2267 %
2268 % \begin{macro}{\audio}
2269 % \begin{macrocode}
2270 %<*reveal>
2271 \NewDocumentCommand\audio{ D<>{1-} O{} d() t\at d() m }{
2272 \only<#1> {
2273 \bool_gset_true:N \g_@@_audioonslide_bool
2274 % begin group to keep the key setting local
2275 \group_begin:
2276 \keys_set_exclude_groups:nnnN { beamerreveal / media } { animation } { #2 } \l_@@_keyoverflow_tl
2277 \tl_if_empty:NTF \l_@@_keyoverflow_tl {} {
2278 \msg_fatal:nne { beamerreveal / Syntax } { illegal-keys-audio } { \l_@@_keyoverflow_tl }
2279 }
2280 \contentDispatcher_@@:nnnnnNN {#3} {#4} {#5} {#6} {audio}
2281 \overlayDynamicContent_@@:nnnn
2282 \insertDynamicContent_@@:nnn
2283 \group_end:
2284 }
2285 }
2286 %</reveal>
2287 % \end{macrocode}
2288 % \end{macro}
2289 %
2290 % \begin{macro}{\iframe}
2291 % \begin{macrocode}
2292 %<*reveal>
2293 \NewDocumentCommand\iframe{D<>{1-} O{} d() t\at d() m }{
2294 \only<#1> {
2295 \bool_gset_true:N \g_@@_iframeonslide_bool
2296 % begin group to keep the key setting local
2297 \group_begin:
2298 \keys_set_exclude_groups:nnnN
2299 { beamerreveal / media } { dynamic, sound, animation } { #2 } \l_@@_keyoverflow_tl
2300 \tl_if_empty:NTF \l_@@_keyoverflow_tl {} {
2301 \msg_fatal:nne { beamerreveal / Syntax } { illegal-keys-iframe } { \l_@@_keyoverflow_tl }
2302 }
2303 \contentDispatcher_@@:nnnnnNN {#3} {#4} {#5} {#6} {iframe}
2304 \overlayDynamicContent_@@:nnnn
2305 \insertDynamicContent_@@:nnn
2306 \group_end:
2307 }
2308 }
2309 %</reveal>
2310 % \end{macrocode}
2311 % %\end{macro}
2312 %
2313 % \begin{macro}{\image}
2314 % \begin{macrocode}
2315 %<*reveal>
2316 \NewDocumentCommand\image{D<>{1-} O{} d() t\at d() m}{
2317 \only<#1> {
2318 % begin group to keep the key setting local
2319 \group_begin:
2320 \keys_set_exclude_groups:nnnN
2321 { beamerreveal / media } { dynamic, sound, animation } { #2 } \l_@@_keyoverflow_tl
2322 \tl_if_empty:NTF \l_@@_keyoverflow_tl {} {
2323 \msg_fatal:nne { beamerreveal / Syntax } { illegal-keys-image } { \l_@@_keyoverflow_tl }
2324 }
2325 \contentDispatcher_@@:nnnnnNN {#3} {#4} {#5} {#6} {image}
2326 \overlayStaticContent_@@:nnnn
2327 \insertStaticContent_@@:nnn
2328 \group_end:
2329 }
2330 }
2331 %</reveal>
2332 % \end{macrocode}
2333 % %\end{macro}
2334 %
2335 % \begin{macro}{\animation}
2336 % \begin{macrocode}
2337 %<*reveal>
2338 \NewDocumentCommand\animation{D<>{1-} O{} d() t\at d() +m}{
2339 \only<#1> {
2340 \bool_gset_true:N \g_@@_animonslide_bool
2341 % begin group to keep the key setting local
2342 \group_begin:
2343 \keys_set_exclude_groups:nnnN
2344 { beamerreveal / media } { size, sound, fit } { #2 } \l_@@_keyoverflow_tl
2345 \tl_if_empty:NTF \l_@@_keyoverflow_tl {} {
2346 \msg_fatal:nne { beamerreveal / Syntax } { illegal-keys-animation } { \l_@@_keyoverflow_tl }
2347 }
2348 \contentDispatcher_@@:nnnnnNN {#3} {#4} {#5} {#6} {animation}
2349 \overlayFixedContent_@@:nnnn
2350 \insertFixedContent_@@:nnn
2351 \group_end:
2352 }
2353 }
2354 %</reveal>
2355 % \end{macrocode}
2356 % \end{macro}
2357 %
2358 % \begin{macro}{\still}
2359 % \begin{macrocode}
2360 %<*reveal>
2361 \NewDocumentCommand\still{D<>{1-} O{} d() t\at d() +m}{
2362 \only<#1> {
2363 % begin group to keep the key setting local
2364 \group_begin:
2365 \keys_set_exclude_groups:nnnN
2366 { beamerreveal / media } { size, sound, fit, dynamic } { #2 } \l_@@_keyoverflow_tl
2367 \tl_if_empty:NTF \l_@@_keyoverflow_tl {} {
2368 \msg_fatal:nne { beamerreveal / Syntax } { illegal-keys-animation } { \l_@@_keyoverflow_tl }
2369 }
2370 \contentDispatcher_@@:nnnnnNN {#3} {#4} {#5} {#6} {still}
2371 \overlayFixedContent_@@:nnnn
2372 \insertFixedContent_@@:nnn
2373 \group_end:
2374 }
2375 }
2376 %</reveal>
2377 % \end{macrocode}
2378 % \end{macro}
2379 %
2380 % \begin{macro}{\voiceover}
2381 % \begin{macrocode}
2382 %<*reveal>
2383 \int_zero_new:N \g_@@_voiceovercounter_int
2384 \str_new:N \g_@@_voicoverext_str
2385 \str_gset:Nn \g_@@_voiceoverext_str { ERROR }
2386 \str_new:N \g_@@_voiceover_str
2387 \str_gset:Nn \g_@@_voiceover_str { ERROR }
2388 \str_new:N \g_@@_voicovertts_str
2389 \str_gset:Nn \g_@@_voiceovertts_str { ERROR }
2390 \NewDocumentCommand\voiceover{ D<>{1-} O{} +m }{
2391 \only<#1> {
2392 \int_gincr:N \g_@@_voiceovercounter_int
2393 \writeliteral_@@:n {
2394 -voiceover:
2395 file={voiceover-\int_use:N \g_@@_voiceovercounter_int \str_use:N \g_@@_voiceoverext_str},
2396 ext={\str_use:N \g_@@_voiceoverext_str},
2397 voice={\str_use:N \g_@@_voiceover_str},
2398 tool={\str_use:N \g_@@_voiceovertts_str},
2399 text={#3}
2400 }
2401 \audio<#1> [autoplay,aspectratio=16/9,width=1cm,#2] \at (0,0)
2402 {voiceover-\int_use:N \g_@@_voiceovercounter_int \str_use:N \g_@@_voiceoverext_str}
2403 }
2404 }
2405 %</reveal>
2406 % \end{macrocode}
2407 % \end{macro}
2408 %
2409 % \begin{macro}{\setvoiceovertts}
2410 % \begin{macrocode}
2411 %<*reveal>
2412 \NewDocumentCommand\setvoiceovertts{ m }{
2413 \str_gset:Nn \g_@@_voiceovertts_str {#1}
2414 }
2415 %</reveal>
2416 % \end{macrocode}
2417 % \end{macro}
2418 %
2419 % \begin{macro}{\setvoiceoverext}
2420 % \begin{macrocode}
2421 %<*reveal>
2422 \NewDocumentCommand\setvoiceoverext{ m }{
2423 \str_gset:Nn \g_@@_voiceoverext_str {#1}
2424 }
2425 %</reveal>
2426 % \end{macrocode}
2427 % \end{macro}
2428 %
2429 %
2430 % \begin{macro}{\setvoiceover}
2431 % \begin{macrocode}
2432 %<*reveal>
2433 \NewDocumentCommand\setvoiceover{ m }{
2434 \str_gset:Nn \g_@@_voiceover_str {#1}
2435 }
2436 %</reveal>
2437 % \end{macrocode}
2438 % \end{macro}
2439 %
2440 %
2441 % \subsubsection{Auxiliary macros}
2442 %
2443 % \begin{macro}{\at}\\
2444 % This is actually no macro, it even won't clash with a macro called |\at| that the
2445 % user may declare. It is just a parsing token as documented in |usrguide.pdf|
2446 % under 'control sequence tokens'.
2447 % \end{macro}
2448 %
2449 % \begin{macro}{\contentDispatcher\_@@:nnnnn}
2450 % \begin{macrocode}
2451 %<*reveal>
2452 \cs_new:Npn \contentDispatcher_@@:nnnnnNN #1 #2 #3 #4 #5 #6 #7 {
2453 \IfBooleanTF{#2}
2454 {% \at
2455 \IfNoValueTF{#3}
2456 { \msg_fatal:nn { beamerreveal / Syntax } { missing-coordinate } }
2457 { #6 {#1} {#3} {#4} {#5} }
2458 }
2459 {
2460 %no \at
2461 \IfNoValueTF{#3}
2462 {
2463 \tl_if_eq:nnTF {#4} a
2464 { \msg_fatal:nn { beamerreveal / Syntax } { old-at-syntax } }
2465 { #7 {#1} {#4} {#5} }
2466 }
2467 { \msg_fatal:nn { beamerreveal / Syntax } { missing-at } }
2468 }
2469 }
2470 %</reveal>
2471 % \end{macrocode}
2472 % \end{macro}
2473 %
2474 % \begin{macro}{\overlayDynamicContent\_@@:nnnn}
2475 % \begin{macrocode}
2476 %<*reveal>
2477 \cs_new:Npn \overlayDynamicContent_@@:nnnn #1#2#3#4 {
2478 % convert combination width/aspectratio to height, or
2479 % height/aspectratio to width
2480 \process_a_w_h_@@:NNN \l_@@_mediaaspectratio_fp \l_@@_mediawidth_fp \l_@@_mediaheight_fp
2481
2482 % extract relative position from bottom left of page (0,0) to top right (1,1)
2483 \seq_set_split:Nnn \l_tmpa_seq { , } { #2 }
2484 \pgfmathsetmacro{\posx}{\seq_item:Nn \l_tmpa_seq {1}}
2485 \pgfmathsetmacro{\posy}{\seq_item:Nn \l_tmpa_seq {2}}
2486 % convert to html coordinates from top left corner, and correct for anchor location
2487 \fp_set:Nn \l_@@_xpos_fp { \posx + \l_@@_xposdelta_fp * \l_@@_mediawidth_fp }
2488 \fp_set:Nn \l_@@_ypos_fp { (1-\posy) + \l_@@_yposdelta_fp * \l_@@_mediaheight_fp }
2489
2490 % write info to .rvl file
2491 \writeliteral_@@:n {
2492 -#4:
2493 width={\fp_use:N \l_@@_mediawidth_fp},
2494 height={\fp_use:N \l_@@_mediaheight_fp},
2495 fit={\tl_use:N \l_@@_mediafit_tl},
2496 background={\tl_use:N \l_@@_mediabackground_tl},
2497 \bool_if:NTF \l_@@_mediaautoplay_bool {autoplay={},} {}
2498 \bool_if:NTF \l_@@_mediacontrols_bool {controls={},} {}
2499 \bool_if:NTF \l_@@_medialoop_bool {loop={},} {}
2500 \bool_if:NTF \l_@@_mediamuted_bool {muted={},} {}
2501 \bool_if:NTF \l_@@_mediaembed_bool {embed={},} {}
2502 x={\fp_use:N \l_@@_xpos_fp},
2503 y={\fp_use:N \l_@@_ypos_fp},
2504 file={#3}
2505 }
2506
2507 % write node to PDF file
2508 \bool_if:NTF \l_@@_mediaboxdraw_bool {
2509 \begin{tikzpicture}[overlay,remember~picture,font=\tiny]
2510 \@@extractloleft{$(current~page.south~west)$}
2511 \@@extractupright{$(current~page.north~east)$}
2512 \node[
2513 anchor = \tl_use:N \l_@@_mediaanchor_tl,
2514 minimum~width={\fp_use:N \l_@@_mediawidth_fp * (\xupright - \xloleft)},
2515 minimum~height={\fp_use:N \l_@@_mediaheight_fp * (\yupright - \yloleft)},
2516 draw,
2517 fill=\tl_use:N \l_@@_mediabackground_tl,
2518 ] (#1) at ({\xloleft*(1-\posx)+\xupright*\posx},{\yloleft*(1-\posy)+\yupright*\posy})
2519 {\textcolor{gray}{#3}};
2520 \end{tikzpicture}
2521 }{}
2522 }
2523 %</reveal>
2524 % \end{macrocode}
2525 % \end{macro}
2526 %
2527 % \begin{macro}{\insertDynamicContent\_@@:nnn}
2528 % \begin{macrocode}
2529 %<*reveal>
2530 \cs_new:Npn \insertDynamicContent_@@:nnn #1#2#3 {
2531 % parameters: nodename filename content-type
2532 % convert combination width/aspectratio to height, or
2533 % height/aspectratio to width
2534 \process_a_w_h_@@:NNN \l_@@_mediaaspectratio_fp \l_@@_mediawidth_fp \l_@@_mediaheight_fp
2535
2536 \fp_set:Nn \l_tmpa_fp { \dim_eval:n { \pagewidth } }
2537 \fp_set:Nn \l_tmpb_fp { \dim_eval:n { \pageheight } }
2538
2539 % write node to PDF file
2540 \begin{tikzpicture}[remember~picture,font=\tiny]
2541 \node[
2542 outer~sep=0pt,inner~sep=0pt,rectangle,
2543 anchor = \tl_use:N \l_@@_mediaanchor_tl,
2544 minimum~width={\fp_use:N \l_@@_mediawidth_fp * \fp_use:N \l_tmpa_fp },
2545 minimum~height={\fp_use:N \l_@@_mediaheight_fp * \fp_use:N \l_tmpb_fp },
2546 \bool_if:NTF \l_@@_mediaboxdraw_bool {draw}{},
2547 fill=\tl_use:N \l_@@_mediabackground_tl,
2548 ] (#1) {\bool_if:NTF \l_@@_mediaboxdraw_bool {\textcolor{gray}{#2}}{}};
2549 \path let \p1=($(#1.north~west) - (current~page.north~west)$)
2550 in \pgfextra{
2551 \fp_set:Nn \l_@@_xpos_fp { \x1 / \fp_use:N \l_tmpa_fp }
2552 \fp_set:Nn \l_@@_ypos_fp { - \y1 / \fp_use:N \l_tmpb_fp }
2553 % write info to .rvl file
2554 \writeliteral_@@:n {
2555 -#3:
2556 width={\fp_use:N \l_@@_mediawidth_fp},
2557 height={\fp_use:N \l_@@_mediaheight_fp},
2558 fit={\tl_use:N \l_@@_mediafit_tl},
2559 background={\tl_use:N \l_@@_mediabackground_tl},
2560 \bool_if:NTF \l_@@_mediaautoplay_bool {autoplay={},} {}
2561 \bool_if:NTF \l_@@_mediacontrols_bool {controls={},} {}
2562 \bool_if:NTF \l_@@_medialoop_bool {loop={},} {}
2563 \bool_if:NTF \l_@@_mediamuted_bool {muted={},} {}
2564 x={\fp_use:N \l_@@_xpos_fp},
2565 y={\fp_use:N \l_@@_ypos_fp},
2566 file={#2}
2567 }
2568 };
2569 \end{tikzpicture}
2570 }
2571 %</reveal>
2572 % \end{macrocode}
2573 % \end{macro}
2574 %
2575 % \begin{macro}{\overlayStaticContent\_@@:nnnn}
2576 % \begin{macrocode}
2577 %<*reveal>
2578 \cs_new:Npn \overlayStaticContent_@@:nnnn #1#2#3#4 {
2579 % convert combination width/aspectratio to height, or
2580 % height/aspectratio to width
2581 \process_a_w_h_@@:NNN \l_@@_mediaaspectratio_fp \l_@@_mediawidth_fp \l_@@_mediaheight_fp
2582
2583 % extract relative position from bottom left of page (0,0) to top right (1,1)
2584 \seq_set_split:Nnn \l_tmpa_seq { , } { #2 }
2585 \pgfmathsetmacro{\posx}{\seq_item:Nn \l_tmpa_seq {1}}
2586 \pgfmathsetmacro{\posy}{\seq_item:Nn \l_tmpa_seq {2}}
2587 % convert to html coordinates from top left corner, and correct for anchor location
2588 \fp_set:Nn \l_@@_xpos_fp { \posx + \l_@@_xposdelta_fp * \l_@@_mediawidth_fp }
2589 \fp_set:Nn \l_@@_ypos_fp { (1-\posy) + \l_@@_yposdelta_fp * \l_@@_mediaheight_fp }
2590
2591 % write info to .rvl file
2592 \writeliteral_@@:n {
2593 -#4:
2594 width={\fp_use:N \l_@@_mediawidth_fp},
2595 height={\fp_use:N \l_@@_mediaheight_fp},
2596 fit={\tl_use:N \l_@@_mediafit_tl},
2597 background={\tl_use:N \l_@@_mediabackground_tl},
2598 \bool_if:NTF \l_@@_mediaautoplay_bool {autoplay={true},} {}
2599 \bool_if:NTF \l_@@_mediaembed_bool {embed={},} {}
2600 x={\fp_use:N \l_@@_xpos_fp},
2601 y={\fp_use:N \l_@@_ypos_fp},
2602 file={#3}
2603 }
2604
2605 % write node to PDF file
2606 \bool_if:NTF \l_@@_mediaboxdraw_bool {
2607 \begin{tikzpicture}[overlay,remember~picture,font=\tiny]
2608 \@@extractloleft{$(current~page.south~west)$}
2609 \@@extractupright{$(current~page.north~east)$}
2610 \node[
2611 anchor = \tl_use:N \l_@@_mediaanchor_tl,
2612 minimum~width={\fp_use:N \l_@@_mediawidth_fp * (\xupright - \xloleft)},
2613 minimum~height={\fp_use:N \l_@@_mediaheight_fp * (\yupright - \yloleft)},
2614 draw,
2615 fill=\tl_use:N \l_@@_mediabackground_tl,
2616 ] (#1) at ({\xloleft*(1-\posx)+\xupright*\posx},{\yloleft*(1-\posy)+\yupright*\posy})
2617 {\textcolor{gray}{#3}};
2618 \end{tikzpicture}
2619 }{}
2620 }
2621 %</reveal>
2622 % \end{macrocode}
2623 % \end{macro}
2624 %
2625 % \begin{macro}{\insertStaticContent\_@@:nnn}
2626 % \begin{macrocode}
2627 %<*reveal>
2628 \cs_new:Npn \insertStaticContent_@@:nnn #1#2#3 {
2629 % convert combination width/aspectratio to height, or
2630 % height/aspectratio to width
2631 \process_a_w_h_@@:NNN \l_@@_mediaaspectratio_fp \l_@@_mediawidth_fp \l_@@_mediaheight_fp
2632
2633 \fp_set:Nn \l_tmpa_fp { \dim_eval:n { \pagewidth } }
2634 \fp_set:Nn \l_tmpb_fp { \dim_eval:n { \pageheight } }
2635
2636 % write node to PDF file
2637 \begin{tikzpicture}[remember~picture,font=\tiny]%
2638 \node[
2639 outer~sep=0pt,inner~sep=0pt,rectangle,
2640 anchor = \tl_use:N \l_@@_mediaanchor_tl,
2641 minimum~width={\fp_use:N \l_@@_mediawidth_fp * \fp_use:N \l_tmpa_fp },
2642 minimum~height={\fp_use:N \l_@@_mediaheight_fp * \fp_use:N \l_tmpb_fp },
2643 \bool_if:NTF \l_@@_mediaboxdraw_bool {draw}{},
2644 \bool_if:NTF \l_@@_mediaembed_bool {embed={},} {}
2645 fill=\tl_use:N \l_@@_mediabackground_tl,
2646 ] (#1) {\bool_if:NTF \l_@@_mediaboxdraw_bool {\textcolor{gray}{#2}}{}};
2647 \path let \p1=($(#1.north~west) - (current~page.north~west)$)
2648 in \pgfextra{
2649 \fp_set:Nn \l_@@_xpos_fp { \x1 / \fp_use:N \l_tmpa_fp }
2650 \fp_set:Nn \l_@@_ypos_fp { - \y1 / \fp_use:N \l_tmpb_fp }
2651 % write info to .rvl file
2652 \writeliteral_@@:n {
2653 -#3:
2654 width={\fp_use:N \l_@@_mediawidth_fp},
2655 height={\fp_use:N \l_@@_mediaheight_fp},
2656 fit={\tl_use:N \l_@@_mediafit_tl},
2657 background={\tl_use:N \l_@@_mediabackground_tl},
2658 \bool_if:NTF \l_@@_mediaautoplay_bool {autoplay={true},} {}
2659 x={\fp_use:N \l_@@_xpos_fp},
2660 y={\fp_use:N \l_@@_ypos_fp},
2661 file={#2}
2662 }
2663 };
2664 \end{tikzpicture}
2665 }
2666 %</reveal>
2667 % \end{macrocode}
2668 % \end{macro}
2669 %
2670 % \begin{macro}{\overlayFixedContent\_@@:nnnn}
2671 % \begin{macrocode}
2672 %<*reveal>
2673 \cs_new:Npn \overlayFixedContent_@@:nnnn #1#2#3#4 {
2674 % set up the progress macro
2675 \regex_split:nVN {\|handout:} { \l_@@_mediaprogress_tl } \l_tmpa_seq
2676 \fp_set:Nn \l_@@_mediapdfprogress_fp { \seq_item:Nn \l_tmpa_seq {1} }
2677 \tl_set:Nx \l_@@_mediahandoutprogress_tl { \seq_item:Nn \l_tmpa_seq {2} }
2678 \str_if_eq:eeTF { \use:c { beamer@currentmode } } { handout }
2679 {
2680 \tl_if_empty:NTF \l_@@_mediahandoutprogress_tl {
2681 \pgfmathsetmacro \progress { \fp_use:N \l_@@_mediapdfprogress_fp }
2682 }{
2683 \regex_split:nVN { , } { \l_@@_mediahandoutprogress_tl } \l_tmpa_seq
2684 \seq_map_inline:Nn \l_tmpa_seq {
2685 \regex_split:nnN { / } { ##1 } \l_tmpb_seq
2686 \int_compare:nT { \use:c {beamer@overlaynumber} == \seq_item:Nn \l_tmpb_seq {1} }
2687 {
2688 \pgfmathsetmacro\progress{ \seq_item:Nn \l_tmpb_seq {2} }
2689 }
2690 }
2691 }
2692 }
2693 { \pgfmathsetmacro \progress { \fp_use:N \l_@@_mediapdfprogress_fp } }
2694
2695 % now set the content in a box and measure it
2696 \hbox_set:Nn \l_tmpa_box {\tl_trim_spaces:n{#2}}
2697 \pgfmathsetmacro\progress{ \fp_use:N \l_@@_mediapdfprogress_fp }%
2698 \hbox_set:Nn \l_tmpa_box {\tl_trim_spaces:n{#3}}
2699 \fp_set:Nn \l_tmpa_fp { \dim_eval:n { \box_wd:N \l_tmpa_box } }
2700 \fp_set:Nn \l_tmpb_fp { \dim_eval:n { \pagewidth } }
2701 \fp_set:Nn \l_@@_mediawidth_fp { \fp_eval:n { \l_tmpa_fp / \l_tmpb_fp } }
2702 \fp_set:Nn \l_tmpa_fp { \dim_eval:n { \box_ht:N \l_tmpa_box } }
2703 \fp_set:Nn \l_tmpb_fp { \dim_eval:n { \pageheight } }
2704 \fp_set:Nn \l_@@_mediaheight_fp { \fp_eval:n { \l_tmpa_fp / \l_tmpb_fp } }
2705
2706 % extract relative position from bottom left of page (0,0) to top right (1,1)
2707 \seq_set_split:Nnn \l_tmpa_seq { , } { #2 }
2708 \pgfmathsetmacro{\posx}{\seq_item:Nn \l_tmpa_seq {1}}
2709 \pgfmathsetmacro{\posy}{\seq_item:Nn \l_tmpa_seq {2}}
2710
2711 % convert to html coordinates from top left corner, and correct for anchor location
2712 \fp_set:Nn \l_@@_xpos_fp { \posx + \l_@@_xposdelta_fp * \l_@@_mediawidth_fp }
2713 \fp_set:Nn \l_@@_ypos_fp { (1-\posy) + \l_@@_yposdelta_fp * \l_@@_mediaheight_fp }
2714
2715 % write .rvl information
2716 \writeliteral_@@:n {
2717 -#4:
2718 width={ \fp_use:N \l_@@_mediawidth_fp },
2719 height={ \fp_use:N \l_@@_mediaheight_fp },
2720 framerate={ \fp_use:N \l_@@_mediaframerate_fp },
2721 duration={ \fp_use:N \l_@@_mediaduration_fp },
2722 progress={ \fp_use:N \l_@@_mediapdfprogress_fp },
2723 \bool_if:NTF \l_@@_mediaembed_bool {embed={},} {}
2724 x={\fp_use:N \l_@@_xpos_fp},
2725 y={\fp_use:N \l_@@_ypos_fp},
2726 fit={fit},
2727 background={\tl_use:N \l_@@_mediabackground_tl},
2728 \bool_if:NTF \l_@@_mediaautoplay_bool {autoplay={},} {}
2729 \bool_if:NTF \l_@@_medialoop_bool {loop={},} {}
2730 \bool_if:NTF \l_@@_mediacontrols_bool {controls={},} {}
2731 }
2732
2733 % put node in PDF files
2734 \begin{tikzpicture}[overlay,remember~picture,font=\tiny]%
2735 \@@extractloleft{$(current~page.south~west)$}
2736 \@@extractupright{$(current~page.north~east)$}
2737 \node[
2738 outer~sep=0pt,inner~sep=0pt,rectangle,
2739 \bool_if:NTF \l_@@_mediaboxdraw_bool {draw}{},
2740 ]
2741 (#1) at ({\xloleft*(1-\posx)+\xupright*\posx},{\yloleft*(1-\posy)+\yupright*\posy})
2742 {\box_use:N \l_tmpa_box};
2743 \end{tikzpicture}%
2744
2745
2746 %
2747 % write code to .rvl file
2748 \bool_if:NTF \l_@@_mediaexpandonce_bool
2749 { \writeraw_@@:o { #3 } } { \writeraw_@@:n { #3 } }
2750 }
2751 %</reveal>
2752 % \end{macrocode}
2753 % \end{macro}
2754 %
2755 % \begin{macro}{\insertFixedContent\_@@:nnn}
2756 % \begin{macrocode}
2757 %<*reveal>
2758 \cs_new:Npn \insertFixedContent_@@:nnn #1#2#3 {
2759 %% % first create the box with the content and measure it
2760 % check if we are in handout mode
2761 \regex_split:nVN {\|handout:} { \l_@@_mediaprogress_tl } \l_tmpa_seq
2762 \fp_set:Nn \l_@@_mediapdfprogress_fp { \seq_item:Nn \l_tmpa_seq {1} }
2763 \tl_set:Nx \l_@@_mediahandoutprogress_tl { \seq_item:Nn \l_tmpa_seq {2} }
2764 \str_if_eq:eeTF { \use:c { beamer@currentmode } } { handout }
2765 {
2766 \tl_if_empty:NTF \l_@@_mediahandoutprogress_tl {
2767 \pgfmathsetmacro \progress { \fp_use:N \l_@@_mediapdfprogress_fp }
2768 }{
2769 \regex_split:nVN { , } { \l_@@_mediahandoutprogress_tl } \l_tmpa_seq
2770 \seq_map_inline:Nn \l_tmpa_seq {
2771 \regex_split:nnN { / } { ##1 } \l_tmpb_seq
2772 \int_compare:nT { \use:c {beamer@overlaynumber} == \seq_item:Nn \l_tmpb_seq {1} }
2773 {
2774 \pgfmathsetmacro\progress{ \seq_item:Nn \l_tmpb_seq {2} }
2775 }
2776 }
2777 }
2778 }
2779 { \pgfmathsetmacro \progress { \fp_use:N \l_@@_mediapdfprogress_fp } }
2780
2781 % now set the content in a box and measure it
2782 \hbox_set:Nn \l_tmpa_box {\tl_trim_spaces:n{#2}}
2783 \fp_set:Nn \l_tmpa_fp { \dim_eval:n { \box_wd:N \l_tmpa_box } }
2784 \fp_set:Nn \l_tmpb_fp { \dim_eval:n { \pagewidth } }
2785 \fp_set:Nn \l_@@_mediawidth_fp { \fp_eval:n { \l_tmpa_fp / \l_tmpb_fp } }
2786 \fp_set:Nn \l_tmpa_fp { \dim_eval:n { \box_ht:N \l_tmpa_box } }
2787 \fp_set:Nn \l_tmpb_fp { \dim_eval:n { \pageheight } }
2788 \fp_set:Nn \l_@@_mediaheight_fp { \fp_eval:n { \l_tmpa_fp / \l_tmpb_fp } }
2789 % restore the pagewidth in tmpa
2790 \fp_set:Nn \l_tmpa_fp { \dim_eval:n { \pagewidth } }
2791
2792 % write node to PDF file
2793 \begin{tikzpicture}[remember~picture,font=\tiny]
2794 \node[
2795 outer~sep=0pt,inner~sep=0pt,rectangle,
2796 \bool_if:NTF \l_@@_mediaboxdraw_bool {draw}{},
2797 ] (#1) {\box_use:N \l_tmpa_box};
2798 \path let \p1=($(#1.north~west) - (current~page.north~west)$)
2799 in \pgfextra{
2800 \fp_set:Nn \l_@@_xpos_fp { \x1 / \fp_use:N \l_tmpa_fp }
2801 \fp_set:Nn \l_@@_ypos_fp { - \y1 / \fp_use:N \l_tmpb_fp }
2802 % write info to .rvl file
2803 \writeliteral_@@:n {
2804 -#3:
2805 width={ \fp_use:N \l_@@_mediawidth_fp },
2806 height={ \fp_use:N \l_@@_mediaheight_fp },
2807 framerate={ \fp_use:N \l_@@_mediaframerate_fp },
2808 duration={ \fp_use:N \l_@@_mediaduration_fp },
2809 progress={ \fp_use:N \l_@@_mediapdfprogress_fp },
2810 \bool_if:NTF \l_@@_mediaembed_bool {embed={},} {}
2811 x={\fp_use:N \l_@@_xpos_fp},
2812 y={\fp_use:N \l_@@_ypos_fp},
2813 fit={fit},
2814 background={\tl_use:N \l_@@_mediabackground_tl},
2815 \bool_if:NTF \l_@@_mediaautoplay_bool {autoplay={},} {}
2816 \bool_if:NTF \l_@@_medialoop_bool {loop={},} {}
2817 \bool_if:NTF \l_@@_mediacontrols_bool {controls={},} {}
2818 }
2819 };
2820 \end{tikzpicture}
2821 \bool_if:NTF \l_@@_mediaexpandonce_bool
2822 { \writeraw_@@:o { #2 } } { \writeraw_@@:n { #2 } }
2823 }
2824 %</reveal>
2825 % \end{macrocode}
2826 % \end{macro}
2827 %
2828 % \subsection{Postamble}
2829 %
2830 % \begin{macrocode}
2831 %<*reveal>
2832 \AtEndDocument{
2833 \ExplSyntaxOn
2834 \iow_close:N \g_@@_rvlfile
2835 \ExplSyntaxOff
2836 }
2837 \ExplSyntaxOff
2838 %</reveal>
2839 % \end{macrocode}
2840 % \clearpage
2841 %
2842 % \bibliographystyle{alpha}
2843 %
2844 % \begin{thebibliography}{99}
2845 %
2846 % \bibitem{beamer}
2847 % Till Tantau et al., "beamer - A \LaTeX{} class for producing
2848 % presentations and slides",
2849 % \newblock \url{https://ctan.org/pkg/beamer},
2850 % \newblock online, accessed in December 2025.
2851 % \bibitem{movie15}
2852 % Alexander Grahn, "movie15 - Multimedia inclusion package",
2853 % \newblock \url{https://ctan.org/pkg/movie15},
2854 % \newblock online, accessed in December 2025.
2855 % \bibitem{media9}
2856 % Alexander Grahn, "media9 - Multimedia inclusion package with Adobe Reader-9/X compatibility",
2857 % \newblock \url{https://ctan.org/pkg/media9},
2858 % \newblock online, accessed in December 2025.
2859 % \bibitem{reveal}
2860 % Hakim El Hattab et al., "reveal.js - The HTML Presentation framework",
2861 % \newblock \url{https://revealjs.com},
2862 % \newblock online, accessed in January 2026.
2863 % \bibitem{quarto}
2864 % Posit Software - PBC, "Quarto - An open-source scientific and technical publishing system",
2865 % \newblock \url{https://quarto.org},
2866 % \newblock online, accessed in January 2026.
2867 % \bibitem{manim}
2868 % Grant Sanderson, "manim - A community maintained Python library for creating mathematical animations",
2869 % \newblock \url{https://www.manim.community},
2870 % \newblock online, accessed in December 2025.
2871 % \bibitem{pdfcrop}
2872 % Heiko Oberdiek, "pdfcrop - Crop PDF graphics",
2873 % \newblock \url{https://ctan.org/pkg/pdfcrop},
2874 % \newblock online, accessed in December 2025.
2875 % \bibitem{pdftoppm}
2876 % Poppler developers, "Poppler Utilities (pdftoppm)",
2877 % \newblock \url{https://poppler.freedesktop.org},
2878 % \newblock oline, accessed in December 2025.
2879 % \bibitem{ffmpeg}
2880 % FFmpeg developers, "ffmpeg tool",
2881 % \newblock \url{https://ffmpeg.org},
2882 % \newblock oline, accessed in December 2025.
2883 % \bibitem{awspolly}
2884 % Amazon Polly --- An online text-to-speech engine.
2885 % \newblock \url{https://aws.amazon.com/polly}
2886 % \newblock online, accessed in May 2024.
2887 % \bibitem{azuretts}
2888 % Microsoft Azure TTS --- An online text-to-speech engine.
2889 % \newblock \url{https://azure.microsoft.com/en-us/products/ai-foundry/tools/speech/}
2890 % \newblock online, accessed in April 2026.
2891 % \bibitem{balabolka}
2892 % The Balabolka TTS-program.
2893 % \newblock \url{http://www.cross-plus-a.com/balabolka.htm}.
2894 % \newblock online, accessed in May 2024.
2895 % \bibitem{festival}
2896 % The Festival TTS-program.
2897 % \newblock \url{https://www.cstr.ed.ac.uk/projects/festival}.
2898 % \newblock online, accessed in April 2026.
2899 % \end{thebibliography}
2900 %
2901 % \Finale
2902 \endinput