我正在使用beamer
文档类,并且希望页面标题、副标题、作者和日期有单独的字体样式。
我的解决方案不起作用,标题的字体应用于所有元素。更具体地说,不series=X
应用于不同的元素,但大小仍然有效。
内容beameroutertheme.sty
\setbeamerfont{title}{size=\Large,series=\bfseries}
\setbeamerfont{subtitle}{size=\small,series=\itshape}
\setbeamerfont{author}{size=\small,series=\mdseries}
\setbeamerfont{date}{size=\small,series=\mdseries}
\defbeamertemplate*{title page}{sebslidestheme}[1][]
{
\centering
\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par
\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle\insertsubtitle\par
\bigskip\bigskip
\usebeamerfont{author}\insertauthor\par
\usebeamerfont{date}\insertdate\par
}
有人能指出这个问题吗?
答案1
通常,副标题会从标题中继承一些属性。在本例中,字体同时更改为粗体和斜体。但您可以简单地为副标题指定不同的父级:
\documentclass{beamer}
\setbeamerfont{title}{size=\Large,series=\bfseries}
\setbeamerfont{subtitle}{parent={normal text}, size=\small,shape=\itshape}
\setbeamerfont{author}{size=\small,series=\mdseries}
\setbeamerfont{date}{size=\small,series=\mdseries}
\defbeamertemplate*{title page}{sebslidestheme}
{
\centering
{\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle}\par
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle}\par
\bigskip\bigskip
{\usebeamerfont{author}\insertauthor}\par
{\usebeamerfont{date}\insertdate}\par
}
\title{The Title}
\subtitle{The Subtitle}
\author{The Author}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\end{document}