I'm currently in the process of writing a Latex project documentation for my final exams. With the help of a template, I have hardly had to do change anything but there's one thing I couldn't fix with the help of Google/AI so far, so I thought I'd try my luck in a forum.
My documentation includes a table of contents and everything except one is in line with each other but I don't know why that is the case and would love someone to shine some light on this.

The code of the page looks like the following:
Code: Select all
\documentclass[
ngerman,
inputenc=utf8, % KORREKT: UTF-8, wie im Original
toc=listof,
toc=bibliography,
footnotes=multiple,
parskip=half,
numbers=noendperiod
]{scrartcl}
% Die zweite, überflüssige \usepackage[utf8]{inputenc} Zeile wird nicht benötigt.
\input{Meta}
\input{Allgemein/Packages}
\input{Allgemein/Seitenstil}
\input{Allgemein/Befehle}
\input{Befehle}
\begin{document}
\phantomsection
\thispagestyle{plain}
\pdfbookmark[1]{Deckblatt}{deckblatt}
\input{Deckblatt}
\cleardoublepage
% Preface --------------------------------------------------------------------
\phantomsection
\pagenumbering{Roman}
\pdfbookmark[1]{Inhaltsverzeichnis}{inhalt}
\tableofcontents
\phantomsection
\listoffigures
\phantomsection
\listoftables
\phantomsection
\lstlistoflistings
\cleardoublepage
\input{Abkuerzungen}
% Content---------------------------------------------------------------------
\pagenumbering{arabic}
% Die manuellen Fußzeilen-Befehle wurden entfernt, da sie nun überflüssig sind.
\input{Inhalt.tex}
% Attachments---------------------------------------------------------------------
\clearpage
\appendix
\pagenumbering{roman}
\input{Anhang}
\end{document}
Code: Select all
% !TEX root = ../Projektdokumentation.tex
% Page margins
\setlength{\topskip}{\ht\strutbox}
\geometry{a4paper, top=30mm, left=25mm, right=25mm, bottom=30mm}
\setlength{\footskip}{10mm} % Abstand der Fußzeile anpassen
\usepackage[automark,headsepline,ilines,footsepline]{scrlayer-scrpage}
% Fallbacks (falls Meta.tex mal nicht geladen wurde)
\providecommand{\titel}{}
\providecommand{\untertitel}{}
\providecommand{\autorName}{}
\pagestyle{scrheadings}
\clearscrheadfoot
% -- HEADER--
\renewcommand{\headfont}{\normalfont}
\ihead{%
\large\textsc{\titel}\\
\small\untertitel\\[1ex]
\textit{\headmark}%
}
\chead{}
\ohead{\includegraphics[height=12mm]{Bilder/Dachser-Logo.png}} % Logos lieber in Höhe begrenzen
\setlength{\headheight}{21mm} % 18 mm ist knapp -> erhöhen!
% -- FOOTER--
\ifoot{\autorName}
\cfoot{}
\ofoot{\pagemark} % Seitenzahl rechts
% Überschriften nach DIN 5008 in einer Fluchtlinie
% ------------------------------------------------------------------------------
\newcommand{\headingSpace}{1.5cm}
% Abschnittsüberschriften im selben Stil wie beim Inhaltsverzeichnis einrücken
\renewcommand*{\othersectionlevelsformat}[3]{
\makebox[\headingSpace][l]{#3\autodot}
}
% Für die Einrückung wird das Paket tocloft benötigt
\cftsetindents{section}{0.0cm}{\headingSpace}
\cftsetindents{subsection}{0.0cm}{\headingSpace}
\cftsetindents{subsubsection}{0.0cm}{\headingSpace}
\cftsetindents{figure}{0.0cm}{\headingSpace}
\cftsetindents{table}{0.0cm}{\headingSpace}
\cftsetindents{listing}{0.0cm}{\headingSpace}
% General
% ------------------------------------------------------------------------------
\onehalfspacing % Zeilenabstand 1,5 Zeilen
\frenchspacing % erzeugt ein wenig Platz hinter einem Punkt
\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000
% Quellcode-Ausgabe formatieren (einfachste, stabile Version)
\lstset{
numbers=left,
numberstyle=\tiny,
numbersep=5pt,
breaklines=true,
frame=single,
showstringspaces=false
}
% Customise lists
\renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}
\renewcommand{\labelenumiii}{\arabic{enumi}.\arabic{enumii}.\arabic{enumiii}}
% table colouring:
% Die folgenden zwei Zeilen sind die wahrscheinlichste Ursache des ursprünglichen Fehlers
% und bleiben daher deaktiviert.
\definecolor{heading}{rgb}{0.64,0.78,0.86}
\definecolor{odd}{rgb}{0.9,0.9,0.9}