summaryrefslogtreecommitdiff
path: root/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'texmf-dist')
-rw-r--r--texmf-dist/doc/latex/acrotex/README.md26
-rw-r--r--texmf-dist/doc/latex/acrotex/acrobat-in-workflow.pdfbin369266 -> 370660 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/acrobat-in-workflow.tex9
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb_man.pdfbin2117711 -> 2254268 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb_man.tex1169
-rw-r--r--texmf-dist/doc/latex/acrotex/eformman.pdfbin984871 -> 999978 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/eformman.tex386
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jquiztst.pdfbin245005 -> 354518 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jquiztst.tex4
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jtxttst.pdfbin319897 -> 320860 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/webeqtst.pdfbin485009 -> 331712 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/install_jsfiles.pdfbin236764 -> 237391 bytes
-rw-r--r--texmf-dist/source/latex/acrotex/acrotex.ins1
-rw-r--r--texmf-dist/source/latex/acrotex/dljslib.dtx321
-rw-r--r--texmf-dist/source/latex/acrotex/eforms.dtx78
-rw-r--r--texmf-dist/source/latex/acrotex/exerquiz.dtx1273
-rw-r--r--texmf-dist/source/latex/acrotex/exerquiz.ins3
-rw-r--r--texmf-dist/source/latex/acrotex/insdljs.dtx551
-rw-r--r--texmf-dist/source/latex/acrotex/web.dtx259
-rw-r--r--texmf-dist/tex/latex/acrotex/aebjs.def60
-rw-r--r--texmf-dist/tex/latex/acrotex/aebrandom.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/aebsumrytbls.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/dljslib.sty175
-rw-r--r--texmf-dist/tex/latex/acrotex/edvipdfm.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/eforms.sty22
-rw-r--r--texmf-dist/tex/latex/acrotex/epdfmark.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/epdftex.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/exerquiz.sty454
-rw-r--r--texmf-dist/tex/latex/acrotex/insdljs.sty56
-rw-r--r--texmf-dist/tex/latex/acrotex/pdfdochex.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/rbmintrvl.def29
-rw-r--r--texmf-dist/tex/latex/acrotex/setcorder.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/template.def2
-rw-r--r--texmf-dist/tex/latex/acrotex/uieforms.def6
-rw-r--r--texmf-dist/tex/latex/acrotex/web.sty59
-rw-r--r--texmf-dist/tex/latex/acrotex/webpro.def6
36 files changed, 3064 insertions, 1899 deletions
diff --git a/texmf-dist/doc/latex/acrotex/README.md b/texmf-dist/doc/latex/acrotex/README.md
index b4795599..c3b3e38f 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 (AeB)
Author: D. P. Story
-Dated: 2021-02-17
+Dated: 2021-05-10
AeB contains the following:
@@ -19,9 +19,33 @@ AeB contains the following:
6) Documentation for AeB (AcroTeX eDucatation Bundle) and eforms
(including insdljs and dljslib).
+What's New (2021-05-10)
+ web: added navibar* option
+ exerquiz: new option usealtadobe is passed to insdljs
+ new option userbmintrvl, see http://www.acrotex.net/blog/?p=1482
+ shortquiz: Enhanced user experience, see http://www.acrotex.net/blog/?p=1489
+ and http://www.acrotex.net/blog/?p=1493.
+
+ Other new demo files:
+ eqexam: A Matching-type Problem: http://www.acrotex.net/blog/?p=1457
+ exerquiz
+ Matching-type questions: http://www.acrotex.net/blog/?p=1446
+ Randomized matching-type questions: http://www.acrotex.net/blog/?p=1449
+ A spell checking feature: http://www.acrotex.net/blog/?p=1437
+ insdljs: Exploring the defineJS environment: http://www.acrotex.net/blog/?p=1442
+
+What's New (2021-04-24)
+ exerquiz: Options usemcfi and userbmintrvl, bug fixes.
+ dljslib: Revised useGermanNums, created alias of useDeNums, see http://www.acrotex.net/blog/?p=1039
+ new option useEnNums, a companion to useDeNums, http://www.acrotex.net/blog/?p=1470
+
+What's New (2021-02-28) exerquiz: bug fix to \rbtAAKey. web: removed legacy code.
+
What's New (2021-02-17) exerquiz: Added an optional fourth argument to the JavaScript
function DisplayQuizResults(), this is in support of the eq-pin2corr
package.
+
+What's New (2021-02-21) Bug fixes
What's New (2021-02-07) Minor change in the defineJS environment that is
critical to a fix in the page events environments of aeb_pro.
diff --git a/texmf-dist/doc/latex/acrotex/acrobat-in-workflow.pdf b/texmf-dist/doc/latex/acrotex/acrobat-in-workflow.pdf
index 1afda080..48751ef4 100644
--- a/texmf-dist/doc/latex/acrotex/acrobat-in-workflow.pdf
+++ b/texmf-dist/doc/latex/acrotex/acrobat-in-workflow.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/acrobat-in-workflow.tex b/texmf-dist/doc/latex/acrotex/acrobat-in-workflow.tex
index bd12bdd6..c5449528 100644
--- a/texmf-dist/doc/latex/acrotex/acrobat-in-workflow.tex
+++ b/texmf-dist/doc/latex/acrotex/acrobat-in-workflow.tex
@@ -6,12 +6,13 @@
\usepackage{graphicx}
\usepackage{fancyvrb}
-\ifpdf\else
-\def\x{%
+\ifpdf\def\x{%
+ \usepackage[T1]{fontenc}
+ \usepackage{lucidabr}}
+\else\def\x{%
\usepackage[altbullet]{lucidbry}
\usepackage[active]{srcltx}
-}\expandafter\x
-\fi
+}\fi\x
\usepackage{pifont}
diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.pdf b/texmf-dist/doc/latex/acrotex/aeb_man.pdf
index e1dd5c07..56bcb062 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 802c92c6..917be858 100644
--- a/texmf-dist/doc/latex/acrotex/aeb_man.tex
+++ b/texmf-dist/doc/latex/acrotex/aeb_man.tex
@@ -9,8 +9,16 @@
exerquiz={nocorrections},aebxmp,
dljslib={ImplMulti,limitArith,nodec,satisfyEq}
]{aeb_pro}
-%\usepackage{myriadpro}
\usepackage[altbullet]{lucidbry}
+%\usepackage[LY1]{fontenc}
+%\usepackage{myriadpro}
+%\usepackage[scaled=0.93]{helvet}
+%\usepackage[noTS1]{mtpro}
+%%\usepackage{times}
+%\usepackage{timesNRMT}
+
+%\previewOn\pmpvOn
+
\usepackage{aeb_mlink}
\usepackage{longtable,colortbl}
\usepackage{graphicx}
@@ -115,7 +123,7 @@
\sectionLayout{indent=-62.5pt,fontsize=large,color=aeb,fontfamily=sffamily}
\subsectionLayout{indent=-31.25pt,color=aeb,fontfamily=sffamily}
\subsubsectionLayout{indent=0pt,color=aeb,fontfamily=sffamily}
-\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}}
+\subsubDefaultDing{\tops{$\bullet$}{\textrm\textbullet}}
%\renewcommand{\paragraph}
% {\@startsection{paragraph}{4}{0pt}{12pt}{-3pt}{\bfseries}}
\renewcommand{\paragraph}
@@ -221,7 +229,7 @@
\def\dps{$\mbox{$\mathfrak D$\kern-.3em\mbox{$\mathfrak P$}%
\kern-.6em \hbox{$\mathcal S$}}$}
-\title{\texorpdfstring{\LARGE
+\title{\tops{\LARGE
%---------------------------------%
The \AcroEB\space(AeB)%
}{%-------------------------------%
@@ -235,10 +243,10 @@
\university{{\AcroT} Software Development Team}
\email{dpstory@acrotex.net}
\versionLabel{Dated:}
-\version{2021/02/17}
+\version{2021/05/10}
\copyrightyears{1999-\the\year}
\nocopyright
-\prepared{2021/02/17}
+\prepared{2021/05/10}
\revisionLabel{Distribution Dated:}
\copyrightStatus{True}
@@ -1095,7 +1103,7 @@ recommended that this class be used; however, {\Web} does support the
%\end{comment}
%\makeatletter\hy@bookmarksnumberedfalse\makeatother
-%\subsubsection{\texorpdfstring{}{\textbullet\space}Setting the Driver Option}
+%\subsubsection{\tops{}{\textbullet\space}Setting the Driver Option}
%\makeatletter\hy@bookmarksnumberedtrue\makeatother
\subsection{Setting the Driver Option}\label{sss:driver}
@@ -1124,7 +1132,7 @@ tested using the \Y&Y\ \TeX\ System for the
(\url{www.miktex.org}) for the \texttt{dvips}, \texttt{pdftex} (which includes lua(la)tex),
\texttt{dvipdfm}, \texttt{dvipdfmx}, and \texttt{xetex}
-%\subsubsection{The \texorpdfstring{\protect\texttt{pdftex}}{pdftex} Option}
+%\subsubsection{The \tops{\protect\texttt{pdftex}}{pdftex} Option}
%
%
%The \texttt{pdftex} option requires \pkg{hyperref} version 6.60
@@ -1383,7 +1391,7 @@ creates a document with dimensions of \texttt{designv}, $6\,\text{in} \times 4.
their parameters. To define a custom screen size, therefore, do
not specify a screen design option for \pkg{web}.\endredpoint
-\subsection{\texorpdfstring{\protect\cs{setScreensizeFromGraphic}}{\CMD{setScreensizeFromGraphic}}}\label{setScreensizeFromGraphic}
+\subsection{\tops{\protect\cs{setScreensizeFromGraphic}}{\CMD{setScreensizeFromGraphic}}}\label{setScreensizeFromGraphic}
If a design is \emph{not specified} in the option list of \Web, you
can use a graphic to set the screen size with
@@ -1411,7 +1419,7 @@ It may become necessary with some graphics to use the
size will be adjusted for the panel, and the graphic will be
re-scaled appropriately.
-\subsection{Using \texorpdfstring{\protect\cs{addtoWebHeight} and \protect\cs{addtoWebWidth}}
+\subsection{Using \tops{\protect\cs{addtoWebHeight} and \protect\cs{addtoWebWidth}}
{\CMD{addtoWebHeight} and \CMD{addtoWebWidth}}}
There may be an occasion when you've chosen your design dimensions
@@ -1592,11 +1600,13 @@ specified with \cs{selectColors}, see
\subsection{Basic Information Commands}\label{ss:BIM}
-The basic information commands allows you a convenient way to enter the title and author
-of the document, as well as other information. To enter this basic information,
-just fill in the values of all the basic macros briefly described below.
+The basic information commands allows you a convenient way to enter the title
+and author of the document, as well as other information. To enter this basic
+information, just fill in the values of all the basic macros briefly
+described below.
-For example, the following is a copy of the title information for this document:
+For example, the following is a copy of the title information for this
+document:
\begin{Verbatim}[xleftmargin=\amtIndent]
% \title,\author,\subject,\keywords are sent to DocInfo
\title{The Web and Exerquiz Packages Manual of Usage}
@@ -1632,7 +1642,7 @@ macro\footnote{The code for handling PDFDocEncoding for
\pkg{hyperref} is due to Heiko Oberdiek} to avoid these kinds
of problems. For example,
\begin{Verbatim}[xleftmargin=\amtIndent]
-\title{The \texorpdfstring{$e^x$}{EXP} Function}
+\title{The \tops{$e^x$}{EXP} Function}
\end{Verbatim}
\noindent The first argument is the one that is typeset (on the title page,
the title of the document will be `The $e^x$ Function'); the
@@ -1782,7 +1792,7 @@ can be entered by using \Com{DesignTitlePageTrailer}, see
\Nameref{trailer}.\endredpoint
\subsection{Redefining
-\texorpdfstring{\protect\cs{maketitle}}{\textbackslash maketitle}}
+\tops{\protect\cs{maketitle}}{\textbackslash maketitle}}
The arguments of the \Nameref{ss:BIM} macros, as just discussed,
are used to define text macros with no parameters; for example,
@@ -1849,39 +1859,38 @@ appears on the title page. The default structure of the directory is
\end{flushleft}}
\makeatother
There are several commands that can be used to modify the directory.
-\settowidth{\aebdimen}{\cs{dirContentLink\darg{Begin \string\hyperlink\darg{\string\web@Start.1}\darg{Article}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{dirContentLink\darg{Begin \string\hyperlink\darg{\string\web@Start.1}\darg{Article}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\directoryName{Directory}
\tocName{Table of Contents}
\dirContentLink{Begin \hyperlink{\web@Start.1}{Article}}
\end{dCmd}
-\newtopic These three define the default text strings
+\eVerb These three define the default text strings
that appear. In the case of \cs{dirContentLink},
there is a built-in \cs{hyperlink} to the start of
the article.
-\settowidth{\aebdimen}{\cs{formatWordDirectory\darg{\string\bfseries\string\large}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{formatWordDirectory\darg{\string\bfseries\string\large}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\formatWordDirectory{\bfseries\large}
\formatDirectoryItems{\bfseries}
\end{dCmd}
-\newtopic The formatting of the \cs{directoryName} can be set by \cs{formatWordDirectory},
+\eVerb The formatting of the \cs{directoryName} can be set by \cs{formatWordDirectory},
the default definition is given above. The (global) formatting for the listing of the
items can be set using \cs{formatDirectoryItems}, the default is shown above.
-\settowidth{\aebdimen}{\cs{removeDirTOC\quad\string\removeDirArticle}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{removeDirTOC\quad\string\removeDirArticle}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\removeDirTOC!quad\removeDirArticle
\end{dCmd}
-\newtopic These two commands remove the ``Table of Contents'' and
+\eVerb These two commands remove the ``Table of Contents'' and
the ``Begin Article'' items from the list, respectively.
-
-\settowidth{\aebdimen}{\cs{addtoDirList\darg{\meta{new\_item}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{addtoDirList\darg{\meta{new\_item}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\addtoDirList{!meta(new_item)}
\dirTOCItem
\dirArticleItem
\end{dCmd}
-\newtopic To add a new item to the end of the directory list, use \cs{addtoDirList}, the argument
+\eVerb To add a new item to the end of the directory list, use \cs{addtoDirList}, the argument
is the new item. The other two commands \cs{dirTOCItem} and \cs{dirArticleItem} are commands
representing the first two default items. For example, typing
\begin{Verbatim}[xleftmargin=\amtIndent]
@@ -1901,14 +1910,14 @@ following
\newtopic The following are for creating some special effects around the directory,
such as putting the directory into a multicolumn format.
-\settowidth{\aebdimen}{\cs{priorDirMatter\darg{\meta{text/commands}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{priorDirMatter\darg{\meta{text/commands}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\priorDirMatter{!meta(text/commands)}
\afterDirMatter{!meta(text/commands)}
\priorDirList{!meta(text/commands)}
\afterDirList{!meta(text/commands)}
\end{dCmd}
-
+\eVerb
Below is a partial listing of the definition of \cs{webdirectory}, the internal name
for the directory. We present the code so you can see where the prior/after commands
write to.
@@ -1930,16 +1939,13 @@ the beginning of the itemize list.
A final command that may be useful is \Com{directoryhook}. It is used for manipulating
the directory as a whole.
-
-\bgroup\obeyspaces %
-\settowidth{\aebdimen}{\ttfamily{ \anglemeta{code that manipulates \#1}}}%
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\ttfamily{\qquad\ameta{code that manipulates \#1}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
\directoryhook{
- !anglemeta(code that manipulates #1)
+!qquad!ameta(code that manipulates #1)
}
\end{dCmd}
-\egroup
-\newtopic The argument of \cs{directoryhook} is some \LaTeX{} code that manipulates \texttt{\#1}, within
+\eVerb The argument of \cs{directoryhook} is some \LaTeX{} code that manipulates \texttt{\#1}, within
the argument \texttt{\#1} refers to \cs{webdirectory}, the internal name of the directory.
The following example places a colored box around the directory, and centers it on the title page.
@@ -1982,10 +1988,11 @@ document, I've set \cs{widestNumber\darg{0.00.}}, since some subsection
numbers have two digits.
\newtopic The color of the heading of the table of contents is set through
-\settowidth{\aebdimen}{\cs{tocColor\darg{\meta{named\_color}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{tocColor\darg{\meta{named\_color}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\tocColor{!meta(named_color)}
\end{dCmd}
+\eVerb
Specifying a color through this command at any time before the creation of the table of contents
will change the color of the heading. The default is blue.
@@ -1994,7 +2001,7 @@ will change the color of the heading. The default is blue.
\texttt{\hyperref[sss:latextoc]{latextoc}} option can be used.\endredpoint
\subsection{The
-\texorpdfstring{\protect\texttt{usedirectory}}{usedirectory}
+\tops{\protect\texttt{usedirectory}}{usedirectory}
Option}\label{sss:nodir}
When the \texttt{usedirectory} option is specified, a short
@@ -2009,7 +2016,7 @@ makes it appear. The \texttt{nodirectory} option is still defined,
but does nothing.\endredpoint
-\subsection{The \texorpdfstring{\protect\texttt{latextoc}}{latextoc}
+\subsection{The \tops{\protect\texttt{latextoc}}{latextoc}
Option}\label{sss:latextoc}
If you don't like the default design for the table of contents,
@@ -2041,7 +2048,7 @@ is taken. The \cs{textwidth} is \cs{paperwidth} minus \texttt{2\cs{coverpagemarg
The default value of the \emph{command} \cs{coverpagemargin} is \texttt{1\,in}.
-\subsection{The \texorpdfstring{\protect\cs{makeinlinetitle}}{\CMD{makeinlinetitle}} Command}\label{inlinetitle}
+\subsection{The \tops{\protect\cs{makeinlinetitle}}{\CMD{makeinlinetitle}} Command}\label{inlinetitle}
\aebCng[makeinlinetitle]
For some short documents,\footnote{Short documents such as white
@@ -2049,12 +2056,11 @@ papers, homework assignments, for example.} a formal title page may
not be needed or desirable. In this case, use \cs{makeinlinetitle},
the ``in-line'' title.
-\settowidth{\aebdimen}{\cs{makeinlinetitle}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{makeinlinetitle}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\makeinlinetitle
\end{dCmd}
-
-\newtopic The command, which can be redefined to your needs, has the following design:
+\eVerb The command, which can be redefined to your needs, has the following design:
\begin{center}\setlength{\tabcolsep}{0pt}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}lcr}
& \cs{webtitle} &\\
@@ -2121,14 +2127,16 @@ help you move around: the \texttt{navibar} Option, and some
\subsection{A Navigation Bar}\label{sss:navibar}
-Use the \texttt{navibar} option of \pkg{web} to add a
-navigation toolbar, as seen at the bottom of this page.
-Usage:
+Use the \opt{navibar} or \opt{navibar*} option of \pkg{web} to add a
+navigation toolbar, as seen at the bottom of this page. Usage:
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
\usepackage[!meta(driver),navibar]{web}
+\usepackage[!meta(driver),navibar*]{web}
\end{Verbatim}
-The result is the navigation bar you see at the bottom of the
-page.
+The result is the navigation bar appearing at the bottom of the page. The
+\opt{navibar*} produces the navigation bar only if the document is for the
+screen; that is, only if a paper option (\opt{forpaper} or
+\opt{forcolorpaper}) is \emph{not taken}.
\NaviBarOn\AddToShipoutPicture*{\NaviBarOff}
@@ -2168,7 +2176,7 @@ argument, a named color. The default colors are \texttt{webblue} and
\texttt{webgray}, respectively.
-\subsection{\texorpdfstring{\protect\cs{newNaviIcon}}
+\subsection{\tops{\protect\cs{newNaviIcon}}
{\textbackslash newNaviIcon}}\label{ss:newnaviicon}
The \cs{newNaviIcon} can be used to define a navigation icon.
@@ -2260,7 +2268,7 @@ the commands \Com{directionIconTextColor} and
\Com{directionIconBgColor}. Each command takes a named color as its argument;
the default values are \texttt{webblue} and \texttt{webgray}, respectively.
-\subsection{\texorpdfstring{\protect\cs{panelNaviGroup}}
+\subsection{\tops{\protect\cs{panelNaviGroup}}
{\textbackslash panelNaviGroup}}\label{ss:panelnavigroup}
When the \texttt{\hyperref[ss:lrpanel]{leftpanel}} or
@@ -2313,7 +2321,7 @@ subject to the usual restrictions on these language packages.
In this section, several paper options are discussed, and one command.
\subsection{The
-\texorpdfstring{\protect\texttt{forpaper}}{forpaper}
+\tops{\protect\texttt{forpaper}}{forpaper}
Option}\label{sss:webforpaper}
Some people may want to create exercises using the
@@ -2342,7 +2350,7 @@ Finally, there is a Boolean switch \verb+\ifeqforpaper+, which you
are free to use to refine the look your \texttt{forpaper} version.
\subsection{The
-\texorpdfstring{\protect\texttt{forcolorpaper}}{forcolorpaper}
+\tops{\protect\texttt{forcolorpaper}}{forcolorpaper}
Option}\label{forcolorpaper}
Same as the \hyperref[sss:webforpaper]{\texttt{forpaper}} option,
@@ -2350,7 +2358,7 @@ but the color operators are not turned off.
\subsection{The
-\texorpdfstring{\protect\texttt{latexlayout}}{latexlayout}
+\tops{\protect\texttt{latexlayout}}{latexlayout}
Option}\label{sss:weblatexlayout}
For those who want to go ``totally native,'' use the
@@ -2364,8 +2372,8 @@ are turned off, and the \texttt{for\-color\-option} is executed. To remove
color, you need to explicitly take the \texttt{forpaper} option.
\subsection{The
-\texorpdfstring{\protect\texttt{uselatexparts}}{uselatexparts}
-and \texorpdfstring{\protect\texttt{uselatexchapters}}{uselatexchapters}
+\tops{\protect\texttt{uselatexparts}}{uselatexparts}
+and \tops{\protect\texttt{uselatexchapters}}{uselatexchapters}
Options}
As described in \hyperref[partsChaptersDots]{section~\ref*{partsChaptersDots}},
@@ -2379,7 +2387,7 @@ want to use another package to define the look of the table of contents or
of the \cs{part} and \cs{chapter} commands. (The other sectioning comments can be overridden
as well, but any controls provided by the \texttt{extended} option will be lost.)
-\subsection{The \texorpdfstring{\protect\cs{useFullWidthForPaper}}
+\subsection{The \tops{\protect\cs{useFullWidthForPaper}}
{\CMD{useFullWidthForPaper}} Command}
We introduce a command of resetting the page layout paper \emph{when
@@ -2408,39 +2416,40 @@ When the \texttt{forpaper} option is used, the switch
this switch, to get different content for the printed page or the
screen page, or you can use the convenience command \cs{prtscr}:
-\settowidth{\aebdimen}{\cs{prtscr\darg{\meta{print\_text}}\darg{\meta{screen\_text}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{prtscr\darg{\meta{print\_text}}\darg{\meta{screen\_text}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\prtscr{!meta(print_text)}{!meta(screen_text)}
\end{dCmd}
+\endgroup
\CmdDescription This command expands to \meta{print\_text} if the \texttt{forpaper} option
is taken and to \meta{screen\_text} if not.
The \cs{prtscr} command is useful for small changes in content, not
involving verbatim text or paragraph breaks. {\Web} defines two additional environments,
\texttt{forpaper} and \texttt{forscreen}.
-\settowidth{\aebdimen}{\cs{begin\darg{forscreen}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{begin\darg{forscreen}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\begin{forscreen}
....
....
....
\end{forscreen}
\end{dCmd}
-
+\endgroup
\EnvLoc Anywhere.
\newtopic Use the \texttt{forscreen} environment to insert commands or content meant only for
the screen.
-\settowidth{\aebdimen}{\cs{begin\darg{forpaper}}}
-\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{begin\darg{forpaper}}}
+\begin{dCmd}{\bxSize}
\begin{forpaper}
....
....
....
\end{forpaper}
\end{dCmd}
-
+\endgroup
\EnvLoc Anywhere.
\newtopic Use the \texttt{forpaper} environment to insert commands
@@ -2449,11 +2458,11 @@ or content meant only for the paper document.
\newtopic Another command, \cs{NewPage}, is useful for formatting
the same document for print as well as screen
-\settowidth{\aebdimen}{\cs{NewPage}}
-\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{NewPage}}
+\begin{dCmd}{\bxSize}
\NewPage
\end{dCmd}
-
+\endgroup
\CmdLoc Anywhere.
\CmdDescription This command expands to \cs{newpage} if the
@@ -2607,11 +2616,11 @@ always be rebuilt using \cs{buildpanel}.\endredpoint
\Com{minPanelWidth} command, the default size is 1in; that is,
\verb!\minPanelWidth{1in}! is executed by the package at start up.
-\settowidth{\aebdimen}{\cs{minPanelWidth\darg{\meta{length}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{minPanelWidth\darg{\meta{length}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\minPanelWidth{!meta(length)}
\end{dCmd}
-
+\endgroup
\CmdLoc You can reset the minimal width by executing the
command in the preamble before the \cs{screenwidth} and \cs{margins}
commands. Or, place it in the \texttt{web.cfg}.
@@ -2704,7 +2713,7 @@ pairs.
\end{questions}
Details provided in subsequent sections.
-\subsection{\texorpdfstring{\protect\cs{DeclareDocInfo}}{\CMD{DeclareDocInfo}}}\label{docinfo}
+\subsection{\tops{\protect\cs{DeclareDocInfo}}{\CMD{DeclareDocInfo}}}\label{docinfo}
The preamble of your document should contain a number of keys that
identify the document, including the title and author of the
@@ -2719,11 +2728,11 @@ Information is passed through the \cs{DeclareDocInfo} command which
takes a number of key-value pairs. This is a simple \textsf{xkeyval}
interface to many of the text macros that are defined in \Web.
-\settowidth{\aebdimen}{\cs{DeclareDocInfo\darg{\meta{KV-pairs}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{DeclareDocInfo\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\DeclareDocInfo{!meta(KV-pairs)}
\end{dCmd}
-
+\endgroup
\CmdLoc Place in the preamble.
\KVP The following is a description of the key value pairs.
@@ -2819,9 +2828,9 @@ descriptionwriter={A good, well-liked guy}
customProperties={name=Developer,value={D. P. Story, Esq.}}
{name=Motivator,value=J\u00FCrgen Gilg}
\end{Verbatim}
-Executing \texttt{this.info.Developer} returns the value of
-\texttt{"D. P. Story, Esq."}, while, \texttt{this.info.Motivator} returns
-\texttt{"J\"{u}rgen Gilg"}.
+Executing \texttt{this.info.Developer} returns the string value of \uif{D. P.
+Story, Esq.}, while, \texttt{this.info.Motivator} returns \uif{J\"{u}rgen
+Gilg}.
\end{enumerate}
@@ -2848,7 +2857,7 @@ authors={D. Story,J. Gilg},
You can do the same thing, with the \texttt{author} key only by using
the \cs{texorpdfstring} command of \texttt{hyperref}:
\begin{Verbatim}[xleftmargin=\amtIndent]
-author={\texorpdfstring{Dr. D. P. Story, Herr J. Gilg}
+author={\tops{Dr. D. P. Story, Herr J. Gilg}
{D. Story,J. Gilg}},
\end{Verbatim}
The difference is that with \texttt{authors}, individual authors are accessible
@@ -2901,7 +2910,7 @@ from the {\AcroBlog} website. The source file \texttt{web\_pro.tex} is
attached to the PDF, illustrates this command.
-\subsection{\texorpdfstring{\protect\cs{DeclarePageLayout}}{\CMD{DeclarePageLayout}}}\label{pagelayout}
+\subsection{\tops{\protect\cs{DeclarePageLayout}}{\CMD{DeclarePageLayout}}}\label{pagelayout}
The \Com{DeclarePageLayout} command gathers together many page
layout parameters, both for {\LaTeX} and for {\Web}, into one
@@ -3002,7 +3011,7 @@ or not.
\end{enumerate}
\subsection{The Title Page:
- \texorpdfstring{\protect\cs{maketitle}}{\CMD{maketitle}}}\label{maketitlepro}
+ \tops{\protect\cs{maketitle}}{\CMD{maketitle}}}\label{maketitlepro}
In this section, we described the enhanced features for controlling the title page.
@@ -3102,13 +3111,13 @@ defines three commands \cs{universityLayout}, \cs{titleLayout}, and
\texttt{aebpro\_ex2.tex}, attached to the PDF, is a working example of the
commands that follow.
-\settowidth{\aebdimen}{\cs{universityLayout\darg{\meta{KV-pairs}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{universityLayout\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\universityLayout{!meta(KV-pairs)}
\titleLayout{!meta(KV-pairs)}
\authorLayout{!meta(KV-pairs)}
\end{dCmd}
-
+\endgroup
\CmdLoc Place these optional commands in the preamble.
\KVP Each of these commands have a number of key-value pairs. The
@@ -3199,18 +3208,17 @@ used to push the top down. The default value of this skip is
\texttt{0pt}, but this can be changed through
\cs{aboveTopTitleSkip}.
-\settowidth{\aebdimen}{\cs{aboveTopTitleSkip\darg{\meta{skip}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{aboveTopTitleSkip\darg{\meta{skip}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\aboveTopTitleSkip{!meta(skip)}
\end{dCmd}
+\eVerb There is one other title page parameter that effects the layout.
-\newtopic There is one other title page parameter that effects the layout.
-
-\settowidth{\aebdimen}{\cs{topTitlePageProportion\darg{0..1}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{topTitlePageProportion\darg{0..1}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\topTitlePageProportion{0..1}
\end{dCmd}
-
+\endgroup
\CmdLoc Place this (optional) command in the preamble.
\PD The top part of the title page is enclosed in a big \cs{parbox}
@@ -3261,11 +3269,11 @@ aligned within its \cs{makebox}, understand? Finally, for the
The pro option defines the command \Com{DesignTitlePageTrailer} that takes a
number of key-value pairs to describe the title page trailer. The use of this
command is not needed unless you want something in the trailer other than the default
-information.\settowidth{\aebdimen}{\cs{DesignTitlePageTrailer\darg{\meta{KV-pairs}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+information.\bVerb\takeMeasure{\cs{DesignTitlePageTrailer\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\DesignTitlePageTrailer{KV-pairs}
\end{dCmd}
-
+\endgroup
\KVP The key-value pairs are described below:
\begin{enumerate}
\item \texttt{ul}: The text in the upper left corner of the trailer, the default is
@@ -3338,22 +3346,20 @@ illustrates this command.
The pro option also defines \Com{tocLayout} for controlling the
title of the table of contents.
-\settowidth{\aebdimen}{\cs{tocLayout\darg{\meta{KV-pairs}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{tocLayout\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\tocLayout{!meta(KV-pairs)}
\end{dCmd}
-
-\newtopic The key-value pairs are the same as layout commands for the section titles, see
+\eVerb The key-value pairs are the same as layout commands for the section titles, see
\mlNameref{secHead}.
\CmdLoc Place this command in the preamble.
-\settowidth{\aebdimen}{\cs{selectTocDings\darg{\meta{KV-pairs}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{selectTocDings\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\selectTocDings{!meta(KV-pairs)}
\end{dCmd}
-
-\newtopic When the \cs{noSectionNumbers} command is used (\Nameref{secHead}), the entries in the table of
+\eVerb When the \cs{noSectionNumbers} command is used (\Nameref{secHead}), the entries in the table of
contents have no section number. You can define a ding for each of the three
levels of the table of contents with this command. The key-value entries in the
\cs{selectTocDings} command are ignored if \cs{noSectionNumbers} is not in effect.
@@ -3384,11 +3390,11 @@ illustrates this command.
The \cs{selectColors} command can be used to set the color of most all elements of
the document that have a color attribute.
-\settowidth{\aebdimen}{\cs{selectColors\darg{\meta{KV-pairs}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{selectColors\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\selectColors{!meta(KV-pairs)}
\end{dCmd}
-
+\endgroup
\CmdLoc There are no restrictions on this command. In the preamble,
it will set the defaults for the entire document.
@@ -3426,11 +3432,11 @@ The {\Web} package uses the section heading commands \cs{section}, \cs{subsectio
\texttt{extended} option modifies their definitions so that the document author can easily design how the section titles
look.
-\settowidth{\aebdimen}{\cs{noSectionNumbers}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{noSectionNumbers}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\noSectionNumbers
\end{dCmd}
-\newtopic The command \Com{noSectionNumbers} causes {\Web} to remove the usual
+\eVerb The command \Com{noSectionNumbers} causes {\Web} to remove the usual
numbering system for a {\LaTeX} document. This may be useful when
preparing a document for presentation, and a numbering system is not
needed. The default is to use section numbers.
@@ -3438,14 +3444,13 @@ needed. The default is to use section numbers.
\CmdLoc The use of this command is restricted to the preamble. The
decision must be made for the whole document at the beginning of the
document.
-
-\settowidth{\aebdimen}{\cs{subsubsectionLayout\darg{\meta{KV-pairs}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{subsubsectionLayout\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\sectionLayout{!meta(KV-pairs)}
\subsectionLayout{!meta(KV-pairs)}
\subsubsectionLayout{!meta(KV-pairs)}
\end{dCmd}
-
+\endgroup
\CmdLoc No restriction on the use of this command. In the preamble, you set the layout
for sections for the whole document. In the body of the document, changes occur immediately
starting with the next relevant section.
@@ -3529,12 +3534,12 @@ title horizontally, and specify an after skip of \texttt{12pt}.
% \expoint{ex7} Use \texttt{apb\_ex7.tex} to explore the section layout commands.
-\settowidth{\aebdimen}{\cs{subsubsectionLayout\darg{\meta{length}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{subsubsectionLayout\darg{\meta{length}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\shadowhoffset{!meta(length)}
\shadowvoffset{!meta(length)}
\end{dCmd}
-\newtopic When \texttt{$\text{special} = \text{shadow}$}, shadowing is
+\eVerb When \texttt{$\text{special} = \text{shadow}$}, shadowing is
obtained by typesetting the text twice with different colors. The
amount of horizontal and vertical offset are controlled by these two
commands. The defaults are \verb!\shadowhoffset{.2ex}! and
@@ -3543,12 +3548,13 @@ commands. The defaults are \verb!\shadowhoffset{.2ex}! and
\newtopic The interface for writing custom section layouts are the following three
commands.
-\settowidth{\aebdimen}{\cs{customSubsubsecHead\darg{\anglemeta{tex\_code}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{customSubsubsecHead\darg{\anglemeta{tex\_code}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\customSecHead{!anglemeta(tex_code)}
\customSubsecHead{!anglemeta(tex_code)}
\customSubsubsecHead{!anglemeta(tex_code)}
\end{dCmd}
+\endgroup
\CmdLoc Use in the preamble or before a section head.
\PD These three commands are used to write custom section,
@@ -3598,17 +3604,16 @@ illustrates these commands.
The {\Web} package has several commands for customizing the \cs{part} and
\cs{chapter} commands.
-\subsection{The \texorpdfstring{\protect\cs{part}}{\CMD{part}} command}
+\subsection{The \tops{\protect\cs{part}}{\CMD{part}} command}
The appearance of the part title can be controlled by \cs{formatPartTitle}.
-\settowidth{\aebdimen}{\cs{customSubsubsecHead\darg{\anglemeta{tex\_code}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{customSubsubsecHead\darg{\anglemeta{tex\_code}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\formatPartTitle{!anglemeta(tex_code)}
\noPartNumbers
\end{dCmd}
-
-\newtopic The argument of \anglemeta{tex\_code} consists of formatting commands; within the
+\eVerb The argument of \anglemeta{tex\_code} consists of formatting commands; within the
argument \texttt{\#1} represents the title. The command \cs{noPartNumbers}
is a convenience macro to turn off all part number, if you want to create
a document that has no part numbers, such as this document.
@@ -3636,19 +3641,19 @@ gives a part title like this, {\large\bfseries\fbox{Part I: The Web Package}}
A companion comment for changing the format of a part title, is \cs{tocPartTitle},
which modifies how the part title appears in the table of contents.
-\settowidth{\aebdimen}{\cs{tocPartTitle\darg{\cs{thepart}\cs{hspace\darg{1em}\#1}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{tocPartTitle\darg{\cs{thepart}\cs{hspace\darg{1em}\#1}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\tocPartTitle{!anglemeta(tex_code)}
\tocPartTitle{\thepart\hspace{1em}#1}
\end{dCmd}
-
-\newtopic Again, within the argument of \cs{tocPartTitle}, \texttt{\#1} refers to the
+\eVerb
+Again, within the argument of \cs{tocPartTitle}, \texttt{\#1} refers to the
text of the part title. The default definition is given above also.
\redpoint Finer control over the formatting of the \cs{part} command can be obtained by redefining
\cs{web@makeparthead} or \cs{web@makesparthead}, the latter one for \cs{part*}.\endredpoint
-\subsection{The \texorpdfstring{\protect\cs{chapter}}{\CMD{chapter}} command}
+\subsection{The \tops{\protect\cs{chapter}}{\CMD{chapter}} command}
The \cs{chapter} command is available in the \texttt{book} and \texttt{report} classes.
There are several defined in the {\Web} package for getting a little control over these.
@@ -3663,13 +3668,12 @@ There are several defined in the {\Web} package for getting a little control ove
\noindent\hspace{1em}\large\bfseries#1\par\nobreak
}
-\settowidth{\aebdimen}{\cs{formatChapterNumber\darg{\anglemeta{tex\_code}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{formatChapterNumber\darg{\anglemeta{tex\_code}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\formatChapterNumber{!anglemeta(tex_code)}
\formatChapterTitle{!anglemeta(tex_code)}
\end{dCmd}
-
-\newtopic The argument of \ameta{tex\_code} consists of formatting commands; within the
+\eVerb The argument of \ameta{tex\_code} consists of formatting commands; within the
argument \texttt{\#1} represents the title.
The default definitions for these are
@@ -3688,7 +3692,7 @@ The default definitions for these are
formatting by redefining \cs{web@makechapterhead} or
\cs{web@makeschapterhead}, the latter one is used for \cs{chapter*}.\endredpoint
-\subsection{The \texorpdfstring{\protect\cs{noFinalDot}}{\CMD{noFinalDot}} Command}\label{nofinaldot}
+\subsection{The \tops{\protect\cs{noFinalDot}}{\CMD{noFinalDot}} Command}\label{nofinaldot}
The default behavior for the {\Web} package is to place a dot (.) at the end of the section
number in both the body of the document and in the table of contents. Thus,
@@ -3886,7 +3890,7 @@ given.
\begin{comment}
-\subsection{The \texorpdfstring{\protect\texttt{pdftex}}{pdftex}
+\subsection{The \tops{\protect\texttt{pdftex}}{pdftex}
Option}\label{ss:pdftexerquiz}
The \textsf{exerquiz} package is independent of the \pkg{web}
@@ -3993,7 +3997,7 @@ option.}\def\1{\hspace*{-\amtIndent}}
%unicode \texttt{U+0130}.}
\subsection{The
-\texorpdfstring{\protect\texttt{forpaper{\protect\normalfont\protect\space and }forcolorpaper}}{forpaper and
+\tops{\protect\texttt{forpaper{\protect\normalfont\protect\space and }forcolorpaper}}{forpaper and
forcolorpaper}
Options}\label{sss:exquizforpaper}
@@ -4025,13 +4029,20 @@ this option.
\redpoint This option is not useful with the \texttt{pdftex} option, as
\textsf{pdftex} does not (normally) produce a dvi file.
-\subsection{The \texttt{nodljs} Option}\label{sss:nodljs}
+%\subsection{The \texttt{nodljs} Option}\label{sss:nodljs}
+\subsection{Options passed through to the \tops{\protect\pkg}{}{insdljs} package}
+The following options are passed through to \pkg{insdljs}: \opt{nodljs},
+\opt{exercisesonly} (same as \opt{nodljs}), \opt{execAfter} (passes the
+option \opt{execJS}), and \opt{usealtadobe}.
+
+\begin{comment}
If you are creating a document that is meant to be printed or your
document only has exercises and solutions in it (which do not
require JavaScript), the size of the document can be reduced
significantly by using the \texttt{nodljs} option. This option is
just passed on to the \textsf{insdljs} package.
+\end{comment}
% \subsubsection{The \texttt{acrobativ} Option}\label{sss:acrobativ}
%
@@ -4127,6 +4138,36 @@ continues on the next page. Further documentation can be found in
feature is \texttt{contsolns\_ex.tex}, found in the \texttt{examples}
folder.
+\subsection{The \texttt{usemcfi} Option}\label{eq:usemcfi}
+
+The \opt{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. In
+this MCFI-type question, a question is posed with a multiple of choices
+offered; if the correct choice is not present, the student can enter his/her
+response in a text field (\cs{RespBoxMath}).
+
+\exAeBBlogPDF{p=1152} Read the \href{\urlAcroTeXBlog/?p=1152}{Illustrating the
+MCFI-type question} article at the {\AcroBlog} web site for more on
+this topic.
+
+\subsection{The \texttt{userbmintrvl} Option}\label{eq:userbmintrvl}
+
+The \opt{userbmintrvl} option defines \cs{rbmIntrvl} command, the syntax of which is,
+\bVerb\takeMeasure{\cs{rbmIntrvl\darg{[a,b]}\ameta{\textsf{arguments of \cs{RespBoxMath}}}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\rbmIntrvl{[a,b]}!ameta(!textsf(arguments of !cs(RespBoxMath)))
+\end{dCmd}
+\eVerb
+The \cs{rbmIntrvl} command is a variation on \cs{RespBoxMath}, were some of
+the parameters of \cs{RespBoxMath} are set by the interval \texttt{[a,b]}.
+Here, any response that falls into the specified interval is accepted as
+correct. This approach was suggest to me by Thor G.\ of Germany.
+
+\exAeBBlogPDF{p=1482} Read the \href{\urlAcroTeXBlog/?p=1482}{The
+\texttt{userbmintrvl} option} article at the {\AcroBlog} web site for more on
+this topic.
+
+
\section{The \texttt{exercise} Environment}\label{ss:online}
The \textsf{exerquiz} package defines \texttt{exercise} and
@@ -4566,7 +4607,7 @@ $a = 2$.
Part (a) is hypertext linked to its solution, whereas part (b) is
blue, indicating there is no link there.
-\redpoint Multipart exercises in the tabular format behave the same way; use
+\redpoint Multi-part exercises in the tabular format behave the same way; use
\cs{item[h]} to ``hide'' a solution.
\redpoint There is also an `\texttt{H}' option as well. Specifying
@@ -4622,7 +4663,7 @@ the following lines:
\end{Verbatim}
\subsubsection{The
-\texorpdfstring{\protect\texttt{nosolutions}}{nosolutions}
+\tops{\protect\texttt{nosolutions}}{nosolutions}
Option}\label{sss:nosolutions}
Some educators may initially want to post a series of exercises on the
@@ -4640,7 +4681,7 @@ with the \texttt{forpaper} option.
\subsubsection{The
-\texorpdfstring{\texttt{solutions\-after}}{solutionsafter}
+\tops{\texttt{solutions\-after}}{solutionsafter}
Option}\label{sss:solutionsafter}
For additional flexibility with how you want the solutions to the
@@ -4743,7 +4784,7 @@ or to turn off this feature again. The default is \cs{makeExSolnsLocalOff}.
\subsection{Redesigning the
-\texorpdfstring{\protect\texttt{exercise}}{exercise}
+\tops{\protect\texttt{exercise}}{exercise}
Environment}\label{sss:redesignex}
You can customize the \texttt{exercise} environment to suit your
@@ -5015,61 +5056,99 @@ There, you didn't need my help after all.
feature for sorting out these different types of environments;
they are all \texttt{exercise} environments, which is what they are.
-\section{The \texttt{shortquiz} Environment}\label{ss:QuizIR}
+\section{The \texttt{shortquiz} and \texttt{shortquiz*} Environments}\label{ss:QuizIR}
-The \texttt{shortquiz} environment is used to create multiple
-choice question and math/text fill-in questions with immediate
-response. The discussion of math and text fill-in questions is
-post-phoned to \hyperref[s:oQ]{Section~\ref*{s:oQ}}, entitled
-\nameref{s:oQ}. The environment allows redefinition to customize
-the look of your quizzes. (See
-\mlNameref{sss:redefinesq}.)
+The \texttt{shortquiz} environment is used to create multiple choice
+questions (MC), multiple selection questions (MS), and math/text fill-in
+questions with immediate response. The discussion of math and text fill-in
+questions is post-phoned to \hyperref[s:oQ]{Section~\ref*{s:oQ}}, entitled
+\nameref{s:oQ}. The environment allows redefinition to customize the look of
+your quizzes. (See \mlNameref{sss:redefinesq}.)
% The presentation of the answers will either be in a \texttt{list}
% or a \texttt{tabular} environment, depending on the parameter
% \texttt{num\_cols}. (A \texttt{list} is used if \texttt{num\_col}
% is set to~1.)
-\subsection{Basic Usage}\label{BasicUsage}
+\subsection{Syntax described}\label{BasicUsage}
-The syntax for the environment (\texttt{tabular} version) is as
-follows:
+For MC and MS questions, the \env{shortquiz} environment typesets choice
+fields consisting of links; the \env{shortquiz*} environment typesets choices
+fields consisting of form fields. The environments may appear with the \env{questions}
+environment or not. The latter case is designed to pose a single questions, the former
+is used to pose multiple questions. Refer to \Nameref{sss:quesEnv} for more information
+on the \env{questions} environment.
-\def\T#1{\makebox[0pt][l]{\hspace*{200pt}\% #1}}
-\def\1{\T{begin shortquiz}}
-\def\2{\T{begin proposed answers}}
-\def\3{\T{a wrong answer}}
-\def\4{\T{the right answer}}
-\def\5{\T{end listing of answers}}
-\def\6{\T{end shortquiz}}
-\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
-!1\begin{shortquiz}[!meta(base_name)]
-...Question goes here...
-!2\begin{answers}{!meta(num_cols)}
-...
-!3\Ans0 !anglemeta(an incorrect answer) &
-...
-!4\Ans1 !anglemeta(a correct answer) &
-...
-!5\end{answers}
-!6\end{shortquiz}
+\newtopic The syntax for the \env{shortquiz} and \env{shortquiz*} is given below.
+\bVerb\noindent\begin{minipage}[t]{170pt}
+\begin{Verbatim}[commandchars=!()]
+\begin{shortquiz}[!meta(base_name)]
+!ameta(one question)
+\end{shortquiz}
\end{Verbatim}
-The optional \meta{base\_name} is used to build names of the form fields associated with
-this quiz; if one is not provided, a \meta{base\_name} is automatically created. The name
-must be unique to the entire document.
+\end{minipage}
+\hfill
+\begin{minipage}[t]{\linewidth-180pt}
+\begin{Verbatim}[commandchars=!()]
+\begin{shortquiz}[!meta(base_name)]
+!ameta(Introduction to quiz)
+\begin{questions}
+ \item !ameta(first question)
+ ...
+ \item !ameta(last question)
+\end{questions}
+\end{shortquiz}
+\end{Verbatim}
+\end{minipage}
+\eVerb The syntax for \env{shortquiz*} is the same as above. The optional
+\ameta{base\_name} is used to build names of the form fields associated with
+this quiz; if one is not provided, a \ameta{base\_name} is automatically
+created. The name must be unique to the entire document.
+
+When the \env{questions} environment is not present, a single question is
+expected to be posed and there is no numbering of this question.
+
+%!1\begin{shortquiz}
+%!2\begin{answers}{!meta(num_cols)}
+%...
+%!3\Ans0 !anglemeta(an incorrect answer) &
+%...
+%!4\Ans1 !anglemeta(a correct answer) &
+%...
+%!5\end{answers}
+%!6\end{shortquiz}
+
+This type of quiz is suitable for asking a short series of questions of the
+reader, perhaps after explaining some concept. Quizzes can be used to direct
+the reader's attention to an important point.
+
+\subsubsection{Multiple choice (MC) type questions}
+
+Multiple choice questions (MC) are posed using the \env{answers} environment.
+\begin{Verbatim}[commandchars=!()]
+\begin{answers}!ameta(dest!upshape|*){!ameta(n_cols)}
+ \Ans0 !ameta(a wrong choice alternative) !ameta(!upshape(&|\\|empty)) % EOL marker
+ \Ans1 !ameta(a correct choice alternative) !ameta(!upshape(&|\\|empty)) % EOL marker
+ ...
+ \Ans0 !ameta(a wrong choice alternative) !ameta(!upshape(&|\\|empty)) % EOL marker
+\end{answers}
+\end{Verbatim}
+where \ameta{n\_cols} is a positive integer. When \ameta{n\_cols} is 1, then
+the choice field is laid out in list format; if \ameta{n\_cols} is in tabular
+format. The document author must mark up the end of each line (EOL). If
+\ameta{n\_cols} is 1 (list-mode), no markers are needed; otherwise, type fields are
+laid out in tabular format, the ampersand (\texttt\&) is the marker between entries on the same line
+and double backslash (\verb!\\!) marks the end of a row. The usual {\LaTeX} style for a table.
-The parameter \meta{num\_cols} is the number of
-columns you want to typeset for your multiple choice responses. The
-environment sets up a \texttt{tabular} environment if
-\meta{num\_cols} is greater than~1, and a \texttt{list}
-environment if \texttt{num\_cols} is~1.
+The argument \ameta{dest\upshape|*} is used to signal that this question has
+a solution provided. Refer to \Nameref{ss:QuizS} for more information on this
+argument.
-This type of quiz is suitable for asking a short series of
-question of the reader, perhaps after explaining some concept.
-Quizzes can be used to direct the reader's attention to an
-important point.
+The \cs{Ans} command takes as its argument either 1 (for a correct
+alternative) or 0 (for a wrong alternative). For a MC choice field, there should
+be only one question marked with a 1 (\cs{Ans1} or \cs{Ans\darg{1}}).
-\redpoint Here is an example of the \texttt{shortquiz}
+\redpoint Here is an example of the \env{shortquiz}
environment. Responses are graded without comment using
JavaScript.
@@ -5080,6 +5159,7 @@ Which of the following is the $\dfrac{d}{dx}{\sin(x^3)}$?
\Ans0 $3x^2\cos(3x^2)$ \\
\end{answers}
\end{shortquiz}
+Note that the alternative are labeled using links (a), (b), and so on.
\noindent The verbatim listing follows:
\begin{Verbatim}[xleftmargin=\amtIndent]
@@ -5093,8 +5173,8 @@ Which of the following is the $\dfrac{d}{dx}{\sin(x^3)}$?
\end{answers} % end answers environment
\end{shortquiz} % end shortquiz environment
\end{Verbatim}
-If \texttt{num\_cols} is greater than 1, the
-\texttt{answers} sets up a \texttt{tabular} environment,
+If \ameta{num\_cols} is greater than 1, the
+\env{answers} sets up a \texttt{tabular} environment,
\texttt{p\darg{\meta{width}}} to sets up the column widths. The \cs{parbox}es are
typeset ragged right.
@@ -5124,8 +5204,8 @@ even to this day. % Leibniz
\end{answers}
\end{shortquiz}
-\noindent Here is the same example in which the \texttt{num\_cols} is set
-to~1; in this case, a \texttt{list} environment is used.
+\noindent Here is the same example in which the \ameta{num\_cols} is set
+to~1; in this case, a \env{list} environment is used.
\begin{shortquiz}
Which of the following best describes Augustin Cauchy?
@@ -5174,8 +5254,64 @@ this is
\end{Verbatim}
and this can be reset to any desired vertical skip.
+\subsubsection{Multiple selection (MS) type questions}
+
+A multiple selection (MS) type question is one that offers a choice field,
+with more than one correct answer and it is expected for the respondent to
+choose all the correct alternatives. MS questions are posed using the
+\env{manswers} environment, this syntax of which is the same as that of the
+\env{answers} environment.
+\begin{Verbatim}[commandchars=!()]
+\begin{manswers}!ameta(dest!upshape|*){!ameta(n_cols)}
+ \Ans0 !ameta(a wrong choice alternative) !ameta(!upshape(&|\\|empty)) % EOL marker
+ \Ans1 !ameta(a correct choice alternative) !ameta(!upshape(&|\\|empty)) % EOL marker
+ ...
+ \Ans1 !ameta(a correct choice alternative) !ameta(!upshape(&|\\|empty)) % EOL marker
+ ...
+ \Ans0 !ameta(a wrong choice alternative) !ameta(!upshape(&|\\|empty)) % EOL marker
+\end{manswers}
+\end{Verbatim}
+Recall from the discussion of the MC type, the argument
+\ameta{dest\upshape|*} is used to signal that this question has a solution
+provided. Refer to \Nameref{ss:QuizS} for more information on this argument.
-\subsubsection{\texttt{shortquiz} with Radio Buttons}\label{sqwRadio}
+\newtopic
+A brief example will suffice.
+\begin{shortquiz}
+Which of the following are prime numbers?
+\begin{manswers}{4}
+ \Ans0 1 &
+ \Ans1 2 &
+ \Ans1 3 &
+ \Ans0 4 \\
+ \Ans1 5 &
+ \Ans0 6 &
+ \Ans1 7 &
+ \Ans0 8
+\end{manswers}
+\end{shortquiz}
+The verbatim listing is as follows:
+\begin{Verbatim}
+\begin{shortquiz}
+Which of the following are prime numbers?
+\begin{manswers}{4}
+ \Ans0 1 & \Ans1 2 & \Ans1 3 & \Ans0 4 \\
+ \Ans1 5 & \Ans0 6 & \Ans1 7 & \Ans0 8
+\end{manswers}
+\end{shortquiz}
+\end{Verbatim}
+You'll note that the \env{shortquiz} environment is used, yet form fields
+(check boxes) are used; this is by design. Links are not available for MS
+questions, only for MC questions.
+
+\subsubsection{Other supported question types}
+
+In addition to MC and MS questions, any other supported types can be used
+in a \env{shortquiz} environment, these include math fill-in and text fill-in questions,
+the syntax of which is discussed in Section~\ref{s:oQ} on page~\pageref{s:oQ}.
+
+
+\subsubsection{\texttt{shortquiz} with radio buttons}\label{sqwRadio}
The short quizzes (with multiple choices) can also be laid out using
radio buttons rather than typeset lettering. Use a
@@ -5207,7 +5343,7 @@ Was it in Xanadu did Kubla Kahn a stately pleasure dome decree?
\noindent Check the functionality of this question, and contrast it with
the same question.
-\sqTurnOffAlerts \sqCorrections
+\sqTurnOffAlerts %\sqCorrections
\begin{shortquiz*}[KublaKhan3]
Was it in Xanadu did Kubla Kahn a stately pleasure dome decree?
@@ -5215,58 +5351,49 @@ Was it in Xanadu did Kubla Kahn a stately pleasure dome decree?
\Ans1 True & \Ans0 False
\end{answers}
\end{shortquiz*}
-\noindent We have inserted two new commands prior to this last
-short quiz \cs{sqTurnOffAlerts} and \cs{sqCorrections} to change
-response feedback. The former turns off the alerts and the latter
-turns on the corrections: check for a correct answer and an cross
-for an incorrect answer. (It doesn't make sense to
-\cs{sqTurnOffAlerts} without \cs{sqCorrections};
-\cs{sqCorrections} can be used without turning off the alerts.)
-
-\redpoint These two commands only apply to a short quiz that uses radio buttons.
-You can reverse these two commands with \cs{sqTurnOnAlerts} and
-\cs{sqNoCorrections}, respectively. These settings are the
-defaults of the \texttt{shortquiz} with check boxes.
-
-\subsubsection{\texttt{shortquiz} with Solutions}\label{ss:QuizS}
-
-Another type of quiz that is easy to implement in PDF is the
-multiple choice quiz with immediate response with solution given.
-This too is a \texttt{shortquiz} environment:
+\noindent The command \cs{sqTurnOffAlerts} was inserted prior to this last
+short-quiz to change response feedback; \cs{sqTurnOffAlerts} turns off the
+(annoying) alerts.
+
+\redpoint The \cs{sqTurnOffAlerts} command only apply to a short-quiz that
+uses radio buttons. You can reverse the effect of this command by expanding
+\cs{sqTurnOnAlerts}. The default is \cs{sqTurnOnAlerts}.
+
+\subsubsection{\texttt{shortquiz} with solutions}\label{ss:QuizS}
+
+A question within a \env{shortquiz} or \env{shortquiz*} environment may optionally
+have a solution, or a more detailed discussion of the question.
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
\begin{shortquiz}
-...Question goes here...
-\begin{answers}!anglemeta(dest){!meta(num_cols)}
-...
-\Ans0 !anglemeta(an incorrect answer) &
-...
-\Ans1 !anglemeta(a correct answer) &
-...
-\end{answers}
+!ameta(pose the question)
+!ameta(supported question type answer, manswer, or some other type)
\begin{solution}
- !anglemeta(solution to correct answer)
+!qquad!ameta(solution to correct answer)
\end{solution}
\end{shortquiz}
\end{Verbatim}
-
-\newtopic The \anglemeta{name} takes on two forms, in either case, it is used to create a hypertext jump to
-the solution. The first form of \anglemeta{name} is an explicit named
-definition `\texttt{[\meta{named\_dest}]}', where \meta{named\_dest} is a
-word selected by the document author for a ``named destination.'' The other
-form is the star-form `\texttt{*}', when the star-form is used,
-\textsf{exerquiz} automatically generates the name. Use the
-`[\meta{named\_dest}]' form when you want to refer to a solution in another
-part of the document; otherwise, use `\texttt{*}' for convenience.
-
-\newtopic As before, \meta{num\_cols} is the number of columns to
-typeset the answers in.
-
-\newtopic The following example illustrates the quiz with
+All questions types have an argument that signals the presence of a provide
+solution. For example. Recall from the previous discussion of \env{answers}
+and \env{manswers} there is an argument \ameta{dest\upshape|*} that signals
+the presence of a solution. This argument takes on two forms \ameta{dest},
+which is a simple text string in square brackets that names the destination;
+or, the argument can be an ampersand (\texttt*) where the name of the
+destination is automatically generated. The first form of \ameta{dest} is an
+explicit named destination that is enclosed in square brackets, such as
+\texttt{[myDest]}.\footnote{Technically, the named definition must be a
+JavaScript identifier, refer to page~\pageref*{quote:JSIdentifier} for the
+definition of a JavaScript identifier.} The other form is the star-form
+`\texttt{*}', when the star-form is used, \pkg{exerquiz} automatically
+generates the name. Use the \ameta{dest} form when you want to refer to a
+solution in another part of the document; otherwise, use `\texttt{*}' for
+convenience. The use of \ameta{dest} in a link is illustrated below.
+
+\newtopic The following example illustrates a short-quiz with
solution.
%\renewcommand\sqslrtnlabel{\string\raisebox{1pt}{$\blacktriangleleft$}Return to Quiz}
-\begin{shortquiz}
+\begin{shortquiz*}
Define a function $f(s)=4s^3$ and another function
$F(t)=t^4$. Is $F$ an antiderivative of $f$?
\begin{answers}[quiz:anti]{4}
@@ -5287,20 +5414,26 @@ differentiation, $F'(t)=4t^3$. Thus, $F'(x)=4x^3$. Therefore,
\]
as required by the definition.
\end{solution}
-\end{shortquiz}
+\end{shortquiz*}
+
+\newtopic\textbf{User experience.} For MC and MS type questions, as soon as the respondent
+correctly answers all choices, an alert dialog box appears with a message of
+``Right!'' (unless \cs{sqTurnOffAlerts} is expanded earlier), then the PDF viewer jumps to the page containing the solution, or
+a discussion of the answer.
\newtopic The verbatim listing that uses the explicit form of the destination, shown
in bold font.
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
-\begin{shortquiz}
+\begin{shortquiz*}
Define a function $f(s)=4s^3$ and another
function $F(t)=t^4$. Is $F$ an antiderivative of $f$?
\begin{answers}!textbf([quiz:anti]){4}
\Ans1 Yes &\Ans0 No
\end{answers}
-...solution not shown...
+\begin{solution}
+!ameta(solution not shown)
\end{solution}
-\end{shortquiz}
+\end{shortquiz*}
\end{Verbatim}
\newtopic Here is a listing of the same quiz using the \texttt{*} to
@@ -5312,27 +5445,30 @@ function $F(t)=t^4$. Is $F$ an antiderivative of $f$?
\begin{answers}!textbf(*){4}
\Ans1 Yes &\Ans0 No
\end{answers}
-...solution not shown...
+\begin{solution}
+!ameta(solution not shown)
\end{solution}
\end{shortquiz}
\end{Verbatim}
+The advantage of the first form is that you can, within the body of the document,
+provide a link to the solution: ``Please review the \hyperlink{quiz:anti}{solution}
+to the previous short-quiz.'' Use \cs{hyperlink} to set the link to the solution:
+\verb~\hyperlink{quiz:anti}{solution}~.
-
-\subsubsection{The \texorpdfstring{\protect\cs{bChoices}/\-\protect\cs{eChoices}}
+\subsubsection{The \tops{\protect\cs{bChoices}/\-\protect\cs{eChoices}}
{\textbackslash bChoices/\textbackslash eChoices} Commands}\label{bChoices}
-Beginning with \textsf{exerquiz} version~6.03, the command pair
-\cs{bChoices} and \cs{eChoices} are defined to help lay out
-the list of choices for a multiple choice question. This pair of
-macros is not really an environment, the \cs{eChoices} really
-does nothing other than to act as an ending marker. The idea
-behind this pair of macros is twofold:
+Beginning with \textsf{exerquiz} version~6.03, the command pair \cs{bChoices}
+and \cs{eChoices} are defined to help lay out the list of choices for a MC or
+MS question. This pair of macros is not really an environment, the
+\cs{eChoices} really does nothing other than to act as an ending marker. The
+idea behind this pair of macros is twofold:
\begin{questions}
\item To provide a convenient way of listing alternate choices for
-a multiple choice questions, the ``environment'' makes it easy to
+MC and MS questions, the ``environment'' makes it easy to
change the number of columns, or to change from tabular to list
(or visa-versa);
@@ -5341,7 +5477,8 @@ make it easy to develop techniques of randomizing the
alternatives.
\end{questions}
-Here is an example of usage:
+Here is an example of usage, this example uses the \env{answers} environment, the
+\env{manswers} environment can similarly laid out.
\begin{Verbatim}[xleftmargin=\amtIndent]
\begin{answers}{4} %<- 4 columns
\bChoices[2] %<- use only first 2 columns
@@ -5366,9 +5503,9 @@ delimiter~`\texttt\&', or the end of line
command~`\texttt{\string\\}', this is done by the \cs{bChoices}
command.
-The commands \cs{bChoices} and \cs{eChoices} can be used within
-the \texttt{answers} environment as part of a \texttt{shortquiz} or a
-\texttt{\hyperref[ss:GradedQuizzes]{quiz}} environment.
+The commands \cs{bChoices} and \cs{eChoices} can be used within the
+\env{answers} or \env{manswers} environment as part of a \texttt{shortquiz}
+or a \texttt{\hyperref[ss:GradedQuizzes]{quiz}} environment.
Concerning the example above, the argument of the \texttt{answers}
environment is 4 which means we are going to use the tabular
@@ -5430,22 +5567,22 @@ your choices to contain verbatim text, use the style as described in
\Nameref{BasicUsage}.
\subsubsection{The
-\texorpdfstring{\protect\texttt{questions}}{questions} Environment}
+\tops{\protect\texttt{questions}}{questions} Environment}\label{sss:quesEnv}
The \texttt{questions} environment was designed to work with the
\texttt{quiz} environment---taken up in
\hyperref[ss:GradedQuizzes]{Section~\ref*{ss:GradedQuizzes}}
below---but it works equally well with \texttt{shortquiz}.
-Using the \texttt{questions} environment, quizzes defined by
+Using the \texttt{questions} environment, quizzes created by
\texttt{shortquiz}, with/without solutions, can be
mixed together and combined to make a ``mini-quiz''. For example,
\begin{shortquiz} Determine the LCD for each of the following.
\begin{questions}
\item $\dfrac{3x}{2y^2z^3}-\dfrac2{xy^3 z^2}$.
-\begin{answers}{2}
-\bChoices
+\begin{answers}{3}
+\bChoices[2]
\Ans0 $\text{LCD}=2xy^5z^5$\eAns
\Ans0 $\text{LCD}=2y^3 z^3$\eAns
\Ans1 $\text{LCD}=2x y^3 z^3$\eAns
@@ -5453,8 +5590,8 @@ mixed together and combined to make a ``mini-quiz''. For example,
\eChoices
\end{answers}
\item $\dfrac{x+y}{3 x^{3/2}y^2}-\dfrac{x^2+y^2}{6 x y^4}$.
-\begin{answers}[quiz:LCB]{2}
-\bChoices
+\begin{answers}[quiz:LCB]{3}
+\bChoices[2]
\Ans0 $\text{LCD}=18 x^{3/2}y^4$\eAns
\Ans1 $\text{LCD}=6x^{3/2}y^4$\eAns
\Ans0 $\text{LCD}=18 x y^4$\eAns
@@ -5506,13 +5643,17 @@ solution attached to it. An abbreviated verbatim listing follows.
Determine the LCD for each of the following.
\begin{questions}
\item $\dfrac{3x}{2y^2z^3}-\dfrac2{xy^3 z^2}$.
-\begin{answers}{2}
+\begin{answers}{3}
+\bChoices[2]
...
+\eChoices
\end{answers}
\item $\dfrac{x+y}{3 x^{3/2}y^2}
-\dfrac{x^2+y^2}{6 x y^4}$.
-\begin{answers}[quiz:LCB]{2}
+\begin{answers}[quiz:LCB]{3}
+\bChoices[2]
...
+\eChoices
\end{answers}
\begin{solution}
If you erred on this one, ... ...
@@ -5569,7 +5710,7 @@ We now begin a multipart question.
\subsection{Options of the \texttt{shortquiz} Environment}\label{sq:opts}
\subsubsection{The
-\texorpdfstring{\protect\texttt{forpaper}}{forpaper} Option}
+\tops{\protect\texttt{forpaper}}{forpaper} Option}
The \texttt{forpaper} option has already been described. The
solutions to \texttt{short\-quiz} questions are not typeset on
@@ -5613,7 +5754,7 @@ quiz can be published, then later, the quiz with complete
solutions.
-\subsubsection{The \texorpdfstring{\texttt{proof\-ing}}{proofing}
+\subsubsection{The \tops{\texttt{proof\-ing}}{proofing}
Option}\label{sss:proofing}
For proofreading, use the \texttt{proofing} option of
@@ -5727,15 +5868,296 @@ You can now declare \cs{makeQzSolnsLocalOn} or \cs{makeQzSolnsLocalOff}
anywhere in the document to turn on grouping for all quizzes that follow, or
to turn off this feature again. The default is \cs{makeQzSolnsLocalOff}.
+\subsection{Enhancing the \tops{\protect\env}{}{shortquiz} experience}
+
+In this section, several commands are discussed that enhance the user experience.
+
+\subsubsection{Using tally boxes}
+
+One way of making the short-quiz more interesting to the respondent is through
+the tally box.
+\bVerb\takeMeasure{\string\answersEndHook\darg{\ameta{content}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\sqTallyBox[!ameta(options)]
+\sqTallyTotal[!ameta(options)]
+\answersEndHook{!ameta(content)}
+\sqClearButton[!ameta(options)]
+\end{dCmd}
+\eVerb The first (\cs{sqTallyBox}) tracks the number of times the respondent has
+not answered a particular question correctly, while the second one keeps a
+running total of the number of missed questions in the short-quiz. The third
+command is a convenient way of inserting \ameta{content} (usually the
+\cs{sqTallyBox} command) into the MC and MS choice fields. Finally, the
+\cs{sqClearButton} command creates a pushbutton whose action is to clear the
+short-quiz, including the tally boxes.
+
+The example below illustrates all four of the commands. Within the
+\env{questions} environment, the following is declared:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\answersEndHook{\hfill\makebox[0pt][r]{\sqTallyBox}}
+\end{Verbatim}
+which means \cs{sqTallyBox} is insert to the right of the choice field, push
+to the right margin, then moved to the left using the 0pt width \cs{makebox}.
+\begin{shortquiz*}
+Correctly respond to each, passing is not making a single incorrect choice.
+\begin{questions}
+\answersEndHook{\hfill\makebox[0pt][r]{\sqTallyBox}}
+\item In what year did Columbus sail the ocean blue?
+\begin{answers}*{4}
+\bChoices
+\Ans0 1490\eAns
+\Ans0 1491\eAns
+\Ans1 1492\eAns
+\Ans0 1493\eAns
+\eChoices
+\end{answers}
+\begin{solution}
+Columbus sailed the ocean in 1492. It rhymes.
+\end{solution}
+
+\item Which of the following numbers are prime?
+\begin{manswers}*{4}\rowsep{3pt}
+\bChoices
+ \Ans0 1\eAns
+ \Ans1 2\eAns
+ \Ans1 3\eAns
+ \Ans0 4\eAns
+ \Ans1 5\eAns
+ \Ans0 6\eAns
+ \Ans1 7\eAns
+ \Ans0 8\eAns
+\eChoices
+\end{manswers}
+\end{questions}
+\hfill\sqClearButton\olBdry\sqTallyTotal
+\end{shortquiz*}
+\noindent\textbf{Important:} When positioning \cs{sqTallyBox}, be aware that the box
+may overwrite some of the content of the tabular field. It is the document
+author's responsibility to design the choice field so it is not so wide as to
+extend too closely to the right margin. This can be done by reducing the number
+of items in the row.
+
+\subsubsection{The Traditional versus Alternate user experience}
+
+This section addresses an optional change in how the user experiences viewing
+the solutions to multiple-choice (MC) and multiple-selection (MS) questions
+in a \env{shortquiz} environment.
+
+\newtopic\textbf{Traditional user experience}
+\begin{aebQuote}
+\begin{enumerate}
+\item[MC] As soon as the respondent selects the correct answer, the PDF
+ viewer jumps to the page containing the solution.
+
+\item[MS] As soon as the respondent selects \emph{all} the correct answers,
+ the PDF viewer jumps to the page containing the solution.
+\end{enumerate}
+\end{aebQuote}
+
+\newtopic\textbf{Alternate user experience}
+\begin{aebQuote}
+\begin{enumerate}
+\item[MC] Nothing happens after the respondent selects the correct answer,
+ s/he must press the new \uif{Ans} button to jump to the solution page.
+ If the respondent presses the \uif{Ans} button before selecting the
+ correct answer, an alert box appears with message determined by \cs{sqSolnMCMsg}.
+\item[MS] When the user has selected \emph{all correct answers}, s/he must press
+ the new \uif{Ans} button in order to jump to the solution page. If the
+ user presses the \uif{Ans} button before selecting all correct
+ answers, an alert box appears with message determined by \cs{sqSolnMSMsg}.
+\end{enumerate}
+If a MC or MS question does not have a solution, the \uif{Ans} button is not
+typeset into the document.
+\end{aebQuote}
+
+\noindent
+In additional to some internal changes, there are three new commands:
+\bVerb\takeMeasure{\string\flJSStr\darg{\string\sqSolnMCMsg}\{You must first select the correct}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\sqSolnBtn[!ameta(options)] %!textsf( Creates the new Ans button)
+\flJSStr{\sqSolnMCMsg}{You must first select the correct
+answer to see the solution.}
+\flJSStr{\sqSolnMSMsg}{You must first select all the
+correct answers to see the solution.}
+\end{dCmd}
+\eVerb The first command is the one that creates the \uif{Ans} button, the
+\ameta{options} argument is used to modify the appearance of the button. The
+other two commands are the messages of the alert boxes that appear; these may
+be redefined as needed. The next two \cs{flJSStr} declarations define two
+commands \cs{sqSolnMCMsg} and \cs{sqSolnMSMsg}, these are the message strings
+for the alert boxes that appear. For information on \cs{flJSStr}, refer to
+the documentation, \texttt{eformman.pdf}, for the \pkg{eforms} and
+\pkg{insdljs} packages, which come with the \pkg{acrotex} bundle.
+
+\newtopic\textbf{Inserting \cs{sqSolnBtn} into the short-quiz.} Whether the alternate
+traditional user experience occurs depends on the insertion of \cs{sqSolnBtn}
+into the stream. To insert \cs{sqSolnBtn}, use \cs{answersEndHook}, which is
+also how \cs{sqTallyBox} is inserted. In this document,
+\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,commandchars=!()]
+%!textsf( Tradition experience: Insert !cs(sqTallyBox) only)
+\answersEndHook{\hfill\makebox[0pt][r]{\sqTallyBox}}
+%!textsf( Alternate experience: Insert !cs(sqSolnBtn) and !cs(sqTallyBox))
+\answersEndHook{\hfill\makebox[0pt][r]{\sqSolnBtn\sqTallyBox}}
+\end{Verbatim}
+\begin{comment}
+The \cs{olBdry} is used to overlay the contiguous boundaries of the two
+button fields. Refer to the documentation, \texttt{eformman.pdf}, for the
+\pkg{eforms} and \pkg{insdljs} packages, which come with the \pkg{acrotex}
+bundle. \cs{answersEndHook} insert its content at the right margin, pushing
+it to the left; as a result, the content may overlay the text of the choice
+field. It is up to the document author, that's you, to design the layout of
+the choice field so the \cs{sqTallyBox} and/or the \cs{sqSolnBtn} does not
+overlay other content.
+
+\promoteNewPageHere[2\textheight]
+
+\paragraph*{A sample quiz to illustrate.}
+These new commands are illustrated in the following short-quiz.
+
+\begin{shortquiz*}
+Answer each of the following. Passing is to
+complete the quiz without selecting any wrong answers.
+
+\answersEndHook{\hfill\makebox[0pt][r]{\sqTallyBox}}
+
+\medskip\noindent
+Problems~1 and~2 are in the style \emph{traditional user experience} that has been
+used since the very beginning of \pkg{exerquiz}.
+
+\begin{questions}
+
+\item\label{MC} In what year did Columbus sail the ocean blue?
+\begin{answers}*{4}
+\bChoices
+\Ans0 1490\eAns
+\Ans0 1491\eAns
+\Ans1 1492\eAns
+\Ans0 1493\eAns
+\eChoices
+\end{answers}
+\begin{solution}
+Columbus sailed the ocean in 1492. It rhymes.
+\end{solution}
+
+\item\label{MS} Which of the following numbers are prime?
+\begin{manswers}*{4}\rowsep{3pt}
+\bChoices
+ \Ans0 1\eAns
+ \Ans1 2\eAns
+ \Ans1 3\eAns
+ \Ans0 4\eAns
+ \Ans1 5\eAns
+ \Ans0 6\eAns
+ \Ans1 7\eAns
+ \Ans0 8\eAns
+\eChoices
+\end{manswers}
+\begin{solution}
+Yes, 2, 3, 5, and 7; they are the first four prime numbers.
+\end{solution}
+
+\pushquestions Problems~3 and~4 are in the style \emph{alternate user experience}.
+
+\popquestions
+
+\answersEndHook{\hfill\makebox[0pt][r]{\sqSolnBtn\olBdry\sqTallyBox}}
+
+
+\item\label{Alt:MC} In what year did Columbus sail the ocean blue?
+\begin{answers}*{4}
+\bChoices
+\Ans0 1490\eAns
+\Ans0 1491\eAns
+\Ans1 1492\eAns
+\Ans0 1493\eAns
+\eChoices
+\end{answers}
+\begin{solution}
+Columbus sailed the ocean in 1492. It rhymes.
+\end{solution}
+
+\item\label{Alt:MS} Which of the following numbers are prime?
+\begin{manswers}*{4}\rowsep{3pt}
+\bChoices
+ \Ans0 1\eAns
+ \Ans1 2\eAns
+ \Ans1 3\eAns
+ \Ans0 4\eAns
+ \Ans1 5\eAns
+ \Ans0 6\eAns
+ \Ans1 7\eAns
+ \Ans0 8\eAns
+\eChoices
+\end{manswers}
+\begin{solution}
+Yes, 2, 3, 5, and 7; they are the first four prime numbers.
+\end{solution}
+\end{questions}
+\hfill\sqClearButton\olBdry\sqTallyTotal
+\end{shortquiz*}
+\end{comment}
+
+% ?? revise after publication
+\exAeBBlogPDF{p=803} The discussion of the alternate viewing experience discussed in this section
+as well as the source markup for the above short quiz, can be found in the {\AcroTeX} Blog titled
+
+%Use the source file for
+%\texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}} as a prototype or
+%template for your own document.
+
+\subsubsection{The concept of weak and strong pass levels}
+
+The short-quiz (the \env{shortquiz} environment) was originally created as a
+self-learning device, wherein the student reads some content (mathematics,
+for example), solves some exercises (the \env{exercise} environment), then
+takes a short quiz to reinforce and to assess their newly absorbed
+information.
+
+For many years, \pkg{exerquiz} has provided \cs{sqTallyBox} and
+\cs{sqTallyTotal} commands that keep track of incorrect responses. As a way
+to motivate the student more (and to annoy them more), this section
+introduces the notion of setting \emph{weak or strong passing levels}. These
+levels are set through the optional argument of \cs{sqTallyTotal}.
+
+\begin{aebQuote}
+\begin{description}
+\item[Weak passing level] Syntax: \cs{sqTallyTotal[\cs{weakpassing\darg{\ameta{n}}}]}\\[3pt]
+ \textbf{User Experience.} As soon as the student makes more than
+\ameta{n} errors, the following message appears in an alert box:
+\begin{Verbatim}
+\flJSStr{\sqWeakMsg}{You have missed too many questions.
+After you finish, it is recommended you retake this quiz
+with fewer errors and greater understanding.}
+\end{Verbatim}
+The student is allowed to continue the quiz, but with the knowledge that s/he
+is not performing to the expected standard, as set by the instructor.
+
+\item[Strong passing level] Syntax: \cs{sqTallyTotal[\cs{strongpassing\darg{\ameta{n}}}]}\\[3pt]
+\textbf{User Experience.} As soon as the student makes more than \ameta{n}
+errors, the following message appears in an alert box:
+\begin{Verbatim}
+\flJSStr{\sqStrongMsg}{You have missed too many questions.
+We are resetting the quiz. Start over, this time with
+fewer errors and greater understanding.}
+\end{Verbatim}
+After the student dismisses the alert dialog box, the short-quiz s/he is
+working is cleared. Perhaps this condition will inspire the student to
+spend more time and think about his/her responses.
+\end{description}
+\end{aebQuote}
+In both cases, \ameta{n} is a nonnegative integer.
+
+% ?? revise after publication
+\exAeBBlogPDF{p=803} The discussion of the alternate viewing experience discussed in this section
+as well as the source markup for the above short quiz, can be found in the {\AcroTeX} Blog titled
+
\subsection{Redesigning the
-\texorpdfstring{\protect\texttt{shortquiz}}{shortquiz}
-Environment}\label{sss:redefinesq}
+\tops{\protect\texttt{shortquiz}}{shortquiz} Environment}\label{sss:redefinesq}
The \texttt{shortquiz} environment can be redesigned to better suit
your needs. In the paragraphs below, we describe how you can change
titles and form elements.
-
\subsubsection{Changing Titles}
You can temporarily change the title for the \texttt{shortquiz}
@@ -5818,7 +6240,7 @@ Prior to the short quiz below, the following command was executed
\everysqRadioButton{\BC{.690 .769 .871}\BG{.941 1 .941}}
\end{Verbatim}
-\sqTurnOffAlerts \sqCorrections
+\sqTurnOffAlerts %\sqCorrections
\everysqRadioButton{\BC{.690 .769 .871}\BG{.941 1 .941}}
\begin{shortquiz*}[KublaKhan3]
@@ -5841,8 +6263,8 @@ various other controls, these are described in
Section~\ref{s:oQsq}, \nameref{s:oQsq}. There too, methods of
modifying the appearance of the form elements are discussed.
-\subsection{\texorpdfstring{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}
- and \texorpdfstring{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}\label{titleQuizSQ}
+\subsection{\tops{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}
+ and \tops{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}\label{titleQuizSQ}
%\exPDF{title_quiz}The demo file for these features is \texttt{title\_quiz.tex}.
@@ -5851,7 +6273,7 @@ website for examples.
-\subsubsection{\texorpdfstring{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}}
+\subsubsection{\tops{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}}
To assign a title to your short quiz use \Com{titleQuiz}. This title
appears just after the typeset word ``Quiz''.
@@ -5930,7 +6352,7 @@ like so,
\ifQuizType{\bfseries(#1)}{\slshape[#1]}}
\end{Verbatim}
-\subsubsection{\texorpdfstring{\protect\cs{titleQuiz*}}{\CMD{titleQuiz*}}}
+\subsubsection{\tops{\protect\cs{titleQuiz*}}{\CMD{titleQuiz*}}}
For \texttt{shortquiz} environment---not for the \texttt{quiz}
environment---there is a `\texttt*' optional first parameter. When
@@ -6014,7 +6436,7 @@ the quiz is \nameref{myCoolSQ}.
%\noindent This definition can be change using \cs{renewcommand}.
-\subsubsection{\texorpdfstring{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}
+\subsubsection{\tops{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}
The \Com{fancyQuizHeaders} command, a companion feature to \Com{titleQuiz}, enhances
the labeling of the quiz in the solutions section of the document. If
@@ -6087,12 +6509,12 @@ The quiz environment takes one required parameter, the
variables; therefore, there are restrictions on the choice of the
name. The name must be a (JavaScript) \emph{identifier}, the rules to
be an identifier are these.
-\begin{quote}
-The first character shall be a letter, an underscore (\texttt{\_}),
+\begin{quote}\label{quote:JSIdentifier}
+The\FmtMP{JavaScript identifier described} first character shall be a letter, an underscore (\texttt{\_}),
or a dollar sign (\texttt{\$}); subsequent characters may be any
letter or digit, or an underscore or a dollar sign.
\end{quote}
-Do not use other symbols, like a colon (\texttt{\:}) or a period as part of the field name,
+Do not use other symbols, like a colon (\texttt{:}) or a period as part of the field name,
these will confuse the JavaScript interpreter, and may cause the quiz not to function as
designed.
@@ -6182,7 +6604,7 @@ In addition to the options listed in the section \ref{sq:opts}, page \pageref*{s
designed for quizzes.
\subsubsection{The option
-\texorpdfstring{\protect\texttt{noquiz\-solutions}}{noquizsolutions}}\label{sss:noquizsolutions}
+\tops{\protect\texttt{noquiz\-solutions}}{noquizsolutions}}\label{sss:noquizsolutions}
For online quizzing, where results are stored in some way (database,
e-mail, text file) the presence of the solutions in the same file as the
@@ -6485,7 +6907,7 @@ of the buttons.
\end{Verbatim}
\noindent would create a `Begin Quiz' button with blue text for the button label.
-\subsubsection{The \texorpdfstring{\texttt{proof\-ing}}{proofing}
+\subsubsection{The \tops{\texttt{proof\-ing}}{proofing}
Option}\label{ss:proofing}
For proofreading, use the \texttt{proofing} option of
@@ -6741,7 +7163,7 @@ respond to each of the following questions.
the design more compact and nicer looking.
\subsubsection{The
-\texorpdfstring{\protect\texttt{nocorrections}}{nocorrections}
+\tops{\protect\texttt{nocorrections}}{nocorrections}
Option}\label{sss:nocorrections}
Including the corrections adds quite a bit more JavaScript code to
@@ -7158,8 +7580,8 @@ macros.
-\subsection{\texorpdfstring{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}
- and \texorpdfstring{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}\label{titleQuiz}
+\subsection{\tops{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}
+ and \tops{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}\label{titleQuiz}
%\exPDF{title_quiz} The demo file for these features is \texttt{title\_quiz.tex}.
@@ -7167,7 +7589,7 @@ macros.
\texttt{\href{\urlAcroTeXBlog/?p=908}{title\_quiz.pdf}}.
-\subsubsection{\texorpdfstring{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}}
+\subsubsection{\tops{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}}
To assign a title to your quiz use \Com{titleQuiz}. This title appears just after
the `Begin Quiz' button
@@ -7266,7 +7688,7 @@ quiz is \nameref{MyMCQuiz}.
\end{Verbatim}
\noindent This definition can be change using \cs{renewcommand}.
-\subsubsection{\texorpdfstring{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}\label{fancyQuizHeadersQ}
+\subsubsection{\tops{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}\label{fancyQuizHeadersQ}
The \Com{fancyQuizHeaders} command, a companion feature to \Com{titleQuiz}, enhances
the labeling of the quiz in the solutions section of the document. If
@@ -7465,7 +7887,7 @@ messages to the student upon completion of the quiz.
\end{Verbatim}
\end{questions}
-\subsubsection{\texorpdfstring{\protect\cs{negPointsAllowed}}{\CMD{negPointsAllowed}}}\label{negPtsAllowed}
+\subsubsection{\tops{\protect\cs{negPointsAllowed}}{\CMD{negPointsAllowed}}}\label{negPtsAllowed}
The \texttt{answers} and \texttt{manswers} environments allow for partial credit,
and even assigning of negative points for wrong answers (see \Nameref{manswersQuiz});
@@ -7648,14 +8070,16 @@ The syntax for the \texttt{oQuestion} environment is
!ameta(A math or text open ended question.)
\end{oQuestion}
\end{Verbatim}
-\noindent The environment takes one required argument, a unique name for the question.
-This name, \texttt{field\_name}, is used by other supporting
-macros.
+\noindent The environment takes one required argument, a unique name for the
+question. This name, \ameta{field\_name}, is used by other supporting macros.
+The \env{oQuestion} environment has one hook \cs{oqpriorhook} that is
+expanded just prior to the opening of the environment. If redefined, it is
+used once, then reset to its default empty definition.
-\subsubsection{\texorpdfstring{\protect\cs{RespBoxMath}}
+\subsubsection{\tops{\protect\cs{RespBoxMath}}
{\textbackslash RespBoxMath}: The Math Question}\label{ss:respbox}
-%\subsubsection{\texorpdfstring{\protect\cs{RespBox},
+%\subsubsection{\tops{\protect\cs{RespBox},
%\protect\cs{Resp\-BoxNT}}{\textbackslash RespBox, \textbackslash
%RespBoxNT}}
@@ -7666,16 +8090,17 @@ section we discuss only the \texttt{oQuestion} environment.
The following is a \hypertarget{minExample}{minimal example}.
Additional enhancements will be discussed in subsequent sections.
-
+\let\oqpriorhook\redpoint
\begin{oQuestion}{sine1}
-\redpoint Differentiate $\dfrac d{dx} \sin^2(x) =
+Differentiate $\dfrac d{dx} \sin^2(x) =
\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{[0,1]}$
\end{oQuestion}
\par\medskip\noindent
The code for the above example is
\begin{Verbatim}[xleftmargin=\amtIndent]
+\let\oqpriorhook\redpoint
\begin{oQuestion}{sine1}
-\redpoint Differentiate $\dfrac d{dx} \sin^2(x) =
+Differentiate $\dfrac d{dx} \sin^2(x) =
\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{[0,1]}$
\end{oQuestion}
\end{Verbatim}
@@ -7688,16 +8113,17 @@ of the \cs{redpoint} command, a command written for this document follows.
\end{Verbatim}
\newtopic You can also pose multivariate questions as well, for example
-
+\let\oqpriorhook\redpoint
\begin{oQuestion}{multivariate}
-\redpoint $\dfrac{\partial}{\partial y} {4 x^2 y^3 }
+$\dfrac{\partial}{\partial y} {4 x^2 y^3 }
= \RespBoxMath{12*x^2*y^2}(xy){4}{.0001}{[0,1]x[0,1]}$
\end{oQuestion}
\par\medskip\noindent
The code for the above example is
\begin{Verbatim}[xleftmargin=\amtIndent]
+\let\oqpriorhook\redpoint
\begin{oQuestion}{multivariate}
-\redpoint $\dfrac{\partial}{\partial y} {4 x^2 y^3 }
+$\dfrac{\partial}{\partial y} {4 x^2 y^3 }
= \RespBoxMath{12*x^2*y^2}(xy){4}{.0001}{[0,1]x[0,1]}$
\end{oQuestion}
\end{Verbatim}
@@ -7930,16 +8356,16 @@ and the second can be used to modify all fields created using
documentation on how to modify a field using the optional first
argument, and how to use the ``every'' command.\footnote{eforms manual on Web: \url{\bUrl/eformman.pdf}}
-\subsubsection{\texorpdfstring{\protect\cs{RespBoxTxt}}%
+\subsubsection{\tops{\protect\cs{RespBoxTxt}}%
{\textbackslash RespBoxTxt}: The Text Question}\label{ss:respboxtxt}
You can also pose a question that takes a simple text response. The
basic command for posing this type of question is
\cs{RespBoxTxt}. Consider the example given
earlier:
+\let\oqpriorhook\redpoint
\begin{oQuestion}{exTxt1}
-\redpoint Name the probability
-distribution popularly referred to as the ``bell-shaped curve''.\\[3pt]
+Name the probability distribution popularly referred to as the ``bell-shaped curve''.\\[3pt]
\mbox{\strut\RespBoxTxt{0}{0}{4}{Normal}{Normal Distribution}%
{Gaussian}{Gaussian Distribution}}
%\raisebox{-3bp}{\RespBoxTxt{0}{0}{4}{Normal}{Normal Distribution}%
@@ -7952,8 +8378,9 @@ question. If there is a match, the response is deemed correct.
The code for this example is
\begin{Verbatim}[xleftmargin=\amtIndent]
+\let\oqpriorhook\redpoint
\begin{oQuestion}{exTxt1}
-\redpoint Name the probability distribution popularly
+Name the probability distribution popularly
referred to as the ``bell-shaped curve''.\\
\RespBoxTxt{0}{0}{4}{Normal}{Normal Distribution}%
{Gaussian}{Gaussian Distribution}
@@ -8029,11 +8456,16 @@ field, the second can be used to modify all fields created using
\cs{RespBoxTxt}.
\redpoint See the document \href{eformman.pdf}{eFormMan.pdf} on
-\textit{\href{eformman.pdf}{eForm Support}} for complete
-documentation on how to modify a field using the optional first
-argument, and how to use the ``every'' command.\footnote{eforms manual on Web: \url{\bUrl/eformman.pdf}}
+\textit{\href{eformman.pdf}{eForm Support}} for complete documentation on how
+to modify a field using the optional first argument, and how to use the
+``every'' command. %\footnote{eforms manual on Web: \url{\bUrl/eformman.pdf}}
-\subsubsection{\texorpdfstring{\protect\cs{RespBoxTxtPC}}%
+\exAeBBlogPDF{p=1446} As an application to the \cs{RespBoxTxt} command, the article
+\textit{\mlhref{\urlAcroTeXBlog/?p=1446}{Exerquiz: Matching-type questions}} how to create a matching-type
+question; the article \textit{\mlhref{\urlAcroTeXBlog/?p=1446}{Exerquiz: Randomized matching-type questions}}
+discusses how to randomize a matching-type question.
+
+\subsubsection{\tops{\protect\cs{RespBoxTxtPC}}%
{\textbackslash RespBoxTxtPC}: The Text Question with Partial Credit}\label{ss:respboxtxtpc}
\textsf{Exerquiz} can now create text fill-in questions that awards
@@ -8114,7 +8546,7 @@ minimal examples given earlier. These enhancements can be used
within the \texttt{oQuestion}, the \texttt{shortquiz}, and the
\texttt{quiz} environments.
-\subsubsection{Including an Answer Key with \texorpdfstring
+\subsubsection{Including an Answer Key with \tops
{\protect\cs{CorrAnsButton}}{\textbackslash CorrAnsButton}}
The correct solution can be included in the question as well; just include
@@ -8124,8 +8556,9 @@ answer that will be viewed when the user clicks on the button.
The example below also illustrates the (optional) third parameter of
\cs{RespBoxMath}. Here we pose the question in the variable $t$ rather
than the default variable of $x$.
+\let\oqpriorhook\redpoint
\begin{oQuestion}{sine2}
-\redpoint Differentiate\\[1ex]
+Differentiate\\[1ex]
$\dfrac d{dt} \sin^2(t) =$
\RespBoxMath{2*sin(t)*cos(t)}(t){4}{.0001}{0}{1}\cgBdry\CorrAnsButton{2*sin(t)*cos(t)}
\end{oQuestion}
@@ -8134,7 +8567,8 @@ $\dfrac d{dt} \sin^2(t) =$
The listing follows:
\begin{Verbatim}[xleftmargin=\amtIndent]
\begin{oQuestion}{sine2}\\[1ex]
-\redpoint Differentiate $\dfrac d{dt} \sin^2(t) =$
+\let\oqpriorhook\redpoint
+Differentiate $\dfrac d{dt} \sin^2(t) =$
\RespBoxMath{2*sin(t)*cos(t)}(t){4}{.0001}{0}{1}\cgBdry
\CorrAnsButton{2*sin(t)*cos(t)}
\end{oQuestion}
@@ -8158,9 +8592,9 @@ environment containing the solution.
The user \texttt{Shift-Click}s on the \cs{CorrAnsButton} button to jump
to the solution.
-
+\let\oqpriorhook\redpoint
\begin{oQuestion}{sine3}
-\redpoint Differentiate\\[1ex]
+Differentiate\\[1ex]
$\dfrac d{dt} \sin^2(t) =$
\RespBoxMath{2*sin(t)*cos(t)}(t)[sine3]{4}{.0001}{0}{1}\cgBdry\CorrAnsButton{2*sin(t)*cos(t)}
\begin{solution}
@@ -8173,8 +8607,9 @@ $\dfrac d{dt} \sin^2(t) =$
\medskip\noindent
The listing follows:
\begin{Verbatim}[xleftmargin=\amtIndent]
+\let\oqpriorhook\redpoint
\begin{oQuestion}{sine3}\\[1ex]
-\redpoint Differentiate $\dfrac d{dt} \sin^2(t) =$
+Differentiate $\dfrac d{dt} \sin^2(t) =$
\RespBoxMath{2*sin(t)*cos(t)}(t)[sine3]{4}{.0001}{0}{1}\kern1bp
\CorrAnsButton{2*sin(t)*cos(t)}
\begin{solution}
@@ -8189,11 +8624,11 @@ The listing follows:
the \texttt{quiz} environments.
\newtopic Actually, \cs{CorrAnsButton} has an optional argument. The full syntax is
-\settowidth{\aebdimen}{\cs{CorrAnsButton\darg{\meta{display\_answer}}*\darg{\meta{JS\_function}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{CorrAnsButton\darg{\meta{display\_answer}}*\darg{\meta{JS\_function}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\CorrAnsButton{!meta(display_answer)}*{!meta(JS_function)}
\end{dCmd}
-\newtopic When the \texttt* is detected following the \meta{display\_answer}, the \meta{JS\_function}
+\eVerb When the \texttt* is detected following the \meta{display\_answer}, the \meta{JS\_function}
is used to evaluate \meta{display\_answer}, before displaying it. There is
one built-in function called \texttt{EvalCorrAnsButton}, the definition of
which is
@@ -8208,9 +8643,9 @@ Other JavaScript functions may be defined using the \texttt{insDLJS} environment
passed to \cs{CorrAnsButton} with the optional argument.
An example of this optional parameter is
-
+\let\oqpriorhook\redpoint
\begin{oQuestion}{add1}
-\redpoint Perform the indicated operation, and enter
+Perform the indicated operation, and enter
result into the box.\\[1ex]
$ \text{9} + \text{8} =$
\RespBoxMath{9 + 8}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{9 + 8}*{EvalCorrAnsButton}\cgBdry
@@ -8220,8 +8655,9 @@ $ \text{9} + \text{8} =$
\medskip\noindent
The listing follows:
\begin{Verbatim}[xleftmargin=\amtIndent]
+\let\oqpriorhook\redpoint
\begin{oQuestion}{add1}
-\redpoint Perform the indicated operation, and enter
+Perform the indicated operation, and enter
result into the box.\\[1ex]
$ 9 + 8 = $
\RespBoxMath{9 + 8}{1}{.0001}{[0,1]}\cgBdry
@@ -8237,9 +8673,9 @@ The macro \cs{sqTallyBox} is used to keep a running total of the
number of wrong answers a user has entered into the response box.
For example,
-
+\let\oqpriorhook\redpoint
\begin{oQuestion}{sine4}
-\redpoint \hypertarget{exofT}{Differentiate}\\[1ex]
+\hypertarget{exofT}{Differentiate}\\[1ex]
$\dfrac d{dx} \sin^2(x) =$
\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}\cgBdry\CorrAnsButton{2*sin(x)*cos(x)}\cgBdry
\sqTallyBox
@@ -8267,9 +8703,9 @@ For the \texttt{oQuestion} and the \texttt{shortquiz}
environments, you can clear the response box fields by placing
insert \cs{sqClearButton}.
-
+\let\oqpriorhook\redpoint
\begin{oQuestion}{sine5}
-\redpoint Differentiate\\[1ex]
+Differentiate\\[1ex]
$\dfrac d{dx} \sin^2(x) =$
\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}\kern1bp\CorrAnsButton{2*sin(x)*cos(x)}\cgBdry
\sqTallyBox\cgBdry\sqClearButton
@@ -8621,11 +9057,11 @@ founders of Calculus.
\end{Verbatim}
\noindent The \cs{AnswerField} has the following syntax:
-\settowidth{\aebdimen}{\cs{AnswerField[\anglemeta{field\_opts}]\darg{\meta{base\_name}}}}%
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{AnswerField[\anglemeta{field\_opts}]\darg{\meta{base\_name}}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
\AnswerField[!anglemeta(field_opts)]{!meta(base_name)}
\end{dCmd}
-\noindent The parameter \anglemeta{field\_opts} is the typical optional
+\eVerb The parameter \anglemeta{field\_opts} is the typical optional
parameter for all \textsf{eform} fields; it is used to change the appearance
of the field. The parameter \meta{base\_name} is the (base) name of the quiz
this field will hold the answers for.
@@ -8789,8 +9225,8 @@ any of the \cs{every\ameta{cmdname}} family of commands; however, that device
cannot, by design, change any of the actions \pkg{exerquiz} has defined.
S everal key-value pairs are used to insert JavaScript code into response
boxes, multiple choice, and multiple selection fields.
-\settowidth{\aebdimen}{\cs{addToAction*\darg{\ameta{key}}\darg{\ameta{code}}}}%
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{addToAction*\darg{\ameta{key}}\darg{\ameta{code}}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
\AddAAFormat{!ameta(code)}
\AddAAKeystroke{!ameta(code)}
\AddAAMouseUpMC{!ameta(code)}
@@ -8798,7 +9234,7 @@ boxes, multiple choice, and multiple selection fields.
\setActionKeys{!ameta(KV-pairs)}
\addToAction*{!ameta(key)}{!ameta(code)}
\end{dCmd}
-\newtopic
+\eVerb
The command \cs{setActionKeys} is a special command used to process the
KV-pairs of the \pkg{eforms} package. It only accepts these four keys:
\cs{AddAAFormat}, \cs{AddAAKeystroke}, \cs{AddAAMouseUpMC}, and
@@ -9258,12 +9694,11 @@ nine items will be randomized, whereas, the last item (None of
these) will placed at the end of the list.
\newtopic Additional, there are five other commands that support the
-randomization feature.\settowidth{\aebdimen}{\ttfamily\string\saveRandomSeed\quad\string\inputRandomSeed}%
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+randomization feature.\bVerb\takeMeasure{\ttfamily\string\saveRandomSeed\quad\string\inputRandomSeed}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
\saveRandomSeed!quad\inputRandomSeed
\end{dCmd}
-
-\newtopic A pseudo-random sequence of numbers requires an initial \emph{seed
+\eVerb A pseudo-random sequence of numbers requires an initial \emph{seed
value}. The example file \texttt{random.tex} creates, by default, a
seed value based on the date and time (the number of minutes since
midnight); consequently, after every minute, the random sequence
@@ -9304,12 +9739,11 @@ of the choices as you expect it to, it could be that
\textsf{exerquiz} is reading an old \texttt{.sav} file. Either delete that file
in your source folder, or comment out \cs{inputRandomSeed} in your document.
-\settowidth{\aebdimen}{\cs{useRandomSeed\darg{\meta{number}}}}%
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{useRandomSeed\darg{\meta{number}}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
\useRandomSeed{!meta(number)}
\end{dCmd}
-
-\newtopic\indent You may have several sections of the same class take a quiz with the
+\eVerb\indent You may have several sections of the same class take a quiz with the
questions rearranged for each. Save the seed value used by
\textsf{exerquiz} to randomize the choices for the class by opening the
\texttt{.sav} and by copying and pasting the line you see into your document;
@@ -9321,15 +9755,14 @@ for example, it could read \cs{randomi=132088850}, then use
\end{Verbatim}
Of course comment out \cs{inputRandomSeed}.
-\settowidth{\aebdimen}{\cs{allowRandomizedChoices}}%
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{allowRandomizedChoices}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
\turnOnRandomize
\obeyLocalRandomize
\doNotRandomizeChoices
\allowRandomizedChoices
\end{dCmd}
-
-\newtopic\indent The command \cs{turnOnRandomize} overrides all local settings of \cs{bChoices}
+\eVerb\indent The command \cs{turnOnRandomize} overrides all local settings of \cs{bChoices}
and causes all choice lists to be randomized. While \cs{obeyLocalRandomize}
returns control to the local settings. For example,
\begin{Verbatim}[xleftmargin=\amtIndent]
@@ -9426,11 +9859,11 @@ The table (as seen in \hyperref[fig:qzSumryTbl]{Figure~\ref*{fig:qzSumryTbl}}) s
which the student gave a response. The student
can review the table, and optionally return to questions that had no response.
-\settowidth{\aebdimen}{\cs{displaySumryTbl[\ameta{KV-pairs}]\darg{\ameta{quiz\_name}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{displaySumryTbl[\ameta{KV-pairs}]\darg{\ameta{quiz\_name}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\displaySumryTbl[!ameta(KV-pairs)]{!ameta(quiz_name)}
\end{dCmd}
-\newtopic\textbf{Parameter Description:} The second parameter is the quiz name of the quiz this table represents,
+\eVerb\textbf{Parameter Description:} The second parameter is the quiz name of the quiz this table represents,
in most cases, \cs{currQuiz} is used. The first parameter consists of key-value pairs, these
are described below.
@@ -9509,21 +9942,21 @@ whatever reasons, you need additional commands.
\newtopic In the area just after \cs{end\darg{questions}} and before `End
Quiz,' place the command
-\settowidth{\aebdimen}{\cs{writeProListAux}}
-\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{writeProListAux}}
+\begin{dCmd}{\bxSize}
\writeProListAux
\end{dCmd}
-\newtopic\indent This command saves to the auxiliary file the two pieces of information the
+\eVerb\indent This command saves to the auxiliary file the two pieces of information the
\cs{dis\-playSumryTbl} needs to build the table. Then, in the location of
your choice---usually outside of any quiz environment---enclose
\cs{displaySumryTbl} in the \texttt{sumryTblAux} environment.
-\settowidth{\aebdimen}{\cs{displaySumryTbl[\ameta{KV-keys}]\darg{\ameta{quiz\_name}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{displaySumryTbl[\ameta{KV-keys}]\darg{\ameta{quiz\_name}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\begin{sumryTblAux}{!meta(quiz_name)}
\displaySumryTbl[!ameta(KV-keys)]{!ameta(quiz_name)}
\end{sumryTblAux}
\end{dCmd}
-\newtopic\indent Here, \ameta{quiz\_name} is the name of the quiz that this table represents. An example
+\eVerb\indent Here, \ameta{quiz\_name} is the name of the quiz that this table represents. An example
of this environment follows.
\begin{Verbatim}[xleftmargin=\amtIndent]
\begin{sumryTblAux}{\currQuiz}\small %<--make a little smaller
@@ -9556,11 +9989,11 @@ and quizzes.
This ``intelligent'' bookmarking system requires
the minimum of effort to use. For exercises, the command for bookmarking
is \Com{expdfbookmark},
-\settowidth{\aebdimen}{\cs{expdfbookmark\darg{\ameta{bookmark\_title}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{expdfbookmark\darg{\ameta{bookmark\_title}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\expdfbookmark{!ameta(bookmark_title)}
\end{dCmd}
-\newtopic and should be placed immediately following the beginning of an
+\eVerb and should be placed immediately following the beginning of an
exercise environment, like so,\def\OR{\hspace*{-\amtIndent}\normalfont or,}
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
\begin{exercise}\expdfbookmark{!ameta(bookmark_title)}
@@ -9591,11 +10024,11 @@ letter. These commands can be redefined.
\subsection{For Quizzes}
To bookmark a \texttt{shortquiz} or \texttt{quiz}, use \Com{quizpdfbookmark}.
-\settowidth{\aebdimen}{\cs{quizpdfbookmark\darg{\ameta{bookmark\_title}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\cs{quizpdfbookmark\darg{\ameta{bookmark\_title}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
\quizpdfbookmark{!ameta(bookmark_title)}
\end{dCmd}
-\newtopic\indent It should be placed immediately following the beginning of the environments,
+\eVerb It should be placed immediately following the beginning of the environments,
\def\OR{\hspace*{-\amtIndent}\normalfont or,}
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
\begin{shortquiz}\quizpdfbookmark{!ameta(bookmark_title)}
@@ -9800,7 +10233,7 @@ point we call a \texttt{resetQuiz("\cs{curr@quiz}")} which
sets some values in an array to indicate the state of this quiz.
\subsubsection{Gathering ID Information with
-\texorpdfstring{\protect\cs{textField}}{\textbackslash textField}}
+\tops{\protect\cs{textField}}{\textbackslash textField}}
\redpoint What kind of information would one submit to a CGI?
Well, there is the usual information concerning the identity of
@@ -9836,7 +10269,7 @@ support for complete documentation on
\cs{textField}.
\subsubsection{Gathering Quiz Specific Information with
-\texorpdfstring{\protect\cs{eqSubmit}}{\textbackslash eqSubmit}}
+\tops{\protect\cs{eqSubmit}}{\textbackslash eqSubmit}}
In addition to ID information on the one taking the quiz,
specific information about what quiz is being taken and where the
@@ -9907,7 +10340,7 @@ hidden text fields.
\subsection{Features \protect\textit{apropos} to Submitting}
-%\subsubsection{\texorpdfstring{\protect\cs{RespBoxEssay}}
+%\subsubsection{\tops{\protect\cs{RespBoxEssay}}
%{\textbackslash RespBoxEssay}: The Essay Question}
%
%Some disciplines make heavy use of the essay question. In an effort to
@@ -9934,7 +10367,7 @@ hidden text fields.
See \Nameref{sss:asignPts} for information on this subject.
-\subsubsection{\texorpdfstring{\protect\cs{NoPeeking}}
+\subsubsection{\tops{\protect\cs{NoPeeking}}
{\textbackslash NoPeeking}}\label{sss:nopeek}
If you execute the command \cs{NoPeeking} in the preamble of your
@@ -10751,6 +11184,15 @@ The latter definition takes a delimited argument, necessary since it executes
within a verbatim environment where braces \texttt{\{} and \texttt{\}} are
not grouping delimiters.
+\subsubsection{\texttt{useDeNums} (\texttt{useGermanNums}}\label{useDeNums}
+
+An option to support the use of the German number system (1234,56), where, in that system
+the comma (,) is used as the decimal point.
+
+\exAeBBlogPDF{p=1039} Refer to the {\AcroTeX} Blog article
+\textit{\href{\urlAcroTeXBlog/?p=1129}{The \pkg{dljslib} package: German
+number format}} for more information and working examples.
+
\subsection{Compare Functions} \label{compareFuncs}
Compare functions are used to compare the author's answer with the
@@ -10799,7 +11241,7 @@ $\displaystyle\int\sin(x)\,dx =
indefinite integration comparison.
-\subsubsection{satisfyEq}
+\subsubsection{\tops{\protect\opt}{}{satisfyEq}}
The \texttt{satisfyEq} library of procedures supports the type of question where
the student is asked to enter one or more points that satisfy an equation.
@@ -11090,6 +11532,17 @@ Convert 123.4 to scientific notation.
keep working!"}
\end{Verbatim}
+\subsubsection{\texttt{useEnNums}}
+
+This is an analog to \texttt{useDeNums}, but no new response function is
+defined. It deals with filtering the users' responses to a specified number
+of decimal places.
+
+\exAeBBlogPDF{p=1470} Refer to the {\AcroTeX} Blog article
+\textit{\href{\urlAcroTeXBlog/?p=1470}{The \pkg{dljslib} package: English
+number format}} for more information and working examples.
+
+
\subsection{Extending Numerical Functions} \label{extNumerFuncs}
These JavaScript functions extend the collection of built-in
@@ -11266,7 +11719,7 @@ Sameshima)\\
\markright{References}
\begin{thebibliography}{[1]}\label{references}
-\addcontentsline{toc}{section}{\protect\numberline{}References}
+\addcontentsline{toc}{part}{References}
\backrefparscanfalse
\def\srtln{\vskip-\baselineskip\vskip-\parsep}
\def\lngln{\vskip-\parsep}
@@ -12098,7 +12551,7 @@ is 100\%.
\subsection{Greater Customization with
- \texorpdfstring{\protect\cs{TextField}}
+ \tops{\protect\cs{TextField}}
{\textbackslash TextField}}\label{ss:modoutputfield}
The \cs{ScoreField} macro is defined as
@@ -12123,7 +12576,7 @@ ways: (1) by changing some of the options in \cs{TextField}; (2)
changing the macro definition of \cs{LayoutTextField}.
\subsubsection{Admissible key-value pairs of
-\texorpdfstring{\protect\cs{TextField}}
+\tops{\protect\cs{TextField}}
{\textbackslash TextField}}\label{sss:modtextfield}
In this section we will outline methods of modifying the
@@ -12180,7 +12633,7 @@ We next present several examples that illustrate the use of these
options.
\subsubsection{Some Examples of
-\texorpdfstring{\protect\cs{Textfield}}
+\tops{\protect\cs{Textfield}}
{\textbackslash Textfield}}\label{sss:exampltextfield}
\def\LayoutTextField#1#2{\redpoint\raisebox{-3pt}{#2}}
@@ -12226,7 +12679,7 @@ code on the ``back'' of the \texttt{align} parameter.
\end{Verbatim}
\subsubsection{Modifying
-\texorpdfstring{\protect\cs{LayoutTextField}} {\textbackslash
+\tops{\protect\cs{LayoutTextField}} {\textbackslash
LayoutTextField}}\label{sss:modlayout}
\renewcommand\LayoutTextField[2]{#1 #2}
diff --git a/texmf-dist/doc/latex/acrotex/eformman.pdf b/texmf-dist/doc/latex/acrotex/eformman.pdf
index 32644286..6a74f299 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 82bea44f..c56e1beb 100644
--- a/texmf-dist/doc/latex/acrotex/eformman.tex
+++ b/texmf-dist/doc/latex/acrotex/eformman.tex
@@ -12,6 +12,7 @@
\setlength{\marginparpush}{3pt}
\setlength{\mathindent}{\the\parindent}
+
%\previewOn\pmpvOn
\usepackage{graphicx,array,longtable}
@@ -21,7 +22,6 @@
\DeclareInitView{layoutmag={navitab:UseOutlines}}
\xbmksetup{colors={int=red},styles={intbf}}
-
\def\STRUT{\rule{0pt}{14pt}}
\def\negSTRUT{\rule[-8pt]{0pt}{0pt}}
\def\mSTRUT{\makebox[0pt][l]{\phantom{$\frac00$}}}
@@ -72,16 +72,17 @@
\def\tutpathi{tutorial}
\def\expath{../examples}
+\let\tops\texorpdfstring
\DeclareDocInfo
{
university={\AcroTeX.Net\protect\\[1ex]eforms and insdljs Documentation},
- title={Support for AcroForms and Links, and for\texorpdfstring{\protect\\[2ex]}{ }Document JavaScript and Open Page Events},
+ title={Support for AcroForms and Links, and for\tops{\protect\\[2ex]}{ }Document JavaScript and Open Page Events},
author={D. P. Story},
email={dpstory@acrotex.net},
subject={Documentation for the eforms and insdljs packages},
talksite={\url{www.acrotex.net}},
version={2.0},
- prepared={2021/02/17},
+ prepared={2021/05/10},
preparedLabel={Distribution Dated:},
keywords={LaTeX, hyperref, PDF, exercises, quizzes},
copyrightStatus=True,
@@ -103,7 +104,7 @@
\sectionLayout{indent=-62.5pt,fontsize=large,color=aeb,fontfamily=sffamily}
\subsectionLayout{indent=-31.25pt,color=aeb,fontfamily=sffamily}
\subsubsectionLayout{indent=0pt,color=aeb,fontfamily=sffamily}
-\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}}
+\subsubDefaultDing{\tops{$\bullet$}{\textrm\textbullet}}
\def\verygoodbreak{%
\vskip0pt plus1in\goodbreak\vskip0pt plus-1in}
@@ -118,7 +119,7 @@
\makeatletter
-\let\bslash=\@backslashchar
+\let\bslash\@backslashchar
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{0pt}{6pt}{-3pt}{\bfseries}}
% Begin definition of \appendixsubsection
@@ -630,11 +631,12 @@ The push button is a button field that has no
value, it is neither on nor off. Generally, push buttons are used
to initiate some action, such as JavaScript action.
-\settowidth{\aebdimen}{\cs{pushButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+%\settowidth{\aebdimen}{\cs{pushButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
+\bVerb\takeMeasure{\string\cs{pushButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
\pushButton[#1]{#2}{#3}{#4}
\end{dCmd}
-
+\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
@@ -690,11 +692,12 @@ A check box is a type of button that has one of two values,
``off'' is \texttt{Off}; the value of the ``on'' state can be
defined by the user.
-\settowidth{\aebdimen}{\cs{checkBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
-\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+%\settowidth{\aebdimen}{\cs{checkBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\bVerb\takeMeasure{\cs{checkBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\begin{dCmd}{\bxSize}
\checkBox[#1]{#2}{#3}{#4}{#5}
\end{dCmd}
-
+\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
@@ -745,11 +748,12 @@ the \pkg{eforms} package.
A radio button field is similar to a check box, but is meant to be
used in unison with one or more additional radio buttons.
-\settowidth{\aebdimen}{\cs{radioButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
-\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+%\settowidth{\aebdimen}{\cs{radioButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\bVerb\takeMeasure{\cs{radioButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\begin{dCmd}{{\bxSize}}
\radioButton[#1]{#2}{#3}{#4}{#5}
\end{dCmd}
-
+\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
@@ -824,11 +828,12 @@ of the choices are visible in a rectangle. A scroll bar becomes
available if any of the items in the list are not visible in the
rectangle provided.
-\settowidth{\aebdimen}{\cs{listBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
-\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+%\settowidth{\aebdimen}{\cs{listBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\bVerb\takeMeasure{\cs{listBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}%
+\begin{dCmd}{\bxSize}
\listBox[#1]{#2}{#3}{#4}{#5}
\end{dCmd}
-
+\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
@@ -916,11 +921,12 @@ A combo box is a drop down list of items that can optionally have
an editable text box for the user to type in a value other than
the predefined choices.
-\settowidth{\aebdimen}{\cs{comboBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+%\settowidth{\aebdimen}{\cs{comboBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\bVerb\takeMeasure{\cs{comboBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}%
\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
\comboBox[#1]{#2}{#3}{#4}{#5}
\end{dCmd}
-
+\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
@@ -1014,11 +1020,12 @@ else
A text field is the way a user can enter text into a form.
-\settowidth{\aebdimen}{\cs{textField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
-\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+%\settowidth{\aebdimen}{\cs{textField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
+\bVerb\takeMeasure{\cs{textField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}%
+\begin{dCmd}{\bxSize}
\textField[#1]{#2}{#3}{#4}
\end{dCmd}
-
+\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
@@ -1112,11 +1119,12 @@ Total: & \textField[\AA{%
A signature field is a field that can be digitally signed.
-\settowidth{\aebdimen}{\cs{sigField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
-\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+%\settowidth{\aebdimen}{\cs{sigField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
+\bVerb\takeMeasure{\cs{sigField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}%
+\begin{dCmd}{\bxSize}
\sigField[#1]{#2}{#3}{#4}
\end{dCmd}
-
+\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
@@ -1224,6 +1232,145 @@ is signed.
\end{itemize}
+\subsection{Obtaining a uniform look across all workflows}\label{s:efuniformWF}
+
+In this section, several commands are
+presented that help you layout {\PDF} forms, as created by \pkg{eforms}, in a
+way that is consistent across all workflows (\app{dvips}/\penalty0
+\app{Distiller}, \app{pdflatex}, \app{lualatex}, and \app{xelatex}).
+
+\bVerb\takeMeasure{\string\makeXasPDOn\qquad\string\vcgBdry[\ameta{length}]}%
+\settowidth{\aebdimen}{\cs{makeXasPDOn}}%
+\def\1{\rlap{\ttfamily\hskip\aebdimen\qquad\string\cgBdry*[\ameta{length}]}}%
+\def\2{\rlap{\ttfamily\hskip\aebdimen\qquad\string\vcgBdry[\ameta{length}]}}%
+\def\3{\rlap{\hskip\linewidth\ding{182}}}
+\def\4{\rlap{\hskip\linewidth\ding{183}}}
+\def\5{\rlap{\hskip\linewidth\ding{184}}}
+\def\6{\rlap{\hskip\linewidth\ding{185}}}
+\def\7{\rlap{\hskip\linewidth\ding{186}}}
+\xdef\panelWidth{\the\linewidth}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+!3\makeXasPDOn!qquad\makeXasPDOff
+!4\makePDasXOn!qquad\makePDasXOff
+!5!1\olBdry
+!6!2\volBdry
+!7\efKern{!ameta(length!SUB1)}{!ameta(length!SUB2)}
+\end{dCmd}
+\endgroup
+
+\paragraph*{Matching dimensions of form fields.}
+The form fields created by \app{xelatex} are smaller than the ones with the
+same dimensions created the other {\PDF} creators (\app{pdflatex},
+\app{lualatex}, or \app{dvips}/\penalty0\app{Distiller}). To obtain a uniform
+look across all workflows, you can either increase the size of the
+\app{xelatex} form fields, or decrease the size of the form fields created by
+non-\app{xelatex} workflows. The first two lines of the display (\ding{182}
+and \ding{183}) address the issue that different workflows produce different
+sized form fields even though their dimensions are the same.
+\begin{itemize}
+
+ \item Expanding the command \cs{makeXasPDOn} increases the size of the
+ form fields created by \app{xelatex} to make them the same size as
+ those created by the other applications\app{pdflatex} or; while
+ \cs{makeXasPDOff} turns off this feature, the fields created by
+ \app{xelatex} are smaller than the ones otherwise created by the
+ other workflows.
+
+ The \pkg{eforms} package expands \cs{makeXasPDOn} as the default behavior.
+
+ \item Expanding the command \cs{makePDasXOn} decreases the size of the
+ created by non-\app{xelatex} workflows to make them the same size
+ as those created by \app{xelatex}; while \cs{makeXasPDOff} turns
+ off this feature, the fields created by non-\app{xelatex} workflows
+ are larger than the ones created by \app{xelatex}.
+\end{itemize}
+
+\paragraph*{Setting the horizontal relationship between fields.} When one form field follows another
+on the same line, the space between them becomes an issue. There are three
+problems addressed in this paragraph:
+\begin{itemize}
+ \item You\FmtMP{\cs{olBdry} described, illustrated} want the two fields, which have the same border thickness
+ (usually 1\,bp), to overlap borders, like so,
+ \begin{quote} %\previewtrue
+ \textField{txt1}{30bp}{10bp}\olBdry\textField{txt2}{30bp}{10bp}\\[3pt]
+ \footnotesize\cs{textField\darg{txt1}\darg{30bp}\darg{10bp}}\textbf{\cs{olBdry}}\\
+ \cs{textField\darg{txt2}\darg{30bp}\darg{10bp}}
+ \end{quote}
+ use the \cs{olBdry} command (\textbf{o}ver\textbf{l}ay
+ \textbf{b}oun\textbf{d}a\textbf{ry}), as listed in line~\ding{184} in
+ the display above. Overlapping the border lines is only useful if the
+ border colors are the same.
+
+%\promoteNewPage[\baselineskip]
+
+ \item When\FmtMP{\cs{cgBdry} described, illustrated} the border colors
+ are different, you can place neighboring fields contiguously. To
+ make the field have contiguous border lines, use the \cs{cgBdry}
+ command (\textbf{c}onti\textbf{g}uous
+ \textbf{b}oun\textbf{d}a\textbf{ry}), as listed in line \ding{184}
+ in the above display.
+ \begin{aebQuote}
+ \def\ci{red}\def\cii{blue}
+ \textField[\BC{\ci}]{txt3}{30bp}{10bp}\cgBdry\textField[\BC{\cii}]{txt4}{30bp}{10bp}\\[3pt]
+ \footnotesize\cs{textField[\string\BC\darg{\ci}]\darg{txt3}\darg{30bp}\darg{10bp}}\textbf{\cs{cgBdry}}\\
+ \cs{textField[\string\BC\darg{\cii}]\darg{txt4}\darg{30bp}\darg{10bp}}
+ \end{aebQuote}
+
+ \item The\FmtMP{\cs{olBdry} continued} third case is where you want the field to be separated by a
+ nonzero length, in this case, the optional first argument
+ \cs{cgBdry[\ameta{length}]} is used; \cs{cgBdry} positions the two neighboring
+ field contiguously, then moves the right-field \ameta{length} to the right.
+ \begin{quote}
+ \textField{txt5}{30bp}{10bp}\cgBdry[1in]\textField{txt6}{30bp}{10bp}\\[3pt]
+ \footnotesize\cs{textField\darg{txt5}\darg{30bp}\darg{10bp}}\textbf{\cs{cgBdry[1in]}}\\
+ \cs{textField\darg{txt6}\darg{30bp}\darg{10bp}}
+ \end{quote}
+ The two fields are separated by 1\,inch.
+\end{itemize}
+
+\paragraph*{Setting the vertical relationship between fields.} In a similar
+manner, the space between two fields on consecutive lines may be precisely
+controlled. Both \cs{volBdry} and \cs{vcgBdry} (line~\ding{185} in the
+display) start a new paragraph. The \cs{volBdry}\FmtMP{\cs{volBdry}
+described} command positions the two fields so that their borders exactly
+overlap (assuming the same border width), while the \cs{vcgBdry} command
+positions them so the borders are contiguous. The optional argument for
+\cs{vcgBdry[\ameta{length}]}\FmtMP{\cs{vcgBdry} described} allows for a
+separation of exactly \ameta{length}, assuming \cs{parskip} is 0\,pt.
+\begin{quote}\def\ci{red}\def\cii{blue}
+\settowidth\aebdimen{\footnotesize\ttfamily\ameta{field\SUB1}\cs{vcgBdry[6pt]}\ameta{field\SUB2}}\edef\widthi{\the\aebdimen}%
+\def\1{\makebox[0pt][l]{\footnotesize\hskip\widthi\quad\vrbnormal(overlay borders)}}%
+\def\2{\makebox[0pt][l]{\footnotesize\hskip\widthi\quad\vrbnormal(contiguous borders)}}%
+\def\3{\makebox[0pt][l]{\footnotesize\hskip\widthi\quad\vrbnormal(6pt separation)}}%
+\parbox{36pt}{\textField{txt7}{30bp}{10bp}\volBdry\textField{txt8}{30bp}{10bp}}\quad
+\1\footnotesize\ameta{field\SUB1}\textbf{\cs{volBdry}}\ameta{field\SUB2}\\[6pt]
+\parbox{36pt}{\textField[\BC{\ci}]{txt8}{30bp}{10bp}\vcgBdry
+\textField[\BC{\cii}]{txt9}{30bp}{10bp}}\quad
+\2\footnotesize\ameta{field\SUB1}\textbf{\cs{vcgBdry}}\ameta{field\SUB2}\\[6pt]
+\parbox{36pt}{\textField{txt10}{30bp}{10bp}\vcgBdry[6pt]
+\textField{txt11}{30bp}{10bp}}\quad
+\3\footnotesize\ameta{field\SUB1}\textbf{\cs{vcgBdry[6pt]}}\ameta{field\SUB2}
+\end{quote}
+If \cs{parskip} is not 0\,pt, use the star form,
+\cs{vcgBdry*[\ameta{length}]}\FmtMP{\cs{vcgBdry*} described}, on the last line of form fields; when the star
+argument is present, \cs{vcgBdry} performs the subtraction
+\texttt{\ameta{length}-\cs{parskip}}, in that way, there is exactly
+\ameta{length} of vertical space between the last form field and the next paragraph.
+
+%\begin{example}%\recordExample{eforms/positioning-fields.pdf}
+%The commands of this section are illustrated in the sample file associated with the
+%example.\noexskip\eqfititin{\exrtnlabelformat}
+%\end{example}
+
+\paragraph*{On the \cs{efKern} command.} The \cs{efKern}
+command listed in above display, line~\ding{186}, is a general command that
+can be used to induce driver-dependent spacing. It is designed to provide
+spacing between fields and gives finer control over the ``intelligent'' and
+automatic spacing provided by \cs{olBdry} and \cs{cgBdry}. When \emph{not
+compiled} with the \texttt{xetex} option, \cs{efKern} expands to
+\cs{kern\ameta{length\SUB1}}, and when \emph{compiled with} the
+\texttt{xetex} option, \cs{efKern} expands to \cs{kern\ameta{length\SUB2}}.
+
\verygoodbreak
@@ -1245,7 +1392,7 @@ is a named color. \cs{defaultlinkcolor} has a definition of
\begin{Verbatim}[xleftmargin=\amtIndent]
\newcommand{\defaultlinkcolor}{\@linkcolor}
\end{Verbatim}
-\noindent where \cs{@linkcolor} is a command defined in
+where \cs{@linkcolor} is a command defined in
\textsf{hyperref}, and is defined to be \texttt{red}. This can be
redefined as desired.\footnote{The {\Web} package redefines
\cs{@linkcolor} to be a flavor of green.}
@@ -1254,12 +1401,14 @@ The first link command is a general link for text, or any
{\LaTeX} content. It is used, for example, by the \textsf{aeb\_mlink}
package to create multiple-line links.
-\settowidth{\aebdimen}{\cs{setLinkText[\meta{options}]\darg{\meta{link\_text}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+%\settowidth{\aebdimen}{\cs{setLinkText[\meta{options}]\darg{\meta{link\_text}}}}
+\bVerb\takeMeasure{\cs{setLinkText[\meta{options}]\darg{\meta{link\_text}}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
\setLink[!meta(options)]{!meta(link_text)}
!grayV(\setLinkText[!meta(options)]{!meta(link_text)})
\end{dCmd}
-\newtopic Both link commands are the same, the use of the second one, \cs{setLinkText} (grayed out), is
+\eVerb
+Both link commands are the same, the use of the second one, \cs{setLinkText} (grayed out), is
discouraged in favor of the use of \cs{setLink}.
\PD The command has two arguments, the first is optional. The first
@@ -1273,12 +1422,10 @@ anything that takes up space, such as a graphic or \cs{parbox}.
\Example \setLink[\A{\JS{app.alert("AcroTeX rocks!")}}
\linktxtcolor{blue}\Color{0 0 1}\W1\S{U}\H{P}]{Push me!}
-\begingroup\obeyspaces\settowidth{\aebdimen}{\ttfamily%
- \string\linktxtcolor\darg{blue}\string\Color\darg{0 0 1}\string\W1\string\S\darg{U}\string\H\darg{P}]\darg{Push me!}%
-}%
-\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\def\rB{]}\takeMeasure{\quad\string\linktxtcolor\darg{blue}\string\Color\darg{0 0 1}\string\W1\string\S\darg{U}\string\H\darg{P}\rB\darg{Push me!}}%
+\begin{dCmd*}[commandchars={~@$}]{\bxSize}
\setLink[\A{\JS{app.alert("AcroTeX rocks!")}}
- \linktxtcolor{blue}\Color{0 0 1}\W1\S{U}\H{P}]{Push me!}
+~quad\linktxtcolor{blue}\Color{0 0 1}\W1\S{U}\H{P}]{Push me!}
\end{dCmd*}
\endgroup
@@ -1290,11 +1437,13 @@ rather comprehensive article \textit{Support for Links in AeB/eForms},
\newtopic\indent The next link command is a convenience command to put the link content into a parbox,
the parameters enable you to set the width, height and position of material in the box.
-\settowidth{\aebdimen}{\cs{setLinkBbox[\meta{options}]\darg{\meta{width}}\darg{\meta{height}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+%\settowidth{\aebdimen}{\cs{setLinkBbox[\meta{options}]\darg{\meta{width}}\darg{\meta{height}}}}
+\bVerb\takeMeasure{\cs{setLinkBbox[\meta{options}]\darg{\meta{width}}\darg{\meta{height}}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
\setLinkBbox[!meta(options)]{!meta(width)}{!meta(height)}
- [!meta(position)]{!meta(link_content)}
+!quad[!meta(position)]{!meta(link_content)}
\end{dCmd}
+\endgroup
\PD The command has five arguments, the first is optional.
\begin{aebDescript}
\item [\meta{options}] are optional key-value pairs to change the appearance or action
@@ -1306,13 +1455,10 @@ the parameters enable you to set the width, height and position of material in t
\end{aebDescript}
\Example \setLinkBbox[\W{1}\Color{1 0 0}\A{\JS{app.alert("Thank you for using AcroTeX!")}}]{50bp}{30bp}[c]{\centering Press Me!}
-\begingroup\obeyspaces%
-\settowidth{\aebdimen}{\ttfamily%
- \string\A\darg{\string\JS\darg{app.alert("Thank you for using AcroTeX!")}}%
-}%
-\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{\quad\string\A\darg{\string\JS\darg{app.alert("Thank you for using AcroTeX!")}}}%
+\begin{dCmd*}[commandchars={~@$}]{\bxSize}
\setLinkBbox[\W{1}\Color{1 0 0}
- \A{\JS{app.alert("Thank you for using AcroTeX!")}}
+~quad\A{\JS{app.alert("Thank you for using AcroTeX!")}}
]{50bp}{30bp}[c]{\centering Press Me!}
\end{dCmd*}
\endgroup
@@ -1795,7 +1941,7 @@ documentation in the \textsf{insdljs} package, which is distributed with
the {\cAcroB}.
\subsubsection{The Convenience Command
- \texorpdfstring{\protect\cs{JS}}{\CMD{JS}}}\label{convienceJS}
+ \tops{\protect\cs{JS}}{\CMD{JS}}}\label{convienceJS}
The syntax for writing JavaScript actions is
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!~@]
@@ -1948,23 +2094,39 @@ is found on the {\AcroBlog} website.
\subsection{Defining JavaScript Strings with
- \texorpdfstring{\protect\cs{defineJSStr}}{\CMD{defineJSStr}}}
-
-The command \Com{defineJSStr} is used to define JavaScript strings, such as in dialog boxes.
-The syntax for this command is
-\settowidth{\aebdimen}{\cs{defineJSStr\darg{\cs{\anglemeta{CMD}}}\darg{\anglemeta{JS\_string}}}}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
-\defineJSStr{\!anglemeta(CMD)}{!anglemeta(JS_string)}
+ \tops{\protect\cs}{\CMD}{flJSStr} and \tops{\protect\cs}{\CMD}{dlJSStr}}
+
+The \pkg{insdljs} package defines \cs{flJSStr} and \cs{dlJSStr} to
+help create JavaScript strings that contain Latin~1 glyphs (or for the
+general purpose of defining JavaScript strings).
+\bVerb\takeMeasure{\string\flJSStr*[\ameta{options}]\darg{\cs{\ameta{cmd}}}\darg{\ameta{JS\_string}}}%
+\def\1{\rlap{\hskip\linewidth\sffamily(Field level)}}%
+\def\2{\rlap{\hskip\linewidth\sffamily(Document level)}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+!1\flJSStr*[!ameta(options)]{\!ameta(cmd)}{!ameta(JS_string)}
+!2\dlJSStr*[!ameta(options)]{\!ameta(cmd)}{!ameta(JS_string)}
\end{dCmd}
-\PD Where \cs{\anglemeta{CMD}} is a command to be defined by
-\cs{defineJSStr}, for example, \cs{myMessage}, and \anglemeta{JS\_string} is
-the JavaScript string to be defined as the expansion of the
-\cs{\anglemeta{CMD}}.
-
-\CmdDescription \cs{defineJSStr} executes \verb!\xdef#1{"#2"}!, so
-the JavaScript is expanded at the time of definition. (Note the
-enclosing double quotes) Before the expansion occurs, however, there
-are a number of definitions that occur locally:
+\eVerb The previously documented \cs{defineJSStr} command is now an alias for
+\cs{flJSStr}. Each command defines a new command \cs{\ameta{cmd}} with body
+\meta{JS\_string}. The command \cs{flJSStr} is designed to define JavaScript
+strings that are passed through the optional argument of a form field or link
+annotation, whereas \cs{dlJSStr} is used for a Document JavaScript string,
+that is, one that is inserted into a \env{insDLJS} environment of the
+\pkg{insdljs} package. Document JavaScript is implemented differently
+depending on the driver used, as a result, \cs{dlJSStr} is more driver
+dependent than is \cs{flJSStr}.
+
+\paragraph*{Options discussed.} When the optional star (\texttt{*}) is present, the
+\meta{JS\_string} argument is passed to \cs{pdfstringdef} before the
+definition of \cs{\ameta{cmd}}. The \meta{options} argument may consist of
+one or more of the keywords \texttt{quotes}, \texttt{noquotes},
+\texttt{parens}, \texttt{noparens}. By default, \ameta{JS\_String} is enclosed
+in double quotes, unless the option \opt{noquotes} is taken.
+The \texttt{parens} option causes \pkg{insdljs} to enclose \meta{JS\_string} in parentheses; while
+\texttt{noparens} specifies not to enclose the string in parentheses. The default is \opt{noparens}.
+
+\CmdDescription Prior to defining \cs{\ameta{cmd}}, there are a number of
+definitions that occur locally:
\begin{itemize}
\item \cs{uXXXX} is recognized as a unicode escape sequence. So, within the JavaScript string,
unicode can be entered directly, for example, \cs{u00FC} is the u-umlaut.
@@ -1984,68 +2146,20 @@ are a number of definitions that occur locally:
a literal double quote, use \verb!\\"! to get a literal double quote
to appear in a JavaScript string. For example,
\begin{Verbatim}[xleftmargin=\amtIndent]
-\defineJSStr{\myMessage}
+\flJSStr{\myMessage}
{My name is \\"Stan\\" and I'm \\"the man.\\"}
\end{Verbatim}
\item The command \cs{jslit} is recognized within the JavaScript string. Using \cs{jslit}
(short for JavaScript literal), you can insert, for example, unbalanced braces:
\begin{Verbatim}[xleftmargin=\amtIndent]
-\defineJSStr{\myMessage}
+\flJSStr{\myMessage}
{You forgot the left brace \\"\jslit\{\\",
please insert it.}
\end{Verbatim}
The definition of \cs{jslit} is \verb!\let\jslit\string!.
-
-
\end{itemize}
-\newtopic The design decision to automatically insert the double
-quotes in the definition of the string has its faults. When you want
-to break the string to insert dynamic content, you must always be
-aware of the definition \verb!\xdef#1{"#2"}! contained with the
-definition of \cs{defineJSStr}. To illustrate, we return to an
-earlier example presented in \nameref{lengthyJS}, on
-page~\pageref*{lengthyJS}.
-
-We begin by defining some JavaScript strings. Note that in each of
-these two definitions, the leading and trailing double quote
-(\texttt{"}) is missing (these are the ones inserted automatically).
-The definitions look a bit strange because we break the string to
-insert dynamic content (\texttt{f.value}, \texttt{f.getItemAt(a,
-false)}, etc.), then continue on with the string from there.
-
-\begin{Verbatim}[xleftmargin=\amtIndent]
-\defineJSStr\myAlerti{You've typed in \\"" + f.value +"\\".}
-\defineJSStr\myAlertii{Selection: " + f.getItemAt(a, false)
- + " (export value: " + f.getItemAt(a, true)+").}
-\end{Verbatim}
-
-\newtopic We use the \texttt{defineJS} environment, after setting the escape code to \texttt{@}. The \texttt{defineJS}
-is a fully verbatim environment, the escape character cannot be changed to \verb!\!, but it
-may be changed to another character, such as \texttt{@}.
-
-\begin{Verbatim}[xleftmargin=\amtIndent]
-\begin{defineJS}[\catcode`\@=0\relax]{\getComboJS}
-var f = this.getField("myCombo");
-var a = f.currentValueIndices;
-if ( a == -1 )
- app.alert(@myAlerti);
-else
- app.alert(@myAlertii);
-\end{defineJS}
-\end{Verbatim}
-
-\newtopic Then again, the use of \cs{defineJSStr} is not required, it is a convenience for creating
-JavaScript strings, especially ones with embedded Unicode. The previous example could have been
-done by defining \cs{myAlerti} and \cs{myAlertii} by
-\begin{Verbatim}[xleftmargin=\amtIndent]
-\newcommand\myAlerti{"You've typed in \\"" + f.value +"\\"."}
-\newcommand\myAlertii{"Selection: " + f.getItemAt(a, false)
- + " (export value: " + f.getItemAt(a, true)+")."}
-\end{Verbatim}
-\noindent Note the \emph{presence} of the leading and trailing double quotes.
-
\section{The \texttt{useui} option: A User-Friendly Interface}\label{useui}
\def\myFavFive{%
@@ -2056,17 +2170,16 @@ uptxt={Push Me}}
To use the ``user-friendly'' interface, the \texttt{useui} option must be taken. The key-value pairs
described below are enclosed as the argument of the special \cs{ui} key. For example,
-\bgroup\obeyspaces\ttfamily%
-\settowidth{\aebdimen}{ bordercolor=\darg{1 0 0},bgcolor=\darg{0 1 0},}%
-\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule}
+\bVerb\takeMeasure{{\quad}bordercolor=\darg{1 0 0},bgcolor=\darg{0 1 0},}%
+\begin{dCmd*}[commandchars={!@^}]{\bxSize}
\pushButton[\ui{%
- bordercolor={1 0 0},bgcolor={0 1 0},
- textcolor={1 0 0},align={right},
- uptxt={Push Me},
- js={app.alert("AcroTeX rocks!")}
+@!quad^bordercolor={1 0 0},bgcolor={0 1 0},
+@!quad^textcolor={1 0 0},align={right},
+@!quad^uptxt={Push Me},
+@!quad^js={app.alert("AcroTeX rocks!")}
}]{pb1}{}{11bp}
\end{dCmd*}
-\egroup\newtopic You can develop your own set of appearances and use the \texttt{presets} key to conveniently set these.
+\endgroup\newtopic You can develop your own set of appearances and use the \texttt{presets} key to conveniently set these.
For example,
\begin{Verbatim}[xleftmargin=\amtIndent]
\def\myFavFive{%
@@ -2094,10 +2207,12 @@ displayed in the margin. Some of the user-friendly are a combination of
We present these key-value pairs to model the user-interface of \app{Acrobat}.
-\settowidth{\aebdimen}{\ttfamily border=visible|invisible}
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+%\settowidth{\aebdimen}{\ttfamily border=visible|invisible}
+\bVerb\takeMeasure{border=visible|invisible}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
border=visible|invisible
\end{dCmd}
+\endgroup
\CmdDescription Used with link annotations and determines whether the border
surrounding the bounding box of the link is visible. In the case of a link,
this is the Link Type: \textsf{Visible Rectangle} or \textsf{Invisible
@@ -2759,7 +2874,7 @@ The \cs{setTabOrder} command is available for users of pdftex and dvipdfm, as we
\setTabOrderByNumber
\end{dCmd}
-\subsection{Using \texorpdfstring{\protect\cs{setTabOrderByList}}{\CMD{setTabOrderByList}}}
+\subsection{Using \tops{\protect\cs{setTabOrderByList}}{\CMD{setTabOrderByList}}}
We illustrate with a simple example, followed by a verbatim listing of the code, and a discussion
afterward. We begin by placing two text fields in a row; normally,we would tab from the first one created
@@ -2824,7 +2939,7 @@ b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=320}{settaborder.pdf}} for
including tabbing using structure, has its source file attached to the PDF file.
The file is posted one the \href{\urlAcroTeXBlog}{AeB Blog}.
-\subsection{Using \texorpdfstring{\protect\cs{setTabOrderByNumber}}{\CMD{setTabOrderByNumber}}}
+\subsection{Using \tops{\protect\cs{setTabOrderByNumber}}{\CMD{setTabOrderByNumber}}}
An alternate method for setting tab order by structure is to directly enter the tab order into the
optional argument of the field, link, or comment annotation.
@@ -2916,16 +3031,37 @@ embedding of the JavaScripts.
\newtopic Other options are discussed in the following paragraphs.
\begin{description}\def\NH{\hspace{-\labelsep}}
-\item\NH\texttt{nodljs} turns off the embedding of the document level
+\item\NH\opt{nodljs} turns off the embedding of the document level
JavaScript. This might be useful, for creating a paper document that is
not interactive. For a non-interactive paper document, no JS is needed.
-\item\NH\texttt{execJS} is a very useful option/feature if you know how to use
+\item\NH\opt{execJS} is a very useful option/feature if you know how to use
it. Any JavaScript that is written in an \env{execJS} environment is
executed once when the document is first opened in \app{Acrobat}, then
discarded. AeB uses this for post-distillation document processing. The
default is that the JavaScript in an \texttt{execJS} environment is not
executed; using this option turns on this feature.
+
+\item\NH\opt{usealtadobe} imports alternate naming for most of Adobe's
+ built in functions. All of Adobe built in functions begin with `AF',
+ when this option is taken, the same functions are defined, but prefixed
+ with `EF'. For example, \texttt{AFNumber\_Keystroke()} has an alias of
+ \texttt{EFNumber\_Keystroke()}, when the \opt{usealtadobe} option is
+ specified.
+
+ \textbf{Developer's Note.} Use this option when developing new code
+ that use the Adobe built-in functions. For developers that have
+ \app{Acrobat}, it is useful to specify this option and to refer to the
+ built-in function using the special syntax,
+ \[\cs{dl@EForAF4\ameta{no-AF-function-name}}\]
+ For example, \cs{dl@EForAF4Number\_Keystroke(0,0,0,0,"",true)} expands to
+ \[\texttt{EFNumber\_Keystroke(0,0,0,0,"",true)}\] if \opt{usealtadobe} is taken,
+ and \[\texttt{AFNumber\_Keystroke(0,0,0,0,"",true)}\] otherwise.
+
+\item\NH\opt{debug} causes the document JavaScript created by the
+ {\AcroTeX} Bundle to generate more debugging messages to the JavaScript
+ console.
+
\end{description}
\section{The \texttt{insDLJS} and \texttt{insDLJS*} Environments}
@@ -3463,7 +3599,7 @@ Use \env{defineJS*} in the body of the document; the command argument \cs{\ameta
used and redefined in a later \env{defineJS*} environment.
The \env{@defineJS} environment is for package authors.
-\paragraph*{The \texorpdfstring{{\protect\env{defineJS}}}{defineJS}-type environments with arguments.}\label{para:defineJSwArgs}
+\paragraph*{The \tops{{\protect\env{defineJS}}}{defineJS}-type environments with arguments.}\label{para:defineJSwArgs}
%\index{defineJS with arguments@\env{defineJS} with arguments}
The \env{defineJS}-type environments do not have parameters/arguments as
normal environments (or commands) do. To enable the ability to modify the
diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf
index d9f35cb4..2646de18 100644
--- a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf
+++ b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex
index 8a52a2bd..28031e96 100644
--- a/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex
+++ b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex
@@ -36,7 +36,7 @@ Department of Mathematics}
\font\hv=cmtt10 \def\hvperk{\char`^}
%\font\hv=hv at 9pt \def\hvperk{\char142 }
{\catcode`\^=\active
-\gdef\js{\bgroup\hv\catcode`\^=\active \let^=\hvperk \jsi}
+ \gdef\js{\bgroup\hv\catcode`\^=\active \let^=\hvperk \jsi}
}\def\jsi#1{#1\egroup}
\def\hr#1{\textcolor{red}{#1}}
@@ -52,7 +52,7 @@ Department of Mathematics}
\section{Math Fill-In Question}
-The current version of \textsf{exerquiz} included only multiple
+The current version of \textsf{exerquiz} included only multiple
choice questions. That's all well and good, but instructors would
occasionally like to ask questions that would require the student
to fill in the answer, whether it be numerical or symbolic.
diff --git a/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf
index 298a75f3..8638f825 100644
--- a/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf
+++ b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf
index 59c37795..9007fa24 100644
--- a/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf
+++ b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/install_jsfiles.pdf b/texmf-dist/doc/latex/acrotex/install_jsfiles.pdf
index 221ba16f..7b2d3fab 100644
--- a/texmf-dist/doc/latex/acrotex/install_jsfiles.pdf
+++ b/texmf-dist/doc/latex/acrotex/install_jsfiles.pdf
Binary files differ
diff --git a/texmf-dist/source/latex/acrotex/acrotex.ins b/texmf-dist/source/latex/acrotex/acrotex.ins
index 3afd02ab..63c2cf08 100644
--- a/texmf-dist/source/latex/acrotex/acrotex.ins
+++ b/texmf-dist/source/latex/acrotex/acrotex.ins
@@ -61,6 +61,7 @@
\file{aebrandom.def}{\from{exerquiz.dtx}{copyright,randomize}}
\file{aebsumrytbls.def}{\from{exerquiz.dtx}{copyright,sumrytbls}}
\file{usemcfi.def}{\from{exerquiz.dtx}{copyright,mcfi}}
+ \file{rbmintrvl.def}{\from{exerquiz.dtx}{copyright,rbmIntrvl}}
\file{eqcolor.def}{\from{exerquiz.dtx}{copyright,eqcolor}}
\file{template.def}{\from{exerquiz.dtx}{copyright,template}}
\file{eqfr.def}{\from{exerquiz.dtx}{copyright,eqfr}}
diff --git a/texmf-dist/source/latex/acrotex/dljslib.dtx b/texmf-dist/source/latex/acrotex/dljslib.dtx
index 9d1d1dfe..53f7f5d6 100644
--- a/texmf-dist/source/latex/acrotex/dljslib.dtx
+++ b/texmf-dist/source/latex/acrotex/dljslib.dtx
@@ -2,7 +2,7 @@
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% dljsLib.sty package, %%
-%% Copyright (C) 2001-2018 D. P. Story %%
+%% Copyright (C) 2001-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -14,7 +14,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{dljslib}
-%<package> [2017/08/11 v2.1 Manage a Library of Document Level JavaScripts (dps)]
+%<package> [2021/04/04 v2.2 Manage a Library of Document Level JavaScripts (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -23,6 +23,23 @@
\EnableCrossrefs
\CodelineIndex
\RecordChanges
+\makeatletter
+\let\@latex@warning@no@line\@gobble
+\makeatother
+\def\darg#1{\texttt{\char123\relax#1\char125\relax}}
+\def\CMD#1{\textbackslash#1}
+\let\pkg\textsf
+\let\opt\texttt
+\let\env\texttt
+\let\app\textsf
+\let\uif\textsf
+\def\STRUT{\rule{0pt}{14pt}}
+\def\negSTRUT{\rule[-8pt]{0pt}{0pt}}
+\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}}
+\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}}}}
\InputIfFileExists{aebdocfmt.def}{\PackageInfo{dljslib}{Inputting aebdocfmt.def}}
{\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
\PackageInfo{dljslib}{aebdocfmt.def cannot be found}}
@@ -88,12 +105,17 @@
% \begin{macrocode}
\dljsRegister[y]{dljslib}
% \end{macrocode}
-% \subsection{Library Card Catalog}
-% \IndexOpt{equations}
-% \IndexOpt{vectors}
-% \IndexOpt{indefIntegral}
-% \IndexOpt{ImplMulti}
-% \IndexOpt{nodec}
+% \subsection{Library Card Catalog}\leavevmode
+% \IndexOpt{equations}^^A%
+% \IndexOpt{vectors}^^A%
+% \IndexOpt{indefIntegral}^^A%
+% \IndexOpt{ImplMulti}^^A%
+% \IndexOpt{nodec}^^A%
+% \IndexOpt{noBinFac}^^A%
+% \IndexOpt{limitArith}^^A%
+% \IndexOpt{combinatorics}^^A%
+% \IndexOpt{setSupport}^^A%
+% \noindent
% The arguments of the \cs{DeclareAndRegister} command are the options of this package, and
% their names represent JavaScript functions in the library.
% \begin{macrocode}
@@ -102,41 +124,38 @@
\DeclareAndRegister{indefIntegral}
\DeclareAndRegister{ImplMulti}
\DeclareAndRegister{nodec}
-% \end{macrocode}
-% \IndexOpt{noBinFac}
-% \IndexOpt{limitArith}
-% \IndexOpt{combinatorics}
-% \IndexOpt{setSupport}
-% More options.
-% \begin{macrocode}
\DeclareAndRegister{noBinFac}
\DeclareAndRegister{limitArith}
\DeclareAndRegister{combinatorics}
\DeclareAndRegister{setSupport}
% \end{macrocode}
-% \IndexOpt{unordered}
-% \IndexOpt{complex}
-% \IndexOpt{satisfyEq}
-% \IndexOpt{useGermanNums}
-% \IndexOpt{factors}
-% More options still.
+% \leavevmode
+% Additional registered names.
+% \IndexOpt{unordered}^^A%
+% \IndexOpt{complex}^^A%
+% \IndexOpt{satisfyEq}^^A%
+% \IndexOpt{useGermanNums}^^A%
+% \IndexOpt{useDeNums}^^A%
+% \IndexOpt{useEnNums}^^A
+% \IndexOpt{factors}^^A%
+% \IndexOpt{point}^^A%
+% \IndexOpt{intervals}^^A%
% \begin{macrocode}
\DeclareOption{unordered}{\PackageWarning{dljslib}
- {The `unordered' option is now combined with the\MessageBreak
- `setSupport' option, will use the `setSupport' option\MessageBreak
- instead}\ExecuteOptions{setSupport}}
+ {The `unordered' option is now combined with the\MessageBreak
+ `setSupport' option, will use the `setSupport' option\MessageBreak
+ instead}\ExecuteOptions{setSupport}}
%\DeclareAndRegister{unordered}
\DeclareAndRegister{complex}
\DeclareAndRegister{satisfyEq}
\DeclareAndRegister{useGermanNums}
+\DeclareOption{useDeNums}{\ExecuteOptions{useGermanNums}}
+\DeclareAndRegister{useEnNums}
\DeclareAndRegister{factors}
-% \end{macrocode}
-% \IndexOpt{point}
-% \IndexOpt{intervals}
-% The final set of options.
-% \begin{macrocode}
\DeclareAndRegister{point}
\DeclareAndRegister{intervals}
+% \end{macrocode}
+% \begin{macrocode}
\def\includeOptions#1{\@for\@option:=#1\do{\dljsRegister[y]{\@option}}}
\InputIfFileExists{libcusopt.opt}{}{}
% \end{macrocode}
@@ -238,6 +257,8 @@
% this of this as the ``front wrapper'' or ``front cover'' of your library selections. It contains the
% ``name'' of the library from which you checked out your selections.
% \begin{macrocode}
+\newcommand{\SyntaxErrorAuthor}{"Syntax error in author's answer!
+ Check console."}
\begin{library@holding}{dljslib}
\begin{insDLJS*}[dljslib]{dljslib}
\begin{newsegment}{dljslib: AcroTeX DLJS Library}
@@ -333,7 +354,7 @@ function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
}
zCorrAns = ParseInput(zCorrAns);
if (!ok2Continue) {
- eqAppAlert("Syntax error in author's answer! Check console.", 3);
+ eqAppAlert(\SyntaxErrorAuthor,3);
console.println("Syntax Error: " + CorrAns);
return null;
}
@@ -341,10 +362,10 @@ function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
if (!ok2Continue) return null;
% convert vars to new format, if needed
indepVars = TypeParameters(indepVars);
- var lambda = getNonZeroRatio (domain, indepVars, zCorrAns, zUserAns);
+ var lambda = getNonZeroRatio(domain,indepVars,zCorrAns,zUserAns);
if ( lambda == null ) {
eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; };
- if ( !ok2Continue ) return notifyField(false, flag, fieldname);
+ if ( !ok2Continue ) return notifyField(false,flag,fieldname);
zCorrAns = lambda + "*(" + zCorrAns + ")";
success=randomPointCompare (n,domain,indepVars,epsilon,
zCorrAns,zUserAns,comp)
@@ -508,7 +529,7 @@ typeof oComp.priorParse != "undefined" ) {
for (i=0; i<aCorrAns.length; i++) {
aCorrAns[i] = ParseInput(aCorrAns[i]);
if (!ok2Continue) {
- eqAppAlert("Author Syntax error!", 3);
+ eqAppAlert(\SyntaxErrorAuthor, 3);
return null;
}
aUserAns[i] = ParseInput(aUserAns[i]);
@@ -1204,7 +1225,6 @@ domain,indepVars,oComp) {
% \end{macrocode}
% Modified for multi-letter variables: remove one line, insert two. (2017/08/09)
% \begin{macrocode}
-% dps17
var UserAns=(arguments.length>7)?arguments[7]:event.value;
var retn=_ProcRespEvalEq(false,flag,CorrAns,n,epsilon,
indepVars,UserAns);
@@ -1273,7 +1293,6 @@ indepVars,oComp) {
% \end{macrocode}
% Modified for multi-letter variables: remove one line, insert two. (2017/08/09)
% \begin{macrocode}
-% dps17
var UserAns=(arguments.length>7)?arguments[7]:event.value;
var retn=_ProcRespEvalEqList(true,flag,CorrAns,n,epsilon,%
indepVars,UserAns);
@@ -1446,15 +1465,74 @@ return syntaxError(), null;
\end{newsegment}
\end{library@holding}
% \end{macrocode}
-% \subsubsection{\texttt{useGermanNums}}
+% \subsubsection{\texttt{useGermanNums} (\texttt{useDeNums})}
+% \leavevmode
% \IndexOpt{useGermanNums}A simple \texttt{ProcResp()} for processing numbers entered in a German format: 1234,56.
% The Germans have a block delimiter of period or space (1.234,56 or 1 234,56).
% The period is not supported and causes an alert box.
%\changes{v1.9g}{2014/01/14}{Added a proc to accept the comma for the decimal mark}
+%\changes{v2.2}{2021/04/04}{Modified useGermanNums, created alias useDeNums}
+%\changes{v2.2}{2021/04/04}{Modified proc to warn about English decimal point only}
% \begin{macrocode}
\@ifcheckedout{useGermanNums}
-\newcommand{\noDecPtGerMsg}{"A period (.) is not allowed in answer,
- use German notation for numbers"}
+% \end{macrocode}
+%\leavevmode\DescribeMacro{\noDecPtDeMsg} A general alert message for responses that
+% contain a point (.).
+% \begin{macrocode}
+ \dlJSStr[noquotes]{\noDecPtDeMsg}{%
+ "German Notation Syntax Error: A point (.) was found
+ in your response \"" + UserAns + "\".
+ Please remove the point, or this answer will be marked as wrong."}
+% \end{macrocode}
+% \DescribeMacro{\MsgDei} An alert message when German decimal notation
+% is expected.
+% \begin{macrocode}
+ \flJSStr*[noquotes]{\MsgDei}{"German decimal notation is expected,
+for example: 12,3456."}
+ \flJSStr*[noquotes]{\MsgDeiAlt}{"German decimal notation is expected,
+for example: 12,3456." +((warnDecDeOnly)?"\n\n
+The English decimal notation (12.2345) is also accepted,
+however.":"")}
+% \end{macrocode}
+% \DescribeMacro{\MsgDeii} An alert message when two decimal places are expected.
+% \begin{macrocode}
+ \flJSStr*[noquotes]{\MsgDeii}{"A decimal number is required,
+rounded to two decimal places, for example: 12,34"}
+% \end{macrocode}
+% When \DescribeMacro{\warnDecDeOnlyOn}\cs{warnDefDeOnlyOn} is declared in the preamble, the use of
+% the decimal point (.) is accepted but a warning message appears. On the downside,
+% the student can enter \texttt{1.00,10}, which will, no doubt, lead to an
+% incorrect answer.
+% \begin{macrocode}
+ \def\warnDecDeOnlyOn{\def\warnDecDeOnly{true}}
+ \def\warnDefDeOnlyOff{\def\warnDecDeOnly{false}}
+ \warnDefDeOnlyOff
+% \end{macrocode}
+% \DescribeMacro{\numDe}\nmpsep{\darg{\ameta{Msg}}} is a command that supports
+% the German decimal notation point (,). For this command, the decimal point (,)
+% is optional; that is, an integer response is accepted. \ameta{Msg} is a message
+% that appears on error of syntax.
+% \begin{macrocode}
+ \def\numDe#1{{priorParse:\Array(%
+ \preReqForm(/\rebstr\rechrclass{+-}?\redigit*,?%
+ \redigit*\reestr/,(#1)))}}
+% \end{macrocode}
+% \DescribeMacro{\rndNumDeReq}\nmpsep{\darg{\ameta{nDec-pl}}\darg{\ameta{Msg}}}
+% For numbers that are required to be rounded to \emph{exactly} \ameta{nDec-pl} decimal places.
+% \ameta{Msg} is an error message. Decimal point (,) is required.
+% \begin{macrocode}
+ \def\rndNumDeReq#1#2{{priorParse:\Array(%
+ \preReqForm(/\rebstr\rechrclass{+-}?\redigit*,%
+ \redigit{#1}\reestr/,(#2)))}}
+% \end{macrocode}
+% \DescribeMacro{\rndNumDeOpt}\nmpsep{\darg{\ameta{nDec-pl}}\darg{\ameta{Msg}}}
+% For numbers that are required to be rounded to \emph{at most} \ameta{nDec-pl} decimal places.
+% \ameta{Msg} is an error message. Decimal point (,) optional (integer respose
+% accepted).
+% \begin{macrocode}
+ \def\rndNumDeOpt#1#2{{priorParse:\Array(% at most two decimal places
+ \preReqForm(/\rebstr\rechrclass{+-}?%
+ \redigit*,?\redigit{0,#1}\reestr/,(#2)))}}
\fi
\begin{library@holding}{useGermanNums}
\begin{newsegment}
@@ -1463,6 +1541,7 @@ return syntaxError(), null;
% \DescribeMacro{ProcRespNumsDe} This segment only has one ProcResp function in it,
% this is named \texttt{ProcRespNumsDe}.
% \begin{macrocode}
+var warnDecDeOnly=\warnDecDeOnly;
function ProcRespNumsDe (flag,CorrAns,n,epsilon,%
domain,indepVars,oComp) {
if (!ProcessIt) return null;
@@ -1471,8 +1550,7 @@ domain,indepVars,oComp) {
% \end{macrocode}
% Modified for multi-letter variables: remove one line, insert two. (2017/08/09)
% \begin{macrocode}
-% var UserAns = event.value;
- var bSubstVars=(arguments.length>7); // dps17
+ var bSubstVars=(arguments.length>7);
var UserAns=(bSubstVars)?arguments[7]:event.value;
% \end{macrocode}
% This is the only change over the \texttt{ProcResp}, we call
@@ -1489,7 +1567,7 @@ domain,indepVars,oComp) {
ok2Continue = true;
CorrAns = ParseInput(CorrAns);
if (!ok2Continue) {
- eqAppAlert("Syntax error in author's answer! Check console.", 3);
+ eqAppAlert(\SyntaxErrorAuthor,3);
return null;
}
% \end{macrocode}
@@ -1502,8 +1580,8 @@ domain,indepVars,oComp) {
% \end{macrocode}
% Deny use of the traditional decimal point (.)
% \begin{macrocode}
- if ( reDec.test(UserAns) ) {
- eqAppAlert(\noDecPtGerMsg,3);
+ if ( (!warnDecDeOnly) && (reDec.test(UserAns)) ) {
+ eqAppAlert(\noDecPtDeMsg,3);
return -1;
}
% \end{macrocode}
@@ -1519,13 +1597,13 @@ domain,indepVars,oComp) {
% We pass \texttt{UserAnsSave} in case author uses \texttt{priorParse} etc.
% \begin{macrocode}
var retn=processSpecialParse(oComp.priorParse,UserAnsSave);
- if (retn==null) return -1;
- }
- var reComma=/,/;
- if ( reComma.test(UserAns) ) {
- eqAppAlert(\eqSyntaxErrorComma,3);
- return -1;
+ if ( (!warnDecDeOnly) && (retn==null) ) return -1;
}
+% var reComma=/,/;
+% if ( reComma.test(UserAns) ) {
+% eqAppAlert(\eqSyntaxErrorComma,3);
+% return -1;
+% }
UserAns = ParseInput(UserAns);
indepVars = TypeParameters(indepVars);
if (!ok2Continue) return null;
@@ -1542,6 +1620,59 @@ epsilon,CorrAns,UserAns,comp);
% The following functions, which are \texttt{ProcResp}-types, were written for an online
% grading system being developed by Drs.\ Bruce Wagner and David Arnold, and Mr.
% Jacob Miles-Prystowsky. The descriptions given below were provided by the authors.
+%
+% \subsubsection{\texttt{useEnNums}}
+% \leavevmode
+% \IndexOpt{useEnNums}A simple \texttt{ProcResp()} for processing numbers entered in a EN-U format: 1234.56.
+% \begin{macrocode}
+\@ifcheckedout{useEnNums}
+% \end{macrocode}
+%\leavevmode\DescribeMacro{\noDecPtEnMsg} A general alert message for responses that
+% contain a comma (,).
+% \begin{macrocode}
+ \dlJSStr[noquotes]{\noDecPtEnMsg}{%
+ "Syntax Error: A comma (,) was found
+ in your response \"" + UserAns + "\".
+ Please remove the comma, or this answer will be marked as wrong."}
+% \end{macrocode}
+% \DescribeMacro{\MsgEni} An alert message when German decimal notation
+% is expected.
+% \begin{macrocode}
+ \flJSStr*[noquotes]{\MsgEni}{"English decimal notation is expected,
+for example: 12.3456."}
+% \end{macrocode}
+% \DescribeMacro{\MsgEnii} An alert message when two decimal places are expected.
+% \begin{macrocode}
+ \flJSStr*[noquotes]{\MsgEnii}{"A decimal number is required,
+rounded to two decimal places, for example: 12.34"}
+% \end{macrocode}
+% \DescribeMacro{\numEn}\nmpsep{\darg{\ameta{Msg}}} is a command that supports
+% the En decimal notation point (.). For this command, the decimal point (.)
+% is optional; that is, an integer response is accepted. \ameta{Msg} is a message
+% that appears on error of syntax.
+% \begin{macrocode}
+ \def\numEn#1{{priorParse:\Array(%
+ \preReqForm(/\rebstr\rechrclass{+-}?\redigit*\\.?%
+ \redigit*\reestr/,(#1)))}}
+% \end{macrocode}
+% \DescribeMacro{\rndNumEnReq}\nmpsep{\darg{\ameta{nDec-pl}}\darg{\ameta{Msg}}}
+% For numbers that are required to be rounded to \emph{exactly} \ameta{nDec-pl} decimal places.
+% \ameta{Msg} is an error message. Decimal point (.) is required.
+% \begin{macrocode}
+ \def\rndNumEnReq#1#2{{priorParse:\Array(%
+ \preReqForm(/\rebstr\rechrclass{+-}?\redigit*\\.%
+ \redigit{#1}\reestr/,(#2)))}}
+% \end{macrocode}
+% \DescribeMacro{\rndNumEnOpt}\nmpsep{\darg{\ameta{nDec-pl}}\darg{\ameta{Msg}}}
+% For numbers that are required to be rounded to \emph{at most} \ameta{nDec-pl} decimal places.
+% \ameta{Msg} is an error message. Decimal point (.) optional (integer response
+% accepted).
+% \begin{macrocode}
+ \def\rndNumEnOpt#1#2{{priorParse:\Array(% at most two decimal places
+ \preReqForm(/\rebstr\rechrclass{+-}?%
+ \redigit*\\.?\redigit{0,#1}\reestr/,(#2)))}}
+\fi
+% \end{macrocode}
% \begin{macrocode}
\begin{library@holding}{unordered}
% \end{macrocode}
@@ -1895,7 +2026,7 @@ function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
for (i=0; i<aCorrAns.length; i++) {
aCorrAns[i] = ParseInput(aCorrAns[i]);
if (!ok2Continue) {
- eqAppAlert("Author Syntax error!", 3);
+ eqAppAlert(\SyntaxErrorAuthor, 3);
return null;
}
aUserAns[i] = ParseInput(aUserAns[i]);
@@ -1961,7 +2092,8 @@ function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
%\end{flushleft}
% \begin{macrocode}
\begin{newsegment}{dljslib: Contrib - Processing Interval Responses}
-function ProcRespIntervals(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+function ProcRespIntervals(flag,CorrAns,n,epsilon,domain,%
+indepVars,oComp)
{
ok2Continue = true;
if (!ProcessIt) return null;
@@ -2341,57 +2473,56 @@ function NoExpAllowed (UserAns) {
% \begin{macrocode}
function NoTrigAllowed (UserAns)
{
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- var aTrigfuncs = new Array
- ( "acos","asin","atan","cos", "sin", "tan","sec","csc","cot",
- "arcsin", "arccos", "arctan"
- );
- var re, regexp;
- re = /[a-zA-Z]{2,}/g;
- aF = UserAns.match(re);
- if ( aF != null ) {
- for (var i=0; i < aF.length; i++)
- {
- for(var j=0; j < aTrigfuncs.length; j++) {
- if ( aF[i].indexOf(aTrigfuncs[j]) != -1 )
- return eqAppAlert(\NoTrigAllowedErrorMsg,3), null;
- }
- }
- }
- return true;
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ var aTrigfuncs = new Array
+ ( "acos","asin","atan","cos", "sin", "tan","sec","csc","cot",
+ "arcsin", "arccos", "arctan"
+ );
+ var re, regexp;
+ re = /[a-zA-Z]{2,}/g;
+ aF = UserAns.match(re);
+ if ( aF != null ) {
+ for (var i=0; i < aF.length; i++) {
+ for(var j=0; j < aTrigfuncs.length; j++) {
+ if ( aF[i].indexOf(aTrigfuncs[j]) != -1 )
+ return eqAppAlert(\NoTrigAllowedErrorMsg,3), null;
+ }
+ }
+ }
+ return true;
}
function NoPiAllowed(UserAns)
{
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- var re=/PI|pi/;
- if ( re.test(UserAns) )
- return eqAppAlert(\NoPiAllowedErrorMsg,3), null;
- return true;
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ var re=/PI|pi/;
+ if ( re.test(UserAns) )
+ return eqAppAlert(\NoPiAllowedErrorMsg,3), null;
+ return true;
}
function NoTrigLogAllowed (UserAns)
{
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- var aTrigfuncs = new Array
- ( "acos","asin","atan","cos", "sin",
- "tan","sec","csc","cot", "arcsin", "arccos", "arctan",
- "logc","log", "ln"
- );
- var re, regexp;
- re = /[a-zA-Z]{2,}/g;
- aF = UserAns.match(re);
- if ( aF != null ) {
- for (var i=0; i < aF.length; i++)
- {
- for(var j=0; j < aTrigfuncs.length; j++) {
- if ( aF[i].indexOf(aTrigfuncs[j]) != -1 )
- return eqAppAlert(\NoTrigLogAllowedErrorMsg,3), null;
- }
- }
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ var aTrigfuncs = new Array
+ ( "acos","asin","atan","cos", "sin",
+ "tan","sec","csc","cot", "arcsin", "arccos", "arctan",
+ "logc","log", "ln"
+ );
+ var re, regexp;
+ re = /[a-zA-Z]{2,}/g;
+ aF = UserAns.match(re);
+ if ( aF != null ) {
+ for (var i=0; i < aF.length; i++)
+ {
+ for(var j=0; j < aTrigfuncs.length; j++) {
+ if ( aF[i].indexOf(aTrigfuncs[j]) != -1 )
+ return eqAppAlert(\NoTrigLogAllowedErrorMsg,3), null;
+ }
}
- return true;
+ }
+ return true;
}
% \end{macrocode}
%\changes{v1.9a}{2011/07/15}{Added \texttt{sciNotResp} and \texttt{SciNotResp}}
diff --git a/texmf-dist/source/latex/acrotex/eforms.dtx b/texmf-dist/source/latex/acrotex/eforms.dtx
index bc21d96c..61e21b17 100644
--- a/texmf-dist/source/latex/acrotex/eforms.dtx
+++ b/texmf-dist/source/latex/acrotex/eforms.dtx
@@ -4,7 +4,7 @@
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% eForms package, %%
-%% Copyright (C) 2002-2020 D. P. Story %%
+%% Copyright (C) 2002-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -16,7 +16,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{eforms}
-%<package> [2020/12/14 v2.4.1 Provides general eforms support (dps)]
+%<package> [2021/05/10 v2.4.3 Provides general eforms support (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12]
@@ -95,18 +95,19 @@
% \textsf{web}; in this case, the options below must explicitly included.
% Set the driver dependent code for the |quiz| environments.
%
-% \changes{v2.2v2.2}{2019/06/12}{Added fields to fields dict, conforming to hyperref}
+% \changes{v2.4.3}{2021/05/10}{Changed date for sync with \string\pkg{insdljs}}
+% \changes{v2.2v2.2}{2019/06/12}{Added fields to fields dict, conforming to \string\pkg{hyperref}}
% \changes{v2.13}{2019/06/10}{Added various fields to the fields dictionary so they
% can get appearances in non-conforming PDF viewers.}
-% \changes{v2.5o}{2012/06/18}{Added required package \string\textsf{ifpdf}}
-% \changes{v2.9m}{2017/09/03}{Added the ifluatex package}
+% \changes{v2.5o}{2012/06/18}{Added required package \string\pkg{ifpdf}}
+% \changes{v2.9m}{2017/09/03}{Added the \string\pkg{ifluatex} package}
% \begin{macrocode}
\RequirePackage{ifpdf}[2006/02/20]
\RequirePackage{ifxetex}[2006/08/21]
\RequirePackage{ifluatex}
% \end{macrocode}
% The \pkg{calc} package is now required (2014/02/18).
-% \changes{v2.6c}{2014/02/18}{Added the \string\textsf{calc} package as required package.}
+% \changes{v2.6c}{2014/02/18}{Added the \string\pkg{calc} package as required package.}
% \begin{macrocode}
\RequirePackage{calc}
% \end{macrocode}
@@ -131,7 +132,7 @@
}
% \end{macrocode}
% Set the driver for \texttt{pdftex}\IndexOpt{pdftex}
-% \changes{v2.9b}{2016/07/22}{Do not pass pdftex driver to insdljs or hyperref}
+% \changes{v2.9b}{2016/07/22}{Do not pass pdftex driver to \string\pkg{insdljs} or \string\pkg{hyperref}}
% \begin{macrocode}
\DeclareOption{pdftex}{%
\def\eq@drivernum{1}\def\eq@driver{pdftex}%
@@ -139,7 +140,7 @@
}
% \end{macrocode}
% Added \textsf{luatex} option
-% \changes{v2.9m}{2017/09/03}{Add luatex option}
+% \changes{v2.9m}{2017/09/03}{Add \string\opt{luatex} option}
% \begin{macrocode}
\DeclareOption{luatex}{%
\def\eq@drivernum{1}\def\eq@driver{luatex}%
@@ -190,7 +191,7 @@
% The \texttt{preview}\IndexOpt{preview} option displays the bounding box of each form field with a frame box.
% Useful for laying out field with a dvi previewer.
% \changes{v2.5n}{2012/04/30}{Changed \string\cs{ifpreview} to a conditional
-% definition; this allows the \string\textsf{spdef} package to control the state
+% definition; this allows the \string\pkg{spdef} package to control the state
% of \cs{ifpreview}.}
% \begin{macrocode}
\DeclareOption{preview}{\previewtrue}
@@ -211,7 +212,7 @@
% Use\IndexOpt{useui} the \textsf{xkeyval} package to specify the options for the links and
% forms, key-values are enclosed in the \cs{ui} command inside the option list.
% \changes{v2.0}{2008/03/14}
-% {
+% {%
% Added the \string\texttt{useui} option, which inputs \string\textsf{xkeyval} package,
% and defines a user-friendly interface to the option arguments.
% }
@@ -268,18 +269,15 @@
% To support a variations of \app{dvipdfm}, we change the logic from
% \cs{ifxetex} to |\ifnum\eq@drivernum=2\relax|, a driver number of 2
% includes \app{dvipdfm} and all its variants.
-% \changes{v2.3.4}{2020/07/05}{Change logic from \string\cs{ifxetex} to
-% \string\cs{ifnum}\string\cs{eq@drivernum=2\string\relax}}
+% \changes{v2.3.4}{2020/07/05}{Change logic for \string\cs{ifxetex}}
% \begin{macrocode}
\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
-\ifpdf\else\ifnum\eq@drivernum=2\relax\else\pdfmarkuptrue\fi\fi
+\ifpdf\else\ifnum\eq@drivernum=\tw@\else\pdfmarkuptrue\fi\fi
\RequirePackage{hyperref}
% \end{macrocode}
-% Changed \textsf{hyperref} definitions/parameters to add \texttt{1bp} rather than \texttt{1pt} around a form field
-% or link.
+% Changed \textsf{hyperref} definitions/parameters to add \texttt{1bp}
+% rather than \texttt{1pt} around a form field or link.
% \changes{v2.9e}{2016/12/22}{Changed hyperref to add 1bp rather than 1pt}
-% \changes{v2.3.4}{2020/07/05}{Change logic from \string\cs{ifxetex} to
-% \string\cs{ifnum}\string\cs{eq@drivernum=2\string\relax}}
% \begin{macrocode}
\ifnum\eq@drivernum=2\relax
\else
@@ -297,7 +295,7 @@
\RequirePackage{insdljs}[2019/02/11] % incl conv-xkv
% \end{macrocode}
% \changes{v1.0a}{2006/10/03}
-% {
+% {%
% If \string\pkg{exerquiz} is not loaded, we do an automatic begin and end of Form.
% Also, if \string\textsf{exerquiz} is loaded, then we use the driver declared in
% \string\pkg{exerquiz}; otherwise, we set the default to 0
@@ -320,11 +318,11 @@
\let\ef@YES=y \let\ef@NO=n
\let\ef@One=1 \let\ef@Zero=0
\ifnum\eq@drivername<2\relax
-\let\to@usepdfmark\ef@One
-\RequirePackage[structure]{taborder}\else
-\let\to@usepdfmark\ef@Zero
-\RequirePackage{taborder}
-\fi
+ \let\to@usepdfmark\ef@One
+ \def\reqPkg{\RequirePackage[structure]{taborder}}\else
+ \let\to@usepdfmark\ef@Zero
+ \def\reqPkg{\RequirePackage{taborder}}\fi
+\reqPkg
% \end{macrocode}
% \begin{macrocode}
%</package>
@@ -439,11 +437,25 @@
% For example, expanding |\efsave\x\as\y| (eg, |\let\y\x|), the definition of the macro |\y|
% has the same definition as |\x| does. Now |\x| is free to be redefined. Later in the document,
% we can say |\efrestore\x\from\y| (eg, |\let\x\y|). Now the
-% definition of |\x| has its original definition (at the time when it was saved).
+% definition of |\x| has its original definition (at the time when it was saved).\medskip
+%
+% \noindent The two commands \DescribeMacro\txtRef\cs{txtRef} and \DescribeMacro\labelRef\cs{labelRef}
+% return pure text: The first returns the value of \cs{ref} as plain text; similarly, \cs{labelRef} returns
+% the true destination name of a reference.
+% \changes{v2.4.2}{2021/03/11}{Defined \string\cs{txtRef}, also defined in \string\pkg{exerquiz};
+% moved \string\cs{labelRef} from the \string\textsf{userinterface} section of this DTX.}
+% \begin{macrocode}
+\def\txtRef#1{\@ifundefined{r@#1}
+ {??}{\aeb@exiii\@firstoffive\csname r@#1\endcsname}}
+\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start}
+ {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}}
+\def\aeb@exiii{\expandafter\expandafter\expandafter}
+\def\noexpandiii{\noexpand\noexpand\noexpand}
+% \end{macrocode}
% \begin{macrocode}
%</package>
% \end{macrocode}
-% \section{\tops{\app}{}{Adobe} Forms Support}\label{formsSupport}
+% \section{\tops{\protect\app}{}{Adobe} Forms Support}\label{formsSupport}
% \begin{macrocode}
%<*package>
% \end{macrocode}
@@ -1213,7 +1225,7 @@
% \end{macrocode}
% \DescribeMacro{\RV} Rich text value
%\changes{v2.5l}{2011/01/28}{%
-% Wrap the \cs{RV} key in an XHTML \string\texttt{{\string\ltag}body\string\rtag} element, part of adding
+% Wrap the \string\cs{RV} key in an XHTML \string\texttt{{\string\ltag}body\string\rtag} element, part of adding
% better support for rich text strings for form fields.
%}
% \begin{macrocode}
@@ -1255,7 +1267,7 @@
% we pass the argument through \cs{pdfstringdef} to get the octal encoding,
% which is the method hyperref uses.
% \changes{v2.7}{2014/07/08}{Removed the use of \string\cs{ifHy@unicode}, now pass all PDF text strings
-% through \cs{pdfstringdef}.}
+% through \string\cs{pdfstringdef}.}
% \changes{v2.8a}{2015/07/12}{Added \string\cs{ef@isunicode} to automatically detect
% unicode}
% (2015/07/12) Added \cs{ef@isunicode} to automatically detect
@@ -1850,7 +1862,7 @@
%multi-line hyperlinks. Recognizable values are \texttt{y} and \texttt{n}. contiguous boxes
%are combined by default. There are command versions of \cs{mlfix}, these are
%\DescribeMacro{\mlfixOn} and \DescribeMacro{\mlfixOff}
-%\changes{v2.9.16}{2018/03/08}{Added \string\cs{mlfix} for multiline links}
+%\changes{v2.9.16}{2018/03/08}{Added \string\cs{mlfix} for multi-line links}
%\changes{v2.9.19}{2018/03/22}{Added \string\cs{relax} following width dimension
% in \string\cs{@eqmlstrut}}
% \begin{macrocode}
@@ -3028,7 +3040,7 @@
\long\def\g@addto@macrogobble#1#2{\g@addto@macro{#1}{#2}\@gobbleto@@nil}
% \end{macrocode}
% \changes{v2.8a}{2015/07/15}{New def for \string\cs{passthruCLOpts}, and modified
-% \cs{ef@pdfstrCLOpts} and its spawn.}
+% \string\cs{ef@pdfstrCLOpts} and its spawn.}
% (2015/07/15) New def for \cs{passthruCLOpts}, and modified \cs{ef@pdfstrCLOpts} and its spawn.
% \begin{macrocode}
\def\passthruCLOpts{*}
@@ -3122,7 +3134,7 @@
% \end{macrocode}
% \subsubsection{List Box}\label{listbox}
%
-%\changes{v2.4}{2020/11/28}{Allow \cs{list@@Box} to obey \string\cs{pdfStringsOn}}
+%\changes{v2.4}{2020/11/28}{Allow \string\cs{list@@Box} to obey \string\cs{pdfStringsOn}}
%
% The main list box code that can be used to build list box commands, such as
% \cs{listBox}, defined below. Within
@@ -3191,7 +3203,7 @@
% \end{macro}
% \subsubsection{Combo Box}\label{combobox}
%
-%\changes{v2.4}{2020/11/28}{Allow \cs{combo@@Box} to obey \string\cs{pdfStringsOn}}
+%\changes{v2.4}{2020/11/28}{Allow \string\cs{combo@@Box} to obey \string\cs{pdfStringsOn}}
%
% Within the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse}
% and \cs{tops} for \cs{texorpdfstring}.
@@ -4167,12 +4179,8 @@
% we'll define them here as well.
% \begin{macrocode}
\def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
-\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start}
- {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}}
-\def\aeb@exiii{\expandafter\expandafter\expandafter}
\newtoks\ef@flagtoks
\newtoks\ef@jstoks
-\def\noexpandiii{\noexpand\noexpand\noexpand}
% \end{macrocode}
%
% \subsection{The Appearance Tab}
diff --git a/texmf-dist/source/latex/acrotex/exerquiz.dtx b/texmf-dist/source/latex/acrotex/exerquiz.dtx
index e1adc713..d73c3efd 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> [2021/02/17 v8.6.4 %
+%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2021/05/10 v8.7.7 %
%<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
@@ -55,8 +56,9 @@
\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}}
\def\visispace{\symbol{32}}
\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
-\def\meta#1{\textsl{\texttt{#1}}}
+\def\meta#1{\textit{\texttt{#1}}}
\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
+\def\GT{\string>}
\pdfstringdefDisableCommands{\let\\\textbackslash}
\OnlyDescription % comment out for implementation details
\EnableCrossrefs
@@ -71,6 +73,7 @@
\begin{document}
\let\env\texttt\let\pkg\textsf
\let\app\textsf
+ \let\tops\texorpdfstring
\GetFileInfo{exerquiz.sty}
\title{Exerquiz: Exercises and Quizzes for \LaTeX/PDF}
\author{D. P. Story\\
@@ -100,11 +103,11 @@
%\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}
-% \changes{v7.7j}{2016/04/05}{Change in eforms to 2016/04/05 v2.8f}
+% \changes{v7.7j}{2016/04/05}{Change in \string\pkg{eforms} to 2016/04/05 v2.8f}
%
% \section{Introduction}
%
@@ -118,11 +121,11 @@
% 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}
-%\changes{v6.4t}{2012/06/18}{Added ifpdf as a required package}
+% Some early required packages.
+%\changes{v6.4t}{2012/06/18}{Added \string\pkg{ifpdf} as a required package}
%\changes{v8.1a}{2017/09/03}{Added check for luatex}
% \begin{macrocode}
\RequirePackage{ifpdf}[2006/02/20]
@@ -140,21 +143,24 @@
% \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
-% \textsf{exerquiz} without \textsf{web}.
+% Added the \string\texttt{forcolorpaper} option for those using
+% \string\textsf{exerquiz} without \string\textsf{web}.
%}
% \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 +199,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.
@@ -202,10 +208,10 @@
% \end{macrocode}
% \leavevmode\IndexOpt{solutionsonly}^^A
% Here is a highly specialized option, put in at the request of a former friend.
-%\changes{v6.2f}{2007/12/21}{Added a solutionsonly option}
+%\changes{v6.2f}{2007/12/21}{Added a \string\opt{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 +224,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
@@ -247,11 +253,11 @@
% \textsf{eqexam}, but can be used in \textsf{exerquiz}. The switch
% \cs{ifvspacewithsolns} is defined in \textsf{eqexam}, and we only
% define it here if \textsf{eqexam} is not loaded.
-% \changes{v6.3x}{2011/04/05}{Added \texttt{vspacewithsolns}}
+% \changes{v6.3x}{2011/04/05}{Added \string\opt{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}
@@ -266,17 +272,23 @@
% \leavevmode\IndexOpt{nodljs}^^A
% An option for excluding all DLJS from the document. Useful with the
% \texttt{forpaper} option, or a document destined to be printed. Pass
-% on to insdljs package.
+% on to \pkg{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
+% Execute any JS defined within the \env{execJS} environment. Works only for
% authors using Acrobat 5.0 or Acrobat Approval.
% \begin{macrocode}
\DeclareOption{execJS}{\PassOptionsToPackage{execJS}{insdljs}}
% \end{macrocode}
+% \leavevmode\IndexOpt{usealtadobe}^^A
+% Pass the \opt{usealtadobe} to \pkg{insdljs} as a convenience option.
+% \changes{v8.7.7}{2021/05/10}{Pass \string\opt{usealtadobe} option to \string\pkg{insdljs}}
+% \begin{macrocode}
+\DeclareOption{usealtadobe}{\PassOptionsToPackage{usealtadobe}{insdljs}}
+% \end{macrocode}
% \leavevmode\IndexOpt{exercisesonly}^^A
% If the document author wants only to create a series of exercises, no quizzes, there is no
% need for the Document-level JavaScript. So, we have a couple of convenience options.
@@ -296,26 +308,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}}
@@ -324,7 +336,17 @@
% \begin{macrocode}
\newif\ifwithinMCFI\withinMCFIfalse
% \end{macrocode}
-%
+% The \IndexOpt{userbmintrvl}\opt{userbmintrvl} option defines \cs{rbmIntrvl} command, which
+% is a special \cs{RespBoxMath} command were some of the parameters are set by an
+% interval. Refer to Section~\ref{ss:rbmi} for details.
+% \changes{v8.7}{2021/04/24}{Added the option \string\opt{userbmintrvl}}
+% \begin{macrocode}
+\DeclareOption{userbmintrvl}{%
+ \def\inputRBMICode{\InputIfFileExists{rbmintrvl.def}
+ {\PackageInfo{exerquiz}{Inputting rbmintrvl.def}}%
+ {cannot find rbmintrvl.def}}}
+\let\inputRBMICode\relax
+% \end{macrocode}
% \subsection{Driver Options}
% The \textsf{web} package passes these driver options to \textsf{exerquiz}.
% These options are needed is \textsf{exerquiz} is used without
@@ -334,12 +356,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 +373,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,49 +383,51 @@
% 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}
% {
-% Added the \texttt{unicode} option, which is passed to hyperref.
+% Added the \string\opt{unicode} option, which is passed to \string\pkg{hyperref}.
% }
% \begin{macrocode}
\DeclareOption{unicode}{\PassOptionsToPackage{unicode}{hyperref}}
@@ -413,7 +437,7 @@
% the key-value pairs \textsl{\'{a} la xkeyval} can be used.
% \changes{v6.3}{2008/03/19}
% {
-% Added the \texttt{useui} option, which is passed to eforms.
+% Added the \string\opt{useui} option, which is passed to eforms.
% }
% \begin{macrocode}
\DeclareOption{useui}{\PassOptionsToPackage{useui}{eforms}}
@@ -611,7 +635,7 @@
\@ifundefined{if@eqalignfilllinestoleft}
{\newif\if@eqalignfilllinestoleft\@eqalignfilllinestoleftfalse}{}
% \end{macrocode}
-% \changes{v6.3z}{2011/04/28}{Created a switch \cs{ifkeepdeclaredvspacing},
+% \changes{v6.3z}{2011/04/28}{Created a switch \string\cs{ifkeepdeclaredvspacing},
% used primarily by \textsf{eqexam}}
% (4/28/11) A switch to control whether the declared vertical space
% for the \texttt{solution} environment is preserved during the \texttt{answerkey}
@@ -755,9 +779,9 @@
% so we need to load in the AcroForm Dictionary---unless the
% \texttt{dviwindo} (\cmd{\eq@noformstrue}) option is requested.
%\changes{v6.3y}{2011/04/23}{%
-% As per Heiko's suggestion, I've change the \texttt{Form} environment
+% As per Heiko's suggestion, I've change the \string\env{Form} environment
% no longer creates a grouping. This was causing problems with
-% the \textsf{atveryend} package.
+% the \string\pkg{atveryend} package.
%}
% \begin{macrocode}
\AtBeginDocument{\ifeq@noforms\else\Form\fi}
@@ -804,7 +828,7 @@
\ProcessOptions
% \end{macrocode}
% Input required packages.
-% \changes{v7.03}{2015/03/02}{Added the \texttt{array} package, mostly
+% \changes{v7.03}{2015/03/02}{Added the \string\pkg{array} package, mostly
% for use in the tabular setup of parts in tabular mode.}
% \begin{macrocode}
\RequirePackage{array}
@@ -824,7 +848,12 @@
\RequirePackage{verbatim}
\RequirePackage{hyperref}
\RequirePackage{amssymb}% used for return symbols
-\RequirePackage{eforms}[2019/10/23]
+% \end{macrocode}
+% (2021/05/10) Newer version of \pkg{eforms} required, as this package uses
+% \cs{dl@EForAF4}, which is defined by \pkg{insdljs} of the same date.
+% \changes{v8.7.7}{2021/05/10}{Now require \string\pkg{eforms} dated 2021/05/10}
+% \begin{macrocode}
+\RequirePackage{eforms}[2021/05/10]
\dlSetPkgInfo
% \end{macrocode}
% \begin{macrocode}
@@ -839,7 +868,7 @@
}{}
% \end{macrocode}
% \begin{macrocode}
-\edef\eq@restoreCats{% dps17
+\edef\eq@restoreCats{%
\catcode`\noexpand\"=\the\catcode`\"\relax
\catcode`\noexpand\'=\the\catcode`\'\relax
\catcode`\noexpand\,=\the\catcode`\,\relax
@@ -860,7 +889,7 @@
{\def\fleqnOn{\@fleqntrue}\def\fleqnOff{\@fleqnfalse}}
% \end{macrocode}
% \changes{v7.7o}{2016/07/08}{Added Boolean \string\cs{if@inclkey} in support of the
-% \string\textsf{eq2db} package}
+% \string\pkg{eq2db} package}
% \begin{macrocode}
\@ifundefined{if@inclkey}{\newif\if@inclkey\@inclkeytrue}{}
%</package>
@@ -959,9 +988,9 @@
% not change the default value.
%\changes{v6.05g}{2007/01/28}
%{
-% Added to commands for use in exerquiz or in \textsf{eqexam}. They are
-% \cs{renameSolnAfterTo} for conveniently changing the solution
-% after label, and \cs{resetSolnAfterToDefault} for resetting
+% Added to commands for use in exerquiz or in \string\pkg{eqexam}. They are
+% \string\cs{renameSolnAfterTo} for conveniently changing the solution
+% after label, and \string\cs{resetSolnAfterToDefault} for resetting
% back to the default.
%}
% \begin{macrocode}
@@ -1324,7 +1353,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 +1393,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
@@ -1393,8 +1424,9 @@
% use of \cs{count0}/\cs{count\cs{z@}}, possibly not used within a group. As a fix,
% replaced this usage with the counter \cs{eqtmpcnta}.
% \changes{v8.5.7}{2020/01/01}{added public counter \string\cs{eqtmpcnta}}
-% \changes{v8.5.8}{2020/01/01}{Replaced \string\cs{count\cs{z@}} and \cs{count0} with \string\cs{eqtmpcnta},
-% this fixed the page number leakage problem}
+% \changes{v8.5.8}{2020/01/01}{Replaced \string\cs{count\string\cs{z@}} and
+% \string\cs{count0} with \string\cs{eqtmpcnta}, this fixed the page number
+% leakage problem}
% \begin{macrocode}
\newcount\eqtmpcnta
%</package|eqexam>
@@ -1445,11 +1477,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}
@@ -1562,7 +1595,7 @@
\newcommand\belowexsolnskip{\protect\medskip}
%\let\eqafterexersolnskip\belowexsolnskip
% \end{macrocode}
-% \changes{v7.4}{2015/03/23}{added \cmd\removelastparskip}
+% \changes{v7.4}{2015/03/23}{added \string\cs{removelastparskip}}
% \DescribeMacro\removelastparskip removes last \cmd\parskip, as needed.
% \begin{macrocode}
\def\removelastparskip{\ifdim\parskip>0pt\vskip-\parskip\fi}
@@ -1576,8 +1609,8 @@
% has been used
% \changes{v6.05a}{2006/05/08}
% {
-% Changed \cs{nolinkcolor} into a text fill-in. Now, the command \cs{nolinkcolor}
-% fills in \cs{@nolinkcolor}, which holds the named color.
+% Changed \string\cs{nolinkcolor} into a text fill-in. Now, the command \string\cs{nolinkcolor}
+% fills in \string\cs{@nolinkcolor}, which holds the named color.
% }
% \begin{macrocode}
\newcommand{\nolinkcolor}[1]{\def\@nolinkcolor{#1}}
@@ -1591,22 +1624,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 +1658,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 +1687,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 +1790,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 +1915,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 +1925,7 @@
%
%\begin{exercise*}
%...
-%\end{verbatim}
+%\end{Verbatim}
%Best placed between exercises.
% \begin{macrocode}
\newcommand\declCQPre[1]{\def\cq@Pre{#1}}
@@ -1907,7 +1946,7 @@
% \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}
+% \changes{v8.2.8}{2018/12/13}{write \string\cs{declareterminex} only if not solutionsafter}
% \begin{macrocode}
\global\terminexchangedtrue % dps cq
\ifeq@solutionsafter\else
@@ -1924,7 +1963,7 @@
% \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}
+% \changes{v8.2.8}{2018/12/13}{write \string\cs{declareterminex} only if not \string\opt{solutionsafter}}
% \begin{macrocode}
\newcommand\restoreNormalSolns{\ifeq@solutionsafter\else
\writeT@ExSolns{\protect\decleqterminex{\protect
@@ -2016,7 +2055,7 @@
% \begin{macrocode}
\newif\ifeq@exerciseheading \eq@exerciseheadingtrue
% \end{macrocode}
-% \changes{v6.7q}{2013/12/15}{Added this hook for use by \textsf{contsolns.dtx}}
+% \changes{v6.7q}{2013/12/15}{Added this hook for use by \string\textsf{contsolns.dtx}}
% \changes{v8.5.10}{2020/03/14}{Added \string\cs{priorexlabelheader} to support \string\pkg{eqexam}}
% \begin{macrocode}
\let\prior@exerSolnHeaderHook\@empty
@@ -2040,22 +2079,16 @@
% 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
% set up to have two required arguments, usually both empty. The arguments are
% used for filtering. The first might be a number, so we can filter out even numbered
% exercises from odd ones. The second one is a keyword, we can filter by keyword.
-%\changes{v6.7}{2013/04/07}{Changing \cs{eqEXt} so that it has two
+%\changes{v6.7}{2013/04/07}{Changing \string\cs{eqEXt} so that it has two
%required arguments}
% \begin{macrocode}
-%\let\eqEXt\@gobble
\let\eqEXt\@gobbletwo
\let\endeqEXt\relax
% \end{macrocode}
@@ -2067,15 +2100,16 @@
\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}
-% \changes{v6.7a}{2013/05/03}{Change name of \cs{eq@writeexheader} to \cs{eqExerSolnHeader}}
+%\end{Verbatim}
+% \changes{v6.7a}{2013/05/03}{Change name of \string\cs{eq@writeexheader} to \string\cs{eqExerSolnHeader}}
% \begin{macrocode}
\let\eqExerSolnHeader\@empty
% \end{macrocode}
@@ -2084,7 +2118,7 @@
% \begin{macrocode}
\let\solutionparshape\@empty
% \end{macrocode}
-%\changes{v7.2}{2015/03/22}{added \cs{setPrbSolnAftrIndent}}
+%\changes{v7.2}{2015/03/22}{added \string\cs{setPrbSolnAftrIndent}}
% \DescribeMacro{\setPrbSolnAftrIndent}\cmd{\setPrbSolnAftrIndent} sets the amount of indent
% for the statement of problem and the solution-after solution. The command saves its argument
% in \cs{eq@pslnaindnt} (default \texttt{0pt}) and sets the hook
@@ -2094,11 +2128,11 @@
\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}}
+%\changes{v7.2}{2015/03/22}{added \string\cs{restorejustify}}
%The command \DescribeMacro\restorejustify\cmd{\restorejustify} is designed
%for use in the \texttt{solution} environment of an \cs{item} within the
%\texttt{parts} environment in \texttt{tabular} mode. By default,
@@ -2183,7 +2217,7 @@
\def\eqterminexDEF{\relax\ignorespaces}
\decleqterminex{\eqterminexDEF}
% \end{macrocode}
-%\changes{v6.7}{2013/04/07}{Inserted another argument into \cs{eqEXt}}
+%\changes{v6.7}{2013/04/07}{Inserted another argument into \string\cs{eqEXt}}
% (2013/04/07) Added another argument into \cs{eqEXt}, used for filtering.\par\medskip
% \noindent
% (2018/02/13) When solutions are written to the SOL file, they are not normally in a group.
@@ -2210,7 +2244,7 @@
\immediate\write\verbatim@out{\eqExerSolnHeaderSngl}%
\set@typeset@protect\fi\fi}
% \end{macrocode}
-%\changes{v6.7}{2013/04/07}{Inserted another argument into \cs{eqEXt}}
+%\changes{v6.7}{2013/04/07}{Inserted another argument into \string\cs{eqEXt}}
% Added another argument into \cs{eqEXt}, used for filtering.
% \begin{macrocode}
\def\eqExerSolnHeaderList{%
@@ -2248,7 +2282,7 @@
% \cs{noSolnOpt} turns off the check for the option argument
% of the \texttt{solution} environment for the \texttt{exercise}
% environment. Designed for use with \textsf{eqexam}.
-% \changes{v6.4v}{2012/07/27}{Added \cs{ckSolnOpt} and \cs{noSolnOpt}
+% \changes{v6.4v}{2012/07/27}{Added \string\cs{ckSolnOpt} and \string\cs{noSolnOpt}
% to switch on and off checking for the optional vertical space in the
% \texttt{solution} environment.}
% \begin{macrocode}
@@ -2339,7 +2373,7 @@
}\expandafter\leavevspace
\fi}
% \end{macrocode}
-% \changes{v6.8g}{2014/04/08}{Added key-val here for \textsf{eqexam}.}
+% \changes{v6.8g}{2014/04/08}{Added key-val here for \string\pkg{eqexam}.}
% New option for the \texttt{solution} environment, \IndexKey{nLines}\texttt{nLines}.
% \begin{macrocode}
\define@key{soln@keys}{nLines}[]{\def\soln@keys@nLines{#1}}
@@ -2383,7 +2417,7 @@
\restoreNormalSolns\fi\fi % dps cq
\global\cqIsActivefalse
% \end{macrocode}
-% \changes{v6.3z}{2011/04/28}{Added definition of \cs{sameVspace} for the cases
+% \changes{v6.3z}{2011/04/28}{Added definition of \string\cs{sameVspace} for the cases
% where there is no vertical space specified.}
% Is the argument \cs{null}? If yes, same as \texttt{0pt}.
% \begin{macrocode}
@@ -2391,7 +2425,7 @@
\ifx\eq@argi\@empty\gdef\sameVspace{0pt}\else
\ifx\eq@argi\eq@null\gdef\sameVspace{0pt}\else
% \end{macrocode}
-% \changes{v6.8g}{2014/04/08}{Added key-val here for \textsf{eqexam}.}
+% \changes{v6.8g}{2014/04/08}{Added key-val here for \string\pkg{eqexam}.}
% Now, if the optional argument is non-null, we must discern the argument:
% is it a vertical space or a key-value?
% \begin{macrocode}
@@ -2456,8 +2490,8 @@
}
% \end{macrocode}
%\changes{v6.4b}{2011/06/30}{%
-% Save the definitions of \cs{comment} and \cs{endcomment}. For some reason,
-% yet to be determined, there are problems when using the \texttt{fortextbook}
+% Save the definitions of \string\cs{comment} and \string\cs{endcomment}. For some reason,
+% yet to be determined, there are problems when using the \string\opt{fortextbook}
% option when hiding solutions.
%}
%\changes{v8.2.9}{2019/02/11}{\string\cs{eqSavedComment}\string\cs{dlcomment}, \string\cs{dlcomment}\space
@@ -2466,7 +2500,7 @@
\let\eqSavedComment\dlcomment
\let\endeqSavedComment\enddlcomment
% \end{macrocode}
-%\changes{v7.4}{2015/03/23}{added \cs{setTabulrSolnEnv}}
+%\changes{v7.4}{2015/03/23}{added \string\cs{setTabulrSolnEnv}}
% \begin{macrocode}
\def\setTabulrSolnEnv{%
\@ifundefined{@listii@SAVE}{\global\let\@listii@SAVE\@listii}{}%
@@ -2663,7 +2697,7 @@
% the \texttt{flextended} option from \textsf{eqexam}. See the placement
% of this command below its default definition of \cs{relax}.
% \changes{v8.1i}{2018/01/20}{Added \string\cs{kdvsp@Restore} to support
-% the \texttt{flextended} option from \string\textsf{eqexam}}
+% the \string\opt{flextended} option from \string\pkg{eqexam}}
% \begin{macrocode}
\let\kdvsp@Restore\relax
\def\eq@clearMrkCpy{\if@targetforextr
@@ -2698,7 +2732,7 @@
% to preserve the vertical space declared by the \textsf{solution} environment when
% \cs{ifeq@solutionsafter} is true.
% \changes{v6.3z}{2011/04/28}{if \string\cs{ifkeepdeclaredvspacing} is true, we attempt
-% to preserve the vertical space declared by the \textsf{solution} environment when
+% to preserve the vertical space declared by the \string\env{solution} environment when
% \string\cs{ifeq@solutionsafter} is true.}
% \begin{macrocode}
\ifx\minVspacet@bs\@empty
@@ -2710,10 +2744,10 @@
\@tempdima\pagetotal
\advance\@tempdima-\eq@startSoln
% \end{macrocode}
-% \changes{v6.4w}{2012/26/27}{Added \cs{relax} following the assignment.}
+% \changes{v6.4w}{2012/26/27}{Added \string\cs{relax} following the assignment.}
% {\TeX} was looking ahead looking for the rest of the dimension, this caused
% problems because later code was expanded when it should not have been. Inserted
-% \cs{relax}, \verb~\@tempdimb\sameVspace\relax~.
+% \cs{relax}, |\@tempdimb\sameVspace\relax|.
% \begin{macrocode}
\@tempdimb\sameVspace\relax
% \end{macrocode}
@@ -2767,8 +2801,8 @@
% \cs{endexercise}.
%\changes{v6.07}{2007/05/05}
%{
-% Created the \texttt{exercise*} environment, this is equivalent to the \texttt{*} option of the
-% \texttt{exercise} environment. You can use either version, but now, \texttt{exercise*} is preferred.
+% Created the \string\texttt{exercise*} environment, this is equivalent to the \string\texttt{*} option of the
+% \string\env{exercise} environment. You can use either version, but now, \string\env{exercise*} is preferred.
%}
% \begin{macrocode}
\let\eq@exerstarEnv\relax
@@ -2847,8 +2881,8 @@
% \begin{macro}{\setPartsWidth}
% Convenience macro to set \cs{part@indent}.
%\changes{v6.4h}{2011/07/28}{%
-% Added \cs{setPartsWidth} to set \cs{part@indent}. Also
-% defined \cs{eqe@prtsepPrb}.
+% Added \string\cs{setPartsWidth} to set \string\cs{part@indent}. Also
+% defined \string\cs{eqe@prtsepPrb}.
%}
% \begin{macrocode}
\newcommand{\setPartsWidth}[1]{\def\parts@indent{\normalfont#1}%
@@ -3042,11 +3076,11 @@
% Now for the tabular style of multi-part exercise, the argument
% \#1 is the number of columns requested.\medskip
%
-% \noindent(2017/02/09) Added \pkg{xkeyval} to optional argument of \texttt{parts}. Syntax is now
+% \noindent(2017/02/09) Added \pkg{xkeyval} to optional argument of \env{parts}. Syntax is now
%\begin{verbatim}
% \begin{parts}[<num>|nCols=<num>,minVspace=<length>]
%\end{verbatim}
-% \changes{v7.8e}{2017/02/09}{Added xkeyval to optional argument of \string\texttt{parts}}
+% \changes{v7.8e}{2017/02/09}{Added xkeyval to optional argument of \string\env{parts}}
% \begin{macrocode}
\define@key{tabp@rts}{nCols}{\def\exerwparts@cols{#1}}
\define@key{tabp@rts}{minVspace}{\def\minVspacet@bs{#1}}
@@ -3217,9 +3251,9 @@
\noindent\normalbaselines\kern0pt
\prior@parts@hook\abovepartshook
% \end{macrocode}
-%\changes{v7.03}{2015/03/02}{Added \texttt{>\{\cs{strut}\}}, this gives
+%\changes{v7.03}{2015/03/02}{Added \string\texttt{\string\GT{\string\cs{strut}}}, this gives
% better control over vertical spacing.}%
-% \changes{v7.4}{2015/03/23}{inserted \cmd\setTabulrSolnEnv}%
+% \changes{v7.4}{2015/03/23}{inserted \string\cs{setTabulrSolnEnv}}%
% \begin{macrocode}
\tablrIndent\tabular[t]{@{}*{\exerwparts@cols}{>{\setTabulrSolnEnv
\parskip\eqeques@parsep\relax
@@ -3229,7 +3263,7 @@
\global\let\@listii@SAVE\relax}%
\post@parts@hook\belowpartshook
% \end{macrocode}
-% \changes{v7.4}{2015/03/23}{added an adjustment to the command \cs{endexercise@parts@tabular}}
+% \changes{v7.4}{2015/03/23}{added an adjustment to the command \string\cs{endexercise@parts@tabular}}
% 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}
@@ -3308,9 +3342,9 @@
{\let\save@@xtabularcr\@xarraycr}
{\let\save@@xtabularcr\@xtabularcr}}
% \end{macrocode}
-%\changes{v7.0}{2014/11/05}{Added \cs{tabControlOn} and \cs{tabControlOff}.
+%\changes{v7.0}{2014/11/05}{Added \string\cs{tabControlOn} and \string\cs{tabControlOff}.
% Tab control is interfering with regular tabular environments, or anywhere
-% \texttt{d} is used.}
+% \string\texttt{d} is used.}
% \begin{macrocode}
\def\tabControlOff{\@ifundefined{@xtabularcr}
{\let\@xarraycr\save@@xtabularcr}
@@ -3355,7 +3389,7 @@
% 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}
+% \changes{v8.2.6}{2018/12/03}{Inserted \string\cs{eqprior} prior to \string\env{exEnumerate} env}
% The \cs{eqprior} command normally does nothing unless it is redefined.
% \begin{macrocode}
\newenvironment{exEnumerate}[1][]{\everypar{}%
@@ -3545,7 +3579,7 @@
\fi
}
% \end{macrocode}
-%\changes{v6.4q}{2012/03/23}{define \cs{eq@defaultlheader}}
+%\changes{v6.4q}{2012/03/23}{define \string\cs{eq@defaultlheader}}
% Determine whether \textsf{web} package is loaded, and define \cs{eq@normallheader}
% and \cs{eq@defaultlheader}. These are designed to fix a problem of disappearing
% headers in the solutions section of the document.
@@ -3583,7 +3617,7 @@
% \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.
-% \changes{v6.4q}{2012/03/23}{Inserted \cs{eq@normalheader} after \cs{newpage}
+% \changes{v6.4q}{2012/03/23}{Inserted \string\cs{eq@normalheader} after \string\cs{newpage}
% to get running headers to appear on each page of solutions}%
% Inserted |\markright{}| and \cs{eq@normalheader} to fix a problem with
% disappearing running headers.
@@ -3673,7 +3707,7 @@
%
%\changes{v6.2a}{2007/11/10 }
%{
-% Added \cs{expdfbookmark} to bookmark exercises.
+% Added \string\cs{expdfbookmark} to bookmark exercises.
%}
% We have to increase the \texttt{tocdepth} so hyperref will create the bookmark at the
% subsection level.
@@ -3745,7 +3779,7 @@
% Here, we include a few commands common to both
% quiz environments.
%\medskip\par\noindent
-% Colors used by \textsf{exerquiz}: \texttt{webgreen} normally defined in \textsf{web}.
+% Colors used by \pkg{exerquiz}: \texttt{webgreen} normally defined in \pkg{web}.
% \begin{macrocode}
\definecolor{webgreen}{rgb}{0,.6,0}
% \end{macrocode}
@@ -3755,20 +3789,20 @@
% \changes{v6.05b}{2006/05/12}
% {
% added a command to change the color of the proofing symbol
-% changed the definition of \cs{proofingsymbol} to a text fillin. This creates the command
-% \cs{@proofingsymbol}. Can now control the symbol and the color (through \cs{proofingsymbolColor}
+% changed the definition of \string\cs{proofingsymbol} to a text fillin. This creates the command
+% \string\cs{@proofingsymbol}. Can now control the symbol and the color (through \string\cs{proofingsymbolColor}
% }
% \begin{macrocode}
\newcommand{\proofingsymbolColor}[1]{\def\@proofingsymbolColor{#1}}
\proofingsymbolColor{red}
-\let\@proofsymbolredefined=0
-\newcommand{\proofingsymbol}[1]{\let\@proofsymbolredefined=1%
- \def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{#1}}}
+\let\@proofsymbolredefined\eq@Zero
+\newcommand{\proofingsymbol}[1]{\let\@proofsymbolredefined\eq@One
+ \def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{#1}}}
\def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{\ding{52}}}
-\def\setproofingsymbol{%
- \if\@proofsymbolredefined1\else
- \@ifpackageloaded{pifont}{\proofingsymbol{\ding{52}}}
- {\proofingsymbol{$\bullet$}}\fi}
+\def\setproofingsymbol{\ifx\@proofsymbolredefined\eq@One\else
+ \@ifpackageloaded{pifont}{\proofingsymbol{\ding{52}}}
+ {\proofingsymbol{$\bullet$}}\fi
+}
\AtBeginDocument{\setproofingsymbol}
% \end{macrocode}
% \end{macro}
@@ -3794,22 +3828,22 @@
\newcommand{\quesNumColor}[1]{\def\eq@quesNumCol{#1}}
\quesNumColor{blue}
\renewcommand{\theeqquestionnoi}{\arabic{eqquestionnoi}}
-\newcommand{\labeleqquestionnoi}{%
- \color{\eq@quesNumCol}\bfseries\theeqquestionnoi.}
+\newcommand{\labeleqquestionnoi}{\color{\eq@quesNumCol}\bfseries
+ \theeqquestionnoi.}
\renewcommand\theeqquestionnoii{(\alph{eqquestionnoii})}
-\newcommand{\labeleqquestionnoii}{%
- \color{\eq@quesNumCol}\bfseries\theeqquestionnoii}
+\newcommand{\labeleqquestionnoii}{\color{\eq@quesNumCol}\bfseries
+ \theeqquestionnoii}
\renewcommand\theeqquestionnoiii{(\roman{eqquestionnoiii})}
-\newcommand{\labeleqquestionnoiii}{%
- \color{\eq@quesNumCol}\bfseries\theeqquestionnoiii}
+\newcommand{\labeleqquestionnoiii}{\color{\eq@quesNumCol}\bfseries
+ \theeqquestionnoiii}
% \end{macrocode}
% \paragraph*{Properties of the questions environment.} (2013/07/10) These include
% \IndexKey{labelwidthTo}\texttt{labelwidthTo} and
% \IndexKey{labelwidth}\texttt{labelwidth}.
% \begin{macrocode}
\define@key{props@ques}{labelwidthTo}%
- [\normalsize\normalfont\bfseries00.]%
- {\def\propQ@labelwidthTo{#1}}
+ [\normalsize\normalfont\bfseries00.]%
+ {\def\propQ@labelwidthTo{#1}}
\define@key{props@ques}{labelwidth}[]{\def\propQ@labelwidth{#1}}
\let\propQ@labelwidth\@empty
% \end{macrocode}
@@ -3854,17 +3888,20 @@
\insE@rlyAtQues\gdef\eqPTs{1}%
\global\let\eqQT\eq@na%
% \end{macrocode}
-% (06/06/10) We create a macro \cs{@currentQues} that holds the current
-% problem number 2(a)(i), for example.
+% (06/06/10) We create a macro, \cs{@currentQues}, that holds the current
+% problem number; 2(a)(i), for example.
+% \changes{v8.6.7}{2021/04/12}{Remove the misplaced \string\cs{endcsname}
+% \string\cs{@thispr@b}, within the \string\env{questions} environment.}
% \begin{macrocode}
- {\@tempcnta=0 \let\@thispr@b\@empty
+ {\@tempcnta\z@\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
+ \ifx\@thispr@b\@empty\edef\@thispr@b{\@nameuse
+ {theeqquestionno\romannumeral\the\@tempcnta}}\else
+ \edef\@thispr@b{\@thispr@b\@nameuse
+ {theeqquestionno\romannumeral\the\@tempcnta}}\fi
}\xdef\@currentQues{\@thispr@b}}%
- \makebox[\labelwidth][r]{\normalfont\@nameuse{label\@quesctr}}%
+ \makebox[\labelwidth][r]{\normalfont
+ \@nameuse{label\@quesctr}}% format label
\xdef\eq@pageThisQ{\the\c@page}%
\post@questionsHook}{\usecounter{\@quesctr}%
% \end{macrocode}
@@ -3918,9 +3955,10 @@
% the \texttt{shortquiz}
%\par\medskip\noindent
% After all the parsing is done, the parameters for this environment are
-%\begin{verbatim}
-% \begin{shortquiz}*[<basename>]
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\begin{shortquiz}*[!ameta(basename)]
+%\end{Verbatim}
%The `\texttt{*}' is optional and signals that forms should be used instead
%of links. This option is regressed. The user should use the \texttt{shortquiz*}
% environment. The \verb![<basename>]! is the basename of any form fields
@@ -3936,7 +3974,7 @@
\abovesqskip{\par\medskip}
% \end{macrocode}
%\changes{v6.4a}{2011/05/11}{%
-% Added \cs{sq@afterhook} for use by \textsf{eqexam}, but may be useful elsewhere.
+% Added \string\cs{sq@afterhook} for use by \string\pkg{eqexam}, but may be useful elsewhere.
%}
%\DescribeMacro\endsqhook\cmd\endsqhook is a late hook
% \begin{macrocode}
@@ -3949,8 +3987,7 @@
% \begin{macrocode}
\let\sqhspace\space
\let\ListOfSQuizNames\@empty
-\newenvironment{shortquiz}
-{%
+\newenvironment{shortquiz}{\def\eqPTs{1}%
% \end{macrocode}
% (06/08/10) The next two lines initialize the macros for registering the
% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
@@ -3970,15 +4007,15 @@
% The \texttt{shortquiz*} is a short quiz that uses forms.
%\par\medskip\noindent
% The parameter for this environment is
-%\begin{verbatim}
-% \begin{shortquiz}[<basename>]
-%\end{verbatim}
-% The \verb![<basename>]! is the basename of any form fields
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\begin{shortquiz}[!ameta(basename)]
+%\end{Verbatim}
+% The \texttt{[\ameta{basename}]} is the basename of any form fields
% generated. If not present, an base fieldname is generated based on the
% \cs{@shortquizCnt} macro (not a counter). The actual name is given in \cs{@sqGenBaseName}.
% \begin{macrocode}
-\newenvironment{shortquiz*}
-{%
+\newenvironment{shortquiz*}{%
\xdef\eq@pageThisQ{\the\c@page}%
{\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne
\xdef\@shortquizCnt{\the\eqtmpcnta}}%
@@ -4016,6 +4053,7 @@
\AA{\AAFormat{%
if\eqSP(typeof\eqSP\oField=="undefined")\eqSP
var\eqSP\oField=new\eqSP Object;\r
+ \oField.sqTlyTotCnt=0;\r
\oField.Grp={};%
\ifx\defaultColorJSLoc\@empty\else\r
\oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
@@ -4181,8 +4219,8 @@ if (typeof !oField=="undefined")
% \end{answers}
% \end{shortquiz}
%\end{verbatim}
-% To further complicate matters, the \texttt{shortquiz} can be
-% used with the \texttt{questions} environment to create a series of
+% To further complicate matters, the \env{shortquiz} can be
+% used with the \env{questions} environment to create a series of
% numbered short question quizzes. See the manual for examples.
% \texttt{solution} environment is defined next.
% \begin{macro}{solution}
@@ -4194,8 +4232,8 @@ if (typeof !oField=="undefined")
% option. In this case, solutions are separated by a
% \cmd{\medskip} rather then put on a separate page. It also
% obeys the \texttt{solutionsafter} option
-% \changes{v6.4s}{2012/06/03}{Added hooks \cmd{\sqPostHeaderHook} and
-% \cmd{\qPostHeaderHook}}
+% \changes{v6.4s}{2012/06/03}{Added hooks \string\cs{sqPostHeaderHook} and
+% \string\cs{qPostHeaderHook}}
%\par\medskip\noindent
% Hooks \DescribeMacro\sqPostHeaderHook\cmd{\sqPostHeaderHook},
% \DescribeMacro\qzPriorSolutionAfterHook\cmd\qzPriorSolutionAfterHook,
@@ -4266,20 +4304,19 @@ if (typeof !oField=="undefined")
\expandafter\verbatimwrite\fi
}
\let\qzSolutionsAfterHook\@empty
-\def\endsolution@sq
-{%
- \ifeq@solutionsafter
- \eq@fititin{\mbox{\sqslrtnlabel}}\par\qzSolutionsAfterHook
- \aftergroup\ignorespaces
- \else
- \endverbatimwrite
- \eq@clearMrkCpy
- \ifx\@qzsolndest\@empty\else\set@display@protect
- \immediate\write\verbatim@out{\eqSqSolnTrailer}%
- \set@typeset@protect
- \fi
+\def\endsolution@sq{%
+ \ifeq@solutionsafter
+ \eq@fititin{\mbox{\sqslrtnlabel}}\par\qzSolutionsAfterHook
+ \aftergroup\ignorespaces
+ \else
+ \endverbatimwrite
+ \eq@clearMrkCpy
+ \ifx\@qzsolndest\@empty\else\set@display@protect
+ \immediate\write\verbatim@out{\eqSqSolnTrailer}%
+ \set@typeset@protect
\fi
- \global\let\@qzsolndest\@empty
+ \fi
+ \global\let\@qzsolndest\@empty
}
%</package|eqexam>
%<*package>
@@ -4288,9 +4325,9 @@ if (typeof !oField=="undefined")
% a new page. The argument is a vertical skip. If there is \texttt{\#1}
% or more space remaining on the page, the command does nothing, otherwise
% it issues a \cs{newpage}.
-% \changes{v6.4s}{2012/06/03}{Added \cs{promoteNewPageHere}}
+% \changes{v6.4s}{2012/06/03}{Added \string\cs{promoteNewPageHere}}
% \changes{v6.8a}{2014/01/01}{Made an optional argument, but test for required argument as swell.}
-% \changes{v8.5.6}{2020/01/01}{\string\promoteNewPageHere: added condition, first arg must be greater
+% \changes{v8.5.6}{2020/01/01}{\string\cs{promoteNewPageHere}: added condition, first arg must be greater
% then 0pt; otherwise, do nothing}
% \begin{macrocode}
\newcommand\pnphDflt{.1\textheight}
@@ -4313,9 +4350,9 @@ if (typeof !oField=="undefined")
% re-emitting it later, just prior to the solution. Useful for grouped questions.
% \begin{macrocode}
\newcommand{\saveDest}[1][]{%
- \def\sd@arg{#1}\ifx\sd@arg\@empty
- \xdef\holdDest{\@qzsolndest}\else
- \xdef\@qzsolndest{#1}\xdef\holdDest{#1}\fi}
+ \def\sd@arg{#1}\ifx\sd@arg\@empty
+ \xdef\holdDest{\@qzsolndest}\else
+ \xdef\@qzsolndest{#1}\xdef\holdDest{#1}\fi}
\def\useDest{\def\@qzsolndest{\holdDest}}
\let\holdDest\@empty
%</package>
@@ -4324,17 +4361,17 @@ if (typeof !oField=="undefined")
\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
+ \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
}
%</package|eqexam>
%<*package>
@@ -4346,8 +4383,9 @@ if (typeof !oField=="undefined")
% \begin{macro}{\endeqSQt}
% The \cmd{\eqQt} and \cmd{\eqSQt} are markers at the beginning of each
% quiz (short quiz, respectively) solution. These markers, along with
-% ``end'' versions, \cmd{\endeqQt} and \cmd{\endeqSQt}, respectively, can be used to filter out the quiz solutions or the
-% short quiz solutions. The following example removes all short quizzes.
+% ``end'' versions, \cmd{\endeqQt} and \cmd{\endeqSQt}, respectively,
+% can be used to filter out the quiz solutions or the
+% short-quiz solutions. The following example removes all short quizzes.
%\begin{verbatim}
%\long\def\eqSQt#1\endeqSQt{}
%\begin{document}
@@ -4370,13 +4408,13 @@ if (typeof !oField=="undefined")
% \begin{macro}{\quizSolnHeader}
% Each solution begins with \cmd{\quizSolnHeader}. This can be redefined
% for whatever reason. It takes three arguments, one of which is optional.
-% \#1 is the \cmd{\noPeek} parameters; \#2 is the named destination to this
-% solution; \#3 is the \cmd{\sqsllabel}.
+% \texttt{\#1} is the \cmd{\noPeek} parameters; \texttt{\#2} is the named destination to this
+% solution; \texttt{\#3} is the \cmd{\sqsllabel}.
%
% If you want to typeset solutions separately, you can redefine
% \cmd{\quizSolnHeader} as desired, and used in conjunction with
% \cmd{eqQt}.
-% \changes{v6.7q}{2013/12/15}{Added this hook for use by \textsf{contsolns.dtx}}
+% \changes{v6.7q}{2013/12/15}{Added this hook for use by \string\textsf{contsolns.dtx}}
% \begin{macrocode}
\let\prior@quizSolnHeaderHook\@empty
\newcommand\quizSolnHeader[3][]{%
@@ -4480,14 +4518,12 @@ if (typeof !oField=="undefined")
% \end{macrocode}
% \DescribeMacro{\quizSolnsHeadnToc} sets up the quiz solution title.
% \begin{macrocode}
-\def\quizSolnsHeadnToc
-{%
+\def\quizSolnsHeadnToc{%
\edef\eq@mkCmd{\expandafter\noexpand
\csname\eq@QzSolnsLevel\endcsname\eq@QzSolnsStar}%
\eq@mkCmd{\sqslsectitle}\if!\eq@QzSolnsLabel!\else
\label{\eq@QzSolnsLabel}\fi
\if\eq@QzSolnsStar*%
-% \addtocontents{toc}{\protect\def\protect\web@finalDot{}}
\addcontentsline{toc}{\eq@QzSolnsLevel}{%
\@ifundefined{web@latextoc}{}{%
\ifx\web@latextoc\eq@YES\else
@@ -4502,8 +4538,7 @@ if (typeof !oField=="undefined")
% \changes{v8.2.6}{2018/12/03}{Placed \string\cs{endinput} at the end of
% the quiz solutions file}
% \begin{macrocode}
-\newcommand{\quizSolnInput}
-{%
+\newcommand{\quizSolnInput}{%
\global\let\webnewpage\relax
\bgroup\OKToWriteExamDatatrue
\writeT@QzSolns{\string\endinput}\egroup
@@ -4638,24 +4673,27 @@ if (typeof !oField=="undefined")
% The \texttt{quiz} environment takes an optional `\texttt*'
% and one required argument. There are two styles of quizzes:
% links or checkboxes. Beginning with v6.08, the use of the \texttt*-option
-% is discouraged, use the quiz* environment instead.
-%\begin{verbatim}
-%\begin{quiz}[*]{<base_name>}
+% is discouraged, use the \env{quiz*} environment instead.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\begin{quiz}[*]{!ameta(base-name)}
% ...
%\end{quiz}
-%\end{verbatim}
+%\end{Verbatim}
+%Brief description of parameters:
% \begin{itemize}
-% \item optional \texttt{*} $=$ use checkboxes, otherwise use links
-% \item \texttt{<base\_name>}: required argument $=$ base name of quiz.
+% \item optional \texttt{*} means to use checkboxes, otherwise use links;
+% \item \texttt{\ameta{base-name}}: required argument is the base name of quiz.
% \end{itemize}
-%
-% Note that I set \verb!\tabcolsep=0pt! in preparation for a tabular environment.
+% Note that I set \cs{tabcolsep=0pt} in preparation for a tabular environment.
% If authors wants to use a tabular environment within a question, he/she must
-% reset this value to its default, \verb!\setlength{\tabcolsep}{6pt}!.
+% reset this value to its default, |\setlength{\tabcolsep}{6pt}|.
% \begin{macrocode}
-\newenvironment{quiz}
-{\goodbreak\@ifstar{\gdef\qstar{*}\@quiz*f}{\gdef\qstar{x}\@quiz*l}}
- {\aeb@endquiz}
+\newenvironment{quiz}{\goodbreak
+ \@ifstar
+ {\gdef\qstar{*}\@quiz*f}
+ {\gdef\qstar{x}\@quiz*l}%
+}{\aeb@endquiz}
\def\@quizCnt{0}
% \end{macrocode}
% \cs{ListOfQuizNames} and \cs{ListOfSQuizNames} are master lists of all
@@ -4702,9 +4740,9 @@ if (typeof !oField=="undefined")
\gdef\eqPTs{1}\global\let\eqQT\eq@na
% \end{macrocode}
% \changes{v6.3u}{2010/11/04}{%
-% Added \cs{xdef}\cs{oField}\texttt{\{\#2\}}, this is
-% needed for \textsf{apb.dtx}}
-% Add \cs{listOfQuizNames} to track quizzes
+% Added \string\cs{xdef}\string\cs{oField}\string\darg{\#2}, this is
+% needed for \string\textsf{apb.dtx}}
+% Add \string\cs{listOfQuizNames} to track quizzes
% \changes{v7.8k}{2017/07/25}{Added \string\cs{listOfQuizNames} to track quizzes}
% \begin{macrocode}
\g@addto@macro\ListOfQuizNames{,#2}%
@@ -4996,7 +5034,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;%
@@ -5105,7 +5143,7 @@ if (isEndQuizPushed("@eqBaseName")){
\fi
}
% \end{macrocode}
-% \changes{v6.7n}{2013/09/17}{\cs{CorrButton} is now an alias for \cs{eqButton}}
+% \changes{v6.7n}{2013/09/17}{\string\cs{CorrButton} is now an alias for \string\cs{eqButton}}
% \DescribeMacro{\CorrButton} is a name better suited for the task of this button
% than the \cs{eqButton} name.
% \begin{macrocode}
@@ -5359,8 +5397,8 @@ if (isEndQuizPushed("@eqBaseName")){
% \changes{v6.05c}{2006/05/19}
% {
% Added a convenience macro for setting the name of the quiz. This command defines the
-% text macro \cs{currQuiz} which contains the quiz name. Can be used in conjunction
-% with \cs{floatQuiz} and \cs{startQuizHere}.
+% text macro \string\cs{currQuiz} which contains the quiz name. Can be used in conjunction
+% with \string\cs{floatQuiz} and \string\cs{startQuizHere}.
% }
% \changes{v8.1k}{2018/02/04}{Added \string\cs{oField} to list in \string\cs{DeclareQuiz}}
% \begin{macrocode}
@@ -5378,12 +5416,12 @@ if (isEndQuizPushed("@eqBaseName")){
% \texttt{quiz} environment.
% \changes{v6.05c}{2006/05/19}
% {
-% Added \cs{floatQuiz}, \cs{dockQuiz} and \cs{startQuizHere} to start a quiz in an
+% Added \string\cs{floatQuiz}, \string\cs{dockQuiz} and \string\cs{startQuizHere} to start a quiz in an
% arbitrary place prior to the beginning of the quiz.
% }
%\par\medskip\noindent Usage:
%\begin{verbatim}
-%\Quiz{myQuiz}
+%\DeclareQuiz{myQuiz}
%\floatQuiz
%........
%\begin{center}
@@ -5512,8 +5550,8 @@ if (isEndQuizPushed("@eqBaseName")){
%quizzes only---the title of the quiz is used for the definition of
%\cs{sqlabel}. Note that \cs{makeatletter} is invoked before the
% parameters are read.
-% \changes{v6.7o}{2013/11/25}{Changed \cs{aeb@@titleQuzi} to \cs{aebTitleQuiz}}
-% \changes{v6.7p}{2013/12/11}{Added optional parameter to \cs{titleQuiz}
+% \changes{v6.7o}{2013/11/25}{Changed \string\cs{aeb@@titleQuzi} to \string\cs{aebTitleQuiz}}
+% \changes{v6.7p}{2013/12/11}{Added optional parameter to \string\cs{titleQuiz}
% to execute a command, such as incrementing a counter.}
% \begin{macrocode}
\let\tqhspace\space
@@ -5578,11 +5616,11 @@ if (isEndQuizPushed("@eqBaseName")){
%
%\changes{v6.2c}{2007/11/14}
%{
-% Added the commands \cs{showCreditMarkup} and \cs{hideCreditMarkup} to show partial credit markup
+% Added the commands \string\cs{showCreditMarkup} and \string\cs{hideCreditMarkup} to show partial credit markup
%}
%\changes{v6.3k}{2008/01/09}
%{
-% Added \cs{ptsLabel} and \cs{ptLabel} to localize the markup in the margin of a quiz
+% Added \string\cs{ptsLabel} and \string\cs{ptLabel} to localize the markup in the margin of a quiz
%}
% \begin{macrocode}
\newcounter{qMarkCnt}
@@ -5709,7 +5747,7 @@ if (isEndQuizPushed("@eqBaseName")){
% within a quiz.
%\changes{v6.2a}{2007/11/10}
%{
-% Added \cs{quizpdfbookmark} to bookmark quizzes.
+% Added \string\cs{quizpdfbookmark} to bookmark quizzes.
%}
% \begin{macrocode}
\newcommand{\sqbookmarkfmt}{Short Quiz \@shortquizCnt.\space}
@@ -5819,7 +5857,7 @@ if (isEndQuizPushed("@eqBaseName")){
% \changes{v6.05e}{2006/18/06 v6.05e}
% {
% Added control over the separation between the MC label and subsequent text:
-% \cs{setMClabelsep} and \cs{resetMClabelsep}.
+% \string\cs{setMClabelsep} and \string\cs{resetMClabelsep}.
% }
% \begin{macro}{\resetMClabelsep}
% \begin{macro}{\eq@hspanner}
@@ -5928,7 +5966,7 @@ if (isEndQuizPushed("@eqBaseName")){
%<*package|eqexam>
\def\Ans{\Ans@list}%
}% list
-}{\endlist\setcounter{quizno}{0}\eq@answersEndHook}
+}{\eq@answersEndHook\endlist\setcounter{quizno}{0}}
% \end{macrocode}
% Answers environment for a tabular environment. This command picks
% up the arguments of \cs{Ans}, then passes on the \cs{@Ans}
@@ -5994,7 +6032,7 @@ if (isEndQuizPushed("@eqBaseName")){
% \begin{macrocode}
\expandafter\tabular\sq@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}}%
% \end{macrocode}
-% \changes{v7.4}{2015/03/23}{added \cmd{\reset@doendpe}}
+% \changes{v7.4}{2015/03/23}{added \string\cs{reset@doendpe}}
% \DescribeMacro{\reset@doendpe} attempts to restore the \cs{parshape}
% following a list environment. It appears in several locations, includeing
% \cs{endanswers}, \cs{endmanswers}, and \cs{setTabulrSolnEnv}.
@@ -6018,10 +6056,12 @@ if (isEndQuizPushed("@eqBaseName")){
% \end{macrocode}
%
% \begin{macro}{\endanswers}
-% Close off \texttt{tabular} environment, and reinitialize the
+% Close off \texttt{tabular} environment, and re-initialize the
% \texttt{quizno} counter. Added \cs{answersEndHook}.
% \begin{macrocode}
-\newcommand\answersEndHook[1]{\def\eq@answersEndHook{#1}}
+\newcommand\answersEndHook[1]{\def\eq@answersEndHook{#1}%
+ \ifx\eq@answersEndHook\@empty\else
+ \def\insertEndHookHere{#1}\fi}
\let\eq@answersEndHook\@empty
\def\endanswers@sq{\endtabular\setcounter{quizno}{0}%
\eq@answersEndHook\reset@doendpe{\the\everypar}%
@@ -6124,7 +6164,7 @@ if (isEndQuizPushed("@eqBaseName")){
% For the link multiple choice type question. The driver independent stuff starts
% here, then goes to |\Ans@sq@f@driver| the rest of the code that depends on the
% driver.
-% \changes{v7.7d}{2015/11/15}{Changed mc.\cs{oFields} so it is printable}
+% \changes{v7.7d}{2015/11/15}{Changed mc.\string\cs{oFields} so it is printable}
% \begin{macrocode}
\def\@@Ans@sq@f@Defaults
{%
@@ -6158,11 +6198,19 @@ var qzSolnDest="*@qzsolndest";
var solnAfter=*ifeq@solutionsafter%
true*else%
false*fi;
-if ((qzSolnDest!="") && !solnAfter) %
-jmpToNamedDest("*oField","*@qzsolndest",%
-*ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
-*ifx*eqAddAAMouseUpMC*empty*else
-*eqAddAAMouseUpMC*fi
+% \end{macrocode}
+% Introduce changes in this code in response to \cs{sqSolnBtn} command.
+% \changes{v8.7.5}{2021/05/05}{\string\cs{sqSolnBtn} changes: execute block
+% if \string\cs{sqSolnBtn} not detected}
+% \begin{macrocode}
+var f=this.getField("corr.*oField.*thequestionno");
+if (f==null) {
+ if ((qzSolnDest!="") && !solnAfter) %
+ jmpToNamedDest("*oField","*@qzsolndest",%
+ *ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
+ *ifx*eqAddAAMouseUpMC*empty*else
+ *eqAddAAMouseUpMC*fi
+}
\end{defineJS}
% \end{macrocode}
% JavaScript code for the mouse up action for the \emph{incorrect} choice of the radio button field
@@ -6237,6 +6285,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}}
@@ -6245,7 +6296,7 @@ if( qzSolnDest!="") updateTally("*oField.*thequestionno");%
\PBS\raggedright
%</package|eqexam>
% \end{macrocode}
-%\changes{v6.7d}{2013/05/27}{added \cs{rbf@Opts} to hardwire choices.}
+%\changes{v6.7d}{2013/05/27}{added \string\cs{rbf@Opts} to hardwire choices.}
% \begin{macrocode}
%<*package>
\if\Ans@choice\eq@One
@@ -6309,23 +6360,31 @@ for (var i=0; i<a.length; i++)
if ( (a[i].isBoxChecked(0)) && %
(a[i].value.charAt(0)==0) )
a[i].checkThisBox(0,false);%
-*ifx*@sqTurnOffAlerts*eq@One%
-OnBlurRespBox(true,"*oField");
+*ifx*@sqTurnOffAlerts*eq@One
+OnBlurRespBox(true,"*oField");*else
*fi%
var qzSolnDest="*@qzsolndest";
var solnAfter=*ifeq@solutionsafter%
true*else%
false*fi;
-if ( (qzSolnDest != "") && !solnAfter ) {
- for (var i=0; i<a.length; i++){
- if ((a[i].exportValues[0].charAt(0)==1) && %
+% \end{macrocode}
+% Introduce changes in this code in response to \cs{sqSolnBtn} command.
+% \changes{v8.7.5}{2021/05/05}{\string\cs{sqSolnBtn} changes: execute block
+% if \string\cs{sqSolnBtn} not detected}
+% \begin{macrocode}
+var f=this.getField("corr.*oField.*thequestionno");
+if (f==null) {
+ if ( (qzSolnDest != "") && !solnAfter ) {
+ for (var i=0; i<a.length; i++){
+ if ((a[i].exportValues[0].charAt(0)==1) && %
(!a[i].isBoxChecked(0))) break;
+ }
}
+ if (i>=a.length) jmpToNamedDest("*oField","*@qzsolndest",%
+ *ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
+ *ifx*eqAddAAMouseUpMS*empty*else
+ *eqAddAAMouseUpMS*fi
}
-if (i>=a.length) jmpToNamedDest("*oField","*@qzsolndest",%
-*ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
-*ifx*eqAddAAMouseUpMS*empty*else
-*eqAddAAMouseUpMS*fi
\end{defineJS}
% \end{macrocode}
% Mouse up action for a \emph{incorrect answer box} (a checkbox) to MS question of short-quiz
@@ -6341,9 +6400,8 @@ for (var i=0; i<a.length; i++) {
a[i].checkThisBox(0,false);
}
}%
-*ifx*@sqTurnOffAlerts*eq@One%
-OnBlurRespBox(false,"*oField");
-*fi%
+*ifx*@sqTurnOffAlerts*eq@One
+OnBlurRespBox(false,"*oField");*fi%
*ifx*oField*@empty*else
updateTally("*oField.*thequestionno");*fi%
*ifx*eqAddAAMouseUpMS*empty*else
@@ -6472,9 +6530,9 @@ updateTally("*oField.*thequestionno");*fi%
% in the sections that follow.
% \changes{v6.2}{2007/11/08 }
%{
-% Added the \texttt{manswers} environment, and supporting elements, both {\LaTeX}
-% and JavaScript. This \texttt{manswers} environment is for the \texttt{quiz} environment
-% only. There is a \texttt{manswers} environment for the \texttt{shortquiz} environment, but
+% Added the \string\texttt{manswers} environment, and supporting elements, both {\string\LaTeX}
+% and JavaScript. This \string\texttt{manswers} environment is for the \string\texttt{quiz} environment
+% only. There is a \string\texttt{manswers} environment for the \string\texttt{shortquiz} environment, but
% this is used by \textsf{eqExam} only.
%}
%
@@ -6519,8 +6577,7 @@ updateTally("*oField.*thequestionno");*fi%
\setlength{\labelsep}{0pt}%
\def\Ans{\Ans@list}%
}%
-}{\endlist\setcounter{quizno}{0}%
- \eq@answersEndHook
+}{\eq@answersEndHook\endlist\setcounter{quizno}{0}%
\setdefault@Ans
\ifx\aeb@answerType\aeb@answerType@r
% \end{macrocode}
@@ -6784,8 +6841,8 @@ updateTally("*oField.*thequestionno");*fi%
% \end{macrocode}
% \changes{v6.05d}{2007/04/14}
% {
-% Added the command \cs{insertGrayLetters}. This can be defined to place symbols under
-% the multiple choice form boxes. The command \cs{bottomOfAnsfStack} is there as a
+% Added the command \string\cs{insertGrayLetters}. This can be defined to place symbols under
+% the multiple choice form boxes. The command \string\cs{bottomOfAnsfStack} is there as a
% hook for whatever purposes are desired.
% }
% \begin{macrocode}
@@ -6793,7 +6850,7 @@ updateTally("*oField.*thequestionno");*fi%
%</package>
%<*package|eqexam>
% \end{macrocode}
-% \changes{v7.7}{2015/06/04}{Added \cs{graylettersColor}}
+% \changes{v7.7}{2015/06/04}{Added \string\cs{graylettersColor}}
% \DescribeMacro\graylettersColor sets the color of the gray letters, the default is
% \texttt{gray}.
% \begin{macrocode}
@@ -6803,9 +6860,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
@@ -6831,9 +6891,9 @@ updateTally("*oField.*thequestionno");*fi%
\def\Ans@c@f@Choice{\Ff{\FfReadOnly}}%
\fi
% \end{macrocode}
-% \changes{v6.7h}{2013/08/19}{When the \cs{useMCCircles} is used, the boundary
+% \changes{v6.7h}{2013/08/19}{When the \string\cs{useMCCircles} is used, the boundary
% color is transparent. We try a fix for this to show the colored solution
-% boundary. The fix uses the \cs{late@options} commands.}
+% boundary. The fix uses the \string\cs{late@options} commands.}
% \begin{macrocode}
\ifaeb@usecircles\def\late@options{\BC{}}\fi
\if\Ans@choice\eq@One
@@ -7040,7 +7100,7 @@ updateTally("*oField.*thequestionno");*fi%
}
% \end{macrocode}
% \changes{v6.3x}{2011/04/05}{%
-% Added \texttt{label} parameter to \cs{bChoices}.
+% Added \string\texttt{label} parameter to \string\cs{bChoices}.
%}
% A new key, \IndexKey{label}\texttt{label}, if this label is specified, then we keep track of all the
% correct alternatives, put them into a commands to make them accessible by the user.
@@ -7084,8 +7144,9 @@ updateTally("*oField.*thequestionno");*fi%
}
% \end{macrocode}
% \changes{v6.3x}{2011/04/05}{%
-% Supporting commands that use the value of the \texttt{label} parameter
-% of \cs{bChoices}: \cs{eq@saveAns}, \cs{eq@displayAns}, \cs{eq@displayAlts}, etc.
+% Supporting commands that use the value of the \string\texttt{label} parameter
+% of \string\cs{bChoices}: \string\cs{eq@saveAns}, \string\cs{eq@displayAns},
+% \string\cs{eq@displayAlts}, etc.
%}
% \texttt{4/5} We begin an experimental series of commands. The idea is to be able to
% conveniently reference a multiple choice problem when the
@@ -7172,7 +7233,7 @@ updateTally("*oField.*thequestionno");*fi%
% \begin{macro}{\useSavedAltsAns}
% \begin{macro}{\useSavedNumAns}
% \changes{v6.3x}{2011/04/05}{%
-% Added \cs{useSavedAns}, \cs{useSavedAlts}, and \cs{useSavedAltsAns}.
+% Added \string\cs{useSavedAns}, \string\cs{useSavedAlts}, and \string\cs{useSavedAltsAns}.
%}
% These three commands hold the correct alternatives and answers to a multiple choice
% or multiple selection problem. The optional first argument allows you to display
@@ -7286,7 +7347,7 @@ updateTally("*oField.*thequestionno");*fi%
}{\expandafter\@findendans\@gobble}}%
% \end{macrocode}
% The command that processes the alternatives.
-% \changes{v6.7g}{2013/08/09}{Changed \texttt{\#1} to \cs{the}\cs{@temptokena} Fixing
+% \changes{v6.7g}{2013/08/09}{Changed \string\texttt{\string\#1} to \string\cs{the}\string\cs{@temptokena} Fixing
% a nasty bug. Reported by Christopher C.}
% \begin{macrocode}
\def\defineEachAns#1{\advance\eqtmpcnta\@ne
@@ -7382,7 +7443,7 @@ updateTally("*oField.*thequestionno");*fi%
\nextrandom \nextrandom \nextrandom
% \end{macrocode}
% Save the initial seed value to \cs{eqInitSeedValue}.
-% \changes{v6.7f}{2013/08/03}{Save the initial seed value to \cs{eqInitSeedValue}.}
+% \changes{v6.7f}{2013/08/03}{Save the initial seed value to \string\cs{eqInitSeedValue}.}
% \begin{macrocode}
\xdef\InitSeedValue{\the\randomi}%
\fi
@@ -7417,8 +7478,8 @@ updateTally("*oField.*thequestionno");*fi%
% \cs{@ansChoices}.
% \changes{v6.1}{2007/10/28}
% {%
-% Added support for randomizing the multiple choices, requires the use of \cs{bChoices}
-% and \cs{eChoices}.
+% Added support for randomizing the multiple choices, requires the use of \string\cs{bChoices}
+% and \string\cs{eChoices}.
% }
% \changes{v8.6.2}{2021/01/20}{Incorporated \string\cs{if@DoNotRandomize}
% into the \string\cs{@ansChoices} macro for MC and MS questions}
@@ -7653,10 +7714,10 @@ updateTally("*oField.*thequestionno");*fi%
% equivalent to \cs{ref}.
%\changes{v6.06c}{2007/04/26}
%{
-% Added \cs{REF} in support of the \texttt{showgrayletters} option.
+% Added \string\cs{REF} in support of the \string\texttt{showgrayletters} option.
%}
%\changes{v6.4d}{2011/07/14}{%
-% Correct \cs{REF} so that a link is created.
+% Correct \string\cs{REF} so that a link is created.
%}
% \begin{macrocode}
\def\REF{\@ifstar{\let\isREFstar\eq@One\aeb@REFstar}
@@ -7698,7 +7759,7 @@ updateTally("*oField.*thequestionno");*fi%
%
%\changes{v6.3j}{2008/12/08}
%{
-% Added \cs{useMCCircles} and \cs{useMCCRects}.
+% Added \string\cs{useMCCircles} and \string\cs{useMCCRects}.
%}
% \par\medskip\noindent We use a switch to keep track of ``circle mode.'' If the
% document author invokes \cs{useMCCircles} when we are already in circle mode,
@@ -7794,6 +7855,11 @@ updateTally("*oField.*thequestionno");*fi%
\global\let\aebtitleQuiz\@empty
\global\let\aebTitleQuiz\@empty
\global\let\eq@tq@star\relax
+% \end{macrocode}
+% (2021/05/07) Reset \cs{eqpriorhook} at end of \env{oQuestions} environment.
+% \changes{v8.7.6}{2021/05/07}{Reset \string\cs{eqpriorhook} at end of \string\env{oQuestions} environment}
+% \begin{macrocode}
+ \global\let\oqpriorhook\@empty
\aftergroup\ignorespaces
}
\def\oSolution#1{\edef\@qzsolndest{#1}}
@@ -7813,8 +7879,8 @@ updateTally("*oField.*thequestionno");*fi%
% in the preamble, we allow the score to go below zero.
%\changes{v6.3i}{2008/10/22}
%{
-% Added \cs{negPointsAllowed} to allow negative scores on quizzes. This is only relevant
-% when the quiz has a \texttt{manswers} environment.
+% Added \string\cs{negPointsAllowed} to allow negative scores on quizzes. This is only relevant
+% when the quiz has a \string\texttt{manswers} environment.
%}
% \begin{macrocode}
\def\negPointsAllowed{\def\negpointsallowed{true}}
@@ -7830,7 +7896,7 @@ updateTally("*oField.*thequestionno");*fi%
% and multiple choice questions.
%\changes{v6.3m}{2010/01/27}
%{
-% Added \cs{requireAlertBox} to turn off the ``Do not show this message again'' checkbox for objective questions.
+% Added \string\cs{requireAlertBox} to turn off the ``Do not show this message again'' checkbox for objective questions.
%}
%The alert box displays the message \cs{doNotShowAgainMsg} which by default is
%``Do not show this message again''
@@ -7992,8 +8058,8 @@ updateTally("*oField.*thequestionno");*fi%
\ifShowAppr\altApprOn\let\eqAddAAFormat\@empty\fi}
% \end{macrocode}
% Get any changes in the appearance of the text box
-% \changes{v6.4c}{2011/07/01}{\cs{RespBoxMath} now records its lists of
-% independent variables under the global variable \texttt{\_mathVars}.}
+% \changes{v6.4c}{2011/07/01}{\string\cs{RespBoxMath} now records its lists of
+% independent variables under the global variable \string\texttt{\_mathVars}.}
% \begin{macrocode}
\begin{defineJS}[\makeesc\*\makecmt\%]{\AAKqRespBoxMath}
% \end{macrocode}
@@ -8473,6 +8539,57 @@ if(event.willCommit) {
% \end{macro}
% \end{macro}
% \end{macro}
+% \begin{macrocode}
+%</package>
+%<*rbmIntrvl>
+% \end{macrocode}
+% \subsubsection{The \texorpdfstring{\protect\cs}{\textbackslash}{rbmIntrvl} command}\label{ss:rbmi}
+% This code segment is input into \pkg{exerquiz} when the \opt{userbmintrvl} is specified.
+% The commands of this section are motivated by an {Acro\negthinspace\TeX} user (Thor G). He
+% wants to ask his students to make a series of calculations, the result of
+% which is to be entered into a \cs{RespBoxMath} input box. He is willing to
+% accept the response as correct if the response falls into a designated
+% interval $[a,b]$.
+%
+% Two commands are defined, one internal (\cs{c@lcEPInfo}) and the other public {\cs{rbmIntrvl}}.
+%
+% The first command \cs{c@lcEPInfo} takes as its parameters an (closed) interval of numbers.
+% It calculates the midpoint \DescribeMacro\intrCAns\cs{intrCAns} and
+% \DescribeMacro\intrPrec\cs{intrPrec}. The first number can be used as a (representative) point
+% value of the answer; the second is used as the precision parameter of \cs{RespBoxMath}.
+% \changes{v8.7}{2021/04/24}{Added \string\cs{rbmIntrvl}}
+% \begin{macrocode}
+\def\c@lcEPInfo[#1,#2]{%
+ \setlength{\eflength}{(#1pt+#2pt)/2}%
+ \edef\intrCAns{\strip@pt\eflength}%
+ \setlength{\eflength}{(#2pt-#1pt)/2}%
+ \edef\intrPrec{\strip@pt\eflength}%
+}
+% \end{macrocode}
+% \DescribeMacro\rbmIntrvl\hskip-\marginparsep\texttt{\darg{[\meta{a{\upshape,}b}]}}
+% This macro takes as its first argument the interval you want the student response
+% to fall into. The command expands \cs{c@lcEPInfo} then \cs{RespBoxMath}. Use \cs{intrCAns} and \cs{intrPrec}
+% in the arguments of \cs{RespBoxMath}.
+% \begin{macrocode}
+\newcommand{\rbmIntrvl}[1]{\c@lcEPInfo#1\RespBoxMath}
+% \end{macrocode}
+% \cs{rbmIntrvl} has implied arguments, those of \cs{RespBoxMath}. Below is a simple example.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,codes={\catcode`\%=9}]
+%\rbmIntrvl{[6.40,6.90]}{\intrCAns}{1}{\intrPrec}{[0,1]}
+%\end{Verbatim}
+%Following the interval declaration are the parameters of \cs{RespBoxMath}. The first
+%one following the interval is the correct answer (\cs{intrCAns}), the midpoint of the interval;
+%the third argument following the interval is the precision parameter of \cs{RespBoxMath},
+%which is taken to be \cs{intrPrec}, the half-width of the interval.
+% \begin{macrocode}
+%</rbmIntrvl>
+%<*package>
+% \end{macrocode}
+% We input the definition of \cs{rbmIntrvl} here, if the \opt{userbmintrvl}
+% option is taken.
+% \begin{macrocode}
+\inputRBMICode
+% \end{macrocode}
%\subsection{Text Fill-In}
% \begin{macro}{\RespBoxTxt}
% \begin{macro}{\RespBoxTxtNT}
@@ -8528,7 +8645,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 +8674,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 +8686,7 @@ if(event.willCommit) {
!RespBoxTxtOnBlur!fi
}%
!ifx!eqAddAAKeystroke!@empty!else%
-!eqAddAAKeystroke!fi%
+!eqAddAAKeystroke!fi
\end{defineJS}
\def\@@RespBoxTxtActions{%
\AA{\if\eqQuizType\isQZ
@@ -8705,8 +8827,8 @@ if(event.willCommit) {
% \end{macro}
% \DescribeMacro{\txtRef}\hskip-\marginparsep\texttt{\darg{\ameta{label}}}
% The \cs{RespBoxTxt} can be used for a matching-type question. We define a special
-% \cs{ref}-type command that produces plain text. Refer to demo file \texttt{qz-matching.tex} for
-% details.
+% \cs{ref}-type command that produces plain text. Refer to demo file
+% \texttt{qz-matching.tex} for details.
% \changes{v8.6.4}{2021/02/15}{Support for matching-type question based in
% \string\cs{RespBoxTxt}}
% \begin{macrocode}
@@ -8967,51 +9089,109 @@ if(event.willCommit) {
}
% \end{macrocode}
% \end{macro}
-%\subsection{Fields that Support the Fill-Ins}
-% \begin{macro}{\sqTallyBox}
+% \section{Fields that play a supportive role}
+%
+% \subsection{Support for the short-quiz}
+%
+% \subsubsection{The \tops{\protect\cs}{\textbackslash}{sqTallyBox} command}
+%
+% \begin{macro}{\sqTallyBox}\hskip-\marginparsep\texttt{[\ameta{options}]}
% The \cmd{\sqTallyBox} holds the number of incorrect responses to the
-% question. This box is not required to appear. If it does not
-% appear, use \cmd{\RespBoxNT} to prevent the doc level JavaScript
-% from trying to write a nonexistent text field.
+% question. This box is not required to appear.
% \begin{macrocode}
\let\@@sqTallyBoxActions\@empty
-\@ifundefined{calcOrder}{%
-\ifpdf\def\@@sqTallyBoxActions{%
- \AA{\AAValidate{getTotalTally("\oField");}}}\fi}{}
+%\@ifundefined{calcOrder}{%
+%\ifpdf\def\@@sqTallyBoxActions{%
+% \AA{\AAValidate{getTotalTally("\oField");}}}\fi}{}
+%\ifpdf\def\@@sqTallyBoxActions{%
+% \AA{\AAValidate{getTotalTally("\oField");}}}\else
+% \let\@@sqTallyBoxActions\@empty\fi
\def\sqTallyBoxDefaults{%
- \BC{0 0 0}\W{1}\textColor{1 0 0 rg}\S{I}\Q{2}\Ff{\FfReadOnly}
-}
-\ifpdf\def\@@sqTallyBoxActions{%
- \AA{\AAValidate{getTotalTally("\oField");}}}\else
- \let\@@sqTallyBoxActions\@empty
-\fi
+ \BC{0 0 0}\W{1}\textColor{1 0 0 rg}\S{I}\Q{2}\Ff{\FfReadOnly}}
\newcommand\sqTallyBox[1][]{%
\mbox{\text@@Field{#1}{tally.\oField.\thequestionno}%
{\TBW}{\DefaultHeightOfWidget}%
{}{\eq@setWidgetProps\eq@TextField}%
{\sqTallyBoxDefaults\@@sqTallyBoxActions\every@eqTextField
- \every@sqTallyBox}}%
-}
+ \every@sqTallyBox}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\sqTallyTotal}
+% \subsubsection{The \tops{\protect\cs}{\textbackslash}{sqTallyTotal} command}
+% \begin{macro}{\sqTallyTotal}\hskip-\marginparsep\texttt{[\ameta{options}]}
% This text field stores the tally total. Only used within the
% \texttt{shortquiz} environment. Takes on optional parameter; this
-% parameter can be used to modify the appearance of the fields.
+% parameter can be used to modify the appearance of the fields. Two special
+% key-values are also recognized: \cs{weakpass\darg{\ameta{n}}} and \cs{strongpass\darg{\ameta{n}}}
% \begin{macrocode}
\def\sqTallyTotalDefaults{%
- \rawPDF{}\W{1}\BC{0 0 0}\S{I}\textColor{1 0 0 rg}%
- \Q{2}\Ff{\FfReadOnly}%
-}
-\def\@@sqTallyTotalActions{%
- \AA{%
- \AAKeystroke{AFNumber_Keystroke(0,0,0,0,"",true);}
- \AAFormat{AFNumber_Format(0,0,0,0,"",true);}
- \AACalculate{%
- AFSimple_Calculate("SUM",new Array("tally.\oField"));
- }}%
+ \rawPDF{}\W{1}\BC{0 0 0}\S{I}\textColor{1 0 0 rg}
+ \Q{2}\Ff{\FfReadOnly}
}
+% \end{macrocode}
+% \DescribeMacro{\sqWeakMsg} The message that appears in an alert box
+% when the use has exceeded the weak-pass limit.
+% \begin{macrocode}
+\flJSStr{\sqWeakMsg}{You have missed too many questions.
+After you finish, it is recommended you retake this quiz
+with fewer errors and greater understanding.}
+% \end{macrocode}
+% \DescribeMacro{\sqStrongMsg} The message that appears in an alert box
+% when the use has exceeded the strong-pass limit.
+% \begin{macrocode}
+\flJSStr{\sqStrongMsg}{You have missed too many questions.
+We are resetting the quiz. Start over, this time with
+fewer errors and greater understanding.}
+% \end{macrocode}
+% The code that formats the field and if needed, responds to the weak-pass
+% or strong-pass parameter.
+% \begin{macrocode}
+\def\@@sqTallyTotalActions{\AA{%
+ \AAKeystroke{\dl@EForAF4Number_Keystroke(0,0,0,0,"",true);}
+ \AAFormat{\dl@EForAF4Number_Format(0,0,0,0,"",true);}
+ \AACalculate{%
+ \dl@EForAF4Simple_Calculate("SUM",new Array("tally.\oField"));\r
+ var sqTlyTotl=event.value;
+ \ifx\eq@strongpass\@empty
+ \ifx\eq@weakpass\@empty\else\r
+% \end{macrocode}
+% \textbf{Weak pass:} When \uif{sqTlyTotl} exceeds \cs{eq@weakpass},
+% an alert message with a message of \cs{sqWeakMsg}.
+% \begin{macrocode}
+ if(sqTlyTotl > \eq@weakpass) {\r\t
+ if (\oField.sqTlyTotCnt==0)\r\t\t
+ app.alert(\sqWeakMsg);\r\t
+ \oField.sqTlyTotCnt++;\r
+ }
+ \fi
+ \else\r
+% \end{macrocode}
+% \textbf{Strong pass:} When \uif{sqTlyTotl} exceeds \cs{eq@strongpass},
+% an alert message with a message of \cs{sqStrongMsg}, and the whole
+% short-quiz is reset.
+% \begin{macrocode}
+ if(sqTlyTotl > \eq@strongpass) {\r\t
+ app.alert(\sqStrongMsg);\r
+ \@@sqClearButtonJSCode\r
+ event.value=0;\r
+ }
+ \fi
+}}}
+% \end{macrocode}
+% \begin{macrocode}
+\def\@eqweakpass#1{\def\eq@weakpass{#1}}
+\def\@eqstrongpass#1{\def\eq@strongpass{#1}}
+\let\eq@weakpass\@empty
+\let\eq@strongpass\@empty
+% \end{macrocode}
+% On 2021/05/07, the action of \cs{sqTallyTotal} is enhanced; two special keys-values
+% are defined: \cs{weakpass\darg{\ameta{n}}} and \cs{strongpass\darg{\ameta{n}}}.
+% For the weak pass, as soon as the student misses more than \ameta{n} questions,
+% an alert box message; for the strong pass, an alert message appears and the quiz
+% is reset.
+% \changes{v8.7.6}{2021/05/07}{Enhanced capabilities of \string\cs{sqTallyTotal}}
+% \begin{macrocode}
\newcommand\sqTallyTotal[1][]{%
+ \processAppArgs#1\end\@nil
\mbox{\text@@Field{#1}{tallytotal.\oField}{\TBW}%
{\DefaultHeightOfWidget}{\eq@protect\AA}%
{\eq@setWidgetProps\eq@TextField}%
@@ -9020,6 +9200,160 @@ if(event.willCommit) {
}
% \end{macrocode}
% \end{macro}
+%
+% \subsubsection{The \tops{\protect\cs}{\textbackslash}{sqClearButton} command}
+%
+% \begin{macro}{\sqClearButton}
+% This button will clear the tallyfields and change the color of
+% the \cmd{\RespBox} back to \cmd{\defaultColorJS}. The button clears the fields
+% based on the current value of \cmd{\oField}. This text macro is
+% given its value when the optional parameter in the
+% \texttt{shortquiz} environment is specified.
+%\changes{v6.3g}{2008/10/13}
+%{%
+% Fixed a problem with the clear button not setting the boundary color
+% back to the default. I must have changed the name of an objective field,
+% now, we say \string\texttt{this.getField("obj.\string\cs{oField}")}.
+%}
+% \begin{macrocode}
+\def\sqClearButtonDefaults
+{%
+ \CA{\eq@local@sqClearButton}\textColor{0 g}\F{\FPrint}
+ \BC{0 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}\Ff{\FfNoExport}
+}
+% \end{macrocode}
+% In an attempt to supply some custom colors for the shortquiz, we
+% define \cmd{\sqRespBoxResetColor}. It determines the clear color
+% \changes{v8.6}{2020/11/29}{Rewrote SQ clear button using \string\env{defineJS} env}
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\@@sqClearButtonJSCode}
+ProcessIt = false;
+if ( typeof *oField == "undefined" )
+ *oField = new Object;
+if (typeof appAlerts["*oField"] == "undefined")
+ appAlerts["*oField"] = new Object;
+this.resetForm(new Array("mc.*oField","obj.*oField",%
+"tally.*oField","grpobj.*oField"));
+var f = this.getField("obj.*oField");
+if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
+*defaultColorJS*else*defaultColorJSLoc*fi;
+f = this.getField("grpobj.*oField");
+% \end{macrocode}
+% Here, we give the user an opportunity to designate the color
+% of the response boxes when they are reset by the \cs{sqClearButton}.
+% The default is to use \cs{eqDefaultColor}.
+% \begin{macrocode}
+if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
+*defaultColorJS*else*defaultColorJSLoc*fi;
+f = this.getField("rbmarkup.*oField");
+if ( f != null ) f.display=display.hidden;
+*oField.Grp = {};
+appAlerts["*oField"].bAfterValue=false;
+% \end{macrocode}
+% \begin{macrocode}
+*oField.sqTlyTotCnt=0;
+ProcessIt=true;
+\end{defineJS}
+\def\@@sqClearButtonActions{\A{\JS{\@@sqClearButtonJSCode}}}
+\newcommand\sqClearButton[1][]{%
+ \mbox{\push@@Button{#1}{clear.\oField}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\sqClearButtonDefaults\@@sqClearButtonActions\every@ButtonField
+ \every@sqClearButton}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{The \tops{\protect\cs}{\textbackslash}{sqSolnBtn} command}
+% The default scheme for pointing the student to the soltuion to a MC or MS question
+% is through the buttons themselves. For MC, when the student chooses the correct
+% answer from the choice field, the page jumps to the soltution page automatically
+% (assuming there is a solution); for MS, the same jump does not occur until all
+% correct choices are made.
+%
+% In this section, we introduce an alternate scheme for handling jumps to MC and
+% MS questions.
+% \changes{v8.7.5}{2021/05/05}{Defined \string\cs{sqSolnBtn}}
+% \par\medskip\noindent
+% \DescribeMacro{\sqSolnMCMsg} Alert message for MC question
+% \begin{macrocode}
+\flJSStr{\sqSolnMCMsg}{You must first select the correct
+answer to see the solution.}
+% \end{macrocode}
+% \DescribeMacro{\sqSolnMSMsg} Alert message for MS question
+% \begin{macrocode}
+\flJSStr{\sqSolnMSMsg}{You must first select all the correct
+answers to see the solution.}
+% \end{macrocode}
+% \DescribeMacro{\sqCorrSolCodeMC} The code for \cs{sqSolnBtn} when the choice
+% field is MC
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\sqCorrSolCodeMC}
+var qzSolnDest="*@qzsolndest";
+var solnAfter=*ifeq@solutionsafter%
+true*else%
+false*fi;
+var qzSolnDest="*@qzsolndest";
+var f=this.getField("mc.*oField.*thequestionno");
+if(f.value.charAt(0)=="1") {
+ if ((qzSolnDest!="") && !solnAfter) %
+jmpToNamedDest("answer",qzSolnDest,1);
+} else app.alert(*sqSolnMCMsg);
+\end{defineJS}
+% \end{macrocode}
+% \DescribeMacro{\sqCorrSolCodeMS} The code for \cs{sqSolnBtn} when the choice
+% field is MS
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\sqCorrSolCodeMS}
+// multiple selection
+var g=this.getField("mc.*oField.*thequestionno");
+var a=g.getArray();
+var qzSolnDest="*@qzsolndest";
+var solnAfter=*ifeq@solutionsafter%
+true*else%
+false*fi;
+var qzSolnDest="*@qzsolndest";
+var f=this.getField("corr.*oField.*thequestionno");
+if ( (qzSolnDest != "") && !solnAfter ) {
+ for (var i=0; i<a.length; i++){
+ if ((a[i].exportValues[0].charAt(0)==1) && %
+(!a[i].isBoxChecked(0))) break;
+ }
+}
+if (i>=a.length) jmpToNamedDest("*oField","*@qzsolndest",%
+*ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);
+else app.alert(*sqSolnMSMsg);
+\end{defineJS}
+% \end{macrocode}
+% The action for \cs{sqSolnBtn} as a function of whether
+% this is a MC or MS button.
+% \begin{macrocode}
+\def\sqCorrSolButtonActionHook{\ifx\aeb@answerType
+ \aeb@answerType@r\JS{\sqCorrSolCodeMC}\else
+ \JS{\sqCorrSolCodeMS}\fi
+}
+% \end{macrocode}
+% \DescribeMacro{\sqSolnBtn}\hskip-\marginparsep\texttt{[\ameta{options}]} The
+% code for \cs{sqSolnBtn}. This command is usually inserted into the workflow
+% through the \cs{answersEndHook} command.
+% \begin{macrocode}
+\newcommand{\sqSolnBtn}[1][]{%
+ \def\Fld@name{corr.\oField.\thequestionno}%
+ \edef\@@CorrSolButtonActions{\noexpand
+ \A{\noexpand\sqCorrSolButtonActionHook}}%
+% \end{macrocode}
+% The \cs{sqSolnBtn} button only appears when \cs{@qasolndest} is nonempty.
+% \begin{macrocode}
+ \ifx\@qzsolndest\@empty\else
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonDefaults\@@CorrSolButtonActions
+ \every@ButtonField\every@CorrAnsButton}}\fi
+}
+% \end{macrocode}
+%
+% \subsection{The \tops{\protect\cs}{\textbackslash}{CorrAnsButton} buttons}
+%
% \begin{macro}{\CorrAnsButton}
% The \cmd{\CorrAnsButton} is a button macro which, when pressed, will
% display the correct answer for the user. This button is again
@@ -9084,7 +9418,8 @@ if(event.willCommit) {
% \end{macrocode}
% \leavevmode\DescribeMacro{\sqCorrAnsCode}
% The JavaScript code for \cs{CorrAnsButton} now in a \env{defineJS} env.
-% \changes{v8.6}{2020/11/29}{code for \string\cs{CorrAnsButton} now in a \string\env{defineJS} env}
+% \changes{v8.6}{2020/11/29}{code for \string\cs{CorrAnsButton} now in a
+% \string\env{defineJS} env}
% \begin{macrocode}
\begin{defineJS}[\makeesc\!\makecmt\%]{\sqCorrAnsCode}
!ifx!@qzsolndest!@empty%
@@ -9142,63 +9477,9 @@ else !processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\sqClearButton}
-% This button will clear the tallyfields and change the color of
-% the \cmd{\RespBox} back to \cmd{\defaultColorJS}. The button clears the fields
-% based on the current value of \cmd{\oField}. This text macro is
-% given its value when the optional parameter in the
-% \texttt{shortquiz} environment is specified.
-%\changes{v6.3g}{2008/10/13 }
-%{%
-% Fixed a problem with the clear button not setting the boundary color
-% back to the default. I must have changed the name of an objective field,
-% now, we say \texttt{this.getField("obj.\cs{oField}")}.
-%}
-% \begin{macrocode}
-\def\sqClearButtonDefaults
-{%
- \CA{\eq@local@sqClearButton}\textColor{0 g}\F{\FPrint}
- \BC{0 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}\Ff{\FfNoExport}
-}
-% \end{macrocode}
-% In an attempt to supply some custom colors for the shortquiz, we
-% define \cmd{\sqRespBoxResetColor}. It determines the clear color
-% \changes{v8.6}{2020/11/29}{Rewrote SQ clear button using \string\env{defineJS} env}
-% \begin{macrocode}
-\begin{defineJS}[\makeesc\*\makecmt\%]{\@@sqClearButtonJSCode}
-ProcessIt = false;
-if ( typeof *oField == "undefined" )
- *oField = new Object;
-if (typeof appAlerts["*oField"] == "undefined")
- appAlerts["*oField"] = new Object;
-this.resetForm(new Array("mc.*oField","obj.*oField",%
-"tally.*oField","grpobj.*oField"));
-var f = this.getField("obj.*oField");
-if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
-*defaultColorJS*else*defaultColorJSLoc*fi;
-f = this.getField("grpobj.*oField");
-% \end{macrocode}
-% Here, we give the user an opportunity to designate the color
-% of the response boxes when they are reset by the \cs{sqClearButton}.
-% The default is to use \cs{eqDefaultColor}.
-% \begin{macrocode}
-if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
-*defaultColorJS*else*defaultColorJSLoc*fi;
-f = this.getField("rbmarkup.*oField");
-if ( f != null ) f.display=display.hidden;
-*oField.Grp = {};
-appAlerts["*oField"].bAfterValue=false;
-ProcessIt=true;
-\end{defineJS}
-\def\@@sqClearButtonActions{\A{\JS{\@@sqClearButtonJSCode}}}
-\newcommand\sqClearButton[1][]{%
- \mbox{\push@@Button{#1}{clear.\oField}{}{\DefaultHeightOfWidget}%
- {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
- {\sqClearButtonDefaults\@@sqClearButtonActions\every@ButtonField
- \every@sqClearButton}}%
-}
-% \end{macrocode}
-% \end{macro}
+%
+% \subsection{The \tops{\protect\cs}{\textbackslash}{@PromptButton} command}
+%
% \begin{macro}{\@PromptButton}
% The \cs{@PromptButton} is used to create a ``progressive-style'' question (for math fill-in).
% Some series of questions build on one another. You can use this button to show the solution
@@ -9244,6 +9525,7 @@ if (!isQuizInitialized("*currQuiz")) {
\end{defineJS}
\def\PromptButtonActionHook{\JS{\PromptButtonActionCode}}
% \end{macrocode}
+% \DescribeMacro{\@PromptButton}\hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{answer}}}
% This button takes the standard two arguments
% \begin{flushleft}
% \texttt{\#1}: Optional parameters to change the appearance of the field\\
@@ -9275,6 +9557,9 @@ if (!isQuizInitialized("*currQuiz")) {
\newcommand{\PromptButton}{\makebox[0pt][r] % assumes xcolor
{\@PromptButton[\textColor{1 0 0 rg}]{\CorrectAns}}}
% \end{macrocode}
+%
+% \subsection{The \tops{\protect\env}{}{mathGrp} environment}
+%
% \begin{environment}{mathGrp}
% An environment for enclosing a collection of math/text fill-ins that are to be grouped
% together. This grouping should not cross a begin or end of another environment, or include more
@@ -10189,7 +10474,7 @@ aCorrectAns[!currQuiz.Grp["!thequestionno"].offset],!oField);!fi
%\end{flushleft}
% Define a special value (\cs{formatInitAltApprs}) for \cs{AddAAFormat} used in initializing \cs{RespBoxMath} problems,
% where there are alternate appearances.
-% See the {Acro\!\TeX} Blog article \url{http://www.acrotex.net/blog/?p=1335} for a discussion of the use of \cs{formatInitAltApprs}.
+% See the {Acro\negthinspace\TeX} Blog article \url{http://www.acrotex.net/blog/?p=1335} for a discussion of the use of \cs{formatInitAltApprs}.
% \changes{v8.1a}{2017/09/03}{Define a special value (\string\cs{formatInitAltApprs}) for \string\cs{AddAAFormat}}
% \begin{macrocode}
\def\formatInitAltApprs{\formatInitAltApprs}
@@ -10277,8 +10562,8 @@ aCorrectAns[!currQuiz.Grp["!thequestionno"].offset],!oField);!fi
%
%\changes{v6.3b}{2008/06/29}
%{
-% Added the \cs{AddAAKeystroke} to the recognizable set of keys. This will be obeyed
-% within the optional arguments of \cs{RespBoxMath} and \cs{RespBoxTxt}.
+% Added the \string\cs{AddAAKeystroke} to the recognizable set of keys. This will be obeyed
+% within the optional arguments of \string\cs{RespBoxMath} and \string\cs{RespBoxTxt}.
%}
% \begin{macrocode}
\def\@eqAddAAKeystroke#1{\def\argi{#1}\ifx\argi\@empty
@@ -10419,7 +10704,8 @@ var ok2Continue = true;
% from the \texttt{manswer.tex} demo file. Question 1 is a multiple selection question; Question 2
% is a multiple choice question; Question 3 is a math fill-in question; and Question 4
% is a grouped question. (The \texttt{undefined} entries indicate an empty or a not used entry.)
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%RightWrong.toSource()
%[undefined, [0, 1, [undefined, undefined, 0, 1, 1, 0, 1]], 1, 1,
% [undefined, 1, 1, 1, 0]]
@@ -10440,7 +10726,7 @@ var ok2Continue = true;
%
%aPointType.toSource()
% [undefined, [2, "mc"], [4, "ms"], [2, "text"], [4, "math"], [4, "grp"]]
-%\end{verbatim}
+%\end{Verbatim}
% \begin{macrocode}
var ProcessIt = true;
var retn;
@@ -10470,9 +10756,9 @@ var aDlLibSpecResp=new Array(\dlLibSpecRespJS);
% JSf is an array of supported mathematical functions.
%\changes{v6.06}{2007/02/23}
%{
-% Separated the \texttt{JSf} array into \texttt{JSfBuiltIn} and \texttt{JSfCustom}. This
+% Separated the \string\texttt{JSf} array into \string\texttt{JSfBuiltIn} and \string\texttt{JSfCustom}. This
% allows us to identify the built-in JavaScript functions. I concatenate these two
-% into \texttt{JSf}.
+% into \string\texttt{JSf}.
%}
% \begin{macrocode}
var JSfBuiltIn = new Array
@@ -10495,7 +10781,7 @@ var JSfBuiltIn = new Array
% recognized properly when implmulti from dljslib is active. I think that
% the problem is caused by the fact that arcsin(x) follows sin(x) in the
% field of known functions and converted into arc*sin(x) and then into
-% a*r*c*sin(x). I enclose the patch for the exerquiz.dtx file which in my
+% a*r*c*sin(x). I enclose the patch for the \textsf{exerquiz.dtx} file which in my
% opinion solves the problem.''
%}
% \begin{macrocode}
@@ -10615,8 +10901,8 @@ function CkBalVert(UserInput)
% \texttt{UserInput}: a string\\
% Returns: 1 (if there is a match); 0 (if no match)
% also sets the global variable \texttt{ok2Continue} to \texttt{false}.
-% \changes{v6.4c}{2011/07/01}{Ckfunc now uses a global variable \texttt{\_mathVars} which
-% holds the variables of the current \cs{RespBoxMath} being processed. We search
+% \changes{v6.4c}{2011/07/01}{Ckfunc now uses a global variable \string\texttt{\_mathVars} which
+% holds the variables of the current \string\cs{RespBoxMath} being processed. We search
% all substrings containing 2 or more letters; if it consists only of the variables
% that substring is OK.}
% \begin{macrocode}
@@ -10674,10 +10960,7 @@ function DisplayAnswer(fieldname,theanswer)
var oQName = new Object;
var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
?\defaultColorJS:oQName.DefaultColorJSLoc;
- try {
- this.getField(fieldname).value=(theanswer);
-% this.getField(fieldname).strokeColor = defaultColor;
- } catch(e) {}
+ try { this.getField(fieldname).value=(theanswer); } catch(e) {}
ProcessIt = true;
}
function EvalCorrAnsButton(fieldname,theanswer)
@@ -10867,11 +11150,8 @@ function ParseInput(UserInput)
% \end{macrocode}
% We make a rough check of the user input, if it has alpha-words of size two or greater
% that do not match up against a recognizable function, it must be an error.
-%
-% (09/07/09) Comment this out so we check for function in both cases, get same alert message
% \begin{macrocode}
-% if (typeof(Ck4Exponents) == "undefined")
- if(!Ckfuncs(UserInput)) return false;
+ if(!Ckfuncs(UserInput)) return false;
% \end{macrocode}
% Now try to insert the multiplication operator where applicable.
% \begin{macrocode}
@@ -10976,22 +11256,21 @@ function ParseInput(UserInput)
default:
ok2Continue=false;
}
-% console.println("working.."+UserInput);
}
if (!ok2Continue)
{
eqAppAlert(\eqerrBadExp,3);
return false;
- }
- else {
+ } else {
% \end{macrocode}
-%\changes{v6.06}{2007/02/23}
-%{
-% Now, just before we return the parsed expression, we append all built-in
+%(2007/02/23) Just before we return the parsed expression, we append all built-in
% JavaScript functions and constants with \texttt{Math.}, this is to avoid
-% having to use the \texttt{with(Math)} construct. These changes are in support
-% of using scientific notation.
-%}
+% having to use the \texttt{with(Math)} construct.
+%\changes{v6.06}{2007/02/23}{%
+% Now, just before we return the parsed expression, we append all built-in
+% JavaScript functions and constants with \string\texttt{Math.}, this is to avoid
+% having to use the \string\texttt{with(Math)} construct. These changes are in support
+% of using scientific notation.}
% \begin{macrocode}
UserInput=addMathObject(UserInput);
return UserInput;
@@ -11240,8 +11519,6 @@ indepVars,oComp){
% the combinatorics functions \texttt{C(x,y)} and \texttt{P(x,y)}.
% \begin{macrocode}
var reCP=/((C|P)\(.+?)(,)(.+?\))/g
-% str="P(12,4)"
-% reCP.exec(str)
UserAns=UserAns.replace(reCP,"$1@c@$4");
% \end{macrocode}
% (2012/04/13) Bruce Wagner reports a problem with the user enters an answer containing
@@ -11301,37 +11578,31 @@ function processSpecialParse(oParse,UserAns) {
if (typeof(_o)=="function") {
% \end{macrocode}
% If \texttt{oParse} is an object (it should be an array), and the first entry is a function
-% then we have: \texttt{priorParse: [myfunction, optional arguments]}. The function is
+% then we have: \texttt{priorParse:\,[myfunction, optional arguments]}. The function is
% evaluated with the args \texttt{(UserAns, optional args)}. In the code below, we remove
% the name of the function at the beginning of the array, and insert the \texttt{UserAns}
% in its place. Various syntax variations supported.
-%\begin{verbatim}
-% priorParse: nodec,
-% priorParse: [nodec,noBinFac],
-% priorParse: [nodec,noBinFac,[myFunc,arg1, arg2,..]],
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%priorParse: nodec,
+%priorParse: [nodec,noBinFac],
+%priorParse: [nodec,noBinFac,[myFunc,arg1, arg2,..]],
+%\end{Verbatim}
% \begin{macrocode}
-% _o=oParse.shift();
-% oParse.unshift(UserAns);
retn=_o(UserAns);
-% retn = _o.apply(null,oParse);
if (retn==null) return retn;
% \end{macrocode}
% In this case, we break out of the loop, we don't expect any more properties
% for \texttt{priorParse} or \texttt{postParse}.
% \begin{macrocode}
-% break;
} else {
% \end{macrocode}
% If \texttt{oComp.priorParse[i]} is not a function, it is required to be an array. The first
% element of the array is the function, the rest of the entries are the additional arguments
% (in addition to \texttt{UserAns}).
% \begin{macrocode}
-% f=_o.shift();
-% _o.unshift(UserAns);
-% retn=f.apply(null,_o);
- retn=_o[0].apply(null, [ UserAns ].concat(_o.slice(1)));
- if (retn==null) return null;
+ retn=_o[0].apply(null, [ UserAns ].concat(_o.slice(1)));
+ if (retn==null) return null;
}
}
} else {
@@ -11388,6 +11659,11 @@ CorrAns,userAns,comp)
% null if expression was not valid
% -1 if expression is not a number
% \begin{macrocode}
+var ckDZRe=/\b([^0-9]*)(\d*)\./g;
+function ckDZReRepl(match,a,b,offset,string){
+ if (b[0]!="0") return match;
+ else return util.printf(a+"\%d.",b);
+}
function diffCompare(_a,_c,_v,_F,_G) {
var aXY = _c.split(",");
var _V = _v.split(","); // e.g. _V[0] = "i:x"
@@ -11423,10 +11699,31 @@ function diffCompare(_a,_c,_v,_F,_G) {
% the JavaScript interpreter does not see them. The other complication is that Acro5 objects
% to having a \texttt{return} within an \texttt{eval()}, so we work around that with a
% \texttt{rtnCode}. The returns are executed outside the \texttt{eval()}.
+% \changes{v8.7.4}{2021/05/03}{Changed logic in \string\texttt{diffCompare()} function}
% \begin{macrocode}
var rtnCode = 0;
+% \end{macrocode}
+% JavaScript has problems with numbers that are not properly written.
+% If a number has a decimal point, the integer part of the decimal must be blank, a zero (0),
+% or must begin with a non-zero number. In the \texttt{String.replace()} method below,
+% the regular expression \texttt{ckDZRe} identifies leading digits, and the function
+% \texttt{ckDZReRepl} is a replacement function that implements the requirements described above.
+% The same changes is made in \texttt{reldiffCompare()} below.
+% \begin{macrocode}
+ _G=_G.replace(ckDZRe,ckDZReRepl);
eval("try {if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+"catch (e) { rtnCode=1; }");
+% \end{macrocode}
+%Below is the code removed on 2021/05/01 for the above two lines. When |_G="00.00"|, for example.
+%and |ifNaN(_G = eval(_G))| is executed, a exception is thrown and \texttt{null} is returned;
+%even though the string does evaluate to a number, but JavaScript does not recognize it as such.
+%As a result, we try an alternate strategy. The same change is made in the function
+%\texttt{reldiffCompare()}, below.
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9}]
+%eval("try {if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+% +"catch (e) { rtnCode=1; }");
+%\end{Verbatim}
+% \begin{macrocode}
switch(rtnCode)
{
case 0: break;
@@ -11464,6 +11761,7 @@ function diffCompare(_a,_c,_v,_F,_G) {
}
% \end{macrocode}
% This function is the same as above, but returns the relative absolute error.
+% \changes{v8.7.1}{2021/05/01}{Changed logic in \string\texttt{reldiffCompare()} function}
% \begin{macrocode}
function reldiffCompare(_a,_c,_v,_F,_G) {
var aXY = _c.split(",");
@@ -11471,16 +11769,17 @@ function reldiffCompare(_a,_c,_v,_F,_G) {
var _n = aXY.length
for (var _i=0; _i < _n; _i++)
{
- if (_V[_i].charAt(0) == "r" )
- eval ("var "+_V[_i].charAt(2)+"="+aXY[_i]+";");
- else // assume type "i"
- eval ("var "+_V[_i].charAt(2)+"="+Math.ceil(aXY[_i])+";");
+ if (_V[_i].charAt(0) == "r" )
+ eval ("var "+_V[_i].charAt(2)+"="+aXY[_i]+";");
+ else // assume type "i"
+ eval ("var "+_V[_i].charAt(2)+"="+Math.ceil(aXY[_i])+";");
}
_F = eval(_F);
if ( app.viewerVersion >= 5)
{
var rtnCode = 0;
- eval("try { if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+ _G=_G.replace(ckDZRe,ckDZReRepl);
+ eval("try {if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+"catch (e) { rtnCode=1; }");
switch(rtnCode)
{
@@ -11512,7 +11811,7 @@ function reldiffCompare(_a,_c,_v,_F,_G) {
% ]\CorrAnsButton{-4z^3(3z+4)^2}
%\end{verbatim}
% where \cs{refac}, \cs{repow}, \cs{redigit}, and \cs{rediv} are convenience macros defined
-% earlier in \texttt{exerquiz.dtx}. The regular expression describe the form of the answer
+% earlier in \textsf{exerquiz.dtx}. The regular expression describe the form of the answer
% acceptable.
%
% There seems to be a redundancy in the usage of \cs{Array}, but this is by design.
@@ -11548,7 +11847,6 @@ function denyForm(UserAns, regexpr) {
var msg=\defaultReqFormMsg;
UserAns = stripWhiteSpace (UserAns);
if (!ok2Continue) return null;
-% UserAns = stripOutMuli(UserAns);
UserAns = ChngAllGrpsToParens(UserAns);
if (arguments.length>2) msg=arguments[2];
if (typeof(regexpr.length)=="undefined") {
@@ -11838,8 +12136,8 @@ function eqFilter(filterMethod) {
case 3:
default:
% \end{macrocode}
-%\changes{v6.4k}{2011/08/17}{Within the function eqFilter, changed \texttt{this} to
-% \texttt{this.toString()}. The comparisons were returning false when they shouldn't
+%\changes{v6.4k}{2011/08/17}{Within the function eqFilter, changed \string\texttt{this} to
+% \string\texttt{this.toString()}. The comparisons were returning false when they shouldn't
% this is because in this case, we were comparing objects to objects}
% \begin{macrocode}
return this.toString();
@@ -11859,9 +12157,6 @@ function checkTheSpelling(targetFieldName) {
% field. For the \texttt{spell.checkWord()} method, \app{PDF-XChange Editor} returns \texttt{undefined}.
% This (spell checking) is a AR/AA feature only.
% \begin{macrocode}
-% var fName = "obj"+thisName.substring(3);
-% var f=this.getField(fName);
-% if (f==null) fName="grpobj"+thisName.substring(3);
var f=this.getField(targetFieldName);
var value=f.value;
var valueStrip = value.replace(/\s+/g,"");
@@ -11933,23 +12228,31 @@ function ProcUserResp(key,userresp,probno,notify)
fieldPopTbl(a[1]);
}
}
+% \end{macrocode}
+% (2021/04/04) Added try/catch to catch exceptions.
+% \changes{v8.6.6}{2021/04/04}{Added some try/catch pairs to avoid tossing cookies}
+% \begin{macrocode}
function ProcUserNoResp(key,userresp,probno,notify)
{
if ( arguments.length > 4 ) {
- RightWrong[probno][arguments[4]] = undefined;
- Responses[probno][arguments[4]] = undefined;
+ try{
+ RightWrong[probno][arguments[4]] = undefined;
+ Responses[probno][arguments[4]] = undefined;
+ } catch(e){};
var bVoidArray=true;
- for (var i=0; i<Responses[probno].length; i++) {
- if ( typeof Responses[probno][i] != "undefined") {
- bVoidArray=false;
- break;
- }
- }
- if (bVoidArray) {
- Responses[probno]=undefined;
- RightWrong[probno]=undefined;
+ try {
+ for (var i=0; i<Responses[probno].length; i++) {
+ if ( typeof Responses[probno][i] != "undefined") {
+ bVoidArray=false;
+ break;
+ }
+ }
+ } catch(e){};
+ if (bVoidArray) {
+ Responses[probno]=undefined;
+ RightWrong[probno]=undefined;
ProbValue[probno]=undefined;
- }
+ }
} else {
RightWrong[probno] = undefined;
Responses[probno] = undefined;
@@ -12182,8 +12485,8 @@ function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
% (2021/02/17) If there is a fourth argument for this function, it should
% be either \texttt{true} or \texttt{false}; if \texttt{true}, \texttt{DisplayQuizResults()}
% does not display quiz results; the default is \texttt{false}. This feature is used in the
-% demo file \texttt{qz-pin-to-correct.tex} found on the {Acro\!\TeX} Blog.
-% \changes{v8.6.4}{2021/02/17}{Added conditional (\texttt{\_bSilent})}
+% demo file \texttt{qz-pin-to-correct.tex} found on the {Acro\negthinspace\TeX} Blog.
+% \changes{v8.6.4}{2021/02/17}{Added conditional (\string\texttt{\_bSilent})}
% \begin{macrocode}
var _bSilent=(arguments.length > 3 ) ? arguments[3] : false;
if (!_bSilent) {
diff --git a/texmf-dist/source/latex/acrotex/exerquiz.ins b/texmf-dist/source/latex/acrotex/exerquiz.ins
index f8e05e42..94dc361a 100644
--- a/texmf-dist/source/latex/acrotex/exerquiz.ins
+++ b/texmf-dist/source/latex/acrotex/exerquiz.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 1999-2020 D. P. Story
+%% Copyright 1999-2021 D. P. Story
%%
%% This file is part of the `AcroTeX eDucation Bundle'.
%% -------------------------------------------
@@ -50,6 +50,7 @@
\file{aebrandom.def}{\from{exerquiz.dtx}{copyright,randomize}}
\file{aebsumrytbls.def}{\from{exerquiz.dtx}{copyright,sumrytbls}}
\file{usemcfi.def}{\from{exerquiz.dtx}{copyright,mcfi}}
+ \file{rbmintrvl.def}{\from{exerquiz.dtx}{copyright,rbmIntrvl}}
\file{eqcolor.def}{\from{exerquiz.dtx}{copyright,eqcolor}}
\file{template.def}{\from{exerquiz.dtx}{copyright,template}}
\file{eqfr.def}{\from{exerquiz.dtx}{copyright,eqfr}}
diff --git a/texmf-dist/source/latex/acrotex/insdljs.dtx b/texmf-dist/source/latex/acrotex/insdljs.dtx
index a13d72c4..8df24984 100644
--- a/texmf-dist/source/latex/acrotex/insdljs.dtx
+++ b/texmf-dist/source/latex/acrotex/insdljs.dtx
@@ -16,10 +16,15 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{insdljs}
-%<package> [2021/02/07 v2.5.2 Insert Document Level JavaScripts (dps)]
+%<package> [2021/05/10 v2.5.3 Insert Document Level JavaScripts (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
+\usepackage{fancyvrb}
+\makeatletter
+\let\@latex@warning@no@line\@gobble
+\renewcommand{\paragraph}{\@startsection{paragraph}{4}{0pt}{6pt}{-3pt}{\bfseries}}
+\makeatother
\usepackage{makeidx}
\makeindex
\def\EXPT{!}
@@ -33,6 +38,7 @@
\let\opt\texttt
\let\app\textsf
\let\pkg\textsf
+\let\uif\textsf
\def\visispace{\symbol{32}}
\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
\def\meta#1{\textsl{\texttt{#1}}}
@@ -84,31 +90,26 @@
% \subsection{The \texttt{insDLJS} Environment}
%
% The following is a quick illustration of the use of the new environment.
-% \begin{verbatim}
-% \documentclass{article}
-% \usepackage[pdftex]{hyperref}
-% \usepackage[pdftex]{insdljs}
-%
-% \newcommand\tugHello{Welcome to TUG 2001!}
-%
-% \begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
-% function HelloWorld()
-% {
-% app.alert("\tugHello", 3);
-% }
-% \end{insDLJS}
-% \begin{document}
-% \begin{Form} % needed for \PushButton
-%
-% \section{Test of the \texttt{insDLJS} Package}
-%
-% % use built in form button of hyperref
-% Push \PushButton[name=myButton,
-% onclick={HelloWorld();}]{Button}
-%
-% \end{Form}
-% \end{document}
-% \end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!~@},codes={\catcode`\%=9}]
+%\documentclass{article}
+%\usepackage{hyperref}
+%\usepackage{insdljs}
+%\newcommand\tugHello{Welcome to TUG 2001!}
+%\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
+%function HelloWorld(){app.alert("\tugHello", 3);}
+%\end{insDLJS}
+%\begin{document}
+%\begin{Form} !%!textsf~ needed for !cs~PushButton@@
+%
+%\section{Test of the \textsf{insDLJS} Package}
+%
+%!%!textsf~ use the built-in form button of hyperref@
+%Push \PushButton[name=myButton,onclick={HelloWorld();}]{Button}
+%
+%\end{Form}
+%\end{document}
+%\end{Verbatim}
% This environment takes three parameters, the first of which is required
% for users of \texttt{dvips} and \texttt{dvipsone} and optional otherwise.
% Within the environment, `|\|', is the escape character, and `|%|' is the comment
@@ -122,16 +123,16 @@
% within the JavaScript. When the \texttt{debug} option is used, the markers
% show up in the document level JavaScript; otherwise, they are not written
% to the PDF document. Here is a simple example,
-% \begin{verbatim}
-%\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
-%function HelloWorld()
-%{
-% app.alert("\tugHello", 3);
-% var x = "\\";
-%\db console.println("Entered HelloWorld function and x = " + x);\db%
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
+%\begin{insDLJS}{mydljs}{My Private DLJS}
+%function HelloWorld() {
+%*1app.alert("\tugHello", 3);
+%*1var x = "\\";
+%\db console.println("Entered HelloWorld function and x = " + x);\db!%
%}
%\end{insDLJS}
-%\end{verbatim}
+%\end{Verbatim}
% The last line of the function will appear in the DLJS if compiled under
% the \texttt{debug} option; otherwise, it is removed. Additional discussion
% of this debugging device is given below.
@@ -141,34 +142,34 @@
% This package also defines an \cs{OpenAction} command to introduce actions that are
% executed when the PDF document is opened on page~1. The open action command only
% applies to page~1.
-% \begin{flushleft}
-% \textbf{Usage}
-%\begin{verbatim}
+%\paragraph*{Usage}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\catcode`\%=9}]
%\OpenAction{/S/JavaScript/JS(app.alert("Hello World!");)}
-%\end{verbatim}
-% \end{flushleft}
-% The package defines a |\JS| that takes one argument. The code |\JS{#1}| expands to
-% |/S/JavaScript/JS (#1)|, and so the above example may be written as
-% \begin{flushleft}
-%\begin{verbatim}
+%\end{Verbatim}
+% The package defines a \cs{JS} command that takes one argument. The code |\JS{#1}| expands to
+% |/S/JavaScript/JS (#1)|, and so the above example may be written as,
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\catcode`\%=9}]
%\OpenAction{\JS{app.alert("Hello World!");}}
-%\end{verbatim}%
-%\end{flushleft}
+%\end{Verbatim}%
% Multiple JavaScript commands can be entered. For nice formatting use \cs{r}
% and \cs{t} for carriage return and tab, respectively.
%\goodbreak
-%\begin{verbatim}
-%\OpenAction{\JS{%
-% app.alert("Hello World!");\r
-% app.alert("Good Day to You!");
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
+%\OpenAction{\JS{*%
+%*1app.alert("Hello World!");\r
+%*1app.alert("Good Day to You!");
%}}
-%\end{verbatim}
+%\end{Verbatim}
% The open actions are placed in a token list. Additional actions are added to the token list, so
% you say
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
%\OpenAction{\JS{app.alert("Hello World!");}}
%\OpenAction{\JS{app.alert("Good Day to You!");}}
-%\end{verbatim}
+%\end{Verbatim}
% the two messages will appear each time you open page~1 of the document.
%
% In the case of users of the distiller, \textsf{insdljs} uses this mechanism to
@@ -181,15 +182,15 @@
%
% Let me describe in rough terms what goes on behind the scenes. In the discussion
% below, the following example will be used:
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
%\newcommand\tugHello{"Hello World!"}
-%\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
-%function HelloWorld()
-%{
-% app.alert("\tugHello", 3);
+%\begin{insDLJS}{mydljs}{My Private DLJS}
+%function HelloWorld(){
+%*1app.alert("\tugHello", 3);
%}
%\end{insDLJS}
-%\end{verbatim}
+%\end{Verbatim}
%
% \subsubsection{For the \texttt{pdftex} and \texttt{dvipdfm} Options}
%
@@ -251,16 +252,16 @@
% that function. However, if you can declare variables and initialize them at the document level outside
% of a function, these variables will have document wide scope. Throughout the document, the values of these
% global variables are known. For example
-%\begin{verbatim}
-%\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
-%var myVar = 17; // defined outside a function, global scope
-%function HelloWorld()
-%{
-% var x = 3; // defined inside a function, local scope
-% app.alert("\tugHello", 3);
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
+%\begin{insDLJS}{mydljs}{My Private DLJS}
+%var myVar = 17; //*textsf~ defined outside a function, global scope@
+%function HelloWorld(){
+%*1var x = 3; //*textsf~ defined inside a function, local scope@
+%*1app.alert("\tugHello", 3);
%}
-% \end{insDLJS}
-%\end{verbatim}
+%\end{insDLJS}
+%\end{Verbatim}
% Both the function \texttt{HelloWorld()} and the variable \texttt{myVar} are known throughout
% the document. The function \texttt{HelloWorld()} can be called by a mouse up button action;
% some form field, executing some JavaScript, may access the value of \texttt{myVar} and/or
@@ -348,34 +349,36 @@
%
% The following environment, defines a command \cs{myCmd} what expands to the verbatim
% contents of the environment.
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\begin{defineJS}{\myCmd}
-% ...
-% <JavaScript code>
-% ...
+%...
+%!ameta(JavaScript code)
+%...
%\end{defineJS}
-%\end{verbatim}
+%\end{Verbatim}
%
% There is also a \textsf{localJS} environment that makes any definitions within the
% environment local.
%
%The following examples uses some macros from the \textsf{eforms} package:
-%\begin{verbatim}
-% % Define a text macro that will be expanded from within the
-% % defineJS environment
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~$},codes={\def\1{\quad}\catcode`\%=9}]
+%*%*uif~ Define a text macro that will be expanded from within$
+%*%*uif~ the *env~defineJS$ environment$
%\def\HelloWorld{Hello World}
-% % Now define some JavaScript to execute with a button to be created.
-% % We enclose the defineJS and the \pushButton in the localJS environment
-% % That way, the macro definitions, \JSA, \JSAAE, \JSAAX will be local to
-% % this group
+%*%*uif~ Now define some JavaScript to execute with a button to be created.$
+%*%*uif~ We enclose the *env~defineJS$ and the *cs~pushButton$ in the *env~localJS$ environment$
+%*%*uif~ That way, the macro definitions, *cs~JSA$, *cs~JSAAE$, *cs~JSAAX$ will be local to$
+%*%*uif~ this group$
%\begin{localJS}
-% % Make @ the escape so we can demonstrate the optional parameter.
-%\begin{defineJS}[\catcode`\@=0\relax]{\JSA}
+%*%*uif~ Make @ the escape so we can demonstrate the optional parameter.$
+%\begin{defineJS}[\makeesc\@]{\JSA}
%var sum = 0;
%for (var i = 0; i < 10; i++)
%{
-% sum += i;
-% console.println("@HelloWorld i = " + i );
+%*1sum += i;
+%*1console.println("@HelloWorld i = " + i );
%}
%console.println("sum = "+sum);
%\end{defineJS}
@@ -385,13 +388,14 @@
%\begin{defineJS}{\JSAAX}
%console.println("Exiting the button area");
%\end{defineJS}
-%\pushButton[%
-% \A{\JS{\JSA}}
-% \AA{\AAMouseEnter{\JS{\JSAAE}}
-% \AAMouseExit{\JS{\JSAAX}}}
+%\pushButton[*%
+%*1\A{\JS{\JSA}}
+%*1\AA{\AAMouseEnter{\JS{\JSAAE}}
+%*1*1 \AAMouseExit{\JS{\JSAAX}}
+%*1}
%]{myButton}{30bp}{15bp}
%\end{localJS}
-%\end{verbatim}
+%\end{Verbatim}
%
% See the section \Nameref{defineJS} for details of these two environments.
% \section{Package Options and Requirements}
@@ -445,6 +449,16 @@
\let\dl@YES=y \let\dl@NO=n
\let\dl@One=1 \let\dl@Zero=0
\let\dljs@YES=y \let\dljs@NO=n
+\edef\dl@restoreCats{%
+ \catcode`\noexpand\"=\the\catcode`\"\relax
+ \catcode`\noexpand\'=\the\catcode`\'\relax
+ \catcode`\noexpand\,=\the\catcode`\,\relax
+ \catcode`\noexpand\(=\the\catcode`\(\relax
+ \catcode`\noexpand\!=\the\catcode`\!\relax
+ \catcode`\noexpand\_=\the\catcode`\_\relax
+}
+\@makeother\"\@makeother\'\@makeother\,%
+\@makeother\(\@makeother\!\@makeother\_
% \end{macrocode}
% \leavevmode\DescribeMacro{\dlpkgInfo} A command to identify package date
% from within document level Javascript
@@ -531,7 +545,7 @@
% The option \texttt{!reqis} turns off this feature; that is, there is no notification
% via the \textsf{YMB} (\textsf{Yellow Message Bar}) that Javascripts are used in the document, and the
% document may not function as designed.
-% \changes{v2.2d}{2016/04/06}{Added \texttt{reqjs} and \texttt{{\string\quotechar}reqjs}.}
+% \changes{v2.2d}{2016/04/06}{Added \string\texttt{reqjs} and \string\texttt{{\string\EXPT}reqjs} options.}
% \begin{macrocode}
\DeclareOptionX{reqjs}{\let\dl@reqJS\dl@YES}
\let\dljs@reqJS\dl@YES
@@ -659,7 +673,7 @@
% \end{macrocode}
% If \texttt{reqjs} is in effect, we execute the following code, otherwise, we
% do not. The \textbf{\textsf{Requirements}} dictionary goes in the document \textbf{\textsf{Catalog}}.
-% \changes{v2.2d}{2016/04/06}{Code to support \texttt{reqjs} and \texttt{{\string\EXPT}reqjs} options.}
+% \changes{v2.2d}{2016/04/06}{Code to support \string\texttt{reqjs} and \string\texttt{{\string\EXPT}reqjs} options.}
% \begin{macrocode}
\def\AEB@psMrk{[%]
\space}
@@ -671,7 +685,7 @@
\fi
% \end{macrocode}
% Added switch to mark whether djs is inserted
-% \changes{v2.4}{2018/07/21}{Added switch}{Added \cs{ifthereisdjs}}
+% \changes{v2.4}{2018/07/21}{Added switch}{Added \string\cs{ifthereisdjs}}
% \begin{macrocode}
\newif\ifthereisdjs \thereisdjsfalse
\def\applydljs#1{\ifthereisdjs\else#1
@@ -738,19 +752,16 @@
%
% Again, both JavaScript and \TeX, certain punctuation marks have special meaning; in the case of
% JavaScript, punctuation has a special meaning within regular expressions:
-%\begin{flushleft}
-%\textbf{Special Punctuation in Regular Expressions}
+%\paragraph*{Special Punctuation in Regular Expressions}
%\begin{verbatim}
% ^ $ . * + ? = ! : | \ / ( ) [ ] { }
%\end{verbatim}
-%\end{flushleft}
-%
% Complications continued. The distiller method (the \texttt{dvipsone} or the
% \texttt{dvips} option), and the \textsf{pdftex}/\textsf{dvipdfm} applications
% handle the backslash differently. The following example illustrates the problem.
% {\small
%\begin{verbatim}
-%dvipsone/dvips
+%dvips
%LaTeX Source As appears in PDF
%var x = "\"; --> var x = "\"; (SyntaxError: Unterminated string literal)
%var x = "\\"; --> var x = "\\"; (Correct)
@@ -761,7 +772,7 @@
% `\verb+\\+' to get the single backslash.
% {\small
%\begin{verbatim}
-%pdftex/dvipdfm
+%pdftex/xetex
%LaTeX Source As appears in PDF
%var x = "\"; --> var x = ""; (\" is the literal ")
%var x = "\\"; --> var x = "\"; (SyntaxError: Unterminated string literal)
@@ -776,16 +787,17 @@
% and to adjust their definitions depending on the driver option. As a result, of these
% background definitions, the JavaScript writer does not worry too much about these details,
% for example
-%\begin{verbatim}
-%\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
+%\begin{insDLJS}{mydljs}{My Private DLJS}
%function HelloWorld()
%{
-% app.alert("\tugHello", 3);
-% var x = "\\";
-% app.alert("x = " + x);
+%*1app.alert("\tugHello", 3);
+%*1var x = "\\";
+%*1app.alert("x = " + x);
%}
%\end{insDLJS}
-%\end{verbatim}
+%\end{Verbatim}
% So much for the complication.
%
%\subsection{Begin Code}
@@ -828,7 +840,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\Thread}\hskip-\marginparsep\texttt{\darg{\ameta{thread-title}}}
-% \changes{v2.4.9}{2020/07/09}{Added \string\Thread}
+% \changes{v2.4.9}{2020/07/09}{Added \string\cs{Thread}}
% A thread action; this command is used in the \pkg{artthreads} package.
% \begin{macrocode}
\providecommand{\Thread}[1]{/S/Thread/D(#1)}
@@ -841,7 +853,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\Launch}\hskip-\marginparsep\texttt{\darg{\ameta{file-spec}}}
-% \changes{v2.5}{2020/12/20}{Added \string\Launch}
+% \changes{v2.5}{2020/12/20}{Added \string\cs{Launch}}
% A launch action
% \begin{macrocode}
\providecommand{\Launch}[1]{/Launch/F(#1)}
@@ -894,7 +906,7 @@
% A help macro to define \cs{dfnJSR} in a convenient way; \cs{dfnJSR} is
% used in the \env{defineJS} environment.
% \changes{v2.5}{2020/12/20}{Helper commands \string\cs{dfnJSCR} to define
-% \string\cs{defineJSjsR} and \cs{dfnJSCRDef} to set default.}
+% \string\cs{defineJSjsR} and \string\cs{dfnJSCRDef} to set default.}
% \begin{macrocode}
\def\dfnJSCR#1{\gdef\dfnJSR{#1}\gdef\defineJSjsR{#1}}
\def\dfnJSCRDef{\dfnJSCR{\string\r\eqbs^^J}}
@@ -903,7 +915,7 @@
% \end{macrocode}
% \cs{r} is recognized by hyperref when \cs{pdfstringdef} is used. Hyperref
% then modifies the expansion of \cs{r}. So, we'll use \cs{n} in those situations.
-% \changes{v2.0l}{2012/11/10}{Added \cs{jsN}}
+% \changes{v2.0l}{2012/11/10}{Added \string\cs{jsN}}
% \begin{macrocode}
\def\jsN{\string\n}
{\catcode`\^^I\active %
@@ -917,6 +929,12 @@
\newwrite\js@verbatim@out
\def\iwvo#1{\immediate\write\js@verbatim@out{#1}}
% \end{macrocode}
+% \paragraph*{Convenience command\DescribeMacro{\dl@EForAF4} that support \opt{usealtadobe} option.} This helper
+% command make it convenient to switch from the `AF' to the `EF' versions.
+% \changes{v2.5.3}{2021/05/10}
+% \begin{macrocode}
+\def\dl@EForAF4#1_{\ifx\usedAdbFuncs\dl@YES EF\else AF\fi#1_}
+% \end{macrocode}
% \subsection{Some JavaScript Support}
%
% \begin{macro}{\flJSStr}
@@ -931,10 +949,10 @@
% should the need arise.
%\changes{v2.0b}{2008/06/19}
%{
-% A simple command for creating JS strings with unicode \cs{uXXXX}.
+% A simple command for creating JS strings with unicode \string\cs{uXXXX}.
%}
-% \changes{v2.0m}{2013/12/23}{Added \cs{jscsDflt} and \cs{jscsDLJS}, incorporated into \cs{dl@defJSStr}.}
-% Added \cs{jscsDflt} and \cs{jscsDLJS}, incorporated them into \cs{dl@defJSStr}.
+% \changes{v2.0m}{2013/12/23}{Added \string\cs{jscsDflt} and \string\cs{jscsDLJS}, incorporated into \string\cs{dl@defJSStr}.}
+% Added \string\cs{jscsDflt} and \string\cs{jscsDLJS}, incorporated them into \string\cs{dl@defJSStr}.
% \begin{macrocode}
\def\dl@lparen{(}\def\dl@rparen{)}
\def\genericNL{^^J}
@@ -1043,9 +1061,10 @@
% \begin{macro}{\db}\hskip-\marginparsep{\,\texttt{...\cs{db}}}
% The \cs{db} macro can be used within the \texttt{insDLJS} to insert
% addition JS commands to help debug the code. Usage:
-%\begin{verbatim}
-% \db console.println("myVal = " + myVal);\db%
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
+%\db console.println("myVal = " + myVal);\db*%
+%\end{Verbatim}
% Any material (on one line) that is between the two \verb+\db+ will either be
% written to the DLJS (if \cmd{\dljs@debug} expands to \texttt y), or be removed from
% the final output (if \cmd{\dljs@debug} does not expand to \texttt y).
@@ -1171,9 +1190,10 @@
% direct (almost) all auxiliary files of insDLJS to the specified
% path. The macro takes one parameter, a path on your local hard
% disk. Usage:
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
%\insPath{c:/temp/}
-%\end{verbatim}
+%\end{Verbatim}
% Be sure to use only forward slashes, and don't forget to finish
% the string with a final forward slash, as illustrated above.
%
@@ -1195,7 +1215,7 @@
% or link (see \cs{eq@setButtonProps} and \cs{eq@setWidgetProps}).
% They are used for formatting JavaScript code. The command
% \cs{makespecialJS} is defined in \textsf{insdljs}.
-% \changes{v2.1}{2015/06/15}{Moved \cs{makeJSspecials} from \textsf{eforms}
+% \changes{v2.1}{2015/06/15}{Moved \string\cs{makeJSspecials} from \string\textsf{eforms}
% to here.}
% \begin{macrocode}
\begingroup
@@ -1207,13 +1227,13 @@
\def\\{\eqbs\eqbs}% % define \\ to be \\
\let\jslit\string
% \end{macrocode}
-% \changes{v2.0n}{2014/05/20}{Remake the definition of \cs{\char`\{} and \cs{\char`\}}}
+% \changes{v2.0n}{2014/05/20}{Remake the definition of \string\cs{\char`\{} and \string\cs{\char`\}}}
% In an attempt to avoid the use of \verb~\jslit\{~ and \verb~\jslit\}~, we remake
% the definition of \verb~\{} and \verb~\}~.
% \begin{macrocode}
\let\{\dl@lBrace\let\}\dl@rBrace
% \end{macrocode}
-% \changes{v2.1}{2015/07/12}{\cs{let} \cs{u} to \cs{@empty}.}
+% \changes{v2.1}{2015/07/12}{\string\cs{let} \string\cs{u} to \string\cs{@empty}.}
% \cs{let} \cs{u} to \cs{@empty}.
% \begin{macrocode}
\let\u\@empty
@@ -1226,8 +1246,8 @@
% various action-types may be executed. These actions occur before the document JavaScripts
% are read and before any pages are opened. We give support for this event, originally part
% of the \textsf{aeb\_pro} package.
-%\changes{v2.1}{2015/06/15}{Moved definition of \cs{addToDocOpen} from
-% \textsf{aeb\_pro} to \textsf{insdljs}, added support for \texttt{pdftex} and \texttt{xetex}
+%\changes{v2.1}{2015/06/15}{Moved definition of \string\cs{addToDocOpen} from
+% \textsf{aeb\_pro} to \textsf{insdljs}, added support for \string\texttt{pdftex} and \string\texttt{xetex}
% options.}
% \paragraph*{Page views}
% The view can be set when the page key is used. Possible values are
@@ -1263,10 +1283,11 @@
% with different action-types. Must be executed in the preamble or it has no effect.
% It populates the value of the key \textbf{/OpenAction} in the \textbf{Catalog} of the
% PDF file.
-%\begin{verbatim}
-% \addToDocOpen{\JS{console.println("Open the doc!");}}
-% \addToDocOpen{/S/GoTo/D[\Page{2}\fitpage]}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
+%\addToDocOpen{\JS{console.println("Open the doc!");}}
+%\addToDocOpen{/S/GoTo/D[\Page{2}\fitpage]}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand{\addToDocOpen}[1]{%
\ifx\aebpFA\dl@NO
@@ -1309,7 +1330,7 @@
% If \textsf{aeb\_pro} is not loaded, we set the open actions. If \textsf{aeb\_pro}
% is loaded, we do nothing for \textsf{aeb\_pro} has its own contributions to the
% PDF \textbf{Catalog}.
-% \changes{v2.3d}{2017/01/08}{Use \cs{aebpFA} to detect open actions}
+% \changes{v2.3d}{2017/01/08}{Use \string\cs{aebpFA} to detect open actions}
% \begin{macrocode}
\@ifpackageloaded{aeb_pro}{}
{\AtBeginDocument{\ifx\aebpFA\dl@YES\expandafter
@@ -1384,10 +1405,11 @@
% Distiller (dvipsone and dvips users of the distiller), if additional open page action
% is needed on the first page, you can insert this action using the \cmd{\nextOAction} command.
%
-%\medskip\noindent Usage
-%\begin{verbatim}
-% \OpenAction{\JS{app.beep(-1); app.alert("Welcome to my Page!",3);}}
-%\end{verbatim}
+%\paragraph*{Usage}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
+%\OpenAction{\JS{app.beep(-1); app.alert("Welcome to my Page!",3);}}
+%\end{Verbatim}
% The macro takes two parameters, the \cmd{\Next} followed by the desired action, in this
% case it is a JavaScript action.
%
@@ -1395,17 +1417,19 @@
% is a \cmd{\Next}, additional code is entered into the open page action. Thus, for example, the
% following code is effectively the same as the above example, but the individual lines are
% listed separately in the GUI action dialog of Acrobat.
-%\begin{verbatim}
-% \OpenAction{\JS{app.beep(-1);}}
-% \Next{\JS{app.alert("Welcome to my Page!",3);}}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
+%\OpenAction{\JS{app.beep(-1);}}
+%\Next{\JS{app.alert("Welcome to my Page!",3);}}
+%\end{Verbatim}
% In the above example, several open page actions are ``chained'' together.
%
% You are not restricted to JavaScript actions, for example, you can perform a \texttt{Named}
% action:
-%\begin{verbatim}
-% \OpenAction{/S/Named/N/Open}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={*~@},codes={\def\1{\quad}\catcode`\%=9}]
+%\OpenAction{/S/Named/N/Open}
+%\end{Verbatim}
% There is a |\Named| command that expands to |/S /Named /N#1|, so the above
% example can be written
%\begin{verbatim}
@@ -1554,40 +1578,39 @@
% within the environment, eventually ends up in the DLJS section of the
% PDF document
%
-% The environment takes the \texttt{<base\_name>} and writes the
-% file \texttt{<base\_name>.djs}. This file contains a verbatim
+% The environment takes the \texttt{\ameta{base\_name}} and writes the
+% file \texttt{\ameta{base\_name}.djs}. This file contains a verbatim
% listing of the JS within the environment, plus some changing of
% catcodes. This file is then input back into the document at
% \cmd{\AtBeginDocument} with the necessary code for
% \textsf{pdftex} and \textsf{dvipdfm} properly place the JS.
%
% The case of \textsf{dvipsone} and \textsf{dvips} is a little different. A
-% \texttt{<base\_name>.djs} is written and input back, and a second file
-% \texttt{<base\_name>.fdf} is written. This second file is later input
+% \texttt{\ameta{base\_name}.djs} is written and input back, and a second file
+% \texttt{\ameta{base\_name}.fdf} is written. This second file is later input
% into the PDF document after distillation.
%
% The syntax of usage for this environment, which takes three
-% arguments, is given next.
-%\begin{verbatim}
-% \begin{insDLJS}[<function>]{<base_name>}{<script_name>}
-% <JavaScript functions or exposed code>
-% ...
-% ...
-% \end{insDLJS}
-%\end{verbatim}
+% arguments, is given next.\goodbreak
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\def\1{\quad}\catcode`\%=9}]
+%\begin{insDLJS}[!ameta(function)]{!ameta(base_name)}{!ameta(script_name)}
+%!1!ameta(JavaScript functions or exposed code)
+%\end{insDLJS}
+%\end{Verbatim}
% where,
% \begin{description}
-% \item[\texttt{\#1:}] This optional parameter, \texttt{<function>},
-% is \emph{required} for the \texttt{dvipsone} and \texttt{dvips}
-% options; otherwise it is ignored. Its value must be the name of
+% \item[\texttt{\#1:}] This optional legacy parameter, its use is discouraged.
+% Its value must be the name of
% one of the functions defined in the environment. This is used to
-% detect whether the DLJS has already be loaded by Acrobat.
-% \item[\texttt{\#2}:] This parameter, \texttt{<base\_name>}, is an
+% detect whether the DLJS has already be loaded by Acrobat. This parameter
+% is now automatically created.
+% \item[\texttt{\#2}:] This parameter, \ameta{base\_name}, is an
% alphabetic word with no spaces and limited to eight characters. It
% is used to build the names of auxiliary files and to build the
% names of macros used by the environment.
-% \item[\texttt{\#3}:] The \texttt{<script\_name>} of your JavaScript.
-% This title will appear in the Documentlevel JavaScript dialog of
+% \item[\texttt{\#3}:] The \ameta{script\_name} of your JavaScript.
+% This title will appear in the document-level JavaScript dialog of
% Acrobat.
% \end{description}
% Within the insDLJS environment, there are two types of comment characters:
@@ -1598,7 +1621,7 @@
% the percent character in a JavaScript statement, for example
% |app.alert("\%.2f", 3.14159);|, this statement will appear within your JavaScript
% code as |app.alert("%.2f", 3.14159);|.
-% \changes{v2.2c}{2015/11/13}{Turned \cs{Hy@unicodefalse} so unicode is not written
+% \changes{v2.2c}{2015/11/13}{Turned \string\cs{Hy@unicodefalse} so unicode is not written
% in the name of the script.}
% \begin{macrocode}
\let\insdljsloadVar\@empty
@@ -1625,20 +1648,20 @@
\ifx\csname dljs\dljsBase\endcsname\relax
\else\@insjserrDuplicate\fi
\ifcase\dljs@drivernum
- \let\insert@DLJS=\insert@DLJS@pdfmark
- \let\endinsDLJS=\endinsert@DLJS@pdfmark
- \let\newsegment=\newsegment@pdfmark
- \let\endnewsegment=\endnewsegment@pdfmark
+ \let\insert@DLJS\insert@DLJS@pdfmark
+ \let\endinsDLJS\endinsert@DLJS@pdfmark
+ \let\newsegment\newsegment@pdfmark
+ \let\endnewsegment\endnewsegment@pdfmark
\or
- \let\insert@DLJS=\insert@DLJS@pdftex
- \let\endinsDLJS=\endinsert@DLJS@pdftex
- \let\newsegment=\newsegment@pdftex
- \let\endnewsegment=\endnewsegment@pdftex
+ \let\insert@DLJS\insert@DLJS@pdftex
+ \let\endinsDLJS\endinsert@DLJS@pdftex
+ \let\newsegment\newsegment@pdftex
+ \let\endnewsegment\endnewsegment@pdftex
\or
- \let\insert@DLJS=\insert@DLJS@dvipdfm
- \let\endinsDLJS=\endinsert@DLJS@dvipdfm
- \let\newsegment=\newsegment@dvipdfm
- \let\endnewsegment=\endnewsegment@dvipdfm
+ \let\insert@DLJS\insert@DLJS@dvipdfm
+ \let\endinsDLJS\endinsert@DLJS@dvipdfm
+ \let\newsegment\newsegment@dvipdfm
+ \let\endnewsegment\endnewsegment@dvipdfm
\fi
\insert@DLJS
}{}
@@ -1659,23 +1682,22 @@
% different \textsl{script names}.
%
% The syntax is
-%\begin{verbatim}
-% \begin{insDLJS*}[<function>]{<base_name>}
-% \begin{newsegment}{<script_name>}
-% <JavaScript functions or exposed code>
-% \end{newsegment}
-% \begin{newsegment}{<script_name>}
-% <JavaScript functions or exposed code>
-% \end{newsegment}
-% ...
-% ...
-% <JavaScript functions or exposed code>
-% \end{newsegment}
-% \begin{newsegment}{<name_name>}
-% <JavaScript functions or exposed code>
-% \end{newsegment}
-% \end{insDLJS*}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\def\1{\quad}\catcode`\%=9}]
+%\begin{insDLJS*}[!ameta(function)]{!ameta(base_name)}
+%\begin{newsegment}{!ameta(script_name)}
+%!1!ameta(JavaScript functions or exposed code)
+%\end{newsegment}
+%\begin{newsegment}{!ameta(script_name)}
+%!1!ameta(JavaScript functions or exposed code)
+%\end{newsegment}
+%...
+%...
+%\begin{newsegment}{<script_name>}
+%!1!ameta(JavaScript functions or exposed code)
+%\end{newsegment}
+%\end{insDLJS*}
+%\end{Verbatim}
% where,
% \begin{description}
% \item[\texttt{\#1:}] This optional parameter, \texttt{<function>},
@@ -1712,20 +1734,20 @@
\expandafter\ifx\csname dljs\dljsBase\endcsname\relax
\else\@insjserrDuplicate\fi
\ifcase\dljs@drivernum
- \let\insert@DLJS=\insert@DLJS@pdfmark\expandafter
+ \let\insert@DLJS\insert@DLJS@pdfmark\expandafter
\let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdfmark
- \let\newsegment=\newsegment@pdfmark
- \let\endnewsegment=\endnewsegment@pdfmark
+ \let\newsegment\newsegment@pdfmark
+ \let\endnewsegment\endnewsegment@pdfmark
\or
- \let\insert@DLJS=\insert@DLJS@pdftex\expandafter
+ \let\insert@DLJS\insert@DLJS@pdftex\expandafter
\let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdftex
- \let\newsegment=\newsegment@pdftex
- \let\endnewsegment=\endnewsegment@pdftex
+ \let\newsegment\newsegment@pdftex
+ \let\endnewsegment\endnewsegment@pdftex
\or
- \let\insert@DLJS=\insert@DLJS@dvipdfm\expandafter
+ \let\insert@DLJS\insert@DLJS@dvipdfm\expandafter
\let\csname endinsDLJS*\endcsname\endinsert@DLJS@dvipdfm
- \let\newsegment=\newsegment@dvipdfm
- \let\endnewsegment=\endnewsegment@dvipdfm
+ \let\newsegment\newsegment@dvipdfm
+ \let\endnewsegment\endnewsegment@dvipdfm
\fi
\insert@DLJS
}{}
@@ -1759,8 +1781,8 @@
\endgroup
\def\ckivspace#1{\if\noexpand#1\space\else\expandafter#1\fi}
% \end{macrocode}
-% \changes{v2.2b}{2015/08/03}{Added a hook \cs{DLspecialDefs} into the DJS file}
-% (2015/08/03) Added the \cs{DLspecialDefs} hook into the DJS file, used in
+% \changes{v2.2b}{2015/08/03}{Added a hook \string\cs{DLspecialDefs} into the DJS file}
+% (2015/08/03) Added the \string\cs{DLspecialDefs} hook into the DJS file, used in
% \textsf{aeb\_pro}.
% \begin{macrocode}
\let\DLspecialDefs\@empty
@@ -1778,8 +1800,8 @@
\iwvo{endobj}
\iwvo{2 0 obj}
% \end{macrocode}
-% When a non-Distiller workflow, ensure execJSs are listed first.
-% \changes{v2.2h}{2016/06/09}{When a non-Distiller workflow, ensure execJSs are listed first}
+% When a non-Distiller workflow, ensure \env{execJS}s are listed first.
+% \changes{v2.2h}{2016/06/09}{When a non-Distiller workflow, ensure \string\env{execJS}s are listed first}
% \begin{macrocode}
\let\x\@empty
\applydljs{\def\x{^^Jvar _thereisdjs=true;}}%
@@ -1953,7 +1975,7 @@
% \end{macrocode}
% \DescribeMacro{\dlcontig}\hskip-\marginparsep\texttt{(\#1)} Perhaps a better method than
% just described (\cs{dlcombine}) is to have a single argument delimited by parentheses.
-% Thus \verb|@currQuiz@dlcontig(MyField)| also produces \texttt{q1MyField}.
+% Thus |@currQuiz@dlcontig(MyField)| also produces \texttt{q1MyField}.
% \begin{macrocode}
\def\dlcontig(#1){#1}
% \end{macrocode}
@@ -1990,27 +2012,30 @@
% need to be handled carefull so as not to produce any specious spaces. Normally, there is
% a comment character declared (|\makecmt\%|). Use the comment character to suppress the beginning
% of a new line until it is known whether there is content on that next line. Eg,
-%\begin{verbatim}
-%\begin{defineJS}[\makeesc\*\makecmt\%]{\X}
-%var w=1;%
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\def\1{\quad}\catcode`\%=9}]
+%\begin{defineJS}[\makeesc\*\makecmt\!%]{\X}
+%var w=1;!%
%*ifx*Y*@empty*else
%var x=1;
%var y=1;*fi
%var z=1;
%\end{defineJS}
-%\end{verbatim}
-%When \cs{Y} is empty, the content expands to
-%\begin{verbatim}
+%\end{Verbatim}
+%When \cs{Y} is empty, the content expands to,
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\def\1{\quad}\catcode`\%=9}]
%var w=1;
%var z=1;
-%\end{verbatim}
+%\end{Verbatim}
%and when \cs{Y} is nonempty, it expands to,
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\def\1{\quad}\catcode`\%=9}]
%var w=1;
%var x=1;
%var y=1;
%var z=1;
-%\end{verbatim}
+%\end{Verbatim}
% The following two commands are no longer used by this package.
% \changes{v2.4.8}{2019/10/30}{Added \string\cs{dlgobToFi} to help format
% \string\env{defineJS} code}
@@ -2030,7 +2055,7 @@
% The macro \cs{dl@typesetthis} defined here, is the external version of the local command
% \cs{typeset}. It globally sets the switch \cs{ifdlfortypeset} to true and defines the value
% of \cs{dfnJSR} and the legacy command \cs{defineJSjsR}. For \cs{dfnJSCR}, we use only {\TeX}
-% primitives to maintain compatibilty with the now defunct YandY System, which I still use.
+% primitives to maintain compatibility with the now defunct YandY System, which I still use.
% \begin{macrocode}
\def\dl@typesetthis{\global\dlfortypesettrue
\dfnJSCR{\hfil\break\null}}
@@ -2231,7 +2256,7 @@
% If the user has not passed the optional
% name, we generated one for him, now we insert it into the \texttt{stream}.
%\changes{v2.0k}{2012/06/21}{If the user has not passed the optional
-% name, we generated one for him, now we insert it into the \texttt{stream}.}
+% name, we generated one for him, now we insert it into the \string\texttt{stream}.}
% \begin{macrocode}
\ifx\insdljsloadVar\@empty\else
\iwvo{\insdljsloadVar}
@@ -2363,14 +2388,6 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
{\uccode`c=`\%\uppercase{%
\iwvo{\string\obeyspaces\string\obeylines
\string\let\string^\string^M=\string\jsR c}}}
-% \end{macrocode}
-% (2014/08/09) For pdftex and xetex, this global let messages up
-% the \texttt{Verbatim} environment. Not sure why this is global anyway
-%\begin{verbatim}
-% \iwvo{\string\obeyspaces\string\obeylines\string
-% \global\string\let\string^\string^M=\string\jsR c}}}
-%\end{verbatim}
-% \begin{macrocode}
{\escapechar=-1 \lccode`C=`\%\lowercase{%
\iwvo{\string\\catcode`\string\\"=12C}}}
}
@@ -2387,7 +2404,7 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
\def\enddljs{\iwvo{\string\endgroup}}
% \end{macrocode}
%\changes{v2.0j}{2011/06/27}{made some changes as suggested by Christian Feuersaenger, who reported some
-% problem clashes between \textsf{babel} (spanish) and \textsf{insdljs}.}
+% problem clashes between \string\textsf{babel} (spanish) and \string\textsf{insdljs}.}
% \begin{macrocode}
\def\@roman#1{\romannumeral#1}
\def\write@objs{%
@@ -2579,20 +2596,22 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
%
% The \cs{ckivspace} (``check for space'') macro sees whether the next token is a space,
% if yes, it absorbs it, if not, it replaces it. I implemented this in order to get
-% final output identical to the JavaScript. For example, the following is legal JavaScript
-%\begin{verbatim}
-% var str = "First line.\r\rSkip a line. // (1)
-%\end{verbatim}
+% final output identical to the JavaScript. For example, the following is legal JavaScript:
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%var str = "First line.\r\rSkip a line. // (1)
+%\end{Verbatim}
% This is a problem for \TeX. In order to delimit the macro, \TeX{} users need to write the
-% above line as
-%\begin{verbatim}
+% above line as,
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
% var str = "First line.\r\r Skip a line. // (2)
-%\end{verbatim}
+%\end{Verbatim}
% which then introduces a spurious space into the JavaScript code. The \cs{ckivspace} solves this
% problem, I hope. With the definition of \cs{r} given below, after expansion of the line (2)
% occurs, we have line (1), the space following the second \cs{r} gets absorbed. Note: (2014/05/20)
% I moved this to the main code thread of \textsf{insdljs}.
-% \changes{v2.0n}{2014/05/20}{Moved code for \cs{ckivspace} to main code thread of \textsf{insdljs}.}
+% \changes{v2.0n}{2014/05/20}{Moved code for \string\cs{ckivspace} to main code thread of \string\textsf{insdljs}.}
% \begin{macrocode}
%\def\ckivspace#1{\if\noexpand#1\space\else\expandafter#1\fi}
% \end{macrocode}
@@ -2763,15 +2782,17 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% Braces are a problem when they are unbalanced. In a regular expression, |\{| works properly, but |\\{| works
% for the distiller options but not otherwise. For example, if I wanted to replace every instance
% of \texttt{\{} with \texttt{(}, we can do this by
-%\begin{verbatim}
-% myString = myString.replace( /\{/, "\(");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%myString = myString.replace( /\{/, "\(");
+%\end{Verbatim}
% This works for all options, even though the braces are not balanced. However, when the constructor
% function is used, we must double-escape:
-%\begin{verbatim}
-% var re = new RegExp("\\{", "g");
-% myString = myString.replace( re, "\(");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%var re = new RegExp("\\{", "g");
+%myString = myString.replace( re, "\(");
+%\end{Verbatim}
% This works for the distiller options, but not for \texttt{pdftex/dvipdfm}. The reason |\{| works is that
% it is a control sequence, defined by the \cmd{\definebraces} command below. Where as |\\{| consists
% of the control sequence |\\|, which is defined below, followed by a left brace.
@@ -2789,16 +2810,18 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% unbalanced braces, one workaround is to balance out the left
% brace with a right brace in the form of a JavaScript comment.
% This ``fools'' \TeX! For example,
-%\begin{verbatim}
-% var re = new RegExp("\\{", "g"); // }
-% myString = myString.replace( re, "\(");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%var re = new RegExp("\\{", "g"); // }
+%myString = myString.replace( re, "\(");
+%\end{Verbatim}
% Finally, we have\par\medskip
% \noindent\textbf{The Recommended Workaround:} Use |\\\{| and |\\\}|, e.g.,
-%\begin{verbatim}
-% var re = new RegExp("\\\{", "g");
-% myString = myString.replace( re, "\(");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%var re = new RegExp("\\\{", "g");
+%myString = myString.replace( re, "\(");
+%\end{Verbatim}
% This is more verbose than needed, but it works for all options! These comments are only for regular expression
% strings within the constructor function. Note the replacement text, |\(|, is only escaped.
%
@@ -2815,39 +2838,44 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% once again \textsf{pdftex} and \textsf{dvipdfm} are causing (me) problems.
%
% No problems when the regular expression uses the literal string format
-%\begin{verbatim}
-% myString = myString.replace(/\(/g, "\[");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%myString = myString.replace(/\(/g, "\[");
+%\end{Verbatim}
% The above code works for all options. However, for the constructor function we have some problems
% in non-distiller options. If we type instead
-%\begin{verbatim}
-% var re = new RegExp("\\(", "g");
-% myString = myString.replace(re, "\[");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%var re = new RegExp("\\(", "g");
+%myString = myString.replace(re, "\[");
+%\end{Verbatim}
% The above code works for the distiller folks, but not for the
% others. In the case of \textsf{pdftex}, I cannot access the UI to
% the document level JavaScripts, and the script is undefined. I suspect
% the lack of balanced parentheses is the curprit. For example,
% consider the code
-%\begin{verbatim}
-% var re = new RegExp("\\(|\\)", "g");
-% myString = myString.replace(re, "\[");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%var re = new RegExp("\\(|\\)", "g");
+%myString = myString.replace(re, "\[");
+%\end{Verbatim}
% works. I can access the UI to the DLJS from Acrobat, and the script is defined. Another
% example, we can fool the JavaScript interpreter as we did the \TeX{} compiler:
-%\begin{verbatim}
-% var re = new RegExp("\\(", "g"); // )
-% myString = myString.replace(re, "\[");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%var re = new RegExp("\\(", "g"); // )
+%myString = myString.replace(re, "\[");
+%\end{Verbatim}
% Here I have placed a balancing right parenthesis as a JavaScript comment. Both sets of code
% work correctly.
%\par\medskip
%\noindent\texttt{Recommended Workaround:} As in the case of parentheses, a more verbose version
% of the script works of all options.
-%\begin{verbatim}
-% var re = new RegExp("\\\(", "g");
-% myString = myString.replace(re, "\[");
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\def\1{\quad}\catcode`\%=9}]
+%var re = new RegExp("\\\(", "g");
+%myString = myString.replace(re, "\[");
+%\end{Verbatim}
% This is only for the case of the constructor function.
% \begin{macrocode}
\def\({\eqesc\eqesci(}
@@ -2943,6 +2971,7 @@ var EFMergeChange=AFMergeChange;
% \begin{macrocode}
%<*package>
\inputAltAdbFncs
+\dl@restoreCats
%</package>
% \end{macrocode}
% \Finale
diff --git a/texmf-dist/source/latex/acrotex/web.dtx b/texmf-dist/source/latex/acrotex/web.dtx
index c143be3f..41dfdd4d 100644
--- a/texmf-dist/source/latex/acrotex/web.dtx
+++ b/texmf-dist/source/latex/acrotex/web.dtx
@@ -21,11 +21,14 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{web}
-%<package> [2021/02/06 v6.1.5 web: A Screen Design Package (dps)]
+%<package> [2021/05/06 v6.1.7 web: A Screen Design Package (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
\usepackage{fancyvrb}
+\makeatletter
+\let\@latex@warning@no@line\@gobble
+\makeatother
\gdef\darg#1{\texttt{\char123\relax#1\char125\relax}}
\def\CMD#1{\textbackslash#1}
\let\pkg\textsf
@@ -33,6 +36,8 @@
\let\env\texttt
\let\app\textsf
\let\uif\textsf
+\def\STRUT{\rule{0pt}{14pt}}
+\def\negSTRUT{\rule[-8pt]{0pt}{0pt}}
\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}}
\def\visispace{\symbol{32}}
\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
@@ -85,7 +90,7 @@
% \texttt{dvipdfm}, \texttt{dvipdfmx}, \texttt{xetex}, and \texttt{textures}.
%\par\medskip\noindent
% We introduce these two packages early. We use them to automatically
-% detect pdftex and xetex.
+% detect \app{pdf(la)tex} and \app{xe(la)tex}.
%\changes{v4.2k}{2012/06/18}{New requirement \string\textsf{ifpdf}}%
% \begin{macrocode}
\RequirePackage{ifpdf}[2006/02/20]
@@ -128,10 +133,10 @@
% Below is the original definition of \cs{web@set@paper}, this has now
% changed with \texttt{v4.2j} to accommodate \cs{addtoWebHeight} and
% \cs{addtoWebWidth}.
-%\begin{verbatim}
-% \def\web@set@paper{%
-% \special{papersize=\the\paperwidth,\the\paperheight}}%
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\def\web@set@paper{\special{papersize=\the\paperwidth,\the\paperheight}}%
+%\end{Verbatim}
% \changes{v4.2j}{2012/05/11}{In support of \string\cs{addtoWebHeight}, we introduce
% the pagesize special at the beginning of the document. Changes are in the
% \string\texttt{dvipsone} and \string\texttt{dvips} options only.}
@@ -179,10 +184,11 @@
\def\i@web@ddtoHyOpts{setpagesize=false}%
% \end{macrocode}
% The old definition of \cs{web@set@paper}
-%\begin{verbatim}
-% \def\web@set@paper{%
-% \special{papersize=\the\paperwidth,\the\paperheight}}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\def\web@set@paper{!%
+%!quad\special{papersize=\the\paperwidth,\the\paperheight}}
+%\end{Verbatim}
% New definitions (\texttt{v4.2j}). See comments for the \texttt{dvipsone} option.
% \begin{macrocode}
\let\web@set@paper\@empty
@@ -441,9 +447,13 @@
% \subsection{Miscellaneous Options}
%
% The \texttt{navibar}\IndexOpt{navibar} option places
-% a set of navigation buttons on footer.
+% a set of navigation buttons in footer. The \opt{navibar*}\IndexOpt{navibar*} places
+% the navigation buttons in footer if for screen, and does not place the navigation
+% buttons if for paper.
+% \changes{v6.1.7}{2021/05/06}{Added \opt{navibar*} option}
% \begin{macrocode}
\DeclareOptionX{navibar}{\web@navibartrue}
+\DeclareOptionX{navibar*}{\AtEndOfPackage{\ifeqforpaper\else\web@navibartrue\fi}}
% \end{macrocode}
% The \texttt{tight}\IndexOpt{tight} option reduces
% the vertical spaces around equations and verbatim environments. The \texttt{tight*}\IndexOpt{tight*}
@@ -877,9 +887,10 @@
% \end{macrocode}
% \subsection{Load Configuration File: web.cfg}
% Look for configuration file, \texttt{web.cfg}, for example
-%\begin{verbatim}
-% \ExecuteOptionsX{dvips}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\ExecuteOptionsX{dvips}
+%\end{Verbatim}
% sets \texttt{dvips} as the default driver.
% \begin{macro}{\minPanelWidth}
% This definition is moved here so a user can set the minimal
@@ -1026,7 +1037,7 @@
\expandafter\w@isHyLoaded\fi
\ifx\u@web@ddtoHySetup\@empty\else\edef\x{\noexpand\hypersetup
{\u@web@ddtoHySetup}}\expandafter\x\fi
-% \end{macrocode}
+% \end{macrocode}
% We declare that `The AcroTeX eDucation Bundle' is the pdf creator.
% \begin{macrocode}
\def\@pdfcreator{The AcroTeX eDucation Bundle}
@@ -1042,86 +1053,16 @@
\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}.
-% \begin{macrocode}
-\ifnum\@usetemplates=\@ne\relax
- \def\x{\RequirePackage{graphicx}}\expandafter\x\fi
-% \end{macrocode}
-% If the user specifies an option requiring templates, then we better
-% load \textsf{eso-pic}, which itself requires \textsf{everyshi} or \textsf{atbegshi}.
-% \begin{macrocode}
-\ifnum\@usetemplates=\@ne
- \RequirePackage{eso-pic}
-% \end{macrocode}
-% Here is a fix for \textsf{dvipdfm}. If using templates, then we need to
-% redefine the way we set the page size using \textsf{eso-pic}. We also need
-% to redefine the \textsf{eso-pic} macro \cs{@ShipoutPicture} so the order of
-% execution of \cs{ESO@HookI} \cs{ESO@HookII} are reversed. The paper
-% size special will be in the \cs{ESO@HookII} macro, it needs to
-% execute (once) before \cs{ESO@HookI} is executed.
-% \begin{macrocode}
- \ifnum\eq@drivernum=\tw@
- \def\web@set@paper{\AddToShipoutPicture*{%
- \special{papersize=\the\paperwidth,\the\paperheight}}}%
-% \end{macrocode}
-% We use some code from \textsf{hyperref} to set the page size.
-% \begin{macrocode}
- \AtBeginShipoutFirst{%
- \begingroup
- \@ifundefined{stockwidth}{%
- \ifx\special@paper\@empty
- \special{papersize=\the\paperwidth,\the\paperheight}\else
- \special{papersize=\special@paper}\fi
- }{%
- \ifdim\stockwidth=\z@\else
- \special{papersize=\the\stockwidth,\the\stockheight}\fi
- }%
- \endgroup
- }%
-% \end{macrocode}
-% \changes{v4.2d}{2009/11/22}{Modifications to use
-% new \string\textsf{eso-pic}}
-% \begin{macrocode}
- \@ifundefined{@ShipoutPicture}{}{%
-% \end{macrocode}
-% The new version of \textsf{eso-pic} does not define \cs{@ShipoutPicture}.
-% If \cs{@Ship\-out\-Pic\-ture} defined, so we use some of the old code.
-% \begin{macrocode}
- \renewcommand{\@ShipoutPicture}{%
- \bgroup
- \@tempswafalse%
- \ifx\ESO@HookI\@empty\else\@tempswatrue\fi%
- \ifx\ESO@HookII\@empty\else\@tempswatrue\fi%
- \if@tempswa%
- \@tempdima=1in\@tempdimb=-\@tempdima%
- \advance\@tempdimb\paperheight
- \@ifundefined{stockwidth}{}{%
- \advance\@tempdima+\trimedge%
- \advance\@tempdima+\paperwidth%
- \advance\@tempdima-\stockwidth%
- \if@twoside\ifodd\c@page\else%
- \advance\@tempdima-2\trimedge%
- \advance\@tempdima-\paperwidth%
- \advance\@tempdima+\stockwidth%
- \fi\fi\advance\@tempdimb+\trimtop
- }%
- \unitlength=1pt%
- \global\setbox\@cclv\vbox{%
- \vbox{\let\protect\relax
- \pictur@(0,0)%
- (\strip@pt\@tempdima,\strip@pt\@tempdimb)%
- \ESO@HookII\ESO@HookI\global\let\ESO@HookII\@empty%
- \endpicture}%
- \box\@cclv%
- }%
- \fi
- \egroup
- }% shipout
- }% ifundefined shipout
- \fi
-\fi
+% to do some graphical work, so we include \pkg{graphicx} and \pkg{eso-pic}
+% packages.
+% \changes{v6.1.6}{2021/02/28}{Removed legacy code concerning \pkg{everyshi}}
+% \begin{macrocode}
+\ifnum\@usetemplates=\@ne\def\x{%
+ \RequirePackage{graphicx}
+ \RequirePackage{eso-pic}}\expandafter\x\fi
% \end{macrocode}
-% A useful command for separating two arguments. Use in \texttt{webpro} section, and by \texttt{aeb\_pro} as well.
+% A useful command for separating two arguments.
+% Used in \texttt{webpro} section, and by \texttt{aeb\_pro} as well.
% \begin{macrocode}
\def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
\let\getargsii\getargs
@@ -1189,11 +1130,12 @@
\addtolength{\textheight}{-\@Topmargin}
\addtolength{\textheight}{-\@Bottommargin}
% \end{macrocode}
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!~$},codes={\catcode`\%=9}]
%\topmargin = \web@Topmargin - 1in
%\@Topmargin = \web@Topmargin + \headheight + \headsep
-% so \headsep = \@Topmargin - \headheight - \web@Topmargin (\topmargin)
-%\end{verbatim}
+%!textsf~so $\headsep = \@Topmargin - \headheight - \web@Topmargin (\topmargin)
+%\end{Verbatim}
% \begin{macrocode}
\setlength{\headsep}{\@Topmargin}
\addtolength\headsep{-\headheight}
@@ -1255,24 +1197,23 @@
% \texttt{Oversized Pages\_20x20.joboptions}. However, the page size the distiller uses can be set
% through the {\LaTeX} source file. For this purpose, we introduce the command
% \DescribeMacro\setPageDevice\cmd\setPageDevice. The optional first argument is the resolution
-% in dots per inch. The standard joboptions file has 600 as this value; the high quality and
+% in dots per inch. The standard job-options file has 600 as this value; the high quality and
% press quality have this parameter at 2400. The second and third parameters are the
% width and height, respectively, of the \textbf{/PageSize}. For greatest accuracy, the values of
% width and height should be entered in printers points (without dimensions). For example,
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\setPageDevice{1400}{1400}
-%\end{verbatim}
-% is preferred to
-%\begin{verbatim}
+%!STRUT!negSTRUT!textsf(is preferred to)
%\setPageDevice{20in}{20in}
-%\end{verbatim}
+%\end{Verbatim}
% \texttt{20in} gets converted to \texttt{1439.9965}. The conversion, if necessary, is done
% by \cs{@convLtoP}
%
% The command \cs{@convLtoP} is taken from the \textsf{graphics} package and is based on
% \cs{Gin@defaultbp}.
%
-% The commands seems only effect with the \textsf{dvipsone} driver.
+% The command is only needed with the \textsf{dvipsone} driver.
% \begin{macrocode}
\def\@convLtoP#1#2{\afterassignment
\@convLtoP@i\dimen@#2bp\relax{#1}{#2}}
@@ -1305,11 +1246,12 @@
% and \cs{paperheight} will be the default values set by the class, but take \cs{textwidth} to be
% the value of \#2. The second and third parameters are the width and height, respectively, as measured
% in printer points ($72\,\mbox{points} = 1\,\mbox{inch}$, or measures in the \texttt{bp} points of \TeX.)
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%Parameters:
-% #1 = \paperheight (height of the display screen to be created)
-% #2 = \paperwidth (width of the display screen to be created)
-%\end{verbatim}
+%!quad#1 = \paperheight (height of the display screen to be created)
+%!quad#2 = \paperwidth (width of the display screen to be created)
+%\end{Verbatim}
% \begin{macrocode}
\def\screensize#1#2{%
\def\webSaveSSDim{{#1}{#2}}%
@@ -1348,22 +1290,24 @@
% cannot be deformed to fit one of the standard designs. The solution is to
% create a screen size matching the graphic, then using that graphic as a template.
% Example usage,
-%\begin{verbatim}
-% \margins{1in}{1in}{24pt}{.25in}
-% \setScreensizeFromGraphic{acro_30}
-% \template{acro_30}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%!quad\margins{1in}{1in}{24pt}{.25in}
+%!quad\setScreensizeFromGraphic{acro_30}
+%!quad\template{acro_30}
+%\end{Verbatim}
% This command takes two arguments, the first is optional and is passed
% to the \cs{includegraphics} command, the second it the path to the file.
%
% It may become necessary with some graphics to use the
% \texttt{hiresbb} option for \cs{includegraphics}, both in
% \cs{setScreensizeFromGraphic} and \cs{template} like so,
-%\begin{verbatim}
-% \margins{1in}{1in}{24pt}{.25in}
-% \setScreensizeFromGraphic[hiresbb]{acro_30}
-% \template[hiresbb]{acro_30}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%!quad\margins{1in}{1in}{24pt}{.25in}
+%!quad\setScreensizeFromGraphic[hiresbb]{acro_30}
+%!quad\template[hiresbb]{acro_30}
+%\end{Verbatim}
% \changes{v4.0f}{2007/06/11}
% {
% This command measures the dimensions of an EPS file, and sets the
@@ -1454,7 +1398,8 @@
% \subsubsection{\texorpdfstring{\protect\cs{margins}}{\CMD{margins}}}
% \begin{macro}{\margins}
% Sets the left, right, top and bottom margins.
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%Parameters:
% [#1] = width of panel to be used if a panel option
% is specified (default is 1in)
@@ -1462,7 +1407,7 @@
% #3 = right margin
% #4 = top margin
% #5 = bottom margin
-%\end{verbatim}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand{\@margins}[5][\web@minpanelwidth]{%
\def\webSaveMargDim{[#1]{#2}{#3}{#4}{#5}}%
@@ -1489,9 +1434,10 @@
% |\addtoWebWidth| and |\addtoWebHeight|, this command readjusts
% the margins. Within the arguments \cs{incby}
% refer to the current dimension.
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\resetsmargins{\incby+.25in}{\incby+.25in}{}{}
-%\end{verbatim}
+%\end{Verbatim}
% This line adds .25in to each of the side margins.
% \begin{macrocode}
\newcommand\get@MargDim[5][]{%
@@ -2228,7 +2174,8 @@
% \begin{macro}{\@newNaviIconMenu}
% This command uses the hyperref command \cs{Acrobatmenu} to create navigation link button. The
% action for this type is restricted to named menu actions.
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%Parameters
% [#1] = optional parameter for setting the highlight, N (none),
% I (invert, the default), O (outline), P (push, also called Inset)
@@ -2237,7 +2184,7 @@
% #4 = height of icon
% #5 = text to appear in the center of the icon.
% #6 = named menu action, e.g., NextPage, PrevPage, etc.
-%\end{verbatim}
+%\end{Verbatim}
% The color of the text is controlled by \cs{navibarTextColor}, and the background color
% is determined by \cs{@menuBgColor}.
% \begin{macrocode}
@@ -2255,7 +2202,8 @@
% \end{macro}
% \begin{macro}{\@newNaviIconJS}
% Another navigation icon/button, but this one allows for arbitrary JavaScript actions.
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%Parameters
% [#1] = optional parameter for setting the highlight, N (none),
% I (invert, the default) O (outline), P (push, also called Inset)
@@ -2264,7 +2212,7 @@
% #4 = height of icon
% #5 = text to appear in the center of the icon.
% #6 = JavaScript commands to be executed when the button is clicked.
-%\end{verbatim}
+%\end{Verbatim}
% The color of the text is controlled by \cs{navibarTextColor}, and the background color
% is determined by \cs{@menuBgColor}.
% \begin{macrocode}
@@ -2309,7 +2257,8 @@
% \end{macrocode}
% \end{macro}
% Another navigation icon/button, this one allows jumping to a named destination.
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%Parameters
% [#1] = optional parameter for setting the highlight, N (none),
% I (invert, the default), O (outline), P (push, also called Inset)
@@ -2318,12 +2267,13 @@
% #4 = height of icon
% #5 = text to appear in the center of the icon.
% #6 = \hyperlink or \href with its first argument
-%\end{verbatim}
+%\end{Verbatim}
% For example,
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\newNaviIcon[l]{\Home}{40pt}{15pt}{\footnotesize Home}
% {\href{http://www.math.uakron.edu/}}
-%\end{verbatim}
+%\end{Verbatim}
% The color of the text is controlled by \cs{navibarTextColor}, and the background color
% is determined by \cs{@menuBgColor}.
% \begin{macrocode}
@@ -2519,9 +2469,10 @@
% \begin{macro}{\ArrowUp}
% \begin{macro}{\ArrowDown}
% Pre-Fab Rule Icons \cs{Uparrow} and \cs{Downarrow}, for example,
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\insertnaviiconhere{\ArrowUp{\href{http://www.adobe.com/}}}
-%\end{verbatim}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand\ArrowUp[1]{%
\normalsize\ifeqforpaper
@@ -3134,11 +3085,12 @@
\begingroup
% \end{macrocode}
% Sample line from .aux
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
% \contentsline {section}{\numberline {1}Introduction}{4}{section.1}
% \contentsline {section}{\numberline {}References}{56}{section*.1}
% #1 #2 #3
-%\end{verbatim}
+%\end{Verbatim}
% \begin{macrocode}
\global\let\isChapter\web@NO
\parskip0pt\parindent\toc@indent\relax
@@ -3284,9 +3236,10 @@
% is optional. Use any of the \emph{boolean keys} of the
% \cs{includegraphics} command. Do not use the \texttt{width} or
% \texttt{height} keys in this optional argument. For example,
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
% \template[hiresbb]{myBG}
-%\end{verbatim}
+%\end{Verbatim}
% Causes the driver to import the graphic using the high resolution bounding
% box.
% It is assumed that a graphic defined by \cs{template} is intended to fill the entire
@@ -4015,8 +3968,9 @@
% in the \texttt{web} package. This command should appear in the preamble.
%
%\medskip\noindent Example usage:
-%\begin{verbatim}
-%\DeclareDocInfo{%
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+%\DeclareDocInfo{!%
% title=My First Presentation,
% author=D. P. Speaker,
% university=My University,
@@ -4025,7 +3979,7 @@
% talksite=The Talking University,
% subject=The Art of Talking
%}
-%\end{verbatim}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand{\DeclareDocInfo}[1]{\setkeys{aebDocInfo}{#1}%
\ifx\web@talkdate@value\@empty\else\let\webversion\webtalkdate\fi}
@@ -4115,15 +4069,16 @@
% ignored when the \texttt{forpaper} option is in effect.
%
%\medskip\noindent Example usage:
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\DeclarePageLayout
-%{%
+%{!%
% screensizeOf=designv,
% margins={.75in}{.75in}{.75in}{.75in},
% topmargin=40pt,
% webfootskip=30pt
%}
-%\end{verbatim}
+%\end{Verbatim}
% This sets the \texttt{\texttt{screensize}} to the same as the
% \texttt{screensize} of \texttt{designv}. We then adjust the
% margins, the \texttt{topmargin} key is used to position the running
@@ -5253,9 +5208,10 @@
% The \cs{selectColors} is a convenience command for setting
% many of the colors involved in the design of an \textsf{APB} document.
% The default colors are \dots
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\selectColors
-%{
+%{!%
% universityColor = blue,
% titleColor = black,
% authorColor = black,
@@ -5266,7 +5222,7 @@
% linkColor = webgreen,
% fileColor = webbrown
%}
-%\end{verbatim}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand{\selectColors}[1]{\setkeys{aebcolordesign}{#1}}
% \end{macrocode}
@@ -5302,14 +5258,15 @@
% \begin{macro}{\selectTocDings}
% This is an \textsf{xkeyval} interface to setting the dings used by
% the structured lists and the table of contents. Usage:
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
%\selectTocDings
-%{
+%{!%
% dDing=\ding{082},
% ddDing=\ding{079},
% dddDing=\ding{254}
%}
-%\end{verbatim}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand{\selectTocDings}[1]{\setkeys{aebDings}{#1}}
% \end{macrocode}
@@ -5332,10 +5289,8 @@
% comment environments one \texttt{forpaper} and another for
% \texttt{forscreen}.
% \begin{macrocode}
- \includecomment{forpaper}\excludecomment{forscreen}
-\else
- \includecomment{forscreen}\excludecomment{forpaper}
-\fi
+ \includecomment{forpaper}\excludecomment{forscreen}\else
+ \includecomment{forscreen}\excludecomment{forpaper}\fi
% \end{macrocode}
% \end{environment}
% \end{environment}
diff --git a/texmf-dist/tex/latex/acrotex/aebjs.def b/texmf-dist/tex/latex/acrotex/aebjs.def
index 0d642bb6..a0fb5916 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}
- [2021/02/17 v8.6.4 %
+ [2021/05/10 v8.7.7 %
Exerquiz document level JavaScript (dps)]
\def\aeb@array{new Array}
\def\refac#1{\\(#1\\)}\def\regrp#1{(#1)}\def\rechrclass#1{[#1]}
@@ -189,9 +189,7 @@ function DisplayAnswer(fieldname,theanswer)
var oQName = new Object;
var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
?\defaultColorJS:oQName.DefaultColorJSLoc;
- try {
- this.getField(fieldname).value=(theanswer);
- } catch(e) {}
+ try { this.getField(fieldname).value=(theanswer); } catch(e) {}
ProcessIt = true;
}
function EvalCorrAnsButton(fieldname,theanswer)
@@ -287,7 +285,7 @@ function ParseInput(UserInput)
UserInput=UserInput.replace(re,"E+$1");
re=/(\d)\*E/g;
UserInput=UserInput.replace(re,"$1E");
- if(!Ckfuncs(UserInput)) return false;
+ if(!Ckfuncs(UserInput)) return false;
if (typeof(Ck4Exponents) != "undefined")
UserInput = Ck4Exponents(UserInput);
if (typeof(Ck4Products) != "undefined" )
@@ -363,8 +361,7 @@ function ParseInput(UserInput)
{
eqAppAlert(\eqerrBadExp,3);
return false;
- }
- else {
+ } else {
UserInput=addMathObject(UserInput);
return UserInput;
}
@@ -501,8 +498,8 @@ function processSpecialParse(oParse,UserAns) {
retn=_o(UserAns);
if (retn==null) return retn;
} else {
- retn=_o[0].apply(null, [ UserAns ].concat(_o.slice(1)));
- if (retn==null) return null;
+ retn=_o[0].apply(null, [ UserAns ].concat(_o.slice(1)));
+ if (retn==null) return null;
}
}
} else {
@@ -540,6 +537,11 @@ CorrAns,userAns,comp)
}
return true;
}
+var ckDZRe=/\b([^0-9]*)(\d*)\./g;
+function ckDZReRepl(match,a,b,offset,string){
+ if (b[0]!="0") return match;
+ else return util.printf(a+"\%d.",b);
+}
function diffCompare(_a,_c,_v,_F,_G) {
var aXY = _c.split(",");
var _V = _v.split(","); // e.g. _V[0] = "i:x"
@@ -555,6 +557,7 @@ function diffCompare(_a,_c,_v,_F,_G) {
if ( app.viewerVersion >= 5)
{
var rtnCode = 0;
+ _G=_G.replace(ckDZRe,ckDZReRepl);
eval("try {if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+"catch (e) { rtnCode=1; }");
switch(rtnCode)
@@ -574,16 +577,17 @@ function reldiffCompare(_a,_c,_v,_F,_G) {
var _n = aXY.length
for (var _i=0; _i < _n; _i++)
{
- if (_V[_i].charAt(0) == "r" )
- eval ("var "+_V[_i].charAt(2)+"="+aXY[_i]+";");
- else // assume type "i"
- eval ("var "+_V[_i].charAt(2)+"="+Math.ceil(aXY[_i])+";");
+ if (_V[_i].charAt(0) == "r" )
+ eval ("var "+_V[_i].charAt(2)+"="+aXY[_i]+";");
+ else // assume type "i"
+ eval ("var "+_V[_i].charAt(2)+"="+Math.ceil(aXY[_i])+";");
}
_F = eval(_F);
if ( app.viewerVersion >= 5)
{
var rtnCode = 0;
- eval("try { if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+ _G=_G.replace(ckDZRe,ckDZReRepl);
+ eval("try {if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+"catch (e) { rtnCode=1; }");
switch(rtnCode)
{
@@ -835,20 +839,24 @@ function ProcUserResp(key,userresp,probno,notify)
function ProcUserNoResp(key,userresp,probno,notify)
{
if ( arguments.length > 4 ) {
- RightWrong[probno][arguments[4]] = undefined;
- Responses[probno][arguments[4]] = undefined;
+ try{
+ RightWrong[probno][arguments[4]] = undefined;
+ Responses[probno][arguments[4]] = undefined;
+ } catch(e){};
var bVoidArray=true;
- for (var i=0; i<Responses[probno].length; i++) {
- if ( typeof Responses[probno][i] != "undefined") {
- bVoidArray=false;
- break;
- }
- }
-if (bVoidArray) {
-Responses[probno]=undefined;
-RightWrong[probno]=undefined;
+ try {
+ for (var i=0; i<Responses[probno].length; i++) {
+ if ( typeof Responses[probno][i] != "undefined") {
+ bVoidArray=false;
+ break;
+ }
+ }
+ } catch(e){};
+ if (bVoidArray) {
+ Responses[probno]=undefined;
+ RightWrong[probno]=undefined;
ProbValue[probno]=undefined;
-}
+ }
} else {
RightWrong[probno] = undefined;
Responses[probno] = undefined;
diff --git a/texmf-dist/tex/latex/acrotex/aebrandom.def b/texmf-dist/tex/latex/acrotex/aebrandom.def
index 114da934..f648e885 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}
- [2021/02/17 v8.6.4 %
+ [2021/05/10 v8.7.7 %
Exerquiz support for randomization (dps)]
\@ifundefined{nextrandom}{\input{random.tex}}{}
\def\nextrandom{\begingroup
diff --git a/texmf-dist/tex/latex/acrotex/aebsumrytbls.def b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
index 56ad6489..c4213d4d 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}
- [2021/02/17 v8.6.4 %
+ [2021/05/10 v8.7.7 %
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/dljslib.sty b/texmf-dist/tex/latex/acrotex/dljslib.sty
index bad34c8f..3276d53b 100644
--- a/texmf-dist/tex/latex/acrotex/dljslib.sty
+++ b/texmf-dist/tex/latex/acrotex/dljslib.sty
@@ -8,7 +8,7 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% dljsLib.sty package, %%
-%% Copyright (C) 2001-2018 D. P. Story %%
+%% Copyright (C) 2001-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -19,7 +19,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{dljslib}
- [2017/08/11 v2.1 Manage a Library of Document Level JavaScripts (dps)]
+ [2021/04/04 v2.2 Manage a Library of Document Level JavaScripts (dps)]
\newcommand\dljsRegister[2][n]
{\expandafter\let\csname checkout@#2\endcsname=#1}
\def\@ifcheckedout#1{\expandafter\if\csname checkout@#1\endcsname y}
@@ -36,12 +36,14 @@
\DeclareAndRegister{combinatorics}
\DeclareAndRegister{setSupport}
\DeclareOption{unordered}{\PackageWarning{dljslib}
- {The `unordered' option is now combined with the\MessageBreak
- `setSupport' option, will use the `setSupport' option\MessageBreak
- instead}\ExecuteOptions{setSupport}}
+ {The `unordered' option is now combined with the\MessageBreak
+ `setSupport' option, will use the `setSupport' option\MessageBreak
+ instead}\ExecuteOptions{setSupport}}
\DeclareAndRegister{complex}
\DeclareAndRegister{satisfyEq}
\DeclareAndRegister{useGermanNums}
+\DeclareOption{useDeNums}{\ExecuteOptions{useGermanNums}}
+\DeclareAndRegister{useEnNums}
\DeclareAndRegister{factors}
\DeclareAndRegister{point}
\DeclareAndRegister{intervals}
@@ -63,6 +65,8 @@
\let\dljs@verbatim\comment
\let\enddljs@verbatim\endcomment\fi\dljs@verbatim
}{\enddljs@verbatim}
+\newcommand{\SyntaxErrorAuthor}{"Syntax error in author's answer!
+ Check console."}
\begin{library@holding}{dljslib}
\begin{insDLJS*}[dljslib]{dljslib}
\begin{newsegment}{dljslib: AcroTeX DLJS Library}
@@ -119,17 +123,17 @@ function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
}
zCorrAns = ParseInput(zCorrAns);
if (!ok2Continue) {
- eqAppAlert("Syntax error in author's answer! Check console.", 3);
+ eqAppAlert(\SyntaxErrorAuthor,3);
console.println("Syntax Error: " + CorrAns);
return null;
}
zUserAns = ParseInput(zUserAns);
if (!ok2Continue) return null;
indepVars = TypeParameters(indepVars);
- var lambda = getNonZeroRatio (domain, indepVars, zCorrAns, zUserAns);
+ var lambda = getNonZeroRatio(domain,indepVars,zCorrAns,zUserAns);
if ( lambda == null ) {
eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; };
- if ( !ok2Continue ) return notifyField(false, flag, fieldname);
+ if ( !ok2Continue ) return notifyField(false,flag,fieldname);
zCorrAns = lambda + "*(" + zCorrAns + ")";
success=randomPointCompare (n,domain,indepVars,epsilon,
zCorrAns,zUserAns,comp)
@@ -260,7 +264,7 @@ typeof oComp.priorParse != "undefined" ) {
for (i=0; i<aCorrAns.length; i++) {
aCorrAns[i] = ParseInput(aCorrAns[i]);
if (!ok2Continue) {
- eqAppAlert("Author Syntax error!", 3);
+ eqAppAlert(\SyntaxErrorAuthor, 3);
return null;
}
aUserAns[i] = ParseInput(aUserAns[i]);
@@ -867,18 +871,41 @@ isCorrect *=Number(success);
\end{newsegment}
\end{library@holding}
\@ifcheckedout{useGermanNums}
-\newcommand{\noDecPtGerMsg}{"A period (.) is not allowed in answer,
- use German notation for numbers"}
+ \dlJSStr[noquotes]{\noDecPtDeMsg}{%
+ "German Notation Syntax Error: A point (.) was found
+ in your response \"" + UserAns + "\".
+ Please remove the point, or this answer will be marked as wrong."}
+ \flJSStr*[noquotes]{\MsgDei}{"German decimal notation is expected,
+for example: 12,3456."}
+ \flJSStr*[noquotes]{\MsgDeiAlt}{"German decimal notation is expected,
+for example: 12,3456." +((warnDecDeOnly)?"\n\n
+The English decimal notation (12.2345) is also accepted,
+however.":"")}
+ \flJSStr*[noquotes]{\MsgDeii}{"A decimal number is required,
+rounded to two decimal places, for example: 12,34"}
+ \def\warnDecDeOnlyOn{\def\warnDecDeOnly{true}}
+ \def\warnDefDeOnlyOff{\def\warnDecDeOnly{false}}
+ \warnDefDeOnlyOff
+ \def\numDe#1{{priorParse:\Array(%
+ \preReqForm(/\rebstr\rechrclass{+-}?\redigit*,?%
+ \redigit*\reestr/,(#1)))}}
+ \def\rndNumDeReq#1#2{{priorParse:\Array(%
+ \preReqForm(/\rebstr\rechrclass{+-}?\redigit*,%
+ \redigit{#1}\reestr/,(#2)))}}
+ \def\rndNumDeOpt#1#2{{priorParse:\Array(% at most two decimal places
+ \preReqForm(/\rebstr\rechrclass{+-}?%
+ \redigit*,?\redigit{0,#1}\reestr/,(#2)))}}
\fi
\begin{library@holding}{useGermanNums}
\begin{newsegment}
{dljslib: Support for process numbers in the German format}
+var warnDecDeOnly=\warnDecDeOnly;
function ProcRespNumsDe (flag,CorrAns,n,epsilon,%
domain,indepVars,oComp) {
if (!ProcessIt) return null;
ok2Continue = true;
var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
+ var bSubstVars=(arguments.length>7);
var UserAns=(bSubstVars)?arguments[7]:event.value;
var success = _ProcRespNumsDe(flag,CorrAns,UserAns,n,%
epsilon,domain,indepVars,oComp);
@@ -891,14 +918,14 @@ domain,indepVars,oComp) {
ok2Continue = true;
CorrAns = ParseInput(CorrAns);
if (!ok2Continue) {
- eqAppAlert("Syntax error in author's answer! Check console.", 3);
+ eqAppAlert(\SyntaxErrorAuthor,3);
return null;
}
var UserAnsSave=UserAns;
var reDe=/,/g;
var reDec=/\./g;
- if ( reDec.test(UserAns) ) {
- eqAppAlert(\noDecPtGerMsg,3);
+ if ( (!warnDecDeOnly) && (reDec.test(UserAns)) ) {
+ eqAppAlert(\noDecPtDeMsg,3);
return -1;
}
UserAns=UserAns.replace(reDe,".");
@@ -908,12 +935,7 @@ domain,indepVars,oComp) {
if ( (typeof(oComp)=="object") %
&& (typeof(oComp.priorParse)!="undefined") ) {
var retn=processSpecialParse(oComp.priorParse,UserAnsSave);
- if (retn==null) return -1;
- }
- var reComma=/,/;
- if ( reComma.test(UserAns) ) {
- eqAppAlert(\eqSyntaxErrorComma,3);
- return -1;
+ if ( (!warnDecDeOnly) && (retn==null) ) return -1;
}
UserAns = ParseInput(UserAns);
indepVars = TypeParameters(indepVars);
@@ -927,6 +949,25 @@ epsilon,CorrAns,UserAns,comp);
}
\end{newsegment}
\end{library@holding}
+\@ifcheckedout{useEnNums}
+ \dlJSStr[noquotes]{\noDecPtEnMsg}{%
+ "Syntax Error: A comma (,) was found
+ in your response \"" + UserAns + "\".
+ Please remove the comma, or this answer will be marked as wrong."}
+ \flJSStr*[noquotes]{\MsgEni}{"English decimal notation is expected,
+for example: 12.3456."}
+ \flJSStr*[noquotes]{\MsgEnii}{"A decimal number is required,
+rounded to two decimal places, for example: 12.34"}
+ \def\numEn#1{{priorParse:\Array(%
+ \preReqForm(/\rebstr\rechrclass{+-}?\redigit*\\.?%
+ \redigit*\reestr/,(#1)))}}
+ \def\rndNumEnReq#1#2{{priorParse:\Array(%
+ \preReqForm(/\rebstr\rechrclass{+-}?\redigit*\\.%
+ \redigit{#1}\reestr/,(#2)))}}
+ \def\rndNumEnOpt#1#2{{priorParse:\Array(% at most two decimal places
+ \preReqForm(/\rebstr\rechrclass{+-}?%
+ \redigit*\\.?\redigit{0,#1}\reestr/,(#2)))}}
+\fi
\begin{library@holding}{unordered}
\begin{newsegment}{dljslib: Contrib - Processing Unordered Responses}
/*
@@ -1146,7 +1187,7 @@ function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
for (i=0; i<aCorrAns.length; i++) {
aCorrAns[i] = ParseInput(aCorrAns[i]);
if (!ok2Continue) {
- eqAppAlert("Author Syntax error!", 3);
+ eqAppAlert(\SyntaxErrorAuthor, 3);
return null;
}
aUserAns[i] = ParseInput(aUserAns[i]);
@@ -1167,7 +1208,8 @@ function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
\end{library@holding}
\begin{library@holding}{intervals}
\begin{newsegment}{dljslib: Contrib - Processing Interval Responses}
-function ProcRespIntervals(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+function ProcRespIntervals(flag,CorrAns,n,epsilon,domain,%
+indepVars,oComp)
{
ok2Continue = true;
if (!ProcessIt) return null;
@@ -1444,57 +1486,56 @@ function NoExpAllowed (UserAns) {
}
function NoTrigAllowed (UserAns)
{
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- var aTrigfuncs = new Array
- ( "acos","asin","atan","cos", "sin", "tan","sec","csc","cot",
- "arcsin", "arccos", "arctan"
- );
- var re, regexp;
- re = /[a-zA-Z]{2,}/g;
- aF = UserAns.match(re);
- if ( aF != null ) {
- for (var i=0; i < aF.length; i++)
- {
- for(var j=0; j < aTrigfuncs.length; j++) {
- if ( aF[i].indexOf(aTrigfuncs[j]) != -1 )
- return eqAppAlert(\NoTrigAllowedErrorMsg,3), null;
- }
- }
- }
- return true;
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ var aTrigfuncs = new Array
+ ( "acos","asin","atan","cos", "sin", "tan","sec","csc","cot",
+ "arcsin", "arccos", "arctan"
+ );
+ var re, regexp;
+ re = /[a-zA-Z]{2,}/g;
+ aF = UserAns.match(re);
+ if ( aF != null ) {
+ for (var i=0; i < aF.length; i++) {
+ for(var j=0; j < aTrigfuncs.length; j++) {
+ if ( aF[i].indexOf(aTrigfuncs[j]) != -1 )
+ return eqAppAlert(\NoTrigAllowedErrorMsg,3), null;
+ }
+ }
+ }
+ return true;
}
function NoPiAllowed(UserAns)
{
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- var re=/PI|pi/;
- if ( re.test(UserAns) )
- return eqAppAlert(\NoPiAllowedErrorMsg,3), null;
- return true;
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ var re=/PI|pi/;
+ if ( re.test(UserAns) )
+ return eqAppAlert(\NoPiAllowedErrorMsg,3), null;
+ return true;
}
function NoTrigLogAllowed (UserAns)
{
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- var aTrigfuncs = new Array
- ( "acos","asin","atan","cos", "sin",
- "tan","sec","csc","cot", "arcsin", "arccos", "arctan",
- "logc","log", "ln"
- );
- var re, regexp;
- re = /[a-zA-Z]{2,}/g;
- aF = UserAns.match(re);
- if ( aF != null ) {
- for (var i=0; i < aF.length; i++)
- {
- for(var j=0; j < aTrigfuncs.length; j++) {
- if ( aF[i].indexOf(aTrigfuncs[j]) != -1 )
- return eqAppAlert(\NoTrigLogAllowedErrorMsg,3), null;
- }
- }
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ var aTrigfuncs = new Array
+ ( "acos","asin","atan","cos", "sin",
+ "tan","sec","csc","cot", "arcsin", "arccos", "arctan",
+ "logc","log", "ln"
+ );
+ var re, regexp;
+ re = /[a-zA-Z]{2,}/g;
+ aF = UserAns.match(re);
+ if ( aF != null ) {
+ for (var i=0; i < aF.length; i++)
+ {
+ for(var j=0; j < aTrigfuncs.length; j++) {
+ if ( aF[i].indexOf(aTrigfuncs[j]) != -1 )
+ return eqAppAlert(\NoTrigLogAllowedErrorMsg,3), null;
+ }
}
- return true;
+ }
+ return true;
}
var bAllowWrngNormSciNotn=false;
var bItsNormSciNot=false;
diff --git a/texmf-dist/tex/latex/acrotex/edvipdfm.def b/texmf-dist/tex/latex/acrotex/edvipdfm.def
index 7ed8ef58..13b4ee3c 100644
--- a/texmf-dist/tex/latex/acrotex/edvipdfm.def
+++ b/texmf-dist/tex/latex/acrotex/edvipdfm.def
@@ -8,7 +8,7 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% eForms package, %%
-%% Copyright (C) 2002-2020 D. P. Story %%
+%% Copyright (C) 2002-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
diff --git a/texmf-dist/tex/latex/acrotex/eforms.sty b/texmf-dist/tex/latex/acrotex/eforms.sty
index bc67416c..4ecc7cb2 100644
--- a/texmf-dist/tex/latex/acrotex/eforms.sty
+++ b/texmf-dist/tex/latex/acrotex/eforms.sty
@@ -8,7 +8,7 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% eForms package, %%
-%% Copyright (C) 2002-2020 D. P. Story %%
+%% Copyright (C) 2002-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -19,7 +19,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{eforms}
- [2020/12/14 v2.4.1 Provides general eforms support (dps)]
+ [2021/05/10 v2.4.3 Provides general eforms support (dps)]
\RequirePackage{ifpdf}[2006/02/20]
\RequirePackage{ifxetex}[2006/08/21]
\RequirePackage{ifluatex}
@@ -115,7 +115,7 @@
\@makeother\$\relax
\newlength\eflength
\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
-\ifpdf\else\ifnum\eq@drivernum=2\relax\else\pdfmarkuptrue\fi\fi
+\ifpdf\else\ifnum\eq@drivernum=\tw@\else\pdfmarkuptrue\fi\fi
\RequirePackage{hyperref}
\ifnum\eq@drivernum=2\relax
\else
@@ -140,11 +140,11 @@
\let\ef@YES=y \let\ef@NO=n
\let\ef@One=1 \let\ef@Zero=0
\ifnum\eq@drivername<2\relax
-\let\to@usepdfmark\ef@One
-\RequirePackage[structure]{taborder}\else
-\let\to@usepdfmark\ef@Zero
-\RequirePackage{taborder}
-\fi
+ \let\to@usepdfmark\ef@One
+ \def\reqPkg{\RequirePackage[structure]{taborder}}\else
+ \let\to@usepdfmark\ef@Zero
+ \def\reqPkg{\RequirePackage{taborder}}\fi
+\reqPkg
\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
\@ifundefined{eq@tmpbox}{\newsavebox{\eq@tmpbox}}{}
\@ifundefined{eq@tmpdima}{\newdimen\eq@tmpdima}{}
@@ -185,6 +185,12 @@
\def\efsavei#1\as#2{\global\let#2#1\egroup}
\def\efrestore{\bgroup\let\from\relax\makeatletter\efrestorei}
\def\efrestorei#1\from#2{\global\let#1#2\egroup}
+\def\txtRef#1{\@ifundefined{r@#1}
+ {??}{\aeb@exiii\@firstoffive\csname r@#1\endcsname}}
+\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start}
+ {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}}
+\def\aeb@exiii{\expandafter\expandafter\expandafter}
+\def\noexpandiii{\noexpand\noexpand\noexpand}
\let\ef@passedArgs\@empty
\def\processAppArgs#1#2{%
\ifx\end#1% if #1=\end, #2=\@nil.
diff --git a/texmf-dist/tex/latex/acrotex/epdfmark.def b/texmf-dist/tex/latex/acrotex/epdfmark.def
index e6313949..663fce75 100644
--- a/texmf-dist/tex/latex/acrotex/epdfmark.def
+++ b/texmf-dist/tex/latex/acrotex/epdfmark.def
@@ -8,7 +8,7 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% eForms package, %%
-%% Copyright (C) 2002-2020 D. P. Story %%
+%% Copyright (C) 2002-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
diff --git a/texmf-dist/tex/latex/acrotex/epdftex.def b/texmf-dist/tex/latex/acrotex/epdftex.def
index a2a9a1dc..59e39bfa 100644
--- a/texmf-dist/tex/latex/acrotex/epdftex.def
+++ b/texmf-dist/tex/latex/acrotex/epdftex.def
@@ -8,7 +8,7 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% eForms package, %%
-%% Copyright (C) 2002-2020 D. P. Story %%
+%% Copyright (C) 2002-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
diff --git a/texmf-dist/tex/latex/acrotex/exerquiz.sty b/texmf-dist/tex/latex/acrotex/exerquiz.sty
index 7e46009c..2815e490 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}
- [2021/02/17 v8.6.4 %
+ [2021/05/10 v8.7.7 %
Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
\usepackage{keyval}
\RequirePackage{ifpdf}[2006/02/20]
@@ -33,11 +33,9 @@
\DeclareOption{noxcolor}{\def\eq@ColorPackage{color}}
\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}}
+\DeclareOption{forcolorpaper}{\eqforpapertrue
+ \AtBeginDocument{\AllowPeeking}}
\DeclareOption{preview}{\PassOptionsToPackage{preview}{eforms}}
\DeclareOption{nosolutions}{\eq@nosolutionstrue\eq@nolinktrue}
\DeclareOption{noquizsolutions}{\eq@noquizsolutionstrue\eq@nolinktrue}
@@ -48,58 +46,64 @@
\let\eq@online\eq@NO
\DeclareOption{nohiddensolutions}{\eq@globalshowsolutionstrue}
\DeclareOption{noHiddensolutions}%
- {\eq@globalshowsolutionstrue\AtBeginDocument{\def\Hidesymbol{h}}}
+ {\eq@globalshowsolutionstrue\AtBeginDocument{\def\Hidesymbol{h}}}
\DeclareOption{solutionsafter}{\eq@solutionsaftertrue\eq@nolinktrue}
\DeclareOption{solutionsonly}{\solutionsonlytrue\answerkeytrue
- \therearesolutionstrue\AtEndOfPackage{\let\exerSolnsHeadnToc\relax}}
+ \therearesolutionstrue\AtEndOfPackage{\let\exerSolnsHeadnToc\relax}}
\newif\ifsolutionsonly\solutionsonlyfalse
\@ifundefined{ifanswerkey}{\newif\ifanswerkey\answerkeyfalse}{}
\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}}
\DeclareOption{nocorrections}{\nocorrectionstrue}
\DeclareOption{proofing}{\eq@proofingtrue}
\newif\ifaebshowgrayletters\aebshowgraylettersfalse
\DeclareOption{showgrayletters}{\aebshowgrayletterstrue}
\@ifundefined{ifvspacewithsolns}{%
- \DeclareOption{vspacewithsolns}{\vspacewithsolnstrue}
- \newif\ifvspacewithsolns\vspacewithsolnsfalse
+ \DeclareOption{vspacewithsolns}{\vspacewithsolnstrue}
+ \newif\ifvspacewithsolns\vspacewithsolnsfalse
}{}
\@ifundefined{ifdisplayworkarea}{\newif\ifdisplayworkarea
\displayworkareafalse}{}
\providecommand\displayworkareaOn{\displayworkareatrue}
\providecommand\displayworkareaOff{\displayworkareafalse}
\DeclareOption{nodljs}{\PassOptionsToPackage{nodljs}{insdljs}%
- \AtEndOfPackage{\let\importdljs\eq@YES}}
+ \AtEndOfPackage{\let\importdljs\eq@YES}}
\DeclareOption{execJS}{\PassOptionsToPackage{execJS}{insdljs}}
+\DeclareOption{usealtadobe}{\PassOptionsToPackage{usealtadobe}{insdljs}}
\DeclareOption{exercisesonly}{\PassOptionsToPackage{nodljs}{insdljs}}
\DeclareOption{debug}{\PassOptionsToPackage{debug}{insdljs}}
\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}}
\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
\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
\newif\ifwithinMCFI\withinMCFIfalse
+\DeclareOption{userbmintrvl}{%
+ \def\inputRBMICode{\InputIfFileExists{rbmintrvl.def}
+ {\PackageInfo{exerquiz}{Inputting rbmintrvl.def}}%
+ {cannot find rbmintrvl.def}}}
+\let\inputRBMICode\relax
\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}%
@@ -107,32 +111,35 @@
\PassOptionsToPackage{pdftex}{eforms}
}
\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}
}
\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}%
-}
-\DeclareOption{textures}{\def\eq@drivernum{3}%
- \def\eq@driver{textures}%
- \PassOptionsToPackage{textures}{\eq@ColorPackage}%
- \PassOptionsToPackage{textures}{eforms}%
-}
-\DeclareOption{dviwindo}{\def\eq@drivernum{4}\def\eq@driver{dviwindo}%
- \eq@noformstrue\PassOptionsToPackage{nodljs}{insdljs}}
+ \PassOptionsToPackage{xetex}{eforms}
+}
+\DeclareOption{textures}{\def\eq@drivernum{3}
+ \def\eq@driver{textures}
+ \PassOptionsToPackage{textures}{\eq@ColorPackage}
+ \PassOptionsToPackage{textures}{eforms}
+}
+\DeclareOption{dviwindo}{\def\eq@drivernum{4}\def\eq@driver{dviwindo}
+ \eq@noformstrue\PassOptionsToPackage{nodljs}{insdljs}}
+\def\eq@drivernum{5}
+\def\eq@driver{dvipsone/dvips}
+\def\eq@driver@nodriver{no driver specified}
\DeclareOption{unicode}{\PassOptionsToPackage{unicode}{hyperref}}
\DeclareOption{useui}{\PassOptionsToPackage{useui}{eforms}}
\let\LangRedefinitions\relax
@@ -310,7 +317,7 @@
\RequirePackage{verbatim}
\RequirePackage{hyperref}
\RequirePackage{amssymb}% used for return symbols
-\RequirePackage{eforms}[2019/10/23]
+\RequirePackage{eforms}[2021/05/10]
\dlSetPkgInfo
\@ifundefined{eq@drivernum}{%
\PackageError{exerquiz}%
@@ -321,7 +328,7 @@
dvipdfmx, or xetex
\MessageBreak in the option list of the exerquiz package.}
}{}
-\edef\eq@restoreCats{% dps17
+\edef\eq@restoreCats{%
\catcode`\noexpand\"=\the\catcode`\"\relax
\catcode`\noexpand\'=\the\catcode`\'\relax
\catcode`\noexpand\,=\the\catcode`\,\relax
@@ -437,7 +444,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}}
@@ -524,8 +532,8 @@
\newcommand{\nolinkcolor}[1]{\def\@nolinkcolor{#1}}
\nolinkcolor{blue}
\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{}
\let\marginparpriorhook\@empty % used to material before the exercise
@@ -736,9 +744,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}
\newif\if@restorejustify \@restorejustifyfalse
\newcommand\restoreJustifyOn{\@restorejustifytrue}
\newcommand\restoreJustifyOff{\@restorejustifyfalse}
@@ -1612,14 +1620,14 @@
\definecolor{webgreen}{rgb}{0,.6,0}
\newcommand{\proofingsymbolColor}[1]{\def\@proofingsymbolColor{#1}}
\proofingsymbolColor{red}
-\let\@proofsymbolredefined=0
-\newcommand{\proofingsymbol}[1]{\let\@proofsymbolredefined=1%
- \def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{#1}}}
+\let\@proofsymbolredefined\eq@Zero
+\newcommand{\proofingsymbol}[1]{\let\@proofsymbolredefined\eq@One
+ \def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{#1}}}
\def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{\ding{52}}}
-\def\setproofingsymbol{%
- \if\@proofsymbolredefined1\else
- \@ifpackageloaded{pifont}{\proofingsymbol{\ding{52}}}
- {\proofingsymbol{$\bullet$}}\fi}
+\def\setproofingsymbol{\ifx\@proofsymbolredefined\eq@One\else
+ \@ifpackageloaded{pifont}{\proofingsymbol{\ding{52}}}
+ {\proofingsymbol{$\bullet$}}\fi
+}
\AtBeginDocument{\setproofingsymbol}
\newcommand{\prior@questionsHook}{}
\let\insE@rlyAtQues\@empty
@@ -1629,17 +1637,17 @@
\newcommand{\quesNumColor}[1]{\def\eq@quesNumCol{#1}}
\quesNumColor{blue}
\renewcommand{\theeqquestionnoi}{\arabic{eqquestionnoi}}
-\newcommand{\labeleqquestionnoi}{%
- \color{\eq@quesNumCol}\bfseries\theeqquestionnoi.}
+\newcommand{\labeleqquestionnoi}{\color{\eq@quesNumCol}\bfseries
+ \theeqquestionnoi.}
\renewcommand\theeqquestionnoii{(\alph{eqquestionnoii})}
-\newcommand{\labeleqquestionnoii}{%
- \color{\eq@quesNumCol}\bfseries\theeqquestionnoii}
+\newcommand{\labeleqquestionnoii}{\color{\eq@quesNumCol}\bfseries
+ \theeqquestionnoii}
\renewcommand\theeqquestionnoiii{(\roman{eqquestionnoiii})}
-\newcommand{\labeleqquestionnoiii}{%
- \color{\eq@quesNumCol}\bfseries\theeqquestionnoiii}
+\newcommand{\labeleqquestionnoiii}{\color{\eq@quesNumCol}\bfseries
+ \theeqquestionnoiii}
\define@key{props@ques}{labelwidthTo}%
- [\normalsize\normalfont\bfseries00.]%
- {\def\propQ@labelwidthTo{#1}}
+ [\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}}
@@ -1664,14 +1672,15 @@
\list{\qMark@Hook\prior@questionsHook
\insE@rlyAtQues\gdef\eqPTs{1}%
\global\let\eqQT\eq@na%
- {\@tempcnta=0 \let\@thispr@b\@empty
+ {\@tempcnta\z@\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
+ \ifx\@thispr@b\@empty\edef\@thispr@b{\@nameuse
+ {theeqquestionno\romannumeral\the\@tempcnta}}\else
+ \edef\@thispr@b{\@thispr@b\@nameuse
+ {theeqquestionno\romannumeral\the\@tempcnta}}\fi
}\xdef\@currentQues{\@thispr@b}}%
- \makebox[\labelwidth][r]{\normalfont\@nameuse{label\@quesctr}}%
+ \makebox[\labelwidth][r]{\normalfont
+ \@nameuse{label\@quesctr}}% format label
\xdef\eq@pageThisQ{\the\c@page}%
\post@questionsHook}{\usecounter{\@quesctr}%
\ifx\propQ@labelsep\@empty
@@ -1707,8 +1716,7 @@
\def\@sqGenBaseName{eqSqBn\@shortquizCnt}
\let\sqhspace\space
\let\ListOfSQuizNames\@empty
-\newenvironment{shortquiz}
-{%
+\newenvironment{shortquiz}{\def\eqPTs{1}%
\xdef\eq@pageThisQ{\the\c@page}%
\let\@currentQues\@empty
{\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne
@@ -1717,8 +1725,7 @@
{\if\aeb@FLOverride\eq@f\def\sqstar{*}\else
\def\sqstar{}\sqLinks\fi\@shortquiz}%
}{\aeb@endshortquiz}
-\newenvironment{shortquiz*}
-{%
+\newenvironment{shortquiz*}{%
\xdef\eq@pageThisQ{\the\c@page}%
{\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne
\xdef\@shortquizCnt{\the\eqtmpcnta}}%
@@ -1737,6 +1744,7 @@
\AA{\AAFormat{%
if\eqSP(typeof\eqSP\oField=="undefined")\eqSP
var\eqSP\oField=new\eqSP Object;\r
+ \oField.sqTlyTotCnt=0;\r
\oField.Grp={};%
\ifx\defaultColorJSLoc\@empty\else\r
\oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
@@ -1864,20 +1872,19 @@ if (typeof !oField=="undefined")
\expandafter\verbatimwrite\fi
}
\let\qzSolutionsAfterHook\@empty
-\def\endsolution@sq
-{%
- \ifeq@solutionsafter
- \eq@fititin{\mbox{\sqslrtnlabel}}\par\qzSolutionsAfterHook
- \aftergroup\ignorespaces
- \else
- \endverbatimwrite
- \eq@clearMrkCpy
- \ifx\@qzsolndest\@empty\else\set@display@protect
- \immediate\write\verbatim@out{\eqSqSolnTrailer}%
- \set@typeset@protect
- \fi
+\def\endsolution@sq{%
+ \ifeq@solutionsafter
+ \eq@fititin{\mbox{\sqslrtnlabel}}\par\qzSolutionsAfterHook
+ \aftergroup\ignorespaces
+ \else
+ \endverbatimwrite
+ \eq@clearMrkCpy
+ \ifx\@qzsolndest\@empty\else\set@display@protect
+ \immediate\write\verbatim@out{\eqSqSolnTrailer}%
+ \set@typeset@protect
\fi
- \global\let\@qzsolndest\@empty
+ \fi
+ \global\let\@qzsolndest\@empty
}
\newcommand\pnphDflt{.1\textheight}
\newcommand{\promoteNewPageHere}[1][\pnphDflt]{%
@@ -1893,26 +1900,26 @@ if (typeof !oField=="undefined")
\else\newpage\penalty1\fi\fi\egroup\fi
}
\newcommand{\saveDest}[1][]{%
- \def\sd@arg{#1}\ifx\sd@arg\@empty
- \xdef\holdDest{\@qzsolndest}\else
- \xdef\@qzsolndest{#1}\xdef\holdDest{#1}\fi}
+ \def\sd@arg{#1}\ifx\sd@arg\@empty
+ \xdef\holdDest{\@qzsolndest}\else
+ \xdef\@qzsolndest{#1}\xdef\holdDest{#1}\fi}
\def\useDest{\def\@qzsolndest{\holdDest}}
\let\holdDest\@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
+ \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
@@ -1952,8 +1959,7 @@ if (typeof !oField=="undefined")
\newcommand{\InputQzSolnsLevel@i}[2][]{%
\def\eq@QzSolnsLabel{#1}\def\eq@QzSolnsLevel{#2}}
\InputQzSolnsLevel*{section}
-\def\quizSolnsHeadnToc
-{%
+\def\quizSolnsHeadnToc{%
\edef\eq@mkCmd{\expandafter\noexpand
\csname\eq@QzSolnsLevel\endcsname\eq@QzSolnsStar}%
\eq@mkCmd{\sqslsectitle}\if!\eq@QzSolnsLabel!\else
@@ -1967,8 +1973,7 @@ if (typeof !oField=="undefined")
}%
\fi
}
-\newcommand{\quizSolnInput}
-{%
+\newcommand{\quizSolnInput}{%
\global\let\webnewpage\relax
\bgroup\OKToWriteExamDatatrue
\writeT@QzSolns{\string\endinput}\egroup
@@ -2029,9 +2034,11 @@ if (typeof !oField=="undefined")
\newcommand\useLinks{\def\aeb@FLOverride{l}}
\newcommand\restoreFLTypeDefault{\global\let\aeb@FLOverride\relax}
\let\aeb@FLOverride\relax
-\newenvironment{quiz}
-{\goodbreak\@ifstar{\gdef\qstar{*}\@quiz*f}{\gdef\qstar{x}\@quiz*l}}
- {\aeb@endquiz}
+\newenvironment{quiz}{\goodbreak
+ \@ifstar
+ {\gdef\qstar{*}\@quiz*f}
+ {\gdef\qstar{x}\@quiz*l}%
+}{\aeb@endquiz}
\def\@quizCnt{0}
\let\ListOfQuizNames\@empty
\def\@quiz*#1#2{%
@@ -2569,7 +2576,7 @@ if (isEndQuizPushed("@eqBaseName")){
\setlength{\labelsep}{0pt}%
\def\Ans{\Ans@list}%
}% list
-}{\endlist\setcounter{quizno}{0}\eq@answersEndHook}
+}{\eq@answersEndHook\endlist\setcounter{quizno}{0}}
\newcommand\Ans@tabular[2][0]{\gdef\eq@pPTs{#1}\xdef\Ans@choice{#2}%
\leavevmode\@Ans
}
@@ -2606,7 +2613,9 @@ if (isEndQuizPushed("@eqBaseName")){
\everypar{}\@endpefalse}\the\eq@scratchtoks
}%
}
-\newcommand\answersEndHook[1]{\def\eq@answersEndHook{#1}}
+\newcommand\answersEndHook[1]{\def\eq@answersEndHook{#1}%
+ \ifx\eq@answersEndHook\@empty\else
+ \def\insertEndHookHere{#1}\fi}
\let\eq@answersEndHook\@empty
\def\endanswers@sq{\endtabular\setcounter{quizno}{0}%
\eq@answersEndHook\reset@doendpe{\the\everypar}%
@@ -2677,11 +2686,14 @@ var qzSolnDest="*@qzsolndest";
var solnAfter=*ifeq@solutionsafter%
true*else%
false*fi;
-if ((qzSolnDest!="") && !solnAfter) %
-jmpToNamedDest("*oField","*@qzsolndest",%
-*ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
-*ifx*eqAddAAMouseUpMC*empty*else
-*eqAddAAMouseUpMC*fi
+var f=this.getField("corr.*oField.*thequestionno");
+if (f==null) {
+ if ((qzSolnDest!="") && !solnAfter) %
+ jmpToNamedDest("*oField","*@qzsolndest",%
+ *ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
+ *ifx*eqAddAAMouseUpMC*empty*else
+ *eqAddAAMouseUpMC*fi
+}
\end{defineJS}
\begin{defineJS}[\makeesc\*\makecmt\%]{\Ans@sq@f@ActionsFalse}
*ifx*@sqTurnOffAlerts*eq@One%
@@ -2776,23 +2788,26 @@ for (var i=0; i<a.length; i++)
if ( (a[i].isBoxChecked(0)) && %
(a[i].value.charAt(0)==0) )
a[i].checkThisBox(0,false);%
-*ifx*@sqTurnOffAlerts*eq@One%
-OnBlurRespBox(true,"*oField");
+*ifx*@sqTurnOffAlerts*eq@One
+OnBlurRespBox(true,"*oField");*else
*fi%
var qzSolnDest="*@qzsolndest";
var solnAfter=*ifeq@solutionsafter%
true*else%
false*fi;
-if ( (qzSolnDest != "") && !solnAfter ) {
- for (var i=0; i<a.length; i++){
- if ((a[i].exportValues[0].charAt(0)==1) && %
+var f=this.getField("corr.*oField.*thequestionno");
+if (f==null) {
+ if ( (qzSolnDest != "") && !solnAfter ) {
+ for (var i=0; i<a.length; i++){
+ if ((a[i].exportValues[0].charAt(0)==1) && %
(!a[i].isBoxChecked(0))) break;
+ }
}
+ if (i>=a.length) jmpToNamedDest("*oField","*@qzsolndest",%
+ *ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
+ *ifx*eqAddAAMouseUpMS*empty*else
+ *eqAddAAMouseUpMS*fi
}
-if (i>=a.length) jmpToNamedDest("*oField","*@qzsolndest",%
-*ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
-*ifx*eqAddAAMouseUpMS*empty*else
-*eqAddAAMouseUpMS*fi
\end{defineJS}
\begin{defineJS}[\makeesc\*\makecmt\%]{\Ans@ck@sq@f@ActionsFalse}
var fName=event.target.name;
@@ -2804,9 +2819,8 @@ for (var i=0; i<a.length; i++) {
a[i].checkThisBox(0,false);
}
}%
-*ifx*@sqTurnOffAlerts*eq@One%
-OnBlurRespBox(false,"*oField");
-*fi%
+*ifx*@sqTurnOffAlerts*eq@One
+OnBlurRespBox(false,"*oField");*fi%
*ifx*oField*@empty*else
updateTally("*oField.*thequestionno");*fi%
*ifx*eqAddAAMouseUpMS*empty*else
@@ -2922,8 +2936,7 @@ updateTally("*oField.*thequestionno");*fi%
\setlength{\labelsep}{0pt}%
\def\Ans{\Ans@list}%
}%
-}{\endlist\setcounter{quizno}{0}%
- \eq@answersEndHook
+}{\eq@answersEndHook\endlist\setcounter{quizno}{0}%
\setdefault@Ans
\ifx\aeb@answerType\aeb@answerType@r
\eq@recordCorrAns{\eq@ansChoiceArray}\ifwithinMCFI
@@ -3130,7 +3143,7 @@ updateTally("*oField.*thequestionno");*fi%
{\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi}
\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
@@ -3503,6 +3516,7 @@ updateTally("*oField.*thequestionno");*fi%
\global\let\aebtitleQuiz\@empty
\global\let\aebTitleQuiz\@empty
\global\let\eq@tq@star\relax
+ \global\let\oqpriorhook\@empty
\aftergroup\ignorespaces
}
\def\oSolution#1{\edef\@qzsolndest{#1}}
@@ -3821,6 +3835,7 @@ if(event.willCommit) {
\color{\@proofingsymbolColor}\spaceskip=2pt\xspaceskip=2pt%
\expandafter\gobbleMacro\meaning\eqCorrectAnsTeX
}
+\inputRBMICode
\newcommand\RespBoxTxtNT{\def\rbFlag{0}\@RespBoxTxt}
\newcommand\RespBoxTxt{\def\rbFlag{0}\@RespBoxTxt}
\def\RespBoxTxtOnBlur{OnBlurRespBox(%
@@ -3863,7 +3878,7 @@ if(event.willCommit) {
!RespBoxTxtOnBlur!fi
}%
!ifx!eqAddAAKeystroke!@empty!else%
-!eqAddAAKeystroke!fi%
+!eqAddAAKeystroke!fi
\end{defineJS}
\def\@@RespBoxTxtActions{%
\AA{\if\eqQuizType\isQZ
@@ -4134,42 +4149,141 @@ if(event.willCommit) {
\every@eqTextField}}%
}
\let\@@sqTallyBoxActions\@empty
-\@ifundefined{calcOrder}{%
-\ifpdf\def\@@sqTallyBoxActions{%
- \AA{\AAValidate{getTotalTally("\oField");}}}\fi}{}
\def\sqTallyBoxDefaults{%
- \BC{0 0 0}\W{1}\textColor{1 0 0 rg}\S{I}\Q{2}\Ff{\FfReadOnly}
-}
-\ifpdf\def\@@sqTallyBoxActions{%
- \AA{\AAValidate{getTotalTally("\oField");}}}\else
- \let\@@sqTallyBoxActions\@empty
-\fi
+ \BC{0 0 0}\W{1}\textColor{1 0 0 rg}\S{I}\Q{2}\Ff{\FfReadOnly}}
\newcommand\sqTallyBox[1][]{%
\mbox{\text@@Field{#1}{tally.\oField.\thequestionno}%
{\TBW}{\DefaultHeightOfWidget}%
{}{\eq@setWidgetProps\eq@TextField}%
{\sqTallyBoxDefaults\@@sqTallyBoxActions\every@eqTextField
- \every@sqTallyBox}}%
-}
+ \every@sqTallyBox}}}
\def\sqTallyTotalDefaults{%
- \rawPDF{}\W{1}\BC{0 0 0}\S{I}\textColor{1 0 0 rg}%
- \Q{2}\Ff{\FfReadOnly}%
-}
-\def\@@sqTallyTotalActions{%
- \AA{%
- \AAKeystroke{AFNumber_Keystroke(0,0,0,0,"",true);}
- \AAFormat{AFNumber_Format(0,0,0,0,"",true);}
- \AACalculate{%
- AFSimple_Calculate("SUM",new Array("tally.\oField"));
- }}%
-}
+ \rawPDF{}\W{1}\BC{0 0 0}\S{I}\textColor{1 0 0 rg}
+ \Q{2}\Ff{\FfReadOnly}
+}
+\flJSStr{\sqWeakMsg}{You have missed too many questions.
+After you finish, it is recommended you retake this quiz
+with fewer errors and greater understanding.}
+\flJSStr{\sqStrongMsg}{You have missed too many questions.
+We are resetting the quiz. Start over, this time with
+fewer errors and greater understanding.}
+\def\@@sqTallyTotalActions{\AA{%
+ \AAKeystroke{\dl@EForAF4Number_Keystroke(0,0,0,0,"",true);}
+ \AAFormat{\dl@EForAF4Number_Format(0,0,0,0,"",true);}
+ \AACalculate{%
+ \dl@EForAF4Simple_Calculate("SUM",new Array("tally.\oField"));\r
+ var sqTlyTotl=event.value;
+ \ifx\eq@strongpass\@empty
+ \ifx\eq@weakpass\@empty\else\r
+ if(sqTlyTotl > \eq@weakpass) {\r\t
+ if (\oField.sqTlyTotCnt==0)\r\t\t
+ app.alert(\sqWeakMsg);\r\t
+ \oField.sqTlyTotCnt++;\r
+ }
+ \fi
+ \else\r
+ if(sqTlyTotl > \eq@strongpass) {\r\t
+ app.alert(\sqStrongMsg);\r
+ \@@sqClearButtonJSCode\r
+ event.value=0;\r
+ }
+ \fi
+}}}
+\def\@eqweakpass#1{\def\eq@weakpass{#1}}
+\def\@eqstrongpass#1{\def\eq@strongpass{#1}}
+\let\eq@weakpass\@empty
+\let\eq@strongpass\@empty
\newcommand\sqTallyTotal[1][]{%
+ \processAppArgs#1\end\@nil
\mbox{\text@@Field{#1}{tallytotal.\oField}{\TBW}%
{\DefaultHeightOfWidget}{\eq@protect\AA}%
{\eq@setWidgetProps\eq@TextField}%
{\sqTallyTotalDefaults\@@sqTallyTotalActions\every@eqTextField
\every@sqTallyTotal}}%
}
+\def\sqClearButtonDefaults
+{%
+ \CA{\eq@local@sqClearButton}\textColor{0 g}\F{\FPrint}
+ \BC{0 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}\Ff{\FfNoExport}
+}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\@@sqClearButtonJSCode}
+ProcessIt = false;
+if ( typeof *oField == "undefined" )
+ *oField = new Object;
+if (typeof appAlerts["*oField"] == "undefined")
+ appAlerts["*oField"] = new Object;
+this.resetForm(new Array("mc.*oField","obj.*oField",%
+"tally.*oField","grpobj.*oField"));
+var f = this.getField("obj.*oField");
+if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
+*defaultColorJS*else*defaultColorJSLoc*fi;
+f = this.getField("grpobj.*oField");
+if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
+*defaultColorJS*else*defaultColorJSLoc*fi;
+f = this.getField("rbmarkup.*oField");
+if ( f != null ) f.display=display.hidden;
+*oField.Grp = {};
+appAlerts["*oField"].bAfterValue=false;
+*oField.sqTlyTotCnt=0;
+ProcessIt=true;
+\end{defineJS}
+\def\@@sqClearButtonActions{\A{\JS{\@@sqClearButtonJSCode}}}
+\newcommand\sqClearButton[1][]{%
+ \mbox{\push@@Button{#1}{clear.\oField}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\sqClearButtonDefaults\@@sqClearButtonActions\every@ButtonField
+ \every@sqClearButton}}%
+}
+\flJSStr{\sqSolnMCMsg}{You must first select the correct
+answer to see the solution.}
+\flJSStr{\sqSolnMSMsg}{You must first select all the correct
+answers to see the solution.}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\sqCorrSolCodeMC}
+var qzSolnDest="*@qzsolndest";
+var solnAfter=*ifeq@solutionsafter%
+true*else%
+false*fi;
+var qzSolnDest="*@qzsolndest";
+var f=this.getField("mc.*oField.*thequestionno");
+if(f.value.charAt(0)=="1") {
+ if ((qzSolnDest!="") && !solnAfter) %
+jmpToNamedDest("answer",qzSolnDest,1);
+} else app.alert(*sqSolnMCMsg);
+\end{defineJS}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\sqCorrSolCodeMS}
+// multiple selection
+var g=this.getField("mc.*oField.*thequestionno");
+var a=g.getArray();
+var qzSolnDest="*@qzsolndest";
+var solnAfter=*ifeq@solutionsafter%
+true*else%
+false*fi;
+var qzSolnDest="*@qzsolndest";
+var f=this.getField("corr.*oField.*thequestionno");
+if ( (qzSolnDest != "") && !solnAfter ) {
+ for (var i=0; i<a.length; i++){
+ if ((a[i].exportValues[0].charAt(0)==1) && %
+(!a[i].isBoxChecked(0))) break;
+ }
+}
+if (i>=a.length) jmpToNamedDest("*oField","*@qzsolndest",%
+*ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);
+else app.alert(*sqSolnMSMsg);
+\end{defineJS}
+\def\sqCorrSolButtonActionHook{\ifx\aeb@answerType
+ \aeb@answerType@r\JS{\sqCorrSolCodeMC}\else
+ \JS{\sqCorrSolCodeMS}\fi
+}
+\newcommand{\sqSolnBtn}[1][]{%
+ \def\Fld@name{corr.\oField.\thequestionno}%
+ \edef\@@CorrSolButtonActions{\noexpand
+ \A{\noexpand\sqCorrSolButtonActionHook}}%
+ \ifx\@qzsolndest\@empty\else
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonDefaults\@@CorrSolButtonActions
+ \every@ButtonField\every@CorrAnsButton}}\fi
+}
\def\CorrAnsButtonDefaults{%
\CA{\eq@local@CorrAnsButton}\W{1}\S{S}
\BC{0 0 0}\BG{.7529 .7529 .7529}\H{P}
@@ -4246,38 +4360,6 @@ else !processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
\fi
\egroup
}
-\def\sqClearButtonDefaults
-{%
- \CA{\eq@local@sqClearButton}\textColor{0 g}\F{\FPrint}
- \BC{0 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}\Ff{\FfNoExport}
-}
-\begin{defineJS}[\makeesc\*\makecmt\%]{\@@sqClearButtonJSCode}
-ProcessIt = false;
-if ( typeof *oField == "undefined" )
- *oField = new Object;
-if (typeof appAlerts["*oField"] == "undefined")
- appAlerts["*oField"] = new Object;
-this.resetForm(new Array("mc.*oField","obj.*oField",%
-"tally.*oField","grpobj.*oField"));
-var f = this.getField("obj.*oField");
-if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
-*defaultColorJS*else*defaultColorJSLoc*fi;
-f = this.getField("grpobj.*oField");
-if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
-*defaultColorJS*else*defaultColorJSLoc*fi;
-f = this.getField("rbmarkup.*oField");
-if ( f != null ) f.display=display.hidden;
-*oField.Grp = {};
-appAlerts["*oField"].bAfterValue=false;
-ProcessIt=true;
-\end{defineJS}
-\def\@@sqClearButtonActions{\A{\JS{\@@sqClearButtonJSCode}}}
-\newcommand\sqClearButton[1][]{%
- \mbox{\push@@Button{#1}{clear.\oField}{}{\DefaultHeightOfWidget}%
- {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
- {\sqClearButtonDefaults\@@sqClearButtonActions\every@ButtonField
- \every@sqClearButton}}%
-}
\def\PromptButtonDefaults{%
\CA{\eq@local@CorrAnsButton}\W{1}\S{S}\BC{0 0 0}
\BG{.7529 .7529 .7529}\H{P}
diff --git a/texmf-dist/tex/latex/acrotex/insdljs.sty b/texmf-dist/tex/latex/acrotex/insdljs.sty
index 2d5066fb..1fb1faff 100644
--- a/texmf-dist/tex/latex/acrotex/insdljs.sty
+++ b/texmf-dist/tex/latex/acrotex/insdljs.sty
@@ -19,7 +19,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{insdljs}
- [2021/02/07 v2.5.2 Insert Document Level JavaScripts (dps)]
+ [2021/05/10 v2.5.3 Insert Document Level JavaScripts (dps)]
\usepackage{xkeyval}
\RequirePackage{ifpdf}[2006/02/20]
\RequirePackage{ifxetex}[2006/08/21]
@@ -38,6 +38,16 @@
\let\dl@YES=y \let\dl@NO=n
\let\dl@One=1 \let\dl@Zero=0
\let\dljs@YES=y \let\dljs@NO=n
+\edef\dl@restoreCats{%
+ \catcode`\noexpand\"=\the\catcode`\"\relax
+ \catcode`\noexpand\'=\the\catcode`\'\relax
+ \catcode`\noexpand\,=\the\catcode`\,\relax
+ \catcode`\noexpand\(=\the\catcode`\(\relax
+ \catcode`\noexpand\!=\the\catcode`\!\relax
+ \catcode`\noexpand\_=\the\catcode`\_\relax
+}
+\@makeother\"\@makeother\'\@makeother\,%
+\@makeother\(\@makeother\!\@makeother\_
\def\dlpkgInfo{\@nameuse{ver@\@currname.\@currext}}
\def\dlSetPkgInfo{%
\edef\dlpkgInfoExpd{\dlpkgInfo}%
@@ -187,6 +197,7 @@
\let\jsT=\js@@T
\newwrite\js@verbatim@out
\def\iwvo#1{\immediate\write\js@verbatim@out{#1}}
+\def\dl@EForAF4#1_{\ifx\usedAdbFuncs\dl@YES EF\else AF\fi#1_}
\def\dl@lparen{(}\def\dl@rparen{)}
\def\genericNL{^^J}
\def\defjsLB{\gobiv}
@@ -503,20 +514,20 @@
\ifx\csname dljs\dljsBase\endcsname\relax
\else\@insjserrDuplicate\fi
\ifcase\dljs@drivernum
- \let\insert@DLJS=\insert@DLJS@pdfmark
- \let\endinsDLJS=\endinsert@DLJS@pdfmark
- \let\newsegment=\newsegment@pdfmark
- \let\endnewsegment=\endnewsegment@pdfmark
+ \let\insert@DLJS\insert@DLJS@pdfmark
+ \let\endinsDLJS\endinsert@DLJS@pdfmark
+ \let\newsegment\newsegment@pdfmark
+ \let\endnewsegment\endnewsegment@pdfmark
\or
- \let\insert@DLJS=\insert@DLJS@pdftex
- \let\endinsDLJS=\endinsert@DLJS@pdftex
- \let\newsegment=\newsegment@pdftex
- \let\endnewsegment=\endnewsegment@pdftex
+ \let\insert@DLJS\insert@DLJS@pdftex
+ \let\endinsDLJS\endinsert@DLJS@pdftex
+ \let\newsegment\newsegment@pdftex
+ \let\endnewsegment\endnewsegment@pdftex
\or
- \let\insert@DLJS=\insert@DLJS@dvipdfm
- \let\endinsDLJS=\endinsert@DLJS@dvipdfm
- \let\newsegment=\newsegment@dvipdfm
- \let\endnewsegment=\endnewsegment@dvipdfm
+ \let\insert@DLJS\insert@DLJS@dvipdfm
+ \let\endinsDLJS\endinsert@DLJS@dvipdfm
+ \let\newsegment\newsegment@dvipdfm
+ \let\endnewsegment\endnewsegment@dvipdfm
\fi
\insert@DLJS
}{}
@@ -534,20 +545,20 @@
\expandafter\ifx\csname dljs\dljsBase\endcsname\relax
\else\@insjserrDuplicate\fi
\ifcase\dljs@drivernum
- \let\insert@DLJS=\insert@DLJS@pdfmark\expandafter
+ \let\insert@DLJS\insert@DLJS@pdfmark\expandafter
\let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdfmark
- \let\newsegment=\newsegment@pdfmark
- \let\endnewsegment=\endnewsegment@pdfmark
+ \let\newsegment\newsegment@pdfmark
+ \let\endnewsegment\endnewsegment@pdfmark
\or
- \let\insert@DLJS=\insert@DLJS@pdftex\expandafter
+ \let\insert@DLJS\insert@DLJS@pdftex\expandafter
\let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdftex
- \let\newsegment=\newsegment@pdftex
- \let\endnewsegment=\endnewsegment@pdftex
+ \let\newsegment\newsegment@pdftex
+ \let\endnewsegment\endnewsegment@pdftex
\or
- \let\insert@DLJS=\insert@DLJS@dvipdfm\expandafter
+ \let\insert@DLJS\insert@DLJS@dvipdfm\expandafter
\let\csname endinsDLJS*\endcsname\endinsert@DLJS@dvipdfm
- \let\newsegment=\newsegment@dvipdfm
- \let\endnewsegment=\endnewsegment@dvipdfm
+ \let\newsegment\newsegment@dvipdfm
+ \let\endnewsegment\endnewsegment@dvipdfm
\fi
\insert@DLJS
}{}
@@ -952,6 +963,7 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
}
\catcode`\"=\dl@dquoteCat
\inputAltAdbFncs
+\dl@restoreCats
\endinput
%%
%% End of file `insdljs.sty'.
diff --git a/texmf-dist/tex/latex/acrotex/pdfdochex.def b/texmf-dist/tex/latex/acrotex/pdfdochex.def
index 3132ebf8..4eea125c 100644
--- a/texmf-dist/tex/latex/acrotex/pdfdochex.def
+++ b/texmf-dist/tex/latex/acrotex/pdfdochex.def
@@ -8,7 +8,7 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% eForms package, %%
-%% Copyright (C) 2002-2020 D. P. Story %%
+%% Copyright (C) 2002-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
diff --git a/texmf-dist/tex/latex/acrotex/rbmintrvl.def b/texmf-dist/tex/latex/acrotex/rbmintrvl.def
new file mode 100644
index 00000000..947dc38d
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/rbmintrvl.def
@@ -0,0 +1,29 @@
+%%
+%% This is file `rbmintrvl.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,rbmIntrvl')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2021 D. P. Story %%
+%% dpstory@uakron.edu %%
+%% %%
+%% This program can redistributed and/or modified under %%
+%% the terms of the LaTeX Project Public License %%
+%% Distributed from CTAN archives in directory %%
+%% macros/latex/base/lppl.txt; either version 1 of the %%
+%% License, or (at your option) any later version. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\c@lcEPInfo[#1,#2]{%
+ \setlength{\eflength}{(#1pt+#2pt)/2}%
+ \edef\intrCAns{\strip@pt\eflength}%
+ \setlength{\eflength}{(#2pt-#1pt)/2}%
+ \edef\intrPrec{\strip@pt\eflength}%
+}
+\newcommand{\rbmIntrvl}[1]{\c@lcEPInfo#1\RespBoxMath}
+\endinput
+%%
+%% End of file `rbmintrvl.def'.
diff --git a/texmf-dist/tex/latex/acrotex/setcorder.def b/texmf-dist/tex/latex/acrotex/setcorder.def
index 288058de..49788fe8 100644
--- a/texmf-dist/tex/latex/acrotex/setcorder.def
+++ b/texmf-dist/tex/latex/acrotex/setcorder.def
@@ -8,7 +8,7 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% eForms package, %%
-%% Copyright (C) 2002-2020 D. P. Story %%
+%% Copyright (C) 2002-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
diff --git a/texmf-dist/tex/latex/acrotex/template.def b/texmf-dist/tex/latex/acrotex/template.def
index 05c21248..371929e5 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}
- [2021/02/17 v8.6.4 %
+ [2021/05/10 v8.7.7 %
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/uieforms.def b/texmf-dist/tex/latex/acrotex/uieforms.def
index 74739daa..a51b7ce1 100644
--- a/texmf-dist/tex/latex/acrotex/uieforms.def
+++ b/texmf-dist/tex/latex/acrotex/uieforms.def
@@ -8,7 +8,7 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% eForms package, %%
-%% Copyright (C) 2002-2020 D. P. Story %%
+%% Copyright (C) 2002-2021 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -21,12 +21,8 @@
\ifHy@colorlinks\def\eq@bordervisibledefault{0}\@eqW{}\else
\def\eq@bordervisibledefault{1}\@eqW{1}\fi
\def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
-\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start}
- {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}}
-\def\aeb@exiii{\expandafter\expandafter\expandafter}
\newtoks\ef@flagtoks
\newtoks\ef@jstoks
-\def\noexpandiii{\noexpand\noexpand\noexpand}
\define@choicekey{eforms}{border}[\val\nr]{visible,invisible}
{%
\ifcase\nr
diff --git a/texmf-dist/tex/latex/acrotex/web.sty b/texmf-dist/tex/latex/acrotex/web.sty
index 2f81b968..968cbded 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}
- [2021/02/06 v6.1.5 web: A Screen Design Package (dps)]
+ [2021/05/06 v6.1.7 web: A Screen Design Package (dps)]
\RequirePackage{xkeyval}
\RequirePackage{ifpdf}[2006/02/20]
\RequirePackage{ifxetex}[2006/08/21]
@@ -192,6 +192,7 @@
\def\@panelconfig{0}\def\@textX{0}\def\@panelX{0}}
\templatedefaults
\DeclareOptionX{navibar}{\web@navibartrue}
+\DeclareOptionX{navibar*}{\AtEndOfPackage{\ifeqforpaper\else\web@navibartrue\fi}}
\DeclareOptionX{tight}{\AtEndOfPackage{\tightsettings}}
\DeclareOptionX{tight*}{\AtEndOfPackage{\tightsettings*}}
\let\web@tight\web@NO
@@ -573,59 +574,9 @@
{The comment package is incompatible with the\MessageBreak
aeb-comment package, do not use the comment package}}{}}
\AtBeginDocument{\web@commentChkMsg}
-\ifnum\@usetemplates=\@ne\relax
- \def\x{\RequirePackage{graphicx}}\expandafter\x\fi
-\ifnum\@usetemplates=\@ne
- \RequirePackage{eso-pic}
- \ifnum\eq@drivernum=\tw@
- \def\web@set@paper{\AddToShipoutPicture*{%
- \special{papersize=\the\paperwidth,\the\paperheight}}}%
- \AtBeginShipoutFirst{%
- \begingroup
- \@ifundefined{stockwidth}{%
- \ifx\special@paper\@empty
- \special{papersize=\the\paperwidth,\the\paperheight}\else
- \special{papersize=\special@paper}\fi
- }{%
- \ifdim\stockwidth=\z@\else
- \special{papersize=\the\stockwidth,\the\stockheight}\fi
- }%
- \endgroup
- }%
- \@ifundefined{@ShipoutPicture}{}{%
- \renewcommand{\@ShipoutPicture}{%
- \bgroup
- \@tempswafalse%
- \ifx\ESO@HookI\@empty\else\@tempswatrue\fi%
- \ifx\ESO@HookII\@empty\else\@tempswatrue\fi%
- \if@tempswa%
- \@tempdima=1in\@tempdimb=-\@tempdima%
- \advance\@tempdimb\paperheight
- \@ifundefined{stockwidth}{}{%
- \advance\@tempdima+\trimedge%
- \advance\@tempdima+\paperwidth%
- \advance\@tempdima-\stockwidth%
- \if@twoside\ifodd\c@page\else%
- \advance\@tempdima-2\trimedge%
- \advance\@tempdima-\paperwidth%
- \advance\@tempdima+\stockwidth%
- \fi\fi\advance\@tempdimb+\trimtop
- }%
- \unitlength=1pt%
- \global\setbox\@cclv\vbox{%
- \vbox{\let\protect\relax
- \pictur@(0,0)%
- (\strip@pt\@tempdima,\strip@pt\@tempdimb)%
- \ESO@HookII\ESO@HookI\global\let\ESO@HookII\@empty%
- \endpicture}%
- \box\@cclv%
- }%
- \fi
- \egroup
- }% shipout
- }% ifundefined shipout
- \fi
-\fi
+\ifnum\@usetemplates=\@ne\def\x{%
+ \RequirePackage{graphicx}
+ \RequirePackage{eso-pic}}\expandafter\x\fi
\def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
\let\getargsii\getargs
\newlength{\textscreenwidth}
diff --git a/texmf-dist/tex/latex/acrotex/webpro.def b/texmf-dist/tex/latex/acrotex/webpro.def
index 5ed184f4..3125610e 100644
--- a/texmf-dist/tex/latex/acrotex/webpro.def
+++ b/texmf-dist/tex/latex/acrotex/webpro.def
@@ -863,10 +863,8 @@
\ifx\ddd@DingToc\@empty\else\dddDing{\ddd@DingToc}\fi
}
\ifeqforpaper
- \includecomment{forpaper}\excludecomment{forscreen}
-\else
- \includecomment{forscreen}\excludecomment{forpaper}
-\fi
+ \includecomment{forpaper}\excludecomment{forscreen}\else
+ \includecomment{forscreen}\excludecomment{forpaper}\fi
\endinput
%%
%% End of file `webpro.def'.