2011-01-13 78 views
39

我正在嘗試使用Beamer類進行演示。我想在一個框架中逐個顯示一個簡單的圖像列表,就像當您使用分項< + - >Beamer:如何將圖像顯示爲分步圖像

我沒有問題逐個顯示圖像,但每次插入新圖像時都會移動圖像。我如何解決這個問題 - 從我的角度來看,必須有一個簡單的解決方案,而不必指定圖像的絕對位置。

+0

你想顯示所有的圖像在一個單一的框架,或每個圖像在其自己的框架,但與以前顯示的圖像對齊? – 2011-01-13 17:41:48

+0

在一個單一的框架中...因此,圖像不會因爲被發現而移動 – aagaard 2011-01-13 18:05:24

+3

您可以在[TeX StackExchange](http://tex.stackexchange.com/)上找到整個社區,其中沒有TeX相關問題太小。看[這個問題](http://tex.stackexchange.com/questions/7436/latex-beamer-fixed-vertical-alignment)。 – 2011-01-13 18:38:45

回答

30

我找到了解決我的問題,通過使用visble命令。

編輯:

\visible<2->{ 
    \textbf{Some text} 
    \begin{figure}[ht] 
     \includegraphics[width=5cm]{./path/to/image} 
    \end{figure} 
} 
29

你可以簡單地指定一系列的圖像是這樣的:

\includegraphics<1>{A} 
\includegraphics<2>{B} 
\includegraphics<3>{C} 

這將完全 同一位置產生三張幻燈片與圖像A到C。

7

這是我做過什麼:

\begin{frame}{series of images} 
\begin{center} 
\begin{overprint} 

\only<2>{\includegraphics[scale=0.40]{image1.pdf}} 
\hspace{-0.17em}\only<3>{\includegraphics[scale=0.40]{image2.pdf}} 
\hspace{-0.34em}\only<4>{\includegraphics[scale=0.40]{image3.pdf}} 
\hspace{-0.17em}\only<5>{\includegraphics[scale=0.40]{image4.pdf}} 

\only<2-5>{\mbox{\structure{Figure:} something}} 

\end{overprint} 
\end{center} 
\end{frame} 
0

這是我用來對付該問題的示例代碼。

\begin{frame}{Topic 1} 
Topic of the figures 
\begin{figure} 
\captionsetup[subfloat]{position=top,labelformat=empty} 
\only<1>{\subfloat[Fig. 1]{\includegraphics{figure1.jpg}}} 
\only<2>{\subfloat[Fig. 2]{\includegraphics{figure2.jpg}}} 
\only<3>{\subfloat[Fig. 3]{\includegraphics{figure3.jpg}}} 
\end{figure} 
\end{frame}