Update docs (mostly), fixes, etc
Some checks failed
Update docs / build_docs (push) Has been cancelled
Update helpers / build_helpers (push) Successful in 25s

This commit is contained in:
2026-02-21 16:24:21 +01:00
parent 2a592753bf
commit baebaa99d0
45 changed files with 1038 additions and 691 deletions

View File

@@ -49,46 +49,16 @@
\newcommand{\printTranslationOptionEN}[1]{\csname #1NamingEN\endcsname}
\newcommand{\printTranslationOptionDE}[1]{\csname #1NamingDE\endcsname}
\newcommand{\printShortTranslationOptionEN}[1]{\csname #1ShortNamingEN\endcsname}
\newcommand{\printShortTranslationOptionDE}[1]{\csname #1ShortNamingDE\endcsname}
\newboolean{numberingDisabled}
\setboolean{numberingDisabled}{false}
% ┌ ┐
% │ General config │
% └ ┘
% Configure your author name here
\newcommand{\authorTitle}{Janis Hutz\\\url{https://janishutz.com}}
\newcommand{\authorHeaders}{Janis Hutz}
% Configure your address here
\newcommand{\name}{Janis Hutz}
\newcommand{\street}{Street}
\newcommand{\city}{City}
\newcommand{\countrycode}{CH}
% Set the default language
\renewcommand{\currentLanguage}{en}
% ┌ ┐
% │ Rendering │
% └ ┘
% Short descriptors are generated from the naming defined in naming.sty
% You may here configure how they are generated. #1 is the full name.
\newcommand{\shortDescriptorNameTemplate}[1]{\StrBefore[1]{#1}}
% Specify how the inline and short descriptors (e.g. Lemma, etc) are rendered.
% - #1 is the name of the descriptor
% - #2 is the number (correctly rendered according to settings and preceded with space if not disabled)
% - #3 is the name passed (non-empty asserted)
\newcommand{\shortDescriptorTemplate}[3]{\bg{#1color}{\shortDescriptorNameTemplate{\namingTranslate{#1}} #2} \textit{(#3)}}
\newcommand{\inlineDescriptorTemplate}[3]{\bg{#1color}{\namingTranslate{#1} #2}: \textit{(#3)}}
% These are used if no name is provided and argument #4 from above is the missing argument
\newcommand{\anonymousShortDescriptorTemplate}[2]{\bg{#1color}{\shortDescriptorNameTemplate{\namingTranslate{#1}} #2}}
\newcommand{\anonymousInlineDescriptorTemplate}[2]{\bg{#1color}{\namingTranslate{#1} #2}}
% background command config (draws a small box around the content)
\newcommand{\backgroundPadding}{2pt}
\newcommand{\backgroundRounding}{1pt}
\newcommand{\loadGerman}{
\usepackage[ngerman]{babel}
\renewcommand{\currentLanguage}{de}
}
% ┌ ┐
@@ -122,6 +92,33 @@
\colorlet{propertiescolor}{purple}
% ┌ ┐
% │ General config │
% └ ┘
% Configure your author name here
\newcommand{\authorTitle}{Janis Hutz\\\url{https://janishutz.com}}
\newcommand{\authorHeaders}{Janis Hutz}
% ┌ ┐
% │ Rendering │
% └ ┘
% Specify how the inline and short descriptors (e.g. Lemma, etc) are rendered.
% - #1 is the name of the descriptor
% - #2 is the number (correctly rendered according to settings and preceded with space if not disabled)
% - #3 is the name passed (non-empty asserted)
\newcommand{\shortDescriptorTemplate}[3]{\bg{#1color}{\shortNamingTranslate{#1} #2} \textit{(#3)}}
\newcommand{\inlineDescriptorTemplate}[3]{\bg{#1color}{\namingTranslate{#1} #2}: \textit{(#3)}}
% These are used if no name is provided and argument #4 from above is the missing argument
\newcommand{\anonymousShortDescriptorTemplate}[2]{\bg{#1color}{\shortNamingTranslate{#1} #2}}
\newcommand{\anonymousInlineDescriptorTemplate}[2]{\bg{#1color}{\namingTranslate{#1} #2}}
% background command config (draws a small box around the content)
\newcommand{\backgroundPadding}{2pt}
\newcommand{\backgroundRounding}{1pt}
% ┌ ┐
% │ Numbering │
% └ ┘
@@ -159,8 +156,6 @@
\newcommand{\usagenumbering}{default}
\newcommand{\recallnumbering}{default}
\newcommand{\propertiesnumbering}{default}
\newcommand{\tablenumbering}{default}
\newcommand{\figurenumbering}{default}
% ┌ ┐
@@ -206,6 +201,46 @@
\newcommand{\propertiesNamingDE}{Eigenschaften}
% Specify here what they should be shortened to
\newcommand{\definitionShortNamingEN}{D}
\newcommand{\theoremShortNamingEN}{T}
\newcommand{\lemmaShortNamingEN}{L}
\newcommand{\corollaryShortNamingEN}{C}
\newcommand{\axiomShortNamingEN}{A}
\newcommand{\factShortNamingEN}{F}
\newcommand{\propositionShortNamingEN}{P}
\newcommand{\exampleShortNamingEN}{E}
\newcommand{\formulaShortNamingEN}{F}
\newcommand{\remarkShortNamingEN}{R}
\newcommand{\proofShortNamingEN}{Proof}
\newcommand{\intuitionShortNamingEN}{Intuition}
\newcommand{\termShortNamingEN}{Term}
\newcommand{\notationShortNamingEN}{Not.}
\newcommand{\taskShortNamingEN}{Task}
\newcommand{\usageShortNamingEN}{Usage}
\newcommand{\recallShortNamingEN}{Recall}
\newcommand{\propertiesShortNamingEN}{Prop.}
\newcommand{\definitionShortNamingDE}{D}
\newcommand{\theoremShortNamingDE}{T}
\newcommand{\lemmaShortNamingDE}{L}
\newcommand{\corollaryShortNamingDE}{K}
\newcommand{\axiomShortNamingDE}{A}
\newcommand{\factShortNamingDE}{F}
\newcommand{\propositionShortNamingDE}{S}
\newcommand{\exampleShortNamingDE}{Bsp}
\newcommand{\formulaShortNamingDE}{F}
\newcommand{\remarkShortNamingDE}{B}
\newcommand{\proofShortNamingDE}{Bew.}
\newcommand{\intuitionShortNamingDE}{Int.}
\newcommand{\termShortNamingDE}{Begriff}
\newcommand{\notationShortNamingDE}{Not.}
\newcommand{\taskShortNamingDE}{Aufg.}
\newcommand{\usageShortNamingDE}{Nutz.}
\newcommand{\recallShortNamingDE}{Rep.}
\newcommand{\propertiesShortNamingDE}{Eig.}
\newcounter{definitionnone}
\newcounter{definitionsection}[section]
\renewcommand{\thedefinitionsection}{\thesection.\arabic{definitionsection}}
@@ -362,7 +397,33 @@
}, #1
}
\newcommand{\inlineproposition}[1][NONAME]{\inline[#1]{proposition}}\newcommand{\shortproposition}[1][NONAME]{\short[#1]{proposition}}\newcounter{factnone}
\newcommand{\inlineproposition}[1][NONAME]{\inline[#1]{proposition}}\newcommand{\shortproposition}[1][NONAME]{\short[#1]{proposition}}\newcounter{axiomnone}
\newcounter{axiomsection}[section]
\renewcommand{\theaxiomsection}{\thesection.\arabic{axiomsection}}
\newcounter{axiomsubsection}[subsection]
\renewcommand{\theaxiomsubsection}{\thesubsection.\arabic{axiomsubsection}}
\newcounter{axiomsubsubsection}[subsubsection]
\renewcommand{\theaxiomsubsubsection}{\thesubsubsection.\arabic{axiomsubsubsection}}
\newcounter{axiomparagraph}[paragraph]
\renewcommand{\theaxiomparagraph}{\theparagraph.\arabic{axiomparagraph}}
\newtcolorbox{axiom}[2][]{
mainboxstyle,
colback=axiomcolor!5!white,
colframe=axiomcolor!75!black,
colbacktitle=axiomcolor!75!black,
title={\large #2},
overlay={
\node[overlaystyle,
draw=axiomcolor!75!black,
fill=axiomcolor!75!black
] at (frame.north east)
{
\large \tr{\axiomNamingEN}{\axiomNamingDE}\printLabel{axiom}
};
}, #1
}
\newcommand{\inlineaxiom}[1][NONAME]{\inline[#1]{axiom}}\newcommand{\shortaxiom}[1][NONAME]{\short[#1]{axiom}}\newcounter{factnone}
\newcounter{factsection}[section]
\renewcommand{\thefactsection}{\thesection.\arabic{factsection}}
\newcounter{factsubsection}[subsection]
@@ -440,16 +501,16 @@
}, #1
}
\newcommand{\inlineremark}[1][NONAME]{\inline[#1]{remark}}\newcommand{\shortremark}[1][NONAME]{\short[#1]{remark}}\newcounter{combinenone}
\newcounter{combinesection}[section]
\renewcommand{\thecombinesection}{\thesection.\arabic{combinesection}}
\newcounter{combinesubsection}[subsection]
\renewcommand{\thecombinesubsection}{\thesubsection.\arabic{combinesubsection}}
\newcounter{combinesubsubsection}[subsubsection]
\renewcommand{\thecombinesubsubsection}{\thesubsubsection.\arabic{combinesubsubsection}}
\newcounter{combineparagraph}[paragraph]
\renewcommand{\thecombineparagraph}{\theparagraph.\arabic{combineparagraph}}
\newcommand{\inlinecombine}[1][NONAME]{\inline[#1]{combine}}\newcommand{\shortcombine}[1][NONAME]{\short[#1]{combine}}
\newcommand{\inlineremark}[1][NONAME]{\inline[#1]{remark}}\newcommand{\shortremark}[1][NONAME]{\short[#1]{remark}}\newcounter{combinednone}
\newcounter{combinedsection}[section]
\renewcommand{\thecombinedsection}{\thesection.\arabic{combinedsection}}
\newcounter{combinedsubsection}[subsection]
\renewcommand{\thecombinedsubsection}{\thesubsection.\arabic{combinedsubsection}}
\newcounter{combinedsubsubsection}[subsubsection]
\renewcommand{\thecombinedsubsubsection}{\thesubsubsection.\arabic{combinedsubsubsection}}
\newcounter{combinedparagraph}[paragraph]
\renewcommand{\thecombinedparagraph}{\theparagraph.\arabic{combinedparagraph}}
\newcommand{\inlinecombined}[1][NONAME]{\inline[#1]{combined}}\newcommand{\shortcombined}[1][NONAME]{\short[#1]{combined}}
\newcommand{\resetNumbering}{
\setcounter{definitionnone}{0}
@@ -488,6 +549,12 @@
\setcounter{propositionsubsubsection}{0}
\setcounter{propositionparagraph}{0}
\setcounter{axiomnone}{0}
\setcounter{axiomsection}{0}
\setcounter{axiomsubsection}{0}
\setcounter{axiomsubsubsection}{0}
\setcounter{axiomparagraph}{0}
\setcounter{factnone}{0}
\setcounter{factsection}{0}
\setcounter{factsubsection}{0}
@@ -506,11 +573,11 @@
\setcounter{remarksubsubsection}{0}
\setcounter{remarkparagraph}{0}
\setcounter{combinenone}{0}
\setcounter{combinesection}{0}
\setcounter{combinesubsection}{0}
\setcounter{combinesubsubsection}{0}
\setcounter{combineparagraph}{0}
\setcounter{combinednone}{0}
\setcounter{combinedsection}{0}
\setcounter{combinedsubsection}{0}
\setcounter{combinedsubsubsection}{0}
\setcounter{combinedparagraph}{0}
\setcounter{table}{0}
\setcounter{figure}{0}
@@ -534,15 +601,7 @@
% ── Small common style elements ─────────────────────────────────────
% Spacing (vertical)
% TODO: Rework
\newcommand{\hrmvspace}{\vspace{-0.25pc}}
\newcommand{\rmvspace}{\vspace{-0.5pc}}
\newcommand{\mrmvspace}{\vspace{-0.75pc}}
\newcommand{\drmvspace}{\vspace{-1pc}}
\newcommand{\dhrmvspace}{\vspace{-1.25pc}}
\newcommand{\dnrmvspace}{\vspace{-1.5pc}}
\newcommand{\dmrmvspace}{\vspace{-1.75pc}}
\newcommand{\ddrmvspace}{\vspace{-2pc}}
\newcommand{\rmvspace}[1][0.5]{\vspace{-#1pc}}
% Spacing (horizontal)
\newcommand{\smallhspace}{\hspace{2mm}}
@@ -576,6 +635,9 @@
% This command is used for the short and inline descriptors
\newcommand{\bg}[2]{\background{#1}{\arabic{descriptorShadeStrength}}{#2}}
% Add a gray backdrop
\newcommand{\backdrop}[1]{\shade{black}{#1}}
% Print a table of contents as a tcolorbox
\newcommand{\printtoc}[1]{
\renewcommand{\cfttoctitlefont}{}
@@ -597,6 +659,13 @@
}
% Draw box around links. First arg link, second arg display
\newcommand{\hlhref}[2]{\color{MidnightBlue}\fbox{\href{#1}{#2}}\color{black}}
% Same for urls (just one arg tho)
\newcommand{\hlurl}[1]{\color{MidnightBlue}\fbox{\url{#1}}\color{black}}
% ___ _ _____ _ _
% ( _ \ _( ) (_ _) ( ) ( )
% | (_) )_) |_ | | __ \ \/ /
@@ -686,29 +755,28 @@
\newcommand{\dx}{\text{ d}}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
\newcommand{\hastoeq}{\overset{!}{=}}
\newcommand{\Leftrightarrowequiv}{\overset{\cdot}{\Leftrightarrow}}
\newcommand{\Longleftrightarrowequiv}{\overset{\cdot}{\Longleftrightarrow}}
\newcommand{\Rightarrowequiv}{\overset{\cdot}{\Rightarrow}}
\newcommand{\Leftarrowequiv}{\overset{\cdot}{\Leftarrow}}
\newcommand{\defAs}{\overset{\text{def}}{=}}
\newcommand{\der}[1]{\frac{\mbox{d}}{\mbox{d}#1}}
\newcommand{\dern}[2]{\frac{\mbox{d}^{#2}}{\mbox{d}^{#2}#1}}
\newcommand{\parder}[1]{\frac{\partial}{\partial #1}}
\newcommand{\pardern}[2]{\frac{\partial^{#2}}{\partial^{#2} #1}}
\newcommand{\defEquiv}{\overset{\text{def}}{\Leftrightarrow}}
\newcommand{\defImplies}{\overset{\text{def}}{\Rightarrow}}
\newcommand{\divides}{\hspace{0.25em}|\hspace{0.25em}}
\newcommand{\diff}[1]{\frac{\mbox{d}}{\mbox{d}#1}}
\newcommand{\diffn}[2]{\frac{\mbox{d}^{#2}}{\mbox{d}^{#2}#1}}
\newcommand{\pardiff}[1]{\frac{\partial}{\partial #1}}
\newcommand{\pardiffn}[2]{\frac{\partial^{#2}}{\partial^{#2} #1}}
\newcommand{\divider}{\hspace{0.25em}|\hspace{0.25em}}
\newcommand{\lcm}{\text{lcm}}
\newcommand{\limit}[2]{\underset{#1 \rightarrow #2}{\lim}}
\newcommand{\seq}[1]{(#1_n)_{n \geq 1}}
\newcommand{\ser}[2]{\sum_{k = 1}^{#2} #1_k}
\newcommand{\limni}{\limit{n}{\infty}}
\newcommand{\limnz}{\limit{n}{0}}
\newcommand{\limxz}{\limit{x_0}{0}}
\newcommand{\limhz}{\limit{h}{0}}
\newcommand{\liminfni}{\liminf_{n \rightarrow \infty}}
\newcommand{\limsupni}{\limsup_{n \rightarrow \infty}}
\newcommand{\sequence}[1]{(#1_n)_{n \geq 1}}
\newcommand{\series}[2]{\sum_{k = 1}^{#2} #1_k}
\DeclareMathOperator\arctanh{arctanh}
\DeclareMathOperator\arccosh{arccosh}
@@ -721,10 +789,6 @@
\usepackage{minted}
\usepackage{fancyvrb}
% Args: Code.
% Alternative: Use \mint{<language>}|code|
\newcommand{\inlinecode}[1]{\shade{gray}{\texttt{#1}}}
% Args: Language, Code
\newenvironment{code}[1]{
\VerbatimEnvironment
@@ -813,156 +877,6 @@
}
% ── Label generator ─────────────────────────────────────────────────
\newcommand{\printNumberingConfigForDescriptor}[1]{\csname #1numbering\endcsname}
\newcommand{\printCounter}[1]{\refstepcounter{#1}\csname the#1\endcsname}
\newcommand{\printLabel}[1]{%
\ifthenelse{\boolean{numberingDisabled}}{}{
\ifcsdef{#1numbering}{% Extra config present
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{%
\labelPrintBackendRoutine{#1}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{separate}}{%
\printCounter{#1\subsectionnumbering}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{%
\printCounter{combined\subsectionnumbering}%
}{}%
}%
}%
}{%
\labelPrintBackendRoutine{#1}%
}%
}%
}
\newcommand{\labelPrintBackendRoutine}[1]{%
\ifthenelse{\equal{\numberingpreset}{combined}}{%
\printCounter{combined\subsectionnumbering}%
}{
\ifthenelse{\equal{\numberingpreset}{separate}}{%
\printCounter{#1\subsectionnumbering}%
}{}%
}%
}
% ── Set the current number of a label ───────────────────────────────
\newcommand{\setLabelNumber}[2]{%
\setcounter{#1none}{#2}%
\addtocounter{#1none}{-1}%
\setcounter{#1section}{#2}%
\addtocounter{#1section}{-1}%
\setcounter{#1subsection}{#2}%
\addtocounter{#1subsection}{-1}%
\setcounter{#1subsubsection}{#2}%
\addtocounter{#1subsubsection}{-1}%
\setcounter{#1paragraph}{#2}%
\addtocounter{#1paragraph}{-1}%
}
\newcommand{\stepLabelNumber}[1]{%
\stepcounter{#1none}%
\stepcounter{#1section}%
\stepcounter{#1subsection}%
\stepcounter{#1subsubsection}%
\stepcounter{#1paragraph}%
}
% ┌ ┐
% │ Counter numbering │
% └ ┘
\newcommand{\preEnvHook}[1]{%
\ifthenelse{\boolean{numberingDisabled}}{}{
\ifthenelse{\equal{\numberingpreset}{combined} \AND \equal{\printNumberingConfigForDescriptor{#1}}{default}}{%
\stepLabelNumber{combined}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{%
\stepLabelNumber{combined}%
}{}%
}%
}%
}
% Decides on the numbering to use (combined or not)
\newcommand{\tableAndFigureNumberingHelper}[1]{%
\ifthenelse{\boolean{numberingDisabled}}{}{
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}{default}}}{% Using default
\ifthenelse{\equal{\numberingpreset}{combined}}{%
\tableAndFigureSubsectionPrinting{\value{combined\subsectionnumbering}}%
}{%
\ifthenelse{\equal{\numberingpreset}{separate}}{%
\tableAndFigureSubsectionPrinting{\value{#1}}%
}{}%
}%
}{% if we get here, default has been changed
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}{combined}}}{%
\tableAndFigureSubsectionPrinting{\value{combined\subsectionnumbering}}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}{separate}}}{%
\tableAndFigureSubsectionPrinting{\value{#1}}%
}{}%
}%
}%
}%
}
% Prints the preceding subsection numbers
\newcommand{\tableAndFigureSubsectionPrinting}[1]{%
\ifthenelse{\equal{\subsectionnumbering}{section}}{%
\thesection.#1%
}{%
\ifthenelse{\equal{\subsectionnumbering}{subsection}}{%
\thesubsection.#1%
}{%
\ifthenelse{\equal{\subsectionnumbering}{subsubsection}}{%
\thesubsubsection.#1%
}{%
\ifthenelse{\equal{\subsectionnumbering}{paragraph}}{%
\theparagraph.#1
}{%
#1
}%
}%
}%
}%
}
\renewcommand{\thetable}{\tableAndFigureNumberingHelper{table}}
\renewcommand{\thefigure}{\tableAndFigureNumberingHelper{figure}}
\AtBeginEnvironment{table}{\preEnvHook{table}}
\AtBeginEnvironment{figure}{\preEnvHook{figure}}
\newcommand{\newsection}{%
\newpage
\newsectionNoPB
}
\newcommand{\newsectionNoPB}{
\ifthenelse{\equal{\numberingpreset}{off}}{}{%
\resetNumbering%
}%
}
\newcommand{\resetTableAndFigureNumbering}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{table}}{combined} \OR \equal{\printNumberingConfigForDescriptor{table}{default}}}{%
\setcounter{table}{0}
}{}%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{figure}}{combined} \OR \equal{\printNumberingConfigForDescriptor{figure}{default}}}{%
\setcounter{figure}{0}
}{}%
}
% Numbering toggling
\newboolean{numberingDisabled}
\setboolean{numberingDisabled}{false}
\newcommand{\numberingOff}{\setboolean{numberingDisabled}{true}}
\newcommand{\numberingOn}{\setboolean{numberingDisabled}{false}}
% Add glossaries functionality
\newcommand{\setupGlossary}{
@@ -985,6 +899,7 @@
}
\newcommand{\tr}[2]{\translate{#1}{#2}}
\newcommand{\namingTranslate}[1]{\translate{\printTranslationOptionEN{#1}}{\printTranslationOptionEN{#1}}}
\newcommand{\shortNamingTranslate}[1]{\translate{\printShortTranslationOptionEN{#1}}{\printShortTranslationOptionEN{#1}}}
% Translation aids (commonly used)
\newcommand{\trif}{\translate{if }{falls }}
@@ -1035,11 +950,18 @@
}
% TODO: Use landscape and columns for new version
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupCheatSheet}[1]{
\usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{\Huge \textbf{#1}}
\newcommand{\setupCheatSheet}[2][true]{
\ifthenelse{\equal{#1}{true}}{
\usepackage[a4paper,textwidth=28.5cm,textheight=20cm,landscape]{geometry}
\usepackage{flowfram}
\ffvadjustfalse
\setlength{\columnsep}{1cm}
\Ncolumn{3}
}{
\usepackage[a4paper,textwidth=28.5cm,textheight=20cm]{geometry}
}
\title{\Huge \textbf{#2}}
\author{\authorTitle}
}
@@ -1049,7 +971,7 @@
% └ ┘
% Start document command (required)
\newcommand{\startDocument}{
% TODO: Cheat sheet needs different setup
% TODO: Cheat sheet needs different setup?
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
@@ -1102,7 +1024,6 @@
\newcommand{\Indent}{\hspace{\algorithmicindent}}
\newcommand{\tc}[1]{\tco{#1}}
\newcommand{\tct}[1]{\Theta\left(#1\right)}
\newcommand{\tco}[1]{\mathcal{O}\left(#1\right)}
\newcommand{\tcl}[1]{\Omega\left(#1\right)}
@@ -1119,6 +1040,184 @@
\newcommand{\class}{\text{\tr{Cl}{Kl}}}
% ── Set the current number of a label ───────────────────────────────
\newcommand{\setLabelNumber}[2]{%
\setcounter{#1none}{#2}%
\addtocounter{#1none}{-1}%
\setcounter{#1section}{#2}%
\addtocounter{#1section}{-1}%
\setcounter{#1subsection}{#2}%
\addtocounter{#1subsection}{-1}%
\setcounter{#1subsubsection}{#2}%
\addtocounter{#1subsubsection}{-1}%
\setcounter{#1paragraph}{#2}%
\addtocounter{#1paragraph}{-1}%
}
\newcommand{\stepLabelNumber}[1]{%
\stepcounter{#1none}%
\stepcounter{#1section}%
\stepcounter{#1subsection}%
\stepcounter{#1subsubsection}%
\stepcounter{#1paragraph}%
}
\newcommand{\newsection}{%
\newpage
\newsectionNoPB
}
\newcommand{\newsectionNoPB}{
\ifthenelse{\equal{\numberingpreset}{off}}{}{%
\resetNumbering%
\resetTableAndFigureNumbering%
}%
}
\newcommand{\resetTableAndFigureNumbering}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{table}}{combined}}{
\setcounter{table}{0}
}{}%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{table}}{default}}{
\setcounter{table}{0}
}{}%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{figure}}{combined}}{%
\setcounter{figure}{0}
}{}%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{figure}}{default}}{
\setcounter{figure}{0}
}{}%
}
% Numbering toggling
\newcommand{\numberingOff}{
\setboolean{numberingDisabled}{true}
\loadNumberingConfig
}
\newcommand{\numberingOn}{
\setboolean{numberingDisabled}{false}
\loadNumberingConfig
}
\newcommand{\setsubsectionnumbering}[1]{
\renewcommand{\subsectionnumbering}{#1}
\loadNumberingConfig
}
\newcommand{\setnumberingpreset}[1]{
\renewcommand{\numberingpreset}{#1}
\loadNumberingConfig
}
% ── Label generator ─────────────────────────────────────────────────
\newcommand{\printNumberingConfigForDescriptor}[1]{\csname #1numbering\endcsname}
\newcommand{\printCounter}[1]{\refstepcounter{#1}\csname the#1\endcsname}
\newcommand{\printLabel}[1]{%
\ifthenelse{\boolean{numberingDisabled}}{}{
\ifcsdef{#1numbering}{% Extra config present
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{%
\labelPrintBackendRoutine{#1}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{separate}}{%
\printCounter{#1\subsectionnumbering}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{%
\printCounter{combined\subsectionnumbering}%
}{}%
}%
}%
}{%
\labelPrintBackendRoutine{#1}%
}%
}%
}
\newcommand{\labelPrintBackendRoutine}[1]{%
\ifthenelse{\equal{\numberingpreset}{combined}}{%
\printCounter{combined\subsectionnumbering}%
}{
\ifthenelse{\equal{\numberingpreset}{separate}}{%
\printCounter{#1\subsectionnumbering}%
}{}%
}%
}
% ┌ ┐
% │ Counter numbering │
% └ ┘
\newcommand{\preEnvHook}[1]{%
\stepLabelNumber{combined}%
\ifthenelse{\equal{\numberingpreset}{combined}}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{
\stepLabelNumber{combined}%
}{}%
}{%
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{%
\stepLabelNumber{combined}%
}{}%
}%
}
% Decides on the numbering to use (combined or not)
\newcommand{\loadNumberingConfiguration}{%
\ifthenelse{\boolean{numberingDisabled}}{%
\renewcommand{\thetable}{\arabic{table}}
\renewcommand{\thefigure}{\arabic{figure}}
}{
\ifthenelse{\equal{\numberingpreset}{combined}}{%
\ifthenelse{\equal{\subsectionnumbering}{none}}{
\renewcommand{\thetable}{\arabic{combinednone}}
\renewcommand{\thefigure}{\arabic{combinednone}}
}{%
\renewcommand{\thetable}{\ssprinter.\arabic{combined\subsectionnumbering}}
\renewcommand{\thefigure}{\ssprinter.\arabic{combined\subsectionnumbering}}
}%
}{%
\ifthenelse{\equal{\numberingpreset}{separate}}{
\ifthenelse{\equal{\subsectionnumbering}{none}}{}{
\renewcommand{\thetable}{\ssprinter.\arabic{table}}
\renewcommand{\thefigure}{\ssprinter.\arabic{figure}}
}
}{%
\renewcommand{\thetable}{\arabic{table}}
\renewcommand{\thefigure}{\arabic{figure}}
}%
}%
}%
}
% Prints the preceding subsection numbers
\newcommand{\ssprinter}{\thesection}
\newcommand{\generateSubsection}{%
\ifthenelse{\equal{\subsectionnumbering}{section}}{%
\renewcommand{\ssprinter}{\thesection}
}{%
\ifthenelse{\equal{\subsectionnumbering}{subsection}}{%
\renewcommand{\ssprinter}{\thesubsection}
}{%
\ifthenelse{\equal{\subsectionnumbering}{subsubsection}}{%
\renewcommand{\ssprinter}{\thesubsubsection}
}{%
\ifthenelse{\equal{\subsectionnumbering}{paragraph}}{%
\renewcommand{\ssprinter}{\theparagraph}
}{
\renewcommand{\ssprinter}{}
}%
}%
}%
}%
}
\loadNumberingConfiguration
\AtBeginEnvironment{table}{\preEnvHook{table}}
\AtBeginEnvironment{figure}{\preEnvHook{figure}}
% ┌ ┐
% │ STYLE: Math │
% └ ┘
@@ -1130,13 +1229,46 @@
\newcommand{\proven}{$\hspace{17cm}\square$}
\newcommand{\noverticalspacing}{
\abovedisplayskip 1pt plus 2pt minus 1pt
\belowdisplayskip 1pt plus 2pt minus 1pt
\abovedisplayshortskip -10pt
\belowdisplayshortskip 1pt plus 2pt minus 1pt
}
\newcommand{\smallverticalspacing}{
\abovedisplayskip 4pt plus 3pt minus 2pt
\belowdisplayskip 5pt plus 5pt minus 2pt
\abovedisplayshortskip -5pt
\belowdisplayshortskip 3pt plus 4pt minus 2pt
}
\newcommand{\mediumverticalspacing}{
\abovedisplayskip 7pt plus 4pt minus 3pt
\belowdisplayskip 9pt plus 6pt minus 3pt
\abovedisplayshortskip 0pt
\belowdisplayshortskip 5pt plus 4pt minus 2pt
}
\newcommand{\largeverticalspacing}{
\abovedisplayskip 13pt plus 3pt minus 1pt
\belowdisplayskip 15pt plus 9pt minus 6pt
\abovedisplayshortskip 5pt plus 2pt minus 3pt
\belowdisplayshortskip 7pt plus 5pt minus 2pt
}
% ── Inline environments ─────────────────────────────────────────────
% TODO: ref label generation
\newcommand{\inline}[2][NONAME]{%
\ifthenelse{\equal{NONAME}{#1}}{%
\anonymousInlineDescriptorTemplate{#2}{\printLabel{#2}}%
}{%
\inlineDescriptorTemplate{#2}{\printLabel{#2}}{#1}%
}
}%
}
\newcommand{\labeledInline}[3][NONAME]{%
\edef{\tempLabel}{#3}
\label{\tempLabel}
\inline[#1]{#2}
}
\newcommand{\short}[2][NONAME]{%
@@ -1144,9 +1276,18 @@
\anonymousShortDescriptorTemplate{#2}{\printLabel{#2}}%
}{%
\shortDescriptorTemplate{#2}{\printLabel{#2}}{#1}%
}
}%
}
\newcommand{\labeledShort}[3][NONAME]{%
\edef{\tempLabel}{#3}
\label{\tempLabel}
\short[#1]{#2}
}
\newcommand{\inlineproof}{\anonymousInlineDescriptorTemplate{proof}{}}
\newcommand{\shortproof}{\anonymousShortDescriptorTemplate{proof}{}}
% ┌ ┐
% │ STYLE: Common tcolorboxes │
@@ -1156,13 +1297,6 @@
\newtcolorbox{recall}[2][]{mainboxstyle,colback=recallcolor!5!white,colframe=recallcolor!75!black,colbacktitle=recallcolor!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=recallcolor!75!black,,fill=recallcolor!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}
\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}
\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}