![如何在 Beamer 中强制使用字体系列来显示普通/默认文本?](https://linux22.com/image/337860/%E5%A6%82%E4%BD%95%E5%9C%A8%20Beamer%20%E4%B8%AD%E5%BC%BA%E5%88%B6%E4%BD%BF%E7%94%A8%E5%AD%97%E4%BD%93%E7%B3%BB%E5%88%97%E6%9D%A5%E6%98%BE%E7%A4%BA%E6%99%AE%E9%80%9A%2F%E9%BB%98%E8%AE%A4%E6%96%87%E6%9C%AC%EF%BC%9F.png)
有人可以帮忙吗?
我设法在我的 Beamer PDF 中使用 SourceSansPro,但未能光系列作为新的默认值。
这是我尝试过的:
\documentclass[ngerman,ignorenonframetext,20,aspectratio=1610]{beamer}
\usepackage[light]{sourcesanspro}
\setbeamertemplate{navigation symbols}{}
% how to enforce normal text!?
\setbeamerfont{normal text}{size*={20}{24},series=\mdseries}
\setbeamerfont{section name}{size*={20}{24},series=\mdseries}
\setbeamerfont{section page}{size*={20}{24},series=\mdseries}
\setbeamerfont{section in page}{size*={20}{24},series=\mdseries}
\setbeamerfont{section in sidebar}{size*={20}{24},series=\mdseries}
\setbeamerfont{section in head/foot}{size*={20}{24},series=\mdseries}
\setbeamerfont{projected text}{size*={20}{24},series=\mdseries}
\setbeamerfont{structure}{series=\mdseries}
\setbeamerfont{tiny structure}{series=\mdseries}
\setbeamerfont{frametitle}{size=\large,series=\mdseries} % ,series=\bfseries
\setbeamerfont{framesubtitle}{size=\footnotesize,series=\mdseries}
\setbeamerfont{footline}{size=\Tiny,series=\mdseries}
\setbeamerfont{title}{size*={16}{18},series=\bfseries}
\setbeamerfont{subtitle}{size*={10}{12},series=\mdseries}
\setbeamerfont{item}{size*={10}{12},series=\mdseries}
\setbeamerfont{item projected}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize item}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize subitem}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize subsubitem}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize/enumerate body}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize/enumerate subbody}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize/enumerate subsubbody}{size*={10}{12},series=\mdseries}
\begin{document}
\begin{frame}{Title}
Title-bar
\section{sec1} foo1
\subsection{sec1sub1} foo1.1
\subsubsection{sec1sub1sub1} foo1.1.1
\begin{itemize}
\item Item2
\item Item3
\item Item4
\end{itemize}
\end{frame}
\end{document}
但只设置了特定的文本光
谢谢您的启发:)
——阿克塞尔。
答案1
要将普通字体更改为您指定的字体,请将其添加\AtBeginDocument{\usebeamerfont{normal text}}
到您的文档中。
完成 MWE:
\documentclass[ngerman,ignorenonframetext,20,aspectratio=1610]{beamer}
\usepackage[light]{sourcesanspro}
\setbeamertemplate{navigation symbols}{}
% how to enforce normal text!?
\setbeamerfont{normal text}{size*={20}{24},series=\mdseries}
\setbeamerfont{section name}{size*={20}{24},series=\mdseries}
\setbeamerfont{section page}{size*={20}{24},series=\mdseries}
\setbeamerfont{section in page}{size*={20}{24},series=\mdseries}
\setbeamerfont{section in sidebar}{size*={20}{24},series=\mdseries}
\setbeamerfont{section in head/foot}{size*={20}{24},series=\mdseries}
\setbeamerfont{projected text}{size*={20}{24},series=\mdseries}
\setbeamerfont{structure}{series=\mdseries}
\setbeamerfont{tiny structure}{series=\mdseries}
\setbeamerfont{frametitle}{size=\large,series=\mdseries} % ,series=\bfseries
\setbeamerfont{framesubtitle}{size=\footnotesize,series=\mdseries}
\setbeamerfont{footline}{size=\Tiny,series=\mdseries}
\setbeamerfont{title}{size*={16}{18},series=\bfseries}
\setbeamerfont{subtitle}{size*={10}{12},series=\mdseries}
\setbeamerfont{item}{size*={10}{12},series=\mdseries}
\setbeamerfont{item projected}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize item}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize subitem}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize subsubitem}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize/enumerate body}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize/enumerate subbody}{size*={10}{12},series=\mdseries}
\setbeamerfont{itemize/enumerate subsubbody}{size*={10}{12},series=\mdseries}
\AtBeginDocument{\usebeamerfont{normal text}}
\begin{document}
\begin{frame}{Title}
Title-bar
\section{sec1} foo1
\subsection{sec1sub1} foo1.1
\subsubsection{sec1sub1sub1} foo1.1.1
\begin{itemize}
\item Item2
\item Item3
\item Item4
\end{itemize}
\end{frame}
\end{document}