Correct dynamic transparencies of blocks in beamer using \pause and \onslide
One option: using \onslide
almost ecerywhere (except for the first \pause
, which could aslo be replaced for a convenient \onslide
); notice also that you can avoid manual numbering:
\documentclass{beamer} %[handout]
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage[utf8x]{inputenc}
\usetheme{Antibes}
\setbeamercovered{dynamic}
\begin{document}
\begin{frame}
First text. \pause
\begin{block}{Title}
Second text.
\onslide<+(1)->{Third text.}
\onslide<+(1)->{Fourth text.}
\onslide<+(1)->{Fifth text.}
\end{block}
\onslide<+(1)->{Sixth text.}
\end{frame}
\end{document}
The result:
Rackbox
Updated on August 01, 2020Comments
-
Rackbox over 3 years
I'm using
beamer
withAntibes
theme and\setbeamercovered{dynamic}
option. I would like to have a block whose text is shown in two different frames. Here is my first try:\documentclass{beamer} %[handout] \usepackage[T1]{fontenc} \usepackage[italian]{babel} \usepackage[utf8x]{inputenc} \usetheme{Antibes} \setbeamercovered{dynamic} \begin{document} \begin{frame} First text. \pause \begin{block}{Title} Second text. \pause Third text. \end{block} \pause Fourth text. \end{frame} \end{document}
which produces this ugly result:
The second try was with
\onslide
. With the same preamble:\begin{document} \begin{frame} First text. \pause \begin{block}{Title} Second text. \onslide<3->{Third text.} \end{block} \pause[4] Fourth text. \end{frame} \end{document}
which now produces
This last result is quite good, exept for the fact that the "Third text" is too much greyed out! The text is there, but the transparency is even stronger than the "Fourth text", which comes later in the exposition.
Third try: I tried substituting the
\pause[4]
with another\onslide
, but this solution isn't perfect too. The "Third text" and "Fourth text" are now both too much greyed out with respect to the "Second text".How to obtain the perfect result?
Note that, when the "Second text" shows up, from that frame on everything gets its correct transparency level, in all the three solutions I tested.
-
Rackbox over 8 yearsthis is exactly what I did in my third try. To understand what doesn't satisfy me try to add some other text in the block with others
\onslide
. On the first frame the transparency is still broken! (From the second on, everything is fine) PS: how did you create the gif from the pdf? -
Gonzalo Medina over 8 years@Rackbox I just added some more texts in my updated answer and I don't seem to see anything wrong (see the animated image); is there something still wrong?. By the way, I produced the
.gif
using ImageMagick andconvert -verbose -delay 150 -loop 0 -density 300 a.pdf a.gif
-
Rackbox over 8 yearsMaybe it's my taste, but I think that on the first frame (when there is only "First text" completely visible) the other text is too much transparent! "Third text", "Fourth text" and so on are almost invisible! My feeling is supported by the fact that, on the second frame, suddenly they all appear in a fading transparency, very much nicer.
-
Gonzalo Medina over 8 years@Rackbox but that's what the
dynamic
effect does: the "further" an element, the dimmer it appears. If you don't want this, don't use dynamic, but just transparency as in\setbeamercovered{transparent}
-
Gonzalo Medina over 8 years@Rackbox Another option would be to use
highly dynamic
:\setbeamercovered{highly dynamic}
or declare your own grade of opaqueness:\setbeamercovered{still covered={\opaqueness<1>{25}\opaqueness<2>{20}\opaqueness<3>{15}\opaqueness<4->{10}}, again covered={\opaqueness<1->{15}}}
-
Rackbox over 8 yearsPerfect! Using \setbeamercovered and specifying manually the opaqueness values I obtained what I wanted! Thank you! I simply increased a little bit all the values to make sure that the not yet uncovered text doesn't fade in the light grey of the background of the block.