% page layout
\usepackage{geometry}
\geometry{a4paper, left = 3cm, right = 3cm, top = 3cm, bottom = 3cm}

% fonts and justifying
\usepackage{textcomp}
\usepackage{microtype}
\usepackage{bm}

% mathematics fonts
\usepackage{mathtools}
\usepackage{amsmath} 							
\usepackage{amsfonts}
\usepackage{amssymb}

% page layout
\usepackage{fancyhdr}
\setlength{\headheight}{15pt}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{ \markboth{#1}{} }
\renewcommand{\sectionmark}[1]{ \markright{#1} }
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\nouppercase{\leftmark}}
\fancyhead[LO]{\nouppercase{\rightmark}}
\fancypagestyle{plain}{
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\rfoot{\footnotesize Mathematische Grundlagen
$\vert$ \copyright $ $ 2024 Dirk Ostwald CC BY 4.0}

% section titles
\setkomafont{chapter}{\sffamily\bfseries\huge}
\setkomafont{section}{\sffamily\bfseries\Large}

% figure captions
\usepackage{caption}
\captionsetup{font 			        = footnotesize, 
			        labelfont       = bf, 
			        format          = plain,
              		labelsep 	    = space, 
			        justification   = justified,
                    singlelinecheck = false}

% Beweise in footnotesize
\AtBeginEnvironment{proof}{\footnotesize}
\AtEndEnvironment{definition}{\hfill$\bullet$}
\AtEndEnvironment{theorem}{\hfill$\circ$}

