Exam Template
Author:
Caleb McWhorter
Last Updated:
před 5 lety
License:
Creative Commons CC BY 4.0
Abstract:
A template for creating course exams.
\begin
Discover why 18 million people worldwide trust Overleaf with their work.
\begin
Discover why 18 million people worldwide trust Overleaf with their work.
\documentclass[12pt,letterpaper]{exam}
\usepackage[lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in]{geometry}
% Exam Class Documentation: https://ctan.org/pkg/exam?lang=en
% Compile at least twice, always.
% -------------------
% Packages
% -------------------
\usepackage{
amsmath, % Math Environments
amssymb, % Extended Symbols
enumerate, % Enumerate Environments
graphicx, % Include Images
multicol, % Use Multi-columns
multirow, % Use Multi-rows
tabularx, % Tabular Environment for T/F
tikz, % Create Tikz Diagrams
tkz-euclide % Automate Graph Plots
}
% -------------------
% Course & Exam Information
% -------------------
\newcommand{\course}{Math 999}
\newcommand{\coursetitle}{Course Title}
\newcommand{\examnumber}{3}
\newcommand{\term}{Semester Year}
\newcommand{\instructor}{Professor Xavier}
% -------------------
% Font
% -------------------
\usepackage[T1]{fontenc}
\usepackage{charter}
% -------------------
% Title Page Commands
% -------------------
\newcommand{\examtitle}{\noindent \textbf{\course} \hfill \textbf{Name: } \underline{\hspace{7cm}} \\ \textbf{\term} \\ \textbf{\examdate} \\ \textbf{\timelimit} \\[0.2cm] \rule[2ex]{\textwidth}{2pt}}
\newcommand{\instructions}[1]{%
\begin{center}
\fbox{\fbox{\parbox{6in}{\centering #1}}}
\end{center} \vspace{0.1cm}
}
\newcommand{\scores}{
\begin{center}
\addpoints
\gradetable[h][questions] % v: vertical scores; h: horizontal scores
\end{center}
}
\newcommand{\bottomline}{\vfill\noindent \rule[2ex]{\textwidth}{2pt}}
\newcommand{\titleinfo}{\textbf{\course}\hfill \textbf{\coursetitle} \hfill \textbf{\term} \hfill \textbf{\instructor} \\ \vspace{-0.5cm}\begin{center} \textbf{EXAM \examnumber} \end{center} \vspace{0.5cm} \textbf{Name:} \underline{\hspace{9cm}} \\[0.5cm] \textbf{Student ID Number:} \underline{\hspace{6.35cm}} \\[0.5cm]}
\newcommand{\noticeline}{\begin{center}{\scriptsize\textbf{Do not write below this line}} \rule{\textwidth}{0.5pt}\end{center}}
\newcommand{\directions}{\begin{center} \textbf{Instructions} \end{center}}
\newcommand{\answer}[1]{\hspace{\linewidth}\vfill\noindent\fbox{\begin{minipage}{\textwidth}\textbf{Answer:}\vspace{#1} \end{minipage}}}
% -------------------
% Commands
% -------------------
\newenvironment{2enumerate}{%
\begin{enumerate}[(a)]
\begin{multicols}{2}
}{%
\end{multicols}
\end{enumerate}
}
% T/F
\newcounter{abc}
\renewcommand{\theabc}{\stepcounter{abc}\alph{abc}}
\newcommand{\pspace}{\par\vspace{\baselineskip}}
% Check Marks
\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}
\newcommand{\xmark}{\ding{55}}
% -------------------
% Header & Footer
% -------------------
\pagestyle{head}
\firstpageheader{}{}{}
\runningheader{\course}{}{\thepage\ of \numpages}
\runningheadrule
% -------------------
% Content
% -------------------
\begin{document}
\titleinfo
\directions
\begin{itemize}
\item Fill in your name and ID number.
\item There are a total of \numquestions\ questions, for a total of \numpoints~points. Make sure you have all \numpages\ pages of the exam. You are responsible for any missing pages. If you are missing pages, address this with your proctor.
\item Show all your work. Minimal or no credit will be given for answers without supporting work.
\item Where provided, write your final answer in the bottom answer box.
\item Use the back of the page if additional space is needed or for scratch work. Be sure to indicate the problem number.
\item No calculator or other electronic device is permitted during this exam. Any use of such a device is a violation of the Academic Integrity Policy.
\end{itemize}
\noticeline
\scores
\bottomline
\newpage
% ---------
% Questions
% ---------
\begin{questions}
% Question 1
\question[20] What is $2+2$?
\answer{1cm}
% Question 2
\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}
% Question 3
\newpage
\question[1] Choose an option.
\begin{choices}
\choice Here is an option.
\choice Here is another.
\choice A third choice!
\end{choices}
% Question 4
\vspace{3cm}
\question[1] Choose an option. \pspace
\begin{oneparchoices}
\choice Here is a choice.
\choice Another choice
\choice It keeps going!
\end{oneparchoices}
% Question 5
\vspace{3cm}
\question[1] Mark circle if true.
\begin{checkboxes}
\choice This choice is correct.
\choice The other choice is incorrect.
\end{checkboxes}
% Question 6
\vspace{3cm}
{
\checkboxchar{$\Box$}
\question[3] Mark box if true.
\begin{checkboxes}
\choice This choice is not true.
\choice This choice is not false.
\end{checkboxes}
}
% Question 7
\newpage
\question[1] Write an answer to an unasked question in the space below.
\makeemptybox{2in} %Use \vfill for page sized box or \makeemptybox{\fill}
% Question 8
\newpage
\question[1] Write me something beautiful!
\fillwithlines{\fill}
% Question 9
\newpage
\question[1] In the space provided, write your autobiography.
\fillwithdottedlines{27em}
% Question 10
\newpage
{%
% Defines choice options: \roman, \arabic, etc
% \renewcommand*\thechoice{\roman{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}
}%
% Question 11
\newpage
\question[10] Mark the following statements True or False: \pspace
\def\arraystretch{1.5} % increase vertical spacing
\noindent\begin{tabularx}{\textwidth}{cXcc}
& & True & False \\
(\theabc) & This statement is true. & \boxed{\phantom{\cmark}} & \boxed{\phantom{\cmark}} \\
(\theabc) & This statement is false. & \boxed{\phantom{\cmark}} & \boxed{\phantom{\cmark}} \\[3cm]
(\theabc) & The statement above is true. & \boxed{\phantom{\cmark}} & \boxed{\phantom{\cmark}} \\
(\theabc) & The answer to this question is false. & \boxed{\phantom{\cmark}} & \boxed{\phantom{\cmark}}
\end{tabularx}
% Question 12
\newpage
\question Draw a graph below.
\[
\begin{tikzpicture}
\tkzInit[xmax=7,ymax=7,xmin= -7,ymin= -7]
\tkzGrid
\tkzAxeXY
\end{tikzpicture}
\]
\end{questions}
\end{document}