Original question
In a Beamer presentation that I am writing, I have an itemize
list and would like to make each item visible one-by-one. Then, starting on the slide after a given item appears, I would like that item to be re-covered in a transparent way. This is easy enough to accomplish using again covered
with \setbeamercovered
:
\documentclass{beamer}
\setbeamercovered{again covered={\opaqueness<1->{25}}}
\begin{document}
\begin{frame}{Frame Title}
\begin{itemize}[<+>]
\item Who's on first
\item What's on second
\item I don't know's on third
\end{itemize}
\uncover<+->{-- Abbott and Costello}
\end{frame}
\end{document}
But here's the twist: I would like to modify the above example so that, once uncovered, the words 'Who', 'What', 'I don't know' remain uncovered even after their respective \item
s are re-covered. The following code tries three different ways to make this work:
\documentclass{beamer}
\setbeamercovered{again covered={\opaqueness<1->{25}}}
\begin{document}
\begin{frame}{Frame Title}
\begin{itemize}[<+>]
\item \uncover<.->{Who}'s on first
\item {\color<.->{black} What}'s on second
\item<+-> I don't know\uncover<.>{'s on third}
\end{itemize}
\uncover<+->{-- Abbott and Costello}
\end{frame}
\end{document}
The first two attempts do not work at all. The third attempt is closer, but still not quite right: I want the triangular item marker to be transparent whenever 's on third
is re-covered.
So, my question is: How can I cleanly and correctly keep certain subphrases uncovered even when the surrounding context is re-covered?
There might be a way to hook into the item marker and make it transparent, but I would like to avoid this; I will be using an answer with inference rules (set with the lkproof
package) for which such hooks would be difficult to create (because of my limited TeX knowledge).
Revised question
@alexurba's answer is useful and almost, but not quite, does what I need. First, I've slightly modified his suggestion:
\newcommand<>{\myuncover}[1]{%
\alt#2{\mbox{\beamer@endcovered #1}}{\mbox{#1}}}
By using \alt
and \mbox
rather than using \only
and \makebox[0pt][r]
, we can avoid over-printing the text #1
.
Yet this command interacts poorly with \color
, as the following example shows:
\documentclass{beamer}
\setbeamercovered{again covered={\opaqueness<1->{25}}}
\makeatletter
\newcommand<>{\alexurbauncover}[1]{%
#1\only#2{\makebox[0pt][r]{\beamer@endcovered #1}}}
\newcommand<>{\myuncover}[1]{%
\alt#2{\mbox{\beamer@endcovered #1}}{\mbox{#1}}}
\makeatother
\begin{document}
\begin{frame}{Frame Title}
\begin{itemize}[<+>]
\item Who's on {\color{structure} first}
\item \myuncover<.->{What}'s on {\color{structure} second}
\item \alexurbauncover<.->{I don't know}'s on {\color{structure} third}
\end{itemize}
\uncover<+>{-- Abbott and Costello}
\end{frame}
\end{document}
The first bullet shows an ordinary \uncover
and re-cover, which makes the structure
-colored text appropriately transparent when re-covered. The second bullet shows that the revised \myuncover
command somehow breaks this treatment of the structure
-colored text: it stays completely opaque when re-covered. The third bullet shows that this behavior wasn't inadvertantly introduced by my revisions to @alexurba's original \myuncover
.
So, my revised question is: How can I have something like the above \myuncover
that correctly respects the \color
switch in re-covered text?
Attempted solution
From what I can tell, in the above \myuncover
, the \mbox
appears to serve to delimit the scope of \beamer@endcovered
. Another idea is to end and then restart the covering behavior, such as with
\newcommand<>{\myuncover}[1]{%
\alt#2{\beamer@endcovered #1\beamer@startcovered}{#1}}
However, this command doesn't work the way I would have liked:
\documentclass{beamer}
\setbeamercovered{again covered={\opaqueness<1->{25}}}
\makeatletter
\newcommand<>{\myuncover}[1]{%
\alt#2{\beamer@endcovered #1\beamer@startcovered}{#1}}
\makeatother
\begin{document}
\begin{frame}{Frame Title}
\begin{itemize}[<+>]
\item \myuncover<.->{Who}'s on {\color{structure} first}
\item \myuncover<.->{What}'s on {\color{structure} second}
\item \myuncover<.->{I don't know}'s on {\color{structure} third}
\end{itemize}
\uncover<+>{-- Abbott and Costello}
\end{frame}
\end{document}
My guess is that \beamer@startcovered
is preventing Beamer from recognizing that 's on first
etc. is being re-covered, and therefore the again covered
does not kick in at the right point. But that's just a guess since I don't understand exactly how \beamer@startcovered
works.
<>
addition to newcommand and I did not know\alt
, either. I think you don't even need thembox
es in your macro; another pair of braces would do:\newcommand<>{\mynewuncover}[1]{\alt#2{{\beamer@endcovered #1}}{#1}}
\mbox
es aren't needed. The\color
problem persists though... Thanks for the pointer!