I have two kinds of examples in my document. I want to use different colors, say, red and blue. This is what I am doing now.
\documentclass[]{beamer}
\usetheme{Madrid}
\begin{document}
\begin{frame}
\frametitle{Test}
\setbeamercolor{block title}{fg=white,bg=red!75!black}
\begin{block}{First Kind Example}
This is example of the first kind.
\end{block}
\setbeamercolor{block title}{fg=white,bg=blue!75!black}
\begin{block}{Second Kind Example}
This is example of the second kind.
\end{block}
\end{frame}
\end{document}
I know this is kind of stupid. I want to define two new block environments, one for each color, so I don't need to use setbeamercolor
every time I use them.
\begin{block1}{First Kind Example}
...
\end{block1}
\begin{block2}{Second Kind Example}
...
\end{block2}
I know I need to define these two new environments in the preamble, but don't know how. Thanks for the help.
By the way, what is a good reference on these kinds of tricks in LaTeX/beamer? Any recommendations?
block
,alertblock
andexampleblock
. You can customize them separately.