From 329b84461d7088869ea05712d9d046c622fb05ac Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 1 Mar 2021 22:38:04 +0000 Subject: exam (1mar21) git-svn-id: svn://tug.org/texlive/trunk@58023 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/exam/exam.cls | 93 ++++++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 7 deletions(-) (limited to 'Master/texmf-dist/tex/latex/exam') diff --git a/Master/texmf-dist/tex/latex/exam/exam.cls b/Master/texmf-dist/tex/latex/exam/exam.cls index cc587b3d659..ae851ef2031 100644 --- a/Master/texmf-dist/tex/latex/exam/exam.cls +++ b/Master/texmf-dist/tex/latex/exam/exam.cls @@ -4,7 +4,7 @@ %% exam.cls %% Copyright (c) 1994, 1997, 2000, 2004, 2008, 2011, -%% 2015, 2017 Philip S. Hirschhorn +%% 2015, 2017, 2021 Philip S. Hirschhorn % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -32,8 +32,8 @@ % from my web page: http://www-math.mit.edu/~psh/ -\def\fileversion{2.603} -\def\filedate{2017/12/17} +\def\fileversion{2.7} +\def\filedate{2021/02/26} %--------------------------------------------------------------------- %--------------------------------------------------------------------- % @@ -85,6 +85,46 @@ %-------------------------------------------------------------------- % Changelog since version 2.4: +%-------------------------------------------------------------------- +% Version 2.7, 2021/02/26 + +% No longer betatest. + +%-------------------------------------------------------------------- +% Version 2.607$\beta$, 2019/07/21 + +% We fixed a bug, apparently introduced in version 2.602, that affected +% vertical point tables (both regular and bonus, but not combined), +% shifting the total points in the table towards the right of the cell, +% rather than having the total points centered. The fix was to delete +% an \hspace*{\fill} that had no business being there. + +% -------------------------------------------------------------------- +% Version 2.606$\beta$, 2019/02/17 + +% We introduced a new command, \unstarredvspace, that changes the +% solution environment so that, when solutions are not being printed, +% any optional space called for is inserted with \vspace{amount}, +% instead of \vspace*{amount}. There is also a new command +% \nounstarredvpsace that reverts to the default. + +%-------------------------------------------------------------------- +% Version 2.605$\beta$, 2018/08/22 + +% We corrected the bug introduced in Version 2.604$\beta$ that caused a +% \ref to a \correctchoice in a choices environment to have the wrong +% value. The correction was to change \stepcounter to \refstepcounter. + +%-------------------------------------------------------------------- +% Version 2.604$\beta$, 2018/05/14 + +% We changed the code for the \correctchoice command in the checkboxes +% environment to correct a bug that causes the item label for the second +% item to appear in the wrong place when the first item is a +% \correctchoice and there's no text in between the \begin{checkboxes} +% and the \correctchoice. We made a similar change to the choices +% environment, which had the same problem. + %-------------------------------------------------------------------- % Version 2.603, 2017/12/15 @@ -4140,11 +4180,26 @@ % Motivated by the def of \leavevmode, % \def\leavevmode{\unhbox\voidb@x} % we will now leave hmode (if we're in hmode): + % 2018/05/13: We move the \item command to before the + % \begingroup and we also put + % \CorrectChoice@Emphasis\choicelabel (along with grouping) + % into the argument of the \item. We did this to correct + % the bug that appears when there is no text in between + % the \begin{choices} and the first item and that first + % item is a \correctchoice. The fact that a group had been + % begun before the first \item caused the label for the + % second item to appear in the position of the label for + % the item following that second item. \ifhmode \unskip\unskip\unvbox\voidb@x \fi + % 2018/08/22: We changed \stepcounter to \refstepcounter: + \refstepcounter{choice}% + \item[{\color@begingroup \CorrectChoice@Emphasis + \choicelabel \color@endgroup}]% \begingroup \color@begingroup \@correctchoicetrue \CorrectChoice@Emphasis + \else + \item \fi - \item \do@choice@pageinfo } % CorrectChoice \let\correctchoice\CorrectChoice @@ -4237,10 +4292,20 @@ % Motivated by the def of \leavevmode, % \def\leavevmode{\unhbox\voidb@x} % we will now leave hmode (if we're in hmode): + % 2018/05/13: We move the \item[\checked@char] to before + % the \begingroup and we also put \CorrectChoice@Emphasis + % (along with grouping) into the argument of the \item. We + % did this to correct the bug that appears when there is no + % text in between the \begin{checkboxes} and the first item + % and that first item is a \correctchoice. The fact that a + % group had been begun before the first \item caused the + % label for the second item to appear in the position of + % the label for the item following that second item. \ifhmode \unskip\unskip\unvbox\voidb@x \fi + \item[{\color@begingroup\CorrectChoice@Emphasis\checked@char + \color@endgroup}]% \begingroup \color@begingroup \@correctchoicetrue \CorrectChoice@Emphasis - \item[\checked@char] \else \item \fi @@ -7176,7 +7241,6 @@ \hidden@ampersand \hbox to \@cellwidth{\hfill}% \else - \hspace*{\fill}% \if@bonus \prt@tablebonuspoints \else @@ -7547,6 +7611,17 @@ \def\cancelspace{\cancelspacetrue} \def\nocancelspace{\cancelspacefalse} +% The command \unstarredvspace alters the solution environment so +% that, when solutions are not being printed, any optional space will +% be inserted with a \vspace{} command, instead of a \vspace*{} +% command. + +\newif\if@unstarredvspace +\def\unstarredvspace{\@unstarredvspacetrue} +\def\nounstarredvspace{\@unstarredvspacefalse} +\nounstarredvspace + + % \if@insolution will be true while we're inside of any of the % solution environments. This is used to supress \PgInfo@write and % \label commands generated if there's a parts (or subparts, or @@ -7579,7 +7654,11 @@ \else \par \penalty 0 - \vspace*{#1}% + \if@unstarredvspace + \vspace{#1}% + \else + \vspace*{#1}% + \fi \fi \setbox\z@\vbox\bgroup \fi -- cgit v1.2.3