diff --git a/beamerthemeawesome.sty b/beamerthemeawesome.sty index 1cf236b..ae7079d 100644 --- a/beamerthemeawesome.sty +++ b/beamerthemeawesome.sty @@ -44,6 +44,7 @@ \RequirePackage{contour} \RequirePackage[normalem]{ulem} \RequirePackage{underscore} +\RequirePackage{tcolorbox} \RequirePackage{hyperref} \RequirePackage{listings} @@ -388,6 +389,24 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newtcolorbox{beamerbox}[2]{IfBlankTF={#2}{toprule=2mm}{title=#2},colback=#1!5!white,colframe=#1!75!black} + +\renewenvironment{definition}[1][\empty]{ + \begin{beamerbox}{awesomemarroon}{#1} +}{\end{beamerbox}} + +\renewenvironment{block}[1][]{ + \begin{beamerbox}{awesomeblue}{#1} +}{\end{beamerbox}} + +\renewenvironment{examples}[1][]{ + \begin{beamerbox}{awesomegreen}{#1} +}{\end{beamerbox}} + +\renewenvironment{alertblock}[1][]{ + \begin{beamerbox}{awesomehighlight}{#1} +}{\end{beamerbox}} + \newcommand{\background}[1]{ \newcommand{\awesome@background}{#1} } diff --git a/example.pdf b/example.pdf index 4599253..20257f3 100644 Binary files a/example.pdf and b/example.pdf differ diff --git a/example.tex b/example.tex index 0f449e7..7c3e910 100644 --- a/example.tex +++ b/example.tex @@ -19,6 +19,31 @@ \maketitle \section{Section 1} +\begin{frame}[fragile] + \frametitle{Boxes} + \begin{columns}[t] + \begin{column}{0.45\textwidth} + \begin{block}[Some Title] + This is an important information + \end{block} + \begin{alertblock}[Argh] + Gotcha! + \end{alertblock} + \end{column} + \begin{column}{0.45\textwidth} + \begin{examples}[Example 1] + \begin{verbatim} +\begin{alertblock}[Argh] + Gotcha! +\end{alertblock} + \end{verbatim} + \end{examples} + \begin{definition} + I'm a definition with no title + \end{definition} + \end{column} + \end{columns} +\end{frame} \begin{frame} \frametitle[Another Title]{Example Slide} \framesubtitle{With a subtitle}