- Commit
- 3ec5b4c1aba8b5f771c8ae7228050252b2f4796b
- Parent
- 29d396ad92c844b653e1deb09083cccc896c6801
- Author
- Pablo <pablo-escobar@riseup.net>
- Date
Further refined the styles of boxed theorem environments
Source code for my notes on representations of semisimple Lie algebras and Olivier Mathieu's classification of simple weight modules
Further refined the styles of boxed theorem environments
1 file changed, 33 insertions, 25 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | preamble.tex | 58 | 33 | 25 |
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}{%