uni-tex-template/main.tex
Jonas_Jones 41995bce2d
All checks were successful
build-latex / build (push) Successful in 6m50s
Added colors and macros
2025-10-15 17:56:34 +02:00

141 lines
5.9 KiB
TeX

\documentclass[a4paper]{article}
\usepackage[ruled]{algorithm2e} % For writing algorithms with structured formatting
\usepackage{amsmath} % Advanced math typesetting
\usepackage{amssymb} % Additional math symbols
\usepackage{amsthm} % Theorem environments
\usepackage{amsfonts} % Additional math fonts
\usepackage{bookmark} % Improves PDF bookmarks (better than hyperref's default)
\usepackage{braket} % more brakets for scientific notations
\usepackage{changepage,titlesec,fancyhdr} % Adjusting layout, section titles, and headers/footers
\usepackage[ddmmyyyy]{datetime} % Custom date formatting
\usepackage{cleveref} % Smarter cross-referencing (e.g., auto "Figure", "Table")
\usepackage{colortbl} % Coloring table rows and cells
\usepackage{diagbox} % Diagonal split in table cells
\usepackage{dsfont} % Double stroke fonts (e.g., for indicator function)
\usepackage{enumerate} % Customizing enumerated lists
\usepackage{enumitem} % Better control over list environments
\usepackage{float} % Precise control over figure/table placement
\usepackage{forest} % Drawing tree structures
\usepackage{geometry} % Customizing page dimensions and margins
\usepackage{hyperref} % Clickable links for references and URLs
\usepackage{listings} % Source code formatting
\usepackage[framemethod=tikz]{mdframed} % Creating framed environments using TikZ
\usepackage{mathtools} % Extensions to amsmath (e.g., \coloneqq)
\usepackage{marvosym} % More symbols
\usepackage{multirow} % Multirows for tables
\usepackage[onehalfspacing]{setspace} % Set line spacing to 1.5
\usepackage{pgfplots} % Plotting graphs and data
\usepackage{subcaption} % Subfigures and subcaptions
\usepackage{stmaryrd} % Extra math symbols (e.g., semantic brackets)
\usepackage{tabularx} % Tables with automatic column width adjustment
\usepackage{tikz} % Drawing diagrams and illustrations
\usepackage{tikz-qtree} % Easy syntax for trees with TikZ
\usepackage{xcolor} % Color tweaking
\usepackage{xparse} % Easy modern commands
% Languages
\usepackage[english]{babel}
% \usepackage[ngerman]{babel}
% \usepackage[german]{babel} % old german orthography
% \usepackage[french]{babel}
% \usepackage[spanish]{babel}
% \usepackage[italian]{babel}
% \usepackage[russian]{babel}
% \usepackage[portuguese]{babel}
% \usepackage[dutch]{babel}
% \usepackage[swedish]{babel}
% \usepackage[polish]{babel}
% \usepackage[czech]{babel}
% \usepackage[hungarian]{babel}
% \usepackage[greek]{babel}
% Custom Colors
\definecolor{mygray}{HTML}{808080}
\definecolor{mygreen}{HTML}{00843D}
\definecolor{myorange}{HTML}{FF7F00}
\definecolor{myred}{HTML}{E10600}
\definecolor{myblue}{HTML}{005BBB}
\definecolor{prettypurple}{HTML}{800080}
\definecolor{prettypink}{HTML}{DA167F}
% Custom Color Text Aliases
\newcommand{\green}[1]{\textcolor{mygreen}{#1}}
\newcommand{\orange}[1]{\textcolor{myorange}{#1}}
\newcommand{\red}[1]{\textcolor{myred}{#1}}
\newcommand{\blue}[1]{\textcolor{myblue}{#1}}
\newcommand{\purple}[1]{\textcolor{prettypurple}{#1}}
\newcommand{\pink}[1]{\textcolor{prettypink}{#1}}
\newcommand{\gray}[1]{\textcolor{mygray}{#1}}
% Math Macros
\newcommand{\limes}[1]{\lim\limits_{#1}}
\newcommand{\summe}{\sum\limits}
\newcommand{\nat}{{n\in\mathbb{N}}}
\newcommand{\limity}{\limes{n\to\infty}}
\newcommand{\integral}{\int\limits}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
% Document variables
\newcommand{\assignmentNumber}{1} % Assignment number
% Colors
\definecolor{mygreen}{HTML}{00843D} % Prettier Green
% Package configurations
\pgfplotsset{compat=1.17}
\pagestyle{fancy}
\lstset{
basicstyle=\ttfamily, % Typeset listings in monospace font
}
\geometry{
paper=a4paper, % Paper size, change to letterpaper for US letter size
top=3cm, % Top margin
bottom=3cm, % Bottom margin
left=2.5cm, % Left margin
right=2.5cm, % Right margin
headheight=31pt, % Header height
footskip=1.5cm, % Space from the bottom margin to the baseline of the footer
headsep=1cm, % Space from the top margin to the baseline of the header
}
\renewcommand{\headrulewidth}{0.5pt} % Adjust lineheight of the header rule
\renewcommand{\headrule}{
\makebox[\textwidth]{\rule{1.0\textwidth}{0.5pt}}
}
% Default config
\lhead{Subject Name\\Term}
\chead{\bfseries{\vspace{0.5\baselineskip}Assignment Title}}
\rhead{Name of 1st Author, Matr. Nr of 1st Author\\Name of 2nd Author, {Matr. Nr of 2nd Author}}
% UNCOMMENT TO USE: Config for Single Author
% \lhead{\vspace{0.5\baselineskip}Assignment Title}
% \chead{\bfseries{Subject Name\\Term}}
% \rhead{\vspace{0.5\baselineskip}Name of 1st Author, Mtr. Nr of 1st Author}
% UNCOMMENT TO USE: Config for 3-4 Authors
% \lhead{Name of 1st Author, Matr. Nr of 1st Author\\Name of 2nd Author, Matr. Nr of 2nd Author}
% \chead{\bfseries{\vspace{0.5\baselineskip}Subject Name\\Assignment Title}}
% \rhead{Name of 3rd Author, Matr. Nr of 3rd Author\\Name of 4th Author, Matr. Nr of 4th Author}
\fancyheadoffset[R]{0cm}
\setcounter{section}{\assignmentNumber} % Start section numbering from 4 (e.g. for Assignment 4)
\setcounter{page}{1} % Start page numbering from 1
% cursor parking
% +----------------------------+
% | |
% | |
% | |
% | |
% +----------------------------+
\begin{document}
\subsection{[Exercise Title]}
\end{document}