summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/exam/examdoc.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-07-11 03:00:46 +0000
committerNorbert Preining <norbert@preining.info>2023-07-11 03:00:46 +0000
commit24bb3e3ee10fe79c39e9202be49c62c4d888f4ae (patch)
tree176d5ee37e8ab19ef7d3d91a357f3875c44ebccd /macros/latex/contrib/exam/examdoc.tex
parentab107e0f744efc9a2173da9b69e53fd83183988a (diff)
CTAN sync 202307110300
Diffstat (limited to 'macros/latex/contrib/exam/examdoc.tex')
-rw-r--r--macros/latex/contrib/exam/examdoc.tex104
1 files changed, 78 insertions, 26 deletions
diff --git a/macros/latex/contrib/exam/examdoc.tex b/macros/latex/contrib/exam/examdoc.tex
index dfca897c85..9b733c935b 100644
--- a/macros/latex/contrib/exam/examdoc.tex
+++ b/macros/latex/contrib/exam/examdoc.tex
@@ -8,7 +8,7 @@
% The exam documentclass itself is in the file exam.cls.
-%%% Copyright (c) 1997, 2000, 2004, 2008, 2011, 2015, 2017, 2021
+%%% Copyright (c) 1997, 2000, 2004, 2008, 2011, 2015, 2017, 2021, 2023
% Philip S. Hirschhorn
%
% This work may be distributed and/or modified under the
@@ -52,8 +52,8 @@
% Usage: \texttt{\bs documentclass}
\newcommand{\bs}{\texorpdfstring{\char`\\}{}}
-\newcommand{\docversion}{2.7}
-\newcommand{\docdate}{August 14, 2022}
+\newcommand{\docversion}{2.704}
+\newcommand{\docdate}{July 9, 2023}
%\newcommand{\docdate}{Draft: \today}
%--------------------------------------------------------------------
@@ -74,7 +74,7 @@
\newcommand{\indtsub}[2]{\index{#1@\texttt{#1}!#2}}
\newcommand{\indtstart}[1]{\index{#1@\texttt{#1}|(}}
\newcommand{\indtstop}[1]{\index{#1@\texttt{#1}|)}}
-
+\index{xcolor|see{color}}
%---------------------------------------------------------------------
\newenvironment{example}%
{\bigskip\filbreak
@@ -132,7 +132,7 @@
Wellesley, MA 02481\\
psh@math.mit.edu\\[\bigskipamount]
Copyright \copyright~1994, 1997, 2000, 2004, 2008, 2011, 2015, 2017,
- 2021\\
+ 2021, 2023\\
Philip Hirschhorn\\
All rights reserved}
@@ -3547,10 +3547,10 @@ 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}
+\verb"\usepackage{color}"\indt{color} (or \verb"\usepackage{xcolor}")
+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}
\begin{center}
\verb"\CorrectChoiceEmphasis{\color{red}}"
\end{center}
@@ -3558,9 +3558,10 @@ 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}
+\verb"\usepackage{color}"\indt{color} (or \verb"\usepackage{xcolor}")
+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}\bfseries}"
\end{center}
@@ -4219,9 +4220,10 @@ commands\indc{colorfillwithlines}\index{color package}
\verb"\colorfillwithlines"
\end{tabular}
\end{center}
-then the lines will be in color, by default a light gray. That
-default color was defined by the
-command\indc{definecolor}\indt{FillWithLinesColor}
+(or \verb"\usepackage{xcolor}" instead of
+\verb"\usepackage{color}")(or \verb"\usepackage{xcolor}") then the
+lines will be in color, by default a light gray. That default color
+was defined by the command\indc{definecolor}\indt{FillWithLinesColor}
\begin{center}
\verb"\definecolor{FillWithLinesColor}{gray}{0.8}"
\end{center}
@@ -4360,6 +4362,7 @@ commands\indc{colorfillwithdottedlines}\index{color package}
\verb"\colorfillwithdottedlines"
\end{tabular}
\end{center}
+(or \verb"\usepackage{xcolor}" instead of \verb"\usepackage{color}")
then the dotted lines will be in color, by default a light gray. That
default color was defined by the
command\indc{definecolor}\indt{FillWithDottedLinesColor}
@@ -4490,6 +4493,7 @@ commands\indc{colorgrids}\index{color package}
\verb"\colorgrids"
\end{tabular}
\end{center}
+(or \verb"\usepackage{xcolor}" instead of \verb"\usepackage{color}")
then the grids will be in color, by default a light gray. That
default color was defined by the
command\indc{definecolor}\indt{GridColor}
@@ -4605,7 +4609,8 @@ the following into your preamble (i.e., after the
{}
{Page \thepage\ of \numpages}
\end{verbatim}
-
+(You could also use \verb"\usepackage{xcolor}" instead of
+\verb"\usepackage{color}")
%--------------------------------------------------------------------
\subsubsection{Printing graph paper}
@@ -5072,9 +5077,11 @@ 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\indc{shadedsolutions}
+(or the \verb"xcolor" package with the command
+\verb"\usepackage{xcolor}") 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\indc{shadedsolutions}
\begin{center}
\verb"\shadedsolutions"
\end{center}
@@ -5246,10 +5253,11 @@ example, you give the command
\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}
+example, if you've given the command \verb"\usepackage{color}" (or
+\verb"\usepackage{xcolor}") 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}
@@ -5562,9 +5570,10 @@ If you've given the command
\begin{center}
\verb"\usepackage{color}"\index{color package}
\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\indc{colorsolutionboxes}
+(or \verb"\usepackage{xcolor}") 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\indc{colorsolutionboxes}
\begin{center}
\verb"\colorsolutionboxes"
\end{center}
@@ -5584,6 +5593,49 @@ the command\indc{nocolorsolutionboxes}
\verb"\nocolorsolutionboxes"
\end{center}
+%--------------------------------------------------------------------
+\subsection{Equations inside solutions}
+\label{sec:EqsInSolutions}
+
+If you use an \verb"equation" environment inside of a solution, then
+that environment (like all \verb"equation" environments) will be
+numbered using the \verb"equation" counter%
+\index{equation counter@\texttt{equation} counter}, which will affect
+the numbering of equations that follow. However, if you then print a
+version of your exam without using the \verb"\printanswers" command
+(or the documentclass option \verb"answers"), then the equation inside
+the solution environment will not appear, and this will change the
+equation numbers of the later \verb"equation" environments.
+
+If you want to avoid having \verb"equation" numbers change depending
+on whether or not solutions are being printed, you can do this either
+by using the documentclass option
+\begin{center}
+ \verb"solutionsreseteqcounter"
+\end{center}
+or by giving the command
+\begin{center}
+ \verb"\solutionsreseteqcounter"\indc{solutionsreseteqcounter}
+\end{center}
+at the beginning of your file. That command causes equation numbers
+inside each solution to be independent of the equation numbers outside
+of the solution environment or in other solution environments.
+
+In more detail: If you give the command
+\verb"\solutionsreseteqcounter" then every time you begin one of the
+solution environments, the \verb"equation" counter will be reset to
+zero (so that the first \verb"equation" environment in the solution
+will be number 1), and when you end that solution environment the
+\verb"equation" counter will be restored to whatever it was before the
+solution environment.
+
+If you've given the command \verb"\solutionsreseteqcounter" and you
+want to change back to not having solutions reset the equation
+counter, you can do that by giving the command
+\begin{center}
+ \verb"\nosolutionsreseteqcounter"\indc{nosolutionsreseteqcounter}
+\end{center}
+
%--------------------------------------------------------------------