我的标题页有背景图像。但是,当演示文稿包含部分(创建导航栏)时,图像顶部会出现一个白框。我该如何去除它?
\documentclass[14pt]{beamer} %
\graphicspath{ {./graphics/} }
\mode<presentation>
{
\usetheme{Warsaw}
\usecolortheme{wolverine}
\setbeamercovered{transparent}
}
\setbeamertemplate{navigation symbols}{}%remove navigation symbols
\begin{document}
{
\setbeamertemplate{headline}{}
\setbeamertemplate{footline}{}
\usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{square-land-background.jpg}}%
\begin{frame}{}
\end{frame}
}
\section{Introduction}
\begin{frame}{a}
\end{frame}
\section{first part}
\begin{frame}{b}
\end{frame}
\end{document}
我尝试了两种方法来解决这个问题:Beamer:删除单个框架上的标题及其空间(用于计划),但保留脚注但它们没有起作用。
答案1
无需额外软件包的原生投影仪解决方案:
\documentclass[14pt]{beamer}
\usetheme{Warsaw}
\usecolortheme{wolverine}
\setbeamercovered{transparent}
\setbeamertemplate{navigation symbols}{}%remove navigation symbols
\begin{document}
{
\setbeamertemplate{headline}{\vskip\headheight}
\setbeamertemplate{footline}{}
\usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{example-image}}%
\begin{frame}{}
\end{frame}
}
\section{Introduction}
\begin{frame}{a}
\end{frame}
\section{first part}
\begin{frame}{b}
\end{frame}
\end{document}
答案2
将页面输出时的图像设置为覆盖(使用eso-pic
):
\documentclass{beamer}
\usepackage{eso-pic}
\mode<presentation>
{
\usetheme{Warsaw}
\usecolortheme{wolverine}
\setbeamercovered{transparent}
}
\setbeamertemplate{navigation symbols}{} % remove navigation symbols
\begin{document}
\begin{frame}{title page}
\AddToShipoutPictureFG*{
\AtPageLowerLeft{%
\includegraphics[width=\paperwidth,height=\paperheight]{example-image}%
}
}
\end{frame}
\section{Introduction}
\begin{frame}{a}
\end{frame}
\section{first part}
\begin{frame}{b}
\end{frame}
\end{document}
答案3
\usebackgroundtemplate
将背景图像放置在页眉下方。使用 时\setbeamertemplate{headline}{}
,您只是清除页眉内容,而不是删除它,因此剩下的是白色背景画布。
一种选择是将背景定义为明确定位的tikzpicture
。这最初需要两次构建才能正确放置图像,并且该图像将作为所有帧的背景出现。以下代码显示了差异。
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning}
\mode<presentation>
{
\usetheme{Warsaw}
\usecolortheme{wolverine}
\setbeamercovered{transparent}
}
\setbeamertemplate{navigation symbols}{}%remove navigation symbols
\begin{document}
\setbeamertemplate{headline}{}
\setbeamertemplate{footline}{}
\usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{example-image}}%
\begin{frame}{}
\end{frame}
\section{Introduction}
\begin{frame}{a}
\end{frame}
\usebackgroundtemplate{%
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.center){\includegraphics[width=\paperwidth,height=\paperheight]{example-image}};
\end{tikzpicture}
}
\section{first part}
\begin{frame}{b}
\end{frame}
\end{document}