由于投影空间的限制,我无法使用全帧尺寸,因此我想在每张幻灯片的底部(页脚下方)添加一个黑条。这样可以有效降低每张幻灯片的高度。
是否有一种简单的方法可以在使用标准 beamer 主题的同时实现这一点?
答案1
您可以通过修改页脚来实现。当然这取决于您使用的主题,但在下面的示例中,在第 24 行,您可以调整2.25ex
黑条的粗细。
\documentclass{beamer}
\usetheme{Madrid}
\setbeamercolor{back}{fg=black,bg=black}
\makeatletter
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}%
}%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,center]{back}%
\end{beamercolorbox}%
}%
\vskip0pt%
}
\makeatother
\begin{document}
\author{A.U. Thor}
\institute{The Institute}
\begin{frame}
Test
\end{frame}
\end{document}
答案2
这是@samcarter_is_at_topanswers.xyz 的想法使用 tikz 的变体。
\newlength{\bottommargin}
\setlength{\bottommargin}{3cm}
\setbeamertemplate{footline}
{
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=\bottommargin,dp=0ex,center]{back}%
\tikz{\path[fill=black] (0,0) rectangle (\paperwidth,\bottommargin);}
\end{beamercolorbox}%
}%
\vskip0pt%
}
答案3
您不需要添加条形图,只需将纵横比更改为 16:9。
\documentclass[aspectratio=169]{beamer}
或者...
\documentclass[aspectratio=1610]{beamer}
Sets aspect ratio to 16:9, and frame size to 160mm by 90mm.
\documentclass[aspectratio=149]{beamer}
Sets aspect ratio to 14:9, and frame size to 140mm by 90mm.
\documentclass[aspectratio=141]{beamer}
Sets aspect ratio to 1.41:1, and frame size to 148.5mm by 105mm.
\documentclass[aspectratio=54]{beamer}
Sets aspect ratio to 5:4, and frame size to 125mm by 100mm.
\documentclass[aspectratio=43]{beamer}
The default aspect ratio and frame size. You need not specify this option.
\documentclass[aspectratio=32]{beamer}
Sets aspect ratio to 3:2, and frame size to 135mm by 90mm