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

@@ -1,38 +0,0 @@
% ┌ ┐
% │ 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}

View File

@@ -1,29 +0,0 @@
% ┌ ┐
% │ Colours │
% └ ┘
% The colour-saturation of the short / inline descriptors (default = 40)
\setcounter{descriptorShadeStrength}{40}
% The colour-saturation of the shade command (default = 20)
\setcounter{shadeStrength}{20}
% You may also use \definecolor{<name>}{rgb}{r, g, b} to define a fully custom color
% see https://www.overleaf.com/learn/latex/Using_colors_in_LaTeX#Creating_your_own_colors for more information
\colorlet{definitioncolor}{blue}
\colorlet{theoremcolor}{ForestGreen}
\colorlet{lemmacolor}{Aquamarine}
\colorlet{corollarycolor}{teal}
\colorlet{axiomcolor}{JungleGreen}
\colorlet{factcolor}{SeaGreen}
\colorlet{propositioncolor}{Cyan}
\colorlet{examplecolor}{gray}
\colorlet{formulacolor}{red}
\colorlet{remarkcolor}{green}
\colorlet{proofcolor}{magenta}
\colorlet{intuitioncolor}{Emerald}
\colorlet{termcolor}{orange}
\colorlet{notationcolor}{Peach}
\colorlet{taskcolor}{gray}
\colorlet{usagecolor}{LimeGreen}
\colorlet{recallcolor}{yellow}
\colorlet{propertiescolor}{purple}

View File

@@ -1,41 +0,0 @@
% ┌ ┐
% │ Naming │
% └ ┘
% Here you may specify how each descriptor is named
\newcommand{\definitionNamingEN}{Definition}
\newcommand{\theoremNamingEN}{Theorem}
\newcommand{\lemmaNamingEN}{Lemma}
\newcommand{\corollaryNamingEN}{Corollary}
\newcommand{\axiomNamingEN}{Axiom}
\newcommand{\factNamingEN}{Fact}
\newcommand{\propositionNamingEN}{Proposition}
\newcommand{\exampleNamingEN}{Example}
\newcommand{\formulaNamingEN}{Formula}
\newcommand{\remarkNamingEN}{Remark}
\newcommand{\proofNamingEN}{Proof}
\newcommand{\intuitionNamingEN}{Intuition}
\newcommand{\termNamingEN}{Term}
\newcommand{\notationNamingEN}{Notation}
\newcommand{\taskNamingEN}{Task}
\newcommand{\usageNamingEN}{Usage}
\newcommand{\recallNamingEN}{Recall}
\newcommand{\propertiesNamingEN}{Properties}
\newcommand{\definitionNamingDE}{Definition}
\newcommand{\theoremNamingDE}{Theorem}
\newcommand{\lemmaNamingDE}{Lemma}
\newcommand{\corollaryNamingDE}{Korollar}
\newcommand{\axiomNamingDE}{Axiom}
\newcommand{\factNamingDE}{Fakt}
\newcommand{\propositionNamingDE}{Satz}
\newcommand{\exampleNamingDE}{Beispiel}
\newcommand{\formulaNamingDE}{Formel}
\newcommand{\remarkNamingDE}{Bemerkung}
\newcommand{\proofNamingDE}{Beweis}
\newcommand{\intuitionNamingDE}{Intuition}
\newcommand{\termNamingDE}{Begriff}
\newcommand{\notationNamingDE}{Notation}
\newcommand{\taskNamingDE}{Aufgabe}
\newcommand{\usageNamingDE}{Nutzung}
\newcommand{\recallNamingDE}{Repetition}
\newcommand{\propertiesNamingDE}{Eigenschaften}

View File

@@ -1,39 +0,0 @@
% ┌ ┐
% │ Numbering │
% └ ┘
% Set a preset, can be combined, separate or off.
% If set to custom, all type specific commands need to be set below.
\newcommand{\numberingpreset}{combined}
% Specify how elements are to be numbered. Can be (X is the current number of the element):
% - none (X)
% - section (section.X)
% - subsection (section.subsection.X)
% - subsubsection (section.subsection.subsubsection.X)
% - paragraph (section.subsection.subsubsection.paragraph.X)
\newcommand{\subsectionnumbering}{subsection}
% Set for a specific type. Can each be combined, separate, default or off:
% If set to anything but 'default', it will override the overarching style
% set by \numberingpreset
\newcommand{\definitionnumbering}{default}
\newcommand{\theoremnumbering}{default}
\newcommand{\lemmanumbering}{default}
\newcommand{\corollarynumbering}{default}
\newcommand{\axiomnumbering}{default}
\newcommand{\factnumbering}{default}
\newcommand{\propositionnumbering}{default}
\newcommand{\examplenumbering}{default}
\newcommand{\formulanumbering}{default}
\newcommand{\remarknumbering}{default}
\newcommand{\proofnumbering}{default}
\newcommand{\intuitionnumbering}{default}
\newcommand{\termnumbering}{default}
\newcommand{\notationnumbering}{default}
\newcommand{\tasknumbering}{default}
\newcommand{\usagenumbering}{default}
\newcommand{\recallnumbering}{default}
\newcommand{\propertiesnumbering}{default}
\newcommand{\tablenumbering}{default}
\newcommand{\figurenumbering}{default}

View File

@@ -35,3 +35,13 @@
\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}
\newcommand{\loadGerman}{
\usepackage[ngerman]{babel}
\renewcommand{\currentLanguage}{de}
}

View File

@@ -1,148 +0,0 @@
% ── 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}}

View File

@@ -14,7 +14,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)}

View File

@@ -66,29 +66,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}

View File

@@ -4,10 +4,6 @@
\RequirePackage{minted}
\RequirePackage{fancyvrb}
% Args: Code.
% Alternative: Use \mint{<language>}|code|
\newcommand{\inlinecode}[1]{\shade{gray}{\texttt{#1}}}
% Args: Language, Code
\newenvironment{code}[1]{
\VerbatimEnvironment

View File

@@ -33,11 +33,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]{
\RequirePackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
\title{\Huge \textbf{#1}}
\newcommand{\setupCheatSheet}[2][true]{
\ifthenelse{\equal{#1}{true}}{
\RequirePackage[a4paper,textwidth=28.5cm,textheight=20cm,landscape]{geometry}
\RequirePackage{flowfram}
\ffvadjustfalse
\setlength{\columnsep}{1cm}
\Ncolumn{3}
}{
\RequirePackage[a4paper,textwidth=28.5cm,textheight=20cm]{geometry}
}
\title{\Huge \textbf{#2}}
\author{\authorTitle}
}
@@ -47,7 +54,7 @@
% └ ┘
% Start document command (required)
\newcommand{\startDocument}{
% TODO: Cheat sheet needs different setup
% TODO: Cheat sheet needs different setup?
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}

View File

@@ -6,6 +6,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 }}

View File

@@ -0,0 +1,69 @@
% ┌ ┐
% │ 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}}

View File

@@ -0,0 +1,33 @@
% ── 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}%
}{}%
}%
}

View File

@@ -0,0 +1,70 @@
% ── 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
}

View File

@@ -17,15 +17,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}}
@@ -59,6 +51,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}{}
@@ -78,3 +73,10 @@
\tableofcontents
\end{tcolorbox}
}
% 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}}

View File

@@ -1,10 +1,17 @@
% ── 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]{%
@@ -12,5 +19,14 @@
\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}{}}

24
src/style/spacing.sty Normal file
View File

@@ -0,0 +1,24 @@
\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
}

View File

@@ -6,13 +6,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}