我花了一整天的时间,仍然不知道该怎么做。这个问题与如何在投影仪中将多个 TikZ 图形放置在相同的位置/高度?我尝试了所有可能的解决方案,但还是找不到解决问题的方法。我最终总是将所有图形移到幻灯片之外。我使用了几个\vspace{-2cm}
不同大小的位置,但最终结果仍然不令人满意。一定有更简单的方法可以做到这一点。
有人知道如何提高我的产出吗?
提前感谢您花时间和精力阅读和回答我的问题。
\documentclass{beamer}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{frame}{Title}
\setbeamercovered{dynamic}%Makes the text appear before it presents nice!!!!
\begin{columns}[t] % contents are top vertically aligned
\begin{column}[T]{5cm} % each column can also be its own environment
\begin{itemize}
\item \invisible<2-4>{Item 1}
\item \invisible<3-4>{Item 2}
\item \invisible<4-4>{Item 3}
\item Item 4
\end{itemize}
\end{column}
\begin{column}[T]{5cm} % alternative top-align that's better for graphics
\begin{figure}
\visible<1-1>{%
\begin{subfigure}[b]{1.0\linewidth}
\caption{Subcaption 1} \label{fig:subcap1}\hfill
\includegraphics[scale=0.5]{www}
\end{subfigure}\hfill
}%
\visible<2-2>{%
\begin{subfigure}[b]{1.0\linewidth}
\caption{Subcaption 2} \label{fig:subcap2}\hfill
\includegraphics[scale=0.5]{www}
\end{subfigure}
}%
\visible<3-3>{%
\begin{subfigure}[b]{1.0\linewidth}
\caption{Subcaption 3} \label{fig:subcap3}\hfill
\includegraphics[scale=0.5]{www}
\end{subfigure}
}%
\visible<4-4>{%
\begin{subfigure}[b]{1.0\linewidth}
\caption{Subcaption 4} \label{fig:subcap4}\hfill
\includegraphics[scale=0.5]{www}
\end{subfigure}
}%
\captionsetup{justification=centering} %Center a two line caption
\caption{Final Caption} \label{fig:largeFigure}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\end{document}
答案1
caption
需要注意的是,在 beamer 中使用和包并不好,subcaption
因为它们不完全兼容(我删除了它们)。你也在[b]
你的中使用了subfigure
,因此一切都是底部对齐的。最好使用width
而scale
不是\includegraphics
这是您修改后的代码:
\documentclass{beamer}
\begin{document}
\begin{frame}{Title}
\setbeamercovered{dynamic}%Makes the text appear before it presents nice!!!!
\begin{columns}[T] % contents are top vertically aligned
\begin{column}{5cm} % each column can also be its own environment
\begin{itemize}
\item \invisible<2-4>{Item 1}
\item \invisible<3-4>{Item 2}
\item \invisible<4-4>{Item 3}
\item Item 4
\end{itemize}
\end{column}
\begin{column}{5cm} % alternative top-align that's better for graphics
\begin{figure}
\only<1>{%
\centering Subcaption 1
\includegraphics[width=\columnwidth]{example-image-a}
}%
\only<2>{%
\centering Subcaption 2
\includegraphics[width=\columnwidth]{example-image-b}
}%
\only<3>{%
\centering Subcaption 3
\includegraphics[width=\columnwidth]{example-image-c}
}%
\only<4>{%
\centering Subcaption 4
\includegraphics[width=\columnwidth]{example-image}
}%
\caption{Final Caption} \label{fig:largeFigure}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\end{document}