如何在 Beamer 标题页上对齐文本?

如何在 Beamer 标题页上对齐文本?

我正在为论文答辩创建演示文稿,并希望在标题幻灯片上对齐某一部分文本。

如果我使用以下

\documentclass{beamer}
\let\Tiny=\tiny 

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\title{This is a long title which goes over two rows}
\author{
My name\\ 
\vspace{0.25cm}
Something else \\
\vspace{0.5cm}
{\footnotesize Chair: Prof.~Dr.~Hix}\\
{\footnotesize 1. Co-chair: Dr.~Dr.~Dr.~Frankenstein}\\
{\footnotesize 2. Co-chair: Prof.~Dr.~X}
\\
\vspace{0.5cm}
University\\
\vspace{0.25cm}
May 13, 2016
}
\date{ }
\titlegraphic{
 \texorpdfstring{\vspace{-1.25cm}}{}
 \begin{minipage}[b][1.3cm][b]{\textwidth}
 some logos 
 \end{minipage}
}

\begin{document}

\frame{ 
\titlepage
}

\end{document}

我得到了一个像这样的标准标题页:

在此处输入图片描述

现在,我想对齐中间的文本部分(椅子列表),因此我尝试了以下操作:

\title{This is a long title which goes over two rows}
\author{
My name\\ 
\vspace{0.25cm}
Something else \\
\vspace{0.5cm}
\begin{tabular}{l@{ }l}
Chair:& Prof.~Dr.~Hix\\
1. Co-chair:& Dr.~Dr.~Dr.~Frankenstein\\
2. Co-chair:& Prof.~Dr.~X
\end{tabular}
\\
\vspace{0.5cm}
University \\
\vspace{0.25cm}
May 13, 2016
}
\date{ }
\titlegraphic{
 \texorpdfstring{\vspace{-1.25cm}}{}
 \begin{minipage}[b][1.3cm][b]{\textwidth}
 some logos 
 \end{minipage}
}

然而,这只会产生一堆错误。奇怪的是,将表格环境放入 \institute 字段中可以按预期工作。

\title{This is a long title which goes over two rows}
\author{
My name\\ 
\vspace{0.25cm}
Something else \\
\vspace{0.5cm}
University \\
\vspace{0.25cm}
May 13, 2016
}
\date{ }
\institute{
\begin{tabular}{r@{ }l}
Chair:& Prof.~Dr.~Hix\\
1. Co-chair:& Dr.~Dr.~Dr.~Frankenstein\\
2. Co-chair:& Prof.~Dr.~X
\end{tabular}
}
\titlegraphic{
 \texorpdfstring{\vspace{-1.25cm}}{}
 \begin{minipage}[b][1.3cm][b]{\textwidth}
 some logos 
 \end{minipage}
}

看起来像这样:

在此处输入图片描述

那么,我怎样才能实现第一张图片中的放置,但又保持第二张图片中的对齐?

答案1

\author是一个特殊命令,它不能接受所有类型的内容。对于您的特定情况,我建议您定义一个自定义title page模板,您可以在其中插入您想要的内容。

\defbeamertemplate*{title page}...我从beamerinnerthemedefault.sty(根据您的主题进行更改)中摘录并将其复制到您的序言中。\defbeamertemplate已更改为,并在框和框之间插入了\setbeamertemplate新的带有椅子的内容。您可以根据需要更改其内容和格式。beamercolorboxauthorinstitute

\documentclass{beamer}
\let\Tiny=\tiny 

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\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]{author}
      \usebeamerfont{institute}\begin{tabular}{r@{}l}
Chair:& Prof.~Dr.~Hix\\
1. Co-chair:& Dr.~Dr.~Dr.~Frankenstein\\
2. Co-chair:& Prof.~Dr.~X
\end{tabular}
    \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{This is a long title which goes over two rows}
\author{
My name\\ 
\vspace{0.25cm}
Something else 
}
\institute{University}
\date{\today}

\titlegraphic{
 \texorpdfstring{\vspace{-1.25cm}}{}
 \begin{minipage}[b][1.3cm][b]{\textwidth}
 some logos 
 \end{minipage}
}

\begin{document}

\frame{ 
\titlepage
}

\end{document}

结果如下:

在此处输入图片描述

相关内容