Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have set a global background image

\usebackgroundtemplate
{
    \centering\includegraphics[width=\paperwidth,height=\paperheight{bgs/global.png}
}

The problem is, I need to replace this with a solid white background for certain frames (slides), but I can't figure out how to do that.

Thanks!

share|improve this question

1 Answer 1

up vote 17 down vote accepted

Include the white frames into a group with an empty usebackgroundtemplate

\documentclass{beamer}
\usebackgroundtemplate%
{
    \centering\includegraphics[width=\paperwidth,height=\paperheight{bgs/global.png}
}
\begin{document}
\begin{frame}
this frame will have the global background
\end{frame}

{
 \usebackgroundtemplate{}
   \begin{frame}  
     This frame will have a white background
    \end{frame} 
}

\begin{frame}
this frame will have the global background
\end{frame}

\end{document}

you may also create a custom frame environment with an empty background:

\newenvironment{whiteframe}
{
 \usebackgroundtemplate{}
 \begin{frame}
}
{
 \end{frame}
}

To make the answer a bit more general, if you'd like a background color different from white (which is a kind of special case) your custom environment should be:

\newenvironment{yellowframe}%
 {
  \setbeamertemplate{background canvas}[default]
  \setbeamercolor{background canvas}{bg=yellow}
  \begin{frame}
 }
 {
  \end{frame}
 }

or you could have a shaded background:

\newenvironment{yellowshadedframe}
 {
  \setbeamertemplate{background canvas}[vertical shading][bottom=yellow,top=white]
  \begin{frame}
 }
 {
  \end{frame}
 }
share|improve this answer
    
No need for \begingroup and \endgroup. The environments used with \begin and \end already include a group themselves. –  Qrrbrbirlbel Nov 8 '13 at 18:30
    
@Qrrbrbirlbel thanks, I'm removing them –  dcmst Nov 8 '13 at 18:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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