Reading the following quote from the beamer
manual, I was left a bit confused:
When you write
<.->
, a similar thing as in<+->
happens except that the counterbeamerpauses
is not incremented and except that you get the value ofbeamerpauses
decreased by one. Thus a dot, possibly followed by an offset, just expands to the current value of the counterbeamerpauses
minus one, possibly offset.
I had difficulties in parsing the last sentence, and I found that I cannot answer any of the following questions:
- Should the specified offset be negative or positive?
- How should the offset be specified? The manual does not provide any examples.
- Is the offset incremented (or perhaps) decremented before it is being applied?
- What's the value of the
beamerpauses
counter within the code to which the overlay is applied? - What's the value of this counter after the specification?
Minimal Non-Working Example
To understand this better, I created the following minimal example, which does not compile.
\documentclass{beamer}
\begin{document}
\newcommand\cn{{\small\emph{\textbf{Beamer pauses is \arabic{beamerpauses}}}}}
\begin{frame}[fragile]\frametitle{Dot Notation in Overlays}
\begin{enumerate}
\item This is my first item, no overlay specification; \cn
\item<+-> This is my second item, overlay specification is \verb/<+->/; \cn
\item<.-> This is my third item, overlay specification is \verb/<.->/; \cn
\item This is my fourth item, no overlay specification; \cn
\item<.-> This is my fifth item, overlay specification is \verb/<.->/; \cn
\item<.(1)-> This is my sixth item, overlay specification is \verb/<.(1)->/; \cn
\item This is my seventh item, no overlay specification; \cn
\item<.(-1)-> This is my eighth item, overlay specification is \verb/<.(-1)->/; \cn
\item This is my ninth item, no overlay specification; \cn
\item<.(-2)-> This is my tenth item, overlay specification is \verb/<.(-2)->/; \cn
\item This is my eleventh item, no overlay specification; \cn
\item<.(+1)-> This is my twelfth item, overlay specification is \verb/<.(+1)->/; \cn
\item This is my thirteenth item, no overlay specification; \cn
\item<.(+2)-> This is my fourteenth item, overlay specification is \verb/<.(+2)->/; \cn
\item This is my fifteenth and final item, with no overlay specification; \cn
\end{enumerate}
\end{frame}
\end{document}
The error message I got was:
Runaway argument?
! File ended while scanning use of \next.
<inserted text>
\par
<*> myfile.tex
?
My requests is then: can you help my compile this example, and, more importantly, explain the output in view of the general principles I failed to discover.
Minimal Working Example
The following example explains what I have discovered so far, also based on the discussion below.
\documentclass{beamer}
\usepackage{color}
\newcommand\red[1]{\textcolor{red}{#1} }
\newcommand\blue[1]{\textcolor{blue}{#1} }
\makeatletter
\newcommand*{\overlaynumber}{\number\beamer@slideinframe}
\makeatother
\newcommand\noOverlay{\red{No OS---permanent} \cn}
\newcommand\plusMinus{\blue{OS is \texttt{<+->};} \cn}
\usepackage{multicol}\raggedcolumns
\newcommand\ct{\texttt{\textbackslash{}beamerpauses}}
\newcommand\cn{\hfill\textcolor{green!50!black}{\tiny\ct=\arabic{beamerpauses}}}
\begin{document}
\scriptsize
\renewcommand\baselinestretch{0.8}
\begin{frame}\frametitle{Beamer's Overlay Specification (OS) With \texttt{<.$X$>}}
\alert{\textbf{Slide \#\overlaynumber}}
\begin{multicols*}{2}
\begin{enumerate}
\item\noOverlay
\item<+->\plusMinus
\item<+->\plusMinus
\item<+->\plusMinus
\item\noOverlay
\item<.->OS \texttt{<.->} means \emph{present with last overlay},
without advancing \ct; \cn
\item\noOverlay
\item<.(0)->OS \texttt{<.(0)->} is just the same as \texttt{<.->}; \cn
\item<.-> in fact, all consecutive occurrences of the \texttt{<.->} OS are displayed together. \cn
\item\noOverlay
\item\plusMinus
\item<.(-1)-> OS, \texttt{<.(-1)->} means: present the overlayed
content \emph{\underline{two} slides before} the current value of \ct; \ct{} does not change; \cn
\item<+->\plusMinus
\item<+->\plusMinus
\item<.(-2)-> OS \texttt{<.(-2)->} means: present the overlayed
content \emph{\underline{three} slides before} the current value of counter \ct; as usual, the counter \ct{} does not change; \cn
\item\noOverlay
\item<.(1)-> OS \texttt{<.(1)->} means:
present with \emph{current} overlay; do not advance \ct; \cn
\item\noOverlay
\item<.(2)-> OS \texttt{<.(2)->} means:
present with \emph{next} overlay; do not advance \ct; \cn
\item<.(3)-> Similarly, OS \texttt{<.(3)->} means:
present with overlay \emph{after the next}; as usual, do not advance \ct; \cn
\item\noOverlay
\item<+->\plusMinus
\item\noOverlay
\item<+->\plusMinus
\item<+->\plusMinus
\item<+->\plusMinus
\end{enumerate}
\end{multicols*}
\end{frame}
\end{document}
+
symbols inside your offset:<.(+1)->
should for example be<.(1)->
!