![Beamer 标题高度或深度因压缩微型帧而不足](https://linux22.com/image/468365/Beamer%20%E6%A0%87%E9%A2%98%E9%AB%98%E5%BA%A6%E6%88%96%E6%B7%B1%E5%BA%A6%E5%9B%A0%E5%8E%8B%E7%BC%A9%E5%BE%AE%E5%9E%8B%E5%B8%A7%E8%80%8C%E4%B8%8D%E8%B6%B3.png)
我使用带有包含压缩的微型帧导航内容的标题的 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}