From f2c337eaa9880a70026ee8f9cf4bea5dea7c12ca Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Fri, 9 Jan 2026 15:05:29 +0100 Subject: [PATCH] Revert "[skip ci] Build helpers on push" This reverts commit e16e4b3e7ba2ee467002cbe07f50c21168a24b10. --- dist/full.tex | 734 ++++++++++++++++++++-------------------- dist/minimal.tex | 258 +++++++------- dist/most.tex | 680 ++++++++++++++++++------------------- dist/recommended.tex | 700 +++++++++++++++++++------------------- extra/bib.tex | 10 +- extra/glossary.tex | 10 +- extra/minted.tex | 34 +- main/core.tex | 112 +++--- main/index.tex | 6 +- main/style/common.tex | 22 +- main/style/counters.tex | 364 ++++++++++---------- main/style/cs.tex | 16 +- main/style/language.tex | 4 +- main/style/style.tex | 112 +++--- main/tables.tex | 32 +- 15 files changed, 1535 insertions(+), 1559 deletions(-) diff --git a/dist/full.tex b/dist/full.tex index eb1f985..7e950f2 100644 --- a/dist/full.tex +++ b/dist/full.tex @@ -7,7 +7,7 @@ % █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █ % █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█ -% + % ▄▄█▀▀▀█▄█ % ▄██▀ ▀█ % ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██ @@ -17,12 +17,9 @@ % ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀ % This file contains all necessary dependencies for the document to compile (at all) and some core macros -% Load this before the config file - -% ── Imports ───────────────────────────────────────────────────────── +% Imports % \typeout{[Core] Importing!} - \usepackage[table, dvipsnames]{xcolor} \usepackage{amsmath} \usepackage{graphicx} @@ -49,38 +46,37 @@ \usepackage{pifont} -% ── Language Switching. ───────────────────────────────────────────── -% Currently only English and German are supported +% Language Switching. Currently only English and German are supported % See docs for how to use \newcounter{lang} \newcommand{\setLang}[1]{ - \edef\lang{#1} - \edef\en{en} - \edef\de{de} - \ifx\lang\en - \typeout{[Lang Switcher] Loading English} - \setcounter{lang}{1} - \else - \ifx\lang\de - \typeout{[Lang Switcher] Loading German} - \setcounter{lang}{2} - \usepackage[ngerman]{babel} - \else - \typeout{[Lang Switcher] No such language!} - \fi - \fi + \edef\lang{#1} + \edef\en{en} + \edef\de{de} + \ifx\lang\en + \typeout{[Lang Switcher] Loading English} + \setcounter{lang}{1} + \else + \ifx\lang\de + \typeout{[Lang Switcher] Loading German} + \setcounter{lang}{2} + \usepackage[ngerman]{babel} + \else + \typeout{[Lang Switcher] No such language!} + \fi + \fi } % Deprecated, as not useful \newcommand{\loadLang}{ - \ifnum\value{lang}<2{ - \typeout{[Lang Loader] Loaded English} - }\else { - \typeout{[Lang Loader] Loaded German} - \setcounter{lang}{2} - } - \fi + \ifnum\value{lang}<2{ + \typeout{[Lang Loader] Loaded English} + }\else { + \typeout{[Lang Loader] Loaded German} + \setcounter{lang}{2} + } + \fi } @@ -91,59 +87,57 @@ \newcounter{descriptorShadeStrength} \newcounter{shadeStrength} -% ── Setup ─────────────────────────────────────────────────────────── % Set up the latex document, configure author, title (as first argument), as well as headers and footers \newcommand{\setup}[1]{ - \typeout{[Setup] Setting up...} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - \fancypagestyle{plain}{% - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - } - \typeout{[Setup] Complete} + \typeout{[Setup] Setting up...} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + \fancypagestyle{plain}{% + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + } + \typeout{[Setup] Complete} } % Start document command (required) \newcommand{\startDocument}{ - \maketitle - \startDocumentNoTitle + \maketitle + \startDocumentNoTitle } -% Or this one, if you don't want a title \newcommand{\startDocumentNoTitle}{ - \pagestyle{fancy} - \thispagestyle{fancy} + \pagestyle{fancy} + \thispagestyle{fancy} } % Set up the latex document, only configuring the author, title and page size \newcommand{\setupBarebones}[1]{ - \typeout{[Setup] Using barebones setup} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using barebones setup} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } % Set up the latex document for exam summaries (Extra wide body, small margins, no header) \newcommand{\setupCheatSheet}[1]{ - \typeout{[Setup] Using CheatSheet setup} - \loadLang - \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using CheatSheet setup} + \loadLang + \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } @@ -226,35 +220,35 @@ % 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 - } - } + \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 + } + } } % -------------------- % @@ -262,15 +256,15 @@ % -------------------- % \newcommand{\setFont}[1]{\fontfamily{#1}\selectfont} \newcommand{\setFontType}[1]{ - \ifthenelse{\equal{#1}{mono}}{ - \renewcommand{\familydefault}{\ttdefault} - }{ - \ifthenelse{\equal{#1}{serif}}{ - \renewcommand{\familydefault}{\rmdefault} - }{ - \renewcommand{\familydefault}{\sfdefault} - } - } + \ifthenelse{\equal{#1}{mono}}{ + \renewcommand{\familydefault}{\ttdefault} + }{ + \ifthenelse{\equal{#1}{serif}}{ + \renewcommand{\familydefault}{\rmdefault} + }{ + \renewcommand{\familydefault}{\sfdefault} + } + } } \newcommand{\hrmvspace}{\vspace{-0.25pc}} @@ -288,16 +282,16 @@ % Add a color shade (similar to \fhlc, but nicer boxes) \newcommand{\background}[3]{\tcbox[on line, - boxsep=2pt, - left=0pt, - right=0pt, - top=0pt, - bottom=0pt, - colframe=white, - frame empty, - colback=#1!#2!white, - highlight math style={enhanced} - ] {\textbf{#3}}} + boxsep=2pt, + left=0pt, + right=0pt, + top=0pt, + bottom=0pt, + colframe=white, + frame empty, + colback=#1!#2!white, + highlight math style={enhanced} + ] {\textbf{#3}}} % Abstraction of background, where the brightness is set to 20% \newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}} @@ -332,14 +326,14 @@ % 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} + \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} } %▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ @@ -349,40 +343,40 @@ %▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ \newtcolorbox{recall}[2][]{mainboxstyle,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=yellow!75!black,,fill=yellow!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Remarks }{Bemerkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=red!75!black,,fill=red!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Properties }{Eigenschaften }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Restrictions }{Einschränkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} + overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} \newtcolorbox{intuition}[2][]{mainboxstyle,colback=Emerald!5!white,colframe=Emerald!75!black,colbacktitle=Emerald!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} + overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} \newcommand{\inlineintuition}{\bg{Emerald}{Intuition:}} % Terms and notation \newtcolorbox{terms}[2][]{mainboxstyle,colback=orange!5!white,colframe=orange!75!black,colbacktitle=orange!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=orange!75!black,,fill=orange!75!black] at (frame.north east) {\large \translate{Terms }{Begriffe }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=Peach!75!black,,fill=Peach!75!black] at (frame.north east) {\large Notation};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} + overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} % Task @@ -395,7 +389,7 @@ % General \newtcolorbox{general}[4][]{mainboxstyle,colback=#4!5!white,colframe=#4!75!black,colbacktitle=#4!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} % Simple \newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1} @@ -547,9 +541,9 @@ % For using index package \newcommand{\prepareIndex}{ - \usepackage[T1]{fontenc} - \usepackage{imakeidx} - \makeindex + \usepackage[T1]{fontenc} + \usepackage{imakeidx} + \makeindex } \newcommand{\addIndexBold}[1]{\textbf{\index{\MakeLowercase{#1}} #1}} @@ -605,22 +599,22 @@ % Set the current number of a label \newcommand{\setLabelNumber}[2]{% - \setcounter{#1}{#2}% - \addtocounter{#1}{-1}% - \setcounter{#1ss}{#2}% - \addtocounter{#1ss}{-1}% - \setcounter{#1sss}{#2}% - \addtocounter{#1sss}{-1}% + \setcounter{#1}{#2}% + \addtocounter{#1}{-1}% + \setcounter{#1ss}{#2}% + \addtocounter{#1ss}{-1}% + \setcounter{#1sss}{#2}% + \addtocounter{#1sss}{-1}% } \newcommand{\stepLabelNumber}[1]{% - \stepcounter{#1}% - \stepcounter{#1ss}% - \stepcounter{#1sss}% + \stepcounter{#1}% + \stepcounter{#1ss}% + \stepcounter{#1sss}% } \newcommand{\printcounter}[1]{% - \csname the#1\endcsname + \csname the#1\endcsname } \newcommand{\suffix}{ss} @@ -630,119 +624,119 @@ % │ Counter numbering │ % └ ┘ \newcommand{\preTableAndFigHook}[1]{% - \ifnum\value{numberingConfig}>1 - \ifnum\value{numberSubsections}=1 - \stepcounter{allss} - \else - \ifnum\value{numberSubsections}=2 - \stepcounter{allsss} - \else - \stepcounter{all} - \fi - \fi - \fi + \ifnum\value{numberingConfig}>1 + \ifnum\value{numberSubsections}=1 + \stepcounter{allss} + \else + \ifnum\value{numberSubsections}=2 + \stepcounter{allsss} + \else + \stepcounter{all} + \fi + \fi + \fi } \AtBeginEnvironment{table}{\preTableAndFigHook{table}} \AtBeginEnvironment{figure}{\preTableAndFigHook{figure}} \newcommand{\applyTableAndFigureNumbering}{ - % Tables & Figures - \ifnum\value{numberingConfig}=0 - \renewcommand{\thetable}{} - \renewcommand{\thefigure}{} - \else - \ifnum\value{numberingConfig}=1 - \renewcommand{\thetable}{\sectionNumbering.\arabic{table}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}} - \else - \ifnum\value{numberSubsections}=1 - \renewcommand{\thetable}{\sectionNumbering.\arabic{allss}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}} - \else - \ifnum\value{numberSubsections}=2 - \renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}} - \else - \renewcommand{\thetable}{\sectionNumbering.\arabic{all}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{all}} - \fi - \fi - \fi - \fi + % Tables & Figures + \ifnum\value{numberingConfig}=0 + \renewcommand{\thetable}{} + \renewcommand{\thefigure}{} + \else + \ifnum\value{numberingConfig}=1 + \renewcommand{\thetable}{\sectionNumbering.\arabic{table}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}} + \else + \ifnum\value{numberSubsections}=1 + \renewcommand{\thetable}{\sectionNumbering.\arabic{allss}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}} + \else + \ifnum\value{numberSubsections}=2 + \renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}} + \else + \renewcommand{\thetable}{\sectionNumbering.\arabic{all}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{all}} + \fi + \fi + \fi + \fi } \newcommand{\setSubsectionNumbering}[1]{ - \setcounter{numberSubsections}{#1} - \applySubsectionNumbering + \setcounter{numberSubsections}{#1} + \applySubsectionNumbering } \newcommand{\applySubsectionNumbering}{ - \ifnum\value{numberSubsections}=1 - \renewcommand{\sectionNumbering}{\thesubsection} - \renewcommand{\suffix}{ss} - \typeout{Numbering as section.subsection.number} - \else - \ifnum\value{numberSubsections}=2 - \renewcommand{\sectionNumbering}{\thesubsubsection} - \renewcommand{\suffix}{sss} - \typeout{Numbering as section.subsection.subsubsection.number} - \else - \renewcommand{\sectionNumbering}{\thesection} - \renewcommand{\suffix}{} - \typeout{Numbering as section.number} - \fi - \fi - \applyTableAndFigureNumbering + \ifnum\value{numberSubsections}=1 + \renewcommand{\sectionNumbering}{\thesubsection} + \renewcommand{\suffix}{ss} + \typeout{Numbering as section.subsection.number} + \else + \ifnum\value{numberSubsections}=2 + \renewcommand{\sectionNumbering}{\thesubsubsection} + \renewcommand{\suffix}{sss} + \typeout{Numbering as section.subsection.subsubsection.number} + \else + \renewcommand{\sectionNumbering}{\thesection} + \renewcommand{\suffix}{} + \typeout{Numbering as section.number} + \fi + \fi + \applyTableAndFigureNumbering - \renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}} - \renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}} - \renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}} - \renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}} - \renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}} - \renewcommand{\theexample}{\sectionNumbering.\arabic{example}} - \renewcommand{\thefact}{\sectionNumbering.\arabic{fact}} - \renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}} - \renewcommand{\theformula}{\sectionNumbering.\arabic{formula}} - \renewcommand{\theremark}{\sectionNumbering.\arabic{remark}} - \renewcommand{\theall}{\sectionNumbering.\arabic{all}} + \renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}} + \renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}} + \renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}} + \renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}} + \renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}} + \renewcommand{\theexample}{\sectionNumbering.\arabic{example}} + \renewcommand{\thefact}{\sectionNumbering.\arabic{fact}} + \renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}} + \renewcommand{\theformula}{\sectionNumbering.\arabic{formula}} + \renewcommand{\theremark}{\sectionNumbering.\arabic{remark}} + \renewcommand{\theall}{\sectionNumbering.\arabic{all}} - \renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}} - \renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}} - \renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}} - \renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}} - \renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}} - \renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}} - \renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}} - \renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}} - \renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}} - \renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}} - \renewcommand{\theallss}{\sectionNumbering.\arabic{allss}} + \renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}} + \renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}} + \renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}} + \renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}} + \renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}} + \renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}} + \renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}} + \renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}} + \renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}} + \renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}} + \renewcommand{\theallss}{\sectionNumbering.\arabic{allss}} - \renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}} - \renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}} - \renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}} - \renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}} - \renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}} - \renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}} - \renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}} - \renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}} - \renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}} - \renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}} - \renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}} + \renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}} + \renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}} + \renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}} + \renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}} + \renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}} + \renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}} + \renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}} + \renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}} + \renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}} + \renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}} + \renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}} } \applySubsectionNumbering % ── Label generation ──────────────────────────────────────────────── \newcommand{\labelSectionGeneration}{% - \ifnum\value{numberSubsections}=1 - \arabic{section}-\arabic{subsection}% - \else - \ifnum\value{numberSubsections}=2 - \arabic{section}-\arabic{subsection}-\arabic{subsubsection}% - \else - \arabic{section}% - \fi - \fi} + \ifnum\value{numberSubsections}=1 + \arabic{section}-\arabic{subsection}% + \else + \ifnum\value{numberSubsections}=2 + \arabic{section}-\arabic{subsection}-\arabic{subsubsection}% + \else + \arabic{section}% + \fi + \fi} \newcommand{\labelIt}[1]{\refstepcounter{#1\suffix}\edef\tempLabel{\genLabel{#1}{\arabic{#1\suffix}}}\label{\tempLabel}} \newcommand{\genLabel}[2]{#1:\labelSectionGeneration-#2} @@ -751,27 +745,27 @@ % │ Number the counters appropriately │ % └ ┘ \newcommand{\usenumberArabic}[1]{% - \ifnum\value{numberingConfig}=1 - \labelIt{#1} - \printcounter{#1\suffix}% - \else - \ifnum\value{numberingConfig}=2 - \ifthenelse{\equal{#1}{definitions}}{% - \labelIt{definition} - \printcounter{definition\suffix}% - }{% - \labelIt{all} - \printcounter{all\suffix}% - }% - \else - \ifnum\value{numberingConfig}=3 - \labelIt{all} - \printcounter{all\suffix}% - \else - \relax% - \fi - \fi - \fi} + \ifnum\value{numberingConfig}=1 + \labelIt{#1} + \printcounter{#1\suffix}% + \else + \ifnum\value{numberingConfig}=2 + \ifthenelse{\equal{#1}{definitions}}{% + \labelIt{definition} + \printcounter{definition\suffix}% + }{% + \labelIt{all} + \printcounter{all\suffix}% + }% + \else + \ifnum\value{numberingConfig}=3 + \labelIt{all} + \printcounter{all\suffix}% + \else + \relax% + \fi + \fi + \fi} % ──────────────────────────────────────────────────────────────────── @@ -784,22 +778,22 @@ % For later change \newcommand{\setNumberingStyle}[1]{ - \typeout{Setting NumberingStyle to #1} - \setcounter{numberingConfig}{#1} - \ifthenelse{\equal{#1}{0}}{}{ - \setcounter{numberingConfigStore}{#1} - } - \applyTableAndFigureNumbering + \typeout{Setting NumberingStyle to #1} + \setcounter{numberingConfig}{#1} + \ifthenelse{\equal{#1}{0}}{}{ + \setcounter{numberingConfigStore}{#1} + } + \applyTableAndFigureNumbering } % Enable / disable numbering \newcommand{\numberingOff}{ - \setcounter{numberingConfig}{0} - \applyTableAndFigureNumbering + \setcounter{numberingConfig}{0} + \applyTableAndFigureNumbering } \newcommand{\numberingOn}{ - \setcounter{numberingConfig}{\value{numberingConfigStore}} - \applyTableAndFigureNumbering + \setcounter{numberingConfig}{\value{numberingConfigStore}} + \applyTableAndFigureNumbering } % ──────────────────────────────────────────────────────────────────── @@ -808,51 +802,51 @@ % │ new page │ % ╰────────────────────────────────────────────────╯ \newcommand{\newsection}{ - \newpage - \newsectionNoPB + \newpage + \newsectionNoPB } % ── Reset definitions, lemma, etc counters, do not add new page ───── \newcommand{\newsectionNoPB}{ - \setcounter{lemma}{0} - \setcounter{definition}{0} - \setcounter{corollary}{0} - \setcounter{theorem}{0} - \setcounter{axiom}{0} - \setcounter{example}{0} - \setcounter{fact}{0} - \setcounter{proposition}{0} - \setcounter{formula}{0} - \setcounter{remark}{0} - \setcounter{all}{0} + \setcounter{lemma}{0} + \setcounter{definition}{0} + \setcounter{corollary}{0} + \setcounter{theorem}{0} + \setcounter{axiom}{0} + \setcounter{example}{0} + \setcounter{fact}{0} + \setcounter{proposition}{0} + \setcounter{formula}{0} + \setcounter{remark}{0} + \setcounter{all}{0} - \setcounter{lemmass}{0} - \setcounter{definitionss}{0} - \setcounter{corollaryss}{0} - \setcounter{theoremss}{0} - \setcounter{axiomss}{0} - \setcounter{exampless}{0} - \setcounter{factss}{0} - \setcounter{propositionss}{0} - \setcounter{formulass}{0} - \setcounter{remarkss}{0} - \setcounter{allss}{0} + \setcounter{lemmass}{0} + \setcounter{definitionss}{0} + \setcounter{corollaryss}{0} + \setcounter{theoremss}{0} + \setcounter{axiomss}{0} + \setcounter{exampless}{0} + \setcounter{factss}{0} + \setcounter{propositionss}{0} + \setcounter{formulass}{0} + \setcounter{remarkss}{0} + \setcounter{allss}{0} - \setcounter{lemmasss}{0} - \setcounter{definitionsss}{0} - \setcounter{corollarysss}{0} - \setcounter{theoremsss}{0} - \setcounter{axiomsss}{0} - \setcounter{examplesss}{0} - \setcounter{factsss}{0} - \setcounter{propositionsss}{0} - \setcounter{formulasss}{0} - \setcounter{remarksss}{0} - \setcounter{allsss}{0} + \setcounter{lemmasss}{0} + \setcounter{definitionsss}{0} + \setcounter{corollarysss}{0} + \setcounter{theoremsss}{0} + \setcounter{axiomsss}{0} + \setcounter{examplesss}{0} + \setcounter{factsss}{0} + \setcounter{propositionsss}{0} + \setcounter{formulasss}{0} + \setcounter{remarksss}{0} + \setcounter{allsss}{0} - % Tables & Figures - \setcounter{table}{0} - \setcounter{figure}{0} + % Tables & Figures + \setcounter{table}{0} + \setcounter{figure}{0} } \newsectionNoPB % Initializes @@ -868,39 +862,39 @@ % Theorems \newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1} + overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1} % Lemmas \newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1} + overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1} % Corollaries \newtcolorbox{corollary}[2][]{mainboxstyle,colback=teal!5!white,colframe=teal!75!black,colbacktitle=teal!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1} + overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1} % Axioms \newtcolorbox{axiom}[2][]{mainboxstyle,colback=JungleGreen!5!white,colframe=JungleGreen!75!black,colbacktitle=JungleGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1} + overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1} % Facts \newtcolorbox{fact}[2][]{mainboxstyle,colback=SeaGreen!5!white,colframe=SeaGreen!75!black,colbacktitle=SeaGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1} + overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1} % Propositions \newtcolorbox{proposition}[2][]{mainboxstyle,colback=Cyan!5!white,colframe=Cyan!75!black,colbacktitle=Cyan!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1} + overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1} % Examples \newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1} + overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1} % Formula \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 \translate{Formula}{Formel}\usenumberArabic{formula}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel}\usenumberArabic{formula}};},#1} % Remark \newtcolorbox{remark}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1} + overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1} % ──────────────────────────────────────────────────────────────────── @@ -978,14 +972,14 @@ \algrenewcommand{\alglinenumber}[1]{#1} \newenvironment{algo}[1]{ - \begin{algorithm} - \begin{spacing}{1.2} - \caption{\textsc{#1}} - \begin{algorithmic}[1] - }{ - \end{algorithmic} - \end{spacing} - \end{algorithm} + \begin{algorithm} + \begin{spacing}{1.2} + \caption{\textsc{#1}} + \begin{algorithmic}[1] + }{ + \end{algorithmic} + \end{spacing} + \end{algorithm} } % • ▌ ▄ ·. ▄▄▄· ▄▄▄▄▄ ▄ .▄ .▄▄ · ▄▄▄▄▄ ▄· ▄▌▄▄▌ ▄▄▄ . @@ -1006,10 +1000,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[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large \translate{Conjugation}{Konjugation}};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} % _____ _ _ % (_ _) ( ) (_ ) @@ -1023,26 +1017,26 @@ % Create new table. #1 Layout, #2 title row \newenvironment{tables}[2]{ - \begin{center} - \begin{tabular}{#1} - \toprule - #2 \\ - \midrule - }{ - \bottomrule - \end{tabular} - \end{center} + \begin{center} + \begin{tabular}{#1} + \toprule + #2 \\ + \midrule + }{ + \bottomrule + \end{tabular} + \end{center} } % Create new table in table env. #1 layout, #2 title row, #3 caption \newenvironment{fullTable}[3]{ - \edef\tableCaption{#3} - \begin{table}[h!] - \begin{tables}{#1}{#2} - }{ - \end{tables} - \caption{\tableCaption} - \end{table} + \edef\tableCaption{#3} + \begin{table}[h!] + \begin{tables}{#1}{#2} + }{ + \end{tables} + \caption{\tableCaption} + \end{table} } % ___ _ _____ _ _ @@ -1055,14 +1049,14 @@ % Configs if you want to use BibTeX. Not included in any default configs. \newcommand{\setupBibtex}[1]{ - \usepackage{biblatex} - \usepackage[nottoc, numbib]{tocbibind} - \addbibresource{#1} + \usepackage{biblatex} + \usepackage[nottoc, numbib]{tocbibind} + \addbibresource{#1} } \newcommand{\printbib}{ - \addcontentsline{toc}{section}{\translate{Sources}{Quellen}} - \printbibliography[title=\translate{Sources}{Quellen}] + \addcontentsline{toc}{section}{\translate{Sources}{Quellen}} + \printbibliography[title=\translate{Sources}{Quellen}] } @@ -1073,14 +1067,14 @@ % Add glossaries functionality \newcommand{\setupGlossary}{ - \usepackage[nonumberlist, toc]{glossaries} - \usepackage[nottoc, numbib]{tocbibind} - \makenoidxglossaries + \usepackage[nonumberlist, toc]{glossaries} + \usepackage[nottoc, numbib]{tocbibind} + \makenoidxglossaries } \newcommand{\printGlossary}{ - \glsaddall - \printnoidxglossaries + \glsaddall + \printnoidxglossaries } % ┌ ┐ @@ -1095,8 +1089,8 @@ % Args: Language, Code \newenvironment{code}[1]{ - \VerbatimEnvironment - \begin{minted}[ + \VerbatimEnvironment + \begin{minted}[ autogobble, breaklines, breakindentnchars=2, @@ -1110,23 +1104,23 @@ % Args: Language, file relative to root file \newcommand{\inputcode}[2]{ - \inputminted[ - autogobble, - breaklines, - breakindentnchars=2, - frame=lines, - framesep=2mm, - mathescape, - baselinestretch=1.1, - linenos - ]{#1}{#2} + \inputminted[ + autogobble, + breaklines, + breakindentnchars=2, + frame=lines, + framesep=2mm, + mathescape, + baselinestretch=1.1, + linenos + ]{#1}{#2} } % Args: Language, Base directory (with trailing slash), file (no slash at start) \newcommand{\inputcodewithfilename}[3]{ - \begin{figure}[h!] - \texttt{File: \detokenize{#3}} - \rmvspace - \inputcode{#1}{#2#3} - \end{figure} + \begin{figure}[h!] + \texttt{File: \detokenize{#3}} + \rmvspace + \inputcode{#1}{#2#3} + \end{figure} } diff --git a/dist/minimal.tex b/dist/minimal.tex index d7da485..a68c740 100644 --- a/dist/minimal.tex +++ b/dist/minimal.tex @@ -7,7 +7,7 @@ % █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █ % █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█ -% + % ▄▄█▀▀▀█▄█ % ▄██▀ ▀█ % ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██ @@ -17,12 +17,9 @@ % ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀ % This file contains all necessary dependencies for the document to compile (at all) and some core macros -% Load this before the config file - -% ── Imports ───────────────────────────────────────────────────────── +% Imports % \typeout{[Core] Importing!} - \usepackage[table, dvipsnames]{xcolor} \usepackage{amsmath} \usepackage{graphicx} @@ -49,38 +46,37 @@ \usepackage{pifont} -% ── Language Switching. ───────────────────────────────────────────── -% Currently only English and German are supported +% Language Switching. Currently only English and German are supported % See docs for how to use \newcounter{lang} \newcommand{\setLang}[1]{ - \edef\lang{#1} - \edef\en{en} - \edef\de{de} - \ifx\lang\en - \typeout{[Lang Switcher] Loading English} - \setcounter{lang}{1} - \else - \ifx\lang\de - \typeout{[Lang Switcher] Loading German} - \setcounter{lang}{2} - \usepackage[ngerman]{babel} - \else - \typeout{[Lang Switcher] No such language!} - \fi - \fi + \edef\lang{#1} + \edef\en{en} + \edef\de{de} + \ifx\lang\en + \typeout{[Lang Switcher] Loading English} + \setcounter{lang}{1} + \else + \ifx\lang\de + \typeout{[Lang Switcher] Loading German} + \setcounter{lang}{2} + \usepackage[ngerman]{babel} + \else + \typeout{[Lang Switcher] No such language!} + \fi + \fi } % Deprecated, as not useful \newcommand{\loadLang}{ - \ifnum\value{lang}<2{ - \typeout{[Lang Loader] Loaded English} - }\else { - \typeout{[Lang Loader] Loaded German} - \setcounter{lang}{2} - } - \fi + \ifnum\value{lang}<2{ + \typeout{[Lang Loader] Loaded English} + }\else { + \typeout{[Lang Loader] Loaded German} + \setcounter{lang}{2} + } + \fi } @@ -91,59 +87,57 @@ \newcounter{descriptorShadeStrength} \newcounter{shadeStrength} -% ── Setup ─────────────────────────────────────────────────────────── % Set up the latex document, configure author, title (as first argument), as well as headers and footers \newcommand{\setup}[1]{ - \typeout{[Setup] Setting up...} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - \fancypagestyle{plain}{% - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - } - \typeout{[Setup] Complete} + \typeout{[Setup] Setting up...} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + \fancypagestyle{plain}{% + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + } + \typeout{[Setup] Complete} } % Start document command (required) \newcommand{\startDocument}{ - \maketitle - \startDocumentNoTitle + \maketitle + \startDocumentNoTitle } -% Or this one, if you don't want a title \newcommand{\startDocumentNoTitle}{ - \pagestyle{fancy} - \thispagestyle{fancy} + \pagestyle{fancy} + \thispagestyle{fancy} } % Set up the latex document, only configuring the author, title and page size \newcommand{\setupBarebones}[1]{ - \typeout{[Setup] Using barebones setup} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using barebones setup} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } % Set up the latex document for exam summaries (Extra wide body, small margins, no header) \newcommand{\setupCheatSheet}[1]{ - \typeout{[Setup] Using CheatSheet setup} - \loadLang - \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using CheatSheet setup} + \loadLang + \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } @@ -226,35 +220,35 @@ % 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 - } - } + \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 + } + } } % -------------------- % @@ -262,15 +256,15 @@ % -------------------- % \newcommand{\setFont}[1]{\fontfamily{#1}\selectfont} \newcommand{\setFontType}[1]{ - \ifthenelse{\equal{#1}{mono}}{ - \renewcommand{\familydefault}{\ttdefault} - }{ - \ifthenelse{\equal{#1}{serif}}{ - \renewcommand{\familydefault}{\rmdefault} - }{ - \renewcommand{\familydefault}{\sfdefault} - } - } + \ifthenelse{\equal{#1}{mono}}{ + \renewcommand{\familydefault}{\ttdefault} + }{ + \ifthenelse{\equal{#1}{serif}}{ + \renewcommand{\familydefault}{\rmdefault} + }{ + \renewcommand{\familydefault}{\sfdefault} + } + } } \newcommand{\hrmvspace}{\vspace{-0.25pc}} @@ -288,16 +282,16 @@ % Add a color shade (similar to \fhlc, but nicer boxes) \newcommand{\background}[3]{\tcbox[on line, - boxsep=2pt, - left=0pt, - right=0pt, - top=0pt, - bottom=0pt, - colframe=white, - frame empty, - colback=#1!#2!white, - highlight math style={enhanced} - ] {\textbf{#3}}} + boxsep=2pt, + left=0pt, + right=0pt, + top=0pt, + bottom=0pt, + colframe=white, + frame empty, + colback=#1!#2!white, + highlight math style={enhanced} + ] {\textbf{#3}}} % Abstraction of background, where the brightness is set to 20% \newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}} @@ -332,14 +326,14 @@ % 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} + \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} } %▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ @@ -349,40 +343,40 @@ %▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ \newtcolorbox{recall}[2][]{mainboxstyle,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=yellow!75!black,,fill=yellow!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Remarks }{Bemerkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=red!75!black,,fill=red!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Properties }{Eigenschaften }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Restrictions }{Einschränkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} + overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} \newtcolorbox{intuition}[2][]{mainboxstyle,colback=Emerald!5!white,colframe=Emerald!75!black,colbacktitle=Emerald!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} + overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} \newcommand{\inlineintuition}{\bg{Emerald}{Intuition:}} % Terms and notation \newtcolorbox{terms}[2][]{mainboxstyle,colback=orange!5!white,colframe=orange!75!black,colbacktitle=orange!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=orange!75!black,,fill=orange!75!black] at (frame.north east) {\large \translate{Terms }{Begriffe }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=Peach!75!black,,fill=Peach!75!black] at (frame.north east) {\large Notation};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} + overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} % Task @@ -395,7 +389,7 @@ % General \newtcolorbox{general}[4][]{mainboxstyle,colback=#4!5!white,colframe=#4!75!black,colbacktitle=#4!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} % Simple \newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1} diff --git a/dist/most.tex b/dist/most.tex index fcd1c28..e9ffe41 100644 --- a/dist/most.tex +++ b/dist/most.tex @@ -7,7 +7,7 @@ % █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █ % █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█ -% + % ▄▄█▀▀▀█▄█ % ▄██▀ ▀█ % ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██ @@ -17,12 +17,9 @@ % ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀ % This file contains all necessary dependencies for the document to compile (at all) and some core macros -% Load this before the config file - -% ── Imports ───────────────────────────────────────────────────────── +% Imports % \typeout{[Core] Importing!} - \usepackage[table, dvipsnames]{xcolor} \usepackage{amsmath} \usepackage{graphicx} @@ -49,38 +46,37 @@ \usepackage{pifont} -% ── Language Switching. ───────────────────────────────────────────── -% Currently only English and German are supported +% Language Switching. Currently only English and German are supported % See docs for how to use \newcounter{lang} \newcommand{\setLang}[1]{ - \edef\lang{#1} - \edef\en{en} - \edef\de{de} - \ifx\lang\en - \typeout{[Lang Switcher] Loading English} - \setcounter{lang}{1} - \else - \ifx\lang\de - \typeout{[Lang Switcher] Loading German} - \setcounter{lang}{2} - \usepackage[ngerman]{babel} - \else - \typeout{[Lang Switcher] No such language!} - \fi - \fi + \edef\lang{#1} + \edef\en{en} + \edef\de{de} + \ifx\lang\en + \typeout{[Lang Switcher] Loading English} + \setcounter{lang}{1} + \else + \ifx\lang\de + \typeout{[Lang Switcher] Loading German} + \setcounter{lang}{2} + \usepackage[ngerman]{babel} + \else + \typeout{[Lang Switcher] No such language!} + \fi + \fi } % Deprecated, as not useful \newcommand{\loadLang}{ - \ifnum\value{lang}<2{ - \typeout{[Lang Loader] Loaded English} - }\else { - \typeout{[Lang Loader] Loaded German} - \setcounter{lang}{2} - } - \fi + \ifnum\value{lang}<2{ + \typeout{[Lang Loader] Loaded English} + }\else { + \typeout{[Lang Loader] Loaded German} + \setcounter{lang}{2} + } + \fi } @@ -91,59 +87,57 @@ \newcounter{descriptorShadeStrength} \newcounter{shadeStrength} -% ── Setup ─────────────────────────────────────────────────────────── % Set up the latex document, configure author, title (as first argument), as well as headers and footers \newcommand{\setup}[1]{ - \typeout{[Setup] Setting up...} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - \fancypagestyle{plain}{% - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - } - \typeout{[Setup] Complete} + \typeout{[Setup] Setting up...} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + \fancypagestyle{plain}{% + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + } + \typeout{[Setup] Complete} } % Start document command (required) \newcommand{\startDocument}{ - \maketitle - \startDocumentNoTitle + \maketitle + \startDocumentNoTitle } -% Or this one, if you don't want a title \newcommand{\startDocumentNoTitle}{ - \pagestyle{fancy} - \thispagestyle{fancy} + \pagestyle{fancy} + \thispagestyle{fancy} } % Set up the latex document, only configuring the author, title and page size \newcommand{\setupBarebones}[1]{ - \typeout{[Setup] Using barebones setup} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using barebones setup} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } % Set up the latex document for exam summaries (Extra wide body, small margins, no header) \newcommand{\setupCheatSheet}[1]{ - \typeout{[Setup] Using CheatSheet setup} - \loadLang - \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using CheatSheet setup} + \loadLang + \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } @@ -226,35 +220,35 @@ % 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 - } - } + \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 + } + } } % -------------------- % @@ -262,15 +256,15 @@ % -------------------- % \newcommand{\setFont}[1]{\fontfamily{#1}\selectfont} \newcommand{\setFontType}[1]{ - \ifthenelse{\equal{#1}{mono}}{ - \renewcommand{\familydefault}{\ttdefault} - }{ - \ifthenelse{\equal{#1}{serif}}{ - \renewcommand{\familydefault}{\rmdefault} - }{ - \renewcommand{\familydefault}{\sfdefault} - } - } + \ifthenelse{\equal{#1}{mono}}{ + \renewcommand{\familydefault}{\ttdefault} + }{ + \ifthenelse{\equal{#1}{serif}}{ + \renewcommand{\familydefault}{\rmdefault} + }{ + \renewcommand{\familydefault}{\sfdefault} + } + } } \newcommand{\hrmvspace}{\vspace{-0.25pc}} @@ -288,16 +282,16 @@ % Add a color shade (similar to \fhlc, but nicer boxes) \newcommand{\background}[3]{\tcbox[on line, - boxsep=2pt, - left=0pt, - right=0pt, - top=0pt, - bottom=0pt, - colframe=white, - frame empty, - colback=#1!#2!white, - highlight math style={enhanced} - ] {\textbf{#3}}} + boxsep=2pt, + left=0pt, + right=0pt, + top=0pt, + bottom=0pt, + colframe=white, + frame empty, + colback=#1!#2!white, + highlight math style={enhanced} + ] {\textbf{#3}}} % Abstraction of background, where the brightness is set to 20% \newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}} @@ -332,14 +326,14 @@ % 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} + \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} } %▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ @@ -349,40 +343,40 @@ %▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ \newtcolorbox{recall}[2][]{mainboxstyle,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=yellow!75!black,,fill=yellow!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Remarks }{Bemerkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=red!75!black,,fill=red!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Properties }{Eigenschaften }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Restrictions }{Einschränkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} + overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} \newtcolorbox{intuition}[2][]{mainboxstyle,colback=Emerald!5!white,colframe=Emerald!75!black,colbacktitle=Emerald!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} + overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} \newcommand{\inlineintuition}{\bg{Emerald}{Intuition:}} % Terms and notation \newtcolorbox{terms}[2][]{mainboxstyle,colback=orange!5!white,colframe=orange!75!black,colbacktitle=orange!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=orange!75!black,,fill=orange!75!black] at (frame.north east) {\large \translate{Terms }{Begriffe }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=Peach!75!black,,fill=Peach!75!black] at (frame.north east) {\large Notation};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} + overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} % Task @@ -395,7 +389,7 @@ % General \newtcolorbox{general}[4][]{mainboxstyle,colback=#4!5!white,colframe=#4!75!black,colbacktitle=#4!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} % Simple \newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1} @@ -547,9 +541,9 @@ % For using index package \newcommand{\prepareIndex}{ - \usepackage[T1]{fontenc} - \usepackage{imakeidx} - \makeindex + \usepackage[T1]{fontenc} + \usepackage{imakeidx} + \makeindex } \newcommand{\addIndexBold}[1]{\textbf{\index{\MakeLowercase{#1}} #1}} @@ -605,22 +599,22 @@ % Set the current number of a label \newcommand{\setLabelNumber}[2]{% - \setcounter{#1}{#2}% - \addtocounter{#1}{-1}% - \setcounter{#1ss}{#2}% - \addtocounter{#1ss}{-1}% - \setcounter{#1sss}{#2}% - \addtocounter{#1sss}{-1}% + \setcounter{#1}{#2}% + \addtocounter{#1}{-1}% + \setcounter{#1ss}{#2}% + \addtocounter{#1ss}{-1}% + \setcounter{#1sss}{#2}% + \addtocounter{#1sss}{-1}% } \newcommand{\stepLabelNumber}[1]{% - \stepcounter{#1}% - \stepcounter{#1ss}% - \stepcounter{#1sss}% + \stepcounter{#1}% + \stepcounter{#1ss}% + \stepcounter{#1sss}% } \newcommand{\printcounter}[1]{% - \csname the#1\endcsname + \csname the#1\endcsname } \newcommand{\suffix}{ss} @@ -630,119 +624,119 @@ % │ Counter numbering │ % └ ┘ \newcommand{\preTableAndFigHook}[1]{% - \ifnum\value{numberingConfig}>1 - \ifnum\value{numberSubsections}=1 - \stepcounter{allss} - \else - \ifnum\value{numberSubsections}=2 - \stepcounter{allsss} - \else - \stepcounter{all} - \fi - \fi - \fi + \ifnum\value{numberingConfig}>1 + \ifnum\value{numberSubsections}=1 + \stepcounter{allss} + \else + \ifnum\value{numberSubsections}=2 + \stepcounter{allsss} + \else + \stepcounter{all} + \fi + \fi + \fi } \AtBeginEnvironment{table}{\preTableAndFigHook{table}} \AtBeginEnvironment{figure}{\preTableAndFigHook{figure}} \newcommand{\applyTableAndFigureNumbering}{ - % Tables & Figures - \ifnum\value{numberingConfig}=0 - \renewcommand{\thetable}{} - \renewcommand{\thefigure}{} - \else - \ifnum\value{numberingConfig}=1 - \renewcommand{\thetable}{\sectionNumbering.\arabic{table}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}} - \else - \ifnum\value{numberSubsections}=1 - \renewcommand{\thetable}{\sectionNumbering.\arabic{allss}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}} - \else - \ifnum\value{numberSubsections}=2 - \renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}} - \else - \renewcommand{\thetable}{\sectionNumbering.\arabic{all}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{all}} - \fi - \fi - \fi - \fi + % Tables & Figures + \ifnum\value{numberingConfig}=0 + \renewcommand{\thetable}{} + \renewcommand{\thefigure}{} + \else + \ifnum\value{numberingConfig}=1 + \renewcommand{\thetable}{\sectionNumbering.\arabic{table}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}} + \else + \ifnum\value{numberSubsections}=1 + \renewcommand{\thetable}{\sectionNumbering.\arabic{allss}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}} + \else + \ifnum\value{numberSubsections}=2 + \renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}} + \else + \renewcommand{\thetable}{\sectionNumbering.\arabic{all}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{all}} + \fi + \fi + \fi + \fi } \newcommand{\setSubsectionNumbering}[1]{ - \setcounter{numberSubsections}{#1} - \applySubsectionNumbering + \setcounter{numberSubsections}{#1} + \applySubsectionNumbering } \newcommand{\applySubsectionNumbering}{ - \ifnum\value{numberSubsections}=1 - \renewcommand{\sectionNumbering}{\thesubsection} - \renewcommand{\suffix}{ss} - \typeout{Numbering as section.subsection.number} - \else - \ifnum\value{numberSubsections}=2 - \renewcommand{\sectionNumbering}{\thesubsubsection} - \renewcommand{\suffix}{sss} - \typeout{Numbering as section.subsection.subsubsection.number} - \else - \renewcommand{\sectionNumbering}{\thesection} - \renewcommand{\suffix}{} - \typeout{Numbering as section.number} - \fi - \fi - \applyTableAndFigureNumbering + \ifnum\value{numberSubsections}=1 + \renewcommand{\sectionNumbering}{\thesubsection} + \renewcommand{\suffix}{ss} + \typeout{Numbering as section.subsection.number} + \else + \ifnum\value{numberSubsections}=2 + \renewcommand{\sectionNumbering}{\thesubsubsection} + \renewcommand{\suffix}{sss} + \typeout{Numbering as section.subsection.subsubsection.number} + \else + \renewcommand{\sectionNumbering}{\thesection} + \renewcommand{\suffix}{} + \typeout{Numbering as section.number} + \fi + \fi + \applyTableAndFigureNumbering - \renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}} - \renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}} - \renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}} - \renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}} - \renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}} - \renewcommand{\theexample}{\sectionNumbering.\arabic{example}} - \renewcommand{\thefact}{\sectionNumbering.\arabic{fact}} - \renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}} - \renewcommand{\theformula}{\sectionNumbering.\arabic{formula}} - \renewcommand{\theremark}{\sectionNumbering.\arabic{remark}} - \renewcommand{\theall}{\sectionNumbering.\arabic{all}} + \renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}} + \renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}} + \renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}} + \renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}} + \renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}} + \renewcommand{\theexample}{\sectionNumbering.\arabic{example}} + \renewcommand{\thefact}{\sectionNumbering.\arabic{fact}} + \renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}} + \renewcommand{\theformula}{\sectionNumbering.\arabic{formula}} + \renewcommand{\theremark}{\sectionNumbering.\arabic{remark}} + \renewcommand{\theall}{\sectionNumbering.\arabic{all}} - \renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}} - \renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}} - \renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}} - \renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}} - \renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}} - \renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}} - \renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}} - \renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}} - \renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}} - \renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}} - \renewcommand{\theallss}{\sectionNumbering.\arabic{allss}} + \renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}} + \renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}} + \renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}} + \renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}} + \renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}} + \renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}} + \renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}} + \renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}} + \renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}} + \renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}} + \renewcommand{\theallss}{\sectionNumbering.\arabic{allss}} - \renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}} - \renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}} - \renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}} - \renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}} - \renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}} - \renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}} - \renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}} - \renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}} - \renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}} - \renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}} - \renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}} + \renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}} + \renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}} + \renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}} + \renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}} + \renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}} + \renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}} + \renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}} + \renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}} + \renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}} + \renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}} + \renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}} } \applySubsectionNumbering % ── Label generation ──────────────────────────────────────────────── \newcommand{\labelSectionGeneration}{% - \ifnum\value{numberSubsections}=1 - \arabic{section}-\arabic{subsection}% - \else - \ifnum\value{numberSubsections}=2 - \arabic{section}-\arabic{subsection}-\arabic{subsubsection}% - \else - \arabic{section}% - \fi - \fi} + \ifnum\value{numberSubsections}=1 + \arabic{section}-\arabic{subsection}% + \else + \ifnum\value{numberSubsections}=2 + \arabic{section}-\arabic{subsection}-\arabic{subsubsection}% + \else + \arabic{section}% + \fi + \fi} \newcommand{\labelIt}[1]{\refstepcounter{#1\suffix}\edef\tempLabel{\genLabel{#1}{\arabic{#1\suffix}}}\label{\tempLabel}} \newcommand{\genLabel}[2]{#1:\labelSectionGeneration-#2} @@ -751,27 +745,27 @@ % │ Number the counters appropriately │ % └ ┘ \newcommand{\usenumberArabic}[1]{% - \ifnum\value{numberingConfig}=1 - \labelIt{#1} - \printcounter{#1\suffix}% - \else - \ifnum\value{numberingConfig}=2 - \ifthenelse{\equal{#1}{definitions}}{% - \labelIt{definition} - \printcounter{definition\suffix}% - }{% - \labelIt{all} - \printcounter{all\suffix}% - }% - \else - \ifnum\value{numberingConfig}=3 - \labelIt{all} - \printcounter{all\suffix}% - \else - \relax% - \fi - \fi - \fi} + \ifnum\value{numberingConfig}=1 + \labelIt{#1} + \printcounter{#1\suffix}% + \else + \ifnum\value{numberingConfig}=2 + \ifthenelse{\equal{#1}{definitions}}{% + \labelIt{definition} + \printcounter{definition\suffix}% + }{% + \labelIt{all} + \printcounter{all\suffix}% + }% + \else + \ifnum\value{numberingConfig}=3 + \labelIt{all} + \printcounter{all\suffix}% + \else + \relax% + \fi + \fi + \fi} % ──────────────────────────────────────────────────────────────────── @@ -784,22 +778,22 @@ % For later change \newcommand{\setNumberingStyle}[1]{ - \typeout{Setting NumberingStyle to #1} - \setcounter{numberingConfig}{#1} - \ifthenelse{\equal{#1}{0}}{}{ - \setcounter{numberingConfigStore}{#1} - } - \applyTableAndFigureNumbering + \typeout{Setting NumberingStyle to #1} + \setcounter{numberingConfig}{#1} + \ifthenelse{\equal{#1}{0}}{}{ + \setcounter{numberingConfigStore}{#1} + } + \applyTableAndFigureNumbering } % Enable / disable numbering \newcommand{\numberingOff}{ - \setcounter{numberingConfig}{0} - \applyTableAndFigureNumbering + \setcounter{numberingConfig}{0} + \applyTableAndFigureNumbering } \newcommand{\numberingOn}{ - \setcounter{numberingConfig}{\value{numberingConfigStore}} - \applyTableAndFigureNumbering + \setcounter{numberingConfig}{\value{numberingConfigStore}} + \applyTableAndFigureNumbering } % ──────────────────────────────────────────────────────────────────── @@ -808,51 +802,51 @@ % │ new page │ % ╰────────────────────────────────────────────────╯ \newcommand{\newsection}{ - \newpage - \newsectionNoPB + \newpage + \newsectionNoPB } % ── Reset definitions, lemma, etc counters, do not add new page ───── \newcommand{\newsectionNoPB}{ - \setcounter{lemma}{0} - \setcounter{definition}{0} - \setcounter{corollary}{0} - \setcounter{theorem}{0} - \setcounter{axiom}{0} - \setcounter{example}{0} - \setcounter{fact}{0} - \setcounter{proposition}{0} - \setcounter{formula}{0} - \setcounter{remark}{0} - \setcounter{all}{0} + \setcounter{lemma}{0} + \setcounter{definition}{0} + \setcounter{corollary}{0} + \setcounter{theorem}{0} + \setcounter{axiom}{0} + \setcounter{example}{0} + \setcounter{fact}{0} + \setcounter{proposition}{0} + \setcounter{formula}{0} + \setcounter{remark}{0} + \setcounter{all}{0} - \setcounter{lemmass}{0} - \setcounter{definitionss}{0} - \setcounter{corollaryss}{0} - \setcounter{theoremss}{0} - \setcounter{axiomss}{0} - \setcounter{exampless}{0} - \setcounter{factss}{0} - \setcounter{propositionss}{0} - \setcounter{formulass}{0} - \setcounter{remarkss}{0} - \setcounter{allss}{0} + \setcounter{lemmass}{0} + \setcounter{definitionss}{0} + \setcounter{corollaryss}{0} + \setcounter{theoremss}{0} + \setcounter{axiomss}{0} + \setcounter{exampless}{0} + \setcounter{factss}{0} + \setcounter{propositionss}{0} + \setcounter{formulass}{0} + \setcounter{remarkss}{0} + \setcounter{allss}{0} - \setcounter{lemmasss}{0} - \setcounter{definitionsss}{0} - \setcounter{corollarysss}{0} - \setcounter{theoremsss}{0} - \setcounter{axiomsss}{0} - \setcounter{examplesss}{0} - \setcounter{factsss}{0} - \setcounter{propositionsss}{0} - \setcounter{formulasss}{0} - \setcounter{remarksss}{0} - \setcounter{allsss}{0} + \setcounter{lemmasss}{0} + \setcounter{definitionsss}{0} + \setcounter{corollarysss}{0} + \setcounter{theoremsss}{0} + \setcounter{axiomsss}{0} + \setcounter{examplesss}{0} + \setcounter{factsss}{0} + \setcounter{propositionsss}{0} + \setcounter{formulasss}{0} + \setcounter{remarksss}{0} + \setcounter{allsss}{0} - % Tables & Figures - \setcounter{table}{0} - \setcounter{figure}{0} + % Tables & Figures + \setcounter{table}{0} + \setcounter{figure}{0} } \newsectionNoPB % Initializes @@ -868,39 +862,39 @@ % Theorems \newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1} + overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1} % Lemmas \newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1} + overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1} % Corollaries \newtcolorbox{corollary}[2][]{mainboxstyle,colback=teal!5!white,colframe=teal!75!black,colbacktitle=teal!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1} + overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1} % Axioms \newtcolorbox{axiom}[2][]{mainboxstyle,colback=JungleGreen!5!white,colframe=JungleGreen!75!black,colbacktitle=JungleGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1} + overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1} % Facts \newtcolorbox{fact}[2][]{mainboxstyle,colback=SeaGreen!5!white,colframe=SeaGreen!75!black,colbacktitle=SeaGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1} + overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1} % Propositions \newtcolorbox{proposition}[2][]{mainboxstyle,colback=Cyan!5!white,colframe=Cyan!75!black,colbacktitle=Cyan!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1} + overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1} % Examples \newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1} + overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1} % Formula \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 \translate{Formula}{Formel}\usenumberArabic{formula}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel}\usenumberArabic{formula}};},#1} % Remark \newtcolorbox{remark}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1} + overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1} % ──────────────────────────────────────────────────────────────────── @@ -978,14 +972,14 @@ \algrenewcommand{\alglinenumber}[1]{#1} \newenvironment{algo}[1]{ - \begin{algorithm} - \begin{spacing}{1.2} - \caption{\textsc{#1}} - \begin{algorithmic}[1] - }{ - \end{algorithmic} - \end{spacing} - \end{algorithm} + \begin{algorithm} + \begin{spacing}{1.2} + \caption{\textsc{#1}} + \begin{algorithmic}[1] + }{ + \end{algorithmic} + \end{spacing} + \end{algorithm} } % • ▌ ▄ ·. ▄▄▄· ▄▄▄▄▄ ▄ .▄ .▄▄ · ▄▄▄▄▄ ▄· ▄▌▄▄▌ ▄▄▄ . @@ -1006,10 +1000,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[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large \translate{Conjugation}{Konjugation}};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} % _____ _ _ % (_ _) ( ) (_ ) @@ -1023,24 +1017,24 @@ % Create new table. #1 Layout, #2 title row \newenvironment{tables}[2]{ - \begin{center} - \begin{tabular}{#1} - \toprule - #2 \\ - \midrule - }{ - \bottomrule - \end{tabular} - \end{center} + \begin{center} + \begin{tabular}{#1} + \toprule + #2 \\ + \midrule + }{ + \bottomrule + \end{tabular} + \end{center} } % Create new table in table env. #1 layout, #2 title row, #3 caption \newenvironment{fullTable}[3]{ - \edef\tableCaption{#3} - \begin{table}[h!] - \begin{tables}{#1}{#2} - }{ - \end{tables} - \caption{\tableCaption} - \end{table} + \edef\tableCaption{#3} + \begin{table}[h!] + \begin{tables}{#1}{#2} + }{ + \end{tables} + \caption{\tableCaption} + \end{table} } diff --git a/dist/recommended.tex b/dist/recommended.tex index ff25f16..bf14e97 100644 --- a/dist/recommended.tex +++ b/dist/recommended.tex @@ -7,7 +7,7 @@ % █ █ ▄ █ █ █ █ █▄▄▄█ ▄ █ █ █ █ █ █▄▄▄█ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █ % █▄▄▄▄▄▄▄█▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█▄▄█ █▄▄█ █▄▄█ █▄▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄▄▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█ -% + % ▄▄█▀▀▀█▄█ % ▄██▀ ▀█ % ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██ @@ -17,12 +17,9 @@ % ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀ % This file contains all necessary dependencies for the document to compile (at all) and some core macros -% Load this before the config file - -% ── Imports ───────────────────────────────────────────────────────── +% Imports % \typeout{[Core] Importing!} - \usepackage[table, dvipsnames]{xcolor} \usepackage{amsmath} \usepackage{graphicx} @@ -49,38 +46,37 @@ \usepackage{pifont} -% ── Language Switching. ───────────────────────────────────────────── -% Currently only English and German are supported +% Language Switching. Currently only English and German are supported % See docs for how to use \newcounter{lang} \newcommand{\setLang}[1]{ - \edef\lang{#1} - \edef\en{en} - \edef\de{de} - \ifx\lang\en - \typeout{[Lang Switcher] Loading English} - \setcounter{lang}{1} - \else - \ifx\lang\de - \typeout{[Lang Switcher] Loading German} - \setcounter{lang}{2} - \usepackage[ngerman]{babel} - \else - \typeout{[Lang Switcher] No such language!} - \fi - \fi + \edef\lang{#1} + \edef\en{en} + \edef\de{de} + \ifx\lang\en + \typeout{[Lang Switcher] Loading English} + \setcounter{lang}{1} + \else + \ifx\lang\de + \typeout{[Lang Switcher] Loading German} + \setcounter{lang}{2} + \usepackage[ngerman]{babel} + \else + \typeout{[Lang Switcher] No such language!} + \fi + \fi } % Deprecated, as not useful \newcommand{\loadLang}{ - \ifnum\value{lang}<2{ - \typeout{[Lang Loader] Loaded English} - }\else { - \typeout{[Lang Loader] Loaded German} - \setcounter{lang}{2} - } - \fi + \ifnum\value{lang}<2{ + \typeout{[Lang Loader] Loaded English} + }\else { + \typeout{[Lang Loader] Loaded German} + \setcounter{lang}{2} + } + \fi } @@ -91,59 +87,57 @@ \newcounter{descriptorShadeStrength} \newcounter{shadeStrength} -% ── Setup ─────────────────────────────────────────────────────────── % Set up the latex document, configure author, title (as first argument), as well as headers and footers \newcommand{\setup}[1]{ - \typeout{[Setup] Setting up...} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - \fancypagestyle{plain}{% - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - } - \typeout{[Setup] Complete} + \typeout{[Setup] Setting up...} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + \fancypagestyle{plain}{% + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + } + \typeout{[Setup] Complete} } % Start document command (required) \newcommand{\startDocument}{ - \maketitle - \startDocumentNoTitle + \maketitle + \startDocumentNoTitle } -% Or this one, if you don't want a title \newcommand{\startDocumentNoTitle}{ - \pagestyle{fancy} - \thispagestyle{fancy} + \pagestyle{fancy} + \thispagestyle{fancy} } % Set up the latex document, only configuring the author, title and page size \newcommand{\setupBarebones}[1]{ - \typeout{[Setup] Using barebones setup} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using barebones setup} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } % Set up the latex document for exam summaries (Extra wide body, small margins, no header) \newcommand{\setupCheatSheet}[1]{ - \typeout{[Setup] Using CheatSheet setup} - \loadLang - \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using CheatSheet setup} + \loadLang + \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } @@ -226,35 +220,35 @@ % 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 - } - } + \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 + } + } } % -------------------- % @@ -262,15 +256,15 @@ % -------------------- % \newcommand{\setFont}[1]{\fontfamily{#1}\selectfont} \newcommand{\setFontType}[1]{ - \ifthenelse{\equal{#1}{mono}}{ - \renewcommand{\familydefault}{\ttdefault} - }{ - \ifthenelse{\equal{#1}{serif}}{ - \renewcommand{\familydefault}{\rmdefault} - }{ - \renewcommand{\familydefault}{\sfdefault} - } - } + \ifthenelse{\equal{#1}{mono}}{ + \renewcommand{\familydefault}{\ttdefault} + }{ + \ifthenelse{\equal{#1}{serif}}{ + \renewcommand{\familydefault}{\rmdefault} + }{ + \renewcommand{\familydefault}{\sfdefault} + } + } } \newcommand{\hrmvspace}{\vspace{-0.25pc}} @@ -288,16 +282,16 @@ % Add a color shade (similar to \fhlc, but nicer boxes) \newcommand{\background}[3]{\tcbox[on line, - boxsep=2pt, - left=0pt, - right=0pt, - top=0pt, - bottom=0pt, - colframe=white, - frame empty, - colback=#1!#2!white, - highlight math style={enhanced} - ] {\textbf{#3}}} + boxsep=2pt, + left=0pt, + right=0pt, + top=0pt, + bottom=0pt, + colframe=white, + frame empty, + colback=#1!#2!white, + highlight math style={enhanced} + ] {\textbf{#3}}} % Abstraction of background, where the brightness is set to 20% \newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}} @@ -332,14 +326,14 @@ % 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} + \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} } %▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ @@ -349,40 +343,40 @@ %▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ \newtcolorbox{recall}[2][]{mainboxstyle,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=yellow!75!black,,fill=yellow!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Remarks }{Bemerkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=red!75!black,,fill=red!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Properties }{Eigenschaften }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Restrictions }{Einschränkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} + overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} \newtcolorbox{intuition}[2][]{mainboxstyle,colback=Emerald!5!white,colframe=Emerald!75!black,colbacktitle=Emerald!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} + overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} \newcommand{\inlineintuition}{\bg{Emerald}{Intuition:}} % Terms and notation \newtcolorbox{terms}[2][]{mainboxstyle,colback=orange!5!white,colframe=orange!75!black,colbacktitle=orange!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=orange!75!black,,fill=orange!75!black] at (frame.north east) {\large \translate{Terms }{Begriffe }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=Peach!75!black,,fill=Peach!75!black] at (frame.north east) {\large Notation};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} + overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} % Task @@ -395,7 +389,7 @@ % General \newtcolorbox{general}[4][]{mainboxstyle,colback=#4!5!white,colframe=#4!75!black,colbacktitle=#4!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} % Simple \newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1} @@ -547,9 +541,9 @@ % For using index package \newcommand{\prepareIndex}{ - \usepackage[T1]{fontenc} - \usepackage{imakeidx} - \makeindex + \usepackage[T1]{fontenc} + \usepackage{imakeidx} + \makeindex } \newcommand{\addIndexBold}[1]{\textbf{\index{\MakeLowercase{#1}} #1}} @@ -605,22 +599,22 @@ % Set the current number of a label \newcommand{\setLabelNumber}[2]{% - \setcounter{#1}{#2}% - \addtocounter{#1}{-1}% - \setcounter{#1ss}{#2}% - \addtocounter{#1ss}{-1}% - \setcounter{#1sss}{#2}% - \addtocounter{#1sss}{-1}% + \setcounter{#1}{#2}% + \addtocounter{#1}{-1}% + \setcounter{#1ss}{#2}% + \addtocounter{#1ss}{-1}% + \setcounter{#1sss}{#2}% + \addtocounter{#1sss}{-1}% } \newcommand{\stepLabelNumber}[1]{% - \stepcounter{#1}% - \stepcounter{#1ss}% - \stepcounter{#1sss}% + \stepcounter{#1}% + \stepcounter{#1ss}% + \stepcounter{#1sss}% } \newcommand{\printcounter}[1]{% - \csname the#1\endcsname + \csname the#1\endcsname } \newcommand{\suffix}{ss} @@ -630,119 +624,119 @@ % │ Counter numbering │ % └ ┘ \newcommand{\preTableAndFigHook}[1]{% - \ifnum\value{numberingConfig}>1 - \ifnum\value{numberSubsections}=1 - \stepcounter{allss} - \else - \ifnum\value{numberSubsections}=2 - \stepcounter{allsss} - \else - \stepcounter{all} - \fi - \fi - \fi + \ifnum\value{numberingConfig}>1 + \ifnum\value{numberSubsections}=1 + \stepcounter{allss} + \else + \ifnum\value{numberSubsections}=2 + \stepcounter{allsss} + \else + \stepcounter{all} + \fi + \fi + \fi } \AtBeginEnvironment{table}{\preTableAndFigHook{table}} \AtBeginEnvironment{figure}{\preTableAndFigHook{figure}} \newcommand{\applyTableAndFigureNumbering}{ - % Tables & Figures - \ifnum\value{numberingConfig}=0 - \renewcommand{\thetable}{} - \renewcommand{\thefigure}{} - \else - \ifnum\value{numberingConfig}=1 - \renewcommand{\thetable}{\sectionNumbering.\arabic{table}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}} - \else - \ifnum\value{numberSubsections}=1 - \renewcommand{\thetable}{\sectionNumbering.\arabic{allss}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}} - \else - \ifnum\value{numberSubsections}=2 - \renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}} - \else - \renewcommand{\thetable}{\sectionNumbering.\arabic{all}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{all}} - \fi - \fi - \fi - \fi + % Tables & Figures + \ifnum\value{numberingConfig}=0 + \renewcommand{\thetable}{} + \renewcommand{\thefigure}{} + \else + \ifnum\value{numberingConfig}=1 + \renewcommand{\thetable}{\sectionNumbering.\arabic{table}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}} + \else + \ifnum\value{numberSubsections}=1 + \renewcommand{\thetable}{\sectionNumbering.\arabic{allss}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}} + \else + \ifnum\value{numberSubsections}=2 + \renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}} + \else + \renewcommand{\thetable}{\sectionNumbering.\arabic{all}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{all}} + \fi + \fi + \fi + \fi } \newcommand{\setSubsectionNumbering}[1]{ - \setcounter{numberSubsections}{#1} - \applySubsectionNumbering + \setcounter{numberSubsections}{#1} + \applySubsectionNumbering } \newcommand{\applySubsectionNumbering}{ - \ifnum\value{numberSubsections}=1 - \renewcommand{\sectionNumbering}{\thesubsection} - \renewcommand{\suffix}{ss} - \typeout{Numbering as section.subsection.number} - \else - \ifnum\value{numberSubsections}=2 - \renewcommand{\sectionNumbering}{\thesubsubsection} - \renewcommand{\suffix}{sss} - \typeout{Numbering as section.subsection.subsubsection.number} - \else - \renewcommand{\sectionNumbering}{\thesection} - \renewcommand{\suffix}{} - \typeout{Numbering as section.number} - \fi - \fi - \applyTableAndFigureNumbering + \ifnum\value{numberSubsections}=1 + \renewcommand{\sectionNumbering}{\thesubsection} + \renewcommand{\suffix}{ss} + \typeout{Numbering as section.subsection.number} + \else + \ifnum\value{numberSubsections}=2 + \renewcommand{\sectionNumbering}{\thesubsubsection} + \renewcommand{\suffix}{sss} + \typeout{Numbering as section.subsection.subsubsection.number} + \else + \renewcommand{\sectionNumbering}{\thesection} + \renewcommand{\suffix}{} + \typeout{Numbering as section.number} + \fi + \fi + \applyTableAndFigureNumbering - \renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}} - \renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}} - \renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}} - \renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}} - \renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}} - \renewcommand{\theexample}{\sectionNumbering.\arabic{example}} - \renewcommand{\thefact}{\sectionNumbering.\arabic{fact}} - \renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}} - \renewcommand{\theformula}{\sectionNumbering.\arabic{formula}} - \renewcommand{\theremark}{\sectionNumbering.\arabic{remark}} - \renewcommand{\theall}{\sectionNumbering.\arabic{all}} + \renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}} + \renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}} + \renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}} + \renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}} + \renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}} + \renewcommand{\theexample}{\sectionNumbering.\arabic{example}} + \renewcommand{\thefact}{\sectionNumbering.\arabic{fact}} + \renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}} + \renewcommand{\theformula}{\sectionNumbering.\arabic{formula}} + \renewcommand{\theremark}{\sectionNumbering.\arabic{remark}} + \renewcommand{\theall}{\sectionNumbering.\arabic{all}} - \renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}} - \renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}} - \renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}} - \renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}} - \renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}} - \renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}} - \renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}} - \renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}} - \renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}} - \renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}} - \renewcommand{\theallss}{\sectionNumbering.\arabic{allss}} + \renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}} + \renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}} + \renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}} + \renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}} + \renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}} + \renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}} + \renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}} + \renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}} + \renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}} + \renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}} + \renewcommand{\theallss}{\sectionNumbering.\arabic{allss}} - \renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}} - \renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}} - \renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}} - \renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}} - \renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}} - \renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}} - \renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}} - \renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}} - \renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}} - \renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}} - \renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}} + \renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}} + \renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}} + \renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}} + \renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}} + \renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}} + \renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}} + \renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}} + \renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}} + \renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}} + \renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}} + \renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}} } \applySubsectionNumbering % ── Label generation ──────────────────────────────────────────────── \newcommand{\labelSectionGeneration}{% - \ifnum\value{numberSubsections}=1 - \arabic{section}-\arabic{subsection}% - \else - \ifnum\value{numberSubsections}=2 - \arabic{section}-\arabic{subsection}-\arabic{subsubsection}% - \else - \arabic{section}% - \fi - \fi} + \ifnum\value{numberSubsections}=1 + \arabic{section}-\arabic{subsection}% + \else + \ifnum\value{numberSubsections}=2 + \arabic{section}-\arabic{subsection}-\arabic{subsubsection}% + \else + \arabic{section}% + \fi + \fi} \newcommand{\labelIt}[1]{\refstepcounter{#1\suffix}\edef\tempLabel{\genLabel{#1}{\arabic{#1\suffix}}}\label{\tempLabel}} \newcommand{\genLabel}[2]{#1:\labelSectionGeneration-#2} @@ -751,27 +745,27 @@ % │ Number the counters appropriately │ % └ ┘ \newcommand{\usenumberArabic}[1]{% - \ifnum\value{numberingConfig}=1 - \labelIt{#1} - \printcounter{#1\suffix}% - \else - \ifnum\value{numberingConfig}=2 - \ifthenelse{\equal{#1}{definitions}}{% - \labelIt{definition} - \printcounter{definition\suffix}% - }{% - \labelIt{all} - \printcounter{all\suffix}% - }% - \else - \ifnum\value{numberingConfig}=3 - \labelIt{all} - \printcounter{all\suffix}% - \else - \relax% - \fi - \fi - \fi} + \ifnum\value{numberingConfig}=1 + \labelIt{#1} + \printcounter{#1\suffix}% + \else + \ifnum\value{numberingConfig}=2 + \ifthenelse{\equal{#1}{definitions}}{% + \labelIt{definition} + \printcounter{definition\suffix}% + }{% + \labelIt{all} + \printcounter{all\suffix}% + }% + \else + \ifnum\value{numberingConfig}=3 + \labelIt{all} + \printcounter{all\suffix}% + \else + \relax% + \fi + \fi + \fi} % ──────────────────────────────────────────────────────────────────── @@ -784,22 +778,22 @@ % For later change \newcommand{\setNumberingStyle}[1]{ - \typeout{Setting NumberingStyle to #1} - \setcounter{numberingConfig}{#1} - \ifthenelse{\equal{#1}{0}}{}{ - \setcounter{numberingConfigStore}{#1} - } - \applyTableAndFigureNumbering + \typeout{Setting NumberingStyle to #1} + \setcounter{numberingConfig}{#1} + \ifthenelse{\equal{#1}{0}}{}{ + \setcounter{numberingConfigStore}{#1} + } + \applyTableAndFigureNumbering } % Enable / disable numbering \newcommand{\numberingOff}{ - \setcounter{numberingConfig}{0} - \applyTableAndFigureNumbering + \setcounter{numberingConfig}{0} + \applyTableAndFigureNumbering } \newcommand{\numberingOn}{ - \setcounter{numberingConfig}{\value{numberingConfigStore}} - \applyTableAndFigureNumbering + \setcounter{numberingConfig}{\value{numberingConfigStore}} + \applyTableAndFigureNumbering } % ──────────────────────────────────────────────────────────────────── @@ -808,51 +802,51 @@ % │ new page │ % ╰────────────────────────────────────────────────╯ \newcommand{\newsection}{ - \newpage - \newsectionNoPB + \newpage + \newsectionNoPB } % ── Reset definitions, lemma, etc counters, do not add new page ───── \newcommand{\newsectionNoPB}{ - \setcounter{lemma}{0} - \setcounter{definition}{0} - \setcounter{corollary}{0} - \setcounter{theorem}{0} - \setcounter{axiom}{0} - \setcounter{example}{0} - \setcounter{fact}{0} - \setcounter{proposition}{0} - \setcounter{formula}{0} - \setcounter{remark}{0} - \setcounter{all}{0} + \setcounter{lemma}{0} + \setcounter{definition}{0} + \setcounter{corollary}{0} + \setcounter{theorem}{0} + \setcounter{axiom}{0} + \setcounter{example}{0} + \setcounter{fact}{0} + \setcounter{proposition}{0} + \setcounter{formula}{0} + \setcounter{remark}{0} + \setcounter{all}{0} - \setcounter{lemmass}{0} - \setcounter{definitionss}{0} - \setcounter{corollaryss}{0} - \setcounter{theoremss}{0} - \setcounter{axiomss}{0} - \setcounter{exampless}{0} - \setcounter{factss}{0} - \setcounter{propositionss}{0} - \setcounter{formulass}{0} - \setcounter{remarkss}{0} - \setcounter{allss}{0} + \setcounter{lemmass}{0} + \setcounter{definitionss}{0} + \setcounter{corollaryss}{0} + \setcounter{theoremss}{0} + \setcounter{axiomss}{0} + \setcounter{exampless}{0} + \setcounter{factss}{0} + \setcounter{propositionss}{0} + \setcounter{formulass}{0} + \setcounter{remarkss}{0} + \setcounter{allss}{0} - \setcounter{lemmasss}{0} - \setcounter{definitionsss}{0} - \setcounter{corollarysss}{0} - \setcounter{theoremsss}{0} - \setcounter{axiomsss}{0} - \setcounter{examplesss}{0} - \setcounter{factsss}{0} - \setcounter{propositionsss}{0} - \setcounter{formulasss}{0} - \setcounter{remarksss}{0} - \setcounter{allsss}{0} + \setcounter{lemmasss}{0} + \setcounter{definitionsss}{0} + \setcounter{corollarysss}{0} + \setcounter{theoremsss}{0} + \setcounter{axiomsss}{0} + \setcounter{examplesss}{0} + \setcounter{factsss}{0} + \setcounter{propositionsss}{0} + \setcounter{formulasss}{0} + \setcounter{remarksss}{0} + \setcounter{allsss}{0} - % Tables & Figures - \setcounter{table}{0} - \setcounter{figure}{0} + % Tables & Figures + \setcounter{table}{0} + \setcounter{figure}{0} } \newsectionNoPB % Initializes @@ -868,39 +862,39 @@ % Theorems \newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1} + overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1} % Lemmas \newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1} + overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1} % Corollaries \newtcolorbox{corollary}[2][]{mainboxstyle,colback=teal!5!white,colframe=teal!75!black,colbacktitle=teal!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1} + overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1} % Axioms \newtcolorbox{axiom}[2][]{mainboxstyle,colback=JungleGreen!5!white,colframe=JungleGreen!75!black,colbacktitle=JungleGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1} + overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1} % Facts \newtcolorbox{fact}[2][]{mainboxstyle,colback=SeaGreen!5!white,colframe=SeaGreen!75!black,colbacktitle=SeaGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1} + overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1} % Propositions \newtcolorbox{proposition}[2][]{mainboxstyle,colback=Cyan!5!white,colframe=Cyan!75!black,colbacktitle=Cyan!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1} + overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1} % Examples \newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1} + overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1} % Formula \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 \translate{Formula}{Formel}\usenumberArabic{formula}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel}\usenumberArabic{formula}};},#1} % Remark \newtcolorbox{remark}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1} + overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1} % ──────────────────────────────────────────────────────────────────── @@ -978,14 +972,14 @@ \algrenewcommand{\alglinenumber}[1]{#1} \newenvironment{algo}[1]{ - \begin{algorithm} - \begin{spacing}{1.2} - \caption{\textsc{#1}} - \begin{algorithmic}[1] - }{ - \end{algorithmic} - \end{spacing} - \end{algorithm} + \begin{algorithm} + \begin{spacing}{1.2} + \caption{\textsc{#1}} + \begin{algorithmic}[1] + }{ + \end{algorithmic} + \end{spacing} + \end{algorithm} } % • ▌ ▄ ·. ▄▄▄· ▄▄▄▄▄ ▄ .▄ .▄▄ · ▄▄▄▄▄ ▄· ▄▌▄▄▌ ▄▄▄ . @@ -1006,10 +1000,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[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large \translate{Conjugation}{Konjugation}};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} % _____ _ _ % (_ _) ( ) (_ ) @@ -1023,26 +1017,26 @@ % Create new table. #1 Layout, #2 title row \newenvironment{tables}[2]{ - \begin{center} - \begin{tabular}{#1} - \toprule - #2 \\ - \midrule - }{ - \bottomrule - \end{tabular} - \end{center} + \begin{center} + \begin{tabular}{#1} + \toprule + #2 \\ + \midrule + }{ + \bottomrule + \end{tabular} + \end{center} } % Create new table in table env. #1 layout, #2 title row, #3 caption \newenvironment{fullTable}[3]{ - \edef\tableCaption{#3} - \begin{table}[h!] - \begin{tables}{#1}{#2} - }{ - \end{tables} - \caption{\tableCaption} - \end{table} + \edef\tableCaption{#3} + \begin{table}[h!] + \begin{tables}{#1}{#2} + }{ + \end{tables} + \caption{\tableCaption} + \end{table} } % ___ _ _____ _ _ @@ -1055,14 +1049,14 @@ % Configs if you want to use BibTeX. Not included in any default configs. \newcommand{\setupBibtex}[1]{ - \usepackage{biblatex} - \usepackage[nottoc, numbib]{tocbibind} - \addbibresource{#1} + \usepackage{biblatex} + \usepackage[nottoc, numbib]{tocbibind} + \addbibresource{#1} } \newcommand{\printbib}{ - \addcontentsline{toc}{section}{\translate{Sources}{Quellen}} - \printbibliography[title=\translate{Sources}{Quellen}] + \addcontentsline{toc}{section}{\translate{Sources}{Quellen}} + \printbibliography[title=\translate{Sources}{Quellen}] } @@ -1073,12 +1067,12 @@ % Add glossaries functionality \newcommand{\setupGlossary}{ - \usepackage[nonumberlist, toc]{glossaries} - \usepackage[nottoc, numbib]{tocbibind} - \makenoidxglossaries + \usepackage[nonumberlist, toc]{glossaries} + \usepackage[nottoc, numbib]{tocbibind} + \makenoidxglossaries } \newcommand{\printGlossary}{ - \glsaddall - \printnoidxglossaries + \glsaddall + \printnoidxglossaries } diff --git a/extra/bib.tex b/extra/bib.tex index 03af4db..18fa5a0 100644 --- a/extra/bib.tex +++ b/extra/bib.tex @@ -8,12 +8,12 @@ % Configs if you want to use BibTeX. Not included in any default configs. \newcommand{\setupBibtex}[1]{ - \usepackage{biblatex} - \usepackage[nottoc, numbib]{tocbibind} - \addbibresource{#1} + \usepackage{biblatex} + \usepackage[nottoc, numbib]{tocbibind} + \addbibresource{#1} } \newcommand{\printbib}{ - \addcontentsline{toc}{section}{\translate{Sources}{Quellen}} - \printbibliography[title=\translate{Sources}{Quellen}] + \addcontentsline{toc}{section}{\translate{Sources}{Quellen}} + \printbibliography[title=\translate{Sources}{Quellen}] } diff --git a/extra/glossary.tex b/extra/glossary.tex index 3dabe0f..3e61fb2 100644 --- a/extra/glossary.tex +++ b/extra/glossary.tex @@ -6,12 +6,12 @@ % Add glossaries functionality \newcommand{\setupGlossary}{ - \usepackage[nonumberlist, toc]{glossaries} - \usepackage[nottoc, numbib]{tocbibind} - \makenoidxglossaries + \usepackage[nonumberlist, toc]{glossaries} + \usepackage[nottoc, numbib]{tocbibind} + \makenoidxglossaries } \newcommand{\printGlossary}{ - \glsaddall - \printnoidxglossaries + \glsaddall + \printnoidxglossaries } diff --git a/extra/minted.tex b/extra/minted.tex index 164a892..01669cb 100644 --- a/extra/minted.tex +++ b/extra/minted.tex @@ -10,8 +10,8 @@ % Args: Language, Code \newenvironment{code}[1]{ - \VerbatimEnvironment - \begin{minted}[ + \VerbatimEnvironment + \begin{minted}[ autogobble, breaklines, breakindentnchars=2, @@ -25,23 +25,23 @@ % Args: Language, file relative to root file \newcommand{\inputcode}[2]{ - \inputminted[ - autogobble, - breaklines, - breakindentnchars=2, - frame=lines, - framesep=2mm, - mathescape, - baselinestretch=1.1, - linenos - ]{#1}{#2} + \inputminted[ + autogobble, + breaklines, + breakindentnchars=2, + frame=lines, + framesep=2mm, + mathescape, + baselinestretch=1.1, + linenos + ]{#1}{#2} } % Args: Language, Base directory (with trailing slash), file (no slash at start) \newcommand{\inputcodewithfilename}[3]{ - \begin{figure}[h!] - \texttt{File: \detokenize{#3}} - \rmvspace - \inputcode{#1}{#2#3} - \end{figure} + \begin{figure}[h!] + \texttt{File: \detokenize{#3}} + \rmvspace + \inputcode{#1}{#2#3} + \end{figure} } diff --git a/main/core.tex b/main/core.tex index e9f51b3..cb6bdf6 100644 --- a/main/core.tex +++ b/main/core.tex @@ -46,32 +46,32 @@ \newcounter{lang} \newcommand{\setLang}[1]{ - \edef\lang{#1} - \edef\en{en} - \edef\de{de} - \ifx\lang\en - \typeout{[Lang Switcher] Loading English} - \setcounter{lang}{1} - \else - \ifx\lang\de - \typeout{[Lang Switcher] Loading German} - \setcounter{lang}{2} - \usepackage[ngerman]{babel} - \else - \typeout{[Lang Switcher] No such language!} - \fi - \fi + \edef\lang{#1} + \edef\en{en} + \edef\de{de} + \ifx\lang\en + \typeout{[Lang Switcher] Loading English} + \setcounter{lang}{1} + \else + \ifx\lang\de + \typeout{[Lang Switcher] Loading German} + \setcounter{lang}{2} + \usepackage[ngerman]{babel} + \else + \typeout{[Lang Switcher] No such language!} + \fi + \fi } % Deprecated, as not useful \newcommand{\loadLang}{ - \ifnum\value{lang}<2{ - \typeout{[Lang Loader] Loaded English} - }\else { - \typeout{[Lang Loader] Loaded German} - \setcounter{lang}{2} - } - \fi + \ifnum\value{lang}<2{ + \typeout{[Lang Loader] Loaded English} + }\else { + \typeout{[Lang Loader] Loaded German} + \setcounter{lang}{2} + } + \fi } @@ -85,56 +85,56 @@ % ── Setup ─────────────────────────────────────────────────────────── % Set up the latex document, configure author, title (as first argument), as well as headers and footers \newcommand{\setup}[1]{ - \typeout{[Setup] Setting up...} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - \fancypagestyle{plain}{% - \fancyhead{} - \fancyhead[L]{#1} - \fancyhead[R]{\authorHeaders} - \fancyfoot{} - \fancyfoot[L]{\today} - \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} - } - \typeout{[Setup] Complete} + \typeout{[Setup] Setting up...} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + \fancypagestyle{plain}{% + \fancyhead{} + \fancyhead[L]{#1} + \fancyhead[R]{\authorHeaders} + \fancyfoot{} + \fancyfoot[L]{\today} + \fancyfoot[R]{\thepage\ /\ \pageref{LastPage}} + } + \typeout{[Setup] Complete} } % Start document command (required) \newcommand{\startDocument}{ - \maketitle - \startDocumentNoTitle + \maketitle + \startDocumentNoTitle } % Or this one, if you don't want a title \newcommand{\startDocumentNoTitle}{ - \pagestyle{fancy} - \thispagestyle{fancy} + \pagestyle{fancy} + \thispagestyle{fancy} } % Set up the latex document, only configuring the author, title and page size \newcommand{\setupBarebones}[1]{ - \typeout{[Setup] Using barebones setup} - \loadLang - \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using barebones setup} + \loadLang + \usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } % Set up the latex document for exam summaries (Extra wide body, small margins, no header) \newcommand{\setupCheatSheet}[1]{ - \typeout{[Setup] Using CheatSheet setup} - \loadLang - \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} - \title{\Huge \textbf{#1}} - \author{\authorTitle} + \typeout{[Setup] Using CheatSheet setup} + \loadLang + \usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry} + \title{\Huge \textbf{#1}} + \author{\authorTitle} } diff --git a/main/index.tex b/main/index.tex index b83e45c..e1cb0f3 100644 --- a/main/index.tex +++ b/main/index.tex @@ -10,9 +10,9 @@ % For using index package \newcommand{\prepareIndex}{ - \usepackage[T1]{fontenc} - \usepackage{imakeidx} - \makeindex + \usepackage[T1]{fontenc} + \usepackage{imakeidx} + \makeindex } \newcommand{\addIndexBold}[1]{\textbf{\index{\MakeLowercase{#1}} #1}} diff --git a/main/style/common.tex b/main/style/common.tex index d3dbc1f..0f2a3e7 100644 --- a/main/style/common.tex +++ b/main/style/common.tex @@ -5,40 +5,40 @@ %▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ \newtcolorbox{recall}[2][]{mainboxstyle,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=yellow!75!black,,fill=yellow!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Remarks }{Bemerkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=red!75!black,,fill=red!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Properties }{Eigenschaften }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Restrictions }{Einschränkungen }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} + overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1} \newtcolorbox{intuition}[2][]{mainboxstyle,colback=Emerald!5!white,colframe=Emerald!75!black,colbacktitle=Emerald!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} + overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1} \newcommand{\inlineintuition}{\bg{Emerald}{Intuition:}} % Terms and notation \newtcolorbox{terms}[2][]{mainboxstyle,colback=orange!5!white,colframe=orange!75!black,colbacktitle=orange!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=orange!75!black,,fill=orange!75!black] at (frame.north east) {\large \translate{Terms }{Begriffe }};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=Peach!75!black,,fill=Peach!75!black] at (frame.north east) {\large Notation};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} + overlay={\node[overlaystyle,draw=green!75!black,,fill=green!75!black] at (frame.north east) {\large \translate{Usage }{Nutzung }};},#1} % Task @@ -51,7 +51,7 @@ % General \newtcolorbox{general}[4][]{mainboxstyle,colback=#4!5!white,colframe=#4!75!black,colbacktitle=#4!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} + overlay={\node[overlaystyle,draw=#4!75!black,,fill=#4!75!black] at (frame.north east) {\large #3};},#1} % Simple \newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1} diff --git a/main/style/counters.tex b/main/style/counters.tex index 0d3f959..b6524ac 100644 --- a/main/style/counters.tex +++ b/main/style/counters.tex @@ -46,22 +46,22 @@ % Set the current number of a label \newcommand{\setLabelNumber}[2]{% - \setcounter{#1}{#2}% - \addtocounter{#1}{-1}% - \setcounter{#1ss}{#2}% - \addtocounter{#1ss}{-1}% - \setcounter{#1sss}{#2}% - \addtocounter{#1sss}{-1}% + \setcounter{#1}{#2}% + \addtocounter{#1}{-1}% + \setcounter{#1ss}{#2}% + \addtocounter{#1ss}{-1}% + \setcounter{#1sss}{#2}% + \addtocounter{#1sss}{-1}% } \newcommand{\stepLabelNumber}[1]{% - \stepcounter{#1}% - \stepcounter{#1ss}% - \stepcounter{#1sss}% + \stepcounter{#1}% + \stepcounter{#1ss}% + \stepcounter{#1sss}% } \newcommand{\printcounter}[1]{% - \csname the#1\endcsname + \csname the#1\endcsname } \newcommand{\suffix}{ss} @@ -71,119 +71,119 @@ % │ Counter numbering │ % └ ┘ \newcommand{\preTableAndFigHook}[1]{% - \ifnum\value{numberingConfig}>1 - \ifnum\value{numberSubsections}=1 - \stepcounter{allss} - \else - \ifnum\value{numberSubsections}=2 - \stepcounter{allsss} - \else - \stepcounter{all} - \fi - \fi - \fi + \ifnum\value{numberingConfig}>1 + \ifnum\value{numberSubsections}=1 + \stepcounter{allss} + \else + \ifnum\value{numberSubsections}=2 + \stepcounter{allsss} + \else + \stepcounter{all} + \fi + \fi + \fi } \AtBeginEnvironment{table}{\preTableAndFigHook{table}} \AtBeginEnvironment{figure}{\preTableAndFigHook{figure}} \newcommand{\applyTableAndFigureNumbering}{ - % Tables & Figures - \ifnum\value{numberingConfig}=0 - \renewcommand{\thetable}{} - \renewcommand{\thefigure}{} - \else - \ifnum\value{numberingConfig}=1 - \renewcommand{\thetable}{\sectionNumbering.\arabic{table}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}} - \else - \ifnum\value{numberSubsections}=1 - \renewcommand{\thetable}{\sectionNumbering.\arabic{allss}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}} - \else - \ifnum\value{numberSubsections}=2 - \renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}} - \else - \renewcommand{\thetable}{\sectionNumbering.\arabic{all}} - \renewcommand{\thefigure}{\sectionNumbering.\arabic{all}} - \fi - \fi - \fi - \fi + % Tables & Figures + \ifnum\value{numberingConfig}=0 + \renewcommand{\thetable}{} + \renewcommand{\thefigure}{} + \else + \ifnum\value{numberingConfig}=1 + \renewcommand{\thetable}{\sectionNumbering.\arabic{table}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{figure}} + \else + \ifnum\value{numberSubsections}=1 + \renewcommand{\thetable}{\sectionNumbering.\arabic{allss}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{allss}} + \else + \ifnum\value{numberSubsections}=2 + \renewcommand{\thetable}{\refstepcounter{allsss}\sectionNumbering.\arabic{allsss}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{allsss}} + \else + \renewcommand{\thetable}{\sectionNumbering.\arabic{all}} + \renewcommand{\thefigure}{\sectionNumbering.\arabic{all}} + \fi + \fi + \fi + \fi } \newcommand{\setSubsectionNumbering}[1]{ - \setcounter{numberSubsections}{#1} - \applySubsectionNumbering + \setcounter{numberSubsections}{#1} + \applySubsectionNumbering } \newcommand{\applySubsectionNumbering}{ - \ifnum\value{numberSubsections}=1 - \renewcommand{\sectionNumbering}{\thesubsection} - \renewcommand{\suffix}{ss} - \typeout{Numbering as section.subsection.number} - \else - \ifnum\value{numberSubsections}=2 - \renewcommand{\sectionNumbering}{\thesubsubsection} - \renewcommand{\suffix}{sss} - \typeout{Numbering as section.subsection.subsubsection.number} - \else - \renewcommand{\sectionNumbering}{\thesection} - \renewcommand{\suffix}{} - \typeout{Numbering as section.number} - \fi - \fi - \applyTableAndFigureNumbering + \ifnum\value{numberSubsections}=1 + \renewcommand{\sectionNumbering}{\thesubsection} + \renewcommand{\suffix}{ss} + \typeout{Numbering as section.subsection.number} + \else + \ifnum\value{numberSubsections}=2 + \renewcommand{\sectionNumbering}{\thesubsubsection} + \renewcommand{\suffix}{sss} + \typeout{Numbering as section.subsection.subsubsection.number} + \else + \renewcommand{\sectionNumbering}{\thesection} + \renewcommand{\suffix}{} + \typeout{Numbering as section.number} + \fi + \fi + \applyTableAndFigureNumbering - \renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}} - \renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}} - \renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}} - \renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}} - \renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}} - \renewcommand{\theexample}{\sectionNumbering.\arabic{example}} - \renewcommand{\thefact}{\sectionNumbering.\arabic{fact}} - \renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}} - \renewcommand{\theformula}{\sectionNumbering.\arabic{formula}} - \renewcommand{\theremark}{\sectionNumbering.\arabic{remark}} - \renewcommand{\theall}{\sectionNumbering.\arabic{all}} + \renewcommand{\thelemma}{\sectionNumbering.\arabic{lemma}} + \renewcommand{\thedefinition}{\sectionNumbering.\arabic{definition}} + \renewcommand{\thecorollary}{\sectionNumbering.\arabic{corollary}} + \renewcommand{\thetheorem}{\sectionNumbering.\arabic{theorem}} + \renewcommand{\theaxiom}{\sectionNumbering.\arabic{axiom}} + \renewcommand{\theexample}{\sectionNumbering.\arabic{example}} + \renewcommand{\thefact}{\sectionNumbering.\arabic{fact}} + \renewcommand{\theproposition}{\sectionNumbering.\arabic{proposition}} + \renewcommand{\theformula}{\sectionNumbering.\arabic{formula}} + \renewcommand{\theremark}{\sectionNumbering.\arabic{remark}} + \renewcommand{\theall}{\sectionNumbering.\arabic{all}} - \renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}} - \renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}} - \renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}} - \renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}} - \renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}} - \renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}} - \renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}} - \renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}} - \renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}} - \renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}} - \renewcommand{\theallss}{\sectionNumbering.\arabic{allss}} + \renewcommand{\thelemmass}{\sectionNumbering.\arabic{lemmass}} + \renewcommand{\thedefinitionss}{\sectionNumbering.\arabic{definitionss}} + \renewcommand{\thecorollaryss}{\sectionNumbering.\arabic{corollaryss}} + \renewcommand{\thetheoremss}{\sectionNumbering.\arabic{theoremss}} + \renewcommand{\theaxiomss}{\sectionNumbering.\arabic{axiomss}} + \renewcommand{\theexampless}{\sectionNumbering.\arabic{exampless}} + \renewcommand{\thefactss}{\sectionNumbering.\arabic{factss}} + \renewcommand{\thepropositionss}{\sectionNumbering.\arabic{propositionss}} + \renewcommand{\theformulass}{\sectionNumbering.\arabic{formulass}} + \renewcommand{\theremarkss}{\sectionNumbering.\arabic{remarkss}} + \renewcommand{\theallss}{\sectionNumbering.\arabic{allss}} - \renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}} - \renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}} - \renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}} - \renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}} - \renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}} - \renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}} - \renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}} - \renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}} - \renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}} - \renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}} - \renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}} + \renewcommand{\thelemmasss}{\sectionNumbering.\arabic{lemmasss}} + \renewcommand{\thedefinitionsss}{\sectionNumbering.\arabic{definitionsss}} + \renewcommand{\thecorollarysss}{\sectionNumbering.\arabic{corollarysss}} + \renewcommand{\thetheoremsss}{\sectionNumbering.\arabic{theoremsss}} + \renewcommand{\theaxiomsss}{\sectionNumbering.\arabic{axiomsss}} + \renewcommand{\theexamplesss}{\sectionNumbering.\arabic{examplesss}} + \renewcommand{\thefactsss}{\sectionNumbering.\arabic{factsss}} + \renewcommand{\thepropositionsss}{\sectionNumbering.\arabic{propositionsss}} + \renewcommand{\theformulasss}{\sectionNumbering.\arabic{formulasss}} + \renewcommand{\theremarksss}{\sectionNumbering.\arabic{remarksss}} + \renewcommand{\theallsss}{\sectionNumbering.\arabic{allsss}} } \applySubsectionNumbering % ── Label generation ──────────────────────────────────────────────── \newcommand{\labelSectionGeneration}{% - \ifnum\value{numberSubsections}=1 - \arabic{section}-\arabic{subsection}% - \else - \ifnum\value{numberSubsections}=2 - \arabic{section}-\arabic{subsection}-\arabic{subsubsection}% - \else - \arabic{section}% - \fi - \fi} + \ifnum\value{numberSubsections}=1 + \arabic{section}-\arabic{subsection}% + \else + \ifnum\value{numberSubsections}=2 + \arabic{section}-\arabic{subsection}-\arabic{subsubsection}% + \else + \arabic{section}% + \fi + \fi} \newcommand{\labelIt}[1]{\refstepcounter{#1\suffix}\edef\tempLabel{\genLabel{#1}{\arabic{#1\suffix}}}\label{\tempLabel}} \newcommand{\genLabel}[2]{#1:\labelSectionGeneration-#2} @@ -192,27 +192,27 @@ % │ Number the counters appropriately │ % └ ┘ \newcommand{\usenumberArabic}[1]{% - \ifnum\value{numberingConfig}=1 - \labelIt{#1} - \printcounter{#1\suffix}% - \else - \ifnum\value{numberingConfig}=2 - \ifthenelse{\equal{#1}{definitions}}{% - \labelIt{definition} - \printcounter{definition\suffix}% - }{% - \labelIt{all} - \printcounter{all\suffix}% - }% - \else - \ifnum\value{numberingConfig}=3 - \labelIt{all} - \printcounter{all\suffix}% - \else - \relax% - \fi - \fi - \fi} + \ifnum\value{numberingConfig}=1 + \labelIt{#1} + \printcounter{#1\suffix}% + \else + \ifnum\value{numberingConfig}=2 + \ifthenelse{\equal{#1}{definitions}}{% + \labelIt{definition} + \printcounter{definition\suffix}% + }{% + \labelIt{all} + \printcounter{all\suffix}% + }% + \else + \ifnum\value{numberingConfig}=3 + \labelIt{all} + \printcounter{all\suffix}% + \else + \relax% + \fi + \fi + \fi} % ──────────────────────────────────────────────────────────────────── @@ -225,22 +225,22 @@ % For later change \newcommand{\setNumberingStyle}[1]{ - \typeout{Setting NumberingStyle to #1} - \setcounter{numberingConfig}{#1} - \ifthenelse{\equal{#1}{0}}{}{ - \setcounter{numberingConfigStore}{#1} - } - \applyTableAndFigureNumbering + \typeout{Setting NumberingStyle to #1} + \setcounter{numberingConfig}{#1} + \ifthenelse{\equal{#1}{0}}{}{ + \setcounter{numberingConfigStore}{#1} + } + \applyTableAndFigureNumbering } % Enable / disable numbering \newcommand{\numberingOff}{ - \setcounter{numberingConfig}{0} - \applyTableAndFigureNumbering + \setcounter{numberingConfig}{0} + \applyTableAndFigureNumbering } \newcommand{\numberingOn}{ - \setcounter{numberingConfig}{\value{numberingConfigStore}} - \applyTableAndFigureNumbering + \setcounter{numberingConfig}{\value{numberingConfigStore}} + \applyTableAndFigureNumbering } % ──────────────────────────────────────────────────────────────────── @@ -249,51 +249,51 @@ % │ new page │ % ╰────────────────────────────────────────────────╯ \newcommand{\newsection}{ - \newpage - \newsectionNoPB + \newpage + \newsectionNoPB } % ── Reset definitions, lemma, etc counters, do not add new page ───── \newcommand{\newsectionNoPB}{ - \setcounter{lemma}{0} - \setcounter{definition}{0} - \setcounter{corollary}{0} - \setcounter{theorem}{0} - \setcounter{axiom}{0} - \setcounter{example}{0} - \setcounter{fact}{0} - \setcounter{proposition}{0} - \setcounter{formula}{0} - \setcounter{remark}{0} - \setcounter{all}{0} + \setcounter{lemma}{0} + \setcounter{definition}{0} + \setcounter{corollary}{0} + \setcounter{theorem}{0} + \setcounter{axiom}{0} + \setcounter{example}{0} + \setcounter{fact}{0} + \setcounter{proposition}{0} + \setcounter{formula}{0} + \setcounter{remark}{0} + \setcounter{all}{0} - \setcounter{lemmass}{0} - \setcounter{definitionss}{0} - \setcounter{corollaryss}{0} - \setcounter{theoremss}{0} - \setcounter{axiomss}{0} - \setcounter{exampless}{0} - \setcounter{factss}{0} - \setcounter{propositionss}{0} - \setcounter{formulass}{0} - \setcounter{remarkss}{0} - \setcounter{allss}{0} + \setcounter{lemmass}{0} + \setcounter{definitionss}{0} + \setcounter{corollaryss}{0} + \setcounter{theoremss}{0} + \setcounter{axiomss}{0} + \setcounter{exampless}{0} + \setcounter{factss}{0} + \setcounter{propositionss}{0} + \setcounter{formulass}{0} + \setcounter{remarkss}{0} + \setcounter{allss}{0} - \setcounter{lemmasss}{0} - \setcounter{definitionsss}{0} - \setcounter{corollarysss}{0} - \setcounter{theoremsss}{0} - \setcounter{axiomsss}{0} - \setcounter{examplesss}{0} - \setcounter{factsss}{0} - \setcounter{propositionsss}{0} - \setcounter{formulasss}{0} - \setcounter{remarksss}{0} - \setcounter{allsss}{0} + \setcounter{lemmasss}{0} + \setcounter{definitionsss}{0} + \setcounter{corollarysss}{0} + \setcounter{theoremsss}{0} + \setcounter{axiomsss}{0} + \setcounter{examplesss}{0} + \setcounter{factsss}{0} + \setcounter{propositionsss}{0} + \setcounter{formulasss}{0} + \setcounter{remarksss}{0} + \setcounter{allsss}{0} - % Tables & Figures - \setcounter{table}{0} - \setcounter{figure}{0} + % Tables & Figures + \setcounter{table}{0} + \setcounter{figure}{0} } \newsectionNoPB % Initializes @@ -309,39 +309,39 @@ % Theorems \newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1} + overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorem}};},#1} % Lemmas \newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1} + overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemma}};},#1} % Corollaries \newtcolorbox{corollary}[2][]{mainboxstyle,colback=teal!5!white,colframe=teal!75!black,colbacktitle=teal!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1} + overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollary}};},#1} % Axioms \newtcolorbox{axiom}[2][]{mainboxstyle,colback=JungleGreen!5!white,colframe=JungleGreen!75!black,colbacktitle=JungleGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1} + overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axiom}};},#1} % Facts \newtcolorbox{fact}[2][]{mainboxstyle,colback=SeaGreen!5!white,colframe=SeaGreen!75!black,colbacktitle=SeaGreen!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1} + overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{fact}};},#1} % Propositions \newtcolorbox{proposition}[2][]{mainboxstyle,colback=Cyan!5!white,colframe=Cyan!75!black,colbacktitle=Cyan!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1} + overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{proposition}};},#1} % Examples \newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1} + overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{example}};},#1} % Formula \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 \translate{Formula}{Formel}\usenumberArabic{formula}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel}\usenumberArabic{formula}};},#1} % Remark \newtcolorbox{remark}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2}, - overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1} + overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remark}};},#1} % ──────────────────────────────────────────────────────────────────── diff --git a/main/style/cs.tex b/main/style/cs.tex index 60dfcc8..010a479 100644 --- a/main/style/cs.tex +++ b/main/style/cs.tex @@ -14,12 +14,12 @@ \algrenewcommand{\alglinenumber}[1]{#1} \newenvironment{algo}[1]{ - \begin{algorithm} - \begin{spacing}{1.2} - \caption{\textsc{#1}} - \begin{algorithmic}[1] - }{ - \end{algorithmic} - \end{spacing} - \end{algorithm} + \begin{algorithm} + \begin{spacing}{1.2} + \caption{\textsc{#1}} + \begin{algorithmic}[1] + }{ + \end{algorithmic} + \end{spacing} + \end{algorithm} } diff --git a/main/style/language.tex b/main/style/language.tex index fb62559..cbc28b8 100644 --- a/main/style/language.tex +++ b/main/style/language.tex @@ -4,7 +4,7 @@ % 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[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large \translate{Conjugation}{Konjugation}};},#1} + overlay={\node[overlaystyle,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[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} + overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Forms}{Formen}};},#1} diff --git a/main/style/style.tex b/main/style/style.tex index a82cb8f..cc9134d 100644 --- a/main/style/style.tex +++ b/main/style/style.tex @@ -10,35 +10,35 @@ % 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 - } - } + \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 + } + } } % -------------------- % @@ -46,15 +46,15 @@ % -------------------- % \newcommand{\setFont}[1]{\fontfamily{#1}\selectfont} \newcommand{\setFontType}[1]{ - \ifthenelse{\equal{#1}{mono}}{ - \renewcommand{\familydefault}{\ttdefault} - }{ - \ifthenelse{\equal{#1}{serif}}{ - \renewcommand{\familydefault}{\rmdefault} - }{ - \renewcommand{\familydefault}{\sfdefault} - } - } + \ifthenelse{\equal{#1}{mono}}{ + \renewcommand{\familydefault}{\ttdefault} + }{ + \ifthenelse{\equal{#1}{serif}}{ + \renewcommand{\familydefault}{\rmdefault} + }{ + \renewcommand{\familydefault}{\sfdefault} + } + } } \newcommand{\hrmvspace}{\vspace{-0.25pc}} @@ -72,16 +72,16 @@ % Add a color shade (similar to \fhlc, but nicer boxes) \newcommand{\background}[3]{\tcbox[on line, - boxsep=2pt, - left=0pt, - right=0pt, - top=0pt, - bottom=0pt, - colframe=white, - frame empty, - colback=#1!#2!white, - highlight math style={enhanced} - ] {\textbf{#3}}} + boxsep=2pt, + left=0pt, + right=0pt, + top=0pt, + bottom=0pt, + colframe=white, + frame empty, + colback=#1!#2!white, + highlight math style={enhanced} + ] {\textbf{#3}}} % Abstraction of background, where the brightness is set to 20% \newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}} @@ -116,12 +116,12 @@ % 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} + \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} } diff --git a/main/tables.tex b/main/tables.tex index ce94973..287fde6 100644 --- a/main/tables.tex +++ b/main/tables.tex @@ -10,24 +10,24 @@ % Create new table. #1 Layout, #2 title row \newenvironment{tables}[2]{ - \begin{center} - \begin{tabular}{#1} - \toprule - #2 \\ - \midrule - }{ - \bottomrule - \end{tabular} - \end{center} + \begin{center} + \begin{tabular}{#1} + \toprule + #2 \\ + \midrule + }{ + \bottomrule + \end{tabular} + \end{center} } % Create new table in table env. #1 layout, #2 title row, #3 caption \newenvironment{fullTable}[3]{ - \edef\tableCaption{#3} - \begin{table}[h!] - \begin{tables}{#1}{#2} - }{ - \end{tables} - \caption{\tableCaption} - \end{table} + \edef\tableCaption{#3} + \begin{table}[h!] + \begin{tables}{#1}{#2} + }{ + \end{tables} + \caption{\tableCaption} + \end{table} }