diff options
author | Norbert Preining <norbert@preining.info> | 2020-01-09 19:22:34 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-01-09 19:22:34 +0900 |
commit | 0e4e0e68edf53514b53187573df205d317fe36e9 (patch) | |
tree | e59c613227e37563b7d0e6307e5921ddcba3e0a4 /texmf-dist | |
parent | 037d980bc744e857c5ae07ccea5907ce0f03fa8b (diff) |
acrotex update
Diffstat (limited to 'texmf-dist')
33 files changed, 367 insertions, 1988 deletions
diff --git a/texmf-dist/doc/latex/acrotex/README.md b/texmf-dist/doc/latex/acrotex/README.md index 2ea307d3..f226cb32 100644 --- a/texmf-dist/doc/latex/acrotex/README.md +++ b/texmf-dist/doc/latex/acrotex/README.md @@ -1,6 +1,6 @@ The AcroTeX eDucation Bundle Author: D. P. Story -Dated: 2019-12-17 +Dated: 2020-01-01 AeB contains the following: @@ -19,6 +19,10 @@ AeB contains the following: 6) Documentation for AeB (AcroTeX eDucatation Bundle) and eForms (including insdljs and dljslib). +What's New (2020-01-01) Replace use of \count0 with new counter \eqtmpcnta, +in situation, the value of \count0 was leaking out giving incorrect page +numbers. + What's New (2019-12-17) Defined \InputExrSolnsLevel and \InputQzSolnsLevel to make it easy to change the section-type for the solution pages. diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.tex b/texmf-dist/doc/latex/acrotex/aeb_man.tex index 032ec52e..5b9744d5 100644 --- a/texmf-dist/doc/latex/acrotex/aeb_man.tex +++ b/texmf-dist/doc/latex/acrotex/aeb_man.tex @@ -232,10 +232,10 @@ \university{{\AcroT} Software Development Team} \email{dpstory@acrotex.net} \versionLabel{Dated:} -\version{2019/12/17} +\version{2020/01/01} \copyrightyears{1999-\the\year} \nocopyright -\prepared{2019/12/17} +\prepared{2020/01/01} \revisionLabel{Distribution Dated:} \copyrightStatus{True} diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf Binary files differindex 9ca2b2ab..70229d4e 100644 --- a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf +++ b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf diff --git a/texmf-dist/source/latex/acrotex/acrotex.ins b/texmf-dist/source/latex/acrotex/acrotex.ins index 84304311..3afd02ab 100644 --- a/texmf-dist/source/latex/acrotex/acrotex.ins +++ b/texmf-dist/source/latex/acrotex/acrotex.ins @@ -57,7 +57,7 @@ \generate{% \file{exerquiz.sty}{\from{exerquiz.dtx}{copyright,package}} \file{aebjs.def}{\from{exerquiz.dtx}{copyright,aebjs}} - \file{eqexam.def}{\from{exerquiz.dtx}{eqexam}} +% \file{eqexam.def}{\from{exerquiz.dtx}{eqexam}} \file{aebrandom.def}{\from{exerquiz.dtx}{copyright,randomize}} \file{aebsumrytbls.def}{\from{exerquiz.dtx}{copyright,sumrytbls}} \file{usemcfi.def}{\from{exerquiz.dtx}{copyright,mcfi}} diff --git a/texmf-dist/source/latex/acrotex/exerquiz.dtx b/texmf-dist/source/latex/acrotex/exerquiz.dtx index 275fffcb..255756e0 100644 --- a/texmf-dist/source/latex/acrotex/exerquiz.dtx +++ b/texmf-dist/source/latex/acrotex/exerquiz.dtx @@ -4,7 +4,7 @@ %<*copyright> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -22,7 +22,7 @@ %<randomize>\ProvidesFile{aebrandom.def} %<sumrytbls>\ProvidesFile{aebsumrytbls.def} %<template>\ProvidesFile{template.`def} -%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2019/12/17 v8.5.5 % +%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2020/01/01 v8.5.8 % %<package> Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)] %<driver> Exerquiz documentation driver file (dps)] %<aebjs> Exerquiz document level JavaScript (dps)] @@ -1360,6 +1360,15 @@ % \begin{macrocode} \newcounter{quizno} \setcounter{quizno}{0} \renewcommand\thequizno{\alph{quizno}} +% \end{macrocode} +% (2020/01/01) In certain circumstances, page numbering is incorrect; traced it to the +% use of \cs{count0}/\cs{count\cs{z@}}, possibly not used within a group. As a fix, +% replaced this usage with the counter \cs{eqtmpcnta}. +% \changes{v8.5.7}{2020/01/01}{added public counter \string\cs{eqtmpcnta}} +% \changes{v8.5.8}{2020/01/01}{Replaced \string\cs{count\cs{z@}} and \cs{count0} with \string\cs{eqtmpcnta}, +% this fixed the page number leakage problem} +% \begin{macrocode} +\newcount\eqtmpcnta %</package|eqexam> %<*package> \def\theHquizno{\curr@quiz.\theeqquestionnoi.% @@ -3627,8 +3636,8 @@ % We have to increase the \texttt{tocdepth} so hyperref will create the bookmark at the % subsection level. % \begin{macrocode} -{\count0=\value{tocdepth} -\advance\count0by2 \xdef\eqbmkmrkdepth{\the\count0}} +{\eqtmpcnta\value{tocdepth} +\advance\eqtmpcnta\tw@ \xdef\eqbmkmrkdepth{\the\eqtmpcnta}} \@ifundefined{Hy@bookmarksdepth} {\setcounter{tocdepth}{\eqbmkmrkdepth}} {\hypersetup{bookmarksdepth=\eqbmkmrkdepth}} @@ -3904,8 +3913,8 @@ % \begin{macrocode} \xdef\eq@pageThisQ{\the\c@page}% \let\@currentQues\@empty - {\count0=\@shortquizCnt \advance\count0by1\relax - \xdef\@shortquizCnt{\the\count0}}% + {\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne + \xdef\@shortquizCnt{\the\eqtmpcnta}}% \goodbreak\@ifstar{\sqForms\@shortquiz}% {\if\aeb@FLOverride\eq@f\def\sqstar{*}\else \def\sqstar{}\sqLinks\fi\@shortquiz}% @@ -3926,8 +3935,8 @@ \newenvironment{shortquiz*} {% \xdef\eq@pageThisQ{\the\c@page}% - {\count0=\@shortquizCnt\advance\count0by1\relax - \xdef\@shortquizCnt{\the\count0 }}% + {\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne + \xdef\@shortquizCnt{\the\eqtmpcnta}}% \sqForms\@shortquiz }{\aeb@endshortquiz} % \end{macrocode} @@ -4220,18 +4229,22 @@ % it issues a \cs{newpage}. % \changes{v6.4s}{2012/06/03}{Added \cs{promoteNewPageHere}} % \changes{v6.8a}{2014/01/01}{Made an optional argument, but test for required argument as swell.} +% \changes{v8.5.6}{2020/01/01}{\string\promoteNewPageHere: added condition, first arg must be greater +% then 0pt; otherwise, do nothing} % \begin{macrocode} \newcommand\pnphDflt{.1\textheight} \newcommand{\promoteNewPageHere}[1][\pnphDflt]{% \@ifnextchar\bgroup{\eq@promoteNewPageHere} {\eq@promoteNewPageHere{#1}}% } -\def\eq@promoteNewPageHere#1{\par +\def\eq@promoteNewPageHere#1{\setlength{\@tempdimb}{#1}% + \ifdim\@tempdima>\z@\par \bgroup\@nobreakfalse\addpenalty{-500}% - \setlength{\@tempdimb}{#1}\@tempdima \pagegoal +% \setlength{\@tempdimb}{#1} + \@tempdima \pagegoal \advance \@tempdima -\pagetotal \ifdim \@tempdima<\@tempdimb\ifnum\col@number>\@ne\columnbreak - \else\newpage\penalty1\fi\fi\egroup + \else\newpage\penalty1\fi\fi\egroup\fi } % \end{macrocode} % The two macros\DescribeMacro{\saveDest}\cs{saveDest} and \DescribeMacro{\useDest}\cs{useDest} are used, @@ -4613,8 +4626,8 @@ % \end{macrocode} % Update the internal quiz counter. % \begin{macrocode} - {\count0=\@quizCnt\advance\count0by1\relax - \xdef\@quizCnt{\the\count0 }}% + {\eqtmpcnta\@quizCnt\advance\eqtmpcnta\@ne + \xdef\@quizCnt{\the\eqtmpcnta}}% % \end{macrocode} % We try to support {\LaTeX}'s cross-referencing system by defining % \cs{@currentlabel}, \cs{@currentHlabel}, and \cs{@currentlabelname}. @@ -7151,20 +7164,21 @@ if (_bOK) {\jsR\jsT % \changes{v6.7g}{2013/08/09}{Changed \texttt{\#1} to \cs{the}\cs{@temptokena} Fixing % a nasty bug. Reported by Christopher C.} % \begin{macrocode} -\def\defineEachAns#1{\advance\count0by1\relax +\def\defineEachAns#1{\advance\eqtmpcnta\@ne \@temptokena={#1}\csarg\xdef - {SavedAns\bChoiceLabel-Idx\the\count0}{\the\@temptokena}% + {SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}{\the\@temptokena}% \ifsolutionsonly\else {\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\count0}% + \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}% {\the\@temptokena}}}\fi } -\def\defineEachChoice#1{\advance\count0by1\relax +\def\defineEachChoice#1{\advance\eqtmpcnta\@ne \@temptokena={#1}\csarg\xdef - {SavedAlts\bChoiceLabel-Idx\the\count0}% + {SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}% {\the\@temptokena}\ifsolutionsonly\else {\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAlts\bChoiceLabel-Idx\the\count0}% + \csarg\string + \gdef{SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}% {\the\@temptokena}}}\fi } \def\processLabeledAns{% @@ -7183,24 +7197,24 @@ if (_bOK) {\jsR\jsT \xdef{SavedAns\bChoiceLabel}{\the\toks@}% \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string \csarg\string\gdef{SavedAns\bChoiceLabel}{\the\toks@}}}\fi - \count0=0\relax\let\\\defineEachAns\the\toks@ - \xdef\@currNCntAns{\the\count0 }\csarg + \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\count0 }}}\fi + \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 - \count0=0\relax\let\\\defineEachChoice\the\toks@ - \count0=1\relax\toks@={}%{\ignorespaces\@gobble}% + \eqtmpcnta\z@\relax\let\\\defineEachChoice\the\toks@ + \eqtmpcnta\@ne\toks@={}%{\ignorespaces\@gobble}% \loop \edef\temp@exp{\the\toks@\noexpand\\{% - \noexpand\useSavedAlts[\the\count0]{\bChoiceLabel} - \noexpand\useSavedAns[\the\count0]{\bChoiceLabel}}}% + \noexpand\useSavedAlts[\the\eqtmpcnta]{\bChoiceLabel} + \noexpand\useSavedAns[\the\eqtmpcnta]{\bChoiceLabel}}}% \toks@=\expandafter{\temp@exp}% - \ifnum\count0<\@currNCntAns - \advance\count0by1 + \ifnum\eqtmpcnta<\@currNCntAns\relax + \advance\eqtmpcnta\@ne \repeat \csarg\xdef{SavedAltsAns\bChoiceLabel}{\the\toks@}% \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string @@ -7361,11 +7375,11 @@ if (_bOK) {\jsR\jsT % \begin{macrocode} \def\aeb@randomizeChoices#1{% \setrannum{\aeb@ranChoice}{1}{#1} - \count0=0 \aeb@hold=\expandafter{\@temphold}\def\@temphold{}% + \eqtmpcnta\z@\aeb@hold=\expandafter{\@temphold}\def\@temphold{}% \expandafter\@tfor\expandafter \@temp\expandafter:\expandafter=\the\aeb@hold \do {% - \advance\count0by1 - \ifnum\count0=\aeb@ranChoice + \advance\eqtmpcnta\@ne + \ifnum\eqtmpcnta=\aeb@ranChoice\relax \aeb@hold=\expandafter\expandafter\expandafter {\expandafter\@tempholdrandom\@temp}% \edef\@tempholdrandom{\the\aeb@hold}% @@ -8490,7 +8504,7 @@ if (!isQuizInitialized("@currQuiz")) { \def\word##1{\\b##1\\b}\def\any{@any@}\fi \xdef\rbTxtAlt{\rbFlag,\eq@argi,\eq@argii}% \global\let\txtAltList\@empty - \count0=#4 \ifnum\count0 > 0 \expandafter\@argRead\else + \eqtmpcnta=#4\relax\ifnum\eqtmpcnta>\z@\expandafter\@argRead\else \PackageError{exerquiz}{% The fourth required parameter of \string\RespBoxTxt\MessageBreak is required to be a positive integer. You entered\MessageBreak @@ -8499,8 +8513,8 @@ if (!isQuizInitialized("@currQuiz")) { \def\@argRead#1{\xdef\jsTempArgs{\txtAltList}% \ifx\txtAltList\@empty\xdef\txtAltList{"#1"}\else \xdef\txtAltList{\jsTempArgs,"#1"}\fi\@@argRead} -\def\@@argRead{\advance\count0 by-1\relax - \ifnum\count0=0\relax +\def\@@argRead{\advance\eqtmpcnta\m@ne + \ifnum\eqtmpcnta=\z@ \def\eq@next{\endgroup \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}% \if\grpquestions\eq@Zero @@ -8663,7 +8677,7 @@ if (!isQuizInitialized("@currQuiz")) { \def\word##1{\\b##1\\b}\def\any{@any@} \gdef\rbTxtAlt{\rbFlag,#1,1}% force sub-string match \global\let\txtAltList\@empty - \count0=#3 \ifnum\count0>0 \expandafter\@argReadPC\else + \eqtmpcnta=#3\relax\ifnum\eqtmpcnta>\z@\expandafter\@argReadPC\else \PackageError{exerquiz}{% The third required parameter of \string\RespBoxTxtPC\MessageBreak @@ -8677,8 +8691,8 @@ if (!isQuizInitialized("@currQuiz")) { \newcommand\@argReadPC[2][0]{\xdef\jsTempArgs{\txtAltList}% \ifx\txtAltList\@empty\xdef\txtAltList{["#2",#1]}\else \xdef\txtAltList{\jsTempArgs,["#2",#1]}\fi\@@argReadPC} -\def\@@argReadPC{\advance\count0 by-1\relax - \ifnum\count0=0\relax +\def\@@argReadPC{\advance\eqtmpcnta\m@ne + \ifnum\eqtmpcnta=\z@ \def\eq@next{\endgroup \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}% \if\grpquestions\eq@Zero @@ -9413,22 +9427,22 @@ if (!isQuizInitialized("@currQuiz")) { \newcommand{\displaySumryTbl}[2][]{% \begingroup\edef\currQuiz{#2}\edef\oField{#2}\edef\curr@quiz{#2}% \setkeys{smrytbl}{#1}% - \count0=\smrytbl@ntables + \eqtmpcnta\smrytbl@ntables\relax % \end{macrocode} % We accept only 1 or 2 as an argument, we put it in \cs{count0}, % if not an integer, we'll stop the compile. If the argument is not 1, % we force a value of 2. % \begin{macrocode} -% \ifnum\count0=1\relax\else\count0=2\relax\fi - \eq@rowcnt=0\relax\@tempcntb=\value{questionno}% +% \ifnum\eqtmpcnta=\@ne\else\eqtmpcnta\tw@\fi + \eq@rowcnt\z@\@tempcntb=\value{questionno}% % \end{macrocode} % We calculate the number of rows in the first column, in case % of a two column table. When the number of questions is odd, % the the left-hand table will have one more entry than the right-hand % column. % \begin{macrocode} - \ifnum\count\z@=2\relax - \divide\@tempcntb2\relax + \ifnum\eqtmpcnta=\tw@ + \divide\@tempcntb\tw@ \advance\@tempcntb\ifodd\value{questionno}2\else1\fi \xdef\@beginSecCol{\the\@tempcntb}% \advance\@tempcntb-1\relax @@ -9436,9 +9450,9 @@ if (!isQuizInitialized("@currQuiz")) { % \end{macrocode} % Three table support % \begin{macrocode} - \ifnum\count\z@=3 + \ifnum\eqtmpcnta=\thr@@ \edef\eq@n{\the\@tempcntb}% - \divide\@tempcntb\count\z@ + \divide\@tempcntb\eqtmpcnta \edef\eq@q{\the\@tempcntb}% \@tempcnta=\@tempcntb\multiply\@tempcnta3 \edef\eq@p{\the\@tempcnta}% @@ -9560,13 +9574,13 @@ if (!isQuizInitialized("@currQuiz")) { % \end{macrocode} % Now for the definition of \cs{@@eqListExp} which does the work in the table. % \begin{macrocode} -\def\@@eqListExp#1#2{\global\advance\eq@rowcnt1\relax +\def\@@eqListExp#1#2{\global\advance\eq@rowcnt\@ne % \end{macrocode} % If it is the first row, we insert the push button that will activate % when the page becomes visible, and we expand \cs{eq@begintab}, which % is a \texttt{tabular} environment. % \begin{macrocode} - \ifnum\eq@rowcnt=1\relax + \ifnum\eq@rowcnt=\@ne \pbPopulateSumTable\ifsmrytbl@corrections\else \pbDoNoCorrectSumryTbl\fi\expandafter\eq@begintab\fi % \end{macrocode} @@ -9574,10 +9588,10 @@ if (!isQuizInitialized("@currQuiz")) { % value of the first row of the second table, we emit another % \cs{eq@begintab}. % \begin{macrocode} - \ifnum\count0>1 \ifnum\eq@rowcnt=\@beginSecCol\relax + \ifnum\eqtmpcnta>\@ne\ifnum\eq@rowcnt=\@beginSecCol\relax \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab \fi\fi - \ifnum\count0=3 \ifnum\eq@rowcnt=\@beginThrdCol\relax + \ifnum\eqtmpcnta=\thr@@\ifnum\eq@rowcnt=\@beginThrdCol\relax \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab \fi\fi % \end{macrocode} @@ -9588,7 +9602,7 @@ if (!isQuizInitialized("@currQuiz")) { % We set the \cs{eq@endtab} at the bottom of the first table, % and at the bottom of the second table. % \begin{macrocode} -% \ifnum\count0=2 \ifnum\eq@rowcnt=\@tempcntb +% \ifnum\count0=\tw@\ifnum\eq@rowcnt=\@tempcntb % \expandafter\eq@endtab\fi\fi \ifnum\eq@rowcnt=\thequestionno\relax\expandafter\eq@endtab\fi } diff --git a/texmf-dist/source/latex/acrotex/web.dtx b/texmf-dist/source/latex/acrotex/web.dtx index 312e6e40..473c39cc 100644 --- a/texmf-dist/source/latex/acrotex/web.dtx +++ b/texmf-dist/source/latex/acrotex/web.dtx @@ -4,7 +4,7 @@ %<*copyright> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Web package, %% -%% Copyright (C) 1999-2018 D. P. Story %% +%% Copyright (C) 1999-2019 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/aeb-comment.sty b/texmf-dist/tex/latex/acrotex/aeb-comment.sty index fd14ef73..11b849fe 100644 --- a/texmf-dist/tex/latex/acrotex/aeb-comment.sty +++ b/texmf-dist/tex/latex/acrotex/aeb-comment.sty @@ -1,35 +1,54 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% This is an unmodified version of comment.sty (version 3.2) that is distributed -% with acrotex under the name of aeb-comment.sty. D. P. Story (dpstory at acrotex dot net) -% 2019/12/18 (dps): Defined \CommentCutFile % -% Comment.sty version 3.2, August 1997 +% This is version 3.8, July 2016 of the original comment.sty +% eqexam (2020/01/06) is now compatable with this version. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Comment.sty version 3.8, July 2016 +% copyright 1998-2016 Victor Eijkhout +% +% Purpose: % selectively in/exclude pieces of text: the user can define new % comment versions, and each is controlled separately. % Special comments can be defined where the user specifies the % action that is to be taken with each comment line. % -% This style can be used with plain TeX or LaTeX, and probably -% most other packages too. -% % Author % Victor Eijkhout -% Department of Mathematics -% University of California -% 405 Hilgard Ave, MS 6363 -% Los Angeles, CA 90034 +% Texas Advanced Computing Center +% The University of Texas at Austin +% Austin TX 78758 % USA % -% eijkhout@math.ucla.edu +% victor@eijkhout.net +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License +% as published by the Free Software Foundation; either version 2 +% of the License, or (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% For a copy of the GNU General Public License, write to the +% Free Software Foundation, Inc., +% 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, +% or find it on the net, for instance at +% http://www.gnu.org/copyleft/gpl.html % -% Usage: all text included in between -% \comment ... \endcomment -% or \begin{comment} ... \end{comment} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Usage: all text included between +% \begin{comment} +% ... +% \end{comment} % is discarded. +% % The opening and closing commands should appear on a line % of their own. No starting spaces, nothing after it. % This environment should work with arbitrary amounts -% of comment. +% of comment, and the comment can be arbitrary text. % % Other `comment' environments are defined by % and are selected/deselected with @@ -37,40 +56,104 @@ % \excludecoment{versionb} % % These environments are used as -% \versiona ... \endversiona -% or \begin{versiona} ... \end{versiona} +% \begin{versiona} ... \end{versiona} % with the opening and closing commands again on a line of % their own. % -% LaTeX users note: for an included comment, the +% This is not a LaTeX environment: for an included comment, the % \begin and \end lines act as if they don't exist. -% In particular, assignments &c are not local. +% In particular, they don't imply grouping, so assignments +% &c are not local. +% +%% +%% Guide to special effects +%% +% To understand what happens here, you need to know just a bit about +% the implementation. Lines inside a comment are scooped up one at a +% time, and written to an external file. This file can then be +% included, or ignored. Or you can do stuff with it as you'll see now. % % Special comments are defined as % \specialcomment{name}{before commands}{after commands} % where the second and third arguments are executed before -% and after each comment block. -% By defining a control sequence -% \Thiscomment##1{...} in the before commands the user can -% specify what is to be done with each comment line. +% and after each comment block. You can use this for global +% formatting commands. % To keep definitions &c local, you can include \begingroup % in the `before commands' and \endgroup in the `after commands'. +% ex: +% \specialcomment{smalltt} +% {\begingroup\ttfamily\footnotesize}{\endgroup} +% Of course, in this case you could probably have used the standard +% LaTeX \newenvironment. +% +% With \specialcomment you do *not* have to do an additional +% \includecomment{smalltt} +% To remove 'smalltt' blocks, give \excludecomment{smalltt} +% after the definition. +% +% The comment environments use two auxiliary commands. You can get +% nifty special effects by redefining them. +% 1/ the commented text is written to an external file. Default definition: +% \def\CommentCutFile{comment.cut} +% 2/ included comments are processed like this: +% \def\ProcessCutFile{\input{\CommentCutFile}\relax} +% and excluded files have +% \def\ProcessCutFile{} % -% Basic approach: -% to comment something out, scoop up every line in verbatim mode -% as macro argument, then throw it away. -% For inclusions, in LaTeX the block is written out to -% a file "comment.cut", which is then included. -% In plain TeX (and other formats) both the opening and -% closing commands are defined as noop. +% Fun use of special comments: the inclusion of the comment is done +% by \ProcessCutFile, so you can redefine that: +% \specialcomment{mathexamplewithcode} +% {\begingroup\def\ProcessCutFile{}} %1 +% {\verbatiminput{\CommentCutFile} %2 +% \endgroup +% This gives: +% \begin{equation} \input{\CommentCutFile} \end{equation} +% } +% 1: do not standard include the file +% 2: input it verbatim, then again inside display math % -% Trick for short in/exclude macros (\maybe{this snippet}): -%\includeversion{cond} +% You can also apply processing to each line. +% By defining a control sequence +% \def\Thiscomment##1{...} in the before commands the user can +% specify what is to be done with each comment line. If something +% needs to be written to file, use \WriteCommentLine{the stuff} +% Example: +% \specialcomment{underlinecomment} +% {\def\ThisComment##1{\WriteCommentLine{\underline{##1}\par}} +% \par} +% {\par} +% +% Trick for short in/exclude macros (such as \maybe{this snippet}): +%\includecomment{cond} %\newcommand{\maybe}[1]{} %\begin{cond} %\renewcommand{\maybe}[1]{#1} %\end{cond} % +% Changes in 3.8 +% - utf8 is now correctly handled, at least if you use eTeX. +% (Thanks Henry Gregory for the solution) +% Changes in 3.7 +% - only LaTeX support from now on +% - code cleanup, and improvements on \specialcomment +% - cleanup of the docs. +% Changed in 3.6 +% - documentation update +% - comment file inclusion is now a customizable command +% Changes in 3.5 +% - corrected typo in header. +% - changed author email +% - corrected \specialcomment yet again. +% - fixed excludecomment of an earlier defined environment. +% Changes in 3.4 +% - added GNU public license +% - added \processcomment, because Ivo's fix (above) brought an +% inconsistency to light. +% Changes in 3.3 +% - updated author's address again +% - parametrised \CommentCutFile +% Changes in 3.2 +% - \specialcomment brought up to date (thanks to Ivo Welch). % Changes in version 3.1 % - updated author's address % - cleaned up some code @@ -83,108 +166,132 @@ % \end{env} % Isn't that something ... % - included comments are written to file and input again. -% Changes in 3.2 -% - \specialcomment brought up to date (thanks to Ivo Welch). +% +% Known bugs: +% - excludecomment leads to one superfluous space +% - processcomment leads to a superfluous line break at the start % \def\makeinnocent#1{\catcode`#1=12 } \def\csarg#1#2{\expandafter#1\csname#2\endcsname} \def\latexname{lplain}\def\latexename{LaTeX2e} \newwrite\CommentStream +\def\DefaultCutFileName{\def\CommentCutFile{comment.cut}} +\DefaultCutFileName -\def\ProcessComment#1{\begingroup - \def\CurrentComment{#1}% +% begin / end processing +% +% this contains the only real begin/endgroup commands, to keep the +% catcode changes local. +\def\ProcessComment#1% start it all of + {\def\CurrentComment{#1}% + \begingroup \let\do\makeinnocent \dospecials \makeinnocent\^^L% and whatever other special cases - \endlinechar`\^^M \catcode`\^^M=12 \fxComment} + \endlinechar`\^^M\relax \catcode`\^^M=12\relax \xComment} {\catcode`\^^M=12 \endlinechar=-1 % - \gdef\fxComment#1^^M{\xComment} - \gdef\xComment#1^^M{\def\test{#1} + \gdef\xComment#1^^M{\ProcessCommentLine} + \gdef\ProcessCommentLine#1^^M{\def\test{#1} \csarg\ifx{End\CurrentComment Test}\test - \edef\next{\noexpand\EndOfComment{\CurrentComment}}% - \else \ThisComment{#1}\let\next\xComment + \edef\next{\endgroup\noexpand\EndOfComment{\CurrentComment}}% + \else \ThisComment{#1}\let\next\ProcessCommentLine \fi \next} } -% 3.1 change: in LaTeX and LaTeX2e prevent grouping -\if 0% -\ifx\fmtname\latexename - 0% -\else \ifx\fmtname\latexname - 0% - \else - 1% -\fi \fi -%%%% -%%%% definitions for LaTeX -%%%% -\edef\restoreat{\catcode\noexpand`\noexpand\@=\the\catcode`\@\relax} -\def\CommentCutFile{comment.cut} % 2019/12/18 -\makeatletter -\def\AfterIncludedComment - {\immediate\closeout\CommentStream - \input{\CommentCutFile}\relax - }% -\def\WriteCommentLine#1{\immediate\write\CommentStream{#1}} -\def\BeforeIncludedComment{\immediate\openout\CommentStream=\CommentCutFile - \let\ThisComment\WriteCommentLine} +%% +%% Initial action: SetUpCutFile opens the CommentCutFile +%% hook for initial actions: PrepareCutFile, default null +%% +\def\SetUpCutFile + {\immediate\openout\CommentStream=\CommentCutFile + \PrepareCutFile} +\def\PrepareCutFile{} + +%% +%% Each line action: ThisComment, +%% default: WriteCommentLine on line contents +%% version 3.8: write unexpanded if using eTeX +%% +\expandafter\ifx\csname eTeXversion\endcsname\relax + \long\def\WriteCommentLine#1{\immediate\write\CommentStream{#1}} +\else + \long\def\WriteCommentLine#1{\immediate\write\CommentStream{\unexpanded{#1}}} +\fi +\let\ThisComment\WriteCommentLine + +%% +%% Final action: ProcessCutFile +%% hook for final action before file closing: FinalizeCutFile, default null +%% +\def\ProcessCutFile + {\message{Straight input of \CommentCutFile.}% + \input{\CommentCutFile}\relax} +\def\CloseAndInputCutFile + {\FinalizeCutFile + \immediate\closeout\CommentStream + \ProcessCutFile} +\def\FinalizeCutFile{} + +%% +%% Define the different comment types +%% +% included comments: all the default actions \def\includecomment #1{\message{Include comment '#1'}% - \csarg\let{After#1Comment}\AfterIncludedComment - \csarg\def{#1}{\BeforeIncludedComment - \ProcessComment{#1}}% + \csarg\def{After#1Comment}{\CloseAndInputCutFile} + \csarg\def{#1}{\endgroup \message{Including '#1' comment.}% + \DefaultCutFileName \SetUpCutFile \ProcessComment{#1}}% + \CommentEndDef{#1}} +% excluded comment: also default +\def\excludecomment + #1{\message{Excluding comment '#1'}% + \csarg\def{#1}{\endgroup \message{Excluding '#1' comment.}% + \begingroup + \DefaultCutFileName \def\ProcessCutFile{}% + \def\ThisComment####1{}\ProcessComment{#1}}% + \csarg\def{After#1Comment}{\CloseAndInputCutFile \endgroup} \CommentEndDef{#1}} +% special comment \long\def\specialcomment #1#2#3{\message{Special comment '#1'}% - \csarg\def{After#1Comment}{#2\AfterIncludedComment#3}% - \csarg\def{#1}{\BeforeIncludedComment + \csarg\def{#1}{\endgroup \message{Processing '#1' comment.}% + \DefaultCutFileName + #2\relax \SetUpCutFile + % #2 before SetUp, so we can do renaming. + \message{Comment '#1' writing to \CommentCutFile.}% \ProcessComment{#1}}% + \csarg\def{After#1Comment}{\CloseAndInputCutFile #3}% \CommentEndDef{#1}} -\restoreat -\else -%%%% -%%%%plain TeX and other formats -%%%% -\def\includecomment - #1{\message{Including comment '#1'}% - \csarg\def{#1}{}% - \csarg\def{end#1}{}} -\long\def\specialcomment - #1#2#3{\message{Special comment '#1'}% - \csarg\def{#1}{\def\ThisComment{}\def\AfterComment{#3}#2% - \ProcessComment{#1}}% +\long\def\generalcomment + #1#2#3{\message{General comment '#1'}% + \csarg\def{#1}{\endgroup % counter the environment open of LaTeX + #2 \relax \SetUpCutFile \ProcessComment{#1}}% + \csarg\def{After#1Comment}{\CloseAndInputCutFile #3}% \CommentEndDef{#1}} -\fi - -%%%% -%%%% general definition of skipped comment -%%%% -\def\excludecomment - #1{\message{Excluding comment '#1'}% - \csarg\def{#1}{\let\AfterComment\relax - \def\ThisComment####1{}\ProcessComment{#1}}% +\long\def\processcomment + #1#2#3#4{\message{Lines-Processing comment '#1'}% + \csarg\def{#1}{\endgroup \SetUpCutFile #2\relax + \ProcessComment{#1}}% + \csarg\def{After#1Comment}{#3\CloseAndInputCutFile #4}% + \CommentEndDef{#1}} +\def\leveledcomment + #1#2{\message{Include comment '#1' up to level '#2'}% + %\csarg\newif{if#1IsStreamingComment} + %\csarg\newif{if#1IsLeveledComment} + %\csname #1IsLeveledCommenttrue\endcsname + \csarg\let{After#1Comment}\CloseAndInputCutFile + \csarg\def{#1}{\SetUpCutFile + \ProcessCommentWithArg{#1}}% \CommentEndDef{#1}} -\if 0% -\ifx\fmtname\latexename - 0% -\else \ifx\fmtname\latexname - 0% - \else - 1% -\fi \fi -% latex & latex2e: -\def\EndOfComment#1{\endgroup\end{#1}% - \csname After#1Comment\endcsname} +\makeatletter +\def\EndOfComment#1{% + \csname After#1Comment\endcsname + % sabotage LaTeX's environment testing + \begingroup\def\@currenvir{#1}\end{#1}} \def\CommentEndDef#1{{\escapechar=-1\relax \csarg\xdef{End#1Test}{\string\\end\string\{#1\string\}}% }} -\else -% plain & other -\def\EndOfComment#1{\endgroup\AfterComment} -\def\CommentEndDef#1{{\escapechar=-1\relax - \csarg\xdef{End#1Test}{\string\\end#1}% - }} -\fi +\makeatother \excludecomment{comment} diff --git a/texmf-dist/tex/latex/acrotex/aebdocfmt.def b/texmf-dist/tex/latex/acrotex/aebdocfmt.def index b275c117..8e1af134 100644 --- a/texmf-dist/tex/latex/acrotex/aebdocfmt.def +++ b/texmf-dist/tex/latex/acrotex/aebdocfmt.def @@ -1,6 +1,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Web package, %% -%% Copyright (C) 1999-2018 D. P. Story %% +%% Copyright (C) 1999-2019 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/aebjs.def b/texmf-dist/tex/latex/acrotex/aebjs.def index 93c261af..0c57f67b 100644 --- a/texmf-dist/tex/latex/acrotex/aebjs.def +++ b/texmf-dist/tex/latex/acrotex/aebjs.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -18,7 +18,7 @@ %% License, or (at your option) any later version. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ProvidesFile{aebjs.def} - [2019/12/17 v8.5.5 % + [2020/01/01 v8.5.8 % Exerquiz document level JavaScript (dps)] \def\aeb@array{new Array} \def\refac#1{\\(#1\\)}\def\regrp#1{(#1)}\def\rechrclass#1{[#1]} diff --git a/texmf-dist/tex/latex/acrotex/aebrandom.def b/texmf-dist/tex/latex/acrotex/aebrandom.def index 5e53a8e3..2906805a 100644 --- a/texmf-dist/tex/latex/acrotex/aebrandom.def +++ b/texmf-dist/tex/latex/acrotex/aebrandom.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -18,7 +18,7 @@ %% License, or (at your option) any later version. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ProvidesFile{aebrandom.def} - [2019/12/17 v8.5.5 % + [2020/01/01 v8.5.8 % Exerquiz support for randomization (dps)] \@ifundefined{nextrandom}{\input{random.tex}}{} \def\nextrandom{\begingroup @@ -89,11 +89,11 @@ } \def\aeb@randomizeChoices#1{% \setrannum{\aeb@ranChoice}{1}{#1} - \count0=0 \aeb@hold=\expandafter{\@temphold}\def\@temphold{}% + \eqtmpcnta\z@\aeb@hold=\expandafter{\@temphold}\def\@temphold{}% \expandafter\@tfor\expandafter \@temp\expandafter:\expandafter=\the\aeb@hold \do {% - \advance\count0by1 - \ifnum\count0=\aeb@ranChoice + \advance\eqtmpcnta\@ne + \ifnum\eqtmpcnta=\aeb@ranChoice\relax \aeb@hold=\expandafter\expandafter\expandafter {\expandafter\@tempholdrandom\@temp}% \edef\@tempholdrandom{\the\aeb@hold}% diff --git a/texmf-dist/tex/latex/acrotex/aebsumrytbls.def b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def index 00ca013e..7815dba0 100644 --- a/texmf-dist/tex/latex/acrotex/aebsumrytbls.def +++ b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -18,7 +18,7 @@ %% License, or (at your option) any later version. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ProvidesFile{aebsumrytbls.def} - [2019/12/17 v8.5.5 % + [2020/01/01 v8.5.8 % Exerquiz support for summary tables (dps)] \def\ccatCurrQzWith(#1){\currQuiz#1} \def\pbPopulateSumTable{\pushButton[\W0\BG{}\BC{}\S{S}\autoCenter{n} @@ -62,17 +62,17 @@ \newcommand{\displaySumryTbl}[2][]{% \begingroup\edef\currQuiz{#2}\edef\oField{#2}\edef\curr@quiz{#2}% \setkeys{smrytbl}{#1}% - \count0=\smrytbl@ntables - \eq@rowcnt=0\relax\@tempcntb=\value{questionno}% - \ifnum\count\z@=2\relax - \divide\@tempcntb2\relax + \eqtmpcnta\smrytbl@ntables\relax + \eq@rowcnt\z@\@tempcntb=\value{questionno}% + \ifnum\eqtmpcnta=\tw@ + \divide\@tempcntb\tw@ \advance\@tempcntb\ifodd\value{questionno}2\else1\fi \xdef\@beginSecCol{\the\@tempcntb}% \advance\@tempcntb-1\relax \fi - \ifnum\count\z@=3 + \ifnum\eqtmpcnta=\thr@@ \edef\eq@n{\the\@tempcntb}% - \divide\@tempcntb\count\z@ + \divide\@tempcntb\eqtmpcnta \edef\eq@q{\the\@tempcntb}% \@tempcnta=\@tempcntb\multiply\@tempcnta3 \edef\eq@p{\the\@tempcnta}% @@ -127,14 +127,14 @@ \def\st@thrdclmn#1{% \setLink[\linktxtcolor{\@linkcolor} \A{\JS{this.pageNum=(#1-1)}}]{\sumrytbllinkHook{#1}}} -\def\@@eqListExp#1#2{\global\advance\eq@rowcnt1\relax - \ifnum\eq@rowcnt=1\relax +\def\@@eqListExp#1#2{\global\advance\eq@rowcnt\@ne + \ifnum\eq@rowcnt=\@ne \pbPopulateSumTable\ifsmrytbl@corrections\else \pbDoNoCorrectSumryTbl\fi\expandafter\eq@begintab\fi - \ifnum\count0>1 \ifnum\eq@rowcnt=\@beginSecCol\relax + \ifnum\eqtmpcnta>\@ne\ifnum\eq@rowcnt=\@beginSecCol\relax \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab \fi\fi - \ifnum\count0=3 \ifnum\eq@rowcnt=\@beginThrdCol\relax + \ifnum\eqtmpcnta=\thr@@\ifnum\eq@rowcnt=\@beginThrdCol\relax \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab \fi\fi \sumryTblProbFmt{#1}&\st@scndclmn&\st@thrdclmn{#2}\\[1bp] diff --git a/texmf-dist/tex/latex/acrotex/eqbr.def b/texmf-dist/tex/latex/acrotex/eqbr.def index 0005db49..f9b841f0 100644 --- a/texmf-dist/tex/latex/acrotex/eqbr.def +++ b/texmf-dist/tex/latex/acrotex/eqbr.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqcat.def b/texmf-dist/tex/latex/acrotex/eqcat.def index fcb19511..b13f4666 100644 --- a/texmf-dist/tex/latex/acrotex/eqcat.def +++ b/texmf-dist/tex/latex/acrotex/eqcat.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqcolor.def b/texmf-dist/tex/latex/acrotex/eqcolor.def index 4fcc59ef..ebe460fb 100644 --- a/texmf-dist/tex/latex/acrotex/eqcolor.def +++ b/texmf-dist/tex/latex/acrotex/eqcolor.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqcz.def b/texmf-dist/tex/latex/acrotex/eqcz.def index d17dfdc6..ffccdeff 100644 --- a/texmf-dist/tex/latex/acrotex/eqcz.def +++ b/texmf-dist/tex/latex/acrotex/eqcz.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqda.def b/texmf-dist/tex/latex/acrotex/eqda.def index f756884f..18b79444 100644 --- a/texmf-dist/tex/latex/acrotex/eqda.def +++ b/texmf-dist/tex/latex/acrotex/eqda.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqde.def b/texmf-dist/tex/latex/acrotex/eqde.def index 7d71b8bd..7e1177cd 100644 --- a/texmf-dist/tex/latex/acrotex/eqde.def +++ b/texmf-dist/tex/latex/acrotex/eqde.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqes.def b/texmf-dist/tex/latex/acrotex/eqes.def index 5b228600..e3a74487 100644 --- a/texmf-dist/tex/latex/acrotex/eqes.def +++ b/texmf-dist/tex/latex/acrotex/eqes.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqexam.def b/texmf-dist/tex/latex/acrotex/eqexam.def deleted file mode 100644 index ab303d3c..00000000 --- a/texmf-dist/tex/latex/acrotex/eqexam.def +++ /dev/null @@ -1,1749 +0,0 @@ -%% -%% This is file `eqexam.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% exerquiz.dtx (with options: `eqexam') -%% -\ProvidesFile{eqexam.def} - [2019/12/17 v8.5.5 % - Exerquiz support file for eqexam (dps)] -\let\eq@YES=y \let\eq@NO=n -\let\eq@One=1 \let\eq@Zero=0 -\def\eq@r{r}\let\eq@f=f \let\eq@l=l -\newif\ifeq@noforms \eq@noformsfalse -\newif\ifeq@noquizsolutions \eq@noquizsolutionsfalse -\newif\ifnocorrections \nocorrectionsfalse -\@ifundefined{ifeqe@flextended}{\newif\ifeqe@flextended - \eqe@flextendedfalse}{} -\@ifundefined{ifcont@nnot}{\newif\ifcont@nnot \cont@nnotfalse}{} -\@ifundefined{if@eqalignfilllinestoleft} - {\newif\if@eqalignfilllinestoleft\@eqalignfilllinestoleftfalse}{} -\newif\ifkeepdeclaredvspacing \keepdeclaredvspacingfalse -\newif\ifeq@nolink \eq@nolinkfalse -\def\eq@ckglobalhide{\ifeq@globalshowsolutions\eq@hidesolutionfalse\fi} -\def\hidesymbol{h}\def\Hidesymbol{H} -\newif\iftherearesolutions \therearesolutionsfalse -\newif\ifIsRespBox \global\IsRespBoxfalse -\def\SolutionsAfter{\solutionsAtEndfalse\eq@solutionsaftertrue - \displayworkareafalse\eq@proofingfalse\eq@nolinktrue} -\newif\ifcqSA\cqSAfalse -\def\SolutionsAtEnd{\solutionsAtEndtrue\vspacewithsolnstrue - \eq@solutionsafterfalse\eq@nolinkfalse - \displayworkareafalse\ifvspacewithsolns\eq@nosolutionsfalse\else - \eq@nosolutionstrue\fi\eq@proofingfalse\answerkeyfalse} -\def\NoSpaceToWork{\let\eq@insertverticalspace\eq@NO} -\def\SpaceToWork{\let\eq@insertverticalspace\eq@YES} -\SpaceToWork -\long\def\ifNoSolutions#1#2{% - \ifeq@nosolutions\expandafter#1\else - \expandafter#2\fi} -\newif\ifeq@randomizeChoices \eq@randomizeChoicesfalse -\newif\ifeq@randomizeallChoices \eq@randomizeallChoicesfalse -\def\turnOnRandomize{\eq@randomizeallChoicestrue} -\def\obeyLocalRandomize{\eq@randomizeallChoicesfalse} -\let\saveRandomSeed\relax -\let\inputRandomSeed\relax -\newcommand{\exsolafter}{\eq@exsolafterDefault} -\newcommand{\resetSolnAfterToDefault}{% - \def\exsolafter{\eq@exsolafterDefault}} -\newcommand{\exsolafterDefault}[1]{\def\eq@exsolafterDefault{#1}% - \def\exSolafterDefault{#1}\resetSolnAfterToDefault} -\exsolafterDefault{\textit{Solution}:} -\newcommand{\renameSolnAfterTo}[1]{\def\exsolafter{#1}} -\newcommand{\adjDisplayBelow}{\vskip-\lastskip\vskip-\baselineskip} -\newcommand{\adjDisplayBelowPlus}{\adjDisplayBelow\recoverDisplayBelow} -\def\recoverDisplayBelow{\vskip\belowdisplayskip} -\newcommand\setDefShortQuizLabelName[1]% - {\def\eq@defaultShortQuizLabelName{#1}} -\setDefShortQuizLabelName{Quiz} -\newcommand{\writeToExSolns@}[1]{% - \ifsolutionsonly\else - \ifOKToWriteExamData - \set@display@protect - \immediate\write\ex@solns{#1}\set@typeset@protect - \fi\fi}% -\ifsolutionsonly - \InputIfFileExists{\jobname_xdefs.cut}{% - \typeout{^^JExerquiz|Eqexam: Reading \jobname_xdefs.cut^^J}} - {\PackageWarningNoLine{exerquiz|eqexam}{% - \jobname_xdefs.cut not found.\MessageBreak - Recompile file under the vspacewithsolns\MessageBreak - option, then compile with the solutionsonly\MessageBreak - option}} - \let\writeToExSolns\@gobble -\else - \newwrite\ex@solns \immediate\openout \ex@solns \jobname.sol - \let\writeToExSolns\writeToExSolns@ - \newwrite\eq@xrefdefns - \immediate\openout\eq@xrefdefns\jobname_xdefs.cut -\fi -\let\writeT@ExSolns\writeToExSolns -\newwrite\quiz@solns \immediate\openout \quiz@solns \jobname.qsl -\newcommand{\writeToQzSolns}[1]{\ifOKToWriteExamData\set@display@protect - \immediate\write\quiz@solns{#1}\set@typeset@protect\fi} -\let\writeT@QzSolns\writeToQzSolns -\def\eq@IWAuxOut#1{\immediate\write\@auxout{#1}} -\def\eq@IWDefs#1{\immediate\write\eq@xrefdefns{#1}} -\@ifundefined{ifOKToWriteExamData}{\newif\ifOKToWriteExamData - \OKToWriteExamDatatrue}{} -\def\noSolnWrites{\OKToWriteExamDatafalse} -\def\normalSolnWrites{\OKToWriteExamDatatrue} -\def\bHideSolnIn#1{#1{\protect\iffalse}\noSolnWrites} -\def\eHideSolnIn#1{\normalSolnWrites#1{\protect\fi^^J}} -\newcounter{eqexno} \setcounter{eqexno}{0} -\newcounter{@exno} \setcounter{@exno}{0} % running exno -\newcounter{quizno} \setcounter{quizno}{0} -\renewcommand\thequizno{\alph{quizno}} -\newcounter{eqpointvalue} \setcounter{eqpointvalue}{0} -\newlength\eq@tmplength -\newlength\eqtmplength -\newcounter{questionno} -\newcounter{eqquestionnoi} -\newcounter{eqquestionnoii} -\newcounter{eqquestionnoiii} -\newcount\@eqquestiondepth \@eqquestiondepth=0 -\newcounter{partno} -\newif\ifuseNumForParts\useNumForPartsfalse -\def\alphaParts{\def\partnoFmt{\alph}\useNumForPartsfalse}\alphaParts -\def\numberParts{\def\partnoFmt{\arabic}\useNumForPartstrue} -\renewcommand\thepartno{\partnoFmt{partno}} -\newtoks\eq@scratchtoks -\def\verbatimwrite{\@bsphack - \let\do\@makeother\dospecials - \catcode`\^^M\active \catcode`\^^I=12 - \def\verbatim@processline{% - \immediate\write\verbatim@out - {\the\verbatim@line}}% - \verbatim@start} -\def\endverbatimwrite{\@esphack} -\providecommand\PBS[1]{\let\temp=\\#1\let\\=\temp} -\newcommand{\belowexskip}[1]{\setlength{\eq@tmplength}{#1}% - \edef\eq@exerskip{\noexpand\removelastparskip - \noexpand\vskip\the\eq@tmplength\relax\kern0pt}} -\let\eqexerskip\belowexskip -\belowexskip{\medskipamount} -\newcommand{\aboveexskip}[1]{\setlength{\eq@tmplength}{#1}% - \edef\eq@priorexskip{\noexpand\vskip\the\eq@tmplength\relax - \kern0pt}} -\let\priorexskip\aboveexskip -\aboveexskip{\medskipamount} -\let\eq@postexerciseHook\relax -\newcommand\belowexsolnskip{\protect\medskip} -\def\removelastparskip{\ifdim\parskip>0pt\vskip-\parskip\fi} -\let\marginparpriorhook\@empty % used to material before the exercise -\let\marginparafterhook\@empty % used to material after the exercise -\let\afterlabelhskip\space -\let\exersolnheadhook\@empty -\let\exer@solnheadhook\@empty -\newcommand{\eqexheader} -{% - \mbox{\color{\@nolinkcolor}\if\exerstar*\exlabelformatwp\else - \exlabelformat\fi}% -} -\def\eqexheader@wrapper{\hypertarget{qex.\the@exno}{\eqexheader}} -\newcommand{\partsformat}[1]{\def\eq@partsformat{#1}} -\partsformat{(\hfil\thepartno\hfil)} -\newcommand{\defaultpartsformat}{% - \partsformat{(\hfil\thepartno\hfil)}} -\let\exlisttabheaderpriorhook\@empty -\let\exlisttabheaderafterhook\@empty -\newcommand{\eqexlisttabheader} -{% - \exlisttabheaderpriorhook - \color{\@nolinkcolor}\eq@partsformat -} -\newcount\cq@Cnt -\def\cq@CutName{cq-\the\cq@Cnt.cut} -\let\cq@star\eq@NO -\newif\ifcqqs \cqqstrue -\newif\ifcqIsActive \cqIsActivefalse -\def\cqQS{\@ifstar{\cqQSV}{\cqQSA}} -\def\cqQSA#1#2{\ifcqqs#1\else#2\fi} -\@ifpackageloaded{web}{\@ifundefined{IF@AorBswitch}{% - \PackageWarningNoLine{A version of the web package - dated\MessageBreak 2016/11/03 or later is required - for \string\cqQS}}}{}% -\@ifundefined{webtempboxi}{\newbox\webtempboxi - \newbox\webtempboxii}{} -\providecommand\SHOWTEMPBOXi{\unhbox\webtempboxi} -\providecommand\TRUEACTIONi{\aftergroup\SETTEMPBOXii} -\providecommand\TRUEACTIONia{\aftergroup\SHOWTEMPBOXi} -\providecommand\FALSEACTIONii{\aftergroup\SETTEMPBOXi} -\providecommand\FALSEACTIONiia{\aftergroup\SHOWTEMPBOXi} -\providecommand\SETTEMPBOXi{\IF@AorBswitch\else - \afterassignment\TRUEACTIONia\fi - \setbox\webtempboxi=\hbox} -\providecommand\SETTEMPBOXii{\IF@AorBswitch - \afterassignment\FALSEACTIONiia\fi - \setbox\webtempboxii=\hbox} -\def\cqQSV{\let\IF@AorBswitch\ifcqqs - \IF@AorBswitch - \def\eq@next{\afterassignment\TRUEACTIONi\SETTEMPBOXi}\else - \def\eq@next{\afterassignment\FALSEACTIONii\SETTEMPBOXii}\fi - \eq@next} -\def\eq@turnMessageOff{\let\save@message\message - \let\message\@gobble} -\def\eq@turnMessageOn{\let\message\save@message} -\def\eqCQDeclarations{\cqqsfalse\eq@turnMessageOff - \includecomment{sPage}\excludecomment{qPage}% - \eq@turnMessageOn} -\def\eqTopOfSolnPage{\withinsoldoctrue\cqSAfalse - \eqCQDeclarations} -\def\eqTopOfQslPage{\withinqsldoctrue} -\eq@turnMessageOff -\includecomment{qPage}\excludecomment{sPage} -\eq@turnMessageOn -\newenvironment{cq@CQ} -{% - \global\cqIsActivetrue - \global\advance\cq@Cnt1\relax - \immediate\openout\CommentStream=\cq@CutName - \let\verbatim@out\CommentStream - \verbatimwrite -}{% - \endverbatimwrite - \immediate\closeout\CommentStream - \ifx\cq@star\eq@YES - \xdef\cq@INPUTCUT{\noexpand\cqqstrue - \noexpand\input{\cq@CutName}\noexpand - \def@QuesToSoln}\else - \xdef\cq@INPUTCUT{\noexpand\cqqstrue - \noexpand\input{\cq@CutName}\noexpand - \p@ssQuesToSoln}\fi - \aftergroup\cq@INPUTCUT -} -\newenvironment{cqs@CQ}{\let\cq@star\eq@YES\cq@CQ}{\endcq@CQ} -\def\declCQQuesStr#1{\def\cqQStr{#1}} -\declCQQuesStr{Question} -\def\declCQSolStr#1{\def\cqSStr{#1}} -\declCQSolStr{Solution} -\newcommand\declCQPre[1]{\def\cq@Pre{#1}} -\declCQPre{\emph{\cqQStr}:\space} -\newcommand\declCQPost[1]{\def\cq@Post{#1}} -\declCQPost{\par\medskip\noindent\emph{\cqSStr}:\space\ignorespaces} -\def\cqFmtPasteQues#1{\cq@Pre\input{#1}\cq@Post} -\def\p@ssQuesToSoln{\ifeq@hidesolution\else - \global\terminexchangedtrue % dps cq - \ifeq@solutionsafter\else - \writeT@ExSolns{\protect\decleqterminex{\protect - \cqFmtPasteQues{\cq@CutName}}\eq@commentchar}\fi\fi} -\def\declCopyQues#1{\def\cqCopiedQues{#1}} -\def\def@QuesToSoln{\restoreNormalSolns - \global\terminexchangedfalse % dps cq - \ifeq@hidesolution\else\writeT@ExSolns{\protect - \declCopyQues{\protect\input{\cq@CutName}}}\fi} -\newcommand\restoreNormalSolns{\ifeq@solutionsafter\else - \writeT@ExSolns{\protect\decleqterminex{\protect - \eqterminexDEF}\eq@commentchar}\fi} -\newcommand{\eq@CommonCmd}[1]{\def\eq@@CommonCmd{#1}#1} -\let\eq@@CommonCmd\@empty -\newcommand\gExCommonCmd[1]{\gdef\gEx@CommonCmd{\eq@CommonCmd{#1}}} -\let\gEx@CommonCmd\@empty -\let\endexerhook\@empty -\newenvironment{exercise} -{% - \let\cq\cq@CQ\let\endcq\endcq@CQ - \csarg\let{cq*}\cqs@CQ - \csarg\let{endcq*}\endcqs@CQ - \par\removelastskip\eq@priorexskip\noindent - \let\eqCommonCmd\eq@CommonCmd - \def\eq@argi{eqexno}%% use eqexno counter - \if\eq@exerstarEnv*\def\exerstar{*}\else\def\exerstar{x}\fi - \def\currhideopt{x}% - \@ifnextchar[{\exercise@}% - {\if\exerstar*\def\eq@next{\@exercise}\else - \def\eq@next{\exercise@@}\fi\eq@next}% -}{\eq@postexerciseHook\endexerhook\par - \global\eq@exerciseheadingtrue\removelastskip\eq@exerskip} -\def\exercise@[#1]{\edef\eq@arg{#1}% - \if\eq@arg h\def\currhideopt{h}% - \eq@hidesolutiontrue\eq@nolinktrue% - \ifeq@globalshowsolutions - \eq@hidesolutionfalse\eq@nolinkfalse\fi - \def\eq@next{\@exercise}% h, no *, no counter - \else - \if\eq@arg H% - \edef\currhideopt{\Hidesymbol}% - \eq@hidesolutiontrue\eq@nolinktrue% - \ifeq@globalshowsolutions - \eq@hidesolutionfalse\eq@nolinkfalse - \fi - \def\eq@next{\@exercise}% H, no *, no counter - \else - \def\currhideopt{x}% - \ifx\eq@arg\@empty\else\def\eq@argi{#1}\fi - \if\exerstar*\def\eq@next{\@exercise}\else - \def\eq@next{\exercise@@}\fi - \fi - \fi -\eq@next} -\def\exercise@@{\@ifstar{\def\exerstar{*}\@exercise}{\exercise@@@}} -\def\exercise@@@{\@ifnextchar[{\exercise@@@@}{\@exercise}} -\def\exercise@@@@[#1]{\edef\eq@arg{#1}% - \if\eq@arg h\def\currhideopt{h}% - \eq@hidesolutiontrue\eq@nolinktrue - \ifeq@globalshowsolutions - \eq@hidesolutionfalse\eq@nolinkfalse\fi - \def\eq@next{\@exercise}% h, no *, no counter - \else - \if\eq@arg H\edef\currhideopt{\Hidesymbol}% - \eq@hidesolutiontrue\eq@nolinktrue% - \def\eq@next{\@exercise}% h, no *, no counter - \else - \def\currhideopt{x}% - \PackageWarning{exerquiz}{The option #1 is not recognized} - \let\eq@next\relax - \fi - \fi -\eq@next} -\newif\ifeq@exerciseheading \eq@exerciseheadingtrue -\let\prior@exerSolnHeaderHook\@empty -\newcommand\exerSolnHeader[3]{% - \prior@exerSolnHeaderHook - \ifeqforpaper\else\webnewpage\fi\markright{#1}%\par\noindent% - #3% - \solnhspace -} -\let\solnItemMngt\relax -\let\eqEXt\@gobbletwo -\let\endeqEXt\relax -\let\eqExtArg\@empty -\let\eqFilterArg\@empty -\let\eqExerSolnHeader\@empty -\let\solutionparshape\@empty -\def\eq@pslnaindnt{0pt} -\let\eq@setPrbSolnAftrIndnt\relax -\newcommand{\setPrbSolnAftrIndent}[1]{\ifdim#1=0pt - \def\eq@pslnaindnt{0pt}\let\eq@setPrbSolnAftrIndnt\relax\else - \edef\eq@pslnaindnt{#1}\edef\eq@setPrbSolnAftrIndnt{\expandafter - \noexpand\expandafter\parindent#1\noexpand\relax}\fi} -\newif\if@restorejustify \@restorejustifyfalse -\newcommand\restoreJustifyOn{\@restorejustifytrue} -\newcommand\restoreJustifyOff{\@restorejustifyfalse} -\def\restorejustify{\if@restorejustify - \@rightskip\z@skip \rightskip\@rightskip - \leftskip\z@skip \let\\\@normalcr\fi} -\def\@exercise{% - \global\let\solutionparshape\@empty - \let\verbatim@out=\ex@solns - \if\eq@argi0\else\refstepcounter{\eq@argi}\fi\stepcounter{@exno}% - \if\exerstar*% if exercise with parts - \eq@nolinktrue - \else - \if\currhideopt H% - \else - \ifeq@solutionsafter - \eq@nolinktrue % no link to solution - \else - \eq@ckglobalhide % - \ifeq@hidesolution\else - \global\let\eqExerSolnHeader\eq@@writeexheader - \fi - \fi - \fi - \fi - \ifvmode\ifdim\lastskip>\z@ - \vskip-\lastskip - \fi\fi - \if\exerstar*% - \let\solution\solnexer@woparts - \let\endsolution\endsolnexer@woparts - \let\parts\exercise@parts - \let\endparts\endexercise@parts - \else - \let\solution\solnexer@woparts - \let\endsolution\endsolnexer@woparts - \let\parts\relax - \let\endparts\relax - \if\Hidesymbol h\eq@nolinkfalse\ifeq@solutionsafter - \eq@nolinktrue\fi\fi - \fi - \eq@initializeContAnnot - \ifeq@exerciseheading - \prior@questionsHook\marginparpriorhook\noindent\eqexheader@wrapper - \afterlabelhskip\marginparafterhook\gEx@CommonCmd - \eq@setPrbSolnAftrIndnt\ignorespaces\fi} -\newif\ifterminexchanged \terminexchangedfalse % dps cq -\newcommand\decleqterminex[1]{\def\eqterminex{#1}} -\def\eqterminexDEF{\relax\ignorespaces} -\decleqterminex{\eqterminexDEF} -\newif\ifmakeExSlLocal \makeExSlLocalfalse -\def\makeExSolnsLocalOn{\makeExSlLocaltrue} -\def\makeExSolnsLocalOff{\makeExSlLocalfalse} -\let\eqMrkSoln\@gobble -\def\eqExerSolnHeaderSngl{% - \ifmakeExSlLocal\protect\begingroup^^J\fi - \ifx\eqMrkCpyArg\@empty\else - \protect\eqMrkSoln{\eqMrkCpyArg}\fi - \protect\eqEXt{\eqExtArg}{\eqFilterArg}\protect - \solnItemMngt\protect\exerSolnHeader{\exsecrunhead}{ex.\the@exno}% - {\exsllabelformat}\exer@solnheadhook - \exersolnheadhook\protect\eqterminex} -\def\eq@@writeexheader{\ifeq@hidesolution\else\ifOKToWriteExamData - \set@display@protect - \immediate\write\verbatim@out{\eqExerSolnHeaderSngl}% - \set@typeset@protect\fi\fi} -\def\eqExerSolnHeaderList{% - \ifmakeExSlLocal\protect\begingroup^^J\fi - \ifx\eqMrkCpyArg\@empty\else - \protect\eqMrkSoln{\eqMrkCpyArg}\fi - \protect\eqEXt{\eqExtArg}{\eqFilterArg}\protect - \solnItemMngt\protect\exerSolnHeader{\exsecrunhead}% - {ex.\the@exno\thepartno}{\exsllabelformatwp}% - \exer@solnheadhook\exersolnheadhook\protect\eqterminex} -\def\eq@@writeexheaderlist{\ifeq@hidesolution\else\ifOKToWriteExamData - \set@display@protect\immediate - \write\verbatim@out{\eqExerSolnHeaderList}\set@typeset@protect\fi\fi} -\long\def\setsolnspace#1{\def\newsolnspace{#1}% - \let\solnspace\newsolnspace} -\newif\ifeq@ckSolnVspace \eq@ckSolnVspacetrue -\def\ckSolnOpt{\global\eq@ckSolnVspacetrue} -\def\noSolnOpt{\global\eq@ckSolnVspacefalse} -\let\solnhspace\space -\let\solnspace\space -\let\exsolnonceonlytophook\relax -\def\solnexer@woparts{% - \ifanswerkey\ifeqe@flextended\ifcont@nnot - \ifx\solutionparshape\@empty\else % dpsj8 - \pushEnvir - \everypar{}\if@eqalignfilllinestoleft\else - \parshape=1 \leadinIndent \linewidth\fi - \popEnvir - \fi\fi\fi\fi\def\bLeaveVspace{x}% = no vertical space added - \exsolnonceonlytophook % dps27 - \global\let\exsolnonceonlytophook\relax - \@ifundefined{KV@eqefillLines@bgonly}{} - {\ifKV@eqefillLines@bgonly\ifvmode\else - \par\leavevmode\strut\fi\fi - \ifKV@eqefillLines@outlineonly\leavevmode\strut\fi}% - \ifeq@ckSolnVspace - \def\eq@next{\@ifnextchar[{\solnexer@@woparts}%] - {\solnexer@@woparts[\null]}}\else - \def\eq@next{\solnexer@@woparts[\null]}\fi - \eq@next} -\let\eqPriorVspace\@gobble -\newif\if@eqlinedfiller \@eqlinedfillerfalse -\newcommand{\vspaceFiller}[1]{\vfill} -\newcommand{\vspaceFillerDefault}[1]{\vfill} -\def\eqWriteLine{\hfill} -\def\eq@linesXPgs{% - \begingroup\offinterlineskip\parskip0pt - \@tempcnta=0 - \@whilenum\@tempcnta<\soln@keys@nLines\relax\do - {\vskip0pt\penalty-50\vglue\wlVspace\eqWriteLine - \advance\@tempcnta1\relax}\par\endgroup} -\let\leavevspace\relax % dpsj5 -\newcommand{\vspaceFmt}[1]{% - \ifx\solutionparshape\@empty\else - \advance\linewidth-\leadinIndentPrtSep\fi - \ifdim\sameVspace>0pt - \let\bLeaveVspace\@empty - \def\leavevspace{% - \ifx\eq@insertverticalspace\eq@YES\par\eq@quessolskip - \eqPriorVspace{#1}{\nobreak\noindent - \if@eqlinedfiller - \ifx\soln@keys@nLines\@empty - \def\eq@lines@next{\vspaceFiller{#1}}\else - \def\eq@lines@next{\eq@linesXPgs}\fi - \else - \def\eq@lines@next{\parbox[b][#1][t]{\linewidth} - {\vspaceFiller{#1}}}% - \fi\eq@lines@next}% - \fi - }\expandafter\leavevspace - \fi} -\define@key{soln@keys}{nLines}[]{\def\soln@keys@nLines{#1}} -\let\soln@keys@nLines\@empty -\def\eqKV@errx#1{\xdef\XKV@rm{\@tempa}} -\def\eqSolnForEqexam#1{% - \let\soln@keys@nLines\@empty - \setkeys*{soln@keys}{#1}% - \ifx\soln@keys@nLines\@empty - \ifx\minVspacet@bs\@empty\xdef\sameVspace{\XKV@rm}\else - \xdef\sameVspace{\minVspacet@bs}\fi - \else - \@tempdima\wlVspace - \@tempdima=\soln@keys@nLines\@tempdima - \xdef\sameVspace{\the\@tempdima}% - \ifx\XKV@rm\@empty\else - \if@equsedim\let\soln@keys@nLines\@empty - \xdef\sameVspace{\XKV@rm}\fi - \fi - \fi - \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi -} -\def\solnexer@@woparts[#1]{% - \ifcqIsActive\else\ifterminexchanged - \restoreNormalSolns\fi\fi % dps cq - \global\cqIsActivefalse - \def\eq@argi{#1}\def\eq@null{\null}% - \ifx\eq@argi\@empty\gdef\sameVspace{0pt}\else - \ifx\eq@argi\eq@null\gdef\sameVspace{0pt}\else - \@ifundefined{PointsOnLeft}{% - \let\eqKV@errx@SAVE\KV@errx - \let\KV@errx\eqKV@errx\let\XKV@rm\@empty - \edef\temp@exp{\noexpand\setkeys*{soln@keys}{#1}}\temp@exp - \let\KV@errx\eqKV@errx@SAVE - \ifx\soln@keys@nLines\@empty\else - \PackageInfo{exerquiz}{% - nLines key detected in solution environment,\MessageBreak - is not not recognized without eqexam,\MessageBreak - will remove it}% - \let\soln@keys@nLines\@empty\fi - \xdef\sameVspace{\XKV@rm}% - }{\eqSolnForEqexam{#1}}% - \fi\fi - \solnexer@@@woparts -} -\def\solnsafterSkip#1{\setlength{\@tempdima}{#1}% - \edef\solnsafterSkipAmt{\the\@tempdima}% - \def\solutionsafterSkip{\vskip\solnsafterSkipAmt\relax}} -\solnsafterSkip{\smallskipamount} -\def\@solnafterSkipOnce#1{\setlength{\@tempdima}{#1}% - \xdef\@solnafterSkipOnceAmt{\the\@tempdima}}% -\def\@@solnafterSkipOnce{\vskip\@solnafterSkipOnceAmt\relax %dpsj3 - \gdef\@solnafterSkipOnceAmt{0pt}} -\def\@solnafterSkipOnceAmt{0pt} -\def\quessolSkip#1{\setlength{\@tempdima}{#1}% - \edef\eq@quessolskip{\noexpand\vskip\the\@tempdima\relax}} -\def\eq@quessolskip{\vskip\smallskipamount} -\def\eqe@debugVertSkip#1{} -\def\eqe@showEndHere#1{#1} -\def\eqe@setStartSolns{% - \xdef\eq@startSoln{\the\pagetotal}% - \eqe@debugVertSkip{\marginpar{\smash{b[\sameVspace]}}}% -} -\let\eqSavedComment\dlcomment -\let\endeqSavedComment\enddlcomment -\def\setTabulrSolnEnv{% - \@ifundefined{@listii@SAVE}{\global\let\@listii@SAVE\@listii}{}% - \expandafter\def\expandafter\@listii\expandafter{\@listii@SAVE - \leftmargin\leftmarginii \labelwidth\leftmarginii - \advance\labelwidth-\labelsep}% - \def\everyparShape{\everypar{\parshape \@ne 0pt \linewidth}}% - \reset@doendpe{\parshape \@ne 0pt \linewidth}% - \parshape \@ne 0pt \linewidth - \everyparShape -} -\newif\ifthereissolution -\let\priorexsolafterList\@empty -\let\priorexsolafterTab\@empty -\let\priorexsolafterSngl\@empty -\def\eq@Hid{H}\def\eq@hid{h} -\def\solutionafterExCmds#1{\def\@rgi{#1}\ifx\@rgi\@empty - \let\eqSolnExCmds\relax\else - \def\eqSolnExCmds{#1}\fi} -\let\eqSolnExCmds\relax -\def\eq@b@ddCodeSpecialDef#1{#1}% -\let\eq@b@ddCodeSpecial\eq@b@ddCodeSpecialDef -\def\solnexer@@@woparts{\ifeq@solutionsafter\else - \expandafter\begingroup\fi - \global\thereissolutiontrue - \global\let\procsoln\relax - \global\let\endprocsoln\relax - \def\exerwparts@cols{0}% - \let\verbatim@out\ex@solns - \if\currhideopt\eq@Hid - \let\minVspacet@bs\@empty - \let\procsoln\eqSavedComment - \let\endprocsoln\endeqSavedComment - \def\eq@next{\procsoln}% - \else - \eq@ckglobalhide - \ifeq@hidesolution - \let\procsoln\eqSavedComment - \let\endprocsoln\endeqSavedComment - \else - \ifeq@solutionsafter\else - \ifx\eq@@CommonCmd\@empty\else - \set@display@protect - \immediate\write\verbatim@out{\eq@@CommonCmd}% - \set@typeset@protect - \fi - \fi - \let\procsoln\verbatimwrite - \let\endprocsoln\endverbatimwrite - \fi - \def\eq@next{% - \ifeq@solutionsafter - \let\procsoln\relax - \let\endprocsoln\relax - \removelastskip\removelastparskip - \cqSAtrue\eqCQDeclarations - \declCopyQues{\input{\cq@CutName}}% - \ifx\exsolafter\@empty - \ifdim\sameVspace=0pt\eqe@setStartSolns - \else - \solutionsafterSkip - \@@solnafterSkipOnce - \eqe@setStartSolns - \fi - \else\par\kern0pt - \solutionsafterSkip - \@@solnafterSkipOnce - \noindent\strut\eqe@setStartSolns - \fi - \parskip\eqeques@parsep - \ifx\endparts\endexercise@parts@tabular - \eq@setPrbSolnAftrIndnt - \restorejustify - \fi - \ifx\endparts\endexercise@parts@tabular\expandafter - \priorexsolafterTab\else - \ifx\endparts\endexercise@parts@list\expandafter - \priorexsolafterList\else\expandafter - \priorexsolafterSngl\fi\fi - \exsolafter\space\ignorespaces - \solutionparshape - \else - \eqExerSolnHeader - \global\therearesolutionstrue\expandafter\procsoln - \fi - }% - \fi - \eq@b@ddCodeSpecial{\eq@next}% -}% dpsj4 -\let\endsolnexerhook\@empty -\let\pkg@endsolnexerhook\@empty -\let\endsolnexerhookaux\@empty -\def\eq@fititin#1{\noindent\unskip\nobreak\hfill\penalty100 - \hskip1em\hbox{}\nobreak\hfill#1}% -\let\eqfititin\eq@fititin -\bgroup\catcode`\%=12\relax -\gdef\eq@commentchar{%}\egroup -\newcommand\eqExerSolnTrailer{% - \protect\ReturnTo{page.\the\c@page}% - {\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else - \exrtnlabelformat\fi}}% - \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi - \eq@commentchar^^J% - \ifmakeExSlLocal\protect\endgroup^^J\fi -} -\let\eq@e@ddCodeSpecialDef\relax % dpsj4 -\let\eq@e@ddCodeSpecial\eq@e@ddCodeSpecialDef % dpsj6 -\let\kdvsp@Restore\relax -\def\eq@clearMrkCpy{\if@targetforextr - \global\let\eqMrkCpyArg\@empty - \global\@targetforextrfalse\fi -} -\def\endsolnexer@woparts{\endprocsoln\eq@e@ddCodeSpecial - \pkg@endsolnexerhook - \eq@clearMrkCpy - \ifeq@solutionsafter\else - \expandafter\endgroup\fi % from \begingroup at \solnexer@@@woparts - \global\let\exsolnonceonlytophook\relax - \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi - \ifvspacewithsolns\vspaceFmt{\sameVspace}\else - \ifeq@nosolutions\ifeq@solutionsafter\else - \vspaceFmt{\sameVspace}\fi\fi\fi - \if\currhideopt H% - \ifkeepdeclaredvspacing\vskip\sameVspace\fi - \else - \ifeq@solutionsafter - \ifx\isitleadin\eq@YES\parshape=0 \fi - \if\exerstar*% - \eq@fititin{\mbox{\exrtnlabelformatwp}}\else - \eq@fititin{\mbox{\exrtnlabelformat}}\fi - \ifx\istabularexer\eq@YES\unskip\kern0pt\else\par\fi - \ifx\minVspacet@bs\@empty - \ifkeepdeclaredvspacing - \@tempdima\pagetotal - \advance\@tempdima-\eq@startSoln - \@tempdimb\sameVspace\relax - \ifdim\@tempdimb>1sp\relax - \advance\@tempdimb-\@tempdima - \ifdim\@tempdimb>0pt\vglue\@tempdimb\kern0pt - \let\eqe@showEndHere\@gobble - \edef\tmp@exp{\noexpand\marginpar{\noexpand - \smash{e: adj \the\@tempdimb}}}% - \eqe@debugVertSkip{\tmp@exp}% - \fi - \fi - \fi - \eqe@showEndHere{\eqe@debugVertSkip{\marginpar{\smash{e}}}}% - \fi - \else - \eq@ckglobalhide - \ifeq@hidesolution\else - \endsolnexerhookaux - \writeT@ExSolns{\eqExerSolnTrailer}% - \fi - \fi - \fi - \kdvsp@Restore - \endsolnexerhook\penalty0\relax} -\let\eq@exerstarEnv\relax -\newenvironment{exercise*}{\def\eq@exerstarEnv{*}\exercise} -{\endexercise} -\def\exerwparts@cols{0} -\let\topofpartshook\relax -\let\@listiiredefined\eq@NO -\let\itsExerParts\eq@NO -\newif\if@tableadinitem\@tableadinitemfalse -\newcommand{\tableadin@external}{\PackageError{exerquiz/eqexam} - {The \string\tableadin\space command is designed\MessageBreak - for the problem* environment of eqexam}{Use \string\tableadin\space - in the problem* environment of eqexam.}% -} -\let\tableadin\tableadin@external -\newcommand{\eq@tableadinparts}{\item\relax - \PackageError{exerquiz/eqexam}{The \string\tableadin\space - command is not allowed in the\MessageBreak - parts environment}{Use \string\tableadin\space - in the problem* environment of eqexam.}% -} -\let\istabularexer\eq@NO -\def\exercise@parts{\let\rlspar\relax - \ifx\solutionparshape\@empty - \let\isitleadin\eq@NO - \if@tableadinitem\let\rlspar\@gobbletwo\fi - \else\let\isitleadin\eq@YES\fi - \rlspar\removelastskip\par - \if\isitleadin\eq@YES - \def\eqparts@topsep{0pt}% - \vskip\eqparts@itemsep\relax\fi - \topofpartshook - \let\itsExerParts\eq@YES - \global\let\@listiiredefined\eq@NO - \def\exerwparts@cols{0}\@ifnextchar[% - {% - \if@tableadinitem\else\removelastparskip\fi - \let\endparts\endexercise@parts@tabular\exercise@parts@tabular@}% - {\let\endparts\endexercise@parts@list\exercise@parts@list}} -\def\eq@extralabelsep{0pt} -\newcommand{\setPartsWidth}[1]{\def\parts@indent{\normalfont#1}% - \bgroup\settowidth{\eq@tmpdima}{\parts@indent}% - \xdef\widthOfParts{\the\eq@tmpdima}\egroup} -\setPartsWidth{(d)} -\def\eqe@prtsepPrb{\ } -\providecommand{\prbPrtsep}[1]{\def\eqe@prtsepPrb{#1}} -\providecommand{\exPrtsep}[1]{\def\eqe@prtsepPrb{#1}} -\providecommand{\eqequesparsep}[1]{\def\eqeques@parsep{#1}} -\eqequesparsep{0pt} -\let\prior@parts@hook\@empty -\let\post@parts@hook\@empty -\let\abovepartshook\@empty -\let\belowpartshook\@empty -\let\eqp@rtc@lcm@rk\relax -\let\eq@insertContAnnot\relax -\def\eq@item@common{\eq@insertContAnnot\eqp@rtc@lcm@rk - \def\currhideopt{x}\eq@hidesolutionfalse\eq@nolinkfalse - \@ifnextchar[{\@ckhide}{\eq@item}} -\newcommand{\partsitemsep}[1]{{% - \setlength{\@tempdima}{#1}% - \xdef\eqparts@itemsep{\the\@tempdima}}} -\let\eqpartsitemsep\partsitemsep -\def\eqparts@itemsep{0pt} -\newcommand\partsparsep[1]{{% - \setlength{\@tempdima}{#1}% - \xdef\eqparts@parsep{\the\@tempdima}}} -\def\eqparts@parsep{0pt} -\newcommand\partstopsep[1]{{% - \setlength{\@tempdima}{#1}% - \xdef\eqparts@topsep{\the\@tempdima}}} -\def\eqparts@topsep{3pt} -\newcommand{\leadinitem@external}{\PackageError{exerquiz/eqexam} - {The \string\leadinitem\space command is designed to be\MessageBreak - the first item in the problem*\MessageBreak - environment above the parts environment} - {Use \string\leadinitem\space in the problem* environment.}} -\let\leadinitem\leadinitem@external -\let\itsforleadinitem\eq@NO -\newcommand{\eq@leadinitemparts}{\item\relax - \PackageError{exerquiz/eqexam}{The \string\leadinitem\space - command is not allowed in the\MessageBreak - parts environment} - {Use \string\leadinitem\space in the problem* environment.}} -\def\eq@handleOptArg[#1]{\def\eq@optArg{[#1]}\eq@handleOptArgi} -\def\eq@handleOptArgi{\expandafter - \eq@item@latex\eq@optArg\exlisttabheaderafterhook} -\newif\ifwithinparts -\let\ex@listtabheader@fterhook\@empty -\newenvironment{exercise@parts@list}{% - \settowidth{\eq@tmplength}{\parts@indent}% - \edef\widthOfParts{\the\eq@tmplength}% - \global\let\eqExerSolnHeader\eq@@writeexheaderlist - \eq@initializeContAnnot\eq@nolinkfalse\prior@parts@hook - \abovepartshook\list{\normalfont - \if\Hidesymbol h\eq@nolinkfalse\ifeq@solutionsafter - \eq@nolinktrue\fi\fi - \if\currhideopt H% - \else - \ifeq@solutionsafter - \eq@nolinktrue % no link to solution - \else - \ifeq@nosolutions - \eq@nolinktrue % no link to solution - \else - \eq@ckglobalhide - \ifeq@hidesolution\eq@nolinktrue\else - \global\let\eqExerSolnHeader\eq@@writeexheaderlist - \fi - \fi - \fi - \fi - \makebox[\widthOfParts][r]{\eqexlisttabheader}% -}{% - \usecounter{partno}% - \if\isitleadin\eq@YES - \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}% - \xdef\prtsIndntSep{\the\eq@tmplength}% - \if\itsforleadinitem\eqe@YES\setcounter{partno}{\fliPartNo}\else - \setcounter{partno}{1}\fi\fi - \let\leadinitem\eq@leadinitemparts - \let\tableadin\eq@tableadinparts - \global\let\solutionparshape\@empty - \setlength{\topsep}{\eqparts@topsep}% - \setlength{\parskip}{0pt}% - \setlength{\partopsep}{0pt plus 1pt minus 1pt}% - \ifdim\eqeques@parsep=0pt - \setlength{\parsep}{\eqparts@parsep}% - \else - \setlength{\parsep}{\eqeques@parsep}% - \fi - \setlength{\itemsep}{\eqparts@itemsep-\parsep}% - \setlength{\itemindent}{0pt}% - \setlength{\listparindent}{\parindent}% - \settowidth{\labelsep}{\normalfont\eqe@prtsepPrb}% - \addtolength{\labelsep}{\eq@extralabelsep}% - \settowidth{\labelwidth}{\parts@indent}% - \setlength{\leftmargin}{\labelwidth}% - \addtolength{\leftmargin}{\labelsep}% - \let\eq@item@latex\item - \def\eq@item{\@ifnextchar[{\eq@handleOptArg} - {\eq@item@latex\ex@listtabheader@fterhook - \exlisttabheaderafterhook}}% - \def\eqthisenv{parts}\withinpartstrue - \def\item{\ifx\@currenvir\eqthisenv - \def\eq@next{\eq@item@common}\else - \def\eq@next{\eq@item}\fi - \eq@next}% -}}{\endlist\global\let\leadinitem\leadinitem@external - \post@parts@hook\belowpartshook} -\def\eq@initializeContAnnot{\@ifundefined{eqequestions} - {\global\let\eqeCurrProb\relax} - {\xdef\eqeCurrProb{\theeqquestionnoi}}% - \xdef\eq@currProbStartPage{\arabic{page}}} -\define@key{tabp@rts}{nCols}{\def\exerwparts@cols{#1}} -\define@key{tabp@rts}{minVspace}{\def\minVspacet@bs{#1}} -\let\minVspacet@bs\@empty -\def\minVspacetabs#1{\def\minVspacet@bs{#1}} -\def\priorexsolafterTab{\ifkeepdeclaredvspacing - \ifeq@solutionsafter\ifx\minVspacet@bs\@empty\else - \priorexsolafterTab@cont\fi\fi\fi} -\def\priorexsolafterTab@cont{\let\exsolafter@save\exsolafter - \let\exsolafter\@empty - \makebox[0pt][r]{\parbox[t][\minVspacet@bs][t]{0pt} - {\strut\hfill\vfill\strut}}% - \minipage[t]{\linewidth}\exsolafter@save} -\def\pkg@endsolnexerhook{\ifkeepdeclaredvspacing - \ifeq@solutionsafter\ifx\minVspacet@bs\@empty\else - \endminipage\fi\fi\fi} -\def\exercise@parts@tabular@[#1]{% - \inittabMark - \let\eq@insertContAnnot\relax - \let\exerwparts@cols\@empty - \setkeys*{tabp@rts}{#1}\ifx\exerwparts@cols\@empty - \edef\exerwparts@cols{\XKV@rm}\fi - \ifx\minVspacet@bs\@empty\keepdeclaredvspacingfalse\fi - \let\istabularexer\eq@YES - \@tempcnta\exerwparts@cols\relax - \ifnum\@tempcnta<2\relax - \PackageError{exerquiz}{% - The number of columns for parts\MessageBreak - needs to be an integer greater than 1} - {Enter an integer, 2 or larger}\fi - \exercise@parts@tabular} -\newcount\eq@extabColCnt -\def\autotabOn{\let\eq@tabMarkChk\relax% - \PackageInfo{exerquiz/eqexam}{Executing \string\autotabOn}} -\def\autotabOff{\let\eq@tabMarkChk\@gobble - \PackageInfo{exerquiz/eqexam}{Executing \string\autotabOff}} -\autotabOff -\def\inittabMark{\global\eq@extabColCnt=0 } -\def\resettabMark{\global\eq@extabColCnt=1 } -\newcommand\autotabnewline[1][\eqparts@tabrowsep]{% - \ifnum\exerwparts@cols>0\relax - \ifx\eq@tabMarkChk\@gobble - \def\eq@atnext{\expandafter - \tabularnewline\expandafter[#1]}\else - \def\eq@atnext{\resettabMark\tabularnewline - \noalign{\expandafter\kern#1}}\fi - \expandafter\eq@atnext\fi} -\def\eq@tabMark{% - \ifnum\eq@extabColCnt=0\relax - \global\advance\eq@extabColCnt1\relax - \let\eq@next\relax - \else - \ifnum\eq@extabColCnt=1\relax - \let\eq@next\relax - \else - \ifnum\eq@extabColCnt>\exerwparts@cols - \let\eq@next\autotabnewline - \else\def\eq@next{&}\fi - \fi - \fi - \eq@next - \global\advance\eq@extabColCnt1\relax} -\newcommand\partstabcolsep[1]{\def\eq@partstabcolsep{#1}} -\partstabcolsep{1.5pt} -\newcommand\partstabtopsep[1]{\def\eq@partstabtopsep{#1}} -\partstabtopsep{3pt} -\def\eq@vpartstabtopsep{\vskip\eq@partstabtopsep\relax} -\newcommand\partstabrowsep[1]{\setlength{\@tempdima}{#1}% - \edef\eqparts@tabrowsep{\the\@tempdima}} -\partstabrowsep{0pt} -\newenvironment{exercise@parts@tabular}{% - \setcounter{partno}{0}% - \global\let\eqExerSolnHeader\eq@@writeexheaderlist - \def\tablrIndent{\hglue\prtsIndntSep\relax}% - \if\isitleadin\eq@YES - \if$\the\everypar$\let\tablrIndent\relax\fi - \setcounter{partno}{1}\fi - \let\leadinitem\eq@leadinitemparts - \let\tableadin\eq@tableadinparts - \global\let\solutionparshape\@empty - \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}% - \xdef\prtsIndntSep{\the\eq@tmplength}% - \sbox{\eq@tmpbox}{\parts@indent}% - \let\eq@item@latex\item - \let\eq@item\item@part@tabular - \def\eqthisenv{parts}\withinpartstrue - \def\item{\ifx\@currenvir\eqthisenv - \def\eq@next{\eq@tabMarkChk\eq@tabMark\eq@item@common}\else - \def\eq@next{\eq@item@latex}\fi - \eq@next}\eq@nolinkfalse - \@ifundefined{@xtabularcr}{\let\@xarraycr\eq@xtabularcr} - {\let\@xtabularcr\eq@xtabularcr}% - \eq@tmpdima=\linewidth - \advance\eq@tmpdima-\prtsIndntSep\relax - \@tempcnta\exerwparts@cols\relax - \advance\@tempcnta-1\relax - \multiply\@tempcnta2\relax - \@tempdima\prtsIndntSep\relax - \divide\@tempdima 2\relax - \edef\halfWidth{\the\@tempdima}% - \advance\@tempdima\eq@partstabcolsep\relax - \tabcolsep\@tempdima - \multiply\@tempdima\@tempcnta - \advance\eq@tmpdima-\@tempdima - \divide\eq@tmpdima by\exerwparts@cols\relax %dpsj3 - \edef\widthOfPartsBox{\the\eq@tmpdima}% dpsj2 - \if@tableadinitem\else\vskip\eq@partstabtopsep\relax\fi - \noindent\normalbaselines\kern0pt - \prior@parts@hook\abovepartshook - \tablrIndent\tabular[t]{@{}*{\exerwparts@cols}{>{\setTabulrSolnEnv - \parskip\eqeques@parsep\relax - \parindent0pt\relax\strut}p{\eq@tmpdima}}@{\hidewidth}}% -}{\endtabular\kern0pt - \@ifundefined{@listii@SAVE}{}{\global\let\@listii\@listii@SAVE - \global\let\@listii@SAVE\relax}% - \post@parts@hook\belowpartshook - \aftergroup\eqe@innermarkpts - \aftergroup\eq@vpartstabtopsep} -\let\eqe@innermarkpts\relax -\def\item@part@tabular{\refstepcounter{partno}% - \ifeq@solutionsafter - \eq@nolinktrue % no link to solution - \else\ifeq@nosolutions - \eq@nolinktrue % no link to solution - \else - \eq@ckglobalhide - \ifeq@hidesolution\eq@nolinktrue\else - \gdef\eqExerSolnHeader{\eq@@writeexheaderlist}% - \fi\fi\fi - \if@restorejustify\restorejustify\else\PBS\raggedright\fi - \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}% - \xdef\prtsIndntSep{\the\eq@tmplength}% - \sbox{\eq@tmpbox}{\parts@indent}% - \eq@tmpdima=\wd\eq@tmpbox - \addtolength\eq@tmplength{\eq@extralabelsep}% - \xdef\partshangamount{\the\eq@tmplength}% - \parshape \@ne 0pt \linewidth - \everypar{\parshape \@ne 0pt \linewidth}% - \eq@setPrbSolnAftrIndnt - \makebox[0pt][r]{\eqexlisttabheader\eqe@prtsepPrb}% - \ex@listtabheader@fterhook - \exlisttabheaderafterhook\ignorespaces} -\def\@ckhide[#1]{\edef\eq@arg{#1}% - \def\currhideopt{x}% - \ifx\eq@arg\@empty\else - \if\eq@arg\eq@Hid - \eq@hidesolutiontrue\eq@nolinktrue% - \edef\currhideopt{\Hidesymbol}% - \else - \ifeq@globalshowsolutions\else - \if\eq@arg\eq@hid - \eq@hidesolutiontrue\eq@nolinktrue% - \def\currhideopt{h}% - \fi - \fi - \fi\fi - \eq@item} -\def\tabControlOn{\@ifundefined{@xtabularcr} - {\let\save@@xtabularcr\@xarraycr} - {\let\save@@xtabularcr\@xtabularcr}} -\def\tabControlOff{\@ifundefined{@xtabularcr} - {\let\@xarraycr\save@@xtabularcr} - {\let\@xtabularcr\save@@xtabularcr}} -\AtBeginDocument{\tabControlOn} -\def\eq@xtabularcr{\@ifnextchar[{\save@@xtabularcr} - {\eqe@tab@parts@rowsep}}% -\def\eqe@tab@parts@rowsep{\save@@xtabularcr - \noalign{\expandafter\kern\eqparts@tabrowsep}}% -\let\eqgrii\relax -\let\eqgriii\relax -\def\includeexersolutions{\@ifstar - {\let\resetEXsolns\relax\includeexersolutionsi} - {\def\resetEXsolns{\global\let\include@solutions\relax}% - \includeexersolutionsi}} -\newcommand{\includeexersolutionsi}[1][]{% - \filterFor{#1}\includeexersolutionsii} -\def\includeexersolutionsii{% - \include@solutions - \resetEXsolns - \let\eqFilterArg\@empty -} -\long\def\gobbleToEndEXt#1\endeqEXt{\ifeqforpaper - \expandafter\@gobbletwo\fi} -\newif\if@targetforextr \@targetforextrfalse -\newcommand\filterFor[1]{\def\eqFilterArg{#1}} -\newcommand{\mrkForIns}[1]{\def\eqMrkCpyArg{#1}\global - \@targetforextrtrue\@ifundefined{#1@mfc} - {\global\@namedef{#1@mfc}{}} - {\PackageWarning{exerquiz/eqexam} - {The name '#1' has already been used.\MessageBreak - Please choose another, otherwise results may\MessageBreak - be as unexpected}}\ignorespaces} -\let\eqMrkCpyArg\@empty -\newcommand\inclEXtFilter[2]{\def\eqargii{#2}\ifx\eqargii\eqFilterArg - \else\expandafter\gobbleToEndEXt\fi} -\newcommand\useEXtFilter{\let\eqEXt\inclEXtFilter} -\let\eqsolutionshook\@empty -\let\eq@solutionshook\@empty -\let\priorexsectitle\@empty -\let\priorexslinput\@empty -\def\InputExrSolnsLevel{\@ifstar - {\def\eq@ExrSolnsStar{*}\InputExrSolnsLevel@i} - {\let\eq@ExrSolnsStar\@empty\InputExrSolnsLevel@i}} -\newcommand{\InputExrSolnsLevel@i}[2][]{% - \def\eq@ExrSolnsLabel{#1}\def\eq@ExrSolnsLevel{#2}} -\InputExrSolnsLevel*{section} -\def\exerSolnsHeadnToc{% - \edef\eq@mkCmd{\expandafter\noexpand - \csname\eq@ExrSolnsLevel\endcsname\eq@ExrSolnsStar}% - \eq@mkCmd{\exsectitle}\if!\eq@ExrSolnsLabel!\else - \label{\eq@ExrSolnsLabel}\fi - \if\eq@ExrSolnsStar*% - \addcontentsline{toc}{\eq@ExrSolnsLevel}{% - \@ifundefined{web@latextoc}{}{% - \ifx\web@latextoc\eq@YES\else - \protect\numberline{}\fi - }\exsectitle - }% - \fi -} -\@ifpackageloaded{web}{\def\eq@normallheader{\lheader{\rightmark}}} - {\let\eq@normallheader\relax} -\@ifpackageloaded{web}{\def\eq@defaultlheader{\lheader{\aeb@setmarks}}} - {\let\eq@defaultlheader\relax} -\newif\ifExSolutionsSet \ExSolutionsSetfalse -\def\eqExSolFileName{\jobname.sol} -\newcommand{\exerSolnInput} -{% - \@ifundefined{eqe@IWO}{}{\ifsolutionsAtEnd - \eqe@IWO\@auxout{\string\expandafter\string\gdef - \string\csname\space eqExamQuesLastPage\string\endcsname - {\arabic{page}}}\fi}\let\webnewpage\relax - \ifsolutionsonly\else - \bgroup\OKToWriteExamDatatrue - \writeT@ExSolns{\string\endinput}\egroup - \immediate\closeout\ex@solns\fi - \ifeq@nosolutions\else - \iftherearesolutions - \ifsolutionsonly\eq@solutionshook - \eqsolutionshook - \else - \newpage\eq@solutionshook - \eqsolutionshook\markright{}\eq@normallheader - \fi - \markright{\exsectitle}% - \ifx\webnewpage\relax - \def\webnewpage{\global\let\webnewpage\newpage}\fi - \priorexsectitle\exerSolnsHeadnToc\priorexslinput - \InputIfFileExists{\eqExSolFileName} - {\global\ExSolutionsSettrue}{\PackageWarning{exerquiz} - {!!! Solutions to exercises not found}}% - \global\ExSolutionsSetfalse - \newpage\eq@defaultlheader - \fi - \fi -} -\def\include@solutions{% - \exerSolnInput -} -\newcommand{\prior@questionsHook}{} -\let\qMark@Hook\@empty -\let\aebtitleQuiz\@empty -\newcommand{\post@questionsHook}{} -\newcommand{\quesNumColor}[1]{\def\eq@quesNumCol{#1}} -\quesNumColor{blue} -\renewcommand{\theeqquestionnoi}{\arabic{eqquestionnoi}} -\newcommand{\labeleqquestionnoi}{% - \color{\eq@quesNumCol}\bfseries\theeqquestionnoi.} -\renewcommand\theeqquestionnoii{(\alph{eqquestionnoii})} -\newcommand{\labeleqquestionnoii}{% - \color{\eq@quesNumCol}\bfseries\theeqquestionnoii} -\renewcommand\theeqquestionnoiii{(\roman{eqquestionnoiii})} -\newcommand{\labeleqquestionnoiii}{% - \color{\eq@quesNumCol}\bfseries\theeqquestionnoiii} -\define@key{props@ques}{labelwidthTo}% - [\normalsize\normalfont\bfseries00.]% - {\def\propQ@labelwidthTo{#1}} -\define@key{props@ques}{labelwidth}[]{\def\propQ@labelwidth{#1}} -\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}} -\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}} -\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\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 - \ifx\propQ@labelwidth\@empty - \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 - \setlength{\parsep}{\propQ@parsep}% - \setlength{\itemsep}{\propQ@itemsep}% - \setlength{\itemindent}{0pt}% - \setlength{\leftmargin}{\labelwidth}% - }% -}{\endlist} -\def\pushquestions{\expandafter\xdef\csname save\@quesctr\endcsname - {\expandafter\the\csname c@\@quesctr\endcsname}\end{questions}} -\def\popquestions{% - \begin{questions}[\csname quesOpts\@quesctr\endcsname]% - \setcounter{\@quesctr}{\csname save\@quesctr\endcsname}% - \@ifnextchar\popquestions{\item[]}{\@ifnextchar\begin{\item[]}{}}} -\newcommand{\priorsqhook}[1]{\def\sq@priorhook{#1}} -\priorsqhook{} -\newcommand{\abovesqskip}[1]{\def\sq@aboveskip{#1}} -\abovesqskip{\par\medskip} -\long\def\endsqhook#1{\def\sq@afterhook{#1}} -\endsqhook{} -\def\@shortquizCnt{0} -\def\@sqGenBaseName{eqSqBn\@shortquizCnt} -\let\sqhspace\space -\let\ListOfSQuizNames\@empty -\newenvironment{shortquiz} -{% - \xdef\eq@pageThisQ{\the\c@page}% - \let\@currentQues\@empty - {\count0=\@shortquizCnt \advance\count0by1\relax - \xdef\@shortquizCnt{\the\count0}}% - \goodbreak\@ifstar{\sqForms\@shortquiz}% - {\if\aeb@FLOverride\eq@f\def\sqstar{*}\else - \def\sqstar{}\sqLinks\fi\@shortquiz}% -}{\aeb@endshortquiz} -\newenvironment{shortquiz*} -{% - \xdef\eq@pageThisQ{\the\c@page}% - {\count0=\@shortquizCnt\advance\count0by1\relax - \xdef\@shortquizCnt{\the\count0 }}% - \sqForms\@shortquiz -}{\aeb@endshortquiz} -\def\@shortquiz{\@ifnextchar[% - {\@@shortquiz}{\@@shortquiz[\@sqGenBaseName]}} -\def\sq@setCLN#1{\ifx\aebTitleQuiz\@empty - \protected@edef\@currentlabelname{#1}\else - \protected@edef\@currentlabelname{\@currentlabelname}\fi -} -\let\isQZ=q \let\isSQZ=s -\let\eqQuizType\relax -\def\@@shortquiz[#1]{%\begingroup - \gdef\oField{#1}\gdef\curr@quiz{#1}\gdef\currQuiz{#1}% - \edef\tmp@Exp{\noexpand\g@addto@macro\noexpand - \ListOfSQuizNames{,#1}}\tmp@Exp - \global\let\eqQzQuesList\@empty - \let\eq@AddProbToQzQuesList\relax - \edef\@currentlabel{\@shortquizCnt}% - \edef\@currentHref{shortquiz.\@shortquizCnt}% - \global\let\eqQuizType\isSQZ\let\@qzsolndest\@empty - \if\sqstar*\relax - \let\@Ans\Ans@sq@f - \ifx\oField\@empty - \typeout{^^JExerquiz: Base field name required when using - shortquiz with '*' option}% - \PackageInfo{exerquiz}{Assuming link style^^J}% - \let\@Ans\Ans@sq@l - \fi - \else - \let\@Ans\Ans@sq@l - \fi - \setcounter{questionno}{0}% - \let\answers\answers@sq - \let\endanswers\endanswers@sq - \let\manswers\manswers@sq - \let\endmanswers\endmanswers@sq - \let\solution\solution@sq - \let\endsolution\endsolution@sq - \sq@aboveskip\sq@priorhook\ignorespaces -} -\newcommand\belowsqskip[1]{\def\aftershortquizskip{#1}} -\belowsqskip{\medskip} -\def\aeb@endshortquiz{\setcounter{quizno}{0}% - \sq@afterhook - \global\let\sqlabel\eq@sqlabel - \global\let\sqslrtnlabel\eq@sqslrtnlabel - \global\let\sqsllabel\eq@sqsllabel - \par\aftershortquizskip -} -\def\sqLinks{\def\sqstar{}}\sqLinks -\def\sqForms{\def\sqstar{*}} -\let\eq@tq@star\relax -\def\qzPriorSolutionAfterHook{\smallskip} -\let\sqPostHeaderHook\@empty -\let\qPostHeaderHook\@empty -\let\eq@sqPostHeaderHook\@empty -\let\eq@qPostHeaderHook\@empty -\let\prior@eqQt\@empty -\let\prior@eqSQt\@empty -\def\sqsolafterhspace{\space} -\newif\ifmakeQzSlLocal \makeQzSlLocalfalse -\def\makeQzSolnsLocalOn{\makeQzSlLocaltrue} -\def\makeQzSolnsLocalOff{\makeQzSlLocalfalse} -\def\solution@sq{\let\eq@next\relax - \ifx\@qzsolndest\@empty - \PackageWarning{exerquiz}% - {* Solutions unexpected here, will *\MessageBreak - * assume solutionsafter option *}% - \eq@solutionsaftertrue - \fi - \ifeq@solutionsafter - \par\qzPriorSolutionAfterHook\noindent - \if!\sqsolafter!\else - \sqsolafter\sqsolafterhspace\fi\ignorespaces - \else - \global\therearequizsolutionstrue\let\verbatim@out\quiz@solns - \set@display@protect - \immediate\write\verbatim@out{% - \ifmakeQzSlLocal\protect\begingroup^^J\fi - \if\eqQuizType\isQZ - \ifx\prior@eqQt\@empty\else\prior@eqQt\fi - \ifx\eqMrkCpyArg\@empty\else - \protect\eqMrkSoln{\eqMrkCpyArg}\fi - \protect\eqQt{\eqFilterArg}\else - \ifx\prior@eqSQt\@empty\else\prior@eqSQt\fi - \ifx\eqMrkCpyArg\@empty\else - \protect\eqMrkSoln{\eqMrkCpyArg}\fi - \protect\eqSQt{\eqFilterArg}\fi - \protect\quizSolnHeader\if\eqQuizType\isQZ\ifx\allow@peek\eq@NO - [{\curr@quiz}{\currQuizStartPage}]\fi\fi - {\@qzsolndest}{\sqsllabel}\protect\eqterminex - \if\eqQuizType\isQZ\expandafter\eq@qPostHeaderHook - \expandafter\qPostHeaderHook\else - \expandafter\eq@sqPostHeaderHook - \expandafter\sqPostHeaderHook\fi}% - \set@typeset@protect - \expandafter\verbatimwrite\fi -} -\let\qzSolutionsAfterHook\@empty -\def\endsolution@sq -{% - \ifeq@solutionsafter - \eq@fititin{\mbox{\sqslrtnlabel}}\par\qzSolutionsAfterHook - \aftergroup\ignorespaces - \else - \endverbatimwrite - \eq@clearMrkCpy - \ifx\@qzsolndest\@empty\else\set@display@protect - \immediate\write\verbatim@out{\eqSqSolnTrailer}% - \set@typeset@protect - \fi - \fi - \global\let\@qzsolndest\@empty -} -\def\fpAfterSolutionsSkip{\par\medskip} -\let\eqSqSolnTrailerHook\@empty -\let\eqQzSolnTrailerHook\@empty -\newcommand\eqSqSolnTrailer{% - \if\eqQuizType\isQZ - \eqQzSolnTrailerHook - \protect\ReturnTo{page.\eq@pageThisQ}% - {\protect\mbox{\sqslrtnlabel}}\string\endeqQt - \else - \eqSqSolnTrailerHook - \protect\ReturnTo{page.\eq@pageThisQ}% - {\protect\mbox{\sqslrtnlabel}}\string\endeqSQt% - \fi - \ifeqforpaper\protect\fpAfterSolutionsSkip\fi^^J% - \ifmakeQzSlLocal\protect\endgroup^^J\fi -} -\let\eqSQt\@gobble -\let\endeqSQt\relax -\let\eqQt\@gobble -\let\endeqQt\relax -\let\prior@quizSolnHeaderHook\@empty -\newcommand\quizSolnHeader[3][]{% - \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}} -\newcommand{\includequizsolutionsi}[1][]{% - \filterFor{#1}\includequizsolutionsii} -\def\includequizsolutionsii{\include@quizsolutions - \resetQZtsolns - \let\eqFilterArg\@empty} -\newcommand\useForms{\def\aeb@FLOverride{f}} -\newcommand\useLinks{\def\aeb@FLOverride{l}} -\newcommand\restoreFLTypeDefault{\global\let\aeb@FLOverride\relax} -\let\aeb@FLOverride\relax -\let\aebtitleQuiz\@empty -\let\aebTitleQuiz\@empty -\def\pushEnvir{\xdef\eq@currenvir{\@currenvir}\endgroup} -\def\popEnvir{\begingroup\@endpefalse - \edef\@currenvir{\eq@currenvir}% - \edef\@currenvline{\on@line}% -} -\def\answers@sq{\parindent0pt - \ifx\solutionparshape\@empty\else - \pushEnvir\par\noindent\expandafter\popEnvir\fi - \stepcounter{questionno}% - \if\sqstar*\relax - \if\aeb@FLOverride\eq@l - \let\@Ans\Ans@sq@l\else - \let\@Ans\Ans@sq@f\fi - \else - \if\aeb@FLOverride\eq@f - \let\@Ans\Ans@sq@f\else - \let\@Ans\Ans@sq@l\fi - \fi - \def\aeb@answerType{r}\@ifnextchar[{\answers@@sq}% - {\@ifstar{\answers@@sq[\curr@quiz.\thequestionno]}{\answers@@sq[]}}} -\def\manswers@sq{\parindent0pt - \@ifundefined{ifuserectforms}{} - {\if\aeb@FLOverride\eq@f\ifuserectforms - \useRectForMC\else\useCircForMC\fi\fi}% - \ifx\solutionparshape\@empty\else - \pushEnvir\par\noindent\expandafter\popEnvir\fi - \stepcounter{questionno}% - \if\sqstar*\relax - \if\aeb@FLOverride\eq@l - \let\@Ans\Ans@ck@sq@l\else - \let\@Ans\Ans@ck@sq@f\fi - \else - \if\aeb@FLOverride\eq@f - \let\@Ans\Ans@ck@sq@f\else - \let\@Ans\Ans@ck@sq@l\fi - \fi - \def\aeb@answerType{c}\@ifnextchar[{\answers@@sq}% - {\@ifstar{\answers@@sq[\curr@quiz.\thequestionno]}{\answers@@sq[]}}} -\let\sq@hwdest\@empty % hard-wired destination -\def\answers@@sq[#1]#2{% - \xdef\aeb@numCols{#2}% - \ifx\sq@hwdest\@empty - \xdef\@qzsolndest{#1}\else - \gdef\@qzsolndest{\sq@hwdest}\fi - \if\aeb@numCols1\gdef\eq@listType{1}\expandafter\answers@sq@list - \else - \gdef\eq@listType{0}\expandafter\answers@@sq@tabular - \fi{\aeb@numCols}} -\def\setMClabelsepDefault#1{\def\eq@hspanner@default{#1}} -\def\setMClabelsep#1{\def\eq@hspanner{#1}} -\setMClabelsep{\ }\setMClabelsepDefault{\ } -\def\resetMClabelsep{\expandafter\setMClabelsep\expandafter - {\eq@hspanner@default}} -\def\eq@lw@l{\eq@l@l\eq@hspanner} -\def\eq@l@l{\normalsize\normalfont(d)} -\def\eq@lw@f{\kern\RadioFieldSize\eq@hspanner} -\@ifundefined{ifwithinsoldoc}{\newif\ifwithinsoldoc\withinsoldocfalse}{} -\@ifundefined{ifwithinqsldoc}{\newif\ifwithinqsldoc\withinqsldocfalse}{} -\let\eq@ansChoiceArray\@empty -\def\eq@recordAnsChoice{% - \ifx\eq@ansChoiceArray\@empty - \edef\tmp@exp{\noexpand\g@addto@macro - \noexpand\eq@ansChoiceArray{"\alph{quizno}"}}\else - \edef\tmp@exp{\noexpand\g@addto@macro - \noexpand\eq@ansChoiceArray{,"\alph{quizno}"}}\fi - \tmp@exp} -\newcommand\Ans@list[2][0]{\gdef\eq@pPTs{#1}\xdef\Ans@choice{#2}% - \item\relax\noindent\if\eq@listType\eq@One - \addtocounter{quizno}{-1}\@ifundefined{ifwithinsoldoc} - {\refstepcounter{quizno}}{\ifwithinsoldoc\stepcounter{quizno}\else - \refstepcounter{quizno}\fi}\fi - \ignorespaces} -\newenvironment{answers@sq@list}[1]{% - \ifx\aeb@answerType\eq@r - \let\endanswers\endanswers@sq@list\else - \let\endmanswers\endanswers@sq@list\fi - \list{\strut\@Ans}{% - \if\sqstar*\relax - \settowidth{\labelwidth}{\eq@lw@f}\else - \settowidth{\labelwidth}{\eq@lw@l}\fi - \setlength{\topsep}{-\parskip+\aboveanswersSkip}% - \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}% - \setlength{\itemsep}{0pt}\setlength{\partopsep}{0pt}% - \setlength{\listparindent}{\parindent}% - \ifnum\exerwparts@cols>1\relax - \ifx\itsExerParts\eq@YES - \setlength{\leftmargin}{\labelwidth}\else - \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi - \else - \ifx\solutionparshape\@empty - \setlength{\leftmargin}{\labelwidth}\else - \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi - \fi - \setlength{\labelsep}{0pt}% - \def\Ans{\Ans@list}% - }% list -}{\endlist\setcounter{quizno}{0}\eq@answersEndHook} -\newcommand\Ans@tabular[2][0]{\gdef\eq@pPTs{#1}\xdef\Ans@choice{#2}% - \leavevmode\@Ans -} -\newcommand\sqtabsep[1]{\def\eq@argi{#1}\ifx\eq@argi\@empty - \def\sq@tabsep{1.5pt}\else\def\sq@tabsep{#1}\fi} -\sqtabsep{1.5pt} -\def\sqTabPos#1{\def\sq@TabPos{[#1]}}\sqTabPos{} -\def\answers@@sq@tabular#1{% - \ifinner - \ifx\itsExerParts\eq@YES\par\removelastskip - \removelastparskip\vskip\aboveanswersSkip\fi - \else\par\removelastskip\removelastparskip - \vskip\aboveanswersSkip\fi - \noindent\ifnum\exerwparts@cols>1\relax\parshape=0\fi - \tabcolsep=0pt - \eq@tmpdima=\linewidth - \@tempcnta#1\relax - \advance\@tempcnta-1\relax - \multiply\@tempcnta by2 - \@tempdima\sq@tabsep\relax - \multiply\@tempdima\@tempcnta - \advance\eq@tmpdima-\@tempdima - \divide\eq@tmpdima by#1 - \def\Ans{\Ans@tabular}% - \tabcolsep\sq@tabsep\relax - \expandafter\tabular\sq@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}}% -\let\eq@save@doendpe\@doendpe -\def\reset@doendpe#1{\global\eq@scratchtoks=\expandafter{#1}% - \gdef\@doendpe{\par\@endpetrue\global\let\@doendpe\eq@save@doendpe - \def\par{\@restorepar - \expandafter\everypar - \expandafter{\the\eq@scratchtoks}\par\@endpefalse}% - \everypar{{\setbox\z@\lastbox}% - \everypar{}\@endpefalse}\the\eq@scratchtoks - }% -} -\newcommand\answersEndHook[1]{\def\eq@answersEndHook{#1}} -\let\eq@answersEndHook\@empty -\def\endanswers@sq{\endtabular\setcounter{quizno}{0}% - \eq@answersEndHook\reset@doendpe{\the\everypar}% - \ifinner\else%\par - \removelastskip - \vspace{\aboveanswersSkip}\@endpetrue\fi -} -\def\endmanswers@sq{\endtabular\setcounter{quizno}{0}% - \eq@answersEndHook\reset@doendpe{\the\everypar}% - \ifinner\else%\par - \removelastskip - \vspace{\aboveanswersSkip}\@endpetrue\fi -} -\def\popiiictm{\special{CTM: pop pop pop}} -\def\aebChoiceAltFmt{\noexpand\ifaebshowgrayletters - \Alph{quizno}\noexpand\else\linkContentFormat\noexpand\fi} -\def\linkContentFormat{% - \if\probstar*\Alph{quizno}\else\alph{quizno}\fi} -\def\linkContentWrapper{(\hfil\linkContentFormat\hfil)}% -\def\Ans@sq@l{% - \leavevmode\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@l}\sbox{\eq@tmpbox}{\eq@l@l}% - \eq@tmpdima=\wd\eq@tmpbox - \def\link@@Content{\linkContentWrapper}% - \hangindent=\eq@tmplength\hangafter=1\relax - \Ans@sq@l@driver -\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} -\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} -\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 -} -\def\bChoiceNumCols{\aeb@numCols} -\define@key{bchoice}{random}[true]{% - \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 -} -\let\eChoices\relax -\def\@layoutListAns{\@ifnextchar\Ans{\@getListAns}% - {\@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 -} -\long\def\@@@SaveAns#1\eAns{% 4/5 - \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}% -} -\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 - \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} -\def\eq@displayAlts#1{\advance\@tempcnta1 - \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} -\newcommand{\savedAltFmt}[1]{(#1)} -\newcommand{\useSavedAns}{\bgroup\@ifstar{\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 -} -\newcommand{\useSavedAlts}{\bgroup\@ifstar{\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 -} -\newcommand{\useSavedAltsAns}{\bgroup\@ifstar{\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 -} -\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\@lookforendansChoices#1{% - \@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 -} -\def\@@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}% -} -\def\@findendans{\@ifnextchar\end{% 4/5 - \ifx\bChoiceLabel\@empty\else - \processLabeledAns\fi - }{\expandafter\@findendans\@gobble}}% -\def\defineEachAns#1{\advance\count0by1\relax - \@temptokena={#1}\csarg\xdef - {SavedAns\bChoiceLabel-Idx\the\count0}{\the\@temptokena}% - \ifsolutionsonly\else - {\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\count0}% - {\the\@temptokena}}}\fi -} -\def\defineEachChoice#1{\advance\count0by1\relax - \@temptokena={#1}\csarg\xdef - {SavedAlts\bChoiceLabel-Idx\the\count0}% - {\the\@temptokena}\ifsolutionsonly\else - {\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAlts\bChoiceLabel-Idx\the\count0}% - {\the\@temptokena}}}\fi -} -\def\processLabeledAns{% - \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 - \count0=0\relax\let\\\defineEachAns\the\toks@ - \xdef\@currNCntAns{\the\count0 }\csarg - \xdef{NumAns\bChoiceLabel}{\@currNCntAns}% - \ifsolutionsonly\else{\eq@IWDefs{\string - \csarg\string\gdef{NumAns\bChoiceLabel}{\the\count0 }}}\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 - \count0=0\relax\let\\\defineEachChoice\the\toks@ - \count0=1\relax\toks@={}%{\ignorespaces\@gobble}% - \loop - \edef\temp@exp{\the\toks@\noexpand\\{% - \noexpand\useSavedAlts[\the\count0]{\bChoiceLabel} - \noexpand\useSavedAns[\the\count0]{\bChoiceLabel}}}% - \toks@=\expandafter{\temp@exp}% - \ifnum\count0<\@currNCntAns - \advance\count0by1 - \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}} -\def\aeb@REFstar#1{\@ifundefined{r@#1}{\hbox{\reset@font\bfseries ??}} - {\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}% -} -\def\aeb@buildUpperCaseRef#1{% - \xdef\tmp@expand{\aeb@exiii\@firstoftwo\csname r@#1\endcsname}% - \xdef\tmp@expand{\uppercase{\tmp@expand}}\tmp@expand -} -\endinput -%% -%% End of file `eqexam.def'. diff --git a/texmf-dist/tex/latex/acrotex/eqfin.def b/texmf-dist/tex/latex/acrotex/eqfin.def index 3c5f874c..00d54589 100644 --- a/texmf-dist/tex/latex/acrotex/eqfin.def +++ b/texmf-dist/tex/latex/acrotex/eqfin.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqfr.def b/texmf-dist/tex/latex/acrotex/eqfr.def index 94a24e8b..86c4ae89 100644 --- a/texmf-dist/tex/latex/acrotex/eqfr.def +++ b/texmf-dist/tex/latex/acrotex/eqfr.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqit.def b/texmf-dist/tex/latex/acrotex/eqit.def index 7de47010..a05d545d 100644 --- a/texmf-dist/tex/latex/acrotex/eqit.def +++ b/texmf-dist/tex/latex/acrotex/eqit.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqnl.def b/texmf-dist/tex/latex/acrotex/eqnl.def index dc09dc2a..9896c588 100644 --- a/texmf-dist/tex/latex/acrotex/eqnl.def +++ b/texmf-dist/tex/latex/acrotex/eqnl.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqno.def b/texmf-dist/tex/latex/acrotex/eqno.def index db617a72..21742094 100644 --- a/texmf-dist/tex/latex/acrotex/eqno.def +++ b/texmf-dist/tex/latex/acrotex/eqno.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqpo.def b/texmf-dist/tex/latex/acrotex/eqpo.def index e71a7fc5..a9f8d0e4 100644 --- a/texmf-dist/tex/latex/acrotex/eqpo.def +++ b/texmf-dist/tex/latex/acrotex/eqpo.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqru.def b/texmf-dist/tex/latex/acrotex/eqru.def index 944eeb4c..a0616bd2 100644 --- a/texmf-dist/tex/latex/acrotex/eqru.def +++ b/texmf-dist/tex/latex/acrotex/eqru.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/eqtr.def b/texmf-dist/tex/latex/acrotex/eqtr.def index e72184a7..e6788cf3 100644 --- a/texmf-dist/tex/latex/acrotex/eqtr.def +++ b/texmf-dist/tex/latex/acrotex/eqtr.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/exerquiz.sty b/texmf-dist/tex/latex/acrotex/exerquiz.sty index 7530720b..4b64bdb6 100644 --- a/texmf-dist/tex/latex/acrotex/exerquiz.sty +++ b/texmf-dist/tex/latex/acrotex/exerquiz.sty @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -19,7 +19,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{exerquiz} - [2019/12/17 v8.5.5 % + [2020/01/01 v8.5.8 % Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)] \usepackage{keyval} \RequirePackage{ifpdf}[2006/02/20] @@ -465,6 +465,7 @@ \newcounter{@exno} \setcounter{@exno}{0} % running exno \newcounter{quizno} \setcounter{quizno}{0} \renewcommand\thequizno{\alph{quizno}} +\newcount\eqtmpcnta \def\theHquizno{\curr@quiz.\theeqquestionnoi.% \ifcase\@eqquestiondepth\or\or\arabic{eqquestionnoii}.% \or\arabic{eqquestionnoii}.\roman{eqquestionnoiii}.% @@ -1563,8 +1564,8 @@ \let\eq@postexerciseHook\relax \def\eq@postexerciseHook@BM{% \xdef\Hy@currentbookmarklevel{\eq@currentbookmarklevel}} -{\count0=\value{tocdepth} -\advance\count0by2 \xdef\eqbmkmrkdepth{\the\count0}} +{\eqtmpcnta\value{tocdepth} +\advance\eqtmpcnta\tw@ \xdef\eqbmkmrkdepth{\the\eqtmpcnta}} \@ifundefined{Hy@bookmarksdepth} {\setcounter{tocdepth}{\eqbmkmrkdepth}} {\hypersetup{bookmarksdepth=\eqbmkmrkdepth}} @@ -1697,8 +1698,8 @@ {% \xdef\eq@pageThisQ{\the\c@page}% \let\@currentQues\@empty - {\count0=\@shortquizCnt \advance\count0by1\relax - \xdef\@shortquizCnt{\the\count0}}% + {\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne + \xdef\@shortquizCnt{\the\eqtmpcnta}}% \goodbreak\@ifstar{\sqForms\@shortquiz}% {\if\aeb@FLOverride\eq@f\def\sqstar{*}\else \def\sqstar{}\sqLinks\fi\@shortquiz}% @@ -1706,8 +1707,8 @@ \newenvironment{shortquiz*} {% \xdef\eq@pageThisQ{\the\c@page}% - {\count0=\@shortquizCnt\advance\count0by1\relax - \xdef\@shortquizCnt{\the\count0 }}% + {\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne + \xdef\@shortquizCnt{\the\eqtmpcnta}}% \sqForms\@shortquiz }{\aeb@endshortquiz} \def\@shortquiz{\@ifnextchar[% @@ -1867,12 +1868,13 @@ \@ifnextchar\bgroup{\eq@promoteNewPageHere} {\eq@promoteNewPageHere{#1}}% } -\def\eq@promoteNewPageHere#1{\par +\def\eq@promoteNewPageHere#1{\setlength{\@tempdimb}{#1}% + \ifdim\@tempdima>\z@\par \bgroup\@nobreakfalse\addpenalty{-500}% - \setlength{\@tempdimb}{#1}\@tempdima \pagegoal + \@tempdima \pagegoal \advance \@tempdima -\pagetotal \ifdim \@tempdima<\@tempdimb\ifnum\col@number>\@ne\columnbreak - \else\newpage\penalty1\fi\fi\egroup + \else\newpage\penalty1\fi\fi\egroup\fi } \newcommand{\saveDest}[1][]{% \def\sd@arg{#1}\ifx\sd@arg\@empty @@ -2023,8 +2025,8 @@ \global\let\pointValuesArray\@empty \global\let\ptypeArray\@empty \global\let\corrAnsArray\@empty - {\count0=\@quizCnt\advance\count0by1\relax - \xdef\@quizCnt{\the\count0 }}% + {\eqtmpcnta\@quizCnt\advance\eqtmpcnta\@ne + \xdef\@quizCnt{\the\eqtmpcnta}}% \edef\@currentlabel{\@quizCnt}% \edef\@currentHref{quiz.\@quizCnt}% \sq@setCLN{\eq@defaultQuizLabelName}% @@ -3392,20 +3394,21 @@ if (_bOK) {\jsR\jsT \ifx\bChoiceLabel\@empty\else \processLabeledAns\fi }{\expandafter\@findendans\@gobble}}% -\def\defineEachAns#1{\advance\count0by1\relax +\def\defineEachAns#1{\advance\eqtmpcnta\@ne \@temptokena={#1}\csarg\xdef - {SavedAns\bChoiceLabel-Idx\the\count0}{\the\@temptokena}% + {SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}{\the\@temptokena}% \ifsolutionsonly\else {\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\count0}% + \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}% {\the\@temptokena}}}\fi } -\def\defineEachChoice#1{\advance\count0by1\relax +\def\defineEachChoice#1{\advance\eqtmpcnta\@ne \@temptokena={#1}\csarg\xdef - {SavedAlts\bChoiceLabel-Idx\the\count0}% + {SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}% {\the\@temptokena}\ifsolutionsonly\else {\let\\\relax\eq@IWDefs{\string - \csarg\string\gdef{SavedAlts\bChoiceLabel-Idx\the\count0}% + \csarg\string + \gdef{SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}% {\the\@temptokena}}}\fi } \def\processLabeledAns{% @@ -3421,24 +3424,24 @@ if (_bOK) {\jsR\jsT \xdef{SavedAns\bChoiceLabel}{\the\toks@}% \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string \csarg\string\gdef{SavedAns\bChoiceLabel}{\the\toks@}}}\fi - \count0=0\relax\let\\\defineEachAns\the\toks@ - \xdef\@currNCntAns{\the\count0 }\csarg + \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\count0 }}}\fi + \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 - \count0=0\relax\let\\\defineEachChoice\the\toks@ - \count0=1\relax\toks@={}%{\ignorespaces\@gobble}% + \eqtmpcnta\z@\relax\let\\\defineEachChoice\the\toks@ + \eqtmpcnta\@ne\toks@={}%{\ignorespaces\@gobble}% \loop \edef\temp@exp{\the\toks@\noexpand\\{% - \noexpand\useSavedAlts[\the\count0]{\bChoiceLabel} - \noexpand\useSavedAns[\the\count0]{\bChoiceLabel}}}% + \noexpand\useSavedAlts[\the\eqtmpcnta]{\bChoiceLabel} + \noexpand\useSavedAns[\the\eqtmpcnta]{\bChoiceLabel}}}% \toks@=\expandafter{\temp@exp}% - \ifnum\count0<\@currNCntAns - \advance\count0by1 + \ifnum\eqtmpcnta<\@currNCntAns\relax + \advance\eqtmpcnta\@ne \repeat \csarg\xdef{SavedAltsAns\bChoiceLabel}{\the\toks@}% \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string @@ -3914,7 +3917,7 @@ if (!isQuizInitialized("@currQuiz")) { \def\word##1{\\b##1\\b}\def\any{@any@}\fi \xdef\rbTxtAlt{\rbFlag,\eq@argi,\eq@argii}% \global\let\txtAltList\@empty - \count0=#4 \ifnum\count0 > 0 \expandafter\@argRead\else + \eqtmpcnta=#4\relax\ifnum\eqtmpcnta>\z@\expandafter\@argRead\else \PackageError{exerquiz}{% The fourth required parameter of \string\RespBoxTxt\MessageBreak is required to be a positive integer. You entered\MessageBreak @@ -3923,8 +3926,8 @@ if (!isQuizInitialized("@currQuiz")) { \def\@argRead#1{\xdef\jsTempArgs{\txtAltList}% \ifx\txtAltList\@empty\xdef\txtAltList{"#1"}\else \xdef\txtAltList{\jsTempArgs,"#1"}\fi\@@argRead} -\def\@@argRead{\advance\count0 by-1\relax - \ifnum\count0=0\relax +\def\@@argRead{\advance\eqtmpcnta\m@ne + \ifnum\eqtmpcnta=\z@ \def\eq@next{\endgroup \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}% \if\grpquestions\eq@Zero @@ -4031,7 +4034,7 @@ if (!isQuizInitialized("@currQuiz")) { \def\word##1{\\b##1\\b}\def\any{@any@} \gdef\rbTxtAlt{\rbFlag,#1,1}% force sub-string match \global\let\txtAltList\@empty - \count0=#3 \ifnum\count0>0 \expandafter\@argReadPC\else + \eqtmpcnta=#3\relax\ifnum\eqtmpcnta>\z@\expandafter\@argReadPC\else \PackageError{exerquiz}{% The third required parameter of \string\RespBoxTxtPC\MessageBreak @@ -4042,8 +4045,8 @@ if (!isQuizInitialized("@currQuiz")) { \newcommand\@argReadPC[2][0]{\xdef\jsTempArgs{\txtAltList}% \ifx\txtAltList\@empty\xdef\txtAltList{["#2",#1]}\else \xdef\txtAltList{\jsTempArgs,["#2",#1]}\fi\@@argReadPC} -\def\@@argReadPC{\advance\count0 by-1\relax - \ifnum\count0=0\relax +\def\@@argReadPC{\advance\eqtmpcnta\m@ne + \ifnum\eqtmpcnta=\z@ \def\eq@next{\endgroup \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}% \if\grpquestions\eq@Zero diff --git a/texmf-dist/tex/latex/acrotex/template.def b/texmf-dist/tex/latex/acrotex/template.def index d1c19f9d..2a57c328 100644 --- a/texmf-dist/tex/latex/acrotex/template.def +++ b/texmf-dist/tex/latex/acrotex/template.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -18,7 +18,7 @@ %% License, or (at your option) any later version. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ProvidesFile{template.`def} - [2019/12/17 v8.5.5 % + [2020/01/01 v8.5.8 % Exerquiz template for language support (dps)] %%------------- Instructions ------------------------------------ %% Make your language localizations to this file and rename it to diff --git a/texmf-dist/tex/latex/acrotex/usemcfi.def b/texmf-dist/tex/latex/acrotex/usemcfi.def index 7d032b47..f2e70208 100644 --- a/texmf-dist/tex/latex/acrotex/usemcfi.def +++ b/texmf-dist/tex/latex/acrotex/usemcfi.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2019 D. P. Story %% +%% Copyright (C) 1999-2020 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/web.sty b/texmf-dist/tex/latex/acrotex/web.sty index 094bff39..2a9e97e1 100644 --- a/texmf-dist/tex/latex/acrotex/web.sty +++ b/texmf-dist/tex/latex/acrotex/web.sty @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Web package, %% -%% Copyright (C) 1999-2018 D. P. Story %% +%% Copyright (C) 1999-2019 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/webpro.def b/texmf-dist/tex/latex/acrotex/webpro.def index 5043dbae..d494fec1 100644 --- a/texmf-dist/tex/latex/acrotex/webpro.def +++ b/texmf-dist/tex/latex/acrotex/webpro.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Web package, %% -%% Copyright (C) 1999-2018 D. P. Story %% +%% Copyright (C) 1999-2019 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% diff --git a/texmf-dist/tex/latex/acrotex/websec.def b/texmf-dist/tex/latex/acrotex/websec.def index 0735eaf0..2a5b21f5 100644 --- a/texmf-dist/tex/latex/acrotex/websec.def +++ b/texmf-dist/tex/latex/acrotex/websec.def @@ -8,7 +8,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Web package, %% -%% Copyright (C) 1999-2018 D. P. Story %% +%% Copyright (C) 1999-2019 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% |