Skip to content

Commit

Permalink
Style enhancements for defs/thms
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Apr 27, 2024
1 parent 511aa87 commit 5090ddc
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 3 deletions.
118 changes: 117 additions & 1 deletion trees/latex-preamble.tree
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions trees/uts-0002.tree
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 5090ddc

Please sign in to comment.