0

I have the following MWE, taken from this post, that creates a beamer titlepage showing both the candidate and the supervisor of a thesis

\documentclass{beamer}

\usetheme{Hannover}
\usecolortheme{whale}

\usefonttheme[stillsansserifsmall,stillsansseriflarge]{serif}

\definecolor{Text}{HTML}{000F1C}
\setbeamercolor{normal text}{fg=Text}

\newsavebox{\authbox}
\sbox{\authbox}{%
  \begin{minipage}{0.5\textwidth}
    \centering
    {\small \textcolor{Text}{\textrm{Candidate:}}} \\
    {\normalsize \textcolor{Text}{\textrm{Foo Bar}}}
  \end{minipage}%
  \begin{minipage}{0.5\textwidth}
    \centering
    {\small \textcolor{Text}{\textrm{Supervisor:}}} \\
    {\normalsize \textcolor{Text}{\textrm{Prof. Foo Bar Baz}}}
  \end{minipage}
}

\title{An interesting topic}
\author[Me]{\usebox{\authbox}}
\institute{A university}

\begin{document}

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

\end{document}

which produces the following

enter image description here

What I don't like about this implementation is:

  1. I have to manually call \textrm{...} even though I'm already using the serif font theme. A normal \author{me} would already be in serif;

  2. I have to manually call \textcolor{Text} even though I'm alredy setting fg=Text for normal text. A normal \author{me} would already be colored in Text.

  3. The two minipages seem to be a shifted to the right. For example, if I substitute the first \centering with \flushleft and the second one with \flushright, this is what I get

enter image description here

while I'd expect Candidate to be lined up with the left side of the title's colorbox, and the end of Supervisor to be lined up with right side. Instead, Candidate starts a bit to the right of the left side and Supervisor ends a bit to the right of the right side.

Is there a way to fix all three of these issues? Is there a completely different implementation that is cleaner and produces the desired results?

4
  • 1. I don't understand [sansserif]{serif} and 2. I don't understand beamer colors. But for 3., my guess is the box is indented. Have you tried \noindent before the first minipage?
    – Teepeemm
    Sep 7, 2020 at 0:14
  • Yes, it doesn't work.
    – noibe
    Sep 7, 2020 at 8:17
  • You don't HAVE to use \titlepage. It is supposed to be a convenience, not an obstacle. Sep 7, 2020 at 15:22
  • @JohnKormylo I wouldn't know how to reproduce the rest of the titlepage. Could you provide an example?
    – noibe
    Sep 7, 2020 at 16:28

1 Answer 1

1

Alas, beamer themes cannot be searched using my usual approach, so I have no idea what colors and spacing it actually uses. A precise match by trial and error is possible, but tedious.

\documentclass{beamer}

\usepackage{tikz}

\usetheme{Hannover}
\usecolortheme{whale}

\usefonttheme[stillsansserifsmall,stillsansseriflarge]{serif}

\definecolor{Text}{HTML}{000F1C}
\setbeamercolor{normal text}{fg=Text}

\newsavebox{\authbox}
\sbox{\authbox}{%
  \begin{minipage}{0.5\linewidth}
    \centering
    {\small \textcolor{Text}{\textrm{Candidate:}}} \\
    {\normalsize \textcolor{Text}{\textrm{Foo Bar}}}
  \end{minipage}%
  \begin{minipage}{0.5\linewidth}
    \centering
    {\small \textcolor{Text}{\textrm{Supervisor:}}} \\
    {\normalsize \textcolor{Text}{\textrm{Prof. Foo Bar Baz}}}
  \end{minipage}
}

\title{An interesting topic}% used on every page
\author[Me]{\usebox{\authbox}}
\institute{A university}

\begin{document}

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

\begin{frame}
  \begin{tikzpicture}
    \fill[blue] (0,0) rectangle (\linewidth,1cm);
    \node[white] at (0.5\linewidth,0.5cm) {\Large\textsf{An interesting topic}};
    \node[below,align=center] at (0.25\textwidth,-1cm) {Candidate:\\[4pt] Foo Bar};
    \node[below,align=center] at (0.75\textwidth,-1cm) {Supervisor:\\[4pt] Prof. Foo Bar Baz};
    \node at (0.5\linewidth, -3cm) {\footnotesize A university};
    \node at (0.5\linewidth, -4cm) {\today};
  \end{tikzpicture}
\end{frame}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .