
uncover
の中にをネストしましたonly
が、期待どおりに動作しません。ドキュメントのヘッダーは次のとおりです:
\documentclass[8pt]{beamer}
\mode<presentation>{\usetheme{Warsaw}}
\setbeamertemplate{navigation symbols}{}
\usepackage{empheq}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,backgrounds}
問題のフレームは次のとおりです。
\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}
私が期待している動作は、03D4ag-lc.png がスライド 3 に表示され、03D4ag-lc-model.png がスライド 4 に表示され、03D4ag-lc.png が置き換えられないことです。代わりに、03D4ag-lc-model.png はコマンドを完全に無視しているようでuncover
、両方のスライドに存在します。これは正常ですか? もしそうなら、ここで私が目指していることを実現する適切な方法は何ですか?
答え1
コードでは、マクロをtransparent
介してカバーされた効果を設定しています\setbeamercovered{transparent}
。
@JosephWright が指摘しているように、インポートされた画像では透明化は機能しないため、次のようにインポートされた画像をカバーしようとしても、カバーされた効果がまったく得られませんでした。
\uncover<4>{
\includegraphics[width=0.4\textwidth]{figures/03D4ag-lc-model.png}
}
画像を非表示にするには、透明効果を再設定する必要があります。
\setbeamercovered{invisible}
overlayarea
フレームの残りの部分の最初の設定を上書きしないように、仕様を内部に配置することを提案しました。
Beamer マニュアルのセクション 17.6 も参照してください。