diff --git a/preamble.tex b/preamble.tex
@@ -12,7 +12,8 @@
\usepackage[ordering=Kac]{dynkin-diagrams}
\usepackage{rank-2-roots}
\usepackage{imakeidx}
-\usepackage{thmtools}
+\usepackage{tcolorbox}
+\usepackage{footnote}
% Set the default colors
\definecolor{mosgreen}{RGB}{29, 135, 17}
@@ -51,33 +52,40 @@
\setenumerate[0]{label={\color{mosgreen}\normalfont \bfseries(\roman*)}}
% Useful theorem definitions
-\newtheoremstyle{coloredtheorem}{}{}{\em}{}{\bf\color{mosgreen}}{}{.5em}{}
-\newtheoremstyle{coloreddefinition}{}{}{}{}{\bf\color{mosgreen}}{}{.5em}{}
+\BeforeBeginEnvironment{tcolorbox}{\savenotes}
+\AfterEndEnvironment{tcolorbox}{\spewnotes}
+\newtheoremstyle{coloredtheorem}{}{}{\em}{}{\bf\color{mosgreen}}{.}{.5em}{}
+\newtheoremstyle{coloreddefinition}{}{}{}{}{\bf\color{mosgreen}}{.}{.5em}{}
\newtheoremstyle{coloredremark}{}{}{}{}{\itshape\color{mosgreen}}{.}{.5em}{}
-\declaretheorem[
- shaded={rulecolor=thmrule, rulewidth=1pt, bgcolor=thmbackground, margin=8pt},
- style=coloredtheorem,
- parent=chapter]{theorem}
-\declaretheorem[
- shaded={rulecolor=thmrule, rulewidth=1pt, bgcolor=thmbackground, margin=8pt},
- style=coloredtheorem,
- sibling=theorem]{lemma}
-\declaretheorem[
- shaded={rulecolor=thmrule, rulewidth=1pt, bgcolor=thmbackground, margin=8pt},
- style=coloredtheorem,
- sibling=theorem]{corollary}
-\declaretheorem[
- shaded={rulecolor=thmrule, rulewidth=1pt, bgcolor=thmbackground, margin=8pt},
- style=coloredtheorem,
- sibling=theorem]{proposition}
+% -----------------------------------------------------------------------------
+\theoremstyle{coloredtheorem}
+\newtheorem{innertheorem}{Theorem}[chapter]
+\newtheorem{innerlemma}[innertheorem]{Lemma}
+\newtheorem{innercorollary}[innertheorem]{Corollary}
+\newtheorem{innerproposition}[innertheorem]{Proposition}
+\theoremstyle{coloreddefinition}
+\newtheorem{innerdefinition}[innertheorem]{Definition}
+% -----------------------------------------------------------------------------
+\theoremstyle{coloreddefinition}
+\newtheorem{example}[innertheorem]{Example}
\theoremstyle{coloredremark}
\newtheorem*{note}{Remark}
-\declaretheorem[
- shaded={rulecolor=thmrule, rulewidth=1pt, bgcolor=thmbackground, margin=8pt},
- style=coloredtheorem,
- style=coloreddefinition,
- sibling=theorem]{definition}
-\declaretheorem[style=coloreddefinition, sibling=theorem]{example}
+% -----------------------------------------------------------------------------
+\newenvironment{theorem}[1][{}]
+ {\begin{tcolorbox}[colback=thmbackground, colframe=thmrule]\begin{innertheorem}[#1]}
+ {\end{innertheorem}\end{tcolorbox}}
+\newenvironment{lemma}[1][{}]
+ {\begin{tcolorbox}[colback=thmbackground, colframe=thmrule]\begin{innerlemma}[#1]}
+ {\end{innerlemma}\end{tcolorbox}}
+\newenvironment{corollary}[1][{}]
+ {\begin{tcolorbox}[colback=thmbackground, colframe=thmrule]\begin{innercorollary}[#1]}
+ {\end{innercorollary}\end{tcolorbox}}
+\newenvironment{proposition}[1][{}]
+ {\begin{tcolorbox}[colback=thmbackground, colframe=thmrule]\begin{innerproposition}[#1]}
+ {\end{innerproposition}\end{tcolorbox}}
+\newenvironment{definition}[1][{}]
+ {\begin{tcolorbox}[colback=thmbackground, colframe=thmrule]\begin{innerdefinition}[#1]}
+ {\end{innerdefinition}\end{tcolorbox}}
% Custom page style
\fancypagestyle{custom}{%