我正在使用 -package 进行演示beamer
。我的第一帧如下所示:
\title{Cats, dogs and unicorns}
\subtitle{Topic 3}
\maketitle
这使得字幕以下标题。但是,我希望副标题是在上面标题。我该如何实现呢?
答案1
使用默认主题,您可以直接复制默认的标题页布局beamerinnerthemedefault.sty
\defbeamertemplate*{title page}{default}[1][]
{
\vbox{}
\vfill
\begingroup
\centering
\begin{beamercolorbox}[sep=8pt,center,#1]{title}
\usebeamerfont{title}\inserttitle\par%
\ifx\insertsubtitle\@empty%
\else%
\vskip0.25em%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
\fi%
\end{beamercolorbox}%
\vskip1em\par
\begin{beamercolorbox}[sep=8pt,center,#1]{author}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center,#1]{institute}
\usebeamerfont{institute}\insertinstitute
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center,#1]{date}
\usebeamerfont{date}\insertdate
\end{beamercolorbox}\vskip0.5em
{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
\endgroup
\vfill
}
并修改它,删除参数并交换标题和副标题:
\documentclass{beamer}
\makeatletter
\setbeamertemplate{title page}
{
\vbox{}
\vfill
\begingroup
\centering
\begin{beamercolorbox}[sep=8pt,center]{title}
\usebeamerfont{title}\insertsubtitle\par% \inserttitle -> \insertsubtitle
\ifx\insertsubtitle\@empty%
\else%
\vskip0.25em%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\inserttitle\par}% \insertsubtitle -> \inserttitle
\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
\title{My title}
\subtitle{sub}
\begin{document}
\maketitle
\end{document}
当然,如果您想使用其他主题,您可能需要修改相关的标题页布局。
编辑:如果您还想更换字体,您可以随意更换,只需\usebeamerfont
按照 OP 的建议更换参数即可。我不确定这是否总是需要的,这就是我拒绝他们的编辑的原因。如果您确实更改了字体,则以下是相应的图片。