%Caleb McWhorter
%May 8, 2016

\documentclass[12pt]{exam}
\usepackage[utf8]{inputenc}

\usepackage[margin=1in]{geometry}
\geometry{letterpaper}
\usepackage{
amsmath,
amssymb,
enumerate,
graphicx,
multicol,
pgfplots,
tikz,
tkz-euclide
}

\usepgfplotslibrary{polar}
\usepgflibrary{shapes.geometric}
\usetikzlibrary{calc}

\pgfplotsset{my style/.append style={axis x line=middle, axis y line=
           middle, xlabel={$x$}, ylabel={$y$}, axis equal }}
%\begin{axis}[my style]

\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

%%%%%%%%%%%%%%%%%%%%
% Possible Extra Packages (If Needed)
%%%%%%%%%%%%%%%%%%%%

%\usepackage[parfill]{parskip}    %Begins paragraphs with an empty line rather than an indent.

%\usepackage{
%amsmath,
%amscd,
%amssymb,
%amsfonts,
%amsthm,
%bbm,
%caption,
%epstopdf,
%epsfig,
%epstopdf,
%float,
%layout,
%lipsum,
%longtable,
%multicol,
%setspace,
%subcaption
%}

%%%%%%%%%%%%%%%%%%%%
% Fonts
%%%%%%%%%%%%%%%%%%%%

\usepackage[bitstream-charter]{mathdesign}
\usepackage[T1]{fontenc}

% Here are other font options.

%\usepackage{calligra}

%\usepackage{gfsartemisia}
%\usepackage[T1]{fontenc}

%\usepackage{mathptmx}
%\usepackage[T1]{fontenc}

%\usepackage[math]{iwona}
%\usepackage[T1]{fontenc}

%\usepackage[light,condensed,math]{iwona}
%\usepackage[T1]{fontenc}

%\usepackage{txfonts}
%\usepackage[T1]{fontenc}

%\usepackage{mathptmx}
%\usepackage[T1]{fontenc}

%\usepackage{gfsartemisia-euler}
%\usepackage[T1]{fontenc}

%\usepackage{tgpagella}
%\usepackage[T1]{fontenc}

%\usepackage{pxfonts}
%\usepackage[T1]{fontenc}

%%%%%%%%%%%%%%%%%
% Title Information
%%%%%%%%%%%%%%%%%

\newcommand{\class}{Math 999: Exam 1}
\newcommand{\term}{Summer 2016}
\newcommand{\examdate}{07/14/2016}
\newcommand{\timelimit}{80 Minutes}

\newcommand{\defeq}{\stackrel{\text{def}}{=}}

\pagestyle{head}
\firstpageheader{}{}{}
\runningheader{\class}{}{\thepage\ of \numpages}
\runningheadrule

%%%%%%%%%%%%%%%%%
% Copyable Formatting
%%%%%%%%%%%%%%%%%

%Graph

%\begin{figure}[h]
%\centering
%\begin{tikzpicture}
%   \tkzInit[xmax=8,ymax=8,xmin=-8,ymin=-8]
%   \tkzGrid
%   \tkzAxeXY
%  \end{tikzpicture}
%\end{figure}

%Graph

%\def\width{18}
%\def\hauteur{13}
%\begin{tikzpicture}[x=1cm, y=1cm, semitransparent]
%\draw[step=1mm, line width=0.1mm, black!30!white] (0,0) grid (\width,\hauteur);
%\draw[step=5mm, line width=0.2mm, black!40!white] (0,0) grid (\width,\hauteur);
%\draw[step=5cm, line width=0.5mm, black!50!white] (0,0) grid (\width,\hauteur);
%\draw[step=1cm, line width=0.3mm, black!90!white] (0,0) grid (\width,\hauteur);
%\end{tikzpicture}

%Option question with option in column.

%\question[1] Choose an option.
%\begin{choices}
%\choice Here is an option.
%\end{choices}

%Option question. Options appear on same line as question.

%\question[1] Choose an option.
%\begin{oneparchoices}
%\choice Here is a choice.
%\end{oneparchoices}
%\addpoints

%Select option question. Options are circles.

%\question[1] Mark circle if true.
%\addpoints
%\begin{checkboxes}
%\choice Here is a choice.
%\end{checkboxes}
%\addpoints

%Select option question. Options are boxes.

%{%
%\checkboxchar{$\Box$} % changing checkbox style locally
%\question[3] Mark box if true.
%\addpoints
%\begin{checkboxes}
%\choice Here is a choice
%\end{checkboxes}
%}%
%\addpoints

%Select option question with 2 columns.

%{
%% changing choice items style locally
%\renewcommand*\thechoice{\arabic{choice}} 
%\renewcommand*\choicelabel{\thechoice)}
%%
%\question[1] Element with $Z=92$ is:
%\begin{multicols}{2}
%\begin{choices}
%\choice H
%\choice O
%\choice F
%\choice S
%\choice Ba
%\choice Pb
%\choice U
%\choice Pu
%\end{choices}
%\end{multicols}
%}%
%\addpoints

%Basic question.

%\question[1]
%Answer the question.
%\makeemptybox{2in}
%\addpoints

%Essay question. Empty box.

%\question[1]
%Write your essay here. \ldots
%\makeemptybox{\fill}
%\addpoints

%Essay question. Solid lines.

%\question[1]
%Explain blah, blah\ldots
%\fillwithlines{\fill}
%\addpoints

%Essay question with dotted lines.

%\question[1]
%Write your essay here. \ldots
%\fillwithdottedlines{8em}
%\addpoints

%%%%%%%%%%%%%%%%%
% Test Content
%%%%%%%%%%%%%%%%%

\begin{document}

%%%%%%%%%%%%%%%%%
% Cover Page
%%%%%%%%%%%%%%%%%

\noindent
\begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} r @{\extracolsep{6pt}} l}
\textbf{\class} & \textbf{Name:} & \makebox[3in]{\hrulefill}\\
\textbf{\examdate} &&\\
\textbf{\term} &&\\
\textbf{Time Limit: \timelimit} & & 
\end{tabular*}\\
\rule[2ex]{\textwidth}{2pt}

\begin{center}
\fbox{\fbox{\parbox{5.5in}{\centering
Write your name on the appropriate line on the exam cover sheet. This exam contains \numpages\ pages (including this cover page) and \numquestions\ questions. Check that you have every page of the exam. Answer the questions in the spaces provided on the question sheets. Be sure to answer every part of each question and show all your work. If you run out of room for an answer, continue on the back of the page -- being sure to indicate the problem.}}}
\end{center}
\vspace{0.1in}

\begin{center}
\addpoints
\gradetable[v][questions]
\end{center}

%\vspace{2in}
\vfill \noindent \rule[2ex]{\textwidth}{2pt}

\newpage

%%%%%%%%%%%%%%%%%
% Questions
%%%%%%%%%%%%%%%%%

\begin{questions}

\question[5] Solve the Riemann Hypothesis. Be sure to justify each step.
\addpoints

\newpage
\question Answer the following parts completely. \vspace{0.5cm}
\begin{parts}
\part[1] What is Mathematics? \vspace{2cm}
\part[2] Why are we here? \vfill
\part[3] What is the meaning of life? \vfill
\end{parts}
\addpoints

\newpage
\question[1]
Write an answer to an unasked question in the space below.
\makeemptybox{2in}
\addpoints

\newpage
\question[3]
Write an award winning level novel in the space below. 
\makeemptybox{\fill}
\addpoints

\newpage
\question[1] Choose an option.
\begin{choices}
\choice Here is an option.
\choice Here is another.
\choice A third choice!
\end{choices}

\vspace{3cm}

\question[1] Choose an option. \\
\begin{oneparchoices}
\choice Here is a choice.
\choice Another choice
\choice It keeps going!
\end{oneparchoices}
\addpoints

\vspace{3cm}

\question[1] Mark circle if true.
\addpoints
\begin{checkboxes}
\choice This choice is correct.
\choice The other choice is incorrect. 
\end{checkboxes}
\addpoints

\vspace{3cm}

{
\checkboxchar{$\Box$} %The checkbox style is only locally changed.
\question[3] Mark box if true.
\addpoints
\begin{checkboxes}
\choice This choice is not true.
\choice This choice is not false. 
\end{checkboxes}
}
\addpoints

\newpage
\question[1]
Write me something beautiful! 
\fillwithlines{\fill}
\addpoints

\newpage
\question[1]
In the space provided, write your autobiography. 
\fillwithdottedlines{27em}
\addpoints

\newpage
{%
% changing choice items style locally
\renewcommand*\thechoice{\arabic{choice}} 
\renewcommand*\choicelabel{\thechoice)}
%
\question[1] What is $2+2=$?
\begin{multicols}{2}
\begin{choices}
\choice Martha Washington
\choice Mars
\choice 17
\choice 4
\choice $-4$
\choice Cannot be determined.
\choice None of the above.
\choice All of the above.
\end{choices}
\end{multicols}
}%
\addpoints

\newpage
\question Draw a graph below. 
\begin{figure}[h]
\centering
\begin{tikzpicture}
   \tkzInit[xmax=8,ymax=8,xmin=-8,ymin=-8]
   \tkzGrid
   \tkzAxeXY
  \end{tikzpicture}
\end{figure}
\addpoints

\newpage
\question Draw a graph below.

\def\width{16}
\def\hauteur{16}
\begin{tikzpicture}[x=1cm, y=1cm, semitransparent]
\draw[step=1mm, line width=0.1mm, black!30!white] (0,0) grid (\width,\hauteur);
\draw[step=5mm, line width=0.2mm, black!40!white] (0,0) grid (\width,\hauteur);
\draw[step=5cm, line width=0.5mm, black!50!white] (0,0) grid (\width,\hauteur);
\draw[step=1cm, line width=0.3mm, black!90!white] (0,0) grid (\width,\hauteur);
\end{tikzpicture}
\addpoints

\end{questions}
\end{document}