\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[final]{pdfpages}
\usepackage{stmaryrd}
\usepackage{listings}
\usepackage[hidelinks]{hyperref}
\usepackage[english]{babel}
\usepackage{color}
\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage{url}
\usepackage{sectsty}
\usepackage{etoolbox}
\usepackage{tikz}
\usepackage{parskip}
\usepackage[style=long,nonumberlist,toc,sort=use]{glossaries}
\usepackage{caption}

% Abstract
\patchcmd{\abstract}{\null\vfil}{}{}{}

% Margins
\topmargin=-0.2in
\oddsidemargin=0.4in
\textwidth=5.5in

% Graphics and images
\graphicspath{{./images/}}

% Set headers to sans serif
\allsectionsfont{\sffamily}

% Defining colors for syntax highlighting
\definecolor{commentsColor}{rgb}{0.497495, 0.497587, 0.497464}
\definecolor{keywordsColor}{rgb}{0.000000, 0.000000, 0.635294}
\definecolor{stringColor}{rgb}{0.558215, 0.000000, 0.135316}

\lstset{aboveskip=20pt,belowskip=20pt}

% Source: https://denbeke.be/blog/programming/syntax-highlighting-in-latex/
\lstset{
  backgroundcolor=\color{white},
  basicstyle=\ttfamily\small,
  breakatwhitespace=false,
  breaklines=true,
  postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
  captionpos=b,
  commentstyle=\color{commentsColor}\textit,
  deletekeywords={...},
  escapeinside={\%*}{*)},
  extendedchars=true,
  frame=tb,
  keepspaces=true,
  keywordstyle=\color{keywordsColor}\bfseries,
  %language=Python,
  otherkeywords={*,...},
  %numbers=left,
  numbersep=5pt,
  numberstyle=\tiny\color{commentsColor},
  rulecolor=\color{black},
  showspaces=false,
  showstringspaces=false,
  showtabs=false,
  stepnumber=1,
  stringstyle=\color{stringColor},
  tabsize=2,
  title=\lstname,
  columns=fixed
}

% Bibliography
\bibliographystyle{unsrt}

% Pagestyle
\pagestyle{fancy}

% Hyperlinks
\hypersetup{
  colorlinks=true,
  allcolors=black
}
