9. ⁑Assignments and Examinations
There are a number of classes or packages available on CTAN to help typeset assignment sheets or exam papers (see the exam topic).
The exam class (version 2.4, 2011-05-22) is comprehensive with its own list-like environments for enumerating questions and their parts, as well as environments for multiple choice questions. It also provides the possibility of assigning points to each question (or question part), creating solution sheets and grading tables. The exam class is described in §9.1 The exam Class, but take care as there is also an exam class provided by the exams bundle. The exam class described in this book is the one by Philip S. Hirschhorn and is in both the TeX Live and MiKTeX distributions. The exams bundle isn't in either of those distributions.
The exsheets package (version 0.17, 2014-10-15) also provides a means to create questions and their solutions. Unlike the exam class, the exsheets package allows you to divide the questions into classes and they can be printed selectively. Meta-data can also be assigned to the questions. The solutions may be either printed with their question or collected and printed together at a later point in the document. However, the package doesn't support multiple choice style of questions (although you can use a package such as paralist to create inline numbered lists). The exsheets package is described in §9.2 The exsheets Package.
The probsoln package (version 3.04, 2012-08-23) provides a way to define problems and their solutions in a file (or multiple files). You can load all problems, a specific list of problems or a random selection. You may have one or more problem datasets and either print the solutions with the questions or print the solutions later on in the document. The probsoln package provides an inline numbered list environment. The probsoln package is described in §9.3 The probsoln Package.
The datatool package used in earlier chapters can also be used to store questions and their solutions. The datatooltk application can import the dataset files used by probsoln. You can add extra fields to specify, for example, the difficulty level or subject. §9.4 Using the datatool Package for Exams or Assignment Sheets describes how you can use datatool to create a database of exam or assignment questions and their solutions.
Note that it's possible to use the exam class with either the probsoln package or the datatool package, but it can't be used with the exsheets package.
This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-07-4).