\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{gemplate}[2024/02/13]

\RequirePackage{import}
\RequirePackage{graphicx}
\RequirePackage{xcolor}
\RequirePackage{bookmark}
\RequirePackage{booktabs}
\RequirePackage{csquotes}
\RequirePackage{titling} % multiple \maketitle within a document
\RequirePackage{longtable}
\RequirePackage[normalem]{ulem} % better underline
\RequirePackage{tabu} % long table formatting
\RequirePackage{rotating} % table rotating
\RequirePackage{makecell} % text line breaks in the tabular env
\RequirePackage{setspace} % line spacing
\RequirePackage{multirow}
\RequirePackage[margin=2.5cm,nohead]{geometry}
%\RequirePackage{minted} % source code highlighting
\RequirePackage[toc, title]{appendix}
\RequirePackage{nicefrac}       % compact symbols for 1/2, etc.
\RequirePackage{microtype}      % microtypography
\RequirePackage[margin=15pt,font=small,labelfont={bf,sf}]{caption}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{enumitem}
\RequirePackage[american]{babel}
\RequirePackage[backend=biber,style=apa,uniquename=false,uniquelist=false,citetracker=true,maxcitenames=2,doi=false,annotation=false,natbib=true]{biblatex}
% first cite use full author list, all others use `et al'
\AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}}
% remove the letter (2021a, 2021b) following same first author surname
\AtEveryCitekey{\clearfield{extradate}}
\AtEveryBibitem{\clearfield{extradate}}

% fonts
\usepackage[T1]{fontenc}

\usepackage[semibold]{CrimsonPro}
%% The font package uses mweights.sty which has som issues with the
%% \normalfont command. The following two lines fixes this issue.
\let\oldnormalfont\normalfont
\def\normalfont{\oldnormalfont\mdseries}


\usepackage{eulervm} % maths font



% document layout
\linespread{1.5}
\usepackage{indentfirst} % indent first sentence of a new section

% table numbering in appendices (e.g., Table A.1)
% not working properly
%\setcounter{table}{0}
%\renewcommand\thetable{\Alph{section}.\arabic{table}}

% align table cells with large amount of text (using \makecell{})
\renewcommand{\cellalign}{tl}

% increase space between rows in table
\renewcommand{\arraystretch}{1.5}


% definitions
\definecolor{monashblue}{HTML}{006DAE}
\definecolor{darkred}{rgb}{100,0,0}

\RequirePackage{hyperref}
\hypersetup{
    colorlinks=true,
    urlcolor=monashblue,
    linkcolor=monashblue,
    citecolor=monashblue}


% define the use of \thanks{} symbol
\def\@fnsymbol#1{\ensuremath{\ifcase#1\or \mathsection\or \dagger\or
            \mathparagraph\or \ddagger\or \|\or **\or \dagger\dagger
        \or \ddagger\ddagger \else\@ctrerr\fi}}



% new commands
\newcommand{\mc}{\multicolumn} % multicolumn in tables
\newcommand{\red}{\textcolor{red}} % command for red text
\newcommand*\diff{\mathop{}\!\mathrm{d}} % `d` in differentials 




