\documentclass[%
    fontsize=11pt, % Schriftgröße
    twoside=off % kein einseitiges Layout
]{scrbook} % Dokumentenklasse: KOMA-Script Book
\usepackage{scrlayer-scrpage} % Anpassbare Kopf- und Fußzeilen

\usepackage[utf8]{inputenc} % Textkodierung: UTF-8
\usepackage[T1]{fontenc} % Zeichensatzkodierung

\usepackage[ngerman]{babel} % Deutsche Lokalisierung
\usepackage{graphicx} % Grafiken

% Schriftart Helvetica:
\usepackage[scaled]{helvet}
\renewcommand{\familydefault}{\sfdefault}

% Silbentrennung:
\usepackage{hyphenat}
\hyphenation{TUM in-te-res-siert} % Eigene Silbentrennung
%\tolerance 2414
%\hbadness 2414
%\emergencystretch 1.5em
%\hfuzz 0.3pt
\widowpenalty=10000     % Hurenkinder
\clubpenalty=10000      % Schusterjungen
%\vfuzz \hfuzz

\usepackage[onehalfspacing]{setspace} % 1,5facher Zeilenabstand
\usepackage{calc} % Berechnungen
\usepackage{enumitem} % Mehr Kontrolle über itemize-, enumerate- und description-Umgebungen
\usepackage{relsize} % Schriftgröße in Abhängigkeit von aktueller anpassen
\usepackage{tabularx} % Flexiblere Tabellen
\usepackage[format=hang,font=footnotesize,labelfont=bf, singlelinecheck=off]{caption} % Anpassen von Beschriftungen
\usepackage{amssymb, amstext, amsfonts, amsthm, amsmath}	% Packages für Formeln
\newlist{todolist}{itemize}{2}
\setlist[todolist]{label=$\square$}
\usepackage{float}


% Nummerierung von Abbildungen & Tabellen durchgängig, statt nach Kapiteln:
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}

% Spezielle Befehlsdefinitionen:
\newcommand{\Thema}{}

% Debugging:
%\usepackage{showframe} % Layout-Boxen anzeigen
%\usepackage{layout} % Layout-Informationen
%\usepackage{printlen} % Längenwerte ausgeben

	% ToDo
	\usepackage{todonotes}
	
	\usepackage{bm}                         % bold math
	
	\usepackage{geometry}
	\geometry{left=2cm, right=2.1cm, bottom=2cm, top=3.5cm}   % Seitenränder einstellen

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Bookmarks und Hyperlinks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	\usepackage[hidelinks,
	           plainpages=false,
						 bookmarksnumbered=true, 
						 bookmarksopen=false,
						 pdfpagemode={UseOutlines},pdfstartview={FitV},pdfborder={0 0 0},
						 colorlinks=true,
						 linkcolor=black,
						 filecolor=black,
						 urlcolor=black,
						 citecolor=black,
						 hypertexnames=true,
						 pdfpagelabels=true,
						 hyperindex=true,
						 %linktocpage=true,  % Seitenzahlen als Link und nicht der Name oder Text
						 %pagebackref=true,
						 final=true
						 ]{hyperref}
						

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Literaturverzeichnis und Zitierstil  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[nosectionbib]{apacite}
\AtBeginDocument{\urlstyle{APACsame}}
\usepackage[babel, german=quotes]{csquotes}
						
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%		
%%% Abkürzungsverzeichnis und Symbolverzeichnis %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \usepackage[
	    %style=super,
		  %nonumberlist, % keine Seitenzahlen anzeigen
		  acronym,      % Abkürzungsverzeichnis
		  toc,         	% Einträge im Inhaltsverzeichnis
			nogroupskip,  % kein doppelter Zeilenabstand zwischen Gruppen im Verzeichnis (nach ersten Buchstaben sortiert)
			nopostdot,    % Kein Punkt am Ende einer Beschreibung im Glossar
			%xindy,% xindy zum Indexieren verwenden
	    ]{glossaries}
			
			
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
			
	\newglossarystyle{supera}{%
  \renewenvironment{theglossary}%
    {\tablehead{}\tabletail{}%
     \begin{supertabular}{L{0.15\textwidth}L{0.8\textwidth}}}%
    {\end{supertabular}}%
  \renewcommand*{\glossaryheader}{}%
  \renewcommand*{\glsgroupheading}[1]{}%
  \renewcommand{\glossentry}[2]{%
    \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
    \glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
  }%
  \renewcommand{\subglossentry}[3]{%
     &
     \glssubentryitem{##2}%
     \glstarget{##2}{\strut}\glossentrydesc{##2}\glspostdescription\space
     ##3\tabularnewline
  }%
  \renewcommand*{\glsgroupskip}{%
    \ifglsnogroupskip\else & \tabularnewline\fi}%
}

\setglossarystyle{supera}
		
  \newglossary[slg]{symbols}{sls}{slo}{Symbolverzeichnis}%{\glssymbolsgroupname}   % Symbolverzeichnis
	\newglossary[flg]{vektor}{fls}{flo}{Vektoren und Matrizen}
	
	% Den Punkt am Ende jeder Beschreibung deaktivieren
  \renewcommand*{\glspostdescription}{}
	
	%\setlength{\glsdescwidth}{0.4\textwidth} % Breite der Definitionsspalte anpassen

  \makeglossaries			
		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%		
%%% Sonstige Kommandos %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	\renewcommand{\dh}{d.\thinspace h. }
	\newcommand{\zb}{z.\thinspace B. }
	\newcommand{\og}{o.\thinspace g. }
	% \zb im Text führt zu einem typographisch korrekten z. B. mit richtigem Abstand zwischen z. und B.
