2

I'm doing a presentation using the beamer-package. My first frame looks like this:

\title{Cats, dogs and unicorns}
\subtitle{Topic 3}
\maketitle

This puts the subtitle below the title. However, I want the subtitle to be on top of the title. How can I achieve that?

nox
  • 4,160
  • 12
  • 26
  • There's the beamer template title page. You can modify it in order to get what you want. One example of a modified template you can find here: https://tex.stackexchange.com/questions/116077/presentation-beamer-title-page – nox Sep 12 '18 at 11:50

1 Answers1

2

With the default theme, you can just copy the default title page layout from beamerinnerthemedefault.sty

\defbeamertemplate*{title page}{default}[1][]
{
  \vbox{}
  \vfill
  \begingroup
    \centering
    \begin{beamercolorbox}[sep=8pt,center,#1]{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,#1]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center,#1]{institute}
      \usebeamerfont{institute}\insertinstitute
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=8pt,center,#1]{date}
      \usebeamerfont{date}\insertdate
    \end{beamercolorbox}\vskip0.5em
    {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
  \endgroup
  \vfill
}

And modify it, deleting the argument and swapping title and subtitle:

\documentclass{beamer}

\makeatletter
\setbeamertemplate{title page}
{
  \vbox{}
  \vfill
  \begingroup
  \centering
  \begin{beamercolorbox}[sep=8pt,center]{title}
    \usebeamerfont{title}\insertsubtitle\par% \inserttitle -> \insertsubtitle
    \ifx\insertsubtitle\@empty%
    \else%
    \vskip0.25em%
    {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\inserttitle\par}% \insertsubtitle -> \inserttitle
    \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}
  \begin{beamercolorbox}[sep=8pt,center]{date}
    \usebeamerfont{date}\insertdate
  \end{beamercolorbox}\vskip0.5em
  {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
  \endgroup
  \vfill
}
\makeatother

\title{My title}
\subtitle{sub}
\begin{document}

\maketitle

\end{document}

result

Of course, if you want to use another theme, you might need to modify the related title page layout.

edit: If you also want to swap the font, you are free to do this, just swap the arguments of \usebeamerfont as suggested by OP. I am not sure if this is always desired, that's why I rejected their edit. Here the according picture, if you do change the fonts.

result2

nox
  • 4,160
  • 12
  • 26