Added boxes

This commit is contained in:
Lukas Pietzschmann
2023-05-15 16:26:43 +02:00
parent 98789598c4
commit 74d3171c61
3 changed files with 44 additions and 0 deletions

View File

@@ -44,6 +44,7 @@
\RequirePackage{contour} \RequirePackage{contour}
\RequirePackage[normalem]{ulem} \RequirePackage[normalem]{ulem}
\RequirePackage{underscore} \RequirePackage{underscore}
\RequirePackage{tcolorbox}
\RequirePackage{hyperref} \RequirePackage{hyperref}
\RequirePackage{listings} \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{\background}[1]{
\newcommand{\awesome@background}{#1} \newcommand{\awesome@background}{#1}
} }

Binary file not shown.

View File

@@ -19,6 +19,31 @@
\maketitle \maketitle
\section{Section 1} \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} \begin{frame}
\frametitle[Another Title]{Example Slide} \frametitle[Another Title]{Example Slide}
\framesubtitle{With a subtitle} \framesubtitle{With a subtitle}