%--------------------
%encoding
%--------------------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

%--------------------
%language
%--------------------
\usepackage{babel}

%--------------------
%images
%--------------------
\usepackage{graphicx}
\graphicspath{ {./images/} }
%figure wrapping
\usepackage{wrapfig}
%precise image placement
\usepackage{float}
%svg images
\usepackage{svg}
%subfigures
\usepackage{subcaption}

%--------------------
%german quotation
%--------------------
\usepackage[%
left = \glqq,%
right = \grqq,%
leftsub = \glq,%
rightsub = \grq%
]{dirtytalk}


%--------------------
%enumeration
%--------------------
\usepackage{enumerate}
\usepackage[shortlabels]{enumitem}

%--------------------
%references
%--------------------
\usepackage{hyperref}

%--------------------
%for code snippets
%--------------------
\usepackage{xcolor}
\usepackage{listings}
% highlight block in equations
\newcommand{\highlight}[2]{%
    \colorbox{#1}{$\displaystyle#2$}}

%--------------------
%footnotes
%--------------------
%fix footnotes at the bottom of the page 
\usepackage[bottom]{footmisc}

%--------------------
%tables
%--------------------
%enable X columns (columns with automatic width)
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X} %for centered X column
%table longer than one page
\usepackage{longtable}
%colorfull tables
\usepackage{colortbl}
%multirows in tables
\usepackage{multirow}
%enable line break in nomenclature
\usepackage{array}
%footnotes for tables
\usepackage{threeparttable}
%enable rotation of table headers
\newcommand\rothead{\bfseries\rotatebox{90}}

%--------------------
%glossary & acronyms
%--------------------
\usepackage{datatool}
\usepackage[automake,acronym]{glossaries-extra}
%dynamic spaces after a link
\usepackage{xspace}

%--------------------
%header and footer
%--------------------
\usepackage{fancyhdr}

%--------------------
%custom font sizes
%--------------------
\usepackage{anyfontsize}

%--------------------
%bibliography
%--------------------
\usepackage[square, numbers]{natbib}

%--------------------
%conditional formating
%--------------------
\usepackage{ifthen}

%--------------------
%equations
%--------------------
%math symbols and more
\usepackage{amsmath}
%special symbols
\usepackage{fontawesome}
%si units
\usepackage[output-decimal-marker={,}]{siunitx}
%referencing equations
\usepackage[noabbrev, nameinlink]{cleveref}
%decimal comma
\usepackage{icomma}
%bold math
\usepackage{bm}

%--------------------
%drawings & diagrams
%--------------------
\usepackage{tikz,pgfplots}
\DeclareUnicodeCharacter{2212}{−}
\usepgfplotslibrary{groupplots,dateplot}
\pgfplotsset{compat=newest}
\usetikzlibrary{calc,3d,shapes.arrows,patterns,shapes.geometric}
\usepackage{pgf-umlsd}
\usepackage{environ}
\makeatletter
\newsavebox{\measure@tikzpicture}
\NewEnviron{scaletikzpicturetowidth}[1]{%
  \def\tikz@width{#1}%
  \def\tikzscale{1}\begin{lrbox}{\measure@tikzpicture}%
  \BODY
  \end{lrbox}%
  \pgfmathparse{#1/\wd\measure@tikzpicture}%
  \edef\tikzscale{\pgfmathresult}%
  \BODY
}
\makeatother
%boxes
\usepackage[framemethod=tikz]{mdframed}

%--------------------
% landscape
%--------------------
\usepackage{pdflscape}

