Add docs, finish up errors

This commit is contained in:
2025-01-07 10:38:36 +01:00
parent 9217ace0af
commit 0644caf2b2
28 changed files with 1010 additions and 102 deletions

View File

@@ -10,6 +10,7 @@
% This file contains all necessary dependencies for the document to compile (at all) and some core macros
% Imports %
\typeout{[Core] Importing!}
\usepackage[table, dvipsnames]{xcolor}
\usepackage{amsmath}
\usepackage{graphicx}
@@ -33,18 +34,50 @@
\usepackage{ifthen}
\usepackage[hidelinks]{hyperref}
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage{tabulary}
% Language Switching. Currently only English and German are supported
% See docs for how to use
\newcounter{lang}
\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}
\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}
\usepackage[ngerman]{babel}
\setcounter{lang}{2}
}
\fi
}
% Create config counters / variables. See the config file for changing them
\newcounter{numberingConfig}
\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
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
@@ -71,12 +104,11 @@
\maketitle
\pagestyle{fancy}
\thispagestyle{fancy}
\include{./style/style.tex}
\include{./style/common.tex}
}
% Set up the latex document, only configuring the author, title and page size
\newcommand{\setupbarebones}[1]{
\loadLang
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
\title{\Huge \textbf{#1}}
\author{\authorTitle}
@@ -84,6 +116,7 @@
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
\newcommand{\setupexams}[1]{
\loadLang
\usepackage[a4paper,textwidth=20cm,textheight=28cm,includehead]{geometry}
\title{#1}
\author{\authorTitle}
@@ -91,6 +124,4 @@
% translate the document between two languages
\newcommand{\translate}[2]{
\ifnum\value{lang}<2{#1}\else {#2}\fi
}
\newcommand{\translate}[2]{\ifnum\value{lang}<2{#1}\else{#2}\fi}