我正在使用beamer
它进行演示,遇到了不同的问题:
- 在标题页中,我添加的背景图像没有覆盖整个框架:页眉仍然是白色的。
- 标题/副标题背景和我的图像背景之间有一个空白,这是由标题/副标题背景从灰色到白色的渐变造成的。
- 参考书目的格式很糟糕。
这是一个重现我的问题的 MVW:
\documentclass[aspectratio=1610]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usetheme{Darmstadt}
\usecolortheme{beaver}
\useoutertheme[subsection=false]{miniframes}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage[style=philosophy-modern,hyperref,square,natbib,backend=bibtex]{biblatex}
\addbibresource{Bibliography.bib}
\author[]{Author name here}
\title{\huge Cool title here\\ \large Ugly withe space on top of this frame}
\date{Date here}
\institute[]{Badass institution}
\begin{document}
\beamertemplatenavigationsymbolsempty
\usebackgroundtemplate{%
\makebox[\paperwidth][c]{\makebox[\paperheight][c]{\tikz\node[opacity=0.5]{\includegraphics[height=1\paperheight]{EPFL_LOG_col.pdf}};}}}
{
\setbeamertemplate{headline}{}
\setbeamertemplate{footline}{}
\beamertemplatenavigationsymbolsempty
\begin{frame}
\maketitle
\end{frame}
}
\usebackgroundtemplate{%
\makebox[\paperwidth][c]{\tikz\node[opacity=0.05]{\includegraphics[height=\paperheight]{EPFL_LOG_mut_small.pdf}};}}
\section*{Introduction}
\subsection*{}
\begin{frame}
\frametitle{Introduction}
\framesubtitle{}
Note the white space caused by the gradient from the title background to white. Citation: \citet{Citation}
\end{frame}
\begin{frame}[t,allowframebreaks]
\frametitle{References}
\printbibliography
\end{frame}
\end{document}
有可能修复这些问题吗?如果可以,如何修复?
答案1
不要让这些嵌套的框变得过于复杂 - 因为您已经在使用
tikz
,您只需将图像放在页面的中心并指定其宽度和高度:\usebackgroundtemplate{% \begin{tikzpicture}[remember picture,overlay] \node[at=(current page.center),opacity=0.5] { \includegraphics[width=\paperwidth,height=\paperheight]{example-image-a} }; \end{tikzpicture} }
删除框架标题下方的阴影:
\setbeamertemplate{frametitle}[default][colsep=-4bp,rounded=false,shadow=false]
嗯,这是你使用的风格的错误,换一种吧。
\documentclass[aspectratio=1610]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usetheme{Darmstadt}
\usecolortheme{beaver}
\useoutertheme[subsection=false]{miniframes}
\setbeamertemplate{frametitle}[default][colsep=-4bp,rounded=false,shadow=false]
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{Knu86,
author = {Knuth, Donald E.},
year = {1986},
title = {The \TeX book},
}
\end{filecontents*}
\usepackage[style=authoryear,hyperref,natbib]{biblatex}
\addbibresource{\jobname.bib}
\author[]{Author name here}
\title{\huge Cool title here\\ \large Ugly withe space on top of this frame}
\date{Date here}
\institute[]{Badass institution}
\begin{document}
\beamertemplatenavigationsymbolsempty
\usebackgroundtemplate{%
\begin{tikzpicture}[remember picture,overlay]
\node[at=(current page.center),opacity=0.5] {
\includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}
};
\end{tikzpicture}
}
{
\setbeamertemplate{headline}{}
\setbeamertemplate{footline}{}
\beamertemplatenavigationsymbolsempty
\begin{frame}
\maketitle
\end{frame}
}
\usebackgroundtemplate{%
\begin{tikzpicture}[remember picture,overlay]
\node[at=(current page.center),opacity=0.5] {
\includegraphics[width=\paperwidth,height=\paperheight]{example-image-b}
};
\end{tikzpicture}
}
\section*{Introduction}
\subsection*{}
\begin{frame}
\frametitle{Introduction}
\framesubtitle{}
Note the white space caused by the gradient from the title background to white. Citation: \citet{Citation}
\end{frame}
\begin{frame}[t,allowframebreaks]
\frametitle{References}
\nocite{*}
\printbibliography
\end{frame}
\end{document}