A sampler of other packagesLaTeX packagesExample: examination packages

Example: examination packages

Suppose that you would like a package to assist you in composing examinations. If you go to the CTAN directory /tex-archive/macros/latex/contrib/supported/, then you will see three subdirectories that look promising: exam (a package by Philip Hirschhorn),  examdesign (a package by Jason Alexander), and exams (a package by Hans van der Meer). 

The first of these packages is the most user-friendly. The author states that the package "attempts to make it easy for even a LaTeX novice to prepare exams." To download this package, go the exam directory and grab the files exam.cls and examdoc.tex. You can likely grab a file with your World-Wide Web browser by holding down the Shift key while you click the left mouse button on the name of the file.

The file exam.cls is a LaTeX class file: a set of macros that LaTeX implements if you start your source file with \documentclass{exam} instead of with \documentclass{article}. The file examdoc.tex is documentation about how to use this new document class. Execute the command latex examdoc (two or three times, until you stop getting messages about running latex again), and then either view the documentation on screen via xdvi examdoc &, or run dvips examdoc and print the documentation via lpr examdoc.ps.

Exercise: Typeset a quiz

Make up and typeset a quiz for a calculus class. Use some of the features of the exam document class, as illustrated in the sample quiz.

One of the interesting features of the sample quiz is the fancy formatting of headers and footers. This functionality is available independently of the exam package in a separate package, fancyhdr, written by Piet van Oostrum. To use the fancyhdr package, download the files in the CTAN directory /tex-archive/macros/latex/contrib/supported/fancyhdr/. This package consists of a style file fancyhdr.sty rather than a class file, so you can use it with any document class by putting the command \usepackage{fancyhdr} in the preamble of your LaTeX source file. You can learn how to use the package by reading the documentation.

The exam class in Jason Alexander's examdesign package has some features not present in Philip Hirschhorn's package. For example, Jason Alexander's exam class has special environments for fill-in-the-blank questions, for short-answer questions, for true-false questions, and for multiple-choice questions. It also binds answers to questions so that an examination and a matching answer key can easily be generated from the same source file. It addition, it allows for automated randomizing of the order of the questions, so that you can produce multiple forms of the same exam.

The examdesign package is distributed via a method common to the more elaborate LaTeX packages. The essential files are exam.dtx and exam.ins. If you run the command latex exam.ins, then the class file exam.cls will be created automatically from the file exam.dtx. On the other hand, if you run the command latex exam.dtx, then you will get documentation for the package.

If you are going to experiment with both of these exam packages, then you had better keep them in different directories so that they do not conflict with each other.


logo The Math 696 course pages were last modified April 5, 2005.
These pages are copyright © 1995-2005 by Harold P. Boas. All rights reserved.
 
A sampler of other packagesLaTeX packagesExample: examination packages