我想编辑 beamer 演示模板的标题页,以便在标题幻灯片中显示我的名字和我的项目主管的名字。这可能吗?可以轻松实现吗?
提前致谢
答案1
以下是一个可能的解决方案。我调整了一些设置,现在您有了一个新命令\supervisor
,它的行为类似于,\author
并允许您在作者姓名下方输入主管的姓名。姓名前面会有字符串“Supervisor: ”,可以使用 进行更改\supervisortitle
。
\documentclass{beamer}
\usetheme{CambridgeUS}
\makeatletter
\let\insertsupervisor\relax
\newcommand\supervisortitle{Supervisor}
\mode<all>
{
\newcommand\supervisor[1]{\def\insertsupervisor{#1}}
\titlegraphic{}
}
\defbeamertemplate*{title page}{supdefault}[1][]
{
\vbox{}
\vfill
\begingroup
\centering
\begin{beamercolorbox}[sep=8pt,center,#1]{title}
\usebeamerfont{title}\inserttitle\par%
\ifx\insertsubtitle\@empty\relax%
\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}
\ifx\insertsupervisor\relax\relax\else
\begin{beamercolorbox}[sep=8pt,center,#1]{author}
\usebeamerfont{author}\supervisortitle:~\insertsupervisor
\end{beamercolorbox}\fi
\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
}
\setbeamertemplate{title page}[supdefault][colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow]\makeatother
\title{The Title}
\subtitle{The Subtitle}
\author{The Author}
\supervisor{David Hilbert}
\institute{The Institute}
\date{\today}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\end{document}