我怎样才能在 tikz 中将图像叠加在幻灯片的中心并覆盖文本。
考虑:
\documentclass{beamer}
\usepackage{tikz}
\usepackage{lipsum}
\begin{document}
\begin{frame}
\lipsum[1]
\begin{tikzpicture}[overlay]
\pause
\node (img1) {\rule{3cm}{2cm}};
\pause
\node (img2) at (img1.south east) {\rule{3cm}{2cm}};
\pause
\node (img3) at (img2.south west) [yshift=1cm] {\rule{3cm}{2cm}};
\end{tikzpicture}
\end{frame}
\end{document}
我希望图像动画出现在幻灯片的中央。
奖励积分如果您可以用灰色覆盖整个幻灯片来突出显示图像。
答案1
像这样?我使用了current page.
节点系列(我使用了一些不透明度;根据您的需要调整设置):
代码:
\documentclass{beamer}
\usepackage{tikz}
\usepackage{lipsum}
\begin{document}
\begin{frame}
\lipsum[1]
\begin{tikzpicture}[remember picture,overlay]
\pause
\fill[gray!80,opacity=0.8]
(current page.north west) rectangle (current page.south east);
\pause
\node (img1) at (current page.center) {\includegraphics[width=3cm,height=2cm]{example-grid-100x100pt}};
\pause
\node (img2) at (img1.south east) {\includegraphics[width=3cm,height=2cm]{example-grid-100x100pt}};
\pause
\node (img3) at (img2.south west) [yshift=1cm] {\includegraphics[width=3cm,height=2cm]{example-grid-100x100pt}};
\end{tikzpicture}
\end{frame}
\end{document}