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:If you, however, want to completely change the title page template by setting the template from scratch, then:
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:Change
226mm
to\textwidth
and use\centering
inside theminipage
:Perhaps you also want to reduce the height?
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:Once you are happy with the settings, delete (or comment out) the
\frame
command:There are several ways to remedy this warning; load a font containing the missing font size (
lmodern
, for example) or use\let\Tiny\tiny
.