The definitive full-frame graphic command for beamer in LaTeX

2018-06-02: This content has been superseded by this newer post: Finally the definitive full-frame graphic commands for beamer in LaTeX. Look there for an updated version.

After my previous post on the same topic, I have improved upon the command considerably. This time, it is based on Matthew Leingang’s answer on the question Image on full slide in beamer package.

Usage:

\fullframegraphic[optional credits]{path/to/image}

To use, copy this definition in your preamble. Requires package tikz.

\newcommand{\fullframegraphic}[2][]{%
\begin{frame}%
\begin{tikzpicture}[remember picture,overlay]%
\node[at=(current page.center)] {%
\includegraphics[height=\paperheight,width=\paperwidth,keepaspectratio]{#2}%
};%
% optional argument: credits on lower-right corner
\ifx\relax#1\relax\else%
\node[at=(current page.south east), anchor=south east,font=\tiny,text=white,fill=black,fill opacity=.5,text opacity=1,inner sep=2pt,text height=1ex,text depth=.25ex] {#1};%
\fi%
\end{tikzpicture}%
\end{frame}}

Visual example (for the credits overlay):

fullframegraphic-DA_Cambridge_c1937

Source: File:DA_Cambridge_c1937.jpg on Wikimedia Commons

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.