about summary refs log tree commit diff stats
path: root/common/latex/preamble/academia
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-03 11:17:29 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-03 11:17:29 +0200
commit1b0d1d4b8f373d9c05996055fb85ea8a2bb949a7 (patch)
tree93781d3a88a498ec27ea1e3f550e899476f11496 /common/latex/preamble/academia
parentfix(templates/latex/{academia,letter}): Share files and update to lpm v2.0 (diff)
downloadflake-templates-1b0d1d4b8f373d9c05996055fb85ea8a2bb949a7.tar.gz
flake-templates-1b0d1d4b8f373d9c05996055fb85ea8a2bb949a7.zip
refactor(templates/latex): Split the preamble up into multiple files
Diffstat (limited to '')
-rw-r--r--common/latex/preamble/academia/mod.tex4
-rw-r--r--common/latex/preamble/academia/theorems/definitions.tex90
-rw-r--r--common/latex/preamble/academia/theorems/mod.tex2
-rw-r--r--common/latex/preamble/academia/theorems/packages.tex6
-rw-r--r--common/latex/preamble/academia/visuals.tex1
5 files changed, 103 insertions, 0 deletions
diff --git a/common/latex/preamble/academia/mod.tex b/common/latex/preamble/academia/mod.tex
new file mode 100644
index 0000000..39b9230
--- /dev/null
+++ b/common/latex/preamble/academia/mod.tex
@@ -0,0 +1,4 @@
+% derived from:
+% https://github.com/gillescastel/lecture-notes/blob/929672a96abc27eaeb6fa58b1d277b3582d28532/group-theory/preamble.tex
+\input{headers/preamble/academia/theorems/mod.tex}
+\input{headers/preamble/academia/visuals.tex}
diff --git a/common/latex/preamble/academia/theorems/definitions.tex b/common/latex/preamble/academia/theorems/definitions.tex
new file mode 100644
index 0000000..4355b3c
--- /dev/null
+++ b/common/latex/preamble/academia/theorems/definitions.tex
@@ -0,0 +1,90 @@
+\renewcommand\qedsymbol{\ensuremath{\text{\textit{O.}}~\epsilon.~\delta.}}
+% \renewcommand\qedsymbol{\dots}
+
+\theoremstyle{definition}
+
+
+\declaretheoremstyle[
+	headfont=\bfseries\sffamily\color{NavyBlue!80},
+	bodyfont=\normalfont,
+	headpunct={:\\},
+	qed=\qedsymbol,
+	mdframed={
+			linewidth=2pt,
+			rightline=false, topline=false, bottomline=false,
+			linecolor=NavyBlue, backgroundcolor=NavyBlue!5,
+		},
+]{thmexample}
+\declaretheorem[numbered=no, style=thmexample,name=Beispiel]{eg}
+
+\declaretheoremstyle[
+	headfont=\bfseries\sffamily\color{RawSienna!80},
+	bodyfont=\normalfont,
+	headpunct={:\\},
+	qed=\qedsymbol,
+	mdframed={
+			linewidth=2pt,
+			rightline=false, topline=false, bottomline=false,
+			linecolor=RawSienna, backgroundcolor=RawSienna!5,
+		},
+]{thmexercise}
+\declaretheorem[numbered=no, style=thmexercise, name=Aufgabe]{ex}
+
+
+\declaretheoremstyle[
+	headfont=\bfseries\sffamily\color{ForestGreen!80},
+	bodyfont=\normalfont,
+	headpunct={:\\},
+	qed=\qedsymbol,
+	mdframed={
+			linewidth=2pt,
+			rightline=false, topline=false, bottomline=false,
+			linecolor=ForestGreen, backgroundcolor=ForestGreen!5,
+		},
+]{thmdef}
+\declaretheorem[numbered=yes, style=thmdef, name=Definition]{definition}
+
+\declaretheoremstyle[
+	headfont=\bfseries\sffamily\color{RawSienna!70!black},
+	bodyfont=\normalfont,
+	headpunct={:\\},
+	qed=\qedsymbol,
+	mdframed={
+			linewidth=2pt,
+			leftline=false, rightline=true, topline=false, bottomline=false,
+			linecolor=RawSienna, backgroundcolor=Red!5,
+		}
+]{thmtheorem}
+\declaretheorem[numbered=yes, style=thmtheorem, name=Satz]{theorem}
+
+
+\declaretheoremstyle[
+	headfont=\bfseries\sffamily\color{Violet!80},
+	bodyfont=\normalfont,
+	headpunct={:\\},
+	notebraces={f\"ur }{},
+	qed=\qedsymbol,
+	mdframed={
+			linewidth=2pt,
+			rightline=false, topline=false, bottomline=false,
+			linecolor=Violet, backgroundcolor=Violet!5,
+		},
+]{thmsolution}
+\makeatletter
+\@ifclasswith{report}{nosolutions}
+{%
+	\NewEnviron{solution}[1][]{Eine L\"osung mit dem Name ("L\"osung für #1") wurde ausgeblendet.\ \\ \par}
+	\newcommand\hdsolution[1]{L\"osung ausgeblendet}
+}{%
+	\declaretheorem[numbered=no, style=thmsolution, name=L\"osung]{replacementSolution}
+
+	\NewEnviron{solution}[1][]{
+		\vspace{-1em}
+		\begin{replacementSolution}[#1]
+			\
+			\BODY
+		\end{replacementSolution}
+	}
+	\newcommand\hdsolution[1]{#1}
+}
+\makeatother
diff --git a/common/latex/preamble/academia/theorems/mod.tex b/common/latex/preamble/academia/theorems/mod.tex
new file mode 100644
index 0000000..8350276
--- /dev/null
+++ b/common/latex/preamble/academia/theorems/mod.tex
@@ -0,0 +1,2 @@
+\input{headers/preamble/academia/theorems/definitions.tex}
+\input{headers/preamble/academia/theorems/packages.tex}
diff --git a/common/latex/preamble/academia/theorems/packages.tex b/common/latex/preamble/academia/theorems/packages.tex
new file mode 100644
index 0000000..c881ab5
--- /dev/null
+++ b/common/latex/preamble/academia/theorems/packages.tex
@@ -0,0 +1,6 @@
+\usepackage[framemethod=TikZ]{mdframed}
+\mdfsetup{skipabove=1em,skipbelow=0em, innertopmargin=5pt, innerbottommargin=6pt}
+
+\usepackage{amsthm}  % math commands for theorems
+\usepackage{thmtools} % improved theorems
+\usepackage{environ} % for hiding of the solution env
diff --git a/common/latex/preamble/academia/visuals.tex b/common/latex/preamble/academia/visuals.tex
new file mode 100644
index 0000000..dada594
--- /dev/null
+++ b/common/latex/preamble/academia/visuals.tex
@@ -0,0 +1 @@
+\usepackage{fancyhdr}  % Text layout and margins, headers so on