How can I typeset an exam or assignment paper?
Check out the exam document class; it does all that and more!
I've also had great success using it for homeworks and such (both as an instructor and as a student).
Here's an example exam created with the package:
The corresponding code:
\documentclass[addpoints]{exam}
\firstpageheader{subject name, class name}{First Exam}{October 25, 2019}
\firstpagefooter{}{}{Page \thepage\ of \numpages}
% Lower the footer a bit
\extrafootheight{-.8in}
% Define how bonus points are labelled
\bonuspointpoints{bonus point}{bonus points}
\begin{document}
\begin{center}
\fbox{\fbox{\parbox{5.5in}{\centering
Answer the questions in the spaces provided on the page. If you run out of room for an answer, continue on the back of the page.
}}}
\end{center}
\vspace{.1in}
\makebox[\textwidth]{Your name:\enspace\hrulefill}
\vspace{.2in}
\begin{questions}
\question[10]
Why is there air?
\vspace{.8in}
\question[15]
How much wood would a woodchuck chuck if a woodchuck could chuck wood?
\vspace{.5in}
\begin{parts}
\bonuspart[5]
How many seashells does she sell by the seashore?
\vspace{.5in}
\end{parts}
\question[10]
Compute $\displaystyle\int_0^1 x^2 \, dx$.
\vspace{\stretch{1}}
\bonusquestion[10]
Prove this: $A \land (B \lor C) \equiv (A \land B) \lor (A \land C)$
\end{questions}
% Put the grade table at the bottom of the page
\vspace*{\fill}
\begin{center}
\combinedgradetable[h]
\end{center}
\end{document}
Here are some resources on the exam
package:
- Overleaf
- Paul-Scherrer-Institut
I prefer to use examdesign. But if you go to CTAN and click on select by keyword you will find this list under exams, exercices and answers.
If you want to reuse problems and construct your exams from a problem data base probsoln or texomaker are good for this.
And new on the list: the exsheets package.