3

I've nest an uncover inside an only and it's not working as expected. The header of my document is :

\documentclass[8pt]{beamer}

\mode<presentation>{\usetheme{Warsaw}}
\setbeamertemplate{navigation symbols}{}

\usepackage{empheq}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,backgrounds}

And the frame in question is the following :

\begin{frame}[label=review]
\frametitle{A review of the steps}
\setbeamercovered{transparent}
\begin{columns}
\column{0.4\linewidth}
\begin{enumerate}[<+->]
\item \alert<1>{Supernova detection.}
\item \alert<2>{Spectroscopic confirmation.}
\item \alert<3,6>{Multi-band photometry.}
\item \alert<4,6>{Parameter extraction.}
\item \alert<5,6>{Hubble diagram fit.}
\end{enumerate}
\column{0.7\linewidth}
\begin{center}
  \begin{tikzpicture}%[show background grid]
    \node[anchor=south west,inner sep=0] (step1) at (0,0) {\includegraphics[width=0.18\linewidth]{figures/pedagogy/03D4ag-zoom1.png}};
    \begin{scope}[x={(step1.south east)},y={(step1.north west)}]
      \draw<1>[red] (0,0) rectangle (1,1);
    \end{scope}
  \end{tikzpicture}
  \begin{tikzpicture}%[show background grid]
    \node[anchor=south west,inner sep=0] (step2) at (0,0) {\includegraphics[width=0.18\linewidth]{figures/guypres/1994D_spectrum.pdf}};
    \begin{scope}[x={(step2.south east)},y={(step2.north west)}]
      \draw<2>[red] (0,0) rectangle (1,1);
    \end{scope}
  \end{tikzpicture}
  \begin{tikzpicture}%[show background grid]
    \node[anchor=south west,inner sep=0] (step3) at (0,0) {\includegraphics[width=0.18\linewidth]{figures/03D4ag-lc.png}};
    \begin{scope}[x={(step3.south east)},y={(step3.north west)}]
      \draw<3>[red] (0,0) rectangle (1,1);
    \end{scope}
  \end{tikzpicture}
  \begin{tikzpicture}%[show background grid]
    \node[anchor=south west,inner sep=0] (step4) at (0,0) {\includegraphics[width=0.18\linewidth]{figures/03D4ag-lc-model.png}};
    \begin{scope}[x={(step4.south east)},y={(step4.north west)}]
      \draw<4>[red] (0,0) rectangle (1,1);
    \end{scope}
  \end{tikzpicture}
  \begin{tikzpicture}%[show background grid]
    \node[anchor=south west,inner sep=0] (step5) at (0,0) {\includegraphics[width=0.18\linewidth]{figures/pedagogy/hubblediagram.png}};
    \begin{scope}[x={(step5.south east)},y={(step5.north west)}]
      \draw<5>[red] (0,0) rectangle (1,1);
    \end{scope}
  \end{tikzpicture}
\end{center}
\end{columns}

\begin{overlayarea}{\textwidth}{\textheight}
\only<1>{
  \begin{center}
    \includegraphics[width=0.4\textwidth]{figures/pedagogy/03D4ag-zoom1.png}
    \hspace{0.2cm}
    \includegraphics[width=0.4\textwidth]{figures/pedagogy/03D4ag-zoom3.png}
  \end{center}
}
\only<2>{
  \begin{center}
    \includegraphics[width=0.7\textwidth]{figures/guypres/1994D_spectrum.pdf}
  \end{center}
}
\only<3-4>{
  \begin{center}
    \includegraphics[width=0.4\textwidth]{figures/03D4ag-lc.png}
    \hspace{0.2cm}
    \uncover<4>{
      \includegraphics[width=0.4\textwidth]{figures/03D4ag-lc-model.png}
    }
  \end{center}
}
\only<5>{
  \begin{center}
    \includegraphics[width=0.7\textwidth]{figures/pedagogy/hubblediagram.png}
  \end{center}
}
\end{overlayarea}

\end{frame}

The behavior I'm expecting is that 03D4ag-lc.png will be displayed on slide 3, and 03D4ag-lc-model.png will appear on slide 4, without displacing 03D4ag-lc.png. Instead, 03D4ag-lc-model.png seems to completely ignore the uncover command, and is present on both slides. Is this normal ? If so what is the proper way of accomplishing what I'm aiming for here ?

5
  • 1
    If I create a quick test document by adding \RequirePackage[demo]{graphicx}\documentclass{beamer}\begin{document}\begin{frame}\begin{itemize}[<+->]\item Stuff \item More stuff\end{itemize} before your code and \end{frame}\end{document} after it then all seems to be fine. Could you expand your demo to some code which shows the issue?
    – Joseph Wright
    Commented Sep 22, 2014 at 15:42
  • @JosephWright I've added the complete slide. Hope it's not too much of a mess for you. The \uncover<4> is what seems to be defective.
    – ticster
    Commented Sep 22, 2014 at 16:08
  • 1
    does adding \setbeamercovered{invisible} inside your overlayarea environment solve your problem?
    – d-cmst
    Commented Sep 22, 2014 at 16:23
  • @dcmst Yes it does... How did you figure that out ? Could you explain what's going on here in an answer ? I can guarantee you and upvote and answer confirmation if you do.
    – ticster
    Commented Sep 22, 2014 at 16:25
  • @ticster The transparent option doesn't work for images, only for text, so if you've seen this before it's not that hard to track down :-)
    – Joseph Wright
    Commented Sep 22, 2014 at 16:31

1 Answer 1

2

In your code you are setting the covered effect to transparent via the \setbeamercovered{transparent} macro.

As @JosephWright notes, the transparency does not work for imported images, so you got no covered effect at all when you tried to uncover an imported image with:

\uncover<4>{
  \includegraphics[width=0.4\textwidth]{figures/03D4ag-lc-model.png}
}

To hide images you need to re-set the transparency effect using

\setbeamercovered{invisible}

I suggested to put the spec inside your overlayarea so that it does not override the first setting in the rest of the frame.

You may also want to chack section 17.6 of the Beamer manual.

1
  • 1
    Thanks for the answer. Now that you mention it, I did only notice this bug after having made several modifications to the slide, including changing the cover mode. I had just added so many things by then I didn't realize that's what did it.
    – ticster
    Commented Sep 22, 2014 at 18:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .