3

I want to shrink the white boxes around the author and date fields to the width of their content on the titlepage of the following beamer presentation:

\documentclass{beamer}

\usetheme{Malmoe}
\usecolortheme{beaver}

\title{The tediously long title of my presentation}
\author{Me}
\date{\today}

\setbeamercolor{author}{bg=white}
\setbeamercolor{date}{bg=white}

\begin{document}
    {\usebackgroundtemplate{
            \includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}
        }
        \begin{frame}
            \titlepage
        \end{frame}
    }
\end{document}

enter image description here

How can this be done? Manually adjusting the width would be fine.

2

Quick hack: redefine the title page an wrap the beamercolorboxes in minipages of your desired widths:

\documentclass{beamer}

\usetheme{Malmoe}
\usecolortheme{beaver}

\title{The tediously long title of my presentation}
\author{Me}
\date{\today}

\setbeamercolor{author}{bg=white}
\setbeamercolor{date}{bg=white}


\makeatletter
\setbeamertemplate{title page}{
  \vbox{}
  \vfill
  \begingroup
    \centering
    \begin{minipage}{.9\textwidth}
    \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}%
    \end{minipage}

    \vskip1em\par
    \begin{minipage}{.15\textwidth}
    \begin{beamercolorbox}[sep=8pt,center]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \end{minipage}

    \begin{minipage}{.5\textwidth}
    \begin{beamercolorbox}[sep=8pt,center]{institute}
      \usebeamerfont{institute}\insertinstitute
    \end{beamercolorbox}
    \end{minipage}

    \begin{minipage}{.3\textwidth}
    \begin{beamercolorbox}[sep=8pt,center]{date}
      \usebeamerfont{date}\insertdate
    \end{beamercolorbox}
    \end{minipage}
    \vskip0.5em
    {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
  \endgroup
  \vfill
}
\makeatother



\begin{document}
    {\usebackgroundtemplate{
            \includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}
        }
        \begin{frame}
            \titlepage
        \end{frame}
    }
\end{document}

enter image description here

  • Great, thanks. May I additionaly ask were within the files shipped with beamer the '\setbeamertemplate{title page}' code segment is from? – Christoph90 Apr 17 '18 at 13:54
  • 1
    @Christoph90 It is from the default inner theme – samcarter is at topanswers.xyz Apr 17 '18 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.