\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{thesis}[2021/10/28 Master Thesis]
\ProcessOptions\relax
\LoadClass[a4paper,12pt,twoside,openright]{memoir}
\RequirePackage{xcolor}
\include{rwth-colors.tex}
\RequirePackage{calc}
\setbinding{5mm}
\settypeblocksize{650pt}{1.2\lxvchars}{*}
\setlrmargins{*}{*}{1.5}
\setulmargins{3cm}{*}{*}
\setheadfoot{2\onelineskip}{2\onelineskip}
\setmarginnotes{17pt}{3.5cm}{\onelineskip}
\checkandfixthelayout
\pagestyle{ruled}
\copypagestyle{chapter}{plain}
\makeevenfoot{chapter}{\thepage}{}{}
\makeoddfoot{chapter}{}{}{\thepage}
\RequirePackage{amsfonts}
\RequirePackage{mathspec}
\let\RequirePackage\original@RequirePackage
\let\usepackage\RequirePackage
\RequirePackage{fontspec}
\RequirePackage{stmaryrd}
\setprimaryfont[
UprightFont={*},
ItalicFont={* Italic},
BoldFont={* Semibold},
BoldItalicFont={* Semibold Italic},
Scale=MatchLowercase]{Source Serif Pro}
\setallsansfonts[
UprightFont={*},
ItalicFont={* Italic},
BoldFont={* Semibold},
BoldItalicFont={* Semibold Italic},
Scale=MatchLowercase]{Source Sans Pro}
\setallmonofonts[
UprightFont={*},
BoldFont={* Semibold},
Scale=MatchLowercase]{Source Code Pro}
\setmathfont(Digits,Latin)[
UprightFont={*},
BoldFont={* Semibold},
ItalicFont={* Italic},
BoldItalicFont={* Semibold Italic}
]{Source Serif Pro}
\setmathfont(Greek)[
UprightFont={*},
ItalicFont={* Italic},
BoldFont={* Semibold},
BoldItalicFont={* Semibold Italic},
Scale=MatchLowercase,
]{Source Serif Pro}
\colorlet{chaptercolor}{rwth-50}
\newcommand\numlifter[1]{\raisebox{-2cm}[0pt][0pt]{\smash{#1}}}
\newcommand\numindent{\kern37pt}
\newlength\chaptertitleboxheight
\makechapterstyle{hansen}{
\renewcommand\printchaptername{\raggedleft}
\renewcommand\printchapternum{ \begingroup \leavevmode \chapnumfont \strut \numlifter{\thechapter} \numindent \endgroup }
\renewcommand*{\printchapternonum}{ \vphantom{\begingroup \leavevmode \chapnumfont \numlifter{\vphantom{9}} \numindent \endgroup}
\afterchapternum}
\setlength\midchapskip{0pt}
\setlength\beforechapskip{0.5\baselineskip}
\setlength{\afterchapskip}{3\baselineskip}
\renewcommand\chapnumfont{ \fontsize{4cm}{0cm} \bfseries \sffamily \color{chaptercolor} }
\renewcommand\chaptitlefont{ \normalfont \huge \bfseries \raggedleft } \settototalheight\chaptertitleboxheight{ \parbox{\textwidth}{\chaptitlefont \strut bg\\bg\strut}}
\renewcommand\printchaptertitle[1]{ \parbox[t][\chaptertitleboxheight][t]{\textwidth}{ \chaptitlefont\strut ##1\strut} }
}
\chapterstyle{hansen}
\setsecheadstyle{\Large\bfseries\color{rwth-75}\raggedright}
\renewcommand*{\sectionrefname}{Section~}
\PassOptionsToPackage{ngerman,english}{babel}
\RequirePackage{babel}
\RequirePackage{url}
\PassOptionsToPackage{backend=biber,style=numeric,citestyle=numeric-comp,sorting=ynt,defernumbers=true,url=false}{biblatex}
\RequirePackage{biblatex}
\PassOptionsToPackage{english,ngerman}{babel}
\RequirePackage{babel}
\PassOptionsToPackage{german=quotes}{csquotes}
\RequirePackage{csquotes}
\usepackage[super]{nth}
\RequirePackage{tikz}
\PassOptionsToPackage{pdfversion=2.0,hidelinks}{hyperref}
\RequirePackage{hyperref}
\PassOptionsToPackage{acronym,nomain,automake,nonumberlist,toc}{glossaries}
\RequirePackage{glossaries}
\RequirePackage{glossary-longragged}
\RequirePackage{subcaption}