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 a background image for one of my slides which is partially transparent. I'd like to set the background color for this slide to black, but it does not work.

Example:

\documentclass{beamer}

\begin{document}
{
\setbeamercolor{background canvas}{bg=black}
\setbeamertemplate{background canvas}{\includegraphics[height=\paperheight]{muon1.png}}
\begin{frame}[plain]
\end{frame}
}
\end{document}

muon1.png

share|improve this question
    
Please, next time propose a complete MWE, from \documentclass to \end{document}. And if you can, provide a transparent image. This way will be easier to test your code and help you. –  Ignasi Nov 26 '12 at 20:09
1  
Thanks for providing a MWE. –  Gonzalo Medina Nov 26 '12 at 23:23
add comment

1 Answer 1

up vote 7 down vote accepted

Simply use the bacground template for the image and background canvas for the black background:

\documentclass{beamer}

\begin{document}
{
\setbeamercolor{background canvas}{bg=black}
\setbeamertemplate{background}{\includegraphics[height=\paperheight]{muon1.png}}
\begin{frame}[plain]
\end{frame}
}
\end{document}

enter image description here

share|improve this answer
    
+1 A better solution than the one I proposed... ;-) –  Paul Gaborit Nov 26 '12 at 23:27
add comment

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.