定制 beamer 标题页?

定制 beamer 标题页?

我使用 beamer 从此链接下载了一个演示模板:https://www.sharelatex.com/templates/presentations/conference-presentation

它看起来如下所示:

在此处输入图片描述

我的问题是,我将介绍其他作者的论文。因此我想在作者所在大学下方、日期上方添加我的姓名和大学,如下所示

University of author 1
my name
my university
date

与显示作者姓名和大学的字体大小相同。

我知道setbeamertemplateaddtobeamertemplate,但由于这是一个小修改,我想知道是否可以在不重做整个模板的情况下做到这一点?

当前代码如下:

\documentclass{beamer}
\usetheme{Hannover}

\title{Presentation Title}

\subtitle{Optional Subtitle}

\author{F.~Author\inst{1} \and S.~Another\inst{2}}
\institute[Universities of Somewhere and Elsewhere] % (optional, but mostly needed)
{
  \inst{1}%
  University of Somewhere
  \inst{2}%
  University of Elsewhere}
\date{Conference Name, 2013}

% Let's get started
\begin{document}

\begin{frame}
  \titlepage
\end{frame}
\end{document}

答案1

最简洁的解决方案是重新定义标题页模板。这种方法将为您提供微调结果以满足您的需求的机会。

\documentclass{beamer}
\usetheme{Hannover}

\title{Presentation Title}

\subtitle{Optional Subtitle}

\author{F.~Author\inst{1} \and S.~Another\inst{2}}
\institute[Universities of Somewhere and Elsewhere] % (optional, but mostly needed)
{
  \inst{1}%
  University of Somewhere
  \inst{2}%
  University of Elsewhere}
\date{Conference Name, 2013}

\makeatletter
\setbeamertemplate{title page}{
  \vbox{}
  \vfill
  \begingroup
    \centering
    \begin{beamercolorbox}[sep=8pt,center]{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]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center]{institute}
      \usebeamerfont{institute}\insertinstitute
    \end{beamercolorbox}
    % ----------------------- new
    \begin{beamercolorbox}[sep=8pt,center]{author}
      \usebeamerfont{author}my name
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center]{institute}
      \usebeamerfont{institute}my university
    \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}

\begin{frame}
  \titlepage
\end{frame}
\end{document}

在此处输入图片描述

但是,您需要承担风险,请注意:a) 这是肮脏的黑客行为,b) 如果您不提供简短的机构,可能会导致 pdf 属性出现问题,甚至可能导致某些 pdf 查看器无法打开您的 pdf - 请注意!

\documentclass{beamer}
\usetheme{Hannover}

\title{Presentation Title}

\subtitle{Optional Subtitle}

\author{F.~Author\inst{1} \and S.~Another\inst{2}}
\institute[Universities of Somewhere and Elsewhere] % (optional, but mostly needed)
{
  \inst{1}%
  University of Somewhere
  \inst{2}%
  University of Elsewhere\par
  my name\par
  my university}
\date{Conference Name, 2013}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}
\end{document}

相关内容