我找到了以下解决方案来将大图片作为新幻灯片插入:
\begin{tikzpicture}[remember picture, overlay]
\node at (current page.center) {\includegraphics[keepaspectratio, width=\paperwidth, height=\paperheight]{img}};
\end{tikzpicture}
由于图像没有完全填满空间,框架装饰会从侧面露出。
我如何添加白色背景(即删除框架装饰)以便框架不再可见?
答案1
方法 1:
plain
使用框架选项删除框架装饰
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}[plain]
\begin{tikzpicture}[remember picture, overlay]
\node at (current page.center) {\includegraphics[keepaspectratio, width=\paperwidth, height=\paperheight]{example-image-duck}};
\end{tikzpicture}
\end{frame}
\end{document}
方法 2:
由于您已经在使用 tikz 来定位图像,您可以用纯色填充整个幻灯片(在下面的示例中为红色,将其更改为幻灯片使用的任何背景颜色)
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\begin{tikzpicture}[remember picture, overlay]
\fill[red] (current page.south east) rectangle (current page.north west);
\node at (current page.center) {\includegraphics[keepaspectratio, width=\paperwidth, height=\paperheight]{example-image-duck}};
\end{tikzpicture}
\end{frame}
\end{document}