% Exam Template for UMTYMP and Math Department courses
%
% Using Philip Hirschhorn's exam.cls: http://www-math.mit.edu/~psh/#ExamCls
%
% run pdflatex on a finished exam at least three times to do the grading table on front page.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% These lines can probably stay unchanged, although you can remove the last
% two packages if you're not making pictures with tikz.
\documentclass[11pt]{exam}
\RequirePackage{amssymb, amsfonts, amsmath, latexsym, verbatim, xspace, setspace}
\RequirePackage{tikz, pgflibraryplotmarks}
% By default LaTeX uses large margins. This doesn't work well on exams; problems
% end up in the "middle" of the page, reducing the amount of space for students
% to work on them.
\usepackage[margin=1in]{geometry}
% Here's where you edit the Class, Exam, Date, etc.
\newcommand{\class}{Math 1234}
\newcommand{\term}{Spring 2012}
\newcommand{\examnum}{Exam 2}
\newcommand{\examdate}{3/28/12}
\newcommand{\timelimit}{50 Minutes}
% For an exam, single spacing is most appropriate
\singlespacing
% \onehalfspacing
% \doublespacing
% For an exam, we generally want to turn off paragraph indentation
\parindent 0ex
\begin{document}
% These commands set up the running header on the top of the exam pages
\pagestyle{head}
\firstpageheader{}{}{}
\runningheader{\class}{\examnum\ - Page \thepage\ of \numpages}{\examdate}
\runningheadrule
\begin{flushright}
\begin{tabular}{p{2.8in} r l}
\textbf{\class} & \textbf{Name (Print):} & \makebox[2in]{\hrulefill}\\
\textbf{\term} &&\\
\textbf{\examnum} &&\\
\textbf{\examdate} &&\\
\textbf{Time Limit: \timelimit} & Teaching Assistant & \makebox[2in]{\hrulefill}
\end{tabular}\\
\end{flushright}
\rule[1ex]{\textwidth}{.1pt}
This exam contains \numpages\ pages (including this cover page) and
\numquestions\ problems. Check to see if any pages are missing. Enter
all requested information on the top of this page, and put your initials
on the top of every page, in case the pages become separated.\\
You may \textit{not} use your books, notes, or any calculator on this exam.\\
You are required to show your work on each problem on this exam. The following rules apply:\\
\begin{minipage}[t]{3.7in}
\vspace{0pt}
\begin{itemize}
\item \textbf{If you use a ``fundamental theorem'' you must indicate this} and explain
why the theorem may be applied.
\item \textbf{Organize your work}, in a reasonably neat and coherent way, in
the space provided. Work scattered all over the page without a clear ordering will
receive very little credit.
\item \textbf{Mysterious or unsupported answers will not receive full
credit}. A correct answer, unsupported by calculations, explanation,
or algebraic work will receive no credit; an incorrect answer supported
by substantially correct calculations and explanations might still receive
partial credit.
\item If you need more space, use the back of the pages; clearly indicate when you have done this.
\end{itemize}
Do not write in the table to the right.
\end{minipage}
\hfill
\begin{minipage}[t]{2.3in}
\vspace{0pt}
%\cellwidth{3em}
\gradetablestretch{2}
\vqword{Problem}
\addpoints % required here by exam.cls, even though questions haven't started yet.
\gradetable[v]%[pages] % Use [pages] to have grading table by page instead of question
\end{minipage}
\newpage % End of cover page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% See http://www-math.mit.edu/~psh/#ExamCls for full documentation, but the questions
% below give an idea of how to write questions [with parts] and have the points
% tracked automatically on the cover page.
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{questions}
% Basic question
\addpoints
\question[10] Differentiate $f(x)=x^2$ with respect to $x$.
% Question with parts
\newpage
\addpoints
\question Consider the function $f(x)=x^2$.
\begin{parts}
\part[5] Find $f'(x)$ using the limit definition of derivative.
\vfill
\part[5] Find the line tangent to the graph of $y=f(x)$ at the point where $x=2$.
\vfill
\end{parts}
% If you want the total number of points for a question displayed at the top,
% as well as the number of points for each part, then you must turn off the point-counter
% or they will be double counted.
\newpage
\addpoints
\question[10] Consider the function $f(x)=x^3$.
\noaddpoints % If you remove this line, the grading table will show 20 points for this problem.
\begin{parts}
\part[5] Find $f'(x)$ using the limit definition of derivative.
\vspace{4.5in}
\part[5] Find the line tangent to the graph of $y=f(x)$ at the point where $x=2$.
\end{parts}
\end{questions}
\end{document}