如何在自定义标题页上实现标题图形的固定垂直位置?

如何在自定义标题页上实现标题图形的固定垂直位置?

我怎样才能实现固定垂直的蓝色“标志”的位置,即使作者或机构或副标题包含多于 1 行

在此处输入图片描述

现在,如果我向任何内容元素添加第二行,标题页上的每个元素都会移动。我认为幻灯片的总内容高度是固定的,并且两个s 会将与其余内容\vfill“分离” 。\titlegraphic

代码

\documentclass{beamer}
\usepackage{tikz}

% Custom title page
\setbeamertemplate{title page}
{ 
  \vskip-0.59cm%
  \hskip-.7cm%
  \inserttitlegraphic%
  \vfill%
    \begin{beamercolorbox}[sep=6pt]{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=6pt]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=6pt]{institute}
      \usebeamerfont{institute}\insertinstitute
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=6pt]{date}
      \usebeamerfont{date}\insertdate
    \end{beamercolorbox}
  \vfill
}

% Custom logo
\newcommand\MyLogo{%
\begin{tikzpicture}
\begin{scope}
  \path[fill=blue,nonzero rule] 
  (0,0) -- (0,1) -- (1,1) -- (1,0) -- cycle;
  % more; generated by Inkscape...
\end{scope}%
\end{tikzpicture}%
}
\titlegraphic{\resizebox{!}{.6cm}{\MyLogo}}

\title{Foo is a Bar}
\subtitle{More subtitle}
\author{Authorname}%\\2nd authors,\dots}
\institute{Awesome institute}
\date{Winter 1999}


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

如何重现我的问题

只需取消注释序言中该行%\\2nd authors,\dots的部分\author。这样,蓝色徽标就会向上移动到纸张边框。我想实现固定位置。

答案1

使用

\begin{frame}[t]
\maketitle
\end{frame}

并将其移除\vskip-0.59cm%,以便框架从顶部开始。

\documentclass{beamer}
\usepackage{tikz}

% Custom title page
\setbeamertemplate{title page}
{
  %\vskip-0.59cm%
  \hskip-.7cm%
  \inserttitlegraphic%
  \vfill%
    \begin{beamercolorbox}[sep=6pt]{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=6pt]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=6pt]{institute}
      \usebeamerfont{institute}\insertinstitute
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=6pt]{date}
      \usebeamerfont{date}\insertdate
    \end{beamercolorbox}
  \vfill
}

% Custom logo
\newcommand\MyLogo{%
\begin{tikzpicture}
\begin{scope}
  \path[fill=blue,nonzero rule]
  (0,0) -- (0,1) -- (1,1) -- (1,0) -- cycle;
  % more; generated by Inkscape...
\end{scope}%
\end{tikzpicture}%
}
\titlegraphic{\resizebox{!}{.6cm}{\MyLogo}}

\title{Foo is a Bar}
\subtitle{More subtitle}
\author{Authorname\\2nd authors,\dots}
\institute{Awesome institute}
\date{Winter 1999}


\begin{document}
\begin{frame}[t]
\maketitle
\end{frame}
\end{document}

相关内容