6

I am designing a custom theme for my LaTeX presentations. This is my title page:It is okay this way

Now when I have a longer title, this happens:

This happens

Here's my code (according to this post):

\defbeamertemplate*{title page}{pure}[1][]
{ 
   \vskip5.5cm
    \begin{beamercolorbox}[wd=11cm,leftskip=3cm]{rule}
      \textcolor{black!70}{\rule{8cm}{.2mm}}
    \end{beamercolorbox}
    \vskip0.2cm
    \begin{beamercolorbox}[wd=11cm,leftskip=3cm,#1]{title page header}
      \usebeamerfont{title}\inserttitle\par
    \end{beamercolorbox}
    \vskip0.75cm
    \begin{beamercolorbox}[wd=11cm,leftskip=3cm,#1]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
     \vskip0.2cm
    \begin{beamercolorbox}[wd=11cm,leftskip=3cm,#1]{date}
      \usebeamerfont{author}\insertdate
    \end{beamercolorbox}
  \vfill
}

What can I do? I do not want to adjust my \vskip in the style definition every time. Can I tell LaTeX to invert the direction so that my textbox grows to the top instead of pushing everything to the bottom?

Xiphias
  • 1,233

1 Answers1

4

I found a solution myself! This question here is about the same problem in its core. This is how you can achieve what I was looking for:

\newcommand{\btVFill}{\vskip0pt plus 1filll}
% Title page
\defbeamertemplate*{title page}{pure}[1][]{
\btVFill
% \vskip5.5cm
    \begin{beamercolorbox}[wd=11cm,leftskip=3cm]{rule}
        \textcolor{black!70}{\rule{8cm}{.2mm}}
    \end{beamercolorbox}
    \vskip0.2cm
    \begin{beamercolorbox}[wd=11cm,leftskip=3cm,#1]{title page header}
        \usebeamerfont{title}\inserttitle\par
    \end{beamercolorbox}
    \vskip0.75cm
    \begin{beamercolorbox}[wd=11cm,leftskip=3cm,#1]{author}
        \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
        \vskip0.2cm
    \begin{beamercolorbox}[wd=11cm,leftskip=3cm,#1]{date}
        \usebeamerfont{author}\insertdate
    \end{beamercolorbox}
    \vskip0.75cm
    % \vfill
}

Note that I commented out \vskip5.5cm, to allow my text to go to the top, and \vfill, which is unnecessary now, as there should not be any free space due to the new command \btVFill.

Xiphias
  • 1,233