考虑以下 MWE:
\documentclass{beamer}
\setbeamerfont{title}{shape=\bfseries, size=\large}
\setbeamerfont{subtitle}{series=\mdseries}
\setbeamerfont{date}{size=\scriptsize}
\setbeamercolor{title}{fg=black}
\title[Bold title]{Uppercase bold title}
\subtitle{Uppercase subtitle}
\author[John Doe]{John Doe}
\institute[]{March 2017}
\date{}
\begin{document}
\maketitle
\end{document}
如何才能使和都\title
大写\subtitle
,但只使用粗体字体作为标题?理想情况下,我希望直接修补maketitle
或titlepage
而不定义新的titlepage
(with defbeamertemplate*{title page}
)。
答案1
希望\setbeamertemplate
不会落入你的\defbeamertemplate
厌恶
\documentclass{beamer}
\setbeamerfont{title}{shape=\bfseries, size=\large}
\setbeamerfont{subtitle}{series=\mdseries}
\setbeamerfont{date}{size=\scriptsize}
\setbeamercolor{title}{fg=black}
\title[Bold title]{Uppercase bold title}
\subtitle{Uppercase subtitle}
\author[John Doe]{John Doe}
\institute[]{March 2017}
\date{}
\makeatletter
\setbeamertemplate{title page}{%
\vbox{}
\vfill
\begingroup
\centering
\begin{beamercolorbox}[sep=8pt,center]{title}
\usebeamerfont{title}\MakeUppercase{\inserttitle}\par%
\ifx\insertsubtitle\@empty%
\else%
\vskip0.25em%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\MakeUppercase{\insertsubtitle}\par}%
\fi%
\end{beamercolorbox}%
\vskip1em\par
\begin{beamercolorbox}[sep=8pt,center]{author}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center]{institute}
\usebeamerfont{institute}\insertinstitute
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center]{date}
\usebeamerfont{date}\insertdate
\end{beamercolorbox}\vskip0.5em
{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
\endgroup
\vfill
}
\makeatother
\begin{document}
\maketitle
\end{document}