\documentclass[a4paper,11pt]{scrartcl}

\usepackage[utf8]{inputenc}      % encoding UTF-8
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}      % support of german lang. (e.g. hyphenation)
\usepackage{graphicx}            % to include images

\usepackage{tikz}

\usepackage{float}               % defines how text floats arround objects
\usepackage{subfig}

\usepackage{hyperref}            % hyperlinks in PDF (e.g. table of content)

\usepackage{fancyhdr}
\usepackage{framed}
\usepackage{xcolor}

\usepackage{amsmath}             % math packages
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}

\numberwithin{equation}{section} % numbering accordingly section numbers
\numberwithin{figure}{section}

% headlines with serifes
\addtokomafont{sectioning}{\rmfamily}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em}        % gap between paragraphs

\renewcommand{\headrulewidth}{0.5pt}
\pagestyle{fancy}
\lhead{\leftmark}
%\chead{\bf\thema}
\rhead{\rightmark}
\lfoot{}
\cfoot{\thepage}
\rfoot{}

% customize the leftbar environment
\newlength{\leftbarwidth}
\setlength{\leftbarwidth}{2pt}
\newlength{\leftbarsep}
\setlength{\leftbarsep}{10pt}
\colorlet{leftbarcolor}{gray}
\newcommand*{\leftbarcolorcmd}{\color{leftbarcolor}}

\renewenvironment{leftbar}{%
    \def\FrameCommand{
        {\leftbarcolorcmd{
            \vrule width \leftbarwidth\relax\hspace {\leftbarsep}
        }}
    }%
    \MakeFramed {\advance \hsize -\width \FrameRestore }%
}{\endMakeFramed}


% define some useful environments
\theoremstyle{definition}
\newtheorem{thm:defn}{Definition}
\theoremstyle{plain}
\newtheorem{thm:satz}{Satz}


\newenvironment{satz}%
{\begin{addmargin}{0.02\textwidth}\begin{thm:satz}}%
{\end{thm:satz}\end{addmargin}}


\newenvironment{defn}%
{\begin{addmargin}{0.02\textwidth}\begin{thm:defn}}%
{\end{thm:defn}\end{addmargin}}

\newenvironment{bsp}%
{\begin{leftbar}\emph{Beispiel.}}%
    {\end{leftbar}}
    
\newenvironment{bem}%
{\begin{leftbar}\emph{Bemerkung.}}%
    {\end{leftbar}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%      Daten zum Dokument      %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\stand}{\today}
\newcommand{\thema}{Integration im $\mathbb{R}^n$}
\newcommand{\autoren}{Benjamin Rüth}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\input{titlepage}

\newpage
\tableofcontents
\newpage

%% HIER KOMMT DER INHALT HIN
\input{01-Riemann-Integral/main}
\input{02-Geometrie/main}


\end{document}
