summaryrefslogtreecommitdiff
path: root/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'texmf-dist')
-rw-r--r--texmf-dist/doc/latex/acrotex/README.md8
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb_man.pdfbin1339986 -> 1356076 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb_man.tex5
-rw-r--r--texmf-dist/doc/latex/acrotex/eformman.pdfbin1099178 -> 1096131 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/eformman.tex2
-rw-r--r--texmf-dist/source/latex/acrotex/exerquiz.dtx1184
-rw-r--r--texmf-dist/source/latex/acrotex/exerquiz.ins4
-rw-r--r--texmf-dist/source/latex/acrotex/web.dtx12
-rw-r--r--texmf-dist/tex/latex/acrotex/aeb-comment.sty189
-rw-r--r--texmf-dist/tex/latex/acrotex/aebjs.def8
-rw-r--r--texmf-dist/tex/latex/acrotex/aebrandom.def4
-rw-r--r--texmf-dist/tex/latex/acrotex/aebsumrytbls.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/eqexam.def1715
-rw-r--r--texmf-dist/tex/latex/acrotex/exerquiz.sty981
-rw-r--r--texmf-dist/tex/latex/acrotex/template.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/web.sty9
16 files changed, 1288 insertions, 2837 deletions
diff --git a/texmf-dist/doc/latex/acrotex/README.md b/texmf-dist/doc/latex/acrotex/README.md
index 162d9c24..52385995 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: 2018-11-27
+Dated: 2018-12-13
AeB contains the following:
@@ -19,6 +19,12 @@ AeB contains the following:
6) Documentation for AeB (AcroTeX eDucatation Bundle) and eForms
(including insdljs and dljslib).
+What's New (2018/12/13) More changes in exerquiz to support mi-solns; misc. bug fixes.
+
+What's New (2028/12/05) Some changes in exerquiz to support mi-solns. Require aeb-comment
+(version 3.2 of comment.sty). The newer versions of comment.sty are incompatible with
+eqexam (which is supported by exerquiz) and introduces spurious spaces.
+
What's New (2018/11/27) Some changes to eforms package to support the new icon-appr
package.
diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.pdf b/texmf-dist/doc/latex/acrotex/aeb_man.pdf
index 36e63fe8..c56c66eb 100644
--- a/texmf-dist/doc/latex/acrotex/aeb_man.pdf
+++ b/texmf-dist/doc/latex/acrotex/aeb_man.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.tex b/texmf-dist/doc/latex/acrotex/aeb_man.tex
index 8798115e..219b214a 100644
--- a/texmf-dist/doc/latex/acrotex/aeb_man.tex
+++ b/texmf-dist/doc/latex/acrotex/aeb_man.tex
@@ -1,3 +1,4 @@
+%\listfiles
\RequirePackage[!use=preview,!use=usebw]{spdef}
\documentclass{article}
%\usepackage{makeidx,showidx}
@@ -232,10 +233,10 @@
\university{{\AcroT} Software Development Team}
\email{dpstory@acrotex.net}
\versionLabel{Dated:}
-\version{2018/08/16}
+\version{2018/12/13}
\copyrightyears{1999-\the\year}
\nocopyright
-\prepared{2018/08/16}
+\prepared{2018/12/13}
\revisionLabel{Distribution Dated:}
\copyrightStatus{True}
diff --git a/texmf-dist/doc/latex/acrotex/eformman.pdf b/texmf-dist/doc/latex/acrotex/eformman.pdf
index 25815958..815f539e 100644
--- a/texmf-dist/doc/latex/acrotex/eformman.pdf
+++ b/texmf-dist/doc/latex/acrotex/eformman.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/eformman.tex b/texmf-dist/doc/latex/acrotex/eformman.tex
index 61d1606a..fc076e18 100644
--- a/texmf-dist/doc/latex/acrotex/eformman.tex
+++ b/texmf-dist/doc/latex/acrotex/eformman.tex
@@ -70,7 +70,7 @@
subject={Documentation for the eforms and insdljs packages},
talksite={\url{www.acrotex.net}},
version={2.0},
- prepared={2018/11/27},
+ prepared={2018/12/05},
preparedLabel={Distribution Dated:},
keywords={LaTeX, hyperref, PDF, exercises, quizzes},
copyrightStatus=True,
diff --git a/texmf-dist/source/latex/acrotex/exerquiz.dtx b/texmf-dist/source/latex/acrotex/exerquiz.dtx
index 71fa5bb6..330a61f8 100644
--- a/texmf-dist/source/latex/acrotex/exerquiz.dtx
+++ b/texmf-dist/source/latex/acrotex/exerquiz.dtx
@@ -22,7 +22,7 @@
%<randomize>\ProvidesFile{aebrandom.def}
%<sumrytbls>\ProvidesFile{aebsumrytbls.def}
%<template>\ProvidesFile{template.def}
-%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2018/10/03 v8.2.5 %
+%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2018/12/13 v8.2.8 %
%<package> Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
%<driver> Exerquiz documentation driver file (dps)]
%<aebjs> Exerquiz document level JavaScript (dps)]
@@ -47,6 +47,14 @@
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
+\def\darg#1{\texttt{\{#1\}}}
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\def\visispace{\symbol{32}}
+\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
+\def\meta#1{\textsl{\texttt{#1}}}
+\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
\pdfstringdefDisableCommands{\let\\\textbackslash}
\OnlyDescription % comment out for implementation details
\EnableCrossrefs
@@ -55,6 +63,9 @@
\InputIfFileExists{aebdocfmt.def}{\PackageInfo{exerquiz}{Inputting aebdocfmt.def}}
{\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
\PackageInfo{exerquiz}{aebdocfmt.def cannot be found}}
+\makeatletter
+ \let\@latex@warning\@gobble
+\makeatother
\begin{document}
\let\env\texttt\let\pkg\textsf
\let\app\textsf
@@ -84,6 +95,7 @@
% {\PackageInfo{exerquiz}{aebdonotindex.def cannot be found}}
% \begin{macrocode}
% \end{macrocode}
+%\changes{v8.2.8}{2018/12/13}{The SOL file is now written entirely when there is no solution option specified}
% (v8.0 dated 2017/08/08) This version introduces multi-letter variables and what I'll term `alternate appearances'.
% This is a major addition, changes are marked by \texttt{dps17} for future reference in case something goes wrong.
% \changes{v8.0}{2017/08/08}{Introduce multi-letter variables and alternate appearances. Changes
@@ -232,9 +244,13 @@
}{}
% \end{macrocode}
% \changes{v8.1m}{2018/02/09}{\string\cs{ifdisplayworkarea} conditionally defined}
+% \changes{v8.2.8}{2018/12/13}{defined \string\cs{displayworkareaOn} and
+% \string\cs{displayworkareaOff}}
% \begin{macrocode}
\@ifundefined{ifdisplayworkarea}{\newif\ifdisplayworkarea
\displayworkareafalse}{}
+\providecommand\displayworkareaOn{\displayworkareatrue}
+\providecommand\displayworkareaOff{\displayworkareafalse}
% \end{macrocode}
% \IndexOpt{nodljs}
% An option for excluding all DLJS from the document. Useful with the
@@ -557,6 +573,9 @@
% \begin{macrocode}
\let\iterate\relax
\newif\ifeq@solutionsafter \eq@solutionsafterfalse
+\def\ifsolutionsafter{\csname ifeq@solutionsafter\endcsname}
+ \let\solutionsaftertrue\eq@solutionsaftertrue
+ \let\solutionsafterfalse\eq@solutionsafterfalse
\newif\ifeq@hidesolution \eq@hidesolutionfalse
\newif\ifeq@globalshowsolutions \eq@globalshowsolutionsfalse
\newif\ifeq@nosolutions \eq@nosolutionsfalse
@@ -568,25 +587,23 @@
%<*package|eqexam>
\newif\ifeq@noforms \eq@noformsfalse
\newif\ifeq@noquizsolutions \eq@noquizsolutionsfalse
-% changed \ifeq@nocorrections to \ifnocorrections
-%\newif\ifeq@nocorrections \eq@nocorrectionsfalse
\newif\ifnocorrections \nocorrectionsfalse
% \end{macrocode}
-% Added \string\cs{ifeqe@flextended} to support \string\pkg{eqexam}
+% Added \cs{ifeqe@flextended} to support \pkg{eqexam}
% \changes{v8.1h}{2018/01/03}{Added \string\cs{ifeqe@flextended} to support \string\pkg{eqexam}}
% \changes{v8.1o}{2018/02/12}{Added \string\cs{ifcont@nnot} to support \string\pkg{eqexam}}
% \begin{macrocode}
\@ifundefined{ifeqe@flextended}{\newif\ifeqe@flextended
\eqe@flextendedfalse}{}
\@ifundefined{ifcont@nnot}{\newif\ifcont@nnot \cont@nnotfalse}{}
-\@ifundefined{if@eqalignfilllinestoleft}{\newif\if@eqalignfilllinestoleft
- \@eqalignfilllinestoleftfalse}{}
+\@ifundefined{if@eqalignfilllinestoleft}
+ {\newif\if@eqalignfilllinestoleft\@eqalignfilllinestoleftfalse}{}
% \end{macrocode}
+% \changes{v6.3z}{2011/04/28}{Created a switch \cs{ifkeepdeclaredvspacing},
+% used primarily by \textsf{eqexam}}
% (4/28/11) A switch to control whether the declared vertical space
-% for the \texttt{solution} environment will be preserved during the \texttt{answerkey}
+% for the \texttt{solution} environment is preserved during the \texttt{answerkey}
% option. This is an \textsf{eqexam} feature.
-%\changes{v6.3z}{2011/04/28}{%
-%Created a switch \cs{ifkeepdeclaredvspacing}, used primarily by \textsf{eqexam}}
% \begin{macrocode}
\newif\ifkeepdeclaredvspacing \keepdeclaredvspacingfalse
\newif\ifeq@nolink \eq@nolinkfalse
@@ -614,8 +631,16 @@
% the vertical space in the solutions environment when the \texttt{nosolutions}
% option is in effect. Concerning leaving space to work, the default is to
% leave space to work (\cs{SpaceToWork}).
+% \changes{v8.2.8}{2018/12/13}{Set \string\cs{displayworkareafalse} in definition
+% of \string\cs{SolutionsAfter}; also, inserted \string\cs{eq@proofingfalse}}
+% \begin{macrocode}
+\def\SolutionsAfter{\solutionsAtEndfalse\eq@solutionsaftertrue
+ \displayworkareafalse\eq@proofingfalse\eq@nolinktrue}
+% \end{macrocode}
+% The \DescribeMacro\ifcqSA\cs{ifcaSA} switch is used with the \env{cq*} environment
+% to create conditional content. It is true when the \env{solution} environment
+% is in a \textsf{solutions-after} state.
% \begin{macrocode}
-\def\SolutionsAfter{\eq@solutionsaftertrue\eq@nolinktrue}
\newif\ifcqSA\cqSAfalse
% \end{macrocode}
% Modified \cs{SolutionsAtEnd} (2018/02/02) to include \cs{eq@nosolutionsfalse}
@@ -623,19 +648,21 @@
% \changes{v8.1j}{2018/02/02}{Added \string\cs{eq@nosolutionsfalse}
% and \string\cs{eq@proofingfalse} to the
% definition of \string\cs{SolutionsAtEnd}}
+% \changes{v8.2.8}{2018/12/13}{Removed \string\cs{therearesolutionstrue}
+% from \string\cs{SolutionsAtEnd}}
% \begin{macrocode}
-%\def\SolutionsAtEnd{\eq@solutionsafterfalse\eq@nolinkfalse}
-%\def\SolutionsAtEnd{\eq@solutionsafterfalse\eq@nolinkfalse
-% \eq@nosolutionsfalse\eq@proofingfalse\answerkeyfalse}
-\def\SolutionsAtEnd{\eq@solutionsafterfalse\eq@nolinkfalse
+\def\SolutionsAtEnd{\solutionsAtEndtrue\vspacewithsolnstrue
+ \eq@solutionsafterfalse\eq@nolinkfalse
% \end{macrocode}
% Now, if |\ifvspacewithsolns| is true, we set |\eq@nosolutionsfalse| so solutions appear
% at the end of the file; otherwise, we set |\eq@nosolutionstrue|.
% \changes{v8.1k}{2018/02/04}{Added a conditional within \string\cs{SolutionsAtEnd}}
% \changes{v8.1m}{2018/02/09}{Include \string\cs{displayworkareatrue} in definition
% of \string\cs{SolutionsAtEnd}}
+% \changes{v8.2.8}{2018/12/13}{Set \string\cs{displayworkareafalse} in definition
+% of \string\cs{SolutionsAtEnd}}
% \begin{macrocode}
- \displayworkareatrue\ifvspacewithsolns\eq@nosolutionsfalse\else
+ \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}
@@ -646,8 +673,7 @@
% \begin{macrocode}
\long\def\ifNoSolutions#1#2{%
\ifeq@nosolutions\expandafter#1\else
- \expandafter#2\fi
-}
+ \expandafter#2\fi}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -678,8 +704,9 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-% These\DescribeMacro{\saveRandomSeed}\DescribeMacro{\inputRandomSeed} two commands are used when the \texttt{allowrandomize} option is in effect,
-% Until then, they do nothing. See the definition in \autoref{randomize}.
+% These\DescribeMacro{\saveRandomSeed}\DescribeMacro{\inputRandomSeed} two
+% commands are used when the \texttt{allowrandomize} option is in effect, Until
+% then, they do nothing. See the definition in \autoref{randomize}.
% \begin{macrocode}
\let\saveRandomSeed\relax
\let\inputRandomSeed\relax
@@ -718,8 +745,7 @@
% level JavaScript are not inserted, they are cleared out by the \cs{clearpage}.
% So, we'll only to a \cs{clearpage} if the driver is not dvipdfm.
% \begin{macrocode}
- \if\eq@drivernum2\else\clearpage\fi
-}
+ \if\eq@drivernum2\else\clearpage\fi}
% \end{macrocode}
% \subsection{Load Configuration File: exerquiz.cfg}
% Look for configuration file, exerquiz.cfg.
@@ -758,10 +784,15 @@
% Changed order of loading, comment package first, then verbatim package; prior to the change, anomalous
% errors, which were traced to these two packages.
% \changes{v7.8k}{2017/07/25}{Changed order of loading, comment package first, then verbatim package}
-% \begin{macrocode}
-\RequirePackage{comment}
+% \changes{v8.2.7}{2018/12/05}{require \string\pkg{aeb-comment} (version 3.1 of comment)}
+% \begin{macrocode}
+\RequirePackage{aeb-comment}
+\def\eq@commentChkMsg{\@ifpackageloaded{comment}
+ {\PackageWarningNoLine{exerquiz}
+ {The comment package is incompatible with the\MessageBreak
+ aeb-comment package, do not use the comment package}}{}}
+\AtBeginDocument{\eq@commentChkMsg}
\RequirePackage{verbatim}
-%\RequirePackage{comment}
\RequirePackage{hyperref}
\RequirePackage{amssymb}% used for return symbols
\RequirePackage{eforms}[2012/06/20]
@@ -1258,36 +1289,66 @@
% \subsection{Handles, counters and such}
% Handles to write solutions to quizzes and exercises to a file.
% \begin{macrocode}
+\newcommand{\writeToExSolns@}[1]{%
+ \ifsolutionsonly\else
+ \ifOKToWriteExamData
+ \set@display@protect
+ \immediate\write\ex@solns{#1}\set@typeset@protect
+ \fi\fi}%
\ifsolutionsonly
-\InputIfFileExists{\jobname_xdefs.cut}{%
+ \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
-\newcommand{\writeToExSolns}[1]{%
- \set@display@protect
- \immediate\write\ex@solns{#1}%
- \set@typeset@protect
-}
+ \newwrite\ex@solns \immediate\openout \ex@solns \jobname.sol
+ \let\writeToExSolns\writeToExSolns@
% \end{macrocode}
% If we are not in \cs{ifsolutionsonly} mode, we write some definitions to a .def
% file to be read back in at the beginning of the document.
% \begin{macrocode}
-\newwrite\eq@xrefdefns \immediate\openout\eq@xrefdefns\jobname_xdefs.cut
+ \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]{%
- \set@display@protect
- \immediate\write\quiz@solns{#1}%
- \set@typeset@protect
-}
+\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}}
% \end{macrocode}
+% \changes{v8.2.8}{2018/12/13}{more controls for solution files}
+% Two sets of controls for the solution files. If \DescribeMacro\normalSolnWrites
+% \cs{normalSolnWrites} is expanded (the default), solutions are written to the solution files
+% as they normally do; if \DescribeMacro\noSolnWrites\cs{noSolnWrites} is in force, nothing is written
+% to the solution file, except for verbatim content from the \env{solution}
+% environments. When all else fails, when verbatim content is written to the solution files that
+% you don't want to appear, use \DescribeMacro\bHideSolnIn\cs{bHideSolnIn\darg{\ameta{wrt-cmd}}}
+% to write \cs{iffalse} then \DescribeMacro\eHideSolnIn\cs{eHideSolnIn\darg{\ameta{wrt-cmd}}}
+% to close off the conditional. Where, \ameta{wrt-cmd} is either \cs{writeToSolnFile} (or \cs{writeToExSolns}), or
+% \cs{writeToQzSolns}.
+% For example,
+%\begin{verbatim}
+% \bHideSolns\writeToSolnFile % for eqexam
+% \begin{exam}{test}
+% ...
+% \end{exam}
+% \eHideSolns\writeToSolnFile
+%\end{verbatim}
+%Now this exam has no footprint within the solution file.
+% \begin{macrocode}
+\@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}}
+% \end{macrocode}
% Counters to keep track of exercise questions.
% \begin{macrocode}
\newcounter{eqexno} \setcounter{eqexno}{0}
@@ -1300,9 +1361,9 @@
%</package|eqexam>
%<*package>
\def\theHquizno{\curr@quiz.\theeqquestionnoi.%
- \ifcase\@eqquestiondepth\or\or\arabic{eqquestionnoii}.%
- \or\arabic{eqquestionnoii}.\roman{eqquestionnoiii}.%
- \else\fi\alph{quizno}}
+ \ifcase\@eqquestiondepth\or\or\arabic{eqquestionnoii}.%
+ \or\arabic{eqquestionnoii}.\roman{eqquestionnoiii}.%
+ \else\fi\alph{quizno}}
% \end{macrocode}
% (2016/05/17) \cs{eqemargin} is used in \textsf{eqexam}, but some calculations use it for the list version of
% answers. We declare this length to be 0pt. The \textsf{eqexam} resets this value.
@@ -1704,15 +1765,18 @@
\def\eqCQDeclarations{\cqqsfalse\eq@turnMessageOff
\includecomment{sPage}\excludecomment{qPage}%
\eq@turnMessageOn}
-\def\eqTopOfSolnPage{\cqSAfalse
+\def\eqTopOfSolnPage{\withinsoldoctrue\cqSAfalse
\eqCQDeclarations}
+\def\eqTopOfQslPage{\withinqsldoctrue}
\eq@turnMessageOff
\includecomment{qPage}\excludecomment{sPage}
\eq@turnMessageOn
%</package|eqexam>
%<*package>
-\def\writecqQSfalse{\writeToExSolns{\protect\eqTopOfSolnPage}}
-\AtBeginDocument{\writecqQSfalse}
+\def\writecqQSfalse{%
+ \writeT@ExSolns{\protect\eqTopOfSolnPage}}
+\def\writeTopOfQslPage{\writeT@QzSolns{\protect\eqTopOfQslPage}}
+\AtBeginDocument{\writecqQSfalse\writeTopOfQslPage}
%</package>
%<*package|eqexam>
\newenvironment{cq@CQ}
@@ -1803,24 +1867,28 @@
% \end{macrocode}
% Inform the system that the definition of \cs{eqterminex} is changing. This to prevent
% writing the same line multiple times.
+% \changes{v8.2.8}{2018/12/13}{write \cs{declareterminex} only if not solutionsafter}
% \begin{macrocode}
\global\terminexchangedtrue % dps cq
- \writeToExSolns{\protect
- \decleqterminex{\protect\cqFmtPasteQues{\cq@CutName}}}\fi}
+ \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
% \end{macrocode}
% Here we restore \cs{eqterminex} to its default value, we set the stitch to false.
% \begin{macrocode}
\global\terminexchangedfalse % dps cq
- \ifeq@hidesolution\else\writeToExSolns{\protect
+ \ifeq@hidesolution\else\writeT@ExSolns{\protect
\declCopyQues{\protect\input{\cq@CutName}}}\fi}
% \end{macrocode}
% \cs{restoreNormalSolns}\DescribeMacro{\restoreNormalSolns} restores \cs{eqterminex} to its
% default definition. It is place between exercises.
+% \changes{v8.2.8}{2018/12/13}{write \cs{declareterminex} only if not solutionsafter}
% \begin{macrocode}
-\newcommand\restoreNormalSolns{%
- \writeToExSolns{\protect\decleqterminex{\protect\eqterminexDEF}}}
+\newcommand\restoreNormalSolns{\ifeq@solutionsafter\else
+ \writeT@ExSolns{\protect\decleqterminex{\protect
+ \eqterminexDEF}\eq@commentchar}\fi}
% \end{macrocode}
% \begin{environment}{exercise}
% With some of the preliminaries out of the way, we begin the exercise `environment'.
@@ -1967,7 +2035,6 @@
% \changes{v6.7a}{2013/05/03}{Change name of \cs{eq@writeexheader} to \cs{eqExerSolnHeader}}
% \begin{macrocode}
\let\eqExerSolnHeader\@empty
-%\let\eq@writeexheader\@empty
% \end{macrocode}
% The \cs{solutionparshape} is a command that supports the \cs{leadinitem} command
% of \texttt{eqexam}. Its normal value is \cs{@empty}.
@@ -1985,9 +2052,8 @@
\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
-}
+ \edef\eq@pslnaindnt{#1}\edef\eq@setPrbSolnAftrIndnt{\expandafter
+ \noexpand\expandafter\parindent#1\noexpand\relax}\fi}
% \end{macrocode}
%\changes{v7.2}{2015/03/22}{added \cs{restorejustify}}
%The command \DescribeMacro\restorejustify\cmd{\restorejustify} is designed
@@ -2054,8 +2120,7 @@
\ifeq@exerciseheading
\prior@questionsHook\marginparpriorhook\noindent\eqexheader@wrapper
\afterlabelhskip\marginparafterhook\gEx@CommonCmd
- \eq@setPrbSolnAftrIndnt\ignorespaces\fi
-}
+ \eq@setPrbSolnAftrIndnt\ignorespaces\fi}
% \end{macrocode}
% \end{environment}
% \changes{v6.4z}{2012/11/28}{Extracted code to make it available elsewhere.}
@@ -2086,32 +2151,34 @@
\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{\set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnHeaderSngl}%
- \set@typeset@protect
-}
+ \exersolnheadhook\protect\eqterminex}
+\def\eq@@writeexheader{\ifeq@hidesolution\else\ifOKToWriteExamData
+ \set@display@protect
+ \immediate\write\verbatim@out{\eqExerSolnHeaderSngl}%
+ \set@typeset@protect\fi\fi}
% \end{macrocode}
%\changes{v6.7}{2013/04/07}{Inserted another argument into \cs{eqEXt}}
% Added another argument into \cs{eqEXt}, used for filtering.
% \begin{macrocode}
\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{\set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnHeaderList}%
- \set@typeset@protect
-}
+ \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}
% \end{macrocode}
% \subsection{Define \texttt{solution} Environment for \texttt{exercise}}
% \begin{macro}{solution}
@@ -2186,8 +2253,7 @@
% \def\eq@next{\solnexer@@@woparts}\fi
%\end{verbatim}
% \begin{macrocode}
- \eq@next
-}
+ \eq@next}
\let\eqPriorVspace\@gobble
\newif\if@eqlinedfiller \@eqlinedfillerfalse
\newcommand{\vspaceFiller}[1]{\vfill}
@@ -2198,8 +2264,7 @@
\@tempcnta=0
\@whilenum\@tempcnta<\soln@keys@nLines\relax\do
{\vskip0pt\penalty-50\vglue\wlVspace\eqWriteLine
- \advance\@tempcnta1\relax}\par\endgroup
-}
+ \advance\@tempcnta1\relax}\par\endgroup}
\let\leavevspace\relax % dpsj5
\newcommand{\vspaceFmt}[1]{%
\ifx\solutionparshape\@empty\else
@@ -2226,9 +2291,8 @@
{\vspaceFiller{#1}}}%
\fi\eq@lines@next}%
\fi
- }\expandafter\leavevspace % dpsj6
- \fi
-}
+ }\expandafter\leavevspace
+ \fi}
% \end{macrocode}
% \changes{v6.8g}{2014/04/08}{Added key-val here for \textsf{eqexam}.}
% New option for the \texttt{solution} environment, \IndexKey{nLines}\texttt{nLines}.
@@ -2369,7 +2433,6 @@
% starts in vertical mode or not.
% \begin{macrocode}
\reset@doendpe{\parshape \@ne 0pt \linewidth}%
-% \expandafter\def\expandafter\@par\expandafter{\@par\everyparShape}%
\parshape \@ne 0pt \linewidth
\everyparShape
}
@@ -2382,13 +2445,13 @@
\let\eqSolnExCmds\relax\else
\def\eqSolnExCmds{#1}\fi}
\let\eqSolnExCmds\relax
-\def\eq@b@ddCodeSpecialDef#1{#1}% dpsj4
-\let\eq@b@ddCodeSpecial\eq@b@ddCodeSpecialDef % dpsj4
+\def\eq@b@ddCodeSpecialDef#1{#1}%
+\let\eq@b@ddCodeSpecial\eq@b@ddCodeSpecialDef
\def\solnexer@@@woparts{\ifeq@solutionsafter\else
- \expandafter\begingroup\fi %dpsj10
+ \expandafter\begingroup\fi
\global\thereissolutiontrue
- \global\let\procsoln\relax % dpsj6
- \global\let\endprocsoln\relax % dpsj6
+ \global\let\procsoln\relax
+ \global\let\endprocsoln\relax
\def\exerwparts@cols{0}%
\let\verbatim@out\ex@solns
\if\currhideopt\eq@Hid
@@ -2406,7 +2469,6 @@
\let\procsoln\eqSavedComment
\let\endprocsoln\eqSavedEndCommet
\else
-% \ifx\bLeaveVspace\@empty\leavevspace\fi % dpsj5
\ifeq@solutionsafter\else
\ifx\eq@@CommonCmd\@empty\else
\set@display@protect
@@ -2419,7 +2481,7 @@
\fi
\def\eq@next{%
\ifeq@solutionsafter
- \let\procsoln\relax % dpsj6
+ \let\procsoln\relax
\let\endprocsoln\relax
\removelastskip\removelastparskip
\cqSAtrue\eqCQDeclarations
@@ -2437,12 +2499,12 @@
% of the solution with \cs{eqe@setStartSolns}.
% \begin{macrocode}
\solutionsafterSkip
- \@@solnafterSkipOnce % dpsj3
+ \@@solnafterSkipOnce
\eqe@setStartSolns
\fi
\else\par\kern0pt
\solutionsafterSkip
- \@@solnafterSkipOnce % dpsj3
+ \@@solnafterSkipOnce
\noindent\strut\eqe@setStartSolns
\fi
\parskip\eqeques@parsep
@@ -2462,7 +2524,7 @@
% \end{macrocode}
% The solution after label, followed by a space.
% \begin{macrocode}
-% \eqSolnExCmds % dpsj8
+% \eqSolnExCmds
\exsolafter\space\ignorespaces
% \end{macrocode}
% We set the shape of the solutionafter.
@@ -2474,7 +2536,10 @@
% Write the solution header 11/03/05
% \begin{macrocode}
\eqExerSolnHeader
- \global\let\eqExerSolnHeader\@empty
+% \end{macrocode}
+% Write \cs{eqExerSolnHeader} after all.
+% \changes{v8.2.8}{2018/12/13}{write \string\cs{eqExerSolnHeader} after all}
+% \begin{macrocode}
\global\therearesolutionstrue\expandafter\procsoln
\fi
}%
@@ -2502,9 +2567,14 @@
%</package>
% \end{macrocode}
% \begin{macro}{\eqExerSolnTrailer}
-% The material that follows the solution in the .sol file.
+% The material that follows the solution in the SOL file.
% \begin{macrocode}
%<*package|eqexam>
+% \end{macrocode}
+% \changes{v8.2.6}{2018/12/03}{defined \string\cs{eq@commentchar}}
+% \begin{macrocode}
+\bgroup\catcode`\%=12\relax
+\gdef\eq@commentchar{%}\egroup
\newcommand\eqExerSolnTrailer{%
%</package|eqexam>
%<*package>
@@ -2513,13 +2583,19 @@
\else\protect\ReturnTo{qex.\the@exno}\fi
{\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else
\exrtnlabelformat\fi}}%
- \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi^^J%
+ \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi
+% \end{macrocode}
+% Tack on comment character at the end of the line.
+% \changes{v8.2.6}{2018/12/03}{defined \string\cs{eq@commentchar}}
+% \begin{macrocode}
+ \eq@commentchar^^J% %dpsd03
%</package>
%<*eqexam>
\protect\ReturnTo{page.\the\c@page}%
{\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else
\exrtnlabelformat\fi}}%
- \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi^^J%
+ \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi
+ \eq@commentchar^^J%
%</eqexam>
%<*package|eqexam>
% \end{macrocode}
@@ -2542,32 +2618,34 @@
% \changes{v8.1i}{2018/01/20}{Added \string\cs{kdvsp@Restore} to support
% the \texttt{flextended} option from \string\textsf{eqexam}}
% \begin{macrocode}
-\let\kdvsp@Restore\relax % dpsj20
+\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 % djsj8 moved from the end of the macro
+ \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 % dpsj5
+ \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
-% \csname endprocsoln\endcsname
+ \ifkeepdeclaredvspacing\vskip\sameVspace\fi
\else
% \end{macrocode}
% If solutions after, we start a new paragraph, then add some kerning glue,
% this gives a better gauge for calculating the \cs{pagetotal}.
% \begin{macrocode}
\ifeq@solutionsafter
- \ifx\isitleadin\eq@YES\parshape=0 \fi % dpsj9
+ \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 % dpsj6
-% \ifx\istabularexer\eq@YES\kern0pt\else\par\fi
-% \ifnum\exerwparts@cols>0\relax\kern0pt\else\par\fi
+ \ifx\istabularexer\eq@YES\unskip\kern0pt\else\par\fi
% \end{macrocode}
% if \cs{ifkeepdeclaredvspacing} is true, we attempt
% to preserve the vertical space declared by the \textsf{solution} environment when
@@ -2609,8 +2687,8 @@
% \begin{macrocode}
\ifdim\@tempdimb>0pt\vglue\@tempdimb\kern0pt
\let\eqe@showEndHere\@gobble
- \edef\tmp@exp{\noexpand\marginpar{%
- \noexpand\smash{e: adj \the\@tempdimb}}}%
+ \edef\tmp@exp{\noexpand\marginpar{\noexpand
+ \smash{e: adj \the\@tempdimb}}}%
\eqe@debugVertSkip{\tmp@exp}%
\fi
\fi
@@ -2618,21 +2696,18 @@
\eqe@showEndHere{\eqe@debugVertSkip{\marginpar{\smash{e}}}}%
\fi
\else
-% \endprocsoln
\eq@ckglobalhide
\ifeq@hidesolution\else
\endsolnexerhookaux
% \end{macrocode}
% Here's were we write the trailer for the solution
+% \changes{v8.2.6}{2018/12/03}{if \string\cs{@targetforextrfalse}, set \string\cs{@targetforextrfalse}}
% \begin{macrocode}
- \let\verbatim@out\ex@solns
- \set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnTrailer}%
- \set@typeset@protect
+ \writeT@ExSolns{\eqExerSolnTrailer}%
\fi
\fi
\fi
- \kdvsp@Restore % dpsj20
+ \kdvsp@Restore
\endsolnexerhook\penalty0\relax}
% \end{macrocode}
% \end{macro}
@@ -2640,7 +2715,7 @@
% Exercises with parts are enclosed within a \texttt{parts} environment. There are two types
% of parts listing: list-type and tabular-type.
% \begin{environment}{exercise*}
-% For the exercise* environment, we set a flag to indicate that the \cs{exerstar}
+% For the \texttt{exercise*} environment, we set a flag to indicate that the \cs{exerstar}
% has been set in the star environment, the begin the \cs{exercise} and finished with
% \cs{endexercise}.
%\changes{v6.07}{2007/05/05}
@@ -2713,7 +2788,6 @@
% When there is a \cs{tableadin}, we remove \cs{removelastparskip} because it does not occur above.
% \begin{macrocode}
\if@tableadinitem\else\removelastparskip\fi
-% \keepdeclaredvspacingfalse
\let\endparts\endexercise@parts@tabular\exercise@parts@tabular@}%
{\let\endparts\endexercise@parts@list\exercise@parts@list}}
% \end{macrocode}
@@ -2785,16 +2859,14 @@
{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.}%
-}
+ {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.}%
-}
+ {Use \string\leadinitem\space in the problem* environment.}}
% \end{macrocode}
% (2014/03/23) Problems when description env is used with parts env. The
% hook \cs{exlisttabheaderafterhook} is interfering with the optional argument.
@@ -2814,6 +2886,11 @@
\newenvironment{exercise@parts@list}{%
\settowidth{\eq@tmplength}{\parts@indent}%
\edef\widthOfParts{\the\eq@tmplength}%
+% \end{macrocode}
+% Write to SOL file, unless solutions-after.
+% \changes{v8.2.8}{2018/12/13}{Write to SOL file, unless solutions-after}
+% \begin{macrocode}
+ \global\let\eqExerSolnHeader\eq@@writeexheaderlist
\eq@initializeContAnnot\eq@nolinkfalse\prior@parts@hook
\abovepartshook\list{\normalfont
\if\Hidesymbol h\eq@nolinkfalse\ifeq@solutionsafter
@@ -2847,26 +2924,20 @@
% \cs{leadinitem}, so we increment \texttt{partno}.
% \begin{macrocode}
\if\isitleadin\eq@YES
- \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
- \xdef\prtsIndntSep{\the\eq@tmplength}%
-% \advance\linewidth-\prtsIndntSep\relax
- \if\itsforleadinitem\eqe@YES\setcounter{partno}{\fliPartNo}\else
- \setcounter{partno}{1}\fi\fi
+ \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}{3pt}%
\setlength{\topsep}{\eqparts@topsep}%
-% \ifdim\parskip>\z@
-% \addtolength{\topsep}{-\parskip}\fi
\setlength{\parskip}{0pt}%
\setlength{\partopsep}{0pt plus 1pt minus 1pt}%
\ifdim\eqeques@parsep=0pt
\setlength{\parsep}{\eqparts@parsep}%
-% \setlength{\itemsep}{\eqparts@itemsep-\eqparts@parsep}%
\else
\setlength{\parsep}{\eqeques@parsep}%
-% \setlength{\itemsep}{\eqparts@itemsep-\eqeques@parsep}%
\fi
\setlength{\itemsep}{\eqparts@itemsep-\parsep}%
\setlength{\itemindent}{0pt}%
@@ -2876,7 +2947,6 @@
% This is done for \textsf{eqexam}, what effect does it have on a straight
% \textsf{exerquiz} file?
% \begin{macrocode}
-% \setlength{\itemsep}{\eqparts@itemsep-\eqparts@parsep}%
\settowidth{\labelsep}{\normalfont\eqe@prtsepPrb}%
\addtolength{\labelsep}{\eq@extralabelsep}%
\settowidth{\labelwidth}{\parts@indent}%
@@ -2888,7 +2958,6 @@
% redefined. We try to correct this.
% \begin{macrocode}
\let\eq@item@latex\item
-% \def\eq@item{\eq@item@latex\exlisttabheaderafterhook}%
% \end{macrocode}
% We handle the problem of seeing the optional argument by getting the argument,
% if there is one, and switching commands around.
@@ -2911,18 +2980,17 @@
\def\eq@initializeContAnnot{\@ifundefined{eqequestions}
{\global\let\eqeCurrProb\relax}
{\xdef\eqeCurrProb{\theeqquestionnoi}}%
- \xdef\eq@currProbStartPage{\arabic{page}}%
-}
+ \xdef\eq@currProbStartPage{\arabic{page}}}
% \end{macrocode}
% \subsubsection{Tabular-type Parts Question}
% Now for the tabular style of multi-part exercise, the argument
% \#1 is the number of columns requested.\medskip
%
-% (2017/02/09) Added xkeyvals to optional argument of \texttt{parts}. Syntax is now
+% \noindent(2017/02/09) Added \pkg{xkeyval} to optional argument of \texttt{parts}. Syntax is now
%\begin{verbatim}
% \begin{parts}[<num>|nCols=<num>,minVspace=<length>]
%\end{verbatim}
-% \changes{v7.8e}{2017/02/09}{Added xkeyvals to optional argument of \string\texttt{parts}}
+% \changes{v7.8e}{2017/02/09}{Added xkeyval to optional argument of \string\texttt{parts}}
% \begin{macrocode}
\define@key{tabp@rts}{nCols}{\def\exerwparts@cols{#1}}
\define@key{tabp@rts}{minVspace}{\def\minVspacet@bs{#1}}
@@ -3016,8 +3084,7 @@
\fi
\fi
\eq@next
- \global\advance\eq@extabColCnt1\relax
-}
+ \global\advance\eq@extabColCnt1\relax}
% \end{macrocode}
% Set up the tabular environment, after making a lot of decisions.
% \begin{macrocode}
@@ -3030,10 +3097,12 @@
\edef\eqparts@tabrowsep{\the\@tempdima}}
\partstabrowsep{0pt}
\newenvironment{exercise@parts@tabular}{%
-% \ifx\eq@tabMarkChk\@gobble
-% \partstabrowsep{\@rowskip}\fi % detecting autotab off or on
\setcounter{partno}{0}%
% \end{macrocode}
+% \changes{v8.2.8}{2018/12/13}{Write to SOL file, unless solutions-after}
+% \begin{macrocode}
+ \global\let\eqExerSolnHeader\eq@@writeexheaderlist
+% \end{macrocode}
% (2015/01/10) If \cs{solutionparshape} is nonempty, the user has used
% \cs{leadinitem}, so we increment \texttt{partno}.
% \begin{macrocode}
@@ -3072,27 +3141,19 @@
%\end{verbatim}
% \begin{macrocode}
\eq@tmpdima=\linewidth
-% \ifx\isitleadin\eq@NO
\advance\eq@tmpdima-\prtsIndntSep\relax
-% \fi
\@tempcnta\exerwparts@cols\relax
\advance\@tempcnta-1\relax
\multiply\@tempcnta2\relax
\@tempdima\prtsIndntSep\relax
\divide\@tempdima 2\relax
\edef\halfWidth{\the\@tempdima}%
-% \ifx\isitleadin\eq@YES\@tempdima0pt\fi
\advance\@tempdima\eq@partstabcolsep\relax
-% \@tempdima\eq@partstabcolsep\relax
\tabcolsep\@tempdima
\multiply\@tempdima\@tempcnta
\advance\eq@tmpdima-\@tempdima
\divide\eq@tmpdima by\exerwparts@cols\relax %dpsj3
-% \ifx\isitleadin\eq@NO
-% \advance\eq@tmpdima\prtsIndntSep\relax % dpsj3
\edef\widthOfPartsBox{\the\eq@tmpdima}% dpsj2
-% \advance\eq@tmpdima\halfWidth\relax
-% \else\advance\eq@tmpdima\halfWidth\relax\fi
% \end{macrocode}
% If there is a \cs{tableadin}, we do not perform a \cs{vskip}.
% \begin{macrocode}
@@ -3105,7 +3166,6 @@
% \changes{v7.4}{2015/03/23}{inserted \cmd\setTabulrSolnEnv}%
% \begin{macrocode}
\tablrIndent\tabular[t]{@{}*{\exerwparts@cols}{>{\setTabulrSolnEnv
-% \ifanswerkey\eqSolnExCmds\fi %dpsj2
\parskip\eqeques@parsep\relax
\parindent0pt\relax\strut}p{\eq@tmpdima}}@{\hidewidth}}%
}{\endtabular\kern0pt
@@ -3114,11 +3174,7 @@
\post@parts@hook\belowpartshook
% \end{macrocode}
% \changes{v7.4}{2015/03/23}{added an adjustment to the command \cs{endexercise@parts@tabular}}
-% A vertical space adjustment
-% \begin{macrocode}
-% \ifeq@solutionsafter\adjDisplayBelow
-% \ifthereissolution\else\vskip\baselineskip\fi\fi
-% \end{macrocode}
+% A vertical space adjustment\par\medskip\noindent
% (201/05/09) There is a problem of communicating the totals through
% the \cs{mark} command (use in \textsf{eqexam}). In \textsf{eqexam}
% the command \cs{eqe@innermarkpts} is defined. Once the group is closed
@@ -3139,8 +3195,8 @@
% As of 2013/03/25, I am allowing solutions after for tabular parts. I'm commenting
% out the following line.\\
% |%\eq@solutionsafterfalse % no solutionsafter are allowed|
+% \changes{v8.2.8}{2018/12/13}{write \string\cs{eqExerSolnHeader} after all}
% \begin{macrocode}
- \global\let\eqExerSolnHeader\@empty
\ifeq@solutionsafter
\eq@nolinktrue % no link to solution
\else\ifeq@nosolutions
@@ -3160,7 +3216,6 @@
\eq@tmpdima=\wd\eq@tmpbox
\addtolength\eq@tmplength{\eq@extralabelsep}%
\xdef\partshangamount{\the\eq@tmplength}%
-% \advance\linewidth-\eq@tmplength %dpsj3
\parshape \@ne 0pt \linewidth
\everypar{\parshape \@ne 0pt \linewidth}%
\eq@setPrbSolnAftrIndnt
@@ -3169,26 +3224,24 @@
% \begin{macrocode}
\makebox[0pt][r]{\eqexlisttabheader\eqe@prtsepPrb}%
\ex@listtabheader@fterhook
- \exlisttabheaderafterhook\ignorespaces
-}
+ \exlisttabheaderafterhook\ignorespaces}
% \end{macrocode}
% \begin{macrocode}
\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\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}
% \end{macrocode}
% End of the \texttt{parts} environment.
% \end{environment}
@@ -3196,21 +3249,23 @@
% equal to \cs{eq@xtabularcr}.
% \begin{macrocode}
\def\tabControlOn{\@ifundefined{@xtabularcr}
- {\let\save@@xtabularcr\@xarraycr}
- {\let\save@@xtabularcr\@xtabularcr}}
+ {\let\save@@xtabularcr\@xarraycr}
+ {\let\save@@xtabularcr\@xtabularcr}}
% \end{macrocode}
%\changes{v7.0}{2014/11/05}{Added \cs{tabControlOn} and \cs{tabControlOff}.
% Tab control is interfering with regular tabular environments, or anywhere
% \texttt{d} is used.}
% \begin{macrocode}
\def\tabControlOff{\@ifundefined{@xtabularcr}
- {\let\@xarraycr\save@@xtabularcr}
- {\let\@xtabularcr\save@@xtabularcr}}
+ {\let\@xarraycr\save@@xtabularcr}
+ {\let\@xtabularcr\save@@xtabularcr}}
\AtBeginDocument{\tabControlOn}
\def\eq@xtabularcr{\@ifnextchar[{\save@@xtabularcr}
- {\eqe@tab@parts@rowsep}}%
+ {\eqe@tab@parts@rowsep}}%
\def\eqe@tab@parts@rowsep{\save@@xtabularcr
- \noalign{\expandafter\kern\eqparts@tabrowsep}}%
+ \noalign{\expandafter\kern\eqparts@tabrowsep}}%
+\let\eqgrii\relax
+\let\eqgriii\relax
%</package|eqexam>
%<*package>
% \end{macrocode}
@@ -3244,6 +3299,8 @@
% to \cs{setkeys}; therefore you can pass a command of key-value options through
% the optional argument:
% |\def\myOpts{topsep=0pt}|, |\begin{exEnumerate}[\myOpts]|.
+% \changes{v8.2.6}{2018/12/03}{Inserted \string\cs{eqprior} prior to exEnumerate env}
+% The \cs{eqprior} command normally does nothing unless it is redefined.
% \begin{macrocode}
\newenvironment{exEnumerate}[1][]{\everypar{}%
\toks@=\expandafter{#1}%
@@ -3264,8 +3321,8 @@
% \begin{macrocode}
\def\setENum{\Elabel\if\exerstar*\thequestionno(\thepartno)\else
\thequestionno\fi}%
- \ifExSolutionsSet\else
- \writeToExSolns{^^J\protect\begin{exEnumerate}^^J}\fi
+ \ifExSolutionsSet\else\writeT@ExSolns{^^J\string\eqgrii
+ \protect\begin{exEnumerate}\eq@commentchar^^J}\fi
\list{}{%
\ifx\exE@labelwidth\@empty
\settowidth{\labelwidth}{\exE@labelwidthTo}\else
@@ -3277,11 +3334,11 @@
\setlength{\itemindent}{0pt}%
\setlength{\listparindent}{0pt}%
\setlength{\itemindent}{0pt}%
-% \setlength{\labelsep}{0pt}%
\settowidth{\labelsep}{\normalfont\ }%
\setlength{\leftmargin}{\labelwidth}%
}\item\relax}{\ifExSolutionsSet\else
- \writeToExSolns{\protect\end{exEnumerate}^^J}\fi
+ \writeT@ExSolns{\string\eqgrii
+ \protect\end{exEnumerate}\eq@commentchar^^J}\fi
\endlist}
% \end{macrocode}
% \end{environment}
@@ -3318,19 +3375,16 @@
% elsewhere, \cmd{\include@solutions} is called, then put is to
% \cmd{\relax}.
% \begin{macrocode}
-%\def\includeexersolutions{%
\def\includeexersolutions{\@ifstar
- {\let\resetEXsolns\relax\includeexersolutionsi}
- {\def\resetEXsolns{\global\let\include@solutions\relax}%
- \includeexersolutionsi}%
-}
+ {\let\resetEXsolns\relax\includeexersolutionsi}
+ {\def\resetEXsolns{\global\let\include@solutions\relax}%
+ \includeexersolutionsi}}
\newcommand{\includeexersolutionsi}[1][]{%
- \filterFor{#1}\includeexersolutionsii
-}
+ \filterFor{#1}\includeexersolutionsii}
\def\includeexersolutionsii{%
%</package|eqexam>
%<*package>
- \if\exerSolns@ExtFile\eq@NO
+ \if\exerSolns@ExtFile\eq@NO
%</package>
%<*package|eqexam>
% \end{macrocode}
@@ -3339,12 +3393,12 @@
% solutions, unless it has been redefined to \cmd{\relax} by
% \cmd{\includesolutions}.
% \begin{macrocode}
- \include@solutions
- \resetEXsolns
- \let\eqFilterArg\@empty
+ \include@solutions
+ \resetEXsolns
+ \let\eqFilterArg\@empty
%</package|eqexam>
%<*package>
- \fi
+ \fi
%</package>
%<*package|eqexam>
}
@@ -3356,12 +3410,21 @@
% solutions to exercises. The demo document is \texttt{filter\_exercises.tex},
% but basically, we can include the solutions several times, once for each set filtered set.
% \begin{macrocode}
-\long\def\gobbleToEndEXt#1\endeqEXt{%
- \ifeqforpaper\expandafter\@gobbletwo\fi}
+\long\def\gobbleToEndEXt#1\endeqEXt{\ifeqforpaper
+ \expandafter\@gobbletwo\fi}
% \end{macrocode}
% \DescribeMacro\filterFor is used to mark a exercise with a name
% \begin{macrocode}
+\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}
% \end{macrocode}
@@ -3375,13 +3438,13 @@
% of exercises by a name, for example, \verb!\filterFor{Problems}!. Now, at the end of the document, we can
% say
%\begin{verbatim}
-%\useEXtFilter
-%\renewcommand\exsectitle{Solutions to Exercises}
-%\includeexersolutions*[Exercises]
-%\renewcommand\exsectitle{Solutions to Examples}
-%\includeexersolutions*[Examples]
-%\renewcommand\exsectitle{Solutions to Problems}
-%\includeexersolutions[Problems]
+% \useEXtFilter
+% \renewcommand\exsectitle{Solutions to Exercises}
+% \includeexersolutions*[Exercises]
+% \renewcommand\exsectitle{Solutions to Examples}
+% \includeexersolutions*[Examples]
+% \renewcommand\exsectitle{Solutions to Problems}
+% \includeexersolutions[Problems]
%\end{verbatim}
% \DescribeMacro{\eqsolutionshook}\DescribeMacro{\priorexsectitle}
% \DescribeMacro{\priorexslinput} These are commands that can be
@@ -3412,34 +3475,31 @@
{\let\eq@defaultlheader\relax}
% \end{macrocode}
% \DescribeMacro{\exerSolnInput} is the macro that formats the opening page
-% of the solutions page and inputs \cmd{\jobname.sol}.
+% of the solutions page and inputs \cmd{\jobname.sol}. Defined \DescribeMacro\eqExSolFileName
+% \cs{eqExSolFileName} in support of the \texttt{solutionsonly} option and the \pkg{ci-solns} package.
+% \changes{v8.2.8}{2018/12/13}{Defined \string\cs{eqExSolFileName}}
% \begin{macrocode}
\newif\ifExSolutionsSet \ExSolutionsSetfalse
+\def\eqExSolFileName{\jobname.sol}
\newcommand{\exerSolnInput}
{%
- \@ifundefined{eqe@IWO}{}{\ifsolutionsAtEnd%\ifvspacewithsolns
- \eqe@IWO\@auxout{\string\expandafter\string\gdef
- \string\csname\space eqExamQuesLastPage\string\endcsname
- {\arabic{page}}}\fi}
- \let\webnewpage\relax
- \ifsolutionsonly\else\immediate\closeout\ex@solns\fi
- \ifeq@nosolutions\else
-% \end{macrocode}
-%\changes{v6.3w}{2011/03/15}{%
-% Moved \cs{eqsolutionshook} from below to a higher position
-% in the macro \cs{exerSolnInput} so the running header for
-% the solution page appears on the first page of the solutions.
-%}%
-% Moved the following line to two location below.
-% \begin{macrocode}
-% \eqsolutionshook % moved 2012/02/24
-% \end{macrocode}
-% \changes{v6.4p}{2012/02/24}{Moved location of \cs{eqsolutionshook} again}%
-% \begin{macrocode}
- \iftherearesolutions
- \ifsolutionsonly\eq@solutionshook
- \eqsolutionshook
- \else
+ \@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
+% \end{macrocode}
+% \changes{v8.2.6}{2018/12/03}{place \string\cs{endinput} at end of sol file}
+% place \cs{endinput} at end of sol file
+% \begin{macrocode}
+ \bgroup\OKToWriteExamDatatrue
+ \writeT@ExSolns{\string\endinput}\egroup
+ \immediate\closeout\ex@solns\fi
+ \ifeq@nosolutions\else
+ \iftherearesolutions
+ \ifsolutionsonly\eq@solutionshook
+ \eqsolutionshook
+ \else
% \end{macrocode}
% If there are solutions and this is not the \texttt{solutionsonly} option,
% we start a new page, clear the right mark and start a normal header.
@@ -3448,42 +3508,41 @@
% Inserted |\markright{}| and \cs{eq@normalheader} to fix a problem with
% disappearing running headers.
% \begin{macrocode}
- \newpage\eq@solutionshook
- \eqsolutionshook\markright{}\eq@normallheader
- \fi
+ \newpage\eq@solutionshook
+ \eqsolutionshook\markright{}\eq@normallheader
+ \fi
% \end{macrocode}
% We are still under the assumption that there are solutions to be input.
% We set the mark of \cs{exsectitle}.
% \begin{macrocode}
- \markright{\exsectitle}%
- \ifx\webnewpage\relax
+ \markright{\exsectitle}%
+ \ifx\webnewpage\relax
% \end{macrocode}
% \cs{webnewpage} is a mechanism to initially do nothing, then
% to be redefined to \cs{newpage}. It is used in \cs{exerSolnHeader}.
% The reasons for this definition are lost in time.
% \begin{macrocode}
- \def\webnewpage{\global\let\webnewpage\newpage}%
- \fi
+ \def\webnewpage{\global\let\webnewpage\newpage}\fi
% \end{macrocode}
% We have a prior command, followed by the section title
% \cs{exerSolnsHeadnToc}, followed by a post command. The prior and
% post commands may be defined as the document author wishes.
% Both of these are used in the \textsf{APB} pacakge.
% \begin{macrocode}
- \priorexsectitle\exerSolnsHeadnToc\priorexslinput
+ \priorexsectitle\exerSolnsHeadnToc\priorexslinput
% \end{macrocode}
% Finally, we input the solutions file, \cs{jobname.sol}, if one exists.
% \begin{macrocode}
- \InputIfFileExists{\jobname.sol}
- {\global\ExSolutionsSettrue}{\PackageWarning{exerquiz}
- {!!! Solutions to exercises not found}}%
- \global\ExSolutionsSetfalse
+ \InputIfFileExists{\eqExSolFileName}
+ {\global\ExSolutionsSettrue}{\PackageWarning{exerquiz}
+ {!!! Solutions to exercises not found}}%
+ \global\ExSolutionsSetfalse
% \end{macrocode}
% Convert back to \cs{eq@defaultlheader} cleanly by first executing \cs{newpage}
% \begin{macrocode}
- \newpage\eq@defaultlheader
- \fi
+ \newpage\eq@defaultlheader
\fi
+ \fi
}
% \end{macrocode}
% The \cs{include@solutions} is a wrapper command for \cs{exerSolnInput}
@@ -3587,8 +3646,7 @@
\def\eqex@next{\subpdfbookmark{\exbookmarkfmt#1}%
{qex.\the@exno}}%
\fi
- \eqex@next\ignorespaces
-}
+ \eqex@next\ignorespaces}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3623,10 +3681,6 @@
% \begin{macrocode}
\newcommand{\proofingsymbolColor}[1]{\def\@proofingsymbolColor{#1}}
\proofingsymbolColor{red}
-%\newcommand{\proofingsymbol}[1]{%
-% \def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{#1}}}
-%\proofingsymbol{$\bullet$}
-%\proofingsymbol{\ding{52}}
\let\@proofsymbolredefined=0
\newcommand{\proofingsymbol}[1]{\let\@proofsymbolredefined=1%
\def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{#1}}}
@@ -3634,8 +3688,7 @@
\def\setproofingsymbol{%
\if\@proofsymbolredefined1\else
\@ifpackageloaded{pifont}{\proofingsymbol{\ding{52}}}
- {\proofingsymbol{$\bullet$}}\fi
-}
+ {\proofingsymbol{$\bullet$}}\fi}
\AtBeginDocument{\setproofingsymbol}
% \end{macrocode}
% \end{macro}
@@ -3749,8 +3802,7 @@
\setlength{\itemsep}{\propQ@itemsep}%
\setlength{\itemindent}{0pt}%
\setlength{\leftmargin}{\labelwidth}%
- }%
-% \setlength{\labelsep}{\propQ@labelsep}}%
+ }%
}{\endlist}
% \end{macrocode}
% \begin{macro}{\pushquestions}
@@ -3761,11 +3813,11 @@
% to return to questioning where you left off.
% \begin{macrocode}
\def\pushquestions{\expandafter\xdef\csname save\@quesctr\endcsname
- {\expandafter\the\csname c@\@quesctr\endcsname}\end{questions}}
+ {\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[]}{}}}
+ \begin{questions}[\csname quesOpts\@quesctr\endcsname]%
+ \setcounter{\@quesctr}{\csname save\@quesctr\endcsname}%
+ \@ifnextchar\popquestions{\item[]}{\@ifnextchar\begin{\item[]}{}}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3821,13 +3873,13 @@
% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
% the \texttt{oQuestion} and \texttt{quiz} environments.
% \begin{macrocode}
- \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}%
+ \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}
% \end{macrocode}
% \end{environment}
@@ -4080,7 +4132,7 @@
\if!\sqsolafter!\else
\sqsolafter\sqsolafterhspace\fi\ignorespaces
\else
- \global\therearequizsolutionstrue\let\verbatim@out=\quiz@solns
+ \global\therearequizsolutionstrue\let\verbatim@out\quiz@solns
\set@display@protect
\immediate\write\verbatim@out{%
\ifmakeQzSlLocal\protect\begingroup^^J\fi
@@ -4089,8 +4141,12 @@
% \begin{macrocode}
\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
@@ -4110,6 +4166,7 @@
\aftergroup\ignorespaces
\else
\endverbatimwrite
+ \eq@clearMrkCpy
\ifx\@qzsolndest\@empty\else\set@display@protect
\immediate\write\verbatim@out{\eqSqSolnTrailer}%
\set@typeset@protect
@@ -4277,16 +4334,12 @@
\def\includequizsolutions{\@ifstar
{\let\resetQZtsolns\relax\includequizsolutionsi}
{\def\resetQZtsolns{\global\let\include@quizsolutions\relax}%
- \includequizsolutionsi}%
-}
+ \includequizsolutionsi}}
\newcommand{\includequizsolutionsi}[1][]{%
- \filterFor{#1}\includequizsolutionsii
-}
-\def\includequizsolutionsii{%
- \include@quizsolutions
+ \filterFor{#1}\includequizsolutionsii}
+\def\includequizsolutionsii{\include@quizsolutions
\resetQZtsolns
- \let\eqFilterArg\@empty
-}
+ \let\eqFilterArg\@empty}
%</package|eqexam>
%<*package>
% \end{macrocode}
@@ -4309,10 +4362,14 @@
% \end{macrocode}
% \DescribeMacro{\quizSolnInput} is the command that actually inputs
% the solutions file \cmd{\jobname.qsl}.
+% \changes{v8.2.6}{2018/12/03}{Placed \string\cs{endinput} at the end of
+% the quiz solutions file}
% \begin{macrocode}
\newcommand{\quizSolnInput}
{%
\global\let\webnewpage\relax
+ \bgroup\OKToWriteExamDatatrue
+ \writeT@QzSolns{\string\endinput}\egroup
\immediate\closeout\quiz@solns
\ifeq@noquizsolutions\else
% \end{macrocode}
@@ -4537,8 +4594,7 @@
% \begin{macrocode}
\q@aboveskip\q@priorhook\noindent\hypertarget{qzH\@currentHref}{}%
\eq@beginQuiz\qhspace{\set@typeset@protect\aebtitleQuiz}%
- \ignorespaces
-}
+ \ignorespaces}
% \end{macrocode}
% Here is the end for the \texttt{quiz} and \texttt{quiz*} environments. The
% \cs{eq@prior@endQuiz} can be used for whatever purposes a
@@ -4546,19 +4602,19 @@
% \begin{macrocode}
\def\aeb@endquiz
{%
- \eq@prior@endQuiz\noindent\eq@endQuiz
- \global\let\eqQuizType\relax
- \global\let\aebtitleQuiz\@empty
- \global\let\aebTitleQuiz\@empty
- \global\let\bqlabel\eq@bqlabel % reset beginning label to default
- \global\let\eqlabel\eq@eqlabel % reset ending label to default
+ \eq@prior@endQuiz\noindent\eq@endQuiz
+ \global\let\eqQuizType\relax
+ \global\let\aebtitleQuiz\@empty
+ \global\let\aebTitleQuiz\@empty
+ \global\let\bqlabel\eq@bqlabel % reset beginning label to default
+ \global\let\eqlabel\eq@eqlabel % reset ending label to default
% \end{macrocode}
% (2013/10/18) Added \cs{sqsllabel} to list of commands that are reset.
% \begin{macrocode}
- \global\let\sqsllabel\eq@sqsllabel
- \global\let\sqslrtnlabel\eq@sqslrtnlabel
- \global\let\bqlabelISO\eq@bqlabelISO
- \eq@belowqskip
+ \global\let\sqsllabel\eq@sqsllabel
+ \global\let\sqslrtnlabel\eq@sqslrtnlabel
+ \global\let\bqlabelISO\eq@bqlabelISO
+ \eq@belowqskip
}
% \end{macrocode}
% \end{environment}
@@ -4684,24 +4740,15 @@
% \begin{macro}{\eq@BeginQuizLink}
% Begin quiz with links
% \begin{macrocode}
-\def\eq@@BeginQuizLinkActions
-{%
- \A{\JS{%
-% \ifx\priorInitQuiz\@empty\else\priorInitQuiz\jsR\fi
- \@initQuiz
-% \ifx\postInitQuiz\@empty\else\jsR\postInitQuiz\fi
- }}%
-}
+\def\eq@@BeginQuizLinkActions{\A{\JS{\@initQuiz}}}
\def\eq@BeginQuizLinkDefaults{\Border{0 0 0}}
\let\bqlabelFmt\@empty
-\def\eq@BeginQuizLink
-{%
- \qz@IDTxtField
- \set@@Link{}{}{}{\color{\@linkcolor}\bqlabelFmt\bqlabel}{}%
- {\eq@setWidgetProps\setLink@driver}%
- {\eq@BeginQuizLinkDefaults\eq@@BeginQuizLinkActions\every@Link}%
- \space\ignorespaces
-}
+\def\eq@BeginQuizLink{%
+ \qz@IDTxtField
+ \set@@Link{}{}{}{\color{\@linkcolor}\bqlabelFmt\bqlabel}{}%
+ {\eq@setWidgetProps\setLink@driver}%
+ {\eq@BeginQuizLinkDefaults\eq@@BeginQuizLinkActions\every@Link}%
+ \space\ignorespaces}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\eq@EndQuizLink}
@@ -4757,35 +4804,24 @@
% This is the button when the user wants button rather than link for the
% \texttt{quiz} environment.
% \begin{macrocode}
-\def\BeginQuizButtonDefaults
-{%
+\def\BeginQuizButtonDefaults{%
\CA{\bqlabel}\H{P}\F{\FPrint}
- \BC{1 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}
-}
-\def\eq@@BeginQuizButtonActions
-{%
- \A{\JS{%
- \@initQuiz
- }}%
-}
-\newcommand\eq@BeginQuizButton[1][]
-{%
- \mbox{\qz@IDTxtField\push@@Button{#1}{beginQuiz.\curr@quiz}{}%
- {\DefaultHeightOfWidget}{\eq@protect\A}%
- {\eq@setButtonProps\eq@Button@driver}%
- {\BeginQuizButtonDefaults\eq@@BeginQuizButtonActions
- \every@ButtonField\every@BeginQuizButton}}%
-}
+ \BC{1 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}}
+\def\eq@@BeginQuizButtonActions{\A{\JS{\@initQuiz}}}
+\newcommand\eq@BeginQuizButton[1][]{%
+ \mbox{\qz@IDTxtField\push@@Button{#1}{beginQuiz.\curr@quiz}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\BeginQuizButtonDefaults\eq@@BeginQuizButtonActions
+ \every@ButtonField\every@BeginQuizButton}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\eq@EndQuizButton}
% The `End Quiz' code for Links
% \begin{macrocode}
-\def\EndQuizButtonDefaults
-{%
+\def\EndQuizButtonDefaults{%
\CA{\eqlabel}\F{\FPrint}\BC{1 0 0}
- \BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}
-}
+ \BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}}
\def\eq@@EndQuizButtonActions{\A{\JS{%
if (!isQuizInitialized("\curr@quiz"))\jsR\jsT
eqAppAlert(InitMsg("\bqlabelISO"),3);\jsR
@@ -4811,20 +4847,18 @@
}
\newcommand{\eq@hiddenScoreData}{\makebox[0pt][r]{%
\textField[\BC{}\F{\FHidden}]{ScoreData.\curr@quiz}{0bp}{0bp}}}
-\newcommand\eq@EndQuizButton[1][]
-{%
- \ifx\eq@CGI\@empty
- \let\eq@submitURL\@empty
- \let\eq@insertHiddenFields\@empty
- \fi
- \mbox{\push@@Button{#1}{endQuiz.\curr@quiz}{}%
- {\DefaultHeightOfWidget}{\eq@protect\A}%
- {\eq@setButtonProps\eq@Button@driver}%
- {\EndQuizButtonDefaults\eq@@EndQuizButtonActions
- \every@ButtonField\every@EndQuizButton}}%
- \makebox[0pt][r]{\eq@hiddenScoreData\eq@insertHiddenFields}%
- \global\let\eq@CGI\@empty
-}
+\newcommand\eq@EndQuizButton[1][]{%
+ \ifx\eq@CGI\@empty
+ \let\eq@submitURL\@empty
+ \let\eq@insertHiddenFields\@empty
+ \fi
+ \mbox{\push@@Button{#1}{endQuiz.\curr@quiz}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\EndQuizButtonDefaults\eq@@EndQuizButtonActions
+ \every@ButtonField\every@EndQuizButton}}%
+ \makebox[0pt][r]{\eq@hiddenScoreData\eq@insertHiddenFields}%
+ \global\let\eq@CGI\@empty}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\databaseName}
@@ -4867,16 +4901,13 @@
% #2 = title of textfield that contains the score.
%\end{verbatim}
% \begin{macrocode}
-\def\eqButtonDefaults
-{%
- \CA{\eq@local@CA}\AC{}\H{P}\W{1}\S{B}
- \BC{1 0 0}\BG{.7529 .7529 .7529}
-}
-\def\@@eqButtonActions
-{%
- \A{\JS{if (isEndQuizPushed("\eqBaseName")){\jsR\jsT%
- correctQuiz("\eqBaseName",\thequestionno);%
- \ifusesumrytbls\jsR\jsT\else\jsR\fi
+\def\eqButtonDefaults{%
+ \CA{\eq@local@CA}\AC{}\H{P}\W{1}\S{B}
+ \BC{1 0 0}\BG{.7529 .7529 .7529}}
+\def\@@eqButtonActions{%
+ \A{\JS{if (isEndQuizPushed("\eqBaseName")){\jsR\jsT%
+ correctQuiz("\eqBaseName",\thequestionno);%
+ \ifusesumrytbls\jsR\jsT\else\jsR\fi
% \end{macrocode}
% (06/13/10) Added the quiz summary table, and the function
% \texttt{correctSumryTbl}. If a summary table is not present
@@ -4884,21 +4915,19 @@
% \begin{macrocode}
if (typeof correctSumryTbl == "function")\jsR\jsT\jsT
correctSumryTbl("\eqBaseName",\thequestionno);\jsR
- }
- }}%
+ }}}%
}
-\newcommand\eqButton[2][]
-{%
+\newcommand\eqButton[2][]{%
% \end{macrocode}
% If nocorrections is true, then this button does not appear.
% \begin{macrocode}
- \ifnocorrections\else
- \def\eqBaseName{#2}%
- \mbox{\push@@Button{#1}{correct.#2}{}{\DefaultHeightOfWidget}%
- {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
- {\eqButtonDefaults\@@eqButtonActions\every@ButtonField
- \every@eqButton}}%
- \fi
+ \ifnocorrections\else
+ \def\eqBaseName{#2}%
+ \mbox{\push@@Button{#1}{correct.#2}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\eqButtonDefaults\@@eqButtonActions\every@ButtonField
+ \every@eqButton}}%
+ \fi
}
% \end{macrocode}
% \changes{v6.7n}{2013/09/17}{\cs{CorrButton} is now an alias for \cs{eqButton}}
@@ -4913,22 +4942,19 @@
% \cs{CorrAnsButton}. When the correct button is pressed, this check box will show a
% green check or a red cross (by default).
% \begin{macrocode}
-\def\rbMarkup@Defaults
-{%
+\def\rbMarkup@Defaults{%
\BC{}\F{\FHidden}\Ff{\FfReadOnly}\textSize{12}
- \textColor{0 g}\symbolchoice{check}\W{}
-}
+ \textColor{0 g}\symbolchoice{check}\W{}}
\newcommand\rbMarkup[1][]{%
- \ifx\grpquestions\eq@One
- \def\Fld@name{%
- \oField.\thequestionno.\thegrpquestionno}\else
- \def\Fld@name{\oField.\thequestionno}\fi
- \mbox{\check@@Box{#1\V{Yes}\DV{Yes}}%
- {rbmarkup.\Fld@name}%
-% {rbmarkup.\curr@quiz.\thequestionno}%
- {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
- {\eq@setWidgetProps\eq@RadioCheck@driver}%
- {\rbMarkup@Defaults\every@CheckBox\every@rbMarkup}}}%
+ \ifx\grpquestions\eq@One
+ \def\Fld@name{%
+ \oField.\thequestionno.\thegrpquestionno}\else
+ \def\Fld@name{\oField.\thequestionno}\fi
+ \mbox{\check@@Box{#1\V{Yes}\DV{Yes}}%
+ {rbmarkup.\Fld@name}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\rbMarkup@Defaults\every@CheckBox\every@rbMarkup}}}%
% \end{macrocode}
% \end{macro}
%
@@ -4960,14 +4986,12 @@
% This question type is entered into the ``\texttt{tagged}'' data, and is meant to be
% used for classifying and in tracking the problem types. Example: \verb+\QT{limits}+.
% \begin{macrocode}
-\newcommand\QT[1]
-{%
- \gdef\eq@qT{#1}\ifx\eq@qT\@empty\global\let\eq@qT\eq@na\fi
+\newcommand\QT[1]{%
+ \gdef\eq@qT{#1}\ifx\eq@qT\@empty\global\let\eq@qT\eq@na\fi
% \end{macrocode}
% \cs{eqQT} saves the value, then we put \cs{eq@qT} back to its default.
% \begin{macrocode}
- \global\let\eqQT\eq@qT\global\let\eq@qT\eq@na
-}
+ \global\let\eqQT\eq@qT\global\let\eq@qT\eq@na}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
@@ -5039,29 +5063,23 @@
\Ff{\FfReadOnly}\BC{1 0 0}\BG{}\S{S}
\DV{\eqScore}\V{\eqScore}\W{1}
}
-\newcommand\ScoreField[2][]
-{%
- \mbox{\text@@Field{#1}{ScoreField.#2}{\SFW}%
- {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
- {\ScoreFieldDefaults\every@eqTextField\every@ScoreField}}%
-}
+\newcommand\ScoreField[2][]{%
+ \mbox{\text@@Field{#1}{ScoreField.#2}{\SFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\ScoreFieldDefaults\every@eqTextField\every@ScoreField}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\GradeField}
% This command creates a text field that shows the letter grade of the user's
% effort on the current quiz.
% \begin{macrocode}
-\def\GradeFieldDefaults
-{%
- \textColor{0 0 1 rg}\BC{1 0 0}\BG{1 1 1}\S{S}
- \Ff{\FfReadOnly}\Q{1}\W{1}
-}
-\newcommand\GradeField[2][]
-{%
- \mbox{\text@@Field{#1}{GradeField.#2}{\GFW}%
- {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
- {\GradeFieldDefaults\every@eqTextField\every@GradeField}}%
-}
+\def\GradeFieldDefaults{%
+ \textColor{0 0 1 rg}\BC{1 0 0}\BG{1 1 1}\S{S}
+ \Ff{\FfReadOnly}\Q{1}\W{1}}
+\newcommand\GradeField[2][]{%
+ \mbox{\text@@Field{#1}{GradeField.#2}{\GFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\GradeFieldDefaults\every@eqTextField\every@GradeField}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AnswerField}
@@ -5072,23 +5090,19 @@
% \begin{macro}{\noResetAnsFieldOnClose}
% When expanded, the \cs{AnswerField}s will not be reset, this is the default behavior.
% \begin{macrocode}
-\def\AnswerFieldDefaults
-{%
- \BC{0 0 0}\S{S}\Ff{\FfReadOnly}\W{1}%
- \presets{\eq@resetAnsFieldOnClose}%
-}
+\def\AnswerFieldDefaults{%
+ \BC{0 0 0}\S{S}\Ff{\FfReadOnly}\W{1}
+ \presets{\eq@resetAnsFieldOnClose}}
\let\eq@resetAnsFieldOnClose\@empty
\newcommand{\noResetAnsFieldOnClose}{%
\global\let\eq@resetAnsFieldOnClose\@empty}
\newcommand{\resetAnsFieldOnClose}{%
- \gdef\eq@resetAnsFieldOnClose{%
- \AApageclose{this.resetForm(["\Fld@name"]);}}}
-\newcommand\AnswerField[2][]
-{%
- \mbox{\text@@Field{#1}{Ans.#2}{\RBW}{\DefaultHeightOfWidget}%
- {}{\eq@setWidgetProps\eq@TextField}%
- {\AnswerFieldDefaults\every@eqTextField\every@AnswerField}}%
-}
+ \gdef\eq@resetAnsFieldOnClose{%
+ \AApageclose{this.resetForm(["\Fld@name"]);}}}
+\newcommand\AnswerField[2][]{%
+ \mbox{\text@@Field{#1}{Ans.#2}{\RBW}{\DefaultHeightOfWidget}%
+ {}{\eq@setWidgetProps\eq@TextField}%
+ {\AnswerFieldDefaults\every@eqTextField\every@AnswerField}}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -5097,37 +5111,33 @@
% An attempt at putting \cs{AnswerField} in the left running footer on each page where there
% is a response box.
% \begin{macrocode}
-%
\newcommand\autoAnswerField{%
- \@ifundefined{lfooter}{\def\eq@next{\eq@autoAnswerFieldgobble}%
- \PackageError{exerquiz}{The \string\autoAnswerField\space
- command\MessageBreak requires the web package}{Use web package}
- }{%
- \PackageInfo{exerquiz}{%
- For this auto answer field feature to run\MessageBreak
- the webheadings pagestyle of the web package\MessageBreak
- is required}\def\eq@next{\eq@autoAnswerField}%
- \ifx\web@lfoot\@empty\else
- \PackageWarning{exerquiz}{The left running footer already in
- use\MessageBreak Will overwrite what is there now.
- Better fix it.}\fi
- }%
- \eq@next
-}
+ \@ifundefined{lfooter}{\def\eq@next{\eq@autoAnswerFieldgobble}%
+ \PackageError{exerquiz}{The \string\autoAnswerField\space
+ command\MessageBreak requires the web package}{Use web package}
+ }{%
+ \PackageInfo{exerquiz}{%
+ For this auto answer field feature to run\MessageBreak
+ the webheadings pagestyle of the web package\MessageBreak
+ is required}\def\eq@next{\eq@autoAnswerField}%
+ \ifx\web@lfoot\@empty\else
+ \PackageWarning{exerquiz}{The left running footer already in
+ use\MessageBreak Will overwrite what is there now.
+ Better fix it.}\fi
+ }%
+ \eq@next}
\newcommand\eq@autoAnswerFieldgobble[1][]{\relax}
\newcommand\autoAnsFldRaiseBox[1]{\def\ef@aAFRB{#1}}
\autoAnsFldRaiseBox{0pt}
\let\autoAFOpts\@empty
\newcommand\eq@autoAnswerField[1][]{\gdef\autoAFOpts{#1}%
- \def\eq@insertAnswerField{\AnswerField[#1]{\currQuiz}}%
- \eq@@autoAnswerField
-}
+ \def\eq@insertAnswerField{\AnswerField[#1]{\currQuiz}}%
+ \eq@@autoAnswerField}
\newcommand\eq@@autoAnswerField{\lfooter{\ifIsRespBox
- \raisebox{\ef@aAFRB}{\eq@insertAnswerField}%
- \global\IsRespBoxfalse\fi}%
-}
+ \raisebox{\ef@aAFRB}{\eq@insertAnswerField}%
+ \global\IsRespBoxfalse\fi}}
\newcommand\manualAnswerField[1][\autoAFOpts]{%
- \expandafter\AnswerField\expandafter[#1]{\currQuiz}}
+ \expandafter\AnswerField\expandafter[#1]{\currQuiz}}
% \end{macrocode}
% \end{macro}
% Now let's define some additional text fields for the quiz environment.
@@ -5135,45 +5145,36 @@
% This command creates a text field which displays the number of points in the
% quiz scored by the user of the \texttt{quiz}.
% \begin{macrocode}
-\def\PointsFieldDefaults
-{%
- \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}
- }
-\newcommand\PointsField[2][]
-{%
- \mbox{\text@@Field{#1}{PointsField.#2}{\PtFW}%
- {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
- {\PointsFieldDefaults\every@eqTextField\every@PointsField}}%
-}
+\def\PointsFieldDefaults{%
+ \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}}
+\newcommand\PointsField[2][]{%
+ \mbox{\text@@Field{#1}{PointsField.#2}{\PtFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\PointsFieldDefaults\every@eqTextField\every@PointsField}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\PercentField}
% This command creates a text field which displays user's score in percent
% form.
% \begin{macrocode}
-\def\PercentFieldDefaults
-{%
- \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}%
-}
-\newcommand\PercentField[2][]
-{%
- \mbox{\text@@Field{#1}{PercentField.#2}{\PcFW}%
- {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
- {\PercentFieldDefaults\every@eqTextField\every@PercentField}}%
-}
+\def\PercentFieldDefaults{%
+ \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}}
+\newcommand\PercentField[2][]{%
+ \mbox{\text@@Field{#1}{PercentField.#2}{\PcFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\PercentFieldDefaults\every@eqTextField\every@PercentField}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\RestoreScoreField}
% Reset the score field to its default, in case some author
% changed things.
% \begin{macrocode}
-\newcommand\RestoreScoreField
-{%
- \global\let\eqScore\eq@Score
- \global\let\eqOutOf\eq@OutOf
-}
+\newcommand\RestoreScoreField{%
+ \global\let\eqScore\eq@Score
+ \global\let\eqOutOf\eq@OutOf}
% \end{macrocode}
% \end{macro}
+%
% \subsection{Floating and Docking a Quiz}
%
% \begin{macro}{\DeclareQuiz}
@@ -5190,8 +5191,7 @@
% \begin{macrocode}
\def\DeclareQuiz#1{\edef\oField{#1}%
\edef\thisQuiz{#1}\edef\curr@quiz{#1}%
- \edef\currQuiz{#1}\edef\curr@quiz{#1}%
-}
+ \edef\currQuiz{#1}\edef\curr@quiz{#1}}
\let\Quiz\DeclareQuiz
% \end{macrocode}
% \end{macro}
@@ -5231,22 +5231,22 @@
\let\endQuizHere\relax
\let\dockQuiz\relax
\newcommand\floatQuiz{%
- \global\let\eq@beginQuiz@saved\eq@beginQuiz
- \global\let\eq@endQuiz@saved\eq@endQuiz
- \global\let\startQuizHere\eq@beginQuiz
- \global\let\endQuizHere\eq@endQuiz
- \global\let\eq@beginQuiz\aeb@noindgobble
- \global\let\eq@endQuiz\@empty
- \global\let\dockQuiz\eq@dockQuiz
+ \global\let\eq@beginQuiz@saved\eq@beginQuiz
+ \global\let\eq@endQuiz@saved\eq@endQuiz
+ \global\let\startQuizHere\eq@beginQuiz
+ \global\let\endQuizHere\eq@endQuiz
+ \global\let\eq@beginQuiz\aeb@noindgobble
+ \global\let\eq@endQuiz\@empty
+ \global\let\dockQuiz\eq@dockQuiz
}
\newcommand\eq@dockQuiz{%
- \global\let\eq@beginQuiz\eq@beginQuiz@saved
- \global\let\eq@endQuiz\eq@endQuiz@saved
- \global\let\startQuizHere\relax
- \global\let\endQuizHere\relax
- \global\let\eq@beginQuiz@saved\relax
- \global\let\eq@endQuiz@saved
- \global\let\dockQuiz\relax
+ \global\let\eq@beginQuiz\eq@beginQuiz@saved
+ \global\let\eq@endQuiz\eq@endQuiz@saved
+ \global\let\startQuizHere\relax
+ \global\let\endQuizHere\relax
+ \global\let\eq@beginQuiz@saved\relax
+ \global\let\eq@endQuiz@saved
+ \global\let\dockQuiz\relax
}
% \end{macrocode}
% \end{macro}
@@ -5266,19 +5266,18 @@
% short quizzes.
% \begin{macrocode}
\def\fancyQuizHeaders{%
- \global\let\eq@sqsllabel@fancy@save\eq@sqsllabel
- \gdef\eq@sqsllabel{\eq@fancyQuizHeaders}}
+ \global\let\eq@sqsllabel@fancy@save\eq@sqsllabel
+ \gdef\eq@sqsllabel{\eq@fancyQuizHeaders}}
\def\eq@fancyQuizHeaders{%
- \if\eqQuizType\isQZ\expandafter\eq@fancyQuizHeadersfmt\else
- \expandafter\eq@fancyShrtQuizHeadersfmt\fi
-}
+ \if\eqQuizType\isQZ\expandafter\eq@fancyQuizHeadersfmt\else
+ \expandafter\eq@fancyShrtQuizHeadersfmt\fi}
\let\eq@sqsllabel@fancy@save\@empty
% \end{macrocode}
% We set \cs{eq@sqsllabel} back to its value when \cs{fancyQuizHeaders} was last
% invoked.
% \begin{macrocode}
\def\restoreDefaultQuizHeaders{%
- \global\let\eq@sqsllabel\eq@sqsllabel@fancy@save}
+ \global\let\eq@sqsllabel\eq@sqsllabel@fancy@save}
% \end{macrocode}
% Here is the definition of the format for quizzes. This can be redefined, a few
% suggestions are made in the documentation. \DescribeMacro{\dfltFncyQHdrsFmt}
@@ -5292,17 +5291,16 @@
\newcommand\FncyHdrsFmtNoTitleQuiz{Solution to Quiz:}
\newcommand\FncyHdrsFmtQuestion{Question}
\newcommand\dfltFncyQHdrsFmt{%
- \protect\bfseries\protect\color{\fncyQHdrsColor}%
- \ifx\aebTitleQuiz\@empty
- \ifnum\@eqquestiondepth>0\relax\FncyHdrsFmtNoTitleQuiz\fi
- \else\aebTitleQuiz:\ifnum\@eqquestiondepth=0\else\protect\ %
- \FncyHdrsFmtQuestion\fi\fi\ifcase\@eqquestiondepth
- \ifx\aebTitleQuiz\@empty\FncyHdrsFmtNoTitleQuiz\fi
- \or\space\arabic{eqquestionnoi}.%
- \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
- \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
- (\roman{eqquestionnoiii})\fi
-}
+ \protect\bfseries\protect\color{\fncyQHdrsColor}%
+ \ifx\aebTitleQuiz\@empty
+ \ifnum\@eqquestiondepth>0\relax\FncyHdrsFmtNoTitleQuiz\fi
+ \else\aebTitleQuiz:\ifnum\@eqquestiondepth=0\else\protect\ %
+ \FncyHdrsFmtQuestion\fi\fi\ifcase\@eqquestiondepth
+ \ifx\aebTitleQuiz\@empty\FncyHdrsFmtNoTitleQuiz\fi
+ \or\space\arabic{eqquestionnoi}.%
+ \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ (\roman{eqquestionnoiii})\fi}
% \end{macrocode}
% \DescribeMacro{\dclrFncyQzHdrsFmt}\cmd{\dclrFncyQzHdrsFmt} is used to declare the formatting for quizzes.
% \begin{macrocode}
@@ -5349,9 +5347,9 @@
\@ifstar{\def\eq@tq@star{*}\eq@titleQuiz}%
{\def\eq@tq@star{x}\eq@titleQuiz}}
\def\eq@titleQuiz#1{%
- \gdef\aebTitleQuiz{#1}\def\@currentlabelname{#1}%
- \gdef\aeb@@titleQuiz{#1}%
- \gdef\aebtitleQuiz{\mbox{\titleQuizfmt{#1}}\tqhspace}%
+ \gdef\aebTitleQuiz{#1}\def\@currentlabelname{#1}%
+ \gdef\aeb@@titleQuiz{#1}%
+ \gdef\aebtitleQuiz{\mbox{\titleQuizfmt{#1}}\tqhspace}%
\makeatother}
%</package>
%<package|eqexam>\let\aebtitleQuiz\@empty
@@ -5373,14 +5371,13 @@
% Outside the \texttt{shortquiz} environment, \cs{ifstaroption} is \cs{@gobbletwo}
% \begin{macrocode}
\def\eq@ifstaroption#1#2{\if\eq@tq@star*\def\sq@next{#1}%
- \else\def\sq@next{#2}\fi\sq@next}
+ \else\def\sq@next{#2}\fi\sq@next}
\let\eq@tq@star\relax
\def\ifstaroption{\PackageWarning{exerquiz}
- {\protect\ifstaroption\space is only defined within the\MessageBreak
- shortquiz environment. Gobbling up its two\MessageBreak
- arguments, sorry. This occurred}%
- \@gobbletwo
-}
+ {\protect\ifstaroption\space is only defined within the\MessageBreak
+ shortquiz environment. Gobbling up its two\MessageBreak
+ arguments, sorry. This occurred}%
+ \@gobbletwo}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -5442,11 +5439,11 @@
% \cmd\aeb@creditmarkup creates the text field that appears in the margins.
% \begin{macrocode}
\newcommand{\aeb@creditmarkup}{%
- \textField[\Ff\FfReadOnly\BC{}\F\FHidden
- \textColor{\pcMarkupColor}\textSize{\markupTextSize}\autoCenter{n}%
- \DV{0 \eqptsLabel}\V{0 \eqptsLabel}]%
- {qMark.\currQuiz.\thequestionno.\arabic{qMarkCnt}}%
- {\markupWidth}{\markupHeight}%
+ \textField[\Ff\FfReadOnly\BC{}\F\FHidden
+ \textColor{\pcMarkupColor}\textSize{\markupTextSize}\autoCenter{n}%
+ \DV{0 \eqptsLabel}\V{0 \eqptsLabel}]%
+ {qMark.\currQuiz.\thequestionno.\arabic{qMarkCnt}}%
+ {\markupWidth}{\markupHeight}%
}
% \end{macrocode}
% The \cs{showCreditMarkup} command defines \cs{qMark} and \cs{qMark@Hook}.
@@ -5457,15 +5454,14 @@
% the command \cs{multipartquestion} has been expanded, \cs{aeb@multipart} is one, otherwise
% it is zero. If zero we do place the markup, otherwise, no.
% \begin{macrocode}
- \def\qMark{\if\aeb@multipart\eq@Zero\aeb@creditmarkup
- \stepcounter{qMarkCnt}\else\global\let\aeb@multipart\eq@Zero\fi}%
+ \def\qMark{\if\aeb@multipart\eq@Zero\aeb@creditmarkup
+ \stepcounter{qMarkCnt}\else\global\let\aeb@multipart\eq@Zero\fi}%
% \end{macrocode}
% \cs{qMark@Hook} is a hook that is normally \cs{@empty}. The hook is strategically
% placed at the beginning of each question \cs{item}. Here we define it to be
% \cs{aeb@creditmarkupfmt}.
% \begin{macrocode}
- \def\qMark@Hook{\aeb@creditmarkupfmt}%
-}
+ \def\qMark@Hook{\aeb@creditmarkupfmt}}
% \end{macrocode}
% Turn off partial credit markup by putting \cs{qMark@Hook} back to its default.
% \begin{macrocode}
@@ -5490,7 +5486,7 @@
% \begin{macrocode}
\long\def\gobbleToEndQt#1\endeqQt{\ifeqforpaper\expandafter\@gobble\fi}
\long\def\gobbleToEndSQt#1\endeqSQt{%
- \ifeqforpaper\expandafter\@gobble\fi}
+ \ifeqforpaper\expandafter\@gobble\fi}
% \end{macrocode}
% The \DescribeMacro{\inclQtFilter}\cmd{\inclQtFilter} operates on the quizzes. If the argument \texttt{\#1}
% matches the optional argument of \cs{filterFor}, we include, otherwise, we gobble
@@ -5498,7 +5494,7 @@
% \cmd{\gobbleToEndQt}.
% \begin{macrocode}
\newcommand\inclQtFilter[1]{\def\eqarg{#1}\ifx\eqarg\eqFilterArg
- \else\expandafter\gobbleToEndQt\fi}
+ \else\expandafter\gobbleToEndQt\fi}
% \end{macrocode}
% The \DescribeMacro{\exclQt}\cmd{\exclQt} command exclude all quiz solutions.
% \begin{macrocode}
@@ -5508,16 +5504,15 @@
% \cs{inclQtFilter}, and it also \cs{let}s \cs{eqSQt} to
% \cs{exclSQt}.
% \begin{macrocode}
-\newcommand{\useQtFilter}{%
- \let\eqQt\inclQtFilter\let\eqSQt\exclSQt
-}
+\newcommand{\useQtFilter}{\let\eqQt\inclQtFilter
+ \let\eqSQt\exclSQt}
% \end{macrocode}
% Now we repeat the same sequence of construct for short quizzes.
% The command \DescribeMacro{\inclSQtFilter}\cmd{\inclSQtFilter} includes a short quiz
% solution if it meets the filter criteria.
% \begin{macrocode}
\newcommand\inclSQtFilter[1]{\def\eqarg{#1}\ifx\eqarg\eqFilterArg
- \else\expandafter\gobbleToEndSQt\fi}
+ \else\expandafter\gobbleToEndSQt\fi}
% \end{macrocode}
% The \DescribeMacro{\exclSQt}\cmd{\exclSQt} command excludes all short quiz solutions.
% \begin{macrocode}
@@ -5545,18 +5540,18 @@
\newcommand{\sqbookmarkfmt}{Short Quiz \@shortquizCnt.\space}
\newcommand{\qzbookmarkfmt}{Quiz \@quizCnt.\space}
\newcommand{\quizpdfbookmark}[1]{\relax\def\argi{#1}%
- \if\eqQuizType\isSQZ\edef\aeb@bmmrkdest{sqbm.\@shortquizCnt}%
- \def\aeb@thisbkmrkfmt{\sqbookmarkfmt}\else
- \edef\aeb@bmmrkdest{qzbm.\@quizCnt}%
- \def\aeb@thisbkmrkfmt{\qzbookmarkfmt}\fi
- \def\quizpdfbookmarktitle{#1}%
- \def\eqex@next{\belowpdfbookmark{\aeb@thisbkmrkfmt#1}%
- {\aeb@bmmrkdest}}%
- \ifx\aebTitleQuiz\@empty\else\ifx\argi\@empty
- \def\quizpdfbookmarktitle{\aebTitleQuiz}%
- \def\eqex@next{\belowpdfbookmark{\aebTitleQuiz}%
- {\aeb@bmmrkdest}}\fi\fi
- \eqex@next\ignorespaces
+ \if\eqQuizType\isSQZ\edef\aeb@bmmrkdest{sqbm.\@shortquizCnt}%
+ \def\aeb@thisbkmrkfmt{\sqbookmarkfmt}\else
+ \edef\aeb@bmmrkdest{qzbm.\@quizCnt}%
+ \def\aeb@thisbkmrkfmt{\qzbookmarkfmt}\fi
+ \def\quizpdfbookmarktitle{#1}%
+ \def\eqex@next{\belowpdfbookmark{\aeb@thisbkmrkfmt#1}%
+ {\aeb@bmmrkdest}}%
+ \ifx\aebTitleQuiz\@empty\else\ifx\argi\@empty
+ \def\quizpdfbookmarktitle{\aebTitleQuiz}%
+ \def\eqex@next{\belowpdfbookmark{\aebTitleQuiz}%
+ {\aeb@bmmrkdest}}\fi\fi
+ \eqex@next\ignorespaces
}
% \end{macrocode}
% \end{macro}
@@ -5591,22 +5586,20 @@
% The \texttt{answers} environment needs to go into horizontal mode for the
% \cs{linelength} to be correct when using \cs{leadinitem}.
% \begin{macrocode}
- \ifx\solutionparshape\@empty\else
-% ?? remove the \par, why is it there to begin with?
- \pushEnvir\par\noindent\expandafter\popEnvir\fi
-% \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[]}}}
+ \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
% \end{macrocode}
% \cs{ifuserectforms} is defined in \textsf{eqexam},
@@ -5621,7 +5614,6 @@
\if\aeb@FLOverride\eq@l
\let\@Ans\Ans@ck@sq@l\else
\let\@Ans\Ans@ck@sq@f\fi
-% \if\aeb@FLOverride l\let\@Ans\Ans@ck@sq@f\fi
\else
\if\aeb@FLOverride\eq@f
\let\@Ans\Ans@ck@sq@f\else
@@ -5639,15 +5631,14 @@
% \begin{macrocode}
\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}%
-}
+ \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}}
% \end{macrocode}
% \begin{macro}{\setMClabelsep}
% \changes{v6.05e}{2006/18/06 v6.05e}
@@ -5668,7 +5659,7 @@
\def\setMClabelsep#1{\def\eq@hspanner{#1}}
\setMClabelsep{\ }\setMClabelsepDefault{\ }
\def\resetMClabelsep{\expandafter\setMClabelsep\expandafter
- {\eq@hspanner@default}}
+ {\eq@hspanner@default}}
\def\eq@lw@l{\eq@l@l\eq@hspanner}
% \end{macrocode}
% For the link-style MC question, the default width, \cs{eq@l@l}, of the label is the normalsize width of
@@ -5693,63 +5684,63 @@
% These parameters are saved in the commands \cs{eq@pPTs} and
% \cs{Ans@choice}.
% \begin{macrocode}
-\@ifundefined{ifwithsoldoc}{\newif\ifwithsoldoc\withsoldocfalse}{}
+\@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
-}
+ \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{ifwithsoldoc}
- {\refstepcounter{quizno}}{\ifwithsoldoc\stepcounter{quizno}\else
- \refstepcounter{quizno}\fi}\fi
- \ignorespaces}
+ \item\relax\noindent\if\eq@listType\eq@One
+ \addtocounter{quizno}{-1}\@ifundefined{ifwithinsoldoc}
+ {\refstepcounter{quizno}}{\ifwithinsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi
+ \ignorespaces}
% \end{macrocode}
% Answers environment for a list environment.
% \begin{macrocode}
-\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
+\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
% \end{macrocode}
% (2013/05/17) Incorporated \cs{aboveanswersSkip} into \cs{topsep}
% \begin{macrocode}
- \setlength{\topsep}{-\parskip+\aboveanswersSkip}%
- \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}%
+ \setlength{\topsep}{-\parskip+\aboveanswersSkip}%
+ \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}%
% \end{macrocode}
% (2014/04/05) Added a specification for \cs{itemsep} so that the
% \cs{rowsep} acts identically for tabular and list.
% \begin{macrocode}
- \setlength{\itemsep}{0pt}\setlength{\partopsep}{0pt}%
- \setlength{\listparindent}{\parindent}%
+ \setlength{\itemsep}{0pt}\setlength{\partopsep}{0pt}%
+ \setlength{\listparindent}{\parindent}%
% \end{macrocode}
% (2013/05/17) When inside the parts environment in tabular-mode,
% we need to add in \cs{eqemargin}. For \textsf{exerquiz} defaults
% to 0pt; when \textsf{eqexam} is used, it has a nonzero value.
% \begin{macrocode}
- \ifnum\exerwparts@cols>1\relax
- \ifx\itsExerParts\eq@YES
- \setlength{\leftmargin}{\labelwidth}\else
- \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi
- \else
+ \ifnum\exerwparts@cols>1\relax
+ \ifx\itsExerParts\eq@YES
+ \setlength{\leftmargin}{\labelwidth}\else
+ \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi
+ \else
% \end{macrocode}
% (2013/05/17) Some adjustments depending on whether \cs{solutionparshape}
% is empty or not. If empty, \cs{leftmargin} is its usual value; otherwise
% we add in \cs{eqemargin} (0pt in \textsf{exerquiz}, nonzero in \textsf{eqexam}).
% \begin{macrocode}
- \ifx\solutionparshape\@empty
- \setlength{\leftmargin}{\labelwidth}\else
- \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi\fi
+ \ifx\solutionparshape\@empty
+ \setlength{\leftmargin}{\labelwidth}\else
+ \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi
+ \fi
% \end{macrocode}
% (2013/10/10) I'm changing the \cs{labelsep}, one definition for \texttt{eqexam}
% another for \texttt{exerquiz}.
@@ -5757,14 +5748,12 @@
% \begin{macrocode}
% Begin joint package and eqexam
%</package|eqexam>
-%<package> \setlength{\labelsep}{0pt}%
-%<package>% \settowidth{\labelsep}{\eq@hspanner}%
-%<eqexam> \setlength{\labelsep}{0pt}%
+%<package> \setlength{\labelsep}{0pt}%
+%<eqexam> \setlength{\labelsep}{0pt}%
%<*package|eqexam>
- \def\Ans{\Ans@list}%
- }%
-}%
-{\endlist\setcounter{quizno}{0}\eq@answersEndHook}
+ \def\Ans{\Ans@list}%
+ }% list
+}{\endlist\setcounter{quizno}{0}\eq@answersEndHook}
% \end{macrocode}
% Answers environment for a tabular environment. This command picks
% up the arguments of \cs{Ans}, then passes on the \cs{@Ans}
@@ -5788,12 +5777,11 @@
\sqtabsep{1.5pt}
\def\sqTabPos#1{\def\sq@TabPos{[#1]}}\sqTabPos{}
\def\answers@@sq@tabular#1{%
-% \ifinner\else\par\vskip-\parskip\vspace{\aboveanswersSkip}\fi
- \ifinner
- \ifx\itsExerParts\eq@YES\par\removelastskip
- \removelastparskip\vskip\aboveanswersSkip\fi
+ \ifinner
+ \ifx\itsExerParts\eq@YES\par\removelastskip
+ \removelastparskip\vskip\aboveanswersSkip\fi
\else\par\removelastskip\removelastparskip
- \vskip\aboveanswersSkip\fi
+ \vskip\aboveanswersSkip\fi
% \end{macrocode}
% (2013/05/17) If within a parts environment in tabular mode, the tab env
% needs to be shifted over by an amount of \cs{eqemargin}, for
@@ -5921,8 +5909,8 @@
\def\linkContentWrapper{(\hfil\linkContentFormat\hfil)}%
\def\Ans@sq@l{%
\leavevmode\if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\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
@@ -6058,8 +6046,8 @@
\let\rbf@Opts\@empty
\def\Ans@sq@f{%
\if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\stepcounter{quizno}\else
+ \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}}
+ {\ifwithinsoldoc\stepcounter{quizno}\else
\refstepcounter{quizno}\fi}\fi\PBS\raggedright
%</package|eqexam>
% \end{macrocode}
@@ -6164,8 +6152,8 @@
\AAmousedown{updateTally.downState=!!event.target.isBoxChecked(0);}}
\def\Ans@ck@sq@f{%
\if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\stepcounter{quizno}\else
+ \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}}
+ {\ifwithinsoldoc\stepcounter{quizno}\else
\refstepcounter{quizno}\fi}\fi\PBS\raggedright
\if\Ans@choice1%
\def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
@@ -7206,7 +7194,7 @@ if (_bOK) {\jsR\jsT
% in the solution file in the same order they were randomized in the main document.
% \changes{v7.8h}{2017/04/14}{Added \string\cs{writeSeedToSolnFile}}
% \begin{macrocode}
-\def\writeSeedToSolnFile{\writeToExSolns{\string\randomi=\the\randomi}}
+\def\writeSeedToSolnFile{\writeT@ExSolns{\string\randomi=\the\randomi}}
% \end{macrocode}
% The \cs{bChoices} command is now processed by the \texttt{keyval} package. There
% are two keys: \texttt{nCols} and \texttt{random}. The first key
@@ -10168,9 +10156,9 @@ if (!isQuizInitialized("@currQuiz")) {
% Implement a local version of full corrections of MS and MS
% \changes{v8.1l}{2018/02/07}{Add local version of \string\cs{corrChoiceFullOn}}
% \begin{macrocode}
-\def\corrLocalChoiceFullyOn{\def\eqCorrLocalChoiceFully{true}} % dpsf07
-\def\corrLocalChoiceFullyOff{\def\eqCorrLocalChoiceFully{false}} % dpsf07
-\def\resetLocalChoiceFully{\let\eqCorrLocalChoiceFully\@empty} % dpsf07
+\def\corrLocalChoiceFullyOn{\def\eqCorrLocalChoiceFully{true}}
+\def\corrLocalChoiceFullyOff{\def\eqCorrLocalChoiceFully{false}}
+\def\resetLocalChoiceFully{\let\eqCorrLocalChoiceFully\@empty}
\resetLocalChoiceFully % no local implementation
\begin{insDLJS*}[exerquizLoaded]{exerquiz}
% \end{macrocode}
@@ -11459,7 +11447,7 @@ function getSubstValue(v,s){
v=v.replace(re,'$2');
% \end{macrocode}
% Now, develop an array of all variables and their substitutes.
-% ie,\\|getSubstValue.aSubsts=[ ["theta","\u03B8"], ["alpha","\u03B1"],...];|
+% ie,\\|getSubstValue.aSubsts=[ ["theta","\u03B8"],["alpha","\u03B1"],...];|
% \begin{macrocode}
getSubstValue.aSubsts=[]; // dps17
var start=0;
diff --git a/texmf-dist/source/latex/acrotex/exerquiz.ins b/texmf-dist/source/latex/acrotex/exerquiz.ins
index 94d27db1..d3514d00 100644
--- a/texmf-dist/source/latex/acrotex/exerquiz.ins
+++ b/texmf-dist/source/latex/acrotex/exerquiz.ins
@@ -17,7 +17,7 @@
%%
%% --------------- start of docstrip commands ------------------
%%
-\def\filedate{2014/08/19}
+\def\filedate{2018/12/03}
\def\batchfile{exerquiz.ins}
\input docstrip
@@ -46,7 +46,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/web.dtx b/texmf-dist/source/latex/acrotex/web.dtx
index 94032ce0..605c2f52 100644
--- a/texmf-dist/source/latex/acrotex/web.dtx
+++ b/texmf-dist/source/latex/acrotex/web.dtx
@@ -21,7 +21,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{web}
-%<package> [2017/03/20 v6.0o web: A Screen Design Package (dps)]
+%<package> [2017/12/05 v6.1.1 web: A Screen Design Package (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -1025,8 +1025,14 @@
\def\@pdfcreator{The AcroTeX eDucation Bundle}
% \end{macrocode}
% The \pkg{comment} package is required to this package's success.
-% \begin{macrocode}
-\RequirePackage{comment}
+% \changes{v6.1.1}{2017/12/05}{require aeb-comment (version 3.1 of comment)}
+% \begin{macrocode}
+\RequirePackage{aeb-comment}
+\def\web@commentChkMsg{\@ifpackageloaded{comment}
+ {\PackageWarningNoLine{web}
+ {The comment package is incompatible with the\MessageBreak
+ aeb-comment package, do not use the comment package}}{}}
+\AtBeginDocument{\web@commentChkMsg}
% \end{macrocode}
% If the user specifies the use of templates, we assume they are going
% to do some graphical work, so we include \textsf{graphicx}.
diff --git a/texmf-dist/tex/latex/acrotex/aeb-comment.sty b/texmf-dist/tex/latex/acrotex/aeb-comment.sty
new file mode 100644
index 00000000..35624bd1
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/aeb-comment.sty
@@ -0,0 +1,189 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% 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)
+%
+% Comment.sty version 3.2, August 1997
+% 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
+% USA
+%
+% eijkhout@math.ucla.edu
+%
+% Usage: all text included in between
+% \comment ... \endcomment
+% or \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.
+%
+% Other `comment' environments are defined by
+% and are selected/deselected with
+% \includecomment{versiona}
+% \excludecoment{versionb}
+%
+% These environments are used as
+% \versiona ... \endversiona
+% or \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
+% \begin and \end lines act as if they don't exist.
+% In particular, assignments &c are not local.
+%
+% 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.
+% To keep definitions &c local, you can include \begingroup
+% in the `before commands' and \endgroup in the `after commands'.
+%
+% 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.
+%
+% Trick for short in/exclude macros (\maybe{this snippet}):
+%\includeversion{cond}
+%\newcommand{\maybe}[1]{}
+%\begin{cond}
+%\renewcommand{\maybe}[1]{#1}
+%\end{cond}
+%
+% Changes in version 3.1
+% - updated author's address
+% - cleaned up some code
+% - trailing contents on \begin{env} line is always discarded
+% even if you've done \includecomment{env}
+% - comments no longer define grouping!! you can even
+% \includecomment{env}
+% \begin{env}
+% \begin{itemize}
+% \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).
+%
+\def\makeinnocent#1{\catcode`#1=12 }
+\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
+\def\latexname{lplain}\def\latexename{LaTeX2e}
+\newwrite\CommentStream
+
+\def\ProcessComment#1{\begingroup
+ \def\CurrentComment{#1}%
+ \let\do\makeinnocent \dospecials
+ \makeinnocent\^^L% and whatever other special cases
+ \endlinechar`\^^M \catcode`\^^M=12 \fxComment}
+{\catcode`\^^M=12 \endlinechar=-1 %
+ \gdef\fxComment#1^^M{\xComment}
+ \gdef\xComment#1^^M{\def\test{#1}
+ \csarg\ifx{End\CurrentComment Test}\test
+ \edef\next{\noexpand\EndOfComment{\CurrentComment}}%
+ \else \ThisComment{#1}\let\next\xComment
+ \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}
+\makeatletter
+\def\AfterIncludedComment
+ {\immediate\closeout\CommentStream
+ \input comment.cut
+ }%
+\def\WriteCommentLine#1{\immediate\write\CommentStream{#1}}
+\def\BeforeIncludedComment{\immediate\openout\CommentStream=comment.cut
+ \let\ThisComment\WriteCommentLine}
+\def\includecomment
+ #1{\message{Include comment '#1'}%
+ \csarg\let{After#1Comment}\AfterIncludedComment
+ \csarg\def{#1}{\BeforeIncludedComment
+ \ProcessComment{#1}}%
+ \CommentEndDef{#1}}
+\long\def\specialcomment
+ #1#2#3{\message{Special comment '#1'}%
+ \csarg\def{After#1Comment}{#2\AfterIncludedComment#3}%
+ \csarg\def{#1}{\BeforeIncludedComment
+ \ProcessComment{#1}}%
+ \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}}%
+ \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}}%
+ \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}
+\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
+
+\excludecomment{comment}
+
+\endinput
diff --git a/texmf-dist/tex/latex/acrotex/aebjs.def b/texmf-dist/tex/latex/acrotex/aebjs.def
index 55982760..d5312af6 100644
--- a/texmf-dist/tex/latex/acrotex/aebjs.def
+++ b/texmf-dist/tex/latex/acrotex/aebjs.def
@@ -18,7 +18,7 @@
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesFile{aebjs.def}
- [2018/10/03 v8.2.5 %
+ [2018/12/13 v8.2.8 %
Exerquiz document level JavaScript (dps)]
\def\aeb@array{new Array}
\def\refac#1{\\(#1\\)}\def\regrp#1{(#1)}\def\rechrclass#1{[#1]}
@@ -38,9 +38,9 @@
\def\corrChoiceFullyOn{\def\eqCorrChoiceFully{true}}
\def\corrChoiceFullyOff{\def\eqCorrChoiceFully{false}}
\corrChoiceFullyOn
-\def\corrLocalChoiceFullyOn{\def\eqCorrLocalChoiceFully{true}} % dpsf07
-\def\corrLocalChoiceFullyOff{\def\eqCorrLocalChoiceFully{false}} % dpsf07
-\def\resetLocalChoiceFully{\let\eqCorrLocalChoiceFully\@empty} % dpsf07
+\def\corrLocalChoiceFullyOn{\def\eqCorrLocalChoiceFully{true}}
+\def\corrLocalChoiceFullyOff{\def\eqCorrLocalChoiceFully{false}}
+\def\resetLocalChoiceFully{\let\eqCorrLocalChoiceFully\@empty}
\resetLocalChoiceFully % no local implementation
\begin{insDLJS*}[exerquizLoaded]{exerquiz}
\begin{newsegment}{AeB: AcroTeX eDucation Bundle}
diff --git a/texmf-dist/tex/latex/acrotex/aebrandom.def b/texmf-dist/tex/latex/acrotex/aebrandom.def
index 3bcfcec3..a8b8adae 100644
--- a/texmf-dist/tex/latex/acrotex/aebrandom.def
+++ b/texmf-dist/tex/latex/acrotex/aebrandom.def
@@ -18,7 +18,7 @@
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesFile{aebrandom.def}
- [2018/10/03 v8.2.5 %
+ [2018/12/13 v8.2.8 %
Exerquiz support for randomization (dps)]
\@ifundefined{nextrandom}{\input{random.tex}}{}
\def\nextrandom{\begingroup
@@ -42,7 +42,7 @@
\ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi
\endgroup
}
-\def\writeSeedToSolnFile{\writeToExSolns{\string\randomi=\the\randomi}}
+\def\writeSeedToSolnFile{\writeT@ExSolns{\string\randomi=\the\randomi}}
\def\@ansChoices[#1]%
{%
\global\let\@tempholdSaveAns\@empty % 5/24
diff --git a/texmf-dist/tex/latex/acrotex/aebsumrytbls.def b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
index 1acf96e7..d46fca06 100644
--- a/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
+++ b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
@@ -18,7 +18,7 @@
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesFile{aebsumrytbls.def}
- [2018/10/03 v8.2.5 %
+ [2018/12/13 v8.2.8 %
Exerquiz support for summary tables (dps)]
\def\ccatCurrQzWith(#1){\currQuiz#1}
\def\pbPopulateSumTable{\pushButton[\W0\BG{}\BC{}\S{S}\autoCenter{n}
diff --git a/texmf-dist/tex/latex/acrotex/eqexam.def b/texmf-dist/tex/latex/acrotex/eqexam.def
deleted file mode 100644
index 8927b344..00000000
--- a/texmf-dist/tex/latex/acrotex/eqexam.def
+++ /dev/null
@@ -1,1715 +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}
- [2018/10/03 v8.2.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{\eq@solutionsaftertrue\eq@nolinktrue}
-\newif\ifcqSA\cqSAfalse
-\def\SolutionsAtEnd{\eq@solutionsafterfalse\eq@nolinkfalse
- \displayworkareatrue\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}
-\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}}
-\else
-\newwrite\ex@solns \immediate\openout \ex@solns \jobname.sol
-\newcommand{\writeToExSolns}[1]{%
- \set@display@protect
- \immediate\write\ex@solns{#1}%
- \set@typeset@protect
-}
-\newwrite\eq@xrefdefns \immediate\openout\eq@xrefdefns\jobname_xdefs.cut
-\fi
-\newwrite\quiz@solns \immediate\openout \quiz@solns \jobname.qsl
-\newcommand{\writeToQzSolns}[1]{%
- \set@display@protect
- \immediate\write\quiz@solns{#1}%
- \set@typeset@protect
-}
-\def\eq@IWAuxOut#1{\immediate\write\@auxout{#1}}
-\def\eq@IWDefs#1{\immediate\write\eq@xrefdefns{#1}}
-\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{\cqSAfalse
- \eqCQDeclarations}
-\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
- \writeToExSolns{\protect
- \decleqterminex{\protect\cqFmtPasteQues{\cq@CutName}}}\fi}
-\def\declCopyQues#1{\def\cqCopiedQues{#1}}
-\def\def@QuesToSoln{\restoreNormalSolns
- \global\terminexchangedfalse % dps cq
- \ifeq@hidesolution\else\writeToExSolns{\protect
- \declCopyQues{\protect\input{\cq@CutName}}}\fi}
-\newcommand\restoreNormalSolns{%
- \writeToExSolns{\protect\decleqterminex{\protect\eqterminexDEF}}}
-\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}
-\def\eqExerSolnHeaderSngl{%
- \ifmakeExSlLocal\protect\begingroup^^J\fi
- \protect\eqEXt{\eqExtArg}{\eqFilterArg}\protect
- \solnItemMngt\protect\exerSolnHeader{\exsecrunhead}{ex.\the@exno}%
- {\exsllabelformat}\exer@solnheadhook
- \exersolnheadhook\protect\eqterminex
-}
-\def\eq@@writeexheader{\set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnHeaderSngl}%
- \set@typeset@protect
-}
-\def\eqExerSolnHeaderList{%
- \ifmakeExSlLocal\protect\begingroup^^J\fi
- \protect\eqEXt{\eqExtArg}{\eqFilterArg}\protect
- \solnItemMngt\protect\exerSolnHeader{\exsecrunhead}%
- {ex.\the@exno\thepartno}{\exsllabelformatwp}%
- \exer@solnheadhook\exersolnheadhook\protect\eqterminex
-}
-\def\eq@@writeexheaderlist{\set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnHeaderList}%
- \set@typeset@protect
-}
-\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 % dpsj6
- \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\comment
-\let\eqSavedEndCommet\endcomment
-\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}% dpsj4
-\let\eq@b@ddCodeSpecial\eq@b@ddCodeSpecialDef % dpsj4
-\def\solnexer@@@woparts{\ifeq@solutionsafter\else
- \expandafter\begingroup\fi %dpsj10
- \global\thereissolutiontrue
- \global\let\procsoln\relax % dpsj6
- \global\let\endprocsoln\relax % dpsj6
- \def\exerwparts@cols{0}%
- \let\verbatim@out\ex@solns
- \if\currhideopt\eq@Hid
- \let\minVspacet@bs\@empty
- \let\procsoln\eqSavedComment
- \let\endprocsoln\eqSavedEndCommet
- \def\eq@next{\procsoln}%
- \else
- \eq@ckglobalhide
- \ifeq@hidesolution
- \let\procsoln\eqSavedComment
- \let\endprocsoln\eqSavedEndCommet
- \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 % dpsj6
- \let\endprocsoln\relax
- \removelastskip\removelastparskip
- \cqSAtrue\eqCQDeclarations
- \declCopyQues{\input{\cq@CutName}}%
- \ifx\exsolafter\@empty
- \ifdim\sameVspace=0pt\eqe@setStartSolns
- \else
- \solutionsafterSkip
- \@@solnafterSkipOnce % dpsj3
- \eqe@setStartSolns
- \fi
- \else\par\kern0pt
- \solutionsafterSkip
- \@@solnafterSkipOnce % dpsj3
- \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\let\eqExerSolnHeader\@empty
- \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
-\newcommand\eqExerSolnTrailer{%
- \protect\ReturnTo{page.\the\c@page}%
- {\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else
- \exrtnlabelformat\fi}}%
- \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi^^J%
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-}
-\let\eq@e@ddCodeSpecialDef\relax % dpsj4
-\let\eq@e@ddCodeSpecial\eq@e@ddCodeSpecialDef % dpsj6
-\let\kdvsp@Restore\relax % dpsj20
-\def\endsolnexer@woparts{\endprocsoln\eq@e@ddCodeSpecial
- \pkg@endsolnexerhook % djsj8 moved from the end of the macro
- \ifeq@solutionsafter\else
- \expandafter\endgroup\fi % from \begingroup at \solnexer@@@woparts
- \global\let\exsolnonceonlytophook\relax
- \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi % dpsj5
- \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 % dpsj9
- \if\exerstar*%
- \eq@fititin{\mbox{\exrtnlabelformatwp}}\else
- \eq@fititin{\mbox{\exrtnlabelformat}}\fi
- \ifx\istabularexer\eq@YES\unskip\kern0pt\else\par\fi % dpsj6
- \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
- \let\verbatim@out\ex@solns
- \set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnTrailer}%
- \set@typeset@protect
- \fi
- \fi
- \fi
- \kdvsp@Restore % dpsj20
- \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}%
- \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}%
- \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}%
- \global\let\eqExerSolnHeader\@empty
- \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}}%
-\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}
-\newcommand\filterFor[1]{\def\eqFilterArg{#1}}
-\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\exerSolnsHeadnToc{\section*{\exsectitle}%
- \addcontentsline{toc}{section}{%
- \@ifundefined{web@latextoc}{}{%
- \ifx\web@latextoc\eq@YES\else
- \protect\numberline{}\fi}\exsectitle}}
-\@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
-\newcommand{\exerSolnInput}
-{%
- \@ifundefined{eqe@IWO}{}{\ifsolutionsAtEnd%\ifvspacewithsolns
- \eqe@IWO\@auxout{\string\expandafter\string\gdef
- \string\csname\space eqExamQuesLastPage\string\endcsname
- {\arabic{page}}}\fi}
- \let\webnewpage\relax
- \ifsolutionsonly\else\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{\jobname.sol}
- {\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
- \protect\eqQt{\eqFilterArg}\else
- \ifx\prior@eqSQt\@empty\else\prior@eqSQt\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
- \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{ifwithsoldoc}{\newif\ifwithsoldoc\withsoldocfalse}{}
-\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{ifwithsoldoc}
- {\refstepcounter{quizno}}{\ifwithsoldoc\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}%
- }%
-}%
-{\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{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\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{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\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/exerquiz.sty b/texmf-dist/tex/latex/acrotex/exerquiz.sty
index 19477b43..e7acef40 100644
--- a/texmf-dist/tex/latex/acrotex/exerquiz.sty
+++ b/texmf-dist/tex/latex/acrotex/exerquiz.sty
@@ -19,7 +19,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{exerquiz}
- [2018/10/03 v8.2.5 %
+ [2018/12/13 v8.2.8 %
Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
\usepackage{keyval}
\RequirePackage{ifpdf}[2006/02/20]
@@ -70,6 +70,8 @@
}{}
\@ifundefined{ifdisplayworkarea}{\newif\ifdisplayworkarea
\displayworkareafalse}{}
+\providecommand\displayworkareaOn{\displayworkareatrue}
+\providecommand\displayworkareaOff{\displayworkareafalse}
\DeclareOption{nodljs}{\PassOptionsToPackage{nodljs}{insdljs}%
\AtEndOfPackage{\let\importdljs\eq@YES}}
\DeclareOption{execJS}{\PassOptionsToPackage{execJS}{insdljs}}
@@ -228,6 +230,9 @@
}{}
\let\iterate\relax
\newif\ifeq@solutionsafter \eq@solutionsafterfalse
+\def\ifsolutionsafter{\csname ifeq@solutionsafter\endcsname}
+ \let\solutionsaftertrue\eq@solutionsaftertrue
+ \let\solutionsafterfalse\eq@solutionsafterfalse
\newif\ifeq@hidesolution \eq@hidesolutionfalse
\newif\ifeq@globalshowsolutions \eq@globalshowsolutionsfalse
\newif\ifeq@nosolutions \eq@nosolutionsfalse
@@ -241,26 +246,27 @@
\@ifundefined{ifeqe@flextended}{\newif\ifeqe@flextended
\eqe@flextendedfalse}{}
\@ifundefined{ifcont@nnot}{\newif\ifcont@nnot \cont@nnotfalse}{}
-\@ifundefined{if@eqalignfilllinestoleft}{\newif\if@eqalignfilllinestoleft
- \@eqalignfilllinestoleftfalse}{}
+\@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{\eq@solutionsaftertrue\eq@nolinktrue}
+\def\SolutionsAfter{\solutionsAtEndfalse\eq@solutionsaftertrue
+ \displayworkareafalse\eq@proofingfalse\eq@nolinktrue}
\newif\ifcqSA\cqSAfalse
-\def\SolutionsAtEnd{\eq@solutionsafterfalse\eq@nolinkfalse
- \displayworkareatrue\ifvspacewithsolns\eq@nosolutionsfalse\else
+\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
-}
+ \expandafter#2\fi}
\newif\ifeq@randomizeChoices \eq@randomizeChoicesfalse
\newif\ifeq@randomizeallChoices \eq@randomizeallChoicesfalse
\def\turnOnRandomize{\eq@randomizeallChoicestrue}
@@ -275,8 +281,7 @@
\ifeq@noforms\else\include@quizsolutions\fi
\clearpage
\csname endForm\endcsname
- \if\eq@drivernum2\else\clearpage\fi
-}
+ \if\eq@drivernum2\else\clearpage\fi}
\InputIfFileExists{exerquiz.cfg}{}{}
\@ifpackageloaded{web}{%
\ExecuteOptions{\eq@driver@name}%
@@ -291,7 +296,12 @@
\ProcessOptions
\RequirePackage{array}
\RequirePackage{\eq@ColorPackage}
-\RequirePackage{comment}
+\RequirePackage{aeb-comment}
+\def\eq@commentChkMsg{\@ifpackageloaded{comment}
+ {\PackageWarningNoLine{exerquiz}
+ {The comment package is incompatible with the\MessageBreak
+ aeb-comment package, do not use the comment package}}{}}
+\AtBeginDocument{\eq@commentChkMsg}
\RequirePackage{verbatim}
\RequirePackage{hyperref}
\RequirePackage{amssymb}% used for return symbols
@@ -416,39 +426,48 @@
\newcommand{\defaultReqFormMsg}{%
"The expression is not in the expected form."}
\PackageInfo{exerquiz}{* Using \eq@driver\space option *}
+\newcommand{\writeToExSolns@}[1]{%
+ \ifsolutionsonly\else
+ \ifOKToWriteExamData
+ \set@display@protect
+ \immediate\write\ex@solns{#1}\set@typeset@protect
+ \fi\fi}%
\ifsolutionsonly
-\InputIfFileExists{\jobname_xdefs.cut}{%
+ \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
-\newcommand{\writeToExSolns}[1]{%
- \set@display@protect
- \immediate\write\ex@solns{#1}%
- \set@typeset@protect
-}
-\newwrite\eq@xrefdefns \immediate\openout\eq@xrefdefns\jobname_xdefs.cut
+ \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]{%
- \set@display@protect
- \immediate\write\quiz@solns{#1}%
- \set@typeset@protect
-}
+\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}}
\def\theHquizno{\curr@quiz.\theeqquestionnoi.%
- \ifcase\@eqquestiondepth\or\or\arabic{eqquestionnoii}.%
- \or\arabic{eqquestionnoii}.\roman{eqquestionnoiii}.%
- \else\fi\alph{quizno}}
+ \ifcase\@eqquestiondepth\or\or\arabic{eqquestionnoii}.%
+ \or\arabic{eqquestionnoii}.\roman{eqquestionnoiii}.%
+ \else\fi\alph{quizno}}
\newlength\eqemargin \eqemargin=0pt
\newcounter{eqpointvalue} \setcounter{eqpointvalue}{0}
\newlength\eq@tmplength
@@ -577,13 +596,16 @@
\def\eqCQDeclarations{\cqqsfalse\eq@turnMessageOff
\includecomment{sPage}\excludecomment{qPage}%
\eq@turnMessageOn}
-\def\eqTopOfSolnPage{\cqSAfalse
+\def\eqTopOfSolnPage{\withinsoldoctrue\cqSAfalse
\eqCQDeclarations}
+\def\eqTopOfQslPage{\withinqsldoctrue}
\eq@turnMessageOff
\includecomment{qPage}\excludecomment{sPage}
\eq@turnMessageOn
-\def\writecqQSfalse{\writeToExSolns{\protect\eqTopOfSolnPage}}
-\AtBeginDocument{\writecqQSfalse}
+\def\writecqQSfalse{%
+ \writeT@ExSolns{\protect\eqTopOfSolnPage}}
+\def\writeTopOfQslPage{\writeT@QzSolns{\protect\eqTopOfQslPage}}
+\AtBeginDocument{\writecqQSfalse\writeTopOfQslPage}
\newenvironment{cq@CQ}
{%
\global\cqIsActivetrue
@@ -615,15 +637,17 @@
\def\cqFmtPasteQues#1{\cq@Pre\input{#1}\cq@Post}
\def\p@ssQuesToSoln{\ifeq@hidesolution\else
\global\terminexchangedtrue % dps cq
- \writeToExSolns{\protect
- \decleqterminex{\protect\cqFmtPasteQues{\cq@CutName}}}\fi}
+ \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\writeToExSolns{\protect
+ \ifeq@hidesolution\else\writeT@ExSolns{\protect
\declCopyQues{\protect\input{\cq@CutName}}}\fi}
-\newcommand\restoreNormalSolns{%
- \writeToExSolns{\protect\decleqterminex{\protect\eqterminexDEF}}}
+\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}}}
@@ -704,9 +728,8 @@
\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
-}
+ \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}
@@ -752,8 +775,7 @@
\ifeq@exerciseheading
\prior@questionsHook\marginparpriorhook\noindent\eqexheader@wrapper
\afterlabelhskip\marginparafterhook\gEx@CommonCmd
- \eq@setPrbSolnAftrIndnt\ignorespaces\fi
-}
+ \eq@setPrbSolnAftrIndnt\ignorespaces\fi}
\newif\ifterminexchanged \terminexchangedfalse % dps cq
\newcommand\decleqterminex[1]{\def\eqterminex{#1}}
\def\eqterminexDEF{\relax\ignorespaces}
@@ -761,28 +783,30 @@
\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{\set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnHeaderSngl}%
- \set@typeset@protect
-}
+ \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{\set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnHeaderList}%
- \set@typeset@protect
-}
+ \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
@@ -809,8 +833,7 @@
\def\eq@next{\@ifnextchar[{\solnexer@@woparts}%]
{\solnexer@@woparts[\null]}}\else
\def\eq@next{\solnexer@@woparts[\null]}\fi
- \eq@next
-}
+ \eq@next}
\let\eqPriorVspace\@gobble
\newif\if@eqlinedfiller \@eqlinedfillerfalse
\newcommand{\vspaceFiller}[1]{\vfill}
@@ -821,8 +844,7 @@
\@tempcnta=0
\@whilenum\@tempcnta<\soln@keys@nLines\relax\do
{\vskip0pt\penalty-50\vglue\wlVspace\eqWriteLine
- \advance\@tempcnta1\relax}\par\endgroup
-}
+ \advance\@tempcnta1\relax}\par\endgroup}
\let\leavevspace\relax % dpsj5
\newcommand{\vspaceFmt}[1]{%
\ifx\solutionparshape\@empty\else
@@ -841,9 +863,8 @@
{\vspaceFiller{#1}}}%
\fi\eq@lines@next}%
\fi
- }\expandafter\leavevspace % dpsj6
- \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}}
@@ -926,13 +947,13 @@
\let\eqSolnExCmds\relax\else
\def\eqSolnExCmds{#1}\fi}
\let\eqSolnExCmds\relax
-\def\eq@b@ddCodeSpecialDef#1{#1}% dpsj4
-\let\eq@b@ddCodeSpecial\eq@b@ddCodeSpecialDef % dpsj4
+\def\eq@b@ddCodeSpecialDef#1{#1}%
+\let\eq@b@ddCodeSpecial\eq@b@ddCodeSpecialDef
\def\solnexer@@@woparts{\ifeq@solutionsafter\else
- \expandafter\begingroup\fi %dpsj10
+ \expandafter\begingroup\fi
\global\thereissolutiontrue
- \global\let\procsoln\relax % dpsj6
- \global\let\endprocsoln\relax % dpsj6
+ \global\let\procsoln\relax
+ \global\let\endprocsoln\relax
\def\exerwparts@cols{0}%
\let\verbatim@out\ex@solns
\if\currhideopt\eq@Hid
@@ -958,7 +979,7 @@
\fi
\def\eq@next{%
\ifeq@solutionsafter
- \let\procsoln\relax % dpsj6
+ \let\procsoln\relax
\let\endprocsoln\relax
\removelastskip\removelastparskip
\cqSAtrue\eqCQDeclarations
@@ -967,12 +988,12 @@
\ifdim\sameVspace=0pt\eqe@setStartSolns
\else
\solutionsafterSkip
- \@@solnafterSkipOnce % dpsj3
+ \@@solnafterSkipOnce
\eqe@setStartSolns
\fi
\else\par\kern0pt
\solutionsafterSkip
- \@@solnafterSkipOnce % dpsj3
+ \@@solnafterSkipOnce
\noindent\strut\eqe@setStartSolns
\fi
\parskip\eqeques@parsep
@@ -989,7 +1010,6 @@
\solutionparshape
\else
\eqExerSolnHeader
- \global\let\eqExerSolnHeader\@empty
\global\therearesolutionstrue\expandafter\procsoln
\fi
}%
@@ -1004,36 +1024,44 @@
\let\eqfititin\eq@fititin
\def\ReturnTo#1#2{\eq@fititin{\hyperlink{#1}{#2}}}
\def\xReturnTo#1#2{\eq@fititin{\href{#1}{#2}}}
+\bgroup\catcode`\%=12\relax
+\gdef\eq@commentchar{%}\egroup
\newcommand\eqExerSolnTrailer{%
\if\exerSolns@ExtFile\eq@YES\protect\xReturnTo
{\exerSolns@ReturnPath\jobname\#qex.\the@exno}%
\else\protect\ReturnTo{qex.\the@exno}\fi
{\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else
\exrtnlabelformat\fi}}%
- \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi^^J%
+ \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi
+ \eq@commentchar^^J% %dpsd03
\ifmakeExSlLocal\protect\endgroup^^J\fi
}
\let\eq@e@ddCodeSpecialDef\relax % dpsj4
\let\eq@e@ddCodeSpecial\eq@e@ddCodeSpecialDef % dpsj6
-\let\kdvsp@Restore\relax % dpsj20
+\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 % djsj8 moved from the end of the macro
+ \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 % dpsj5
+ \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
+ \ifkeepdeclaredvspacing\vskip\sameVspace\fi
\else
\ifeq@solutionsafter
- \ifx\isitleadin\eq@YES\parshape=0 \fi % dpsj9
+ \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 % dpsj6
+ \ifx\istabularexer\eq@YES\unskip\kern0pt\else\par\fi
\ifx\minVspacet@bs\@empty
\ifkeepdeclaredvspacing
\@tempdima\pagetotal
@@ -1043,8 +1071,8 @@
\advance\@tempdimb-\@tempdima
\ifdim\@tempdimb>0pt\vglue\@tempdimb\kern0pt
\let\eqe@showEndHere\@gobble
- \edef\tmp@exp{\noexpand\marginpar{%
- \noexpand\smash{e: adj \the\@tempdimb}}}%
+ \edef\tmp@exp{\noexpand\marginpar{\noexpand
+ \smash{e: adj \the\@tempdimb}}}%
\eqe@debugVertSkip{\tmp@exp}%
\fi
\fi
@@ -1055,14 +1083,11 @@
\eq@ckglobalhide
\ifeq@hidesolution\else
\endsolnexerhookaux
- \let\verbatim@out\ex@solns
- \set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnTrailer}%
- \set@typeset@protect
+ \writeT@ExSolns{\eqExerSolnTrailer}%
\fi
\fi
\fi
- \kdvsp@Restore % dpsj20
+ \kdvsp@Restore
\endsolnexerhook\penalty0\relax}
\let\eq@exerstarEnv\relax
\newenvironment{exercise*}{\def\eq@exerstarEnv{*}\exercise}
@@ -1138,16 +1163,14 @@
{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.}%
-}
+ {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.}%
-}
+ {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}
@@ -1156,6 +1179,7 @@
\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
@@ -1179,10 +1203,10 @@
}{%
\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
+ \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
@@ -1216,8 +1240,7 @@
\def\eq@initializeContAnnot{\@ifundefined{eqequestions}
{\global\let\eqeCurrProb\relax}
{\xdef\eqeCurrProb{\theeqquestionnoi}}%
- \xdef\eq@currProbStartPage{\arabic{page}}%
-}
+ \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
@@ -1278,8 +1301,7 @@
\fi
\fi
\eq@next
- \global\advance\eq@extabColCnt1\relax
-}
+ \global\advance\eq@extabColCnt1\relax}
\newcommand\partstabcolsep[1]{\def\eq@partstabcolsep{#1}}
\partstabcolsep{1.5pt}
\newcommand\partstabtopsep[1]{\def\eq@partstabtopsep{#1}}
@@ -1290,6 +1312,7 @@
\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
@@ -1337,7 +1360,6 @@
\aftergroup\eq@vpartstabtopsep}
\let\eqe@innermarkpts\relax
\def\item@part@tabular{\refstepcounter{partno}%
- \global\let\eqExerSolnHeader\@empty
\ifeq@solutionsafter
\eq@nolinktrue % no link to solution
\else\ifeq@nosolutions
@@ -1359,35 +1381,35 @@
\eq@setPrbSolnAftrIndnt
\makebox[0pt][r]{\eqexlisttabheader\eqe@prtsepPrb}%
\ex@listtabheader@fterhook
- \exlisttabheaderafterhook\ignorespaces
-}
+ \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\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}}
+ {\let\save@@xtabularcr\@xarraycr}
+ {\let\save@@xtabularcr\@xtabularcr}}
\def\tabControlOff{\@ifundefined{@xtabularcr}
- {\let\@xarraycr\save@@xtabularcr}
- {\let\@xtabularcr\save@@xtabularcr}}
+ {\let\@xarraycr\save@@xtabularcr}
+ {\let\@xtabularcr\save@@xtabularcr}}
\AtBeginDocument{\tabControlOn}
\def\eq@xtabularcr{\@ifnextchar[{\save@@xtabularcr}
- {\eqe@tab@parts@rowsep}}%
+ {\eqe@tab@parts@rowsep}}%
\def\eqe@tab@parts@rowsep{\save@@xtabularcr
- \noalign{\expandafter\kern\eqparts@tabrowsep}}%
+ \noalign{\expandafter\kern\eqparts@tabrowsep}}%
+\let\eqgrii\relax
+\let\eqgriii\relax
\define@key{exEnum}{labelwidthTo}[\normalsize\normalfont\bfseries00.\ ]%
{\def\exE@labelwidthTo{#1}}
\define@key{exEnum}{labelwidth}[\@empty]{\def\exE@labelwidth{#1}}
@@ -1413,8 +1435,8 @@
\def\partbookmarkfmt{(\thepartno)\space}
\def\setENum{\Elabel\if\exerstar*\thequestionno(\thepartno)\else
\thequestionno\fi}%
- \ifExSolutionsSet\else
- \writeToExSolns{^^J\protect\begin{exEnumerate}^^J}\fi
+ \ifExSolutionsSet\else\writeT@ExSolns{^^J\string\eqgrii
+ \protect\begin{exEnumerate}\eq@commentchar^^J}\fi
\list{}{%
\ifx\exE@labelwidth\@empty
\settowidth{\labelwidth}{\exE@labelwidthTo}\else
@@ -1429,7 +1451,8 @@
\settowidth{\labelsep}{\normalfont\ }%
\setlength{\leftmargin}{\labelwidth}%
}\item\relax}{\ifExSolutionsSet\else
- \writeToExSolns{\protect\end{exEnumerate}^^J}\fi
+ \writeT@ExSolns{\string\eqgrii
+ \protect\end{exEnumerate}\eq@commentchar^^J}\fi
\endlist}
\newenvironment{enumex}{%
\renewcommand\exlabelformat{\textbf{\thequestionno.}}%
@@ -1443,23 +1466,30 @@
\protect\textbf{(\thepartno)}\ }%
\begin{exercise*}[questionno]}{\end{exercise*}}
\def\includeexersolutions{\@ifstar
- {\let\resetEXsolns\relax\includeexersolutionsi}
- {\def\resetEXsolns{\global\let\include@solutions\relax}%
- \includeexersolutionsi}%
-}
+ {\let\resetEXsolns\relax\includeexersolutionsi}
+ {\def\resetEXsolns{\global\let\include@solutions\relax}%
+ \includeexersolutionsi}}
\newcommand{\includeexersolutionsi}[1][]{%
- \filterFor{#1}\includeexersolutionsii
-}
+ \filterFor{#1}\includeexersolutionsii}
\def\includeexersolutionsii{%
- \if\exerSolns@ExtFile\eq@NO
- \include@solutions
- \resetEXsolns
- \let\eqFilterArg\@empty
- \fi
+ \if\exerSolns@ExtFile\eq@NO
+ \include@solutions
+ \resetEXsolns
+ \let\eqFilterArg\@empty
+ \fi
}
-\long\def\gobbleToEndEXt#1\endeqEXt{%
- \ifeqforpaper\expandafter\@gobbletwo\fi}
+\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}
@@ -1477,34 +1507,36 @@
\@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%\ifvspacewithsolns
- \eqe@IWO\@auxout{\string\expandafter\string\gdef
- \string\csname\space eqExamQuesLastPage\string\endcsname
- {\arabic{page}}}\fi}
- \let\webnewpage\relax
- \ifsolutionsonly\else\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{\jobname.sol}
- {\global\ExSolutionsSettrue}{\PackageWarning{exerquiz}
- {!!! Solutions to exercises not found}}%
- \global\ExSolutionsSetfalse
- \newpage\eq@defaultlheader
- \fi
+ \@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{%
\if\exerSolns@ExtFile\eq@NO
@@ -1546,8 +1578,7 @@
\def\eqex@next{\subpdfbookmark{\exbookmarkfmt#1}%
{qex.\the@exno}}%
\fi
- \eqex@next\ignorespaces
-}
+ \eqex@next\ignorespaces}
\ifeq@noforms\endinput\fi
\definecolor{webgreen}{rgb}{0,.6,0}
\newcommand{\proofingsymbolColor}[1]{\def\@proofingsymbolColor{#1}}
@@ -1559,8 +1590,7 @@
\def\setproofingsymbol{%
\if\@proofsymbolredefined1\else
\@ifpackageloaded{pifont}{\proofingsymbol{\ding{52}}}
- {\proofingsymbol{$\bullet$}}\fi
-}
+ {\proofingsymbol{$\bullet$}}\fi}
\AtBeginDocument{\setproofingsymbol}
\newcommand{\prior@questionsHook}{}
\let\qMark@Hook\@empty
@@ -1629,14 +1659,14 @@
\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}}
+ {\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[]}{}}}
+ \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}}
@@ -1649,13 +1679,13 @@
\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}%
+ \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*}
{%
@@ -1773,14 +1803,18 @@
\if!\sqsolafter!\else
\sqsolafter\sqsolafterhspace\fi\ignorespaces
\else
- \global\therearequizsolutionstrue\let\verbatim@out=\quiz@solns
+ \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
@@ -1800,6 +1834,7 @@
\aftergroup\ignorespaces
\else
\endverbatimwrite
+ \eq@clearMrkCpy
\ifx\@qzsolndest\@empty\else\set@display@protect
\immediate\write\verbatim@out{\eqSqSolnTrailer}%
\set@typeset@protect
@@ -1864,16 +1899,12 @@
\def\includequizsolutions{\@ifstar
{\let\resetQZtsolns\relax\includequizsolutionsi}
{\def\resetQZtsolns{\global\let\include@quizsolutions\relax}%
- \includequizsolutionsi}%
-}
+ \includequizsolutionsi}}
\newcommand{\includequizsolutionsi}[1][]{%
- \filterFor{#1}\includequizsolutionsii
-}
-\def\includequizsolutionsii{%
- \include@quizsolutions
+ \filterFor{#1}\includequizsolutionsii}
+\def\includequizsolutionsii{\include@quizsolutions
\resetQZtsolns
- \let\eqFilterArg\@empty
-}
+ \let\eqFilterArg\@empty}
\let\eqqzsolutionshook\@empty
\let\priorsqslsectitle\@empty
\let\priorsqslinput\@empty
@@ -1885,6 +1916,8 @@
\newcommand{\quizSolnInput}
{%
\global\let\webnewpage\relax
+ \bgroup\OKToWriteExamDatatrue
+ \writeT@QzSolns{\string\endinput}\egroup
\immediate\closeout\quiz@solns
\ifeq@noquizsolutions\else
\iftherearequizsolutions\newpage\markright{}%
@@ -1979,20 +2012,19 @@
\xdef\csname titleOf\currQuiz\endcsname{\aebTitleQuiz}%
\q@aboveskip\q@priorhook\noindent\hypertarget{qzH\@currentHref}{}%
\eq@beginQuiz\qhspace{\set@typeset@protect\aebtitleQuiz}%
- \ignorespaces
-}
+ \ignorespaces}
\def\aeb@endquiz
{%
- \eq@prior@endQuiz\noindent\eq@endQuiz
- \global\let\eqQuizType\relax
- \global\let\aebtitleQuiz\@empty
- \global\let\aebTitleQuiz\@empty
- \global\let\bqlabel\eq@bqlabel % reset beginning label to default
- \global\let\eqlabel\eq@eqlabel % reset ending label to default
- \global\let\sqsllabel\eq@sqsllabel
- \global\let\sqslrtnlabel\eq@sqslrtnlabel
- \global\let\bqlabelISO\eq@bqlabelISO
- \eq@belowqskip
+ \eq@prior@endQuiz\noindent\eq@endQuiz
+ \global\let\eqQuizType\relax
+ \global\let\aebtitleQuiz\@empty
+ \global\let\aebTitleQuiz\@empty
+ \global\let\bqlabel\eq@bqlabel % reset beginning label to default
+ \global\let\eqlabel\eq@eqlabel % reset ending label to default
+ \global\let\sqsllabel\eq@sqsllabel
+ \global\let\sqslrtnlabel\eq@sqslrtnlabel
+ \global\let\bqlabelISO\eq@bqlabelISO
+ \eq@belowqskip
}
\newenvironment{quiz*}{\goodbreak\gdef\qstar{*}\@quiz*f}{\aeb@endquiz}
\newcommand\eq@beginQuiz{\eq@BeginQuizLink}
@@ -2040,22 +2072,15 @@
\newcommand{\postInitQuiz}{}
\let\eq@submitURL\@empty
\let\eq@insertHiddenFields\@empty
-\def\eq@@BeginQuizLinkActions
-{%
- \A{\JS{%
- \@initQuiz
- }}%
-}
+\def\eq@@BeginQuizLinkActions{\A{\JS{\@initQuiz}}}
\def\eq@BeginQuizLinkDefaults{\Border{0 0 0}}
\let\bqlabelFmt\@empty
-\def\eq@BeginQuizLink
-{%
- \qz@IDTxtField
- \set@@Link{}{}{}{\color{\@linkcolor}\bqlabelFmt\bqlabel}{}%
- {\eq@setWidgetProps\setLink@driver}%
- {\eq@BeginQuizLinkDefaults\eq@@BeginQuizLinkActions\every@Link}%
- \space\ignorespaces
-}
+\def\eq@BeginQuizLink{%
+ \qz@IDTxtField
+ \set@@Link{}{}{}{\color{\@linkcolor}\bqlabelFmt\bqlabel}{}%
+ {\eq@setWidgetProps\setLink@driver}%
+ {\eq@BeginQuizLinkDefaults\eq@@BeginQuizLinkActions\every@Link}%
+ \space\ignorespaces}
\newcommand\priorSubmitQuiz{}
\newcommand\postSubmitQuiz{}
\def\eq@@EndQuizLinkActions{\A{\JS{%
@@ -2097,30 +2122,19 @@
\makebox[0pt][r]{\eq@hiddenScoreData\eq@insertHiddenFields}%
\global\let\eq@CGI\@empty\ignorespaces
}
-\def\BeginQuizButtonDefaults
-{%
+\def\BeginQuizButtonDefaults{%
\CA{\bqlabel}\H{P}\F{\FPrint}
- \BC{1 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}
-}
-\def\eq@@BeginQuizButtonActions
-{%
- \A{\JS{%
- \@initQuiz
- }}%
-}
-\newcommand\eq@BeginQuizButton[1][]
-{%
- \mbox{\qz@IDTxtField\push@@Button{#1}{beginQuiz.\curr@quiz}{}%
- {\DefaultHeightOfWidget}{\eq@protect\A}%
- {\eq@setButtonProps\eq@Button@driver}%
- {\BeginQuizButtonDefaults\eq@@BeginQuizButtonActions
- \every@ButtonField\every@BeginQuizButton}}%
-}
-\def\EndQuizButtonDefaults
-{%
+ \BC{1 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}}
+\def\eq@@BeginQuizButtonActions{\A{\JS{\@initQuiz}}}
+\newcommand\eq@BeginQuizButton[1][]{%
+ \mbox{\qz@IDTxtField\push@@Button{#1}{beginQuiz.\curr@quiz}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\BeginQuizButtonDefaults\eq@@BeginQuizButtonActions
+ \every@ButtonField\every@BeginQuizButton}}}
+\def\EndQuizButtonDefaults{%
\CA{\eqlabel}\F{\FPrint}\BC{1 0 0}
- \BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}
-}
+ \BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}}
\def\eq@@EndQuizButtonActions{\A{\JS{%
if (!isQuizInitialized("\curr@quiz"))\jsR\jsT
eqAppAlert(InitMsg("\bqlabelISO"),3);\jsR
@@ -2146,20 +2160,18 @@
}
\newcommand{\eq@hiddenScoreData}{\makebox[0pt][r]{%
\textField[\BC{}\F{\FHidden}]{ScoreData.\curr@quiz}{0bp}{0bp}}}
-\newcommand\eq@EndQuizButton[1][]
-{%
- \ifx\eq@CGI\@empty
- \let\eq@submitURL\@empty
- \let\eq@insertHiddenFields\@empty
- \fi
- \mbox{\push@@Button{#1}{endQuiz.\curr@quiz}{}%
- {\DefaultHeightOfWidget}{\eq@protect\A}%
- {\eq@setButtonProps\eq@Button@driver}%
- {\EndQuizButtonDefaults\eq@@EndQuizButtonActions
- \every@ButtonField\every@EndQuizButton}}%
- \makebox[0pt][r]{\eq@hiddenScoreData\eq@insertHiddenFields}%
- \global\let\eq@CGI\@empty
-}
+\newcommand\eq@EndQuizButton[1][]{%
+ \ifx\eq@CGI\@empty
+ \let\eq@submitURL\@empty
+ \let\eq@insertHiddenFields\@empty
+ \fi
+ \mbox{\push@@Button{#1}{endQuiz.\curr@quiz}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\EndQuizButtonDefaults\eq@@EndQuizButtonActions
+ \every@ButtonField\every@EndQuizButton}}%
+ \makebox[0pt][r]{\eq@hiddenScoreData\eq@insertHiddenFields}%
+ \global\let\eq@CGI\@empty}
\newcommand\databaseName[1]{\gdef\db@Name{#1}}\def\db@Name{}
\newcommand\tableName[1]{\gdef\db@Table{#1}}\def\db@Table{}
\newcommand\eqCGI{\definePath{\eq@CGI}}\def\eq@CGI{}
@@ -2170,58 +2182,49 @@
\let\thisRtnURL\@empty
\newcommand\addHiddenTextField[3][]{}
\newcommand\populateHiddenField[2]{}
-\def\eqButtonDefaults
-{%
- \CA{\eq@local@CA}\AC{}\H{P}\W{1}\S{B}
- \BC{1 0 0}\BG{.7529 .7529 .7529}
-}
-\def\@@eqButtonActions
-{%
- \A{\JS{if (isEndQuizPushed("\eqBaseName")){\jsR\jsT%
- correctQuiz("\eqBaseName",\thequestionno);%
- \ifusesumrytbls\jsR\jsT\else\jsR\fi
+\def\eqButtonDefaults{%
+ \CA{\eq@local@CA}\AC{}\H{P}\W{1}\S{B}
+ \BC{1 0 0}\BG{.7529 .7529 .7529}}
+\def\@@eqButtonActions{%
+ \A{\JS{if (isEndQuizPushed("\eqBaseName")){\jsR\jsT%
+ correctQuiz("\eqBaseName",\thequestionno);%
+ \ifusesumrytbls\jsR\jsT\else\jsR\fi
if (typeof correctSumryTbl == "function")\jsR\jsT\jsT
correctSumryTbl("\eqBaseName",\thequestionno);\jsR
- }
- }}%
+ }}}%
}
-\newcommand\eqButton[2][]
-{%
- \ifnocorrections\else
- \def\eqBaseName{#2}%
- \mbox{\push@@Button{#1}{correct.#2}{}{\DefaultHeightOfWidget}%
- {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
- {\eqButtonDefaults\@@eqButtonActions\every@ButtonField
- \every@eqButton}}%
- \fi
+\newcommand\eqButton[2][]{%
+ \ifnocorrections\else
+ \def\eqBaseName{#2}%
+ \mbox{\push@@Button{#1}{correct.#2}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\eqButtonDefaults\@@eqButtonActions\every@ButtonField
+ \every@eqButton}}%
+ \fi
}
\def\CorrButton{\eqButton}
-\def\rbMarkup@Defaults
-{%
+\def\rbMarkup@Defaults{%
\BC{}\F{\FHidden}\Ff{\FfReadOnly}\textSize{12}
- \textColor{0 g}\symbolchoice{check}\W{}
-}
+ \textColor{0 g}\symbolchoice{check}\W{}}
\newcommand\rbMarkup[1][]{%
- \ifx\grpquestions\eq@One
- \def\Fld@name{%
- \oField.\thequestionno.\thegrpquestionno}\else
- \def\Fld@name{\oField.\thequestionno}\fi
- \mbox{\check@@Box{#1\V{Yes}\DV{Yes}}%
- {rbmarkup.\Fld@name}%
- {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
- {\eq@setWidgetProps\eq@RadioCheck@driver}%
- {\rbMarkup@Defaults\every@CheckBox\every@rbMarkup}}}%
+ \ifx\grpquestions\eq@One
+ \def\Fld@name{%
+ \oField.\thequestionno.\thegrpquestionno}\else
+ \def\Fld@name{\oField.\thequestionno}\fi
+ \mbox{\check@@Box{#1\V{Yes}\DV{Yes}}%
+ {rbmarkup.\Fld@name}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\rbMarkup@Defaults\every@CheckBox\every@rbMarkup}}}%
\newcommand\minQuizResp{lowThreshold}
\newcommand\PTs{\@ifstar{\def\eq@star{*}\@PTs}{\def\eq@star{x}\@PTs}}
\def\@PTs#1{\gdef\eq@PTs{#1}\ifx\eq@PTs\@empty\gdef\eq@PTs{1}\fi
\global\let\eqPTs\eq@PTs\global\let\eq@PTs\@empty
\if\eq@star*\else\PTs@Hook\fi}
\def\eq@PTs{0} % initialize this variable
-\newcommand\QT[1]
-{%
- \gdef\eq@qT{#1}\ifx\eq@qT\@empty\global\let\eq@qT\eq@na\fi
- \global\let\eqQT\eq@qT\global\let\eq@qT\eq@na
-}
+\newcommand\QT[1]{%
+ \gdef\eq@qT{#1}\ifx\eq@qT\@empty\global\let\eq@qT\eq@na\fi
+ \global\let\eqQT\eq@qT\global\let\eq@qT\eq@na}
\def\eq@na{na} % not applicable
\let\eq@qT\eq@na
\newcommand\PTsHook[1]{\def\PTs@Hook{#1}}
@@ -2245,147 +2248,121 @@
\Ff{\FfReadOnly}\BC{1 0 0}\BG{}\S{S}
\DV{\eqScore}\V{\eqScore}\W{1}
}
-\newcommand\ScoreField[2][]
-{%
- \mbox{\text@@Field{#1}{ScoreField.#2}{\SFW}%
- {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
- {\ScoreFieldDefaults\every@eqTextField\every@ScoreField}}%
-}
-\def\GradeFieldDefaults
-{%
- \textColor{0 0 1 rg}\BC{1 0 0}\BG{1 1 1}\S{S}
- \Ff{\FfReadOnly}\Q{1}\W{1}
-}
-\newcommand\GradeField[2][]
-{%
- \mbox{\text@@Field{#1}{GradeField.#2}{\GFW}%
- {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
- {\GradeFieldDefaults\every@eqTextField\every@GradeField}}%
-}
-\def\AnswerFieldDefaults
-{%
- \BC{0 0 0}\S{S}\Ff{\FfReadOnly}\W{1}%
- \presets{\eq@resetAnsFieldOnClose}%
-}
+\newcommand\ScoreField[2][]{%
+ \mbox{\text@@Field{#1}{ScoreField.#2}{\SFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\ScoreFieldDefaults\every@eqTextField\every@ScoreField}}}
+\def\GradeFieldDefaults{%
+ \textColor{0 0 1 rg}\BC{1 0 0}\BG{1 1 1}\S{S}
+ \Ff{\FfReadOnly}\Q{1}\W{1}}
+\newcommand\GradeField[2][]{%
+ \mbox{\text@@Field{#1}{GradeField.#2}{\GFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\GradeFieldDefaults\every@eqTextField\every@GradeField}}}
+\def\AnswerFieldDefaults{%
+ \BC{0 0 0}\S{S}\Ff{\FfReadOnly}\W{1}
+ \presets{\eq@resetAnsFieldOnClose}}
\let\eq@resetAnsFieldOnClose\@empty
\newcommand{\noResetAnsFieldOnClose}{%
\global\let\eq@resetAnsFieldOnClose\@empty}
\newcommand{\resetAnsFieldOnClose}{%
- \gdef\eq@resetAnsFieldOnClose{%
- \AApageclose{this.resetForm(["\Fld@name"]);}}}
-\newcommand\AnswerField[2][]
-{%
- \mbox{\text@@Field{#1}{Ans.#2}{\RBW}{\DefaultHeightOfWidget}%
- {}{\eq@setWidgetProps\eq@TextField}%
- {\AnswerFieldDefaults\every@eqTextField\every@AnswerField}}%
-}
+ \gdef\eq@resetAnsFieldOnClose{%
+ \AApageclose{this.resetForm(["\Fld@name"]);}}}
+\newcommand\AnswerField[2][]{%
+ \mbox{\text@@Field{#1}{Ans.#2}{\RBW}{\DefaultHeightOfWidget}%
+ {}{\eq@setWidgetProps\eq@TextField}%
+ {\AnswerFieldDefaults\every@eqTextField\every@AnswerField}}}
\newcommand\autoAnswerField{%
- \@ifundefined{lfooter}{\def\eq@next{\eq@autoAnswerFieldgobble}%
- \PackageError{exerquiz}{The \string\autoAnswerField\space
- command\MessageBreak requires the web package}{Use web package}
- }{%
- \PackageInfo{exerquiz}{%
- For this auto answer field feature to run\MessageBreak
- the webheadings pagestyle of the web package\MessageBreak
- is required}\def\eq@next{\eq@autoAnswerField}%
- \ifx\web@lfoot\@empty\else
- \PackageWarning{exerquiz}{The left running footer already in
- use\MessageBreak Will overwrite what is there now.
- Better fix it.}\fi
- }%
- \eq@next
-}
+ \@ifundefined{lfooter}{\def\eq@next{\eq@autoAnswerFieldgobble}%
+ \PackageError{exerquiz}{The \string\autoAnswerField\space
+ command\MessageBreak requires the web package}{Use web package}
+ }{%
+ \PackageInfo{exerquiz}{%
+ For this auto answer field feature to run\MessageBreak
+ the webheadings pagestyle of the web package\MessageBreak
+ is required}\def\eq@next{\eq@autoAnswerField}%
+ \ifx\web@lfoot\@empty\else
+ \PackageWarning{exerquiz}{The left running footer already in
+ use\MessageBreak Will overwrite what is there now.
+ Better fix it.}\fi
+ }%
+ \eq@next}
\newcommand\eq@autoAnswerFieldgobble[1][]{\relax}
\newcommand\autoAnsFldRaiseBox[1]{\def\ef@aAFRB{#1}}
\autoAnsFldRaiseBox{0pt}
\let\autoAFOpts\@empty
\newcommand\eq@autoAnswerField[1][]{\gdef\autoAFOpts{#1}%
- \def\eq@insertAnswerField{\AnswerField[#1]{\currQuiz}}%
- \eq@@autoAnswerField
-}
+ \def\eq@insertAnswerField{\AnswerField[#1]{\currQuiz}}%
+ \eq@@autoAnswerField}
\newcommand\eq@@autoAnswerField{\lfooter{\ifIsRespBox
- \raisebox{\ef@aAFRB}{\eq@insertAnswerField}%
- \global\IsRespBoxfalse\fi}%
-}
+ \raisebox{\ef@aAFRB}{\eq@insertAnswerField}%
+ \global\IsRespBoxfalse\fi}}
\newcommand\manualAnswerField[1][\autoAFOpts]{%
- \expandafter\AnswerField\expandafter[#1]{\currQuiz}}
-\def\PointsFieldDefaults
-{%
- \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}
- }
-\newcommand\PointsField[2][]
-{%
- \mbox{\text@@Field{#1}{PointsField.#2}{\PtFW}%
- {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
- {\PointsFieldDefaults\every@eqTextField\every@PointsField}}%
-}
-\def\PercentFieldDefaults
-{%
- \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}%
-}
-\newcommand\PercentField[2][]
-{%
- \mbox{\text@@Field{#1}{PercentField.#2}{\PcFW}%
- {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
- {\PercentFieldDefaults\every@eqTextField\every@PercentField}}%
-}
-\newcommand\RestoreScoreField
-{%
- \global\let\eqScore\eq@Score
- \global\let\eqOutOf\eq@OutOf
-}
+ \expandafter\AnswerField\expandafter[#1]{\currQuiz}}
+\def\PointsFieldDefaults{%
+ \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}}
+\newcommand\PointsField[2][]{%
+ \mbox{\text@@Field{#1}{PointsField.#2}{\PtFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\PointsFieldDefaults\every@eqTextField\every@PointsField}}}
+\def\PercentFieldDefaults{%
+ \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}}
+\newcommand\PercentField[2][]{%
+ \mbox{\text@@Field{#1}{PercentField.#2}{\PcFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\PercentFieldDefaults\every@eqTextField\every@PercentField}}}
+\newcommand\RestoreScoreField{%
+ \global\let\eqScore\eq@Score
+ \global\let\eqOutOf\eq@OutOf}
\def\DeclareQuiz#1{\edef\oField{#1}%
\edef\thisQuiz{#1}\edef\curr@quiz{#1}%
- \edef\currQuiz{#1}\edef\curr@quiz{#1}%
-}
+ \edef\currQuiz{#1}\edef\curr@quiz{#1}}
\let\Quiz\DeclareQuiz
\def\aeb@noindgobble{\noindent\@gobbletwo}
\let\startQuizHere\relax
\let\endQuizHere\relax
\let\dockQuiz\relax
\newcommand\floatQuiz{%
- \global\let\eq@beginQuiz@saved\eq@beginQuiz
- \global\let\eq@endQuiz@saved\eq@endQuiz
- \global\let\startQuizHere\eq@beginQuiz
- \global\let\endQuizHere\eq@endQuiz
- \global\let\eq@beginQuiz\aeb@noindgobble
- \global\let\eq@endQuiz\@empty
- \global\let\dockQuiz\eq@dockQuiz
+ \global\let\eq@beginQuiz@saved\eq@beginQuiz
+ \global\let\eq@endQuiz@saved\eq@endQuiz
+ \global\let\startQuizHere\eq@beginQuiz
+ \global\let\endQuizHere\eq@endQuiz
+ \global\let\eq@beginQuiz\aeb@noindgobble
+ \global\let\eq@endQuiz\@empty
+ \global\let\dockQuiz\eq@dockQuiz
}
\newcommand\eq@dockQuiz{%
- \global\let\eq@beginQuiz\eq@beginQuiz@saved
- \global\let\eq@endQuiz\eq@endQuiz@saved
- \global\let\startQuizHere\relax
- \global\let\endQuizHere\relax
- \global\let\eq@beginQuiz@saved\relax
- \global\let\eq@endQuiz@saved
- \global\let\dockQuiz\relax
+ \global\let\eq@beginQuiz\eq@beginQuiz@saved
+ \global\let\eq@endQuiz\eq@endQuiz@saved
+ \global\let\startQuizHere\relax
+ \global\let\endQuizHere\relax
+ \global\let\eq@beginQuiz@saved\relax
+ \global\let\eq@endQuiz@saved
+ \global\let\dockQuiz\relax
}
\def\fancyQuizHeaders{%
- \global\let\eq@sqsllabel@fancy@save\eq@sqsllabel
- \gdef\eq@sqsllabel{\eq@fancyQuizHeaders}}
+ \global\let\eq@sqsllabel@fancy@save\eq@sqsllabel
+ \gdef\eq@sqsllabel{\eq@fancyQuizHeaders}}
\def\eq@fancyQuizHeaders{%
- \if\eqQuizType\isQZ\expandafter\eq@fancyQuizHeadersfmt\else
- \expandafter\eq@fancyShrtQuizHeadersfmt\fi
-}
+ \if\eqQuizType\isQZ\expandafter\eq@fancyQuizHeadersfmt\else
+ \expandafter\eq@fancyShrtQuizHeadersfmt\fi}
\let\eq@sqsllabel@fancy@save\@empty
\def\restoreDefaultQuizHeaders{%
- \global\let\eq@sqsllabel\eq@sqsllabel@fancy@save}
+ \global\let\eq@sqsllabel\eq@sqsllabel@fancy@save}
\newcommand\fncyQHdrsColor{blue}
\newcommand\FncyHdrsFmtNoTitleQuiz{Solution to Quiz:}
\newcommand\FncyHdrsFmtQuestion{Question}
\newcommand\dfltFncyQHdrsFmt{%
- \protect\bfseries\protect\color{\fncyQHdrsColor}%
- \ifx\aebTitleQuiz\@empty
- \ifnum\@eqquestiondepth>0\relax\FncyHdrsFmtNoTitleQuiz\fi
- \else\aebTitleQuiz:\ifnum\@eqquestiondepth=0\else\protect\ %
- \FncyHdrsFmtQuestion\fi\fi\ifcase\@eqquestiondepth
- \ifx\aebTitleQuiz\@empty\FncyHdrsFmtNoTitleQuiz\fi
- \or\space\arabic{eqquestionnoi}.%
- \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
- \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
- (\roman{eqquestionnoiii})\fi
-}
+ \protect\bfseries\protect\color{\fncyQHdrsColor}%
+ \ifx\aebTitleQuiz\@empty
+ \ifnum\@eqquestiondepth>0\relax\FncyHdrsFmtNoTitleQuiz\fi
+ \else\aebTitleQuiz:\ifnum\@eqquestiondepth=0\else\protect\ %
+ \FncyHdrsFmtQuestion\fi\fi\ifcase\@eqquestiondepth
+ \ifx\aebTitleQuiz\@empty\FncyHdrsFmtNoTitleQuiz\fi
+ \or\space\arabic{eqquestionnoi}.%
+ \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ (\roman{eqquestionnoiii})\fi}
\newcommand\dclrFncyQzHdrsFmt[1]{%
\def\eq@fancyQuizHeadersfmt{{#1}}%
}
@@ -2400,9 +2377,9 @@
\@ifstar{\def\eq@tq@star{*}\eq@titleQuiz}%
{\def\eq@tq@star{x}\eq@titleQuiz}}
\def\eq@titleQuiz#1{%
- \gdef\aebTitleQuiz{#1}\def\@currentlabelname{#1}%
- \gdef\aeb@@titleQuiz{#1}%
- \gdef\aebtitleQuiz{\mbox{\titleQuizfmt{#1}}\tqhspace}%
+ \gdef\aebTitleQuiz{#1}\def\@currentlabelname{#1}%
+ \gdef\aeb@@titleQuiz{#1}%
+ \gdef\aebtitleQuiz{\mbox{\titleQuizfmt{#1}}\tqhspace}%
\makeatother}
\let\aebtitleQuiz\@empty
\let\aebTitleQuiz\@empty
@@ -2410,14 +2387,13 @@
\def\ifQuizType#1#2{\if\eqQuizType\isQZ\def\qt@next{#1}%
\else\def\qt@next{#2}\fi\qt@next}
\def\eq@ifstaroption#1#2{\if\eq@tq@star*\def\sq@next{#1}%
- \else\def\sq@next{#2}\fi\sq@next}
+ \else\def\sq@next{#2}\fi\sq@next}
\let\eq@tq@star\relax
\def\ifstaroption{\PackageWarning{exerquiz}
- {\protect\ifstaroption\space is only defined within the\MessageBreak
- shortquiz environment. Gobbling up its two\MessageBreak
- arguments, sorry. This occurred}%
- \@gobbletwo
-}
+ {\protect\ifstaroption\space is only defined within the\MessageBreak
+ shortquiz environment. Gobbling up its two\MessageBreak
+ arguments, sorry. This occurred}%
+ \@gobbletwo}
\newcounter{qMarkCnt}
\def\multipartquestion{\global\let\aeb@multipart\eq@One}
\providecommand{\ptsLabel}[1]{\def\eqptsLabel{#1}}\ptsLabel{pts}
@@ -2426,47 +2402,45 @@
\newcommand\pcMarkupColor{red}
\def\markupWidth{12bp}\def\markupHeight{8bp}\def\markupTextSize{0}
\newcommand{\aeb@creditmarkup}{%
- \textField[\Ff\FfReadOnly\BC{}\F\FHidden
- \textColor{\pcMarkupColor}\textSize{\markupTextSize}\autoCenter{n}%
- \DV{0 \eqptsLabel}\V{0 \eqptsLabel}]%
- {qMark.\currQuiz.\thequestionno.\arabic{qMarkCnt}}%
- {\markupWidth}{\markupHeight}%
+ \textField[\Ff\FfReadOnly\BC{}\F\FHidden
+ \textColor{\pcMarkupColor}\textSize{\markupTextSize}\autoCenter{n}%
+ \DV{0 \eqptsLabel}\V{0 \eqptsLabel}]%
+ {qMark.\currQuiz.\thequestionno.\arabic{qMarkCnt}}%
+ {\markupWidth}{\markupHeight}%
}
\def\showCreditMarkup{%
- \def\qMark{\if\aeb@multipart\eq@Zero\aeb@creditmarkup
- \stepcounter{qMarkCnt}\else\global\let\aeb@multipart\eq@Zero\fi}%
- \def\qMark@Hook{\aeb@creditmarkupfmt}%
-}
+ \def\qMark{\if\aeb@multipart\eq@Zero\aeb@creditmarkup
+ \stepcounter{qMarkCnt}\else\global\let\aeb@multipart\eq@Zero\fi}%
+ \def\qMark@Hook{\aeb@creditmarkupfmt}}
\def\hideCreditMarkup{\global\let\qMark@Hook\@empty}
\newcommand{\aeb@creditmarkupfmt}{\makebox[0pt][r]{\qMark\hspace{-2bp}}}
\long\def\gobbleToEndQt#1\endeqQt{\ifeqforpaper\expandafter\@gobble\fi}
\long\def\gobbleToEndSQt#1\endeqSQt{%
- \ifeqforpaper\expandafter\@gobble\fi}
+ \ifeqforpaper\expandafter\@gobble\fi}
\newcommand\inclQtFilter[1]{\def\eqarg{#1}\ifx\eqarg\eqFilterArg
- \else\expandafter\gobbleToEndQt\fi}
+ \else\expandafter\gobbleToEndQt\fi}
\newcommand{\exclQt}[1]{\gobbleToEndQt}
-\newcommand{\useQtFilter}{%
- \let\eqQt\inclQtFilter\let\eqSQt\exclSQt
-}
+\newcommand{\useQtFilter}{\let\eqQt\inclQtFilter
+ \let\eqSQt\exclSQt}
\newcommand\inclSQtFilter[1]{\def\eqarg{#1}\ifx\eqarg\eqFilterArg
- \else\expandafter\gobbleToEndSQt\fi}
+ \else\expandafter\gobbleToEndSQt\fi}
\newcommand{\exclSQt}[1]{\gobbleToEndSQt}
\newcommand{\useSQtFilter}{\let\eqSQt\inclSQtFilter\let\eqQt\exclQt}
\newcommand{\sqbookmarkfmt}{Short Quiz \@shortquizCnt.\space}
\newcommand{\qzbookmarkfmt}{Quiz \@quizCnt.\space}
\newcommand{\quizpdfbookmark}[1]{\relax\def\argi{#1}%
- \if\eqQuizType\isSQZ\edef\aeb@bmmrkdest{sqbm.\@shortquizCnt}%
- \def\aeb@thisbkmrkfmt{\sqbookmarkfmt}\else
- \edef\aeb@bmmrkdest{qzbm.\@quizCnt}%
- \def\aeb@thisbkmrkfmt{\qzbookmarkfmt}\fi
- \def\quizpdfbookmarktitle{#1}%
- \def\eqex@next{\belowpdfbookmark{\aeb@thisbkmrkfmt#1}%
- {\aeb@bmmrkdest}}%
- \ifx\aebTitleQuiz\@empty\else\ifx\argi\@empty
- \def\quizpdfbookmarktitle{\aebTitleQuiz}%
- \def\eqex@next{\belowpdfbookmark{\aebTitleQuiz}%
- {\aeb@bmmrkdest}}\fi\fi
- \eqex@next\ignorespaces
+ \if\eqQuizType\isSQZ\edef\aeb@bmmrkdest{sqbm.\@shortquizCnt}%
+ \def\aeb@thisbkmrkfmt{\sqbookmarkfmt}\else
+ \edef\aeb@bmmrkdest{qzbm.\@quizCnt}%
+ \def\aeb@thisbkmrkfmt{\qzbookmarkfmt}\fi
+ \def\quizpdfbookmarktitle{#1}%
+ \def\eqex@next{\belowpdfbookmark{\aeb@thisbkmrkfmt#1}%
+ {\aeb@bmmrkdest}}%
+ \ifx\aebTitleQuiz\@empty\else\ifx\argi\@empty
+ \def\quizpdfbookmarktitle{\aebTitleQuiz}%
+ \def\eqex@next{\belowpdfbookmark{\aebTitleQuiz}%
+ {\aeb@bmmrkdest}}\fi\fi
+ \eqex@next\ignorespaces
}
\def\pushEnvir{\xdef\eq@currenvir{\@currenvir}\endgroup}
\def\popEnvir{\begingroup\@endpefalse
@@ -2474,20 +2448,20 @@
\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[]}}}
+ \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
@@ -2508,66 +2482,63 @@
{\@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}%
-}
+ \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}}
+ {\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{ifwithsoldoc}{\newif\ifwithsoldoc\withsoldocfalse}{}
+\@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
-}
+ \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{ifwithsoldoc}
- {\refstepcounter{quizno}}{\ifwithsoldoc\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}%
-% \settowidth{\labelsep}{\eq@hspanner}%
- \def\Ans{\Ans@list}%
- }%
-}%
-{\endlist\setcounter{quizno}{0}\eq@answersEndHook}
+ \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
}
@@ -2576,11 +2547,11 @@
\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
+ \ifinner
+ \ifx\itsExerParts\eq@YES\par\removelastskip
+ \removelastparskip\vskip\aboveanswersSkip\fi
\else\par\removelastskip\removelastparskip
- \vskip\aboveanswersSkip\fi
+ \vskip\aboveanswersSkip\fi
\noindent\ifnum\exerwparts@cols>1\relax\parshape=0\fi
\tabcolsep=0pt
\eq@tmpdima=\linewidth
@@ -2644,8 +2615,8 @@
\def\linkContentWrapper{(\hfil\linkContentFormat\hfil)}%
\def\Ans@sq@l{%
\leavevmode\if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\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
@@ -2728,8 +2699,8 @@
\let\rbf@Opts\@empty
\def\Ans@sq@f{%
\if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\stepcounter{quizno}\else
+ \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}}
+ {\ifwithinsoldoc\stepcounter{quizno}\else
\refstepcounter{quizno}\fi}\fi\PBS\raggedright
\if\Ans@choice\eq@One
\def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
@@ -2802,8 +2773,8 @@
\AAmousedown{updateTally.downState=!!event.target.isBoxChecked(0);}}
\def\Ans@ck@sq@f{%
\if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\stepcounter{quizno}\else
+ \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}}
+ {\ifwithinsoldoc\stepcounter{quizno}\else
\refstepcounter{quizno}\fi}\fi\PBS\raggedright
\if\Ans@choice1%
\def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
diff --git a/texmf-dist/tex/latex/acrotex/template.def b/texmf-dist/tex/latex/acrotex/template.def
index cbe29df9..03d026b5 100644
--- a/texmf-dist/tex/latex/acrotex/template.def
+++ b/texmf-dist/tex/latex/acrotex/template.def
@@ -18,7 +18,7 @@
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesFile{template.def}
- [2018/10/03 v8.2.5 %
+ [2018/12/13 v8.2.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/web.sty b/texmf-dist/tex/latex/acrotex/web.sty
index cd41885e..0d0c8f29 100644
--- a/texmf-dist/tex/latex/acrotex/web.sty
+++ b/texmf-dist/tex/latex/acrotex/web.sty
@@ -24,7 +24,7 @@
%%---------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1997/12/01]
\ProvidesPackage{web}
- [2017/03/20 v6.0o web: A Screen Design Package (dps)]
+ [2017/12/05 v6.1.1 web: A Screen Design Package (dps)]
\RequirePackage{xkeyval}
\RequirePackage{ifpdf}[2006/02/20]
\RequirePackage{ifxetex}[2006/08/21]
@@ -577,7 +577,12 @@
\ifx\u@web@ddtoHySetup\@empty\else\edef\x{\noexpand\hypersetup
{\u@web@ddtoHySetup}}\expandafter\x\fi
\def\@pdfcreator{The AcroTeX eDucation Bundle}
-\RequirePackage{comment}
+\RequirePackage{aeb-comment}
+\def\web@commentChkMsg{\@ifpackageloaded{comment}
+ {\PackageWarningNoLine{web}
+ {The comment package is incompatible with the\MessageBreak
+ aeb-comment package, do not use the comment package}}{}}
+\AtBeginDocument{\web@commentChkMsg}
\ifnum\@usetemplates=1\relax
\def\x{\RequirePackage{graphicx}}\expandafter\x\fi
\ifnum\@usetemplates=1\relax