Before looking at how .
works, I think it's worth a brief look at how +
works as in an overlay specification, and to link that to a 'plain' specification containing only explicit numbers. I'll take the offsets last, as they are more complex.
For the simple case of just numbers
\begin{itemize}
\item<1-> From the first slide
\item<2-> From the second slide
\item<3-> From the third slide
...
\end{itemize}
the idea is pretty clear: something with a overlay spec 1-
appears on the first slide and any later slides, while more complex set ups (such as <1,3-5,7>
) are also possible and human-readable.
In the case of +
, when beamer
reads an overlay spec if replaces all of the +
tokens by the current value of the beamerpauses
counter, then increments the counter (to apply to the next case it finds). Thus assuming there are no other overlays in the frame,
\begin{itemize}
\item<+-> From the first slide
\item<+-> From the second slide
\item<+-> From the third slide
...
\end{itemize}
is equivalent to the previous example: the first +
is replaced by 1
, the second by 2
and the third by 3
.
The idea of .
is it allows you to have two (or more) overlay specs which will be equivalent. For example, if we wanted to do
\begin{itemize}
\item<1-> From the first slide
\item<1-> From the first slide
\item<2-> From the second slide
\item<2-> From the second slide
...
\end{itemize}
without hard-coding the numbers we can't just use +
. Instead, we can use .
, which really means 'repeat the last value of beamerpauses
':
\begin{itemize}
\item<+-> From the first slide
\item<.-> From the first slide
\item<+-> From the second slide
\item<.-> From the second slide
...
\end{itemize}
Here, in the first line beamerpauses
is 1
, so the +
becomes 1
. In the second line, that value then gets repeated so the .
is replaced by a 1
. In the third line, beamerpauses
is 2
(because of the +
on the first line), so we end up with the same as my hard-coded case.
Notice that while the beamer
manual is describing what actaully happens at a code level, thinking about .
as being 'repeat the value used for the last +
' is conceptually easier and is equivalent in outcome. (Substitution always uses beamerpauses
, and because +
increments it you have to take one back off to get .
to do the correct thing.)
This then brings us to the offset business, which is quite advanced. Again, if we take a hard-coded demo first, we might have
\begin{itemize}
\item<2-> From the second slide
\item<3-> From the third slide
\item<4-> From the fourth slide
...
\end{itemize}
which can be done 'flexibly' as
\begin{itemize}
\item<+(1)-> From the first slide
\item<+(1)-> From the second slide
\item<+(1)-> From the first slide
...
\end{itemize}
The idea here is that the bracketed value 'adjusts' the substitution, so the +
symbols here are replaced by a value 'one ahead' of what they would normally be. Notice that beamerpauses
is still 'correct', so in the example above it's 1
in the first line, 2
in the second, etc.
Exactly the same then applies in the .
syntax
\begin{itemize}
\item<+-> From the first slide
\item<.(1)-> From the second slide
\item<.(2)-> From the third slide
\item<+-> From the second slide
...
\end{itemize}
but as the last line shows, beamerpauses
isn't incremented.
The idea of the bracket syntax is to allow relative offsets without fixing the absolute overlay numbers. However, it's down to you to make sure the values are sensible. In the question, the line
\item<.(-2)-> This is my tenth item, overlay specification is \verb/<.(-2)->/; \cn
leads to an error because the last +
was replaced by a 1
. Thus taking 2 off it gives an overlay number of -1
, which is invalid. The beamer
code doesn't do a sanity test so you get a low-level error: that perhaps could be corrected, but really you need to watch your offsets!
Another thing to note is is that your really don't want to have 'extra' +
symbols in your overlay. For example, in the line
\item<.(+1)-> This is my twelfth item, overlay specification is \verb/<.(+1)->/; \cn
The +
is replaced by the current value of beamerpauses
in the normal way, so this line first gets converted to
\item<.(21)-> This is my twelfth item, overlay specification is \verb/<.(+1)->/; \cn
and then the offset is applied: slide 22! Presumably you wanted
\item<.(1)-> This is my twelfth item, overlay specification is \verb/<.(+1)->/; \cn
i.e. one slide on from the current one, so in the example in the question slide 2.
To give an example where you might want to use these offsets, imagine that you want the first and third lines of an itemize to appear together, then the second and fourth lines, but you don't want to hard-code the slide numbers.
\begin{itemize}
\item<+-> First item % Creates overlay 1
\item<+-> Second item % Creates overlay 2
\item<.(-1)-> Third item % Appears on overlay 1
\item<.-> Fourth item % Appears on overlay 2
\end{itemize}
This only creates 2 overlays, with the two later items set to appear based on their relative relationship to the second item: the last one where +
was used and so beamerpauses
was altered.
As requested, answering the specific points in the question:
Should the specified offset be negative or positive?
- The offset should not include a
+
, and should only be negative when this keeps the value 'in range' (the absolute value of the overlay should remain positive).
How should the offset be specified?
- The offset should be written using the same syntax as in
+
, e.g., <.(1)->
, <.(2)->
, etc.
Is the offset incremented (or perhaps) decremented before it is being applied?
- Neither. Writing
<.->
is the same as writing <.(0)->
.
What's the value of the beamerpauses
counter within the code to which the overlay is applied?
- The same as it was before the overlay specification: it is (possibly) incremented only at the end of the overlay spec. (see point 5).
What's the value of this counter after the specification?
- If a
+
is present in the overlay spec, the value of beamerpauses
is incremented by exactly one.
Best Answer
You can use environment
quote
orquotation
for multi paragraph quotations.Because you have to quote only one paragraph you can use:
Change
⟨action specification⟩
to what you need.