New Department rules for exams

Unless you duplicate the exam yourself, you are now required to prepare separate question sheets and sheets for the students to write their answers. I've modified Bob's style file for this situation.

Bob Kojcinovic's LaTeX Style File for Exams

urmathexam.sty

This is Bob's LaTeX style file. Put it in the same directory as your LaTeX file. Or, ask your system administrator to install it system-wide. (Please, UR mathematicians, if you want to add additional macros, put them in your LaTeX file. Otherwise, there will be too many incompatible versions of the style file. Or, submit your proposed code to Bob.)

ExamTemplate.tex

This file demonstrates the use of the urmathexam.sty style file. There are some extra macros, namely which may be used instead of \answer, which is described below. They produce answer boxes. In place of XXXX width of box XXXX, put some size like "3in". These macros may be included in the next version of the style file; give us your feedback.


Although it comes as a surprise to most mathematicians, it isn't hard to write LaTeX style files which will automate a lot of typesetting. Actually, though, Bob has put a lot of work into this one. It should take the drudgery out of typesetting exams. A style file is not a "LaTeX template"; it defines a set of LaTeX commands for you to use.


On this page, I will mainly describe the commands that differ from the usual LaTeX commands.

Start with

\documentclass [12pt] {article}
\usepackage[multipart , letter] {urmathexam}

You can change the options multipart,letter to:

Note: Using the option legal will produce a .dvi file suited for long paper. To turn the .dvi file into a .ps file on long paper, use the command

dvips -o name.ps -t legal name

where "name" is the name of the file, without the .dvi extension. The command

ps2pdf name.ps

will turn the .ps file into a .pdf file.

If you wish to use pdflatex instead, you must add the following 2 commands to your .tex file.

\pdfpagewidth\paperwidth
\pdfpageheight\paperheight

This LaTeX style file automatically numbers problems, and generates a table for recording scores. The table includes the numerical scores you have specified, along with the totals. If the exam has 2 or more parts, all you need to do is set the appropriate option, as described above. You should put a copy of this style file, urmathexam.sty, in the same directory as your LaTeX file.

Next, put

\begin{document}
\examtitle{MATH CourseNumberXXXX} {ExamTypeXXXX EXAM} {DateXXXX}
\studentinfo
\instructions {XXXX Instructions to the students XXXX}

The second command above generates the exam title, the third creates a line for the students to enter their information, and the fourth gives you room to write instructions for the students. Replace XXXX with the appropriate information.

The command

\finishfirstpage

ends the first page, and generates one or more tables for recording the scores. But if the answers option is specified, the table of scores will not appear.

To put extra information on the next page after the table of scores, type the following command before \finishfirstpage. This information will only appear if the answers option is not specified.

\additionalinstructions {\newpage XXXwhatever you wantXXXX}

To write a problem (worth 13 points), use the following command.

\problem {13}

Then write the problem.

\vfill
\answer

\answer generates the word "ANSWER" followed by a line for entering the answer. \vfill is just there to generate extra space.

At the end of the exam, put

\problemsdone
\end{document}


More advanced commands


To start a second or third part of the exam, use the option multipart with the urmathtest declaration: \usepackage [multipart] {urmathtest}. You could also specify \usepackage [multipart, consecutive] {urmathtest} so that the problem numbering doesn't start over with the new part. These options will generate tables for recording answers, one for each part. When you want to start the next part, type the command

To generate subproblems labeled a,b,c and so on, use the commands

\abcs
\item
\item
\endabcs

After each of the \item commands, write the subproblem.

You can use the same file to generate both the test and the answer key, as follows.

\work{Argument 1} {Argument 2}

This command is replaced by Argument 1 if the answers option is not specified. If the answers option is specified, Argument 2 replaces the command. In other words, on the test, the students will see the results of Argument 1. Then, when you want to make an answer key, specify the answers option, and Argument 2 will appear instead of Argument 1.

Often you will use commands like \newpage to leave space for students to show their work. These should appear within the first set of parentheses, so that the answers are not too spread out.

\stackheading {XXXX Heading XXXX}

This command, when put before \finishfirstpage or \anotherpart, will label the following part as XXXX Heading XXXX. The subsequent parts will keep their default labels.