Set up helpers, mostly okay. Some changes yet to come

This commit is contained in:
2025-01-06 17:52:57 +01:00
parent be406c816e
commit 9217ace0af
22 changed files with 534 additions and 0 deletions

37
main/style/common.tex Normal file
View File

@@ -0,0 +1,37 @@
\newtcolorbox{recall}[2][]{mainboxstyle,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!75!black,title={\large #2},
overlay={\node[draw=yellow!75!black,,fill=yellow!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1}
\newtcolorbox{remarks}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2},
overlay={\node[draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Remarks }{Bemerkungen }};},#1}
\newtcolorbox{guides}[3][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2},
overlay={\node[draw=red!75!black,,fill=red!75!black] at (frame.north east) {\large #3};},#1}
\newtcolorbox{properties}[2][]{mainboxstyle,colback=purple!5!white,colframe=purple!75!black,colbacktitle=purple!75!black,title={\large #2},
overlay={\node[draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Properties }{Eigenschaften }};},#1}
\newtcolorbox{restrictions}[2][]{mainboxstyle,colback=purple!5!white,colframe=purple!75!black,colbacktitle=purple!75!black,title={\large #2},
overlay={\node[draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Restrictions }{Einschränkungen }};},#1}
\newtcolorbox{limitations}[2][]{mainboxstyle,colback=purple!5!white,colframe=purple!75!black,colbacktitle=purple!75!black,title={\large #2},
overlay={\node[draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1}
% Terms and notation
\newtcolorbox{terms}[2][]{mainboxstyle,colback=orange!5!white,colframe=orange!75!black,colbacktitle=orange!75!black,title={\large #2},
overlay={\node[draw=orange!75!black,,fill=orange!75!black] at (frame.north east) {\large \translate{Terms }{Begriffe }};},#1}
\newtcolorbox{notation}[2][]{mainboxstyle,colback=Peach!5!white,colframe=Peach!75!black,colbacktitle=Peach!75!black,title={\large #2},
overlay={\node[draw=Peach!75!black,,fill=Peach!75!black] at (frame.north east) {\large Notation};},#1}
\newtcolorbox{usage}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2},
overlay={\node[draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1}
% General
\newtcolorbox{general}[4][]{mainboxstyle,colback=#4!5!white,colframe=#4!75!black,colbacktitle=#4!75!black,title={\large #2},
overlay={\node[draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1}

75
main/style/counters.tex Normal file
View File

@@ -0,0 +1,75 @@
% ▄▄· ▄• ▄▌ ▐ ▄ ▄▄▄▄▄▄▄▄ .▄▄▄
% ▐█ ▌▪ ▄█▀▄ █▪██▌•█▌▐█•██ ▀▄.▀·▀▄ █·
% ██ ▄▄▐█▌.▐▌█▌▐█▌▐█▐▐▌ ▐█.▪▐▀▀▪▄▐▀▀▄
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
\newcounter{lemmas}
\newcounter{definitions}
\newcounter{corollaries}
\newcounter{theorems}
\newcounter{axioms}
\newcounter{examples}
\newcounter{all}
\newcommand{\usenumberArabic}[1]{
\arabic{section}.\ifnum{numberingConfig}<3{
\ifnum{numberingConfig}<2{\arabic{#1}\stepcounter{#1}}\else{
\ifx#1definitions
\arabic{#1}\stepcounter{#1}
\else
\arabic{all}\stepcounter{all}
\fi
}\fi
}\else{\arabic{all}\stepcounter{all}}\fi
}
% Reset definition, lemma, etc counters, add a new page
\newcommand{\newsection}{
\newpage
\newsectionNoPB
}
% Reset definitions, lemma, etc counters, do not add new page
\newcommand{\newsectionNoPB}{
\setcounter{lemmaCount}{1}
\setcounter{definitionCount}{1}
\setcounter{corollaryCount}{1}
\setcounter{theoremCount}{1}
\setcounter{axiomCount}{1}
\setcounter{exampleCount}{1}
}
\newsectionNoPB
% Definitions
\newtcolorbox{definition}[2][]{mainboxstyle,colback=blue!5!white,colframe=blue!75!black,colbacktitle=blue!75!black,title={\large #2},overlay={\node[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large Definition \usenumberArabic{definitions}};},#1}
% Theorems
\newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2},
overlay={\node[draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large Theorem \usenumberArabic{theorems}};},#1}
\newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2},
overlay={\node[draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma \usenumberArabic{lemmas}};},#1}
\newtcolorbox{corollary}[2][]{mainboxstyle,colback=teal!5!white,colframe=teal!75!black,colbacktitle=teal!75!black,title={\large #2},
overlay={\node[draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar} \usenumberArabic{corollaries}};},#1}
\newtcolorbox{axiom}[2][]{mainboxstyle,colback=JungleGreen!5!white,colframe=JungleGreen!75!black,colbacktitle=JungleGreen!75!black,title={\large #2},
overlay={\node[draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom \usenumberArabic{axioms}};},#1}
\newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2},
overlay={\node[draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example }{Beispiel } \usenumberArabic{examples}};},#1}
% Shortened environments (inline)
\newcommand{\inlineex}{\textbf{\translate{Example }{Beispiel } \hspace{0mm} \usenumberArabic{examples}}}
\newcommand{\inlinedef}{\backdrop{Definition \hspace{0mm} \usenumberArabic{definitions}:} }
\newcommand{\inlinelemma}{\backdrop{Lemma \hspace{0mm} \usenumberArabic{lemmas}:} }
\newcommand{\inlinetheorem}{\backdrop{Theorem \hspace{0mm} \usenumberArabic{theorems}:} }
\newcommand{\inlineaxiom}{\backdrop{Axiom \hspace{0mm} \usenumberArabic{axioms}:} }
\newcommand{\inlinecorollary}{\backdrop{\translate{Corollary}{Korollar} \hspace{0mm} \usenumberArabic{corollaries}}:}
\newcommand{\inlineproof}{\backdrop{\ifnum\value{lang}<2{Proof}\else {Beweis}\fi \hspace{0mm}:} }

0
main/style/cs.tex Normal file
View File

10
main/style/language.tex Normal file
View File

@@ -0,0 +1,10 @@
% ░█▒░▒▄▀▄░█▄░█░▄▀▒░█▒█▒▄▀▄░▄▀▒▒██▀░░░▄▀▀░▀█▀░▀▄▀░█▒░▒██▀
% ▒█▄▄░█▀█░█▒▀█░▀▄█░▀▄█░█▀█░▀▄█░█▄▄▒░▒▄██░▒█▒░▒█▒▒█▄▄░█▄▄
% Specific styles for language summaries and docs
\newtcolorbox{conjugation}[2][]{mainboxstyle,colback=blue!5!white,colframe=blue!75!black,colbacktitle=blue!75!black,title={\large #2},
overlay={\node[draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large \translate{Conjugation}{Konjugation}};},#1}
\newtcolorbox{forms}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2},
overlay={\node[draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1}

15
main/style/math.tex Normal file
View File

@@ -0,0 +1,15 @@
% • ▌ ▄ ·. ▄▄▄· ▄▄▄▄▄ ▄ .▄ .▄▄ · ▄▄▄▄▄ ▄· ▄▌▄▄▌ ▄▄▄ .
% ·██ ▐███▪▐█ ▀█ •██ ██▪▐█ ▐█ ▀. •██ ▐█▪██▌██• ▀▄.▀·
% ▐█ ▌▐▌▐█·▄█▀▀█ ▐█.▪██▀▀█ ▄▀▀▀█▄ ▐█.▪▐█▌▐█▪██ ▪ ▐▀▀▪▄
% ██ ██▌▐█▌▐█▪ ▐▌ ▐█▌·██▌▐▀ ▐█▄▪▐█ ▐█▌· ▐█▀·.▐█▌ ▄▐█▄▄▌
% ▀▀ █▪▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀ · ▀▀▀▀ ▀▀▀ ▀ • .▀▀▀ ▀▀▀
% Math specific tcolorboxes
\newtcolorbox{formula}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \ifnum\value{lang}<2{Formula}\else {Formel}\fi};},#1}
\newtcolorbox{proof}[2][]{arc=3mm,colback=magenta!5!white,colframe=magenta!75!black,colbacktitle=magenta!75!black,fonttitle=\bfseries,
enhanced,attach boxed title to top left={yshift=-2mm,xshift=5mm},title={\large #2},breakable,top=0.4cm,
overlay={\node[draw=magenta!75!black,thick,fill=magenta!75!black,left,anchor=east,text=white,rounded corners=1mm,font=\bfseries,
xshift=-5mm,yshift=1mm,inner xsep=3mm,inner ysep=1.5mm] at (frame.north east) {\large \ifnum\value{lang}<2{Proof}\else {Beweis}\fi};},#1}

91
main/style/style.tex Normal file
View File

@@ -0,0 +1,91 @@
%░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
%░░░ ░░░░░ ░░░░░░░░░░░░░ ░░░░░░░░░░░
%▒ ▒▒▒▒ ▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒
%▒▒ ▒▒▒▒▒▒▒ ▒ ▒ ▒▒▒ ▒ ▒▒▒▒ ▒▒▒▒
%▓▓▓▓ ▓▓▓▓▓▓▓ ▓▓▓▓ ▓ ▓▓ ▓▓ ▓▓▓ ▓
%▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓ ▓ ▓
%▓ ▓▓▓▓ ▓▓▓ ▓ ▓▓▓▓▓ ▓▓▓ ▓ ▓▓▓▓▓▓▓▓
%███ ██████ █████ ████ ███ ███
%██████████████████████ ███████████████████
% Global style configs for tcolorbox (to reduce bloat)
\newcommand{\usetcolorboxes}{
\tcbset{
mainboxstyle/.style={
arc=3mm,
colback=red!5!white,
colframe=red!75!black,
colbacktitle=red!75!black,
fonttitle=\bfseries,
enhanced,
attach boxed title to top left={yshift=-2mm,xshift=5mm},
breakable,
top=0.4cm,
}
}
\tikzset{
overlaystyle/.style={
draw=red!75!black,
thick,
fill=red!75!black,
left,
anchor=east,
text=white,
rounded corners=1mm,
font=\bfseries,
xshift=-5mm,
yshift=1mm,
inner xsep=3mm,
inner ysep=1.5mm
}
}
}
% -------------------- %
% Small style elements %
% -------------------- %
\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
% Add a color shade (similar to \fhlc, but nicer boxes)
\newcommand{\shade}[2]{
\tcbox[on line,
boxsep=3pt,
left=0pt,
right=0pt,
top=0pt,
bottom=0pt,
colframe=white,
colback=#1!20!white,
highlight math style={enhanced}
] {\textbf{#2}}
}
% Add a gray backdrop
\newcommand{\backdrop}[1]{
\shade{black}{#1}
}
% Fancy highlighting (Bold, underlined, colorbox behind it. Shorthand for \fhlc{white}{#1}
\newcommand{\fhl}[1]{\fhlc{white}{#1}}
% Add a colorbox around your text with the color specified. Text is bold and underlined
\newcommand{\fhlc}[2]{\textbf{\underline{\colorbox{#1}{#2}}}}
% ----------------- %
% Table of contents %
% ----------------- %
% Print a table of contents as a tcolorbox
\newcommand{\printtoc}[1]{
\renewcommand{\cfttoctitlefont}{}
\renewcommand{\cftaftertoctitle}{\vspace{-0.75cm}}
\renewcommand{\contentsname}{}
\begin{tcolorbox}[colback=black!5!white,colbacktitle=#1!75!black,coltitle=black,enhanced,attach boxed title to top center={yshift=-2mm},
title={\Large \ifnum\value{lang}<2{Contents}\else {Inhaltsverzeichnis}\fi},fonttitle=\bfseries,breakable]
\hspace{1cm}
\tableofcontents
\end{tcolorbox}
}