[Tex/LaTex] Author and institute don’t appear when adding background image to title page in beamer

beamer

I am attempting to add a background image to the title page of a beamer talk. I have attempted to use the solution given here Creating a background image on the title page only using Beamer. However I am getting some problems I don't understand. Here is my MWE .

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertine} % or any other font package (or none)
\newcommand*\quotefont{\fontfamily{LinuxLibertineT-TLF}} % selects Libertine for quote font
\usepackage{tikz}
\usefonttheme[onlylarge]{structurebold}
\setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
\setbeamertemplate{navigation symbols}{}

\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}

\pgfdeclareimage[width=\paperwidth]{mybackground}{bigdata410}

\setbeamertemplate{title page}{   
        \begin{picture}(0,0) 
            \put(-30,-163){%
                \pgfuseimage{mybackground}
            } 
            \put(0,-110.7){%
                \begin{minipage}[b][45mm][t]{226mm}
                    \usebeamerfont{title}{\inserttitle\par}
                \end{minipage}
            }  
            \end{picture}
    } 
\title{Lost in data}
\author[Author et al.\@]{Author}
\institute{University of }
\date{}

\begin{document}

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

My problems are

  • The title is not centered
  • The author and institution don't appear on the title page
  • If I comment out the libertine fonts lines I get

    LaTeX Font Warning: Font shape `T1/cmss/m/n' in size <4> not available
    (Font) size <5> substituted on input line 44.

    (I can fix this last problem using \usepackage{lmodern} it seems but I am not sure I like that font.)

Any help very much appreciated.

Best Answer

If all you want to do is to add an image in the background for the title page, the method described in the linked answer is not the most appropriate one, since setting the title page template demands setting all the elements of the template and their attributes (which is part of your problem (see below)).

A more convenient approach is to locally (inside a group) set the background canvas template:

\documentclass{beamer}

\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}
\setbeamercolor{title}{fg=white}

\title{The title}
\author{The Author}
\institute{The Institute}

\begin{document}

\begingroup
\setbeamertemplate{background canvas}{%
\includegraphics[width=\paperwidth,height=\paperheight]{mushrooms}}
\begin{frame}
\maketitle
\end{frame}
\endgroup

\begin{frame}
test
\end{frame}

\end{document}

enter image description here

If you, however, want to completely change the title page template by setting the template from scratch, then:

  1. Your title is not centered because your current settings don't tell LaTeX that you want it centered; in fact, the minipage you are using for the title is way too big, as you can see by temporarily disabling the colors and framing it:

    \documentclass{beamer}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{libertine} % or any other font package (or none)
    \newcommand*\quotefont{\fontfamily{LinuxLibertineT-TLF}} % selects Libertine for quote font
    \usepackage{tikz}
    \usefonttheme[onlylarge]{structurebold}
    \setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
    \setbeamertemplate{navigation symbols}{}
    
    %\setbeamercolor{background canvas}{bg=black}
    %\setbeamercolor{normal text}{fg=white}
    
    \pgfdeclareimage[width=\paperwidth]{mybackground}{bigdata410}
    
    \setbeamertemplate{title page}{   
            \begin{picture}(0,0) 
                \put(-30,-163){%
        %            \pgfuseimage{mybackground}
                } 
                \put(0,-110.7){%
                \centering
                    \frame{\begin{minipage}[b][45mm][t]{226mm}
                    \centering
                        \usebeamerfont{title}{\inserttitle\par}
                    \end{minipage}}
                }  
                \end{picture}
        } 
    \title{Lost in data}
    \author[Author et al.\@]{Author}
    \institute{University of }
    \date{}
    
    \begin{document}
    
    \begin{frame}
      \titlepage
    \end{frame}
    \end{document}
    

    enter image description here

    Change 226mm to \textwidth and use \centering inside the minipage:

    \documentclass{beamer}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{libertine} % or any other font package (or none)
    \newcommand*\quotefont{\fontfamily{LinuxLibertineT-TLF}} % selects Libertine for quote font
    \usepackage{tikz}
    \usefonttheme[onlylarge]{structurebold}
    \setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
    \setbeamertemplate{navigation symbols}{}
    
    %\setbeamercolor{background canvas}{bg=black}
    %\setbeamercolor{normal text}{fg=white}
    
    \pgfdeclareimage[width=\paperwidth]{mybackground}{bigdata410}
    
    \setbeamertemplate{title page}{   
            \begin{picture}(0,0) 
                \put(-30,-163){%
        %            \pgfuseimage{mybackground}
                } 
                \put(0,-110.7){%
                    \frame{\begin{minipage}[b][45mm][t]{\textwidth}
                        \centering
                        \usebeamerfont{title}{\inserttitle\par}
                    \end{minipage}}
                }  
                \end{picture}
        } 
    \title{Lost in data}
    \author[Author et al.\@]{Author}
    \institute{University of }
    \date{}
    
    \begin{document}
    
    \begin{frame}
      \titlepage
    \end{frame}
    
    \end{document}
    

    enter image description here

    Perhaps you also want to reduce the height?

  2. There's no title nor institution since your settings for the title page template don't have the corresponding inserts; where do you want this information to appear? Use \insertauthor, \insertinstitution at the desired locations. For example:

    \documentclass{beamer}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{libertine} % or any other font package (or none)
    \newcommand*\quotefont{\fontfamily{LinuxLibertineT-TLF}} % selects Libertine for quote font
    \usepackage{tikz}
    \usefonttheme[onlylarge]{structurebold}
    \setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
    \setbeamertemplate{navigation symbols}{}
    
    \setbeamercolor{background canvas}{bg=black}
    \setbeamercolor{normal text}{fg=white}
    
    \pgfdeclareimage[width=\paperwidth]{mybackground}{bigdata410}
    
    \setbeamertemplate{title page}{   
            \begin{picture}(0,0) 
                \put(-30,-163){%
                    \pgfuseimage{mybackground}
                } 
                \put(0,-110.7){%
                    \frame{\begin{minipage}[b][45mm][t]{\textwidth}
                        \centering
                        \usebeamerfont{title}{\inserttitle\par}\vfill
                        \usebeamerfont{author}{\insertauthor\par}\vfill
                        \usebeamerfont{institute}{\insertinstitute\par}
                    \end{minipage}}
                }  
                \end{picture}
        } 
    \title{Lost in data}
    \author[Author et al.\@]{Author}
    \institute{University of }
    \date{}
    
    \begin{document}
    
    \begin{frame}
      \titlepage
    \end{frame}
    
    \end{document}
    

    enter image description here

    Once you are happy with the settings, delete (or comment out) the \frame command:

    \documentclass{beamer}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{libertine} % or any other font package (or none)
    \newcommand*\quotefont{\fontfamily{LinuxLibertineT-TLF}} % selects Libertine for quote font
    \usepackage{tikz}
    \usefonttheme[onlylarge]{structurebold}
    \setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
    \setbeamertemplate{navigation symbols}{}
    
    \setbeamercolor{background canvas}{bg=black}
    \setbeamercolor{normal text}{fg=white}
    
    \pgfdeclareimage[width=\paperwidth]{mybackground}{bigdata410}
    
    \setbeamertemplate{title page}{   
            \begin{picture}(0,0) 
                \put(-30,-163){%
                    \pgfuseimage{mybackground}
                } 
                \put(0,-110.7){%
                    \begin{minipage}[b][45mm][t]{\textwidth}
                        \centering
                        \usebeamerfont{title}{\inserttitle\par}\vfill
                        \usebeamerfont{author}{\insertauthor\par}\vfill
                        \usebeamerfont{institute}{\insertinstitute\par}
                    \end{minipage}%
                }  
                \end{picture}
        } 
    \title{Lost in data}
    \author[Author et al.\@]{Author}
    \institute{University of }
    \date{}
    
    \begin{document}
    
    \begin{frame}
      \titlepage
    \end{frame}
    
    \end{document}
    

    enter image description here

  3. There are several ways to remedy this warning; load a font containing the missing font size (lmodern, for example) or use \let\Tiny\tiny.