Skip to content

Commit

Permalink
updated frames and counters
Browse files Browse the repository at this point in the history
  • Loading branch information
georglauterbach authored Jul 26, 2023
1 parent 42cfe95 commit a4d18e4
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 52 deletions.
3 changes: 0 additions & 3 deletions include/01-language_english.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@

\newif\ifenglish%
\englishtrue%

\newif\ifframesloaded%
\framesloadedfalse%
3 changes: 0 additions & 3 deletions include/01-language_german.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@

\newif\ifenglish%
\englishfalse%

\newif\ifframesloaded%
\framesloadedfalse%
4 changes: 4 additions & 0 deletions include/02-generic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@
\newif\ifbibliographyloaded%
\bibliographyloadedfalse%

% ? >> option defaults

\newif\ifframesloaded%
\framesloadedfalse%
45 changes: 17 additions & 28 deletions include/42-frames.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,33 @@
frametitlebelowskip=7pt,
innertopmargin=10pt,
innerbottommargin=10pt,
]{mdframed}
]{mdframed}%

\mdfdefinestyle{default}{linewidth=.5pt,linecolor=Aquamarine,frametitlebackgroundcolor={Aquamarine!20}}
\mdfdefinestyle{definition}{linewidth=.5pt,linecolor=CornflowerBlue,frametitlebackgroundcolor={CornflowerBlue!20}}
\mdfdefinestyle{notation}{linewidth=.5pt,linecolor=SelectiveYellow,frametitlebackgroundcolor={SelectiveYellow!20}}
\mdfdefinestyle{problem}{linewidth=.5pt,linecolor=OrangePantone,frametitlebackgroundcolor={OrangePantone!20}}
\mdfdefinestyle{theorem}{linewidth=.5,linecolor=MediumSlateBlue,frametitlebackgroundcolor={MediumSlateBlue!20}}
\mdfdefinestyle{proof}{linewidth=.5pt,linecolor=MexicanPink,frametitlebackgroundcolor={MexicanPink!20}}
\mdfdefinestyle{problem}{linewidth=.5pt,linecolor=OrangePantone,frametitlebackgroundcolor={OrangePantone!20}}
\mdfdefinestyle{notation}{linewidth=.5pt,linecolor=SelectiveYellow,frametitlebackgroundcolor={SelectiveYellow!20}}

\newcounter{definition-counter}\setcounter{definition-counter}{0}
\newcounter{lemma-counter}\setcounter{lemma-counter}{0}
\newcounter{axiom-counter}\setcounter{axiom-counter}{0}
\newcounter{notation-counter}\setcounter{notation-counter}{0}
\newcounter{problem-counter}\setcounter{problem-counter}{0}

\mdtheorem[style=definition] {definition} [definition-counter] {Definition}
\mdtheorem[style=definition] {lemma} [lemma-counter] {Lemma}
\mdtheorem[style=notation] {axiom} [axiom-counter] {Axiom}
\mdtheorem[style=notation] {notation} [notation-counter] {Notation}
\mdtheorem[style=problem] {problem} [problem-counter] {Problem}
\mdfdefinestyle{example}{linewidth=.5pt,linecolor=Aquamarine,frametitlebackgroundcolor={Aquamarine!20}}

\newcounter{theorem-counter}\setcounter{theorem-counter}{0}
\newcounter{corollary-counter}\setcounter{corollary-counter}{0}
\newcounter{proof-counter}\setcounter{proof-counter}{0}
\newcounter{example-counter}\setcounter{example-counter}{0}
\mdtheorem[style=definition] {definition} {Definition} [chapter]
\mdtheorem[style=definition] {lemma} [definition] {Lemma}
\mdtheorem[style=notation] {axiom} [definition] {Axiom}
\mdtheorem[style=notation] {notation} [definition] {Notation}
\mdtheorem[style=problem] {problem} [definition] {Problem}

\ifenglish%

\mdtheorem[style=theorem] {theorem} [theorem-counter] {Theorem}
\mdtheorem[style=theorem] {corollary} [corollary-counter] {Corollary}
\mdtheorem[style=proof] {proof} [proof-counter] {Proof}
\mdtheorem[style=default] {example} [example-counter] {Example}
\mdtheorem[style=theorem] {theorem} [definition] {Theorem}
\mdtheorem[style=theorem] {corollary} [definition] {Corollary}
\mdtheorem[style=proof] {proof} [definition] {Proof}
\mdtheorem[style=example] {example} [definition] {Example}

\else

\mdtheorem[style=theorem] {satz} [theorem-counter] {Satz}
\mdtheorem[style=theorem] {korollar} [corollary-counter] {Korollar}
\mdtheorem[style=proof] {beweis} [proof-counter] {Beweis}
\mdtheorem[style=default] {beispiel} [example-counter] {Beispiel}
\mdtheorem[style=theorem] {satz} [definition] {Satz}
\mdtheorem[style=theorem] {korollar} [definition] {Korollar}
\mdtheorem[style=proof] {beweis} [definition] {Beweis}
\mdtheorem[style=example] {beispiel} [definition] {Beispiel}

\fi
64 changes: 46 additions & 18 deletions include/99-last.tex
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@

\ifframesloaded%

\crefname{definition-counter}{definition}{definitions}
\crefname{lemma-counter}{lemma}{lemmas}
\crefname{axiom-counter}{axiom}{axioms}
\crefname{notation-counter}{notation}{notations}
\crefname{problem-counter}{problem}{problems}
\crefname{definition}{definition}{definitions}
\crefname{lemma}{lemma}{lemmas}
\crefname{axiom}{axiom}{axioms}
\crefname{notation}{notation}{notations}
\crefname{problem}{problem}{problems}

\crefname{theorem-counter}{theorem}{theorems}
\crefname{corollary-counter}{corollary}{corollaries}
\crefname{proof-counter}{proof}{proofs}
\crefname{example-counter}{example}{examples}
\crefname{theorem}{theorem}{theorems}
\crefname{corollary}{corollary}{corollaries}
\crefname{proof}{proof}{proofs}
\crefname{example}{example}{examples}

\fi% ifframesloaded

Expand All @@ -51,17 +51,45 @@

\ifframesloaded%

\crefname{definition-counter}{Definition}{Definitionen}
\crefname{lemma-counter}{Lemma}{Lemmas}
\crefname{axiom-counter}{Axiom}{Axiome}
\crefname{notation-counter}{Notation}{Notationen}
\crefname{problem-counter}{Problem}{Probleme}
\crefname{definition}{Definition}{Definitionen}
\crefname{lemma}{Lemma}{Lemmas}
\crefname{axiom}{Axiom}{Axiome}
\crefname{notation}{Notation}{Notationen}
\crefname{problem}{Problem}{Probleme}

\crefname{theorem-counter}{Satz}{Sätze}
\crefname{corollary-counter}{Korellar}{Korellare}
\crefname{proof-counter}{Beweis}{Beweise}
\crefname{example-counter}{Beispiel}{Beispiele}
\crefname{theorem}{Satz}{Sätze}
\crefname{corollary}{Korellar}{Korellare}
\crefname{proof}{Beweis}{Beweise}
\crefname{example}{Beispiel}{Beispiele}

\fi% ifframesloaded

\fi% ifenglish

\ifframesloaded%

\let\oldLemma\lemma
\renewcommand{\lemma}{\crefalias{definition}{lemma}\oldLemma}

\let\oldAxiom\axiom
\renewcommand{\axiom}{\crefalias{definition}{axiom}\oldAxiom}

\let\oldNotation\notation
\renewcommand{\notation}{\crefalias{definition}{notation}\oldNotation}

\let\oldProblem\problem
\renewcommand{\problem}{\crefalias{definition}{problem}\oldProblem}

\let\oldTheorem\theorem
\renewcommand{\theorem}{\crefalias{definition}{theorem}\oldTheorem}

\let\oldCorollary\corollary
\renewcommand{\corollary}{\crefalias{definition}{corollary}\oldCorollary}

\let\oldProof\proof
\renewcommand{\proof}{\crefalias{definition}{proof}\oldProof}

\let\oldExample\example
\renewcommand{\example}{\crefalias{definition}{example}\oldExample}

\fi% ifframesloaded

0 comments on commit a4d18e4

Please sign in to comment.