% Copyright (c) 2024 Jerry Z
%
% Copying and distribution of this file, with or without modification,
% are permitted in any medium without royalty provided the copyright
% notice and this notice are preserved.  This file is offered as-is,
% without any warranty.

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{assignment}[Jerry's Assignment Class]

\LoadClass[11pt]{article}

\RequirePackage{lmodern}
\RequirePackage[x11names]{xcolor}

\RequirePackage{textcomp, gensymb}

\RequirePackage{graphicx} % Required for inserting images

\RequirePackage{titling}
\RequirePackage{pdfpages}
\RequirePackage{fullpage}
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}

\RequirePackage{amsfonts}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{amsthm}
\RequirePackage{gensymb}
\RequirePackage{caption}

\RequirePackage{siunitx}

\RequirePackage{enumitem}

\RequirePackage[
		letterpaper,
		nomarginpar,
		left=1in,
		right=1in,
		top=0.5in,
		bottom=0.5in,
		headheight=0.5in,
		headsep=\baselineskip,
		footskip=0.5in,
		includehead,
		includefoot
	]{geometry}

\RequirePackage{listings}

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{language=SQL,
	basicstyle={\small\ttfamily},
	belowskip=3mm,
	breakatwhitespace=true,
	breaklines=true,
	classoffset=0,
	columns=flexible,
	commentstyle=\color{dkgreen},
	framexleftmargin=0.25em,
	frameshape={}{}{}{},
	keywordstyle=\color{blue},
	numbers=left,
	numberstyle=\tiny\color{gray},
	showstringspaces=false,
	stringstyle=\color{mauve},
	tabsize=3,
	xleftmargin =1em
}

\RequirePackage{tikz}
\usetikzlibrary{er}

\tikzset{multi attribute/.style={attribute,double distance=1.5pt}}
\tikzset{derive dattribute/.style={attribute,dashed}}
\tikzset{total/.style={thick}}
\tikzset{every entity/.style={
	draw=orange,fill=orange!20,distance=8em}}
\tikzset{every attribute/.style={
	draw=MediumPurple1,fill=MediumPurple1!20,distance=6em}}
\tikzset{every relationship/.style={
	draw=Chartreuse2,fill=Chartreuse2!20,distance=12em}}
\newcommand{\key}[1]{\uline{#1}}

\newcommand{\udensdash}[1]{%
	\tikz[baseline=(todotted.base)]{
		\node[inner sep=1pt,outer sep=0pt] (todotted) {#1};
		\draw[densely dashed] (todotted.south west) -- (todotted.south east);
	}%
}%

\setlength{\parindent}{0pt}

\pagestyle{fancy}

\fancyhf{}
\fancyhead[L]{\theauthor}
\fancyhead[C]{\thetitle}
\fancyhead[R]{\thedate}

\fancyfoot[R]{Page \thepage \hspace{1pt} of \pageref*{LastPage}}

\RequirePackage[hidelinks]{hyperref}

\AfterPreamble{
	\hypersetup{
		pdfauthor={\theauthor},
		pdftitle={\thetitle}
	}
}

\RequirePackage[normalem]{ulem}

\renewcommand{\thesection}{}
\def\@seccntformat#1{\protect\makebox[0pt][r]{{\csname the#1\endcsname\quad}}}
