0

What would be the best way to create a new box layout in Latex beamer that resembles this example that I put together.

I want to define a background image for the block that is scaled to the right size but clipped at the round edges.

Maybe somebody can point me in the right direction on how to restructure the block environment.

enter image description here

2
2

Got it working with the help of the linked question. I believe however that it is a slightly different case using overlays instead of watermarks.

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

\tcbset{imagebox/.style={enhanced, colframe=structure,fonttitle=\bfseries,beamer, overlay={ 
\begin{tcbclipframe}
    \node[anchor=west,inner sep=0] at (frame.center) {\includegraphics[width=0.5\textwidth]{mushrooms}}; 
\end{tcbclipframe}                                                                                  
}}}

\begin{document}

\begin{frame}
\frametitle{A color box with half a background image}
\begin{tcolorbox}[imagebox ,title={The title}]
\begin{minipage}{0.45\linewidth}
    Test this box's content minipage if it scales properly
\end{minipage}
\end{tcolorbox}
\end{frame}

\end{document}

The result looks like this:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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