Some fixes
This commit is contained in:
@@ -207,35 +207,6 @@
|
||||
\newcommand{\propertiesNamingDE}{Eigenschaften}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Translation │
|
||||
% └ ┘
|
||||
\newcommand{\translate}[2]{%
|
||||
\ifthenelse{\equal{\currentLanguage}{en}}{#1}{#2}
|
||||
}
|
||||
\newcommand{\tr}[2]{\translate{#1}{#2}}
|
||||
|
||||
% Translation aids (commonly used)
|
||||
\newcommand{\trif}{\translate{if }{falls }}
|
||||
\newcommand{\trIf}{\translate{If }{Falls }}
|
||||
\newcommand{\trLet}{\translate{Let }{Sei }}
|
||||
\newcommand{\trLets}{\translate{Let }{Seien }}
|
||||
\newcommand{\trFor}{\translate{For }{Für }}
|
||||
\newcommand{\trfor}{\translate{for }{für }}
|
||||
\newcommand{\trand}{\translate{and }{und }}
|
||||
\newcommand{\tror}{\translate{or }{oder }}
|
||||
\newcommand{\trst}{\translate{s.t. }{s.d. }}
|
||||
\newcommand{\trsuchthat}{\translate{such that }{so dass }}
|
||||
\newcommand{\trwith}{\translate{with }{mit }}
|
||||
|
||||
|
||||
\DeclareOption{de}{
|
||||
\RequirePackage[ngerman]{babel}
|
||||
\renewcommand{\currentLanguage}{de}
|
||||
}
|
||||
\ProcessOptions
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ STYLE: Globals │
|
||||
% └ ┘
|
||||
@@ -351,3 +322,761 @@
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Math │
|
||||
% └ ┘
|
||||
|
||||
% BB shortcuts (for number spaces, etc)
|
||||
\newcommand{\A}{\mathbb{A}}
|
||||
\newcommand{\B}{\mathbb{B}}
|
||||
\newcommand{\C}{\mathbb{C}}
|
||||
\newcommand{\D}{\mathbb{D}}
|
||||
\newcommand{\E}{\mathbb{E}}
|
||||
\newcommand{\F}{\mathbb{F}}
|
||||
\newcommand{\G}{\mathbb{G}}
|
||||
\renewcommand{\H}{\mathbb{H}}
|
||||
\newcommand{\I}{\mathbb{I}}
|
||||
\newcommand{\J}{\mathbb{J}}
|
||||
\newcommand{\K}{\mathbb{K}}
|
||||
\renewcommand{\L}{\mathbb{L}}
|
||||
\newcommand{\M}{\mathbb{M}}
|
||||
\newcommand{\N}{\mathbb{N}}
|
||||
\renewcommand{\O}{\mathbb{O}}
|
||||
\renewcommand{\P}{\mathbb{P}}
|
||||
\newcommand{\Q}{\mathbb{Q}}
|
||||
\newcommand{\R}{\mathbb{R}}
|
||||
\renewcommand{\S}{\mathbb{S}}
|
||||
\newcommand{\T}{\mathbb{T}}
|
||||
\newcommand{\U}{\mathbb{U}}
|
||||
\newcommand{\V}{\mathbb{V}}
|
||||
\newcommand{\W}{\mathbb{W}}
|
||||
\newcommand{\X}{\mathbb{X}}
|
||||
\newcommand{\Y}{\mathbb{Y}}
|
||||
\newcommand{\Z}{\mathbb{Z}}
|
||||
|
||||
% Caligraphic
|
||||
\newcommand{\cA}{\mathcal{A}}
|
||||
\newcommand{\cB}{\mathcal{B}}
|
||||
\newcommand{\cC}{\mathcal{C}}
|
||||
\newcommand{\cD}{\mathcal{D}}
|
||||
\newcommand{\cE}{\mathcal{E}}
|
||||
\newcommand{\cF}{\mathcal{F}}
|
||||
\newcommand{\cG}{\mathcal{G}}
|
||||
\newcommand{\cH}{\mathcal{H}}
|
||||
\newcommand{\cI}{\mathcal{I}}
|
||||
\newcommand{\cJ}{\mathcal{J}}
|
||||
\newcommand{\cK}{\mathcal{K}}
|
||||
\newcommand{\cL}{\mathcal{L}}
|
||||
\newcommand{\cM}{\mathcal{M}}
|
||||
\newcommand{\cN}{\mathcal{N}}
|
||||
\newcommand{\cO}{\mathcal{O}}
|
||||
\newcommand{\cP}{\mathcal{P}}
|
||||
\newcommand{\cQ}{\mathcal{Q}}
|
||||
\newcommand{\cR}{\mathcal{R}}
|
||||
\newcommand{\cS}{\mathcal{S}}
|
||||
\newcommand{\cT}{\mathcal{T}}
|
||||
\newcommand{\cU}{\mathcal{U}}
|
||||
\newcommand{\cV}{\mathcal{V}}
|
||||
\newcommand{\cW}{\mathcal{W}}
|
||||
\newcommand{\cX}{\mathcal{X}}
|
||||
\newcommand{\cY}{\mathcal{Y}}
|
||||
\newcommand{\cZ}{\mathcal{Z}}
|
||||
|
||||
% other useful shortcuts
|
||||
\newcommand{\elementstack}[2]{\genfrac{}{}{0pt}{}{#1}{#2}}
|
||||
\newcommand{\8}{\infty}
|
||||
\newcommand{\cond}{\text{cond}}
|
||||
\newcommand{\argmin}[1]{\underset{#1}{\text{argmin}}}
|
||||
\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{\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}}
|
||||
|
||||
\DeclareMathOperator\arctanh{arctanh}
|
||||
\DeclareMathOperator\arccosh{arccosh}
|
||||
\DeclareMathOperator\arcsinh{arcsinh}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Index │
|
||||
% └ ┘
|
||||
|
||||
% For using index package
|
||||
\newcommand{\prepareIndex}{
|
||||
\RequirePackage[T1]{fontenc}
|
||||
\RequirePackage{imakeidx}
|
||||
\makeindex
|
||||
}
|
||||
|
||||
\newcommand{\addIndexBold}[1]{\textbf{\index{\MakeLowercase{#1}} #1}}
|
||||
\newcommand{\addIndexItalic}[1]{\textit{\index{\MakeLowercase{#1}} #1}}
|
||||
\newcommand{\addIndex}[1]{\index{\MakeLowercase{#1}} #1}
|
||||
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Tables │
|
||||
% └ ┘
|
||||
|
||||
\RequirePackage{booktabs}
|
||||
\RequirePackage{tabulary}
|
||||
|
||||
% Create new table. #1 Layout, #2 title row
|
||||
\newenvironment{tables}[2]{
|
||||
\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}
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Translation │
|
||||
% └ ┘
|
||||
\newcommand{\translate}[2]{%
|
||||
\ifthenelse{\equal{\currentLanguage}{en}}{#1}{#2}
|
||||
}
|
||||
\newcommand{\tr}[2]{\translate{#1}{#2}}
|
||||
|
||||
% Translation aids (commonly used)
|
||||
\newcommand{\trif}{\translate{if }{falls }}
|
||||
\newcommand{\trIf}{\translate{If }{Falls }}
|
||||
\newcommand{\trLet}{\translate{Let }{Sei }}
|
||||
\newcommand{\trLets}{\translate{Let }{Seien }}
|
||||
\newcommand{\trFor}{\translate{For }{Für }}
|
||||
\newcommand{\trfor}{\translate{for }{für }}
|
||||
\newcommand{\trand}{\translate{and }{und }}
|
||||
\newcommand{\tror}{\translate{or }{oder }}
|
||||
\newcommand{\trst}{\translate{s.t. }{s.d. }}
|
||||
\newcommand{\trsuchthat}{\translate{such that }{so dass }}
|
||||
\newcommand{\trwith}{\translate{with }{mit }}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ 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
|
||||
\RequirePackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\author{\authorTitle}
|
||||
\makeatletter
|
||||
\makeatother
|
||||
\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}}
|
||||
}
|
||||
}
|
||||
|
||||
% Set up the latex document, only configuring the author, title and page size
|
||||
\newcommand{\setupBarebones}[1]{
|
||||
\loadLang
|
||||
\RequirePackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\author{\authorTitle}
|
||||
}
|
||||
|
||||
|
||||
% 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]{
|
||||
\loadLang
|
||||
\RequirePackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\author{\authorTitle}
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ Document start │
|
||||
% └ ┘
|
||||
% Start document command (required)
|
||||
\newcommand{\startDocument}{
|
||||
\maketitle
|
||||
\pagestyle{fancy}
|
||||
\thispagestyle{fancy}
|
||||
}
|
||||
|
||||
|
||||
|
||||
% ░▒█▀▀▄░▄▀▀▄░█▀▄▀█░▄▀▀▄░█░▒█░▀█▀░█▀▀░█▀▀▄░░░▒█▀▀▀█░█▀▄░░▀░░█▀▀░█▀▀▄░█▀▄░█▀▀
|
||||
% ░▒█░░░░█░░█░█░▀░█░█▄▄█░█░▒█░░█░░█▀▀░█▄▄▀░░░░▀▀▀▄▄░█░░░░█▀░█▀▀░█░▒█░█░░░█▀▀
|
||||
% ░▒█▄▄▀░░▀▀░░▀░░▒▀░█░░░░░▀▀▀░░▀░░▀▀▀░▀░▀▀░░░▒█▄▄▄█░▀▀▀░▀▀▀░▀▀▀░▀░░▀░▀▀▀░▀▀▀
|
||||
|
||||
% Extra imports
|
||||
\RequirePackage{stmaryrd}
|
||||
\RequirePackage{algorithm}
|
||||
\RequirePackage{algpseudocodex}
|
||||
\RequirePackage{setspace}
|
||||
\RequirePackage{verbatim}
|
||||
\RequirePackage{turnstile}
|
||||
\RequirePackage{forloop}
|
||||
|
||||
\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)}
|
||||
\newcommand{\wordbool}{(\Sigma_{\text{bool}})^*}
|
||||
\newcommand{\words}[1]{(\Sigma_{\text{#1}})^*}
|
||||
\newcommand{\word}{\Sigma^*}
|
||||
\newcommand{\wordm}[1]{\Sigma_{\text{#1}}^*}
|
||||
\newcommand{\alphabets}[1]{\Sigma_{\text{#1}}}
|
||||
\newcommand{\alphabetbool}{\Sigma_{\text{bool}}}
|
||||
\newcommand{\tR}{\text{R}}
|
||||
\newcommand{\tC}{\text{C}}
|
||||
\newcommand{\tN}{\text{N}}
|
||||
\newcommand{\bigvdash}[2]{\sststile{#1}{#2}}
|
||||
\newcommand{\class}{\text{\tr{Cl}{Kl}}}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ STYLE: Math │
|
||||
% └ ┘
|
||||
|
||||
% Add shortcuts to commonly used commands
|
||||
\newcommand{\vect}[1]{\overrightarrow{#1}}
|
||||
\renewcommand{\hat}[1]{\widehat{#1}}
|
||||
\renewcommand{\tilde}[1]{\widetilde{#1}}
|
||||
\newcommand{\proven}{$\hspace{17cm}\square$}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ STYLE: Common tcolorboxes │
|
||||
% └ ┘
|
||||
% TODO: Update colors
|
||||
|
||||
\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}
|
||||
|
||||
\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}
|
||||
|
||||
\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}
|
||||
|
||||
\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}
|
||||
|
||||
\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}
|
||||
|
||||
\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}
|
||||
|
||||
|
||||
\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}
|
||||
|
||||
|
||||
% Task
|
||||
\newtcolorbox{task}[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{Task}{Aufgabe}};},#1}
|
||||
|
||||
|
||||
% Proof
|
||||
\newtcolorbox{proof}[2][]{mainboxstyle,colback=magenta!5!white,colframe=magenta!75!black,colbacktitle=magenta!75!black,title={\large #2},overlay={\node[overlaystyle,draw=magenta!75!black,fill=magenta!75!black] at (frame.north east) {\large \translate{Proof}{Beweis}};},#1}
|
||||
|
||||
|
||||
% 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}
|
||||
|
||||
% Simple
|
||||
\newtcolorbox{simplebox}[2][]{colback=#2!5!white,colframe=#2!75!black,#1}
|
||||
|
||||
|
||||
% ── Label generator ─────────────────────────────────────────────────
|
||||
\newcommand{\printNumberingConfigForDescriptor}[1]{\csname #1numbering\endcsname}
|
||||
\newcommand{\printCounter}[1]{\csname the#1\endcsname}
|
||||
|
||||
\newcommand{\printLabel}[1]{%
|
||||
\ifcsdef{#1numbering}{% Extra config present
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{
|
||||
\printCounter{#1\subsectionnumbering}%
|
||||
}{
|
||||
\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}%
|
||||
}{}
|
||||
}
|
||||
}
|
||||
|
||||
% Inline environments (inline)
|
||||
\newcommand{\printTranslationOptionEN}[1]{\csname #1NamingEN\endcsname}
|
||||
\newcommand{\printTranslationOptionDE}[1]{\csname #1NamingDE\endcsname}
|
||||
|
||||
\newcommand{\inline}[2][__NONAME__]{%
|
||||
\ifthenelse{\equal{__NONAME__}{#1}}{%
|
||||
\anonymousInlineDescriptorTemplate{#2}{\printLabel{#2}}%
|
||||
}{%
|
||||
\inlineDescriptorTemplate{#2}{\printLabel{#2}}{#1}%
|
||||
}
|
||||
}
|
||||
|
||||
\newcommand{\short}[2][__NONAME__]{%
|
||||
\ifthenelse{\equal{__NONAME__}{#1}}{%
|
||||
\anonymousShortDescriptorTemplate{#2}{\printLabel{#2}}%
|
||||
}{%
|
||||
\shortDescriptorTemplate{#2}{\printLabel{#2}}{#1}%
|
||||
}
|
||||
}
|
||||
|
||||
% ── 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 │
|
||||
% └ ┘
|
||||
% TODO: Update
|
||||
\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
|
||||
\renewcommand{\thetable}{\arabic{table}}
|
||||
\renewcommand{\thefigure}{\arabic{figure}}
|
||||
}
|
||||
\AtBeginEnvironment{table}{\preTableAndFigHook{table}}
|
||||
\AtBeginEnvironment{figure}{\preTableAndFigHook{figure}}
|
||||
|
||||
|
||||
\newcommand{\newsection}{
|
||||
\newpage
|
||||
\newsectionNoPB
|
||||
}
|
||||
|
||||
|
||||
% ┌ ┐
|
||||
% │ STYLE: Computer Science │
|
||||
% └ ┘
|
||||
\RequirePackage{forest}
|
||||
\tikzset{algpxIndentLine/.style={draw=lightgray}}
|
||||
\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}
|
||||
}
|
||||
|
||||
|
||||
\newcounter{definitionnone}
|
||||
\newcounter{definitionsection}[section]
|
||||
\renewcommand{\thedefinitionsection}{\thesection.\arabic{definitionsection}}
|
||||
\newcounter{definitionsubsection}[subsection]
|
||||
\renewcommand{\thedefinitionsubsection}{\thesection.\thesubsection.\arabic{definitionsubsection}}
|
||||
\newcounter{definitionsubsubsection}[subsubsection]
|
||||
\renewcommand{\thedefinitionsubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{definitionsubsubsection}}
|
||||
\newcounter{definitionparagraph}[paragraph]
|
||||
\renewcommand{\thedefinitionparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{definitionparagraph}}
|
||||
\newtcolorbox{definition}[2][]{
|
||||
mainboxstyle,
|
||||
colback=definitioncolor!5!white,
|
||||
colframe=definitioncolor!75!black,
|
||||
colbacktitle=definitioncolor!75!black,
|
||||
title={\large #2},
|
||||
overlay={
|
||||
\node[overlaystyle,
|
||||
draw=definitioncolor!75!black,
|
||||
fill=definitioncolor!75!black
|
||||
] at (frame.north east)
|
||||
{
|
||||
\large \tr{\definitionNamingEN}{\definitionNamingDE}\printLabel{definition}
|
||||
};
|
||||
}, #1
|
||||
}
|
||||
|
||||
\newcounter{examplenone}
|
||||
\newcounter{examplesection}[section]
|
||||
\renewcommand{\theexamplesection}{\thesection.\arabic{examplesection}}
|
||||
\newcounter{examplesubsection}[subsection]
|
||||
\renewcommand{\theexamplesubsection}{\thesection.\thesubsection.\arabic{examplesubsection}}
|
||||
\newcounter{examplesubsubsection}[subsubsection]
|
||||
\renewcommand{\theexamplesubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{examplesubsubsection}}
|
||||
\newcounter{exampleparagraph}[paragraph]
|
||||
\renewcommand{\theexampleparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{exampleparagraph}}
|
||||
\newtcolorbox{example}[2][]{
|
||||
mainboxstyle,
|
||||
colback=examplecolor!5!white,
|
||||
colframe=examplecolor!75!black,
|
||||
colbacktitle=examplecolor!75!black,
|
||||
title={\large #2},
|
||||
overlay={
|
||||
\node[overlaystyle,
|
||||
draw=examplecolor!75!black,
|
||||
fill=examplecolor!75!black
|
||||
] at (frame.north east)
|
||||
{
|
||||
\large \tr{\exampleNamingEN}{\exampleNamingDE}\printLabel{example}
|
||||
};
|
||||
}, #1
|
||||
}
|
||||
|
||||
\newcounter{theoremnone}
|
||||
\newcounter{theoremsection}[section]
|
||||
\renewcommand{\thetheoremsection}{\thesection.\arabic{theoremsection}}
|
||||
\newcounter{theoremsubsection}[subsection]
|
||||
\renewcommand{\thetheoremsubsection}{\thesection.\thesubsection.\arabic{theoremsubsection}}
|
||||
\newcounter{theoremsubsubsection}[subsubsection]
|
||||
\renewcommand{\thetheoremsubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{theoremsubsubsection}}
|
||||
\newcounter{theoremparagraph}[paragraph]
|
||||
\renewcommand{\thetheoremparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{theoremparagraph}}
|
||||
\newtcolorbox{theorem}[2][]{
|
||||
mainboxstyle,
|
||||
colback=theoremcolor!5!white,
|
||||
colframe=theoremcolor!75!black,
|
||||
colbacktitle=theoremcolor!75!black,
|
||||
title={\large #2},
|
||||
overlay={
|
||||
\node[overlaystyle,
|
||||
draw=theoremcolor!75!black,
|
||||
fill=theoremcolor!75!black
|
||||
] at (frame.north east)
|
||||
{
|
||||
\large \tr{\theoremNamingEN}{\theoremNamingDE}\printLabel{theorem}
|
||||
};
|
||||
}, #1
|
||||
}
|
||||
|
||||
\newcounter{lemmanone}
|
||||
\newcounter{lemmasection}[section]
|
||||
\renewcommand{\thelemmasection}{\thesection.\arabic{lemmasection}}
|
||||
\newcounter{lemmasubsection}[subsection]
|
||||
\renewcommand{\thelemmasubsection}{\thesection.\thesubsection.\arabic{lemmasubsection}}
|
||||
\newcounter{lemmasubsubsection}[subsubsection]
|
||||
\renewcommand{\thelemmasubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{lemmasubsubsection}}
|
||||
\newcounter{lemmaparagraph}[paragraph]
|
||||
\renewcommand{\thelemmaparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{lemmaparagraph}}
|
||||
\newtcolorbox{lemma}[2][]{
|
||||
mainboxstyle,
|
||||
colback=lemmacolor!5!white,
|
||||
colframe=lemmacolor!75!black,
|
||||
colbacktitle=lemmacolor!75!black,
|
||||
title={\large #2},
|
||||
overlay={
|
||||
\node[overlaystyle,
|
||||
draw=lemmacolor!75!black,
|
||||
fill=lemmacolor!75!black
|
||||
] at (frame.north east)
|
||||
{
|
||||
\large \tr{\lemmaNamingEN}{\lemmaNamingDE}\printLabel{lemma}
|
||||
};
|
||||
}, #1
|
||||
}
|
||||
|
||||
\newcounter{corollarynone}
|
||||
\newcounter{corollarysection}[section]
|
||||
\renewcommand{\thecorollarysection}{\thesection.\arabic{corollarysection}}
|
||||
\newcounter{corollarysubsection}[subsection]
|
||||
\renewcommand{\thecorollarysubsection}{\thesection.\thesubsection.\arabic{corollarysubsection}}
|
||||
\newcounter{corollarysubsubsection}[subsubsection]
|
||||
\renewcommand{\thecorollarysubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{corollarysubsubsection}}
|
||||
\newcounter{corollaryparagraph}[paragraph]
|
||||
\renewcommand{\thecorollaryparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{corollaryparagraph}}
|
||||
\newtcolorbox{corollary}[2][]{
|
||||
mainboxstyle,
|
||||
colback=corollarycolor!5!white,
|
||||
colframe=corollarycolor!75!black,
|
||||
colbacktitle=corollarycolor!75!black,
|
||||
title={\large #2},
|
||||
overlay={
|
||||
\node[overlaystyle,
|
||||
draw=corollarycolor!75!black,
|
||||
fill=corollarycolor!75!black
|
||||
] at (frame.north east)
|
||||
{
|
||||
\large \tr{\corollaryNamingEN}{\corollaryNamingDE}\printLabel{corollary}
|
||||
};
|
||||
}, #1
|
||||
}
|
||||
|
||||
\newcounter{propositionnone}
|
||||
\newcounter{propositionsection}[section]
|
||||
\renewcommand{\thepropositionsection}{\thesection.\arabic{propositionsection}}
|
||||
\newcounter{propositionsubsection}[subsection]
|
||||
\renewcommand{\thepropositionsubsection}{\thesection.\thesubsection.\arabic{propositionsubsection}}
|
||||
\newcounter{propositionsubsubsection}[subsubsection]
|
||||
\renewcommand{\thepropositionsubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{propositionsubsubsection}}
|
||||
\newcounter{propositionparagraph}[paragraph]
|
||||
\renewcommand{\thepropositionparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{propositionparagraph}}
|
||||
\newtcolorbox{proposition}[2][]{
|
||||
mainboxstyle,
|
||||
colback=propositioncolor!5!white,
|
||||
colframe=propositioncolor!75!black,
|
||||
colbacktitle=propositioncolor!75!black,
|
||||
title={\large #2},
|
||||
overlay={
|
||||
\node[overlaystyle,
|
||||
draw=propositioncolor!75!black,
|
||||
fill=propositioncolor!75!black
|
||||
] at (frame.north east)
|
||||
{
|
||||
\large \tr{\propositionNamingEN}{\propositionNamingDE}\printLabel{proposition}
|
||||
};
|
||||
}, #1
|
||||
}
|
||||
|
||||
\newcounter{factnone}
|
||||
\newcounter{factsection}[section]
|
||||
\renewcommand{\thefactsection}{\thesection.\arabic{factsection}}
|
||||
\newcounter{factsubsection}[subsection]
|
||||
\renewcommand{\thefactsubsection}{\thesection.\thesubsection.\arabic{factsubsection}}
|
||||
\newcounter{factsubsubsection}[subsubsection]
|
||||
\renewcommand{\thefactsubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{factsubsubsection}}
|
||||
\newcounter{factparagraph}[paragraph]
|
||||
\renewcommand{\thefactparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{factparagraph}}
|
||||
\newtcolorbox{fact}[2][]{
|
||||
mainboxstyle,
|
||||
colback=factcolor!5!white,
|
||||
colframe=factcolor!75!black,
|
||||
colbacktitle=factcolor!75!black,
|
||||
title={\large #2},
|
||||
overlay={
|
||||
\node[overlaystyle,
|
||||
draw=factcolor!75!black,
|
||||
fill=factcolor!75!black
|
||||
] at (frame.north east)
|
||||
{
|
||||
\large \tr{\factNamingEN}{\factNamingDE}\printLabel{fact}
|
||||
};
|
||||
}, #1
|
||||
}
|
||||
|
||||
\newcounter{formulanone}
|
||||
\newcounter{formulasection}[section]
|
||||
\renewcommand{\theformulasection}{\thesection.\arabic{formulasection}}
|
||||
\newcounter{formulasubsection}[subsection]
|
||||
\renewcommand{\theformulasubsection}{\thesection.\thesubsection.\arabic{formulasubsection}}
|
||||
\newcounter{formulasubsubsection}[subsubsection]
|
||||
\renewcommand{\theformulasubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{formulasubsubsection}}
|
||||
\newcounter{formulaparagraph}[paragraph]
|
||||
\renewcommand{\theformulaparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{formulaparagraph}}
|
||||
\newtcolorbox{formula}[2][]{
|
||||
mainboxstyle,
|
||||
colback=formulacolor!5!white,
|
||||
colframe=formulacolor!75!black,
|
||||
colbacktitle=formulacolor!75!black,
|
||||
title={\large #2},
|
||||
overlay={
|
||||
\node[overlaystyle,
|
||||
draw=formulacolor!75!black,
|
||||
fill=formulacolor!75!black
|
||||
] at (frame.north east)
|
||||
{
|
||||
\large \tr{\formulaNamingEN}{\formulaNamingDE}\printLabel{formula}
|
||||
};
|
||||
}, #1
|
||||
}
|
||||
|
||||
\newcounter{remarknone}
|
||||
\newcounter{remarksection}[section]
|
||||
\renewcommand{\theremarksection}{\thesection.\arabic{remarksection}}
|
||||
\newcounter{remarksubsection}[subsection]
|
||||
\renewcommand{\theremarksubsection}{\thesection.\thesubsection.\arabic{remarksubsection}}
|
||||
\newcounter{remarksubsubsection}[subsubsection]
|
||||
\renewcommand{\theremarksubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{remarksubsubsection}}
|
||||
\newcounter{remarkparagraph}[paragraph]
|
||||
\renewcommand{\theremarkparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{remarkparagraph}}
|
||||
\newtcolorbox{remark}[2][]{
|
||||
mainboxstyle,
|
||||
colback=remarkcolor!5!white,
|
||||
colframe=remarkcolor!75!black,
|
||||
colbacktitle=remarkcolor!75!black,
|
||||
title={\large #2},
|
||||
overlay={
|
||||
\node[overlaystyle,
|
||||
draw=remarkcolor!75!black,
|
||||
fill=remarkcolor!75!black
|
||||
] at (frame.north east)
|
||||
{
|
||||
\large \tr{\remarkNamingEN}{\remarkNamingDE}\printLabel{remark}
|
||||
};
|
||||
}, #1
|
||||
}
|
||||
|
||||
\newcounter{combinenone}
|
||||
\newcounter{combinesection}[section]
|
||||
\renewcommand{\thecombinesection}{\thesection.\arabic{combinesection}}
|
||||
\newcounter{combinesubsection}[subsection]
|
||||
\renewcommand{\thecombinesubsection}{\thesection.\thesubsection.\arabic{combinesubsection}}
|
||||
\newcounter{combinesubsubsection}[subsubsection]
|
||||
\renewcommand{\thecombinesubsubsection}{\thesection.\thesubsection.\thesubsubsection.\arabic{combinesubsubsection}}
|
||||
\newcounter{combineparagraph}[paragraph]
|
||||
\renewcommand{\thecombineparagraph}{\thesection.\thesubsection.\thesubsubsection.\theparagraph.\arabic{combineparagraph}}
|
||||
|
||||
|
||||
\newcommand{\newsectionNoPB}{
|
||||
\setcounter{definitionnone}{0}
|
||||
\setcounter{definitionsection}{0}
|
||||
\setcounter{definitionsubsection}{0}
|
||||
\setcounter{definitionsubsubsection}{0}
|
||||
\setcounter{definitionparagraph}{0}
|
||||
|
||||
\setcounter{examplenone}{0}
|
||||
\setcounter{examplesection}{0}
|
||||
\setcounter{examplesubsection}{0}
|
||||
\setcounter{examplesubsubsection}{0}
|
||||
\setcounter{exampleparagraph}{0}
|
||||
|
||||
\setcounter{theoremnone}{0}
|
||||
\setcounter{theoremsection}{0}
|
||||
\setcounter{theoremsubsection}{0}
|
||||
\setcounter{theoremsubsubsection}{0}
|
||||
\setcounter{theoremparagraph}{0}
|
||||
|
||||
\setcounter{lemmanone}{0}
|
||||
\setcounter{lemmasection}{0}
|
||||
\setcounter{lemmasubsection}{0}
|
||||
\setcounter{lemmasubsubsection}{0}
|
||||
\setcounter{lemmaparagraph}{0}
|
||||
|
||||
\setcounter{corollarynone}{0}
|
||||
\setcounter{corollarysection}{0}
|
||||
\setcounter{corollarysubsection}{0}
|
||||
\setcounter{corollarysubsubsection}{0}
|
||||
\setcounter{corollaryparagraph}{0}
|
||||
|
||||
\setcounter{propositionnone}{0}
|
||||
\setcounter{propositionsection}{0}
|
||||
\setcounter{propositionsubsection}{0}
|
||||
\setcounter{propositionsubsubsection}{0}
|
||||
\setcounter{propositionparagraph}{0}
|
||||
|
||||
\setcounter{factnone}{0}
|
||||
\setcounter{factsection}{0}
|
||||
\setcounter{factsubsection}{0}
|
||||
\setcounter{factsubsubsection}{0}
|
||||
\setcounter{factparagraph}{0}
|
||||
|
||||
\setcounter{formulanone}{0}
|
||||
\setcounter{formulasection}{0}
|
||||
\setcounter{formulasubsection}{0}
|
||||
\setcounter{formulasubsubsection}{0}
|
||||
\setcounter{formulaparagraph}{0}
|
||||
|
||||
\setcounter{remarknone}{0}
|
||||
\setcounter{remarksection}{0}
|
||||
\setcounter{remarksubsection}{0}
|
||||
\setcounter{remarksubsubsection}{0}
|
||||
\setcounter{remarkparagraph}{0}
|
||||
|
||||
\setcounter{combinenone}{0}
|
||||
\setcounter{combinesection}{0}
|
||||
\setcounter{combinesubsection}{0}
|
||||
\setcounter{combinesubsubsection}{0}
|
||||
\setcounter{combineparagraph}{0}
|
||||
|
||||
\setcounter{table}{0}
|
||||
\setcounter{figure}{0}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user