\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ibz-document}
\LoadClass[
12pt,
a4paper
]{article}

\RequirePackage[
left=2cm,
right=2cm,
top=3cm,
bottom=3cm
]{geometry}

%Font settings
\RequirePackage[default]{sourcesanspro}
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern}		% Latin Modern Fonts (without Bold Smal Capital Font)
\RequirePackage{slantsc}			% Smal Capital Letters

%Enable Mathsupport
\RequirePackage{mathtools}
\mathtoolsset{showonlyrefs}
%Use normal font for math
\RequirePackage{mathastext}		%[defaultmathsizes]

%Support for German
\RequirePackage[utf8]{inputenc}
\RequirePackage{ngerman}

%Header & Footer styling
\RequirePackage{lastpage} % number of last page 
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\lhead{\HeaderLeft}
\chead{\HeaderCenter}
\rhead{\HeaderRight}
\lfoot{\FooterLeft}
\cfoot{\FooterCenter}
\rfoot{\FooterRight}
\renewcommand{\headrulewidth}{1pt} %0pt for no rule, 2pt thicker etc...
\renewcommand{\footrulewidth}{0pt}
\setlength{\headheight}{16pt} 

%TOC
\RequirePackage[tocflat]{tocstyle} %is alpha but it solves the indent on sectons
\usetocstyle{standard} 
\renewcommand\tableofcontents{%
  \null\hfill\textbf{\Large\contentsname}\hfill\null\par
  \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
  \@starttoc{toc}%
}
%Index
\RequirePackage{imakeidx} % Word Index
\makeindex 

%Dokumentstyling
\linespread{1.2}%Make line spacing bigger
\setlength{\parskip}{\baselineskip/2}% paragraph sprung 
\setlength{\parindent}{0pt}% paragraph einzug
\setlength{\parsep}{0pt}   
\RequirePackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}

% My own List env.
\newenvironment{myitemize}
{ \begin{itemize}
    \setlength{\itemsep}{0pt}
    \setlength{\parskip}{0.4em}
    \setlength{\parsep}{0em}     }
{ \end{itemize}                  } 

\RequirePackage{float} % to process all Figures in precise float [H]
\RequirePackage{lscape} % single pages in Landscape
%Make whitespace in tables bigger
\renewcommand\arraystretch{1.5}

%Requirements for tables
\RequirePackage{tabularx}  
\RequirePackage{spreadtab} 		%calculating in spreadtab tables requires fb and xstring
\RequirePackage{multirow}
\RequirePackage[table]{xcolor}
\RequirePackage{xstring} 		% reqired by spreadtab

%Needed to rotate graphics and tables
\RequirePackage{rotating}

%Support for images
%\RequirePackage{graphicx} % is included in tikz

%Support for Graphics
\RequirePackage{pgf,tikz}
\usetikzlibrary{%
arrows.meta,
arrows,
shapes,
shapes.misc,
shapes.symbols,
shapes.geometric,
chains,
matrix,
positioning,
shapes.multipart,
calc,
spy,
decorations,
backgrounds,
scopes,
trees
}
\RequirePackage{tikz-uml} 
\RequirePackage{ifthen}
\RequirePackage{xstring}
\RequirePackage{pgfkeys}
\RequirePackage{pgfplots}

%Enable URL highlighting
\RequirePackage{hyperref}
\hypersetup{
    bookmarks=true,         % show bookmarks bar?
    unicode=false,          % non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        % show Acrobat’s toolbar?
    pdfmenubar=true,        % show Acrobat’s menu?
    pdffitwindow=false,     % window fit to page when opened
    pdfstartview={FitH},    % fits the width of the page to the window
    pdftitle={My title},    % title
    pdfauthor={Author},     % author
    pdfsubject={Subject},   % subject of the document
    pdfcreator={Creator},   % creator of the document
    pdfproducer={Producer}, % producer of the document
    pdfkeywords={keyword1, key2, key3}, % list of keywords
    pdfnewwindow=true,      % links in new PDF window
    colorlinks=false,       % false: boxed links; true: colored links
    linkcolor=red,          % color of internal links (change box color with linkbordercolor)
    citecolor=green,        % color of links to bibliography
    filecolor=magenta,      % color of file links
    urlcolor=cyan           % color of external links
}
\urlstyle{same}
%autolable sections:
\let\orisectionmark\sectionmark
\renewcommand\sectionmark[1]{\label{sec:#1}\orisectionmark{#1}}
%autolable subsections:
\let\orisubsectionmark\subsectionmark
\renewcommand\subsectionmark[1]{\label{subsec:#1}\orisubsectionmark{#1}}

%Material theme colours
\definecolor{red}{HTML}{F44336}
\definecolor{pink}{HTML}{E91E63}
\definecolor{purple}{HTML}{9C27B0}
%\definecolor{blue}{HTML}{2196F3}
\definecolor{brown}{HTML}{795548}
\definecolor{cyan}{HTML}{00BCD4}
\definecolor{darkgray}{HTML}{616161}
\definecolor{gray}{HTML}{9E9E9E}
\definecolor{lightgray}{HTML}{E0E0E0}
\definecolor{lime}{HTML}{CDDC39}
\definecolor{olive}{HTML}{827717}
\definecolor{orange}{HTML}{FF9800}
\definecolor{teal}{HTML}{009688}
\definecolor{yellow}{HTML}{FFEB3B}
\definecolor{green}{HTML}{388E3C}

% Document Variable-Set finetuned
\author{\authorname}
\title{\titlepre\titleseparator\titlename}
\date{\today}



