%%%%%%%%%%%%%%% L A Y O U T  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{inputs/bmsColors}

%% Font
\newcommand{\myTitelFont}{qhv}
\newcommand*{\cdciFont}{\fontfamily{\myTitelFont}\selectfont\textbf}

%% Font neues Layout 2023
\renewcommand{\rmdefault}{qhv} % Helvetica
\renewcommand{\sfdefault}{qhv} % " 


\headheight30pt%

%% Schlagwortverzeichnis
\renewcommand{\indexname}{Stichwortverzeichnis}%%
\renewenvironment{theindex}%
               {\if@twocolumn
                  \@restonecolfalse
                \else
                  \@restonecoltrue
                \fi
                \columnseprule \z@
                \columnsep 35\p@
                \twocolumn[\section{\indexname}]%
                \@mkboth{\MakeUppercase\indexname}%
                        {\MakeUppercase\indexname}%
                \thispagestyle{fancy}\parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \let\item\@idxitem}
               {\if@restonecol\onecolumn\else\clearpage\fi}%%
               

%% Subtitle
\def\iffull#1{\if#1\relax\else}
\gdef\@subtitle{}
\def\subtitle#1{\gdef\@subtitle{#1}}
\def\title#1{\gdef\@title{\sectfont\bfseries\LARGE#1\iffull\@subtitle\\%
\mdseries\Large\@subtitle\fi}}


%%%%%  H E A D E R %%%

%% Erzeuge ein Kommando «parttitle»
%% Siehe hier:
%%  https://tex.stackexchange.com/questions/13387/how-to-get-part-name-in-latex
\newcommand*\parttitle{}
\let\origpart\part
\renewcommand*{\part}[2][]{%
   \ifx\\#1\\% optional argument not present?
      \origpart{#2}%
      \renewcommand*\parttitle{#2}%
   \else
      \origpart[#1]{#2}%
      \renewcommand*\parttitle{#1}%
   \fi
}


% styles siehe http://web.reed.edu/cis/help/latex/bibtexstyles.html
% include texlife.bibtex.extra:
\bibliographystyle{alphadin.bst}
%\bibliographystyle{plain}

%% cleardoublepage soll auf linker (also gerader) Seite beginnen.
\makeatletter
\renewcommand*\cleardoublepage{\clearpage\if@twoside
  \ifodd\c@page \hbox{}\newpage\if@twocolumn\hbox{}%
  \newpage\fi\fi\fi}
\makeatother

%% Titel immer links:
\titleformat{\section}[block]%%
{\huge}%%{\cleardoublepage\huge}
{\thesection}%%
{1em{}}%%
{ | }%%
[%%{\vspace{8cm}\raisebox{2mm}{\includegraphics[width=14cm]{logos/bbw.pdf}}\thispagestyle{empty}\newpage\mbox{}}
]%%


%%\titleformat{\part}{\normalfont\Huge\bfseries\color{titelFarbe}}{\thepart}{1em}{}%%
%\titleformat{\section}{\normalfont\huge\bfseries\color{titelFarbe}}{\thesection}{1em}{}%%
%\titleformat{\subsection}{\normalfont\Large\bfseries\color{titelFarbe}}{\thesubsection}{1em}{}%%
%\titleformat{\subsubsection}{\normalfont\large\bfseries\color{titelFarbe}}{\thesubsubsection}{1em}{}%%
\titleformat{\part}{\fontfamily{\myTitelFont}\huge\bfseries\color{titelFarbe}}{\thepart}{1em}{}%%
\titleformat{\chapter}{\fontfamily{\myTitelFont}\huge\bfseries\color{titelFarbe}}{\thechapter}{1em}{}%%
\titleformat{\section}{\fontfamily{\myTitelFont}\huge\bfseries\color{titelFarbe}}{\thesection}{1em}{}%%
\titleformat{\subsection}{\fontfamily{\myTitelFont}\Large\bfseries\color{titelFarbe}}{\thesubsection}{1em}{}%%
\titleformat{\subsubsection}{\fontfamily{\myTitelFont}\large\bfseries\color{titelFarbe}}{\thesubsubsection}{1em}{}%%

%%\input{impressum.tex}



%% Theoreme: Bemerkungen, Beispiele und Definitionen
%\theoremstyle{remark}
%\newtheorem{bsp}{Beispiel}[section]
%\newtheorem{bem}{Bemerkung}[section]

%%\theoremstyle{definitionstyle}
%%\newtheorem{definition}{Definition}[section]

%% EV Hier schauen, wegen Boxen und Faben um Bsp, Bem, Definition
%% https://tex.stackexchange.com/questions/437317/leftbar-theorem-environment-with-changeable-colors-for-the-left-bar/437335

%%%%%%%%%%%%%%%%%%%%%%


%% Start fetching index entries for theindex
\makeindex


%%\setlength{\headheight}{36pt}
\setlength{\topmargin}{-19mm}
