更改 Beamer 标题中子部分的字体大小

更改 Beamer 标题中子部分的字体大小

我想更改出现在页眉区域中的子节的字体大小。整个文档大小设置为 12pt,这使得子节太大而无法放入页眉区域。我想将其设置为 9pt。我的 MWE:

\documentclass[british,12pt,aspectratio=169]{beamer}
\usetheme{metropolis}
\usecolortheme{dove}
\useinnertheme{rectangles}
\useoutertheme{infolines}

\setbeamerfont{subsection in head/foot}{\fontsize{9}{10}\selectfont}
%I tried this, but it's throwing an error, which reads:
%Incomplete \iffalse; all text was ignored after line 34, which was the \tableofcontents command.

\begin{document}
\begin{frame}{Lecture Overview}
\tableofcontents[hideallsubsections]
\end{frame}

\section[Elaborate Title]{Title}
\subsection[Elaborate Text]{Title}
\begin{frame}
content
\end{frame}
\end{document}

当我尝试使用 9pt 字体大小对整个文档进行相同操作时,一切都按预期运行。

答案1

正确的语法\setbeamerfont是:

\setbeamerfont{<some beamer element>}{size=<desired size>}

在你的情况下

\setbeamerfont{subsection in head/foot}{size=\fontsize{9}{10}\selectfont}

相关内容