\documentclass[a4paper,12pt]{scrartcl}
\usepackage{amssymb, amsmath} % needed for math
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
\usepackage[top=3cm, bottom=3cm, left=4cm, right=2cm]{geometry} %layout
\usepackage{hyperref}   % links im text
\usepackage{color}
\usepackage{framed}
\usepackage{enumerate}  % for advanced numbering of lists
\usepackage{pdfpages}  % Signatureinbingung und includepdf
\usepackage{parskip}   % spaces instead of intendation between paragraphs
\usepackage{cite}
\usepackage[scaled=.90]{helvet}% Helvetica, served as a model for arial
\linespread{1.45}     % 1,45-Facher Zeilenabstand

\usepackage{titlesec}
%\titlespacing{command}{left spacing}{before spacing}{after spacing}[right]
\titlespacing\section{0pt}{12pt plus 3pt minus 2pt}{0pt plus 2pt minus 1pt}
\usepackage[framemethod=tikz,xcolor=true]{mdframed}

\usepackage{enumitem}
\usepackage{braket} % needed for nice printing of sets

\usepackage{fancyhdr}  % needed for the footer
\usepackage{lastpage}  % needed for the footer

\usepackage{tikz} % needed for arrow in document
\usetikzlibrary{shapes.arrows} % needed for arrow in document

\clubpenalty  = 10000   % Schusterjungen verhindern
\widowpenalty = 10000   % Hurenkinder verhindern

\hypersetup{ 
  pdfauthor   = {Martin Thoma}, 
  pdfkeywords = {Asymmetrische Verschlüsselungsverfahren; RSA-Kryptosystems}, 
  pdftitle    = {Asymmetrische Verschlüsselungsverfahren am Beispiel des RSA-Kryptosystems},
  pdfborder = {0 0 0} % remove red box around hyperlinks
} 
\usepackage[german,nameinlink]{cleveref}
\crefname{section}{Kapitel}{Kapitel}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[R]{Seite~\thepage~von \pageref{LastPage}}

% From http://www.matthewflickinger.com/blog/archives/2005/02/20/latex_mod_spacing.asp
% Thanks!
\makeatletter
\def\imod#1{\allowbreak\mkern10mu({\operator@font mod}\,\,#1)}
\makeatother

\usepackage{minted} % needed for the inclusion of source code


\newcommand{\titledate}[2][2.5in]{%
  \noindent%
  \begin{tabular}{@{}p{#1}@{}}
    \\ \hline \\[-.75\normalbaselineskip]
    #2
  \end{tabular} \hspace{1in}
  \begin{tabular}{@{}p{#1}@{}}
    \\ \hline \\[-.75\normalbaselineskip]
    Unterschrift
  \end{tabular}
}

\begin{document}

\def\myDownArrow{\smash{\begin{tikzpicture}[baseline=6mm]\useasboundingbox (-2,0);\node[single arrow,draw=black,fill=black!10,minimum height=4cm,minimum width=1.2cm,shape border rotate=270] at (0,-1) {};\end{tikzpicture}}}
\def\myUpArrow{\smash{\begin{tikzpicture}[baseline=6mm]\useasboundingbox (-2,0);\node[single arrow,draw=black,fill=black!10,minimum height=4cm,minimum width=1.2cm,shape border rotate=90] at (0,-1) {};\end{tikzpicture}}}

\def\myDownArrowB{\smash{\begin{tikzpicture}[baseline=6mm]\useasboundingbox (-1,0);\node[single arrow,draw=black,fill=black!10,minimum height=4cm,minimum width=1.2cm,shape border rotate=270] at (0,-1) {};\end{tikzpicture}}}
\def\myUpArrowB{\smash{\begin{tikzpicture}[baseline=6mm]\useasboundingbox (-1,0);\node[single arrow,draw=black,fill=black!10,minimum height=4cm,minimum width=1.2cm,shape border rotate=90] at (0,-1) {};\end{tikzpicture}}}

\setcounter{page}{0}
\pagenumbering{roman} 

%\input{Titelseite}
\includepdf[pages=1]{Titelseite.pdf}
\clearpage

\thispagestyle{empty}
\tableofcontents 
\clearpage


\pagenumbering{arabic} 
\setcounter{page}{2}

% Start der eigentlichen Arbeit
\input{Kapitel-1}
\clearpage
\input{Kapitel-2}
\input{Kapitel-3}
\clearpage
\input{Kapitel-4}
\input{Kapitel-5}
\clearpage
\input{Kapitel-6}
\clearpage
\input{Kapitel-7}
\clearpage

\input{Literatur}
\clearpage

\input{Anhang}
\clearpage

\newpage
\input{Selbststaendigkeitserklaerung}

\end{document}
