summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/exam
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-05-23 22:02:31 +0000
committerKarl Berry <karl@freefriends.org>2011-05-23 22:02:31 +0000
commit8186542aa5c83c77e3aabe6d3cea54f249423472 (patch)
tree9e1fd1b366ebe0417ada420160c1c0d60b3aa0e5 /Master/texmf-dist/doc/latex/exam
parent34d7e56054b6d2467c604600a95907f198bfd7ee (diff)
exam 2.4 (23may11)
git-svn-id: svn://tug.org/texlive/trunk@22585 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/exam')
-rw-r--r--Master/texmf-dist/doc/latex/exam/README13
-rw-r--r--Master/texmf-dist/doc/latex/exam/exam-2.3.md53
-rw-r--r--Master/texmf-dist/doc/latex/exam/exam-2.4.md54
-rw-r--r--Master/texmf-dist/doc/latex/exam/examdoc.pdfbin410111 -> 759577 bytes
-rw-r--r--Master/texmf-dist/doc/latex/exam/examdoc.tex4544
5 files changed, 3284 insertions, 1280 deletions
diff --git a/Master/texmf-dist/doc/latex/exam/README b/Master/texmf-dist/doc/latex/exam/README
index 7e9ee445400..22953c7e7c3 100644
--- a/Master/texmf-dist/doc/latex/exam/README
+++ b/Master/texmf-dist/doc/latex/exam/README
@@ -1,8 +1,8 @@
-This is version 2.3 of the exam document class, dated July 16, 2008.
+This is version 2.4 of the exam document class, dated May 22, 2011.
-The exam document class, together with its documentation file
-examdoc.tex, attempts to make it easy for even a LaTeX novice to
-prepare exams. Simple commands are provided to:
+The exam document class, together with its user's guide examdoc.tex,
+attempts to make it easy for even a LaTeX novice to prepare exams.
+Simple commands are provided to:
1. Create questions, parts of questions, subparts of parts, and
subsubparts of subparts, all with optional point values.
@@ -10,7 +10,8 @@ subsubparts of subparts, all with optional point values.
2. Create a grading table, indexed either by question number (listing
each question and the total possible points for that question) or by
page number (listing each page with points and the total possible
-points for that page).
+points for that page). A grading table can cover the entire exam or
+just a part of the exam.
3. Create headers and footers that are each specified in three parts:
One part to be left justified, one part to be centered, and one part
@@ -35,7 +36,7 @@ e.g., point values, or table headings), so that they can be adapted to
personal taste and/or languages other than English.
-The documentation file examdoc.tex attempts to explain all of the
+The user's guide examdoc.tex attempts to explain all of the
possibilities in a readable way, with many specific examples.
--------------------------------------------------------------------
diff --git a/Master/texmf-dist/doc/latex/exam/exam-2.3.md5 b/Master/texmf-dist/doc/latex/exam/exam-2.3.md5
deleted file mode 100644
index 575927f0882..00000000000
--- a/Master/texmf-dist/doc/latex/exam/exam-2.3.md5
+++ /dev/null
@@ -1,3 +0,0 @@
-1b4aa744438dd957cb0387f72027ce40 exam.cls
-f4f60059de1a00a5d561fad9f46bb5e4 examdoc.pdf
-e771547c36e897cc79a5da53676189f6 examdoc.tex
diff --git a/Master/texmf-dist/doc/latex/exam/exam-2.4.md5 b/Master/texmf-dist/doc/latex/exam/exam-2.4.md5
new file mode 100644
index 00000000000..a3e4bdda5f8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/exam/exam-2.4.md5
@@ -0,0 +1,4 @@
+0d2d621fd3743403fb55f0daa6f98250 exam.cls
+b18003beedbf286c01ecff0f0c2211e0 examdoc.tex
+54b7a2bb3981c2fe92cbfed8fa930caa examdoc.dvi
+b265059c9408d86fdd411e858432c317 examdoc.pdf
diff --git a/Master/texmf-dist/doc/latex/exam/examdoc.pdf b/Master/texmf-dist/doc/latex/exam/examdoc.pdf
index 9356f293640..d10a923aa10 100644
--- a/Master/texmf-dist/doc/latex/exam/examdoc.pdf
+++ b/Master/texmf-dist/doc/latex/exam/examdoc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/exam/examdoc.tex b/Master/texmf-dist/doc/latex/exam/examdoc.tex
index 39c49337e06..5cdb3e2d7b1 100644
--- a/Master/texmf-dist/doc/latex/exam/examdoc.tex
+++ b/Master/texmf-dist/doc/latex/exam/examdoc.tex
@@ -2,13 +2,13 @@
%--------------------------------------------------------------------
% examdoc.tex
%
-% This is the documentation for the exam documentclass,
+% This is the user's guide for the exam documentclass,
% by Philip Hirschhorn.
%
% The exam documentclass itself is in the file exam.cls.
-%%% Copyright (c) 1997, 2000, 2004, 2008 Philip S. Hirschhorn
+%%% Copyright (c) 1997, 2000, 2004, 2008, 2011 Philip S. Hirschhorn
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -20,7 +20,7 @@
%
% This work consists of the files exam.cls and examdoc.tex
-% The user documentation for exam.cls is in the file examdoc.tex.
+% The user's guide for exam.cls is in the file examdoc.tex.
%%% Philip Hirschhorn
@@ -37,15 +37,37 @@
%--------------------------------------------------------------------
\documentclass[12pt]{exam}
-\usepackage{hyperref}
+\usepackage{amssymb}
-\newcommand{\docversion}{2.3}
-\newcommand{\docdate}{July 18, 2008}
+\usepackage{makeidx}
+
+\usepackage[colorlinks]{hyperref}
+
+% In case we're not using hyperref.sty:
+\providecommand{\texorpdfstring}[2]{#1}
+% The following can be used in \section commands
+% without generating pdf warnings:
+\newcommand{\bs}{\texorpdfstring{\char`\\}{}}
+
+\newcommand{\docversion}{2.4}
+\newcommand{\docdate}{May 22, 2011}
%\newcommand{\docdate}{\today}
+\makeindex
+
+\newcommand{\indc}[1]{\index{#1@\texttt{\char`\\#1}}}
+\newcommand{\indcsub}[2]{\index{#1@\texttt{\char`\\#1}!#2}}
+\newcommand{\indcstart}[1]{\index{#1@\texttt{\char`\\#1}|(}}
+\newcommand{\indcstop}[1]{\index{#1@\texttt{\char`\\#1}|)}}
+
+\newcommand{\indt}[1]{\index{#1@\texttt{#1}}}
+\newcommand{\indtsub}[2]{\index{#1@\texttt{#1}!#2}}
+\newcommand{\indtstart}[1]{\index{#1@\texttt{#1}|(}}
+\newcommand{\indtstop}[1]{\index{#1@\texttt{#1}|)}}
+
%--------------------------------------------------------------------
%
-% Changes since version 2.2 are described in the comments
+% Changes since version 2.3 are described in the comments
% near the beginning of the file exam.cls.
%
%--------------------------------------------------------------------
@@ -80,15 +102,15 @@
\rlap{\parbox[t]{\textwidth}{\raggedright#2}}%
\hfil\parbox[t]{\textwidth}{\centering#3}\hfil
\llap{\parbox[t]{\textwidth}{\raggedleft#4}}%
- }% hbox
+ }% hbox
\end{trivlist}
}
-\makeatletter
- \@ifundefined{AmS}{\def\AmS{{\protect\the\textfont\tw@
- A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}}
- {}
-\makeatother
+% \makeatletter
+% \@ifundefined{AmS}{\def\AmS{{\protect\the\textfont\tw@
+% A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}}
+% {}
+% \makeatother
%---------------------------------------------------------------------
@@ -105,7 +127,7 @@
Wellesley College\\
Wellesley, MA 02481\\
psh@math.mit.edu\\[\bigskipamount]
- Copyright \copyright~1994, 1997, 2000, 2004, 2008 Philip Hirschhorn\\
+ Copyright \copyright~1994, 1997, 2000, 2004, 2008, 2011 Philip Hirschhorn\\
All rights reserved}
\date{\docdate}
@@ -114,7 +136,7 @@
\begin{center}
\small
- This is the documentation for version~\docversion{} of the
+ This is the user's guide for version~\docversion{} of the
\verb"exam" document class.
\end{center}
@@ -126,25 +148,26 @@
The file \verb"exam.cls" provides the \verb"exam" document class,
which attempts to make it easy for even a \LaTeX{} novice to prepare
exams. Specifically, \verb"exam.cls" sets the page layout so that
-there are one inch margins all around (no matter what size paper
-you're using) and provides commands that make it easy to format
-questions, create grading tables, create flexible headers and footers,
-and change the margins. In more detail:
+there are one inch margins\index{margins} all around (no matter what
+size paper you're using) and provides commands that make it easy to
+format questions, create flexible headers and footers, change the
+margins, and create grading tables. In more detail:
\begin{itemize}
\item The class will automatically format and number the questions,
parts of questions, subparts of parts, and subsubparts of subparts
(see sections \ref{sec:Questions} and~\ref{sec:parts}).
-\item You can include the point value of each question (or part, or
- subpart, or subsubpart), with your choice of having the point values
- printed at the beginning of the text of the question, opposite that
- in the left margin, opposite that in the right margin, or in the
- right margin opposite the end of the question (see
+\item You can include the point value\index{points} of each question
+ (or part, or subpart, or subsubpart), with your choice of having the
+ point values printed at the beginning of the text of the question,
+ opposite that in the left margin, opposite that in the right margin,
+ or in the right margin opposite the end of the question (see
section~\ref{sec:points}).
\item The class will add up the total points for each question (and
- all of its parts, subparts, and subsubparts) and the total points on
- each page, and make those totals available in macros (see sections
- \ref{sec:addup}, \ref{sec:pointsofq} and~\ref{sec:pointsonp}). You
- can also have the class print a grading table indexed either by
+ all of its parts, subparts, and subsubparts) and the total
+ points\index{points!total} on each page, and make those totals
+ available in macros (see sections \ref{sec:addup},
+ \ref{sec:pointsofq} and~\ref{sec:pointsonp}).
+\item You can have the class print a grading table, indexed either by
question number or by page number (see
section~\ref{sec:GradeTables}).
\item You specify the header in three parts: One part to be left
@@ -162,10 +185,9 @@ and change the margins. In more detail:
and/or footer, and these commands can give one amount of space on
the first page and a different amount of space on all other pages
(see section~\ref{sec:extra-room}).
-\item Macros are defined to enable you to state in the header and/or
- footer the total number of pages in the exam (see
- section~\ref{sec:numpages}) and to change the header and/or footer
- that appears on the last page of the exam (see
+\item Macros are defined to enable you to state the total number of
+ pages in the exam (see section~\ref{sec:numpages}) and to change the
+ header and/or footer that appears on the last page of the exam (see
section~\ref{sec:lastpage}).
\item Macros are defined so that the headers and footers can vary
depending on whether the current page begins a new question or
@@ -189,33 +211,399 @@ and change the margins. In more detail:
section~\ref{sec:CorrectChoice}, and section~\ref{sec:AnsShortAns}).
\end{itemize}
-The latest version of \verb"exam.cls" (possibly a beta test version)
-should always be available at \verb"http://www-math.mit.edu/~psh/".
+The latest version of \verb"exam.cls" (possibly a
+%
+beta\index{beta test} test version) should always be available at
+\verb"http://www-math.mit.edu/~psh/"\index{web page}.
%--------------------------------------------------------------------
-%--------------------------------------------------------------------
-\section{License}
+\subsection{License}
\begin{itemize}
\item This work may be distributed and/or modified under the
- conditions of the \LaTeX{} Project Public License, either
- version~1.3 of this license or (at your option) any later version.
- The latest version of this license is in
- \verb"http://www.latex-project.org/lppl.txt" and version 1.3 or
- later is part of all distributions of \LaTeX{} version 2003/12/01 or
- later.
+ %
+ \index{Latex Project Public License@\LaTeX{} Project Public License}
+ %
+ conditions of the \LaTeX{} Project Public
+ License\index{license},\index{LPPL} either version~1.3 of this
+ license or (at your option) any later version. The latest version
+ of this license is in \verb"http://www.latex-project.org/lppl.txt"
+ and version 1.3 or later is part of all distributions of \LaTeX{}
+ version 2003/12/01 or later.
\item This work has the LPPL maintenance status ``author-maintained''.
\item This work consists of the files \verb"exam.cls" and
\verb"examdoc.tex".
\end{itemize}
+%--------------------------------------------------------------------
+%--------------------------------------------------------------------
+\section{Simple instructions for a basic exam}
+\label{sec:Basic}
+
+Producing a basic exam with the \texttt{exam} document class is fairly
+easy. After you learn to do that, you can read the parts of this
+user's guide that describe how to customize whatever you want to
+change.
+%--------------------------------------------------------------------
+\subsection{The \texttt{\bs documentclass} command}
+\label{sec:BasicDocumentclass}
+
+To use the \texttt{exam} document class, your \verb"\documentclass"
+command should be\indc{documentclass}
+\begin{center}
+ \verb"\documentclass[addpoints]{exam}"
+\end{center}
+or, if you want to use 12~point type,
+\begin{center}
+ \verb"\documentclass[addpoints,12pt]{exam}"
+\end{center}
+There are other options; for the full story, see
+section~\ref{sec:Documentclass}.
+
+%--------------------------------------------------------------------
+\subsection{Asking for the student's name}
+\label{sec:BasicName}
+
+If you'll be leaving space for the answers on the question pages (see
+sections~\ref{sec:BasicSpace} and \ref{sec:LeaveSpace}), then you'll
+probably also want to leave space for the student's name%
+\index{name}\index{student's name}. If you type
+\begin{verbatim}
+\begin{center}
+ \fbox{\fbox{\parbox{5.5in}{\centering
+ Answer the questions in the spaces provided on the
+ question sheets. If you run out of room for an answer,
+ continue on the back of the page.}}}
+\end{center}
+
+\vspace{0.1in}
+
+\makebox[\textwidth]{Name and section:\enspace\hrulefill}
+
+\vspace{0.2in}
+
+\makebox[\textwidth]{Instructor's name:\enspace\hrulefill}
+\end{verbatim}
+after the \verb"\begin{document}" command and before the
+\verb"\begin{questions}" command (see section~\ref{sec:Questions}),
+then you'll get\\
+\noindent
+\parbox{\textwidth}{
+\begin{center}
+ \fbox{\fbox{\parbox{5.5in}{\centering
+ Answer the questions in the spaces provided on the
+ question sheets. If you run out of room for an answer,
+ continue on the back of the page.}}}
+\end{center}
+
+\vspace{0.1in}
+
+\makebox[\textwidth]{Name and section:\enspace\hrulefill}
+
+\vspace{0.2in}
+
+\makebox[\textwidth]{Instructor's name:\enspace\hrulefill}
+}
+
+%--------------------------------------------------------------------
+\subsection{Asking questions}
+\label{sec:BasicQuestions}
+
+Once you've typed \verb"\begin{document}" and (if the students will be
+writing their answers on the question pages) asked for the student's
+name (see section~\ref{sec:BasicName}), you can list the questions
+on the exam in a \texttt{questions} environment. You begin each
+question with a \verb"\question"\indc{question} command, which is
+optionally followed by a number of points inside of square brackets.
+For example, if you type
+%
+\index{questions environment}\index{environment!questions}
+\indt{questions}
+\begin{verbatim}
+\begin{questions}
+
+\question[10]
+Why is there air?
+
+\question[15]
+
+How much wood would a woodchuck chuck if a woodchuck could chuck
+wood?
+
+\question[10] Compute $\displaystyle\int_0^1 x^2 \, dx$.
+\end{questions}
+\end{verbatim}
+then you'll get
+\begin{questions}
+
+\question[10]
+Why is there air?
+
+\question[15]
+
+How much wood would a woodchuck chuck if a woodchuck could chuck
+wood?
+
+\question[10] Compute $\displaystyle\int_0^1 x^2 \, dx$.
+\end{questions}
+
+\bigskip
+
+As the above example illustrates, you can leave blank lines
+%
+\index{blank lines} between the \verb"\question" command and the
+actual beginning of the question, or before the first \verb"\question"
+command in the environment, and they will be ignored. The point
+values are entirely optional; if you omit the point values, you should
+also omit the square brackets containing them.
+
+If you give the command \verb"\marksnotpoints"\indc{marksnotpoints},
+then the words ``point'' and ``points'' will be replaced by the words
+``mark'' and ``marks''. There are many other customizations possible
+for the points, including using a different language, changing the way
+the points are printed, and by having them printed in one of the
+margins. For the full story, see section~\ref{sec:points}.
+
+
+%--------------------------------------------------------------------
+\subsection{Questions with parts, and subparts, and subsubparts}
+\label{sec:BasicParts}
+
+If you want to create a question with parts, you use a
+\texttt{parts}\indt{parts} environment and begin each part with the
+command \verb"\part"\indc{part}. The \texttt{parts} environment can
+be at the beginning of a question or after some text that begins the
+question. (There are also \texttt{subparts} and \texttt{subsubparts}
+environments; for the full details, see section~\ref{sec:parts}.) For
+example, if you type
+%
+\index{parts environment}\index{environment!parts}
+\begin{verbatim}
+\begin{questions}
+\question[10]
+Why is there air?
+
+\question
+What if there were no air?
+
+\begin{parts}
+\part[5]
+Describe the effect on the balloon industry.
+
+\part[5]
+Describe the effect on the aircraft industry.
+\end{parts}
+
+\question[20]
+
+\begin{parts}
+\part
+Define the universe. Give three examples.
+
+\part
+If the universe were to end, how would you know?
+
+\end{parts}
+
+
+\end{questions}
+\end{verbatim}
+then you'll get
+\begin{questions}
+\question[10]
+Why is there air?
+
+\question
+What if there were no air?
+
+\begin{parts}
+\part[5]
+Describe the effect on the balloon industry.
+
+\part[5]
+Describe the effect on the aircraft industry.
+\end{parts}
+
+\question[20]
+
+\begin{parts}
+\part
+Define the universe. Give three examples.
+
+\part
+If the universe were to end, how would you know?
+
+\end{parts}
+
+
+\end{questions}
+
+\bigskip
+
+The above example illustrates several things:
+\begin{itemize}
+\item Parts of a question should be put into a
+ \verb"parts"\indt{parts}\index{parts environment}%
+ \index{environment!parts} environment.
+\item If a question begins with a \verb"parts" environment, then the
+ first part will appear on the same line with the question number.
+\item You can leave blank
+ %
+ lines\index{blank lines} before and after the \verb"\part" command,
+ and they will be ignored.
+\item You can assign points either to the question or to the parts of
+ a question.
+\end{itemize}
+
+%--------------------------------------------------------------------
+\subsection{Leaving space for the answers}
+\label{sec:BasicSpace}
+\index{space!for answers}
+\index{answer space}
+
+To leave blank space after a question you use the \verb"\vspace"
+command, and you end a page with the \verb"\newpage" command. For
+example, if you wanted to leave 3~inches of space after the first
+question and 2~inches of space after each of the parts of the second
+question, your \texttt{questions} environment would contain the
+following:
+%
+\index{blank space}\index{space!blank}
+\begin{verbatim}
+\question[10]
+Why is there air?
+
+\vspace{3in}
+
+\question
+What if there were no air?
+
+\begin{parts}
+\part[5]
+Describe the effect on the balloon industry.
+\vspace{2in}
+
+\part[5]
+Describe the effect on the aircraft industry.
+\vspace{2in}
+\end{parts}
+\newpage
+\end{verbatim}
+If you want to equally distribute the space on a page among several
+questions (or parts, or subparts, or subsubparts), you should
+type\indc{stretch}\index{space!allocating}
+%
+\index{allocating space}
+\begin{center}
+ \verb"\vspace{\stretch{1}}"
+\end{center}
+after each of the questions (or parts, etc.\@) and end the page with
+\verb"\newpage". If you'd like one of those questions to receive
+twice as much space as each of the others, then follow that one
+question with \verb"\vspace{\stretch{2}}" and follow each of the
+others with \verb"\vspace{\stretch{1}}". (You can use any decimal
+number for the \verb"\stretch" value. For example,
+\verb"\vspace{\stretch{1.5}}" will allocate 1.5 times the amount of
+space allocated by \verb"\vspace{\stretch{1}}".)
+
+In addition to leaving blank space, it's also possible to leave lined
+space, dotted lined space, or an empty box. For the full story, see
+section~\ref{sec:LeaveSpace}.
+
+%--------------------------------------------------------------------
+\subsection{Headers and footers}
+\label{sec:BasicHeadFoot}
+\index{header|(}
+\index{footer|(}
+
+To produce headers and footers, you give the command\indc{pagestyle}
+\begin{center}
+ \verb"\pagestyle{headandfoot}"
+\end{center}
+in the preamble (i.e., after the \verb"\documentclass" command and
+before the \verb"\begin{document}" command), followed by the commands
+that say what will be in the headers and footers. Headers and
+footers each have three parts: One part on the left, one centered
+part, and one part on the right, and any of these can be empty.
+
+The headers and footers are determined by the commands%
+\indc{firstpageheader}\indc{firstpagefooter}\indc{firstpageheadrule}%
+\indc{firstpagefootrule}\indc{runningheader}\indc{runningfooter}%
+\indc{runningheadrule}\indc{runningfootrule}
+\begin{center}
+ \begin{tabular}{l@{\qquad}l}
+ \verb"\firstpageheader"& for the header on the first page,\\
+ \verb"\firstpagefooter"& for the footer on the first page,\\
+ \verb"\firstpageheadrule"& to put a horizontal rule in the head of
+ the first page,\\
+ \verb"\firstpagefootrule"& to put a horizontal rule in the foot of
+ the first page,\\[0.5ex]
+ \verb"\runningheader"& for the header after the first page,\\
+ \verb"\runningfooter"& for the footer after the first page\\
+ \verb"\runningheadrule"& to put a horizontal rule in the head
+ after the first page, and\\
+ \verb"\runningfootrule"& to put a horizontal rule in the foot
+ after the first page.\\
+ \end{tabular}
+\end{center}
+
+For example, to have the header
+%
+\samplehead{Math 115}{First Exam}{July 4, 1776}{}
+%
+on the first page, the header
+%
+\samplehead{Math 115}{First Exam, Page 2 of 5}{July 4, 1776}{\hrule}
+%
+on all pages after the first, and no footer on any page, give the
+commands
+\begin{verbatim}
+\pagestyle{headandfoot}
+\runningheadrule
+\firstpageheader{Math 115}{First Exam}{July 4, 1776}
+\runningheader{Math 115}
+ {First Exam, Page \thepage\ of \numpages}
+ {July 4, 1776}
+\firstpagefooter{}{}{}
+\runningfooter{}{}{}
+\end{verbatim}
+
+For another example, to have the header
+%
+\samplehead{Math 115}{First Exam}{July 4, 1776}{}
+%
+on the first page, no header on the pages after the first, no footer
+on the first page, and the footer
+%
+\samplefoot{\hrule}{Math 115}{First Exam}{Page 2 of 5}
+%
+on all pages after the first, give the commands
+\begin{verbatim}
+\pagestyle{headandfoot}
+\firstpageheader{Math 115}{First Exam}{July 4, 1776}
+\runningheader{}{}{}
+\firstpagefooter{}{}{}
+\runningfooter{Math 115}{First Exam}{Page \thepage\ of \numpages}
+\runningfootrule
+\end{verbatim}
+
+Sections~\ref{sec:beginexamples} through \ref{sec:endexamples} contain
+many other examples of headers and footers, and the full explanation
+of the commands for headers and footers is in
+sections~\ref{sec:pagestyle}--\ref{sec:QuesSpan}.
+
+\index{header|)}
+\index{footer|)}
%---------------------------------------------------------------------
%--------------------------------------------------------------------
-\section{The \texttt{\char`\\documentclass} command}
+\section{The \texttt{\bs documentclass} command}
+\label{sec:Documentclass}
To use the \verb"exam" document class, you should specify \verb"exam"
-as the required argument to your \verb"\documentclass" command, as in
+as the required argument to your
+\verb"\documentclass"\indc{documentclass}
+command, as in
\begin{center}
\verb"\documentclass{exam}"
\end{center}
@@ -224,7 +612,8 @@ or, e.g., if you want to use 12~point type,
\verb"\documentclass[12pt]{exam}"
\end{center}
There are two possible optional arguments that are specific to the
-\verb"exam" document class: \verb"addpoints" and \verb"solutions".
+\verb"exam" document class:
+\verb"addpoints"\indcsub{documentclass}{options} and \verb"solutions".
Most documents that use the \verb"exam" document class should use the
option \verb"addpoints" (see section~\ref{sec:addpoints}); the option
\verb"answers" is used when you want to print solutions to the
@@ -234,7 +623,9 @@ questions (see section~\ref{sec:answers}).
\subsection{The option \texttt{addpoints}}
\label{sec:addpoints}
-The \verb"\documentclass" option \verb"addpoints", used as in
+The \verb"\documentclass" option
+\verb"addpoints"\indt{addpoints}\indcsub{documentclass}{options}, used
+as in
\begin{center}
\verb"\documentclass[addpoints]{exam}"
\end{center}
@@ -258,7 +649,7 @@ then the argument that contains the points must contain only digits
and the command \verb"\half" (see section~\ref{sec:Half}).
You can also turn \verb"addpoints" on and off wherever you like in the
-exam by using the commands
+exam by using the commands\indc{addpoints}\indc{noaddpoints}
\begin{center}
\begin{tabular}{l}
\verb"\addpoints"\\
@@ -276,7 +667,8 @@ If you will be typing solutions into the exam (see sections
\ref{sec:solutions}, \ref{sec:CorrectChoice},
and~\ref{sec:AnsShortAns}) and you'd like the solutions to be printed
on the next run of \LaTeX, you should include the document class
-option \verb"answers", as in
+option \verb"answers"\indt{answers}\indcsub{documentclass}{options},
+as in
\begin{center}
\verb"\documentclass[answers]{exam}"
\end{center}
@@ -289,97 +681,67 @@ or
\verb"\documentclass[12pt,addpoints,answers]{exam}"
\end{center}
Using the document class option \verb"answers" is equivalent to giving
-the command \verb"\printanswers" at the beginning of the exam (see
-section~\ref{sec:solutions}). The effect of this is that
+the command \verb"\printanswers"\indc{printanswers} at the beginning
+of the exam (see section~\ref{sec:solutions}). The effect of this is
+that
\begin{itemize}
-\item the contents of the environments
+\item the contents of the
+ environments\indt{solution}\indt{solutionorbox}%
+ \indt{solutionorlines}\indt{solutionordottedlines}
\begin{center}
\begin{tabular}{l}
\verb"solution",\\
+ \verb"solutionorbox",\\
\verb"solutionorlines", and\\
\verb"solutionordottedlines"
\end{tabular}
\end{center}
(see section~\ref{sec:solutions}) will be printed on the next run of
\LaTeX,
-\item any choices of a \verb"choices" or \verb"oneparchoices"
- environment (see section~\ref{sec:MulChc}) that are created using a
- \verb"\CorrectChoice" command (see section~\ref{sec:CorrectChoice})
- instead of a \verb"\choice" command will be printed with emphasis as
+\item any choices of a \texttt{choices}\indt{choices},
+ \texttt{oneparchoices}\indt{oneparchoices},
+ \texttt{checkboxes}\indt{checkboxes}, or
+ \texttt{oneparcheckboxes}\indt{oneparcheckboxes} environment (see
+ section~\ref{sec:MulChc}) that are created using a
+ \verb"\CorrectChoice"\indc{CorrectChoice} command (see
+ section~\ref{sec:CorrectChoice}) instead of a
+ \verb"\choice"\indc{choice} command will be printed with emphasis as
determined by the argument of the most recent
- \verb"\CorrectChoiceEmphasis" command (which by default is
- \verb"\bfseries"), and
-\item any \verb"\answerline" commands (see section~\ref{sec:ShortAns})
+ \verb"\CorrectChoiceEmphasis"\indc{CorrectChoiceEmphasis} command
+ (which by default is \verb"\bfseries"), and
+\item any \verb"\answerline"\indc{answerline} commands (see
+ section~\ref{sec:ShortAns})\indcsub{answerline}{optional~argument}
that include an optional argument containing the answer (see
section~\ref{sec:AnsShortAns}) will have the answer printed on the
answer line.
\end{itemize}
-%--------------------------------------------------------------------
-%--------------------------------------------------------------------
-\section{Asking for the student's name}
-
-This isn't anything specific to the \verb"exam" document class, but
-it's worth mentioning because it isn't obvious. If you're leaving
-space for the answers on the question pages (see
-section~\ref{sec:LeaveSpace}), then you'll probably also want to leave
-space for the student's name. If you type
-\begin{verbatim}
-\begin{center}
- \fbox{\fbox{\parbox{5.5in}{\centering
- Answer the questions in the spaces provided on the
- question sheets. If you run out of room for an answer,
- continue on the back of the page.}}}
-\end{center}
-
-\vspace{0.1in}
-
-\makebox[\textwidth]{Name and section:\enspace\hrulefill}
-
-\vspace{0.2in}
-
-\makebox[\textwidth]{Instructor's name:\enspace\hrulefill}
-\end{verbatim}
-after the \verb"\begin{document}" command and before the
-\verb"\begin{questions}" command (see section~\ref{sec:Questions}),
-then you'll get\\
-\noindent
-\parbox{\textwidth}{
-\begin{center}
- \fbox{\fbox{\parbox{5.5in}{\centering
- Answer the questions in the spaces provided on the
- question sheets. If you run out of room for an answer,
- continue on the back of the page.}}}
-\end{center}
-
-\vspace{0.1in}
-
-\makebox[\textwidth]{Name and section:\enspace\hrulefill}
-
-\vspace{0.2in}
-
-\makebox[\textwidth]{Instructor's name:\enspace\hrulefill}
-}
-
%---------------------------------------------------------------------
%--------------------------------------------------------------------
\section{Questions and points}
\label{sec:QuestionsPoints}
-To create questions, you use a \verb"questions" environment (see
-section~\ref{sec:Questions}); each question is begun with a
-\verb"\question" command, which takes an optional argument to assign
-some number of points to the question (see section~\ref{sec:points}).
-The questions are numbered automatically. Point values can include
-half points (see section~\ref{sec:Half}).
-
-If you want a question to have several parts, you use a \verb"parts"
-environment (see section~\ref{sec:parts}); each part is begun with a
-\verb"\part" command, which takes an optional argument to assign some
-number of points to the part (see section~\ref{sec:points}). The
-parts are numbered automatically. Similarly, parts can have subparts,
-and subparts can have subsubparts (see section~\ref{sec:parts}).
+To create questions, you use a \verb"questions"\indt{questions}
+%
+environment\index{questions environment}\index{environment!questions}
+(see section~\ref{sec:Questions}); each question is begun with a
+\verb"\question"\indc{question} command, which takes an optional
+argument to assign some number of points\index{points} to the question
+(see section~\ref{sec:points}). The questions are numbered
+automatically. Point values can include half points (see
+section~\ref{sec:Half}).
+
+If you want a question to have several parts, you use a
+%
+\verb"parts"\indt{parts}%
+\index{parts environment}\index{environment!parts} environment (see
+section~\ref{sec:parts}); each part is begun with a
+\verb"\part"\indc{part} command, which takes an optional argument to
+assign some number of points to the part (see
+section~\ref{sec:points}). The parts are numbered automatically.
+Similarly, parts can have subparts, and subparts can have subsubparts
+(see section~\ref{sec:parts}).
The points for a question (or part, or subpart, or subsubpart) appear
by default at the beginning of the question (or part, etc.), but there
@@ -397,9 +759,12 @@ section~\ref{sec:Bonus}).
\subsection{Questions}
\label{sec:Questions}
-To type the questions on the exam you use the \verb"questions"
-environment. Each question is then begun with the command
-\verb"\question", and the questions are numbered automatically.
+To type the questions on the exam you use the
+%
+\verb"questions"\indt{questions}\index{questions environment}%
+\index{environment!questions} environment. Each question is then
+begun with the command \verb"\question"\indc{question}, and the
+questions are numbered automatically.
For example, if you type
\begin{verbatim}
@@ -432,10 +797,11 @@ wood?
\bigskip
-As the above example illustrates, you can leave blank lines between
-the \verb"\question" command and the actual beginning of the
-question, or before the first \verb"\question" command in the
-environment, and they will be ignored.
+As the above example illustrates, you can leave blank lines
+%
+\index{blank lines} between the \verb"\question" command and the
+actual beginning of the question, or before the first \verb"\question"
+command in the environment, and they will be ignored.
%---------------------------------------------------------------------
@@ -443,7 +809,9 @@ environment, and they will be ignored.
\label{sec:parts}
If you want a question to have several parts, then you use the
-\verb"parts" environment. For example, if you type
+%
+\verb"parts"\indt{parts}\index{parts environment}%
+\index{environment!parts} environment. For example, if you type
\begin{verbatim}
\begin{questions}
\question
@@ -508,19 +876,25 @@ If the universe were to end, how would you know?
The above example illustrates several things:
\begin{itemize}
-\item Parts of a question should be put into a \verb"parts"
- environment.
+\item Parts of a question should be put into a
+ \verb"parts"\indt{parts}\index{parts environment}%
+ \index{environment!parts} environment.
\item If a question begins with a \verb"parts" environment, then the
first part will appear on the same line with the question number.
-\item You can leave blank lines before and after the \verb"\part"
- command, and they will be ignored.
+\item You can leave blank
+ %
+ lines\index{blank lines} before and after the \verb"\part" command,
+ and they will be ignored.
\end{itemize}
\bigskip
-There is also a \verb"subparts" environment, and even a
-\verb"subsubparts" environment, and they work just as you would
-expect. For example, if you type
+There is also a \verb"subparts"\indt{subparts}%
+\index{subparts environment}\index{environment!subparts} environment,
+and even a \verb"subsubparts"\indt{subsubparts}%
+\index{subsubparts environment}\index{environment!subsubparts}
+environment, and they work just as you would expect. For example, if
+you type\indc{subpart}\indc{subsubpart}
\begin{verbatim}
\begin{questions}
\question
@@ -662,245 +1036,14 @@ This is another part.
The numbers and letters used to number questions, parts, subparts, and
subsubparts can be customized; see section~\ref{sec:CustNumb}.
-%--------------------------------------------------------------------
-\subsection{Multiple choice questions}
-\label{sec:MulChc}
-
-There are two environments for listing the possible answers to a
-multiple choice question:
-\begin{itemize}
-\item The \verb"choices" environment creates a list with the choices
- as the items in the list (see section~\ref{sec:choices}).
-\item The \verb"oneparchoices" environment lists all of the choices in
- a single paragraph (that is a continuation of the paragraph
- preceding the environment unless you leave a blank line before
- beginning the environment) (see section~\ref{sec:oneparchoices}).
-\end{itemize}
-Both of these environments use upper case letters (i.e., ``A'', ``B'',
-``C'', \ldots) to label the choices; to change this, see
-section~\ref{sec:CustNumb}. Both of these environments allow you to
-designate one or more choices as correct choices and to have the
-correct choices printed with emphasis when solutions are being printed
-(see section~\ref{sec:CorrectChoice}).
-
-If you don't want the students to just circle the correct choices, you
-can use the \verb"\answerline" command to print a line on which the
-answer should be written (see section~\ref{sec:ShortAns}). The
-\verb"\anwerline" command allows you to include as an optional
-argument the answer to the question, and the answer will be printed on
-the line when solutions are bing printed (see
-section~\ref{sec:AnsShortAns}).
-
-
-
-%--------------------------------------------------------------------
-\subsubsection{The \texttt{choices} environment}
-\label{sec:choices}
-
-For example, if you type
-\begin{verbatim}
-\begin{questions}
-\question
-One of these things is not like the others; one of these things is not
-the same. Which one is different?
-\begin{choices}
-\choice John
-\choice Paul
-
-\choice
-
-George
-
-\choice Ringo
-
-\choice Socrates
-
-\end{choices}
-
-\end{questions}
-\end{verbatim}
-Then you'll get
-\begin{questions}
-\question
-One of these things is not like the others; one of these things is not
-the same. Which one is different?
-\begin{choices}
-\choice John
-\choice Paul
-
-\choice
-
-George
-
-\choice Ringo
-
-\choice Socrates
-
-\end{choices}
-
-\end{questions}
-
-%--------------------------------------------------------------------
-\subsubsection{The \texttt{oneparchoices} environment}
-\label{sec:oneparchoices}
-
-If instead of the \verb"choices" environment in the example of
-section~\ref{sec:choices} you use a \verb"oneparchoices" environment,
-then you'll get
-\begin{questions}
-\question
-One of these things is not like the others; one of these things is not
-the same. Which one is different?
-\begin{oneparchoices}
-\choice John
-\choice Paul
-
-\choice
-
-George
-
-\choice Ringo
-
-\choice Socrates
-
-\end{oneparchoices}
-
-\end{questions}
-
-If you insert a blank line before the \verb"\begin{oneparchoices}",
- then you'll get
-\begin{questions}
-\question
-One of these things is not like the others; one of these things is not
-the same. Which one is different?
-
-\begin{oneparchoices}
-\choice John
-\choice Paul
-
-\choice
-
-George
-
-\choice Ringo
-
-\choice Socrates
-
-\end{oneparchoices}
-
-\end{questions}
-
-
-If you insert a blank line before the \verb"\begin{oneparchoices}" and
-\verb"\answerline" after the \verb"\end{oneparchoices}" (see
-section~\ref{sec:ShortAns} for a description of the \verb"\answerline"
-command), then you'll get
-\begin{questions}
-\question
-One of these things is not like the others; one of these things is not
-the same. Which one is different?
-
-\begin{oneparchoices}
-\choice John
-\choice Paul
-
-\choice
-
-George
-
-\choice Ringo
-
-\choice Socrates
-
-\end{oneparchoices}
-\answerline
-
-\end{questions}
-
-%--------------------------------------------------------------------
-\subsubsection{Solutions to multiple choice questions}
-\label{sec:CorrectChoice}
-
-The \verb"exam" document class defines several environments for
-solutions (see section~\ref{sec:solutions}), the contents of which
-will be printed only if you use the document class option
-\verb"answers" (as in \verb"\documentclass[answers]{exam}") or give
-the command \verb"\printanswers" (see section~\ref{sec:answers}). The
-\verb"choices" (see section~\ref{sec:choices}) and
-\verb"oneparchoices" (see section~\ref{sec:oneparchoices})
-environments allow you to designate one or more of the choices as
-correct choices, and to have the correct choices printed differently
-from the others when solutions are being printed.
-
-The command to define a correct choice is \verb"\CorrectChoice". When
-solutions are not being printed, \verb"\CorrectChoice" is equivalent
-to \verb"\choice". When solutions are being printed, though, any
-choices that were created with \verb"\CorrectChoice" (rather than with
-\verb"\choice") will be printed subject to the declarations in the
-argument of the
-\begin{center}
- \verb"\CorrectChoiceEmphasis"
-\end{center}
-command. The default situation was created by the command
-\begin{center}
- \verb"\CorrectChoiceEmphasis{\bfseries}"
-\end{center}
-and so when solutions are being printed the correct choices are
-printed in boldface by default.
-For example, if \verb"\printanswers" is in effect and you type
-\begin{verbatim}
-\begin{questions}
- \question One of these things is not like the others; one of these
- things is not the same. Which one is different?
- \begin{oneparchoices}
- \choice John
- \choice Paul
- \choice George
- \choice Ringo
- \CorrectChoice Socrates
- \end{oneparchoices}
-\end{questions}
-\end{verbatim}
-then you'll get
-\printanswers
-\begin{questions}
- \question One of these things is not like the others; one of these
- things is not the same. Which one is different?
- \begin{oneparchoices}
- \choice John
- \choice Paul
- \choice George
- \choice Ringo
- \CorrectChoice Socrates
- \end{oneparchoices}
-\end{questions}
-\noprintanswers
-If, e.g., you give the command
-\begin{center}
- \verb"\usepackage{color}"
-\end{center}
-in the preamble of your document (i.e., after the
-\verb"\documentclass" command and before the \verb"\begin{document}"
-command) and then give the command
-\begin{center}
- \verb"\CorrectChoiceEmphasis{\color{red}}"
-\end{center}
-then the correct choices will be printed in red (assuming that your
-printer can produce that color). For another example, if you give the
-command
-\begin{center}
- \verb"\CorrectChoiceEmphasis{\color{red}\bfseries}"
-\end{center}
-then the correct choices will be printed in boldface red (again
-assuming that your printer can produce that color).
-
-To avoid confusion, \verb"\correctchoice" is defined to be a synonym
-for \verb"\CorrectChoice" and \verb"\correctchoiceemphasis" is defined
-to be a synonym for \verb"\CorrectChoiceEmphasis".
-
%---------------------------------------------------------------------
\subsection{Point values for the questions}
\label{sec:points}
+\indcsub{question}{optional argument}
+\indcsub{part}{optional argument}
+\indcsub{subpart}{optional argument}
+\indcsub{subsubpart}{optional argument}
+\index{points|(}
Each of the commands \verb"\question", \verb"\part", \verb"\subpart",
and \verb"\subsubpart" takes an optional argument, which is the number
@@ -921,18 +1064,20 @@ section~\ref{sec:qformat} and section~\ref{sec:pointformat}.
%--------------------------------------------------------------------
\subsubsection{Where the points will be printed}
\label{sec:whereprint}
+\index{points!where printed|(}
The default is that the point value will be inserted at the beginning
of the question (or part, or subpart, or subsubpart) in parentheses,
but
\begin{itemize}
-\item the command \verb"\pointsinmargin" will cause the point values
- to be set in the left margin,
-\item the command \verb"\pointsinrightmargin" will cause the point
- values to be set in the right margin, and
-\item the commands \verb"\nopointsinmargin" and
- \verb"\nopointsinrightmargin" are equivalent, and either of them
- will revert to the default situation.
+\item the command \verb"\pointsinmargin"\indc{pointsinmargin} will
+ cause the point values to be set in the left margin,
+\item the command
+ \verb"\pointsinrightmargin"\indc{pointsinrightmargin} will cause the
+ point values to be set in the right margin, and
+\item the commands \verb"\nopointsinmargin"\indc{nopointsinmargin} and
+ \verb"\nopointsinrightmargin"\indc{nopointsinrightmargin} are
+ equivalent, and either of them will revert to the default situation.
\end{itemize}
All of these print the point values on the first line of the question
(or part, or subpart, or subsubpart). There is also a way to print
@@ -983,10 +1128,9 @@ Describe the effect on the aircraft industry.
(To change the word ``points'', see the commands described in
section~\ref{sec:pointname}.)
-\bigskip
-If you give the command \verb"\pointsinmargin", then the above input
-will produce instead
-\pointsinmargin
+\bigskip If you give the command
+\verb"\pointsinmargin"\indc{pointsinmargin}, then the above input will
+produce instead \pointsinmargin
\begin{questions}
\question[20]
Why is there air?
@@ -1005,14 +1149,17 @@ Describe the effect on the aircraft industry.
\end{questions}
(To have a word (e.g., ``points'', or ``\%'') inside the parentheses
-with the point values, see the \verb"\marginpointname" command in
+with the point values, see the
+\verb"\marginpointname"\indc{marginpointname} command in
section~\ref{sec:pointname}.)
\bigskip
-If you give the command \verb"\pointsinrightmargin", then the above
+If you give the command
+\verb"\pointsinrightmargin"\indc{pointsinrightmargin}, then the above
input will produce instead
+%
\pointsinrightmargin
\begin{questions}
\question[20]
@@ -1035,6 +1182,10 @@ Describe the effect on the aircraft industry.
%--------------------------------------------------------------------
\subsubsection{Printing the points at the end of the question}
\label{sec:DrpPts}
+\index{points!at the end of the question|(}
+\indcstart{pointsdroppedatright}
+\indcstart{droppoints}
+
Instead of having the point value of a question (or part, or subpart,
or subsubpart) printed on the first line of a question, you can have
@@ -1054,24 +1205,28 @@ If you give the command
then point values are not printed until you give the command
\verb"\droppoints" (and they're not printed at all if you don't give
the command \verb"\droppoints"). The only exception to this rule is
-that if you've given a \verb"\qformat" command (see
+that if you've given a \verb"\qformat"\indc{qformat} command (see
section~\ref{sec:qformat}), then question number lines are printed as
specified by the argument to the \verb"\qformat" command even if you
-have given the command \verb"\pointsdroppedatright".
+have given the command
+\verb"\pointsdroppedatright"
The command \verb"\droppoints" should be given only at the end of a
paragraph or between paragraphs; if you give it within a paragraph, it
causes the paragraph to end. \verb"\droppoints" prints the point
value in the right margin, formatted as it is when you give the
-command \verb"\pointsinrightmargin", except that the points appear
-opposite the last line of the paragraph (or, if the command
-\verb"\droppoints" is given between paragraphs, then additional
-vertical space is left between the paragraphs and the points are
-printed opposite the blank space). The formatting can be changed by
-giving the commands \verb"\bracketedpoints", \verb"\boxedpoints", or
-\verb"\marginpointname" (see section~\ref{sec:pointname}) just as if
-\verb"\pointsinrightmargin" were in effect. The command
-\verb"\droppoints" actually works this way even if one of the commands
+command \verb"\pointsinrightmargin"\indc{pointsinrightmargin}, except
+that the points appear opposite the last line of the paragraph (or, if
+the command \verb"\droppoints" is given between paragraphs, then
+additional vertical space is left between the paragraphs and the
+points are printed opposite the blank space). The formatting can be
+changed by giving the commands
+\verb"\bracketedpoints"\indc{bracketedpoints},
+\verb"\boxedpoints"\indc{boxedpoints}, or
+\verb"\marginpointname"\indc{marginpointname} (see
+section~\ref{sec:pointname}) just as if \verb"\pointsinrightmargin"
+were in effect. The command \verb"\droppoints" actually works this
+way even if one of the commands
\begin{center}
\verb"\nopointsinmargin",\quad \verb"\pointsinmargin",\quad or\quad
\verb"\pointsinrightmargin"
@@ -1147,18 +1302,27 @@ weapon chosen is a single shot pistol.
\droppoints
\end{questions}
\nopointsinmargin
+
+\indcstop{droppoints}
+\indcstop{pointsdroppedatright}
+\index{points!at the end of the question|)}
+\index{points!where printed|)}
+
%--------------------------------------------------------------------
\subsubsection{Half points}
\label{sec:Half}
+\index{points!half|(}
+\index{half points|(}
The point values of questions, parts, subparts, and subsubparts can
-include half points. To specify half points, you either type
+include half points. To specify half points, you either
+type\indc{half}
\begin{center}
\verb"\half"
\end{center}
immediately following the integer part of the point value or just type
\verb"\half" as the entire point value. That is, the valid point
-values and their (default) printed appearances are:
+values and their (default) printed appearances are:\indc{half}
\begin{center}
\begin{tabular}{@{\extracolsep{0.1in}}rccccccc}
Typed:& \verb"0"& \verb"\half"& \verb"1"& \verb"1\half"& \verb"2"&
@@ -1170,7 +1334,10 @@ If you prefer, you can cause the fraction \half{} to be printed as
\makeatletter
\horiz@half.
\makeatother
-To do this, you give the command
+To do this, you give the
+command\indc{usehorizontalhalf}%
+\index{customization!\texttt{\char`\\half}}%
+\indcsub{half}{customization}
\begin{center}
\verb"\usehorizontalhalf"
\end{center}
@@ -1184,20 +1351,24 @@ after which the printed appearance of point values will be
\end{tabular}
\end{center}
If you want to return to using the default appearance, you can do that
-by giving the command
+by giving the command\indc{useslantedhalf}
\begin{center}
\verb"\useslantedhalf"
\end{center}
\useslantedhalf
+\index{half points|)}
+\index{points!half|)}
%--------------------------------------------------------------------
\subsubsection{Surrounding the points: Parentheses, brackets, or a box}
\label{sec:Boxed}
+\index{customization!points|(}
+\index{points!customization|(}
If you prefer having the points enclosed in brackets instead of in
-parentheses, give the command
+parentheses, give the command\indc{bracketedpoints}
\begin{center}
\verb"\bracketedpoints"
\end{center}
@@ -1225,7 +1396,7 @@ Describe the effect on the aircraft industry.
If you prefer having the points enclosed in a box instead of in
-parentheses, give the command
+parentheses, give the command\indc{boxedpoints}
\begin{center}
\verb"\boxedpoints"
\end{center}
@@ -1250,10 +1421,11 @@ Describe the effect on the aircraft industry.
\end{parts}
\end{questions}
-If you give the commands \verb"\boxedpoints" and
-\verb"\pointsinmargin", then the above questions will produce
-\boxedpoints
-\pointsinmargin
+If you give the commands \verb"\boxedpoints"\indc{boxedpoints} and
+\verb"\pointsinmargin"\indc{pointsinmargin}, then the above questions
+will produce
+%
+\boxedpoints \pointsinmargin
\begin{questions}
\question[20]
Why is there air?
@@ -1271,8 +1443,9 @@ Describe the effect on the aircraft industry.
\end{parts}
\end{questions}
-If you give the commands \verb"\bracketedpoints" and
-\verb"\pointsinrightmargin", then the above questions will produce
+If you give the commands \verb"\bracketedpoints"\indc{bracketedpoints}
+and \verb"\pointsinrightmargin"\indc{pointsinrightmargin}, then the
+above questions will produce
%
\bracketedpoints
\pointsinrightmargin
@@ -1296,7 +1469,9 @@ Describe the effect on the aircraft industry.
Other combinations of these commands will produce similar effects.
If you want to switch back and forth between formats during the exam,
-you can do so by giving one of the commands
+you can do so by giving one of the
+commands\indc{boxedpoints}\indc{bracketedpoints}\indc{noboxedpoints}
+\indc{nobracketedpoints}
\begin{center}
\begin{tabular}{l}
\verb"\boxedpoints"\\
@@ -1320,14 +1495,19 @@ inserted along with the point values when using either
%---------------------------------------------------------------------
\subsubsection{Using a substitute for the word ``points''}
\label{sec:pointname}
+\index{points!substitute words|(}
+\index{points!language|(}
With the default setup, the number of points is inserted before the
text of the question followed by a single space and the word ``point''
if the number of points is either \half{} or 1 and by the word
``points'' otherwise. That is, the default is
-\verb"\nopointsinmargin" and \verb"\noboxedpoints" (see sections
+\verb"\nopointsinmargin"\indc{nopointsinmargin} and
+\verb"\noboxedpoints"\indc{noboxedpoints} (see sections
\ref{sec:whereprint} and \ref{sec:Boxed}), and if you type
-\nopointsinmargin \noboxedpoints
+%
+\nopointsinmargin
+\noboxedpoints
\begin{verbatim}
\begin{questions}
\question[1]
@@ -1347,35 +1527,36 @@ then you'll get
\end{questions}
The way this is achieved is:
\begin{itemize}
-\item There is a command
+\item There is a command\indc{points}
\begin{center}
\verb"\points"
\end{center}
whose default definition expands to the word `point' if the number
of points is either \half{} or 1 and to `points' otherwise. (This
- behavior can be modified by the command \verb"\pointpoints"; see
- below.)
-\item There is a command
+ behavior can be modified by the command
+ \verb"\pointpoints"\indc{pointpoints}; see below.)
+\item There is a command\indc{pointname}
\begin{center}
\verb"\pointname{Text}"
\end{center}
that causes `Text' to be inserted following the number of points of
a question, part, subpart, or subsubpart. The default setup is the
- result of the command
+ result of the command\indc{pointname}\indc{points}
\begin{center}
\verb"\pointname{ \points}"
\end{center}
(Note the single space before the command \verb"\points".)
\end{itemize}
-There is also a command
+There is also a command\indc{pointpoints}
\begin{center}
\verb"\pointpoints{SingularText}{PluralText}"
\end{center}
that changes the behavior of the \verb"\points" command so that it
expands to `SingularText' if the number of points is \half{} or 1 and
to `PluralText' otherwise. (The default is the result of the command
-\verb"\pointpoints{point}{points}".) Thus, if you give the command
+\verb"\pointpoints{point}{points}"\indc{pointpoints}.) Thus, if you
+give the command
\begin{center}
\verb"\pointpoints{Punkt}{Punkte}"
\end{center}
@@ -1388,11 +1569,12 @@ then typing the questions above would result in
\question[5]
This is a longer question, requiring more thought.
\end{questions}
-There is also a command
+There is also a command\indc{marksnotpoints}\index{marks}
\begin{center}
\verb"\marksnotpoints"
\end{center}
-that is equivalent to the two commands
+that is equivalent to the two
+commands\indc{pointpoints}\indc{bonuspointpoints}\index{marks}
\begin{center}
\begin{tabular}{l}
\verb"\pointpoints{mark}{marks}"\\
@@ -1401,7 +1583,9 @@ that is equivalent to the two commands
\end{center}
(the command \verb"\bonuspointpoints" is described in
section~\ref{sec:Bonus}). That command would cause the above
-questions to be printed as \pointpoints{mark}{marks}
+questions to be printed as
+%
+\pointpoints{mark}{marks}
\begin{questions}
\question[1]
This is a short question.
@@ -1412,7 +1596,7 @@ questions to be printed as \pointpoints{mark}{marks}
\bigskip
-For another example, if you give the command
+For another example, if you give the command\indc{pointname}
\begin{center}
\verb"\pointname{\%}"
\end{center}
@@ -1433,10 +1617,11 @@ then the above questions would be printed as
\subsubsection*{Using \texttt{\char`\\marginpointname}}
-Similarly, the command \verb"\marginpointname" can be used to affect
-the text set with the number of points when \verb"\pointsinmargin" or
-\verb"\pointsinrightmargin" is in effect. For example, if you give
-the commands
+Similarly, the command \verb"\marginpointname"\indc{marginpointname}
+can be used to affect the text set with the number of points when
+\verb"\pointsinmargin"\indc{pointsinmargin} or
+\verb"\pointsinrightmargin"\indc{pointsinrightmargin} is in effect.
+For example, if you give the commands
\begin{center}
\begin{tabular}{l}
\verb"\pointsinmargin"\\
@@ -1456,8 +1641,9 @@ then you'll get
\question[25]
Where, oh where, has my little dog gone?
\end{questions}
-unless, e.g., you've also given the command \verb"\boxedpoints" (see
-section~\ref{sec:Boxed}), in which case you'll get
+unless, e.g., you've also given the command
+\verb"\boxedpoints"\indc{boxedpoints} (see section~\ref{sec:Boxed}),
+in which case you'll get
%
\pointsinmargin
\boxedpoints
@@ -1486,23 +1672,26 @@ Where, oh where, has my little dog gone?
\pointpoints{point}{points}
\bonuspointpoints{point (bonus)}{points (bonus)}
-Using the default is equivalent to giving the command
+Using the default is equivalent to giving the
+command\indc{marginpointname}
\begin{center}
\verb"\marginpointname{}"
\end{center}
+
%--------------------------------------------------------------------
-\subsubsection{Using \texttt{\char`\\marginpointname} and enlarging
- the margins}
+\subsubsection{Using \texttt{\bs marginpointname} and enlarging the
+ margins}
\label{sec:margins}
The default margins are not very large, and so if you use
-\verb"\marginpointname" (see section~\ref{sec:pointname}) to place any
-words along with the point values in the margin, you may run out of
-room. The solution to this problem is to enlarge the margins by using
-the \verb"\extrawidth" command with a negative argument to
-\emph{decrease} the width of the text area, and thus \emph{increase}
-the width of the margins. For example, the commands
+\verb"\marginpointname"\indc{marginpointname} (see
+section~\ref{sec:pointname}) to place any words along with the point
+values in the margin, you may run out of room. The solution to this
+problem is to enlarge the margins\index{margins!enlarge} by using the
+\verb"\extrawidth"\indc{extrawidth} command with a negative argument
+to \emph{decrease} the width of the text area, and thus
+\emph{increase} the width of the margins. For example, the commands
\begin{center}
\begin{tabular}{ll}
\verb"\extrawidth{-1in}"\\
@@ -1524,7 +1713,8 @@ section~\ref{sec:pointname} (using \verb"\bracketedpoints",
\verb"\marginpointname") aren't sufficient, and you don't want to use
the \verb"\qformat" command to create a customized question number
line (see section~\ref{sec:qformat}), you can completely customize the
-way the points are printed by using the commands
+way the points are printed by using the
+commands\indc{pointformat}\indc{bonuspointformat}
\begin{center}
\begin{tabular}{l}
\verb"\pointformat"\\
@@ -1544,28 +1734,31 @@ question (the default), in the left margin (because of
\verb"\pointsinrightmargin"), or dropped in the right margin at the
end of the question (because of \verb"\pointsdroppedatright"). The
arguments to \verb"\pointformat" and \verb"\bonuspointformat" should
-contain either the command
+contain either the command\indc{thepoints}
\begin{center}
\verb"\thepoints"
\end{center}
(which for non-bonus points prints the number of points followed by
-the argument to the last \verb"\pointname" command and for bonus
-points prints the number of bonus points followed by the argument to
-the last \verb"\bonuspointname" command; see
-section~\ref{sec:pointname}) or the command
+the argument to the last \verb"\pointname"\indc{pointname} command and
+for bonus points prints the number of bonus points followed by the
+argument to the last \verb"\bonuspointname"\indc{bonuspointname}
+command; see section~\ref{sec:pointname}) or the
+command\indc{themarginpoints}
\begin{center}
\verb"\themarginpoints"
\end{center}
(which for non-bonus points prints the number of points followed by
-the argument to the last \verb"\marginpointname" command and for bonus
-points prints the number of bonus points followed by the argument to
-the last \verb"\marginbonuspointname" command; see
+the argument to the last \verb"\marginpointname"\indc{marginpointname}
+command and for bonus points prints the number of bonus points
+followed by the argument to the last
+\verb"\marginbonuspointname"\indc{marginbonuspointname} command; see
section~\ref{sec:pointname}). If the argument doesn't contain either
\verb"\thepoints" or \verb"\themarginpoints", then the number of
points will not appear.
For example, the command \verb"\bracketedpoints" is equivalent to
-either
+either\indc{bracketedpoints}\indc{pointformat}%
+\indc{bonuspointformat}\indc{thepoints}
\begin{center}
\begin{tabular}{l}
\verb"\pointformat{[\thepoints]}"\\
@@ -1573,6 +1766,7 @@ either
\end{tabular}
\end{center}
if the points are being printed at the beginning of the question, or
+\indc{pointformat}\indc{bonuspointformat}\indc{themarginpoints}
\begin{center}
\begin{tabular}{l}
\verb"\pointformat{[\themarginpoints]}"\\
@@ -1582,7 +1776,7 @@ if the points are being printed at the beginning of the question, or
if the points are being printed in one of the margins.
For another example, the command \verb"\boxedpoints" is equivalent to
-either
+either\indc{pointformat}\indc{bonuspointformat}\indc{thepoints}
\begin{center}
\begin{tabular}{l}
\verb"\pointformat{\fbox{\thepoints}}"\\
@@ -1590,6 +1784,7 @@ either
\end{tabular}
\end{center}
if the points are being printed at the beginning of the question, or
+\indc{pointformat}\indc{bonuspointformat}\indc{themarginpoints}
\begin{center}
\begin{tabular}{l}
\verb"\pointformat{\fbox{\themarginpoints}}"\\
@@ -1598,7 +1793,9 @@ if the points are being printed at the beginning of the question, or
\end{center}
if the points are being printed in one of the margins.
-For another example, the commands
+For another example, the
+commands\indc{marginpointname}\indc{pointsinmargin}\indc{pointformat}%
+\indc{pointsinmargin}
\begin{verbatim}
\begin{questions}
\pointsinmargin
@@ -1615,7 +1812,9 @@ will produce
\question[3] What is the point?
\end{questions}
-For another example, the commands
+For another example, the
+commands\indc{marginpointname}\indc{pointsinmargin}\indc{pointformat}%
+\indc{pointsinrightmargin}
\begin{verbatim}
\begin{questions}
\pointsinrightmargin
@@ -1632,11 +1831,11 @@ will produce
\question[3\half] What is the point?
\end{questions}
\nopointsinmargin (Note: The commands \verb"\bfseries" and
-\verb"\boldmath" are both needed here because the \half{} printed when
-you use half points is printed in math mode while the rest of the
-points are printed in text mode.)
+\verb"\boldmath"\indc{boldmath} are both needed here because the
+\half{} printed when you use half points is printed in math mode while
+the rest of the points are printed in text mode.)
-For another example, the commands
+For another example, the commands\indc{pointformat}\indc{boldmath}
\begin{verbatim}
\begin{questions}
\pointname{}
@@ -1656,11 +1855,15 @@ will produce
\nopointsinmargin
\pointname{ \points}
-
-
+\index{points!language|)}
+\index{points!substitute words|)}
+\index{points!customization|)}
+\index{customization!points|)}
%---------------------------------------------------------------------
\subsubsection{Questions that begin with a parts environment}
+\index{questions!that begin with a parts environment}
+\index{points!for both question and part}
If a question begins with a parts environment, then the question
number and the number of the first part in the parts environment will
@@ -1713,11 +1916,13 @@ then you'll get
%--------------------------------------------------------------------
\subsubsection{Adding up the points for a question}
\label{sec:addup}
+\indt{addpoints}
+\indc{addpoints}
If you use the document class option \verb"addpoints" (as in
\verb"\documentclass[addpoints]{exam}") or give the command
\verb"\addpoints" (see section~\ref{sec:addpoints}), then you can use
-the command
+the command\indc{droptotalpoints}
\begin{center}
\verb"\droptotalpoints"
\end{center}
@@ -1725,10 +1930,11 @@ to put into the right margin the total number of points for the
current question (including the points for all parts, subparts, and
subsubparts). (Section~\ref{sec:adding} describes a different way to
print the total number of points for a question.) The command
-\verb"\droptotalpoints" should be given only at the end of a paragraph
-or between paragraphs; if you give it within a paragraph, it causes
-the paragraph to end. \verb"\droptotalpoints" prints the total points
-for the current question in the right margin, formatted by default as:
+\verb"\droptotalpoints" should be used only at the end of a paragraph
+or between paragraphs; if you use it within a paragraph, it causes the
+paragraph to end. \verb"\droptotalpoints" prints the total points for
+the current question in the right margin, formatted by default as:
+%
\par\nobreak\medskip
\makeatletter
\leavevmode\nobreak\hfill
@@ -1739,14 +1945,15 @@ for the current question in the right margin, formatted by default as:
}% rlap
\makeatother
\par\medskip\noindent
+%
(Note: The number of points is followed by the argument to the most
-recently executed \verb"\marginpointname" command (see
-section~\ref{sec:pointname}), which by default is empty.)
+recently executed \verb"\marginpointname"\indc{marginpointname}
+command (see section~\ref{sec:pointname}), which by default is empty.)
If the current question is worth any bonus points (see
section~\ref{sec:Bonus}), then those bonus points will not be counted
by the \verb"\droptotalpoints" command, but they will be counted by
-the
+the\indc{droptotalbonuspoints}
\begin{center}
\verb"\droptotalbonuspoints"
\end{center}
@@ -1763,18 +1970,21 @@ points for the current question, formatted by default as:
\makeatother
\par\medskip\noindent
(Note: The number of bonus points is followed by the argument to the
-most recently executed \verb"\marginbonuspointname" command (see
+most recently executed
+\verb"\marginbonuspointname"\indc{marginbonuspointname} command (see
section~\ref{sec:Bonus}), which by default is `` (bonus)''.)
-You can change the format used by the \verb"\droptotalpoints" command
-with the
+You can change the format used by the
+\verb"\droptotalpoints"\indc{droptotalpoints} command with
+the\indc{totalformat}
\begin{center}
\verb"\totalformat"
\end{center}
command. It takes one argument, and that argument becomes the command
to print the total points, right justified a distance of
-\verb"\rightpointsmargin" from the right edge of the paper. The
-argument can contain the command
+\verb"\rightpointsmargin"\indc{rightpointsmargin} from the right edge
+of the paper. The argument can contain the
+command\indc{totalpoints}\indc{thequestion}
\begin{center}
\begin{tabular}{ll}
\verb"\totalpoints"& to print the number of points, and\\
@@ -1782,14 +1992,15 @@ argument can contain the command
\end{tabular}
\end{center}
(\verb"\totalpoints" expands to
-\verb"\pointsofquestion{\arabic{question}}"; see
-section~\ref{sec:pointsofq} for a discussion of the
+\verb"\pointsofquestion{\arabic{question}}"\indc{pointsofquestion};
+see section~\ref{sec:pointsofq} for a discussion of the
\verb"\pointsofquestion" command.) For example, if you give the
-command
+command\indc{totalformat}\indc{thequestion}\indc{totalpoints}
\begin{center}
\verb"\totalformat{Question \thequestion: \totalpoints}"
\end{center}
then the total number of points will be printed in the format
+%
\par\nobreak\medskip
\makeatletter
\leavevmode\nobreak\hfill
@@ -1800,11 +2011,13 @@ then the total number of points will be printed in the format
}% rlap
\makeatother
\par\medskip\noindent
-and if you give the command
+%
+and if you give the command\indc{totalformat}\indc{totalpoints}
\begin{center}
\verb"\totalformat{\fbox{Total: \totalpoints}}"
\end{center}
then the total number of points will be printed as
+%
\par\nobreak\medskip
\makeatletter
\leavevmode\nobreak\hfill
@@ -1816,12 +2029,13 @@ then the total number of points will be printed as
\makeatother
\par\medskip\noindent
-Thus, if you've given the commands
+Thus, if you've given the
+commands\indc{addpoints}\indc{bracketedpoints}\indc{pointsdroppedatright}
\begin{center}
\begin{tabular}{l}
\verb"\addpoints"\\
\verb"\bracketedpoints"\\
- \verb"\pointdroppedatright"
+ \verb"\pointsdroppedatright"
\end{tabular}
\end{center}
and you type
@@ -1864,10 +2078,8 @@ make the earth into a regular icosahedron?
\par
%\droptotalpoints
\end{questions}
-\noaddpoints
-\nopointsinmargin
-\nobracketedpoints
-If you've also given the command
+\noaddpoints \nopointsinmargin \nobracketedpoints If you've also given
+the command\indc{totalformat}\indc{totalpoints}\indc{thequestion}
\begin{center}
\verb"\totalformat{Total for Question \thequestion: [\totalpoints]}"
\end{center}
@@ -1901,13 +2113,15 @@ make the earth into a regular icosahedron?
\nopointsinmargin
\nobracketedpoints
-To change the format used by the \verb"\droptotalbonuspoints" command,
-you use the command
+To change the format used by the
+\verb"\droptotalbonuspoints"\indc{droptotalbonuspoints} command, you
+use the command\indc{bonustotalformat}
\begin{center}
\verb"\bonustotalformat"
\end{center}
which is analogous to the \verb"\totalformat" command. The argument
-to \verb"\bonustotalformat" can contain the command
+to \verb"\bonustotalformat" can contain the
+command\indc{totalbonuspoints}\indc{thequestion}
\begin{center}
\begin{tabular}{ll}
\verb"\totalbonuspoints"& to print the number of bonus points, and\\
@@ -1917,27 +2131,32 @@ to \verb"\bonustotalformat" can contain the command
(\verb"\totalbonuspoints" expands to
\verb"\bonuspointsofquestion{\arabic{question}}"; see
section~\ref{sec:BonusTables} for a discussion of the
-\verb"\bonuspointsofquestion" command.)
+\verb"\bonuspointsofquestion"\indc{bonuspointsofquestion} command.)
-%--------------------------------------------------------------------
-\subsubsection{Margin sizes when using \texttt{\char`\\pointsinmargin}
- and \texttt{\char`\\pointsinrightmargin}}
+\index{points|)}
+%--------------------------------------------------------------------
+\subsubsection{Margin sizes when using \texttt{\bs pointsinmargin} and
+ \texttt{\bs pointsinrightmargin}}
+\index{margins!enlarge|(}
\begin{itemize}
-\item If you give the command \verb"\pointsinmargin", then the points
- are printed right justified in the left margin, with the right edge
- a distance of \verb"\marginpointsep" from the left edge of the text
- area. The default value of \verb"\marginpointsep" is the result of
- the command
+\item If you give the command
+ \verb"\pointsinmargin"\indc{pointsinmargin}, then the points are
+ printed right justified in the left margin, with the right edge a
+ distance of \verb"\marginpointsep"\indc{marginpointsep} from the
+ left edge of the text area. The default value of
+ \verb"\marginpointsep" is the result of the command
\begin{center}
\verb"\setlength{\marginpointssep}{5pt}"
\end{center}
and you can change it by giving a new \verb"\setlength" command.
-\item If you give the command \verb"\pointsinrightmargin", then the
+\item If you give the command
+ \verb"\pointsinrightmargin"\indc{pointsinrightmargin}, then the
points are printed right justified in the right margin, with the
- right edge a distance of \verb"\rightpointsmargin" from the right
+ right edge a distance of
+ \verb"\rightpointsmargin"\indc{rightpointsmargin} from the right
edge of the paper. The default value of \verb"\rightpointsmargin"
is the result of the command
\begin{center}
@@ -1947,51 +2166,65 @@ section~\ref{sec:BonusTables} for a discussion of the
\end{itemize}
You can change the width of the text area (and, thus, change the width
-of the margins) with the \verb"\extrawidth" command (see
-section~\ref{sec:margins}).
+of the margins) with the \verb"\extrawidth"\indc{extrawidth} command
+(see section~\ref{sec:margins}).
+\index{margins!enlarge|)}
%--------------------------------------------------------------------
-\subsection{Custom question number lines: The \texttt{\char`\\qformat}
-command}
+\subsection{Custom question number lines: The \texttt{\bs qformat}
+ command}
\label{sec:qformat}
+\indc{qformat}
+\index{questions!customization|(}
The default setup is for the question number to appear in the left
margin and for the text of the question to begin on that line. It's
possible to change this so that the text of the question starts on the
line following the question number, and the format of the line
containing the question number is determined by the user. This is
-done using the \verb"\qformat" command. (There is also a
-\verb"\noqformat" command, which reverts to the default setup.)
+done using the \verb"\qformat" command. There is also a
+\verb"\noqformat"\indc{noqformat} command, which reverts to the
+default setup.
-To use the \verb"\qformat" command, you give the command
+To use the \verb"\qformat"\indc{qformat} command, you give the command
\begin{center}
\verb"\qformat{Format specification}"
\end{center}
-where `Format specification' must contain some stretchability (e.g.,
-at least one \verb"\hfill" or \verb"\dotfill" or \verb"\hrulefill" or
-\ldots) and can contain the commands
+where \texttt{Format specification} must contain some stretchability
+(e.g., at least one \verb"\hfill" or \verb"\dotfill" or
+\verb"\hrulefill" or \ldots) and can contain the commands
\begin{itemize}
-\item \verb"\thequestion", which expands to the question number,
-\item \verb"\thepoints", which expands to
+\item \verb"\thequestion"\indc{thequestion}, which expands to the
+ question number,
+\item \verb"\thequestiontitle"\indc{thequestiontitle} (see
+ section~\ref{sec:questiontitle}), which expands to
+ \begin{itemize}
+ \item the title of the question, if this question was defined using
+ a \verb"\titledquestion"\indc{titledquestion} command (see
+ section~\ref{sec:TitledQues}) instead of a \verb"\question"
+ command, or
+ \item the number of the question, if this question was defined using
+ a \verb"\question" command,
+ \end{itemize}
+\item \verb"\thepoints"\indc{thepoints}, which expands to
\begin{itemize}
- \item nothing, if no points were specified for the question,
\item the number of points followed by the argument to the last
- \verb"\pointname" command, if this is a ``regular'' question
- (i.e., not a bonus question; see section~\ref{sec:Bonus}), and
- \item the number of bonus points followed by the argument to the
- last \verb"\bonuspointname" command, if this is a bonus question
- (see section~\ref{sec:Bonus})
+ \verb"\pointname"\indc{pointname} command, if there were points
+ specified for the question, or
+ \item nothing, if no points were specified for the question
\end{itemize}
(see section~\ref{sec:pointname} for a discussion of the
- \verb"\pointname" and \verb"\bonuspointname" commands), and
-\item \verb"\totalpoints", which expands to the total number of points
- specified for the question and all of its parts, subparts, and
- subsubparts (see section~\ref{sec:addup}). The command
- \verb"\totalpoints" expands to
- \verb"\pointsofquestion{\arabic{question}}".
+ \verb"\pointname" command), and
+\item \verb"\totalpoints"\indc{totalpoints}, which expands to the
+ total number of points specified for the question and all of its
+ parts, subparts, and subsubparts (see section~\ref{sec:addup}). The
+ command \verb"\totalpoints" expands to
+ \verb"\pointsofquestion{\arabic{question}}"\indc{pointsofquestion}
+ (see section~\ref{sec:pointsofq}).
\end{itemize}
-For example, if you give the commands
+For example, if you give the
+commands\indc{pointpoints}\indc{points}\indc{thepoints}\indc{thequestion}
%
\pointname{ \points}
\pointpoints{point}{points}
@@ -2021,8 +2254,8 @@ then you'll get
What did Billy Joe MacAllister throw off the Tallahatchie Bridge?
\end{questions}
%
-\medskip
-If you instead use the command
+\medskip If you instead use the
+command\indc{qformat}\indc{thequestion}\indc{thepoints}
\begin{verbatim}
\qformat{\hfill Question \thequestion\hfill (\thepoints)}
\end{verbatim}
@@ -2034,19 +2267,40 @@ What did Billy Joe MacAllister throw off the Tallahatchie Bridge?
\end{questions}
\noqformat
+If you use a \verb"\qformat"\indc{qformat} (and, if there are any
+bonus questions, also a \verb"\bonusqformat"\indc{bonusqformat}; see
+section~\ref{sec:Bonus}), so that there are no labels on any of the
+questions, and you'd like to remove the
+indentation\index{indentation!remove} of the questions, you should
+give the command
+\begin{verbatim}
+\renewcommand{\questionshook}{%
+ \setlength{\leftmargin}{0pt}%
+ \setlength{\labelwidth}{-\labelsep}%
+}
+\end{verbatim}
+(see section~\ref{sec:CustList}) before the \texttt{questions}
+environment.
+
+\index{questions!customization|)}
+
%--------------------------------------------------------------------
\subsubsection{Adding up the points for a question}
\label{sec:adding}
+\index{points!adding}
-You can combine \verb"\qformat" with the \verb"\totalpoints" command
-(see section~\ref{sec:addup}): If you assign points only to parts,
+You can combine \verb"\qformat"\indc{qformat} with the
+\verb"\totalpoints"\indc{totalpoints} command (see
+section~\ref{sec:addup}): If you assign points only to parts,
subparts, and subsubparts of questions, but none to the questions
-themselves, and you give the command
+themselves, and you give the
+command\indc{thequestion}\indc{totalpoints}
\begin{verbatim}
\qformat{Question \thequestion\dotfill \emph{\totalpoints\ points}}
\end{verbatim}
-(you must have used the document class option \verb"addpoints" or
-given the command \verb"\addpoints" in order to use the
+(you must have used the document class option
+\verb"addpoints"\indt{addpoints} or given the command
+\verb"\addpoints"\indc{addpoints} in order to use the
\verb"\totalpoints" command; see section~\ref{sec:addpoints}), then
you can type
\begin{verbatim}
@@ -2085,21 +2339,24 @@ the \verb"\droptotalpoints" command in section~\ref{sec:addup}.
\subsection{Titled questions}
\label{sec:Titled}
-When using a grading table or point table indexed by question number
-(see sections \ref{sec:GradeTables} and~\ref{sec:PointTables}) it's
-possible to replace the question numbers in the table with titles for
-the questions. This is done using the \verb"\titledquestion" command
-(see section~\ref{sec:TitledQues}), and you can then print the title
-in places other than the table using the \verb"\thequestiontitle"
-command (see section~\ref{sec:questiontitle}).
+The \verb"\titledquestion"\indc{titledquestion} command (see
+section~\ref{sec:TitledQues}) allows you to assign a \emph{title} to a
+question, and to have the question title replace the question number
+in a grading table or point table indexed by question number (see
+sections \ref{sec:GradeTables} and~\ref{sec:PointTables}). If you use
+a \verb"\qformat"\indc{qformat} (see section~\ref{sec:qformat}) then
+you can include the question title in the question by using the
+\verb"\thequestiontitle"\indc{thequestiontitle} command (see the
+example in section~\ref{sec:questiontitle}).
+
%--------------------------------------------------------------------
-\subsubsection{\texttt{\char`\\titledquestion}}
+\subsubsection{\texttt{\bs titledquestion}}
\label{sec:TitledQues}
-The command \verb"\titledquestion" is a replacement for
-\verb"\question"; it has one required argument (the title) and one
-optional argument (the point value), as in
+The command \verb"\titledquestion"\indc{titledquestion} is a
+replacement for \verb"\question"\indc{question}; it takes one required
+argument, the title, and one optional argument, the point value, as in
\begin{center}
\verb"\titledquestion{Question \thequestion: Concepts}"
\end{center}
@@ -2110,48 +2367,55 @@ the second question) and doesn't set any point values, or
\end{center}
which sets the question title to ``Design'' and sets the point value
to ``10''. Note that the question title doesn't include the number of
-the question unless you put it there using the \verb"\thequestion"
-command.
-
-Using \verb"\titledquestion" instead of \verb"\question" doesn't
-change the appearance of the question (unless you use
-\verb"\thequestiontitle" in the argument of a \verb"\qformat" command;
-see section~\ref{sec:questiontitle}). The only direct effect of using
+the question unless you put it there using the
+\verb"\thequestion"\indc{thequestion} command.
+
+Using \verb"\titledquestion"\indc{titledquestion} instead of
+\verb"\question" doesn't change the appearance of the question (unless
+you use \verb"\thequestiontitle"\indc{thequestiontitle} in the
+argument of a \verb"\qformat"\indc{qformat} command; see
+section~\ref{sec:questiontitle}). The only direct effect of using
\verb"\titledquestion" instead of \verb"\question" is that if you
-print a grading table indexed by question number (see
+print a grading table or point table indexed by question number (see
section~\ref{sec:GradeTables}), then the title of the question will
replace the number of the question in the table. To have the title of
the question appear in the question itself, see the example in
section~\ref{sec:questiontitle}.
If you create a grading table or point table indexed by question
-number and you create a question using the \verb"\titledquestion"
-command, then the number of the question won't appear in the table
-unless you include \verb"\thequestion" in the title of the question.
+number and you create a question using the
+\verb"\titledquestion"\indc{titledquestion} command, then the number
+of the
+%
+question\index{question number} won't appear in the table unless you
+include \verb"\thequestion"\indc{thequestion} in the title of the
+question.
%--------------------------------------------------------------------
-\subsubsection{\texttt{\char`\\thequestiontitle}}
+\subsubsection{\texttt{\bs thequestiontitle}}
\label{sec:questiontitle}
-The command \verb"\thequestiontitle" expands to
+The command \verb"\thequestiontitle"\indc{thequestiontitle} expands to
\begin{itemize}
\item the title of the question (if the question was defined using a
- \verb"\titledquestion" command) or
-\item the number of the question (if the question was defined using a
- \verb"\question" command).
+ \verb"\titledquestion"\indc{titledquestion} command) or
+\item the number of the
+%
+ question\index{question number} (if the question was defined using a
+ \verb"\question"\indc{question} command).
\end{itemize}
-This is for use in the argument of a \verb"\qformat" command (see
-section~\ref{sec:qformat}), so that you can have the question title
-appear in the question itself, and not just in a grading table or
-point table.
+This is for use in the argument of a \verb"\qformat"\indc{qformat}
+command (see section~\ref{sec:qformat}), so that you can have the
+question title appear in the question itself, and not just in a
+grading table or point table.
-The contents of \verb"\thequestiontitle" don't appear anywhere in the
-question itself unless you do something to make them appear. For
-example, if you give the command
+The contents of \verb"\thequestiontitle"\indc{thequestiontitle} don't
+appear anywhere in the question itself unless you do something to make
+them appear. For example, if you give the command
\begin{center}
\verb"\qformat{Question \thequestion: \thequestiontitle\dotfill\thepoints}"
\end{center}
-and then type
+and then type\indc{titledquestion}
\begin{verbatim}
\begin{questions}
\titledquestion{History of Empirical Aerodynamics}[10]
@@ -2176,10 +2440,14 @@ the question will never appear except in the table.
%--------------------------------------------------------------------
\subsection{Bonus points}
\label{sec:Bonus}
+\index{bonus points|(}
+\index{points!bonus|(}
It's possible to create questions, parts, subparts, or subsubparts
that are worth \emph{bonus points}, instead of regular points. To do
-this, you use the command
+this, you use the
+command\indc{bonusquestion}\indc{bonustitledquestion}%
+\indc{bonuspart}\indc{bonussubpart}\indc{bonussubsubpart}
\begin{center}
\begin{tabular}{l@{\qquad instead of\qquad}l}
\verb"\bonusquestion"& \verb"\question",\\
@@ -2189,28 +2457,59 @@ this, you use the command
\verb"\bonussubsubpart"& \verb"\subsubpart".
\end{tabular}
\end{center}
-If you don't assign any points to these commands then using them is
-equivalent to using the corresponding non-bonus commands. If you do
-assign points, though, then
+There is also a \verb"\bonusqformat"\indc{bonusqformat} command that
+affects the \verb"\bonusquestion"\indc{bonusquestion} command in the
+same way that the \verb"\qformat"\indc{qformat} command affects the
+\verb"\question" command (see section~\ref{sec:qformat}), and a
+\verb"\nobonusqformat"\indc{nobonusqformat} command that cancels the
+effect of \verb"\bonusqformat" in the same way that
+\verb"\noqformat"\indc{noqformat} cancels the effect of
+\verb"\qformat". Note that the command
+\verb"\thepoints"\indc{thepoints} is defined so that it works equally
+well in \verb"\qformat" and \verb"\bonusqformat"\indc{bonusqformat}
+commands (see section~\ref{sec:qformat}).
+
+If \indc{bonusquestion}\indc{bonustitledquestion}%
+\indc{bonuspart}\indc{bonussubpart}\indc{bonussubsubpart}%
+you don't assign any points to a \verb"\bonusquestion",
+\verb"\bonuspart", \verb"\bonussubpart", or \verb"\bonussubsubpart"
+then, aside from the fact that \verb"\bonusqformat" alters
+\verb"\bonusquestion" while \verb"\qformat" alters \verb"\question",
+then they're printed in the same way that they would be printed if you
+had used the corresponding non-bonus command. However, if you assign
+points, then
\begin{itemize}
\item the points are typeset differently (see below),
-\item the points are not counted by the \verb"\gradetable" or
- \verb"\pointtable" commands (see sections \ref{sec:GradeTables}
- and~\ref{sec:PointTables}), though they \emph{are} counted by the
- \verb"\bonusgradetable" and \verb"\bonuspointtable" commands (see
- section~\ref{sec:BonusTables}),
-\item the points are not counted by the \verb"\droptotalpoints"
- command (see section~\ref{sec:addup}), though they are counted by
- the \verb"\droptotalbonuspoints" command (see below),
-\item the points are not counted by the \verb"\pointsofquestion" (see
- section~\ref{sec:pointsofq}) or \verb"\pointsonpage" (see
+\item {\sloppy the points are not counted by the
+ \verb"\gradetable"\indc{gradetable}\indc{pointtable}%
+ \indc{bonusgradetable}\indc{bonuspointtable}%
+ \indc{combinedgradetable}\indc{combinedpointtable}%
+ or \verb"\pointtable" commands (see sections \ref{sec:GradeTables}
+ and~\ref{sec:PointTables}) or their partial variants (see
+ section~\ref{sec:PartialTable}), though they \emph{are} counted by
+ the \verb"\bonusgradetable", \verb"\bonuspointtable",
+ \verb"\combinedgradetable", and \verb"\combinedpointtable"
+ commands and their partial variants (see
+ sections~\ref{sec:BonusTables} and \ref{sec:CombinedTables}),\par}
+\item the points are not counted by the
+ \verb"\droptotalpoints"\indc{droptotalpoints} command (see
+ section~\ref{sec:addup}), though they are counted by the
+ \verb"\droptotalbonuspoints"\indc{droptotalbonuspoints} command (see
+ below),
+\item the points are not counted by the
+ \verb"\pointsofquestion"\indc{pointsofquestion} (see
+ section~\ref{sec:pointsofq}) or
+ \verb"\pointsonpage"\indc{pointsonpage} (see
section~\ref{sec:pointsonp}) commands, though they \emph{are}
- counted by the \verb"\bonuspointsofquestion" and
- \verb"\bonuspointsonpage" (see section~\ref{sec:BonusTables})
- commands, and
-\item the points are not counted by the \verb"\numpoints" command (see
+ counted by the
+ \verb"\bonuspointsofquestion"\indc{bonuspointsofquestion} and
+ \verb"\bonuspointsonpage"\indc{bonuspointsonpage} (see
+ section~\ref{sec:BonusTables}) commands, and
+\item the points are not counted by the
+ \verb"\numpoints"\indc{numpoints} command (see
section~\ref{sec:Count}), though they \emph{are} counted by the
- \verb"\numbonuspoints" command (see section~\ref{sec:Count}).
+ \verb"\numbonuspoints"\indc{numbonuspoints} command (see
+ section~\ref{sec:Count}).
\end{itemize}
The default setup is that if you type
@@ -2228,7 +2527,8 @@ then you'll get
\bonusquestion[2] What color shirt was he wearing?
\end{questions}
-There is also a command \verb"\bonuspointpoints" that is analogous to
+There is also a command
+\verb"\bonuspointpoints"\indc{bonuspointpoints} that is analogous to
\verb"\pointpoints" (see section~\ref{sec:pointname}); the default
setup was created by the command
\begin{center}
@@ -2238,14 +2538,15 @@ and if you give the command
\begin{center}
\verb"\bonuspointpoints{bonus point}{bonus points}"
\end{center}
-then typing the above would produce
+then typing the above would produce\indc{bonuspointpoints}
\begin{questions}
\bonuspointpoints{bonus point}{bonus points}
\question[10] Who discovered America?
\bonusquestion[1] On what day of the week did he do it?
\bonusquestion[2] What color shirt was he wearing?
\end{questions}
-There are also commands
+There are also
+commands\indc{bonuspointname}\indc{marginbonuspointname}
\begin{center}
\begin{tabular}{l}
\verb"\bonuspointname" and\\
@@ -2257,7 +2558,9 @@ There are also commands
\verb"\marginpointname"
\end{tabular}
\end{center}
-(see section~\ref{sec:pointname}), and commands
+(see section~\ref{sec:pointname}), and
+commands\indc{droptotalpoints}\indc{bonustotalformat}%
+\indc{totalbonuspoints}
\begin{center}
\begin{tabular}{l}
\verb"\droptotalbonuspoints",\\
@@ -2273,14 +2576,20 @@ There are also commands
\end{center}
(see section~\ref{sec:addup}).
+\index{points!bonus|)}
+\index{bonus points|)}
+
%--------------------------------------------------------------------
\subsection{Counting the questions and adding up the points}
\label{sec:Count}
+\index{questions!counting|(}
+
The \verb"exam" document class automatically counts the numbers of
questions, parts, and subparts, and makes these numbers available as
-the macros
+the macros\indc{numquestions}\indc{numparts}\indc{numsubparts}%
+\indc{numsubsubparts}
\begin{center}
\begin{tabular}{l}
\verb"\numquestions"\\
@@ -2295,15 +2604,18 @@ than one \verb"questions" environment (for example, if your exam has
several parts, with the questions in each part numbered beginning with
``1''), then \verb"\numquestions" will hold the total number of
questions on the exam. If you do have more than one \verb"questions"
-environment, though, you won't be able to use the \verb"\gradetable"
-or \verb"\pointtable" commands (see section~\ref{sec:Tables}).
-
-If you use the document class option \verb"addpoints" or give the
-command \verb"\addpoints" (see section~\ref{sec:addpoints}), then the
-class will add the total number of points and the total number of
-bonus points (see section~\ref{sec:Bonus}) that you've given to all of
-the questions, parts, subparts, and subsubparts of the exam, and make
-those totals available in the macros
+environment, though, you won't be able to use the
+\verb"\gradetable"\indc{gradetable} or
+\verb"\pointtable"\indc{pointtable} commands (see
+section~\ref{sec:Tables}).
+
+If you use the document class option \verb"addpoints"\indt{addpoints}
+or give the command \verb"\addpoints"\indc{addpoints} (see
+section~\ref{sec:addpoints}), then the class will add the total number
+of points and the total number of bonus points (see
+section~\ref{sec:Bonus}) that you've given to all of the questions,
+parts, subparts, and subsubparts of the exam, and make those totals
+available in the macros\indc{numpoints}\indc{numbonuspoints}
\begin{center}
\begin{tabular}{l}
\verb"\numpoints"\\
@@ -2311,7 +2623,7 @@ those totals available in the macros
\end{tabular}
\end{center}
as well as displaying those totals on the screen when you run \LaTeX{}
-and placing them into the \verb".log" file. You can then type
+and placing them into the \texttt{.log} file. You can then type
\begin{verbatim}
\begin{center}
This exam has \numquestions\ questions, for a total of \numpoints\
@@ -2324,39 +2636,45 @@ and you'll get
points.
\end{center}
-\emph{Warning}: If \verb"addpoints" is in effect, your point values
-for questions, parts, subparts, and subsubparts must not contain
-anything other than digits and the command \verb"\half" (see
+\emph{Warning}: If \verb"addpoints"\indt{addpoints} is in effect, your
+point values for questions, parts, subparts, and subsubparts must not
+contain anything other than digits and the command \verb"\half" (see
section~\ref{sec:Half}). For example, if you \emph{don't} give the
-command \verb"\addpoints", then you can type
+command \verb"\addpoints", then you can
+%
+type\index{points!acceptable entries}
\begin{center}
\verb"\question[10\%]"
\end{center}
with no problems, but this will cause errors if you've given the
-command \verb"\addpoints". The correct way to accomplish what you
-want is to give the command \verb"\marginpointname{\%}" or
-\verb"\pointname{\%}" and then type \verb"\question[10]" (see
-section~\ref{sec:pointname}).
+command \verb"\addpoints"\indc{addpoints}. The correct way to
+accomplish what you want is to give the command
+\verb"\marginpointname{\%}"\indc{marginpointname} or
+\verb"\pointname{\%}"\indc{pointname} and then type
+\verb"\question[10]" (see section~\ref{sec:pointname}).
If you want to temporarily turn off the adding of points (for example,
if you list both the total points for each question and the points for
each part, but you don't want to count the points twice), you can give
-the command
+the command\indc{noaddpoints}
\begin{center}
\verb"\noaddpoints"
\end{center}
to turn off the adding of points and the command \verb"\addpoints" to
turn it back on.
-If \verb"addpoints" is in effect, then you can create grading tables
-(see section~\ref{sec:GradeTables}) and point tables (see
-section~\ref{sec:PointTables}) and use the commands
+If \verb"addpoints"\indc{addpoints} is in effect, then you can create
+grading tables (see section~\ref{sec:GradeTables}) and point tables
+(see section~\ref{sec:PointTables}) and use the commands
\verb"\pointsofquestion" (see section~\ref{sec:pointsofq}) and
\verb"\pointsonpage" (see section~\ref{sec:pointsonp}).
+\index{questions!counting|)}
+
%---------------------------------------------------------------------
\subsection{Referring to specific questions by number (cross
references)}
+\index{cross references|(}
You can use the standard \LaTeX{} commands \verb"\label" and
\verb"\ref" to refer to questions (or parts, or subparts, or
@@ -2424,10 +2742,13 @@ As with all other cross references in \LaTeX, you'll have to run your
file through \LaTeX{} \emph{twice} to be sure that all the cross
references are correct.
+\index{cross references|)}
%--------------------------------------------------------------------
\subsection{Customizing the numbers}
\label{sec:CustNumb}
+\index{customization!question numbers|(}
+
The default setup is that:
\begin{questions}
@@ -2453,7 +2774,9 @@ All of this can be changed.
\bigskip
-To change the type of numbering, you would redefine the commands
+To change the type of numbering, you would redefine the
+commands\indc{thequestion}\indc{thepartno}\indc{thesubpart}%
+\indc{thesubsubpart}\indc{thechoice}
\begin{center}
\begin{tabular}{l}
\verb"\thequestion"\\
@@ -2466,7 +2789,9 @@ To change the type of numbering, you would redefine the commands
(Note: The second one listed there is \verb"\thepartno", \emph{not}
\verb"\thepart". The command \verb"\thepart" refers to the counter
used in the article document class standard sectioning command
-\verb"\part".) The numbering commands available are
+\verb"\part".) The numbering commands available
+are\indc{arabic}\indc{alph}\indc{Alph}\indc{roman}%
+\indc{Roman}\indc{greeknum}
\begin{center}
\begin{tabular}{ll}
\verb"\arabic"& Regular arabic integers\\
@@ -2477,18 +2802,23 @@ used in the article document class standard sectioning command
\verb"\greeknum"& Greek letters
\end{tabular}
\end{center}
-and any of these can be applied to the counters \verb"question",
-\verb"partno", \verb"subpart", \verb"subsubpart", and \verb"choice".
-(The \verb"\greeknum" command is defined by the exam document class,
-but all of the others are standard \LaTeX{} commands.)
+and any of these can be applied to the
+counters\index{question counter}\index{part counter}%
+\index{subpart counter}\index{subsubpart counter}%
+\index{choice counter}%
+\verb"question"\indt{question}, \verb"partno"\indt{partno},
+\verb"subpart"\indt{subpart}, \verb"subsubpart"\indt{subsubpart}, and
+\verb"choice"\indt{choice}. (The \verb"\greeknum"\indc{greeknum}
+command is defined by the exam document class, but all of the others
+are standard \LaTeX{} commands.)
For example, to have questions numbered using upper case roman numbers
and parts numbered using upper case letters, you would give the
-commands
+commands\indc{thequestion}\indc{thepartno}
\begin{center}
\begin{tabular}{l}
- \verb"\renewcommand\thequestion{\Roman{question}}"\\
- \verb"\renewcommand\thepartno{\Alph{partno}}"
+ \verb"\renewcommand{\thequestion}{\Roman{question}}"\\
+ \verb"\renewcommand{\thepartno}{\Alph{partno}}"
\end{tabular}
\end{center}
@@ -2496,7 +2826,9 @@ commands
The ``decorations'' around the numbers (i.e., the periods, or
-parentheses, or \ldots) are determined by the commands
+parentheses, or \ldots) are determined by the
+commands\indc{questionlabel}\indc{partlabel}\indc{subpartlabel}%
+\indc{subsubpartlabel}\indc{choicelabel}
\begin{center}
\begin{tabular}{l}
\verb"\questionlabel"\\
@@ -2509,86 +2841,650 @@ parentheses, or \ldots) are determined by the commands
the default definitions of which are:
\begin{center}
\begin{tabular}{l}
- \verb"\newcommand\questionlabel{\thequestion.}"\\
- \verb"\newcommand\partlabel{(\thepartno)}"\\
- \verb"\newcommand\subpartlabel{\thesubpart.}"\\
- \verb"\newcommand\subsubpartlabel{\thesubsubpart)}"\\
- \verb"\newcommand\choicelabel{\thechoice.}"
+ \verb"\newcommand{\questionlabel}{\thequestion.}"\\
+ \verb"\newcommand{\partlabel}{(\thepartno)}"\\
+ \verb"\newcommand{\subpartlabel}{\thesubpart.}"\\
+ \verb"\newcommand{\subsubpartlabel}{\thesubsubpart)}"\\
+ \verb"\newcommand{\choicelabel}{\thechoice.}"
\end{tabular}
\end{center}
You can change any of these by giving \verb"\renewcommand" commands to
-redefine them.
+redefine them. This can, of course, be used to change the
+``decorations'' around the numbers, but there are other uses as well.
+For example, if you use the Fourier project's Utopia
+font\index{Utopia~font} by including the commands
+\begin{center}
+ \begin{tabular}{l}
+ \verb"\usepackage[T1]{fontenc}"\\
+ \verb"\usepackage{fourier}"
+ \end{tabular}
+\end{center}
+after your \verb"\documentclass" command, then you'll see that the
+kerning\index{kerning} makes ``\verb"F."" look so much like
+``\verb"E"" that a student could confuse the two. You can turn off
+the kerning with the command
+\verb"\renewcommand{\choicelabel}{\thechoice{}.}"\indc{choicelabel}.
+
+\index{customization!question numbers|)}
+
%--------------------------------------------------------------------
\subsection{Customizing the list parameters}
\label{sec:CustList}
-
-Each of the environments \verb"questions", \verb"parts",
-\verb"subparts", \verb"subsubparts", and \verb"choices" is implemented
-as a \verb"list" environment. This section describes commands for
-advanced users who want to customize the list parameters
-(\verb"\topsep", \verb"\partopsep", \verb"\itemsep", \verb"\parsep",
-etc.) for the lists that those environments create.
-
-The \verb"exam" document class includes the expansion of
+\index{list environment|(}
+\index{environment!list|(}
+\index{customization!list parameters|(}
+
+The environments \texttt{questions}, \texttt{parts},
+\texttt{subparts}, \texttt{subsubparts}, \texttt{choices}, and
+\texttt{checkboxes} are all implemented as \LaTeX{} \texttt{list}
+environments. This section describes commands for advanced users who
+want to customize the list parameters (\verb"\topsep"\indc{topsep},
+\verb"\partopsep"\indc{partopsep}, \verb"\itemsep"\indc{itemsep},
+\verb"\parsep"\indc{parsep}, etc.) for the lists that those
+environments create.
+
+The \verb"exam" document class includes the expansion
+of\indc{questionshook}\indc{partshook}\indc{subpartshook}%
+\indc{subsubpartshook}\indc{choiceshook}\indc{checkboxeshook}
\begin{center}
\begin{tabular}{l@{\qquad when creating a\qquad}l@{\qquad}l}
\verb"\questionshook"&\verb"questions"&environment,\\
\verb"\partshook"&\verb"parts"&environment,\\
\verb"\subpartshook"&\verb"subparts"&environment,\\
- \verb"\subsubpartshook"&\verb"subsubparts"&environment, and\\
- \verb"\choiceshook"&\verb"choices"&environment.
+ \verb"\subsubpartshook"&\verb"subsubparts"&environment,\\
+ \verb"\choiceshook"&\verb"choices"&environment, and\\
+ \verb"\checkboxeshook"&\verb"checkboxes"&environment.
\end{tabular}
\end{center}
The \verb"exam" document class defines these as follows:
\begin{center}
\begin{tabular}{ll}
- \verb"\newcommand\questionshook{}"\\
- \verb"\newcommand\partshook{}"\\
- \verb"\newcommand\subpartshook{}"\\
- \verb"\newcommand\subsubpartshook{}"\\
- \verb"\newcommand\choiceshook{}"
+ \verb"\newcommand{\questionshook}{}"\\
+ \verb"\newcommand{\partshook}{}"\\
+ \verb"\newcommand{\subpartshook}{}"\\
+ \verb"\newcommand{\subsubpartshook}{}"\\
+ \verb"\newcommand{\choiceshook}{}"\\
+ \verb"\newcommand{\checkboxeshook}{}"
\end{tabular}
\end{center}
-Thus, by default, these commands have no effect, but you can change
-any of them with a \verb"\renewcommand" command. Thus, if you
+Thus, the default is that these commands have no effect, but you can
+change any of them with a \verb"\renewcommand" command. Thus, if you
redefine, e.g., \verb"\questionshook" to expand to commands that set
values for some of the list parameters, then those values will be used
in the \verb"questions" environment.
-For example, if you give the command
+For example, if you give the command\indc{questionshook}
\begin{center}
- \verb"\renewcommand\questionshook{\setlength{\itemsep}{1in}}"
+ \verb"\renewcommand{\questionshook}{\setlength{\itemsep}{1in}}"
\end{center}
then there will be an additional one inch of blank space inserted
between questions (since the questions are the items in a
\verb"questions" environment). For another example, if you give the
-command
+command\indc{partshook}
\begin{center}
- \verb"\renewcommand\partshook{\setlength{\topsep}{0.5in}}"
+ \verb"\renewcommand{\partshook}{\setlength{\topsep}{0.5in}}"
\end{center}
then each parts environment will have an additional one half inch of
space before and after the environment.
+For another example, if you're using a \verb"\qformat"\indc{qformat}
+(see section~\ref{sec:qformat}) (and, if there are any bonus
+questions, also a \verb"\bonusqformat"\indc{bonusqformat}; see
+section~\ref{sec:Bonus}), so that there are no labels on any of the
+questions, and you'd like to remove the indentation of the questions,
+give the
+command\index{indentation!remove}\indc{leftmargin}\indc{labelsep}
+\begin{verbatim}
+\renewcommand{\questionshook}{%
+ \setlength{\leftmargin}{0pt}%
+ \setlength{\labelwidth}{-\labelsep}%
+}
+\end{verbatim}
+
+\index{customization!list parameters|)}
+\index{environment!list|)}
+\index{list environment|)}
+
+%--------------------------------------------------------------------
+%--------------------------------------------------------------------
+\section{Multiple choice questions}
+\label{sec:MulChc}
+\index{multiple choice}
+
+There are four environments for listing the possible answers to a
+multiple choice question: two of them label the choices, and the other
+two print checkboxes in front of the choices for the student to place
+checks next to the chosen answers.
+\begin{itemize}
+\item The first two environments use upper case letters (i.e., ``A'',
+ ``B'', ``C'', \ldots) to label the choices. (To change the
+ appearance of the labels, see section~\ref{sec:CustNumb}.)
+ \begin{itemize}
+ \item The \verb"choices"\indt{choices}\index{choices environment}%
+ \index{environment!choices} environment creates a list environment
+ with the choices as the items in the list (see
+ section~\ref{sec:choices}).
+ \item The \verb"oneparchoices"\indt{oneparchoices}%
+ \index{oneparchoices environment}%
+ \index{environment!oneparchoices} environment lists all of the
+ choices in a single paragraph which is a continuation of the
+ paragraph preceding the environment unless you leave a blank line
+ before beginning the environment (see
+ section~\ref{sec:oneparchoices}).
+ \end{itemize}
+ If you don't want the students to just circle the correct choices,
+ you can use the \verb"\answerline"\indc{answerline} command to print
+ a line on which the answer should be written (see
+ section~\ref{sec:ShortAns}). The
+ \verb"\anwerline"\indcsub{answerline}{optional~argument}
+ command allows you to include as an optional argument the answer to
+ the question, and the answer will be printed on the line when
+ solutions are bing printed (see section~\ref{sec:AnsShortAns}).
+\item The last two environments print checkboxes in front of the
+ choices for the students to use to place checks next to the chosen
+ answers.
+ \begin{itemize}
+ \item The \verb"checkboxes"\indt{checkboxes}%
+ \index{checkboxes environment}%
+ \index{environment!checkboxes} environment creates a list
+ environment with the choices as the items in the list (see
+ section~\ref{sec:checkboxes}).
+ \item The \verb"oneparcheckboxes"\indt{oneparcheckboxes}%
+ \index{oneparcheckboxes environment}%
+ \index{environment!oneparcheckboxes} environment lists all of the
+ choices in a single paragraph which is a continuation of the
+ paragraph preceding the environment unless you leave a blank line
+ before beginning the environment (see
+ section~\ref{sec:oneparcheckboxes}).
+ \end{itemize}
+\end{itemize}
+All of those environments allow you to designate one or more choices
+as correct choices and to have the correct choices printed with
+emphasis when solutions are being printed (see
+section~\ref{sec:CorrectChoice}).
+
+%--------------------------------------------------------------------
+\subsection{The \texttt{choices} environment}
+\label{sec:choices}
+\indt{choices}
+\indc{choice}
+\index{choices environment}
+\index{environment!choices}
+
+For example, if you type
+\begin{verbatim}
+\begin{questions}
+\question
+One of these things is not like the others; one of these things is not
+the same. Which one is different?
+\begin{choices}
+\choice John
+\choice Paul
+
+\choice
+
+George
+
+\choice Ringo
+
+\choice Socrates
+
+\end{choices}
+
+\end{questions}
+\end{verbatim}
+Then you'll get
+\begin{questions}
+\question
+One of these things is not like the others; one of these things is not
+the same. Which one is different?
+\begin{choices}
+\choice John
+\choice Paul
+
+\choice
+
+George
+
+\choice Ringo
+
+\choice Socrates
+
+\end{choices}
+
+\end{questions}
+As that example illustrates, you can leave blank lines between the
+\verb"\choice" command and the text of the choice, or between the
+various choices, and those blank lines will be ignored.
+
+%--------------------------------------------------------------------
+\subsection{The \texttt{oneparchoices} environment}
+\label{sec:oneparchoices}
+\indt{oneparchoices}
+\indc{choice}
+\index{oneparchoices environment}
+\index{environment!oneparchoices}
+
+If you use a \verb"oneparchoices" environment instead of the
+\verb"choices" environment in the example of
+section~\ref{sec:choices}, then you'll get
+\begin{questions}
+\question
+One of these things is not like the others; one of these things is not
+the same. Which one is different?
+\begin{oneparchoices}
+\choice John
+\choice Paul
+
+\choice
+
+George
+
+\choice Ringo
+
+\choice Socrates
+
+\end{oneparchoices}
+
+\end{questions}
+
+If you insert a blank line before the \verb"\begin{oneparchoices}",
+ then you'll get
+\begin{questions}
+\question
+One of these things is not like the others; one of these things is not
+the same. Which one is different?
+
+\begin{oneparchoices}
+\choice John
+\choice Paul
+
+\choice
+
+George
+
+\choice Ringo
+
+\choice Socrates
+
+\end{oneparchoices}
+
+\end{questions}
+
+
+If you insert a blank line before the \verb"\begin{oneparchoices}" and
+ \verb"\answerline" after the \verb"\end{oneparchoices}" (see
+section~\ref{sec:ShortAns} for a description of the
+\verb"\answerline"\indc{answerline} command), then you'll get
+\begin{questions}
+\question
+One of these things is not like the others; one of these things is not
+the same. Which one is different?
+
+\begin{oneparchoices}
+\choice John
+\choice Paul
+
+\choice
+
+George
+
+\choice Ringo
+
+\choice Socrates
+
+\end{oneparchoices}
+\answerline
+
+\end{questions}
+
+%--------------------------------------------------------------------
+\subsection{The \texttt{checkboxes} environment}
+\label{sec:checkboxes}
+\indt{checkboxes}
+\indc{choice}
+\index{checkboxes environment}
+\index{environment!checkboxes}
+
+If you use a \texttt{checkboxes} environment instead of the
+\texttt{choices} environment in the example of
+section~\ref{sec:choices}, then you'll get
+\begin{questions}
+\question
+One of these things is not like the others; one of these things is not
+the same. Which one is different?
+\begin{checkboxes}
+\choice John
+\choice Paul
+
+\choice
+
+George
+
+\choice Ringo
+
+\choice Socrates
+
+\end{checkboxes}
+
+\end{questions}
+The appearance of the checkbox can be customized (see
+section~\ref{sec:MulChceCust}).
+
+
+%--------------------------------------------------------------------
+\subsection{The \texttt{oneparcheckboxes} environment}
+\label{sec:oneparcheckboxes}
+\indt{oneparcheckboxes}
+\indc{choice}
+\index{oneparcheckboxes environment}
+\index{environment!oneparcheckboxes}
+
+If you use a \verb"oneparcheckboxes" environment instead of the
+\verb"choices" environment in the example of
+section~\ref{sec:choices}, then you'll get
+\begin{questions}
+\question
+One of these things is not like the others; one of these things is not
+the same. Which one is different?
+\begin{oneparcheckboxes}
+\choice John
+\choice Paul
+
+\choice
+
+George
+
+\choice Ringo
+
+\choice Socrates
+
+\end{oneparcheckboxes}
+
+\end{questions}
+
+If you insert a blank line before the \verb"\begin{oneparcheckboxes}",
+ then you'll get
+\begin{questions}
+\question
+One of these things is not like the others; one of these things is not
+the same. Which one is different?
+
+\begin{oneparcheckboxes}
+\choice John
+\choice Paul
+
+\choice
+
+George
+
+\choice Ringo
+
+\choice Socrates
+
+\end{oneparcheckboxes}
+
+\end{questions}
+The appearance of the checkbox can be customized (see
+section~\ref{sec:MulChceCust}).
+
+
+
+%--------------------------------------------------------------------
+\subsection{Solutions to multiple choice questions}
+\label{sec:CorrectChoice}
+\index{solutions}
+\index{choices environment!correct choice}
+\index{environment!choices!correct choice}
+\index{oneparchoices environment!correct choice}
+\index{environment!oneparchoices!correct choice}
+\index{checkboxes environment!correct choice}
+\index{environment!checkboxes!correct choice}
+\index{oneparcheckboxes environment!correct choice}
+\index{environment!oneparcheckboxes!correct choice}
+
+
+The \verb"exam" document class defines several environments for
+solutions (see section~\ref{sec:solutions}), the contents of which
+will be printed only if you use the document class option
+\verb"answers"\indt{answers} (as in
+\verb"\documentclass[answers]{exam}") or give the command
+\verb"\printanswers"\indc{printanswers} (see
+section~\ref{sec:answers}). Each of the environments for multiple
+choice questions (see
+sections~\ref{sec:choices}--\ref{sec:oneparcheckboxes}) allows you to
+designate one or more of the choices as \emph{correct choices}, and to
+have the correct choices printed with emphasis when solutions are
+being printed.
+
+The command to define a correct choice is
+\verb"\CorrectChoice"\indc{CorrectChoice}, which is used in place of
+the command \verb"\choice"\indc{choice}. (To avoid confusion,
+\verb"\correctchoice"\indc{correctchoice} is defined to be a synonym
+for \verb"\CorrectChoice".) When solutions are not being printed,
+\verb"\CorrectChoice" is equivalent to \verb"\choice". When solutions
+are being printed, though, any choices that were created with
+\verb"\CorrectChoice" (rather than with \verb"\choice") will be
+printed in bold. (This can be changed; see
+section~\ref{sec:MulChceCust}.) In addition, in the
+\texttt{checkboxes}\indt{checkboxes} and
+\texttt{oneparcheckboxes}\indt{oneparcheckboxes} environments, each
+correct choice will have its checkbox replaced by a check.
+
+For example, if \verb"\printanswers"\indc{printanswers} is in effect
+and you type\indc{CorrectChoice}
+\begin{verbatim}
+\begin{questions}
+ \question One of these things is not like the others; one of these
+ things is not the same. Which one is different?
+ \begin{oneparchoices}
+ \choice John
+ \choice Paul
+ \choice George
+ \choice Ringo
+ \CorrectChoice Socrates
+ \end{oneparchoices}
+\end{questions}
+\end{verbatim}
+then you'll get
+\printanswers
+\begin{questions}
+ \question One of these things is not like the others; one of these
+ things is not the same. Which one is different?
+ \begin{oneparchoices}
+ \choice John
+ \choice Paul
+ \choice George
+ \choice Ringo
+ \CorrectChoice Socrates
+ \end{oneparchoices}
+\end{questions}
+\noprintanswers
+%
+If you use a \texttt{oneparcheckboxes}\indt{oneparcheckboxes}
+environment instead of the \texttt{oneparchoices}\indt{oneparchoices}
+environment in that example, then you'll get\indc{printanswers}
+%
+\printanswers
+\begin{questions}
+ \question One of these things is not like the others; one of these
+ things is not the same. Which one is different?
+ \begin{oneparcheckboxes}
+ \choice John
+ \choice Paul
+ \choice George
+ \choice Ringo
+ \CorrectChoice Socrates
+ \end{oneparcheckboxes}
+\end{questions}
+\noprintanswers
+
+%--------------------------------------------------------------------
+\subsection{Customizations}
+\label{sec:MulChceCust}
+\index{customization!multiple choice questions|(}
+
+When solutions are being printed, the correct choices in any of the
+environments \texttt{choices}\indt{choices},
+\texttt{oneparchoices}\indt{oneparchoices},
+\texttt{checkboxes}\indt{checkboxes}, and
+\texttt{oneparcheckboxes}\indt{oneparcheckboxes} will be printed
+subject to the declarations in the argument of the most
+recent\indc{CorrectChoiceEmphasis}
+\begin{center}
+ \verb"\CorrectChoiceEmphasis"
+\end{center}
+command. The default situation is created by the command
+\begin{center}
+ \verb"\CorrectChoiceEmphasis{\bfseries}"
+\end{center}
+and so when solutions are being printed the correct choices are
+printed in boldface by default. You can change this, for example, by
+giving the command
+\begin{center}
+ \verb"\CorrectChoiceEmphasis{\itshape}"
+\end{center}
+which would cause correct choices to be printed in italics when
+solutions are being printed.
+
+For another example, if you give the command
+\verb"\usepackage{color}"\indt{color} in the preamble\index{preamble}
+of your document (i.e., after the \verb"\documentclass" command and
+before the \verb"\begin{document}"), and then give the
+ command\indc{CorrectChoiceEmphasis}\indc{color}
+\begin{center}
+ \verb"\CorrectChoiceEmphasis{\color{red}}"
+\end{center}
+then when solutions are being printed the correct choices will be
+printed in red (assuming your printer can produce that color).
+For another example, if you give the command
+\verb"\usepackage{color}"\indt{color} in the preamble of your document
+(i.e., after the \verb"\documentclass" command and before the
+\verb"\begin{document}" command) and then give the command\indc{color}
+\begin{center}
+ \verb"\CorrectChoiceEmphasis{\color{red}\bfseries}"
+\end{center}
+then the correct choices will be printed in boldface red (again
+assuming that your printer can produce that color).
+
+{\sloppy To avoid confusion,
+ \verb"\correctchoiceemphasis"\indc{correctchoiceemphasis} is defined
+ to be a synonym for
+ \verb"\CorrectChoiceEmphasis"\indc{CorrectChoiceEmphasis}.\par}
+
+\bigskip
+
+The \texttt{checkboxes}\indt{checkboxes} and
+\texttt{oneparcheckboxes}\indt{oneparcheckboxes} environments also
+allow customization of the characters used for checkboxes and checks:
+\begin{itemize}
+\item The checkbox\index{checkbox} that is printed in the
+ \texttt{checkboxes} and \texttt{oneparcheckboxes} environments is
+ the argument of the most recent
+ \verb"\checkboxchar"\indc{checkboxchar} command. The default is
+ created by the command
+ \begin{center}
+ \verb"\checkboxchar{$\bigcirc$}"
+ \end{center}
+ For example, if you give the command
+ \verb"\usepackage{amssymb}"\indt{amssymb} in the
+ preamble\index{preamble} of your document (i.e., after the
+ \verb"\documentclass" command and before the
+ \verb"\begin{document}"), then the command\indc{Box}
+ \begin{center}
+ \verb"\checkboxchar{$\Box$}"
+ \end{center}
+ will cause squares to be printed instead of circles.
+
+ \item The check that is printed for correct choices in the
+ \texttt{checkboxes}\indt{checkboxes} and
+ \texttt{oneparcheckboxes}\indt{oneparcheckboxes} environments
+ when solutions are being printed is the argument of the most
+ recent \verb"\checkedchar"\indc{checkedchar} command. The
+ default is created by the command\indc{surd}
+ \begin{center}
+ \verb"\checkedchar{$\surd$}"
+ \end{center}
+\end{itemize}
+
+For example, if you've given the command
+\verb"\usepackage{amssymb}"\indt{amssymb} in the
+preamble\index{preamble} of your document (i.e., after the
+\verb"\documentclass" command and before the \verb"\begin{document}"),
+ then the commands\indc{Box}\indc{blacksquare}
+\begin{center}
+ \begin{tabular}{l}
+ \verb"\checkboxchar{$\Box$}"\\
+ \verb"\checkedchar{$\blacksquare$}"
+ \end{tabular}
+\end{center}
+will cause the example in section~\ref{sec:CorrectChoice} to appear as
+%
+\printanswers
+\checkboxchar{$\Box$}
+\checkedchar{$\blacksquare$}
+\begin{questions}
+ \question One of these things is not like the others; one of
+ these things is not the same. Which one is different?
+ \begin{oneparcheckboxes}
+ \choice John
+ \choice Paul
+ \choice George
+ \choice Ringo
+ \CorrectChoice Socrates
+ \end{oneparcheckboxes}
+\end{questions}
+\noprintanswers
+
+\index{customization!multiple choice questions|)}
%--------------------------------------------------------------------
%--------------------------------------------------------------------
-\section{Escaping the indentation: \texttt{\char`\\uplevel} and
- \texttt{\char`\\fullwidth}}
+\section{Escaping the indentation: \texttt{\bs uplevel} and \texttt{\bs fullwidth}}
\label{sec:uplevel}
+\index{indentation|(}
There are two commands provided for printing text with a left margin
-smaller than the one currently in effect: \verb"\uplevel" and
-\verb"\fullwidth". Each of these commands takes one argument and
-typesets the argument with an altered left margin. The main uses for
-these commands are including instructions for a group of questions
-(see section~\ref{sec:Instructions}) and naming the parts of a long
-exam (see section~\ref{sec:Naming}), but you can use them however you
-like.
+smaller than the one currently in effect:
+\verb"\uplevel"\indc{uplevel} and \verb"\fullwidth"\indc{fullwidth}.
+Each of these commands takes one argument and typesets the argument
+with an altered left margin.
+
+The \verb"\fullwidth" command prints its argument using the full width
+of the printed region, temporarily canceling the indentation created
+by the \texttt{questions} environment (and the \texttt{parts},
+\texttt{subparts}, and \texttt{subsubparts} environments, if you're
+inside any of those). The \verb"\uplevel" command prints its argument
+using the indentation in effect before you entered the current
+innermost environment.
+
+There are also two environments,
+\texttt{EnvUplevel}\indt{EnvUplevel}\index{environment!EnvUplevel}%
+\index{EnvUplevel environment} and
+\texttt{EnvFullwidth}\indt{EnvFullwidth}\index{environment!EnvFullwidth}%
+\index{EnvFullwidth environment}. The \texttt{EnvUplevel} environment
+is similar to the \verb"\uplevel" command and the
+\texttt{EnvFullwidth} environment is similar to the \verb"\fullwidth"
+command. The environments have the advantage that you can have
+verbatim material inside of the environment, while there cannot be any
+verbatim material in the argument of \verb"\uplevel" or
+\verb"\fullwidth".
+
+The main uses for these commands are including instructions for a
+group of questions (see section~\ref{sec:Instructions}) and naming the
+parts of a long exam (see section~\ref{sec:Naming}), but you can use
+them however you like.
%--------------------------------------------------------------------
\subsection{Including instructions for a group of questions}
\label{sec:Instructions}
+\index{instructions|(}
+\indcstart{uplevel}
+\indtstart{EnvUplevel}
+\index{EnvUplevel environment|(}
+\index{environment!EnvUplevel|(}
+
If you are inside of a parts environment and you want to give
directions for the next few parts, then those directions should be
@@ -2635,6 +3531,17 @@ then you'll get
\end{parts}
\end{questions}
+You can accomplish exactly the same thing by replacing
+\begin{verbatim}
+ \uplevel{The following two parts should be answered in classical
+ Greek:}
+\end{verbatim}
+by
+\begin{verbatim}
+ \begin{uplevel}
+ The following two parts should be answered in classical Greek:
+ \end{uplevel}
+\end{verbatim}
If you want to give instructions for a group of questions, then the
indenting for those instructions should be to the outer left margin,
@@ -2680,7 +3587,27 @@ you'll get
\label{exact-end}
$\displaystyle \int_0^{\frac{\pi}{2}} \sin^3 x \cos x \, dx$
\end{questions}
-
+You can accomplish exactly the same thing by replacing
+\begin{verbatim}
+ \uplevel{Questions \ref{exact-start} through~\ref{exact-end} should
+ be evaluated completely, not just approximated.}
+\end{verbatim}
+by
+\begin{verbatim}
+ \begin{EnvUplevel}
+ Questions \ref{exact-start} through~\ref{exact-end} should be
+ evaluated completely, not just approximated.
+ \end{EnvUplevel}
+\end{verbatim}
+\indcstop{uplevel}
+\indtstop{EnvUplevel}
+\index{EnvUplevel environment|)}
+\index{environment!EnvUplevel|)}
+
+\indcstart{fullwidth}
+\indtstart{EnvFullwidth}
+\index{EnvFullwidth environment|(}
+\index{environment!EnvFullwidth|(}
If you want to give instructions that use the full width of the page
(rather than just going up one level of indentation), then use the
\verb"\fullwidth" command. For example, if you type
@@ -2737,22 +3664,52 @@ then you'll get
\end{subparts}
\end{parts}
\end{questions}
+You can accomplish exactly the same thing by replacing
+\begin{verbatim}
+ \fullwidth{When you finish this exam, you should go back and
+ reexamine your work, both on this exam and in your life up
+ until the day of this exam, for any errors that you may have
+ made.}
+\end{verbatim}
+by
+\begin{verbatim}
+ \begin{EnvFullwidth}
+ When you finish this exam, you should go back and
+ reexamine your work, both on this exam and in your life up
+ until the day of this exam, for any errors that you may have
+ made.
+ \end{EnvFullwidth}
+\end{verbatim}
+\indcstop{fullwidth}
+\indtstop{EnvFullwidth}
+\index{EnvFullwidth environment|)}
+\index{environment!EnvFullwidth|)}
+
+\index{instructions|)}
%---------------------------------------------------------------------
\subsection{Naming the parts of a long exam}
\label{sec:Naming}
+\index{naming parts of the exam|(}
There are two ways of naming the parts of a long exam. The first way
-uses the \verb"\fullwidth" and \verb"\uplevel" commands (see
+uses the \verb"\fullwidth"\indc{fullwidth} and
+\verb"\uplevel"\indc{uplevel} commands (see
section~\ref{sec:Namefullwidth}), and the other way uses the standard
-\verb"\part" and \verb"\section" commands (see
+%
+\verb"\part"\indcsub{part}{standard sectioning command}
+%
+and \verb"\section"\indc{section} commands (see
section~\ref{sec:NameSection}).
-
%--------------------------------------------------------------------
-\subsubsection{Using \texttt{\char`\\uplevel} and
- \texttt{\char`\\fullwidth}}
+\subsubsection{Using \texttt{\bs uplevel} and \texttt{\bs fullwidth}}
\label{sec:Namefullwidth}
+\indcstart{uplevel}
+\indcstart{fullwidth}
+\indtstart{EnvFullwidth}
+\index{EnvFullwidth environment|(}
+\index{environment!EnvFullwidth|(}
To place a section name in the exam, just use a \verb"\fullwidth"
command (see section~\ref{sec:uplevel}) and include whatever font
@@ -2796,6 +3753,33 @@ then you'll get
Remove your appendix. Do not suture until your work has been
inspected.
\end{questions}
+You can accomplish exactly the same thing by replacing
+\begin{verbatim}
+ \fullwidth{\Large \textbf{Essay questions}}
+\end{verbatim}
+by
+\begin{verbatim}
+ \begin{EnvFullwidth}
+ \Large \textbf{Essay questions}
+ \end{EnvFullwidth}
+\end{verbatim}
+and replacing
+\begin{verbatim}
+ \fullwidth{\Large \textbf{Laboratory questions}}
+\end{verbatim}
+by
+\begin{verbatim}
+ \begin{EnvFullwidth}
+ \Large \textbf{Laboratory questions}
+ \end{EnvFullwidth}
+\end{verbatim}
+
+
+\indcstop{fullwidth}
+\indtstop{EnvFullwidth}
+\index{EnvFullwidth environment|)}
+\index{environment!EnvFullwidth|)}
+\indcstop{uplevel}
%--------------------------------------------------------------------
\subsubsection{Using the standard sectioning commands}
@@ -2804,12 +3788,16 @@ then you'll get
The exam document class is built upon the standard article document
class, and so the sectioning commands used with the article document
class can be used here as well. In particular, you can give the
-commands \verb"\part", \verb"\part*", \verb"\section", and
-\verb"\section*". The definitions made in \verb"exam.cls" ensure that
-if a \verb"\part" command appears \emph{outside of a parts
- environment} it will be interpreted as a sectioning command, while
-if it appears \emph{inside of a parts environment} it will be
-interpreted as beginning a new part of a question.
+commands \verb"\part",
+%
+\verb"\part"\indcsub{part}{standard sectioning command}
+%
+\verb"\part*", \verb"\section"\indc{section}, and \verb"\section*".
+The definitions made in \verb"exam.cls" ensure that if a \verb"\part"
+command appears \emph{outside of a parts environment} it will be
+interpreted as a sectioning command, while if it appears \emph{inside
+ of a parts environment} it will be interpreted as beginning a new
+part of a question.
You can give these commands in the middle of a questions environment
so as not to interrupt the numbering of the questions, or you can end
@@ -2817,64 +3805,197 @@ a questions environment, give a sectioning command, and then start a
new questions environment (which would reset the question counter to
start again with number~1). If you have more than one questions
environment, though, then you will be unable to use any of the
-commands that create grading tables or point tables (see
-section~\ref{sec:Tables}) or the commands that change the headers and
-footers depending on whether or not a question spans multiple pages
-(see section~\ref{sec:QuesSpan}).
+commands that create grading\indc{gradetable} tables or
+point\indc{pointtable} tables (see section~\ref{sec:Tables}) or the
+commands that change the headers and footers depending on whether or
+not a question spans multiple pages (see
+section~\ref{sec:QuesSpan}).\indc{ifincomplete}\indc{ifcontinuation}
If you give any of these commands while inside of a questions
environment, then the section titles will be indented to the same
extent that questions are indented unless they are given as the
-argument of a \verb"\fullwidth" or \verb"\uplevel" command. These
-commands have the advantage, however, that the unstarred versions
-provide automatic numbering of the parts or sections.
+argument of a \verb"\fullwidth"\indc{fullwidth} or
+\verb"\uplevel"\indc{uplevel} command. These commands have the
+advantage, however, that the unstarred versions provide automatic
+numbering of the parts or sections.
+
+
+\index{naming parts of the exam|)}
+\index{indentation|)}
%--------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Leaving space for the answers}
\label{sec:LeaveSpace}
+\index{space!for answers|(}
+\index{answer space|(}
-There are three different kinds of space that you can create:
+There are four different kinds of space that you can create:
\begin{itemize}
\item Blank space (see section~\ref{sec:BlankSpace}),
+\item an empty box (see section~\ref{sec:EmptyBox}),
\item space filled with lines (see section~\ref{sec:FillLines}), and
\item space filled with dotted lines (see
section~\ref{sec:FillDotLines}).
\end{itemize}
-If you type solutions using a \verb"solution", \verb"solutionorlines",
-or \verb"solutionordottedlines" environment (see
-section~\ref{sec:solutions}), then you can arrange for space to be
-created only when the solutions are not being printed; see
-section~\ref{sec:SolSpace}.
-
You can also create answer lines for short answer questions (see
section~\ref{sec:ShortAns}).
+In section~\ref{sec:solutions} we describe four environments for
+typing solutions to questions:
+\begin{itemize}
+\item \texttt{solution},
+\item \texttt{solutionorbox},
+\item \texttt{solutionorlines}, and
+\item \texttt{solutionordottedlines}.
+\end{itemize}
+Each of those environments can take an optional argument specifying an
+amount of space to be created when solutions are not being printed;
+see section~\ref{sec:SolSpace}.
+
%--------------------------------------------------------------------
\subsection{Leaving blank space}
\label{sec:BlankSpace}
+\index{blank space|(}
+\index{space!blank|(}
To leave blank space on the page for the answer to a question, you
-should use the \verb"\vspace*" command. For example, the command
-\verb"\vspace*{1in}" inserts one inch of vertical space after the line
-in which it appears. (If it appears in between paragraphs, then it
-inserts the space right there.) You can also use the \verb"\vspace"
-command, the difference being that space inserted by \verb"\vspace"
-will be deleted if it occurs at the top of a new page, whereas space
-inserted by \verb"\vspace*" will never be deleted.
-
-If you want to equally distribute the blank space among the questions
-on the page, then just put \verb"\vspace*{\fill}" after each question
-on the page and use \verb"\newpage" to end the page.
+should use the \verb"\vspace*"\indc{vspace*} command. For example,
+the command \verb"\vspace*{1in}" inserts one inch of vertical space
+after the line in which it appears. (If it appears in between
+paragraphs, then it inserts the space right there.) You can also use
+the \verb"\vspace"\indc{vspace} command, the difference being that
+space inserted by \verb"\vspace" will be deleted if it occurs at the
+top of a new page, whereas space inserted by \verb"\vspace*" will
+never be deleted.
+
+If you want to leave all the remaining space on the page blank, you
+should give the commands\indc{stretch}
+\begin{center}
+ \begin{tabular}{l}
+ \verb"\vspace*{\stretch{1}}"\\
+ \verb"\newpage"
+ \end{tabular}
+\end{center}
+If you want to equally distribute the blank space among several
+questions on the page, then just put
+\verb"\vspace*{\stretch{1}}"\index{space!allocating} after each of the
+questions and use \verb"\newpage"\indc{newpage} to end the page. You
+can also distribute the available space in some other ratio. For
+example, to give one of the questions on the page twice as much space
+as any of the others, put \verb"\vspace*{\stretch{2}}" after that
+question and \verb"\vspace*{\stretch{1}}" after each of the others.
You can also leave blank space when solutions are not being printed by
using an optional argument with a \verb"solution" environment; see
section~\ref{sec:SolSpace}.
+\index{space!blank|)}
+\index{blank space|)}
+
+%--------------------------------------------------------------------
+\subsection{Printing an empty box}
+\label{sec:EmptyBox}
+\index{space!empty box|(}
+\index{empty box|(}
+\indcstart{makeemptybox}
+
+You can print an empty box with the command
+\begin{center}
+ \verb"\makeemptybox{length}"
+\end{center}
+which prints an empty box of height \verb"length" whose width equals
+that of the current line. That is, the left edge is at the current
+left margin (which depends on whether we're in a question, part,
+subpart, or subsubpart) and the right edge is at the right margin.
+
+\medskip
+
+For example, if you type
+\begin{verbatim}
+\begin{questions}
+ \question
+ In no more than one paragraph, explain why the earth is round.
+
+ \makeemptybox{1in}
+
+ \question
+ \begin{parts}
+ \part
+ What changes to the van Allen radiation belt are needed to make
+ the earth into a regular icosahedron?
+
+ \makeemptybox{1in}
+
+ \part
+ Where should the field generator be constructed if you want one of
+ the vertices to be located at the Royal Observatory at Greenwich?
+
+ \makeemptybox{1in}
+
+ \end{parts}
+\end{questions}
+\end{verbatim}
+then you'll get
+\begin{questions}
+ \question
+ In no more than one paragraph, explain why the earth is round.
+
+ \makeemptybox{1in}
+
+ \question
+ \begin{parts}
+ \part
+ What changes to the van Allen radiation belt are needed to make
+ the earth into a regular icosahedron?
+
+ \makeemptybox{1in}
+
+ \part
+ Where should the field generator be constructed if you want one of
+ the vertices to be located at the Royal Observatory at Greenwich?
+
+ \makeemptybox{1in}
+
+ \end{parts}
+\end{questions}
+
+\medskip
+
+If you want to fill the remaining space on the page with an empty box,
+you should give the commands\indc{stretch}
+\begin{center}
+ \begin{tabular}{l}
+ \verb"\makeemptybox{\stretch{1}}"\\
+ \verb"\newpage"
+ \end{tabular}
+\end{center}
+If you want to equally distribute the space for the answers among
+several questions on the page, then just put
+\verb"\makeemptybox{\stretch{1}}"\index{space!allocating} after each
+of those questions and use \verb"\newpage"\indc{newpage} to end the
+page. You can also distribute the available space in some other
+ratio. For example, to give one of the questions on the page twice as
+much space as any of the others, put \verb"\makeemptybox{\stretch{2}}"
+after that question, \verb"\makeemptybox{\stretch{1}}" after each of
+the others, and use \verb"\newpage" to end the page.
+
+You can also insert an empty box when solutions are not being printed
+by including an optional argument with the \verb"solutionoremptybox"
+environment; see section~\ref{sec:SolSpace}.
+
+\indcstop{makeemptybox}
+\index{empty box|)}
+\index{space!empty box|)}
+
%--------------------------------------------------------------------
-\subsection{Printing lined space for answers}
+\subsection{Printing lined space}
\label{sec:FillLines}
+\index{space!lined|(}
+\index{lined space|(}
+\indcstart{fillwithlines}
+
You can fill space with lines with the command
\begin{center}
@@ -2936,15 +4057,17 @@ then you'll get
\end{parts}
\end{questions}
-\medskip
-The distance between the lines is \verb"\linefillheight", the default
-value of which is set with the command
+\medskip The distance between the lines is
+\verb"\linefillheight"\indc{linefillheight}, the default value of
+which is set with the
+command\index{customization!\texttt{\char`\\fillwithlines}}
\begin{center}
\verb"\setlength\linefillheight{.25in}"
\end{center}
That value can be changed by giving a new \verb"\setlength" command.
-The thickness of the lines is \verb"\linefillthickness", the default
-value of which is set with the command
+The thickness of the lines is
+\verb"\linefillthickness"\indc{linefillthickness}, the default value
+of which is set with the command
\begin{center}
\verb"\setlength\linefillthickness{0.1pt}"
\end{center}
@@ -2952,24 +4075,38 @@ and that value can also be changed by giving a new \verb"\setlength"
command.
If you want to fill the remaining space on the page with lines, you
-should give the commands
+should give the commands\indc{stretch}
\begin{center}
\begin{tabular}{l}
- \verb"\fillwithlines{\fill}"\\
+ \verb"\fillwithlines{\stretch{1}}"\\
\verb"\newpage"
\end{tabular}
\end{center}
-If you want to equally distribute the space for answers among the
-questions on the page, then just put \verb"\fillwithlines{\fill}"
-after each question on the page and use \verb"\newpage" to end the
-page.
+If you want to equally distribute the space for the answers among
+several questions on the page, then just put
+\verb"\fillwithlines{\stretch{1}}"\index{space!allocating} after each
+of those questions and use \verb"\newpage" to end the page. You can
+also distribute the available space in some other ratio. For example,
+to give one of the questions on the page twice as much space as any of
+the others, put \verb"\fillwithlines{\stretch{2}}" after that
+question, \verb"\fillwithlines{\stretch{1}}" after each of the others,
+and use \verb"\newpage" to end the page.
You can also insert lined space when solutions are not being printed
by including an optional argument with the \verb"solutionorlines"
environment; see section~\ref{sec:SolSpace}.
+
+\indcstop{fillwithlines}
+\index{lined space|)}
+\index{space!lined|)}
+
%--------------------------------------------------------------------
\subsection{Printing dotted lined space}
\label{sec:FillDotLines}
+\index{space!dotted lined|(}
+\index{dotted lined space|(}
+\indcstart{fillwithdottedlines}
+
You can fill space with dotted lines with the command
\begin{center}
@@ -2982,9 +4119,10 @@ we're in a question, part, subpart, or subsubpart) to the right
margin. The command \verb"\fillwithdottedlines" is almost identical
to the \verb"\fillwithlines" command (see
section~\ref{sec:FillLines}), except that the lines created are dotted
-and the distance between the lines is \verb"\dottedlinefillheight".
-The default value of \verb"\dottedlinefillheight" is set by the
-command
+and the distance between the lines is
+\verb"\dottedlinefillheight"\indc{dottedlinefillheight}. The default
+value of \verb"\dottedlinefillheight" is set by the
+command\index{customization!\texttt{\char`\\fillwithdottedlines}}
\begin{center}
\verb"\setlength\dottedlinefillheight{.25in}"
\end{center}
@@ -3041,39 +4179,52 @@ then you'll get
\end{questions}
If you want to fill the remaining space on the page with dotted lines,
-you should give the commands
+you should give the commands\indc{stretch}
\begin{center}
\begin{tabular}{l}
- \verb"\fillwithdottedlines{\fill}"\\
+ \verb"\fillwithdottedlines{\stretch{1}}"\\
\verb"\newpage"
\end{tabular}
\end{center}
-If you want to equally distribute the space for answers among the
-questions on the page, then just put
-\verb"\fillwithdottedlines{\fill}" after each question on the page and
-use \verb"\newpage" to end the page.
+If you want to equally distribute the space for the answers among
+several questions on the page, then just put
+\verb"\fillwithdottedlines{\stretch{1}}"\index{space!allocating} after
+each question on the page and use \verb"\newpage" to end the page.
+You can also distribute the available space in some other ratio. For
+example, to give one of the questions on the page twice as much space
+as any of the others, put \verb"\fillwithdottedlines{\stretch{2}}"
+after that question, \verb"\fillwithdottedlines{\stretch{1}}" after
+each of the others, and use \verb"\newpage" to end the page.
You can also insert dotted lined space when solutions are not being
printed by including an optional argument with the
\verb"solutionordottedlines" environment; see
section~\ref{sec:SolSpace}.
+\indcstop{fillwithdottedlines}
+\index{dotted lined space|)}
+\index{space!dotted lined|)}
+
%--------------------------------------------------------------------
\subsection{Short answer questions}
\label{sec:ShortAns}
-
+\indcstart{answerline}
+\index{short answers|(}
The exam class can print answer lines for short answer questions. The
command
\begin{center}
\verb"\answerline"
\end{center}
-leaves blank vertical space of length \verb"\answerskip" and then
-inserts a horizontal line of length \verb"\answerlinelength" at the
-right margin, preceded by the number of the current question, part,
-subpart, or subsubpart. The default values of \verb"\answerskip" and
-\verb"\answerlinelength" are set by the commands
+leaves blank vertical space of length
+\verb"\answerskip"\indc{answerskip} and then inserts a horizontal line
+of length \verb"\answerlinelength"\indc{answerlinelength}%
+\index{customization!\texttt{\char`\\answerline}} at the right margin,
+preceded by the number of the current question, part, subpart, or
+subsubpart. The default values of \verb"\answerskip" and
+\verb"\answerlinelength" are set by the
+commands\index{customization!\texttt{\char`\\answerline}}
\begin{center}
\begin{tabular}{l}
\verb"\setlength\answerskip{2ex}"\\
@@ -3163,17 +4314,23 @@ then you'll get
%--------------------------------------------------------------------
\subsection{Printing the answers to short answer questions}
\label{sec:AnsShortAns}
+\index{short answers!answers to|(}
+\index{answers!to short answers|(}
-The \verb"\answerline" command can take an optional argument so that
-you can have the answer to the question printed on the answer line
-when answers are being printed (see section~\ref{sec:answers}). When
-answers are not being printed, the optional argument is ignored.
+The \verb"\answerline"\indcsub{answerline}{optional~argument} command
+can take an optional argument so that you can have the answer to the
+question printed on the answer line when answers are being printed
+(see section~\ref{sec:answers}). When answers are not being printed,
+the optional argument is ignored.
When answers are being printed, the optional argument is printed
subject to the declarations in the argument of the last
-\verb"\CorrectChoiceEmphasis" command (which by default is
-\verb"\bfseries"; see section~\ref{sec:CorrectChoice}), and it is
-printed a distance of \verb"\answerclearance" above the line. The
+\verb"\CorrectChoiceEmphasis"\indc{CorrectChoiceEmphasis} command
+(which by default is
+\verb"\bfseries"\index{customization!\texttt{\char`\\CorrectChoice}};
+see section~\ref{sec:CorrectChoice}), and it is printed a distance of
+\verb"\answerclearance"\indc{answerclearance}%
+\index{customization!\texttt{\char`\\answerline}} above the line. The
default value of \verb"\answerclearance" is set with the command
\begin{center}
\verb"\setlength\answerclearance{0.2ex}"
@@ -3204,23 +4361,45 @@ while if \verb"\printanswers" is in effect, you'll get \printanswers
\end{questions}
\noprintanswers
+\index{answers!to short answers|)}
+\index{short answers!answers to|)}
+
+\index{short answers|)}
+\indcstop{answerline}
+
+\index{answer space|)}
+\index{space!for answers|)}
%--------------------------------------------------------------------
%--------------------------------------------------------------------
-\section{Including solutions}
+\section{Solutions}
\label{sec:solutions}
-
-There are three environments for printing solutions to the problems:
-\begin{center}
- \begin{tabular}{rll}
- The& \verb"solution"& environment,\\
- the& \verb"solutionorlines"& environment, and\\
- the& \verb"solutionordottedlines"& environment.
- \end{tabular}
-\end{center}
-If you use these environments without any optional arguments, then
-they are identical: They print either the solution or nothing at all.
-Whether or not solutions are printed is controlled by the two commands
+
+%--------------------------------------------------------------------
+\subsection{Solution environments}
+\label{sec:SolEnv}
+\index{solutions|(}
+\index{solution environments|(}
+\index{answers|(}
+\index{environment!solution|(}
+\index{environment!solutionorbox|(}
+\index{environment!solutionorlines|(}
+\index{environment!solutionordottedlines|(}
+\index{solution environment|(}
+\index{solutionorbox environment|(}
+\index{solutionorlines environment|(}
+\index{solutionordottedlines environment|(}
+
+
+
+There are four environments for typing solutions to the problems.
+These environments all allow you to either print the solutions or omit
+them depending on a single command, and they differ only in the type
+of space they can leave for students to write their answers when
+solutions are not being printed.
+
+Whether or not solutions are printed is controlled by the two
+commands\indc{printanswers}\indc{noprintanswers}
\begin{center}
\begin{tabular}{l}
\verb"\printanswers"\\
@@ -3230,43 +4409,93 @@ Whether or not solutions are printed is controlled by the two commands
Using these commands to turn printing of solutions on and off, you can
print the solutions for the entire exam or for only certain parts of
it. The default is that solutions are \emph{not} printed. There is
-also an \verb"answers" option to the \verb"exam" document class, used
-as in
+also an \verb"answers"\indt{answers}\indcsub{documentclass}{options}
+option to the \verb"exam" document class, used as in
\begin{center}
\verb"\documentclass[answers]{exam}"
\end{center}
-that is equivalent to giving the command \verb"\printanswers" at the
-beginning of the document (see section~\ref{sec:answers}).
+that is equivalent to giving the command
+\verb"\printanswers"\indc{printanswers} at the beginning of the
+document (see section~\ref{sec:answers}).
-All of these environments can take an optional argument, which is an
-amount of space to be inserted when solutions are not being printed
-(see section~\ref{sec:SolSpace}). The only differences between these
-environments is that if this optional argument is used and solutions
-are not being printed, then
+There are four environments for printing solutions to the
+problems:\indt{solution}\indt{solutionorbox}%
+\indt{solutionorlines}\indt{solutionordottedlines}
+\begin{center}
+ \begin{tabular}{rll}
+ The& \verb"solution"& environment,\\
+ the& \verb"solutionorbox"& environment,\\
+ the& \verb"solutionorlines"& environment, and\\
+ the& \verb"solutionordottedlines"& environment.
+ \end{tabular}
+\end{center}
+Each of these can take one optional argument, which is an amount of
+space to be left for the students to write their answers when
+solutions are not being printed (see section~\ref{sec:SolSpace}). If
+you use these environments without any optional arguments, then they
+are identical: They print either the solution or nothing at all. The
+only differences between these environments are that if this optional
+argument is used and solutions are not being printed,
+%
+then\index{solution environments!optional argument}
\begin{itemize}
\item the \verb"solution" enviroment inserts that amount of blank
- space, as if you had given a \verb"\vspace*" command (see
- section~\ref{sec:BlankSpace}),
+ space, as if you had given a \verb"\vspace*"\indc{vspace*} command
+ (see section~\ref{sec:BlankSpace}),
+\item the \verb"solutionorbox" environment inserts an empty box of
+ that height, as if you had given a
+ \verb"\makeemptybox"\indc{makeemptybox} command (see
+ section~\ref{sec:EmptyBox}),
\item the \verb"solutionorlines" environment inserts that amount of
- space with ruled lines, as if you had given a \verb"\fillwithlines"
- command (see section~\ref{sec:FillLines}), and
+ space with ruled lines, as if you had given a
+ \verb"\fillwithlines"\indc{fillwithlines} command (see
+ section~\ref{sec:FillLines}), and
\item the \verb"solutionordottedlines" environment inserts that amount
of space with dotted lines, as if you had given a
- \verb"\fillwithdottedlines" command (see
+ \verb"\fillwithdottedlines"\indc{fillwithdottedlines} command (see
section~\ref{sec:FillDotLines}).
\end{itemize}
+\index{solution environment|)}
+\index{solutionorbox environment|)}
+\index{solutionorlines environment|)}
+\index{solutionordottedlines environment|)}
+\index{environment!solution|)}
+\index{environment!solutionorbox|)}
+\index{environment!solutionorlines|)}
+\index{environment!solutionordottedlines|)}
+
%--------------------------------------------------------------------
-\subsection{Printing the solution in a box}
-\label{sec:SolutionAppearance}
+\subsection{The appearance of the solution}
+\label{sec:SolAppear}
+\index{solution!appearance|(}
+
+Solutions can be printed either
+\begin{itemize}
+\item in a box (i.e., an \verb"\fbox") (see section~\ref{sec:SolBox};
+ this is the default),
+\item on a shaded background (see section~\ref{sec:shaded}), or
+\item with no framing or shading (see section~\ref{sec:SolPlain}).
+\end{itemize}
+In all of these cases, solutions can be broken across pages, and the
+part on each page will be boxed or shaded as appropriate.
+
+
+%--------------------------------------------------------------------
+\subsubsection{Printing the solution in a box}
+\label{sec:SolBox}
+\index{solution!in a box|(}
By default, the solution is printed inside of a box (i.e., an
-\verb"\fbox"), and if the solution is broken across pages, then each
-piece is enclosed in a box. There is also a \verb"\shadedsolutions"
-command to instead have the solution printed in a \verb"\colorbox"
-(i.e., printed on a shaded background); for this, you must load the
-\verb"color" package and your printer must be capable of printing
-color, or at least grayscale (see section~\ref{sec:shaded}).
+\verb"\fbox"\indc{fbox}), and if the solution is broken across pages,
+then each piece is enclosed in a box. There is also a
+\verb"\shadedsolutions"\indc{shadedsolutions} command to instead have
+the solution printed in a \verb"\colorbox"\indc{colorbox} (i.e.,
+printed on a shaded background); for this, you must load the
+%
+\verb"color"\index{color package} package and your printer must be
+capable of printing color, or at least grayscale (see
+section~\ref{sec:shaded}).
\medskip
@@ -3285,9 +4514,9 @@ For example, if you type
\end{solution}
\end{questions}
\end{verbatim}
-and you've given the command \verb"\printanswers" or used the document
-class option \verb"answers" (see section~\ref{sec:answers}), then
-you'll get \bigskip
+and you've given the command \verb"\printanswers"\indc{printanswers}
+or used the document class option \verb"answers"\indt{answers} (see
+section~\ref{sec:answers}), then you'll get \bigskip
\begin{questions}
\question Did you mutter something?
@@ -3300,47 +4529,57 @@ you'll get \bigskip
and nothing more.''
\end{TheSolution}
\end{questions}
-\bigskip
-The result would be exactly the same if the above \verb"solution"
-environment were replaced by either a \verb"solutionorlines" or
-\verb"solutionordottedlines" environment.
+The result would be exactly the same if that \texttt{solution}
+environment were replaced by a \texttt{solutionorbox},
+\texttt{solutionorlines} or \texttt{solutionordottedlines}
+environment.
By default, the solution is printed in a box whose width equals that
of the text of the current question (or part, or subpart, or
subsubpart). That is, the indentation at the left of the solution
equals the current level of indentation. You can change this by
-enclosing the \verb"solution", \verb"solutionorlines", or
-\verb"solutionordottedlines" environment in the argument of a
-\verb"\fullwidth" or \verb"\uplevel" command (see
-section~\ref{sec:uplevel}). For example, if you type
+enclosing the \texttt{solution}, \texttt{solutionorbox},
+\texttt{solutionorlines}, or \texttt{solutionordottedlines}
+environment in the argument of a \verb"\fullwidth"\indc{fullwidth} or
+\verb"\uplevel"\indc{uplevel} command, or inside of a
+\texttt{EnvFullwidth}\indt{EnvFullwidth}%
+\index{EnvFullwidth environment}\index{environment!EnvFullwidth} or
+%
+\texttt{EnvUplevel}\indt{EnvUplevel}\index{EnvUplevel environment}%
+\index{environment!EnvUplevel}%
+environment (see section~\ref{sec:uplevel}). For example, if you type
\begin{verbatim}
\begin{questions}
\question Did you mutter something?
-
- \fullwidth{\begin{solution}
- Once upon a midnight dreary, while I pondered, weak and weary,
- Over many a quaint and curious volume of forgotten lore--- While I
- nodded, nearly napping, suddenly there came a tapping, As of some
- one gently rapping, rapping at my chamber door. ``\,'Tis some
- visitor,'' I muttered, ``tapping at my chamber door--- Only this
- and nothing more.''
- \end{solution}}
+
+ \begin{EnvFullwidth}
+ \begin{TheSolution}
+ Once upon a midnight dreary, while I pondered, weak and weary,
+ Over many a quaint and curious volume of forgotten lore--- While
+ I nodded, nearly napping, suddenly there came a tapping, As of
+ some one gently rapping, rapping at my chamber door. ``\,'Tis
+ some visitor,'' I muttered, ``tapping at my chamber door--- Only
+ this and nothing more.''
+ \end{TheSolution}
+ \end{EnvFullwidth}
\end{questions}
\end{verbatim}
-and you've given the command \verb"\printanswers" or used the
-document class option \verb"answers", then you'll get
-\bigskip
+and you've given the command \verb"\printanswers"\indc{printanswers}
+or used the document class option \verb"answers"\indt{answers}, then
+you'll get \bigskip
\begin{questions}
\question Did you mutter something?
- \fullwidth{\begin{TheSolution}
- Once upon a midnight dreary, while I pondered, weak and weary,
- Over many a quaint and curious volume of forgotten lore--- While I
- nodded, nearly napping, suddenly there came a tapping, As of some
- one gently rapping, rapping at my chamber door. ``\,'Tis some
- visitor,'' I muttered, ``tapping at my chamber door--- Only this
- and nothing more.''
- \end{TheSolution}}
+ \begin{EnvFullwidth}
+ \begin{TheSolution}
+ Once upon a midnight dreary, while I pondered, weak and weary,
+ Over many a quaint and curious volume of forgotten lore--- While
+ I nodded, nearly napping, suddenly there came a tapping, As of
+ some one gently rapping, rapping at my chamber door. ``\,'Tis
+ some visitor,'' I muttered, ``tapping at my chamber door--- Only
+ this and nothing more.''
+ \end{TheSolution}
+ \end{EnvFullwidth}
\end{questions}
With all of these environments, if solutions are not being printed
@@ -3349,18 +4588,21 @@ include the optional argument (see section~\ref{sec:SolSpace}), then
the requested amount of space (blank, lined, or dotted lined) will be
inserted when the solution isn't printed.
+\index{solution!in a box|)}
%--------------------------------------------------------------------
-\subsection{Printing the solution on a shaded background}
+\subsubsection{Printing the solution on a shaded background}
\label{sec:shaded}
+\index{solution!shaded|(}
-If you load the \verb"color" package with the command
+If you load the \verb"color" package with the
+command\index{color package}
\begin{center}
\verb"\usepackage{color}"
\end{center}
in the preamble of your document (i.e., after the
\verb"\documentclass" command and before the \verb"\begin{document}"
- command), then you can give the command
+ command), then you can give the command\indc{shadedsolutions}
\begin{center}
\verb"\shadedsolutions"
\end{center}
@@ -3368,7 +4610,8 @@ This will cause solutions to be printed on a shaded background, which
by default is a light gray. (Most laser printers can at least print
grayscale when printing with the correct driver.) If you want to
change the color of the shading, you can do so by redefining the color
-\verb"SolutionColor". For example, if you give the command
+\verb"SolutionColor"\indc{SolutionColor}. For example, if you give
+the command
\begin{center}
\verb"\definecolor{SolutionColor}{rgb}{0.8,0.9,1}"
\end{center}
@@ -3376,23 +4619,68 @@ then the solutions will be printed on a light blue background
(assuming that your printer is capable of producing that color).
If you want to switch back to printing solutions inside of an
-\verb"\fbox", you can do so by giving the command
+\verb"\fbox"\indc{fbox}, you can do so by giving the
+command\indc{framedsolutions}
\begin{center}
\verb"\framedsolutions"
\end{center}
which returns you to the default situation.
+\index{solution!shaded|)}
%--------------------------------------------------------------------
-\subsection{Customizing the heading of the solution}
+\subsubsection{Printing the solution with no framing or shading}
+\label{sec:SolPlain}
+\index{solution!no framing or shading|(}
+
+If you give the command\indc{unframedsolutions}
+\begin{center}
+ \verb"\unframedsolutions"
+\end{center}
+then solutions will be printed as normal text, with no framing or
+shading. If you use this option, you'll almost certainly want to use
+the command \verb"\SolutionEmphasis"\indc{SolutionEmphasis} (see
+section~\ref{sec:SolEmph}) to distinguish the solution from the
+surrounding text.
+
+If you want to switch back to printing solutions inside of an
+\verb"\fbox", you can do so by giving the
+command\indc{framedsolutions}
+\begin{center}
+ \verb"\framedsolutions"
+\end{center}
+which returns you to the default situation.
+
+\index{solution!no framing or shading|)}
+
+%--------------------------------------------------------------------
+\subsection{Customizing the solution}
\label{sec:SolCust}
+\index{customization!solution|(}
+\index{solution!customizing|(}
+The solutions printed by any of the solution environments (see
+section~\ref{sec:SolEnv}) can be customized:
+\begin{itemize}
+\item the title (by default, ``\textbf{Solution:}'') can be changed
+ (see section~\ref{sec:SolTitle}),
+\item emphasis can be applied to the solution to distinguish it from
+ the surrounding text (see section~\ref{sec:SolEmph}), and
+\item advanced users can entirely change the appearance of the
+ solutions by defining a \LaTeX{} environment (see
+ section~\ref{sec:AdvCust}).
+\end{itemize}
+
+%--------------------------------------------------------------------
+\subsubsection{The title}
+\label{sec:SolTitle}
The word ``\textbf{Solution:}'' that you see at the beginning of the
-solutions printed by the \verb"solution", \verb"solutionorlines", and
-\verb"solutionordottedlines" environments can be changed by redefining
-the command \verb"\solutiontitle". The default value was created by
-the command
+solutions printed by the \texttt{solution}, \texttt{solutionorbox},
+\texttt{solutionorlines}, and \texttt{solutionordottedlines}
+environments can be changed by redefining the command
+\verb"\solutiontitle"\indc{solutiontitle}. The default value was
+created by the command
\begin{center}
\verb"\newcommand{\solutiontitle}{\noindent\textbf{Solution:}\enspace}"
\end{center}
@@ -3417,42 +4705,110 @@ then the \verb"solution" environment above would print
\end{questions}
\renewcommand{\solutiontitle}{\noindent\textbf{Solution:}\enspace}
-The appearance of the \verb"solution", \verb"solutionorlines", and
-\verb"solutionordottedlines" environments can actually be totally
-customized, if you're up to defining a \LaTeX{} environment. The
-appearance of the solution typed into any of these environments is
-defined by an environment called \verb"TheSolution", and you can
-change the definition of \verb"TheSolution" with a
+%--------------------------------------------------------------------
+\subsubsection{Solution emphasis}
+\label{sec:SolEmph}
+
+You can change the appearance of the text of the solution with the
+\verb"\SolutionEmphasis"\indc{SolutionEmphasis} command. The contents
+of the solution are enclosed in a group, and that group is begun with
+the argument of the most recent
+\verb"\SolutionEmphasis"\indc{SolutionEmphasis} command. The default
+was created by the command
+\begin{center}
+ \verb"\SolutionEmphasis{}"
+\end{center}
+That is, the default is not to add any emphasis at all. If, for
+example, you give the command
+\begin{center}
+ \verb"\SolutionEmphasis{\itshape\small}"
+\end{center}
+then the solutions will be set in italics, in small type. For another
+example, if you've given the command \verb"\usepackage{color}" in the
+preamble of your document (i.e., after the \verb"\documentclass"
+command and before the \verb"\begin{document}") and you give the
+command\indc{SolutionEmphasis}
+\begin{center}
+ \verb"\SolutionEmphasis{\color{red}}"
+\end{center}
+then the solutions will be printed in red (assuming your printer is
+capable of producing that color).
+
+\textbf{Note:} If you've given the command
+\verb"\unframedsolutions"\indc{unframedsolutions} (see
+section~\ref{sec:SolPlain}), so that solutions are printed as normal
+text with no framing or shading, then you'll almost certainly want to
+use the \verb"\SolutionEmphasis"\indc{SolutionEmphasis} command to
+create some visible difference between the solutions and the
+surrounding text.
+
+
+%--------------------------------------------------------------------
+\subsubsection{Advanced customizations}
+\label{sec:AdvCust}
+\index{TheSolution environment}
+\index{environment!TheSolution}
+
+The appearance of all of these solution environments can actually be
+totally customized, if you're up to defining a \LaTeX{} environment.
+The appearance of the solution typed into any of these environments is
+defined by an environment called \verb"TheSolution"\indt{TheSolution},
+and you can change the definition of \verb"TheSolution" with a
\verb"\renewenvironment" command. That is, the \verb"solution"
environment decides whether the command \verb"\printanswers" has been
given and, if so, it feeds the contents of the \verb"solution"
environment into a \verb"TheSolution" environment. (The behavior of a
-\verb"solutionorlines" or \verb"solutionordottedlines" environment is
-similar.) If you use \verb"\renewenvironment" to change the
-definition of the \verb"TheSolution" environment, you'll be changing
-the way the solution is printed. For the default definition of the
+\texttt{solutionorbox}, \texttt{solutionorlines} or
+\texttt{solutionordottedlines} environment is similar.) If you use
+\verb"\renewenvironment" to change the definition of the
+\verb"TheSolution" environment, you'll be changing the way the
+solution is printed. For the default definition of the
\verb"TheSolution" environment, see the file \verb"exam.cls".
+\index{solution!customizing|)}
+\index{customization!solution|)}
+
+\index{solution!appearance|)}
%--------------------------------------------------------------------
\subsection{Leaving space for the answers when solutions aren't
printed}
\label{sec:SolSpace}
+\index{space!for answers|(}
+\index{answer space|(}
+\index{solution environments!optional argument|(}
-Each of the \verb"solution", \verb"solutionorlines", and
-\verb"solutionordottedlines" environments takes an optional argument:
+Each of the \verb"solution", \verb"solutionorbox",
+\verb"solutionorlines", and \verb"solutionordottedlines" environments
+takes an optional argument:
\begin{itemize}
-\item In a \verb"solution" environment this is an amount of blank
- space to be left (just as if you had used a \verb"\vspace*" command;
- see section~\ref{sec:BlankSpace}) when solutions are not being
+\item In a
+ %
+ \verb"solution"\indtsub{solution}{optional argument}
+ %
+ environment this is an amount of blank space to be left (just as if
+ you had used a \verb"\vspace*"\indc{vspace*} command; see
+ section~\ref{sec:BlankSpace}) when solutions are not being printed,
+\item in a
+ %
+ \verb"solutionorbox"\indtsub{solutionorbox}{optional argument}
+ %
+ environment this is the height of an empty box to be drawn (just as
+ if you had used a \verb"\makeemptybox"\indc{makeemptybox} command;
+ see section~\ref{sec:EmptyBox}) when solutions are not being
printed,
-\item in a \verb"solutionorlines" environment this is an amount of
+\item in a
+ %
+ \verb"solutionorlines"\indtsub{solutionorlines}{optional argument}
+ %
+ environment this is an amount of lined space to be left (just as if
+ you had used a \verb"\fillwithlines"\indc{fillwithlines} command;
+ see section~\ref{sec:FillLines}) when solutions are not being
+ printed, and
+\item in a\indtsub{solutionordottedlines}{optional argument}
+ \verb"solutionordottedlines" environment this is an amount of dotted
lined space to be left (just as if you had used a
- \verb"\fillwithlines" command; see section~\ref{sec:FillLines}) when
- solutions are not being printed, and
-\item in a \verb"solutionordottedlines" environment this is an amount
- of dotted lined space to be left (just as if you had used a
- \verb"\fillwithdottedlines" command; see
+ \verb"\fillwithdottedlines"\indc{fillwithdottedlines} command; see
section~\ref{sec:FillDotLines}) when solutions are not being
printed.
\end{itemize}
@@ -3472,6 +4828,20 @@ given the command \verb"\vspace*{2in}"; see
section~\ref{sec:BlankSpace}) when solutions are not being printed, if
you type
\begin{verbatim}
+\begin{solutionorbox}[2in]
+ Once upon a midnight dreary, while I pondered, weak and weary, Over
+ many a quaint and curious volume of forgotten lore--- While I
+ nodded, nearly napping, suddenly there came a tapping, As of some
+ one gently rapping, rapping at my chamber door. ``\,'Tis some
+ visitor,'' I muttered, ``tapping at my chamber door--- Only this and
+ nothing more.''
+\end{solutionorbox}
+\end{verbatim}
+then there will be an emtpy box 2 inches tall inserted (as if you had
+given the command \verb"\makeemptybox{2in}"; see
+section~\ref{sec:EmptyBox}) when solutions are not being printed, if
+you type
+\begin{verbatim}
\begin{solutionorlines}[2in]
Once upon a midnight dreary, while I pondered, weak and weary, Over
many a quaint and curious volume of forgotten lore--- While I
@@ -3493,16 +4863,66 @@ if you type
one gently rapping, rapping at my chamber door. ``\,'Tis some
visitor,'' I muttered, ``tapping at my chamber door--- Only this and
nothing more.''
-\end{solutionorlines}
+\end{solutionordottedlines}
\end{verbatim}
then there will be 2 inches of dotted lined space inserted (as if you
had given the command \verb"\fillwithdottedlines{2in}"; see
section~\ref{sec:FillDotLines}) when solutions are not being printed.
+
+%--------------------------------------------------------------------
+\subsubsection{Cancelling the space from the optional arguments}
+\label{sec:cancelspace}
+\indcstart{cancelspace}
+\indcstart{nocancelspace}
+
+If you've typed any of the environments \texttt{solution},
+\texttt{solutionorbox}, \texttt{solutionorlines}, or
+\texttt{solutionordottedlines} (see section~\ref{sec:SolEnv}), and
+you've
+\begin{itemize}
+\item included an optional argument to leave space for answers when
+ solutions are not being printed, but
+\item you would now like to print the exam \emph{without} printing the
+ solutions and \emph{without} leaving space for the answers,
+\end{itemize}
+then you can cancel the space that would be created by the optional
+arguments by using the
+\texttt{cancelspace}\indt{cancelspace}\indcsub{documentclass}{options}
+document class option. That is, if you use the \verb"\documentclass"
+command
+\begin{center}
+ \verb"\documentclass[cancelspace]{exam}"
+\end{center}
+then optional arguments to any of the four solution environments will
+be ignored. There are also commands \verb"\cancelspace" and
+\verb"\nocancelspace"; using the document class option
+\texttt{cancelspace} is equivalent to giving the command
+\verb"\cancelspace" at the beginning of the file. The command
+\verb"\nocancelspace" reverts to the default situation (in which the
+optional arguments are not ignored).
+
+The document class option \texttt{cancelspace} has no effect at all if
+solutions are being printed.
+
+\emph{Note:} The document class option \texttt{cancelspace} and the
+command \verb"\cancelspace" only affect the optional arguments of of
+the four solution environments; they do \emph{not} affect any
+\verb"\vspace" commands that you put into the file.
+
+\indcstop{nocancelspace}
+\indcstop{cancelspace}
+
+\index{solution environments!optional argument|)}
+
+\index{answer space|)}
+\index{space!for answers|)}
+
%--------------------------------------------------------------------
\subsection{Changes depending on whether or not solutions are
being printed}
\label{sec:ifprintanswers}
+\indcstart{ifprintanswers}
The command \verb"\ifprintanswers" is provided in case you want to
vary what appears on the exam in ways other than those provided by the
@@ -3549,29 +4969,21 @@ something only when answers are not being printed, you'd type
{Stuff to appear only when answers are not being printed.}
\end{verbatim}
+\indcstop{ifprintanswers}
-
-
-
-%
-% If you want to ``Stuff'' only when answers aren't being printed, you
-% can say either
-%
-% \ifprintanswers
-% \else
-% Stuff
-% \fi
-%
-% or
-%
-% \ifthenelse{\boolean{printanswers}}{}{Stuff}
-
+\index{answers|)}
+\index{solution environments|)}
+\index{solutions|)}
%--------------------------------------------------------------------
%--------------------------------------------------------------------
\section{Grading tables and point tables}
\label{sec:Tables}
+\index{grading table|(}
+\index{point table|(}
+\indcstart{gradetable}
+\indcstart{pointtable}
\newlength\cwidth
@@ -3594,13 +5006,15 @@ the bonus points will be ignored by the tables described in sections
\ref{sec:GradeTables}, \ref{sec:PointTables},
and~\ref{sec:PartialTable}, but it's possible to print bonus grading
tables and bonus point tables that list the bonus points and ignore
-the non-bonus points (see section~\ref{sec:BonusTables}).
-
+the non-bonus points (see section~\ref{sec:BonusTables}) or combined
+grading tables and combined point tables that list both regular points
+and bonus points (see section~\ref{sec:CombinedTables}).
%--------------------------------------------------------------------
\subsection{Grading tables indexed by question number or by page
number}
\label{sec:GradeTables}
+\index{grading table!by question number or page number|(}
The \verb"exam" document class can print a grading table, indexed
either by question number or by page number. That is, you can print
@@ -3617,12 +5031,16 @@ either by question number or by page number. That is, you can print
in (by hand) the points earned on that page.
\end{itemize}
In order to use this feature you must either include the optional
-argument \verb"addpoints" in your \verb"\documentclass" command (as in
+argument
+\verb"addpoints"\indt{addpoints}\indcsub{documentclass}{options} in
+your \verb"\documentclass" command (as in
\verb"\documentclass[addpoints]{exam}") or give the command
-\verb"\addpoints" (see section~\ref{sec:addpoints}), and there must be
-only one \verb"questions" environment in the entire exam. In
-addition, you must run \LaTeX{} twice after making any changes to the
-file in order to make sure that the point values are correct on a
+\verb"\addpoints"\indc{addpoints} (see section~\ref{sec:addpoints}),
+and there must be only one \verb"questions"
+%
+environment\index{questions environment!only one} in the entire exam.
+In addition, you must run \LaTeX{} twice after making any changes to
+the file in order to make sure that the point values are correct on a
grading table indexed by question number and at least three times for
a grading table indexed by page number. (Since the table appears on
the third run of \LaTeX{}, and the space it occupies can change the
@@ -3633,7 +5051,8 @@ The command to create a grading table is
\begin{center}
\verb"\gradetable"
\end{center}
-and it takes two optional arguments:
+and it takes two optional
+arguments:\indc{gradetable[v]}\indc{gradetable[h]}
\begin{enumerate}
\item The first optional argument can be either \verb"[v]" or
\verb"[h]", to choose between a vertically oriented table and a
@@ -3642,7 +5061,8 @@ and it takes two optional arguments:
\verb"[pages]", to choose between a table indexed by question number
and a table indexed by page number.
\end{enumerate}
-That is,
+That is,\indc{gradetable[v][questions]}\indc{gradetable[v][pages]}%
+\indc{gradetable[h][questions]}\indc{gradetable[h][pages]}
\begin{itemize}
\item \verb"\gradetable[v][questions]" prints a vertically oriented
table indexed by question number,
@@ -3667,7 +5087,7 @@ points, and you type
then you'll get
\begin{center}
\cwidth=2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|c|c|c|}
\hline
Question& Points& Score\\
@@ -3701,7 +5121,7 @@ and if you type
then you'll get
\begin{center}
\cwidth=2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|}
\hline
Question:& 1& 2& 3& 4& 5& 6& 7& 8& Total\\
@@ -3744,7 +5164,7 @@ through 5 and if you type
then you'll get
\begin{center}
\cwidth=2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|c|c|c|}
\hline
Page& Points& Score\\
@@ -3770,7 +5190,7 @@ and if you type
then you'll get
\begin{center}
\cwidth=2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|l|c|c|c|c|c|}
\hline
Page:& 2& 3& 4& 5& Total\\
@@ -3801,10 +5221,13 @@ the \verb"\pointsonpage" command (see section~\ref{sec:pointsonp}) to
create a custom \verb"tabular" environment that has more rows (or
columns) than the tables produced by the \verb"gradingtable" command.
+\index{grading table!by question number or page number|)}
+
%--------------------------------------------------------------------
\subsection{Point tables indexed by question number or by page
number}
\label{sec:PointTables}
+\index{point table!by question number or page number|(}
Point tables are similar to grading tables (see
section~\ref{sec:GradeTables}), except that there is no place in the
@@ -3814,7 +5237,8 @@ The command to create a point table is
\begin{center}
\verb"\pointtable"
\end{center}
-and it takes two optional arguments:
+and it takes two optional
+arguments:\indc{pointtable[v]}\indc{pointtable[h]}
\begin{enumerate}
\item The first optional argument can be either \verb"[v]" or
\verb"[h]", to choose between a vertically oriented table and a
@@ -3823,7 +5247,8 @@ and it takes two optional arguments:
\verb"[pages]", to choose between a table indexed by question number
and a table indexed by page number.
\end{enumerate}
-That is,
+That is,\indc{pointtable[v][questions]}\indc{pointtable[v][pages]}%
+\indc{pointtable[h][questions]}\indc{pointtable[h][pages]}
\begin{itemize}
\item \verb"\pointtable[v][questions]" prints a vertically oriented
table indexed by question number,
@@ -3848,7 +5273,7 @@ points, and you type
then you'll get
\begin{center}
\cwidth=2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|c|c|}
\hline
Question& Points\\
@@ -3882,7 +5307,7 @@ and if you type
then you'll get
\begin{center}
\cwidth=2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|}
\hline
Question:& 1& 2& 3& 4& 5& 6& 7& 8& Total\\
@@ -3914,7 +5339,7 @@ through 5 and if you type
then you'll get
\begin{center}
\cwidth=2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|c|c|}
\hline
Page& Points\\
@@ -3940,7 +5365,7 @@ and if you type
then you'll get
\begin{center}
\cwidth=2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|l|c|c|c|c|c|}
\hline
Page:& 2& 3& 4& 5& Total\\
@@ -3963,11 +5388,16 @@ the \verb"\pointsonpage" command (see section~\ref{sec:pointsonp}) to
create a custom \verb"tabular" environment that has more rows (or
columns) than the tables produced by the \verb"pointtable" command.
+\index{point table!by question number or page number|)}
+
%--------------------------------------------------------------------
\subsection{Table entries as clickable links}
\label{sec:Clickable}
+\index{grading table!clickable links}
+\index{point table!clickable links}
+\index{clickable links}
-If you put the command
+If you put the command\indc{usepackage\{hyperref\}}\indt{hyperref}
\begin{center}
\verb"\usepackage{hyperref}"
\end{center}
@@ -3991,63 +5421,79 @@ instead of the numbers of those questions, and those question titles
will be clickable links that take you to the corresponding question.
%--------------------------------------------------------------------
-\subsection{Partial grading tables and partial point tables}
+\subsection{Grading ranges, partial grading tables, and partial point tables}
\label{sec:PartialTable}
+\index{grading range}
+\indcstart{begingradingrange}
+\indcstart{endgradingrange}
-The \verb"\partialgradetable" and \verb"\partialpointtable" commands
-make it possible to create grading tables and point tables that cover
-only part of the exam. These commands take one required argument, the
-name of a grading range defined using the \verb"\begingradingrange"
-and \verb"\endgradingrange" commands, plus the same two optional
-arguments used in the \verb"\gradetable" and \verb"\pointtable"
-commands.
+It is possible to define one or more ``grading ranges'', and then to
+count the points in a range and create grading tables and point tables
+that cover only that range.
-In more detail: You define a grading range by choosing a name with
-which to label the range, e.g., ``myrange'', and then put the command
-\begin{center}
- \verb"\begingradingrange{myrange}"
-\end{center}
-at the start of the range and the command
-\begin{center}
- \verb"\endgradingrange{myrange}"
-\end{center}
-at the end of the range. To create the table, you say, e.g.,
+In more detail: You can define a grading range by choosing a name with
+which to label the range, e.g., ``myrange'', and then putting the
+command
+\begin{itemize}
+\item[] \verb"\begingradingrange{myrange}" at the start of the range
+ and the command
+\item[] \verb"\endgradingrange{myrange}" at the end of the range. You
+ can then use the command
+\item[] \verb"\pointsinrange{myrange}", which will expand to the
+ number of points in the range.
+\end{itemize}
+You can define as many grading ranges as you like, wherever you like.
+That is, grading ranges do \emph{not} need to be nested; you can begin
+the range \texttt{otherrange} somewhere in the middle of the range
+\texttt{myrange} and then end the range \texttt{otherrange} after the
+end of \texttt{myrange}.
+
+You can create a grading table or point table that covers only the
+questions in a range by using the
+\verb"\partialgradetable"\indc{partialgradetable} or
+\verb"\partialpointtable"\indc{partialpointtable} command. These are
+similar to the \verb"\gradetable" and \verb"\pointtable" commands,
+except that they each have one required argument (the name of the
+grading range) before the two optional arguments (the first of which
+must be either \verb"[v]" or \verb"[h]" and the second of which must
+be either \verb"[questions]" or \verb"[pages]"). For example, the
+command
\begin{center}
\verb"\partialgradetable{myrange}[v][questions]"
\end{center}
-to create a vertically oriented table indexed by those questions that
-follow the command
-\begin{center}
- \verb"\begingradingrange{myrange}"
-\end{center}
-and precede the command
-\begin{center}
- \verb"\endgradingrange{myrange}"
-\end{center}
-If you say
+would create a vertically grading oriented table indexed by the
+questions in the range, and the command
\begin{center}
\verb"\partialgradetable{myrange}[v][pages]"
\end{center}
-then you'll get a vertically oriented table indexed by all pages with
-points starting with the page containing the command
-\begin{center}
- \verb"\begingradingrange{myrange}"
-\end{center}
-and ending with the page containing the command
-\begin{center}
- \verb"\endgradingrange{myrange}"
-\end{center}
-The \verb"\partialpointtable" command is similar to the
-\verb"\partialgradetable" command.
+would create a vertically oriented grading table indexed by all pages
+with points starting with the page containing the command
+\verb"\begingradingrange{myrange}" and ending with the page containing
+the command \verb"\endgradingrange{myrange}"
+
+If the exam has any bonus points (see section~\ref{sec:Bonus}), then
+the bonus points will be ignored by the \verb"\pointsinrange",
+\verb"\partialgradetable", and \verb"\partialpointtable" commands, but
+they will be counted by the \verb"\bonuspointsinrange" command (see
+section~\ref{sec:BonusTables}) and tabulated by the
+\verb"\partialbonusgradetable", \verb"\partialbonuspointtable",
+\verb"\partialcombinedgradetable", and
+\verb"\partialcombinedponttable" commands (see
+section~\ref{sec:BonusTables} and section~\ref{sec:CombinedTables}).
+
+\indcstop{endgradingrange}
+\indcstop{begingradingrange}
%--------------------------------------------------------------------
-\subsection{\texttt{\char`\\pointsofquestion}}
+\subsection{\texttt{\bs pointsofquestion}}
\label{sec:pointsofq}
-If you use the document class option \verb"addpoints" (as in
-\verb"\documentclass[addpoints]{exam}") or give the command
-\verb"\addpoints" (see section~\ref{sec:addpoints}), then you can use
-the
+If you use the document class option \verb"addpoints"\indt{addpoints}
+(as in
+\verb"\documentclass[addpoints]{exam}"\indcsub{documentclass}{options})
+or give the command \verb"\addpoints"\indc{addpoints} (see
+section~\ref{sec:addpoints}), then you can use
+the\indc{pointsofquestion}
\begin{center}
\verb"\pointsofquestion"
\end{center}
@@ -4071,23 +5517,24 @@ unsuitable for some other reason. It can also be used in a
parts, subparts, and subsubparts of a question on the line with the
question number (see section~\ref{sec:adding}).
-The \verb"\pointsofquestion" command ignores any bonus points that you
-may have created (see section~\ref{sec:Bonus}). The
-\verb"\bonuspointsofquestion" command, however, counts the bonus
-points (see section~\ref{sec:BonusTables}).
+The \verb"\pointsofquestion"\indc{pointsofquestion} command ignores
+any bonus points that you may have created (see
+section~\ref{sec:Bonus}). The \verb"\bonuspointsofquestion" command,
+however, counts the bonus points (see section~\ref{sec:BonusTables}).
%--------------------------------------------------------------------
-
-\subsection{\texttt{\char`\\pointsonpage}}
+\subsection{\texttt{\bs pointsonpage}}
\label{sec:pointsonp}
-If you use the document class option \verb"addpoints" (as in
-\verb"\documentclass[addpoints]{exam}") or give the command
-\verb"\addpoints" (see section~\ref{sec:addpoints}), then you can use
-the \verb"\pointsonpage" command. This command takes one argument,
-which must be the number of a page of the exam, and it prints the
-total number of points for all the questions, parts, subparts, and
-subsubparts on that page. That is:
+If you use the document class option \verb"addpoints"\indt{addpoints}
+(as in
+\verb"\documentclass[addpoints]{exam}"\indcsub{documentclass}{options})
+or give the command \verb"\addpoints"\indc{addpoints} (see
+section~\ref{sec:addpoints}), then you can use the
+\verb"\pointsonpage"\indc{pointsonpage} command. This command takes
+one argument, which must be the number of a page of the exam, and it
+prints the total number of points for all the questions, parts,
+subparts, and subsubparts on that page. That is:
\begin{itemize}
\item \verb"\pointsonpage{1}" prints the sum of the point values for
all questions, etc., on page 1,
@@ -4107,14 +5554,17 @@ points available on that page; for example, the command
{Points earned: \makebox[1in]{\hrulefill}
out of a possible \pointsonpage{\thepage} points}
\end{verbatim}
-(see section~\ref{sec:runningfooter}) will produce the footer
+\indcsub{pointsonpage}{in footer} (see
+section~\ref{sec:runningfooter}) will produce the footer
\samplefoot{}{}{}{Points earned: \makebox[1in]{\hrulefill} out of a
possible 20 points} on all pages after the first. (For another
-example, see section~\ref{sec:PtsPgEx})
+example, see section~\ref{sec:PtsPgEx})
\textbf{Caution:} The command \verb"\pointsonpage{\thepage}" will work
reliably only in headers and footers, since the command
-\verb"\thepage" will work reliably only in headers and footers.
+%
+\verb"\thepage"\indcsub{thepage}{reliable only in headers and footers}
+will work reliably only in headers and footers.
The \verb"\pointsonpage" command ignores any bonus points that you may
have created (see section~\ref{sec:Bonus}). The
@@ -4124,23 +5574,37 @@ have created (see section~\ref{sec:Bonus}). The
%--------------------------------------------------------------------
\subsection{Bonus grading tables and bonus point tables}
\label{sec:BonusTables}
+\index{grading table!bonus|(}
+\index{point table!bonus|(}
-If your exam contains any bonus points (see section~\ref{sec:Bonus}),
-then those bonus points will be ignored by the grading table and point
-table commands described in sections \ref{sec:GradeTables},
-\ref{sec:PointTables}, and~\ref{sec:PartialTable} and by the
-\verb"\pointsofquestion" (see section~\ref{sec:pointsofq}) and
-\verb"\pointsonpage" (see section~\ref{sec:pointsonp}) commands.
-There are, however, analogous commands that count only the bonus
-points and ignore the non-bonus points. These commands, and the
-non-bonus commands to which they correspond, are as follows:
+If your exam contains any bonus
+%
+points\index{bonus points}\index{points!bonus} (see
+section~\ref{sec:Bonus}), then those bonus points will be ignored by
+the grading table and point table commands described in sections
+\ref{sec:GradeTables}, \ref{sec:PointTables},
+and~\ref{sec:PartialTable} and by the
+\verb"\pointsofquestion"\indc{pointsofquestion} (see
+section~\ref{sec:pointsofq}) and
+\verb"\pointsonpage"\indc{pointsonpage} (see
+section~\ref{sec:pointsonp}) commands. There are, however, analogous
+commands that count only the bonus points and ignore the non-bonus
+points. (There are also commands that create tables listing both
+non-bonus and bonus points; see section~\ref{sec:CombinedTables}.)
+These commands, and the non-bonus commands to which they correspond,
+are as follows:\indc{bonusgradetable}\indc{bonuspointtable}%
+\indc{bonuspointsinrange}\indc{partialbonusgradetable}%
+\indc{partialbonuspointtable}\indc{bonuspointsofquestion}%
+\indc{bonuspointsonpage}
\begin{center}
\begin{tabular}{l@{\qquad\qquad}l}
- Bonus points& Non-bonus points\\[\medskipamount]
+ Bonus points& Non-bonus points\\[\bigskipamount]
\verb"\bonusgradetable"& \verb"\gradetable"\\
- \verb"\bonuspointtable"& \verb"\pointtable"\\
- \verb"\bonuspartialgradetable"& \verb"\partialgradetable"\\
- \verb"\bonuspartialpointtable"& \verb"\partialpointtable"\\[\medskipamount]
+ \verb"\bonuspointtable"& \verb"\pointtable"\\[\medskipamount]
+ \verb"\bonuspointsinrange"& \verb"\pointsinrange"\\
+ \verb"\partialbonusgradetable"& \verb"\partialgradetable"\\
+ \verb"\partialbonuspointtable"&
+ \verb"\partialpointtable"\\[\medskipamount]
\verb"\bonuspointsofquestion"& \verb"\pointsofquestion"\\
\verb"\bonuspointsonpage"& \verb"\pointsonpage"
\end{tabular}
@@ -4148,22 +5612,26 @@ non-bonus commands to which they correspond, are as follows:
All of the the commands in the first column count bonus points and
ignore non-bonus points, while all of the commands in the second
column count non-bonus points and ignore bonus points. The
-\verb"\bonuspartialgradetable" and \verb"\bonuspartialpointtable"
-commands use the same \verb"\begingradingrange" and
-\verb"\endgradingrange" commands that are used by the corresponding
-non-bonus versions (see section~\ref{sec:PartialTable}). Just as is
-described in section~\ref{sec:Clickable} for their non-bonus
-counterparts, if you put the command
+\verb"\partialbonusgradetable" and \verb"\partialbonuspointtable"
+commands use the same
+\verb"\begingradingrange"\indc{begingradingrange} and
+\verb"\endgradingrange"\indc{endgradingrange} commands that are used
+by the corresponding non-bonus versions (see
+section~\ref{sec:PartialTable}). Just as is described in
+section~\ref{sec:Clickable} for their non-bonus counterparts, if you
+put the command\indc{usepackage\{hyperref\}}\indt{hyperref}
\begin{center}
\verb"\usepackage{hyperref}"
\end{center}
into the preamble of your document (i.e., after the
\verb"\documentclass" command and before the \verb"\begin{document}"
command) and then produce a pdf file (either using dvipdf or
-directly by using pdflatex), then
+directly by using pdflatex),
+%
+then\index{clickable links}
\begin{itemize}
\item in a bonus grading table or bonus point table indexed by
- question number the question numbers (or question titles, if you
+ question number, the question numbers (or question titles, if you
used \verb"\bonustitledquestion"; see section~\ref{sec:Bonus}) in
the table will be clickable links that take you to the corresponding
question, and
@@ -4172,8 +5640,9 @@ directly by using pdflatex), then
take you to the corresponding page.
\end{itemize}
-For example, if the exam has 8 questions, each worth a total of 5
-bonus points, and you type
+For example, if the exam has 8 questions, with each odd numbered
+question worth a total of 10 regular points and each even numbered
+question worth a total of 5 bonus points, and you type
\begin{verbatim}
\begin{center}
\bonusgradetable[h][questions]
@@ -4182,21 +5651,137 @@ bonus points, and you type
then you'll get
\begin{center}
\cwidth=2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|}
\hline
Question:& 1& 2& 3& 4& 5& 6& 7& 8& Total\\
\hline
Bonus Points:&
+ 0&
5&
+ 0&
5&
+ 0&
5&
+ 0&
5&
+ 20\\
+ \hline
+ Score:&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&\\
+ \hline
+ \end{tabular}
+\end{center}
+
+\index{point table!bonus|)}
+\index{grading table!bonus|)}
+
+%--------------------------------------------------------------------
+\subsection{Combined grading tables and combined point tables}
+\label{sec:CombinedTables}
+\index{grading table!combined|(}
+\index{point table!combined|(}
+
+
+There are commands for producing \emph{combined} grading and point
+tables, both partial and full, that tabulate both regular points and
+bonus points (see section~\ref{sec:Bonus}). These commands, and the
+non-bonus and bonus commands to which they correspond, are
+\indc{combinedgradetable}\indc{combinedpointtable}%
+\indc{partialcombinedgradetable}\indc{partialcombinedpointtable}%
+\begin{center}
+ \begin{tabular}{l@{\enskip}l@{\enskip}l}
+ Non-Bonus points only& Bonus points only&
+ Combined\\[\medskipamount]
+ \verb"\gradetable"& \verb"\bonusgradetable"&
+ \verb"\combinedgradetable"\\
+ \verb"\pointtable"& \verb"\bonuspointtable"&
+ \verb"\combinedpointtable"\\
+ \verb"\partialgradetable"& \verb"\partialbonusgradetable"&
+ \verb"\partialcombinedgradetable"\\
+ \verb"\partialpointtable"& \verb"\partialbonuspointtable"&
+ \verb"\partialcombinedpointtable"
+ \end{tabular}
+\end{center}
+The first two commands in each column take two optional arguments, the
+first being either \verb"[v]" or \verb"[h]" and the second being
+either \verb"[questions]" or \verb"[pages]". The last two commands in
+each column take one required argument, the name of the grading range
+(defined using the \verb"\begingradingrange" and
+\verb"\endgradingrange" commands; see section~\ref{sec:PartialTable}),
+and then the same two optional arguments as the other commands (the
+first being either \verb"[v]" or \verb"[h]" and the second being
+either \verb"[questions]" or \verb"[pages]").
+
+Just as is described in section~\ref{sec:Clickable} for their regular
+points and section~\ref{sec:BonusTables} for bonus points, if you put
+the
+%
+command\index{clickable links}\indc{usepackage\{hyperref\}}%
+\indt{hyperref}
+\begin{center}
+ \verb"\usepackage{hyperref}"
+\end{center}
+into the preamble of your document (i.e., after the
+\verb"\documentclass" command and before the \verb"\begin{document}"
+command) and then produce a pdf file (either using dvipdf or
+directly by using pdflatex), then
+\begin{itemize}
+\item in a combined grading table or combined point table indexed by
+ question number, the question numbers (or question titles, if you
+ used either \verb"\titledquestion" (see section~\ref{sec:Titled}) or
+ \verb"\bonustitledquestion" (see section~\ref{sec:Bonus})) in the
+ table will be clickable links that take you to the corresponding
+ question, and
+\item in a combined grading table or combined point table indexed by
+ page number the page numbers in the table will be clickable links
+ that take you to the corresponding page.
+\end{itemize}
+
+For example, if the exam has 8 questions, with each odd numbered
+question worth a total of 10 regular points and each even numbered
+question worth a total of 5 bonus points, and you type
+\begin{verbatim}
+\begin{center}
+ \combinedgradetable[h][questions]
+\end{center}
+\end{verbatim}
+then you'll get
+\begin{center}
+ \cwidth=2em
+ \renewcommand{\arraystretch}{1.5}
+ \begin{tabular}{|l|c|c|c|c|c|c|c|c|c|}
+ \hline
+ Question:& 1& 2& 3& 4& 5& 6& 7& 8& Total\\
+ \hline
+ Points:&
+ 10&
+ 0&
+ 10&
+ 0&
+ 10&
+ 0&
+ 10&
+ 0&
+ 40\\
+ \hline
+ Bonus Points:&
+ 0&
5&
+ 0&
5&
+ 0&
5&
+ 0&
5&
- 40\\
+ 20\\
\hline
Score:&
\hbox to \cwidth{\hfill}&
@@ -4211,27 +5796,127 @@ then you'll get
\end{tabular}
\end{center}
+\index{point table!combined|)}
+\index{grading table!combined|)}
+
+%--------------------------------------------------------------------
+\subsection{Changing the total points in a table}
+\label{sec:Totalpoints}
+\index{grading table!changing total points|(}
+\index{point table!changing total points|(}
+
+There are commands for changing the total points and total bonus
+points in grading and point tables, so that the stated point total
+will not equal the sum of the point values in the table. These
+commands are intended for exams in which the students are required to
+do some subset of the problems, but not all of them, and so the total
+number of points possible on the exam is less than the sum of the
+points for all of the questions. The commands
+are\indc{settabletotalpoints}\indc{settabletotalbonuspoints}
+\begin{center}
+ \begin{tabular}{l}
+ \verb"\settabletotalpoints"\\
+ \verb"\settabletotalbonuspoints"
+ \end{tabular}
+\end{center}
+Each of those commands takes one argument. After giving the command
+\begin{center}
+ \verb"\settabletotalpoints{number}"
+\end{center}
+any grading or point table (regular or combined, partial or full) will
+list the total points as \texttt{number} instead of the actual total
+number of points in the table. After giving the command
+\begin{center}
+ \verb"\settabletotalbonuspoints{number}"
+\end{center}
+any grading or point table (bonus or combined, partial or full) will
+list the total bonus points as \texttt{number} instead of the actual
+total number of bonus points in the table.
+
+To have these commands affect only a single table, confine the command
+and the command to create the table inside of a group (possibly by
+just placing those commands inside of a \texttt{center} environment).
+For example, if an exam has 8 questions, each worth 10 points, and the
+students are required to do any 6 of the 8, then the commands
+\begin{verbatim}
+\begin{center}
+ \settabletotalpoints{60}
+ \gradetable[h][questions]
+\end{center}
+\end{verbatim}
+will produce
+\begin{center}
+ \cwidth=2em
+ \renewcommand{\arraystretch}{1.5}
+ \begin{tabular}{|l|c|c|c|c|c|c|c|c|c|}
+ \hline
+ Question:& 1& 2& 3& 4& 5& 6& 7& 8& Total\\
+ \hline
+ Points:&
+ 10&
+ 10&
+ 10&
+ 10&
+ 10&
+ 10&
+ 10&
+ 10&
+ 60\\
+ \hline
+ Score:&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&
+ \hbox to \cwidth{\hfill}&\\
+ \hline
+ \end{tabular}
+\end{center}
+and no other tables will be affected by that
+\verb"\settabletotalpoints" command.
+
+\index{point table!changing total points|)}
+\index{grading table!changing total points|)}
%--------------------------------------------------------------------
\subsection{Customizing the tables}
\label{sec:CustTable}
+\index{customization!grading table|(}
+\index{customization!point table|(}
+\index{grade table!customization|(}
+\index{point table!customization|(}
-There are three ways in which you can customize the default appearance
-of grading tables and point tables:
+There are three ways in which you can customize the appearance of
+grading tables and point tables:
\begin{itemize}
\item You can change the words (and the fonts) that appear in the
table.
\item You can change the minimum width of the blank cells into which
you will write the scores.
-\item You can change the value of \verb"\baselinestretch" used for the
- table.
+\item You can change the value of
+ \verb"\baselinestretch"\indc{baselinestretch} used for the table.
\end{itemize}
+For all grading and point tables:\indc{gradetablestretch}\indc{cellwidth}
+\begin{center}
+ \begin{tabular}{l@{\qquad}l}
+ \verb"\cellwidth{length}"& sets the minimum width of the blank cells to
+ \verb"length"\\
+ \verb"\gradetablestretch{number}"& uses \verb"number" as the
+ \verb"\baselinestretch"
+ \end{tabular}
+\end{center}
For vertical non-bonus tables (i.e., tables created by
-\verb"\gradetable[v]" or \verb"\pointtable[v]"):
+\verb"\gradetable[v]", \verb"\pointtable[v]",
+\verb"\partialgradetable{rangename}[v]", or
+\verb"\partialpointtable{rangename}[v]"):%
+\indc{vqword}\indc{vpgword}\indc{vpword}\indc{vsword}\indc{vtword}
\begin{center}
\begin{tabular}{l@{\qquad}l}
- Command& Effect\\
+ Command& \multicolumn{1}{c}{Effect}\\[\medskipamount]
\verb"\vqword{text}"& substitutes \verb"text" for ``Question''\\
\verb"\vpgword{text}"& substitutes \verb"text" for ``Page''\\
\verb"\vpword{text}"& substitutes \verb"text" for ``Points''\\
@@ -4240,10 +5925,13 @@ For vertical non-bonus tables (i.e., tables created by
\end{tabular}
\end{center}
For horizontal non-bonus tables (i.e., tables created by
-\verb"\gradetable[h]" or \verb"\pointtable[h]"):
+\verb"\gradetable[h]", \verb"\pointtable[h]",
+\verb"\partialgradetable{rangename}[h]", or
+\verb"\partialpointtable{rangename}[h]"):%
+\indc{hqword}\indc{hpgword}\indc{hpword}\indc{hsword}\indc{htword}
\begin{center}
\begin{tabular}{l@{\qquad}l}
- Command& Effect\\
+ Command& \multicolumn{1}{c}{Effect}\\[\medskipamount]
\verb"\hqword{text}"& substitutes \verb"text" for ``Question:''\\
\verb"\hpgword{text}"& substitutes \verb"text" for ``Page:''\\
\verb"\hpword{text}"& substitutes \verb"text" for ``Points:''\\
@@ -4252,10 +5940,13 @@ For horizontal non-bonus tables (i.e., tables created by
\end{tabular}
\end{center}
For vertical bonus tables (i.e., tables created by
-\verb"\bonusgradetable[v]" or \verb"\bonuspointtable[v]"):
+\verb"\bonusgradetable[v]", \verb"\bonuspointtable[v]",
+\verb"\partialbonusgradetable{rangename}[v]", or
+\verb"\partialbonuspointtable{rangename}[v]"):\indc{bvqword}%
+\indc{bvpgword}\indc{bvpword}\indc{bvsword}\indc{bvtword}
\begin{center}
\begin{tabular}{l@{\qquad}l}
- Command& Effect\\
+ Command& \multicolumn{1}{c}{Effect}\\[\medskipamount]
\verb"\bvqword{text}"& substitutes \verb"text" for ``Question''\\
\verb"\bvpgword{text}"& substitutes \verb"text" for ``Page''\\
\verb"\bvpword{text}"& substitutes \verb"text" for ``Bonus Points''\\
@@ -4264,10 +5955,14 @@ For vertical bonus tables (i.e., tables created by
\end{tabular}
\end{center}
For horizontal bonus tables (i.e., tables created by
-\verb"\bonusgradetable[h]" or \verb"\bonuspointtable[h]"):
+\verb"\bonusgradetable[h]", \\
+\verb"\bonuspointtable[h]",
+\verb"\partialbonusgradetable{rangename}[h]", or\\
+\verb"\partialbonuspointtable{rangename}[h]"):\indc{bhqword}%
+\indc{bhpgword}\indc{bhpword}\indc{bhsword}\indc{bhtword}
\begin{center}
\begin{tabular}{l@{\qquad}l}
- Command& Effect\\
+ Command& \multicolumn{1}{c}{Effect}\\[\medskipamount]
\verb"\bhqword{text}"& substitutes \verb"text" for ``Question:''\\
\verb"\bhpgword{text}"& substitutes \verb"text" for ``Page:''\\
\verb"\bhpword{text}"& substitutes \verb"text" for ``Bonus Points:''\\
@@ -4275,35 +5970,72 @@ For horizontal bonus tables (i.e., tables created by
\verb"\bhtword{text}"& substitutes \verb"text" for ``Total''
\end{tabular}
\end{center}
-For all tables:
+For vertical combined tables (i.e., tables created by
+\verb"\combinedgradetable[v]",\\
+\verb"\combinedpointtable[v]",
+\verb"\partialcombinedgradetable{rangename}[v]", or\\
+\verb"\partialcombinedpointtable{rangename}[v]"):\indc{cvqword}%
+\indc{cvpgword}\indc{cvpword}\indc{cvbpword}\indc{cvsword}%
+\indc{cvtword}
\begin{center}
\begin{tabular}{l@{\qquad}l}
- \verb"\cellwidth{length}"& changes the minimum width of the blank cells to
- \verb"length"\\
- \verb"\gradetablestretch{number}"& uses \verb"number" as the
- \verb"\baselinestretch"
+ Command& \multicolumn{1}{c}{Effect}\\[\medskipamount]
+ \verb"\cvqword{text}"& substitutes \verb"text" for ``Question''\\
+ \verb"\cvpgword{text}"& substitutes \verb"text" for ``Page''\\
+ \verb"\cvpword{text}"& substitutes \verb"text" for ``Points''\\
+ \verb"\cvbpword{text}"& substitutes \verb"text" for ``Bonus Points''\\
+ \verb"\cvsword{text}"& substitutes \verb"text" for ``Score''\\
+ \verb"\cvtword{text}"& substitutes \verb"text" for ``Total:''
+ \end{tabular}
+\end{center}
+For horizontal combined tables (i.e., tables created by
+\verb"\combinedgradetable[h]", \\
+\verb"\combinedpointtable[h]",
+\verb"\partialcombinedgradetable{rangename}[h]", or\\
+\verb"\partialcombinedpointtable{rangename}[h]"):\indc{chqword}%
+\indc{chpgword}\indc{chpword}\indc{chbpword}\indc{chsword}%
+\indc{chtword}
+\begin{center}
+ \begin{tabular}{l@{\qquad}l}
+ Command& \multicolumn{1}{c}{Effect}\\[\medskipamount]
+ \verb"\chqword{text}"& substitutes \verb"text" for ``Question:''\\
+ \verb"\chpgword{text}"& substitutes \verb"text" for ``Page:''\\
+ \verb"\chpword{text}"& substitutes \verb"text" for ``Points:''\\
+ \verb"\chbpword{text}"& substitutes \verb"text" for ``Bonus Points:''\\
+ \verb"\chsword{text}"& substitutes \verb"text" for ``Score:''\\
+ \verb"\chtword{text}"& substitutes \verb"text" for ``Total''
\end{tabular}
\end{center}
If you don't use any of these commands then you get the default
-values, which are defined by the commands
-\begin{center}
-\begin{tabular}{l@{\qquad}l@{\qquad}l}
- \verb"\hqword{Question:}"& \verb"\vqword{Question}"&
- \verb"\cellwidth{2em}"\\
- \verb"\hpgword{Page:}"& \verb"\vpgword{Page}"&
- \verb"\gradetablestretch{1.5}"\\
- \verb"\hpword{Points:}"& \verb"\vpword{Points}"\\
- \verb"\hsword{Score:}"& \verb"\vsword{Score}"\\
- \verb"\htword{Total}"& \verb"\vtword{Total:}"\\[\medskipamount]
- \verb"\bhqword{Question:}"& \verb"\bvqword{Question}"\\
- \verb"\bhpgword{Page:}"& \verb"\bvpgword{Page}"\\
- \verb"\bhpword{Bonus Points:}"& \verb"\bvpword{Bonus Points}"\\
- \verb"\bhsword{Score:}"& \verb"\bvsword{Score}"\\
- \verb"\bhtword{Total}"& \verb"\bvtword{Total:}"
-\end{tabular}
+values, which are defined by the commands in the following table:
+\begin{center}
+ \begin{tabular}{l@{\quad}l@{\quad}l}
+ \multicolumn{3}{c}{\bfseries Defaults for grading and point
+ tables}\\*[\bigskipamount]
+ \verb"\hqword{Question:}"& \verb"\vqword{Question}"&
+ \verb"\cellwidth{2em}"\\
+ \verb"\hpgword{Page:}"& \verb"\vpgword{Page}"&
+ \verb"\gradetablestretch{1.5}"\\
+ \verb"\hpword{Points:}"& \verb"\vpword{Points}"\\
+ \verb"\hsword{Score:}"& \verb"\vsword{Score}"\\
+ \verb"\htword{Total}"& \verb"\vtword{Total:}"\\[\medskipamount]
+%
+ \verb"\bhqword{Question:}"& \verb"\bvqword{Question}"\\
+ \verb"\bhpgword{Page:}"& \verb"\bvpgword{Page}"\\
+ \verb"\bhpword{Bonus Points:}"& \verb"\bvpword{Bonus Points}"\\
+ \verb"\bhsword{Score:}"& \verb"\bvsword{Score}"\\
+ \verb"\bhtword{Total}"& \verb"\bvtword{Total:}"\\[\medskipamount]
+%
+ \verb"\chqword{Question:}"& \verb"\cvqword{Question}"\\
+ \verb"\chpgword{Page:}"& \verb"\cvpgword{Page}"\\
+ \verb"\chpword{Points:}"& \verb"\cvpword{Points}"\\
+ \verb"\chbpword{Bonus Points:}"& \verb"\cvbpword{Bonus Points}"\\
+ \verb"\chsword{Score:}"& \verb"\cvsword{Score}"\\
+ \verb"\chtword{Total}"& \verb"\cvtword{Total:}"
+ \end{tabular}
\end{center}
-\medskip
+\bigskip
For example, if you type
\begin{verbatim}
\begin{center}
@@ -4318,7 +6050,7 @@ For example, if you type
then you'll get
\begin{center}
\cwidth=2.2em
- \renewcommand\arraystretch{1.5}
+ \renewcommand{\arraystretch}{1.5}
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|}
\hline
Aufgabe Nr.:& 1& 2& 3& 4& 5& 6& 7& 8& \textbf{Summe}\\
@@ -4348,11 +6080,24 @@ then you'll get
\end{tabular}
\end{center}
+\index{point table!customization|)}
+\index{grade table!customization|)}
+\index{customization!point table|)}
+\index{customization!grading table|)}
+
+
+\indcstop{pointtable}
+\indcstop{gradetable}
+\index{point table|)}
+\index{grading table|)}
+
%--------------------------------------------------------------------
%--------------------------------------------------------------------
\section{Changing the page margins}
\label{sec:pagesize}
+\index{margins|(}
+\index{customization!margins|(}
The exam document class arranges things so that you get one inch
margins at the top, bottom, and sides no matter what size paper you
@@ -4363,11 +6108,11 @@ can change the sizes of these margins by using the commands that
change the size of the printed area.
To change the width of the printed area, you would use the
-\verb"\extrawidth" command. The \verb"\extrawidth" command takes one
-argument, and enlarges the width of the printed area by the amount of
-the argument. It keeps the printed area centered as it changes its
-width. If the argument is negative, then the width of the printed
-area is decreased.
+\verb"\extrawidth"\indc{extrawidth} command. The \verb"\extrawidth"
+command takes one argument, and enlarges the width of the printed area
+by the amount of the argument. It keeps the printed area centered as
+it changes its width. If the argument is negative, then the width of
+the printed area is decreased.
For example, to enlarge the left and right margins by one half inch
each, you would use the command
@@ -4388,8 +6133,9 @@ To change the height of the printed area, you must choose whether the
top or the bottom of the printed area (or possibly both) should move.
The commands for this are principally intended to allow additional
room for large headers and footers, and so they are called
-\verb"\extraheadheight" and \verb"\extrafootheight". For a full
-description of these commands, see section~\ref{sec:extra-room}.
+\verb"\extraheadheight"\indc{extraheadheight} and
+\verb"\extrafootheight"\indc{extrafootheight}. For a full description
+of these commands, see section~\ref{sec:extra-room}.
To move the top of the printed region (and any header that's present)
downwards, you use the command \verb"\extraheadheight". This command
@@ -4405,18 +6151,21 @@ command
\begin{center}
\verb"\extraheadheight{-.5in}"
\end{center}
-The \verb"\extraheadheight" command takes an optional argument to
-provide a top margin on the first page that's different from that on
-all other pages. For an explanation of this, see
+The
+%
+\verb"\extraheadheight"\indcsub{extraheadheight}{optional argument}%
+\index{head height!first page different} command takes an optional
+argument to provide a top margin on the first page that's different
+from that on all other pages. For an explanation of this, see
section~\ref{sec:extra-room}.
-
To move the bottom of the printed region (and any footer that's
-present) upwards, you use the command \verb"\extrafootheight". This
-command takes one argument, and moves the bottom of the text and the
-footer up by this amount (keeping the distance between the footer and
-the text constant). Thus, to increase the bottom margin by three
-quarters of an inch, you would give the command
+present) upwards, you use the command
+\verb"\extrafootheight"\indc{extrafootheight}. This command takes one
+argument, and moves the bottom of the text and the footer up by this
+amount (keeping the distance between the footer and the text
+constant). Thus, to increase the bottom margin by three quarters of
+an inch, you would give the command
\begin{center}
\verb"\extrafootheight{.75in}"
\end{center}
@@ -4425,27 +6174,34 @@ command
\begin{center}
\verb"\extrafootheight{-.5in}"
\end{center}
-The \verb"\extrafootheight" command takes an optional argument to
-provide a bottom margin on the first page that's different from that
-on all other pages. For an explanation of this, see
+The
+%
+\verb"\extrafootheight"\indcsub{extrafootheight}{optional argument}%
+\index{foot height!first page different} command takes an optional
+argument to provide a bottom margin on the first page that's different
+from that on all other pages. For an explanation of this, see
section~\ref{sec:extra-room}.
+\index{customization!margins|)}
+\index{margins|)}
+
%--------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Headers and footers}
\label{sec:headfoot}
-
-The following sections explain all of the technicalities of the
-commands that deal with headers and footers. There are a number of
-things to explain here, and so you may find it easier to skip this
-section and instead look at the examples in
-sections~\ref{sec:beginexamples} through~\ref{sec:endexamples} (on
-pages~\pageref{sec:beginexamples} through~\pageref{sec:endexamples}).
-You can then refer back to the technical sections for the full story
-on whatever isn't clear from the examples. All of the commands
-described in this section should be given in the preamble, i.e., after
-the \verb"\documentclass" command and before the
+\index{header|(}
+\index{footer|(}
+
+The following sections explain all of the commands that deal with
+headers and footers. There are a number of things to explain here,
+and so you may find it easier to skip these sections and instead look
+at the examples in sections~\ref{sec:beginexamples}
+through~\ref{sec:endexamples} (on pages~\pageref{sec:beginexamples}
+through~\pageref{sec:endexamples}). You can then refer back to these
+sections for the full story on whatever isn't clear from the examples.
+All of the commands described in these sections should be given in the
+preamble, i.e., after the \verb"\documentclass" command and before the
\verb"\begin{document}" command.
It's also important to remember that if you use a \verb"coverpages"
@@ -4458,6 +6214,10 @@ section~\ref{sec:Coverhdft}.
%---------------------------------------------------------------------
\subsection{Page styles: Headers and/or footers}
+\label{sec:pagestyle}
+\indcstart{pagestyle}
+\index{header!on or off}
+\index{footer!on or off}
It's the \verb"\pagestyle" command that determines whether the exam
will have headers, footers, both, or neither. The contents of the
@@ -4469,51 +6229,58 @@ footer that you construct will actually be placed onto the page. The
the \verb"\documentclass" command and before the
\verb"\begin{document}" command.
-To have both a header and a footer, give the command
+To have both a header and a footer, give the
+command\indt{headandfoot}\indc{pagestyle\{headandfoot\}}
\begin{center}
\verb"\pagestyle{headandfoot}"
\end{center}
If you want every page to have a header but no footer, give the
-command
-
+command\indt{head}\indc{pagestyle\{head\}}
\begin{center}
\verb"\pagestyle{head}"
\end{center}
-To give every page a footer but no header, give the command
+To give every page a footer but no header, give the
+command\indt{foot}\indc{pagestyle\{foot\}}
\begin{center}
\verb"\pagestyle{foot}"
\end{center}
Finally, to omit both the header and the footer from the page, give
-the command
+the command\indt{empty}\indc{pagestyle\{empty\}}
\begin{center}
\verb"\pagestyle{empty}"
\end{center}
As is true for all \LaTeX{} document classes, you can change the page
-style used on a single page by giving the command
+style used on a single page by giving the command\indc{thispagestyle}
\begin{center}
\verb"\thispagestyle{somestyle}"
\end{center}
somewhere on that page (where \verb"somestyle" is the style that you
want to use on that page). This is most often needed if you use the
-\verb"\maketitle" command, since that command inserts a
-\verb"\thispagestyle{plain}" immediately following the title. If you
-use the \verb"\maketitle" command and you want the entire document to
-use \verb"\pagestyle{headandfoot}", then you'll need to put the
-command \verb"\thispagestyle{headandfoot}" immediately after the
-\verb"\maketitle" command to override the \verb"\thispagestyle{plain}"
-that is inserted by \verb"\maketitle".
-
-The default page style is \verb"headandfoot". That is, if you don't
+\verb"\maketitle"\indc{maketitle}\indcsub{maketitle}{overriding}
+command, since that command inserts a \verb"\thispagestyle{plain}"
+immediately following the title. If you use the \verb"\maketitle"
+command and you want the entire document to use
+\verb"\pagestyle{headandfoot}", then you'll need to put the command
+\verb"\thispagestyle{headandfoot}"\indc{thispagestyle\{headandfoot\}}
+immediately after the \verb"\maketitle" command to override the
+\verb"\thispagestyle{plain}" that is inserted by \verb"\maketitle".
+
+The default page style is
+\verb"headandfoot"\indcsub{pagestyle}{default}. That is, if you don't
give any \verb"\pagestyle" commands, then the header and footer will
appear on every page. The default header is empty, and the default
footer consists of ``Page $n$'' centered in the footer (where $n$ is
the page number).
+\indcstop{pagestyle}
+
%---------------------------------------------------------------------
\subsection{The three parts of the header}
\label{sec:header}
+\index{header!three parts|(}
+
The header is specified in three parts:
\begin{itemize}
\item One part to be left justified.
@@ -4526,24 +6293,30 @@ specify all three parts of the header, or the commands
\verb"\firstpageheader" and \verb"\runningheader" to specify a
different header for the first page (see
section~\ref{sec:runningheader}). The second uses the commands
-\verb"\lhead", \verb"\chead", and \verb"\rhead", each of which takes
-an optional argument to specify a different header for the first page
-(see section~\ref{sec:lhead}). All of these commands should be given
-in the preamble, i.e., after the \verb"\documentclass" command and
-before the \verb"\begin{document}" command.
+\verb"\lhead", \verb"\chead", and \verb"\rhead", each of which can
+have an optional argument to specify a different header for the first
+page (see section~\ref{sec:lhead}). All of these commands should be
+given in the preamble, i.e., after the \verb"\documentclass" command
+and before the \verb"\begin{document}" command.
%--------------------------------------------------------------------
-\subsubsection{Using \texttt{\char`\\header},
- \texttt{\char`\\firstpageheader} and \texttt{\char`\\runningheader}}
+\subsubsection{Using \texttt{\bs header}, \texttt{\bs firstpageheader} and
+ \texttt{\bs runningheader}}
\label{sec:runningheader}
+\indcstart{header}
+\indcstart{firstpageheader}
+\indcstart{runningheader}
The command \verb"\header{Text 1}{Text 2}{Text 3}" puts ``Text~1''
into the left justified header, ``Text~2'' into the centered header,
and ``Text~3'' into the right justified header on every page. If you
want the header on the first page to be different from that on the
other pages, then you should use the commands \verb"\firstpageheader"
-and \verb"\runningheader", which also take three arguments and affect
-either the first page or all pages except the first.
+and
+%
+\verb"\runningheader"\index{header!different on first page}, which
+also take three arguments and affect either the first page or all
+pages except the first.
For example, to put the header
@@ -4588,14 +6361,27 @@ appear on every page, you would give the command
{\bfseries\large First Exam\\July 4, 1776}
\end{verbatim}
+\indcstop{header}
+\indcstop{firstpageheader}
+\indcstop{runningheader}
%--------------------------------------------------------------------
-\subsubsection{Using \texttt{\char`\\lhead}, \texttt{\char`\\chead}
- and \texttt{\char`\\rhead}}
+\subsubsection{Using \texttt{\bs lhead}, \texttt{\bs chead} and \texttt{\bs rhead}}
\label{sec:lhead}
+\indcstart{lhead}
+\indcstart{chead}
+\indcstart{rhead}
+
The command \verb"\lhead{Text}" puts ``Text'' into the left justified
part of the header on every page. The command
+\index{header!different on first page}%
+\indcsub{lhead}{optional argument}%
+\indcsub{chead}{optional argument}%
+\indcsub{rhead}{optional argument}%
+\indcsub{lhead}{different on first page}%
+\indcsub{chead}{different on first page}%
+\indcsub{rhead}{different on first page}%
\verb"\lhead[Text 1]{Text 2}" puts ``Text~1'' into the left justified
header on the first page and ``Text~2'' into the left justified header
on all other pages. The commands \verb"\chead" and \verb"\rhead" have
@@ -4625,7 +6411,6 @@ then you would give the commands
\rhead{July 4, 1776}
\end{verbatim}
-
You can leave one or more of the three parts empty. To have the
header
\samplehead{Math 115}{Second Exam}{July 4, 1776}{}
@@ -4640,7 +6425,9 @@ on all other pages, you would give the commands
Any of the three parts of the header can have multiple lines. To
specify where the line breaks should go, you just type \verb"\\".
-Thus, to have the header
+Thus, to have the
+%
+header\index{header!multiple lines}
\samplehead{\bfseries\large Math 115\\Professor Hilbert}{}
{\bfseries\large First Exam\\July 4, 1776}{}
appear on every page, you would give the commands
@@ -4650,16 +6437,24 @@ appear on every page, you would give the commands
\rhead{\bfseries\large First Exam\\July 4, 1776}
\end{verbatim}
+\indcstop{lhead}
+\indcstop{chead}
+\indcstop{rhead}
+
+\index{header!three parts|)}
+
%---------------------------------------------------------------------
\subsubsection*{Leaving extra room for multiple line headers}
See section~\ref{sec:extra-room} for a description of the
-\verb"\extraheadheight" command.
+%
+\verb"\extraheadheight"\index{header!multiple lines} command.
%---------------------------------------------------------------------
\subsection{The three parts of the footer}
\label{sec:footer}
+\index{footer!three parts|(}
The footer is composed of three parts, the whole setup being similar
to that for the header (see section~\ref{sec:header}). There are two
@@ -4668,16 +6463,19 @@ The first uses the single command \verb"\footer" to specify all three
parts of the footer, or the commands \verb"\firstpagefooter" and
\verb"\runningfooter" to specify a different footer for the first page
(see section~\ref{sec:runningfooter}). The second uses the commands
-\verb"\lfoot", \verb"\cfoot", and \verb"\rfoot", each of which takes
-an optional argument to specify a different footer for the first page
-(see section~\ref{sec:lfoot}). All of these commands should be given
-in the preamble, i.e., after the \verb"\documentclass" command and
-before the \verb"\begin{document}" command.
+\verb"\lfoot", \verb"\cfoot", and \verb"\rfoot", each of which can
+have an optional argument to specify a different footer for the first
+page (see section~\ref{sec:lfoot}). All of these commands should be
+given in the preamble, i.e., after the \verb"\documentclass" command
+and before the \verb"\begin{document}" command.
%--------------------------------------------------------------------
-\subsubsection{Using \texttt{\char`\\footer},
- \texttt{\char`\\firstpagefooter} and \texttt{\char`\\runningfooter}}
+\subsubsection{Using \texttt{\bs footer}, \texttt{\bs firstpagefooter}
+ and \texttt{\bs runningfooter}}
\label{sec:runningfooter}
+\indcstart{footer}
+\indcstart{firstpagefooter}
+\indcstart{runningfooter}
The command \verb"\footer{Text 1}{Text 2}{Text 3}" puts ``Text~1''
into the left justified footer, ``Text~2'' into the centered footer
@@ -4697,10 +6495,17 @@ on all pages after the first, you would give the commands
(For an explanation of the \verb"\numpages" command, see
section~\ref{sec:numpages}.)
+\indcstop{footer}
+\indcstop{firstpagefooter}
+\indcstop{runningfooter}
+
%--------------------------------------------------------------------
-\subsubsection{Using \texttt{\char`\\lfoot}, \texttt{\char`\\cfoot}
- and \texttt{\char`\\rfoot}}
+\subsubsection{Using \texttt{\bs lfoot}, \texttt{\bs cfoot}, and \texttt{\bs rfoot}}
\label{sec:lfoot}
+\indcstart{lfoot}
+\indcstart{cfoot}
+\indcstart{rfoot}
+
The command \verb"\lfoot{Text}" puts ``Text'' into the left justified
part of the footer on every page. The command
@@ -4721,6 +6526,12 @@ on all pages after the first, you would give the commands
(For an explanation of the \verb"\numpages" command, see
section~\ref{sec:numpages}.)
+\indcstop{lfoot}
+\indcstop{cfoot}
+\indcstop{rfoot}
+
+\index{footer!three parts|)}
+
%---------------------------------------------------------------------
\subsubsection*{Leaving extra room for multiple line footers}
@@ -4732,13 +6543,15 @@ See section~\ref{sec:extra-room} for a description of the
\label{sec:extra-room}
\subsubsection*{Headers}
+\index{header!with multiple lines|(}
+
If you specify more than one or two lines for any part of the header,
then you may want to move the header down slightly so that it doesn't
run off of the top of the paper. The command for this is
-\verb"\extraheadheight". You can also use the \verb"\extraheadheight"
-command to adjust the size of the text area. The
-\verb"\extraheadheight" command never changes the distance between the
-header and the text.
+\verb"\extraheadheight"\indc{extraheadheight}. You can also use the
+\verb"\extraheadheight" command to adjust the size of the text area.
+The \verb"\extraheadheight" command never changes the distance between
+the header and the text.
For example, to move the header and the text an additional half inch
down from the top of the page, you would give the command
@@ -4759,7 +6572,9 @@ same syntax as in the \verb"\lhead", \verb"\chead", and \verb"\rhead"
commands (see section~\ref{sec:lhead}): Include an optional argument
giving the extra head height for the first page, and the required
argument will apply only to those pages after the first. For example,
-the command
+the
+%
+command\indcsub{extraheadheight}{different on first page}
\begin{center}
\verb"\extraheadheight[.5in]{.25in}"
\end{center}
@@ -4775,17 +6590,22 @@ then this will be interpreted as if it was
\end{center}
Note that the braces \emph{must} appear.
-If you give an \verb"\extraheadheight" command, it should be in the
-preamble, i.e., after the \verb"\documentclass" command and before the
-\verb"\begin{document}" command. The \verb"\extraheadheight" command
-can also be used to change the size of the text region (see
-section~\ref{sec:pagesize}).
+If you give an \verb"\extraheadheight"\indc{extraheadheight} command,
+it should be in the preamble, i.e., after the \verb"\documentclass"
+command and before the \verb"\begin{document}" command. The
+ \verb"\extraheadheight" command can also be used to change the size
+ of the text region (see section~\ref{sec:pagesize}).
+
+\index{header!with multiple lines|)}
%--------------------------------------------------------------------
\subsubsection*{Footers}
+\index{footer!with multiple lines|(}
+
+
To leave extra room for multiple line footers, you use the command
\verb"\extrafootheight". To move the footer one half inch higher up
-on the paper, you would give the command
+on the paper, you would give the command\indc{extrafootheight}
\begin{center}
\verb"\extrafootheight{.5in}"
\end{center}
@@ -4801,7 +6621,9 @@ same syntax as in the \verb"\lfoot", \verb"\cfoot", and \verb"\rfoot"
commands (see section~\ref{sec:lfoot}): Include an optional argument
giving the extra foot height for the first page, and the required
argument will apply only to those pages after the first. For example,
-the command
+the
+%
+command\indcsub{extrafootheight}{different on first page}
\begin{center}
\verb"\extrafootheight[.5in]{.25in}"
\end{center}
@@ -4817,15 +6639,21 @@ then this will be interpreted as if it was
\end{center}
Note that the braces \emph{must} appear.
-If you give an \verb"\extrafootheight" command, it should be in the
-preamble, i.e., after the \verb"\documentclass" command and before the
-\verb"\begin{document}" command. The \verb"\extrafootheight" command
-can also be used to change the size of the text region (see
-section~\ref{sec:pagesize}).
+If you give an \verb"\extrafootheight"\indc{extrafootheight} command,
+it should be in the preamble, i.e., after the \verb"\documentclass"
+command and before the \verb"\begin{document}" command. The
+ \verb"\extrafootheight" command can also be used to change the size
+ of the text region (see section~\ref{sec:pagesize}).
+
+\index{footer!with multiple lines|)}
+
%---------------------------------------------------------------------
\subsection{Horizontal rules}
\label{sec:rules}
+\index{rule!in header or footer|(}
+\index{header!rule|(}
+\index{footer!rule|(}
The \verb"exam" document class make it easy to put a horizontal rule
under the header and one above the footer. It is also easy to do
@@ -4833,18 +6661,18 @@ this for the pages after the first page without affecting the first
page.
\begin{itemize}
-\item The command \verb"\runningheadrule" puts a horizontal rule below
- the header on all pages after the first.
-\item The command \verb"\firstpageheadrule" puts a rule under the
- header of only the first page.
-\item The command \verb"\headrule" is equivalent to the two commands
- \verb"\firstpageheadrule" and \verb"\runningheadrule".
-\item The command \verb"\runningfootrule" puts a horizontal rule above
- the footer on all pages after the first.
-\item The command \verb"\firstpagefootrule" puts a rule above the
- footer of only the first page.
-\item The command \verb"\footrule" is equivalent to the two commands
- \verb"\firstpagefootrule" and \verb"\runningfootrule".
+\item The command \verb"\runningheadrule"\indc{runningheadrule} puts a
+ horizontal rule below the header on all pages after the first.
+\item The command \verb"\firstpageheadrule"\indc{firstpageheadrule}
+ puts a rule under the header of only the first page.
+\item The command \verb"\headrule"\indc{headrule} is equivalent to the
+ two commands \verb"\firstpageheadrule" and \verb"\runningheadrule".
+\item The command \verb"\runningfootrule"\indc{runningfootrule} puts a
+ horizontal rule above the footer on all pages after the first.
+\item The command \verb"\firstpagefootrule"\indc{firstpagefootrule}
+ puts a rule above the footer of only the first page.
+\item The command \verb"\footrule"\indc{footrule} is equivalent to the
+ two commands \verb"\firstpagefootrule" and \verb"\runningfootrule".
\end{itemize}
For example, to have the header
\samplehead{Math 115}{First Exam}{July 4, 1776}{}
@@ -4878,18 +6706,22 @@ on all pages after the first, give the commands
\cfoot[]{Page \thepage\ of \numpages}
\rfoot{}
\end{verbatim}
-(see section~\ref{sec:numpages} for an explanation of the command
-\verb"\numpages").
+(For an explanation of the \verb"\numpages" command, see
+section~\ref{sec:numpages}.)
+
+\index{rule!in header or footer|)}
+\index{header!rule|)}
+\index{footer!rule|)}
+
%---------------------------------------------------------------------
\subsection{Listing the number of pages in the exam}
\label{sec:numpages}
-The \verb"exam" document class defines the command \verb"\numpages"
-so that it will expand to the number of pages in the exam. Thus, to
-have the footer
-\samplefoot{}{}{Page \thepage\ of \numpages}{}
-you should either give the command
+The \verb"exam" document class defines the command
+\verb"\numpages"\indc{numpages} so that it will expand to the number
+of pages in the exam. Thus, to have the footer \samplefoot{}{}{Page
+ \thepage\ of \numpages}{} you should either give the command
\begin{verbatim}
\footer{}{Page \thepage\ of \numpages}{}
\end{verbatim}
@@ -4904,17 +6736,36 @@ section~\ref{sec:runningfooter}; for a description of the commands
\verb"\lfoot", \verb"\cfoot", and \verb"\rfoot", see
section~\ref{sec:lfoot}.
+Note that if your document has a \texttt{coverpages} environment, then
+those pages will not be counted in
+%
+\verb"\numpages"\indcsub{numpages}{doesn't count cover pages}; the
+\texttt{exam} document class defines the command
+\verb"\numcoverpages"\indc{numcoverpages} so that it will expand to
+the number of cover pages in the exam. If there is no
+\texttt{coverpages}\indt{coverpages}\index{environment!coverpages}
+environment, then \verb"\numcoverpages" expands to 0. The
+\texttt{exam} class also defines the command
+\verb"\totalnumpages"\indc{totalnumpages}, which expands to the sum of
+\verb"\numpages" and \verb"\numcoverpages". Note that if there are
+pages preceding a \texttt{coverpages} environment, then those pages
+will not be counted by \verb"\totalnumpages".
+
As with all other cross referencing commands in \LaTeX, you'll have to
run the file through \LaTeX{} \emph{twice} to be sure that
-\verb"\numpages" is correct.
+\verb"\numpages", \verb"\numcoverpages", and \verb"\totalnumpages" are
+correct.
+
+
%---------------------------------------------------------------------
\subsection{Treating the last page differently}
\label{sec:lastpage}
+\index{last page|(}
If you want to vary the text that appears in the header or footer on
-the last page of the exam, you should use the command
-\verb"\iflastpage". The command
+the last page of the exam, you should use the command
+\verb"\iflastpage"\indc{iflastpage}. The command
\begin{center}
\verb"\iflastpage{Text 1}{Text 2}"
\end{center}
@@ -4946,14 +6797,18 @@ section~\ref{sec:lfoot}.
As with all other cross referencing commands in \LaTeX, you'll have to
run the file through \LaTeX{} \emph{twice} to be sure that
-\verb"\iflastpage" correctly detects the last page.
+\verb"\iflastpage"\indc{iflastpage} correctly detects the last page.
+
+\index{last page|)}
%--------------------------------------------------------------------
\subsection{Treating odd and even numbered pages differently}
+\index{odd pages!different from even pages|(}
+\index{even pages!different from odd pages|(}
If you'd like odd and even numbered pages to be treated differently
(perhaps because you'll be printing onto both sides of the paper), you
-should use the \verb"\oddeven" command.
+should use the \verb"\oddeven"\indc{oddeven} command.
The \verb"\oddeven" command takes two arguments. If the current page
number is odd it expands to the first argument; otherwise, it expands
@@ -4961,7 +6816,7 @@ to the second argument.
For example, to have the page number printed in the right head on odd
numbered pages and in the left head on even numbered pages, you should
-give the command
+give the command\indc{oddeven}
\begin{verbatim}
\header{\oddeven{}{\thepage}}%
{}%
@@ -4979,7 +6834,7 @@ If you want the footer of the even numbered pages to be empty and the
footer of the odd numbered pages to contain the centered message
``Please continue\dots'', except that the last page of the exam should
have an empty footer whether its page number is even or odd, then you
-should give the command
+should give the command\indc{iflastpage}
\begin{verbatim}
\footer{}
{\oddeven{\iflastpage{}{Please continue\ldots}}{}}
@@ -4996,52 +6851,85 @@ or the commands
(see section~\ref{sec:lastpage} for an explanation of
\verb"\iflastpage").
-The \verb"\oddeven" command can be used reliably only in headers and
-footers. This is because \LaTeX{} generally processes more text than
-can fit on the current page before it outputs a page. When the
-\verb"\oddeven" command is encountered it will act as though it will
-appear on the current page whether it will actually be printed on that
-page or on the following page; in headers and footers this never
-creates a problem.
+The \verb"\oddeven"\indcsub{oddeven}{only in headers and footers}
+command can be used reliably only in headers and footers. This is
+because \LaTeX{} generally processes more text than can fit on the
+current page before it outputs a page. When the \verb"\oddeven"
+command is encountered it will act as though it will appear on the
+current page whether it will actually be printed on that page or on
+the following page; in headers and footers this never creates a
+problem.
+\index{odd pages!different from even pages|)}
+\index{even pages!different from odd pages|)}
%--------------------------------------------------------------------
\subsection{Questions that span multiple pages}
\label{sec:QuesSpan}
+\index{questions!that span multiple pages|(}
-The exam document class provides the commands \verb"\ifcontinuation",
-\verb"\ContinuedQuestion", \verb"\ifincomplete", and
-\verb"\IncompleteQuestion" to enable headers and footers that announce
-whether this page is continuing a question begun on an earlier page
-(and, if so, the number of that question) and whether the question at
-the bottom of this page continues onto the next page (and, if so, the
-number of that question).
-
+The exam document class provides the commands
+\begin{itemize}
+\item \verb"\ifcontinuation"\indc{ifcontinuation} and
+ \verb"\ContinuedQuestion"\indc{ContinuedQuestion} to enable headers
+ and footers that announce whether the current page is continuing a
+ question begun on an earlier page and, if so, the number of that
+ question (see section~\ref{sec:ifcontin}).
+
+ There is also a command
+ \verb"\nomorequestions"\indc{nomorequestions} to mark the point at
+ which the last question ends, which can be useful if you want to
+ include supplementary material (e.g., tables or figures) at the end
+ of the exam but you don't want that material to be described as
+ continuing the last question (see section~\ref{sec:ifcontin}).
+\end{itemize}
+The exam class also provides the commands
+\begin{itemize}
+\item \verb"\ifincomplete"\indc{ifincomplete} and
+ \verb"\IncompleteQuestion"\indc{IncompleteQuestion} to enable
+ headers and footers that announce whether the question at the bottom
+ of the current page continues onto the next page and, if so, the
+ number of that question (see section~\ref{sec:ifincomp}).
+
+ The \verb"\ifincomplete"\indc{ifincomplete} command works by looking
+ for a part, subpart, subsubpart, choice, or CorrectChoice that
+ starts on a later page. For the rare case when one of those objects
+ spills onto the following page but none of them start on a following
+ page, there is also a command
+ \verb"\addquestionobject"\indc{addquestionobject} that you can
+ insert at the end of the last object of a question to inform the
+ \verb"\ifincomplete" command that some object of the question
+ appears on that following page (see section~\ref{sec:ifincomp}).
+\end{itemize}
\emph{These commands are only guaranteed to work in headers and
- footers.} If you use any of them elsewhere, they may be fooled by
-\LaTeX's practice of typesetting a bit too much material to fit on a
-page before it chooses the page break and ships out the page. They
-also assume that there is only one \verb"questions" environment in the
-entire exam.
-
-There is also a command \verb"\nomorequestions" to mark the point at
-which the last question ends, which can be useful if you want to
-include supplementary material (e.g., tables or figures) at the end of
-the exam but you don't want that material to be described as
-continuing the last question.
+ footers.}%
+\indcsub{ifcontinuation}{reliable only in headers and footers}%
+\indc{ContinuedQuestion}{reliable only in headers and footers}%
+\indcsub{ifincomplete}{reliable only in headers and footers}%
+\indcsub{IncompleteQuestion}{reliable only in headers and footers} If you
+use any of them elsewhere, they may be fooled by \LaTeX's practice of
+typesetting a bit too much material to fit on a page before it chooses
+the page break and ships out the page. They also assume that there is
+only one \verb"questions" environment in the entire exam.
-\medskip
+%--------------------------------------------------------------------
+\subsubsection{Questions continuing from the previous page}
+\label{sec:ifcontin}
+
+Headers and footers can announce whether the current page continues a
+question begun on an earlier page.
In more detail:
\begin{itemize}
\item \verb"\ifcontinuation{Text 1}{Text 2}"\\
- Expands to `Text 2' if the first question, part, subpart,
- subsubpart, or choice that begins on this page is a question, and to
- `Text 1' if it's a part, subpart, subsubpart, or choice. It also
- expands to `Text 1' if no question, part, subpart, subsubpart, or
- choice begins on this page and we're not beyond a page with the
- command \verb"\nomorequestions" or before the page with question
- number 1; otherwise, it expands to `Text2'.
+ \indc{ifcontinuation}Expands to `Text 2' if the first question,
+ part, subpart, subsubpart, choice, or CorrectChoice that begins on
+ this page is a question, and to `Text 1' if it's a part, subpart,
+ subsubpart, choice, or CorrectChoice. It also expands to `Text 1'
+ if no question, part, subpart, subsubpart, choice, or CorrectChoice
+ begins on this page and we're not beyond a page with the command
+ \verb"\nomorequestions" or before the page with question number 1;
+ otherwise, it expands to `Text2'.
That is, it expands to `Text 2' if
\begin{itemize}
@@ -5049,53 +6937,44 @@ In more detail:
\item this page is later than a page with the
\verb"\nomorequestions" command, or
\item a question begins on this page before any part, subpart,
- subsubpart, or choice begins,
+ subsubpart, choice, or CorrectChoice begins,
\end{itemize}
and otherwise it expands to `Text 1'.
\item \verb"\ContinuedQuestion"\\
- If a question begun on an earlier page continues on this page, then
+ \indc{ContinuedQuestion}If a question begun on an earlier page
+ continues on the current page, then the command
\verb"\ContinuedQuestion" expands to the number of that question.
That is, \verb"\ContinuedQuestion" expands to the number of the last
- question begun before this page if either
+ question begun before the current page if either
\begin{itemize}
- \item the first question, part, subpart, subsubpart, or choice that
- begins on this page is a part, subpart, subsubpart, or choice, or
- \item this page doesn't contain the beginning of any question, part,
- subpart, subsubpart, or choice.
+ \item the first question, part, subpart, subsubpart, choice, or
+ CorrectChoice that begins on the current page is a part, subpart,
+ subsubpart, choice, or CorrectChoice, or
+ \item the current page doesn't contain the beginning of any
+ question, part, subpart, subsubpart, choice, or CorrectChoice.
\end{itemize}
-\item \verb"\ifincomplete{Text 1}{Text 2}"\\
- Expands to \verb"Text 1" if we have not yet encountered a
- \verb"\nomorequestions" command and if the last question begun on or
- before this page has a part, subpart, subsubpart, or choice that
- begins on a later page. Otherwise, it expands to \verb"Text 2".
-
-\item \verb"\IncompleteQuestion"\\
- If the last question begun on or before this page has a part,
- subpart, subsubpart, or choice that begins on a later page, then
- this expands to the number of that question.
-
\item \verb"\nomorequestions"\\
- No page following the page on which this command was given will be
- considered to continue a question from an earlier page. Thus, if
- you give this command after the last question is complete, then you
- can include extra material (e.g., tables for use on the exam)
- without having those pages labelled as continuing the last question
- on the exam.
+ \indc{nomorequestions}No page following the page on which this
+ command was given will be considered to continue a question from an
+ earlier page. Thus, if you give this command after the last
+ question is complete, then you can include extra material (e.g.,
+ tables for use on the exam) without having those pages labelled as
+ continuing the last question on the exam.
\end{itemize}
\medskip
-Thus, to have the header
+For example, to have the header
\samplehead{}{First Exam}{Page 4}{}
%
on all pages that begin a new question and the header
\samplehead{Question 6 continues\ldots}{First Exam}{Page 4}{}
%
on all pages that continue a question begun on a previous page, you
-would give the commands
+would give the commands\indc{ContinuedQuestion}\indc{ifcontinuation}
\begin{verbatim}
\lhead{\ifcontinuation{Question \ContinuedQuestion\ continues\ldots}{}}
\chead{First Exam}
@@ -5104,9 +6983,43 @@ would give the commands
(See section~\ref{sec:lhead} for an explanation of \verb"\lhead",
\verb"\chead" and \verb"\rhead".)
+%--------------------------------------------------------------------
+\subsubsection{Questions that continue onto the next page}
+\label{sec:ifincomp}
+
+Headers and footers can announce whether a question continues onto the
+next page.
+
+\begin{itemize}
+\item \verb"\ifincomplete{Text 1}{Text 2}"\\
+ \indc{ifincomplete}Expands to \verb"Text 1" if we have not yet
+ encountered a \verb"\nomorequestions" command and if the last
+ question begun on or before the current page has a part, subpart,
+ subsubpart, choice, or CorrectChoice that begins on a later page.
+ Otherwise, it expands to \verb"Text 2".
+
+\item \verb"\IncompleteQuestion"\\
+ \indc{IncompleteQuestion}If the last question begun on or before the
+ current page has a part, subpart, subsubpart, choice, or
+ CorrectChoice that begins on a later page, then this expands to the
+ number of that question.
+\end{itemize}
+
+For the rare case when a question, part, subpart, subsubpart, choice,
+or CorrectChoice spills onto the following page but none of them start
+on a following page (and so the \verb"\ifincomplete" command will
+mistakenly think that the current question is complete), you can give
+the command\indc{addquestionobject}
+\begin{center}
+ \verb"\addquestionobject"
+\end{center}
+at the end of the last object of a question to inform the
+\verb"\ifincomplete" command that some of the question appears on that
+following page.
+
\medskip
-To have the footer
+For example, to have the footer
\samplefoot{\hrule}{}{Question 3 continues\ldots}{}
%
on all pages that end with a question that will be continued onto the
@@ -5116,12 +7029,15 @@ next page, the footer
on the last page, and the footer
\samplefoot{\hrule}{}{Exam continues\ldots}{}
%
-on all other pages, you would give the commands
+on all other pages, you would give the
+commands\indc{ifincomplete}\indc{IncompleteQuestion}\indc{iflastpage}
\begin{verbatim}
\footrule
\lfoot{}
-\newcommand\continues{\ifincomplete{\incompletemessage}{Exam continues\ldots}}
-\newcommand\incompletemessage{Question \IncompleteQuestion\ continues\ldots}
+\newcommand{\continues}{\ifincomplete{\incompletemessage}
+ {Exam continues\ldots}}
+\newcommand{\incompletemessage}
+ {Question \IncompleteQuestion\ continues\ldots}
\cfoot{\iflastpage{End of Exam}{\continues}}
\rfoot{}
\end{verbatim}
@@ -5129,22 +7045,26 @@ on all other pages, you would give the commands
\verb"\cfoot" and \verb"\rfoot", and section~\ref{sec:lastpage} for an
explanation of \verb"\iflastpage").
-
-
-
-
+\index{questions!that span multiple pages|)}
%--------------------------------------------------------------------
\subsection{Examples}
+\indcstart{lhead}
+\indcstart{chead}
+\indcstart{rhead}
+\indcstart{lfoot}
+\indcstart{cfoot}
+\indcstart{rfoot}
\begin{example}
-\label{sec:beginexamples}
-To have the header
-\samplehead{Math 115}{First Exam}{July 4, 1776}{}
-on the first page, the header
-\samplehead{Math 115}{First Exam, Page 2 of 5}{July 4, 1776}{\hrule}
-on all pages after the first, and no footer on any page, give the
-commands
+ \label{sec:beginexamples}
+ To have the header
+ \samplehead{Math 115}{First Exam}{July 4, 1776}{}
+ on the first page, the header
+ \samplehead{Math 115}{First Exam, Page 2 of 5}{July 4, 1776}{\hrule}
+ on all pages after the first, and no footer on any page, give the
+ commands\indc{firstpageheader}\indc{runningheader}%
+ \indc{runningheadrule}
\begin{verbatim}
\pagestyle{head}
\runningheadrule
@@ -5153,7 +7073,7 @@ commands
{First Exam, Page \thepage\ of \numpages}
{July 4, 1776}
\end{verbatim}
-Alternatively, you could give the commands
+ Alternatively, you could give the commands
\begin{verbatim}
\pagestyle{head}
\runningheadrule
@@ -5166,12 +7086,14 @@ Alternatively, you could give the commands
%--------------------------------------------------------------------
\begin{example}
-To have the header
-\samplehead{Math 115}{First Exam}{July 4, 1776}{}
-on the first page, no header on the pages after the first, no footer
-on the first page, and the footer
-\samplefoot{\hrule}{Math 115}{First Exam}{Page 2 of 5}
-on all pages after the first, give the commands
+ To have the header
+ \samplehead{Math 115}{First Exam}{July 4, 1776}{}
+ on the first page, no header on the pages after the first, no footer
+ on the first page, and the footer
+ \samplefoot{\hrule}{Math 115}{First Exam}{Page 2 of 5}
+ on all pages after the first, give the
+ commands\indc{runningfootrule}\indc{firstpageheader}%
+ \indc{runningheader}\indc{firstpagefooter}\indc{runningfooter}
\begin{verbatim}
\pagestyle{headandfoot}
\runningfootrule
@@ -5180,7 +7102,7 @@ on all pages after the first, give the commands
\firstpagefooter{}{}{}
\runningfooter{Math 115}{First Exam}{Page \thepage\ of \numpages}
\end{verbatim}
-Alternatively, you could give the commands
+ Alternatively, you could give the commands
\begin{verbatim}
\pagestyle{headandfoot}
\runningfootrule
@@ -5196,18 +7118,20 @@ Alternatively, you could give the commands
%--------------------------------------------------------------------
\begin{example}
-To have the header
-\samplehead{\large\bfseries Mathematics 115\\
- First Exam, July 4, 1776}%
- {}{\large\bfseries Name:\enspace\makebox[2in]{\hrulefill}}{}
-on the first page, the header
-\samplehead{\large\bfseries Mathematics 115\\
- First Exam, July 4, 1776}%
- {}{}{}
-on all pages after the first, an empty footer on the first page, and
-the footer
-\samplefoot{}{}{Page 2}{}
-on all pages after the first, give the commands
+ To have the header
+ \samplehead{\large\bfseries Mathematics 115\\
+ First Exam, July 4, 1776}%
+ {}{\large\bfseries Name:\enspace\makebox[2in]{\hrulefill}}{}
+ on the first page, the header
+ \samplehead{\large\bfseries Mathematics 115\\
+ First Exam, July 4, 1776}%
+ {}{}{}
+ on all pages after the first, an empty footer on the first page, and
+ the footer
+ \samplefoot{}{}{Page 2}{}
+ on all pages after the first, give the
+ commands\indc{firstpageheader}\indc{runningheader}%
+ \indc{firstpagefooter}\indc{runningfooter}
\begin{verbatim}
\pagestyle{headandfoot}
\firstpageheader{\large\bfseries Mathematics 115\\
@@ -5219,7 +7143,7 @@ on all pages after the first, give the commands
\firstpagefooter{}{}{}
\runningfooter{}{Page \thepage}{}
\end{verbatim}
-Alternatively, you could give the commands
+ Alternatively, you could give the commands
\begin{verbatim}
\pagestyle{headandfoot}
\lhead{\large\bfseries Mathematics 115\\ First Exam, July 4, 1776}
@@ -5234,25 +7158,28 @@ Alternatively, you could give the commands
%--------------------------------------------------------------------
\begin{example}
-To have the header
-\samplehead{}
- {Wellesley College\\
- Second Semester Final Examination, Spring 1993\\
- Mathematics 115}
- {}
- {}
-on the first page, the header
-\samplehead{}
- {Wellesley College\\
- Second Semester Final Examination, Spring 1993\\
- Mathematics 115 (Continued)}
- {}
- {}
-on all pages after the first, the footer
-\samplefoot{}{}{Page 3 of 10}{Please go on to the next page\ldots}
-on all pages \emph{except the last} page, and the footer
-\samplefoot{}{}{Page 10 of 10}{End of exam.}
-on the last page, give the commands
+ To have the header
+ \samplehead{}
+ {Wellesley College\\
+ Second Semester Final Examination, Spring 1993\\
+ Mathematics 115}
+ {}
+ {}
+ on the first page, the header
+ \samplehead{}
+ {Wellesley College\\
+ Second Semester Final Examination, Spring 1993\\
+ Mathematics 115 (Continued)}
+ {}
+ {}
+ on all pages after the first, the footer
+ \samplefoot{}{}{Page 3 of 10}{Please go on to the next page\ldots}
+ on all pages \emph{except the last} page, and the footer
+ \samplefoot{}{}{Page 10 of 10}{End of exam.}
+ on the last page, give the
+ commands\indc{extraheadheight}\indc{firstpageheader}%
+ \indc{runningheader}\indc{footer}\indc{numpages}\indc{thepage}%
+ \indc{iflastpage}
\begin{verbatim}
\pagestyle{headandfoot}
\extraheadheight{.25in}
@@ -5270,7 +7197,7 @@ on the last page, give the commands
{Page \thepage\ of \numpages}
{\iflastpage{End of exam.}{Please go on to the next page\ldots}}
\end{verbatim}
-Alternatively, you could give the commands
+ Alternatively, you could give the commands
\begin{verbatim}
\pagestyle{headandfoot}
\extraheadheight{.25in}
@@ -5291,20 +7218,21 @@ Alternatively, you could give the commands
%--------------------------------------------------------------------
\begin{example}
-To have the header
-\samplehead{}
- {Wellesley College\\
- Second Semester Final Examination, Spring 1993\\
- Mathematics 115}
- {}
- {}
-on the first page, the header
-\samplehead{Mathematics 115 (Continued)}{}{Spring, 1993}{}
-on all pages after the first, the footer
-\samplefoot{}{}{Page 3 of 10}{Please go on to the next page\ldots}
-on all pages \emph{except the last} page, and the footer
-\samplefoot{}{}{Page 10 of 10}{End of exam.}
-on the last page, give the commands
+ To have the header
+ \samplehead{}
+ {Wellesley College\\
+ Second Semester Final Examination, Spring 1993\\
+ Mathematics 115}
+ {}
+ {}
+ on the first page, the header
+ \samplehead{Mathematics 115 (Continued)}{}{Spring, 1993}{}
+ on all pages after the first, the footer
+ \samplefoot{}{}{Page 3 of 10}{Please go on to the next page\ldots}
+ on all pages \emph{except the last} page, and the footer
+ \samplefoot{}{}{Page 10 of 10}{End of exam.}
+ on the last page, give the commands\indc{extraheadheight}%
+ \indc{firstpageheader}\indc{runningheader}\indc{footer}
\begin{verbatim}
\pagestyle{headandfoot}
\extraheadheight[.25in]{}
@@ -5318,7 +7246,7 @@ on the last page, give the commands
{Page \thepage\ of \numpages}
{\iflastpage{End of exam.}{Please go on to the next page\ldots}}
\end{verbatim}
-Alternatively, you could give the commands
+ Alternatively, you could give the commands
\begin{verbatim}
\pagestyle{headandfoot}
\extraheadheight[.25in]{}
@@ -5337,29 +7265,33 @@ Alternatively, you could give the commands
%--------------------------------------------------------------------
\begin{example}
-To have the header
+ To have the header
%
-\samplehead{Math 115}{First Exam}{July 4, 1776}{}
-on the first page, the header
+ \samplehead{Math 115}{First Exam}{July 4, 1776}{}
+ on the first page, the header
%
-\samplehead{Question 3 continues\ldots}{First Exam}{Page 3 of 10}{\hrule}
-on all pages after the first that continue a question begun on an
-earlier page, the header
+ \samplehead{Question 3 continues\ldots}{First Exam}{Page 3 of 10}{\hrule}
%
-\samplehead{}{First Exam}{Page 3 of 10}{\hrule}
-on all pages after the first that don't continue a question begun on
-an earlier page, the footer
+ on all pages after the first that continue a question begun on an
+ earlier page, the header
%
-\samplefoot{}{}{}{Question 6 continues on the next page\ldots}
+ \samplehead{}{First Exam}{Page 3 of 10}{\hrule}
+ on all pages after the first that don't continue a question begun on
+ an earlier page, the footer
%
-on all pages whose last question continues onto the following page,
-and no footer on pages that don't have a question that continues onto
-the following page, give the commands
+ \samplefoot{}{}{}{Question 6 continues on the next page\ldots}
%
+ on all pages whose last question continues onto the following page,
+ and no footer on pages that don't have a question that continues
+ onto the following page, give the
+ commands\indc{runningheadrule}\indc{ifcontinuation}%
+ \indc{ContinuedQuestion}\indc{firstpageheader}\indc{runningheader}%
+ \indc{footer}\indc{thepage}\indc{numpages}\indc{ifincomplete}%
+ \indc{IncompleteQuestion}
\begin{verbatim}
\pagestyle{headandfoot}
\runningheadrule
-\newcommand\continuedmessage{%
+\newcommand{\continuedmessage}{%
\ifcontinuation{Question \ContinuedQuestion\ continues\ldots}{}%
}
\firstpageheader{Math 115}{First Exam}{July 4, 1776}
@@ -5371,11 +7303,11 @@ the following page, give the commands
{\ifincomplete{Question \IncompleteQuestion\ continues
on the next page\ldots}{}}
\end{verbatim}
-Alternatively, you could give the commands
+ Alternatively, you could give the commands
\begin{verbatim}
\pagestyle{headandfoot}
\runningheadrule
-\newcommand\continuedmessage{%
+\newcommand{\continuedmessage}{%
\ifcontinuation{Question \ContinuedQuestion\ continues\ldots}{}%
}
\lhead[Math 115]{\continuedmessage}
@@ -5390,23 +7322,24 @@ Alternatively, you could give the commands
%--------------------------------------------------------------------
\begin{example}
-\label{sec:PtsPgEx}
-
-To have the header
+ \label{sec:PtsPgEx}
+ To have the header
%
-\samplehead{Math 115}{Second Exam}{July 4, 1776}{}
+ \samplehead{Math 115}{Second Exam}{July 4, 1776}{}
%
-on the first page, the header
+ on the first page, the header
%
-\samplehead{Second Exam}{}{July 4, 1776}{}
+ \samplehead{Second Exam}{}{July 4, 1776}{}
%
-on all pages after the first, no footer on the first page, and the
-footer
+ on all pages after the first, no footer on the first page, and the
+ footer
%
-\samplefoot{}{Page 3 of 5}{}{Points earned: \makebox[.5in]{\hrulefill}\\
+ \samplefoot{}{Page 3 of 5}{}{Points earned: \makebox[.5in]{\hrulefill}\\
out of a possible 20 points}
%
-on all pages after the first, give the commands
+ on all pages after the first, give the commands\indc{firstpageheader}%
+ \indc{runningheader}\indc{runningfooter}\indc{pointsonpage}%
+ \indc{thepage}\indc{numpages}
\begin{verbatim}
\pagestyle{headandfoot}
\firstpageheader{Math 115}{Second Exam}{July 4, 1776}
@@ -5416,7 +7349,7 @@ on all pages after the first, give the commands
{Points earned: \makebox[.5in]{\hrulefill}\\
out of a possible \pointsonpage{\thepage} points}
\end{verbatim}
-Alternatively, you could give the commands
+ Alternatively, you could give the commands
\begin{verbatim}
\pagestyle{headandfoot}
\lhead[Math 115]{Second Exam}
@@ -5432,47 +7365,49 @@ Alternatively, you could give the commands
%--------------------------------------------------------------------
\begin{example}
-\label{sec:endexamples}
-
-To have the header
+ \label{sec:endexamples}
+ To have the header
%
-\samplehead{Math 115}{Second Exam}{July 4, 1776}{}
+ \samplehead{Math 115}{Second Exam}{July 4, 1776}{}
%
-on the first page, the header
+ on the first page, the header
%
-\samplehead{}{Second Exam}{July 4, 1776}{}
+ \samplehead{}{Second Exam}{July 4, 1776}{}
%
-on all odd numbered pages after the first, the header
+ on all odd numbered pages after the first, the header
%
-\samplehead{Question 3 continues\ldots}{Math 115}{}{}
+ \samplehead{Question 3 continues\ldots}{Math 115}{}{}
%
-on all even numbered pages that continue a question begun on an
-earlier page, the header
+ on all even numbered pages that continue a question begun on an
+ earlier page, the header
%
-\samplehead{}{Math 115}{}{}
+ \samplehead{}{Math 115}{}{}
%
-on all even numbered pages that don't continue a question begun on an
-earlier page, the footer
+ on all even numbered pages that don't continue a question begun on
+ an earlier page, the footer
%
-\samplefoot{}{}{}{Page 5 of 10\\Question 6 continues\ldots}
+ \samplefoot{}{}{}{Page 5 of 10\\Question 6 continues\ldots}
%
-on all odd numbered pages that have a question that continues onto the
-following page, the footer
+ on all odd numbered pages that have a question that continues onto
+ the following page, the footer
%
-\samplefoot{}{}{}{Page 5 of 10}
+ \samplefoot{}{}{}{Page 5 of 10}
%
-on all odd numbered pages that don't have a question that continues
-onto the following page, and the footer
+ on all odd numbered pages that don't have a question that continues
+ onto the following page, and the footer
%
-\samplefoot{}{Page 4 of 10}{}{}
+ \samplefoot{}{Page 4 of 10}{}{}
%
-on all even numbered pages, give the commands
+ on all even numbered pages, give the commands\indc{ifcontinuation}%
+ \indc{thepage}\indc{numpages}\indc{IncompleteQuestion}%
+ \indc{firstpageheader}\indc{runningheader}\indc{oddeven}%
+ \indc{footer}
\begin{verbatim}
\pagestyle{headandfoot}
-\newcommand\continuedmessage{%
+\newcommand{\continuedmessage}{%
\ifcontinuation{Question \ContinuedQuestion\ continues\ldots}{}%
}
-\newcommand\oddrightfoot{%
+\newcommand{\oddrightfoot}{%
\ifincomplete{Page \thepage\ of \numpages\\
Question \IncompleteQuestion\ continues\ldots}%
{Page \thepage\ of \numpages}
@@ -5485,13 +7420,13 @@ on all even numbered pages, give the commands
{}
{\oddeven{\oddrightfoot}{}}
\end{verbatim}
-Alternatively, you could give the commands
+ Alternatively, you could give the commands
\begin{verbatim}
\pagestyle{headandfoot}
-\newcommand\continuedmessage{%
+\newcommand{\continuedmessage}{%
\ifcontinuation{Question \ContinuedQuestion\ continues\ldots}{}%
}
-\newcommand\oddrightfoot{%
+\newcommand{\oddrightfoot}{%
\ifincomplete{Page \thepage\ of \numpages\\
Question \IncompleteQuestion\ continues\ldots}%
{Page \thepage\ of \numpages}
@@ -5506,10 +7441,22 @@ Alternatively, you could give the commands
\end{example}
+\indcstop{lhead}
+\indcstop{chead}
+\indcstop{rhead}
+\indcstop{lfoot}
+\indcstop{cfoot}
+\indcstop{rfoot}
+\index{footer|)}
+\index{header|)}
+
%--------------------------------------------------------------------
%--------------------------------------------------------------------
\section{Cover pages}
\label{sec:coverpages}
+\index{cover pages|(}
+\index{environment!coverpages|(}
+\indtstart{coverpages}
There is a \verb"coverpages" environment that allows you to have one
or more pages before page~1 of the exam. By default, there are no
@@ -5541,6 +7488,8 @@ arabic numerals.
%--------------------------------------------------------------------
\subsection{Headers and footers}
\label{sec:Coverhdft}
+\index{header!on cover pages|(}
+\index{footer!on cover pages|(}
By default, the headers and footers on the cover pages are empty. If
you'd like to have headers and/or footers on the cover pages, there
@@ -5548,8 +7497,12 @@ are commands to create them that are completely analogous to the
commands described in section~\ref{sec:headfoot} for headers and
footers in the main part of the document. The commands for headers
and footers in cover pages and the corresponding commands for the main
-exam pages are:
-
+exam pages are:\indc{coverheader}\indc{coverrunningheader}%
+\indc{coverfirstpageheader}\indc{coverlhead}\indc{coverchead}%
+\indc{coverrhead}\indc{coverfooter}\indc{coverrunningfooter}%
+\indc{coverfirstpagefooter}\indc{coverlfoot}\indc{covercfoot}%
+\indc{coverrfoot}\indc{coverextraheadheight}%
+\indc{coverextrafootheight}
\begin{center}
\begin{tabular}{l@{\qquad\qquad}l}
Cover Pages Commands& Main Pages Commands\\[\medskipamount]
@@ -5581,8 +7534,57 @@ The commands \verb"\coverlhead", \verb"\coverchead",
for the main pages. For an explanation of these commands, see
section~\ref{sec:headfoot}.
+\index{header!on cover pages|)}
+\index{footer!on cover pages|)}
+
+%--------------------------------------------------------------------
+\subsection{Listing the number of cover pages}
+\label{sec:NumCvrpgs}
+\index{cover pages!counting|(}
+\indcstart{numcoverpages}
+\indcstart{totalnumpages}
+
+The \texttt{exam} document class defines the command
+\verb"\numcoverpages" so that it will expand to the number of cover
+pages in the exam. If there is no \texttt{coverpages} environment,
+then \verb"\numcoverpages" expands to 0. The \texttt{exam} class also
+defines the command \verb"\totalnumpages", which expands to the sum of
+\verb"\numpages" and \verb"\numcoverpages".
+\emph{Note:} if there are pages preceding a \texttt{coverpages}
+environment, then those pages will not be counted by
+\verb"\totalnumpages".
+
+For an example, to have the footer
+%
+\samplefoot{}{}{Page ii of iv}{}
+on all cover pages you should either give the
+command\indc{romannumeral}
+\begin{verbatim}
+\coverfooter{}{Page \thepage\ of \romannumeral\numcoverpages}{}
+\end{verbatim}
+or the commands
+\begin{verbatim}
+\coverlfoot{}
+\covercfoot{Page \thepage\ of \romannumeral\numcoverpages}
+\coverrfoot{}
+\end{verbatim}
+As with all other cross referencing commands in \LaTeX, you'll have to
+run the file through \LaTeX{} \emph{twice} to be sure that
+\verb"\numpages", \verb"\numcoverpages", and \verb"\totalnumpages" are
+correct.
+
+\index{cover pages!counting|)}
+\indcstop{numcoverpages}
+\indcstop{totalnumpages}
+\indtstop{coverpages}
+\index{environment!coverpages|)}
+\index{cover pages|)}
+%--------------------------------------------------------------------
+\clearpage
+\addcontentsline{toc}{section}{Index}
+\printindex
% The following is necessary to avoid warnings, since we have multiple
% questions environments in this documentation file: