我使用带有包含压缩的微型帧导航内容的标题的 beamer:
\documentclass[compress]{beamer}
\useoutertheme[subsection=false]{miniframes}
\setbeamercolor{section in head/foot}{fg=white, bg=black}
\begin{document}
\section{First}
\frame{First-first}
\frame{First-second}
\section{Second}
\frame{Second-first}
\frame{Second-second}
\end{document}
标题的高度或深度似乎不够,因为幻灯片圆圈下方的彩色标题空间不符合我的口味,如下面的屏幕截图所示。
圆圈下方的空间应与章节标题上方的空间大致相同。
我如何添加这样的空间或做出具有相同视觉效果的其他更改?
答案1
您可以重新定义标题并根据需要添加尽可能多的空间(请参阅<- change here
下面代码中的注释):
\documentclass[compress]{beamer}
\useoutertheme[subsection=false]{miniframes}
\setbeamercolor{section in head/foot}{fg=white, bg=black}
\makeatletter
\setbeamertemplate{headline}
{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}{section in head/foot}
\vskip2pt\insertnavigation{\paperwidth}\vskip20pt % <- change here
\end{beamercolorbox}%
\ifbeamer@theme@subsection%
\begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
\usebeamerfont{subsection in head/foot}\insertsubsectionhead
\end{beamercolorbox}%
\fi%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}
\makeatother
\begin{document}
\section{First}
\frame{First-first}
\frame{First-second}
\section{Second}
\frame{Second-first}
\frame{Second-second}
\end{document}