From 5090ddc99db868080b369cc9cfe5e6ca6fa20b52 Mon Sep 17 00:00:00 2001 From: utensil Date: Sat, 27 Apr 2024 18:48:21 +0800 Subject: [PATCH] Style enhancements for defs/thms --- trees/latex-preamble.tree | 118 +++++++++++++++++++++++++++++++++++++- trees/uts-0002.tree | 4 +- 2 files changed, 119 insertions(+), 3 deletions(-) diff --git a/trees/latex-preamble.tree b/trees/latex-preamble.tree index 743d828..1a5d4d2 100644 --- a/trees/latex-preamble.tree +++ b/trees/latex-preamble.tree @@ -7,7 +7,123 @@ \usepackage[framemethod=TikZ]{mdframed} \theoremstyle{definition} -\declaretheorem[name=Definition]{definition} +\theoremstyle{definition} +\mdfdefinestyle{mdbluebox}{% + roundcorner = 10pt, + linewidth=1pt, + skipabove=12pt, + innerbottommargin=9pt, + skipbelow=2pt, + nobreak=true, + linecolor=blue, + backgroundcolor=TealBlue!5, +} +\declaretheoremstyle[ + headfont=\sffamily\bfseries\color{MidnightBlue}, + mdframed={style=mdbluebox}, + headpunct={\\[3pt]}, + postheadspace={0pt} +]{thmbluebox} + +\mdfdefinestyle{mdredbox}{% + linewidth=0.5pt, + skipabove=12pt, + frametitleaboveskip=5pt, + frametitlebelowskip=0pt, + skipbelow=2pt, + frametitlefont=\bfseries, + innertopmargin=4pt, + innerbottommargin=8pt, + nobreak=true, + linecolor=RawSienna, + backgroundcolor=Salmon!5, +} +\declaretheoremstyle[ + headfont=\bfseries\color{RawSienna}, + mdframed={style=mdredbox}, + headpunct={\\[3pt]}, + postheadspace={0pt}, +]{thmredbox} + +\mdfdefinestyle{mdgreenbox}{% + skipabove=8pt, + linewidth=2pt, + rightline=false, + leftline=true, + topline=false, + bottomline=false, + nobreak=true, + linecolor=ForestGreen, + backgroundcolor=ForestGreen!5, + % innerleftmargin=20pt, + innerrightmargin=15pt +} +\declaretheoremstyle[ + headfont=\bfseries\sffamily\color{ForestGreen!70!black}, + bodyfont=\normalfont, + spaceabove=2pt, + spacebelow=1pt, + mdframed={style=mdgreenbox}, + headpunct={ --- }, +]{thmgreenbox} +\declaretheoremstyle[ + headfont=\bfseries\sffamily\color{ForestGreen!70!black}, + bodyfont=\normalfont, + spaceabove=2pt, + spacebelow=1pt, + mdframed={style=mdgreenbox}, + headpunct={}, +]{thmgreenbox*} + +\mdfdefinestyle{mdblackbox}{% + skipabove=8pt, + linewidth=3pt, + rightline=false, + leftline=true, + topline=false, + bottomline=false, + linecolor=black, + backgroundcolor=RedViolet!5!gray!5, +} +\declaretheoremstyle[ + headfont=\bfseries\sffamily, + bodyfont=\normalfont\small, + spaceabove=0pt, + spacebelow=0pt, + mdframed={style=mdblackbox} +]{thmblackbox} + +\declaretheoremstyle[ + headfont=\bfseries\sffamily, + bodyfont=\normalfont, %\small, %\sffamily, + spaceabove=0pt, + spacebelow=0pt +]{def} + +\theoremstyle{definition} +% \declaretheorem[style=thmblackbox,name=Definition,numberwithin=subsection]{definition} +\declaretheorem[style=thmbluebox,name=Theorem,numberwithin=subsection]{theorem} +\declaretheorem[style=thmbluebox,name=Theorem,numberwithin=subsection]{theoremx} % theorem not in dep graph +\declaretheorem[style=thmbluebox,name=Lemma,sibling=theorem]{lemma} +\declaretheorem[style=thmbluebox,name=Lemma,sibling=theorem]{lemmax} % lemma not in dep graph +\declaretheorem[style=thmbluebox,name=Corollary,sibling=theorem]{corollary} +\declaretheorem[style=thmbluebox,name=Proposition,sibling=theorem]{proposition} + +\theoremstyle{definition} +% \newtheorem{claim}[theorem]{Claim} +% \newtheorem{definition}[theorem]{Definition} +\declaretheorem[style=def,name=Definition,sibling=theorem]{definition} +% \newtheorem{fact}[theorem]{Fact} +% \newtheorem{abuse}[theorem]{Abuse of Notation} + +\declaretheorem[style=thmredbox,name=Example,sibling=theorem]{example} + +\theoremstyle{theorem} +% \declaretheorem[name=Question,sibling=theorem,style=thmblackbox]{ques} +% \declaretheorem[name=Exercise,sibling=theorem,style=thmblackbox]{exercise} +\declaretheorem[name=Remark,sibling=theorem,style=thmgreenbox]{remark} +\declaretheorem[name=Remark,sibling=theorem,style=thmgreenbox*]{remark*} +% \declaretheorem[name=Step,style=thmgreenbox]{step} % only used in Lebesgue int \stopverb } diff --git a/trees/uts-0002.tree b/trees/uts-0002.tree index c6acaba..aa303c5 100644 --- a/trees/uts-0002.tree +++ b/trees/uts-0002.tree @@ -18,9 +18,9 @@ The Pin group of $(V, q)$ is the subgroup $\operatorname{Pin}(V, q)$ of $P(V, q) The associated spin group of $(V, q)$ is then defined by -\[ +$$ \operatorname{Spin}(V, q)=\operatorname{Pin}(V, q) \cap \mathrm{Cl}^0(V, q) -\] +$$ \end{definition}