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.

As the title states. Is there a way to insert a background picture for a beamercolorbox. I mean I can make two of them overlap or something, but can I insert a background picture somehow? Thanks.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Update:

Using the newest version of tcolorbox (2.32 (2013/06/23)), the beamer skin works fine with watermark clipping:

\documentclass{beamer}
\usetheme{Boadilla}
\usepackage{lipsum}
\usepackage{tcolorbox}
\tcbuselibrary{skins,hooks}
\usetikzlibrary{shadows}

\tcbset{colframe=structure,fonttitle=\bfseries,beamer}

\begin{document}

\begin{frame}
\frametitle{A color box with a background image}
\begin{tcolorbox}[enhanced,title={The title},watermark graphics=mushrooms,
watermark opacity=0.5,watermark color=blue,watermark stretch=1]
\lipsum[4]
\end{tcolorbox}
\end{frame}

\end{document}

enter image description here

You can easily do this by simulating the beamercolorbox with the powerful tcolorbox package; the skins and hooks libraries allow you to insert a background image (there's even a beamer skin that will give the look and feel of beamer settings for boxes); setting a value of 1 for watermark stretch, the image will occupy the entire box.

A little example; I used a (famous by now) Wikipedia image, renaming it to mushrooms:

\documentclass{beamer}
\usetheme{Boadilla}
\usepackage{lipsum}
\usepackage{tcolorbox}
\tcbuselibrary{skins,hooks}
\usetikzlibrary{shadows}

\tcbset{colframe=structure,fonttitle=\bfseries}

\begin{document}

\begin{frame}
\frametitle{A color box with a background image}
\begin{tcolorbox}[enhanced,title={The title},watermark graphics=mushrooms,
watermark opacity=0.5,watermark color=blue,watermark stretch=1]
\lipsum[4]
\end{tcolorbox}
\end{frame}

\end{document}

enter image description here

share|improve this answer
    
The rounded shadow is not really adapted to the angle of the image. –  Paul Gaborit Jun 22 '13 at 7:28
    
@PaulGaborit you're right; I've changed the example, since the beamer skin apparently don't cooperate well with the watermark inclusion. –  Gonzalo Medina Jun 22 '13 at 14:25
    
Until version 2.31, tcolorbox did not support direct clipping of watermarks, i.e. a watermark could overlap the frame if large enough. Version 2.32 adds switchable clipping support for watermarks and clipping is the default behaviour. This new version will be published in a few days. –  Thomas F. Sturm Jun 22 '13 at 15:00
    
@ThomasF.Sturm Ah, that explains it. Thank you! I'm looking forward to seeing the new version. tcolorbox has greatly evolved and has become a powerful package. –  Gonzalo Medina Jun 22 '13 at 15:02
1  
@GonzaloMedina I've just uploaded tcolorbox 2.32 with 'clip watermark' as one of the additions :-) –  Thomas F. Sturm Jun 23 '13 at 15:45

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.