summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/acrotex/exerquiz.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/acrotex/exerquiz.dtx')
-rw-r--r--macros/latex/contrib/acrotex/exerquiz.dtx239
1 files changed, 130 insertions, 109 deletions
diff --git a/macros/latex/contrib/acrotex/exerquiz.dtx b/macros/latex/contrib/acrotex/exerquiz.dtx
index e1adc71345..1b65b91b18 100644
--- a/macros/latex/contrib/acrotex/exerquiz.dtx
+++ b/macros/latex/contrib/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> [2021/02/17 v8.6.4 %
+%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2021/02/21 v8.6.5 %
%<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,7 @@
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
+\usepackage{fancyvrb}
\gdef\darg#1{\texttt{\char123\relax#1\char125\relax}}
\let\env\texttt
\let\opt\texttt
@@ -100,7 +101,7 @@
%\changes{v8.6.3}{2021/01/31}{Updated documentation, informing users of \string\app{Acrobat DC} that
% it is necessary to change their \string\uif{Security (Enhanced)} preferences.}
%\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'.
+% (2017/08/08) This version introduces multi-letter variables and what I'll term `alternate appearances'.
% \changes{v8.0}{2017/08/08}{Introduce multi-letter variables and alternate appearances. Changes
% made are marked by `\texttt{dps17}' throughout the DTX.}
% \changes{v7.7k}{2016/04/18}{Minor bug fixes, improved driver recognition}
@@ -118,10 +119,10 @@
% Introduce a number of useful options for \pkg{exerquiz}.
% \subsection{Options for paper, solutions, JavaScript and preview}
% \begin{macrocode}
-% Begin package segment
%<*package>
\usepackage{keyval}
% \end{macrocode}
+% Some early required packages.
%\changes{v6.4t}{2012/06/18}{Added ifpdf as a required package}
%\changes{v8.1a}{2017/09/03}{Added check for luatex}
% \begin{macrocode}
@@ -140,8 +141,8 @@
% \begin{macrocode}
\DeclareOption{noxcolor}{\def\eq@ColorPackage{color}}
% \end{macrocode}
-% \leavevmode\IndexOpt{forpaper}\IndexOpt{forcolorpaper}^^A
-% Pass the |monochrome| option to the color package
+% \leavevmode\IndexOpt{forpaper}^^A
+% Pass the \opt{monochrome} option to the color package
%\changes{v6.06a}{2007/04/09}
%{
% Added the \texttt{forcolorpaper} option for those using
@@ -150,11 +151,14 @@
% \begin{macrocode}
\DeclareOption{forpaper}{%
\eqforpapertrue\PassOptionsToPackage{monochrome}{\eq@ColorPackage}
- \AtBeginDocument{\ifnum\eq@drivernum=4 \else\AllowPeeking\fi}
-}
-\DeclareOption{forcolorpaper}{\eqforpapertrue % for print
- \AtBeginDocument{\ifnum\eq@drivernum=4 \else\AllowPeeking\fi}
-}
+ \AtBeginDocument{\AllowPeeking}}
+% \end{macrocode}
+% \leavevmode\IndexOpt{forcolorpaper}^^A
+% The \opt{forcolorpaper} is the same as \opt{forpaper}, but does not
+% pass the \pkg{monochrome} option to the color package.
+% \begin{macrocode}
+\DeclareOption{forcolorpaper}{\eqforpapertrue
+ \AtBeginDocument{\AllowPeeking}}
% \end{macrocode}
% \leavevmode\IndexOpt{preview}^^A
% With this option, the bounding boxes of all form fields appear in the
@@ -193,7 +197,7 @@
% \begin{macrocode}
\DeclareOption{nohiddensolutions}{\eq@globalshowsolutionstrue}
\DeclareOption{noHiddensolutions}%
- {\eq@globalshowsolutionstrue\AtBeginDocument{\def\Hidesymbol{h}}}
+ {\eq@globalshowsolutionstrue\AtBeginDocument{\def\Hidesymbol{h}}}
% \end{macrocode}
% \leavevmode\IndexOpt{solutionsafter}^^A
% Solutions will appear after the statement of the exercise.
@@ -205,7 +209,7 @@
%\changes{v6.2f}{2007/12/21}{Added a solutionsonly option}
% \begin{macrocode}
\DeclareOption{solutionsonly}{\solutionsonlytrue\answerkeytrue
- \therearesolutionstrue\AtEndOfPackage{\let\exerSolnsHeadnToc\relax}}
+ \therearesolutionstrue\AtEndOfPackage{\let\exerSolnsHeadnToc\relax}}
% \end{macrocode}
% \changes{v8.1k}{2018/02/04}{Added \string\cs{ifanswerkey} switch}
% \begin{macrocode}
@@ -218,11 +222,11 @@
% is used.
% \begin{macrocode}
\DeclareOption{contsolns}{\AtEndOfPackage{\InputIfFileExists
- {contsolns.def}{\contsolnsInputMsg}{\contsolnsErrorMsg}}}
+ {contsolns.def}{\contsolnsInputMsg}{\contsolnsErrorMsg}}}
\def\contsolnsInputMsg{\PackageInfo{exerquiz}{contsolns option,
- inputting file contsolns.def}}
+ inputting file contsolns.def}}
\def\contsolnsErrorMsg{\PackageWarning{exerquiz}{contsolns option,
- cannot find file contsolns.def}}
+ cannot find file contsolns.def}}
% \end{macrocode}
% \leavevmode\IndexOpt{nocorrections}^^A
% The code for correcting the |quiz| environment is
@@ -250,8 +254,8 @@
% \changes{v6.3x}{2011/04/05}{Added \texttt{vspacewithsolns}}
% \begin{macrocode}
\@ifundefined{ifvspacewithsolns}{%
- \DeclareOption{vspacewithsolns}{\vspacewithsolnstrue}
- \newif\ifvspacewithsolns\vspacewithsolnsfalse
+ \DeclareOption{vspacewithsolns}{\vspacewithsolnstrue}
+ \newif\ifvspacewithsolns\vspacewithsolnsfalse
}{}
% \end{macrocode}
% \changes{v8.1m}{2018/02/09}{\string\cs{ifdisplayworkarea} conditionally defined}
@@ -269,7 +273,7 @@
% on to insdljs package.
% \begin{macrocode}
\DeclareOption{nodljs}{\PassOptionsToPackage{nodljs}{insdljs}%
- \AtEndOfPackage{\let\importdljs\eq@YES}}
+ \AtEndOfPackage{\let\importdljs\eq@YES}}
% \end{macrocode}
% \leavevmode\IndexOpt{execAfter}^^A
% Execute any JS defined within the \texttt{execJS} environment. Works only for
@@ -296,26 +300,26 @@
% \begin{macrocode}
\DeclareOption{allowrandomize}{\AtEndOfPackage{\inputRandomizeChoices}}
\def\inputRandomizeChoices{\InputIfFileExists{aebrandom.def}
- {\PackageInfo{exerquiz}{inputting aebrandom.def}}
- {cannot find aebrandom.def}}
+ {\PackageInfo{exerquiz}{inputting aebrandom.def}}
+ {cannot find aebrandom.def}}
% \end{macrocode}
% \leavevmode\IndexOpt{usesumrytbls}^^A
% The declare the use of summary tables
% \begin{macrocode}
\newif \ifusesumrytbls \usesumrytblsfalse
\DeclareOption{usesumrytbls}{\usesumrytblstrue
- \def\inputSumryTblCode{\InputIfFileExists{aebsumrytbls.def}
- {\PackageInfo{exerquiz}{inputting aebsumrytbls.def}}%
- {cannot find aebsumrytbls.def}}}
+ \def\inputSumryTblCode{\InputIfFileExists{aebsumrytbls.def}
+ {\PackageInfo{exerquiz}{inputting aebsumrytbls.def}}%
+ {cannot find aebsumrytbls.def}}}
\let\inputSumryTblCode\relax
% \end{macrocode}
% The \IndexOpt{usemcfi}\texttt{usemcfi} option inputs special code for creating a MC/math fill-in question, a type
% of question suggested to me by Stefka K.\ of Bulgaria.
% \begin{macrocode}
\DeclareOption{usemcfi}{%
- \def\inputMCFICode{\InputIfFileExists{usemcfi.def}
- {\PackageInfo{exerquiz}{inputting usemcfi.def}}%
- {cannot find usemcfi.def}}}
+ \def\inputMCFICode{\InputIfFileExists{usemcfi.def}
+ {\PackageInfo{exerquiz}{inputting usemcfi.def}}%
+ {cannot find usemcfi.def}}}
\let\inputMCFICode\relax
% \end{macrocode}
% \changes{v7.7o}{2016/07/08}{Added switch \string\cs{ifwithinMCFI}}
@@ -334,12 +338,12 @@
% \begin{macrocode}
% \def\eq@drivernum{5} % 5 = no choice
\DeclareOption{dvipsone}{%
- \def\eq@drivernum{0}\def\eq@driver{dvipsone}%
- \PassOptionsToPackage{dvipsone}{eforms}
+ \def\eq@drivernum{0}\def\eq@driver{dvipsone}
+ \PassOptionsToPackage{dvipsone}{eforms}
}
\DeclareOption{dvips}{%
- \def\eq@drivernum{0}\def\eq@driver{dvips}%
- \PassOptionsToPackage{dvips}{eforms}
+ \def\eq@drivernum{0}\def\eq@driver{dvips}
+ \PassOptionsToPackage{dvips}{eforms}
}
\DeclareOption{pdftex}{%
\def\eq@drivernum{1}\def\eq@driver{pdftex}%
@@ -351,7 +355,7 @@
%\changes{v8.1a}{2017/09/03}{Added a \string\texttt{luatex} option}
% \begin{macrocode}
\DeclareOption{luatex}{%
- \def\eq@drivernum{1}\def\eq@driver{luatex}%
+ \def\eq@drivernum{1}\def\eq@driver{luatex}
\PassOptionsToPackage{luatex}{\eq@ColorPackage}
\PassOptionsToPackage{luatex}{eforms}
}
@@ -361,44 +365,46 @@
% environments.
% \begin{macrocode}
\DeclareOption{dvipdfm}{%
- \def\eq@drivernum{2}\def\eq@driver{dvipdfm}%
- \PassOptionsToPackage{dvipdfm}{\eq@ColorPackage}%
+ \def\eq@drivernum{2}\def\eq@driver{dvipdfm}
+ \PassOptionsToPackage{dvipdfm}{\eq@ColorPackage}
\PassOptionsToPackage{dvipdfm}{eforms}%
}
\DeclareOption{dvipdfmx}{%
- \def\eq@drivernum{2}\def\eq@driver{dvipdfmx}%
- \PassOptionsToPackage{dvipdfmx}{\eq@ColorPackage}%
- \PassOptionsToPackage{dvipdfmx}{eforms}%
+ \def\eq@drivernum{2}\def\eq@driver{dvipdfmx}
+ \PassOptionsToPackage{dvipdfmx}{\eq@ColorPackage}
+ \PassOptionsToPackage{dvipdfmx}{eforms}
}
\DeclareOption{xetex}{%
- \def\eq@drivernum{2}\def\eq@driver{xetex}%
+ \def\eq@drivernum{2}\def\eq@driver{xetex}
\PassOptionsToPackage{xetex}{\eq@ColorPackage}
- \PassOptionsToPackage{xetex}{eforms}%
+ \PassOptionsToPackage{xetex}{eforms}
}
% \end{macrocode}
% \leavevmode\IndexOpt{textures}^^A
% This option, and testing are due to Ross Moore 3/6/02
% \begin{macrocode}
-\DeclareOption{textures}{\def\eq@drivernum{3}%
- \def\eq@driver{textures}%
- \PassOptionsToPackage{textures}{\eq@ColorPackage}%
- \PassOptionsToPackage{textures}{eforms}%
+\DeclareOption{textures}{\def\eq@drivernum{3}
+ \def\eq@driver{textures}
+ \PassOptionsToPackage{textures}{\eq@ColorPackage}
+ \PassOptionsToPackage{textures}{eforms}
}
% \end{macrocode}
% \leavevmode\IndexOpt{dviwindo}^^A
% Set \cmd{\eq@noformstrue}, this inserts an \cmd{\endinput} just after
-% the end of the |exercise| environment. No quizzes for
+% the end of the \env{exercise} environment. No quizzes for
% \texttt{dviwindo}.
% \begin{macrocode}
-\DeclareOption{dviwindo}{\def\eq@drivernum{4}\def\eq@driver{dviwindo}%
- \eq@noformstrue\PassOptionsToPackage{nodljs}{insdljs}}
+\DeclareOption{dviwindo}{\def\eq@drivernum{4}\def\eq@driver{dviwindo}
+ \eq@noformstrue\PassOptionsToPackage{nodljs}{insdljs}}
% \end{macrocode}
-% If no driver is passed to \textsf{exerquiz}, assume it is
-% dvipsone or dvips---\textsf{hyperref} defines the specials.
+% If no driver is passed to \pkg{exerquiz}, assume it is
+% dvipsone or dvips---\pkg{hyperref} defines the specials.
% Default driver dvipsone/dvips
-% \def\eq@drivernum{5}
-% \def\eq@driver{dvipsone/dvips}
-% \def\eq@driver{no driver specified}
+% \begin{macrocode}
+\def\eq@drivernum{5}
+\def\eq@driver{dvipsone/dvips}
+\def\eq@driver@nodriver{no driver specified}
+% \end{macrocode}
% \leavevmode\IndexOpt{unicode}^^A
% Passes the unicode option to \textsf{hyperref}.
% \changes{v6.3}{2008/03/19}
@@ -1324,7 +1330,8 @@
\ifOKToWriteExamData
\set@display@protect
\immediate\write\ex@solns{#1}\set@typeset@protect
- \fi\fi}%
+ \fi\fi
+}
\ifsolutionsonly
\InputIfFileExists{\jobname_xdefs.cut}{%
\typeout{^^JExerquiz|Eqexam: Reading \jobname_xdefs.cut^^J}}
@@ -1363,13 +1370,14 @@
% 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}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\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
@@ -1445,11 +1453,12 @@
% (2017/01/11) Added \DescribeMacro{\numberParts}\cs{numberParts} to change how this counter is displayed
% as a number. The default is \DescribeMacro{\alphaParts}\cs{alphaParts} to display the \texttt{partno}
% counter as a letter.
-%\begin{verbatim}
-% \renewcommand{\partnoFmt}{\arabic}
-% \setPartsWidth{(00)}
-% \partsformat{\makebox[\widthOfParts][c]{(\hfil\thepartno\hfil)}}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\renewcommand{\partnoFmt}{\arabic}
+%\setPartsWidth{(00)}
+%\partsformat{\makebox[\widthOfParts][c]{(\hfil\thepartno\hfil)}}
+%\end{Verbatim}
% With this code, the items in the \texttt{parts} environment are numbered.
% \changes{v7.8d}{2017/01/11}{Added \string\cs{partnoFmt} to change how this counter is displayed}
% \begin{macrocode}
@@ -1591,22 +1600,25 @@
% links connect the statement of the exercise with its solution.
%
%\smallskip\noindent\textbf{Basic usage}
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\begin{exercise}
%The exercise question is posed.
%\begin{solution}
%The solution to exercise goes here.
%\end{solution}
%\end{exercise}
-%\end{verbatim}
+%\end{Verbatim}
% These environments should be nested as illustrated above.
%
% The \texttt{exercise} environment has three optional arguments. The syntax
% for an exercise without parts is\dots
-%\begin{verbatim}
-% \begin{exercise}[<ctr>][h|H] ...\end{exercise}
-%\end{verbatim}%
-%
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\begin{exercise}[!ameta(ctr)][h|H]
+%...
+%\end{exercise}
+%\end{Verbatim}
% (1) The value of this first optional argument, \texttt{<ctr>}, is a counter.
% You can use the \texttt{exercise}
% environment then to create other environments with their own
@@ -1622,11 +1634,11 @@
%
% The \texttt{exercise} environment has three optional arguments. The syntax
% for an exercise with parts is\dots
-%\begin{verbatim}
-% \begin{exercise}[<ctr>]* ...\end{exercise}
-% \begin{exercise*}[<ctr>] ...\end{exercise*}
-%\end{verbatim}%
-%
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\begin{exercise}[!ameta(ctr)]* ...\end{exercise}
+%\begin{exercise*}[!ameta(ctr)] ...\end{exercise*}
+%\end{Verbatim}
% (1) The value of this first optional argument, \texttt{<ctr>}, is a counter.
% You can use the \texttt{exercise}
% environment then to create other environments with their own
@@ -1651,13 +1663,14 @@
% in an external document. The \cs{exerSolnsInExtFile} command lets you specify an external file name.
% Just use the \textit{basename}, hyperref will add the extension. If an external file is specified, all
% solution links are changed to links between documents. Usage:
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\exerSolnsInExtFile{myExSonls}
-%\end{verbatim}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand{\exerSolnsInExtFile}[2][]
- {\let\exerSolns@ExtFile\eq@YES\gdef\eq@exerSolns@fileName{#2}%
- \gdef\exerSolns@ReturnPath{#1}}
+ {\let\exerSolns@ExtFile\eq@YES\gdef\eq@exerSolns@fileName{#2}%
+ \gdef\exerSolns@ReturnPath{#1}}
\let\exerSolns@ExtFile\eq@NO
\def\exerSolns@ReturnPath{}
%</package>
@@ -1753,16 +1766,17 @@
% The \env{cq} environment is \cs{let} to the \env{cq@CQ} environment at the beginning of
% the \env{exercise} environment, \env{cq@CQ} begin the internal name of the environment.
% \par\medskip\noindent\textbf{Example}
-%\begin{verbatim}
-% \begin{exercise}
-% \begin{cq}
-% This is the question
-% \end{cq}
-% \begin{solution}
-% This is its solution
-% \end{solution}
-% \end{exercise}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\begin{exercise}
+%\begin{cq}
+%!quad(This is the question)
+%\end{cq}
+%\begin{solution}
+%!quad(This is the question)
+%\end{solution}
+%\end{exercise}
+%\end{Verbatim}
% \begin{macrocode}
\let\cq@star\eq@NO
% \end{macrocode}
@@ -1877,7 +1891,8 @@
% formatting after the copied question; in the default definition, we skip a \cs{medskip} and do a \cs{indent}.
% Trailing the string \cs{cqSStr}, the internal command defined by \cs{declCQSolnStr}, is a space and
% an \cs{ignorespaces}. Use \cs{writeToExSolns} to make local changes, for example,
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%...
%\end{exercise}
% Changed the string from Solution to Answer, do this prior to the
@@ -1886,7 +1901,7 @@
%
%\begin{exercise*}
%...
-%\end{verbatim}
+%\end{Verbatim}
%Best placed between exercises.
% \begin{macrocode}
\newcommand\declCQPre[1]{\def\cq@Pre{#1}}
@@ -2040,12 +2055,7 @@
% package should be loaded after \textsf{eqexam} if the two are to be used
% together, preferably by the \texttt{links} or \texttt{online} options of \textsf{eqexam}.
% \begin{macrocode}
-%\newif\iffirstitem
\let\solnItemMngt\relax
-%\def\eqeSolnItemMngt{\iffirstitem\global\firstitemfalse
-% \let\eqe@next\@empty\else\let\eqe@next\item\fi\eqe@next\relax}
-%\@ifpackageloaded{eqexam}{\let\solnItemMngt\eqeSolnItemMngt}
-% {\let\solnItemMngt\relax}
% \end{macrocode}
% \end{macro}
% \DescribeMacro{\eqEXt}These two mark the beginning and end of solution to an exercise. \cs{eqEXt} is
@@ -2055,7 +2065,6 @@
%\changes{v6.7}{2013/04/07}{Changing \cs{eqEXt} so that it has two
%required arguments}
% \begin{macrocode}
-%\let\eqEXt\@gobble
\let\eqEXt\@gobbletwo
\let\endeqEXt\relax
% \end{macrocode}
@@ -2067,14 +2076,15 @@
\let\eqFilterArg\@empty
% \end{macrocode}
% The format of the solutions to exercises as they appear in the SOL file is,
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\eqEXt{\eqExtArg}{\eqFilterArg}\exerSolnHeader
-% {\exsecrunhead}{ex.1}{\textbf{Exercise\ 1.}}\relax
-% ...
-% <solution content>
-% ...
+%!quad{\exsecrunhead}{ex.1}{\textbf{Exercise\ 1.}}\relax
+%!quad...
+%!quad!ameta(solution content)
+%!quad...
%\ReturnTo{qex.1}{\hbox {$\square $}}\endeqEXt\par\medskip
-%\end{verbatim}
+%\end{Verbatim}
% \changes{v6.7a}{2013/05/03}{Change name of \cs{eq@writeexheader} to \cs{eqExerSolnHeader}}
% \begin{macrocode}
\let\eqExerSolnHeader\@empty
@@ -2094,9 +2104,9 @@
\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}
+ \def\eq@pslnaindnt{0pt}\let\eq@setPrbSolnAftrIndnt\relax\else
+ \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
@@ -4996,7 +5006,7 @@ else {
% \begin{macrocode}
DisplayQuizResults("*curr@quiz",*theeqpointvalue,%
*thequestionno,bDisplaySilent);
- bDisplaySilent=false;
+ bDisplaySilent=false;
var h=this.getField("ScoreData.*curr@quiz");
h.value=Score+";"+NQuestions+";"%
+ptScore+";"+NPointTotal;%
@@ -6237,6 +6247,9 @@ if( qzSolnDest!="") updateTally("*oField.*thequestionno");%
%</package>
%<*package|eqexam>
\let\rbf@Opts\@empty
+% \end{macrocode}
+% The \cs{Ans} for a short-quiz, using forms.
+% \begin{macrocode}
\def\Ans@sq@f{\if\eq@listType\eq@One
\stepcounter{quizno}\else
\@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}}
@@ -6803,9 +6816,12 @@ updateTally("*oField.*thequestionno");*fi%
{\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi}
%</package|eqexam>
%<*package>
+% \end{macrocode}
+% The \cs{Ans} command for a quiz using forms.
+% \begin{macrocode}
\def\Ans@@f{%
\settowidth{\eq@tmplength}{\eq@lw@f}%
- \hangindent=\eq@tmplength\hangafter=1
+ \hangindent=\eq@tmplength\hangafter=\@ne
\bottomOfAnsfStack\insertGrayLetters
\edef\rbf@Opts{\ifaeb@usecircles\else
\noexpand\symbolchoice{\qz@chksymb}\fi
@@ -8528,7 +8544,7 @@ if(event.willCommit) {
\else\eqObjAlertIfFalse\fi\fi\fi}
\def\eqAppAlert{eqAppAlert}
% \end{macrocode}
-% Keystroke action for \cs{RespBoxTxt}
+% Keystroke action for \cs{RespBoxTxt} for a quiz
% \changes{v8.6.4}{2021/02/15}{Corrected coding of \string\cs{AAKqRespBoxTxt}, wrong
% escape char}
% \begin{macrocode}
@@ -8557,6 +8573,11 @@ if (!isQuizInitialized("*currQuiz")) {
\noexpand\Ff{\FfReadOnly}\fi\fi\fi
}%
}
+% \end{macrocode}
+% The keystroke action for \cs{RespBoxTxt} for a short-quiz
+% \changes{v8.6.5}{2021/02/21}{Removed comment character from last line
+% of \string\cs{rbtAAKey}}
+% \begin{macrocode}
\begin{defineJS}[\makeesc\!\makecmt\%]{\rbtAAKey}
if(event.willCommit) {
var retn = ProcRespTxt(!rbTxtAlt);%
@@ -8564,7 +8585,7 @@ if(event.willCommit) {
!RespBoxTxtOnBlur!fi
}%
!ifx!eqAddAAKeystroke!@empty!else%
-!eqAddAAKeystroke!fi%
+!eqAddAAKeystroke!fi
\end{defineJS}
\def\@@RespBoxTxtActions{%
\AA{\if\eqQuizType\isQZ