diff options
author | Norbert Preining <norbert@preining.info> | 2021-02-01 13:13:41 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-02-01 13:13:41 +0900 |
commit | 272af43327ca6868322c4781c0b2dd979391a08a (patch) | |
tree | cf9c700fac6cb042e1dfcd74cf735b2f5fa04667 | |
parent | ab9887973c733fbc432c6712a4b9c755f1e3861a (diff) |
eqexam (2021-02-01)
22 files changed, 446 insertions, 367 deletions
diff --git a/texmf-dist/doc/latex/eqexam/README.md b/texmf-dist/doc/latex/eqexam/README.md index ab464cab..5e0bc68a 100644 --- a/texmf-dist/doc/latex/eqexam/README.md +++ b/texmf-dist/doc/latex/eqexam/README.md @@ -1,5 +1,5 @@ The eqexam Package -Dated: 2020-03-14 +Dated: 2021-01-20 Author: D. P. Story eqExam is a LaTeX package for writing exams, tests, quizzes, @@ -40,6 +40,9 @@ this package are as follows: folder. See also the series of blogs at http://www.acrotex.net/blog/?tag=fortextbook +What's New (2021-01-20) Defined \trackProblemsOn and \numPtsOfProblem; +added \doNoRandomizeChoices and \allowRandomizedChoices. See documentation. + What's New (2020-03-14) Defined several commands and one environment to support the insertion of a figure into a problem. Demo file that illustrates these new commands and environment is found at diff --git a/texmf-dist/doc/latex/eqexam/eqexam.pdf b/texmf-dist/doc/latex/eqexam/eqexam.pdf Binary files differindex ea03c1f8..59d7861b 100644 --- a/texmf-dist/doc/latex/eqexam/eqexam.pdf +++ b/texmf-dist/doc/latex/eqexam/eqexam.pdf diff --git a/texmf-dist/doc/latex/eqexam/eqexamman.pdf b/texmf-dist/doc/latex/eqexam/eqexamman.pdf Binary files differindex 9684fd4f..1fe69fa3 100644 --- a/texmf-dist/doc/latex/eqexam/eqexamman.pdf +++ b/texmf-dist/doc/latex/eqexam/eqexamman.pdf diff --git a/texmf-dist/doc/latex/eqexam/eqexamman.tex b/texmf-dist/doc/latex/eqexam/eqexamman.tex index 258bf562..d580d1a4 100644 --- a/texmf-dist/doc/latex/eqexam/eqexamman.tex +++ b/texmf-dist/doc/latex/eqexam/eqexamman.tex @@ -11,6 +11,8 @@ \usepackage[bypasspkgpagestyle,nomarginwrite,usecustomdesign, useclassmaketitle,flextended ]{eqexam} + + %\usepackage[designv, % latextoc,forcolorpaper, % centertitlepage]{web} @@ -150,7 +152,7 @@ part of the\texorpdfstring{\\}{ }\texorpdfstring{\AcroTeX}{AcroTeX} eDucation Bu \keywords{LaTeX, hyperref, PDF, exercises, quizzes} \university{{\AcroT} Software Development Team} \email{dpstory@acrotex.net} -\version{5.1.10, 2020/03/14} +\version{5.1.13, 2021/01/20} \copyrightyears{2005-\the\year} \renewcommand{\exsectitletext}{Solutions to exams in this manual} @@ -1603,7 +1605,7 @@ necessary in two situations: removing questions that have randomization). \end{enumerate} -\newtopic\textbf{Things to look for:} If \textsf{eqexam} is not rearranging the order +\newtopic\textbf{Things to look for: } If \textsf{eqexam} is not rearranging the order of the choices as you expect it to, it could be that \textsf{eqexam} is reading an old \texttt{.sav} file. Either delete that file in your source folder, or comment out \cs{inputRandomSeed} in your document. @@ -1624,10 +1626,19 @@ use that seed value for that class, for example \end{Verbatim} Of course comment out \cs{inputRandomSeed}. -\begin{Verbatim}[xleftmargin=\amtIndent] +\newtopic\textbf{Controlling randomization.} There are several commands that control whether +randomization occurs. +\settowidth{\aebdimen}{\cs{allowRandomizedChoices}}% +\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \turnOnRandomize \obeyLocalRandomize -\end{Verbatim} +\doNotRandomizeChoices +\allowRandomizedChoices +\end{dCmd} +%\begin{Verbatim}[xleftmargin=\amtIndent] +%\turnOnRandomize +%\obeyLocalRandomize +%\end{Verbatim} The command \cs{turnOnRandomize} overrides all local settings of \cs{bChoices} and causes all choice lists to be randomized. While \cs{obeyLocalRandomize} @@ -1658,13 +1669,19 @@ the choices will not be randomized, because the \texttt{random} option was not specified; or they will be randomized if the \texttt{random} option is used. +\newtopic\indent The command \cs{doNotRandomizeChoices} overrides the +\opt{allowrandomize} option; when in effect, randomization of the choices +does not occur. The companion command \cs{allowRandomizedChoices} restores the +authority of the \opt{allowrandomize} option. + \newtopic\textcolor{red}{Limitations:} There are natural limitations on the use of \cs{bChoices} and \cs{eChoices} and consequently, there are limitations on the randomization. The content between \cs{Ans} and \cs{eAns} cannot have any verbatim text. This is usually not a problem for mathematical content, but could be a limitation for -computer science where questions about syntax may be posed. I have -in mind a work-around, but haven't pursued the problem as of yet. +computer science where questions about syntax may be posed. + +%I have in mind a work-around, but haven't pursued the problem as of yet. \subsection{Labeling Choices} @@ -5186,6 +5203,23 @@ the figure around the text of the question. environment, named \texttt{\href{\urlAcroTeXBlog/?p=1419}{ins-fig.pdf}}, is found on the {\AcroBlog}. +\subsection{Tracking problem values} + +As an application to the \pkg{skills} package, three new commands are introduced +into the \pkg{eqexam} core. + +\settowidth{\aebdimen}{\ttfamily\string\numPtsOfProblem[\meta{exam-label}]\darg{\meta{prob-num}}}% +\def\1{\rlap{\hskip\linewidth\texttt{ \%}\textsf{ turn on problem tracking}}}% +\def\2{\rlap{\hskip\linewidth\texttt{ \%}\textsf{ turn off problem tracking}}}% +\def\3{\rlap{\hskip\linewidth\texttt{ \%}\textsf{ typeset points for problem}}}% +\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} +!1\trackProblemsOn +!2\trackProblemsOff +!3\numPtsOfProblem[!meta(exam-label)]{!meta(prob-num)} +\end{dCmd} +When tracking is on (\cs{trackProblemsOn}), the number of points for each problem +is written to the AUX file. Use \cs{numPtsOfProblem} to typeset the amount of points for \ameta{prob-num} +of exam part \ameta{exam-label}. Turn off tracking with \cs{trackProblemsOff}. \newpage \markright{References} diff --git a/texmf-dist/doc/latex/eqexam/examples/fig1.pdf b/texmf-dist/doc/latex/eqexam/examples/fig1.pdf Binary files differindex 054fe38f..134d03df 100644 --- a/texmf-dist/doc/latex/eqexam/examples/fig1.pdf +++ b/texmf-dist/doc/latex/eqexam/examples/fig1.pdf diff --git a/texmf-dist/doc/latex/eqexam/examples/hw.cfg.txt b/texmf-dist/doc/latex/eqexam/examples/hw.cfg.txt deleted file mode 100644 index 57511627..00000000 --- a/texmf-dist/doc/latex/eqexam/examples/hw.cfg.txt +++ /dev/null @@ -1,12 +0,0 @@ -\renewcommand\maketitledesign -{% - \makebox[\textwidth]{\normalsize - \shortstack[l]{\strut\underbar{\websubject}\\\@date}\hfill - \shortstack[l]{\underbar{\webtitle}\\\strut}\hfill - \shortstack[l]{\strut\underbar{Due \theduedate}\\\webauthor}}% -} -\rhead{\webauthor} -\def\exrtnlabelformat{$\square$} -\def\exrtnlabelformatwp{} -\def\eq@sqslrtnlabel{} -\everymath{\displaystyle} diff --git a/texmf-dist/doc/latex/eqexam/examples/quiz.cfg.txt b/texmf-dist/doc/latex/eqexam/examples/quiz.cfg.txt deleted file mode 100644 index bc9a15ae..00000000 --- a/texmf-dist/doc/latex/eqexam/examples/quiz.cfg.txt +++ /dev/null @@ -1,7 +0,0 @@ -\renewcommand\maketitledesign -{% - \makebox[\textwidth]{\normalsize - \shortstack[l]{\strut\websubject\\\webauthor, \@date}\hfill - \shortstack[l]{\webtitle\\\strut}\hfill - \shortstack[l]{\strut\eq@ExamName\\\eq@SID}}% -} diff --git a/texmf-dist/doc/latex/eqexam/examples/test01.pdf b/texmf-dist/doc/latex/eqexam/examples/test01.pdf Binary files differnew file mode 100644 index 00000000..92b9d6c5 --- /dev/null +++ b/texmf-dist/doc/latex/eqexam/examples/test01.pdf diff --git a/texmf-dist/doc/latex/eqexam/examples/test01.tex b/texmf-dist/doc/latex/eqexam/examples/test01.tex index 102b7b61..a52cfafb 100644 --- a/texmf-dist/doc/latex/eqexam/examples/test01.tex +++ b/texmf-dist/doc/latex/eqexam/examples/test01.tex @@ -28,7 +28,7 @@ \turnContAnnotOn \optsFillIn{\BC{0.847 0.847 0.847}} -\optsMlTextField{\BC{0.847 0.847 0.847}} +\optsMlTxtFld{\BC{0.847 0.847 0.847}} \eqExamName[\Ff\FfRequired\BC{0.847 0.847 0.847}]{2.25in} \eqSID[\Ff\FfRequired\BC{0.847 0.847 0.847}]{2.25in} \cpSetSumryWidth{.55\textwidth-1em} @@ -45,7 +45,7 @@ \begin{instructions}[Part I.] Solve each of the problems without error. If you make an error, -points will be subtracted from your total score. +points will be subtracted from your total score. \end{instructions} \begin{problem}[5] diff --git a/texmf-dist/doc/latex/eqexam/examples/test02.pdf b/texmf-dist/doc/latex/eqexam/examples/test02.pdf Binary files differnew file mode 100644 index 00000000..2a4c84b5 --- /dev/null +++ b/texmf-dist/doc/latex/eqexam/examples/test02.pdf diff --git a/texmf-dist/doc/latex/eqexam/examples/test03.pdf b/texmf-dist/doc/latex/eqexam/examples/test03.pdf Binary files differnew file mode 100644 index 00000000..58998f26 --- /dev/null +++ b/texmf-dist/doc/latex/eqexam/examples/test03.pdf diff --git a/texmf-dist/doc/latex/eqexam/examples/test_matching.pdf b/texmf-dist/doc/latex/eqexam/examples/test_matching.pdf Binary files differdeleted file mode 100644 index 56eff405..00000000 --- a/texmf-dist/doc/latex/eqexam/examples/test_matching.pdf +++ /dev/null diff --git a/texmf-dist/doc/latex/eqexam/fortextbook.zip b/texmf-dist/doc/latex/eqexam/fortextbook.zip Binary files differindex a21725cb..e3210cfd 100644 --- a/texmf-dist/doc/latex/eqexam/fortextbook.zip +++ b/texmf-dist/doc/latex/eqexam/fortextbook.zip diff --git a/texmf-dist/source/latex/eqexam/eqexam.drv b/texmf-dist/source/latex/eqexam/eqexam.drv index 3cf57c58..90bc5f74 100644 --- a/texmf-dist/source/latex/eqexam/eqexam.drv +++ b/texmf-dist/source/latex/eqexam/eqexam.drv @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% eqexam.sty package, %% -%% Copyright (C) 2005--2020 D. P. Story %% +%% Copyright (C) 2005--2021 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -24,7 +24,7 @@ \value{GlossaryColumns}=2 \usepackage{makeidx} \usepackage[colorlinks,hyperindex=false]{hyperref} -\def\darg#1{\texttt{\{#1\}}} +\gdef\darg#1{\texttt{\char123\relax#1\char125\relax}} \let\env\texttt \let\opt\texttt \let\app\textsf diff --git a/texmf-dist/source/latex/eqexam/eqexam.dtx b/texmf-dist/source/latex/eqexam/eqexam.dtx index d27fe475..b9cc2850 100644 --- a/texmf-dist/source/latex/eqexam/eqexam.dtx +++ b/texmf-dist/source/latex/eqexam/eqexam.dtx @@ -4,7 +4,7 @@ %<*copyright> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% eqexam.sty package, %% -%% Copyright (C) 2005--2020 D. P. Story %% +%% Copyright (C) 2005--2021 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -16,8 +16,8 @@ %</copyright> %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{eqexam} -%<package> [2020/03/14 v5.1.10 An Exam Construction Package (dps)] -%<package>\def\eqexamdefReq{2020/03/14} +%<package> [2021/01/20 v5.1.13 An Exam Construction Package (dps)] +%<package>\def\eqexamdefReq{2021/01/20} %<*driver> \documentclass{ltxdoc} \GlossaryPrologue{\section{{Change History}}}% @@ -26,7 +26,7 @@ \value{GlossaryColumns}=2 \usepackage{makeidx} \usepackage[colorlinks,hyperindex=false]{hyperref} -\def\darg#1{\texttt{\{#1\}}} +\gdef\darg#1{\texttt{\char123\relax#1\char125\relax}} \let\env\texttt \let\opt\texttt \let\app\textsf @@ -2291,8 +2291,8 @@ % \end{macrocode} % \DescribeMacro{\optsMlTxtFld} is used to pass options to the multi-line % text field. -% \changes{v5.1.10}{2020/03/14}{Introduced control over width of text field in -% for \string\texttt{online} option.} +% \changes{v5.1.10}{2020/03/14}{ \string\cs{optsMsTxtFld}: Pass options to the multi-line +% text field. in for \string\texttt{online} option.} % \begin{macrocode} \def\optsMlTxtFld#1{\def\eqe@optsmltf{#1}} \let\eqe@optsmltf\@empty @@ -4215,6 +4215,7 @@ % \end{macrocode} % Since everything is put a box, we set the \cs{linewidth}, and % set \cs{solutionparshape} to \cs{@empty}. +% \changes{v5.1.11}{2020/11/16}{Adj \string\cs{linewidth} in soln file} % \begin{macrocode} \ifx\solutionparshape\@empty\else \advance\linewidth-\leadinIndentPrtSep\fi %%dps @@ -4224,8 +4225,10 @@ {\vfill}\hfill\fi \minipage[b][\eqedepth][t]{\mp@Width}% {\lccode`C=`\%\lowercase{\eqe@IW{% - \string\def\string\panelgap{\panelgap}% - \string\setlength{\string\panelwidth}{\ss@Argiii}% + \string\def\string\panelgap{\panelgap}C^^J% + \string\setlength{\string\panelwidth}{\ss@Argiii}C^^J% + \string\setlength{\string\linewidth}{\string + \linewidth-\string\eqemargin}C^^J% \string\def\string\eqedepth {\ifeq@nosolutions\ss@Argii\else\ss@Argii\fi}C}}}% % \end{macrocode} @@ -5082,6 +5085,37 @@ \def\hidden@ttr{[#1]}\let\numpoints\@empty\else \let\hidden@ttr\relax\def\numpoints{#1}\fi \problem@cont} +% \end{macrocode} +% \DescribeMacro\probV@luesInsert This command writes the number of points to the AUX +% file; form of the macro name written is \texttt{value\ameta{exam-label}Prob\ameta{prob-no}}. +% \changes{v5.1.12}{2021/01/07}{Added \string\cs{probV@luesInsert} to support \string\pkg{skills} package} +% \begin{macrocode} +\let\probV@luesInsert\relax +\def\probV@@luesInsert{\bgroup\@tempcnta\value{eqquestionnoi}\advance + \@tempcnta\@ne % Jan21 + \eqe@IWO\@auxout{\string\csarg\string + \gdef{value\thisexamlabel Prob\the\@tempcnta}{\numpoints}}\egroup +} +% \end{macrocode} +% \DescribeMacro\trackProblemsOn This command (\cs{trackProblemsOn}) activates problem tracking (ie, write problems and values +% to the AUX file; \DescribeMacro\trackProblemsOff\cs{trackProblemsOff} turns off tracking. Tracking is +% off by default. When tracing is on, the value of each problem is saved in the form +% |\csarg\gdef{value|\ameta{exam-label}\texttt{Prob}\ameta{prob-num}|}|. This feature was developed to support +% the \pkg{skills} package. +% \changes{v5.1.12}{2021/01/07}{Added \string\cs{trackProblemsOn} and \string\cs{trackProblemsOff} to support \string\pkg{skills} package} +% \begin{macrocode} +\def\trackProblemsOn{\let\probV@luesInsert\probV@@luesInsert} +\def\trackProblemsOff{\let\probV@luesInsert\relax} +\trackProblemsOff +% \end{macrocode} +% \DescribeMacro\numPtsOfProblem\hskip-\marginparsep\texttt{[\ameta{exam-label}]\darg{\ameta{prob-num}}} +% The command \cs{numPtsOfProblem} typesets the number of points of problem \ameta{prob-num} from part \ameta{label-name}. +% \begin{macrocode} +\newcommand{\numPtsOfProblem}[2][\thisexamlabel]% + {\@nameuse{value#1Prob#2}} +% \end{macrocode} +% The \env{problem} environment continues. +% \begin{macrocode} \newcommand{\problem@cont}[1][]{\let\isProbEnv\eqe@YES \def\@rgi{#1}\ifx\hidden@ttr\relax % assume a number or empty \ifx\@rgi\@empty\else\def\hidden@ttr{[#1]}\fi\fi @@ -5107,6 +5141,7 @@ \def\@ltii{\let\@isitstar\eqe@Zero\eqe@gobbletoend}% \expandafter\@ifstar\expandafter\@lti \expandafter\@ltii\numpoints\end + \probV@luesInsert % Jan21 \if\@isitstar\eqe@One\addtocounter{eqpointvalue}{\numpoints}% \@marktotalvalue \ifdispl@yPoints @@ -5137,7 +5172,8 @@ % \begin{macrocode} \edef\ctrld@exp@exercise{\noexpand \begin{exercise}[eqquestionnoi]\hidden@ttr}% - \ctrld@exp@exercise\ignorespaces\eqe@p@gobnxtp@r} + \ctrld@exp@exercise\ignorespaces\eqe@p@gobnxtp@r +} % \end{macrocode} % \textbf{end problem env.} The code for the end of the problem environment. % \begin{macrocode} @@ -5719,6 +5755,7 @@ % \begin{macrocode} \let\marginpoints\@empty \else + \probV@luesInsert % Jan21 % \end{macrocode} % Points are displayed in margins or inline % \begin{macrocode} @@ -5727,6 +5764,7 @@ % \paragraph*{Total points specified} % \begin{macrocode} \ifx\marginpoints\@empty\else + \probV@luesInsert % Jan21 \if\@isitstar\eqe@One % \end{macrocode} % Points to appear ``in-line'' rather than in the margins @@ -5797,6 +5835,7 @@ \fi % \addtocounter{eqpointvalue}{\numpoints}\@marktotalvalue \ifx\marginpoints\@empty\else + \probV@luesInsert % Jan21 \ifdispl@yPoints \if\@isitstar\eqe@One % \end{macrocode} @@ -7242,6 +7281,7 @@ %The \cs{eqTWSave} is the saved value of the \cs{textwidth} in effect when %the \env{exam} environment is opened. The right totals box is placed in the right %margin based on this value. +%\changes{v5.1.10}{2020/03/14}{Define \string\cs{probInMinipage}} % \begin{macrocode} \def\probInMinipage{% \ifanswerkey @@ -7269,11 +7309,11 @@ % the total height of the typeset solution. It then calculates the difference between % \cs{sameVspace}, which should hold the value of the optional argument of \env{solution}, % and the actual height of the solution. It then executes a \cs{vspace} for that amount calculated. -% +% \changes{v5.1.10}{2020/03/14}{Add \string\env{vadjForSolnInBx} to correct for vertical space for a +% problem in a \string\env{minipage}} % \begin{macrocode} \newenvironment{vadjForSolnInBx}[1]{% - \setlength\@tempdima{#1}% - \setbox\z@\vbox\bgroup\hsize\@tempdima + \setlength\@tempdima{#1}\setbox\z@\vbox\bgroup\hsize\@tempdima }{% \egroup \ifanswerkey @@ -7296,6 +7336,7 @@ % use \cs{bProbInsert} with its argument. Place \DescribeMacro{\eProbInsert}\cs{eProbInsert} at the end of the statement of the % question, as illustrated below. \cs{bProbInsert} puts the question into a group, % \cs{eProbInsert} gets us out of the group. +% \changes{v5.1.10}{2020/03/14}{Define \string\cs{bProbInsert} and \string\cs{bItemInsert}} %\begin{verbatim} %\def\insertFig{\parpic[r]{\FIG}} %\bProbInsert{\insertFig} diff --git a/texmf-dist/tex/latex/eqexam/aebrandom.def b/texmf-dist/tex/latex/eqexam/aebrandom.def index f2952e46..defbed57 100644 --- a/texmf-dist/tex/latex/eqexam/aebrandom.def +++ b/texmf-dist/tex/latex/eqexam/aebrandom.def @@ -18,11 +18,11 @@ %% License, or (at your option) any later version. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ProvidesFile{aebrandom.def} - [2020/03/14 v8.5.10 % + [2021/01/20 v8.6.2 % Exerquiz support for randomization (dps)] \@ifundefined{nextrandom}{\input{random.tex}}{} \def\nextrandom{\begingroup - \ifnum\randomi<\@ne % then initialize with time + \ifnum\randomi<\@ne % then initialize with time \global\randomi\time \global\multiply\randomi388 \global\advance\randomi\year \global\multiply\randomi31 \global\advance\randomi\day @@ -30,139 +30,138 @@ \message{Randomizer initialized to \the\randomi.}% \nextrandom \nextrandom \nextrandom \xdef\InitSeedValue{\the\randomi}% - \fi - \count@ii\randomi - \divide\count@ii 127773 % modulus = multiplier * 127773 + 2836 - \count@\count@ii - \multiply\count@ii 127773 - \global\advance\randomi-\count@ii % random mod 127773 - \global\multiply\randomi 16807 - \multiply\count@ 2836 - \global\advance\randomi-\count@ - \ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi + \fi + \count@ii\randomi + \divide\count@ii 127773 % modulus = multiplier * 127773 + 2836 + \count@\count@ii + \multiply\count@ii 127773 + \global\advance\randomi-\count@ii % random mod 127773 + \global\multiply\randomi 16807 + \multiply\count@ 2836 + \global\advance\randomi-\count@ + \ifnum\randomi<\z@\global\advance\randomi 2147483647\relax\fi \endgroup } \def\writeSeedToSolnFile{\writeT@ExSolns{\string\randomi=\the\randomi}} -\def\@ansChoices[#1]% -{% - \global\let\@tempholdSaveAns\@empty % 5/24 - \global\let\@tempholdSaveChoice\@empty % 5/24 - \global\let\bChoiceLabel\@empty % 5/24 - \ifeq@randomizeallChoices - \setkeys{bchoice}{#1,random=true}\else - \setkeys{bchoice}{#1}\fi - \global\eq@tabColCnt=0 - \ifeq@randomizeChoices\expandafter\@@bChoices - \else\expandafter\@@ansChoices\fi +\def\@ansChoices[#1]{% + \global\let\@tempholdSaveAns\@empty + \global\let\@tempholdSaveChoice\@empty + \global\let\bChoiceLabel\@empty + \ifeq@randomizeallChoices + \setkeys{bchoice}{#1,random=true}\else + \setkeys{bchoice}{#1}\fi + \global\eq@tabColCnt=\z@ + \if@DoNotRandomize\eq@randomizeChoicesfalse\fi + \ifeq@randomizeChoices\expandafter\@@bChoices + \else\expandafter\@@ansChoices\fi } \def\@@ansChoices{% - \ifnum\aeb@numCols=1 % list mode - \def\eq@next{\@layoutListAns}% - \else % tabular mode - \edef\eq@next{\noexpand\@layoutTabularAns{\bChoiceNumCols}}% - \fi - \eq@next + \ifnum\aeb@numCols=\@ne % list mode + \def\eq@next{\@layoutListAns}% + \else % tabular mode + \edef\eq@next{\noexpand\@layoutTabularAns{\bChoiceNumCols}}% + \fi + \eq@next } \newcount\aeb@numChoices \newcount\aeb@ranChoice \newtoks\aeb@hold\aeb@hold={} \def\@@bChoices{\gdef\@temphold{}\gdef\@tempholdrandom{}% - \gdef\@tempholdfreeze{}\aeb@searchfortoken{\@getAns}% + \gdef\@tempholdfreeze{}\aeb@searchfortoken{\@getAns}% } \def\aeb@searchfortoken#1{% - \@ifnextchar\Ans{\advance\aeb@numChoices1\relax#1} - {\@ifnextchar\eFreeze{\expandafter\@getFreezeAns\@gobble} - {\@ifnextchar\par{\def\@@temp{\aeb@searchfortoken{#1}}% - \expandafter\@@temp\@gobble}{\@eChoices}}}% + \@ifnextchar\Ans{\advance\aeb@numChoices1\relax#1} + {\@ifnextchar\eFreeze{\expandafter\@getFreezeAns\@gobble} + {\@ifnextchar\par{\def\@@temp{\aeb@searchfortoken{#1}}% + \expandafter\@@temp\@gobble}{\@eChoices}}}% } \long\def\@getAns\Ans#1\eAns{% - \g@addto@macro\@temphold{{\Ans#1\eAns}}% - \aeb@searchfortoken{\@getAns}% + \g@addto@macro\@temphold{{\Ans#1\eAns}}% + \aeb@searchfortoken{\@getAns}% } \def\@getFreezeAns{\aeb@searchfortoken{\@@getFreezeAns}} \long\def\@@getFreezeAns\Ans#1\eAns{% - \g@addto@macro\@tempholdfreeze{\Ans#1\eAns}% - \aeb@searchfortoken{\@@getFreezeAns}% + \g@addto@macro\@tempholdfreeze{\Ans#1\eAns}% + \aeb@searchfortoken{\@@getFreezeAns}% } \long\def\@eChoices#1\eChoices{% - \aeb@randomizeChoices{\the\aeb@numChoices}% + \aeb@randomizeChoices{\the\aeb@numChoices}% } \def\aeb@randomizeChoices#1{% - \setrannum{\aeb@ranChoice}{1}{#1} - \eqtmpcnta\z@\aeb@hold=\expandafter{\@temphold}\def\@temphold{}% - \expandafter\@tfor\expandafter - \@temp\expandafter:\expandafter=\the\aeb@hold \do {% - \advance\eqtmpcnta\@ne - \ifnum\eqtmpcnta=\aeb@ranChoice\relax - \aeb@hold=\expandafter\expandafter\expandafter - {\expandafter\@tempholdrandom\@temp}% - \edef\@tempholdrandom{\the\aeb@hold}% - \else - \aeb@hold=\expandafter\expandafter\expandafter - {\expandafter\@temphold\expandafter{\@temp}}% - \edef\@temphold{\the\aeb@hold}% - \fi - }% - \aeb@numChoices=#1 - \advance\aeb@numChoices-1 - \ifnum\aeb@numChoices=0\relax - \def\aeb@next{\aeb@finishedRandomizing}\else - \def\aeb@next{\aeb@randomizeChoices{\the\aeb@numChoices}}\fi - \aeb@next + \setrannum{\aeb@ranChoice}{1}{#1} + \eqtmpcnta\z@\aeb@hold=\expandafter{\@temphold}\def\@temphold{}% + \expandafter\@tfor\expandafter + \@temp\expandafter:\expandafter=\the\aeb@hold \do {% + \advance\eqtmpcnta\@ne + \ifnum\eqtmpcnta=\aeb@ranChoice\relax + \aeb@hold=\expandafter\expandafter\expandafter + {\expandafter\@tempholdrandom\@temp}% + \edef\@tempholdrandom{\the\aeb@hold}% + \else + \aeb@hold=\expandafter\expandafter\expandafter + {\expandafter\@temphold\expandafter{\@temp}}% + \edef\@temphold{\the\aeb@hold}% + \fi + }% + \aeb@numChoices=#1 + \advance\aeb@numChoices\m@ne + \ifnum\aeb@numChoices=\z@ + \def\aeb@next{\aeb@finishedRandomizing}\else + \def\aeb@next{\aeb@randomizeChoices{\the\aeb@numChoices}}\fi + \aeb@next } \def\aeb@finishedRandomizing{% - \aeb@hold=\expandafter\expandafter\expandafter - {\expandafter\@tempholdrandom\@tempholdfreeze}% - \gdef\@temphold{}\gdef\@tempholdrandom{}\gdef\@tempholdfreeze{}% - \edef\finished@Randomizing{% - \noexpand\@@ansChoices - \the\aeb@hold - \noexpand\eChoices}% - \finished@Randomizing + \aeb@hold=\expandafter\expandafter\expandafter + {\expandafter\@tempholdrandom\@tempholdfreeze}% + \gdef\@temphold{}\gdef\@tempholdrandom{}\gdef\@tempholdfreeze{}% + \edef\finished@Randomizing{% + \noexpand\@@ansChoices + \the\aeb@hold + \noexpand\eChoices}% + \finished@Randomizing } \def\saveRandomSeed{\PackageInfo{exerquiz} - {The command \string\saveRandomSeed\space - is deprecated.\MessageBreak Seed automatically saved}} + {The command \string\saveRandomSeed\space + is deprecated.\MessageBreak Seed automatically saved}} \@ifpackageloaded{ran_toks}{% - \let\inputRandomSeed\useLastAsSeed - \let\useRandomSeed\useThisSeed + \let\inputRandomSeed\useLastAsSeed + \let\useRandomSeed\useThisSeed }{% - \def\inputRandomSeed{\eq@readRandomData}% - \def\useRandomSeed#1{\saveseedfalse\randomi=#1}% + \def\inputRandomSeed{\eq@readRandomData}% + \def\useRandomSeed#1{\saveseedfalse\randomi=#1}% } \def\InitSeedValue{\the\randomi} % dps \@ifundefined{ifsaveseed}{\newif\ifsaveseed\saveseedtrue}{} % dps -\def\eq@writeRandomData -{% - \ifsaveseed - \@ifundefined{saveseedinfo}{\newwrite\saveseedinfo}{} - \immediate\openout \saveseedinfo \jobname_rt.sav - \let\verbatim@out\saveseedinfo - \def\eqrt@msgi{initializing seed value}% - \def\eqrt@msgii{last random number used}% - \uccode`c=`\%\uppercase{% - \immediate\write\verbatim@out - {\InitSeedValue\space c \eqrt@msgi}% - \immediate\write\verbatim@out - {\the\randomi\space c \eqrt@msgii}% - }\immediate\closeout\saveseedinfo - \fi +\def\eq@writeRandomData{% + \ifsaveseed + \@ifundefined{saveseedinfo}{\newwrite\saveseedinfo}{} + \immediate\openout \saveseedinfo \jobname_rt.sav + \let\verbatim@out\saveseedinfo + \def\eqrt@msgi{initializing seed value}% + \def\eqrt@msgii{last random number used}% + \uccode`c=`\%\uppercase{% + \immediate\write\verbatim@out + {\InitSeedValue\space c \eqrt@msgi}% + \immediate\write\verbatim@out + {\the\randomi\space c \eqrt@msgii}% + }\immediate\closeout\saveseedinfo + \fi } \AtEndDocument{\eq@writeRandomData} \def\eq@readRandomData{\IfFileExists{\jobname_rt.sav}{% - \PackageInfo{exerquiz}{Inputting \jobname_rt.sav}% - \@ifundefined{readsavfile}{\newread\readsavfile}{}% - \openin\readsavfile=\jobname_rt.sav - \read\readsavfile to \InitSeedValue - \read\readsavfile to \eqlastRandomNum - \closein\readsavfile - \randomi=\eqlastRandomNum - \xdef\InitSeedValue{\the\randomi}% - \immediate\closeout\readsavfile + \PackageInfo{exerquiz}{Inputting \jobname_rt.sav}% + \@ifundefined{readsavfile}{\newread\readsavfile}{}% + \openin\readsavfile=\jobname_rt.sav + \read\readsavfile to \InitSeedValue + \read\readsavfile to \eqlastRandomNum + \closein\readsavfile + \randomi=\eqlastRandomNum + \xdef\InitSeedValue{\the\randomi}% + \immediate\closeout\readsavfile }{% - \PackageInfo{exerquiz}{\jobname_rt.sav cannot - be found, \MessageBreak - using the random initializer}% + \PackageInfo{exerquiz}{\jobname_rt.sav cannot + be found, \MessageBreak + using the random initializer}% }} \endinput %% diff --git a/texmf-dist/tex/latex/eqexam/eqalone.def b/texmf-dist/tex/latex/eqexam/eqalone.def index 7c4a5f6f..287060e3 100644 --- a/texmf-dist/tex/latex/eqexam/eqalone.def +++ b/texmf-dist/tex/latex/eqexam/eqalone.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% eqexam.sty package, %% -%% Copyright (C) 2005--2020 D. P. Story %% +%% Copyright (C) 2005--2021 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/eqexam/eqexam.def b/texmf-dist/tex/latex/eqexam/eqexam.def index 0d865559..55f3a9bc 100644 --- a/texmf-dist/tex/latex/eqexam/eqexam.def +++ b/texmf-dist/tex/latex/eqexam/eqexam.def @@ -7,7 +7,7 @@ %% exerquiz.dtx (with options: `eqexam') %% \ProvidesFile{eqexam.def} - [2020/03/14 v8.5.10 % + [2021/01/20 v8.6.2 % Exerquiz support file for eqexam (dps)] \let\eq@YES=y \let\eq@NO=n \let\eq@One=1 \let\eq@Zero=0 @@ -41,8 +41,11 @@ \expandafter#2\fi} \newif\ifeq@randomizeChoices \eq@randomizeChoicesfalse \newif\ifeq@randomizeallChoices \eq@randomizeallChoicesfalse +\newif\if@DoNotRandomize \@DoNotRandomizefalse \def\turnOnRandomize{\eq@randomizeallChoicestrue} \def\obeyLocalRandomize{\eq@randomizeallChoicesfalse} +\def\doNotRandomizeChoices{\@DoNotRandomizetrue} +\def\allowRandomizedChoices{\@DoNotRandomizefalse} \let\saveRandomSeed\relax \let\inputRandomSeed\relax \newcommand{\exsolafter}{\eq@exsolafterDefault} @@ -1115,45 +1118,44 @@ \let\propQ@labelwidth\@empty \define@key{props@ques}{topsep}[\the\topsep]{\edef\propQ@topsep{#1}} \define@key{props@ques}{partopsep}[\the\partopsep]% - {\edef\propQ@partopsep{#1}} + {\edef\propQ@partopsep{#1}} \define@key{props@ques}{parsep}[\the\parsep]{\edef\propQ@parsep{#1}} \define@key{props@ques}{itemsep}[\the\itemsep]{\edef\propQ@itemsep{#1}} \define@key{props@ques}{labelsepTo}[\normalsize\normalfont\ ]% - {\def\propQ@labelsepTo{#1}} + {\def\propQ@labelsepTo{#1}} \define@key{props@ques}{labelsep}[\@empty]{\def\propQ@labelsep{#1}} \let\propQ@labelsep\@empty \define@key{props@ques}{color}[blue]{\quesNumColor{#1}} \setkeys{props@ques}{labelwidthTo,topsep,partopsep,parsep,% itemsep,labelsepTo,color}% -\newenvironment{questions}[1][] -{% - \ifnum\@eqquestiondepth>\tw@\@toodeep\else - \advance\@eqquestiondepth\@ne\fi - \def\@quesctr{eqquestionno\romannumeral\the\@eqquestiondepth}% - \toks@=\expandafter\expandafter\expandafter{#1}\expandafter - \xdef\csname quesOpts\@quesctr\endcsname{\the\toks@}% - \edef\tempexp{\noexpand\setkeys{props@ques}{\the\toks@}}\tempexp - \list{\qMark@Hook\prior@questionsHook - \insE@rlyAtQues\gdef\eqPTs{1}% - \global\let\eqQT\eq@na% - {\@tempcnta=0 \let\@thispr@b\@empty - \@whilenum\@tempcnta<\@eqquestiondepth\do{\advance\@tempcnta\@ne - \ifx\@thispr@b\@empty\edef\@thispr@b{% - \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\else - \edef\@thispr@b{\@thispr@b% - \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\fi - }\xdef\@currentQues{\@thispr@b}}% - \makebox[\labelwidth][r]{\normalfont\@nameuse{label\@quesctr}}% - \xdef\eq@pageThisQ{\the\c@page}% - \post@questionsHook}{\usecounter{\@quesctr}% +\newenvironment{questions}[1][]{% + \ifnum\@eqquestiondepth>\tw@\@toodeep\else + \advance\@eqquestiondepth\@ne\fi + \def\@quesctr{eqquestionno\romannumeral\the\@eqquestiondepth}% + \toks@=\expandafter\expandafter\expandafter{#1}\expandafter + \xdef\csname quesOpts\@quesctr\endcsname{\the\toks@}% + \edef\tempexp{\noexpand\setkeys{props@ques}{\the\toks@}}\tempexp + \list{\qMark@Hook\prior@questionsHook + \insE@rlyAtQues\gdef\eqPTs{1}% + \global\let\eqQT\eq@na% + {\@tempcnta=0 \let\@thispr@b\@empty + \@whilenum\@tempcnta<\@eqquestiondepth\do{\advance\@tempcnta\@ne + \ifx\@thispr@b\@empty\edef\@thispr@b{% + \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\else + \edef\@thispr@b{\@thispr@b% + \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\fi + }\xdef\@currentQues{\@thispr@b}}% + \makebox[\labelwidth][r]{\normalfont\@nameuse{label\@quesctr}}% + \xdef\eq@pageThisQ{\the\c@page}% + \post@questionsHook}{\usecounter{\@quesctr}% \ifx\propQ@labelsep\@empty - \settowidth{\labelsep}{\propQ@labelsepTo}\else - \setlength{\labelsep}{\propQ@labelsep}\fi + \settowidth{\labelsep}{\propQ@labelsepTo}\else + \setlength{\labelsep}{\propQ@labelsep}\fi \ifx\propQ@labelwidth\@empty - \settowidth{\labelwidth}% - {\propQ@labelwidthTo\hspace{\labelsep}}\else - \settowidth{\labelwidth}{\hspace{\propQ@labelwidth}% - \hspace{\labelsep}}\fi + \settowidth{\labelwidth}% + {\propQ@labelwidthTo\hspace{\labelsep}}\else + \settowidth{\labelwidth}{\hspace{\propQ@labelwidth}% + \hspace{\labelsep}}\fi \setlength{\topsep}{\propQ@topsep}% \setlength{\partopsep}{\propQ@partopsep}% \ifdim\parskip>\z@\addtolength{\topsep}{-\parskip}\fi @@ -1191,16 +1193,16 @@ }{\aeb@endshortquiz} \newenvironment{shortquiz*} {% - \xdef\eq@pageThisQ{\the\c@page}% - {\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne - \xdef\@shortquizCnt{\the\eqtmpcnta}}% - \sqForms\@shortquiz + \xdef\eq@pageThisQ{\the\c@page}% + {\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne + \xdef\@shortquizCnt{\the\eqtmpcnta}}% + \sqForms\@shortquiz }{\aeb@endshortquiz} \def\@shortquiz{\@ifnextchar[% - {\@@shortquiz}{\@@shortquiz[\@sqGenBaseName]}} + {\@@shortquiz}{\@@shortquiz[\@sqGenBaseName]}} \def\sq@setCLN#1{\ifx\aebTitleQuiz\@empty - \protected@edef\@currentlabelname{#1}\else - \protected@edef\@currentlabelname{\@currentlabelname}\fi + \protected@edef\@currentlabelname{#1}\else + \protected@edef\@currentlabelname{\@currentlabelname}\fi } \let\isQZ=q \let\isSQZ=s \let\eqQuizType\relax @@ -1217,7 +1219,7 @@ \let\@Ans\Ans@sq@f \ifx\oField\@empty \typeout{^^JExerquiz: Base field name required when using - shortquiz with '*' option}% + shortquiz with '*' option}% \PackageInfo{exerquiz}{Assuming link style^^J}% \let\@Ans\Ans@sq@l \fi @@ -1329,22 +1331,22 @@ \let\endeqQt\relax \let\prior@quizSolnHeaderHook\@empty \newcommand\quizSolnHeader[3][]{% - \prior@quizSolnHeaderHook - \ifeqforpaper\else\webnewpage\fi\noindent - #2% - \solnspace + \prior@quizSolnHeaderHook + \ifeqforpaper\else\webnewpage\fi\noindent + #2% + \solnspace } \newif\iftherearequizsolutions \therearequizsolutionsfalse \let\aeb@FLOverride\relax \def\includequizsolutions{\@ifstar - {\let\resetQZtsolns\relax\includequizsolutionsi} - {\def\resetQZtsolns{\global\let\include@quizsolutions\relax}% - \includequizsolutionsi}} + {\let\resetQZtsolns\relax\includequizsolutionsi} + {\def\resetQZtsolns{\global\let\include@quizsolutions\relax}% + \includequizsolutionsi}} \newcommand{\includequizsolutionsi}[1][]{% - \filterFor{#1}\includequizsolutionsii} + \filterFor{#1}\includequizsolutionsii} \def\includequizsolutionsii{\include@quizsolutions - \resetQZtsolns - \let\eqFilterArg\@empty} + \resetQZtsolns + \let\eqFilterArg\@empty} \newcommand\useForms{\def\aeb@FLOverride{f}} \newcommand\useLinks{\def\aeb@FLOverride{l}} \newcommand\restoreFLTypeDefault{\global\let\aeb@FLOverride\relax} @@ -1517,243 +1519,245 @@ \eq@hspanner\ignorespaces} \let\Ans@ck@sq@l\Ans@sq@l \let\rbf@Opts\@empty -\def\Ans@sq@f{% - \if\eq@listType\eq@One\stepcounter{quizno}\else - \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}} - {\ifwithinsoldoc\stepcounter{quizno}\else - \refstepcounter{quizno}\fi}\fi\PBS\raggedright - \settowidth{\eq@tmplength}{\eq@lw@f}% - \eq@tmpdima=\wd\eq@tmpbox% - \hangindent=\eq@tmplength\hangafter=1\relax - \insertGrayLetters % 6.3d - \Ans@sq@f@driver -\eq@hspanner\ignorespaces} +\def\Ans@sq@f{\if\eq@listType\eq@One + \stepcounter{quizno}\else + \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}} + {\ifwithinsoldoc\stepcounter{quizno}\else + \refstepcounter{quizno}\fi}\fi + \PBS\raggedright + \settowidth{\eq@tmplength}{\eq@lw@f}% + \eq@tmpdima=\wd\eq@tmpbox% + \hangindent=\eq@tmplength\hangafter=1\relax + \insertGrayLetters + \Ans@sq@f@driver + \eq@hspanner\ignorespaces} \let\Ans@ck@sq@f\Ans@sq@f \newskip\aboveanswersSkip \setlength\aboveanswersSkip{3pt} \providecommand\graylettersColor{gray} \def\insertGrayLetters{\ifaebshowgrayletters - \rlap{\makebox[\RadioFieldSize]% - {\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi} + \rlap{\makebox[\RadioFieldSize]% + {\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi} \newcount\eq@tabColCnt \define@key{bchoice}{nCols}{\def\bChoiceNumCols{#1}} \@for\eqi:=1,2,3,4,5,6,7,8,9,10 \do{\edef\temp@expand@def{% - \noexpand\define@key{bchoice}{\eqi}[\eqi]{% - \noexpand\def\noexpand\bChoiceNumCols{\eqi}}% - }\temp@expand@def + \noexpand\define@key{bchoice}{\eqi}[\eqi]{% + \noexpand\def\noexpand\bChoiceNumCols{\eqi}}% + }\temp@expand@def } \def\bChoiceNumCols{\aeb@numCols} \define@key{bchoice}{random}[true]{% - \csname if#1\endcsname\eq@randomizeChoicestrue - \else\eq@randomizeChoicesfalse\fi + \csname if#1\endcsname\eq@randomizeChoicestrue + \else\eq@randomizeChoicesfalse\fi } \define@key{bchoice}{label}[]{\xdef\bChoiceLabel{#1}} \def\bChoices{\@ifnextchar[{\@ansChoices}{\@ansChoices[\aeb@numCols]}} -\def\@ansChoices[#1]% -{% - \global\let\@tempholdSaveAns\@empty %4/5 - \global\let\@tempholdSaveChoice\@empty %4/5 - \global\let\bChoiceLabel\@empty %4/5 - \setkeys{bchoice}{#1}% - \global\eq@tabColCnt=0 - \ifnum\aeb@numCols=1 % list mode - \def\eq@next{\@layoutListAns}\else % tabular mode - \def\eq@next{\@layoutTabularAns{\bChoiceNumCols}}\fi - \eq@next +\def\@ansChoices[#1]{% + \global\let\@tempholdSaveAns\@empty %4/5 + \global\let\@tempholdSaveChoice\@empty %4/5 + \global\let\bChoiceLabel\@empty %4/5 + \setkeys{bchoice}{#1}% + \global\eq@tabColCnt=\z@ + \ifnum\aeb@numCols=\@ne % list mode + \def\eq@next{\@layoutListAns}\else % tabular mode + \def\eq@next{\@layoutTabularAns{\bChoiceNumCols}}\fi + \eq@next } \let\eChoices\relax \def\@layoutListAns{\@ifnextchar\Ans{\@getListAns}% - {\@lookforendansChoices{\@layoutListAns}}% + {\@lookforendansChoices{\@layoutListAns}}% } \newcommand{\eq@saveAns}[2][]{% - \let\eq@next\@@@SaveAnsGobbleAns - \ifx\bChoiceLabel\@empty\else - \def\eq@savedAnsOpt{#1}\def\eq@savedAnsZO{#2}% - \if\eq@savedAnsZO1 \let\eq@next\@@@SaveAns\fi - \fi\eq@next + \let\eq@next\@@@SaveAnsGobbleAns + \ifx\bChoiceLabel\@empty\else + \def\eq@savedAnsOpt{#1}\def\eq@savedAnsZO{#2}% + \if\eq@savedAnsZO1\let\eq@next\@@@SaveAns\fi + \fi\eq@next } \long\def\@@@SaveAns#1\eAns{% 4/5 - \g@addto@macro\@tempholdSaveAns{\\{\ignorespaces#1}}% - \addtocounter{quizno}{1}% - \edef\temp@expand{\noexpand\g@addto@macro\noexpand + \g@addto@macro\@tempholdSaveAns{\\{\ignorespaces#1}}% + \addtocounter{quizno}{1}% + \edef\temp@expand{\noexpand\g@addto@macro\noexpand \@tempholdSaveChoice{% - \noexpand\\{\ifx\sqstar\@empty\aebChoiceAltFmt\else - \ifaebshowgrayletters\Alph{quizno}\else - \linkContentFormat\fi\fi}}}\temp@expand - \addtocounter{quizno}{-1}% + \noexpand\\{\ifx\sqstar\@empty\aebChoiceAltFmt\else + \ifaebshowgrayletters\Alph{quizno}\else + \linkContentFormat\fi\fi}}}\temp@expand + \addtocounter{quizno}{-1}% } \newif\ifoxfordcomma \oxfordcommatrue \def\oxfordCommaOn{\oxfordcommatrue} \def\oxfordCommaOff{\oxfordcommafalse} \def\eq@insertComma{% - \ifx\eq@comma\@empty - \ifnum\@nameuse{NumAns\eq@namearg}>2\relax - \def\eq@comma{,}\fi - \else\ifx\eq@insertAnd\@empty\eq@comma\space - \else\ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}% - \ifoxfordcomma\eq@comma\fi\else\eq@comma\fi\space - \fi + \ifx\eq@comma\@empty + \ifnum\@nameuse{NumAns\eq@namearg}>\tw@ + \def\eq@comma{,}\fi + \else\ifx\eq@insertAnd\@empty\eq@comma\space + \else\ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}% + \ifoxfordcomma\eq@comma\fi\else\eq@comma\fi\space \fi + \fi } \newcommand\eqAnd{and}\def\eq@insertAnd{% - \ifnum\@nameuse{NumAns\eq@namearg}<2\relax\else - \ifnum\@nameuse{NumAns\eq@namearg}>2\relax - \else\leavevmode\space\fi\eqAnd\space\fi} -\long\def\eq@displayAns#1{\advance\@tempcnta1\relax - \eq@insertComma - \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1} + \ifnum\@nameuse{NumAns\eq@namearg}<\tw@\else + \ifnum\@nameuse{NumAns\eq@namearg}>\tw@\relax + \else\leavevmode\space\fi\eqAnd\space\fi +} +\long\def\eq@displayAns#1{\advance\@tempcnta\@ne + \eq@insertComma + \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1} \def\eq@displayAlts#1{\advance\@tempcnta1 - \eq@insertComma - \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi - \savedAltFmt{#1}} + \eq@insertComma + \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi + \savedAltFmt{#1}} \def\eq@displayAltsAns#1{\advance\@tempcnta1\relax - \eq@insertComma - \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1} + \eq@insertComma + \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1} \newcommand{\savedAltFmt}[1]{(#1)} \newcommand{\useSavedAns}{\bgroup\@ifstar{\useSavedAns@i} - {\let\eq@insertAnd\@empty\useSavedAns@i}} + {\let\eq@insertAnd\@empty\useSavedAns@i}} \newcommand{\useSavedAns@i}[2][]{\@tempcnta=0\relax - \def\eq@namearg{#2}\let\label\@gobble - \def\eq@argi{#1}\ifx\eq@argi\@empty - \let\eq@comma\@empty - \let\\\eq@displayAns\@nameuse{SavedAns#2}\else - \@nameuse{SavedAns#2-Idx#1}\fi - \egroup + \def\eq@namearg{#2}\let\label\@gobble + \def\eq@argi{#1}\ifx\eq@argi\@empty + \let\eq@comma\@empty + \let\\\eq@displayAns\@nameuse{SavedAns#2}\else + \@nameuse{SavedAns#2-Idx#1}\fi + \egroup } \newcommand{\useSavedAlts}{\bgroup\@ifstar{\useSavedAlts@i} - {\let\eq@insertAnd\@empty\useSavedAlts@i}} + {\let\eq@insertAnd\@empty\useSavedAlts@i}} \newcommand{\useSavedAlts@i}[2][]{\@tempcnta=0\relax - \def\eq@namearg{#2}\@nameuse{caseFor#2}% - \def\eq@argi{#1}\ifx\eq@argi\@empty - \let\eq@comma\@empty - \let\\\eq@displayAlts\@nameuse{SavedAlts#2}\else - \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}\fi - \egroup + \def\eq@namearg{#2}\@nameuse{caseFor#2}% + \def\eq@argi{#1}\ifx\eq@argi\@empty + \let\eq@comma\@empty + \let\\\eq@displayAlts\@nameuse{SavedAlts#2}\else + \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}\fi + \egroup } \newcommand{\useSavedAltsAns}{\bgroup\@ifstar{\useSavedAltsAns@i} - {\let\eq@insertAnd\@empty\useSavedAltsAns@i}} + {\let\eq@insertAnd\@empty\useSavedAltsAns@i}} \newcommand{\useSavedAltsAns@i}[2][]{\@tempcnta=0\relax - \def\eq@namearg{#2}\@nameuse{caseFor#2}\let\label\@gobble - \def\eq@argi{#1}\ifx\eq@argi\@empty - \let\eq@comma\@empty - \let\\\eq@displayAltsAns\@nameuse{SavedAltsAns#2}\else - \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}} - \@nameuse{SavedAns#2-Idx#1}\fi - \egroup + \def\eq@namearg{#2}\@nameuse{caseFor#2}\let\label\@gobble + \def\eq@argi{#1}\ifx\eq@argi\@empty + \let\eq@comma\@empty + \let\\\eq@displayAltsAns\@nameuse{SavedAltsAns#2}\else + \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}} + \@nameuse{SavedAns#2-Idx#1}\fi + \egroup } \newcommand{\useSavedNumAns}[1]{\@nameuse{NumAns#1}} -\long\def\@@@SaveAnsGobbleAns#1\eAns{} % 4/5 -\long\def\@getListAns\Ans#1\eAns{%\@@par %start new paragraph - \eq@saveAns#1\eAns % 4/5 - \Ans#1\vspace{\@rowskip}% - \@layoutListAns +\long\def\@@@SaveAnsGobbleAns#1\eAns{} +\long\def\@getListAns\Ans#1\eAns{%\@@par + \eq@saveAns#1\eAns + \Ans#1\vspace{\@rowskip}% + \@layoutListAns } \long\def\@lookforendansChoices#1{% - \@ifnextchar\eChoices{\rowsep{\rowsep@default}% - \expandafter\@findendans\@gobble}{\expandafter#1\@gobble}% + \@ifnextchar\eChoices{\rowsep{\rowsep@default}% + \expandafter\@findendans\@gobble}{\expandafter#1\@gobble}% } \def\@layoutTabularAns#1{% - \let\eq@tabSep\@empty - \xdef\numShortCols{#1}% - \ifnum#1>\aeb@numCols \xdef\numShortCols{\aeb@numCols}\fi - \@@layoutTabularAns + \let\eq@tabSep\@empty + \xdef\numShortCols{#1}% + \ifnum#1>\aeb@numCols \xdef\numShortCols{\aeb@numCols}\fi + \@@layoutTabularAns } \def\@@layoutTabularAns{% - \@ifnextchar\Ans{\@getTabAns}% - {\@lookforendansChoices{\@@layoutTabularAns}}% + \@ifnextchar\Ans{\@getTabAns}% + {\@lookforendansChoices{\@@layoutTabularAns}}% } \def\rowsep#1{\gdef\@rowsep{[#1]}\gdef\@rowskip{#1}}% \rowsep{\rowsep@default} \def\rowsepDefault#1{\def\rowsep@default{#1}} \def\rowsep@default{0pt} \long\def\@getTabAns\Ans#1\eAns{% - \eq@saveAns#1\eAns - \global\advance\eq@tabColCnt1 - \let\@save@tabSep=\eq@tabSep - \ifnum\eq@tabColCnt=\numShortCols - \global\eq@tabColCnt=0 - \xdef\eq@tabSep{\noexpand\\\noalign{\kern\@rowskip\relax}}% - \else - \gdef\eq@tabSep{&}% - \fi - \@ifnextchar\eChoices{\@save@tabSep\Ans#1\rowsep{\rowsep@default} - \expandafter\@findendans\@gobble}% - {\@save@tabSep\Ans#1\@@layoutTabularAns}% + \eq@saveAns#1\eAns + \global\advance\eq@tabColCnt1 + \let\@save@tabSep=\eq@tabSep + \ifnum\eq@tabColCnt=\numShortCols + \global\eq@tabColCnt=0 + \xdef\eq@tabSep{\noexpand\\\noalign{\kern\@rowskip\relax}}% + \else + \gdef\eq@tabSep{&}% + \fi + \@ifnextchar\eChoices{\@save@tabSep\Ans#1\rowsep{\rowsep@default} + \expandafter\@findendans\@gobble}% + {\@save@tabSep\Ans#1\@@layoutTabularAns}% } -\def\@findendans{\@ifnextchar\end{% 4/5 - \ifx\bChoiceLabel\@empty\else - \processLabeledAns\fi - }{\expandafter\@findendans\@gobble}}% +\def\@findendans{\@ifnextchar\end{% + \ifx\bChoiceLabel\@empty\else + \processLabeledAns\fi + }{\expandafter\@findendans\@gobble}}% \def\defineEachAns#1{\advance\eqtmpcnta\@ne - \@temptokena={#1}\csarg\xdef - {SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}{\the\@temptokena}% - \ifsolutionsonly\else - {\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}% - {\the\@temptokena}}}\fi + \@temptokena={#1}\csarg\xdef + {SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}{\the\@temptokena}% + \ifsolutionsonly\else + {\let\\\relax\eq@IWDefs{\string + \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}% + {\the\@temptokena}}}% + \fi } \def\defineEachChoice#1{\advance\eqtmpcnta\@ne - \@temptokena={#1}\csarg\xdef - {SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}% - {\the\@temptokena}\ifsolutionsonly\else - {\let\\\relax\eq@IWDefs{\string - \csarg\string - \gdef{SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}% - {\the\@temptokena}}}\fi + \@temptokena={#1}\csarg\xdef + {SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}% + {\the\@temptokena}\ifsolutionsonly\else + {\let\\\relax\eq@IWDefs{\string + \csarg\string + \gdef{SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}% + {\the\@temptokena}}}\fi } \def\processLabeledAns{% - \bgroup - \let\label\@gobble -\if\aeb@FLOverride\eq@l - \global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\else - \ifaebshowgrayletters + \bgroup + \let\label\@gobble + \if\aeb@FLOverride\eq@l + \global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\else + \ifaebshowgrayletters \global\@namedef{caseFor\bChoiceLabel}{\graylettersOn}\else \global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\fi -\fi - \toks@=\expandafter{\@tempholdSaveAns}\csarg - \xdef{SavedAns\bChoiceLabel}{\the\toks@}% - \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAns\bChoiceLabel}{\the\toks@}}}\fi - \eqtmpcnta\z@\let\\\defineEachAns\the\toks@ - \xdef\@currNCntAns{\the\eqtmpcnta}\csarg - \xdef{NumAns\bChoiceLabel}{\@currNCntAns}% - \ifsolutionsonly\else{\eq@IWDefs{\string - \csarg\string\gdef{NumAns\bChoiceLabel}{\the\eqtmpcnta}}}\fi - \toks@=\expandafter{\@tempholdSaveChoice}\csarg - \xdef{SavedAlts\bChoiceLabel}{\the\toks@}% - \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAlts\bChoiceLabel}{\the\toks@}}}\fi - \eqtmpcnta\z@\relax\let\\\defineEachChoice\the\toks@ - \eqtmpcnta\@ne\toks@={}%{\ignorespaces\@gobble}% - \loop - \edef\temp@exp{\the\toks@\noexpand\\{% - \noexpand\useSavedAlts[\the\eqtmpcnta]{\bChoiceLabel} - \noexpand\useSavedAns[\the\eqtmpcnta]{\bChoiceLabel}}}% - \toks@=\expandafter{\temp@exp}% - \ifnum\eqtmpcnta<\@currNCntAns\relax - \advance\eqtmpcnta\@ne - \repeat - \csarg\xdef{SavedAltsAns\bChoiceLabel}{\the\toks@}% - \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAltsAns\bChoiceLabel}{\the\toks@}}}\fi - \egroup + \fi + \toks@=\expandafter{\@tempholdSaveAns}\csarg + \xdef{SavedAns\bChoiceLabel}{\the\toks@}% + \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string + \csarg\string\gdef{SavedAns\bChoiceLabel}{\the\toks@}}}\fi + \eqtmpcnta\z@\let\\\defineEachAns\the\toks@ + \xdef\@currNCntAns{\the\eqtmpcnta}\csarg + \xdef{NumAns\bChoiceLabel}{\@currNCntAns}% + \ifsolutionsonly\else{\eq@IWDefs{\string + \csarg\string\gdef{NumAns\bChoiceLabel}{\the\eqtmpcnta}}}\fi + \toks@=\expandafter{\@tempholdSaveChoice}\csarg + \xdef{SavedAlts\bChoiceLabel}{\the\toks@}% + \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string + \csarg\string\gdef{SavedAlts\bChoiceLabel}{\the\toks@}}}\fi + \eqtmpcnta\z@\relax\let\\\defineEachChoice\the\toks@ + \eqtmpcnta\@ne\toks@={}%{\ignorespaces\@gobble}% + \loop + \edef\temp@exp{\the\toks@\noexpand\\{% + \noexpand\useSavedAlts[\the\eqtmpcnta]{\bChoiceLabel} + \noexpand\useSavedAns[\the\eqtmpcnta]{\bChoiceLabel}}}% + \toks@=\expandafter{\temp@exp}% + \ifnum\eqtmpcnta<\@currNCntAns\relax + \advance\eqtmpcnta\@ne + \repeat + \csarg\xdef{SavedAltsAns\bChoiceLabel}{\the\toks@}% + \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string + \csarg\string\gdef{SavedAltsAns\bChoiceLabel}{\the\toks@}}}\fi + \egroup } \def\graylettersOn{\aebshowgrayletterstrue} \def\graylettersOff{\aebshowgraylettersfalse} \def\aeb@exiii{\expandafter\expandafter\expandafter} \def\REF{\@ifstar{\let\isREFstar\eq@One\aeb@REFstar} - {\let\isREFstar\eq@Zero\aeb@REF}} + {\let\isREFstar\eq@Zero\aeb@REF}} \def\aeb@REFstar#1{\@ifundefined{r@#1}{\hbox{\reset@font\bfseries ??}} - {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}% - \else\ref*{#1}\fi}% + {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}% + \else\ref*{#1}\fi}% } \def\aeb@REF#1{\@ifundefined{r@#1}{\hbox{\reset@font\bfseries ??}} - {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}% - \else\ref{#1}\fi}% + {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}% + \else\ref{#1}\fi}% } \def\aeb@buildUpperCaseRef#1{% - \xdef\tmp@expand{\aeb@exiii\@firstoftwo\csname r@#1\endcsname}% - \xdef\tmp@expand{\uppercase{\tmp@expand}}\tmp@expand + \xdef\tmp@expand{\aeb@exiii\@firstoftwo\csname r@#1\endcsname}% + \xdef\tmp@expand{\uppercase{\tmp@expand}}\tmp@expand } \endinput %% diff --git a/texmf-dist/tex/latex/eqexam/eqexam.sty b/texmf-dist/tex/latex/eqexam/eqexam.sty index 92f13ee9..0b7ac0ae 100644 --- a/texmf-dist/tex/latex/eqexam/eqexam.sty +++ b/texmf-dist/tex/latex/eqexam/eqexam.sty @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% eqexam.sty package, %% -%% Copyright (C) 2005--2020 D. P. Story %% +%% Copyright (C) 2005--2021 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -19,8 +19,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{eqexam} - [2020/03/14 v5.1.10 An Exam Construction Package (dps)] -\def\eqexamdefReq{2020/03/14} + [2021/01/20 v5.1.13 An Exam Construction Package (dps)] +\def\eqexamdefReq{2021/01/20} \RequirePackage{ifpdf}[2006/02/20] \RequirePackage{ifxetex}[2006/08/21] \usepackage{xkeyval} @@ -1987,8 +1987,10 @@ {\vfill}\hfill\fi \minipage[b][\eqedepth][t]{\mp@Width}% {\lccode`C=`\%\lowercase{\eqe@IW{% - \string\def\string\panelgap{\panelgap}% - \string\setlength{\string\panelwidth}{\ss@Argiii}% + \string\def\string\panelgap{\panelgap}C^^J% + \string\setlength{\string\panelwidth}{\ss@Argiii}C^^J% + \string\setlength{\string\linewidth}{\string + \linewidth-\string\eqemargin}C^^J% \string\def\string\eqedepth {\ifeq@nosolutions\ss@Argii\else\ss@Argii\fi}C}}}% {\lccode`C=`\%\lowercase{\eqe@IW{\string\vskip2pt @@ -2551,6 +2553,17 @@ \def\hidden@ttr{[#1]}\let\numpoints\@empty\else \let\hidden@ttr\relax\def\numpoints{#1}\fi \problem@cont} +\let\probV@luesInsert\relax +\def\probV@@luesInsert{\bgroup\@tempcnta\value{eqquestionnoi}\advance + \@tempcnta\@ne % Jan21 + \eqe@IWO\@auxout{\string\csarg\string + \gdef{value\thisexamlabel Prob\the\@tempcnta}{\numpoints}}\egroup +} +\def\trackProblemsOn{\let\probV@luesInsert\probV@@luesInsert} +\def\trackProblemsOff{\let\probV@luesInsert\relax} +\trackProblemsOff +\newcommand{\numPtsOfProblem}[2][\thisexamlabel]% + {\@nameuse{value#1Prob#2}} \newcommand{\problem@cont}[1][]{\let\isProbEnv\eqe@YES \def\@rgi{#1}\ifx\hidden@ttr\relax % assume a number or empty \ifx\@rgi\@empty\else\def\hidden@ttr{[#1]}\fi\fi @@ -2568,6 +2581,7 @@ \def\@ltii{\let\@isitstar\eqe@Zero\eqe@gobbletoend}% \expandafter\@ifstar\expandafter\@lti \expandafter\@ltii\numpoints\end + \probV@luesInsert % Jan21 \if\@isitstar\eqe@One\addtocounter{eqpointvalue}{\numpoints}% \@marktotalvalue \ifdispl@yPoints @@ -2586,7 +2600,8 @@ \begin{eqequestions}% \edef\ctrld@exp@exercise{\noexpand \begin{exercise}[eqquestionnoi]\hidden@ttr}% - \ctrld@exp@exercise\ignorespaces\eqe@p@gobnxtp@r} + \ctrld@exp@exercise\ignorespaces\eqe@p@gobnxtp@r +} \def\endproblem{\end{exercise}% \end{eqequestions}% \ifeqlocalversion\ifeqglobalversion @@ -2849,8 +2864,10 @@ \ifx\argi\@empty \let\marginpoints\@empty \else + \probV@luesInsert % Jan21 \ifx\argii\@empty \ifx\marginpoints\@empty\else + \probV@luesInsert % Jan21 \if\@isitstar\eqe@One \addtocounter{eqpointvalue}{#1}% \@marktotalvalue\ifdispl@yPoints @@ -2894,6 +2911,7 @@ \edef\numpoints{\@nameuse{prob\thisexamlabel.\theeq@count}}% \fi \ifx\marginpoints\@empty\else + \probV@luesInsert % Jan21 \ifdispl@yPoints \if\@isitstar\eqe@One \def\marginparafterhook{\acp@mpah}\else @@ -3518,8 +3536,7 @@ \let\probInMinip@ge\eqTWSave\noindent} \let\probInMinip@ge\relax \newenvironment{vadjForSolnInBx}[1]{% - \setlength\@tempdima{#1}% - \setbox\z@\vbox\bgroup\hsize\@tempdima + \setlength\@tempdima{#1}\setbox\z@\vbox\bgroup\hsize\@tempdima }{% \egroup \ifanswerkey diff --git a/texmf-dist/tex/latex/eqexam/eqtextb.def b/texmf-dist/tex/latex/eqexam/eqtextb.def index 02683ff2..d38ac5f1 100644 --- a/texmf-dist/tex/latex/eqexam/eqtextb.def +++ b/texmf-dist/tex/latex/eqexam/eqtextb.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% eqexam.sty package, %% -%% Copyright (C) 2005--2020 D. P. Story %% +%% Copyright (C) 2005--2021 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/eqexam/flextended.def b/texmf-dist/tex/latex/eqexam/flextended.def index ab9942b6..8e2a512a 100644 --- a/texmf-dist/tex/latex/eqexam/flextended.def +++ b/texmf-dist/tex/latex/eqexam/flextended.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% eqexam.sty package, %% -%% Copyright (C) 2005--2020 D. P. Story %% +%% Copyright (C) 2005--2021 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/eqexam/fortextbook.sty b/texmf-dist/tex/latex/eqexam/fortextbook.sty index 4c8929e0..5fa6c794 100644 --- a/texmf-dist/tex/latex/eqexam/fortextbook.sty +++ b/texmf-dist/tex/latex/eqexam/fortextbook.sty @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% eqexam.sty package, %% -%% Copyright (C) 2005--2020 D. P. Story %% +%% Copyright (C) 2005--2021 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% |