beamer:居中标题页内容

beamer:居中标题页内容

对于这个主题,我怎样才能将标题和/或其余元素置于标题页的中心?

\documentclass{beamer}
\usetheme{metropolis}

\title{long long long long long long long long long long long long long long title}
\author{me}
\institute{institute}
\date{1 September 2017}

\begin{document}
    \maketitle
\end{document}

在此处输入图片描述

答案1

\documentclass{beamer}
\usetheme{moloch}% modern fork of the metropolis theme

\title{long long long long long long long long long long long long long long title}
\author{me}
\institute{institute}
\date{1 September 2017}

\makeatletter
\setbeamertemplate{title page}{
  \begin{minipage}[b][\paperheight]{\textwidth}
    \centering  % <-- Center here
    \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi
    \vfill%
    \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi
    \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi
    \usebeamertemplate*{title separator}
    \ifx\beamer@shortauthor\@empty\else\usebeamertemplate*{author}\fi
    \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi
    \ifx\insertinstitute\@empty\else\usebeamertemplate*{institute}\fi
    \vfill
    \vspace*{1mm}
  \end{minipage}
}

\setbeamertemplate{title}{
%  \raggedright%  % <-- Comment here
  \linespread{1.0}%
  \inserttitle%
  \par%
  \vspace*{0.5em}
}
\setbeamertemplate{subtitle}{
%  \raggedright%  % <-- Comment here
  \insertsubtitle%
  \par%
  \vspace*{0.5em}
}
\setbeamertemplate{author}{
%  \raggedright%  % <-- Comment here
  \insertauthor%
  \par%
  \vspace*{0.5em}
}
\makeatother

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

在此处输入图片描述

相关内容