我只需要一张幻灯片的背景,我需要在一张独特的幻灯片中包含一张图片,如背景。背景在所有幻灯片上都有,但我只需要一张幻灯片中的图片,如背景。我正在使用madrid theme
。谢谢您的帮助。
答案1
如果要更改一组(1 张或多张)幻灯片的背景图像,则前该组,集合
% image from https://tranhtreophongkhachdep.com/200-mau-tranh-phong-canh-dep-nui-rung-tay-bac/
\setbeamertemplate{background}{
\tikz\node[opacity=.5,yscale=1.5,inner sep=0]{\includegraphics[width=\paperwidth]{luavang}};}
(让我们使用\includegraphics
命令的某些选项,例如[width=\paperwidth]
和/或 TikZ 命令的某些选项\node
,例如[opacity=.5,yscale=1.5]
,[inner sep=0]
以获得所需的背景)然后设置
\setbeamertemplate{background}{}
后 该组幻灯片回到通常的背景。
完整示例代码: 链接见背面
\documentclass{beamer}
\usepackage{tikz}
\usetheme{madrid}
\title{Beamer Template}
\author{TeXstudio Team}
\begin{document}
\begin{frame}[plain]
\maketitle
\end{frame}
\begin{frame}{Usual background}
\end{frame}
% image from https://tranhtreophongkhachdep.com/200-mau-tranh-phong-canh-dep-nui-rung-tay-bac/
\setbeamertemplate{background}{
\tikz\node[opacity=.5,yscale=1.5,inner sep=0]{\includegraphics[width=\paperwidth]{luavang}};}
\begin{frame}{A specific background}
\end{frame}
\setbeamertemplate{background}{}
\begin{frame}{Usual background again}
\end{frame}
\end{document}
附言:正如所说的在 Beamer 中将幻灯片背景设为可选,您可以将该组幻灯片放入本地组内{...}
以本地更改背景(以及其他您想要的内容)。
\documentclass{beamer}
\usepackage{tikz}
\usetheme{madrid}
\title{Beamer Template}
\author{TeXstudio Team}
\begin{document}
\begin{frame}[plain]
\maketitle
\end{frame}
\begin{frame}{Usual background}
\end{frame}
{% scope to starting a new background
% image from https://tranhtreophongkhachdep.com/200-mau-tranh-phong-canh-dep-nui-rung-tay-bac/
\setbeamertemplate{background}{
\tikz\node[opacity=.5,yscale=1.5,inner sep=0] {\includegraphics[width=\paperwidth]{luavang}};}
\begin{frame}{A specific background}
\end{frame}
}% end of the scope of the new background
\begin{frame}{Usual background again}
\end{frame}
\end{document}