# Column background image

I have a two column frame (via wiki2beamer):

\documentclass{beamer}
\begin{document}

\begin{frame}
\frametitle{Background Test}

\begin{columns}

\column{0.3\textwidth}
\begin{itemize}
\item Left Column 1
\item Left Column 2
\end{itemize}

\column{0.7\textwidth}
\begin{itemize}
\item Right Column 1
\item Right Column 2
\end{itemize}

\end{columns}
\end{frame}
\end{document}


I'm trying to put a background image on one column. I've tried and failed with CTAN adjustbox, background & wallpaper. I'm shocked that usebackgroundtemplate appears to bind only to the page and has no other scope -- unless I'm mistaken (I'm new to LaTeX). Ideally, I'd like the background image to work with \uncover and \only.

-

You can insert an image in the background using the standard \includegraphics command, supplemented by a \raisebox{-\height}[0pt][0pt] to remove any vertical height/displacement.

The following minimal working example does exactly that, with the addition of any of the regular beamer overlay specification functionality:

\documentclass{beamer}
%\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\begin{document}

\begin{frame}
\frametitle{Background Test}

\begin{columns}
\column{0.3\textwidth}
\only<2>{\raisebox{-\height}[0pt][0pt]{\includegraphics[width=\linewidth,height=4cm]{tiger}}}%
\begin{itemize}
\item Left Column 1
\item Left Column 2
\end{itemize}

\column{0.7\textwidth}
\begin{itemize}
\item Right Column 1
\item Right Column 2
\end{itemize}
\end{columns}
\end{frame}
\end{document}


I've set the width of the image to be exactly \linewidth, which is the width of the column that it is put in (the first). The height of the image is set to 4cm, but you can modify this as needed.

Of course there are other methods (using other packages), but this seems to be the most straight forward, since it uses the only the essential graphicx package, actually already included by beamer.

-
Werner, the \raisebox macro already boxes the content. You can simply say \raisebox{-\height}{\includegraphics[..]{..}}. You can also set the effective height and depth using two optional arguments after the first mandatory one: \raisebox{-\height}[0pt][0pt]{\includegraphics[..]{..}}. Then you don't need \smash. –  Martin Scharrer Oct 17 '11 at 11:10
@MartinScharrer: Today I learned something new, thanks! The results weren't the same though, with \raisebox{-\height}[0pt][0pt]{...} causing a vertical shift in the other content. Same goes for \smash{\raisebox{-\height}{...}}. Any idea why? –  Werner Oct 17 '11 at 13:52
I get the exact same results for all three. I used the following code for comparison which didn't showed any difference on slides 2-4: \setbox0=\hbox{\includegraphics[width=\linewidth,height=4cm]{tiger}}% \only<2>{\smash{\raisebox{-\ht0}{\usebox0}}}% \only<3>{\smash{\raisebox{-\height}{\includegraphics[width=\linewidth,height=4cm‌​]{tiger}}}}% \only<4>{\raisebox{-\height}[0pt][0pt]{\includegraphics[width=\linewidth,height=‌​4cm]{tiger}}}% –  Martin Scharrer Oct 17 '11 at 14:12
@MartinScharrer: You're right. I must have had a spurious space in there somewhere. Thanks again. –  Werner Oct 17 '11 at 15:27