![如何将背景图像仅包含在投影仪演示文稿的一页中?](https://linux22.com/image/297758/%E5%A6%82%E4%BD%95%E5%B0%86%E8%83%8C%E6%99%AF%E5%9B%BE%E5%83%8F%E4%BB%85%E5%8C%85%E5%90%AB%E5%9C%A8%E6%8A%95%E5%BD%B1%E4%BB%AA%E6%BC%94%E7%A4%BA%E6%96%87%E7%A8%BF%E7%9A%84%E4%B8%80%E9%A1%B5%E4%B8%AD%EF%BC%9F.png)
答案1
您可以在幻灯片之前声明背景,然后在幻灯片之后取消声明背景:
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
Background transparent image, not here
\end{frame}
\usebackgroundtemplate{% declare it
\tikz[overlay,remember picture] \node[opacity=0.3, at=(current page.center)] {
\includegraphics[height=\paperheight,width=\paperwidth]{example-image-a}};
}
\begin{frame}
Background transparent image, centered on slide
\end{frame}
\usebackgroundtemplate{ } %% undeclare it
\begin{frame}
Background transparent image, not here
\end{frame}
\end{document}
另一方面,你也可以使用组:
\bgroup
\usebackgroundtemplate{%
\tikz[overlay,remember picture] \node[opacity=0.3, at=(current page.center)] {
\includegraphics[height=\paperheight,width=\paperwidth]{example-image-a}};
}
\begin{frame}
Background transparent image, centered on slide
\end{frame}
\egroup