Continue
This commit is contained in:
@@ -11,6 +11,9 @@
|
|||||||
\newcommand{\city}{City}
|
\newcommand{\city}{City}
|
||||||
\newcommand{\countrycode}{CH}
|
\newcommand{\countrycode}{CH}
|
||||||
|
|
||||||
|
% Set the default language
|
||||||
|
\newcommand{\currentLanguage}{en}
|
||||||
|
|
||||||
|
|
||||||
% ┌ ┐
|
% ┌ ┐
|
||||||
% │ Rendering │
|
% │ Rendering │
|
||||||
|
|||||||
20
src/core.sty
20
src/core.sty
@@ -25,23 +25,3 @@
|
|||||||
\RequirePackage{gensymb}
|
\RequirePackage{gensymb}
|
||||||
\RequirePackage{pifont}
|
\RequirePackage{pifont}
|
||||||
\RequirePackage{xstring}
|
\RequirePackage{xstring}
|
||||||
|
|
||||||
|
|
||||||
% Add a color shade (similar to \fhlc, but nicer boxes)
|
|
||||||
\newcommand{\background}[3]{\tcbox[on line,
|
|
||||||
boxsep=\backgroundPadding,
|
|
||||||
arc=\backgroundRounding,
|
|
||||||
left=0pt,
|
|
||||||
right=0pt,
|
|
||||||
top=0pt,
|
|
||||||
bottom=0pt,
|
|
||||||
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}}
|
|
||||||
|
|
||||||
% This command is used for the short and inline descriptors
|
|
||||||
\newcommand{\bg}[2]{\background{#1}{\arabic{descriptorShadeStrength}}{#2}}
|
|
||||||
|
|||||||
@@ -1,126 +0,0 @@
|
|||||||
|
|
||||||
% ▄▄█▀▀▀█▄█
|
|
||||||
% ▄██▀ ▀█
|
|
||||||
% ██▀ ▀ ▄██▀██▄▀███▄███ ▄▄█▀██
|
|
||||||
% ██ ██▀ ▀██ ██▀ ▀▀ ▄█▀ ██
|
|
||||||
% ██▄ ██ ██ ██ ██▀▀▀▀▀▀
|
|
||||||
% ▀██▄ ▄▀██▄ ▄██ ██ ██▄ ▄
|
|
||||||
% ▀▀█████▀ ▀█████▀▄████▄ ▀█████▀
|
|
||||||
|
|
||||||
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
|
|
||||||
|
|
||||||
% Imports %
|
|
||||||
\typeout{[Core] Importing!}
|
|
||||||
|
|
||||||
|
|
||||||
% Language Switching. Currently only English and German are supported
|
|
||||||
% See docs for how to use
|
|
||||||
\newcounter{lang}
|
|
||||||
\typeout{Loading helpers}
|
|
||||||
|
|
||||||
% TODO: Fix this up
|
|
||||||
\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}
|
|
||||||
\input{\dir/main/lang/de}
|
|
||||||
\else
|
|
||||||
\typeout{[Lang Switcher] No such language!}
|
|
||||||
\fi
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\loadLang}{
|
|
||||||
\ifnum\value{lang}<2{
|
|
||||||
\typeout{[Lang Loader] Loaded English}
|
|
||||||
}\else {
|
|
||||||
\typeout{[Lang Loader] Loaded German}
|
|
||||||
\setcounter{lang}{2}
|
|
||||||
}
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
% Create config counters / variables. See the config file for changing them
|
|
||||||
\newcounter{numberingConfig}
|
|
||||||
\newcounter{numberSubsections}
|
|
||||||
\newcounter{descriptorShadeStrength}
|
|
||||||
\newcounter{shadeStrength}
|
|
||||||
|
|
||||||
% 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}}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
% Start document command (required)
|
|
||||||
\newcommand{\startDocument}{
|
|
||||||
\maketitle
|
|
||||||
\pagestyle{fancy}
|
|
||||||
\thispagestyle{fancy}
|
|
||||||
}
|
|
||||||
|
|
||||||
% 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}
|
|
||||||
}
|
|
||||||
|
|
||||||
% 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}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
% ────────────────────────────────────────────────────────────────────
|
|
||||||
% ╭────────────────────────────────────────────────╮
|
|
||||||
% │ Translatation │
|
|
||||||
% ╰────────────────────────────────────────────────╯
|
|
||||||
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}
|
|
||||||
\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 }}
|
|
||||||
@@ -14,8 +14,7 @@
|
|||||||
|
|
||||||
\newcommand{\Indent}{\hspace{\algorithmicindent}}
|
\newcommand{\Indent}{\hspace{\algorithmicindent}}
|
||||||
|
|
||||||
\newcommand{\timecomplexity}{\fhlc{orange}{\ifnum\value{lang}<2{Time complexity}\else {Laufzeit}\fi} \hspace{0.5em}}
|
\newcommand{\tc}[]{\tco{#1}}
|
||||||
\newcommand{\tc}[1]{\timecomplexity $\Theta\left(#1\right)$}
|
|
||||||
\newcommand{\tct}[1]{\Theta\left(#1\right)}
|
\newcommand{\tct}[1]{\Theta\left(#1\right)}
|
||||||
\newcommand{\tco}[1]{\mathcal{O}\left(#1\right)}
|
\newcommand{\tco}[1]{\mathcal{O}\left(#1\right)}
|
||||||
\newcommand{\tcl}[1]{\Omega\left(#1\right)}
|
\newcommand{\tcl}[1]{\Omega\left(#1\right)}
|
||||||
15
src/core/index.sty
Normal file
15
src/core/index.sty
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
% ┌ ┐
|
||||||
|
% │ 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}
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
% ▄▄
|
|
||||||
% ▀████▀ ▀███
|
|
||||||
% ██ ██
|
|
||||||
% ██ ▀████████▄ ▄█▀▀███ ▄▄█▀██▀██▀ ▀██▀
|
|
||||||
% ██ ██ ██ ▄██ ██ ▄█▀ ██ ▀██ ▄█▀
|
|
||||||
% ██ ██ ██ ███ ██ ██▀▀▀▀▀▀ ███
|
|
||||||
% ██ ██ ██ ▀██ ██ ██▄ ▄ ▄█▀ ██▄
|
|
||||||
% ▄████▄████ ████▄ ▀████▀███▄ ▀█████▀██▄ ▄██▄
|
|
||||||
|
|
||||||
|
|
||||||
% 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}
|
|
||||||
|
|
||||||
@@ -1,23 +1,33 @@
|
|||||||
% ▄▄
|
% ┌ ┐
|
||||||
% ▀████▄ ▄███▀ ██ ███
|
% │ Math │
|
||||||
% ████ ████ ██ ██
|
% └ ┘
|
||||||
% █ ██ ▄█ ██ ▄█▀██▄ ██████ ███████▄
|
|
||||||
% █ ██ █▀ ██ ██ ██ ██ ██ ██
|
|
||||||
% █ ██▄█▀ ██ ▄█████ ██ ██ ██
|
|
||||||
% █ ▀██▀ ██ ██ ██ ██ ██ ██
|
|
||||||
% ▄███▄ ▀▀ ▄████▄████▀██▄ ▀███████ ████▄
|
|
||||||
|
|
||||||
|
|
||||||
% BB shortcuts (for number spaces, etc)
|
% BB shortcuts (for number spaces, etc)
|
||||||
|
\newcommand{\A}{\mathbb{A}}
|
||||||
|
\newcommand{\B}{\mathbb{B}}
|
||||||
\newcommand{\C}{\mathbb{C}}
|
\newcommand{\C}{\mathbb{C}}
|
||||||
\newcommand{\D}{\mathbb{D}}
|
\newcommand{\D}{\mathbb{D}}
|
||||||
\newcommand{\E}{\mathbb{E}}
|
\newcommand{\E}{\mathbb{E}}
|
||||||
|
\newcommand{\F}{\mathbb{F}}
|
||||||
|
\newcommand{\G}{\mathbb{G}}
|
||||||
|
\renewcommand{\H}{\mathbb{H}}
|
||||||
\newcommand{\I}{\mathbb{I}}
|
\newcommand{\I}{\mathbb{I}}
|
||||||
\newcommand{\J}{\mathbb{J}}
|
\newcommand{\J}{\mathbb{J}}
|
||||||
|
\newcommand{\K}{\mathbb{K}}
|
||||||
|
\renewcommand{\L}{\mathbb{L}}
|
||||||
|
\newcommand{\M}{\mathbb{M}}
|
||||||
\newcommand{\N}{\mathbb{N}}
|
\newcommand{\N}{\mathbb{N}}
|
||||||
|
\renewcommand{\O}{\mathbb{O}}
|
||||||
|
\renewcommand{\P}{\mathbb{P}}
|
||||||
\newcommand{\Q}{\mathbb{Q}}
|
\newcommand{\Q}{\mathbb{Q}}
|
||||||
\newcommand{\R}{\mathbb{R}}
|
\newcommand{\R}{\mathbb{R}}
|
||||||
|
\renewcommand{\S}{\mathbb{S}}
|
||||||
|
\newcommand{\T}{\mathbb{T}}
|
||||||
|
\newcommand{\U}{\mathbb{U}}
|
||||||
\newcommand{\V}{\mathbb{V}}
|
\newcommand{\V}{\mathbb{V}}
|
||||||
|
\newcommand{\W}{\mathbb{W}}
|
||||||
|
\newcommand{\X}{\mathbb{X}}
|
||||||
|
\newcommand{\Y}{\mathbb{Y}}
|
||||||
\newcommand{\Z}{\mathbb{Z}}
|
\newcommand{\Z}{\mathbb{Z}}
|
||||||
|
|
||||||
% Caligraphic
|
% Caligraphic
|
||||||
@@ -49,7 +59,10 @@
|
|||||||
\newcommand{\cZ}{\mathcal{Z}}
|
\newcommand{\cZ}{\mathcal{Z}}
|
||||||
|
|
||||||
% other useful shortcuts
|
% other useful shortcuts
|
||||||
|
\newcommand{\elementstack}[2]{\genfrac{}{}{0pt}{}{#1}{#2}}
|
||||||
\newcommand{\8}{\infty}
|
\newcommand{\8}{\infty}
|
||||||
|
\newcommand{\cond}{\text{cond}}
|
||||||
|
\newcommand{\argmin}[1]{\underset{#1}{\text{argmin}}}
|
||||||
\newcommand{\dx}{\text{ d}}
|
\newcommand{\dx}{\text{ d}}
|
||||||
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
|
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
|
||||||
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
|
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
|
||||||
@@ -66,9 +79,8 @@
|
|||||||
\newcommand{\defEquiv}{\overset{\text{def}}{\Leftrightarrow}}
|
\newcommand{\defEquiv}{\overset{\text{def}}{\Leftrightarrow}}
|
||||||
\newcommand{\defImplies}{\overset{\text{def}}{\Rightarrow}}
|
\newcommand{\defImplies}{\overset{\text{def}}{\Rightarrow}}
|
||||||
\newcommand{\divides}{\hspace{0.25em}|\hspace{0.25em}}
|
\newcommand{\divides}{\hspace{0.25em}|\hspace{0.25em}}
|
||||||
\newcommand{\mbeq}{\overset{!}{=}}
|
|
||||||
\newcommand{\lcm}{\text{lcm}}
|
\newcommand{\lcm}{\text{lcm}}
|
||||||
\newcommand{\limit}[2]{\lim_{#1 \rightarrow #2}}
|
\newcommand{\limit}[2]{\underset{#1 \rightarrow #2}{\lim}}
|
||||||
\newcommand{\seq}[1]{(#1_n)_{n \geq 1}}
|
\newcommand{\seq}[1]{(#1_n)_{n \geq 1}}
|
||||||
\newcommand{\ser}[2]{\sum_{k = 1}^{#2} #1_k}
|
\newcommand{\ser}[2]{\sum_{k = 1}^{#2} #1_k}
|
||||||
\newcommand{\limni}{\limit{n}{\infty}}
|
\newcommand{\limni}{\limit{n}{\infty}}
|
||||||
@@ -77,7 +89,7 @@
|
|||||||
\newcommand{\limhz}{\limit{h}{0}}
|
\newcommand{\limhz}{\limit{h}{0}}
|
||||||
\newcommand{\liminfni}{\liminf_{n \rightarrow \infty}}
|
\newcommand{\liminfni}{\liminf_{n \rightarrow \infty}}
|
||||||
\newcommand{\limsupni}{\limsup_{n \rightarrow \infty}}
|
\newcommand{\limsupni}{\limsup_{n \rightarrow \infty}}
|
||||||
\newcommand{\elementstack}[2]{\genfrac{}{}{0pt}{}{#1}{#2}}
|
|
||||||
\DeclareMathOperator\arctanh{arctanh}
|
\DeclareMathOperator\arctanh{arctanh}
|
||||||
\DeclareMathOperator\arccosh{arccosh}
|
\DeclareMathOperator\arccosh{arccosh}
|
||||||
\DeclareMathOperator\arcsinh{arcsinh}
|
\DeclareMathOperator\arcsinh{arcsinh}
|
||||||
56
src/core/setup.sty
Normal file
56
src/core/setup.sty
Normal file
@@ -0,0 +1,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
|
||||||
|
\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}
|
||||||
|
}
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
% _____ _ _
|
% ┌ ┐
|
||||||
% (_ _) ( ) (_ )
|
% │ Tables │
|
||||||
% | | _ _| |_ | | __ ___
|
% └ ┘
|
||||||
% | | / _ ) _ \ | | / __ \ __)
|
|
||||||
% | | ( (_| | |_) )| |( ___/__ \
|
|
||||||
% (_) \__ _)_ __/(___)\____)____/
|
|
||||||
|
|
||||||
|
|
||||||
\RequirePackage{booktabs}
|
\RequirePackage{booktabs}
|
||||||
\RequirePackage{tabulary}
|
\RequirePackage{tabulary}
|
||||||
2
src/lang/de.sty
Normal file
2
src/lang/de.sty
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
\RequirePackage[ngerman]{babel}
|
||||||
|
\renewcommand{\currentLanguage}{de}
|
||||||
@@ -1 +0,0 @@
|
|||||||
\RequirePackage[ngerman]{babel}
|
|
||||||
18
src/lang/translation.sty
Normal file
18
src/lang/translation.sty
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
% ┌ ┐
|
||||||
|
% │ Translation │
|
||||||
|
% └ ┘
|
||||||
|
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}
|
||||||
|
\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 }}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
% ┌ ┐
|
||||||
|
% │ STYLE: Globals │
|
||||||
|
% └ ┘
|
||||||
% Global style configs for tcolorbox (to reduce bloat)
|
% Global style configs for tcolorbox (to reduce bloat)
|
||||||
\newcommand{\usetcolorboxes}{
|
\newcommand{\usetcolorboxes}{
|
||||||
\tcbset{
|
\tcbset{
|
||||||
@@ -30,3 +33,89 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
% ── Fonts ───────────────────────────────────────────────────────────
|
||||||
|
\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}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
% ── Small common style elements ─────────────────────────────────────
|
||||||
|
% Spacing (vertical)
|
||||||
|
\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}}
|
||||||
|
|
||||||
|
% Spacing (horizontal)
|
||||||
|
\newcommand{\smallhspace}{\hspace{2mm}}
|
||||||
|
\newcommand{\mediumhspace}{\hspace{5mm}}
|
||||||
|
\newcommand{\largehspace}{\hspace{1cm}}
|
||||||
|
|
||||||
|
% other elements
|
||||||
|
\renewcommand{\footrulewidth}{0.4pt}
|
||||||
|
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
|
||||||
|
\newcommand{\bi}[1]{\textbf{\textit{#1}}}
|
||||||
|
\renewcommand{\quote}[1]{``\textit{#1}''}
|
||||||
|
|
||||||
|
% Add a color shade (similar to \fhlc, but nicer boxes)
|
||||||
|
\newcommand{\background}[3]{\tcbox[on line,
|
||||||
|
boxsep=\backgroundPadding,
|
||||||
|
arc=\backgroundRounding,
|
||||||
|
left=0pt,
|
||||||
|
right=0pt,
|
||||||
|
top=0pt,
|
||||||
|
bottom=0pt,
|
||||||
|
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}}
|
||||||
|
|
||||||
|
% This command is used for the short and inline descriptors
|
||||||
|
\newcommand{\bg}[2]{\background{#1}{\arabic{descriptorShadeStrength}}{#2}}
|
||||||
|
|
||||||
|
% Add a color shade (similar to \fhlc, but nicer boxes)
|
||||||
|
\newcommand{\background}[3]{\tcbox[on line,
|
||||||
|
boxsep=\backgroundPadding,
|
||||||
|
arc=\backgroundRounding,
|
||||||
|
left=0pt,
|
||||||
|
right=0pt,
|
||||||
|
top=0pt,
|
||||||
|
bottom=0pt,
|
||||||
|
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}}
|
||||||
|
|
||||||
|
% This command is used for the short and inline descriptors
|
||||||
|
\newcommand{\bg}[2]{\background{#1}{\arabic{descriptorShadeStrength}}{#2}}
|
||||||
|
|
||||||
|
% 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}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
%▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
|
% ┌ ┐
|
||||||
%██░▄▄▀█▀▄▄▀█░▄▀▄░█░▄▀▄░█▀▄▄▀█░▄▄▀
|
% │ STYLE: Common tcolorboxes │
|
||||||
%██░████░██░█░█▄█░█░█▄█░█░██░█░██░
|
% └ ┘
|
||||||
%██░▀▀▄██▄▄██▄███▄█▄███▄██▄▄██▄██▄
|
% TODO: Update colors
|
||||||
%▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
|
|
||||||
|
|
||||||
\newtcolorbox{recall}[2][]{mainboxstyle,colback=yellow!5!white,colframe=yellow!75!black,colbacktitle=yellow!75!black,title={\large #2},
|
\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}
|
||||||
@@ -1,11 +1,3 @@
|
|||||||
|
|
||||||
% ▄▄· ▄• ▄▌ ▐ ▄ ▄▄▄▄▄▄▄▄ .▄▄▄
|
|
||||||
% ▐█ ▌▪ ▄█▀▄ █▪██▌•█▌▐█•██ ▀▄.▀·▀▄ █·
|
|
||||||
% ██ ▄▄▐█▌.▐▌█▌▐█▌▐█▐▐▌ ▐█.▪▐▀▀▪▄▐▀▀▄
|
|
||||||
% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌
|
|
||||||
% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀
|
|
||||||
|
|
||||||
\RequirePackage{xstring}
|
|
||||||
\RequirePackage{etoolbox}
|
\RequirePackage{etoolbox}
|
||||||
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
|
% tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters
|
||||||
\newcounter{lemma}[section]
|
\newcounter{lemma}[section]
|
||||||
@@ -44,7 +36,7 @@
|
|||||||
\newcounter{remarksss}[subsubsection]
|
\newcounter{remarksss}[subsubsection]
|
||||||
\newcounter{allsss}[subsubsection]
|
\newcounter{allsss}[subsubsection]
|
||||||
|
|
||||||
% Set the current number of a label
|
% ── Set the current number of a label ───────────────────────────────
|
||||||
\newcommand{\setLabelNumber}[2]{%
|
\newcommand{\setLabelNumber}[2]{%
|
||||||
\setcounter{#1}{#2}%
|
\setcounter{#1}{#2}%
|
||||||
\addtocounter{#1}{-1}%
|
\addtocounter{#1}{-1}%
|
||||||
@@ -71,14 +63,14 @@
|
|||||||
% │ Counter numbering │
|
% │ Counter numbering │
|
||||||
% └ ┘
|
% └ ┘
|
||||||
\newcommand{\preTableAndFigHook}[1]{%
|
\newcommand{\preTableAndFigHook}[1]{%
|
||||||
\ifnum\value{numberingConfig}>1
|
\ifnum\value{numberingConfig}>1%
|
||||||
\ifnum\value{numberSubsections}=1
|
\ifnum\value{numberSubsections}=1%
|
||||||
\stepcounter{allss}
|
\stepcounter{allss}%
|
||||||
\else
|
\else
|
||||||
\ifnum\value{numberSubsections}=2
|
\ifnum\value{numberSubsections}=2%
|
||||||
\stepcounter{allsss}
|
\stepcounter{allsss}%
|
||||||
\else
|
\else%
|
||||||
\stepcounter{all}
|
\stepcounter{all}%
|
||||||
\fi
|
\fi
|
||||||
\fi
|
\fi
|
||||||
\fi
|
\fi
|
||||||
@@ -89,8 +81,8 @@
|
|||||||
\newcommand{\applyTableAndFigureNumbering}{
|
\newcommand{\applyTableAndFigureNumbering}{
|
||||||
% Tables & Figures
|
% Tables & Figures
|
||||||
\ifnum\value{numberingConfig}=0
|
\ifnum\value{numberingConfig}=0
|
||||||
\renewcommand{\thetable}{}
|
\renewcommand{\thetable}{\arabic{table}}
|
||||||
\renewcommand{\thefigure}{}
|
\renewcommand{\thefigure}{\arabic{figure}}
|
||||||
\else
|
\else
|
||||||
\ifnum\value{numberingConfig}=1
|
\ifnum\value{numberingConfig}=1
|
||||||
\renewcommand{\thetable}{\sectionNumbering.\arabic{table}}
|
\renewcommand{\thetable}{\sectionNumbering.\arabic{table}}
|
||||||
@@ -395,7 +387,7 @@
|
|||||||
\newcommand{\compactdef}[1]{\bg{blue}{D\usenumberArabic{definition}:} \textit{(#1)}}
|
\newcommand{\compactdef}[1]{\bg{blue}{D\usenumberArabic{definition}:} \textit{(#1)}}
|
||||||
\newcommand{\compactformula}[1]{\bg{red}{F\usenumberArabic{formula}:} \textit{(#1)}}
|
\newcommand{\compactformula}[1]{\bg{red}{F\usenumberArabic{formula}:} \textit{(#1)}}
|
||||||
\newcommand{\compactlemma}[1]{\bg{Aquamarine}{L\usenumberArabic{lemma}:} \textit{(#1)}}
|
\newcommand{\compactlemma}[1]{\bg{Aquamarine}{L\usenumberArabic{lemma}:} \textit{(#1)}}
|
||||||
\newcommand{\compacttheorem}[1]{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}} \usenumberArabic{theorem}:} \textit{(#1)}}
|
\newcommand{\compacttheorem}[1]{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}}\usenumberArabic{theorem}:} \textit{(#1)}}
|
||||||
\newcommand{\compactaxiom}[1]{\bg{JungleGreen}{A\usenumberArabic{axiom}:} \textit{(#1)}}
|
\newcommand{\compactaxiom}[1]{\bg{JungleGreen}{A\usenumberArabic{axiom}:} \textit{(#1)}}
|
||||||
\newcommand{\compactcorollary}[1]{\bg{teal}{\translate{C}{K}\usenumberArabic{corollary}:} \textit{(#1)}}
|
\newcommand{\compactcorollary}[1]{\bg{teal}{\translate{C}{K}\usenumberArabic{corollary}:} \textit{(#1)}}
|
||||||
\newcommand{\compactfact}[1]{\bg{SeaGreen}{F\usenumberArabic{fact}:} \textit{(#1)}}
|
\newcommand{\compactfact}[1]{\bg{SeaGreen}{F\usenumberArabic{fact}:} \textit{(#1)}}
|
||||||
|
|||||||
17
src/style/cs.sty
Normal file
17
src/style/cs.sty
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
% ┌ ┐
|
||||||
|
% │ 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}
|
||||||
|
}
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
% ▄▄
|
|
||||||
% ▄▄█▀▀▀█▄█ ██ ▄█▀▀▀█▄█ ██
|
|
||||||
% ▄██▀ ▀█ ██ ▄██ ▀█
|
|
||||||
% ██▀ ▀ ▄██▀██▄▀████████▄█████▄ ▀████████▄▀███ ▀███ ██████ ▄▄█▀██▀███▄███ ▀███▄ ▄██▀██▀███ ▄▄█▀██▀████████▄ ▄██▀██ ▄▄█▀██
|
|
||||||
% ██ ██▀ ▀██ ██ ██ ██ ██ ▀██ ██ ██ ██ ▄█▀ ██ ██▀ ▀▀ ▀█████▄█▀ ██ ██ ▄█▀ ██ ██ ██ ██▀ ██ ▄█▀ ██
|
|
||||||
% ██▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀▀▀▀▀ ██ ▄ ▀███ ██ ██▀▀▀▀▀▀ ██ ██ ██ ██▀▀▀▀▀▀
|
|
||||||
% ▀██▄ ▄▀██▄ ▄██ ██ ██ ██ ██ ▄██ ██ ██ ██ ██▄ ▄ ██ ██ ███▄ ▄ ██ ██▄ ▄ ██ ██ ██▄ ▄██▄ ▄
|
|
||||||
% ▀▀█████▀ ▀█████▀▄████ ████ ████▄ ██████▀ ▀████▀███▄ ▀████ ▀█████▀████▄ █▀█████▀ █████▀▄████▄ ▀█████▀████ ████▄█████▀ ▀█████▀
|
|
||||||
% ██
|
|
||||||
% ▄████▄
|
|
||||||
|
|
||||||
\usepackage{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}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
% ░█▒░▒▄▀▄░█▄░█░▄▀▒░█▒█▒▄▀▄░▄▀▒▒██▀░░░▄▀▀░▀█▀░▀▄▀░█▒░▒██▀
|
|
||||||
% ▒█▄▄░█▀█░█▒▀█░▀▄█░▀▄█░█▀█░▀▄█░█▄▄▒░▒▄██░▒█▒░▒█▒▒█▄▄░█▄▄
|
|
||||||
|
|
||||||
% 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}
|
|
||||||
|
|
||||||
\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}
|
|
||||||
9
src/style/math.sty
Normal file
9
src/style/math.sty
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
% ┌ ┐
|
||||||
|
% │ 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$}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
% • ▌ ▄ ·. ▄▄▄· ▄▄▄▄▄ ▄ .▄ .▄▄ · ▄▄▄▄▄ ▄· ▄▌▄▄▌ ▄▄▄ .
|
|
||||||
% ·██ ▐███▪▐█ ▀█ •██ ██▪▐█ ▐█ ▀. •██ ▐█▪██▌██• ▀▄.▀·
|
|
||||||
% ▐█ ▌▐▌▐█·▄█▀▀█ ▐█.▪██▀▀█ ▄▀▀▀█▄ ▐█.▪▐█▌▐█▪██ ▪ ▐▀▀▪▄
|
|
||||||
% ██ ██▌▐█▌▐█▪ ▐▌ ▐█▌·██▌▐▀ ▐█▄▪▐█ ▐█▌· ▐█▀·.▐█▌ ▄▐█▄▄▌
|
|
||||||
% ▀▀ █▪▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀ · ▀▀▀▀ ▀▀▀ ▀ • .▀▀▀ ▀▀▀
|
|
||||||
|
|
||||||
% Replace some commonly used commands with better ones
|
|
||||||
\renewcommand{\vec}[1]{\overrightarrow{#1}}
|
|
||||||
\renewcommand{\hat}[1]{\widehat{#1}}
|
|
||||||
\renewcommand{\tilde}[1]{\widetilde{#1}}
|
|
||||||
\newcommand{\proven}{$\hspace{17cm}\square$}
|
|
||||||
@@ -8,33 +8,6 @@
|
|||||||
%███ ██████ █████ ████ ███ ███
|
%███ ██████ █████ ████ ███ ███
|
||||||
%██████████████████████ ███████████████████
|
%██████████████████████ ███████████████████
|
||||||
|
|
||||||
% -------------------- %
|
|
||||||
% Small style elements %
|
|
||||||
% -------------------- %
|
|
||||||
\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}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
\newcommand{\rmvspace}{\vspace{-0.5pc}}
|
|
||||||
\newcommand{\drmvspace}{\vspace{-1pc}}
|
|
||||||
\renewcommand{\footrulewidth}{0.4pt}
|
|
||||||
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
|
|
||||||
\newcommand{\bi}[1]{\textbf{\textit{#1}}}
|
|
||||||
\renewcommand{\quote}[1]{``\textit{#1}''}
|
|
||||||
|
|
||||||
% Spacing (horizontal)
|
|
||||||
\newcommand{\smallhspace}{\hspace{2mm}}
|
|
||||||
\newcommand{\mediumhspace}{\hspace{5mm}}
|
|
||||||
\newcommand{\largehspace}{\hspace{1cm}}
|
|
||||||
|
|
||||||
% ----------------- %
|
% ----------------- %
|
||||||
% Table of contents %
|
% Table of contents %
|
||||||
% ----------------- %
|
% ----------------- %
|
||||||
|
|||||||
Reference in New Issue
Block a user