\documentclass[12pt,a4paper,bibliography=totocnumbered,listof=totocnumbered]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{tabularx}
\usepackage{geometry}
\usepackage[tocflat]{tocstyle}
\usepackage{setspace}
\usepackage[right]{eurosym}
\usepackage[printonlyused]{acronym}
\usepackage{subfig}
\usepackage{floatflt}
\usepackage[usenames,dvipsnames]{color}
\usepackage{colortbl}
\usepackage{paralist}
\usepackage{array}
\usepackage{titlesec}
\usepackage{parskip}
\usepackage[right]{eurosym}
\usepackage{fancyhdr}
%\usepackage{picins}
\usepackage[subfigure,titles]{tocloft}
\usepackage[pdfpagelabels=true]{hyperref}
\usepackage{listings}
\lstset{basicstyle=\footnotesize, captionpos=b, breaklines=true, showstringspaces=false, tabsize=2, frame=lines, numbers=left, numberstyle=\tiny, xleftmargin=2em, framexleftmargin=2em}
\makeatletter
\def\l@lstlisting#1#2{\@dottedtocline{1}{0em}{1em}{\hspace{1,5em} Lst. #1}{#2}}
\makeatother
\geometry{a4paper, top=30mm, left=40mm, right=20mm, bottom=30mm, headsep=12.5mm, footskip=12.5mm}
\renewcommand{\rmdefault}{ptm}
\hypersetup{unicode=false, pdftoolbar=true, pdfmenubar=true, pdffitwindow=false, pdfstartview={FitH},
pdftitle={Abschlussarbeit},
pdfauthor={Eric und Felix Brandt},
pdfsubject={Abschlussarbeit},
pdfcreator={\LaTeX\ with package \flqq hyperref\frqq},
pdfproducer={pdfTeX \the\pdftexversion.\pdftexrevision},
pdfkeywords={Abschlussarbeit},
pdfnewwindow=true,
colorlinks=true,linkcolor=black,citecolor=black,filecolor=magenta,urlcolor=black}
\pdfinfo{/CreationDate (D:20110620133321)}
\renewcaptionname{ngerman}{\figurename}{Abb.}
\begin{document}
\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{-6pt plus 2pt minus 2pt}
% Kopf- und Fusszeile
\renewcommand{\sectionmark}[1]{\markright{#1}}
\renewcommand{\leftmark}{\rightmark}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{\thesection\space\contentsname}
\lfoot{Footer Abschlussarbeit}
\cfoot{}
\rfoot{\ \linebreak Seite \thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
% Vorspann
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\theHsection}{\Roman{section}}
\pagenumbering{Roman}
% ----------------------------------------------------------------------------------------------------------
% Titelseite
% ----------------------------------------------------------------------------------------------------------
\thispagestyle{empty}
\begin{center}
\includegraphics[scale=1]{img/htw_logo.jpg}\\
\vspace*{2cm}
\Large
\textbf{Fakultät}\\
\textbf{Informatik/Mathematik}\\
\vspace*{2cm}
\Huge
\textbf{Bachelorarbeit}\\
\vspace*{0.5cm}
\large
über das Thema\\
\vspace*{1cm}
\textbf{Dein Thema }\\
\vspace*{2cm}
\vfill
\normalsize
\newcolumntype{x}[1]{>{\raggedleft\arraybackslash\hspace{0pt}}p{#1}}
\begin{tabular}{x{6cm}p{7.5cm}}
\rule{0mm}{5ex}\textbf{Autoren:} & Name und Vorname\newline deine mail \\
\rule{0mm}{5ex}\textbf{Prüfer:} & Prof. Mustermann/frau \\
\rule{0mm}{5ex}\textbf{Abgabedatum:} & 01.01.2017 \\
\end{tabular}
\end{center}
\pagebreak
% ----------------------------------------------------------------------------------------------------------
% Abstract
% ----------------------------------------------------------------------------------------------------------
\setcounter{page}{1}
\onehalfspacing
\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{2pt plus 2pt minus 2pt}
\rhead{KURZFASSUNG}
\section{Kurzfassung}
Kurzfassung
\vspace{-1,2em}
\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{-6pt plus 2pt minus 2pt}
\section*{Abstract}
Englische fassung
\pagebreak
% ----------------------------------------------------------------------------------------------------------
% Verzeichnisse
% ----------------------------------------------------------------------------------------------------------
% TODO Typ vor Nummer
\renewcommand{\cfttabpresnum}{Tab. }
\renewcommand{\cftfigpresnum}{Abb. }
\settowidth{\cfttabnumwidth}{Abb. 10\quad}
\settowidth{\cftfignumwidth}{Abb. 10\quad}
\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{2pt plus 2pt minus 2pt}
\singlespacing
\rhead{INHALTSVERZEICHNIS}
\RedeclareSectionCommand[tocindent=0em,tocnumwidth=3em]{subsection}
\RedeclareSectionCommand[tocindent=0em,tocnumwidth=3em]{subsubsection}
\renewcommand{\contentsname}{II Inhaltsverzeichnis}
\phantomsection
\addcontentsline{toc}{section}{\texorpdfstring{II \hspace{0.35em}Inhaltsverzeichnis}{Inhaltsverzeichnis}}
\addtocounter{section}{1}
\setlength{\cftfigindent}{0em}
\tableofcontents
\pagebreak
\rhead{VERZEICHNISSE}
% ----------------------------------------------------------------------------------------------------------
% Abkürzungen
% ----------------------------------------------------------------------------------------------------------
\section{Abkürzungsverzeichnis}
\begin{acronym}[OSGi] % längste Abkürzung steht in eckigen Klammern
\setlength{\itemsep}{-\parsep} % geringerer Zeilenabstand
\acro{OSGi}{Open Service Gateway initiative}
\end{acronym}
\newpage
% ----------------------------------------------------------------------------------------------------------
% Glossar
% ----------------------------------------------------------------------------------------------------------
\section{Glossar}
\begin{acronym}[OSGi] % längste Abkürzung steht in eckigen Klammern
\setlength{\itemsep}{-\parsep} % geringerer Zeilenabstand
\acro{OSGi}{Open Service Gateway initiative}
\end{acronym}
\newpage
\pagebreak
\listoffigures
\pagebreak
\listoftables
\pagebreak
\renewcommand{\lstlistlistingname}{ Listing-Verzeichnis}
{\labelsep2cm\lstlistoflistings}
\pagebreak
% ----------------------------------------------------------------------------------------------------------
% Inhalt
% ----------------------------------------------------------------------------------------------------------
% Abstände Überschrift
\titlespacing{\section}{0pt}{12pt plus 4pt minus 2pt}{-6pt plus 2pt minus 2pt}
\titlespacing{\subsection}{0pt}{12pt plus 4pt minus 2pt}{-6pt plus 2pt minus 2pt}
\titlespacing{\subsubsection}{0pt}{12pt plus 4pt minus 2pt}{-6pt plus 2pt minus 2pt}
% Kopfzeile
\renewcommand{\sectionmark}[1]{\markright{#1}}
\renewcommand{\subsectionmark}[1]{}
\renewcommand{\subsubsectionmark}[1]{}
\lhead{Kapitel \thesection}
\rhead{\rightmark}
\onehalfspacing
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\theHsection}{\arabic{section}}
\setcounter{section}{0}
\pagenumbering{arabic}
\setcounter{page}{1}
% ----------------------------------------------------------------------------------------------------------
% Einleitung
% ----------------------------------------------------------------------------------------------------------
\section{Einleitung}
\subsection{Tipps}
Quellen in der File \textit{bibo.bib}. Beispiel: \cite{buch}
Abkürzungen: (\ac{OSGi}).
\pagebreak
% ----------------------------------------------------------------------------------------------------------
% Kapitel: 1
% ----------------------------------------------------------------------------------------------------------
\section{Kapitel 1}
\subsection{Unterkapitel}
\pagebreak
\subsection{Unterkapitel}
\pagebreak
\subsection{Unterkapitel}
\pagebreak
\subsubsection{Unterunterkapitel}
\pagebreak
% ----------------------------------------------------------------------------------------------------------
% Kapitel 2
% ----------------------------------------------------------------------------------------------------------
\section{Kapitel 2}
\subsection{Unterkapitel}
\pagebreak
\subsection{Unterkapitel}
\pagebreak
\subsection{Unterkapitel}
\pagebreak
\subsubsection{Unterunterkapitel}
\pagebreak
% ----------------------------------------------------------------------------------------------------------
% Literatur
% ----------------------------------------------------------------------------------------------------------
\renewcommand\refname{Literaturverzeichnis}
\bibliographystyle{myalpha}
\bibliography{bibo}
\pagebreak
% ----------------------------------------------------------------------------------------------------------
% Anhang
% ----------------------------------------------------------------------------------------------------------
\pagenumbering{Roman}
\setcounter{page}{1}
\lhead{Anhang \thesection}
\begin{appendix}
\section*{Anhang}
\phantomsection
\addcontentsline{toc}{section}{Anhang}
\addtocontents{toc}{\vspace{-0.5em}}
\section{GUI}
Ein toller Anhang.
\subsection*{Screenshot}
\label{app:screenshot}
Unterkategorie
\end{appendix}
\newpage
\thispagestyle{empty}
\begin{center}
\vspace*{5em}
\huge\textbf{Erklärung}\\
\end{center}
\vspace{2em}
Hiermit versichere ich, dass ich meine Abschlussarbeit selbständig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel benutzt habe.
\vspace{4em}
\begin{minipage}{\linewidth}
\begin{tabular}{p{15em}p{15em}}
Datum: & .......................................................\\
& \centering (Unterschrift)\\
\end{tabular}
\end{minipage}
\end{document}

PDF Preview
Create an account to compile and preview