\ProvidesPackage{shortcuts}

\usepackage{fixltx2e}  % Various bug fixes
%\usepackage[version=3]{mhchem}
\usepackage[clockwise]{rotating} % To rotate tables
\usepackage[usenames,dvipsnames]{color}
%\usepackage{setspace} 
%\onehalfspacing
%\usepackage[printonlyused]{acronym}
\usepackage{float} % Can use [H] for floats
\usepackage{multirow} % Columns spanning multiple rows in a tabular environment
\usepackage{graphicx} % Figures
%\usepackage{stfloats} % Figures across columns can go at the bottom of the page as well as the top
\usepackage[nodayofweek]{datetime}
%\usepackage{gensymb} % Symbols
\usepackage{natbib} % Referencing
\usepackage[center,labelfont={small,it},textfont={small,it}]{caption}
\usepackage{subfig}
\usepackage{booktabs} % Better looking tables
\usepackage[table]{xcolor} % For colour in tables
%\usepackage[utf8]{inputenc}
\usepackage{textcomp} % Extra symbols
% PDF info and hyperlinks
\usepackage{hyperref}
\hypersetup{
    pdfborder={0 0 0}
    %colorlinks=true,
    %linkcolor=linkcolor,
    %citecolor=linkcolor
}
\urlstyle{same}
% More space between captions above tables and table below
\setlength{\belowcaptionskip}{6pt}


% Numbering of lists, "1. (a)"
\renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{(\alph{enumii})}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%             Code listings             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{listings} % For source code

\definecolor{grey}{gray}{0.3}
\lstset{language=Matlab,
    basicstyle=\ttfamily\tiny,
    showspaces=false,
    showtabs=false,
    showstringspaces=false,
    breaklines=true,
    keywordstyle=\color{blue},
    sensitive=false,
    emphstyle=\color{black}\bfseries,
    commentstyle=\color{ForestGreen}\slshape,
    stringstyle=\color{Purple},
    numbers=left, numberstyle=\tiny, stepnumber=5, numbersep=8pt, firstnumber=1,
}

\lstset{language=R,
    basicstyle=\ttfamily\tiny,
    showspaces=false,
    showtabs=false,
    showstringspaces=false,
    breaklines=true,
    keywordstyle=\color{black},
    sensitive=false,
    emphstyle=\color{black}\bfseries,
    commentstyle=\color{ForestGreen}\slshape,
    stringstyle=\color{black},
    numbers=left, numberstyle=\tiny, stepnumber=5, numbersep=8pt, firstnumber=1,
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%            Custom Commands            %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Formatting shortcuts
\newcommand{\sups}[1]{\textsuperscript{#1}}
\newcommand{\subs}[1]{\textsubscript{#1}}
\newcommand{\code}[1]{\begin{small}\texttt{#1}\end{small}}
\newcommand{\codep}[1]{(\begin{small}\texttt{#1}\end{small})}
\newcommand{\Rcmd}[1]{\begin{small}\texttt{> #1}\end{small}}
\newcommand{\degree}{\ensuremath{^\circ} }
\newcommand{\func}[1]{\textit{#1}-function}
\newcommand{\funcs}[1]{\textit{#1}-function }
\newcommand{\HLcell}{\cellcolor{yellow}}
\newcommand{\tpm}{$ \pm $}
\newcommand{\grey}[1]{\textcolor{gray}{#1}}
\newcommand{\pval}{\textit{p}-value}
\newcommand{\HL}[1]{\textcolor{red}{\textbf{#1}}}


% Useful commands for maths
\newcommand{\dif}[2]{\frac{d#1}{d#2}}
\newcommand{\ddif}[2]{\frac{d^2#1}{d#2^2}}
\newcommand{\pdif}[2]{\frac{\partial#1}{\partial#2}}
\newcommand{\ppdif}[2]{\frac{\partial^2#1}{\partial#2^2}}
\newcommand{\reac}[2]{\mathop{\rightleftharpoons}^{#1}_{#2}}
\newcommand{\vect}[1]{\underline{#1}}
\newcommand{\vectornorm}[1]{\left|\left|#1\right|\right|}
\newcommand{\mtrx}[1]{\mathbf{#1}}

\newcommand{\var}[1]{\textit{#1}}
\newcommand{\micron}{~\textmu m}
\newcommand{\microns}{~\textmu m }
\newcommand{\micronsq}{~\textmu m\textsuperscript{2}}
\newcommand{\micronsqs}{~\textmu m\textsuperscript{2} }
\newcommand{\pmicronsq}{/\textmu m\textsuperscript{2}}
\newcommand{\pmicronsqs}{/\textmu m\textsuperscript{2} }
\newcommand{\rmin}{$ r_{\text{min}} $}
\newcommand{\rmins}{$ r_{\text{min}} $ }


% Commands for referencing figures, equations and tables
% Figures
\newcommand{\figrefp}[1]{(Figure~\ref{fig:#1})}
\newcommand{\Figref}[1]{Figure~\ref{fig:#1}}
\newcommand{\figref}[1]{Figure~\ref{fig:#1}}
% Equations
\newcommand{\eqnrefp}[1]{(Equation~\ref{eq:#1})}
\newcommand{\Eqnref}[1]{Equation~(\ref{eq:#1})}
\newcommand{\eqnref}[1]{Equation~(\ref{eq:#1})}
% Tables
\newcommand{\tabrefp}[1]{(Table~\ref{tab:#1})}
\newcommand{\Tabref}[1]{Table~\ref{tab:#1}}
\newcommand{\tabref}[1]{Table~\ref{tab:#1}}
% Listings
\newcommand{\lstrefp}[1]{(Listing~\ref{lst:#1})}
\newcommand{\Lstref}[1]{Listing~\ref{lst:#1}}
\newcommand{\lstref}[1]{Listing~\ref{lst:#1}}
% Appendices
\newcommand{\apprefp}[1]{(Appendix~\ref{app:#1})}
\newcommand{\Appref}[1]{Appendix~\ref{app:#1}}
\newcommand{\appref}[1]{Appendix~\ref{app:#1}}
% Sections
\newcommand{\secrefp}[1]{(Section~\ref{sec:#1})}
\newcommand{\Secref}[1]{Section~\ref{sec:#1}}
\newcommand{\secref}[1]{Section~\ref{sec:#1}}
% Chapters
\newcommand{\chprefp}[1]{(Chapter~\ref{chp:#1})}
\newcommand{\Chpref}[1]{Chapter~\ref{chp:#1}}
\newcommand{\chpref}[1]{Chapter~\ref{chp:#1}}

% Image sizes
\newcommand{\fullimgwidth}{0.9\textwidth}
\newcommand{\largeimgwidth}{0.9\textwidth}
\newcommand{\halfimgwidth}{0.49\textwidth}
\newcommand{\medimgwidth}{0.49\textwidth}
\newcommand{\tablesize}{\footnotesize}

% Tips
%
% Use wallpaper package to add background to title or any page
%
% Use package mathrsfs and \mathscr{F} for things like 
%   Fourier, Laplace transform

