diff --git a/src/config/main.sty b/src/config/main.sty index 279d58d..f129c5d 100644 --- a/src/config/main.sty +++ b/src/config/main.sty @@ -11,6 +11,9 @@ \newcommand{\city}{City} \newcommand{\countrycode}{CH} +% Set the default language +\newcommand{\currentLanguage}{en} + % ┌ ┐ % │ Rendering │ diff --git a/src/core.sty b/src/core.sty index 36cb321..0a80e60 100644 --- a/src/core.sty +++ b/src/core.sty @@ -25,23 +25,3 @@ \RequirePackage{gensymb} \RequirePackage{pifont} \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}} diff --git a/src/core/core.tex b/src/core/core.tex deleted file mode 100644 index 8cac44c..0000000 --- a/src/core/core.tex +++ /dev/null @@ -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 }} diff --git a/src/core/cs.tex b/src/core/cs.sty similarity index 89% rename from src/core/cs.tex rename to src/core/cs.sty index fa54b88..36af193 100644 --- a/src/core/cs.tex +++ b/src/core/cs.sty @@ -14,8 +14,7 @@ \newcommand{\Indent}{\hspace{\algorithmicindent}} -\newcommand{\timecomplexity}{\fhlc{orange}{\ifnum\value{lang}<2{Time complexity}\else {Laufzeit}\fi} \hspace{0.5em}} -\newcommand{\tc}[1]{\timecomplexity $\Theta\left(#1\right)$} +\newcommand{\tc}[]{\tco{#1}} \newcommand{\tct}[1]{\Theta\left(#1\right)} \newcommand{\tco}[1]{\mathcal{O}\left(#1\right)} \newcommand{\tcl}[1]{\Omega\left(#1\right)} diff --git a/src/core/index.sty b/src/core/index.sty new file mode 100644 index 0000000..122f4df --- /dev/null +++ b/src/core/index.sty @@ -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} + diff --git a/src/core/index.tex b/src/core/index.tex deleted file mode 100644 index ab4b364..0000000 --- a/src/core/index.tex +++ /dev/null @@ -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} - diff --git a/src/core/math.tex b/src/core/math.sty similarity index 77% rename from src/core/math.tex rename to src/core/math.sty index 1c04894..113ef6c 100644 --- a/src/core/math.tex +++ b/src/core/math.sty @@ -1,23 +1,33 @@ -% ▄▄ -% ▀████▄ ▄███▀ ██ ███ -% ████ ████ ██ ██ -% █ ██ ▄█ ██ ▄█▀██▄ ██████ ███████▄ -% █ ██ █▀ ██ ██ ██ ██ ██ ██ -% █ ██▄█▀ ██ ▄█████ ██ ██ ██ -% █ ▀██▀ ██ ██ ██ ██ ██ ██ -% ▄███▄ ▀▀ ▄████▄████▀██▄ ▀███████ ████▄ - +% ┌ ┐ +% │ 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 @@ -49,7 +59,10 @@ \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} @@ -66,9 +79,8 @@ \newcommand{\defEquiv}{\overset{\text{def}}{\Leftrightarrow}} \newcommand{\defImplies}{\overset{\text{def}}{\Rightarrow}} \newcommand{\divides}{\hspace{0.25em}|\hspace{0.25em}} -\newcommand{\mbeq}{\overset{!}{=}} \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{\ser}[2]{\sum_{k = 1}^{#2} #1_k} \newcommand{\limni}{\limit{n}{\infty}} @@ -77,7 +89,7 @@ \newcommand{\limhz}{\limit{h}{0}} \newcommand{\liminfni}{\liminf_{n \rightarrow \infty}} \newcommand{\limsupni}{\limsup_{n \rightarrow \infty}} -\newcommand{\elementstack}[2]{\genfrac{}{}{0pt}{}{#1}{#2}} + \DeclareMathOperator\arctanh{arctanh} \DeclareMathOperator\arccosh{arccosh} \DeclareMathOperator\arcsinh{arcsinh} diff --git a/src/core/setup.sty b/src/core/setup.sty new file mode 100644 index 0000000..a271823 --- /dev/null +++ b/src/core/setup.sty @@ -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} +} diff --git a/src/core/tables.tex b/src/core/tables.sty similarity index 72% rename from src/core/tables.tex rename to src/core/tables.sty index ca5d5ad..e5b85ee 100644 --- a/src/core/tables.tex +++ b/src/core/tables.sty @@ -1,10 +1,6 @@ -% _____ _ _ -% (_ _) ( ) (_ ) -% | | _ _| |_ | | __ ___ -% | | / _ ) _ \ | | / __ \ __) -% | | ( (_| | |_) )| |( ___/__ \ -% (_) \__ _)_ __/(___)\____)____/ - +% ┌ ┐ +% │ Tables │ +% └ ┘ \RequirePackage{booktabs} \RequirePackage{tabulary} diff --git a/src/lang/de.sty b/src/lang/de.sty new file mode 100644 index 0000000..4ad042e --- /dev/null +++ b/src/lang/de.sty @@ -0,0 +1,2 @@ +\RequirePackage[ngerman]{babel} +\renewcommand{\currentLanguage}{de} diff --git a/src/lang/de.tex b/src/lang/de.tex deleted file mode 100644 index ba7a10c..0000000 --- a/src/lang/de.tex +++ /dev/null @@ -1 +0,0 @@ -\RequirePackage[ngerman]{babel} diff --git a/src/lang/translation.sty b/src/lang/translation.sty new file mode 100644 index 0000000..3fb1004 --- /dev/null +++ b/src/lang/translation.sty @@ -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 }} diff --git a/src/style.sty b/src/style.sty index 82a2bd2..2e89f0c 100644 --- a/src/style.sty +++ b/src/style.sty @@ -1,3 +1,6 @@ +% ┌ ┐ +% │ STYLE: Globals │ +% └ ┘ % Global style configs for tcolorbox (to reduce bloat) \newcommand{\usetcolorboxes}{ \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} +} diff --git a/src/style/common.tex b/src/style/common-tcb.sty similarity index 88% rename from src/style/common.tex rename to src/style/common-tcb.sty index 0f2a3e7..ce030eb 100644 --- a/src/style/common.tex +++ b/src/style/common-tcb.sty @@ -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}, overlay={\node[overlaystyle,draw=yellow!75!black,,fill=yellow!75!black] at (frame.north east) {\large \translate{Recall }{Repetition }};},#1} diff --git a/src/style/counters.tex b/src/style/counters.tex index b10c7cc..d29efe7 100644 --- a/src/style/counters.tex +++ b/src/style/counters.tex @@ -1,11 +1,3 @@ - -% ▄▄· ▄• ▄▌ ▐ ▄ ▄▄▄▄▄▄▄▄ .▄▄▄ -% ▐█ ▌▪ ▄█▀▄ █▪██▌•█▌▐█•██ ▀▄.▀·▀▄ █· -% ██ ▄▄▐█▌.▐▌█▌▐█▌▐█▐▐▌ ▐█.▪▐▀▀▪▄▐▀▀▄ -% ▐███▌▐█▌.▐▌▐█▄█▌██▐█▌ ▐█▌·▐█▄▄▌▐█•█▌ -% ·▀▀▀ ▀█▄▀▪ ▀▀▀ ▀▀ █▪ ▀▀▀ ▀▀▀ .▀ ▀ - -\RequirePackage{xstring} \RequirePackage{etoolbox} % tcolorbox and other stylistic elements (i.e. inline versions of them) that have counters \newcounter{lemma}[section] @@ -44,7 +36,7 @@ \newcounter{remarksss}[subsubsection] \newcounter{allsss}[subsubsection] -% Set the current number of a label +% ── Set the current number of a label ─────────────────────────────── \newcommand{\setLabelNumber}[2]{% \setcounter{#1}{#2}% \addtocounter{#1}{-1}% @@ -71,14 +63,14 @@ % │ Counter numbering │ % └ ┘ \newcommand{\preTableAndFigHook}[1]{% - \ifnum\value{numberingConfig}>1 - \ifnum\value{numberSubsections}=1 - \stepcounter{allss} + \ifnum\value{numberingConfig}>1% + \ifnum\value{numberSubsections}=1% + \stepcounter{allss}% \else - \ifnum\value{numberSubsections}=2 - \stepcounter{allsss} - \else - \stepcounter{all} + \ifnum\value{numberSubsections}=2% + \stepcounter{allsss}% + \else% + \stepcounter{all}% \fi \fi \fi @@ -89,8 +81,8 @@ \newcommand{\applyTableAndFigureNumbering}{ % Tables & Figures \ifnum\value{numberingConfig}=0 - \renewcommand{\thetable}{} - \renewcommand{\thefigure}{} + \renewcommand{\thetable}{\arabic{table}} + \renewcommand{\thefigure}{\arabic{figure}} \else \ifnum\value{numberingConfig}=1 \renewcommand{\thetable}{\sectionNumbering.\arabic{table}} @@ -395,7 +387,7 @@ \newcommand{\compactdef}[1]{\bg{blue}{D\usenumberArabic{definition}:} \textit{(#1)}} \newcommand{\compactformula}[1]{\bg{red}{F\usenumberArabic{formula}:} \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{\compactcorollary}[1]{\bg{teal}{\translate{C}{K}\usenumberArabic{corollary}:} \textit{(#1)}} \newcommand{\compactfact}[1]{\bg{SeaGreen}{F\usenumberArabic{fact}:} \textit{(#1)}} diff --git a/src/style/cs.sty b/src/style/cs.sty new file mode 100644 index 0000000..2a86816 --- /dev/null +++ b/src/style/cs.sty @@ -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} +} diff --git a/src/style/cs.tex b/src/style/cs.tex deleted file mode 100644 index 010a479..0000000 --- a/src/style/cs.tex +++ /dev/null @@ -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} -} diff --git a/src/style/language.tex b/src/style/language.tex deleted file mode 100644 index cbc28b8..0000000 --- a/src/style/language.tex +++ /dev/null @@ -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} diff --git a/src/style/math.sty b/src/style/math.sty new file mode 100644 index 0000000..8938ed8 --- /dev/null +++ b/src/style/math.sty @@ -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$} diff --git a/src/style/math.tex b/src/style/math.tex deleted file mode 100644 index c5864eb..0000000 --- a/src/style/math.tex +++ /dev/null @@ -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$} diff --git a/src/style/style.tex b/src/style/style.tex index 99cdf7f..b4f700d 100644 --- a/src/style/style.tex +++ b/src/style/style.tex @@ -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 % % ----------------- %