% arguelles v2.1.0
% author: Michele Piazzai
% contact: michele.piazzai@uc3m.es
% license: MIT

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthemeArguelles}[2023/02/02 Argüelles]

\mode<presentation>

% dependencies
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[osf]{Alegreya}
\RequirePackage[osf]{AlegreyaSans}
\RequirePackage[euler-hat-accent]{eulervm}
\RequirePackage[bb=px]{mathalpha}
\RequirePackage[nopatch=footnote]{microtype}
\RequirePackage{fontawesome5}
\RequirePackage{opencolor}
\RequirePackage{enumitem}
\RequirePackage{parskip}
\RequirePackage{tikz}

% components
\useinnertheme{Arguelles}
\useoutertheme{Arguelles}
\usecolortheme{Arguelles}
\usefonttheme{Arguelles}

\newif\if@optSans
\@optSansfalse
\DeclareOption{sans}{\@optSanstrue}
\newif\if@optFrameno
\@optFramenofalse
\DeclareOption{frameno}{\@optFramenotrue}
\newif\if@optMp
\@optMpfalse
\DeclareOption{mp}{\@optMptrue}
\ProcessOptions

% sans font
\if@optSans
\usefonttheme[onlymath]{serif}
\newcommand\mediumfont{\AlegreyaSansMedium}
\else
\usefonttheme{serif}
\newcommand\mediumfont{\AlegreyaMedium}
\fi

% frame numbers
\if@optFrameno
\defbeamertemplate*{footline}{Arguelles}{
 \usebeamerfont{footline section}\hfill\raisebox{.025\paperheight}{
    \insertframenumber\hspace{.01\paperwidth}
    }
}
\fi

\if@optMp
% extra packages
\RequirePackage[normalem]{ulem}
\RequirePackage{booktabs}
\RequirePackage{dcolumn}
\RequirePackage{makecell}
\RequirePackage{colortbl}
\RequirePackage{cancel}
\RequirePackage{pgfplots}
\RequirePackage{csvsimple}

% tikz options
\usetikzlibrary{calc}

% pgfplots options
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{statistics,fillbetween}
\fi

\AtBeginEnvironment{proof}{\let\@addpunct\@gobble}

\newcommand\Section[1]{\section{\texorpdfstring{\lowercase{#1}}{#1}}}
\newcommand\End{\appendix}
\renewcommand{\appendixname}{End}

\mode<all>
\endinput
