In a beamer presentation, I’d like to set up different colors for normal blocks, definition blocks, theorem blocks, proof blocks, example blocks…
Ideally I’d set those up using \usebeamercolor
commands. I can do it for example blocks, and for all other kinds of blocks at once, as illustrated in the sample below (compiled using XeLaTeX). But I can’t find how to do it for specific, non-example, types of blocks.
I suppose “Custom beamer blocks for pros and cons” points towards some solution, but I’d prefer (somehow) inheriting from the existing special block environment definitions rather than define new environments from scratch.
\documentclass{beamer}
\usepackage{fontspec}
\useinnertheme[shadow=true]{rounded}
\setbeamercolor{block title}{use=structure,fg=structure.fg,bg=structure.fg!20!bg}
\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!50!bg}
\setbeamercolor{block title example}{use=example text,fg=example text.fg,bg=example text.fg!20!bg}
\setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg!50!bg}
\begin{document}
\begin{frame}
\begin{block}{My block}
A block.
\end{block}
\begin{definition}[My definition]
A definition.
\end{definition}
\begin{theorem}[My theorem]
A theorem.
\end{theorem}
\begin{proof}[My proof]
A proof.
\end{proof}
\begin{example}[My example]
An example.
\end{example}
\end{frame}
\end{document}