summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-14 22:16:30 +0000
committerKarl Berry <karl@freefriends.org>2017-07-14 22:16:30 +0000
commit46e95f178cfedc9839460ee35880698050f7644a (patch)
tree730f540a21d7047a243e929c74e4158674675814 /Master/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty
parent44af1a53bf28c922f525bd635c417b22f3b99b39 (diff)
beamer (14jul17)
git-svn-id: svn://tug.org/texlive/trunk@44798 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty')
-rw-r--r--Master/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty462
1 files changed, 235 insertions, 227 deletions
diff --git a/Master/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty b/Master/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty
index a73cd06444c..e7d0b14ecbc 100644
--- a/Master/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty
+++ b/Master/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty
@@ -1,6 +1,7 @@
% Copyright 2003--2007 by Till Tantau
% Copyright 2010 by Vedran Mileti\'c
% Copyright 2010--2013,2015 by Vedran Mileti\'c, Joseph Wright
+% Copyright 2017 by Joseph Wright
%
% This file may be distributed and/or modified
%
@@ -9,12 +10,20 @@
%
% See the file doc/licenses/LICENSE for more details.
+% Many of these commans allow an overlay spec either before or after
+% their argument (though not in both positions), hence the repetition
+% of "\@ifnextchar<".
+
%
%
% Basic overlay commands
%
%
+% This variant based on \@ifnextchar does not skip spaces
+% (So like amsmath's \new@ifnextchar). It is used where beamer allows
+% an overlay at the end of a command, and would thus otherwise result in
+% space gobbling.
\long\def\beamer@ifnextcharospec#1#2{%
\def\reserved@a{#1}%
\def\reserved@b{#2}%
@@ -30,111 +39,109 @@
%
% \only
%
-\def\only{\@ifnextchar<{\beamer@only}{\beamer@@only}}
+\newrobustcmd*\only{\@ifnextchar<{\beamer@only}{\beamer@@only}}
\long\def\beamer@only<#1>#2{%
- \def\beamer@doifnotinframe{}\def\beamer@doifinframe{#2}%
- {\beamer@masterdecode{#1}}\beamer@donow}
+ \gdef\beamer@doifnotinframe{}\def\beamer@doifinframe{#2}%
+ \beamer@masterdecode{#1}\beamer@donow}
\long\def\beamer@@only#1{\beamer@ifnextcharospec{\beamer@@@only{#1}}{#1}}
\long\def\beamer@@@only#1<#2>{%
- \def\beamer@doifnotinframe{}\def\beamer@doifinframe{#1}%
- {\beamer@masterdecode{#2}}\beamer@donow}
+ \gdef\beamer@doifnotinframe{}\def\beamer@doifinframe{#1}%
+ \beamer@masterdecode{#2}\beamer@donow}
%
% \alt and \altenv
%
-\def\alt{\@ifnextchar<{\beamer@alt}{\beamer@alttwo}}
+\newrobustcmd*\alt{\@ifnextchar<{\beamer@alt}{\beamer@alttwo}}
\long\def\beamer@alttwo#1#2{\beamer@ifnextcharospec{\beamer@altget{#1}{#2}}{#1}}
\long\def\beamer@altget#1#2<#3>{%
- \def\beamer@doifnotinframe{#2}\def\beamer@doifinframe{#1}%
- {\beamer@masterdecode{#3}}\beamer@donow}
+ \gdef\beamer@doifnotinframe{#2}\def\beamer@doifinframe{#1}%
+ \beamer@masterdecode{#3}\beamer@donow}
\long\def\beamer@alt<#1>#2#3{%
- \def\beamer@doifnotinframe{#3}\def\beamer@doifinframe{#2}%
- {\beamer@masterdecode{#1}}\beamer@donow}
+ \gdef\beamer@doifnotinframe{#3}\def\beamer@doifinframe{#2}%
+ \beamer@masterdecode{#1}\beamer@donow}
-\def\altenv{\@ifnextchar<{\beamer@altenv}{\beamer@@@altenv}}
+\newrobustcmd*\altenv{\@ifnextchar<{\beamer@altenv}{\beamer@@@altenv}}
\def\beamer@altenv<#1>{\beamer@@altenv{<#1>}}
\long\def\beamer@@@altenv#1#2#3#4{\beamer@ifnextcharospec{\beamer@altenvsort{#1}{#2}{#3}{#4}}{\beamer@@altenv{}{#1}{#2}{#3}{#4}}}
\long\def\beamer@altenvsort#1#2#3#4<#5>{\beamer@@altenv{<#5>}{#1}{#2}{#3}{#4}}
\long\def\beamer@@altenv#1#2#3#4#5{\alt#1{\long\def\beamer@eoenv{#3}#2}{\long\def\beamer@eoenv{#5}#4}}
-\def\endaltenv{\beamer@eoenv}
+\protected\def\endaltenv{\beamer@eoenv}
%
% \action and actionenv
%
\def\beamer@plus{+}
-\def\action{\@ifnextchar<{\beamer@parsedaction}{\expandafter\beamer@parsedaction\beamer@defaultospec}}
+\newrobustcmd*\action{\@ifnextchar<{\beamer@parsedaction}{\expandafter\beamer@parsedaction\beamer@defaultospec}}
\long\def\beamer@parsedaction<#1>#2{%
- \def\beamer@doifnotinframe{}\def\beamer@doifinframe{}%
- {{\beamer@masterdecode{#1}}}%
- \ifx\beamer@decodefound\beamer@plus%
+ \gdef\beamer@doifnotinframe{}%
+ \def\beamer@doifinframe{}%
+ \beamer@masterdecode{#1}%
+ \ifx\beamer@decodefound\beamer@plus
\long\def\beamer@todo{#2}%
- \else%
- \expandafter\long\expandafter\def\expandafter\beamer@todo%
+ \else
+ \expandafter\long\expandafter\def\expandafter\beamer@todo
\expandafter{\expandafter\uncover\expandafter<\expandafter a\expandafter l\expandafter l\expandafter:\beamer@decodefound>{#2}}%
- \fi%
+ \fi
\expandafter\beamer@processactions\beamer@decaction{}%
\beamer@todo}
\def\beamer@processactions#1{%
- \beamer@ifempty{#1}{}{%
+ \ifblank{#1}{}{%
\expandafter\beamer@@processactions\expandafter{\beamer@todo}#1}}
\long\def\beamer@@processactions#1#2<#3>{%
\expandafter\long\expandafter\def\expandafter\beamer@todo\expandafter{%
\csname#2\endcsname<all:#3>{#1}}%
\beamer@processactions}
-\def\actionenv{\beamer@ifnextcharospec{\beamer@parsedactionenv}{\expandafter\beamer@parsedactionenv\beamer@defaultospec}}
+\newrobustcmd*\actionenv{\beamer@ifnextcharospec{\beamer@parsedactionenv}{\expandafter\beamer@parsedactionenv\beamer@defaultospec}}
\def\beamer@parsedactionenv<#1>{%
- \def\beamer@doifnotinframe{}\def\beamer@doifinframe{}%
- {{\beamer@masterdecode{#1}}}%
- \ifx\beamer@decodefound\beamer@plus%
+ \gdef\beamer@doifnotinframe{}%
+ \def\beamer@doifinframe{}%
+ \beamer@masterdecode{#1}%
+ \ifx\beamer@decodefound\beamer@plus
\def\beamer@todobegin{}%
\def\beamer@todoend{}%
- \else%
+ \else
\edef\beamer@todobegin{\noexpand\begin{uncoverenv}<all:\beamer@decodefound>}%
\def\beamer@todoend{\end{uncoverenv}}%
- \fi%
+ \fi
\expandafter\beamer@processactionsbegin\beamer@decaction{}%
\expandafter\beamer@processactionsend\beamer@decaction{}%
\beamer@todobegin}
-\def\endactionenv{\beamer@todoend}
+\protected\def\endactionenv{\beamer@todoend}
\def\beamer@processactionsbegin#1{%
- \beamer@ifempty{#1}{}{%
+ \ifblank{#1}{}{%
\expandafter\beamer@@processactionsbegin\expandafter{\beamer@todobegin}#1}}
\long\def\beamer@@processactionsbegin#1#2<#3>{%
\def\beamer@todobegin{\begin{#2env}<all:#3>#1}%
\beamer@processactionsbegin}
-
\def\beamer@processactionsend#1{%
- \beamer@ifempty{#1}{}{%
+ \ifblank{#1}{}{%
\expandafter\beamer@@processactionsend\expandafter{\beamer@todoend}#1}}
\long\def\beamer@@processactionsend#1#2<#3>{%
\def\beamer@todoend{#1\end{#2env}}%
\beamer@processactionsend}
-
\def\beamer@defaultospec{<*>}
\def\beamer@emptyospec{<*>}
%
% \temporal
%
-\long\def\temporal<#1>#2#3#4{% past, present, future
- \def\beamer@doifnotinframe{\beamer@picked}\def\beamer@doifinframe{#3}%
- {\beamer@masterdecode{#1}%
- \ifbeamer@localanotherslide\gdef\beamer@picked{#2}\else\gdef\beamer@picked{#4}\fi}\beamer@donow}
-
+\protected\long\def\temporal<#1>#2#3#4{% past, present, future
+ \gdef\beamer@doifnotinframe{\beamer@picked}\def\beamer@doifinframe{#3}%
+ \beamer@masterdecode{#1}%
+ \ifbeamer@anotherslide\gdef\beamer@picked{#2}\else\gdef\beamer@picked{#4}\fi\beamer@donow}
%
-% \newoverlaycommand
+% \beameroriginal
%
\def\beameroriginal#1{\csname @orig\string#1\endcsname}
-
\newcount\beamer@argscount
%
@@ -146,6 +153,9 @@
\def\beamer@newenv<>{\@star@or@long\beamer@new@environment}
\def\beamer@new@environment#1{\@ifnextchar[{\beamer@@newenv{#1}}{\beamer@newenvnoopt{#1}{0}}}
\def\beamer@@newenv#1[#2]{\@ifnextchar[{\beamer@newenvopt{#1}{#2}}{\beamer@newenvnoopt{#1}{#2}}}
+% The beamer syntax for \newenvironment<> follows the pattern for \newcommand<>
+% and allows the overlay spec anywhere: the same code path is therefore used for
+% both.
\long\def\beamer@newenvnoopt#1#2#3#4{%
\expandafter\newcommand\expandafter<\expandafter>\csname#1\endcsname[#2]{#3}%
\expandafter\long\expandafter\def\csname end#1\endcsname{#4}%
@@ -155,18 +165,20 @@
\expandafter\long\expandafter\def\csname end#1\endcsname{#5}%
}
-
\let\beamer@origrenewenvironment=\renewenvironment
\def\renewenvironment{\@ifnextchar<{\beamer@renewenv}{\beamer@origrenewenvironment}}
\def\beamer@renewenv<>#1{%
- \edef\beamer@do{\csname original#1\endcsname=\expandafter\noexpand\csname#1\endcsname}
- \expandafter\let\beamer@do%
- \edef\beamer@do{\csname endoriginal#1\endcsname=\expandafter\noexpand\csname end#1\endcsname}
- \expandafter\let\beamer@do%
+ \ifcsdef{original#1}%
+ {}%
+ {%
+ \csletcs{original#1}{#1}%
+ \csletcs{endoriginal#1}{end#1}%
+ }%
+ \csundef{#1}%
+ \csundef{beamerx@\expandafter\string\csname#1\endcsname}%
\newenvironment<>{#1}}
-
%
% newcommand extension
%
@@ -177,62 +189,79 @@
\def\beamer@new@command#1{\@ifnextchar[{\beamer@@newcom{#1}}{\beamer@newcomnoopt{#1}{0}}}
\def\beamer@@newcom#1[#2]{\@ifnextchar[{\beamer@newcomopt{#1}{#2}}{\beamer@newcomnoopt{#1}{#2}}}
\long\def\beamer@newcomnoopt#1#2#3{%
- \ifnum#2=0\relax%
- \expandafter\def\expandafter#1\expandafter{\expandafter\beamer@sortzero\expandafter{\csname beamerx@\string#1\endcsname}}%
+ \ifnum#2=0\relax
+ \protected\edef#1%
+ {\noexpand\beamer@sortzero\expandafter\noexpand\csname beamerx@\string#1\endcsname}%
\else
- \expandafter\def\expandafter#1\expandafter{\expandafter\beamer@sort\expandafter{\csname beamerx@\string#1\endcsname}{#2}}%
- \fi%
- \beamer@argscount=#2\relax%
- \advance\beamer@argscount by 1\relax%
- \expandafter\newcommand\csname beamerx@\string#1\endcsname[\beamer@argscount]{#3}%
+ \protected\edef#1%
+ {\noexpand\beamer@sort\expandafter\noexpand\csname beamerx@\string#1\endcsname{#2}}%
+ \fi
+ \beamer@argscount=#2\relax
+ \advance\beamer@argscount by 1\relax
+ \ifx\l@ngrel@x\relax
+ \expandafter\expandafter\expandafter\newcommand
+ \expandafter\expandafter\expandafter*%
+ \else
+ \expandafter\expandafter\expandafter\newcommand
+ \fi
+ \csname beamerx@\string#1\endcsname[\beamer@argscount]{#3}%
}
\long\def\beamer@newcomopt#1#2[#3]#4{%
- \expandafter\def\expandafter#1\expandafter{\expandafter\beamer@presort\expandafter{\csname beamerx@\string#1\endcsname}{#2}{#3}}%
- \beamer@argscount=#2\relax%
- \advance\beamer@argscount by 1\relax%
- \expandafter\newcommand\csname beamerx@\string#1\endcsname[\beamer@argscount]{#4}%
+ \protected\expandafter\def\expandafter#1\expandafter
+ {\expandafter\beamer@presort\expandafter{\csname beamerx@\string#1\endcsname}{#2}{#3}}%
+ \beamer@argscount=#2\relax
+ \advance\beamer@argscount by 1\relax
+ \ifx\l@ngrel@x\relax
+ \expandafter\expandafter\expandafter\newcommand
+ \expandafter\expandafter\expandafter*%
+ \else
+ \expandafter\expandafter\expandafter\newcommand
+ \fi
+ \csname beamerx@\string#1\endcsname[\beamer@argscount]{#4}%
}
\let\beamer@origrenewcommand=\renewcommand
\def\renewcommand{\@ifnextchar<{\beamer@renewcom}{\beamer@origrenewcommand}}
\def\beamer@renewcom<>#1{%
- \expandafter\def\expandafter\beamer@name\expandafter{\csname @orig\string#1\endcsname}%
- \expandafter\let\beamer@name=#1\relax%
- \expandafter\let\csname beamerx@\string#1\endcsname\@undefined
+ \ifcsundef{@orig\string#1}%
+ {\cslet{@orig\string#1}#1}%
+ {}%
+ \csundef{beamerx@\string#1}%
\newcommand<>#1}
-
+% The class allows overlays specs at any position in a command.
+% To handle that, beamer first collects up material potentially
+% including overlay info before passing to the 'real' definition.
\long\def\beamer@presort#1#2#3{%
- \long\def\beamer@todo{#1}%
+ \def\beamer@todo{#1}%
\def\beamer@ospec{}%
- \beamer@argscount=#2\relax%
+ \beamer@argscount=#2\relax
\beamer@prechecka{#3}}
\long\def\beamer@prechecka#1{\@ifnextchar<{\beamer@preget{#1}}{\beamer@precheckb{#1}}}
\long\def\beamer@preget#1<#2>{\def\beamer@ospec{<#2>}\beamer@precheckb{#1}}
\long\def\beamer@precheckb#1{\@ifnextchar[{\beamer@pregetb}{\beamer@pregetb[{#1}]}}
\long\def\beamer@pregetb[#1]{%
- \expandafter\long\expandafter\def\expandafter\beamer@todo\expandafter{\beamer@todo{#1}}%
- \advance\beamer@argscount by-1\relax%
- \beamer@parseargs%
+ \expandafter\def\expandafter\beamer@todo\expandafter{\beamer@todo{#1}}%
+ \advance\beamer@argscount by-1\relax
+ \beamer@parseargs
}
\def\beamer@sortzero#1{\beamer@ifnextcharospec{\beamer@sortzeroread{#1}}{#1{}}}
\def\beamer@sortzeroread#1<#2>{#1{<#2>}}
-
\def\beamer@sort#1#2{%
- \long\def\beamer@todo{#1}%
+ \def\beamer@todo{#1}%
\def\beamer@ospec{}%
- \beamer@argscount=#2\relax%
+ \beamer@argscount=#2\relax
\beamer@parseargs}
\def\beamer@parseargs{%
- \ifnum\beamer@argscount=0\relax%
- \let\next=\beamer@finalargscheck%
- \else%
- \let\next=\beamer@lookforarg%
- \fi%
+ \ifnum\beamer@argscount=0\relax
+ \let\next=\beamer@finalargscheck
+ \else
+ \let\next=\beamer@lookforarg
+ \fi
\next}
\def\beamer@lookforarg{%
\@ifnextchar<\beamer@foundspec\beamer@readarg}
@@ -241,8 +270,8 @@
\beamer@lookforarg}
\long\def\beamer@readarg#1{%
\expandafter\long\expandafter\def\expandafter\beamer@todo\expandafter{\beamer@todo{#1}}%
- \advance\beamer@argscount by-1\relax%
- \beamer@parseargs%
+ \advance\beamer@argscount by-1\relax
+ \beamer@parseargs
}
\def\beamer@finalargscheck{\beamer@ifnextcharospec\beamer@finalspec\beamer@finalnospec}
@@ -250,29 +279,29 @@
\def\beamer@finalnospec{%
\expandafter\beamer@todo\expandafter{\beamer@ospec}}
-
-
-
\mode
<presentation>
-
% commands for smuggling skips past
\newskip\beamer@lastskipcover
\def\beamer@smuggle#1{%
{}%
- \beamer@lastskipcover=\lastskip%
+ \beamer@lastskipcover=\lastskip
\edef\beamer@lastskiptext{\the\lastskip}%
- \ifx\beamer@lastskiptext\beamer@zeropt\else%
- \ifvmode\unskip\fi\ifhmode\unskip\fi\fi%
+ \ifx\beamer@lastskiptext\beamer@zeropt
+ \else
+ \ifvmode\unskip\fi
+ \ifhmode\unskip\fi
+ \fi
#1%
- \ifx\beamer@lastskiptext\beamer@zeropt\else%
- \ifvmode\vskip\beamer@lastskipcover\fi\ifhmode\hskip\beamer@lastskipcover\fi\fi%
+ \ifx\beamer@lastskiptext\beamer@zeropt
+ \else
+ \ifvmode\vskip\beamer@lastskipcover\fi
+ \ifhmode\hskip\beamer@lastskipcover\fi
+ \fi
}
-
-
%
% Uncovering management
%
@@ -307,54 +336,52 @@
\the\beamer@coveringdepth\endcsname}%
\color{.}%
}}}%
- \ifnum\beamer@slideinframe<\beamer@minimum%ok, at beginning
- {%
- \beamer@saveanother%
- \advance\beamer@minimum by-\beamer@slideinframe%
- \beamer@slideinframe=\beamer@minimum%
- \beamer@uncoverbeforeactions%
- \beamer@restoreanother%
- }%
- \else%
- {%
- \beamer@saveanother%
- \advance\beamer@slideinframe by-\beamer@minimum%
- \beamer@uncoverafteractions%
- \beamer@restoreanother%
- }%
- \fi%
- \beamer@do%
+ \ifnum\beamer@slideinframe<\beamer@minimum %ok, at beginning
+ \begingroup
+ \beamer@saveanother
+ \advance\beamer@minimum by-\beamer@slideinframe
+ \beamer@slideinframe=\beamer@minimum
+ \beamer@uncoverbeforeactions
+ \beamer@restoreanother
+ \endgroup
+ \else
+ \begingroup
+ \beamer@saveanother
+ \advance\beamer@slideinframe by-\beamer@minimum
+ \beamer@uncoverafteractions
+ \beamer@restoreanother
+ \endgroup
+ \fi
+ \beamer@do
}%
}
\def\beamer@endcovered{%
\beamer@smuggle{%
- \csname beamer@doafter\the\beamer@coveringdepth\endcsname%
- \global\advance\beamer@coveringdepth by -1\relax%
+ \csname beamer@doafter\the\beamer@coveringdepth\endcsname
+ \global\advance\beamer@coveringdepth by -1\relax
}%
}%
-
\define@key{beamer@mixin}{still covered}{\def\beamer@uncoverbeforeactions{\ignorespaces#1}}
\define@key{beamer@mixin}{again covered}{\def\beamer@uncoverafteractions{\ignorespaces#1}}
\define@key{beamer@mixin}{invisible}[]{%
- \def\beamer@uncoverbeforeactions{\ignorespaces}
+ \def\beamer@uncoverbeforeactions{\ignorespaces}%
\def\beamer@uncoverafteractions{\ignorespaces}}
\define@key{beamer@mixin}{transparent}[15]{%
- \def\beamer@uncoverbeforeactions{\ignorespaces\opaqueness<1->{#1}}
+ \def\beamer@uncoverbeforeactions{\ignorespaces\opaqueness<1->{#1}}%
\def\beamer@uncoverafteractions{\ignorespaces\opaqueness<1->{#1}}}
\define@key{beamer@mixin}{dynamic}[]{%
- \def\beamer@uncoverbeforeactions{\ignorespaces\opaqueness<1-2>{10}\opaqueness<3->{5}}
+ \def\beamer@uncoverbeforeactions{\ignorespaces\opaqueness<1-2>{10}\opaqueness<3->{5}}%
\def\beamer@uncoverafteractions{\ignorespaces\opaqueness<1-2>{10}\opaqueness<3->{5}}}
\define@key{beamer@mixin}{highly dynamic}[]{%
- \def\beamer@uncoverbeforeactions{\ignorespaces\opaqueness<1>{15}\opaqueness<2>{10}\opaqueness<3>{5}\opaqueness<4->{2}}
+ \def\beamer@uncoverbeforeactions{\ignorespaces\opaqueness<1>{15}\opaqueness<2>{10}\opaqueness<3>{5}\opaqueness<4->{2}}%
\def\beamer@uncoverafteractions{\ignorespaces\opaqueness<1>{15}\opaqueness<2>{10}\opaqueness<3>{5}\opaqueness<4->{2}}}
-
-\def\setbeamercovered#1{%
+\newrobustcmd*\setbeamercovered[1]{%
\setkeys{beamer@mixin}{invisible}%
\setkeys{beamer@mixin}{#1}}
@@ -369,32 +396,30 @@
\beamer@coveringdepth=0\relax
-
\mode
<article>
{
- \let\setbeamercovered=\@gobble
+ \newrobustcmd*\setbeamercovered[1]{}
}
-
-
-
%
% Pausing
%
+\def\beamer@endpause{}
+
\newenvironment{beamer@framepauses}%internal
{%
- \global\c@beamerpauses=1\relax%
+ \setcounter{beamerpauses}{1}%
\gdef\beamer@endpause{}%
}
{\beamer@endpause}
-\newcommand{\beamer@@pause}[1][]{%
- \beamer@ifempty{#1}%
- {\global\advance\c@beamerpauses by1\relax}%
- {\global\c@beamerpauses=#1\relax}%
- \onslide<\c@beamerpauses->\relax%
+\newrobustcmd{\beamer@@pause}[1][]{%
+ \ifblank{#1}%
+ {\stepcounter{beamerpauses}}%
+ {\setcounter{beamerpauses}{#1}}%
+ \onslide<\value{beamerpauses}->\relax%
}
\mode
@@ -410,12 +435,10 @@
}
}
-
-
\mode
<all>
{
- \def\onslide{\@ifstar{\only}{\@ifnextchar+{\expandafter\beamer@visibleonslide\@gobble}{\beamer@mainonslide}}}
+ \newrobustcmd*\onslide{\@ifstar{\only}{\@ifnextchar+{\expandafter\beamer@visibleonslide\@gobble}{\beamer@mainonslide}}}
\newcommand<>{\beamer@visibleonslide}{%
\@ifnextchar\bgroup
@@ -446,14 +469,11 @@
\mode
<article>
{
- \newcommand\beamer@@pause[1][]{}
+ \newrobustcmd\beamer@@pause[1][]{}
\newcommand<>{\beamer@noargsonslide}{}
\newcommand<>{\beamer@noargsvisibleonslide}{}
}
-
-
-
%
% Make item overlays
%
@@ -464,26 +484,26 @@
\def\item{%
\@ifnextchar\relax\beamer@origitem{%
- \ifhmode%
- \unskip\unskip\par%
- \fi%
+ \ifhmode
+ \unskip\unskip\par
+ \fi
\beamer@closeitem\gdef\beamer@closeitem{}%
\@ifnextchar<{\beamer@parseitem}{\beamer@itemcheckopt}}}
\def\beamer@itemcheckopt{\@ifnextchar[{\beamer@itemcheckopta}{%
- \ifx\beamer@defaultospec\beamer@emptyospec%
- \let\next=\beamer@callorigitem%
- \else%
- \let\next=\beamer@defaultparse%
- \fi%
- \next%
+ \ifx\beamer@defaultospec\beamer@emptyospec
+ \let\next=\beamer@callorigitem
+ \else
+ \let\next=\beamer@defaultparse
+ \fi
+ \next
}}
\def\beamer@defaultparse{\expandafter\beamer@parseitem\beamer@defaultospec}
\long\def\beamer@itemcheckopta[#1]{\@ifnextchar<{\beamer@itemreverse[{#1}]}{%
- \ifx\beamer@defaultospec\beamer@emptyospec%
- \let\next=\beamer@callorigitem%
- \else%
- \let\next=\beamer@defaultparse%
- \fi%
+ \ifx\beamer@defaultospec\beamer@emptyospec
+ \let\next=\beamer@callorigitem
+ \else
+ \let\next=\beamer@defaultparse
+ \fi
\next[{#1}]}}
\long\def\beamer@itemreverse[#1]<#2>{\beamer@parseitem<#2>[{#1}]}
@@ -495,11 +515,10 @@
%% Local change inside actionenv should survive, and should be
%% always false
\@noparitemfalse}%
-\begin{actionenv}<#1>\beamer@callorigitem}
+ \begin{actionenv}<#1>\beamer@callorigitem}
-
-\def\beamerdefaultoverlayspecification#1{%
- \beamer@ifempty{#1}%
+\newrobustcmd*\beamerdefaultoverlayspecification[1]{%
+ \ifblank{#1}%
{%
\def\beamer@gdefaultospec{<*>}%
\def\beamer@defaultospec{<*>}}%
@@ -510,23 +529,22 @@
}
\beamerdefaultoverlayspecification{}
-
\newcount\beamer@trivlistdepth
\beamer@trivlistdepth=0\relax
\let\beamer@orig@trivlist=\@trivlist
\def\@trivlist{%
- \global\advance\beamer@trivlistdepth by1\relax%
- \expandafter\global\expandafter\let\csname beamer@closeitem\the\beamer@trivlistdepth\endcsname=\beamer@closeitem%
+ \global\advance\beamer@trivlistdepth by1\relax
+ \expandafter\global\expandafter\let\csname beamer@closeitem\the\beamer@trivlistdepth\endcsname=\beamer@closeitem
\gdef\beamer@closeitem{}%
- \beamer@orig@trivlist%
+ \beamer@orig@trivlist
}
\let\beamer@origendtrivlist=\endtrivlist
\def\endtrivlist{%
- \beamer@closeitem%
+ \beamer@closeitem
\expandafter\global\expandafter\let\expandafter\beamer@closeitem\expandafter=\csname
- beamer@closeitem\the\beamer@trivlistdepth\endcsname%
- \global\advance\beamer@trivlistdepth by-1\relax%
+ beamer@closeitem\the\beamer@trivlistdepth\endcsname
+ \global\advance\beamer@trivlistdepth by-1\relax
\beamer@origendtrivlist}
\def\beamer@closeitem{}
@@ -534,7 +552,6 @@
\let\beamer@list=\list
\let\beamer@@trivlist=\@trivlist
-
\mode
<article>
{
@@ -545,16 +562,14 @@
\def\beamer@item{\@ifnextchar[\beamer@@@item\beamer@origitem}
\def\beamer@@@item[#1]{\@ifnextchar<{\beamer@@@@item[{#1}]}{\beamer@origitem[{#1}]}}
\def\beamer@@@@item[#1]<#2>{\beamer@origitem[{#1}]}
+ \newrobustcmd*\beamerdefaultoverlayspecification[1]{}
}
}
-
-
%
% Overlay commands
%
-
\mode
<all>
{
@@ -572,9 +587,9 @@
\long\def\beamer@makecovered#1{\beamer@startcovered#1\beamer@endcovered}
\long\def\beamer@reallymakeinvisible#1{\beamer@begininvisible#1\beamer@endinvisible}
-\newcommand{\uncover}{\alt{\beamer@fakeinvisible}{\beamer@makecovered}}
-\newcommand{\visible}{\alt{\beamer@fakeinvisible}{\beamer@reallymakeinvisible}}
-\newcommand{\invisible}{\alt{\beamer@reallymakeinvisible}{\beamer@fakeinvisible}}
+\newrobustcmd*{\uncover}{\alt{\beamer@fakeinvisible}{\beamer@makecovered}}
+\newrobustcmd*{\visible}{\alt{\beamer@fakeinvisible}{\beamer@reallymakeinvisible}}
+\newrobustcmd*{\invisible}{\alt{\beamer@reallymakeinvisible}{\beamer@fakeinvisible}}
\newenvironment{visibleenv}{\begin{altenv}{\beamer@spacingcover}{\beamer@spacingcover}{\beamer@begininvisible}{\beamer@endinvisible}}{\end{altenv}}
\newenvironment{invisibleenv}{\begin{altenv}{\beamer@begininvisible}{\beamer@endinvisible}{\beamer@spacingcover}{\beamer@spacingcover}}{\end{altenv}}
\newenvironment{uncoverenv}{\begin{altenv}{\beamer@spacingcover}{\beamer@spacingcover}{\beamer@startcovered}{\beamer@endcovered}}{\end{altenv}}
@@ -584,9 +599,9 @@
\mode
<article>
{
- \newcommand{\uncover}{\alt{\@firstofone}{\@gobble}}
- \newcommand{\visible}{\alt{\@firstofone}{\@gobble}}
- \newcommand{\invisible}{\alt{\@gobble}{\@firstofone}}
+ \newrobustcmd*{\uncover}{\alt{\@firstofone}{\@gobble}}
+ \newrobustcmd*{\visible}{\alt{\@firstofone}{\@gobble}}
+ \newrobustcmd*{\invisible}{\alt{\@gobble}{\@firstofone}}
\newenvironment{onlyenv}{\begin{altenv}{}{}{\begingroup\setbox0=\vbox\bgroup}{\egroup\endgroup}}{\end{altenv}}
\newenvironment{uncoverenv}{\begin{altenv}{}{}{\begingroup\setbox0=\vbox\bgroup}{\egroup\endgroup}}{\end{altenv}}
\newenvironment{visibleenv}{\begin{altenv}{}{}{\begingroup\setbox0=\vbox\bgroup}{\egroup\endgroup}}{\end{altenv}}
@@ -614,15 +629,13 @@
\mode
<article>
{
- \g@addto@macro\beamer@lastminutepatches{
+ \g@addto@macro\beamer@lastminutepatches{%
% These have to be done late...
- \renewcommand<>{\hypertarget}[2]{\only#3{\beameroriginal{\hypertarget}{#1}{#2}}}
+ \renewcommand<>{\hypertarget}[2]{\only#3{\beameroriginal{\hypertarget}{#1}{#2}}}%
\renewcommand<>{\hyperlink}[2]{\only#3{\beameroriginal{\hyperlink}{#1}{#2}}}
}
}
-
-
\newcommand<>{\emph}[1]{{\only#2{\itshape}#1}}
\mode
@@ -631,27 +644,25 @@
\renewcommand<>{\emph}{\only#1{\beameroriginal\emph}}
}
-
-
%
% Insert area
%
\newenvironment{overlayarea}[2]{%
- \beamer@animht=#1\relax%
- \beamer@animwd=#2\relax%
- \setbox\beamer@areabox=\vbox to#2\bgroup%
- \strut\begin{minipage}[t]{#1}%
+ \beamer@animht=#1\relax
+ \beamer@animwd=#2\relax
+ \setbox\beamer@areabox=\vbox to\beamer@animwd\bgroup
+ \strut\begin{minipage}[t]{\beamer@animht}%
% Make the minipage behave like the main part of the slide
\normalfont
\raggedright
}
{%
- \end{minipage}\vfil%
- \egroup%
- \wd\beamer@areabox=\beamer@animht%
- \ht\beamer@areabox=\beamer@animwd%
- \dp\beamer@areabox=0pt%
- \box\beamer@areabox%
+ \end{minipage}\vfil
+ \egroup
+ \wd\beamer@areabox=\beamer@animht
+ \ht\beamer@areabox=\beamer@animwd
+ \dp\beamer@areabox=0pt %
+ \box\beamer@areabox
}
\mode
@@ -660,40 +671,39 @@
\newenvironment{overlayarea}[2]{}{}% no effect
}
-
\newenvironment{overprint}[1][\textwidth]{%
- \let\beamer@noargsonslide=\beamer@onslide%
- \let\beamer@noargsvisibleonslide=\beamer@onslide%
- \beamer@animht=0pt%
- \beamer@animdp=0pt%
- \beamer@animwd=#1\relax%
- \setbox\beamer@animcurrent=\box\beamer@animshowbox% makes animshowbox empty
+ \let\beamer@noargsonslide=\beamer@onslide
+ \let\beamer@noargsvisibleonslide=\beamer@onslide
+ \beamer@animht=0pt\relax
+ \beamer@animdp=0pt\relax
+ \beamer@animwd=#1\relax
+ \setbox\beamer@animcurrent=\box\beamer@animshowbox % makes animshowbox empty
\setbox\beamer@animcurrent=\hbox{}%
\def\beamer@endaction{}%
}{%
- \beamer@endaction%
- \ifvoid\beamer@animshowbox\setbox\beamer@animshowbox=\hbox{}\fi%
- \ht\beamer@animshowbox=\beamer@animht%
- \dp\beamer@animshowbox=\beamer@animdp%
- \wd\beamer@animshowbox=\beamer@animwd%
- \box\beamer@animshowbox%
+ \beamer@endaction
+ \ifvoid\beamer@animshowbox\setbox\beamer@animshowbox=\hbox{}\fi
+ \ht\beamer@animshowbox=\beamer@animht
+ \dp\beamer@animshowbox=\beamer@animdp
+ \wd\beamer@animshowbox=\beamer@animwd
+ \box\beamer@animshowbox
}
\def\beamer@onslide<#1>{%
- \beamer@endaction%
+ \beamer@endaction
\alt<#1>{%
- \ifvoid\beamer@animshowbox\else\ClassError{beamer}{Overprints may not overlap}{}\fi%
+ \ifvoid\beamer@animshowbox\else\ClassError{beamer}{Overprints may not overlap}{}\fi
\def\beamer@endaction{%
\end{minipage}%
- \egroup%
- \ifdim\beamer@animht<\ht\beamer@animcurrent\beamer@animht=\ht\beamer@animcurrent\fi%
- \ifdim\beamer@animdp<\dp\beamer@animcurrent\beamer@animdp=\dp\beamer@animcurrent\fi%
- \setbox\beamer@animshowbox=\copy\beamer@animcurrent}
+ \egroup
+ \ifdim\beamer@animht<\ht\beamer@animcurrent\beamer@animht=\ht\beamer@animcurrent\fi
+ \ifdim\beamer@animdp<\dp\beamer@animcurrent\beamer@animdp=\dp\beamer@animcurrent\fi
+ \setbox\beamer@animshowbox=\copy\beamer@animcurrent}%
}%
{\def\beamer@endaction{%
\end{minipage}%
- \egroup%
- \ifdim\beamer@animht<\ht\beamer@animcurrent\beamer@animht=\ht\beamer@animcurrent\fi%
+ \egroup
+ \ifdim\beamer@animht<\ht\beamer@animcurrent\beamer@animht=\ht\beamer@animcurrent\fi
\ifdim\beamer@animdp<\dp\beamer@animcurrent\beamer@animdp=\dp\beamer@animcurrent\fi}%
}%
\setbox\beamer@animcurrent=\vbox\bgroup\begin{minipage}[t]{\beamer@animwd}%
@@ -724,7 +734,7 @@
\def\beamer@transdir{}%
\def\beamer@dur{}%
\setkeys{beamertrans}{#1}%
- \edef\beamer@temp{{pdfpagetransition={#2 \beamer@transdir\space\beamer@dur}}}
+ \edef\beamer@temp{{pdfpagetransition={#2 \beamer@transdir\space\beamer@dur}}}%
\expandafter\hypersetup\beamer@temp}
\mode
@@ -767,40 +777,38 @@
% Animation macros
%
-\def\animate<#1>{\transduration<#1| handout:0| trans:0>{0}}
-\def\animatevalue<#1-#2>#3#4#5{%
+\protected\def\animate<#1>{\transduration<#1| handout:0| trans:0>{0}}
+\protected\def\animatevalue<#1-#2>#3#4#5{%
\only<#1-#2>{}% enforce these frames
- \ifnum\beamer@slideinframe<#1\relax%
- #3=#4\relax%
- \else%
- \ifnum\beamer@slideinframe<#2\relax%
- #3=#4\relax%
- #3=-#3\relax%
- \advance#3 by#5\relax%
- \beamer@animationtempa=#2\relax%
- \advance\beamer@animationtempa by-#1%
- \ifnum\beamer@animationtempa>0%
- \divide#3 by\beamer@animationtempa%
- \fi%
- \beamer@animationtempa=\beamer@slideinframe%
- \advance\beamer@animationtempa by-#1%
- \multiply#3 by\beamer@animationtempa%
- \advance#3 by#4%
+ \ifnum\beamer@slideinframe<#1\relax
+ #3=#4\relax
+ \else
+ \ifnum\beamer@slideinframe<#2\relax
+ #3=#4\relax
+ #3=-#3\relax
+ \advance#3 by#5\relax
+ \beamer@animationtempa=#2\relax
+ \advance\beamer@animationtempa by-#1 %
+ \ifnum\beamer@animationtempa>0 %
+ \divide#3 by\beamer@animationtempa
+ \fi
+ \beamer@animationtempa=\beamer@slideinframe
+ \advance\beamer@animationtempa by-#1 %
+ \multiply#3 by\beamer@animationtempa
+ \advance#3 by#4 %
\else
- #3=#5\relax%
- \fi%
- \fi%
+ #3=#5\relax
+ \fi
+ \fi
}
\mode
<article>
{
- \def\animate<#1>{}
- \def\animatevalue<#1-#2>#3#4#5{#3=#4\relax}
+ \protected\def\animate<#1>{}
+ \protected\def\animatevalue<#1-#2>#3#4#5{#3=#4\relax}
}
-
-
%
% Labels in overlays
%