Bob Kojcinovic's LaTeX Style File for Tests
urmathtest.sty
This is a modification of Bob's LaTeX style file, modified to produce 3 kinds of output: A sheet of questions, and answer sheet for the students to use, and a sheet with both questions and solutions. 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 me.)TestTemplate.tex
This file demonstrates the use of the urmathtest.sty style file. There are some extra macros, namely- \ansbox {XXXX width of box XXXX}
- \ansrectangle
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 , questions] {urmathtest} You can change the options multipart,questions to:
- letter - Letter size paper. This option is the default, so you can leave it out.
- legal - Legal size paper.
- answersheet - For the students to write answers on. Does not include the questions.
- questions - Lists the questions.
- answers - Lists the solutions to the exam
- multipart - For exams with multiple parts. Leave this out if there is only one part.
- roman - Label the parts with Roman numerals I,II,III instead of A,B,C.
- consecutive - The numbering of problems does not start over with 1,2,... at the beginning of each part.
|
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 |
\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}
Writing the problems
To write a problem (worth 13 points), use the following command. \problem{ 13 }
{
Write the question here.
}
{
Write
\vfill
\answer
or whatever you want to the students to see on the sheet for filling in answers.
}
{
Write the solution here.
} \answer generates the word "ANSWER" followed by a line for entering the answer.
\vfill is just there to generate extra space.
\endpage is the same as \newpage, but it will be ignored if the answers option is specified. At the end of the exam, put \problemsdone
\end{document}
Generating the sheets
To generate a sheet of questions, specify the option questions To generate a sheet for the students to fill in answers, specify the option answersheet To generate an answersheet, specify the option answers These options go in the top of the .tex file, as mentioned above, for example: \usepackage[questions] {urmathtest}
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 \anotherpart This command does nothing unless you specify the multipart option. 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.

Send feedback about this page