% template.tex
% CSCI 0220 course staff, Brown University
% (c) 2018
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The preamble is everything before the \begin{document}. Here, we define the
% kind of document we are writing, import packages, set properties, and define
% our own commands/environments.
%%%%%%%%%% DOCUMENT CLASS AND PACKAGES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt,letterpaper]{article}
\usepackage{amsmath} % Environments, etc. for typesetting math.
\usepackage{amsthm} % Theorem/proof environments.
\usepackage{amssymb} % Various symbols.
\usepackage{geometry} % Easy interface to set page margins.
\usepackage{fancyhdr} % Custom headers/footers, page styles.
\usepackage[shortlabels]{enumitem} % Stuff for enumerate & itemize environments.
%%%%%%%%%% VARIOUS HOUSEKEEPING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\geometry{margin=3cm} % Sets margins on all sides.
\pagestyle{fancyplain} % Sets page style.
\headheight 35pt % Sets the height of the header.
\headsep 10pt % Sets space between the header and the body.
\setlength{\parindent}{0em} % Sets paragraph indentation.
\setlength{\parskip}{0.5em} % Sets space between paragraphs.
\setlist[enumerate]{leftmargin=*} % Normalize left margin in enumerate.
\setlist[itemize]{leftmargin=*} % Normalize left margin in itemize.
%%%%%%%%%% ASSIGNMENT INFORMATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Edit these as appropriate.
\newcommand\course{CS 22} % <-- the course
\newcommand\semester{Spring 2018} % <-- the current semester
\newcommand\banner{BXXXXXXXX} % <-- your banner id (e.g. B00123456)
\newcommand\hwnum{1} % <-- homework number
%%%%%%%%%% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\lhead{\banner\\\course\ --- \semester}
\chead{\textbf{\Large Homework \hwnum}}
\rhead{\today}
%%%%%%%%%% CUSTOM THINGS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The answer environment definition.
\newenvironment{answer}[1]{
\subsubsection*{Problem \hwnum.#1}
}
% Add your own commands!
% Here are some examples that your TAs find helpful.
% Un-comment any or all of them to use. They all are to be used in math mode.
% \newcommand{\N}{\mathbb{N}} % The set of natural numbers ($4 \in \N$).
% \newcommand{\Z}{\mathbb{Z}} % The set of integers ($-3 \in \Z$).
% \newcommand\lcm{\operatorname{lcm}} % Least common multiple ($\lcm(1,3) = 3$).
% \newcommand\Pow{\ensuremath{\operatorname{\mathcal{P}}}}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Power set ($|\Pow(\{1\})| = 2$).
% \newcommand\setbuilder[2]{\ensuremath{\left\{#1\;\middle|\;#2\right\}}}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Set-builder notation.
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ($A^{c} = \setbuilder{x}{x \not\in A}$)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The document is everything between \begin{document} and \end{document}.
% It contains everything that will show up in the output pdf file,
% besides the header (which is defined above, and appears on every page).
\begin{document}
\newpage
\begin{center}
\newcommand{\GradeTableHeader}[1]{\quad\textbf{#1}\quad\mbox{}}
\renewcommand*{\arraystretch}{1}
{\huge CS22 Homework}\\
\Large
\begin{align*}
\text{\textbf{HW}}&:
\text{\underline{\hwnum}} \\
\text{\textbf{Banner ID}}& :
\underline{\banner}
\end{align*}
\end{center}
\newpage
% BEGIN GRADE TABLE
\begin{center}
\newcommand{\GradeTableHeader}[1]{\quad\textbf{#1}\quad\mbox{}}
\renewcommand*{\arraystretch}{1}
\large
\begin{tabular}{|c|c|c|}
\hline
\GradeTableHeader{Problem}
& \GradeTableHeader{Score}
& \GradeTableHeader{Grader} \\
\hline
1 & / & ~ \quad\quad\\
2 & / & ~ \quad\quad\\
3 & / & ~ \quad\quad\\
4 & / & ~ \quad\quad\\
5 & / & ~ \quad\quad\\
6 & / & ~ \quad\quad\\
% 7 & / & ~ \quad\quad\\ % <- just in case
% 8 & / & ~ \quad\quad\\ % <- just in case
\hline
$\Sigma$ & \textbf{/} & ~ \\
\hline
\end{tabular}
\end{center}
% END GRADE TABLE
\begin{answer}{1}
Answer to problem 1 goes here.
\begin{itemize}
\item More answers.
\item Blah\dots
\item Hi there!
\end{itemize}
\end{answer}
\begin{answer}{2}
This is the answer to another question!
This is the second paragraph of another question!
\begin{enumerate}[a.]
\item Maybe it has\textellipsis{}
\item \textellipsis{}multiple parts\textellipsis{}
\begin{proof}
Because I said so.
\end{proof}
\item \textellipsis{}to answer.
\end{enumerate}
\end{answer}
\begin{answer}{3}
Third answer.
\end{answer}
\end{document}