\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{uninotes}[2022/06/01 University notes class]
\LoadClass{scrbook}
\KOMAoptions{headinclude=true,footinclude=true}

\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}

% Language
\RequirePackage{babel}

% Appearance
\RequirePackage{classicthesis}
\RequirePackage{arsclassica}

% Tables and numbers
\RequirePackage{booktabs}
\RequirePackage{tabularx}
\RequirePackage{siunitx}
\sisetup{output-decimal-marker={,}}

% Figures
\RequirePackage{graphicx}
\RequirePackage{subfig}

% Floats
\RequirePackage{caption}
\captionsetup{tableposition=top,%
        figureposition=bottom,%
        labelfont={sf,bf}}

% Math
\renewcommand{\epsilon}{\varepsilon}
\renewcommand{\theta}{\vartheta}
\renewcommand{\varpi}{\pi}
\renewcommand{\varrho}{\rho}
\renewcommand{\varsigma}{\sigma}
\renewcommand{\phi}{\varphi}

% Chemistry
\RequirePackage{chemformula}

% Footnotes
\RequirePackage[symbol,bottom]{footmisc}
\DefineFNsymbols{uninotesfn}{{*}{$\dagger$}{$\ddagger$}{$\S$}%
    {**}{$\dagger\dagger$}{$\ddagger\ddagger$}{$\S\S$}%
    {***}{$\dagger\dagger\dagger$}{$\ddagger\ddagger\ddagger$}{$\S\S\S$}}
\setfnsymbol{uninotesfn}

% Bibliography
\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage[bibstyle=numeric,%
        citestyle=numeric-comp,%
        babel=hyphen,%
        backend=biber]%
    {biblatex}

% (Hyper)References
\RequirePackage{hyperref}
\DeclareRobustCommand{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
\RequirePackage{varioref}
\RequirePackage[noabbrev]{cleveref}
\creflabelformat{equation}{#2#1#3}
\AddBabelHook[italian]{translate}{patterns}%
    {\crefname{section}{paragrafo}{paragrafi}%
     \Crefname{section}{Paragrafo}{Paragrafi}}
\RequirePackage[nodocdata=false,
        noeditdata=true,
        noproducerdata=true,
        noptexdata=true,
        nopdftrailerid=true]%
    {pdfprivacy}

% Custom commands
\providecommand{\sn}[1]{\emp{#1}} % Scientific names
\providecommand{\en}[1]{\emph{\foreignlanguage{english}{#1}}}

% Misc
\setcounter{tocdepth}{1}
