summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--texmf-dist/doc/latex/acrotex/README.md6
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb.js (renamed from texmf-dist/source/latex/acrotex/aeb.js)0
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb_man.pdfbin1347425 -> 1347884 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb_man.tex (renamed from texmf-dist/source/latex/acrotex/doc/aeb_man.tex)22
-rw-r--r--texmf-dist/doc/latex/acrotex/eformman.pdfbin1113952 -> 1169604 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/eformman.tex (renamed from texmf-dist/source/latex/acrotex/doc/eformman.tex)106
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/webeqtst.pdfbin215958 -> 192229 bytes
-rw-r--r--texmf-dist/source/latex/acrotex/eforms.dtx34
-rw-r--r--texmf-dist/source/latex/acrotex/exerquiz.dtx1
-rw-r--r--texmf-dist/source/latex/acrotex/insdljs.dtx296
-rw-r--r--texmf-dist/source/latex/acrotex/web.dtx5
-rw-r--r--texmf-dist/source/latex/acrotex/web.ins14
-rw-r--r--texmf-dist/tex/latex/acrotex/aebdocfmt.def87
-rw-r--r--texmf-dist/tex/latex/acrotex/aebdonotindex.def24
-rw-r--r--texmf-dist/tex/latex/acrotex/aebjs.def3048
-rw-r--r--texmf-dist/tex/latex/acrotex/aebrandom.def340
-rw-r--r--texmf-dist/tex/latex/acrotex/aebsumrytbls.def512
-rw-r--r--texmf-dist/tex/latex/acrotex/altadbfncs.def82
-rw-r--r--texmf-dist/tex/latex/acrotex/dljscc.def152
-rw-r--r--texmf-dist/tex/latex/acrotex/dljslib.sty3482
-rw-r--r--texmf-dist/tex/latex/acrotex/edvipdfm.def198
-rw-r--r--texmf-dist/tex/latex/acrotex/eforms.sty2752
-rw-r--r--texmf-dist/tex/latex/acrotex/epdfmark.def254
-rw-r--r--texmf-dist/tex/latex/acrotex/epdftex.def212
-rw-r--r--texmf-dist/tex/latex/acrotex/eqbr.def168
-rw-r--r--texmf-dist/tex/latex/acrotex/eqcat.def156
-rw-r--r--texmf-dist/tex/latex/acrotex/eqcolor.def172
-rw-r--r--texmf-dist/tex/latex/acrotex/eqcz.def228
-rw-r--r--texmf-dist/tex/latex/acrotex/eqda.def166
-rw-r--r--texmf-dist/tex/latex/acrotex/eqde.def228
-rw-r--r--texmf-dist/tex/latex/acrotex/eqes.def156
-rw-r--r--texmf-dist/tex/latex/acrotex/eqexam.def3430
-rw-r--r--texmf-dist/tex/latex/acrotex/eqfin.def158
-rw-r--r--texmf-dist/tex/latex/acrotex/eqfr.def152
-rw-r--r--texmf-dist/tex/latex/acrotex/eqit.def128
-rw-r--r--texmf-dist/tex/latex/acrotex/eqnl.def160
-rw-r--r--texmf-dist/tex/latex/acrotex/eqno.def162
-rw-r--r--texmf-dist/tex/latex/acrotex/eqpo.def180
-rw-r--r--texmf-dist/tex/latex/acrotex/eqru.def358
-rw-r--r--texmf-dist/tex/latex/acrotex/eqtr.def212
-rw-r--r--texmf-dist/tex/latex/acrotex/exerquiz.sty9334
-rw-r--r--texmf-dist/tex/latex/acrotex/insdljs.sty1815
-rw-r--r--texmf-dist/tex/latex/acrotex/pdfdochex.def556
-rw-r--r--texmf-dist/tex/latex/acrotex/setcorder.def132
-rw-r--r--texmf-dist/tex/latex/acrotex/taborder.sty184
-rw-r--r--texmf-dist/tex/latex/acrotex/template.def514
-rw-r--r--texmf-dist/tex/latex/acrotex/uieforms.def778
-rw-r--r--texmf-dist/tex/latex/acrotex/usemcfi.def156
-rw-r--r--texmf-dist/tex/latex/acrotex/web.cfg (renamed from texmf-dist/source/latex/acrotex/web.cfg)0
-rw-r--r--texmf-dist/tex/latex/acrotex/web.sty4418
-rw-r--r--texmf-dist/tex/latex/acrotex/webpro.def1752
-rw-r--r--texmf-dist/tex/latex/acrotex/websec.def384
52 files changed, 19024 insertions, 18840 deletions
diff --git a/texmf-dist/doc/latex/acrotex/README.md b/texmf-dist/doc/latex/acrotex/README.md
index d071003e..b05e63eb 100644
--- a/texmf-dist/doc/latex/acrotex/README.md
+++ b/texmf-dist/doc/latex/acrotex/README.md
@@ -1,6 +1,6 @@
The AcroTeX eDucation Bundle
Author: D. P. Story
-Dated: 2018/03/22
+Dated: 2018/08/16
AeB contains the following:
@@ -19,6 +19,10 @@ AeB contains the following:
6) Documentation for AeB (AcroTeX eDucatation Bundle) and eForms
(including insdljs and dljslib).
+What's New (2018/08/16) Changes to eforms and insdljs: several keys (eforms) added to
+support aeb_mlink and annot_pro; switch add to insdljs to detect whether document JS
+has been included.
+
What's New (2018/03/22) Changes in eforms to support features of aeb_mlink. Minor bug fixes
What's New (2018/02/13) Added commands to optionally group each solution when the appear
diff --git a/texmf-dist/source/latex/acrotex/aeb.js b/texmf-dist/doc/latex/acrotex/aeb.js
index 09310d2e..09310d2e 100644
--- a/texmf-dist/source/latex/acrotex/aeb.js
+++ b/texmf-dist/doc/latex/acrotex/aeb.js
diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.pdf b/texmf-dist/doc/latex/acrotex/aeb_man.pdf
index 6d28abb5..a16c0c3b 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/source/latex/acrotex/doc/aeb_man.tex b/texmf-dist/doc/latex/acrotex/aeb_man.tex
index d379907c..8798115e 100644
--- a/texmf-dist/source/latex/acrotex/doc/aeb_man.tex
+++ b/texmf-dist/doc/latex/acrotex/aeb_man.tex
@@ -16,6 +16,12 @@
\usepackage{multicol}
\usepackage{collectbox}
+\usepackage{xbmks}
+\DeclareInitView{layoutmag={navitab:UseOutlines}}
+\xbmksetup{colors={int=red},styles={intbf}}
+
+
+
\newbox\aebbox
\usepackage{acroman}
@@ -226,10 +232,10 @@
\university{{\AcroT} Software Development Team}
\email{dpstory@acrotex.net}
\versionLabel{Dated:}
-\version{2018/03/01}
+\version{2018/08/16}
\copyrightyears{1999-\the\year}
\nocopyright
-\prepared{2018/03/22}
+\prepared{2018/08/16}
\revisionLabel{Distribution Dated:}
\copyrightStatus{True}
@@ -302,6 +308,16 @@ function indefCompare(a,b,c,F,G) {
\maketitle
+\pdfbookmarkx[1]{Title Page}[action={\Named{FirstPage}}]{TitlePage}
+\pdfbookmarkx[1]{The eforms Manual}[action={\GoToR/F(eformman.pdf)/D[0 /Fit]},color=blue,style={bf}]{eForms}
+\pdfbookmarkx[1]{Links to AcroTeX.Net}[action={/S/GoTo/D(undefined)},%
+ color=magenta,style={bf}]{acrotex}
+\belowpdfbookmarkx{http://www.acrotex.net}[action={\URI{http://www.acrotex.net}},%
+ color=magenta,style={bf}]{home}
+\belowpdfbookmarkx{http://blog.acrotex.net}[action={\URI{http://blog.acrotex.net}},%
+ color=magenta,style={bf}]{blog}
+
+
\newpage
\changelinkcolorto{black}
@@ -337,7 +353,7 @@ comment on them, if the spirit moves.
\begin{flushright}
Dr. D. P. Story\\[3pt]
-January 5, 2016
+\today
\end{flushright}
\part{Preface}
diff --git a/texmf-dist/doc/latex/acrotex/eformman.pdf b/texmf-dist/doc/latex/acrotex/eformman.pdf
index ae903f9b..17818148 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/source/latex/acrotex/doc/eformman.tex b/texmf-dist/doc/latex/acrotex/eformman.tex
index ccc6476c..84b8b8ab 100644
--- a/texmf-dist/source/latex/acrotex/doc/eformman.tex
+++ b/texmf-dist/doc/latex/acrotex/eformman.tex
@@ -6,13 +6,20 @@
forcolorpaper,latextoc,pro,useui},
exerquiz,aebxmp
]{aeb_pro}
-\usepackage[dblevel=1]{aeb_mlink}
+\usepackage[dblevel=0]{aeb_mlink}
\usepackage[altbullet]{lucidbry}
%\usepackage{myriadpro}
\usepackage{graphicx,array,longtable}
%\usepackage[usecmtt]{myriadpro}
+\usepackage{xbmks}
+\DeclareInitView{layoutmag={navitab:UseOutlines}}
+\xbmksetup{colors={int=red},styles={intbf}}
+
+%\addtolength{\marginparwidth}{20pt}
+
+
%\makeatletter
%\renewcommand*\l@subsection{\@dottedtocline{2}{2.5em}{3.5em}}
%\renewcommand*\l@subsubsection{\@dottedtocline{4}{5em}{1em}}
@@ -63,7 +70,7 @@
subject={Documentation for the eforms and insdljs packages},
talksite={\url{www.acrotex.net}},
version={2.0},
- prepared={2018/03/22},
+ prepared={2018/08/16},
preparedLabel={Distribution Dated:},
keywords={LaTeX, hyperref, PDF, exercises, quizzes},
copyrightStatus=True,
@@ -260,7 +267,7 @@ var manualfilename="Manual_BG_Print_eforms.pdf";
var manualtemplate="Manual_BG_Blue.pdf"; // Blue, Green, Brown
var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate;
var doc;
-var buildIt=true;
+var buildIt=false;
if ( buildIt ) {
console.println("Creating new " + manualfilename + " file.");
doc = \appopenDoc({cPath: _pathToBlank, bHidden: true});
@@ -292,6 +299,15 @@ _path=_path.substring(0,pos)+"/"+manualfilename;
\maketitle
+\pdfbookmarkx[1]{Title Page}[action={\Named{FirstPage}}]{TitlePage}
+\pdfbookmarkx[1]{AeB Manual}[action={\GoToR/F(aeb_man.pdf)/D[0 /Fit]},color=blue,style={bf}]{AEB}
+\pdfbookmarkx[1]{Links to AcroTeX.Net}[action={/S/GoTo/D(undefined)},%
+ color=magenta,style={bf}]{acrotex}
+\belowpdfbookmarkx{http://www.acrotex.net}[action={\URI{http://www.acrotex.net}},%
+ color=magenta,style={bf}]{home}
+\belowpdfbookmarkx{http://blog.acrotex.net}[action={\URI{http://blog.acrotex.net}},%
+ color=magenta,style={bf}]{blog}
+
\selectColors{linkColor=black}
\tableofcontents
@@ -2019,7 +2035,7 @@ document author has set the border to \texttt{invisible}.
\texttt{push} is used with forms. They each have the same key value pair.
\settowidth{\aebdimen}{\ttfamily bordercolor=\anglemeta{num}\hardspace\anglemeta{num}\hardspace\anglemeta{num}}%
-\def\1{\llap{\smash{\parbox[c]{\marginparwidth}{\raggedright\shortstack[l]{\Cs{BC}\,(forms) or\\\Cs{Color}\,(links)}}}\hspace{\marginparsep}}}%
+\def\1{\llap{\smash{\parbox[c]{2\marginparwidth}{\raggedright\hfill\shortstack[l]{\Cs{BC}\,(forms) or\\\Cs{Color}\,(links)}}}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1bordercolor=!anglemeta(num)!hardspace!anglemeta(num)!hardspace!anglemeta(num)
\end{dCmd}
@@ -3389,7 +3405,7 @@ then each of the following is valid: \verb!\textColor{myBlue}! (for specifying t
\begingroup
\setlength{\extrarowheight}{3mm}\setlength{\tabcolsep}{3pt}
-\begin{longtable}{>{\small\ttfamily\targ}l>{\small\PBS\raggedright}p{2.25in}>{\small}p{1.25in}}
+\begin{longtable}{>{\small\ttfamily\targ}r>{\small\PBS\raggedright}p{2.25in}>{\small}p{1.25in}}
\multicolumn{3}{>{\bfseries}c}{Supported Key \hypertarget{kv}{Variables}}\\
\multicolumn1{>{\bfseries\small}l}{Key}& \multicolumn1{>{\bfseries\small}l}{Description}&\multicolumn1{>{\bfseries\small}l}{Default}\\\hline
\endfirsthead
@@ -3455,46 +3471,51 @@ mkIns?& A variable for introducing into the \texttt{MK} dictionary any other key
Principle examples are \texttt{I}, \texttt{RI}, \texttt{IX}, \texttt{IF}, \texttt{TP},
which are used for displaying icons on a button field. See an
example in the demo file \textsf{eforms.tex} &\verb+\mkIns{}+\\
-I? & (push buttons only) an indirect reference to a form XObject defining the buttons's \emph{normal icon}&\verb+\I{nIcon}+\\
-RI? & (push buttons only) an indirect reference to a form XObject defining the buttons's \emph{rollover icon}&\verb+\RI{rIcon}+\\
-IX? & (push buttons only) an indirect reference to a form XObject defining the buttons's \emph{down icon}&\verb+\I{dIcon}+\\
-TP? & (push buttons only; optional) A code indicating the \texttt{layout} of the text and icon; these codes are
- 0 (label only); 1 (icon only); 2 (label below icon); 3 (label above icon); 4 (label to the right of icon);
- 5 (label to the left of icon); 6 (label overlaid on the icon). The default is 0.&\verb+\TP{1}+\\
-SW? & (push buttons only; optional) The \emph{scale when key}. Permissible values are \texttt{A} (always scale),
+I? & (push buttons only) an indirect reference to a form XObject defining the buttons's
+ \emph{normal icon}&\verb+\I{nIcon}+\newline(example)\\
+RI? & (push buttons only) an indirect reference to a form XObject
+ defining the buttons's \emph{rollover icon}&\verb+\RI{rIcon}+\newline(example)\\
+IX? & (push buttons only) an indirect reference to a form XObject
+ defining the buttons's \emph{down icon}&\verb+\I{dIcon}+\newline(example)\\
+TP? & \texttt{\darg{\ameta{\upshape{0|1|2|3|4|5|6}}}} (push buttons only; optional)
+ A code indicating the \texttt{layout} of the text and icon; these codes are
+ 0~(label only); 1~(icon only); 2~(label below icon); 3~(label above icon); 4~(label to the right of icon);
+ 5~(label to the left of icon); 6~(label overlaid on the icon). The default is 0.&\verb+\TP{0}+\\
+SW? & \texttt{\darg{\ameta{\upshape{A|B|S|N}}}} (push buttons only; optional) The \emph{scale when key}. Permissible values are \texttt{A} (always scale),
\texttt{B} (scale when icon is too big), \texttt{S} (scale when icon is too small), \texttt{N}
(never scale). The default is \texttt{A}. &\verb+\SW{A}+\\
-ST? & (push buttons only; optional) The \emph{scaling type.} Permissible values are \texttt{A}
+ST? & \texttt{\darg{\ameta{\upshape{A|P}}}} (push buttons only; optional) The \emph{scaling type.} Permissible values are \texttt{A}
(anamorphic scaling); \texttt{P} (proportional scaling). The default is \texttt{P}.
&\verb+\ST{P}+\\
-PA? & (push buttons only; optional) The \textit{position array.} An array of two numbers, each
+PA? & \texttt{\darg{\ameta{num\SUB1\space num\SUB2}}} (push buttons only; optional) The \textit{position array.} An array of two numbers, each
between 0 and 1 indicating the fraction of left-over space to allocate at the left and bottom
of the annotation rectangle. The two numbers should be separated by a space. The default value, \verb!\PA{.5 .5}!,
- centers the icon in the rectangle. & \verb!\PA{0 0}!\\
-FB? & (push buttons only; optional) The \emph{fit bounds} Boolean. If \texttt{true}, the button appearance
+ centers the icon in the rectangle. & \verb!\PA{.5 .5}!\\
+FB? & \texttt{\darg{true|false}} (push buttons only; optional) The \emph{fit bounds} Boolean. If \texttt{true}, the button appearance
is scaled to fit fully within the bounds of the annotation without taking into consideration
- the line width of the border. The default is \texttt{false}. &\verb+\FB{true}+\\\hline
+ the line width of the border. &\verb+\FB{false}+\\\hline
%--------------------------------------------------------------
%\pagebreak
\multicolumn{3}{l}{\color{blue}Entries common to fields containing variable text:}\\
-Q? & Quadding for text fields. Values are \texttt{0} (left-justified),
+Q? & \texttt{\darg{0|1|2|empty}} Quadding for text fields. Values are \texttt{0} (left-justified),
\texttt{1} (centered), \texttt{2} (right-justified); e.g., \verb+\Q{1}+.
&\verb+Q{}+\newline(left justified)\\
\multicolumn{3}{>{\small\bfseries}l}{Default Appearance (DA)}\\
DA? & Default appearance string of the text in the widget. Normally, you just
specify text font, size and color. Can be redefined, advance techniques needed.&\\
-textFont? & Font to be used to display the text &\verb+\textFont{Helv}+\\
-textSize? & size in points of the text &\verb+\textSize{9}+\\
-textColor?& color of the text, there are several color spaces, including
- grayscale and RGB; for example, \verb+\textColor{1 0 0 rg}+,
- gives a red font. Recent advances in parsing this command have eliminated the
- need to include the color space specification. Thus, \verb+\textColor{1 0 0}+
- also gives a red font.
- &\verb+\textColor{0 g}+\\\hline
+textFont? & \texttt{\darg{\ameta{font-spec}}} Font to be used to display the text &\verb+\textFont{Helv}+\\
+textSize? & \texttt{\darg{\ameta{num}}} The size in points of the text &\verb+\textSize{9}+\\
+textColor?& \texttt{\darg{\ameta{color-spec}}} The color of the text.
+ There are several color spaces, including
+ grayscale and RGB; for example, \verb+\textColor{1 0 0 rg}+,
+ gives a red font. Recent advances in parsing this command have eliminated the
+ need to include the color space specification. Thus, \verb+\textColor{1 0 0}+
+ also gives a red font.
+ &\verb+\textColor{0 g}+\\\hline
%------------------------------------------------------------------
%\pagebreak
\multicolumn{3}{l}{\color{blue}Entries specific to text fields:}\\
-MaxLen? & The maximum length of the text string input into a text field.
+MaxLen? & \texttt{\darg{\ameta{num{\upshape|empty}}}} The maximum length of the text string input into a text field.
Used also with comb fields to set the number of combs.
Example, \verb+\MaxLeng{15}+.&\verb+\MaxLen{}+\\\hline
%------------------------------------------------------------------
@@ -3506,28 +3527,45 @@ Lock? & This key is used to lock fields after the signature field is
%-------------------------------------------------------------------
%\pagebreak
\multicolumn{3}{l}{\color{blue}Specialized, non-PDF Spec, commands:}\\
-rawPDF? & If all else fails, you can always introduce key-value pairs
+rawPDF? & \texttt{\darg{\ameta{PDF-KVPs}}} If all else fails, you can always introduce key-value pairs
through this variable. &\verb+\rawPDF{}+\\
-autoCenter? & There is a centering code that attempts to give a pleasant
+autoCenter? &\texttt{\darg{y|n}} There is a centering code that attempts to give a pleasant
placement of the field. \verb+\autoCenter{n}+
turn auto centering off.&\\
-inline? & If \mlcs{inline\darg{y}}, an alternate method is used
+inline? & \texttt{\darg{y|n}} If \mlcs{inline\darg{y}}, an alternate method is used
get a better vertical positioning. Designed for inline form fields.
The default is \mlcs{inline\darg{n}}.\\
-presets? & This commands takes a macro as its argument, the text of the macro
+presets? & \texttt{\darg{\ameta{\cs{cmd}}}} This commands takes a macro as its argument, the text of the macro
are key-value pairs. This is useful for setting up a series of
presets for fields. Example, \verb|\presets{\myFavFive}|\\
-symbolchoice? & Use this variable to specify what symbol is to be used
+symbolchoice? & \texttt{\darg{\ameta{symbol-choice}}} Use this variable to specify what symbol is to be used
with a check box or radio button. Possible values are
\texttt{check}, \texttt{circle}, \texttt{cross},
\texttt{diamond}, \texttt{square} and \texttt{star}. Can
be used to globally change the symbol choice as well; for
example, \verb+\symbolchoice{check}+, which is the
default value.\\
-linktxtcolor? & The value of this variable is a named color and is the
+linktxtcolor? & \texttt{\darg{\ameta{named-color{\upshape|empty}}}} The value of this variable is a named color and is the
color of the link text. Only recognized
in link annotations. A value of
- \verb!\linktxtcolor{}! paints the text the \cs{normalcolor}.&\cs{linktxtcolor}\newline\verb+ {\@linkcolor}+
+ \verb!\linktxtcolor{}! paints the text the \cs{normalcolor}.&\cs{linktxtcolor}\newline\verb+ {\@linkcolor}+\\\hline
+\multicolumn{3}{l}{\color{blue}Special link key-values used by \pkg{aeb\_mlink} and \pkg{annot\_pro}}\\
+mlstrut? & \texttt{\darg{\ameta{strut}}} Adjusts the height of a multi-line link, e.g., \verb!\mlstrut{\large\strut}!
+ &\verb~\mlstrut{\strut}~\\
+mlcrackat?& \texttt{\darg{\ameta{num{\upshape|empty}}}} Used to break a multi-line link across a page boundary;
+ specifying \verb~\mlcrackat{3}~ breaks the link after the 3rd syllable. The \pkg{aeb\_mlink}
+ package then creates two links consisting of the text up to and including the crack-at value and
+ the second link consisting of the rest of the hypertext link (or url) string.
+ &\verb~\mlcrackat{}~\\
+mlhyph? & \texttt{\darg{y|n}} A key that takes `y' or `n' as its value. If `y' is passed, then a hyphen is inserted after
+ the break in a multi-line link that crosses a page boundary.
+ & \cs{mlhyph\darg{n}}\\
+mlignore? &\texttt{\darg{\upshape0|1}} An internal switch used in building multi-line links and text markup annotations
+that cross page boundaries. \emph{Do not use}.
+ &\cs{mlignore\darg{0}}\\
+mlcrackinsat? &\texttt{\cs{mlcrackinsat\darg{\ameta{latex-content}}}} This key inserts
+its argument after the hyphen (if there is one) at the point declared by the \cs{crackat} value.
+& \cs{mlcrackinsat\darg{}}
\end{longtable}
\endgroup
diff --git a/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf
index b86521f4..f3a8c054 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/source/latex/acrotex/eforms.dtx b/texmf-dist/source/latex/acrotex/eforms.dtx
index 0c5a49da..8f5768ea 100644
--- a/texmf-dist/source/latex/acrotex/eforms.dtx
+++ b/texmf-dist/source/latex/acrotex/eforms.dtx
@@ -16,7 +16,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{eforms}
-%<package> [2018/03/22 v2.9.19 Provides general eforms support (dps)]
+%<package> [2018/08/16 v2.9.20 Provides general eforms support (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12]
@@ -105,6 +105,7 @@
\let\ef@driver\@empty
\DeclareOption{dvipsone}{\def\eq@drivernum{0}%
\def\eq@drivername{0}\def\ef@driver{dvipsone}%
+ \def\eq@drivercode{epdfmark.def}%
\PassOptionsToPackage{dvipsone}{insdljs}%
\PassOptionsToPackage{dvipsone}{hyperref}%
}
@@ -114,6 +115,7 @@
% \begin{macrocode}
\DeclareOption{dvips}{\def\eq@drivernum{0}%
\def\eq@drivername{1}\def\ef@driver{dvips}%
+ \def\eq@drivercode{epdfmark.def}%
\PassOptionsToPackage{dvips}{insdljs}%
\PassOptionsToPackage{dvips}{hyperref}%
}
@@ -192,7 +194,7 @@
% \begin{macrocode}
\DeclareOption{preview}{\previewtrue}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{insdljs}}
-\@ifundefined{ifpreview}{\newif\ifpreview \previewfalse}{}
+\@ifundefined{ifpreview}{\newif\ifpreview\previewfalse}{}
% \end{macrocode}
% (2017/01/01) Added two convenience commands.
% \changes{v2.9f}{2017/01/01}{Added \string\cs{previewOn} and \string\cs{previewOff}}
@@ -1075,7 +1077,7 @@
\def\@eqR#1{\def\eq@R@value{#1}\ifx\eq@R@value\@empty
\let\eq@R\@empty\else
% \end{macrocode}
-% Determine if we are rotating 90 or 270, if so, let a weak switch
+% Determine if we are rotating 90 or 270, if so, set a weak switch
% \cs{@vertRotate} to 1
% \begin{macrocode}
\@tempcnta=\eq@R@value\relax
@@ -1444,7 +1446,7 @@
\@eqmlstrut{\strut}
% \end{macrocode}
% \DescribeMacro{\mlcrackat}\hskip-\marginparsep\texttt{\darg{\ameta{num}}}
-% (2018/03/22) \cs{mlcrackat} is a link used to break a multi-line link across a page boundary;
+% (2018/03/22) \cs{mlcrackat} is used to break a multi-line link across a page boundary;
% specifying \verb~\mlcrackat{3}~ breaks the link after the 3rd syllable. The \pkg{aeb\_mlink}
% package then creates two links consisting of the text up to and including the crack-at value and
% the second link consisting of the rest of the hypertext link (or url) string.
@@ -1466,14 +1468,25 @@
Using the default of 'n'}\fi\fi}
\let\eq@mlhyph\@empty
% \end{macrocode}
-% \DescribeMacro{\mlignore}\hskip-\marginparsep\texttt{\darg{}}
+% \leavevmode
+% \DescribeMacro{\mlignore}\hskip-\marginparsep\texttt{\darg{\upshape0\string|1\string|empty}}
% (2018/03/22) \cs{mlignore} is an internal option used when breaking apart
-% two multi-line links; not used with urls.
+% two multi-line links; not used with urls. The argument is used to identify
+% whether, when breaking a link or annot apart, we are working on the first or
+% second part. The flag \cs{eq@mlignore} is set to \cs{ef@YES}.
% \changes{v2.9.19}{2018/03/22}{Added \string\cs{mlignore}}
+% \changes{v2.9.20}{2018/08/16}{Added \string\cs{eq@mlchunk} to definition
+% of \string\cs{@eqmlignore}}
% \begin{macrocode}
-\def\@eqmlignore#1{\let\eq@mlignore\ef@YES}
+\def\@eqmlignore#1{\def\eq@mlchunk{#1}\ifx\eq@mlchunk\@empty
+ \def\eq@mlchunk{0}\fi\let\eq@mlignore\ef@YES}
+\def\eq@mlchunk{0}
\let\eq@mlignore\ef@NO
% \end{macrocode}
+% \leavevmode\DescribeMacro{\mlcrackinsat}
+% \hskip-\marginparsep\texttt{\darg{\ameta{latex-content}}}
+% introduces \ameta{latex-content} just after \cs{eq@mlhyph}.
+% \changes{v2.9.20}{2018/08/16}{Added \string\cs{eq@mlcrackinsat}}
% \begin{macrocode}
\def\@eqmlcrackinsat#1{\def\eq@mlcrackinsat{#1}}
\let\eq@mlcrackinsat\@empty
@@ -1791,11 +1804,6 @@
\@break@tfor\fi}\ef@gobbletonil}}
% \end{macrocode}
% \begin{macrocode}
-%\def\ef@getfirst{\@ifnextchar[{\ef@gobbletonil}{%
-% \@tfor\mytok:=.0123456789\do{%
-% \if\mytok\@let@token
-% \edef\ef@colorSpec@out{[gray]\ef@colorSpec@out}%
-% \@break@tfor\fi}\ef@gobbletonil}}
\def\ef@gobbletonil#1\ef@nil{}
% \end{macrocode}
% \begin{macro}{\ef@parsePDFColor}
@@ -1944,7 +1952,7 @@
%
%\subsubsection{Writing Actions}
%
-% Writing actions for eForms requires certain key-value combinations. The following
+% Writing actions for \pkg{eforms} requires certain key-value combinations. The following
% commands provides the correct syntax, the code is inserted via the required
% argument of each.
%
diff --git a/texmf-dist/source/latex/acrotex/exerquiz.dtx b/texmf-dist/source/latex/acrotex/exerquiz.dtx
index e9412205..8ba26138 100644
--- a/texmf-dist/source/latex/acrotex/exerquiz.dtx
+++ b/texmf-dist/source/latex/acrotex/exerquiz.dtx
@@ -14042,4 +14042,3 @@ function qRadioButtonMCFI(key,qname,n) {
%</eqtr>
% \end{macrocode}
% \Finale
-\endinput
diff --git a/texmf-dist/source/latex/acrotex/insdljs.dtx b/texmf-dist/source/latex/acrotex/insdljs.dtx
index 5181c985..10f62df0 100644
--- a/texmf-dist/source/latex/acrotex/insdljs.dtx
+++ b/texmf-dist/source/latex/acrotex/insdljs.dtx
@@ -16,7 +16,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{insdljs}
-%<package> [2017/09/03 v2.3g Insert Document Level JavaScripts (dps)]
+%<package> [2018/07/21 v2.4 Insert Document Level JavaScripts (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -37,7 +37,6 @@
\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{insdljs}{Inputting aebdocfmt.def}}
{\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
\PackageInfo{insdljs}{aebdocfmt.def cannot be found}}
@@ -398,7 +397,7 @@
%
% The options are \texttt{dvipsone}, \texttt{dvips}, \texttt{pdftex} and
% \texttt{dvipdfm}. The default is \texttt{dvipsone}/\texttt{dvips}.
-% \chages{v2.3g}{2017/09/03}{Added ifluatex package}
+% \changes{v2.3g}{2017/09/03}{Added ifluatex package}
% \begin{macrocode}
%<*package>
\usepackage{xkeyval}
@@ -426,7 +425,7 @@
% \IndexOpt{dvipdfm}
% \IndexOpt{dvipdfmx}
% \IndexOpt{xetex}
-% \chages{v2.3g}{2017/09/03}{Added luatex option}
+% \changes{v2.3g}{2017/09/03}{Added luatex option}
% \begin{macrocode}
\DeclareOptionX{pdftex}{\def\dljs@drivernum{1}}
\DeclareOptionX{luatex}{\def\dljs@drivernum{1}}
@@ -638,6 +637,14 @@
\literalps@out{\AEB@psMrk{Catalog} <<\dl@@reqJS>> /PUT pdfmark}\fi\fi
\fi
% \end{macrocode}
+% Added switch to mark whether djs is inserted
+% \changes{v2.4}{2018/07/21}{Added switch}{Added \cs{ifthereisdjs}}
+% \begin{macrocode}
+\newif\ifthereisdjs \thereisdjsfalse
+\def\applydljs#1{\ifthereisdjs\else#1
+ \global\thereisdjstrue\fi}
+% \end{macrocode}
+%
% \section{Main Code}
%
% Before we begin, we need to document the problems that need to be addressed by this package.
@@ -1664,16 +1671,18 @@
\iwvo{endobj}
\iwvo{2 0 obj}
% \end{macrocode}
-% When a non-Distiller workflow, insure execJSs are listed first.
-% \changes{v2.2h}{2016/06/09}{When a non-Distiller workflow, insure execJSs are listed first}
-% \begin{macrocode}
-\ifpdfmarkup
- \iwvo{[ (ExecJS \dljsBase) (var _\dljsBase\space = true;) ] }\else
- \iwvo{[ (00 ExecJS \dljsBase) (var _\dljsBase\space = true;) ] }\fi
- \iwvo{endobj}
- \iwvo{3 0 obj}
- \iwvo{<<>>}
- \iwvo{stream}
+% 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}
+% \begin{macrocode}
+ \let\x\@empty
+ \applydljs{\def\x{^^Jvar _thereisdjs=true;}}%
+ \ifpdfmarkup
+ \iwvo{[ (ExecJS \dljsBase) (var _\dljsBase\space = true;\x) ] }\else
+ \iwvo{[ (00 ExecJS \dljsBase) (var _\dljsBase\space = true;\x)] }\fi
+ \iwvo{endobj}
+ \iwvo{3 0 obj}
+ \iwvo{<<>>}
+ \iwvo{stream}
}
% \end{macrocode}
% \begin{environment}{execJS}
@@ -1871,26 +1880,27 @@
\endgroup
\def\fdfheader
{%
- \iwvo{\string\begingroup\string\efdlspecials}
- \iwvo{\string\isdljstrue}
- \iwvo{\string\makeatletter}
- \iwvo{\string\immediate\string\openout\string
- \js@verbatim@out=\string\js@Path\space\dljsBase.fdf}%
- \iwvo{\string\begin{jsexpverbatimwrite}}
- \iwvo{\string\firstFDFline}
- \iwvo{1 0 obj}
- \iwvo{<< /FDF << /JavaScript << /Doc 2 0 R >> >> >>}
- \iwvo{endobj}
- \iwvo{2 0 obj}
- \iwvo{[ \string\csname\string\@gobble\space\dljsBase%
- OBJ\string\endcsname]}
- \iwvo{endobj}
+ \iwvo{\string\begingroup\string\efdlspecials}
+ \iwvo{\string\isdljstrue}
+ \iwvo{\string\makeatletter}
+ \iwvo{\string\immediate\string\openout\string
+ \js@verbatim@out=\string\js@Path\space\dljsBase.fdf}%
+ \iwvo{\string\begin{jsexpverbatimwrite}}
+ \iwvo{\string\firstFDFline}
+ \iwvo{1 0 obj}
+ \iwvo{<< /FDF << /JavaScript << /Doc 2 0 R >> >> >>}
+ \iwvo{endobj}
+ \iwvo{2 0 obj}
+ \iwvo{[ \string\csname\string\@gobble\space\dljsBase%
+ OBJ\string\endcsname]}
+ \iwvo{endobj}
}
\def\fdfbeginstreamobj
{%
- \iwvo{\thedljssegs\space 0 obj}
- \iwvo{<<>>}
- \iwvo{stream}
+ \iwvo{\thedljssegs\space 0 obj}
+ \iwvo{<<>>}
+ \iwvo{stream}
+ \applydljs{\iwvo{var _thereisdjs=true;}}
% \end{macrocode}
% If the user has not passed the optional
% name, we generated one for him, now we insert it into the \texttt{stream}.
@@ -1903,19 +1913,19 @@
\fi
}
\def\fdfendstreamobj{%
- \iwvo{endstream}
- \iwvo{endobj}
+ \iwvo{endstream}
+ \iwvo{endobj}
}
- \def\fdftrailer{%
- \iwvo{trailer}
- \iwvo{<< /Root 1 0 R >>}
- \iwvo{\string\lastFDFline}
+\def\fdftrailer{%
+ \iwvo{trailer}
+ \iwvo{<< /Root 1 0 R >>}
+ \iwvo{\string\lastFDFline}
% \end{macrocode}
% Here we write \texttt{*end{jsexpverbatimwrite}} as a signal for our modified verbatim write
% code to stop.
% \begin{macrocode}
- \iwvo{*end{jsexpverbatimwrite}}
- \iwvo{\string\endgroup}
+ \iwvo{*end{jsexpverbatimwrite}}
+ \iwvo{\string\endgroup}
}
% \end{macrocode}
% There may be more than one use of the \texttt{insDLJS}
@@ -2021,84 +2031,77 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
@endgroup
\def\begindljs
{%
- \iwvo{\string\begingroup\string\efdlspecials}
- \iwvo{\string\isdljstrue}
+ \iwvo{\string\begingroup\string\efdlspecials}
+ \iwvo{\string\isdljstrue}
% \end{macrocode}
%\changes{v2.2f}{2016/05/07}{Include \string\cs{makeletter} in verbatim write}
% \begin{macrocode}
- \iwvo{\string\makeatletter}
- {\uccode`c=`\%\uppercase{%
- \iwvo{\string\obeyspaces\string\obeylines
- \string\let\string^\string^M=\string\jsR c}}}
+ \iwvo{\string\makeatletter}
+ {\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}}}
+% \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}}}
+ {\escapechar=-1 \lccode`C=`\%\lowercase{%
+ \iwvo{\string\\catcode`\string\\"=12C}}}
}
-\def\beginseg
-{%
- {\lccode`P=`\{\lccode`C=`\%\lowercase{%
- \iwvo{\string\gdef\string\dljs\dljsBase\roman{dljssegs}PC}}}%
+\def\beginseg{%
+ {\lccode`P=`\{\lccode`C=`\%\lowercase{%
+ \iwvo{\string\gdef\string\dljs\dljsBase\roman{dljssegs}PC}}}%
+ \applydljs{\iwvo{var _thereisdjs=true;}}%
}
% \end{macrocode}
% With \cs{enddsljs}, we now finish the macro definition with a closing right brace, followed by a
% comment, `\texttt\%, and an end of group.
% \begin{macrocode}
-\def\endseg
-{%
- {\uccode`c=`\%\uccode`p=`\}\uppercase{\iwvo{pc}}}%
-}
-\def\enddljs
-{%
- \iwvo{\string\endgroup}%
-}
+\def\endseg{{\uccode`c=`\%\uccode`p=`\}\uppercase{\iwvo{pc}}}}
+\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}.}
% \begin{macrocode}
\def\@roman#1{\romannumeral#1}
-\def\write@objs
-{%
- \iwvo{\begingroup}
- \iwvo{\string\catcode`\string\<=12 }
- \iwvo{\string\catcode`\string\>=12 }
- {\lccode`C=`\%\lowercase{\iwvo{\string\ccpdftex C}}}
- {\lccode`C=`\%\lowercase{\iwvo{%
- \string\input{dljscc.def}C\the\dljsobjtoks}}}
- \iwvo{\endgroup}
+\def\write@objs{%
+ \iwvo{\begingroup}
+ \iwvo{\string\catcode`\string\<=12 }
+ \iwvo{\string\catcode`\string\>=12 }
+ {\lccode`C=`\%\lowercase{\iwvo{\string\ccpdftex C}}}
+ {\lccode`C=`\%\lowercase{\iwvo{%
+ \string\input{dljscc.def}C\the\dljsobjtoks}}}
+ \iwvo{\endgroup}
}
% \end{macrocode}
% \subsubsection{\texttt{pdftex} Specific Code}
% \begin{macrocode}
\newenvironment{newsegment@pdftex}[1]{%
- \addtocounter{dljssegs}{1}%
- \addtocounter{dljs@cnt}{1}%
- \edef\tmp{^^J\string\immediate\string\pdfobj{ << /S/JavaScript/JS%
- (\string\dljs\dljsBase\roman{dljssegs}) >> }}%
- \edef\@dljstmp{\the\dljsobjtoks\tmp}%
- \global\dljsobjtoks=\expandafter{\@dljstmp}%
- \edef\tmp{^^J\string\xdef\string\obj\dljsBase\roman{dljssegs}%
- {\string\the\string\pdflastobj\string\space 0 R}}%
- \edef\@dljstmp{\the\dljsobjtoks\tmp}%
- \global\dljsobjtoks=\expandafter{\@dljstmp}%
- \edef\curr@Cnt{\ifnum\arabic{dljs@cnt}<10 0\fi\arabic{dljs@cnt}}%
- \Hy@unicodefalse\pdfstringdef{\dljsName}{#1}%
- \edef\dljspdftextmp
- {\the\importfdftoks (\curr@Cnt\space\dljsName)
- \noexpand\csname obj\dljsBase\roman{dljssegs}%
- \noexpand\endcsname\space}%
- \global\importfdftoks=\expandafter{\dljspdftextmp}%
- \beginseg
- \js@verbatimwrite
+ \addtocounter{dljssegs}{1}%
+ \addtocounter{dljs@cnt}{1}%
+ \edef\tmp{^^J\string\immediate\string\pdfobj{ << /S/JavaScript/JS%
+ (\string\dljs\dljsBase\roman{dljssegs}) >> }}%
+ \edef\@dljstmp{\the\dljsobjtoks\tmp}%
+ \global\dljsobjtoks=\expandafter{\@dljstmp}%
+ \edef\tmp{^^J\string\xdef\string\obj\dljsBase\roman{dljssegs}%
+ {\string\the\string\pdflastobj\string\space 0 R}}%
+ \edef\@dljstmp{\the\dljsobjtoks\tmp}%
+ \global\dljsobjtoks=\expandafter{\@dljstmp}%
+ \edef\curr@Cnt{\ifnum\arabic{dljs@cnt}<10 0\fi\arabic{dljs@cnt}}%
+ \Hy@unicodefalse\pdfstringdef{\dljsName}{#1}%
+ \edef\dljspdftextmp
+ {\the\importfdftoks (\curr@Cnt\space\dljsName)
+ \noexpand\csname obj\dljsBase\roman{dljssegs}%
+ \noexpand\endcsname\space}%
+ \global\importfdftoks=\expandafter{\dljspdftextmp}%
+ \beginseg
+ \js@verbatimwrite
}{%
- \endjs@verbatimwrite
- \endseg
+ \endjs@verbatimwrite
+ \endseg
}
% \end{macrocode}
% The main branch of the \texttt{insDLJS} for \texttt{pdftex}. This
@@ -2106,26 +2109,26 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% is input back into the file using \cmd{\AtBeginDocument}.
% \begin{macrocode}
\newenvironment{insert@DLJS@pdftex}{%
- \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
- \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
- \begindljs
- \ifx\multisegments\dl@NO\expandafter
- \newsegment\expandafter{\expandafter\dljsName\expandafter}\fi
+ \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
+ \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
+ \begindljs
+ \ifx\multisegments\dl@NO\expandafter
+ \newsegment\expandafter{\expandafter\dljsName\expandafter}\fi
}{%
- \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi
- \enddljs
- \write@objs
- \endjs@verbatimwrite
- \closejs@verbatim@out
- \edef\@dljstmp{\noexpand\AtBeginDocument{%
- \noexpand\input{\js@Path\dljsBase.djs}}}%
- \@dljstmp
- \ifx\importdljs\dl@YES
- \ifx\firstdljs\dl@YES
- \AtEndDocument{\edef\@dljstmp{\setDLJSRef@pdftex}\@dljstmp}
- \global\let\firstdljs\dl@NO
- \fi
+ \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi
+ \enddljs
+ \write@objs
+ \endjs@verbatimwrite
+ \closejs@verbatim@out
+ \edef\@dljstmp{\noexpand\AtBeginDocument{%
+ \noexpand\input{\js@Path\dljsBase.djs}}}%
+ \@dljstmp
+ \ifx\importdljs\dl@YES
+ \ifx\firstdljs\dl@YES
+ \AtEndDocument{\edef\@dljstmp{\setDLJSRef@pdftex}\@dljstmp}
+ \global\let\firstdljs\dl@NO
\fi
+ \fi
}
% \end{macrocode}
% This code places the \texttt{/JavaScript} key-value in the \texttt{/Names} dictionary
@@ -2145,26 +2148,26 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% \begin{macrocode}
\newenvironment{newsegment@dvipdfm}[1]
{%
- \addtocounter{dljssegs}{1}%
- \addtocounter{dljs@cnt}{1}%
- \edef\tmp{^^J\string\immediate\string
- \csname\space @pdfm@mark\string\endcsname
- {obj @obj\dljsBase\roman{dljssegs}\space << /S/JavaScript%
- /JS(\string\dljs\dljsBase\roman{dljssegs}) >> }}%
- \edef\@dljstmp{\the\dljsobjtoks\space\tmp}%
- \global\dljsobjtoks=\expandafter{\@dljstmp}%
- \edef\curr@Cnt{\ifnum\arabic{dljs@cnt}<10 0\fi\arabic{dljs@cnt}}%
- {\def\1{\string\1}\def\2{\string2}%
- \def\3{\string\3}\xdef\dljsName{#1}}%
- \edef\dljspdftextmp
- {\the\importfdftoks (\curr@Cnt\space \dljsName) %
- @obj\dljsBase\roman{dljssegs}\space}%
- \global\importfdftoks=\expandafter{\dljspdftextmp}%
- \beginseg
- \js@verbatimwrite
+ \addtocounter{dljssegs}{1}%
+ \addtocounter{dljs@cnt}{1}%
+ \edef\tmp{^^J\string\immediate\string
+ \csname\space @pdfm@mark\string\endcsname
+ {obj @obj\dljsBase\roman{dljssegs}\space << /S/JavaScript%
+ /JS(\string\dljs\dljsBase\roman{dljssegs}) >> }}%
+ \edef\@dljstmp{\the\dljsobjtoks\space\tmp}%
+ \global\dljsobjtoks=\expandafter{\@dljstmp}%
+ \edef\curr@Cnt{\ifnum\arabic{dljs@cnt}<10 0\fi\arabic{dljs@cnt}}%
+ {\def\1{\string\1}\def\2{\string2}%
+ \def\3{\string\3}\xdef\dljsName{#1}}%
+ \edef\dljspdftextmp
+ {\the\importfdftoks (\curr@Cnt\space \dljsName) %
+ @obj\dljsBase\roman{dljssegs}\space}%
+ \global\importfdftoks=\expandafter{\dljspdftextmp}%
+ \beginseg
+ \js@verbatimwrite
}{%
- \endjs@verbatimwrite
- \endseg
+ \endjs@verbatimwrite
+ \endseg
}
% \end{macrocode}
% This code places the \texttt{/JavaScript} key-value in the \texttt{/Names} dictionary
@@ -2185,30 +2188,29 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% \begin{macrocode}
\newenvironment{insert@DLJS@dvipdfm}
{%
- \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
- \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
- \begindljs
- \ifx\multisegments\dl@NO\expandafter\newsegment\expandafter{%
- \expandafter\dljsName\expandafter}\fi
+ \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
+ \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
+ \begindljs
+ \ifx\multisegments\dl@NO\expandafter\newsegment\expandafter{%
+ \expandafter\dljsName\expandafter}\fi
}{%
- \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi
- \enddljs
- \write@objs
- \endjs@verbatimwrite
- \closejs@verbatim@out
- \edef\@dljstmp{\noexpand\AtBeginDocument{%
- \noexpand\input{\js@Path\dljsBase.djs}}}%
- \@dljstmp
- \ifx\importdljs\dl@YES
- \ifx\firstdljs\dl@YES
+ \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi
+ \enddljs
+ \write@objs
+ \endjs@verbatimwrite
+ \closejs@verbatim@out
+ \edef\@dljstmp{\noexpand\AtBeginDocument{%
+ \noexpand\input{\js@Path\dljsBase.djs}}}%
+ \@dljstmp
+ \ifx\importdljs\dl@YES
+ \ifx\firstdljs\dl@YES
% \end{macrocode}
% 2012/06/09 Changed positioning of \cmd{\setDLJSRef@dvipdfm}.
% \begin{macrocode}
- \AtBeginDocument{\setDLJSRef@dvipdfm}%
-% \AtEndDocument{\setDLJSRef@dvipdfm}
- \global\let\firstdljs\dl@NO
- \fi
+ \AtBeginDocument{\setDLJSRef@dvipdfm}%
+ \global\let\firstdljs\dl@NO
\fi
+ \fi
}
\catcode`\"=\dl@dquoteCat
%</package>
diff --git a/texmf-dist/source/latex/acrotex/web.dtx b/texmf-dist/source/latex/acrotex/web.dtx
index 36ddc705..0fa68d7e 100644
--- a/texmf-dist/source/latex/acrotex/web.dtx
+++ b/texmf-dist/source/latex/acrotex/web.dtx
@@ -59,7 +59,6 @@
% \MakeShortVerb{|}
% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{web}{Inputting aebdonotindex.def}}
% {\PackageInfo{web}{cannot find aebdonotindex.def}}
-%
% \begin{macrocode}
%<*package>
% \end{macrocode}
@@ -5459,9 +5458,9 @@
\marginpar{\raggedleft\PrintDescribeMacro{#1}}}
%</docdefs>
%<dnidefs>% \DoNotIndex{\",\-,\#,\%,\&,\',\),\(,\*,\+,\-,\.,\,,\/,\<,\>,\@}
-%<dnidefs>% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let, \catcode}
+%<dnidefs>% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let,\catcode}
%<dnidefs>% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi,\advance}
-%<dnidefs>% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup, \begin,\end}
+%<dnidefs>% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup,\bgroup,\egroup.\begin,\end}
%<dnidefs>% \DoNotIndex{\newenvironment,\renewenvironment,\newcommand,\renewcommand}
%<dnidefs>% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
%<dnidefs>% \DoNotIndex{\space,\@empty,\special,\arabic,\meaning,\message,\MessageBreak,\medskip,\makebox,\parbox,\noexpand,\expandafter,\noindent,\indent}
diff --git a/texmf-dist/source/latex/acrotex/web.ins b/texmf-dist/source/latex/acrotex/web.ins
index 3de43e1a..8b33de11 100644
--- a/texmf-dist/source/latex/acrotex/web.ins
+++ b/texmf-dist/source/latex/acrotex/web.ins
@@ -54,11 +54,15 @@
% Uncomment lines below and compile web.ins to obtain the formatting
% definitions contained in aebdocfmt.doc and aebdonotindex.def.
%\usepreamble\@empty
-%\generate
-%{%
-% \file{aebdocfmt.def}{\from{web.dtx}{copyright,docdefs}}
-% \file{aebdonotindex.def}{\from{web.dtx}{dnidefs}}
-%}
+
+%\usepostamble\empty
+\usepreamble\empty
+
+\generate
+{%
+ \file{aebdocfmt.def}{\from{web.dtx}{copyright,docdefs}}
+ \file{aebdonotindex.def}{\from{web.dtx}{dnidefs}}
+}
\Msg{***************************************************************}
\Msg{*}
diff --git a/texmf-dist/tex/latex/acrotex/aebdocfmt.def b/texmf-dist/tex/latex/acrotex/aebdocfmt.def
new file mode 100644
index 00000000..2b17e769
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/aebdocfmt.def
@@ -0,0 +1,87 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Web package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% History: Noel Vaillant began developing a better web.sty
+%% based on my earlier published web.sty. Many thanks
+%% to him for starting me off.
+%%---------------------------------------------------------
+\newcommand{\setupFullwidth}{%
+ \setlength{\textwidth}{\paperwidth}%
+ \advance\textwidth-2in
+ \setlength{\linewidth}{\textwidth}%
+ \setlength{\columnseprule}{0pt}%
+ \setlength{\oddsidemargin}{0in}%
+ \setlength{\evensidemargin}{0in}%
+}
+\makeatletter
+\def\clindx{\ifcodeline@index\expandafter\@firstoftwo\else
+ \expandafter\@secondoftwo\fi}
+\GlossaryPrologue{\section{Change History}}
+\IndexPrologue{\section{Index} \parbox{\linewidth}{Numbers written in italic
+ refer to the page where the corresponding entry is described;
+ numbers underlined refer to the
+\clindx{code line of the}{}
+ definition; numbers in roman refer to the
+\clindx{code lines}{pages}
+ where the entry is used.}\medskip}
+\value{IndexColumns}=2
+\value{GlossaryColumns}=2
+\def\changes@#1#2#3{%
+ \protected@edef\@tempa{\noexpand\glossary{#1 (#2)\levelchar
+ \ifx\saved@macroname\@empty
+ \space
+ \actualchar
+ \generalname
+ \else
+ \expandafter\@gobble
+ \saved@macroname
+ \actualchar
+ \string\verb\quotechar*%
+ \verbatimchar\saved@macroname
+ \verbatimchar
+ \fi
+ :\levelchar #3}}%
+ \@tempa\endgroup\@esphack}
+\def\SpecialMainOptIndex#1{\@bsphack\index{%
+ #1\actualchar
+ {\string\ttfamily\space#1}
+ (option)%
+ \encapchar usage}%
+ \index{options:\levelchar#1\actualchar{%
+ \string\ttfamily\space#1}\encapchar
+ usage}\@esphack}
+\def\SpecialMainKeyIndex#1{\@bsphack\index{%
+ #1\actualchar
+ {\string\ttfamily\space#1}
+ (key)%
+ \encapchar usage}%
+ \index{keys:\levelchar#1\actualchar{%
+ \string\ttfamily\space#1}\encapchar
+ usage}\@esphack}
+\def\SpecialMainJSIndex#1{\@bsphack\index{%
+ #1\actualchar
+ {\string\ttfamily\space#1}
+ (JS function)%
+ \encapchar usage}%
+ \index{JS functions:\levelchar#1\actualchar{%
+ \string\ttfamily\space#1}\encapchar
+ usage}\@esphack}
+\makeatother
+\def\IndexOpt#1{\SpecialMainOptIndex{#1}%
+ \marginpar{\raggedleft\PrintDescribeMacro{#1}}}
+\def\IndexKey#1{\SpecialMainKeyIndex{#1}%
+ \marginpar{\raggedleft\PrintDescribeMacro{#1}}}
+\def\IndexJS#1{\SpecialMainJSIndex{#1}%
+ \marginpar{\raggedleft\PrintDescribeMacro{#1}}}
+\endinput
+%%
+%% End of file `aebdocfmt.def'.
diff --git a/texmf-dist/tex/latex/acrotex/aebdonotindex.def b/texmf-dist/tex/latex/acrotex/aebdonotindex.def
new file mode 100644
index 00000000..e8ab1f73
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/aebdonotindex.def
@@ -0,0 +1,24 @@
+% \DoNotIndex{\",\-,\#,\%,\&,\',\),\(,\*,\+,\-,\.,\,,\/,\<,\>,\@}
+% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let,\catcode}
+% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi,\advance}
+% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup,\bgroup,\egroup.\begin,\end}
+% \DoNotIndex{\newenvironment,\renewenvironment,\newcommand,\renewcommand}
+% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
+% \DoNotIndex{\space,\@empty,\special,\arabic,\meaning,\message,\MessageBreak,\medskip,\makebox,\parbox,\noexpand,\expandafter,\noindent,\indent}
+% \DoNotIndex{\par,\@@par,\@@temp,\@@tmp,\@M,\@esphack,\@for,\@firstoffive,\@firstoftwo,\@fleqnfalse,\@fleqntrue}
+% \DoNotIndex{\@gobble,\@gobbletwo,\@gobblethree,\@ifnextchar, \@ifpackagelater,\@ifpackageloaded,\@ifstar,\@ifundefined}
+% \DoNotIndex{\@namedef,\@nameuse,\@ne,\@par,\@temp,\@tempa,\@tempcnta,\@tempcntb,\@tempdima,\@tempdimb,\@tfor}
+% \DoNotIndex{\@tfor,\@temptokena,\@toodeep,\@whilenum,\@xarraycr,\@xtabularcr,\toks@}
+% \DoNotIndex{\alph,\bfseries,\count,\count@,\count@ii,\cs,\closein,\closeout,\define@key,\protect}
+% \DoNotIndex{\if,\i,\ifcase,\ifdimen,\ifnum,\ifinner,\ifnum,\ifodd,\ignorespaces,\immediate,\jobname}
+% \DoNotIndex{\jsR,\jsT,\leavevmode,\linewidth,\newif,\newlength,\newcounter,\newcount,\newread,\newtoks,\newpage}
+% \DoNotIndex{\setkeys,\setlength,\settowidth,\typeout,\tw@,\c@page,\z@,\z@skip,\@nil,\@makeatletter,\@makeatother}
+% \DoNotIndex{\[,\],\{,\},\^,\|}
+% \DoNotIndex{\\,\0,\1,\2,\3,\8}
+% \DoNotIndex{\do,\dp,\ht,\wd,\hfill,\hfil,\hoffset,\hfuzz,\hss,\hsize,\hskip,\hspace,\hbox,
+% \vfill,\vfuzz,\vglue,\voffset,\vskip,\vspace,\vbox,\vtop}
+% \DoNotIndex{\ifcase,\or,\value,\addtolength,\settowidth,\val,\nr}
+% \DoNotIndex{\unskip,\marginpar,\mbox,\quad,\qquad}
+\endinput
+%%
+%% End of file `aebdonotindex.def'.
diff --git a/texmf-dist/tex/latex/acrotex/aebjs.def b/texmf-dist/tex/latex/acrotex/aebjs.def
index 59be747d..57fd0c3b 100644
--- a/texmf-dist/tex/latex/acrotex/aebjs.def
+++ b/texmf-dist/tex/latex/acrotex/aebjs.def
@@ -1,1524 +1,1524 @@
-%%
-%% This is file `aebjs.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,aebjs')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{aebjs.def}
- [2018/03/21 v8.2.2 %
- Exerquiz document level JavaScript (dps)]
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-\def\aeb@array{new Array}
-\def\refac#1{\\(#1\\)}\def\regrp#1{(#1)}\def\rechrclass#1{[#1]}
-\def\redm{\\.}\def\remul{\\*}\def\rediv{\\/}\def\repow{\\^}
-\def\redigit{\\d}\def\reany{.}\def\rebstr{\string^}\def\reestr{\string$}
-\def\preReqForm{\Array(requireForm,\@gobble}
-\def\preDenyForm{\Array(denyForm,\@gobble}
-\def\postDenyForm{\Array(requireFormNot,\@gobble}
-\newcommand{\noPeekArgs}[1]{%
- \def\NoPeekAlert{eqAppAlert(#1)}}\def\newNoPeekArgs{}
-\def\NoPeekAlert{eqAppAlert(\noPeekMsg,3)}
-\newcommand{\dlLibSpecRespJS}{"none","undefined","empty"}
-\newif\ifSubstVars\SubstVarsfalse % dps17
-\newif\ifShowAppr\ShowApprtrue % dps17
-\def\altApprOn{\ShowApprtrue} % dps17
-\def\altApprOff{\ShowApprfalse} % dps17
-\def\corrChoiceFullyOn{\def\eqCorrChoiceFully{true}}
-\def\corrChoiceFullyOff{\def\eqCorrChoiceFully{false}}
-\corrChoiceFullyOn
-\def\corrLocalChoiceFullyOn{\def\eqCorrLocalChoiceFully{true}} % dpsf07
-\def\corrLocalChoiceFullyOff{\def\eqCorrLocalChoiceFully{false}} % dpsf07
-\def\resetLocalChoiceFully{\let\eqCorrLocalChoiceFully\@empty} % dpsf07
-\resetLocalChoiceFully % no local implementation
-\begin{insDLJS*}[exerquizLoaded]{exerquiz}
-\begin{newsegment}{AeB: AcroTeX eDucation Bundle}
-/*
- Document Level JavaScript
- AcroTeX eDucation Bundle
- D. P. Story copyright 2000-\the\year
-*/
-var exerquizLoaded = true;
-this.disclosed = true;
-app.runtimeHighlight=false;
-\end{newsegment}
-\begin{newsegment}{Eq: Global Data}
-var ok2Continue = true;
-var ProcessIt = true;
-var retn;
-var Score=0;
-var ptScore=0;
-var pcScore=0;
-var quizGrade="C";
-var NQuestions=0;
-var NPointTotal=0;
-var e = Math.E;
-var pi = Math.PI;
-var replaceExclaim = \replaceexclaim;
-var negPointsAllowed = \negpointsallowed;
-var negPointsMarkupAllowed = \negpointsmarkupallowed;
-var aQuizControl = new Object;
-var RightWrong=new Array();
-var ProbValue = new Array();
-var ProbDist = new Array();
-var ProbType = new Array();
-var Responses=new Array();
-var appAlerts = new Object;
-var _mathVars="x";
-var _ModalNotOn=true;
-var GradeScaleDefault=new Array(\eqGradeScale);
-var aDlLibSpecResp=new Array(\dlLibSpecRespJS);
-var JSfBuiltIn = new Array
- ( "abs","acos","asin","atan","ceil", "floor","cos","exp",
- "log","max","min","pow","random","round","sin",
- "sqrt","tan");
-var JSfCustomEarly = new Array ("arctan", "arcsin", "arccos")
-var JSfCustomLate = new Array
- ( "logc", "ln","sec","csc","cot",
- "asinh", "acosh","atanh","acoth","asech","acsch",
- "sinh", "cosh","tanh","coth","sech","csch","sgn",
- "C","P","fact","pi");
-var JSf = new Array().concat(JSfCustomEarly, JSfBuiltIn, JSfCustomLate);
-var JSfCustom = new Array().concat(JSfCustomEarly, JSfCustomLate);
-var JSc = new Array("PI","E")
-function ln(x) { return Math.log(x); }
-function sec(x) { return 1/Math.cos(x); }
-function csc(x) { return 1/Math.sin(x);}
-function cot(x) { return Math.cos(x)/Math.sin(x); }
-function arctan(x) { return Math.atan(x); }
-function arcsin(x) { return Math.asin(x); }
-function arccos(x) { return Math.acos(x); }
-function logc(x) { return Math.LOG10E * Math.log(x); }
-function C(x,y) {return ch(x,y);}
-function P(x,y) {return perm(x,y);}
-function sinh(x) { return ( Math.exp(x) - Math.exp(-x) )/2; }
-function cosh(x) { return ( Math.exp(x) + Math.exp(-x) )/2; }
-function tanh(x) {
- return (Math.exp(x)-Math.exp(-x))/(Math.exp(x)+Math.exp(-x)); }
-function coth(x) {
- return ( Math.exp(x)+Math.exp(-x))/(Math.exp(x)-Math.exp(-x)); }
-function sech(x) { return 2/( Math.exp(x) + Math.exp(-x) )/2; }
-function csch(x) { return 2/( Math.exp(x) - Math.exp(-x) )/2; }
-function asinh(x) { return Math.log (x+Math.sqrt(Math.pow(x,2)+1)); }
-function acosh(x) {
- return Math.log (x+Math.sqrt(Math.pow(x,2)-1)); } // x ge 1
-function atanh(x) { return .5*Math.log ((1+x)/(1-x)); } // -1 < x < 1
-function acoth(x) { return atanh(1/x); } // |x| > 1
-function asech(x) { return acosh(1/x); } // 0 < x le 1
-function asch(x) { return asinh(1/x); } // x ne 0
-function acsch(x) { return asinh(1/x); } // x ne 0
-function sgn(x) { return (x==0?0:(x<0?-1:1)) };
-var aGroup = new Array
- ( ["\(","\)",\eqParens],
- ["[","]",\eqBrackets],
- ["{","}",\eqBraces]
- );
-\end{newsegment}
-\begin{newsegment}{Eq: Support for Math Fill-in}
-var _mto;
-function eqAppAlert(args) {
- _ModalNotOn = false;
- var retn=app.alert(args);
- _mto= app.setTimeOut("_ModalNotOn = true", 100);
- return retn;
-}
-function CkBalP(UserInput,lDelimiter,rDelimiter)
-{
- var Lcount=0, Rcount=0;
- for (var k=0; k < UserInput.length; k++)
- {
- if (UserInput.charAt(k) == lDelimiter) Lcount++;
- else if (UserInput.charAt(k) == rDelimiter) Rcount++;
- }
- return (Lcount==Rcount);
-}
-function CkBalVert(UserInput)
-{
- var Lcount=0;
- for (var k=0; k < UserInput.length; k++)
- if (UserInput.charAt(k)=="|") Lcount++;
- return (Lcount \% 2 == 0);
-}
-function Ckfuncs(UserInput)
-{
- var re, rei, reii;
- re = /[a-zA-Z]{2,}/g;
- reii=/r:|i:|,/g
- var _v=_mathVars.replace(reii,"");
-rei=new RegExp("[^"+_v+"]", "g");
- aF = UserInput.match(re);
- if ( aF == null ) return true;
- for (var i=0; i < aF.length; i++)
- {
-if ( rei.exec(aF[i]) == null ) continue;
- for(var j=0; j < JSf.length; j++)
- if ( aF[i].indexOf(JSf[j]) != -1 ) break;
- if (j < JSf.length) continue;
- for(var j=0; j < JSc.length; j++)
- if ( aF[i].indexOf(JSc[j]) != -1 ) break;
- if(j==JSc.length)
- {
- eqAppAlert(\eqerrBadMathFunc,3);
- ok2Continue=false;
- return false;
- }
- }
- return true;
-}
-function DisplayAnswer(fieldname,theanswer)
-{
- ProcessIt = false;
- var oDefault;
- if (arguments.length > 2 )
- var oQName = arguments[2];
- else var oQName = oDefault;
- if (typeof oQName=="undefined")
- var oQName = new Object;
- var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
-?\defaultColorJS:oQName.DefaultColorJSLoc;
- try {
- this.getField(fieldname).value=(theanswer);
- } catch(e) {}
- ProcessIt = true;
-}
-function EvalCorrAnsButton(fieldname,theanswer)
-{
- theanswer = eval(theanswer);
- DisplayAnswer(fieldname,theanswer);
-}
-function FindBalP(UserInput,Poff,Forward)
-{
- var j,depth;
- if (Forward)
- {
- for (depth=-1, j=Poff+1; depth !=0; j++)
- {
- if ( j > UserInput.length) return null;
- if (UserInput.charAt(j)=="\(") depth--;
- else if (UserInput.charAt(j)=="\)") depth++;
- }
- j--
- }
- else
- {
- for (depth=-1, j=Poff-1; depth !=0; j--)
- {
- if ( j < 1 ) return null;
- if (UserInput.charAt(j)=="\)") depth--;
- else if (UserInput.charAt(j)=="\(") depth++;
- }
- j++
- }
- return j;
-}
-function stripWhiteSpace (UserInput)
-{
- UserInput = UserInput.replace(/\s/g,"");
- if(UserInput==null || UserInput.length==0)
- {
- ok2Continue = false;
- return false;
- } else return UserInput;
-}
-function stripOutMuli (UserInput)
-{
- UserInput = UserInput.replace(/\*/g,"");
- return UserInput;
-}
-function addMathObject(UserInput)
-{
- for ( var i=0; i < JSfBuiltIn.length; i++) {
- var re = new RegExp("\\b("+JSfBuiltIn[i]+")\\b","g");
- UserInput = UserInput.replace(re,"Math.$1");
- }
- re = /\b(PI)\b/g;
- UserInput = UserInput.replace(re,"Math.$1");
- return UserInput;
-}
-function ParseInput(UserInput)
-{
- var re, repi;
- re = /\b(a)\b/g;
- UserInput = UserInput.replace(re, "(a)");
- UserInput = stripWhiteSpace (UserInput);
- if (!ok2Continue) return null;
- for(var i=0; i< aGroup.length; i++)
- {
- if(!CkBalP(UserInput, aGroup[i][0], aGroup[i][1]))
- {
- eqAppAlert(\eqerrDelimNotBal,3);
- ok2Continue = false;
- return false;
- }
- }
- UserInput = ChngAllGrpsToParens(UserInput);
- if ( replaceExclaim &&(typeof fact == "function") )
- UserInput = UserInput.replace(%
-/(?=\()?(\d+)(?=\))?!/g,"fact($1)");
- if (!CkBalVert(UserInput))
- {
- eqAppAlert(\eqerrABS,3);
- ok2Continue = false;
- return false;
- }
- UserInput=groupJSf(UserInput);
- re=/(\w)(e)(\^)/g;
- repi=/(\w)(pi)/g;
- UserInput=UserInput.replace(re, "$1*$2$3");
- UserInput=UserInput.replace(repi, "$1*$2");
- UserInput=UserInput.replace(/(sec)/g, "s@e@c");
- re=/(\w)(e)([^\^])?/g;
- UserInput=UserInput.replace(re,"$1($2\^1)$3");
- UserInput=UserInput.replace(/(s@e@c)/g, "sec");
- re=/E(\d)/g;
- UserInput=UserInput.replace(re,"E+$1");
- re=/(\d)\*E/g;
- UserInput=UserInput.replace(re,"$1E");
- if(!Ckfuncs(UserInput)) return false;
- if (typeof(Ck4Exponents) != "undefined")
- UserInput = Ck4Exponents(UserInput);
- if (typeof(Ck4Products) != "undefined" )
- UserInput = Ck4Products(UserInput);
- ok2Continue = true;
- re = /\b(log)\b/g;
- UserInput = UserInput.replace(re, "logc");
- while (/\|/.test(UserInput)&&(ok2Continue))
- {
- re = /(\|)([^\|]*)(\|)([-\+\/\*\^\)\|])/;
- if (re.test(UserInput))
- if (re.exec(UserInput)[4] == '^')
- UserInput = UserInput.replace(re, "(abs($2))$4");
- else
- UserInput = UserInput.replace(re, "abs($2)$4");
- else
- {
- re = /(\|)([^\|]*)(\|$)/;
- if (re.test(UserInput))
- UserInput = UserInput.replace(re, "abs($2)");
- }
- }
- re=/\b(pi)\b/g;
- UserInput=UserInput.replace(re,"($1)")
- var reTstExp = /(\))?\^(\()?/g;
- while ( ((aResults=reTstExp.exec(UserInput))!=null)&&(ok2Continue) )
- {
- var firstGroup = Number(Boolean(aResults[1])); // 0 or 1
- var secondGroup = 2*Number(Boolean(aResults[2])); // 0 or 2
- var caseStudy = firstGroup+secondGroup; // 0,1,2,3
- switch(caseStudy) {
- case 0:
- re=/([a-zA-Z]|\d*\.?\d*)\^([a-zA-Z]|[\+-]?\d+\.?\d*|%
-[\+-]?\d*\.?\d+)/;
- if (re.test(UserInput))
- UserInput=Ck4OddRoots(UserInput,re);
- else ok2Continue=false;
- break;
- case 1:
- aP =/\)\^/.exec(UserInput);
- LeftP=FindBalP(UserInput,aP.index,0);
- re = new RegExp("\\((.{"+eval(aP.index-LeftP-1)
- +"})\\)\\^([a-zA-Z]|[\+-]?\\d+\\.?\\d*|%
-[\+-]?\\d*\\.?\\d+)");
- if (re.test(UserInput))
- UserInput=Ck4OddRoots(UserInput,re);
- else ok2Continue=false;
- break;
- case 2:
- aP = /\^\(/.exec(UserInput);
- RightP=FindBalP(UserInput,aP.index+1,1);
- re = new RegExp("([a-zA-Z]|\\d*\\.?\\d*)\\^\\((.{"
- +eval(RightP-aP.index-2)+"})\\)");
- if (re.test(UserInput))
- UserInput=Ck4OddRoots(UserInput,re);
- else ok2Continue=false;
- break;
- case 3:
- aP = /\)\^\(/.exec(UserInput);
- LeftP=FindBalP(UserInput,aP.index,0);
- RightP=FindBalP(UserInput,aP.index+2,1);
- re = new RegExp("\\((.{"+eval(aP.index-LeftP-1)
- +"})\\)\\^\\((.{"+eval(RightP-aP.index-3)+"})\\)");
- if (re.test(UserInput))
- UserInput=Ck4OddRoots(UserInput,re);
- else ok2Continue=false;
- break;
- default:
- ok2Continue=false;
- }
- }
- if (!ok2Continue)
- {
- eqAppAlert(\eqerrBadExp,3);
- return false;
- }
- else {
- UserInput=addMathObject(UserInput);
- return UserInput;
- }
-}
-function ChngAllGrpsToParens(UserInput)
-{
- UserInput = UserInput.replace(/\[|\{/g, "\(");
- UserInput = UserInput.replace(/\]|\}/g, "\)");
- return UserInput;
-}
-function Ck4OddRoots(UserInput,re) {
- var a=re.exec(UserInput);
- while ( a[2].charAt(0)=="\(") {
- var RightP=FindBalP(a[2],0,1); // forward search
- if (RightP == a[2].length-1)
- a[2]=a[2].substring(1,a[2].length-1);
- else break;
- }
- var b=a[2].split("/");
- if ( b.length==2 ) {
- try { _m=eval(b[1])
- if ( _m == undefined || isNaN(_m) ) throw new Error();
- var d = b[1];
- var isEnclosed=(d.charAt(0) == "\(" && d.charAt(d.length-1)=="\)");
- if (!isEnclosed)
- if (/.+[\+\-].+/.test(d)) throw new Error();
- if (isEnclosed) d = s.substring(1,d.length-1);
- var n = b[0];
- isEnclosed=(n.charAt(0) == "\(" && n.charAt(d.length-1)=="\)");
- if (!isEnclosed)
- if (/.+[\+\-].+/.test(n)) throw new Error();
- if ( d == parseInt(d) && ( Boolean(d \% 2) ) ) {
- UserInput=UserInput.replace(re,
- "(pow(sgn($1),"+n+")*(pow(abs($1),$2)))");
- return UserInput;
- }
- } catch(e) {}
- }
- UserInput=UserInput.replace(re,"(pow($1,$2))");
- return UserInput;
-}
-function groupJSf(UserInput)
-{
- var re, regexp, aP, RightP;
- for (var i=0; (i<JSf.length) && (ok2Continue); i++)
- {
- re = new RegExp(JSf[i]+"\\\(");
- while ( re.test(UserInput) && (ok2Continue) )
- {
- regexp = new RegExp(JSf[i]+"\\\(", "g");
- if ( (aP = regexp.exec(UserInput)) != null )
- {
- RightP=FindBalP(UserInput,regexp.lastIndex-1,1);
- offsetArg = RightP - regexp.lastIndex;
- regexp = new RegExp(%
-"("+JSf[i]+")\\((.{"+offsetArg+"})\\)");
- regexp.lastIndex=0;
- if (regexp.test(UserInput))
- UserInput=UserInput.replace(regexp,"($1@($2))");
- else ok2Continue=false;
- continue;
- }
- }
- }
- UserInput=UserInput.replace(/@/g,"");
- return UserInput;
-}
-function TypeParameters(v)
-{
- var aV;
- aV = ( (v.indexOf(":") == -1) && (v.indexOf(",") == -1) ) ?
- v.split("") : v.split(",");
- for ( var i=0; i < aV.length; i++)
- if ( aV[i].indexOf(":") == -1 ) aV[i] = "r:"+aV[i];
- return aV.join(",")
-}
-function ProcResp(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
-{
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(arguments.length>7)?arguments[7]:event.value;
- var success = _ProcResp(flag,CorrAns,UserAns,%
-n,epsilon,domain,indepVars,oComp);
- if ( success == -1 || !ok2Continue )
- { resetHeadsUp(flag,fieldname); return null; } // dps17
- if ( success == null )
- { resetHeadsUp(flag,fieldname);
- return syntaxError(), null; } // dps17
- return notifyField(success, flag, fieldname);
-}
-// changed name of var comp -> oComp
-function _ProcResp(flag,CorrAns,UserAns,n,epsilon,domain,%
-indepVars,oComp){
- ok2Continue = true;
- CorrAns = ParseInput(CorrAns);
- if (!ok2Continue) {
- eqAppAlert("Syntax error in author's answer! Check console.",3);
- return null;
- }
- var comp = ( typeof oComp == "object" ) ?
- ((typeof oComp.comp == "undefined" ) ?
- diffCompare : oComp.comp ) : oComp;
- if ( (typeof(oComp)=="object") %
-&& (typeof(oComp.priorParse)!="undefined") ) {
- var retn=processSpecialParse(oComp.priorParse,UserAns);
- if (retn==null) return -1;
- }
- var reCP=/((C|P)\(.+?)(,)(.+?\))/g
- UserAns=UserAns.replace(reCP,"$1@c@$4");
- var reComma=/,/;
- if ( reComma.test(UserAns) ) {
- eqAppAlert(\eqSyntaxErrorComma,3);
- return -1;
- }
- var reRlCommaSubst=/@c@/g;
- UserAns=UserAns.replace(reRlCommaSubst,",");
- UserAns = ParseInput(UserAns);
- indepVars = TypeParameters(indepVars);
- if (!ok2Continue) return null;
- var success=randomPointCompare(n,domain,indepVars,%
-epsilon,CorrAns,UserAns,comp);
- if ( success && (typeof(oComp)=="object") %
-&& (typeof(oComp.postParse)!="undefined") )
- success=processSpecialParse(oComp.postParse,UserAns);
- return success;
-}
-function processSpecialParse(oParse,UserAns) {
- var retn, f, _o
- if ( typeof(oParse) == "object" ) {
- for ( var i=0; i < oParse.length; i++) {
- _o=oParse[i];
- if (typeof(_o)=="function") {
- retn=_o(UserAns);
- if (retn==null) return retn;
- } else {
- retn=_o[0].apply(null, [ UserAns ].concat(_o.slice(1)));
- if (retn==null) return null;
- }
- }
- } else {
- retn = oParse(UserAns);
- }
- return retn;
-}
-function randomPointCompare (n,domain,indepVars,epsilon,%
-CorrAns,userAns,comp)
-{
- var error, i, j, k;
- var aXY = new Array();
- domain = domain.replace(/[\[\]\s]/g, "");
- var aIntervals = domain.split("&");
- for (k=0; k < aIntervals.length; k++)
- {
- var aInterval = aIntervals[k].split("x");
- nI = aInterval.length;
- with (Math) {
- for (j=0; j < n; j++)
- {
- for (i=0; i < nI; i++)
- {
- var endpoints = aInterval[i].split(",");
- aXY[i] = eval(endpoints[0])-0+(eval(endpoints[1])%
--eval(endpoints[0]))*Math.random();
- }
- var cXY = aXY.toString();
- error = comp(domain,cXY,indepVars,CorrAns,userAns);
- if (error == null) return null;
- if ( (error == -1) || (error > epsilon) ) {j=-1; break;}
- }
- }
- if (j!=n) return false;
- }
- return true;
-}
-function diffCompare(_a,_c,_v,_F,_G) {
- var aXY = _c.split(",");
- var _V = _v.split(","); // e.g. _V[0] = "i:x"
- 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])+";");
- }
- _F = eval(_F);
- if ( app.viewerVersion >= 5)
- {
- var rtnCode = 0;
- eval("try {if(isNaN(_G = eval(_G))) rtnCode=-1; }"
- +"catch (e) { rtnCode=1; }");
- switch(rtnCode)
- {
- case 0: break;
- case 1: return null;
- case -1: return -1;
- }
- }
- else
- if(isNaN(_G = eval(_G))) return -1;
- return Math.abs ( _F - _G );
-}
-function reldiffCompare(_a,_c,_v,_F,_G) {
- var aXY = _c.split(",");
- var _V = _v.split(","); // e.g. _V[0] = "i:x"
- 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])+";");
- }
- _F = eval(_F);
- if ( app.viewerVersion >= 5)
- {
- var rtnCode = 0;
- eval("try { if(isNaN(_G = eval(_G))) rtnCode=-1; }"
- +"catch (e) { rtnCode=1; }");
- switch(rtnCode)
- {
- case 0: break;
- case 1: return null;
- case -1: return -1;
- }
- }
- else
- if(isNaN(_G = eval(_G))) return -1;
- return Math.abs ( (_F - _G)/_G );
-}
-function requireForm(UserAns, regexpr) {
- var msg=\defaultReqFormMsg;
- UserAns = stripWhiteSpace (UserAns);
- if (!ok2Continue) return null;
- UserAns = ChngAllGrpsToParens(UserAns);
- if (arguments.length>2) msg=arguments[2];
- if (typeof(regexpr.length)=="undefined") {
- if (regexpr.test(UserAns)) return true;
- else { eqAppAlert(msg,3); return null; }
- } else {
- for (var i=0; i<regexpr.length; i++)
- if (regexpr[i].test(UserAns)) break;
- if ( i < regexpr.length ) return true;
- else { eqAppAlert(msg,3); return null; }
- }
-}
-function denyForm(UserAns, regexpr) {
- var msg=\defaultReqFormMsg;
- UserAns = stripWhiteSpace (UserAns);
- if (!ok2Continue) return null;
- UserAns = ChngAllGrpsToParens(UserAns);
- if (arguments.length>2) msg=arguments[2];
- if (typeof(regexpr.length)=="undefined") {
- if (regexpr.test(UserAns)) { eqAppAlert(msg,3); return null; }
- else return true;
- } else {
- for (var i=0; i<regexpr.length; i++)
- if (regexpr[i].test(UserAns)) break;
- if ( i < regexpr.length ) { eqAppAlert(msg,3); return null; }
- else return true;
- }
-}
-function requireFormNot(UserAns, regexpr) {
- UserAns = stripWhiteSpace (UserAns);
- if (!ok2Continue) return null;
- UserAns = stripOutMuli(UserAns);
- UserAns = ChngAllGrpsToParens(UserAns);
- if (typeof(regexpr.length)=="undefined") {
- if (regexpr.test(UserAns)) return false;
- else return true;
- } else {
- for (var i=0; i<regexpr.length; i++)
- if (regexpr[i].test(UserAns)) break;
- if ( i < regexpr.length ) return false;
- else return true;
- }
-}
-\end{newsegment}
-\begin{newsegment}{Eq: Support for multi-letter variables}
-if (!String.prototype.trim) {
- String.prototype.trim = function () {
- return this.replace(/^[\s\string\uFEFF\string\xA0]+|%
-[\s\string\uFEFF\string\xA0]+$/g, '');
- };
-}
-function _rplVarsBy(str1,str2) {
- var re=new RegExp(str1,"g");
- var result=str1.replace(re,str2);
- return result;
-}
-function processMathVars(str) {
- var pos1,pos2,lead,tmp;
- while ((pos1=str.indexOf("_rplVarsBy"))!=-1) {
- pos2=str.indexOf("@");
- lead=str.substring(0,pos1);
- tmp=str.substring(pos1,pos2);
- str=str.substring(pos2+1);
- tmp=eval(tmp);
- str=lead+tmp+str;
- }
- str=str.replace(/\s/g,"");
- return str;
-}
-getSubstValue.aSubsts=new Array(); // dps17
-function getSubstValue(v,s){
-/*
- v=variable list, it may have the form "xyz", or if there
- substitutions, it might look like "_rplVarsBy('theta','x')@";
- s=Either the user's answer or the author's answer.
-
- First develop an array of all variables are their substitutes.
- ie, getSubstValue.aSubsts=[ "c","h", ["theta",x"], ["alpha",y],...];
-*/
- var pos1,pos2,tmp,args,re,arg1,arg2;
-/*
- change new style to old
- New style: v="c,_rplVarsBy('theta->\u03B8','r:x')@,%
-_rplVarsBy('alpha->\u03B1','r:y')@";
- Old style: v="c_rplVarsBy('theta->\u03B8','x')@%
-_rplVarsBy('alpha->\u03B1','y')@";
-*/
- re=/([^'])(,)/g;
- v=v.replace(re,'$1');
- re=/([ri]\string\:)+(\string\w)/g;
- v=v.replace(re,'$2');
- getSubstValue.aSubsts=[]; // dps17
- var start=0;
- while (true) {
- v=v.substring(start);
- pos1=v.indexOf("_rplVarsBy");
- if (pos1==-1) break;
- pos2=v.indexOf("@");
- args=v.substring(pos1+10+1,pos2-1);
- tmp=args.split(",");
- arg1=eval(tmp[0].toString());
- tmp1=arg1.split("->");
- for (var i=0; i<tmp1.length; i++)
- tmp1[i]=tmp1[i].trim();
- if (tmp1.length==1) getSubstValue.aSubsts.push(tmp1[0]);
- else getSubstValue.aSubsts.push(tmp1);
- arg2=eval(tmp[1].toString());
- re=new RegExp(tmp1[0],"g");
- s=s.replace(re,arg2);
- start=pos2+1;
- }
- return s;
-}
-function RespBoxAppr(e){
- var value=(typeof e=="object")?e.value:e;
- var re;
- for (var i=0; i<getSubstValue.aSubsts.length; i++) {
- if (typeof getSubstValue.aSubsts[i]=="object") {
- re=new RegExp(getSubstValue.aSubsts[i][0],"g");
- value=(value.replace(re,getSubstValue.aSubsts[i][1],"g"));
- }
- }
- return value;
-}
-\end{newsegment}
-\begin{newsegment}{Eq: Support Text Fill-in}
-function ProcRespTxt() {
- var i, success, authorAnswer, userAnswer = event.value;
- var fieldname=event.target.name;
- var flag = arguments[0];
- var filterMethod = arguments[1];
- var compareMethod = arguments[2];
- if ( !ProcessIt || userAnswer == "" ) return null;
- for (i = 3; i < arguments.length; i++)
- if ( success = compareTxt(userAnswer,arguments[i],%
-filterMethod, compareMethod)) break;
- return notifyField(success, flag, fieldname);
-}
-function ProcRespTxtPC() {
- var i, success, authorAnswer, userAnswer = event.value;
- ProcRespTxtPC.txtPCpCr=0;
- var fieldname=event.target.name;
- var flag = arguments[0];
- var filterMethod = arguments[1];
- var compareMethod = arguments[2];
- if ( !ProcessIt || userAnswer == "" ) return null;
- for (i=3;i<arguments.length;i++)
- if(compareTxt(userAnswer,arguments[i][0],%
-filterMethod,compareMethod))
- ProcRespTxtPC.txtPCpCr+=(arguments[i][1]);
- success=(ProcRespTxtPC.txtPCpCr>0);
- return notifyField(success,flag,fieldname);
-}
-function compareTxt(userAnswer,authorAnswer,filterMethod,compareMethod)
-{
- var caseSensitive = ( compareMethod==3 ) ? "" : "i";
- var reSwitches = "g"+caseSensitive;
- userAnswer = new String(userAnswer).filter(filterMethod);
- switch(compareMethod) {
- case 1:
- var AuthorAnswer;
- var aAuthorAnswer = authorAnswer.split(/\s+/);
- for (var j=0; j < aAuthorAnswer.length; j++) {
- AuthorAnswer = new String(%
-aAuthorAnswer[j]).filter(filterMethod);
- AuthorAnswer = AuthorAnswer.replace(/\./g,"\\.");
- AuthorAnswer = AuthorAnswer.replace(/@any@/g,".");
- var re = new RegExp(AuthorAnswer, reSwitches);
- if (!re.test(userAnswer)) return false;
- }
- return true;
- default:
- authorAnswer=new String(authorAnswer).filter(filterMethod);
- return (userAnswer == authorAnswer) ? true : false;
- }
-}
-String.prototype.filter = eqFilter;
-function eqFilter(filterMethod) {
- switch (filterMethod) {
- case 0:
- var re = /\W/g;
- return this.replace(re,"").toLowerCase();
- case 1:
- var re = /\s/g;
- return this.replace(re,"").toLowerCase();
- case 2:
- var re = /\s/g;
- return this.replace(re,"");
- case 3:
- default:
- return this.toString();
- }
-}
-\end{newsegment}
-\begin{newsegment}{Eq: Quiz Management}
-function InitMsg(msg) { return (\eqInitQuizMsg) }
-function syntaxError() { eqAppAlert(\eqSyntaxErrorUndefVar,3); }
-var lstOfQuizzes=new Object();
-var reExtractBaseName=/^.+?\.(.+?)\..+$/;
-function ProcUserResp(key,userresp,probno,notify)
-{
- if (key==null) {
- ProcUserNoResp.apply(null,arguments);
- return;
- }
- if ( arguments.length > 4 ) {
- if ( typeof RightWrong[probno] == "undefined" ) {
- RightWrong[probno] = new Array();
- RightWrong[probno][0] = "grp";
- Responses[probno] = new Array();
- }
- RightWrong[probno][arguments[4]] = (!!key) ? 1 : 0;
- Responses[probno][arguments[4]] = userresp;
- } else {
- if ( typeof key == "object" ) {
- RightWrong[probno][0] = key[0];
- RightWrong[probno][1] = key[1];
-Responses[probno] = userresp;
-if (Responses[probno].length==0)
- Responses[probno]=undefined;
- } else {
- RightWrong[probno] = (!!key)?1:0;
-Responses[probno] = userresp;
-}
- }
- if ( (typeof fieldPopTbl == "function")&&(event.type != "Link") ) {
- var a=reExtractBaseName.exec(event.target.name);
- fieldPopTbl(a[1]);
- }
-}
-function ProcUserNoResp(key,userresp,probno,notify)
-{
- if ( arguments.length > 4 ) {
- RightWrong[probno][arguments[4]] = undefined;
- Responses[probno][arguments[4]] = undefined;
-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;
- ProbValue[probno]=undefined;
-}
- } else {
- RightWrong[probno] = undefined;
- Responses[probno] = undefined;
- }
- if ( typeof fieldPopTbl == "function" ) {
- var a=reExtractBaseName.exec(event.target.name);
- fieldPopTbl(a[1]);
- }
-}
-function InitializeQuiz(qtfield,mark) {
- var oQName=eval(qtfield);
- Score=0;
- retn = null;
- if (!isQuizInitialized(qtfield)&&!isAQuizUnfinished()) return null;
- neutralizeQuizzes();
- ProcessIt = false;
- aQuizControl[qtfield] = 1;
- this.resetForm(["ScoreField." + qtfield,"mc."+qtfield,
- "obj."+qtfield,"mck."+qtfield,"Ans."+qtfield,
- "PointsField."+qtfield,"PercentField."+qtfield,
- "essay."+qtfield,"GradeField."+qtfield,
- "grpobj."+qtfield,"qMark."+qtfield, qtfield+"SanityCheck",
- qtfield+"SanityCheckPts",qtfield+"SanityCheckOOPts",
- "rbmarkup."+qtfield]);
- ProcessIt = true;
- var f = this.getField("qMark."+qtfield);
- if ( f != null ) f.display = display.hidden;
- f = this.getField("promptButton."+qtfield);
- if (f != null) f.display=display.visible;
- if (arguments.length<3) {
- f = this.getField("obj." + qtfield);
- if ( f != null ) f.readonly = false;
- }
- RightWrong=new Array();
- Responses=new Array();
- ProbValue=new Array();
- ProbDist=new Array();
- ProbType=new Array();
- if (mark==1)
- {
- var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
-?\defaultColorJS:oQName.DefaultColorJSLoc;
- var rightColor=(typeof oQName.RightColorJSLoc=="undefined")%
-?\rghtColorJS:oQName.RightColorJSLoc;
- var corrAnsSymb=(typeof oQName.CorrAnsSymbJSLoc=="undefined")%
-?\corrAnsSymbJS:oQName.CorrAnsSymbJSLoc;
- var f = this.getField("mcq." + qtfield);
- if (f != null) {
- f.delay=true;
- f.display=display.hidden;
- this.resetForm([f.name]);
- f.textColor = rightColor;
- var a = f.getArray();
- for (var i=0; i<a.length; i++) a[i].style=corrAnsSymb;
- f.delay=false;
- }
- f = this.getField("obj." + qtfield);
- if ( f != null ) f.strokeColor = defaultColor;
- f = this.getField("grpobj." + qtfield);
- if ( f != null ) f.strokeColor = defaultColor;
- f = this.getField("corr." + qtfield);
- if ( f != null ) f.display = display.hidden;
- f = this.getField(qtfield+"SanityCheck");
- if ( f != null ) f.strokeColor=defaultColor;
- f = this.getField("rbmarkup."+qtfield);
- if ( f != null ) f.display = display.hidden;
- }
- return null;
-}
-function resetHeadsUp(flag,fieldname) {
- if (flag==1) return;
- var pos1=fieldname.indexOf(".");
- var pos2=fieldname.indexOf(".",pos1+1);
- var baseName=fieldname.substring(pos1+1,pos2);
- var oQName=eval(baseName);
- var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
-?\defaultColorJS:oQName.DefaultColorJSLoc;
- var f=this.getField(fieldname);
- if (f!=null) f.strokeColor=defaultColor;
-
-}
-function neutralizeQuizzes()
-{
- for ( var qtfield in aQuizControl ) aQuizControl[qtfield] = 0;
-}
-isAQuizUnfinished.check=true;
-function isAQuizUnfinished()
-{
- if (!isAQuizUnfinished.check) return true;
- for ( var qtfield in aQuizControl )
- if ( aQuizControl[qtfield] == 1 )
- {
- eqAppAlert(\eqerrUnfinishQuiz, 3);
- return false;
- }
- return true;
-}
-function isQuizInitialized(qtfield)
-{
- if (typeof (aQuizControl[qtfield]) == "undefined")
- return false;
- else
- return (aQuizControl[qtfield] == 1);
-}
-function isEndQuizPushed(qtfield)
-{
- if (typeof (aQuizControl[qtfield]) == "undefined")
- return false;
- else
- return (aQuizControl[qtfield] == -1);
-}
-function resetQuiz(qtfield)
-{
- aQuizControl[qtfield] = -1;
-}
-function RecordPointValue(ptvalue,probno)
-{
- if (arguments.length > 2) {
- if ( typeof ProbValue[probno] == "undefined" ) {
- ProbValue[probno]=[1,arguments[5],arguments[3],arguments[4]];
- ProbValue[probno][3+arguments[2]] = ptvalue;
- } else ProbValue[probno][3+arguments[2]] = ptvalue;
- }
- else {
- ProbValue[probno]=ptvalue;
- }
-}
-function RecordProblemType(qType,probno)
-{
- ProbType[probno]=qType;
-}
-function GrpRight( a, nProb, qtfield )
-{
- var f = this.getField("grpobj."+qtfield+"."+nProb);
- var l = f.getArray().length
- var prod = 1;
- for ( var i=1; i <= l; i++) prod *= !!a[i];
- return prod;
-}
-function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
-{
- Score = 0; ptScore = 0;
- NPointTotal=nPointTotal; NQuestions=nQuestions;
- for (var i=1; i < RightWrong.length; i++)
- {
- if ( (typeof RightWrong[i] == "object" ) %
- && ( RightWrong[i][0] == "grp" ) ) {
- // grouped question
- Score += GrpRight(RightWrong[i], i, qtfield);
- var aWeights = ProbValue[i].slice(2);
- var evalGrpJS = eval(ProbValue[i][1]);
- var evalGrpJSValue = evalGrpJS(this,qtfield,i,
- RightWrong[i],aWeights);
- ProbDist[i] = evalGrpJSValue;
- ptScore = ptScore + evalGrpJSValue;
- } else {
- if (typeof RightWrong[i] == "object") {
- if ( RightWrong[i][0] == 1 ) {
- Score++;
- ProbDist[i]=(typeof ProbValue[i] == "object") ?
- 1*ProbValue[i][1] : 1*ProbValue[i];
- ptScore += (1*ProbDist[i]);
- } else {
- if (RightWrong[i][1] == 1)
- ProbDist[i]=(typeof ProbValue[i]=="object") ?
- 1*ProbValue[i][1] : 1*ProbValue[i];
- else
- ProbDist[i]=(typeof ProbValue[i] == "object") ?
- 1*ProbValue[i][1] : 0;
- ptScore += (1*ProbDist[i]);
- }
- } else {
- if (RightWrong[i]==1) {
- Score++;
- ProbDist[i] = ( typeof ProbValue[i] == "object") ?
- 1*ProbValue[i][1] : 1*ProbValue[i];
- ptScore += (1*ProbDist[i]);
- }
- else {
- ProbDist[i] = ( typeof ProbValue[i] == "object") ?
- 1*ProbValue[i][2] : 0;
- ptScore += (1*ProbDist[i]);
- }
- }
- }
- }
- if ( !negPointsAllowed && (ptScore < 0) ) ptScore = 0;
- if (ptScore == nPointTotal) pcScore = 100;
- else pcScore = util.printf("\%.1f", (100 * ptScore) / nPointTotal);
- var oQName=eval(qtfield);
- var gradeScale=%
-(typeof oQName.GradeScaleLoc=="undefined")%
-?GradeScaleDefault:oQName.GradeScaleLoc;
- quizGrade = GetGrade.apply(null,gradeScale);
- var f = this.getField("ScoreField."+qtfield);
- if ( f != null ) f.value=(\eqQuizTotalMsg);
- f = this.getField("PointsField."+qtfield);
- if ( f != null) f.value=(\eqQuizPointsMsg);
- f = this.getField("PercentField."+qtfield);
- if ( f != null) f.value=(\eqQuizPercentMsg);
- f = this.getField("GradeField."+qtfield);
- if ( f != null) f.value=(\eqQuizGradeMsg);
-}
-function GetGrade()
-{
- var cGrade, aRange;
- var l = arguments.length/2;
- if (pcScore >=100) return arguments[0];
- if (pcScore < 0 ) return arguments[arguments.length-2];
- for (var i=0; i < l; i++)
- {
- cGrade = arguments[2*i];
- aRange = arguments[2*i+1];
- if ( (pcScore >= arguments[2*i+1][0])
- && (pcScore < arguments[2*i+1][1])) return cGrade;
- }
- return null;
-}
-function ProcessQuestion (key,letterresp,probno,
- quizno,qtfield,notify,mark,msg) {
- var silent = ( arguments.length > 8 ) ? true : false;
- if (!isQuizInitialized(qtfield))
- {
- if (!silent) eqAppAlert(InitMsg(msg),3);
- this.resetForm(["mc."+qtfield+"."+probno,
- "mck."+qtfield+"."+probno]);
- }
- else
- {
- ProcUserResp(key,letterresp,probno,notify);
- if (mark==1)
- {
- var oQName=eval(qtfield);
- var defaultColor=%
-(typeof oQName.DefaultColorJSLoc=="undefined")%
-?\defaultColorJS:oQName.DefaultColorJSLoc;
- var rightColor=%
-(typeof oQName.RightColorJSLoc== "undefined")%
-?\rghtColorJS:oQName.RightColorJSLoc;
- var wrongColor=%
-(typeof oQName.WrongColorJSLoc=="undefined")%
-?\wrngColorJS:oQName.WrongColorJSLoc;
- var rightAnsSymb=%
-(typeof oQName.RightAnsSymbJSLoc=="undefined")%
-?\rghtAnsSymbJS:oQName.RightAnsSymbJSLoc;
- var wrongAnsSymb=%
-(typeof oQName.WrongAnsSymbJSLoc=="undefined")%
-?\wrngAnsSymbJS:oQName.WrongAnsSymbJSLoc;
- var corrAnsSymb=%
-(typeof oQName.CorrAnsSymbJSLoc=="undefined")%
-?\corrAnsSymbJS:oQName.CorrAnsSymbJSLoc;
- var f = this.getField("mcq."+qtfield+"."+probno);
- var fck = this.getField("mck."+qtfield+"."+probno);
- var bMultiSelect = ( fck != null ) ? true : false;
- f.delay=true;
- this.resetForm([f.name]);
- var a = f.getArray();
- var l = a.length;
- if ( bMultiSelect ) {
- var ack = fck.getArray();
- for ( var i=0; i<l; i++) {
- if ( ack[i].isBoxChecked(0) ) {
- a[i].style = ( a[i].isDefaultChecked(0) ) ?
- rightAnsSymb : wrongAnsSymb;
- a[i].textColor = ( a[i].isDefaultChecked(0) ) ?
- rightColor : wrongColor;
- a[i].value = "Yes";
- } else {
- a[i].style = ( a[i].isDefaultChecked(0) ) ?
- corrAnsSymb : wrongAnsSymb;
- a[i].textColor = ( a[i].isDefaultChecked(0) ) ?
- rightColor : wrongColor;
- a[i].value = ( a[i].isDefaultChecked(0) ) ?
- "Yes" : "Off";
- }
- }
- } else {
- for (var i=0; i < a.length; i++)
- if (a[i].style == rightAnsSymb)
- {
- a[i].style = corrAnsSymb;
- a[i].textColor = rightColor;
- }
- var qr=this.getField(%
-"mcq."+qtfield+"."+probno+"."+quizno);
- qr.textColor = key ? rightColor :wrongColor;
- qr.style = key ? rightAnsSymb : wrongAnsSymb;
- qr.value="Yes"; // gr.checkThisBox(0); // ver 5.0
- }
- this.getField("mcq."+qtfield+"."+probno).delay=false;
- }
- }
- if ( typeof fieldPopTbl == "function" ) fieldPopTbl(qtfield);
-}
-function correctQuiz(qtfield,nQuestions)
-{
- var oQName=eval(qtfield);
- var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
-?\defaultColorJS:oQName.DefaultColorJSLoc;
- var rightColor=(typeof oQName.RightColorJSLoc=="undefined")%
-?\rghtColorJS:oQName.RightColorJSLoc;
- var wrongColor=(typeof oQName.WrongColorJSLoc=="undefined")%
-?\wrngColorJS:oQName.WrongColorJSLoc;
- var rightAnsSymb=(typeof oQName.RightAnsSymbJSLoc=="undefined")%
-?\rghtAnsSymbJS:oQName.RightAnsSymbJSLoc;
- var wrongAnsSymb=(typeof oQName.WrongAnsSymbJSLoc=="undefined")%
-?\wrngAnsSymbJS:oQName.WrongAnsSymbJSLoc;
- var bFullyCorrect=(typeof oQName.fullyCorrectLoc=="undefined")%
-?\eqCorrChoiceFully:oQName.fullyCorrectLoc; // dpsf07
- var f = this.getField("mcq." + qtfield);
- if ( f != null) {
- if (bFullyCorrect) { // dpsf07
- f.display = display.visible;
- } else {
- for (var n=1; n<=nQuestions; n++) {
- var h=this.getField("mc."+qtfield+"."+n);
- var bOk=(h!=null);
- if(bOk) var choiceType="mc";
- else {
- h=this.getField("mck."+qtfield+"."+n);
- bOk=(h!=null);
- var choiceType="mck";
- }
- if (bOk) {
- var mcq=this.getField("mcq."+qtfield+"."+n);
- var g=mcq.getArray();
- if (choiceType=="mc") {
- for (var j=0; j< g.length; j++) {
- g[j].display=(h.isBoxChecked(j))?%
-display.visible:display.hidden;
- }
- } else {
- var ck=h.getArray();
- for (var j=0; j< g.length; j++) {
- g[j].display=(ck[j].isBoxChecked(0))?%
-display.visible:display.hidden;
- }
- }
- }
- }
- }
- }
- f = this.getField("obj." + qtfield);
- if ( f != null ) {
- var a = f.getArray();
- var re=/^obj\./;
- for (var i = 0; i < a.length; i++) {
- var probno = a[i].name.replace(/.*\./g,"");
- var rbmuname = a[i].name.replace(re,"rbmarkup\.");
- var oRBMarkup = this.getField(rbmuname);
- var bRBMU = ( oRBMarkup != null );
- if ( RightWrong[probno] == 1 ) {
- a[i].strokeColor = rightColor;
- if (bRBMU) {
- oRBMarkup.textColor=rightColor;
- oRBMarkup.style=rightAnsSymb;
- }
- } else {
- a[i].strokeColor = wrongColor;
- if (bRBMU) {
- oRBMarkup.textColor=wrongColor;
- oRBMarkup.style=wrongAnsSymb;
- }
- }
- }
- }
- f = this.getField("grpobj." + qtfield);
- var re=/^grpobj\./;
- if ( f != null ) {
- var a = f.getArray();
- for ( var i = 0; i < a.length; i++) {
- var rbmuname = a[i].name.replace(re,"rbmarkup\.");
- var oRBMarkup = this.getField(rbmuname);
- var bRBMU = ( oRBMarkup != null );
- var aX = a[i].name.split(".");
- var probno = 1*aX[aX.length-2];
- var grpProbno = 1*aX[aX.length-1];
- if ( ( RightWrong[probno] != undefined ) %
-&& ( RightWrong[probno][grpProbno] == 1 ) ) {
- a[i].strokeColor = rightColor;
- if (bRBMU) {
- oRBMarkup.textColor=rightColor;
- oRBMarkup.style=rightAnsSymb;
- }
- } else {
- a[i].strokeColor = wrongColor;
- if (bRBMU) {
- oRBMarkup.textColor=wrongColor;
- oRBMarkup.style=wrongAnsSymb;
- }
- }
- }
- }
- f=this.getField("rbmarkup."+qtfield);
- if ( f != null ) f.display = display.visible;
- % if ( f != null ) f.strokeColor = defaultColor;
- f = this.getField("promptButton." + qtfield)
- if ( f != null ) f.display = display.hidden;
- f = this.getField("corr." + qtfield);
- if ( f != null ) f.display = display.noPrint;
- f = this.getField("qMark."+qtfield);
- if ( f != null )
- {
- for ( var i = 1; i <= nQuestions; i++)
- {
- if ( ProbValue[i] == undefined ) ProbValue[i]=0
- f = this.getField("qMark."+qtfield+"."+(i-1));
- if ( f != null )
- {
- // find the next non-null field
- for ( var j=i; j <= nQuestions; j++)
- {
- var h = this.getField("qMark."+qtfield+"."+j);
- if ( h != null ) break;
- }
- var g = f.getArray();
- var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
- if ( !negPointsMarkupAllowed && (qpts < 0) ) qpts=0;
- g[0].value = qpts + (( qpts == 1 ) ? " \eqptLabel\space"
- : " \eqptsLabel");
- }
- }
- this.getField("qMark."+qtfield).display = display.visible;
- }
-}
-function getTotalTally(basename) {
- var sqtotal=0;
- var f=this.getField("tally."+basename);
- var g = f.getArray();
- for (var i=0; i<g.length; i++) {
- if ( g[i] == event.target ) sqtotal += (1*event.value);
- else sqtotal += (1*g[i].value);
- }
- if ( ( f=this.getField("tallytotal."+basename) ) != null )
- f.value = sqtotal;
-}
-function clearAllSubQuizzes() {
- isAQuizUnfinished.check=false;
- for ( var o in lstOfQuizzes) {
- if (lstOfQuizzes[o].isSubmitted)
- eval ( lstOfQuizzes[o].initializeWith );
- }
- isAQuizUnfinished.check=true;
-}
-\end{newsegment}
-\begin{newsegment}{Eq: Support for Multi-Selection}
-function ProcessMultiSelection(key,letterresp,probno,%
-quizno,qtfield,pts,ppts) {
- var f = this.getField("mck."+qtfield+"."+probno);
- if ( typeof ProbValue[probno] == "undefined" ) {
- var g = f.getArray();
- var nTotalCorrect = 0;
- for ( var i=0; i<g.length; i++ )
- nTotalCorrect += (1*g[i].exportValues[0].charAt(0));
- ProbValue[probno] = new Array();
- RightWrong[probno] = new Array();
- ProbValue[probno] = [nTotalCorrect,pts,[]];
- RightWrong[probno][2] = new Array();
- } else var nTotalCorrect = ProbValue[probno][0];
- var fck = this.getField("mck."+qtfield+"."+probno+"."+quizno);
- if ( fck.isBoxChecked(0) ) {
- ProbValue[probno][2][quizno] = ppts;
- RightWrong[probno][2][quizno] = key;
- } else {
- ProbValue[probno][2][quizno] = undefined;
- }
- var pointsThisProblem=0;
- var scoreThisProblem = 0;
- var letterResponses = new Array();
- var areAllCorrect=1;
- var numCorrect=0;
- for ( var i=1; i< ProbValue[probno][2].length; i++ ) {
- if ( typeof ProbValue[probno][2][i] != "undefined" )
- letterResponses[i] = (String.fromCharCode(96+i));
- pointsThisProblem += ( ( typeof ProbValue[probno][2][i]==%
-"undefined" )?0:ProbValue[probno][2][i]);
- if ( typeof ProbValue[probno][2][i]!="undefined" ) {
- areAllCorrect *= (1*RightWrong[probno][2][i]);
- numCorrect +=(1*RightWrong[probno][2][i]);
- }
- }
- scoreThisProblem = areAllCorrect*numCorrect;
- var scoreThisProblem = Number( scoreThisProblem == nTotalCorrect );
- if (scoreThisProblem==1 && pointsThisProblem==0 )
- pointsThisProblem=pts;
- ProbValue[probno][1] =
- ( (ProbValue[probno][1] == 0) && (scoreThisProblem == 1) )
- ? pts : pointsThisProblem;
- var passKey = ( pointsThisProblem > 0 ) ? 1 : 0;
- var retn = [ [ scoreThisProblem, passKey ], letterResponses ] ;
- return retn;
-}
-function LimitSelection(n,fname,k) {
- var f = this.getField(fname);
- var g = f.getArray();
- var total=0;
- for (var i=0; i<g.length; i++) {
- total+=( g[i].isBoxChecked(0) );
- }
- if (total > n) {
- eqAppAlert(\limSelWarningMsg,3);
- f=this.getField(fname+"."+k);
- f.checkThisBox(0,false);
- return false
- } else return true;
-}
-\end{newsegment}
-\begin{newsegment}{Eq: Miscellaneous JS}
-function chooseJSColor( b, c1, c2 ) {
- return ( b ) ? c1 : c2;
-}
-function notifyField(success, flag, fieldname) {
- if ( flag != 0 )
- return (success)?true:false;
- var f = this.getField(fieldname);
- var re=/^(obj|grpobj)\./;
- var gname=fieldname.replace(re,"rbmarkup\.");
- var g =this.getField(gname);
- var isthereRBUP = ( g !=null );
- var h = fieldname.replace(re,"");
- var index=h.indexOf(".");
- var oQName = eval(h.substring(0,index));
- var rightColor=(typeof oQName.RightColorJSLoc=="undefined")%
-?\rghtColorJS:oQName.RightColorJSLoc;
- var rightSymb=(typeof oQName.RightColorJSLoc=="undefined")%
-?\rghtAnsSymbJS:oQName.RightAnsSymbJSLoc;
- var wrongColor=(typeof oQName.WrongColorJSLoc=="undefined")%
-?\wrngColorJS:oQName.WrongColorJSLoc;
- var wrongSymb=(typeof oQName.WrongAnsSymbJSLoc=="undefined")%
-?\wrngAnsSymbJS:oQName.WrongAnsSymbJSLoc;
- if (success) {
- f.strokeColor = rightColor;
- if (isthereRBUP) {
- g.style = rightSymb;
- g.textColor=rightColor;
- g.display=display.visible;
- }
- return true;
- } else {
- updateTally.downState=false;
- updateTally(fieldname);
- f.strokeColor = wrongColor;
-if (isthereRBUP) {
- b2 = ( typeof oQName.WrongAnsSymbJSLoc == "undefined" );
- g.style = wrongSymb;
- g.textColor=wrongColor;
- g.display=display.visible;
- }
- return false;
- }
-// return null; // remove ?
-}
-function updateTally(fieldname)
-{
- var objre = /^obj\./;
- var grpre = /^grpobj\./;
- if ( grpre.test(fieldname) ) {
- fieldname = fieldname.replace(grpre,"");
- var pos = fieldname.lastIndexOf(".");
- fieldname = fieldname.substring(0,pos);
- } else if ( objre.test(fieldname) )
- fieldname = fieldname.replace(objre,"");
- var f = this.getField("tally."+fieldname);
- if ( f != null ) {
- if (!updateTally.downState) f.value += 1;
- return true;
- } else return false;
-
-}
-var bNoPeekWait=false;
-var oNoPeekTimer;
-function noPeek(qtfield,rtnPage)
-{
- if (!bNoPeekWait) {
- if ( (typeof (aQuizControl[qtfield]) == "undefined") %
-|| (aQuizControl[qtfield] != -1) ) {
- bNoPeekWait=true;
- oNoPeekTimer=app.setTimeOut("bNoPeekWait=false;%
-app.clearTimeOut(oNoPeekTimer);",5);
- this.pageNum = rtnPage-1;
- \NoPeekAlert;
- }
- } else this.pageNum = rtnPage-1;
-}
-var oCB=\bcheckboxused
-function OnBlurRespBox (retn)
-{
- var qname = arguments[1];
- var oQName = eval(qname);
- var respMsg;
- var cTitle = "AcroTeX eDucation Bundle";
- if (retn != null) {
- if ( typeof appAlerts[qname] == "undefined")
- appAlerts[qname] = {bAfterValue: false, %
-cMsg: "\doNotShowAgainMsg"};
- var respMsg = (retn) ? \eqsqrtmsg\space : \eqsqwgmsg;
- if ( (event.target == this) || !oCB)
- eqAppAlert({ cMsg: respMsg, nIcon: 3, cTitle: cTitle });
- else {
- if ( ! appAlerts[arguments[1]].bAfterValue )
- eqAppAlert({ cMsg: respMsg, nIcon: 3, cTitle: cTitle, %
-oCheckbox: appAlerts[qname]});
- }
- }
- else {
- var re=/^(obj|grpobj)\./;
- var gname=event.target.name.replace(re,"rbmarkup\.");
- var g =this.getField(gname);
- var isthereRBUP = ( g !=null );
- var str = event.target.value.toString();
- if (str.replace(/\s/g,"") == "") {
- var defaultColor=%
-(typeof oQName.DefaultColorJSLoc=="undefined")%
-?color.black:oQName.DefaultColorJSLoc;
- if (isthereRBUP) g.display=display.hidden;
- event.target.strokeColor = defaultColor;
- }
- }
-}
-function jmpToNamedDest(fName,cDest,bAlert) {
- if ( (typeof appAlerts[fName]!="undefined" %
-&& appAlerts[fName].bAfterValue) || bAlert==0)
- app.setTimeOut("this.gotoNamedDest(\""+cDest+"\")",500);
- else
- this.gotoNamedDest(cDest);
-}
-function lowThreshold(nQuestions)
-{
- return true;
-}
-function highThreshold(nQuestions)
-{
- var cnt=0;
- for ( var i=0; i< Responses.length; i++ ) {
- if ( typeof Responses[i]!="undefined") cnt++
- }
- if ( cnt<nQuestions )
- eqAppAlert(\highThresholdMsg,3);
- return (cnt >= nQuestions);
-}
-\end{newsegment}
-\begin{newsegment}{Eq: Support for Grouped Questions}
-function groupEval(doc,qtfield,probno,aKey,aWeights)
-{
- var totalGrpPts = aWeights[0];
- var totalWeight = aWeights[1];
- for ( var i=1,total=0; i< aKey.length; i++ )
- if (aKey[i] != undefined) total += aKey[i]*aWeights[i+1];
- return total;
-}
-function WeightedEval(doc,qtfield,probno,aKey,aWeights)
-{
- var f = doc.getField("grpobj." + qtfield + "." + probno);
- var nGrpQno = f.getArray().length;
- var totalGrpPts = aWeights[0];
- var totalWeight = aWeights[1];
- for ( var i=1,total=0; i < aKey.length; i++ )
- if (aKey[i] != undefined) total += aKey[i]*aWeights[i+1];
- total /= totalWeight;
- total = Math.floor( total * totalGrpPts );
- return total;
-}
-function groupBernoulliEval(doc,qtfield,probno,aKey,aWeights)
-{
- var f = doc.getField("grpobj." + qtfield + "." + probno);
- var nGrpQno = f.getArray().length;
- var totalGrpPts = aWeights[0];
- for ( var i=1,isCorrect=1; i<= nGrpQno; i++ )
- isCorrect *= (aKey[i] != undefined) ? (Number(aKey[i])) : 0;
- return (isCorrect*totalGrpPts);
-}
-\end{newsegment}
-\end{insDLJS*}
-\endinput
-%%
-%% End of file `aebjs.def'.
+%%
+%% This is file `aebjs.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,aebjs')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesFile{aebjs.def}
+ [2018/03/21 v8.2.2 %
+ Exerquiz document level JavaScript (dps)]
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+\def\aeb@array{new Array}
+\def\refac#1{\\(#1\\)}\def\regrp#1{(#1)}\def\rechrclass#1{[#1]}
+\def\redm{\\.}\def\remul{\\*}\def\rediv{\\/}\def\repow{\\^}
+\def\redigit{\\d}\def\reany{.}\def\rebstr{\string^}\def\reestr{\string$}
+\def\preReqForm{\Array(requireForm,\@gobble}
+\def\preDenyForm{\Array(denyForm,\@gobble}
+\def\postDenyForm{\Array(requireFormNot,\@gobble}
+\newcommand{\noPeekArgs}[1]{%
+ \def\NoPeekAlert{eqAppAlert(#1)}}\def\newNoPeekArgs{}
+\def\NoPeekAlert{eqAppAlert(\noPeekMsg,3)}
+\newcommand{\dlLibSpecRespJS}{"none","undefined","empty"}
+\newif\ifSubstVars\SubstVarsfalse % dps17
+\newif\ifShowAppr\ShowApprtrue % dps17
+\def\altApprOn{\ShowApprtrue} % dps17
+\def\altApprOff{\ShowApprfalse} % dps17
+\def\corrChoiceFullyOn{\def\eqCorrChoiceFully{true}}
+\def\corrChoiceFullyOff{\def\eqCorrChoiceFully{false}}
+\corrChoiceFullyOn
+\def\corrLocalChoiceFullyOn{\def\eqCorrLocalChoiceFully{true}} % dpsf07
+\def\corrLocalChoiceFullyOff{\def\eqCorrLocalChoiceFully{false}} % dpsf07
+\def\resetLocalChoiceFully{\let\eqCorrLocalChoiceFully\@empty} % dpsf07
+\resetLocalChoiceFully % no local implementation
+\begin{insDLJS*}[exerquizLoaded]{exerquiz}
+\begin{newsegment}{AeB: AcroTeX eDucation Bundle}
+/*
+ Document Level JavaScript
+ AcroTeX eDucation Bundle
+ D. P. Story copyright 2000-\the\year
+*/
+var exerquizLoaded = true;
+this.disclosed = true;
+app.runtimeHighlight=false;
+\end{newsegment}
+\begin{newsegment}{Eq: Global Data}
+var ok2Continue = true;
+var ProcessIt = true;
+var retn;
+var Score=0;
+var ptScore=0;
+var pcScore=0;
+var quizGrade="C";
+var NQuestions=0;
+var NPointTotal=0;
+var e = Math.E;
+var pi = Math.PI;
+var replaceExclaim = \replaceexclaim;
+var negPointsAllowed = \negpointsallowed;
+var negPointsMarkupAllowed = \negpointsmarkupallowed;
+var aQuizControl = new Object;
+var RightWrong=new Array();
+var ProbValue = new Array();
+var ProbDist = new Array();
+var ProbType = new Array();
+var Responses=new Array();
+var appAlerts = new Object;
+var _mathVars="x";
+var _ModalNotOn=true;
+var GradeScaleDefault=new Array(\eqGradeScale);
+var aDlLibSpecResp=new Array(\dlLibSpecRespJS);
+var JSfBuiltIn = new Array
+ ( "abs","acos","asin","atan","ceil", "floor","cos","exp",
+ "log","max","min","pow","random","round","sin",
+ "sqrt","tan");
+var JSfCustomEarly = new Array ("arctan", "arcsin", "arccos")
+var JSfCustomLate = new Array
+ ( "logc", "ln","sec","csc","cot",
+ "asinh", "acosh","atanh","acoth","asech","acsch",
+ "sinh", "cosh","tanh","coth","sech","csch","sgn",
+ "C","P","fact","pi");
+var JSf = new Array().concat(JSfCustomEarly, JSfBuiltIn, JSfCustomLate);
+var JSfCustom = new Array().concat(JSfCustomEarly, JSfCustomLate);
+var JSc = new Array("PI","E")
+function ln(x) { return Math.log(x); }
+function sec(x) { return 1/Math.cos(x); }
+function csc(x) { return 1/Math.sin(x);}
+function cot(x) { return Math.cos(x)/Math.sin(x); }
+function arctan(x) { return Math.atan(x); }
+function arcsin(x) { return Math.asin(x); }
+function arccos(x) { return Math.acos(x); }
+function logc(x) { return Math.LOG10E * Math.log(x); }
+function C(x,y) {return ch(x,y);}
+function P(x,y) {return perm(x,y);}
+function sinh(x) { return ( Math.exp(x) - Math.exp(-x) )/2; }
+function cosh(x) { return ( Math.exp(x) + Math.exp(-x) )/2; }
+function tanh(x) {
+ return (Math.exp(x)-Math.exp(-x))/(Math.exp(x)+Math.exp(-x)); }
+function coth(x) {
+ return ( Math.exp(x)+Math.exp(-x))/(Math.exp(x)-Math.exp(-x)); }
+function sech(x) { return 2/( Math.exp(x) + Math.exp(-x) )/2; }
+function csch(x) { return 2/( Math.exp(x) - Math.exp(-x) )/2; }
+function asinh(x) { return Math.log (x+Math.sqrt(Math.pow(x,2)+1)); }
+function acosh(x) {
+ return Math.log (x+Math.sqrt(Math.pow(x,2)-1)); } // x ge 1
+function atanh(x) { return .5*Math.log ((1+x)/(1-x)); } // -1 < x < 1
+function acoth(x) { return atanh(1/x); } // |x| > 1
+function asech(x) { return acosh(1/x); } // 0 < x le 1
+function asch(x) { return asinh(1/x); } // x ne 0
+function acsch(x) { return asinh(1/x); } // x ne 0
+function sgn(x) { return (x==0?0:(x<0?-1:1)) };
+var aGroup = new Array
+ ( ["\(","\)",\eqParens],
+ ["[","]",\eqBrackets],
+ ["{","}",\eqBraces]
+ );
+\end{newsegment}
+\begin{newsegment}{Eq: Support for Math Fill-in}
+var _mto;
+function eqAppAlert(args) {
+ _ModalNotOn = false;
+ var retn=app.alert(args);
+ _mto= app.setTimeOut("_ModalNotOn = true", 100);
+ return retn;
+}
+function CkBalP(UserInput,lDelimiter,rDelimiter)
+{
+ var Lcount=0, Rcount=0;
+ for (var k=0; k < UserInput.length; k++)
+ {
+ if (UserInput.charAt(k) == lDelimiter) Lcount++;
+ else if (UserInput.charAt(k) == rDelimiter) Rcount++;
+ }
+ return (Lcount==Rcount);
+}
+function CkBalVert(UserInput)
+{
+ var Lcount=0;
+ for (var k=0; k < UserInput.length; k++)
+ if (UserInput.charAt(k)=="|") Lcount++;
+ return (Lcount \% 2 == 0);
+}
+function Ckfuncs(UserInput)
+{
+ var re, rei, reii;
+ re = /[a-zA-Z]{2,}/g;
+ reii=/r:|i:|,/g
+ var _v=_mathVars.replace(reii,"");
+rei=new RegExp("[^"+_v+"]", "g");
+ aF = UserInput.match(re);
+ if ( aF == null ) return true;
+ for (var i=0; i < aF.length; i++)
+ {
+if ( rei.exec(aF[i]) == null ) continue;
+ for(var j=0; j < JSf.length; j++)
+ if ( aF[i].indexOf(JSf[j]) != -1 ) break;
+ if (j < JSf.length) continue;
+ for(var j=0; j < JSc.length; j++)
+ if ( aF[i].indexOf(JSc[j]) != -1 ) break;
+ if(j==JSc.length)
+ {
+ eqAppAlert(\eqerrBadMathFunc,3);
+ ok2Continue=false;
+ return false;
+ }
+ }
+ return true;
+}
+function DisplayAnswer(fieldname,theanswer)
+{
+ ProcessIt = false;
+ var oDefault;
+ if (arguments.length > 2 )
+ var oQName = arguments[2];
+ else var oQName = oDefault;
+ if (typeof oQName=="undefined")
+ var oQName = new Object;
+ var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
+?\defaultColorJS:oQName.DefaultColorJSLoc;
+ try {
+ this.getField(fieldname).value=(theanswer);
+ } catch(e) {}
+ ProcessIt = true;
+}
+function EvalCorrAnsButton(fieldname,theanswer)
+{
+ theanswer = eval(theanswer);
+ DisplayAnswer(fieldname,theanswer);
+}
+function FindBalP(UserInput,Poff,Forward)
+{
+ var j,depth;
+ if (Forward)
+ {
+ for (depth=-1, j=Poff+1; depth !=0; j++)
+ {
+ if ( j > UserInput.length) return null;
+ if (UserInput.charAt(j)=="\(") depth--;
+ else if (UserInput.charAt(j)=="\)") depth++;
+ }
+ j--
+ }
+ else
+ {
+ for (depth=-1, j=Poff-1; depth !=0; j--)
+ {
+ if ( j < 1 ) return null;
+ if (UserInput.charAt(j)=="\)") depth--;
+ else if (UserInput.charAt(j)=="\(") depth++;
+ }
+ j++
+ }
+ return j;
+}
+function stripWhiteSpace (UserInput)
+{
+ UserInput = UserInput.replace(/\s/g,"");
+ if(UserInput==null || UserInput.length==0)
+ {
+ ok2Continue = false;
+ return false;
+ } else return UserInput;
+}
+function stripOutMuli (UserInput)
+{
+ UserInput = UserInput.replace(/\*/g,"");
+ return UserInput;
+}
+function addMathObject(UserInput)
+{
+ for ( var i=0; i < JSfBuiltIn.length; i++) {
+ var re = new RegExp("\\b("+JSfBuiltIn[i]+")\\b","g");
+ UserInput = UserInput.replace(re,"Math.$1");
+ }
+ re = /\b(PI)\b/g;
+ UserInput = UserInput.replace(re,"Math.$1");
+ return UserInput;
+}
+function ParseInput(UserInput)
+{
+ var re, repi;
+ re = /\b(a)\b/g;
+ UserInput = UserInput.replace(re, "(a)");
+ UserInput = stripWhiteSpace (UserInput);
+ if (!ok2Continue) return null;
+ for(var i=0; i< aGroup.length; i++)
+ {
+ if(!CkBalP(UserInput, aGroup[i][0], aGroup[i][1]))
+ {
+ eqAppAlert(\eqerrDelimNotBal,3);
+ ok2Continue = false;
+ return false;
+ }
+ }
+ UserInput = ChngAllGrpsToParens(UserInput);
+ if ( replaceExclaim &&(typeof fact == "function") )
+ UserInput = UserInput.replace(%
+/(?=\()?(\d+)(?=\))?!/g,"fact($1)");
+ if (!CkBalVert(UserInput))
+ {
+ eqAppAlert(\eqerrABS,3);
+ ok2Continue = false;
+ return false;
+ }
+ UserInput=groupJSf(UserInput);
+ re=/(\w)(e)(\^)/g;
+ repi=/(\w)(pi)/g;
+ UserInput=UserInput.replace(re, "$1*$2$3");
+ UserInput=UserInput.replace(repi, "$1*$2");
+ UserInput=UserInput.replace(/(sec)/g, "s@e@c");
+ re=/(\w)(e)([^\^])?/g;
+ UserInput=UserInput.replace(re,"$1($2\^1)$3");
+ UserInput=UserInput.replace(/(s@e@c)/g, "sec");
+ re=/E(\d)/g;
+ UserInput=UserInput.replace(re,"E+$1");
+ re=/(\d)\*E/g;
+ UserInput=UserInput.replace(re,"$1E");
+ if(!Ckfuncs(UserInput)) return false;
+ if (typeof(Ck4Exponents) != "undefined")
+ UserInput = Ck4Exponents(UserInput);
+ if (typeof(Ck4Products) != "undefined" )
+ UserInput = Ck4Products(UserInput);
+ ok2Continue = true;
+ re = /\b(log)\b/g;
+ UserInput = UserInput.replace(re, "logc");
+ while (/\|/.test(UserInput)&&(ok2Continue))
+ {
+ re = /(\|)([^\|]*)(\|)([-\+\/\*\^\)\|])/;
+ if (re.test(UserInput))
+ if (re.exec(UserInput)[4] == '^')
+ UserInput = UserInput.replace(re, "(abs($2))$4");
+ else
+ UserInput = UserInput.replace(re, "abs($2)$4");
+ else
+ {
+ re = /(\|)([^\|]*)(\|$)/;
+ if (re.test(UserInput))
+ UserInput = UserInput.replace(re, "abs($2)");
+ }
+ }
+ re=/\b(pi)\b/g;
+ UserInput=UserInput.replace(re,"($1)")
+ var reTstExp = /(\))?\^(\()?/g;
+ while ( ((aResults=reTstExp.exec(UserInput))!=null)&&(ok2Continue) )
+ {
+ var firstGroup = Number(Boolean(aResults[1])); // 0 or 1
+ var secondGroup = 2*Number(Boolean(aResults[2])); // 0 or 2
+ var caseStudy = firstGroup+secondGroup; // 0,1,2,3
+ switch(caseStudy) {
+ case 0:
+ re=/([a-zA-Z]|\d*\.?\d*)\^([a-zA-Z]|[\+-]?\d+\.?\d*|%
+[\+-]?\d*\.?\d+)/;
+ if (re.test(UserInput))
+ UserInput=Ck4OddRoots(UserInput,re);
+ else ok2Continue=false;
+ break;
+ case 1:
+ aP =/\)\^/.exec(UserInput);
+ LeftP=FindBalP(UserInput,aP.index,0);
+ re = new RegExp("\\((.{"+eval(aP.index-LeftP-1)
+ +"})\\)\\^([a-zA-Z]|[\+-]?\\d+\\.?\\d*|%
+[\+-]?\\d*\\.?\\d+)");
+ if (re.test(UserInput))
+ UserInput=Ck4OddRoots(UserInput,re);
+ else ok2Continue=false;
+ break;
+ case 2:
+ aP = /\^\(/.exec(UserInput);
+ RightP=FindBalP(UserInput,aP.index+1,1);
+ re = new RegExp("([a-zA-Z]|\\d*\\.?\\d*)\\^\\((.{"
+ +eval(RightP-aP.index-2)+"})\\)");
+ if (re.test(UserInput))
+ UserInput=Ck4OddRoots(UserInput,re);
+ else ok2Continue=false;
+ break;
+ case 3:
+ aP = /\)\^\(/.exec(UserInput);
+ LeftP=FindBalP(UserInput,aP.index,0);
+ RightP=FindBalP(UserInput,aP.index+2,1);
+ re = new RegExp("\\((.{"+eval(aP.index-LeftP-1)
+ +"})\\)\\^\\((.{"+eval(RightP-aP.index-3)+"})\\)");
+ if (re.test(UserInput))
+ UserInput=Ck4OddRoots(UserInput,re);
+ else ok2Continue=false;
+ break;
+ default:
+ ok2Continue=false;
+ }
+ }
+ if (!ok2Continue)
+ {
+ eqAppAlert(\eqerrBadExp,3);
+ return false;
+ }
+ else {
+ UserInput=addMathObject(UserInput);
+ return UserInput;
+ }
+}
+function ChngAllGrpsToParens(UserInput)
+{
+ UserInput = UserInput.replace(/\[|\{/g, "\(");
+ UserInput = UserInput.replace(/\]|\}/g, "\)");
+ return UserInput;
+}
+function Ck4OddRoots(UserInput,re) {
+ var a=re.exec(UserInput);
+ while ( a[2].charAt(0)=="\(") {
+ var RightP=FindBalP(a[2],0,1); // forward search
+ if (RightP == a[2].length-1)
+ a[2]=a[2].substring(1,a[2].length-1);
+ else break;
+ }
+ var b=a[2].split("/");
+ if ( b.length==2 ) {
+ try { _m=eval(b[1])
+ if ( _m == undefined || isNaN(_m) ) throw new Error();
+ var d = b[1];
+ var isEnclosed=(d.charAt(0) == "\(" && d.charAt(d.length-1)=="\)");
+ if (!isEnclosed)
+ if (/.+[\+\-].+/.test(d)) throw new Error();
+ if (isEnclosed) d = s.substring(1,d.length-1);
+ var n = b[0];
+ isEnclosed=(n.charAt(0) == "\(" && n.charAt(d.length-1)=="\)");
+ if (!isEnclosed)
+ if (/.+[\+\-].+/.test(n)) throw new Error();
+ if ( d == parseInt(d) && ( Boolean(d \% 2) ) ) {
+ UserInput=UserInput.replace(re,
+ "(pow(sgn($1),"+n+")*(pow(abs($1),$2)))");
+ return UserInput;
+ }
+ } catch(e) {}
+ }
+ UserInput=UserInput.replace(re,"(pow($1,$2))");
+ return UserInput;
+}
+function groupJSf(UserInput)
+{
+ var re, regexp, aP, RightP;
+ for (var i=0; (i<JSf.length) && (ok2Continue); i++)
+ {
+ re = new RegExp(JSf[i]+"\\\(");
+ while ( re.test(UserInput) && (ok2Continue) )
+ {
+ regexp = new RegExp(JSf[i]+"\\\(", "g");
+ if ( (aP = regexp.exec(UserInput)) != null )
+ {
+ RightP=FindBalP(UserInput,regexp.lastIndex-1,1);
+ offsetArg = RightP - regexp.lastIndex;
+ regexp = new RegExp(%
+"("+JSf[i]+")\\((.{"+offsetArg+"})\\)");
+ regexp.lastIndex=0;
+ if (regexp.test(UserInput))
+ UserInput=UserInput.replace(regexp,"($1@($2))");
+ else ok2Continue=false;
+ continue;
+ }
+ }
+ }
+ UserInput=UserInput.replace(/@/g,"");
+ return UserInput;
+}
+function TypeParameters(v)
+{
+ var aV;
+ aV = ( (v.indexOf(":") == -1) && (v.indexOf(",") == -1) ) ?
+ v.split("") : v.split(",");
+ for ( var i=0; i < aV.length; i++)
+ if ( aV[i].indexOf(":") == -1 ) aV[i] = "r:"+aV[i];
+ return aV.join(",")
+}
+function ProcResp(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+{
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(arguments.length>7)?arguments[7]:event.value;
+ var success = _ProcResp(flag,CorrAns,UserAns,%
+n,epsilon,domain,indepVars,oComp);
+ if ( success == -1 || !ok2Continue )
+ { resetHeadsUp(flag,fieldname); return null; } // dps17
+ if ( success == null )
+ { resetHeadsUp(flag,fieldname);
+ return syntaxError(), null; } // dps17
+ return notifyField(success, flag, fieldname);
+}
+// changed name of var comp -> oComp
+function _ProcResp(flag,CorrAns,UserAns,n,epsilon,domain,%
+indepVars,oComp){
+ ok2Continue = true;
+ CorrAns = ParseInput(CorrAns);
+ if (!ok2Continue) {
+ eqAppAlert("Syntax error in author's answer! Check console.",3);
+ return null;
+ }
+ var comp = ( typeof oComp == "object" ) ?
+ ((typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp ) : oComp;
+ if ( (typeof(oComp)=="object") %
+&& (typeof(oComp.priorParse)!="undefined") ) {
+ var retn=processSpecialParse(oComp.priorParse,UserAns);
+ if (retn==null) return -1;
+ }
+ var reCP=/((C|P)\(.+?)(,)(.+?\))/g
+ UserAns=UserAns.replace(reCP,"$1@c@$4");
+ var reComma=/,/;
+ if ( reComma.test(UserAns) ) {
+ eqAppAlert(\eqSyntaxErrorComma,3);
+ return -1;
+ }
+ var reRlCommaSubst=/@c@/g;
+ UserAns=UserAns.replace(reRlCommaSubst,",");
+ UserAns = ParseInput(UserAns);
+ indepVars = TypeParameters(indepVars);
+ if (!ok2Continue) return null;
+ var success=randomPointCompare(n,domain,indepVars,%
+epsilon,CorrAns,UserAns,comp);
+ if ( success && (typeof(oComp)=="object") %
+&& (typeof(oComp.postParse)!="undefined") )
+ success=processSpecialParse(oComp.postParse,UserAns);
+ return success;
+}
+function processSpecialParse(oParse,UserAns) {
+ var retn, f, _o
+ if ( typeof(oParse) == "object" ) {
+ for ( var i=0; i < oParse.length; i++) {
+ _o=oParse[i];
+ if (typeof(_o)=="function") {
+ retn=_o(UserAns);
+ if (retn==null) return retn;
+ } else {
+ retn=_o[0].apply(null, [ UserAns ].concat(_o.slice(1)));
+ if (retn==null) return null;
+ }
+ }
+ } else {
+ retn = oParse(UserAns);
+ }
+ return retn;
+}
+function randomPointCompare (n,domain,indepVars,epsilon,%
+CorrAns,userAns,comp)
+{
+ var error, i, j, k;
+ var aXY = new Array();
+ domain = domain.replace(/[\[\]\s]/g, "");
+ var aIntervals = domain.split("&");
+ for (k=0; k < aIntervals.length; k++)
+ {
+ var aInterval = aIntervals[k].split("x");
+ nI = aInterval.length;
+ with (Math) {
+ for (j=0; j < n; j++)
+ {
+ for (i=0; i < nI; i++)
+ {
+ var endpoints = aInterval[i].split(",");
+ aXY[i] = eval(endpoints[0])-0+(eval(endpoints[1])%
+-eval(endpoints[0]))*Math.random();
+ }
+ var cXY = aXY.toString();
+ error = comp(domain,cXY,indepVars,CorrAns,userAns);
+ if (error == null) return null;
+ if ( (error == -1) || (error > epsilon) ) {j=-1; break;}
+ }
+ }
+ if (j!=n) return false;
+ }
+ return true;
+}
+function diffCompare(_a,_c,_v,_F,_G) {
+ var aXY = _c.split(",");
+ var _V = _v.split(","); // e.g. _V[0] = "i:x"
+ 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])+";");
+ }
+ _F = eval(_F);
+ if ( app.viewerVersion >= 5)
+ {
+ var rtnCode = 0;
+ eval("try {if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+ +"catch (e) { rtnCode=1; }");
+ switch(rtnCode)
+ {
+ case 0: break;
+ case 1: return null;
+ case -1: return -1;
+ }
+ }
+ else
+ if(isNaN(_G = eval(_G))) return -1;
+ return Math.abs ( _F - _G );
+}
+function reldiffCompare(_a,_c,_v,_F,_G) {
+ var aXY = _c.split(",");
+ var _V = _v.split(","); // e.g. _V[0] = "i:x"
+ 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])+";");
+ }
+ _F = eval(_F);
+ if ( app.viewerVersion >= 5)
+ {
+ var rtnCode = 0;
+ eval("try { if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+ +"catch (e) { rtnCode=1; }");
+ switch(rtnCode)
+ {
+ case 0: break;
+ case 1: return null;
+ case -1: return -1;
+ }
+ }
+ else
+ if(isNaN(_G = eval(_G))) return -1;
+ return Math.abs ( (_F - _G)/_G );
+}
+function requireForm(UserAns, regexpr) {
+ var msg=\defaultReqFormMsg;
+ UserAns = stripWhiteSpace (UserAns);
+ if (!ok2Continue) return null;
+ UserAns = ChngAllGrpsToParens(UserAns);
+ if (arguments.length>2) msg=arguments[2];
+ if (typeof(regexpr.length)=="undefined") {
+ if (regexpr.test(UserAns)) return true;
+ else { eqAppAlert(msg,3); return null; }
+ } else {
+ for (var i=0; i<regexpr.length; i++)
+ if (regexpr[i].test(UserAns)) break;
+ if ( i < regexpr.length ) return true;
+ else { eqAppAlert(msg,3); return null; }
+ }
+}
+function denyForm(UserAns, regexpr) {
+ var msg=\defaultReqFormMsg;
+ UserAns = stripWhiteSpace (UserAns);
+ if (!ok2Continue) return null;
+ UserAns = ChngAllGrpsToParens(UserAns);
+ if (arguments.length>2) msg=arguments[2];
+ if (typeof(regexpr.length)=="undefined") {
+ if (regexpr.test(UserAns)) { eqAppAlert(msg,3); return null; }
+ else return true;
+ } else {
+ for (var i=0; i<regexpr.length; i++)
+ if (regexpr[i].test(UserAns)) break;
+ if ( i < regexpr.length ) { eqAppAlert(msg,3); return null; }
+ else return true;
+ }
+}
+function requireFormNot(UserAns, regexpr) {
+ UserAns = stripWhiteSpace (UserAns);
+ if (!ok2Continue) return null;
+ UserAns = stripOutMuli(UserAns);
+ UserAns = ChngAllGrpsToParens(UserAns);
+ if (typeof(regexpr.length)=="undefined") {
+ if (regexpr.test(UserAns)) return false;
+ else return true;
+ } else {
+ for (var i=0; i<regexpr.length; i++)
+ if (regexpr[i].test(UserAns)) break;
+ if ( i < regexpr.length ) return false;
+ else return true;
+ }
+}
+\end{newsegment}
+\begin{newsegment}{Eq: Support for multi-letter variables}
+if (!String.prototype.trim) {
+ String.prototype.trim = function () {
+ return this.replace(/^[\s\string\uFEFF\string\xA0]+|%
+[\s\string\uFEFF\string\xA0]+$/g, '');
+ };
+}
+function _rplVarsBy(str1,str2) {
+ var re=new RegExp(str1,"g");
+ var result=str1.replace(re,str2);
+ return result;
+}
+function processMathVars(str) {
+ var pos1,pos2,lead,tmp;
+ while ((pos1=str.indexOf("_rplVarsBy"))!=-1) {
+ pos2=str.indexOf("@");
+ lead=str.substring(0,pos1);
+ tmp=str.substring(pos1,pos2);
+ str=str.substring(pos2+1);
+ tmp=eval(tmp);
+ str=lead+tmp+str;
+ }
+ str=str.replace(/\s/g,"");
+ return str;
+}
+getSubstValue.aSubsts=new Array(); // dps17
+function getSubstValue(v,s){
+/*
+ v=variable list, it may have the form "xyz", or if there
+ substitutions, it might look like "_rplVarsBy('theta','x')@";
+ s=Either the user's answer or the author's answer.
+
+ First develop an array of all variables are their substitutes.
+ ie, getSubstValue.aSubsts=[ "c","h", ["theta",x"], ["alpha",y],...];
+*/
+ var pos1,pos2,tmp,args,re,arg1,arg2;
+/*
+ change new style to old
+ New style: v="c,_rplVarsBy('theta->\u03B8','r:x')@,%
+_rplVarsBy('alpha->\u03B1','r:y')@";
+ Old style: v="c_rplVarsBy('theta->\u03B8','x')@%
+_rplVarsBy('alpha->\u03B1','y')@";
+*/
+ re=/([^'])(,)/g;
+ v=v.replace(re,'$1');
+ re=/([ri]\string\:)+(\string\w)/g;
+ v=v.replace(re,'$2');
+ getSubstValue.aSubsts=[]; // dps17
+ var start=0;
+ while (true) {
+ v=v.substring(start);
+ pos1=v.indexOf("_rplVarsBy");
+ if (pos1==-1) break;
+ pos2=v.indexOf("@");
+ args=v.substring(pos1+10+1,pos2-1);
+ tmp=args.split(",");
+ arg1=eval(tmp[0].toString());
+ tmp1=arg1.split("->");
+ for (var i=0; i<tmp1.length; i++)
+ tmp1[i]=tmp1[i].trim();
+ if (tmp1.length==1) getSubstValue.aSubsts.push(tmp1[0]);
+ else getSubstValue.aSubsts.push(tmp1);
+ arg2=eval(tmp[1].toString());
+ re=new RegExp(tmp1[0],"g");
+ s=s.replace(re,arg2);
+ start=pos2+1;
+ }
+ return s;
+}
+function RespBoxAppr(e){
+ var value=(typeof e=="object")?e.value:e;
+ var re;
+ for (var i=0; i<getSubstValue.aSubsts.length; i++) {
+ if (typeof getSubstValue.aSubsts[i]=="object") {
+ re=new RegExp(getSubstValue.aSubsts[i][0],"g");
+ value=(value.replace(re,getSubstValue.aSubsts[i][1],"g"));
+ }
+ }
+ return value;
+}
+\end{newsegment}
+\begin{newsegment}{Eq: Support Text Fill-in}
+function ProcRespTxt() {
+ var i, success, authorAnswer, userAnswer = event.value;
+ var fieldname=event.target.name;
+ var flag = arguments[0];
+ var filterMethod = arguments[1];
+ var compareMethod = arguments[2];
+ if ( !ProcessIt || userAnswer == "" ) return null;
+ for (i = 3; i < arguments.length; i++)
+ if ( success = compareTxt(userAnswer,arguments[i],%
+filterMethod, compareMethod)) break;
+ return notifyField(success, flag, fieldname);
+}
+function ProcRespTxtPC() {
+ var i, success, authorAnswer, userAnswer = event.value;
+ ProcRespTxtPC.txtPCpCr=0;
+ var fieldname=event.target.name;
+ var flag = arguments[0];
+ var filterMethod = arguments[1];
+ var compareMethod = arguments[2];
+ if ( !ProcessIt || userAnswer == "" ) return null;
+ for (i=3;i<arguments.length;i++)
+ if(compareTxt(userAnswer,arguments[i][0],%
+filterMethod,compareMethod))
+ ProcRespTxtPC.txtPCpCr+=(arguments[i][1]);
+ success=(ProcRespTxtPC.txtPCpCr>0);
+ return notifyField(success,flag,fieldname);
+}
+function compareTxt(userAnswer,authorAnswer,filterMethod,compareMethod)
+{
+ var caseSensitive = ( compareMethod==3 ) ? "" : "i";
+ var reSwitches = "g"+caseSensitive;
+ userAnswer = new String(userAnswer).filter(filterMethod);
+ switch(compareMethod) {
+ case 1:
+ var AuthorAnswer;
+ var aAuthorAnswer = authorAnswer.split(/\s+/);
+ for (var j=0; j < aAuthorAnswer.length; j++) {
+ AuthorAnswer = new String(%
+aAuthorAnswer[j]).filter(filterMethod);
+ AuthorAnswer = AuthorAnswer.replace(/\./g,"\\.");
+ AuthorAnswer = AuthorAnswer.replace(/@any@/g,".");
+ var re = new RegExp(AuthorAnswer, reSwitches);
+ if (!re.test(userAnswer)) return false;
+ }
+ return true;
+ default:
+ authorAnswer=new String(authorAnswer).filter(filterMethod);
+ return (userAnswer == authorAnswer) ? true : false;
+ }
+}
+String.prototype.filter = eqFilter;
+function eqFilter(filterMethod) {
+ switch (filterMethod) {
+ case 0:
+ var re = /\W/g;
+ return this.replace(re,"").toLowerCase();
+ case 1:
+ var re = /\s/g;
+ return this.replace(re,"").toLowerCase();
+ case 2:
+ var re = /\s/g;
+ return this.replace(re,"");
+ case 3:
+ default:
+ return this.toString();
+ }
+}
+\end{newsegment}
+\begin{newsegment}{Eq: Quiz Management}
+function InitMsg(msg) { return (\eqInitQuizMsg) }
+function syntaxError() { eqAppAlert(\eqSyntaxErrorUndefVar,3); }
+var lstOfQuizzes=new Object();
+var reExtractBaseName=/^.+?\.(.+?)\..+$/;
+function ProcUserResp(key,userresp,probno,notify)
+{
+ if (key==null) {
+ ProcUserNoResp.apply(null,arguments);
+ return;
+ }
+ if ( arguments.length > 4 ) {
+ if ( typeof RightWrong[probno] == "undefined" ) {
+ RightWrong[probno] = new Array();
+ RightWrong[probno][0] = "grp";
+ Responses[probno] = new Array();
+ }
+ RightWrong[probno][arguments[4]] = (!!key) ? 1 : 0;
+ Responses[probno][arguments[4]] = userresp;
+ } else {
+ if ( typeof key == "object" ) {
+ RightWrong[probno][0] = key[0];
+ RightWrong[probno][1] = key[1];
+Responses[probno] = userresp;
+if (Responses[probno].length==0)
+ Responses[probno]=undefined;
+ } else {
+ RightWrong[probno] = (!!key)?1:0;
+Responses[probno] = userresp;
+}
+ }
+ if ( (typeof fieldPopTbl == "function")&&(event.type != "Link") ) {
+ var a=reExtractBaseName.exec(event.target.name);
+ fieldPopTbl(a[1]);
+ }
+}
+function ProcUserNoResp(key,userresp,probno,notify)
+{
+ if ( arguments.length > 4 ) {
+ RightWrong[probno][arguments[4]] = undefined;
+ Responses[probno][arguments[4]] = undefined;
+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;
+ ProbValue[probno]=undefined;
+}
+ } else {
+ RightWrong[probno] = undefined;
+ Responses[probno] = undefined;
+ }
+ if ( typeof fieldPopTbl == "function" ) {
+ var a=reExtractBaseName.exec(event.target.name);
+ fieldPopTbl(a[1]);
+ }
+}
+function InitializeQuiz(qtfield,mark) {
+ var oQName=eval(qtfield);
+ Score=0;
+ retn = null;
+ if (!isQuizInitialized(qtfield)&&!isAQuizUnfinished()) return null;
+ neutralizeQuizzes();
+ ProcessIt = false;
+ aQuizControl[qtfield] = 1;
+ this.resetForm(["ScoreField." + qtfield,"mc."+qtfield,
+ "obj."+qtfield,"mck."+qtfield,"Ans."+qtfield,
+ "PointsField."+qtfield,"PercentField."+qtfield,
+ "essay."+qtfield,"GradeField."+qtfield,
+ "grpobj."+qtfield,"qMark."+qtfield, qtfield+"SanityCheck",
+ qtfield+"SanityCheckPts",qtfield+"SanityCheckOOPts",
+ "rbmarkup."+qtfield]);
+ ProcessIt = true;
+ var f = this.getField("qMark."+qtfield);
+ if ( f != null ) f.display = display.hidden;
+ f = this.getField("promptButton."+qtfield);
+ if (f != null) f.display=display.visible;
+ if (arguments.length<3) {
+ f = this.getField("obj." + qtfield);
+ if ( f != null ) f.readonly = false;
+ }
+ RightWrong=new Array();
+ Responses=new Array();
+ ProbValue=new Array();
+ ProbDist=new Array();
+ ProbType=new Array();
+ if (mark==1)
+ {
+ var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
+?\defaultColorJS:oQName.DefaultColorJSLoc;
+ var rightColor=(typeof oQName.RightColorJSLoc=="undefined")%
+?\rghtColorJS:oQName.RightColorJSLoc;
+ var corrAnsSymb=(typeof oQName.CorrAnsSymbJSLoc=="undefined")%
+?\corrAnsSymbJS:oQName.CorrAnsSymbJSLoc;
+ var f = this.getField("mcq." + qtfield);
+ if (f != null) {
+ f.delay=true;
+ f.display=display.hidden;
+ this.resetForm([f.name]);
+ f.textColor = rightColor;
+ var a = f.getArray();
+ for (var i=0; i<a.length; i++) a[i].style=corrAnsSymb;
+ f.delay=false;
+ }
+ f = this.getField("obj." + qtfield);
+ if ( f != null ) f.strokeColor = defaultColor;
+ f = this.getField("grpobj." + qtfield);
+ if ( f != null ) f.strokeColor = defaultColor;
+ f = this.getField("corr." + qtfield);
+ if ( f != null ) f.display = display.hidden;
+ f = this.getField(qtfield+"SanityCheck");
+ if ( f != null ) f.strokeColor=defaultColor;
+ f = this.getField("rbmarkup."+qtfield);
+ if ( f != null ) f.display = display.hidden;
+ }
+ return null;
+}
+function resetHeadsUp(flag,fieldname) {
+ if (flag==1) return;
+ var pos1=fieldname.indexOf(".");
+ var pos2=fieldname.indexOf(".",pos1+1);
+ var baseName=fieldname.substring(pos1+1,pos2);
+ var oQName=eval(baseName);
+ var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
+?\defaultColorJS:oQName.DefaultColorJSLoc;
+ var f=this.getField(fieldname);
+ if (f!=null) f.strokeColor=defaultColor;
+
+}
+function neutralizeQuizzes()
+{
+ for ( var qtfield in aQuizControl ) aQuizControl[qtfield] = 0;
+}
+isAQuizUnfinished.check=true;
+function isAQuizUnfinished()
+{
+ if (!isAQuizUnfinished.check) return true;
+ for ( var qtfield in aQuizControl )
+ if ( aQuizControl[qtfield] == 1 )
+ {
+ eqAppAlert(\eqerrUnfinishQuiz, 3);
+ return false;
+ }
+ return true;
+}
+function isQuizInitialized(qtfield)
+{
+ if (typeof (aQuizControl[qtfield]) == "undefined")
+ return false;
+ else
+ return (aQuizControl[qtfield] == 1);
+}
+function isEndQuizPushed(qtfield)
+{
+ if (typeof (aQuizControl[qtfield]) == "undefined")
+ return false;
+ else
+ return (aQuizControl[qtfield] == -1);
+}
+function resetQuiz(qtfield)
+{
+ aQuizControl[qtfield] = -1;
+}
+function RecordPointValue(ptvalue,probno)
+{
+ if (arguments.length > 2) {
+ if ( typeof ProbValue[probno] == "undefined" ) {
+ ProbValue[probno]=[1,arguments[5],arguments[3],arguments[4]];
+ ProbValue[probno][3+arguments[2]] = ptvalue;
+ } else ProbValue[probno][3+arguments[2]] = ptvalue;
+ }
+ else {
+ ProbValue[probno]=ptvalue;
+ }
+}
+function RecordProblemType(qType,probno)
+{
+ ProbType[probno]=qType;
+}
+function GrpRight( a, nProb, qtfield )
+{
+ var f = this.getField("grpobj."+qtfield+"."+nProb);
+ var l = f.getArray().length
+ var prod = 1;
+ for ( var i=1; i <= l; i++) prod *= !!a[i];
+ return prod;
+}
+function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
+{
+ Score = 0; ptScore = 0;
+ NPointTotal=nPointTotal; NQuestions=nQuestions;
+ for (var i=1; i < RightWrong.length; i++)
+ {
+ if ( (typeof RightWrong[i] == "object" ) %
+ && ( RightWrong[i][0] == "grp" ) ) {
+ // grouped question
+ Score += GrpRight(RightWrong[i], i, qtfield);
+ var aWeights = ProbValue[i].slice(2);
+ var evalGrpJS = eval(ProbValue[i][1]);
+ var evalGrpJSValue = evalGrpJS(this,qtfield,i,
+ RightWrong[i],aWeights);
+ ProbDist[i] = evalGrpJSValue;
+ ptScore = ptScore + evalGrpJSValue;
+ } else {
+ if (typeof RightWrong[i] == "object") {
+ if ( RightWrong[i][0] == 1 ) {
+ Score++;
+ ProbDist[i]=(typeof ProbValue[i] == "object") ?
+ 1*ProbValue[i][1] : 1*ProbValue[i];
+ ptScore += (1*ProbDist[i]);
+ } else {
+ if (RightWrong[i][1] == 1)
+ ProbDist[i]=(typeof ProbValue[i]=="object") ?
+ 1*ProbValue[i][1] : 1*ProbValue[i];
+ else
+ ProbDist[i]=(typeof ProbValue[i] == "object") ?
+ 1*ProbValue[i][1] : 0;
+ ptScore += (1*ProbDist[i]);
+ }
+ } else {
+ if (RightWrong[i]==1) {
+ Score++;
+ ProbDist[i] = ( typeof ProbValue[i] == "object") ?
+ 1*ProbValue[i][1] : 1*ProbValue[i];
+ ptScore += (1*ProbDist[i]);
+ }
+ else {
+ ProbDist[i] = ( typeof ProbValue[i] == "object") ?
+ 1*ProbValue[i][2] : 0;
+ ptScore += (1*ProbDist[i]);
+ }
+ }
+ }
+ }
+ if ( !negPointsAllowed && (ptScore < 0) ) ptScore = 0;
+ if (ptScore == nPointTotal) pcScore = 100;
+ else pcScore = util.printf("\%.1f", (100 * ptScore) / nPointTotal);
+ var oQName=eval(qtfield);
+ var gradeScale=%
+(typeof oQName.GradeScaleLoc=="undefined")%
+?GradeScaleDefault:oQName.GradeScaleLoc;
+ quizGrade = GetGrade.apply(null,gradeScale);
+ var f = this.getField("ScoreField."+qtfield);
+ if ( f != null ) f.value=(\eqQuizTotalMsg);
+ f = this.getField("PointsField."+qtfield);
+ if ( f != null) f.value=(\eqQuizPointsMsg);
+ f = this.getField("PercentField."+qtfield);
+ if ( f != null) f.value=(\eqQuizPercentMsg);
+ f = this.getField("GradeField."+qtfield);
+ if ( f != null) f.value=(\eqQuizGradeMsg);
+}
+function GetGrade()
+{
+ var cGrade, aRange;
+ var l = arguments.length/2;
+ if (pcScore >=100) return arguments[0];
+ if (pcScore < 0 ) return arguments[arguments.length-2];
+ for (var i=0; i < l; i++)
+ {
+ cGrade = arguments[2*i];
+ aRange = arguments[2*i+1];
+ if ( (pcScore >= arguments[2*i+1][0])
+ && (pcScore < arguments[2*i+1][1])) return cGrade;
+ }
+ return null;
+}
+function ProcessQuestion (key,letterresp,probno,
+ quizno,qtfield,notify,mark,msg) {
+ var silent = ( arguments.length > 8 ) ? true : false;
+ if (!isQuizInitialized(qtfield))
+ {
+ if (!silent) eqAppAlert(InitMsg(msg),3);
+ this.resetForm(["mc."+qtfield+"."+probno,
+ "mck."+qtfield+"."+probno]);
+ }
+ else
+ {
+ ProcUserResp(key,letterresp,probno,notify);
+ if (mark==1)
+ {
+ var oQName=eval(qtfield);
+ var defaultColor=%
+(typeof oQName.DefaultColorJSLoc=="undefined")%
+?\defaultColorJS:oQName.DefaultColorJSLoc;
+ var rightColor=%
+(typeof oQName.RightColorJSLoc== "undefined")%
+?\rghtColorJS:oQName.RightColorJSLoc;
+ var wrongColor=%
+(typeof oQName.WrongColorJSLoc=="undefined")%
+?\wrngColorJS:oQName.WrongColorJSLoc;
+ var rightAnsSymb=%
+(typeof oQName.RightAnsSymbJSLoc=="undefined")%
+?\rghtAnsSymbJS:oQName.RightAnsSymbJSLoc;
+ var wrongAnsSymb=%
+(typeof oQName.WrongAnsSymbJSLoc=="undefined")%
+?\wrngAnsSymbJS:oQName.WrongAnsSymbJSLoc;
+ var corrAnsSymb=%
+(typeof oQName.CorrAnsSymbJSLoc=="undefined")%
+?\corrAnsSymbJS:oQName.CorrAnsSymbJSLoc;
+ var f = this.getField("mcq."+qtfield+"."+probno);
+ var fck = this.getField("mck."+qtfield+"."+probno);
+ var bMultiSelect = ( fck != null ) ? true : false;
+ f.delay=true;
+ this.resetForm([f.name]);
+ var a = f.getArray();
+ var l = a.length;
+ if ( bMultiSelect ) {
+ var ack = fck.getArray();
+ for ( var i=0; i<l; i++) {
+ if ( ack[i].isBoxChecked(0) ) {
+ a[i].style = ( a[i].isDefaultChecked(0) ) ?
+ rightAnsSymb : wrongAnsSymb;
+ a[i].textColor = ( a[i].isDefaultChecked(0) ) ?
+ rightColor : wrongColor;
+ a[i].value = "Yes";
+ } else {
+ a[i].style = ( a[i].isDefaultChecked(0) ) ?
+ corrAnsSymb : wrongAnsSymb;
+ a[i].textColor = ( a[i].isDefaultChecked(0) ) ?
+ rightColor : wrongColor;
+ a[i].value = ( a[i].isDefaultChecked(0) ) ?
+ "Yes" : "Off";
+ }
+ }
+ } else {
+ for (var i=0; i < a.length; i++)
+ if (a[i].style == rightAnsSymb)
+ {
+ a[i].style = corrAnsSymb;
+ a[i].textColor = rightColor;
+ }
+ var qr=this.getField(%
+"mcq."+qtfield+"."+probno+"."+quizno);
+ qr.textColor = key ? rightColor :wrongColor;
+ qr.style = key ? rightAnsSymb : wrongAnsSymb;
+ qr.value="Yes"; // gr.checkThisBox(0); // ver 5.0
+ }
+ this.getField("mcq."+qtfield+"."+probno).delay=false;
+ }
+ }
+ if ( typeof fieldPopTbl == "function" ) fieldPopTbl(qtfield);
+}
+function correctQuiz(qtfield,nQuestions)
+{
+ var oQName=eval(qtfield);
+ var defaultColor=(typeof oQName.DefaultColorJSLoc=="undefined")%
+?\defaultColorJS:oQName.DefaultColorJSLoc;
+ var rightColor=(typeof oQName.RightColorJSLoc=="undefined")%
+?\rghtColorJS:oQName.RightColorJSLoc;
+ var wrongColor=(typeof oQName.WrongColorJSLoc=="undefined")%
+?\wrngColorJS:oQName.WrongColorJSLoc;
+ var rightAnsSymb=(typeof oQName.RightAnsSymbJSLoc=="undefined")%
+?\rghtAnsSymbJS:oQName.RightAnsSymbJSLoc;
+ var wrongAnsSymb=(typeof oQName.WrongAnsSymbJSLoc=="undefined")%
+?\wrngAnsSymbJS:oQName.WrongAnsSymbJSLoc;
+ var bFullyCorrect=(typeof oQName.fullyCorrectLoc=="undefined")%
+?\eqCorrChoiceFully:oQName.fullyCorrectLoc; // dpsf07
+ var f = this.getField("mcq." + qtfield);
+ if ( f != null) {
+ if (bFullyCorrect) { // dpsf07
+ f.display = display.visible;
+ } else {
+ for (var n=1; n<=nQuestions; n++) {
+ var h=this.getField("mc."+qtfield+"."+n);
+ var bOk=(h!=null);
+ if(bOk) var choiceType="mc";
+ else {
+ h=this.getField("mck."+qtfield+"."+n);
+ bOk=(h!=null);
+ var choiceType="mck";
+ }
+ if (bOk) {
+ var mcq=this.getField("mcq."+qtfield+"."+n);
+ var g=mcq.getArray();
+ if (choiceType=="mc") {
+ for (var j=0; j< g.length; j++) {
+ g[j].display=(h.isBoxChecked(j))?%
+display.visible:display.hidden;
+ }
+ } else {
+ var ck=h.getArray();
+ for (var j=0; j< g.length; j++) {
+ g[j].display=(ck[j].isBoxChecked(0))?%
+display.visible:display.hidden;
+ }
+ }
+ }
+ }
+ }
+ }
+ f = this.getField("obj." + qtfield);
+ if ( f != null ) {
+ var a = f.getArray();
+ var re=/^obj\./;
+ for (var i = 0; i < a.length; i++) {
+ var probno = a[i].name.replace(/.*\./g,"");
+ var rbmuname = a[i].name.replace(re,"rbmarkup\.");
+ var oRBMarkup = this.getField(rbmuname);
+ var bRBMU = ( oRBMarkup != null );
+ if ( RightWrong[probno] == 1 ) {
+ a[i].strokeColor = rightColor;
+ if (bRBMU) {
+ oRBMarkup.textColor=rightColor;
+ oRBMarkup.style=rightAnsSymb;
+ }
+ } else {
+ a[i].strokeColor = wrongColor;
+ if (bRBMU) {
+ oRBMarkup.textColor=wrongColor;
+ oRBMarkup.style=wrongAnsSymb;
+ }
+ }
+ }
+ }
+ f = this.getField("grpobj." + qtfield);
+ var re=/^grpobj\./;
+ if ( f != null ) {
+ var a = f.getArray();
+ for ( var i = 0; i < a.length; i++) {
+ var rbmuname = a[i].name.replace(re,"rbmarkup\.");
+ var oRBMarkup = this.getField(rbmuname);
+ var bRBMU = ( oRBMarkup != null );
+ var aX = a[i].name.split(".");
+ var probno = 1*aX[aX.length-2];
+ var grpProbno = 1*aX[aX.length-1];
+ if ( ( RightWrong[probno] != undefined ) %
+&& ( RightWrong[probno][grpProbno] == 1 ) ) {
+ a[i].strokeColor = rightColor;
+ if (bRBMU) {
+ oRBMarkup.textColor=rightColor;
+ oRBMarkup.style=rightAnsSymb;
+ }
+ } else {
+ a[i].strokeColor = wrongColor;
+ if (bRBMU) {
+ oRBMarkup.textColor=wrongColor;
+ oRBMarkup.style=wrongAnsSymb;
+ }
+ }
+ }
+ }
+ f=this.getField("rbmarkup."+qtfield);
+ if ( f != null ) f.display = display.visible;
+ % if ( f != null ) f.strokeColor = defaultColor;
+ f = this.getField("promptButton." + qtfield)
+ if ( f != null ) f.display = display.hidden;
+ f = this.getField("corr." + qtfield);
+ if ( f != null ) f.display = display.noPrint;
+ f = this.getField("qMark."+qtfield);
+ if ( f != null )
+ {
+ for ( var i = 1; i <= nQuestions; i++)
+ {
+ if ( ProbValue[i] == undefined ) ProbValue[i]=0
+ f = this.getField("qMark."+qtfield+"."+(i-1));
+ if ( f != null )
+ {
+ // find the next non-null field
+ for ( var j=i; j <= nQuestions; j++)
+ {
+ var h = this.getField("qMark."+qtfield+"."+j);
+ if ( h != null ) break;
+ }
+ var g = f.getArray();
+ var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
+ if ( !negPointsMarkupAllowed && (qpts < 0) ) qpts=0;
+ g[0].value = qpts + (( qpts == 1 ) ? " \eqptLabel\space"
+ : " \eqptsLabel");
+ }
+ }
+ this.getField("qMark."+qtfield).display = display.visible;
+ }
+}
+function getTotalTally(basename) {
+ var sqtotal=0;
+ var f=this.getField("tally."+basename);
+ var g = f.getArray();
+ for (var i=0; i<g.length; i++) {
+ if ( g[i] == event.target ) sqtotal += (1*event.value);
+ else sqtotal += (1*g[i].value);
+ }
+ if ( ( f=this.getField("tallytotal."+basename) ) != null )
+ f.value = sqtotal;
+}
+function clearAllSubQuizzes() {
+ isAQuizUnfinished.check=false;
+ for ( var o in lstOfQuizzes) {
+ if (lstOfQuizzes[o].isSubmitted)
+ eval ( lstOfQuizzes[o].initializeWith );
+ }
+ isAQuizUnfinished.check=true;
+}
+\end{newsegment}
+\begin{newsegment}{Eq: Support for Multi-Selection}
+function ProcessMultiSelection(key,letterresp,probno,%
+quizno,qtfield,pts,ppts) {
+ var f = this.getField("mck."+qtfield+"."+probno);
+ if ( typeof ProbValue[probno] == "undefined" ) {
+ var g = f.getArray();
+ var nTotalCorrect = 0;
+ for ( var i=0; i<g.length; i++ )
+ nTotalCorrect += (1*g[i].exportValues[0].charAt(0));
+ ProbValue[probno] = new Array();
+ RightWrong[probno] = new Array();
+ ProbValue[probno] = [nTotalCorrect,pts,[]];
+ RightWrong[probno][2] = new Array();
+ } else var nTotalCorrect = ProbValue[probno][0];
+ var fck = this.getField("mck."+qtfield+"."+probno+"."+quizno);
+ if ( fck.isBoxChecked(0) ) {
+ ProbValue[probno][2][quizno] = ppts;
+ RightWrong[probno][2][quizno] = key;
+ } else {
+ ProbValue[probno][2][quizno] = undefined;
+ }
+ var pointsThisProblem=0;
+ var scoreThisProblem = 0;
+ var letterResponses = new Array();
+ var areAllCorrect=1;
+ var numCorrect=0;
+ for ( var i=1; i< ProbValue[probno][2].length; i++ ) {
+ if ( typeof ProbValue[probno][2][i] != "undefined" )
+ letterResponses[i] = (String.fromCharCode(96+i));
+ pointsThisProblem += ( ( typeof ProbValue[probno][2][i]==%
+"undefined" )?0:ProbValue[probno][2][i]);
+ if ( typeof ProbValue[probno][2][i]!="undefined" ) {
+ areAllCorrect *= (1*RightWrong[probno][2][i]);
+ numCorrect +=(1*RightWrong[probno][2][i]);
+ }
+ }
+ scoreThisProblem = areAllCorrect*numCorrect;
+ var scoreThisProblem = Number( scoreThisProblem == nTotalCorrect );
+ if (scoreThisProblem==1 && pointsThisProblem==0 )
+ pointsThisProblem=pts;
+ ProbValue[probno][1] =
+ ( (ProbValue[probno][1] == 0) && (scoreThisProblem == 1) )
+ ? pts : pointsThisProblem;
+ var passKey = ( pointsThisProblem > 0 ) ? 1 : 0;
+ var retn = [ [ scoreThisProblem, passKey ], letterResponses ] ;
+ return retn;
+}
+function LimitSelection(n,fname,k) {
+ var f = this.getField(fname);
+ var g = f.getArray();
+ var total=0;
+ for (var i=0; i<g.length; i++) {
+ total+=( g[i].isBoxChecked(0) );
+ }
+ if (total > n) {
+ eqAppAlert(\limSelWarningMsg,3);
+ f=this.getField(fname+"."+k);
+ f.checkThisBox(0,false);
+ return false
+ } else return true;
+}
+\end{newsegment}
+\begin{newsegment}{Eq: Miscellaneous JS}
+function chooseJSColor( b, c1, c2 ) {
+ return ( b ) ? c1 : c2;
+}
+function notifyField(success, flag, fieldname) {
+ if ( flag != 0 )
+ return (success)?true:false;
+ var f = this.getField(fieldname);
+ var re=/^(obj|grpobj)\./;
+ var gname=fieldname.replace(re,"rbmarkup\.");
+ var g =this.getField(gname);
+ var isthereRBUP = ( g !=null );
+ var h = fieldname.replace(re,"");
+ var index=h.indexOf(".");
+ var oQName = eval(h.substring(0,index));
+ var rightColor=(typeof oQName.RightColorJSLoc=="undefined")%
+?\rghtColorJS:oQName.RightColorJSLoc;
+ var rightSymb=(typeof oQName.RightColorJSLoc=="undefined")%
+?\rghtAnsSymbJS:oQName.RightAnsSymbJSLoc;
+ var wrongColor=(typeof oQName.WrongColorJSLoc=="undefined")%
+?\wrngColorJS:oQName.WrongColorJSLoc;
+ var wrongSymb=(typeof oQName.WrongAnsSymbJSLoc=="undefined")%
+?\wrngAnsSymbJS:oQName.WrongAnsSymbJSLoc;
+ if (success) {
+ f.strokeColor = rightColor;
+ if (isthereRBUP) {
+ g.style = rightSymb;
+ g.textColor=rightColor;
+ g.display=display.visible;
+ }
+ return true;
+ } else {
+ updateTally.downState=false;
+ updateTally(fieldname);
+ f.strokeColor = wrongColor;
+if (isthereRBUP) {
+ b2 = ( typeof oQName.WrongAnsSymbJSLoc == "undefined" );
+ g.style = wrongSymb;
+ g.textColor=wrongColor;
+ g.display=display.visible;
+ }
+ return false;
+ }
+// return null; // remove ?
+}
+function updateTally(fieldname)
+{
+ var objre = /^obj\./;
+ var grpre = /^grpobj\./;
+ if ( grpre.test(fieldname) ) {
+ fieldname = fieldname.replace(grpre,"");
+ var pos = fieldname.lastIndexOf(".");
+ fieldname = fieldname.substring(0,pos);
+ } else if ( objre.test(fieldname) )
+ fieldname = fieldname.replace(objre,"");
+ var f = this.getField("tally."+fieldname);
+ if ( f != null ) {
+ if (!updateTally.downState) f.value += 1;
+ return true;
+ } else return false;
+
+}
+var bNoPeekWait=false;
+var oNoPeekTimer;
+function noPeek(qtfield,rtnPage)
+{
+ if (!bNoPeekWait) {
+ if ( (typeof (aQuizControl[qtfield]) == "undefined") %
+|| (aQuizControl[qtfield] != -1) ) {
+ bNoPeekWait=true;
+ oNoPeekTimer=app.setTimeOut("bNoPeekWait=false;%
+app.clearTimeOut(oNoPeekTimer);",5);
+ this.pageNum = rtnPage-1;
+ \NoPeekAlert;
+ }
+ } else this.pageNum = rtnPage-1;
+}
+var oCB=\bcheckboxused
+function OnBlurRespBox (retn)
+{
+ var qname = arguments[1];
+ var oQName = eval(qname);
+ var respMsg;
+ var cTitle = "AcroTeX eDucation Bundle";
+ if (retn != null) {
+ if ( typeof appAlerts[qname] == "undefined")
+ appAlerts[qname] = {bAfterValue: false, %
+cMsg: "\doNotShowAgainMsg"};
+ var respMsg = (retn) ? \eqsqrtmsg\space : \eqsqwgmsg;
+ if ( (event.target == this) || !oCB)
+ eqAppAlert({ cMsg: respMsg, nIcon: 3, cTitle: cTitle });
+ else {
+ if ( ! appAlerts[arguments[1]].bAfterValue )
+ eqAppAlert({ cMsg: respMsg, nIcon: 3, cTitle: cTitle, %
+oCheckbox: appAlerts[qname]});
+ }
+ }
+ else {
+ var re=/^(obj|grpobj)\./;
+ var gname=event.target.name.replace(re,"rbmarkup\.");
+ var g =this.getField(gname);
+ var isthereRBUP = ( g !=null );
+ var str = event.target.value.toString();
+ if (str.replace(/\s/g,"") == "") {
+ var defaultColor=%
+(typeof oQName.DefaultColorJSLoc=="undefined")%
+?color.black:oQName.DefaultColorJSLoc;
+ if (isthereRBUP) g.display=display.hidden;
+ event.target.strokeColor = defaultColor;
+ }
+ }
+}
+function jmpToNamedDest(fName,cDest,bAlert) {
+ if ( (typeof appAlerts[fName]!="undefined" %
+&& appAlerts[fName].bAfterValue) || bAlert==0)
+ app.setTimeOut("this.gotoNamedDest(\""+cDest+"\")",500);
+ else
+ this.gotoNamedDest(cDest);
+}
+function lowThreshold(nQuestions)
+{
+ return true;
+}
+function highThreshold(nQuestions)
+{
+ var cnt=0;
+ for ( var i=0; i< Responses.length; i++ ) {
+ if ( typeof Responses[i]!="undefined") cnt++
+ }
+ if ( cnt<nQuestions )
+ eqAppAlert(\highThresholdMsg,3);
+ return (cnt >= nQuestions);
+}
+\end{newsegment}
+\begin{newsegment}{Eq: Support for Grouped Questions}
+function groupEval(doc,qtfield,probno,aKey,aWeights)
+{
+ var totalGrpPts = aWeights[0];
+ var totalWeight = aWeights[1];
+ for ( var i=1,total=0; i< aKey.length; i++ )
+ if (aKey[i] != undefined) total += aKey[i]*aWeights[i+1];
+ return total;
+}
+function WeightedEval(doc,qtfield,probno,aKey,aWeights)
+{
+ var f = doc.getField("grpobj." + qtfield + "." + probno);
+ var nGrpQno = f.getArray().length;
+ var totalGrpPts = aWeights[0];
+ var totalWeight = aWeights[1];
+ for ( var i=1,total=0; i < aKey.length; i++ )
+ if (aKey[i] != undefined) total += aKey[i]*aWeights[i+1];
+ total /= totalWeight;
+ total = Math.floor( total * totalGrpPts );
+ return total;
+}
+function groupBernoulliEval(doc,qtfield,probno,aKey,aWeights)
+{
+ var f = doc.getField("grpobj." + qtfield + "." + probno);
+ var nGrpQno = f.getArray().length;
+ var totalGrpPts = aWeights[0];
+ for ( var i=1,isCorrect=1; i<= nGrpQno; i++ )
+ isCorrect *= (aKey[i] != undefined) ? (Number(aKey[i])) : 0;
+ return (isCorrect*totalGrpPts);
+}
+\end{newsegment}
+\end{insDLJS*}
+\endinput
+%%
+%% End of file `aebjs.def'.
diff --git a/texmf-dist/tex/latex/acrotex/aebrandom.def b/texmf-dist/tex/latex/acrotex/aebrandom.def
index 76ec48c1..d753e9b3 100644
--- a/texmf-dist/tex/latex/acrotex/aebrandom.def
+++ b/texmf-dist/tex/latex/acrotex/aebrandom.def
@@ -1,170 +1,170 @@
-%%
-%% This is file `aebrandom.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,randomize')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{aebrandom.def}
- [2018/03/21 v8.2.2 %
- Exerquiz support for randomization (dps)]
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-\@ifundefined{nextrandom}{\input{random.tex}}{}
-\def\nextrandom{\begingroup
- \ifnum\randomi<\@ne % then initialize with time
- \global\randomi\time
- \global\multiply\randomi388 \global\advance\randomi\year
- \global\multiply\randomi31 \global\advance\randomi\day
- \global\multiply\randomi97 \global\advance\randomi\month
- \message{Randomizer initialized to \the\randomi.}%
- \nextrandom \nextrandom \nextrandom
- \xdef\InitSeedValue{\the\randomi}%
- \fi
- \count@ii\randomi
- \divide\count@ii 127773 % modulus = multiplier * 127773 + 2836
- \count@\count@ii
- \multiply\count@ii 127773
- \global\advance\randomi-\count@ii % random mod 127773
- \global\multiply\randomi 16807
- \multiply\count@ 2836
- \global\advance\randomi-\count@
- \ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi
- \endgroup
-}
-\def\writeSeedToSolnFile{\writeToExSolns{\string\randomi=\the\randomi}}
-\def\@ansChoices[#1]%
-{%
- \global\let\@tempholdSaveAns\@empty % 5/24
- \global\let\@tempholdSaveChoice\@empty % 5/24
- \global\let\bChoiceLabel\@empty % 5/24
- \ifeq@randomizeallChoices
- \setkeys{bchoice}{#1,random=true}\else
- \setkeys{bchoice}{#1}\fi
- \global\eq@tabColCnt=0
- \ifeq@randomizeChoices\expandafter\@@bChoices
- \else\expandafter\@@ansChoices\fi
-}
-\def\@@ansChoices{%
- \ifnum\aeb@numCols=1 % list mode
- \def\eq@next{\@layoutListAns}%
- \else % tabular mode
- \edef\eq@next{\noexpand\@layoutTabularAns{\bChoiceNumCols}}%
- \fi
- \eq@next
-}
-\newcount\aeb@numChoices
-\newcount\aeb@ranChoice
-\newtoks\aeb@hold\aeb@hold={}
-\def\@@bChoices{\gdef\@temphold{}\gdef\@tempholdrandom{}%
- \gdef\@tempholdfreeze{}\aeb@searchfortoken{\@getAns}%
-}
-\def\aeb@searchfortoken#1{%
- \@ifnextchar\Ans{\advance\aeb@numChoices1\relax#1}
- {\@ifnextchar\eFreeze{\expandafter\@getFreezeAns\@gobble}
- {\@ifnextchar\par{\def\@@temp{\aeb@searchfortoken{#1}}%
- \expandafter\@@temp\@gobble}{\@eChoices}}}%
-}
-\long\def\@getAns\Ans#1\eAns{%
- \g@addto@macro\@temphold{{\Ans#1\eAns}}%
- \aeb@searchfortoken{\@getAns}%
-}
-\def\@getFreezeAns{\aeb@searchfortoken{\@@getFreezeAns}}
-\long\def\@@getFreezeAns\Ans#1\eAns{%
- \g@addto@macro\@tempholdfreeze{\Ans#1\eAns}%
- \aeb@searchfortoken{\@@getFreezeAns}%
-}
-\long\def\@eChoices#1\eChoices{%
- \aeb@randomizeChoices{\the\aeb@numChoices}%
-}
-\def\aeb@randomizeChoices#1{%
- \setrannum{\aeb@ranChoice}{1}{#1}
- \count0=0 \aeb@hold=\expandafter{\@temphold}\def\@temphold{}%
- \expandafter\@tfor\expandafter
- \@temp\expandafter:\expandafter=\the\aeb@hold \do {%
- \advance\count0by1
- \ifnum\count0=\aeb@ranChoice
- \aeb@hold=\expandafter\expandafter\expandafter
- {\expandafter\@tempholdrandom\@temp}%
- \edef\@tempholdrandom{\the\aeb@hold}%
- \else
- \aeb@hold=\expandafter\expandafter\expandafter
- {\expandafter\@temphold\expandafter{\@temp}}%
- \edef\@temphold{\the\aeb@hold}%
- \fi
- }%
- \aeb@numChoices=#1
- \advance\aeb@numChoices-1
- \ifnum\aeb@numChoices=0\relax
- \def\aeb@next{\aeb@finishedRandomizing}\else
- \def\aeb@next{\aeb@randomizeChoices{\the\aeb@numChoices}}\fi
- \aeb@next
-}
-\def\aeb@finishedRandomizing{%
- \aeb@hold=\expandafter\expandafter\expandafter
- {\expandafter\@tempholdrandom\@tempholdfreeze}%
- \gdef\@temphold{}\gdef\@tempholdrandom{}\gdef\@tempholdfreeze{}%
- \edef\finished@Randomizing{%
- \noexpand\@@ansChoices
- \the\aeb@hold
- \noexpand\eChoices}%
- \finished@Randomizing
-}
-\def\saveRandomSeed{\PackageInfo{exerquiz}
- {The command \string\saveRandomSeed\space
- is deprecated.\MessageBreak Seed automatically saved}}
-\@ifpackageloaded{ran_toks}{%
- \let\inputRandomSeed\useLastAsSeed
- \let\useRandomSeed\useThisSeed
-}{%
- \def\inputRandomSeed{\eq@readRandomData}%
- \def\useRandomSeed#1{\saveseedfalse\randomi=#1}%
-}
-\def\InitSeedValue{\the\randomi} % dps
-\@ifundefined{ifsaveseed}{\newif\ifsaveseed\saveseedtrue}{} % dps
-\def\eq@writeRandomData
-{%
- \ifsaveseed
- \@ifundefined{saveseedinfo}{\newwrite\saveseedinfo}{}
- \immediate\openout \saveseedinfo \jobname_rt.sav
- \let\verbatim@out\saveseedinfo
- \def\eqrt@msgi{initializing seed value}%
- \def\eqrt@msgii{last random number used}%
- \uccode`c=`\%\uppercase{%
- \immediate\write\verbatim@out
- {\InitSeedValue\space c \eqrt@msgi}%
- \immediate\write\verbatim@out
- {\the\randomi\space c \eqrt@msgii}%
- }\immediate\closeout\saveseedinfo
- \fi
-}
-\AtEndDocument{\eq@writeRandomData}
-\def\eq@readRandomData{\IfFileExists{\jobname_rt.sav}{%
- \PackageInfo{exerquiz}{Inputting \jobname_rt.sav}%
- \@ifundefined{readsavfile}{\newread\readsavfile}{}%
- \openin\readsavfile=\jobname_rt.sav
- \read\readsavfile to \InitSeedValue
- \read\readsavfile to \eqlastRandomNum
- \closein\readsavfile
- \randomi=\eqlastRandomNum
- \xdef\InitSeedValue{\the\randomi}%
- \immediate\closeout\readsavfile
-}{%
- \PackageInfo{exerquiz}{\jobname_rt.sav cannot
- be found, \MessageBreak
- using the random initializer}%
-}}
-\endinput
-%%
-%% End of file `aebrandom.def'.
+%%
+%% This is file `aebrandom.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,randomize')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesFile{aebrandom.def}
+ [2018/03/21 v8.2.2 %
+ Exerquiz support for randomization (dps)]
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+\@ifundefined{nextrandom}{\input{random.tex}}{}
+\def\nextrandom{\begingroup
+ \ifnum\randomi<\@ne % then initialize with time
+ \global\randomi\time
+ \global\multiply\randomi388 \global\advance\randomi\year
+ \global\multiply\randomi31 \global\advance\randomi\day
+ \global\multiply\randomi97 \global\advance\randomi\month
+ \message{Randomizer initialized to \the\randomi.}%
+ \nextrandom \nextrandom \nextrandom
+ \xdef\InitSeedValue{\the\randomi}%
+ \fi
+ \count@ii\randomi
+ \divide\count@ii 127773 % modulus = multiplier * 127773 + 2836
+ \count@\count@ii
+ \multiply\count@ii 127773
+ \global\advance\randomi-\count@ii % random mod 127773
+ \global\multiply\randomi 16807
+ \multiply\count@ 2836
+ \global\advance\randomi-\count@
+ \ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi
+ \endgroup
+}
+\def\writeSeedToSolnFile{\writeToExSolns{\string\randomi=\the\randomi}}
+\def\@ansChoices[#1]%
+{%
+ \global\let\@tempholdSaveAns\@empty % 5/24
+ \global\let\@tempholdSaveChoice\@empty % 5/24
+ \global\let\bChoiceLabel\@empty % 5/24
+ \ifeq@randomizeallChoices
+ \setkeys{bchoice}{#1,random=true}\else
+ \setkeys{bchoice}{#1}\fi
+ \global\eq@tabColCnt=0
+ \ifeq@randomizeChoices\expandafter\@@bChoices
+ \else\expandafter\@@ansChoices\fi
+}
+\def\@@ansChoices{%
+ \ifnum\aeb@numCols=1 % list mode
+ \def\eq@next{\@layoutListAns}%
+ \else % tabular mode
+ \edef\eq@next{\noexpand\@layoutTabularAns{\bChoiceNumCols}}%
+ \fi
+ \eq@next
+}
+\newcount\aeb@numChoices
+\newcount\aeb@ranChoice
+\newtoks\aeb@hold\aeb@hold={}
+\def\@@bChoices{\gdef\@temphold{}\gdef\@tempholdrandom{}%
+ \gdef\@tempholdfreeze{}\aeb@searchfortoken{\@getAns}%
+}
+\def\aeb@searchfortoken#1{%
+ \@ifnextchar\Ans{\advance\aeb@numChoices1\relax#1}
+ {\@ifnextchar\eFreeze{\expandafter\@getFreezeAns\@gobble}
+ {\@ifnextchar\par{\def\@@temp{\aeb@searchfortoken{#1}}%
+ \expandafter\@@temp\@gobble}{\@eChoices}}}%
+}
+\long\def\@getAns\Ans#1\eAns{%
+ \g@addto@macro\@temphold{{\Ans#1\eAns}}%
+ \aeb@searchfortoken{\@getAns}%
+}
+\def\@getFreezeAns{\aeb@searchfortoken{\@@getFreezeAns}}
+\long\def\@@getFreezeAns\Ans#1\eAns{%
+ \g@addto@macro\@tempholdfreeze{\Ans#1\eAns}%
+ \aeb@searchfortoken{\@@getFreezeAns}%
+}
+\long\def\@eChoices#1\eChoices{%
+ \aeb@randomizeChoices{\the\aeb@numChoices}%
+}
+\def\aeb@randomizeChoices#1{%
+ \setrannum{\aeb@ranChoice}{1}{#1}
+ \count0=0 \aeb@hold=\expandafter{\@temphold}\def\@temphold{}%
+ \expandafter\@tfor\expandafter
+ \@temp\expandafter:\expandafter=\the\aeb@hold \do {%
+ \advance\count0by1
+ \ifnum\count0=\aeb@ranChoice
+ \aeb@hold=\expandafter\expandafter\expandafter
+ {\expandafter\@tempholdrandom\@temp}%
+ \edef\@tempholdrandom{\the\aeb@hold}%
+ \else
+ \aeb@hold=\expandafter\expandafter\expandafter
+ {\expandafter\@temphold\expandafter{\@temp}}%
+ \edef\@temphold{\the\aeb@hold}%
+ \fi
+ }%
+ \aeb@numChoices=#1
+ \advance\aeb@numChoices-1
+ \ifnum\aeb@numChoices=0\relax
+ \def\aeb@next{\aeb@finishedRandomizing}\else
+ \def\aeb@next{\aeb@randomizeChoices{\the\aeb@numChoices}}\fi
+ \aeb@next
+}
+\def\aeb@finishedRandomizing{%
+ \aeb@hold=\expandafter\expandafter\expandafter
+ {\expandafter\@tempholdrandom\@tempholdfreeze}%
+ \gdef\@temphold{}\gdef\@tempholdrandom{}\gdef\@tempholdfreeze{}%
+ \edef\finished@Randomizing{%
+ \noexpand\@@ansChoices
+ \the\aeb@hold
+ \noexpand\eChoices}%
+ \finished@Randomizing
+}
+\def\saveRandomSeed{\PackageInfo{exerquiz}
+ {The command \string\saveRandomSeed\space
+ is deprecated.\MessageBreak Seed automatically saved}}
+\@ifpackageloaded{ran_toks}{%
+ \let\inputRandomSeed\useLastAsSeed
+ \let\useRandomSeed\useThisSeed
+}{%
+ \def\inputRandomSeed{\eq@readRandomData}%
+ \def\useRandomSeed#1{\saveseedfalse\randomi=#1}%
+}
+\def\InitSeedValue{\the\randomi} % dps
+\@ifundefined{ifsaveseed}{\newif\ifsaveseed\saveseedtrue}{} % dps
+\def\eq@writeRandomData
+{%
+ \ifsaveseed
+ \@ifundefined{saveseedinfo}{\newwrite\saveseedinfo}{}
+ \immediate\openout \saveseedinfo \jobname_rt.sav
+ \let\verbatim@out\saveseedinfo
+ \def\eqrt@msgi{initializing seed value}%
+ \def\eqrt@msgii{last random number used}%
+ \uccode`c=`\%\uppercase{%
+ \immediate\write\verbatim@out
+ {\InitSeedValue\space c \eqrt@msgi}%
+ \immediate\write\verbatim@out
+ {\the\randomi\space c \eqrt@msgii}%
+ }\immediate\closeout\saveseedinfo
+ \fi
+}
+\AtEndDocument{\eq@writeRandomData}
+\def\eq@readRandomData{\IfFileExists{\jobname_rt.sav}{%
+ \PackageInfo{exerquiz}{Inputting \jobname_rt.sav}%
+ \@ifundefined{readsavfile}{\newread\readsavfile}{}%
+ \openin\readsavfile=\jobname_rt.sav
+ \read\readsavfile to \InitSeedValue
+ \read\readsavfile to \eqlastRandomNum
+ \closein\readsavfile
+ \randomi=\eqlastRandomNum
+ \xdef\InitSeedValue{\the\randomi}%
+ \immediate\closeout\readsavfile
+}{%
+ \PackageInfo{exerquiz}{\jobname_rt.sav cannot
+ be found, \MessageBreak
+ using the random initializer}%
+}}
+\endinput
+%%
+%% End of file `aebrandom.def'.
diff --git a/texmf-dist/tex/latex/acrotex/aebsumrytbls.def b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
index b345be1f..33f1f3ce 100644
--- a/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
+++ b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
@@ -1,256 +1,256 @@
-%%
-%% This is file `aebsumrytbls.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,sumrytbls')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{aebsumrytbls.def}
- [2018/03/21 v8.2.2 %
- Exerquiz support for summary tables (dps)]
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-\def\ccatCurrQzWith(#1){\currQuiz#1}
-\def\pbPopulateSumTable{\pushButton[\W0\BG{}\BC{}\S{S}\autoCenter{n}
- \TU{\thequestionno}\Ff{\FfReadOnly}
- \AA{\AAPageVisible{try{popVisitsTbl("\currQuiz",\thequestionno)}%
- catch(e){}}}]{\currQuiz activateSC}{0pt}{0pt}}
-\def\pbDoNoCorrectSumryTbl{\makebox[0pt][l]{\pushButton[\F{\FHidden}]%
- {\currQuiz NoCorrections}{0pt}{0pt}}}
-\newcount\eq@rowcnt
-\newcommand{\sumryTblQ}{Question}
-\newcommand{\sumryTblR}{Responded}
-\newcommand{\sumryTblP}{Page}
-\define@key{smrytbl}{ntables}{%
- \@tempcntb=#1
- \ifnum\@tempcntb<1 \@tempcntb=1 \fi
- \ifnum\@tempcntb>3 \@tempcntb=3 \fi
- \edef\smrytbl@ntables{\the\@tempcntb}%
-}
-\def\smrytbl@ntables{2}
-\define@key{smrytbl}{showmarkup}[true]{%
- \csname if#1\endcsname\eqshowmarkuptrue
- \else\eqshowmarkupfalse\fi
-}
-\newif\ifsmrytbl@corrections\smrytbl@correctionstrue
-\define@key{smrytbl}{nocorrections}[true]{%
- \csname if#1\endcsname\smrytbl@correctionsfalse
- \else\smrytbl@correctionstrue\fi
-}
-\define@key{smrytbl}{showOutOf}[true]{%
- \csname if#1\endcsname\eqshowOutOftrue\def\stfmtType{OO}%
- \gdef\showOutOfinSmryTbl{true}\let\stmarkupbox\relax
- \else
- \eqshowOutOffalse\let\stfmtType\@empty
- \gdef\showOutOfinSmryTbl{false}%
- \fi
-}
-\let\stfmtType\@empty
-\define@key{smrytbl}{setDimens}[]{#1}
-\def\showOutOfinSmryTbl{false}
-\def\stmarkupbox{\makebox[0pt][l]}
-\newcommand{\displaySumryTbl}[2][]{%
- \begingroup\edef\currQuiz{#2}\edef\oField{#2}\edef\curr@quiz{#2}%
- \setkeys{smrytbl}{#1}%
- \count0=\smrytbl@ntables
- \eq@rowcnt=0\relax\@tempcntb=\value{questionno}%
- \ifnum\count\z@=2\relax
- \divide\@tempcntb2\relax
- \advance\@tempcntb\ifodd\value{questionno}2\else1\fi
- \xdef\@beginSecCol{\the\@tempcntb}%
- \advance\@tempcntb-1\relax
- \fi
- \ifnum\count\z@=3
- \edef\eq@n{\the\@tempcntb}%
- \divide\@tempcntb\count\z@
- \edef\eq@q{\the\@tempcntb}%
- \@tempcnta=\@tempcntb\multiply\@tempcnta3
- \edef\eq@p{\the\@tempcnta}%
- \@tempcnta=\eq@n
- \advance\@tempcnta-\eq@p\relax
- \ifnum\@tempcnta=0
- \@tempcntb=\eq@q \advance\@tempcntb1
- \xdef\@beginSecCol{\the\@tempcntb}%
- \advance\@tempcntb\eq@q\relax
- \xdef\@beginThrdCol{\the\@tempcntb}%
- \else\ifnum\@tempcnta=1
- \@tempcntb=\eq@q \advance\@tempcntb1
- \edef\nB@lCols{\the\@tempcntb}%
- \advance\@tempcntb1\relax
- \xdef\@beginSecCol{\the\@tempcntb}%
- \advance\@tempcntb\eq@q\relax
- \xdef\@beginThrdCol{\the\@tempcntb}%
- \else\ifnum\@tempcnta=2
- \@tempcntb=\eq@q \advance\@tempcntb1
- \edef\nB@lCols{\the\@tempcntb}%
- \advance\@tempcntb1
- \xdef\@beginSecCol{\the\@tempcntb}%
- \advance\@tempcntb\nB@lCols
- \xdef\@beginThrdCol{\the\@tempcntb}%
- \fi\fi\fi
- \@tempcntb=\eq@n
- \fi
- \let\@eqListExp\@@eqListExp
- \eqQzQuesList
- \endgroup
-}
-\def\eq@begintab{%
- \begin{tabular}[t]{lcc}\sumryTblQ&\sumryTblR&\sumryTblP\\\sthline
- {\Large\strut}%
-}
-\def\sthline{\hline}
-\def\eq@endtab{\end{tabular}}
-\def\sumrytblCkMUsep{\kern3bp}
-\def\sumrytbllinkHook#1{#1}
-\newcommand{\sumryTblProbFmt}[1]{\textbf{\textcolor{blue}{#1}}}
-\newcommand{\sumrytablesep}{\space}
-\def\stmarkupWidth{12bp}\def\stmarkupHeight{9bp}\def\stmarkupTextSize{0}
-\def\st@scndclmn{%
- \checkBox[\Ff{\FfReadOnly}]%
- {\ccatCurrQzWith(SanityCheck).\the\eq@rowcnt}%
- {\markupHeight}{\markupHeight}{Yes}\ifeqshowmarkup
- \stmarkupbox{\sumrytblCkMUsep\textField[%
- \Ff\FfReadOnly\BC{}\textColor{\pcMarkupColor}%
- \textSize{\stmarkupTextSize}\autoCenter{n}%
- ]{\ccatCurrQzWith(SanityCheck\stfmtType Pts).\the\eq@rowcnt}%
- {\stmarkupWidth}{\stmarkupHeight}}\fi
-}
-\def\st@thrdclmn#1{%
- \setLink[\linktxtcolor{\@linkcolor}
- \A{\JS{this.pageNum=(#1-1)}}]{\sumrytbllinkHook{#1}}}
-\def\@@eqListExp#1#2{\global\advance\eq@rowcnt1\relax
- \ifnum\eq@rowcnt=1\relax
- \pbPopulateSumTable\ifsmrytbl@corrections\else
- \pbDoNoCorrectSumryTbl\fi\expandafter\eq@begintab\fi
- \ifnum\count0>1 \ifnum\eq@rowcnt=\@beginSecCol\relax
- \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab
- \fi\fi
- \ifnum\count0=3 \ifnum\eq@rowcnt=\@beginThrdCol\relax
- \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab
- \fi\fi
- \sumryTblProbFmt{#1}&\st@scndclmn&\st@thrdclmn{#2}\\[1bp]
- \ifnum\eq@rowcnt=\thequestionno\relax\expandafter\eq@endtab\fi
-}
-\def\writeProListAux{%
- \eq@IWAuxOut{\string\expandafter\string\gdef
- \string\csname\space\currQuiz QzQuesList\string\endcsname
- {\eqQzQuesList}}%
- \eq@IWAuxOut{\string\expandafter\string\gdef
- \string\csname\space\currQuiz nQuestions\string\endcsname
- {\thequestionno}}%
-}
-\def\setParamSumryTblAux{%
- \edef\eqQzQuesList{\@nameuse{\currQuiz QzQuesList}}%
- \@ifundefined{\currQuiz nQuestions}{}{%
- \value{questionno}=\@nameuse{\currQuiz nQuestions}}%
-}
-\newenvironment{sumryTblAux}[1]{%
- \DeclareQuiz{#1}\setParamSumryTblAux}{}%
-\begin{insDLJS}[correctSumryTbl]{sumtbljs}{Eq: Populate Summary Table}
-function correctSumryTbl(qtfield,nQuestions) {
- var oQName=eval(qtfield);
- var rightColor=(typeof oQName.RightColorJSLoc=="undefined")%
-?\rghtColorJS:oQName.RightColorJSLoc;
- var wrongColor=(typeof oQName.WrongColorJSLoc=="undefined")%
-?\wrngColorJS:oQName.WrongColorJSLoc;
- var partialColor=(typeof oQName.PartialColorJSLoc=="undefined")%
-?\partialColorJS:oQName.PartialColorJSLoc;
- var sc=this.getField(qtfield+"SanityCheck");
- var nc=this.getField(qtfield+"NoCorrections");
- if (sc != null && nc == null ) {
- for (var i=0; i<nQuestions; i++) {
- var cb=this.getField(qtfield+"SanityCheck."+(i+1));
- if (typeof RightWrong[i+1] == "undefined" ) {
- cb.strokeColor=wrongColor;
- continue;
- }
- if ( RightWrong[i+1] == 1 ) {
- cb.strokeColor=rightColor;
- continue;
- }
- if ( RightWrong[i+1] == 0 ) {
- // this is either an obj or multiple choice q
- if ( typeof ProbValue[i+1] == "object" )
- cb.strokeColor=( ProbValue[i+1][2] > 0 )?%
-partialColor:wrongColor;
- else cb.strokeColor=wrongColor; // obj q
- continue;
- }
- // either multiple selection or grouped math
- if ( RightWrong[i+1][0] == "grp" ) {
- // grouped question
- var f = this.getField("grpobj."+qtfield+"."+(i+1));
- var l = f.getArray().length;
- // is this right?
- for (var sum=0, j=1; j<=l; j++)
- sum+=(!!RightWrong[i+1][j]);
- if ( sum == l ) cb.strokeColor=["RGB", 0, .6, 0];
- else cb.strokeColor=( sum > 0 )?%
-partialColor:wrongColor;
- continue;
- }
- // multiple selection
- if ( RightWrong[i+1][0] == 1 ) cb.strokeColor=rightColor;
- else cb.strokeColor=(RightWrong[i+1][1]== 1)?%
-partialColor:wrongColor;
- }
- }
- var f1=this.getField(qtfield+"SanityCheckPts");
- var f2=this.getField(qtfield+"SanityCheckOOPts");
- var h=this.getField(qtfield+"activateSC");
- if ( f1 != null ) {
- for ( var i = 1; i <= nQuestions; i++) {
- if ( ProbValue[i] == undefined ) ProbValue[i]=0
- // find the next non-null field
- var g=this.getField(qtfield+"SanityCheckPts."+i);
- var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
- var thesePts= qpts + (( qpts == 1 )?%
-" \eqptLabel":" \eqptsLabel");
- g.value = thesePts;
- }
- }
- if ( f2 != null ) {
- for ( var i = 1; i <= nQuestions; i++) {
- if ( ProbValue[i] == undefined ) ProbValue[i]=0
- // find the next non-null field
- var g=this.getField(qtfield+"SanityCheckOOPts."+i);
- var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
- var ptValue = oQName.PtValues[i];
- var probPts = ptValue + (( ptValue == 1 )?%
-" \eqptLabel":" \eqptsLabel");
- g.value = qpts +" \stOutOf\space"+probPts;
- }
- }
-}
-function popVisitsTbl(qtfield,nQuestions) {
- if ( aQuizControl[qtfield] == 1) {
- this.resetForm([qtfield+"SanityCheck"]);
- for ( var i=0; i < nQuestions; i++ ) {
- var f=this.getField(qtfield+"SanityCheck."+(i+1));
- f.checkThisBox(0,(typeof Responses[i+1]!="undefined"));
- }
- }
-}
-function fieldPopTbl(qtfield) {
- var f=this.getField(qtfield+"activateSC");
- if ( f != null) {
- var n=Number(f.userName);
- var a = [ qtfield, n ];
- popVisitsTbl.apply(null,a);
- }
-}
-\end{insDLJS}
-\endinput
-%%
-%% End of file `aebsumrytbls.def'.
+%%
+%% This is file `aebsumrytbls.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,sumrytbls')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesFile{aebsumrytbls.def}
+ [2018/03/21 v8.2.2 %
+ Exerquiz support for summary tables (dps)]
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+\def\ccatCurrQzWith(#1){\currQuiz#1}
+\def\pbPopulateSumTable{\pushButton[\W0\BG{}\BC{}\S{S}\autoCenter{n}
+ \TU{\thequestionno}\Ff{\FfReadOnly}
+ \AA{\AAPageVisible{try{popVisitsTbl("\currQuiz",\thequestionno)}%
+ catch(e){}}}]{\currQuiz activateSC}{0pt}{0pt}}
+\def\pbDoNoCorrectSumryTbl{\makebox[0pt][l]{\pushButton[\F{\FHidden}]%
+ {\currQuiz NoCorrections}{0pt}{0pt}}}
+\newcount\eq@rowcnt
+\newcommand{\sumryTblQ}{Question}
+\newcommand{\sumryTblR}{Responded}
+\newcommand{\sumryTblP}{Page}
+\define@key{smrytbl}{ntables}{%
+ \@tempcntb=#1
+ \ifnum\@tempcntb<1 \@tempcntb=1 \fi
+ \ifnum\@tempcntb>3 \@tempcntb=3 \fi
+ \edef\smrytbl@ntables{\the\@tempcntb}%
+}
+\def\smrytbl@ntables{2}
+\define@key{smrytbl}{showmarkup}[true]{%
+ \csname if#1\endcsname\eqshowmarkuptrue
+ \else\eqshowmarkupfalse\fi
+}
+\newif\ifsmrytbl@corrections\smrytbl@correctionstrue
+\define@key{smrytbl}{nocorrections}[true]{%
+ \csname if#1\endcsname\smrytbl@correctionsfalse
+ \else\smrytbl@correctionstrue\fi
+}
+\define@key{smrytbl}{showOutOf}[true]{%
+ \csname if#1\endcsname\eqshowOutOftrue\def\stfmtType{OO}%
+ \gdef\showOutOfinSmryTbl{true}\let\stmarkupbox\relax
+ \else
+ \eqshowOutOffalse\let\stfmtType\@empty
+ \gdef\showOutOfinSmryTbl{false}%
+ \fi
+}
+\let\stfmtType\@empty
+\define@key{smrytbl}{setDimens}[]{#1}
+\def\showOutOfinSmryTbl{false}
+\def\stmarkupbox{\makebox[0pt][l]}
+\newcommand{\displaySumryTbl}[2][]{%
+ \begingroup\edef\currQuiz{#2}\edef\oField{#2}\edef\curr@quiz{#2}%
+ \setkeys{smrytbl}{#1}%
+ \count0=\smrytbl@ntables
+ \eq@rowcnt=0\relax\@tempcntb=\value{questionno}%
+ \ifnum\count\z@=2\relax
+ \divide\@tempcntb2\relax
+ \advance\@tempcntb\ifodd\value{questionno}2\else1\fi
+ \xdef\@beginSecCol{\the\@tempcntb}%
+ \advance\@tempcntb-1\relax
+ \fi
+ \ifnum\count\z@=3
+ \edef\eq@n{\the\@tempcntb}%
+ \divide\@tempcntb\count\z@
+ \edef\eq@q{\the\@tempcntb}%
+ \@tempcnta=\@tempcntb\multiply\@tempcnta3
+ \edef\eq@p{\the\@tempcnta}%
+ \@tempcnta=\eq@n
+ \advance\@tempcnta-\eq@p\relax
+ \ifnum\@tempcnta=0
+ \@tempcntb=\eq@q \advance\@tempcntb1
+ \xdef\@beginSecCol{\the\@tempcntb}%
+ \advance\@tempcntb\eq@q\relax
+ \xdef\@beginThrdCol{\the\@tempcntb}%
+ \else\ifnum\@tempcnta=1
+ \@tempcntb=\eq@q \advance\@tempcntb1
+ \edef\nB@lCols{\the\@tempcntb}%
+ \advance\@tempcntb1\relax
+ \xdef\@beginSecCol{\the\@tempcntb}%
+ \advance\@tempcntb\eq@q\relax
+ \xdef\@beginThrdCol{\the\@tempcntb}%
+ \else\ifnum\@tempcnta=2
+ \@tempcntb=\eq@q \advance\@tempcntb1
+ \edef\nB@lCols{\the\@tempcntb}%
+ \advance\@tempcntb1
+ \xdef\@beginSecCol{\the\@tempcntb}%
+ \advance\@tempcntb\nB@lCols
+ \xdef\@beginThrdCol{\the\@tempcntb}%
+ \fi\fi\fi
+ \@tempcntb=\eq@n
+ \fi
+ \let\@eqListExp\@@eqListExp
+ \eqQzQuesList
+ \endgroup
+}
+\def\eq@begintab{%
+ \begin{tabular}[t]{lcc}\sumryTblQ&\sumryTblR&\sumryTblP\\\sthline
+ {\Large\strut}%
+}
+\def\sthline{\hline}
+\def\eq@endtab{\end{tabular}}
+\def\sumrytblCkMUsep{\kern3bp}
+\def\sumrytbllinkHook#1{#1}
+\newcommand{\sumryTblProbFmt}[1]{\textbf{\textcolor{blue}{#1}}}
+\newcommand{\sumrytablesep}{\space}
+\def\stmarkupWidth{12bp}\def\stmarkupHeight{9bp}\def\stmarkupTextSize{0}
+\def\st@scndclmn{%
+ \checkBox[\Ff{\FfReadOnly}]%
+ {\ccatCurrQzWith(SanityCheck).\the\eq@rowcnt}%
+ {\markupHeight}{\markupHeight}{Yes}\ifeqshowmarkup
+ \stmarkupbox{\sumrytblCkMUsep\textField[%
+ \Ff\FfReadOnly\BC{}\textColor{\pcMarkupColor}%
+ \textSize{\stmarkupTextSize}\autoCenter{n}%
+ ]{\ccatCurrQzWith(SanityCheck\stfmtType Pts).\the\eq@rowcnt}%
+ {\stmarkupWidth}{\stmarkupHeight}}\fi
+}
+\def\st@thrdclmn#1{%
+ \setLink[\linktxtcolor{\@linkcolor}
+ \A{\JS{this.pageNum=(#1-1)}}]{\sumrytbllinkHook{#1}}}
+\def\@@eqListExp#1#2{\global\advance\eq@rowcnt1\relax
+ \ifnum\eq@rowcnt=1\relax
+ \pbPopulateSumTable\ifsmrytbl@corrections\else
+ \pbDoNoCorrectSumryTbl\fi\expandafter\eq@begintab\fi
+ \ifnum\count0>1 \ifnum\eq@rowcnt=\@beginSecCol\relax
+ \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab
+ \fi\fi
+ \ifnum\count0=3 \ifnum\eq@rowcnt=\@beginThrdCol\relax
+ \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab
+ \fi\fi
+ \sumryTblProbFmt{#1}&\st@scndclmn&\st@thrdclmn{#2}\\[1bp]
+ \ifnum\eq@rowcnt=\thequestionno\relax\expandafter\eq@endtab\fi
+}
+\def\writeProListAux{%
+ \eq@IWAuxOut{\string\expandafter\string\gdef
+ \string\csname\space\currQuiz QzQuesList\string\endcsname
+ {\eqQzQuesList}}%
+ \eq@IWAuxOut{\string\expandafter\string\gdef
+ \string\csname\space\currQuiz nQuestions\string\endcsname
+ {\thequestionno}}%
+}
+\def\setParamSumryTblAux{%
+ \edef\eqQzQuesList{\@nameuse{\currQuiz QzQuesList}}%
+ \@ifundefined{\currQuiz nQuestions}{}{%
+ \value{questionno}=\@nameuse{\currQuiz nQuestions}}%
+}
+\newenvironment{sumryTblAux}[1]{%
+ \DeclareQuiz{#1}\setParamSumryTblAux}{}%
+\begin{insDLJS}[correctSumryTbl]{sumtbljs}{Eq: Populate Summary Table}
+function correctSumryTbl(qtfield,nQuestions) {
+ var oQName=eval(qtfield);
+ var rightColor=(typeof oQName.RightColorJSLoc=="undefined")%
+?\rghtColorJS:oQName.RightColorJSLoc;
+ var wrongColor=(typeof oQName.WrongColorJSLoc=="undefined")%
+?\wrngColorJS:oQName.WrongColorJSLoc;
+ var partialColor=(typeof oQName.PartialColorJSLoc=="undefined")%
+?\partialColorJS:oQName.PartialColorJSLoc;
+ var sc=this.getField(qtfield+"SanityCheck");
+ var nc=this.getField(qtfield+"NoCorrections");
+ if (sc != null && nc == null ) {
+ for (var i=0; i<nQuestions; i++) {
+ var cb=this.getField(qtfield+"SanityCheck."+(i+1));
+ if (typeof RightWrong[i+1] == "undefined" ) {
+ cb.strokeColor=wrongColor;
+ continue;
+ }
+ if ( RightWrong[i+1] == 1 ) {
+ cb.strokeColor=rightColor;
+ continue;
+ }
+ if ( RightWrong[i+1] == 0 ) {
+ // this is either an obj or multiple choice q
+ if ( typeof ProbValue[i+1] == "object" )
+ cb.strokeColor=( ProbValue[i+1][2] > 0 )?%
+partialColor:wrongColor;
+ else cb.strokeColor=wrongColor; // obj q
+ continue;
+ }
+ // either multiple selection or grouped math
+ if ( RightWrong[i+1][0] == "grp" ) {
+ // grouped question
+ var f = this.getField("grpobj."+qtfield+"."+(i+1));
+ var l = f.getArray().length;
+ // is this right?
+ for (var sum=0, j=1; j<=l; j++)
+ sum+=(!!RightWrong[i+1][j]);
+ if ( sum == l ) cb.strokeColor=["RGB", 0, .6, 0];
+ else cb.strokeColor=( sum > 0 )?%
+partialColor:wrongColor;
+ continue;
+ }
+ // multiple selection
+ if ( RightWrong[i+1][0] == 1 ) cb.strokeColor=rightColor;
+ else cb.strokeColor=(RightWrong[i+1][1]== 1)?%
+partialColor:wrongColor;
+ }
+ }
+ var f1=this.getField(qtfield+"SanityCheckPts");
+ var f2=this.getField(qtfield+"SanityCheckOOPts");
+ var h=this.getField(qtfield+"activateSC");
+ if ( f1 != null ) {
+ for ( var i = 1; i <= nQuestions; i++) {
+ if ( ProbValue[i] == undefined ) ProbValue[i]=0
+ // find the next non-null field
+ var g=this.getField(qtfield+"SanityCheckPts."+i);
+ var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
+ var thesePts= qpts + (( qpts == 1 )?%
+" \eqptLabel":" \eqptsLabel");
+ g.value = thesePts;
+ }
+ }
+ if ( f2 != null ) {
+ for ( var i = 1; i <= nQuestions; i++) {
+ if ( ProbValue[i] == undefined ) ProbValue[i]=0
+ // find the next non-null field
+ var g=this.getField(qtfield+"SanityCheckOOPts."+i);
+ var qpts=(ProbDist[i]==undefined) ? 0 : ProbDist[i];
+ var ptValue = oQName.PtValues[i];
+ var probPts = ptValue + (( ptValue == 1 )?%
+" \eqptLabel":" \eqptsLabel");
+ g.value = qpts +" \stOutOf\space"+probPts;
+ }
+ }
+}
+function popVisitsTbl(qtfield,nQuestions) {
+ if ( aQuizControl[qtfield] == 1) {
+ this.resetForm([qtfield+"SanityCheck"]);
+ for ( var i=0; i < nQuestions; i++ ) {
+ var f=this.getField(qtfield+"SanityCheck."+(i+1));
+ f.checkThisBox(0,(typeof Responses[i+1]!="undefined"));
+ }
+ }
+}
+function fieldPopTbl(qtfield) {
+ var f=this.getField(qtfield+"activateSC");
+ if ( f != null) {
+ var n=Number(f.userName);
+ var a = [ qtfield, n ];
+ popVisitsTbl.apply(null,a);
+ }
+}
+\end{insDLJS}
+\endinput
+%%
+%% End of file `aebsumrytbls.def'.
diff --git a/texmf-dist/tex/latex/acrotex/altadbfncs.def b/texmf-dist/tex/latex/acrotex/altadbfncs.def
index f277e2b7..149a6466 100644
--- a/texmf-dist/tex/latex/acrotex/altadbfncs.def
+++ b/texmf-dist/tex/latex/acrotex/altadbfncs.def
@@ -1,41 +1,41 @@
-%%
-%% This is file `altadbfncs.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% insdljs.dtx (with options: `copyright,altadbfncs')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% insdljs.sty package, %%
-%% Copyright (C) 2001-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{insDLJS}{altadbfncs}{eforms: Alternate Adobe Function Names}
-var EFNumber_Keystroke=AFNumber_Keystroke;
-var EFNumber_Format=AFNumber_Format;
-var EFPercent_Keystroke=AFPercent_Keystroke;
-var EFPercent_Format=AFPercent_Format;
-var EFDate_Format=AFDate_Format;
-var EFDate_Keystroke=AFDate_Keystroke;
-var EFDate_FormatEx=AFDate_FormatEx;
-var EFTime_Keystroke=AFTime_Keystroke;
-var EFTime_Format=AFTime_Format;
-var EFTime_FormatEx=AFTime_FormatEx;
-var EFDate_KeystrokeEx=AFDate_KeystrokeEx;
-var EFSpecial_Keystroke=AFSpecial_Keystroke;
-var EFSpecial_Format=AFSpecial_Format;
-var EFSpecial_KeystrokeEx=AFSpecial_KeystrokeEx;
-var EFRange_Validate=AFRange_Validate;
-var EFSimple_Calculate=AFSimple_Calculate;
-var EFMergeChange=AFMergeChange;
-\end{insDLJS}
-\endinput
-%%
-%% End of file `altadbfncs.def'.
+%%
+%% This is file `altadbfncs.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% insdljs.dtx (with options: `copyright,altadbfncs')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% insdljs.sty package, %%
+%% Copyright (C) 2001-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{insDLJS}{altadbfncs}{eforms: Alternate Adobe Function Names}
+var EFNumber_Keystroke=AFNumber_Keystroke;
+var EFNumber_Format=AFNumber_Format;
+var EFPercent_Keystroke=AFPercent_Keystroke;
+var EFPercent_Format=AFPercent_Format;
+var EFDate_Format=AFDate_Format;
+var EFDate_Keystroke=AFDate_Keystroke;
+var EFDate_FormatEx=AFDate_FormatEx;
+var EFTime_Keystroke=AFTime_Keystroke;
+var EFTime_Format=AFTime_Format;
+var EFTime_FormatEx=AFTime_FormatEx;
+var EFDate_KeystrokeEx=AFDate_KeystrokeEx;
+var EFSpecial_Keystroke=AFSpecial_Keystroke;
+var EFSpecial_Format=AFSpecial_Format;
+var EFSpecial_KeystrokeEx=AFSpecial_KeystrokeEx;
+var EFRange_Validate=AFRange_Validate;
+var EFSimple_Calculate=AFSimple_Calculate;
+var EFMergeChange=AFMergeChange;
+\end{insDLJS}
+\endinput
+%%
+%% End of file `altadbfncs.def'.
diff --git a/texmf-dist/tex/latex/acrotex/dljscc.def b/texmf-dist/tex/latex/acrotex/dljscc.def
index 6d9ee746..55f0b491 100644
--- a/texmf-dist/tex/latex/acrotex/dljscc.def
+++ b/texmf-dist/tex/latex/acrotex/dljscc.def
@@ -1,76 +1,76 @@
-%%
-%% This is file `dljscc.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% insdljs.dtx (with options: `copyright,cc4js')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% insdljs.sty package, %%
-%% Copyright (C) 2001-2018 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\r{\eqesc r\ckivspace}
-\def\t{\eqesc t\ckivspace}
-\def\n{\eqesc n\ckivspace}
-\def\f{\eqesc f\ckivspace}
-\def\v{\eqesc v\ckivspace}
-\def\b{\eqesc b\ckivspace}
-\def\B{\eqesc B\ckivspace}
-\def\d{\eqesc d\ckivspace}
-\def\D{\eqesc D\ckivspace}
-\def\s{\eqesc s\ckivspace}
-\def\S{\eqesc S\ckivspace}
-\def\w{\eqesc w\ckivspace}
-\def\W{\eqesc W\ckivspace}
-\begingroup
-\catcode`\:=12\relax
-\dljstfor\dlhex:={AA}{AB}{AC}{AD}{AE}{AF}%
- {BA}{BB}{BC}{BD}{BE}{BF}{CA}{CB}{CC}{CD}{CE}{CF}%
- {DA}{DB}{DC}{DD}{DE}{DF}{EA}{EB}{EC}{ED}{EE}{EF}%
- {FA}{FB}{FC}{FD}{FE}{FF}\do{%
- \expandafter\xdef\csname x\dlhex\endcsname{\noexpand\eqesc x\dlhex}%
-}
-\endgroup
-\def\u{\eqesc u\ckivspace}
-\def\0{\eqesc0}
-\def\1{\eqesc1}
-\def\2{\eqesc2}
-\def\3{\eqesc3}
-\definebraces
-\def\({\eqesc\eqesci(}
-\def\){\eqesc\eqesci)}
-\def\.{\eqesc.}
-\def\/{\eqesc/}
-\def\[{\eqesc[}
-\def\]{\eqesc]}
-\def\|{\eqesc|}
-\def\+{\eqesc+}
-\def\*{\eqesc*}
-\def\-{\eqesc-}
-\def\?{\eqesc?}
-\def\${\eqesc$}
-\def\^{\eqesc^}
-\def\\{\eqesc\eqesc}
-\def\'{\eqesc'}
-\catcode`\"=12
-\def\"{\eqesc"}
-\catcode`\<=12
-\def\<{\eqesc<}
-\catcode`\>=12
-\def\>{\eqesc>}
-\catcode`\%=12
-\def\%{%}
-\catcode`\%=14
-\catcode`\& = 12
-\def\&{\eqesc&}
-\endinput
-%%
-%% End of file `dljscc.def'.
+%%
+%% This is file `dljscc.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% insdljs.dtx (with options: `copyright,cc4js')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% insdljs.sty package, %%
+%% Copyright (C) 2001-2018 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\r{\eqesc r\ckivspace}
+\def\t{\eqesc t\ckivspace}
+\def\n{\eqesc n\ckivspace}
+\def\f{\eqesc f\ckivspace}
+\def\v{\eqesc v\ckivspace}
+\def\b{\eqesc b\ckivspace}
+\def\B{\eqesc B\ckivspace}
+\def\d{\eqesc d\ckivspace}
+\def\D{\eqesc D\ckivspace}
+\def\s{\eqesc s\ckivspace}
+\def\S{\eqesc S\ckivspace}
+\def\w{\eqesc w\ckivspace}
+\def\W{\eqesc W\ckivspace}
+\begingroup
+\catcode`\:=12\relax
+\dljstfor\dlhex:={AA}{AB}{AC}{AD}{AE}{AF}%
+ {BA}{BB}{BC}{BD}{BE}{BF}{CA}{CB}{CC}{CD}{CE}{CF}%
+ {DA}{DB}{DC}{DD}{DE}{DF}{EA}{EB}{EC}{ED}{EE}{EF}%
+ {FA}{FB}{FC}{FD}{FE}{FF}\do{%
+ \expandafter\xdef\csname x\dlhex\endcsname{\noexpand\eqesc x\dlhex}%
+}
+\endgroup
+\def\u{\eqesc u\ckivspace}
+\def\0{\eqesc0}
+\def\1{\eqesc1}
+\def\2{\eqesc2}
+\def\3{\eqesc3}
+\definebraces
+\def\({\eqesc\eqesci(}
+\def\){\eqesc\eqesci)}
+\def\.{\eqesc.}
+\def\/{\eqesc/}
+\def\[{\eqesc[}
+\def\]{\eqesc]}
+\def\|{\eqesc|}
+\def\+{\eqesc+}
+\def\*{\eqesc*}
+\def\-{\eqesc-}
+\def\?{\eqesc?}
+\def\${\eqesc$}
+\def\^{\eqesc^}
+\def\\{\eqesc\eqesc}
+\def\'{\eqesc'}
+\catcode`\"=12
+\def\"{\eqesc"}
+\catcode`\<=12
+\def\<{\eqesc<}
+\catcode`\>=12
+\def\>{\eqesc>}
+\catcode`\%=12
+\def\%{%}
+\catcode`\%=14
+\catcode`\& = 12
+\def\&{\eqesc&}
+\endinput
+%%
+%% End of file `dljscc.def'.
diff --git a/texmf-dist/tex/latex/acrotex/dljslib.sty b/texmf-dist/tex/latex/acrotex/dljslib.sty
index 67f0867b..bad34c8f 100644
--- a/texmf-dist/tex/latex/acrotex/dljslib.sty
+++ b/texmf-dist/tex/latex/acrotex/dljslib.sty
@@ -1,1741 +1,1741 @@
-%%
-%% This is file `dljslib.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% dljslib.dtx (with options: `copyright,package')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% dljsLib.sty package, %%
-%% Copyright (C) 2001-2018 D. P. Story %%
-%% dpstory@uakron.edu %%
-%% %%
-%% This program can redistributed and/or modified under %%
-%% the terms of the LaTeX Projet 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dljslib}
- [2017/08/11 v2.1 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}
-\newcommand\DeclareAndRegister[1]
- {\DeclareOption{#1}{\dljsRegister[y]{#1}}\dljsRegister{#1}}
-\dljsRegister[y]{dljslib}
-\DeclareAndRegister{equations}
-\DeclareAndRegister{vectors}
-\DeclareAndRegister{indefIntegral}
-\DeclareAndRegister{ImplMulti}
-\DeclareAndRegister{nodec}
-\DeclareAndRegister{noBinFac}
-\DeclareAndRegister{limitArith}
-\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}}
-\DeclareAndRegister{complex}
-\DeclareAndRegister{satisfyEq}
-\DeclareAndRegister{useGermanNums}
-\DeclareAndRegister{factors}
-\DeclareAndRegister{point}
-\DeclareAndRegister{intervals}
-\def\includeOptions#1{\@for\@option:=#1\do{\dljsRegister[y]{\@option}}}
-\InputIfFileExists{libcusopt.opt}{}{}
-\ProcessOptions
-\RequirePackage{exerquiz}[2017/08/04]
-\RequirePackage{insdljs}
-\def\setdecimalpoint#1{\def\aebdecimalpoint{\eqbs#1}}
-\setdecimalpoint{.}
-\newwrite\dljslib@verbatim@out
-\immediate\openout\dljslib@verbatim@out=dljslib.ljs
-\newenvironment{library@holding}[1]
-{%
- \expandafter\ifx\csname checkout@#1\endcsname y%
- \let\js@verbatim@out\dljslib@verbatim@out
- \let\dljs@verbatim\js@verbatimwrite
- \let\enddljs@verbatim\endjs@verbatimwrite\else
- \let\dljs@verbatim\comment
- \let\enddljs@verbatim\endcomment\fi\dljs@verbatim
-}{\enddljs@verbatim}
-\begin{library@holding}{dljslib}
-\begin{insDLJS*}[dljslib]{dljslib}
-\begin{newsegment}{dljslib: AcroTeX DLJS Library}
-/*
- The Document Level JavaScript Library
- D. P. Story copyright 2001-\the\year
-*/
-var dljslib = true;
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{equations}
-\newcommand\equationsAlertMsg{"An equation is expected"}
-\fi
-\begin{library@holding}{equations}
-\begin{newsegment}{dljslib: Equation Handling}
-function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
-{
- if (!ProcessIt) return null;
- ok2Continue = true;
- var success;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- var CorrExpressions = CorrAns.split("=");
- var zCorrAns = "("+CorrExpressions[0]+")-("+CorrExpressions[1] +")";
- UserAns = stripWhiteSpace (UserAns);
- if(!ok2Continue ) return null;
- if (!/[=]/.test(UserAns)) {
- eqAppAlert(\equationsAlertMsg, 3);
- return null;
- }
- var reComma=/,/;
- if ( reComma.test(UserAns) ) {
- eqAppAlert(\eqSyntaxErrorComma,3);
- return null;
- }
- var UserExpressions = UserAns.split("=");
- var zUserAns = "("+UserExpressions[0]+")-("+UserExpressions[1] +")";
-
- var comp = ( typeof oComp == "object" ) ?
- (typeof oComp.comp == "undefined" ) ?
- diffCompare : oComp.comp : oComp;
- if ( typeof oComp == "object"
- && typeof oComp.priorParse != "undefined" ) {
- if ( typeof oComp.priorParse == "object" ) {
- for ( var i=0; i < oComp.priorParse.length; i++) {
- var retn = oComp.priorParse[i](zUserAns);
- if ( retn == null ) return null;
- }
- } else {
- var retn = oComp.priorParse(zUserAns);
- if ( retn == null ) return null;
- }
- }
- zCorrAns = ParseInput(zCorrAns);
- if (!ok2Continue) {
- eqAppAlert("Syntax error in author's answer! Check console.", 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);
- if ( lambda == null ) {
- eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; };
- if ( !ok2Continue ) return notifyField(false, flag, fieldname);
- zCorrAns = lambda + "*(" + zCorrAns + ")";
- success=randomPointCompare (n,domain,indepVars,epsilon,
- zCorrAns,zUserAns,comp)
- if ( success == null ) { eqAppAlert(\eqSyntaxErrorUndefVar,3);
- return null; }
- return notifyField(success, flag, fieldname);
-}
-function getNonZeroRatio (_a, _v, _F, _G)
-{
- var _i, _j;
- var aXY = new Array();
- _a = _a.replace(/[\[\]\s]/g, "");
- var _V = _v.split(","); // e.g. _V[0] = "i:x"
- var _n = _V.length;
- var aIntervals = _a.split("&");
- var aInterval = aIntervals[0].split("x");
- var endpoints = aInterval[0].split(",");
- for (_j=0; _j < 4; _j++) {
- for (_i = 0; _i < _n; _i++) {
- var endpoints = aInterval[_i].split(",");
- aXY[_i] = endpoints[0]-0
- +(endpoints[1]-endpoints[0])*Math.random();
-\db console.println("aXY["+_i+"] = " + aXY[_i]);\db%
- }
- 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]) + ";");
- }
- _F = eval(_F);
- if ( app.viewerVersion >= 5)
- {
- var rtnCode = 0;
- eval("try { if(isNaN(_G = eval(_G))) rtnCode=-1; }"
- +"catch (e) { rtnCode=1; }");
- switch(rtnCode) {
- case 0: break;
- case 1: return null;
- case -1: ok2Continue=false;
- return -1;
- }
- }
- else
- if(isNaN(_G=eval(_G))) {ok2Continue=false;return -1;}
- if ( _F != 0 && _G != 0 ) return _G/_F;
- }
- console.println( "Can't find a non zero scalar");
- return null;
-}
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{vectors}
-\newcommand\vectorsErrorMsgi{"I'm looking for a vector.
- You need to use proper vector notation, try using
- angle brackets <....>."}
-\newcommand\vectorsErrorMsgii{"Angle brackets are not balanced.
- Check the expression you typed in."}
-\newcommand\vectorsErrorMsgiii{"Incorrect number of components.
- The answer requires " + aCorrAns.length+" components."}
-\def\vectorEmptyCompMsgiv(#1){"You entered nothing for the
- component " +(#1+1) +" of your answer. Please enter
- a component for the vector."}
-\fi
-\begin{library@holding}{vectors}
-\begin{newsegment}{dljslib: Vector Handling}
-function ProcVec (flag,CorrAns,n,epsilon,domain,indepVars,oComp)
-{
- if (!ProcessIt) return null;
- ok2Continue = true;
- var i, success, truthCnt=1;
- var aScalar, scalar = 1;
- var fieldname = event.target.name;
- var UserAns = event.value;
- UserAns = stripWhiteSpace(UserAns); // sets ok2Continue
- CorrAns = stripWhiteSpace(CorrAns);
- if ( !ok2Continue ) return null;
- var isSpecResp=false;
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (CorrAns == aDlLibSpecResp[i]) {
- isSpecResp=true; break;
- }
- }
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (UserAns == aDlLibSpecResp[i]) {
- success = (CorrAns == UserAns);
- return notifyField(success, flag, fieldname);
- }
- }
- if (isSpecResp) return notifyField(false, flag, fieldname);
- if (!/[<>]/.test(UserAns)) {
- eqAppAlert(\vectorsErrorMsgi, 3);
- return null;
- }
- if (!CkBalP(UserAns,"<",">")) {
- eqAppAlert(\vectorsErrorMsgii, 3);
- return null;
- }
- // see if there is a scalar multiple to the left of '<'
- aScalar = UserAns.match(/(.*)(\*)(\s*<)/);
- if (aScalar != null) {
- scalar = aScalar[1];
- UserAns = UserAns.slice(aScalar.index + aScalar[0].length-1)
- }
- var comp = ( typeof oComp == "object" ) ?
- (typeof oComp.comp == "undefined" ) ?
- diffCompare : oComp.comp : oComp;
- CorrAns = CorrAns.replace(/[<>]/g, ""); // strip of < and >
- UserAns = UserAns.replace(/[<>]/g, "");
- if ( typeof oComp == "object" && %
-typeof oComp.priorParse != "undefined" ) {
- var retn=processSpecialParse(oComp.priorParse,UserAns);
- if (retn==null) return null;
- }
- aUserAns = UserAns.split(",");
- aCorrAns = CorrAns.split(",");
- if (scalar != 1)
- for (i=0; i<aUserAns.length; i++)
- aUserAns[i]=""+scalar+"*"+aUserAns[i];
- if (aCorrAns.length != aUserAns.length) {
- eqAppAlert(\vectorsErrorMsgiii,3);
- return null;
- }
- // convert to new format, if needed
- indepVars = TypeParameters(indepVars);
- for (i=0; i<aCorrAns.length; i++) {
- aCorrAns[i] = ParseInput(aCorrAns[i]);
- if (!ok2Continue) {
- eqAppAlert("Author Syntax error!", 3);
- return null;
- }
- aUserAns[i] = ParseInput(aUserAns[i]);
- if (aUserAns[i]==null) {
- eqAppAlert(\vectorEmptyCompMsgiv(i), 3);
- return null;
- }
- if (!ok2Continue) return null;
- success=randomPointCompare (n,domain,indepVars,epsilon,
- aCorrAns[i],aUserAns[i],comp)
- if ( success == null ) {
- eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; }
- truthCnt *= (success) ? 1 : 0;
- }
- return notifyField(!!truthCnt, flag, fieldname);
-}
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{setSupport}
-\newcommand{\noBracesInAnsMsg}{"Do not insert braces in your answer.
- Please remove the braces (\{\})."}
-\newcommand{\noBracketsInAnsMsg}{"Do not insert braces in your answer.
- Please remove the angle brackets (<>)."}
-\fi
-\begin{library@holding}{setSupport}
-\begin{newsegment}{dljslib: Support for Sets}
-function ProcRespSetNum(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
-{
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- CorrAns = stripWhiteSpace(CorrAns);
- if (!ok2Continue) return null;
- var isSpecResp=false;
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (CorrAns == aDlLibSpecResp[i]) {
- isSpecResp=true; break;
- }
- }
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (UserAns == aDlLibSpecResp[i]) {
- success = (CorrAns == UserAns);
- return notifyField(success, flag, fieldname);
- }
- }
- if (isSpecResp) return notifyField(false, flag, fieldname);
- var retn=ck4Braces(UserAns);
- if (retn==null) return null;
- var aUserAns = UserAns.split(",");
- for ( var i=0; i < aUserAns.length; i++) {
- try {
- if (isNaN(eval(aUserAns[i]))) return syntaxError(), null;
- } catch(e) { return syntaxError(), null; }
- }
- var aUserAns = aUserAns.sort(
- function(a,b) { return eval(a) - eval(b);} );
- var aCorrAns = CorrAns.split(",").sort(
- function(a,b) { return eval(a) - eval(b);} );
- var numCorrect = 0;
- if ( aUserAns.length != aCorrAns.length )
- return notifyField(false, flag, fieldname);
- for ( var i=0; i< aCorrAns.length; i++) {
- var retn = _ProcResp(%
-flag,aCorrAns[i],aUserAns[i],n,epsilon,domain,indepVars,oComp);
- if ( retn == -1 ) return null;
- if ( retn == null ) return syntaxError(), null;
- numCorrect += (retn) ? 1 : 0;
- }
- var success = (numCorrect == aCorrAns.length);
- return notifyField(success, flag, fieldname);
-}
-var ok2format=true;
-function formatAsSet() {
- if (ok2format&&event.value.replace(/\\s/g,"") != "")
- event.value = "{ " + event.value + " }";
-}
-function ck4Braces (UserAns) {
- ok2format=true;
- if (/^\{/.test(UserAns) || /\}$/.test(UserAns) ) {
- ok2format=false;
- return eqAppAlert(\noBracesInAnsMsg,3), null;
- }
- else return true;
-}
-function ck4AngleBrackets (UserAns) {
- ok2format=true;
- if (/^</.test(UserAns) || />$/.test(UserAns) ) {
- ok2format=false;
- return eqAppAlert(\noBracketsInAnsMsg,3), null;
- }
- else return true;
-}
-function formatAsVector() {
- if (ok2format&&event.value.replace(/\\s/g,"") != "") {
- event.value = "< " + event.value + " >";
- }
-}
-function ProcRespSetSym(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
-{
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- CorrAns = stripWhiteSpace(CorrAns);
- if (!ok2Continue) return null;
- var isSpecResp=false;
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (CorrAns == aDlLibSpecResp[i]) {
- isSpecResp=true; break;
- }
- }
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (UserAns == aDlLibSpecResp[i]) {
- success = (CorrAns == UserAns);
- return notifyField(success, flag, fieldname);
- }
- }
- if (isSpecResp) return notifyField(false, flag, fieldname);
- var retn=ck4Braces(UserAns);
- if (retn==null) return null;
- var aUserAns = UserAns.split(",");
- var _V = indepVars.split(",");
- for ( var _i=0; _i < _V.length; _i++) {
- eval ( "var "+ _V[_i] + " = \"" + _i + "\";");
- }
- for ( var _i=0; _i < aUserAns.length; _i++) {
- try {
- if (isNaN(eval(aUserAns[_i]))) return syntaxError(), null;
- aUserAns[_i] = eval(aUserAns[_i]);
- } catch(e) { return syntaxError(), null; }
- }
- var aCorrAns = CorrAns.split(",");
- for ( var _i=0; _i < aCorrAns.length; _i++) {
- try {
- if (isNaN(eval(aCorrAns[_i])))
- return eqAppAlert(%
-"Author error, recheck your code",3), null;
- aCorrAns[_i] = eval(aCorrAns[_i]);
- } catch(e) { return eqAppAlert(
- "Author error, recheck your code",3), null; }
- }
- var aUserAns = aUserAns.sort(
- function(a,b) { return eval(a) - eval(b);} );
- var aCorrAns = aCorrAns.sort(
- function(a,b) { return eval(a) - eval(b);} );
- var numCorrect = 0;
- if ( aUserAns.length != aCorrAns.length )
- return notifyField(false, flag, fieldname);
- for ( var _i=0; _i< aCorrAns.length; _i++) {
- var retn = _ProcResp(%
-flag,aCorrAns[_i],aUserAns[_i],n,epsilon,"[0,1]","i:_x",oComp);
- if ( retn == -1 ) return null;
- if ( retn == null ) return syntaxError(), null;
- numCorrect += (retn) ? 1 : 0;
- }
- var success = (numCorrect == aCorrAns.length);
- return notifyField(success, flag, fieldname);
-}
-function ProcRespListFormula(flag,CorrAns,n,epsilon,domain,%
-indepVars,oComp) {
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- CorrAns = stripWhiteSpace(CorrAns);
- if (!ok2Continue) return null;
- var isSpecResp=false;
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (CorrAns == aDlLibSpecResp[i]) {
- isSpecResp=true; break;
- }
- }
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (UserAns == aDlLibSpecResp[i]) {
- success = (CorrAns == UserAns);
- return notifyField(success, flag, fieldname);
- }
- }
- if (isSpecResp) return notifyField(false, flag, fieldname);
- var retn=ck4AngleBrackets(UserAns);
- if (retn==null) return null;
- UserAns = UserAns.replace(/,+/g, ",");
- UserAns = UserAns.replace(/,$/, "");
- UserAns = UserAns.replace(/^,/, "");
- CorrAns = stripWhiteSpace(CorrAns);
- if (!ok2Continue) return null;
- var aUserAns = UserAns.split(",");
- var aCorrAns = CorrAns.split(",");
- var numCorrect = 0;
- if ( aUserAns.length != aCorrAns.length )
- return notifyField(false, flag, fieldname);
- for ( var i=0; i< aCorrAns.length; i++) {
- var retn =_ProcResp(flag,aCorrAns[i],aUserAns[i],%
-n,epsilon,domain,indepVars,oComp);
- if ( retn == -1 ) return null;
- if ( retn == null ) return syntaxError(), null;
- numCorrect += (retn) ? 1 : 0;
- }
- var success = (numCorrect == aCorrAns.length);
- return notifyField(success, flag, fieldname);
-}
-function ProcRespSetFormula(flag,CorrAns,n,epsilon,%
-domain,indepVars,oComp) {
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- CorrAns = stripWhiteSpace(CorrAns);
- if (!ok2Continue) return null;
- var isSpecResp=false;
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (CorrAns == aDlLibSpecResp[i]) {
- isSpecResp=true; break;
- }
- }
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (UserAns == aDlLibSpecResp[i]) {
- success = (CorrAns == UserAns);
- return notifyField(success, flag, fieldname);
- }
- }
- if (isSpecResp) return notifyField(false, flag, fieldname);
- var retn=ck4Braces(UserAns);
- if (retn==null) return null;
- UserAns = UserAns.replace(/,+/g, ",");
- UserAns = UserAns.replace(/,$/, "");
- UserAns = UserAns.replace(/^,/, "");
- CorrAns = stripWhiteSpace(CorrAns);
- if (!ok2Continue) return null;
- var aUserAns = UserAns.split(",");
- var aCorrAns = CorrAns.split(",");
- var numCorrect = 0, match = 0;
- if ( aUserAns.length != aCorrAns.length )
- return notifyField(false, flag, fieldname);
- for ( var i=0; i<aCorrAns.length; i++) {
- match = 0;
- for ( var j=i; j< aUserAns.length; j++) {
- var retn = _ProcResp(%
-flag,aCorrAns[i],aUserAns[j],n,epsilon,domain,indepVars,oComp);
- if ( retn == -1 ) return null;
- if ( retn == null ) return syntaxError(), null;
- if (retn==1) {
- var temp=aUserAns[j];
- aUserAns[j]=aUserAns[i];
- aUserAns[i]=temp;
- match = match + 1;
- }
- }
- numCorrect += (match) ? 1 : 0;
- }
- var success = (numCorrect == aCorrAns.length);
- return notifyField(success, flag, fieldname);}
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{complex}
-\newcommand{\complexPowerAlertMsg}{%
- "Powers of i (for example, i^2, i^3) are not supported,
- replace powers of i with their complex equivalents."}
-\newcommand{\complexCisAlertMsg}{%
- "The cis function does not support exponents. Write,
- for example, cis^3(x) as cis(3*x), instead."}
-\newcommand{\alertNotComplexMsg}{%
- "The expression is not in the form of a complex
- number, a+bi"}
-\def\emptyCompComplexMsg(#1){%
- "You entered nothing for the component "
- +(#1+1)+" of your answer. Please enter a complex number."}
-\fi
-\begin{library@holding}{complex}
-\begin{newsegment}{dljslib: Support for Complex Numbers}
-function cis(x,i) { return Math.cos(x) + i*Math.sin(x); }
-JSfCustom.push("cis");
-JSf = JSf.concat(JSfBuiltIn, JSfCustom);
-function ProcRespComplex(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
-{
- if (!ProcessIt) return null;
- ok2Continue = true;
- var i, success;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- CorrAns = stripWhiteSpace (CorrAns);
- UserAns = stripWhiteSpace (UserAns); // sets ok2Continue
- if ( !ok2Continue ) return null;
- indepVars+="i";
- domain+="x[0,1]";
- if (/(\b|[^a-zA-Z])i\^/.test(UserAns)) {
- eqAppAlert(\complexPowerAlertMsg,3);
- return null;
- }
- if ( /cis\^/.test(UserAns) ) {
- eqAppAlert(\complexCisAlertMsg,3);
- return null;
- }
- var reComma=/,/;
- if ( reComma.test(UserAns) ) {
- eqAppAlert(\eqSyntaxErrorComma,3);
- return null;
- }
- UserAns=changeArgs4Cis(UserAns);
- CorrAns=changeArgs4Cis(CorrAns);
- var aMatch = UserAns.match(/(\b|[^a-zA-Z])i/g);
- if ( aMatch != null && aMatch.length > 1) {
- eqAppAlert(\alertNotComplexMsg, 3);
- return null;
- }
- var comp = ( typeof oComp == "object" ) ?
- (typeof oComp.comp == "undefined" ) ?
- diffCompare : oComp.comp : oComp;
- if ( typeof oComp == "object" &&
- typeof oComp.priorParse != "undefined" ) {
- if ( typeof oComp.priorParse == "object" ) {
- for ( var i=0; i < oComp.priorParse.length; i++) {
- var retn = oComp.priorParse[i](UserAns);
- if ( retn == null ) return null;
- }
- } else {
- var retn = oComp.priorParse(UserAns);
- if ( retn == null ) return null;
- }
- }
- UserAns = ParseInput(UserAns);
- CorrAns = ParseInput(CorrAns);
- indepVars = TypeParameters(indepVars);
- if (!ok2Continue) return null;
- success=randomPointCompare(
- n,domain,indepVars,epsilon,CorrAns,UserAns,comp);
- if ( success == null ) { eqAppAlert(%
-\eqSyntaxErrorUndefVar,3); return null; }
- return notifyField(success, flag, fieldname);
-}
-function ProcRespListComplex(flag,CorrAns,n,epsilon,%
-domain,indepVars,oComp) {
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- CorrAns = stripWhiteSpace(CorrAns); // sets ok2Continue
- if ( !ok2Continue ) return null;
- var isSpecResp=false;
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (CorrAns == aDlLibSpecResp[i]) {
- isSpecResp=true; break;
- }
- }
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (UserAns == aDlLibSpecResp[i]) {
- success = (CorrAns == UserAns);
- return notifyField(success, flag, fieldname);
- }
- }
- if (isSpecResp) return notifyField(false, flag, fieldname);
- UserAns = UserAns.replace(/,+/g, ",");
- UserAns = UserAns.replace(/,$/, "");
- UserAns = UserAns.replace(/^,/, "");
- var aUserAns = UserAns.split(",");
- var aCorrAns = CorrAns.split(",");
- if ( aUserAns.length != aCorrAns.length )
- return notifyField(false, flag, fieldname);
- var numCorrect = 0;
- var match = 0;
- for ( var i=0; i< aCorrAns.length; i++) {
- match = 0;
- var retn = ProcRespComplex(%
-flag,aCorrAns[i],n,epsilon,domain,indepVars,oComp,aUserAns[i]);
- if ( retn == null ) return null;
- numCorrect += (retn) ? 1 : 0;
- }
- var success = (numCorrect == aCorrAns.length);
- return notifyField(success, flag, fieldname);
-}
-function ProcRespSetComplex(flag,CorrAns,n,epsilon,%
-domain,indepVars,oComp) {
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- CorrAns = stripWhiteSpace(CorrAns); // sets ok2Continue
- if ( !ok2Continue ) return null;
- var isSpecResp=false;
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (CorrAns == aDlLibSpecResp[i]) {
- isSpecResp=true; break;
- }
- }
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (UserAns == aDlLibSpecResp[i]) {
- success = (CorrAns == UserAns);
- return notifyField(success, flag, fieldname);
- }
- }
- if (isSpecResp) return notifyField(false, flag, fieldname);
- UserAns = UserAns.replace(/,+/g, ",");
- UserAns = UserAns.replace(/,$/, "");
- UserAns = UserAns.replace(/^,/, "");
- event.value = UserAns;
- CorrAns = stripWhiteSpace(CorrAns);
- if (!ok2Continue) return null;
- var aUserAns = UserAns.split(",");
- var aCorrAns = CorrAns.split(",");
- if ( aUserAns.length != aCorrAns.length )
- return notifyField(false, flag, fieldname);
- var numCorrect = 0;
- var match = 0;
- for ( var i=0; i< aCorrAns.length; i++) {
- match = 0;
- for ( var j=i; j< aUserAns.length; j++) {
- var retn = ProcRespComplex(%
-flag,aCorrAns[i],n,epsilon,domain,indepVars,oComp,aUserAns[j]);
- if ( retn == null ) return null;
- if (retn==1) {
- var temp=aUserAns[j];
- aUserAns[j]=aUserAns[i];
- aUserAns[i]=temp;
- match = match + 1;
- }
- }
- numCorrect += (match) ? 1 : 0;
- }
- var success = (numCorrect == aCorrAns.length);
- return notifyField(success, flag, fieldname);
-}
-function changeArgs4Cis(str) {
- var re =/cis\(/g;
- while ( (aP=re.exec(str) ) != null ) {
- var LeftP=re.lastIndex;
- var RightP=FindBalP(str,re.lastIndex,1);
- str = str.substring(0,RightP)
- +",i"+str.substring(RightP);
- }
- return str;
-}
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{satisfyEq}
-\newcommand{\notifyWrongNumEntries}{\def\satisfyEqNotify{true}}
-\def\satisfyEqNotify{false}
-\newcommand{\wrongNumEntriesMsg}{"You don't have the correct number
- of entries in your coordinate points. Expecting "+_n
- +" entries per point." }
-\newcommand{\eqSyntaxErrorNoParens}{"Syntax Error: Enter the point
- using parentheses, for example (1,2) or (1,2,3), as applicable."}
-\newcommand{\eqNonzeroEntries}{"Syntax Error: All entries are required
- to be nonzero, try again."}
-\newcommand{\eqTooManyEntries}{"You've entered more points than
- requested, enter only "+l+" points."}
-\newcommand{\eqTooFewEntries}{"You've entered fewer points than
- requested, enter only "+l+" points."}
-\newcommand{\eqDuplEntries}{"One or more points are the same,
- provide "+l+" distinct points."}
-\fi
-\begin{library@holding}{satisfyEq}
-\begin{newsegment}
- {dljslib: Support for n-tuple input to Satisfy an Equation}
-var bNotifyWrngNumEntries=\satisfyEqNotify;
-function ProcRespEvalEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp){
- var UserAns=(arguments.length>7)?arguments[7]:event.value;
- var retn=_ProcRespEvalEq(true,flag,CorrAns,n,epsilon,%
-indepVars,UserAns);
- return retn;
-}
-function ProcRespEvalEqNonZero(flag,CorrAns,n,epsilon,%
-domain,indepVars,oComp) {
- var UserAns=(arguments.length>7)?arguments[7]:event.value;
- var retn=_ProcRespEvalEq(false,flag,CorrAns,n,epsilon,
-indepVars,UserAns);
- return retn;
-}
-function _ProcRespEvalEq(allowzero,flag,CorrAns,n,epsilon,indepVars)
-{
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>6); // dps17
- var UserAns=(bSubstVars)?arguments[6]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- if (!ok2Continue) return null;
- if ( (UserAns.charAt(0) != "\(") || %
-(UserAns.charAt(UserAns.length-1) != "\)"))
- return eqAppAlert(\eqSyntaxErrorNoParens,3), null;
- UserAns=UserAns.substring(1,UserAns.length-1);
- var aUserAns = UserAns.split(",");
- for ( var i=0; i < aUserAns.length; i++) {
- try {
- if (isNaN(eval(aUserAns[i]))) return syntaxError(), null;
- if (!allowzero && (eval(aUserAns[i])==0))
- return eqAppAlert(\eqNonzeroEntries,3), null;
- } catch(e) { return syntaxError(), null; }
- }
- var _v = TypeParameters(indepVars);
- var _V = _v.split(","); // e.g. _V[0] = "i:x"
- var _n = _V.length;
- if ( aUserAns.length != _n) {
- if (bNotifyWrngNumEntries)
- return eqAppAlert(\wrongNumEntriesMsg,3), null;
- else
- return notifyField(false, flag, fieldname);
- }
- for (var _i=0; _i < _n; _i++) {
- if (_V[_i].charAt(0) == "r" )
- eval("var "+_V[_i].charAt(2)+"="+aUserAns[_i]+";");
- else // assume type "i"
- eval("var "+_V[_i].charAt(2)+"="+Math.ceil(aUserAns[_i])+";");
- }
- var UserInput=ParseInput(CorrAns);
- var UserAns=eval(UserInput);
- success=(Math.abs(UserAns) < epsilon)?true:false;
- return notifyField(success, flag, fieldname);
-}
-function ProcRespEvalEqList(flag,CorrAns,n,epsilon,domain,%
-indepVars,oComp) {
- var UserAns=(arguments.length>7)?arguments[7]:event.value;
- var retn=_ProcRespEvalEqList(true,flag,CorrAns,n,epsilon,%
-indepVars,UserAns);
- return retn;
-}
-function ProcRespEvalEqListNonZero(flag,CorrAns,n,epsilon,domain,%
-indepVars,oComp){
- var UserAns=(arguments.length>7)?arguments[7]:event.value;
- var retn=_ProcRespEvalEqList(false,flag,CorrAns,n,epsilon,%
-indepVars,UserAns);
- return retn;
-}
-function _ProcRespEvalEqList(allowzero,flag,CorrAns,n,epsilon,indepVars)
-{
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>6); // dps17
- var UserAns=(bSubstVars)?arguments[6]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- if (!ok2Continue) return null;
- var success;
- UserAns=UserAns.replace(/;+$/,"");
- UserAns=UserAns.replace(/;+/g,";");
- var aUsersArray = new Array();
- var aUserAns = UserAns.split(";");
- var aCorrAns = CorrAns.split(";");
- var l = aCorrAns[0];
- if (l < aUserAns.length )
- return eqAppAlert(\eqTooManyEntries,3), null;
- if (l > aUserAns.length )
- return eqAppAlert(\eqTooFewEntries,3), null;
- var _v = TypeParameters(indepVars);
- var _V = _v.split(","); // e.g. _V[0] = "i:x"
- var _n = _V.length;
- var testFunc="";
- for (var _i=0; _i < _n; _i++)
- testFunc += ("+"+(Math.random()*9)+"*"+_V[_i].charAt(2));
- var isCorrect=1;
- for (var pair=0; pair< l; pair++) {
- if ( (aUserAns[pair].charAt(0) != "\(") || %
-(aUserAns[pair].charAt(aUserAns[pair].length-1) != "\)"))
- return eqAppAlert(\eqSyntaxErrorNoParens,3), null;
- UserAnsPair=aUserAns[pair].substring(1,aUserAns[pair].length-1);
- var aUserAnsPair = UserAnsPair.split(",");
- for ( var i=0; i < aUserAnsPair.length; i++) {
- try { if (isNaN(eval(aUserAnsPair[i]))) %
-return syntaxError(), null;
- if (!allowzero && (eval(aUserAnsPair[i])==0))
- return eqAppAlert(\eqNonzeroEntries,3), null;
- } catch(e) { return syntaxError(), null; }
- }
- if ( aUserAnsPair.length != _n) {
- if (bNotifyWrngNumEntries)
- return eqAppAlert(\wrongNumEntriesMsg,3), null;
- else
- return notifyField(false, flag, fieldname);
- }
- for (var _i=0; _i < _n; _i++) {
- if (_V[_i].charAt(0) == "r" )
- eval ("var "+_V[_i].charAt(2)+"="+aUserAnsPair[_i]+";");
- else // assume type "i"
- eval ("var "+_V[_i].charAt(2)+"="%
-+Math.ceil(aUserAnsPair[_i])+";");
- }
- var UserInput=ParseInput(aCorrAns[1]);
- var UserAns=eval(UserInput);
- aUsersArray[pair]=eval(testFunc);
- success=(Math.abs(UserAns) < epsilon)?true:false;
-isCorrect *=Number(success);
- }
- success=(isCorrect==1);
- var aOrderArray = aUsersArray.sort(function(a,b){return a-b});
- var m = aUsersArray.length - 1;
- for (i=0; i<m; i++)
- if (Math.abs(aUsersArray[i]-aUsersArray[i+1])<.0001)
- return eqAppAlert(\eqDuplEntries,3), null;
- return notifyField(success, flag, fieldname);
-}
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{useGermanNums}
-\newcommand{\noDecPtGerMsg}{"A period (.) is not allowed in answer,
- use German notation for numbers"}
-\fi
-\begin{library@holding}{useGermanNums}
-\begin{newsegment}
- {dljslib: Support for process numbers in the German format}
-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 UserAns=(bSubstVars)?arguments[7]:event.value;
- var success = _ProcRespNumsDe(flag,CorrAns,UserAns,n,%
-epsilon,domain,indepVars,oComp);
- if ( success == -1 || !ok2Continue ) return null;
- if ( success == null ) { return syntaxError(), null; }
- return notifyField(success, flag, fieldname);
-}
-function _ProcRespNumsDe(flag,CorrAns,UserAns,n,epsilon,%
-domain,indepVars,oComp) {
- ok2Continue = true;
- CorrAns = ParseInput(CorrAns);
- if (!ok2Continue) {
- eqAppAlert("Syntax error in author's answer! Check console.", 3);
- return null;
- }
- var UserAnsSave=UserAns;
- var reDe=/,/g;
- var reDec=/\./g;
- if ( reDec.test(UserAns) ) {
- eqAppAlert(\noDecPtGerMsg,3);
- return -1;
- }
- UserAns=UserAns.replace(reDe,".");
- var comp = ( typeof oComp == "object" ) ?
- (typeof oComp.comp == "undefined" ) ?
- diffCompare : oComp.comp : 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;
- }
- UserAns = ParseInput(UserAns);
- indepVars = TypeParameters(indepVars);
- if (!ok2Continue) return null;
- var success=randomPointCompare(n,domain,indepVars,%
-epsilon,CorrAns,UserAns,comp);
- if ( success && (typeof(oComp)=="object") %
-&& (typeof(oComp.postParse)!="undefined") )
- success=processSpecialParse(oComp.postParse,UserAns);
- return success;
-}
-\end{newsegment}
-\end{library@holding}
-\begin{library@holding}{unordered}
-\begin{newsegment}{dljslib: Contrib - Processing Unordered Responses}
-/*
-** The ProcRespSetFormula function is now listed under the
-** setSupport option, titled 'dljslib: Support for Sets'
-*/
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{factors}
-\newcommand{\facNoPropForm}{"Factorization is not in the proper form,
- try placing the constant, if any, at the beginning of the
- factorization"}
-\newcommand{\noNotEncloseMonos}{"Do not enclose constants or
- monomials in parentheses"}
-\fi
-\begin{library@holding}{factors}
-\begin{newsegment}{dljslib: Contrib - Processing Factors as Responses}
-function ProcRespFactors(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
-{
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- if (!ok2Continue) return null;
- var retn = _ProcResp(flag,CorrAns,UserAns,n,epsilon,%
-domain,indepVars,oComp);
- if ( retn == -1 ) return null;
- if ( retn == null ) return syntaxError(), null;
- if ( retn == 0 ) {
- var initialsuccess = false;
- return notifyField(initialsuccess, flag, fieldname);
- }
- var aUserAns=new Array();
- var aCorrAns=new Array();
- var aNegCorrAns=new Array();
- aUserAns=getFactorArray(UserAns);
- if (aUserAns==null) {
- eqAppAlert(\facNoPropForm, 3);
- return null;
- }
- if (aUserAns==-1) return null;
- aCorrAns=getFactorArray(CorrAns);
- if ( aCorrAns==null) {
- app.beep(); console.show();
- console.println("Author error in factorization, its not in %
-the proper form");
- return null;
- }
- for ( var i=0; i< aCorrAns.length; i++) {
- aNegCorrAns[i] = "-" + "(" + aCorrAns[i] + ")"}
- var numCorrect = 0, match=0,signflag=0;
- if ( aUserAns.length != aCorrAns.length )
- return notifyField(false, flag, fieldname);
- for ( var i=0; i< aCorrAns.length; i++) {
- match = 0;
- for ( var j=i; j< aUserAns.length; j++) {
- var retn = _ProcResp(flag,aCorrAns[i],aUserAns[j],%
-n,epsilon,domain,indepVars,oComp);
- if ( retn == -1 ) return null;
- if ( retn == null ) return syntaxError(), null;
- if (retn==1) {
- var temp=aUserAns[j];
- aUserAns[j]=aUserAns[i];
- aUserAns[i]=temp;
- match = match + 1;
- }
- else {
- var retn = _ProcResp(flag,aNegCorrAns[i],aUserAns[j],%
-n,epsilon,domain,indepVars,oComp);
- if ( retn == -1 ) return null;
- if ( retn == null ) return syntaxError(), null;
- if (retn==1) {
- var temp=aUserAns[j];
- aUserAns[j]=aUserAns[i];
- aUserAns[i]=temp;
- match = match + 1;
- signflag = signflag + 1;
- }
- }
- }
- numCorrect += (match) ? 1 : 0;
- }
- var success = ((numCorrect==aCorrAns.length)&&(signflag\%2==0));
- if ( success == null ) return syntaxError(), null;
- return notifyField(success, flag, fieldname);
-}
-function getFactorArray(str) {
- var aFactors=new Array();
- var i,j,front,factor,back,bInitGrped=true;
- if (str.charAt(0) != "\(" ) {
- bInitGrped=false;
- i=str.indexOf("\(");
- if ( i != -1 ) {
- aFactors.push(str.substring(0,i));
- str=str.substring(i);
- }
- }
- while ( (i=str.indexOf("\(")) != -1 ) {
- j=FindBalP(str,i,true);
- front=str.substring(0,i);
- factor=str.substring(i,j+1);
- back = str.substring(j+1);
- if ( back.charAt(0) == "\^" ) {
- getExp=back.match(/\^\d+/);
- theExp=back.substring(0,getExp[0].length);
- factor+=(theExp);
- aFactors.push(factor);
- back=back.substring(getExp[0].length);
- } else {
- aFactors.push(factor);
- }
- str=front + back;
- if ( factor.charAt(1)=="-" || factor.charAt(1)=="+" )
- factor=factor.substring(2);
- if (!/[+-]/.test(factor)) {
- eqAppAlert(\noNotEncloseMonos, 3);
- return -1;
- }
- }
- if (/[A-Za-z]/.test(str)) {
- var aExp = str.match(/[A-Za-z](\^\d+)*/);
- factor=aExp[0];
- i=aExp.index;
- front=str.substring(0,i);
- back=str.substring(i+factor.length);
- str=front+back;
- if (!bInitGrped) {
- if (aFactors[0]=="-" || aFactors[0]=="+")
- aFactors[0]=aFactors[0]+factor;
- else
- aFactors[0]="\("+aFactors[0]+"\)"+"\("+factor+"\)";
- } else {
- aFactors.push(str);
- str="";
- }
- }
- if (aFactors[0]=="-"||aFactors[0]=="+"||isFinite(aFactors[0])){
- factor=aFactors.shift();
- aFactors[0]=factor+aFactors[0];
- }
- return (str!="") ? null : aFactors
-}
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{point}
-\newcommand{\pointErrorMsgi}{%
- "I'm looking for a point. You need to use proper point notation."}
-\newcommand{\pointErrorMsgii}{"Parentheses are not balanced."}
-\newcommand{\pointErrorMsgiii}{"Incorrect number of components.
- The answer requires "+ aCorrAns.length+" components."}
-\def\pointEmptyCompMsgiv(#1){
- "You entered nothing for the component " +(#1+1)
- +" of your answer. Please enter a component for the point."}
-\fi
-\begin{library@holding}{point}
-\begin{newsegment}{dljslib: Contrib - Processing a Point Response}
-function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
-{
- if (!ProcessIt) return null;
- ok2Continue = true;
- var i, success, truthCnt=1;
- var aScalar, scalar = 1;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- UserAns = stripWhiteSpace (UserAns); // sets ok2Continue
- CorrAns = stripWhiteSpace(CorrAns);
- if ( !ok2Continue ) return null;
- var isSpecResp=false;
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (CorrAns == aDlLibSpecResp[i]) {
- isSpecResp=true; break;
- }
- }
- for ( var i=0; i<aDlLibSpecResp.length; i++) {
- if (UserAns == aDlLibSpecResp[i]) {
- success = (CorrAns == UserAns);
- return notifyField(success, flag, fieldname);
- }
- }
- if (isSpecResp) return notifyField(false, flag, fieldname);
- if (!/[()]/.test(UserAns)) {
- return eqAppAlert(\pointErrorMsgi, 3), null;
- }
- if (!CkBalP(UserAns,"(",")")) {
- return eqAppAlert(\pointErrorMsgii, 3), null;
- }
- var comp = ( typeof oComp == "object" ) ?
- (typeof oComp.comp == "undefined" ) ?
- diffCompare : oComp.comp : oComp;
- CorrAns = CorrAns.replace(/[()]/g, ""); // strip off ( and )
- UserAns = UserAns.replace(/[()]/g, "");
- if ( typeof oComp == "object" &&
- typeof oComp.priorParse != "undefined" ) {
- if ( typeof oComp.priorParse == "object" ) {
- for ( var i=0; i < oComp.priorParse.length; i++) {
- var retn = oComp.priorParse[i](UserAns);
- if ( retn == null ) return null;
- }
- } else {
- var retn = oComp.priorParse(UserAns);
- if ( retn == null ) return null;
- }
- }
- aUserAns = UserAns.split(",");
- aCorrAns = CorrAns.split(",");
- if (scalar != 1)
- for (i=0; i<aUserAns.length; i++)
- aUserAns[i]=""+scalar+"*"+aUserAns[i];
- if (aCorrAns.length != aUserAns.length) {
- eqAppAlert(\pointErrorMsgiii,3);
- return null;
- }
- indepVars = TypeParameters(indepVars);
- for (i=0; i<aCorrAns.length; i++) {
- aCorrAns[i] = ParseInput(aCorrAns[i]);
- if (!ok2Continue) {
- eqAppAlert("Author Syntax error!", 3);
- return null;
- }
- aUserAns[i] = ParseInput(aUserAns[i]);
- if (aUserAns[i]==null) {
- eqAppAlert(\pointEmptyCompMsgiv(i), 3);
- return null;
- }
- if (!ok2Continue) return null;
- success=randomPointCompare (
- n,domain,indepVars,epsilon,aCorrAns[i],aUserAns[i],comp)
- if ( success == null ) {
- eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; }
- truthCnt *= (success) ? 1 : 0;
- }
- return notifyField(!!truthCnt, flag, fieldname);
-}
-\end{newsegment}
-\end{library@holding}
-\begin{library@holding}{intervals}
-\begin{newsegment}{dljslib: Contrib - Processing Interval Responses}
-function ProcRespIntervals(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
-{
- ok2Continue = true;
- if (!ProcessIt) return null;
- var fieldname = event.target.name;
- var bSubstVars=(arguments.length>7); // dps17
- var UserAns=(bSubstVars)?arguments[7]:event.value;
- UserAns = stripWhiteSpace(UserAns);
- CorrAns = stripWhiteSpace(CorrAns);
- if (!ok2Continue) return null;
- UserAns = UserAns.replace(/inf/g, "x");
- CorrAns = CorrAns.replace(/inf/g, "x");
- indepVars = "x";
- domain="[0,1]";
- var aUserAns = UserAns.split("U");
- var aCorrAns = CorrAns.split("U");
- var numCorrect = 0;
- var match = 0;
- var matchparts = 0;
- if ( aUserAns.length != aCorrAns.length )
- return notifyField(false,flag, fieldname);
- for ( var i=0; i< aCorrAns.length; i++) {
- match = 0;
- for ( var j=i; j< aUserAns.length; j++) {
- CorrInt=aCorrAns[i];
- UserInt=aUserAns[j];
- var levaUser = UserInt.charAt(0);
- var pravaUser = UserInt.charAt(UserInt.length-1);
- var stredUser = UserInt.substring(1,UserInt.length-1);
- UserInt = levaUser+","+stredUser+","+pravaUser;
- var levaCorr = CorrInt.charAt(0);
- var pravaCorr = CorrInt.charAt(CorrInt.length-1);
- var stredCorr = CorrInt.substring(1,CorrInt.length-1);
- CorrInt = levaCorr+","+stredCorr+","+pravaCorr;
- var aCorrInt = CorrInt.split(",");
- var aUserInt = UserInt.split(",");
- if ( aUserInt.length != 4 )
- return notifyField(false, flag, fieldname);
- matchparts = 0;
- if (aCorrInt[0] == aUserInt[0]) matchparts+=1;
- if (aCorrInt[3] == aUserInt[3]) matchparts+=1;
- var retn1 = _ProcResp(flag,aCorrInt[1],aUserInt[1],%
-n,epsilon,domain,indepVars,oComp);
- if (retn1 == -1 ) return null;
- if (retn1 == null) return syntaxError(), null;
- if (retn1 == 1) matchparts+=1;
- var retn2 = _ProcResp(flag,aCorrInt[2],aUserInt[2],%
-n,epsilon,domain,indepVars,oComp);
- if (retn2 == -1 ) return null;
- if (retn2 == null) return syntaxError(), null;
- if (retn2 == 1) matchparts+=1;
- if (matchparts == 4) {
- var temp=aUserAns[j];
- aUserAns[j]=aUserAns[i];
- aUserAns[i]=temp;
- match = match + 1;
- }
- }
- numCorrect += (match) ? 1 : 0;
- }
- var success = (numCorrect == aCorrAns.length);
- return notifyField(success, flag, fieldname);
-}
-\end{newsegment}
-\end{library@holding}
-\begin{library@holding}{indefIntegral}
-\begin{newsegment}{dljslib: Indefinite Integral Handling}
-function indefCompare(_a,_c,_v,_F,_G) {
- var eqC;
- var aAB = _a.split(",");
- var aXY = _c.split(",");
- var _V = _v.split(","); // e.g. _V[0] = "i:x"
- var _n = aXY.length
- for (var _i=0; _i< _n; _i++) {
- if (_V[_i].charAt(0) == "r" )
- eval ( "var "+ _V[_i].charAt(2)
- + " = " + aAB[2*_i] + ";");
- else // assume type "i"
- eval ( "var "+ _V[_i].charAt(2)
- + " = " + Math.ceil(aAB[2*_i]) + ";");
- }
- var C = 0;
- if ( app.viewerVersion >= 5)
- {
- var rtnCode = 0;
- eval("try {if (isNaN(eqC = eval(_F)-eval(_G))) rtnCode=-1;}"
- +" catch (e) { rtnCode=1; }");
- switch(rtnCode)
- {
- case 0: break;
- case 1: return null;
- case -1: return -1;
- }
- }
- else
- if (isNaN(eqC = eval(_F)-eval(_G))) return -1;
- 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]) + ";");
- }
- _F = eval(_F);
- if ( app.viewerVersion >= 5)
- {
- var rtnCode = 0;
- eval("try { if(isNaN(_G = eval(_G))) rtnCode=-1; }"
- +" catch (e) { rtnCode=1; }");
- switch(rtnCode)
- {
- case 0: break;
- case 1: return null;
- case -1: return -1;
- }
- }
- else
- if(isNaN(_G = eval(_G))) return -1;
- return Math.abs( _F - _G - eqC );
-}
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{nodec}
-\newcommand\nodecAlertMsg{%
- "A decimal answer is not acceptable here.
- Please express your answer using fractions, square roots,
- e, log, etc."}
-\fi
-\begin{library@holding}{nodec}
-\begin{newsegment}{dljslib: Contrib - No Decimals}
-function nodec(UserAns)
-{
- var dot = /[\.\aebdecimalpoint]/;
- if (dot.test(UserAns)) {
- eqAppAlert(\nodecAlertMsg,3);
- return null;
- } else return true;
-}
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{noBinFac}
-\newcommand\noBinFactBinCoeffAlertMsg{%
- "You may not use this notation here.
- Please evaluate the binomial coefficient.
- You may present your answer as a product rather
- than calculating a very large number."}
-\newcommand\noBinFactPermAlertMsg{%
- "You may not use this notation here.
- Please evaluate the permutation.
- You may present your answer as a product rather
- than calculating a very large number."}
-\newcommand\noBinFactFactAlertMsg{%
- "You may not use this notation here.
- Please evaluate the factorial.
- You may present your answer as a product rather
- than calculating a very large number."}
-\fi
-\begin{library@holding}{noBinFac}
-\begin{newsegment}{dljslib: Contrib - No Binomial Coefficients Allowed}
-aReFact = new Array(
- /(?=\()?(\d+)(?=\))?!/,
- /(?=\[)?(\d+)(?=\])?!/,
- /(?=\{)?(\d+)(?=\})?!/
-);
-function noBinFac(UserAns)
-{
- var bad = /(C\()/;
- if (bad.test(UserAns)) {
- eqAppAlert(\noBinFactBinCoeffAlertMsg,3);
- return null;
- }
- bad = /(P\()/;
- if (bad.test(UserAns)) {
- eqAppAlert(\noBinFactPermAlertMsg,3);
- return null;
- }
- for ( var i=0; i<aReFact.length; i++) {
- if (aReFact[i].test(UserAns)) {
- eqAppAlert(\noBinFactFactAlertMsg,3);
- return null;
- }
- }
- bad = /(fact)/;
- if (bad.test(UserAns)) {
- eqAppAlert(\noBinFactFactAlertMsg,3);
- return null;
- }
- return true
-}
-\end{newsegment}
-\end{library@holding}
-\@ifcheckedout{limitArith}
-\newcommand{\allowWrngNormSciNotn}{\def\allowWrngNSN{true}}
-\def\allowWrngNSN{false}
-\newcommand{\DecimalsOnlyErrorMsg}{%
- "Enter only an integer, e.g., 17, or a decimal number, e.g. 12.4.
- Using arithmetic operations or built in function is not acceptable
- for this problem."}
-\newcommand{\NoProductsErrorMsg}{%
- "Multiplication is not allowed for this problem."}
-\newcommand{\NoDivisionErrorMsg}{%
- "Division is not allowed for this problem."}
-\newcommand{\NoAddOrSubErrorMsg}{%
- "Neither addition nor subtraction is allowed for this problem."}
-\newcommand{\NoExpAllowedErrorMsg}{%
- "The use of exponents is not allowed for this problem."}
-\newcommand{\NoTrigAllowedErrorMsg}{%
- "The use of trig functions in this problem is not allowed."}
-\newcommand{\NoPiAllowedErrorMsg}{%
- "The use of PI or pi is not allowed in this problem."}
-\newcommand{\NoTrigLogAllowedErrorMsg}{%
- "The use of trig and log functions is not allowed
- in this problem."}
-\newcommand{\sciNotSyntaxError}{"Enter the answer in
- scientific notation."}
-\newcommand{\sciNotNormalForm}{"The scientific notation entered
- is not in normalized form."}
-\newcommand{\NoNegExpMsg}{"No negative exponents permitted,
- keep working!"}
-\fi
-\begin{library@holding}{limitArith}
-\begin{newsegment}{dljslib: Limit Arithmetic and Built in Functions}
-function DecimalsOnly(UserAns) {
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- if( !isFinite( UserAns ) ) {
- eqAppAlert(\DecimalsOnlyErrorMsg,3);
- return null;
- }
- return true;
-}
-function NoProducts (UserAns) {
- // Requires the ImplMulti option of dljslib
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- UserAns = Ck4Products(UserAns);
- if ( /\*/.test( UserAns ) )
- return eqAppAlert(\NoProductsErrorMsg,3), null;
- return true;
-}
-function NoDivision (UserAns) {
- if ( /\//.test( UserAns) )
- return eqAppAlert(\NoDivisionErrorMsg,3), null;
- return true;
-}
-function NoAddOrSub (UserAns) {
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- UserAns=ChngAllGrpsToParens(UserAns);
- var result;
- var re = /.[+-]/g;
- re.lastIndex = 0;
- while ( (result = re.exec( UserAns )) != null ) {
- if ( result[0].charAt(0) != "\(" )
- return eqAppAlert(\NoAddOrSubErrorMsg,3), null;
- }
- return true;
-}
-function NoArithAllowed (UserAns) {
- var aNoArithmetic = new Array ( NoAddOrSub, NoProducts,
- NoDivision, NoExpAllowed );
- for ( var i = 0; i < aNoArithmetic.length; i++ )
- if ( (retn = aNoArithmetic[i](UserAns)) == null ) return null;
- return true;
-}
-function NoExpAllowed (UserAns) {
- // Requires the ImplMulti option of dljslib
- UserAns = stripWhiteSpace(UserAns);
- if ( !ok2Continue ) return null;
- if ( /\^/.test( UserAns ) || /pow/.test( UserAns ) )
- return eqAppAlert(\NoExpAllowedErrorMsg,3), null;
- return true;
-}
-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;
-}
-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;
-}
-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;
- }
- }
- }
- return true;
-}
-var bAllowWrngNormSciNotn=false;
-var bItsNormSciNot=false;
-function SciNotNoNotify(UserAns) {
- bAllowWrngNormSciNotn=true;
- var rtn=SciNotResp(UserAns);
- return rtn;
-}
-function SciNotResp(UserAns) {
- bItsNormSciNot=false;
- var _sciNotation, _a, _b;
- _sciNotation = /^[+-]*(\d*)*(\.\d*)*E[+-]*\d+$/;
- UserAns=stripWhiteSpace(UserAns);
- if ( (_a=_sciNotation.exec(UserAns)) !=null) {
- if (isNaN(_a[1])) {
- if (bAllowWrngNormSciNotn)
- return true;
- else
- return eqAppAlert(\sciNotNormalForm,3), null;
- }
- if (isNaN(_a[2])) _a[2]=0;
- _b = Math.abs(Number(_a[1])+Number(_a[2]));
- if ( _b < 1 || _b >= 10 ) {
- if (bAllowWrngNormSciNotn)
- return true;
- else
- return eqAppAlert(\sciNotNormalForm,3), null;
- }
- else {
- bItsNormSciNot=true;
- return true
- }
- } else
- return eqAppAlert(\sciNotSyntaxError,3), null;
-}
-function sciNotResp(UserAns) {return SciNotResp(UserAns);}
-function postSciNotResp(UserAns) {
- bAllowWrngNormSciNotn=false;
- return bItsNormSciNot;
-}
-function NoNegExp (UserAns) {
- var re=/(\^|\^\()+-/g;
- UserAns=ChngAllGrpsToParens(UserAns);
- if (re.test(UserAns))
- return eqAppAlert(\NoNegExpMsg,3), null;
- return true;
-}
-function noNegExp(UserAns){return NoNegExp(UserAns)}
-\end{newsegment}
-\end{library@holding}
-\begin{library@holding}{combinatorics}
-\begin{newsegment}{dljslib: Contrib - Combinatorial Functions}
-function ch(n,r)
-{
- if ((n==r)||(r==0)) return(1);
- if ((n==(r+1))||(r==1)) return(n);
- if (r > (n-r))
- var coeff = factorialCancel(
- expandFactorial(r+1,n),expandFactorial(1,n-r));
- else
- var coeff = factorialCancel(
- expandFactorial(n-r+1,n),expandFactorial(1,r));
- return (eval(coeff));
-}
-function perm(n,r)
-{
- if (r==0) return(1);
- else
- var coeff = factorialCancel(
- expandFactorial(n-r+1,n),expandFactorial(1,n-r));
- return (eval(coeff));
-}
-function expandFactorial(lo,hi)
-{
- var f = lo;
- for (var i=lo+1;i<=hi;i++) f = i+"*"+f;
- return f;
-}
-function factorialCancel(top,bot)
-{
- var num = top.split("*");
- var denom = bot.split("*");
- var len = denom.length;
- var temp = 0;
- var i, j;
- for (i=0;i<=len-1;i++) {
- for (j=0;j<=len-1;j++) {
- temp = num[i]/denom[j];
- if ((temp - Math.round(temp)) == 0) {
- num[i] = temp;
- denom[j] = 1;
- }
- }
- }
- var t = denom.join("");
- var reg = /[^1]/;
- if (reg.test(t)) {
- temp = factorialCancel(denom.join("*"),num.join("*"));
- } else {
- temp = num.join("*");
- }
- return (temp);
-}
-function fact(num)
-{
- var tot = 1;
- for (var r=1; r <= num; r++) tot *= r;
- return(tot);
-}
-\end{newsegment}
-\end{library@holding}
-\begin{library@holding}{ImplMulti}
-\begin{newsegment}{dljslib: Implied Multiplication}
-function Ck4Products(UserInput)
-{
- var re, aR;
- for (var i=0; i<JSf.length; i++)
- {
- re = new RegExp("("+JSf[i]+")(\\\()","g");
- UserInput = UserInput.replace(re, "\\$1@$2");
- re = new RegExp("([\\w\\\)])(\\"+JSf[i]+")(@\\\()","g");
- UserInput = UserInput.replace(re, "$1*$2$3");
- }
- for (var i=0; i<JSc.length; i++)
- {
- re = new RegExp("("+JSc[i]+")","g");
- if ( JSc[i] != "E" ) {
- UserInput = UserInput.replace(re, "\\$1@");
- re = new RegExp("([\\w\\\)])(\\"+JSc[i]+")(@)","g");
- }
- }
- UserInput = UserInput.replace(
- /([\d\)])([A-DF-Za-z\(\\])/g, "$1*$2");
- UserInput = UserInput.replace(/(\))(\d)/g, "$1*$2");
- UserInput = UserInput.replace(/([A-Za-z])([\d\(\\])/g, "$1*$2");
- UserInput = UserInput.replace(/(@)([A-Za-z\d])/g, "$1*$2");
- UserInput = UserInput.replace(/(\\)([A-Za-z]{1,})(@)/g, "$2");
- re = /[A-Za-z]{1,}/g;
- while ( (aR = re.exec(UserInput)) != null)
- {
- for (var i=0; i<JSf.length; i++) if ( aR[0] == JSf[i]) break;
- if ( i < JSf.length ) continue;
- for (var i=0; i<JSc.length; i++) if ( aR[0] == JSc[i]) break;
- if ( i < JSc.length ) continue;
- aR[0] = aR[0].replace(/([A-Za-z])\B/g,"$1*");
- UserInput = UserInput.substring(0,aR.index)
- +aR[0]+UserInput.substring(re.lastIndex);
- }
- return UserInput;
-}
-function Ck4Exponents(UserInput)
-{
- var re, regexp, aP, RightP;
- for (var i=0; (i<JSf.length) && (ok2Continue); i++)
- {
- re = new RegExp(JSf[i]+"\\^");
- while ( re.test(UserInput) && (ok2Continue) )
- {
- regexp = new RegExp(JSf[i]+"\\^\\\(", "g");
- if ( (aP = regexp.exec(UserInput)) != null ) {
- // forward search
- RightP=FindBalP(UserInput,regexp.lastIndex-1,1);
- var offsetExp = RightP-regexp.lastIndex;
- regexp = new RegExp(
- JSf[i]+"\\^\\(.{"+offsetExp+"}\\)\\\(", "g");
- regexp.lastIndex=0;
- if ( (aP = regexp.exec(UserInput)) != null ) {
- // forward search
- RightP=FindBalP(UserInput,regexp.lastIndex-1,1);
- var offsetArg = RightP - regexp.lastIndex;
- regexp = new RegExp("("+JSf[i]
- +")\\^\\((.{"+offsetExp+"})\\)\\((.{"
- +offsetArg+"})\\)");
- regexp.lastIndex=0;
- if (regexp.test(UserInput))
- UserInput=UserInput.replace(
- regexp,"(pow($1($3),$2))");
- else ok2Continue=false;
- continue;
- }
- }
- regexp = new RegExp(JSf[i]
- +"\\^([a-zA-Z]|[+-]?\\d+\\.?\\d*|[+-]?\\d*\\.?\\d+)"
- +"\\\(","g");
- if ( (aP = regexp.exec(UserInput)) != null ) {
- // forward search
- RightP=FindBalP(UserInput,regexp.lastIndex-1,1);
- regexp = new RegExp("("
- +JSf[i]+")\\^([a-zA-Z]|[+-]?\\d+"
- +"\\.?\\d*|[+-]?\\d*\\.?\\d+)\\((.{"
- +eval(RightP-regexp.lastIndex)+"})\\)");
- regexp.lastIndex=0;
- if (regexp.test(UserInput))
- UserInput=UserInput.replace(
- regexp,"(pow($1($3),$2))");
- else ok2Continue=false;
- }
- else ok2Continue=false;
- }
- }
- for (var i=0; (i < JSc.length) && (ok2Continue); i++)
- {
- re = new RegExp(JSc[i]+"\\^", "g");
- while ( re.test(UserInput) && (ok2Continue) )
- {
- re.lastIndex = 0;
- aR = re.exec(UserInput);
- if (UserInput.charAt(re.lastIndex)=='\(') {
- // forward search
- RightP=FindBalP(UserInput,re.lastIndex,1);
- var offsetExp = RightP - re.lastIndex - 1;
- re.lastIndex=0;
- regexp = new RegExp("("+JSc[i]
- +")\\^\\((.{"+offsetExp+"})\\)");
- if ( regexp.test(UserInput) )
- UserInput = UserInput.replace(
- regexp, "(pow($1,$2))");
- else ok2Continue = false;
- }
- else
- {
- re.lastIndex=0;
- regexp = new RegExp("("+JSc[i]
- +")\\^([a-zA-Z]|[+-]?\\d+\\.?\\d*|[+-]?\\d*\\.?\\d+)");
- if (regexp.test(UserInput))
- UserInput = UserInput.replace(
- regexp, "(pow($1,$2))");
- else ok2Continue = false;
- }
- }
- }
- return UserInput;
-}
-\end{newsegment}
-\end{library@holding}
-\begin{library@holding}{dljslib}
-\end{insDLJS*}
-\end{library@holding}
-\immediate\closeout\dljslib@verbatim@out
-\advance\count17 by -1
-\input{dljslib.ljs}
-\endinput
-%%
-%% End of file `dljslib.sty'.
+%%
+%% This is file `dljslib.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% dljslib.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% dljsLib.sty package, %%
+%% Copyright (C) 2001-2018 D. P. Story %%
+%% dpstory@uakron.edu %%
+%% %%
+%% This program can redistributed and/or modified under %%
+%% the terms of the LaTeX Projet 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{dljslib}
+ [2017/08/11 v2.1 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}
+\newcommand\DeclareAndRegister[1]
+ {\DeclareOption{#1}{\dljsRegister[y]{#1}}\dljsRegister{#1}}
+\dljsRegister[y]{dljslib}
+\DeclareAndRegister{equations}
+\DeclareAndRegister{vectors}
+\DeclareAndRegister{indefIntegral}
+\DeclareAndRegister{ImplMulti}
+\DeclareAndRegister{nodec}
+\DeclareAndRegister{noBinFac}
+\DeclareAndRegister{limitArith}
+\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}}
+\DeclareAndRegister{complex}
+\DeclareAndRegister{satisfyEq}
+\DeclareAndRegister{useGermanNums}
+\DeclareAndRegister{factors}
+\DeclareAndRegister{point}
+\DeclareAndRegister{intervals}
+\def\includeOptions#1{\@for\@option:=#1\do{\dljsRegister[y]{\@option}}}
+\InputIfFileExists{libcusopt.opt}{}{}
+\ProcessOptions
+\RequirePackage{exerquiz}[2017/08/04]
+\RequirePackage{insdljs}
+\def\setdecimalpoint#1{\def\aebdecimalpoint{\eqbs#1}}
+\setdecimalpoint{.}
+\newwrite\dljslib@verbatim@out
+\immediate\openout\dljslib@verbatim@out=dljslib.ljs
+\newenvironment{library@holding}[1]
+{%
+ \expandafter\ifx\csname checkout@#1\endcsname y%
+ \let\js@verbatim@out\dljslib@verbatim@out
+ \let\dljs@verbatim\js@verbatimwrite
+ \let\enddljs@verbatim\endjs@verbatimwrite\else
+ \let\dljs@verbatim\comment
+ \let\enddljs@verbatim\endcomment\fi\dljs@verbatim
+}{\enddljs@verbatim}
+\begin{library@holding}{dljslib}
+\begin{insDLJS*}[dljslib]{dljslib}
+\begin{newsegment}{dljslib: AcroTeX DLJS Library}
+/*
+ The Document Level JavaScript Library
+ D. P. Story copyright 2001-\the\year
+*/
+var dljslib = true;
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{equations}
+\newcommand\equationsAlertMsg{"An equation is expected"}
+\fi
+\begin{library@holding}{equations}
+\begin{newsegment}{dljslib: Equation Handling}
+function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+{
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var success;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ var CorrExpressions = CorrAns.split("=");
+ var zCorrAns = "("+CorrExpressions[0]+")-("+CorrExpressions[1] +")";
+ UserAns = stripWhiteSpace (UserAns);
+ if(!ok2Continue ) return null;
+ if (!/[=]/.test(UserAns)) {
+ eqAppAlert(\equationsAlertMsg, 3);
+ return null;
+ }
+ var reComma=/,/;
+ if ( reComma.test(UserAns) ) {
+ eqAppAlert(\eqSyntaxErrorComma,3);
+ return null;
+ }
+ var UserExpressions = UserAns.split("=");
+ var zUserAns = "("+UserExpressions[0]+")-("+UserExpressions[1] +")";
+
+ var comp = ( typeof oComp == "object" ) ?
+ (typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp : oComp;
+ if ( typeof oComp == "object"
+ && typeof oComp.priorParse != "undefined" ) {
+ if ( typeof oComp.priorParse == "object" ) {
+ for ( var i=0; i < oComp.priorParse.length; i++) {
+ var retn = oComp.priorParse[i](zUserAns);
+ if ( retn == null ) return null;
+ }
+ } else {
+ var retn = oComp.priorParse(zUserAns);
+ if ( retn == null ) return null;
+ }
+ }
+ zCorrAns = ParseInput(zCorrAns);
+ if (!ok2Continue) {
+ eqAppAlert("Syntax error in author's answer! Check console.", 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);
+ if ( lambda == null ) {
+ eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; };
+ if ( !ok2Continue ) return notifyField(false, flag, fieldname);
+ zCorrAns = lambda + "*(" + zCorrAns + ")";
+ success=randomPointCompare (n,domain,indepVars,epsilon,
+ zCorrAns,zUserAns,comp)
+ if ( success == null ) { eqAppAlert(\eqSyntaxErrorUndefVar,3);
+ return null; }
+ return notifyField(success, flag, fieldname);
+}
+function getNonZeroRatio (_a, _v, _F, _G)
+{
+ var _i, _j;
+ var aXY = new Array();
+ _a = _a.replace(/[\[\]\s]/g, "");
+ var _V = _v.split(","); // e.g. _V[0] = "i:x"
+ var _n = _V.length;
+ var aIntervals = _a.split("&");
+ var aInterval = aIntervals[0].split("x");
+ var endpoints = aInterval[0].split(",");
+ for (_j=0; _j < 4; _j++) {
+ for (_i = 0; _i < _n; _i++) {
+ var endpoints = aInterval[_i].split(",");
+ aXY[_i] = endpoints[0]-0
+ +(endpoints[1]-endpoints[0])*Math.random();
+\db console.println("aXY["+_i+"] = " + aXY[_i]);\db%
+ }
+ 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]) + ";");
+ }
+ _F = eval(_F);
+ if ( app.viewerVersion >= 5)
+ {
+ var rtnCode = 0;
+ eval("try { if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+ +"catch (e) { rtnCode=1; }");
+ switch(rtnCode) {
+ case 0: break;
+ case 1: return null;
+ case -1: ok2Continue=false;
+ return -1;
+ }
+ }
+ else
+ if(isNaN(_G=eval(_G))) {ok2Continue=false;return -1;}
+ if ( _F != 0 && _G != 0 ) return _G/_F;
+ }
+ console.println( "Can't find a non zero scalar");
+ return null;
+}
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{vectors}
+\newcommand\vectorsErrorMsgi{"I'm looking for a vector.
+ You need to use proper vector notation, try using
+ angle brackets <....>."}
+\newcommand\vectorsErrorMsgii{"Angle brackets are not balanced.
+ Check the expression you typed in."}
+\newcommand\vectorsErrorMsgiii{"Incorrect number of components.
+ The answer requires " + aCorrAns.length+" components."}
+\def\vectorEmptyCompMsgiv(#1){"You entered nothing for the
+ component " +(#1+1) +" of your answer. Please enter
+ a component for the vector."}
+\fi
+\begin{library@holding}{vectors}
+\begin{newsegment}{dljslib: Vector Handling}
+function ProcVec (flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+{
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var i, success, truthCnt=1;
+ var aScalar, scalar = 1;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ UserAns = stripWhiteSpace(UserAns); // sets ok2Continue
+ CorrAns = stripWhiteSpace(CorrAns);
+ if ( !ok2Continue ) return null;
+ var isSpecResp=false;
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (CorrAns == aDlLibSpecResp[i]) {
+ isSpecResp=true; break;
+ }
+ }
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (UserAns == aDlLibSpecResp[i]) {
+ success = (CorrAns == UserAns);
+ return notifyField(success, flag, fieldname);
+ }
+ }
+ if (isSpecResp) return notifyField(false, flag, fieldname);
+ if (!/[<>]/.test(UserAns)) {
+ eqAppAlert(\vectorsErrorMsgi, 3);
+ return null;
+ }
+ if (!CkBalP(UserAns,"<",">")) {
+ eqAppAlert(\vectorsErrorMsgii, 3);
+ return null;
+ }
+ // see if there is a scalar multiple to the left of '<'
+ aScalar = UserAns.match(/(.*)(\*)(\s*<)/);
+ if (aScalar != null) {
+ scalar = aScalar[1];
+ UserAns = UserAns.slice(aScalar.index + aScalar[0].length-1)
+ }
+ var comp = ( typeof oComp == "object" ) ?
+ (typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp : oComp;
+ CorrAns = CorrAns.replace(/[<>]/g, ""); // strip of < and >
+ UserAns = UserAns.replace(/[<>]/g, "");
+ if ( typeof oComp == "object" && %
+typeof oComp.priorParse != "undefined" ) {
+ var retn=processSpecialParse(oComp.priorParse,UserAns);
+ if (retn==null) return null;
+ }
+ aUserAns = UserAns.split(",");
+ aCorrAns = CorrAns.split(",");
+ if (scalar != 1)
+ for (i=0; i<aUserAns.length; i++)
+ aUserAns[i]=""+scalar+"*"+aUserAns[i];
+ if (aCorrAns.length != aUserAns.length) {
+ eqAppAlert(\vectorsErrorMsgiii,3);
+ return null;
+ }
+ // convert to new format, if needed
+ indepVars = TypeParameters(indepVars);
+ for (i=0; i<aCorrAns.length; i++) {
+ aCorrAns[i] = ParseInput(aCorrAns[i]);
+ if (!ok2Continue) {
+ eqAppAlert("Author Syntax error!", 3);
+ return null;
+ }
+ aUserAns[i] = ParseInput(aUserAns[i]);
+ if (aUserAns[i]==null) {
+ eqAppAlert(\vectorEmptyCompMsgiv(i), 3);
+ return null;
+ }
+ if (!ok2Continue) return null;
+ success=randomPointCompare (n,domain,indepVars,epsilon,
+ aCorrAns[i],aUserAns[i],comp)
+ if ( success == null ) {
+ eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; }
+ truthCnt *= (success) ? 1 : 0;
+ }
+ return notifyField(!!truthCnt, flag, fieldname);
+}
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{setSupport}
+\newcommand{\noBracesInAnsMsg}{"Do not insert braces in your answer.
+ Please remove the braces (\{\})."}
+\newcommand{\noBracketsInAnsMsg}{"Do not insert braces in your answer.
+ Please remove the angle brackets (<>)."}
+\fi
+\begin{library@holding}{setSupport}
+\begin{newsegment}{dljslib: Support for Sets}
+function ProcRespSetNum(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ var isSpecResp=false;
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (CorrAns == aDlLibSpecResp[i]) {
+ isSpecResp=true; break;
+ }
+ }
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (UserAns == aDlLibSpecResp[i]) {
+ success = (CorrAns == UserAns);
+ return notifyField(success, flag, fieldname);
+ }
+ }
+ if (isSpecResp) return notifyField(false, flag, fieldname);
+ var retn=ck4Braces(UserAns);
+ if (retn==null) return null;
+ var aUserAns = UserAns.split(",");
+ for ( var i=0; i < aUserAns.length; i++) {
+ try {
+ if (isNaN(eval(aUserAns[i]))) return syntaxError(), null;
+ } catch(e) { return syntaxError(), null; }
+ }
+ var aUserAns = aUserAns.sort(
+ function(a,b) { return eval(a) - eval(b);} );
+ var aCorrAns = CorrAns.split(",").sort(
+ function(a,b) { return eval(a) - eval(b);} );
+ var numCorrect = 0;
+ if ( aUserAns.length != aCorrAns.length )
+ return notifyField(false, flag, fieldname);
+ for ( var i=0; i< aCorrAns.length; i++) {
+ var retn = _ProcResp(%
+flag,aCorrAns[i],aUserAns[i],n,epsilon,domain,indepVars,oComp);
+ if ( retn == -1 ) return null;
+ if ( retn == null ) return syntaxError(), null;
+ numCorrect += (retn) ? 1 : 0;
+ }
+ var success = (numCorrect == aCorrAns.length);
+ return notifyField(success, flag, fieldname);
+}
+var ok2format=true;
+function formatAsSet() {
+ if (ok2format&&event.value.replace(/\\s/g,"") != "")
+ event.value = "{ " + event.value + " }";
+}
+function ck4Braces (UserAns) {
+ ok2format=true;
+ if (/^\{/.test(UserAns) || /\}$/.test(UserAns) ) {
+ ok2format=false;
+ return eqAppAlert(\noBracesInAnsMsg,3), null;
+ }
+ else return true;
+}
+function ck4AngleBrackets (UserAns) {
+ ok2format=true;
+ if (/^</.test(UserAns) || />$/.test(UserAns) ) {
+ ok2format=false;
+ return eqAppAlert(\noBracketsInAnsMsg,3), null;
+ }
+ else return true;
+}
+function formatAsVector() {
+ if (ok2format&&event.value.replace(/\\s/g,"") != "") {
+ event.value = "< " + event.value + " >";
+ }
+}
+function ProcRespSetSym(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ var isSpecResp=false;
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (CorrAns == aDlLibSpecResp[i]) {
+ isSpecResp=true; break;
+ }
+ }
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (UserAns == aDlLibSpecResp[i]) {
+ success = (CorrAns == UserAns);
+ return notifyField(success, flag, fieldname);
+ }
+ }
+ if (isSpecResp) return notifyField(false, flag, fieldname);
+ var retn=ck4Braces(UserAns);
+ if (retn==null) return null;
+ var aUserAns = UserAns.split(",");
+ var _V = indepVars.split(",");
+ for ( var _i=0; _i < _V.length; _i++) {
+ eval ( "var "+ _V[_i] + " = \"" + _i + "\";");
+ }
+ for ( var _i=0; _i < aUserAns.length; _i++) {
+ try {
+ if (isNaN(eval(aUserAns[_i]))) return syntaxError(), null;
+ aUserAns[_i] = eval(aUserAns[_i]);
+ } catch(e) { return syntaxError(), null; }
+ }
+ var aCorrAns = CorrAns.split(",");
+ for ( var _i=0; _i < aCorrAns.length; _i++) {
+ try {
+ if (isNaN(eval(aCorrAns[_i])))
+ return eqAppAlert(%
+"Author error, recheck your code",3), null;
+ aCorrAns[_i] = eval(aCorrAns[_i]);
+ } catch(e) { return eqAppAlert(
+ "Author error, recheck your code",3), null; }
+ }
+ var aUserAns = aUserAns.sort(
+ function(a,b) { return eval(a) - eval(b);} );
+ var aCorrAns = aCorrAns.sort(
+ function(a,b) { return eval(a) - eval(b);} );
+ var numCorrect = 0;
+ if ( aUserAns.length != aCorrAns.length )
+ return notifyField(false, flag, fieldname);
+ for ( var _i=0; _i< aCorrAns.length; _i++) {
+ var retn = _ProcResp(%
+flag,aCorrAns[_i],aUserAns[_i],n,epsilon,"[0,1]","i:_x",oComp);
+ if ( retn == -1 ) return null;
+ if ( retn == null ) return syntaxError(), null;
+ numCorrect += (retn) ? 1 : 0;
+ }
+ var success = (numCorrect == aCorrAns.length);
+ return notifyField(success, flag, fieldname);
+}
+function ProcRespListFormula(flag,CorrAns,n,epsilon,domain,%
+indepVars,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ var isSpecResp=false;
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (CorrAns == aDlLibSpecResp[i]) {
+ isSpecResp=true; break;
+ }
+ }
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (UserAns == aDlLibSpecResp[i]) {
+ success = (CorrAns == UserAns);
+ return notifyField(success, flag, fieldname);
+ }
+ }
+ if (isSpecResp) return notifyField(false, flag, fieldname);
+ var retn=ck4AngleBrackets(UserAns);
+ if (retn==null) return null;
+ UserAns = UserAns.replace(/,+/g, ",");
+ UserAns = UserAns.replace(/,$/, "");
+ UserAns = UserAns.replace(/^,/, "");
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ var aUserAns = UserAns.split(",");
+ var aCorrAns = CorrAns.split(",");
+ var numCorrect = 0;
+ if ( aUserAns.length != aCorrAns.length )
+ return notifyField(false, flag, fieldname);
+ for ( var i=0; i< aCorrAns.length; i++) {
+ var retn =_ProcResp(flag,aCorrAns[i],aUserAns[i],%
+n,epsilon,domain,indepVars,oComp);
+ if ( retn == -1 ) return null;
+ if ( retn == null ) return syntaxError(), null;
+ numCorrect += (retn) ? 1 : 0;
+ }
+ var success = (numCorrect == aCorrAns.length);
+ return notifyField(success, flag, fieldname);
+}
+function ProcRespSetFormula(flag,CorrAns,n,epsilon,%
+domain,indepVars,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ var isSpecResp=false;
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (CorrAns == aDlLibSpecResp[i]) {
+ isSpecResp=true; break;
+ }
+ }
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (UserAns == aDlLibSpecResp[i]) {
+ success = (CorrAns == UserAns);
+ return notifyField(success, flag, fieldname);
+ }
+ }
+ if (isSpecResp) return notifyField(false, flag, fieldname);
+ var retn=ck4Braces(UserAns);
+ if (retn==null) return null;
+ UserAns = UserAns.replace(/,+/g, ",");
+ UserAns = UserAns.replace(/,$/, "");
+ UserAns = UserAns.replace(/^,/, "");
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ var aUserAns = UserAns.split(",");
+ var aCorrAns = CorrAns.split(",");
+ var numCorrect = 0, match = 0;
+ if ( aUserAns.length != aCorrAns.length )
+ return notifyField(false, flag, fieldname);
+ for ( var i=0; i<aCorrAns.length; i++) {
+ match = 0;
+ for ( var j=i; j< aUserAns.length; j++) {
+ var retn = _ProcResp(%
+flag,aCorrAns[i],aUserAns[j],n,epsilon,domain,indepVars,oComp);
+ if ( retn == -1 ) return null;
+ if ( retn == null ) return syntaxError(), null;
+ if (retn==1) {
+ var temp=aUserAns[j];
+ aUserAns[j]=aUserAns[i];
+ aUserAns[i]=temp;
+ match = match + 1;
+ }
+ }
+ numCorrect += (match) ? 1 : 0;
+ }
+ var success = (numCorrect == aCorrAns.length);
+ return notifyField(success, flag, fieldname);}
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{complex}
+\newcommand{\complexPowerAlertMsg}{%
+ "Powers of i (for example, i^2, i^3) are not supported,
+ replace powers of i with their complex equivalents."}
+\newcommand{\complexCisAlertMsg}{%
+ "The cis function does not support exponents. Write,
+ for example, cis^3(x) as cis(3*x), instead."}
+\newcommand{\alertNotComplexMsg}{%
+ "The expression is not in the form of a complex
+ number, a+bi"}
+\def\emptyCompComplexMsg(#1){%
+ "You entered nothing for the component "
+ +(#1+1)+" of your answer. Please enter a complex number."}
+\fi
+\begin{library@holding}{complex}
+\begin{newsegment}{dljslib: Support for Complex Numbers}
+function cis(x,i) { return Math.cos(x) + i*Math.sin(x); }
+JSfCustom.push("cis");
+JSf = JSf.concat(JSfBuiltIn, JSfCustom);
+function ProcRespComplex(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+{
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var i, success;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ CorrAns = stripWhiteSpace (CorrAns);
+ UserAns = stripWhiteSpace (UserAns); // sets ok2Continue
+ if ( !ok2Continue ) return null;
+ indepVars+="i";
+ domain+="x[0,1]";
+ if (/(\b|[^a-zA-Z])i\^/.test(UserAns)) {
+ eqAppAlert(\complexPowerAlertMsg,3);
+ return null;
+ }
+ if ( /cis\^/.test(UserAns) ) {
+ eqAppAlert(\complexCisAlertMsg,3);
+ return null;
+ }
+ var reComma=/,/;
+ if ( reComma.test(UserAns) ) {
+ eqAppAlert(\eqSyntaxErrorComma,3);
+ return null;
+ }
+ UserAns=changeArgs4Cis(UserAns);
+ CorrAns=changeArgs4Cis(CorrAns);
+ var aMatch = UserAns.match(/(\b|[^a-zA-Z])i/g);
+ if ( aMatch != null && aMatch.length > 1) {
+ eqAppAlert(\alertNotComplexMsg, 3);
+ return null;
+ }
+ var comp = ( typeof oComp == "object" ) ?
+ (typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp : oComp;
+ if ( typeof oComp == "object" &&
+ typeof oComp.priorParse != "undefined" ) {
+ if ( typeof oComp.priorParse == "object" ) {
+ for ( var i=0; i < oComp.priorParse.length; i++) {
+ var retn = oComp.priorParse[i](UserAns);
+ if ( retn == null ) return null;
+ }
+ } else {
+ var retn = oComp.priorParse(UserAns);
+ if ( retn == null ) return null;
+ }
+ }
+ UserAns = ParseInput(UserAns);
+ CorrAns = ParseInput(CorrAns);
+ indepVars = TypeParameters(indepVars);
+ if (!ok2Continue) return null;
+ success=randomPointCompare(
+ n,domain,indepVars,epsilon,CorrAns,UserAns,comp);
+ if ( success == null ) { eqAppAlert(%
+\eqSyntaxErrorUndefVar,3); return null; }
+ return notifyField(success, flag, fieldname);
+}
+function ProcRespListComplex(flag,CorrAns,n,epsilon,%
+domain,indepVars,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ CorrAns = stripWhiteSpace(CorrAns); // sets ok2Continue
+ if ( !ok2Continue ) return null;
+ var isSpecResp=false;
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (CorrAns == aDlLibSpecResp[i]) {
+ isSpecResp=true; break;
+ }
+ }
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (UserAns == aDlLibSpecResp[i]) {
+ success = (CorrAns == UserAns);
+ return notifyField(success, flag, fieldname);
+ }
+ }
+ if (isSpecResp) return notifyField(false, flag, fieldname);
+ UserAns = UserAns.replace(/,+/g, ",");
+ UserAns = UserAns.replace(/,$/, "");
+ UserAns = UserAns.replace(/^,/, "");
+ var aUserAns = UserAns.split(",");
+ var aCorrAns = CorrAns.split(",");
+ if ( aUserAns.length != aCorrAns.length )
+ return notifyField(false, flag, fieldname);
+ var numCorrect = 0;
+ var match = 0;
+ for ( var i=0; i< aCorrAns.length; i++) {
+ match = 0;
+ var retn = ProcRespComplex(%
+flag,aCorrAns[i],n,epsilon,domain,indepVars,oComp,aUserAns[i]);
+ if ( retn == null ) return null;
+ numCorrect += (retn) ? 1 : 0;
+ }
+ var success = (numCorrect == aCorrAns.length);
+ return notifyField(success, flag, fieldname);
+}
+function ProcRespSetComplex(flag,CorrAns,n,epsilon,%
+domain,indepVars,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ CorrAns = stripWhiteSpace(CorrAns); // sets ok2Continue
+ if ( !ok2Continue ) return null;
+ var isSpecResp=false;
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (CorrAns == aDlLibSpecResp[i]) {
+ isSpecResp=true; break;
+ }
+ }
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (UserAns == aDlLibSpecResp[i]) {
+ success = (CorrAns == UserAns);
+ return notifyField(success, flag, fieldname);
+ }
+ }
+ if (isSpecResp) return notifyField(false, flag, fieldname);
+ UserAns = UserAns.replace(/,+/g, ",");
+ UserAns = UserAns.replace(/,$/, "");
+ UserAns = UserAns.replace(/^,/, "");
+ event.value = UserAns;
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ var aUserAns = UserAns.split(",");
+ var aCorrAns = CorrAns.split(",");
+ if ( aUserAns.length != aCorrAns.length )
+ return notifyField(false, flag, fieldname);
+ var numCorrect = 0;
+ var match = 0;
+ for ( var i=0; i< aCorrAns.length; i++) {
+ match = 0;
+ for ( var j=i; j< aUserAns.length; j++) {
+ var retn = ProcRespComplex(%
+flag,aCorrAns[i],n,epsilon,domain,indepVars,oComp,aUserAns[j]);
+ if ( retn == null ) return null;
+ if (retn==1) {
+ var temp=aUserAns[j];
+ aUserAns[j]=aUserAns[i];
+ aUserAns[i]=temp;
+ match = match + 1;
+ }
+ }
+ numCorrect += (match) ? 1 : 0;
+ }
+ var success = (numCorrect == aCorrAns.length);
+ return notifyField(success, flag, fieldname);
+}
+function changeArgs4Cis(str) {
+ var re =/cis\(/g;
+ while ( (aP=re.exec(str) ) != null ) {
+ var LeftP=re.lastIndex;
+ var RightP=FindBalP(str,re.lastIndex,1);
+ str = str.substring(0,RightP)
+ +",i"+str.substring(RightP);
+ }
+ return str;
+}
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{satisfyEq}
+\newcommand{\notifyWrongNumEntries}{\def\satisfyEqNotify{true}}
+\def\satisfyEqNotify{false}
+\newcommand{\wrongNumEntriesMsg}{"You don't have the correct number
+ of entries in your coordinate points. Expecting "+_n
+ +" entries per point." }
+\newcommand{\eqSyntaxErrorNoParens}{"Syntax Error: Enter the point
+ using parentheses, for example (1,2) or (1,2,3), as applicable."}
+\newcommand{\eqNonzeroEntries}{"Syntax Error: All entries are required
+ to be nonzero, try again."}
+\newcommand{\eqTooManyEntries}{"You've entered more points than
+ requested, enter only "+l+" points."}
+\newcommand{\eqTooFewEntries}{"You've entered fewer points than
+ requested, enter only "+l+" points."}
+\newcommand{\eqDuplEntries}{"One or more points are the same,
+ provide "+l+" distinct points."}
+\fi
+\begin{library@holding}{satisfyEq}
+\begin{newsegment}
+ {dljslib: Support for n-tuple input to Satisfy an Equation}
+var bNotifyWrngNumEntries=\satisfyEqNotify;
+function ProcRespEvalEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp){
+ var UserAns=(arguments.length>7)?arguments[7]:event.value;
+ var retn=_ProcRespEvalEq(true,flag,CorrAns,n,epsilon,%
+indepVars,UserAns);
+ return retn;
+}
+function ProcRespEvalEqNonZero(flag,CorrAns,n,epsilon,%
+domain,indepVars,oComp) {
+ var UserAns=(arguments.length>7)?arguments[7]:event.value;
+ var retn=_ProcRespEvalEq(false,flag,CorrAns,n,epsilon,
+indepVars,UserAns);
+ return retn;
+}
+function _ProcRespEvalEq(allowzero,flag,CorrAns,n,epsilon,indepVars)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>6); // dps17
+ var UserAns=(bSubstVars)?arguments[6]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ if (!ok2Continue) return null;
+ if ( (UserAns.charAt(0) != "\(") || %
+(UserAns.charAt(UserAns.length-1) != "\)"))
+ return eqAppAlert(\eqSyntaxErrorNoParens,3), null;
+ UserAns=UserAns.substring(1,UserAns.length-1);
+ var aUserAns = UserAns.split(",");
+ for ( var i=0; i < aUserAns.length; i++) {
+ try {
+ if (isNaN(eval(aUserAns[i]))) return syntaxError(), null;
+ if (!allowzero && (eval(aUserAns[i])==0))
+ return eqAppAlert(\eqNonzeroEntries,3), null;
+ } catch(e) { return syntaxError(), null; }
+ }
+ var _v = TypeParameters(indepVars);
+ var _V = _v.split(","); // e.g. _V[0] = "i:x"
+ var _n = _V.length;
+ if ( aUserAns.length != _n) {
+ if (bNotifyWrngNumEntries)
+ return eqAppAlert(\wrongNumEntriesMsg,3), null;
+ else
+ return notifyField(false, flag, fieldname);
+ }
+ for (var _i=0; _i < _n; _i++) {
+ if (_V[_i].charAt(0) == "r" )
+ eval("var "+_V[_i].charAt(2)+"="+aUserAns[_i]+";");
+ else // assume type "i"
+ eval("var "+_V[_i].charAt(2)+"="+Math.ceil(aUserAns[_i])+";");
+ }
+ var UserInput=ParseInput(CorrAns);
+ var UserAns=eval(UserInput);
+ success=(Math.abs(UserAns) < epsilon)?true:false;
+ return notifyField(success, flag, fieldname);
+}
+function ProcRespEvalEqList(flag,CorrAns,n,epsilon,domain,%
+indepVars,oComp) {
+ var UserAns=(arguments.length>7)?arguments[7]:event.value;
+ var retn=_ProcRespEvalEqList(true,flag,CorrAns,n,epsilon,%
+indepVars,UserAns);
+ return retn;
+}
+function ProcRespEvalEqListNonZero(flag,CorrAns,n,epsilon,domain,%
+indepVars,oComp){
+ var UserAns=(arguments.length>7)?arguments[7]:event.value;
+ var retn=_ProcRespEvalEqList(false,flag,CorrAns,n,epsilon,%
+indepVars,UserAns);
+ return retn;
+}
+function _ProcRespEvalEqList(allowzero,flag,CorrAns,n,epsilon,indepVars)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>6); // dps17
+ var UserAns=(bSubstVars)?arguments[6]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ if (!ok2Continue) return null;
+ var success;
+ UserAns=UserAns.replace(/;+$/,"");
+ UserAns=UserAns.replace(/;+/g,";");
+ var aUsersArray = new Array();
+ var aUserAns = UserAns.split(";");
+ var aCorrAns = CorrAns.split(";");
+ var l = aCorrAns[0];
+ if (l < aUserAns.length )
+ return eqAppAlert(\eqTooManyEntries,3), null;
+ if (l > aUserAns.length )
+ return eqAppAlert(\eqTooFewEntries,3), null;
+ var _v = TypeParameters(indepVars);
+ var _V = _v.split(","); // e.g. _V[0] = "i:x"
+ var _n = _V.length;
+ var testFunc="";
+ for (var _i=0; _i < _n; _i++)
+ testFunc += ("+"+(Math.random()*9)+"*"+_V[_i].charAt(2));
+ var isCorrect=1;
+ for (var pair=0; pair< l; pair++) {
+ if ( (aUserAns[pair].charAt(0) != "\(") || %
+(aUserAns[pair].charAt(aUserAns[pair].length-1) != "\)"))
+ return eqAppAlert(\eqSyntaxErrorNoParens,3), null;
+ UserAnsPair=aUserAns[pair].substring(1,aUserAns[pair].length-1);
+ var aUserAnsPair = UserAnsPair.split(",");
+ for ( var i=0; i < aUserAnsPair.length; i++) {
+ try { if (isNaN(eval(aUserAnsPair[i]))) %
+return syntaxError(), null;
+ if (!allowzero && (eval(aUserAnsPair[i])==0))
+ return eqAppAlert(\eqNonzeroEntries,3), null;
+ } catch(e) { return syntaxError(), null; }
+ }
+ if ( aUserAnsPair.length != _n) {
+ if (bNotifyWrngNumEntries)
+ return eqAppAlert(\wrongNumEntriesMsg,3), null;
+ else
+ return notifyField(false, flag, fieldname);
+ }
+ for (var _i=0; _i < _n; _i++) {
+ if (_V[_i].charAt(0) == "r" )
+ eval ("var "+_V[_i].charAt(2)+"="+aUserAnsPair[_i]+";");
+ else // assume type "i"
+ eval ("var "+_V[_i].charAt(2)+"="%
++Math.ceil(aUserAnsPair[_i])+";");
+ }
+ var UserInput=ParseInput(aCorrAns[1]);
+ var UserAns=eval(UserInput);
+ aUsersArray[pair]=eval(testFunc);
+ success=(Math.abs(UserAns) < epsilon)?true:false;
+isCorrect *=Number(success);
+ }
+ success=(isCorrect==1);
+ var aOrderArray = aUsersArray.sort(function(a,b){return a-b});
+ var m = aUsersArray.length - 1;
+ for (i=0; i<m; i++)
+ if (Math.abs(aUsersArray[i]-aUsersArray[i+1])<.0001)
+ return eqAppAlert(\eqDuplEntries,3), null;
+ return notifyField(success, flag, fieldname);
+}
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{useGermanNums}
+\newcommand{\noDecPtGerMsg}{"A period (.) is not allowed in answer,
+ use German notation for numbers"}
+\fi
+\begin{library@holding}{useGermanNums}
+\begin{newsegment}
+ {dljslib: Support for process numbers in the German format}
+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 UserAns=(bSubstVars)?arguments[7]:event.value;
+ var success = _ProcRespNumsDe(flag,CorrAns,UserAns,n,%
+epsilon,domain,indepVars,oComp);
+ if ( success == -1 || !ok2Continue ) return null;
+ if ( success == null ) { return syntaxError(), null; }
+ return notifyField(success, flag, fieldname);
+}
+function _ProcRespNumsDe(flag,CorrAns,UserAns,n,epsilon,%
+domain,indepVars,oComp) {
+ ok2Continue = true;
+ CorrAns = ParseInput(CorrAns);
+ if (!ok2Continue) {
+ eqAppAlert("Syntax error in author's answer! Check console.", 3);
+ return null;
+ }
+ var UserAnsSave=UserAns;
+ var reDe=/,/g;
+ var reDec=/\./g;
+ if ( reDec.test(UserAns) ) {
+ eqAppAlert(\noDecPtGerMsg,3);
+ return -1;
+ }
+ UserAns=UserAns.replace(reDe,".");
+ var comp = ( typeof oComp == "object" ) ?
+ (typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp : 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;
+ }
+ UserAns = ParseInput(UserAns);
+ indepVars = TypeParameters(indepVars);
+ if (!ok2Continue) return null;
+ var success=randomPointCompare(n,domain,indepVars,%
+epsilon,CorrAns,UserAns,comp);
+ if ( success && (typeof(oComp)=="object") %
+&& (typeof(oComp.postParse)!="undefined") )
+ success=processSpecialParse(oComp.postParse,UserAns);
+ return success;
+}
+\end{newsegment}
+\end{library@holding}
+\begin{library@holding}{unordered}
+\begin{newsegment}{dljslib: Contrib - Processing Unordered Responses}
+/*
+** The ProcRespSetFormula function is now listed under the
+** setSupport option, titled 'dljslib: Support for Sets'
+*/
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{factors}
+\newcommand{\facNoPropForm}{"Factorization is not in the proper form,
+ try placing the constant, if any, at the beginning of the
+ factorization"}
+\newcommand{\noNotEncloseMonos}{"Do not enclose constants or
+ monomials in parentheses"}
+\fi
+\begin{library@holding}{factors}
+\begin{newsegment}{dljslib: Contrib - Processing Factors as Responses}
+function ProcRespFactors(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ if (!ok2Continue) return null;
+ var retn = _ProcResp(flag,CorrAns,UserAns,n,epsilon,%
+domain,indepVars,oComp);
+ if ( retn == -1 ) return null;
+ if ( retn == null ) return syntaxError(), null;
+ if ( retn == 0 ) {
+ var initialsuccess = false;
+ return notifyField(initialsuccess, flag, fieldname);
+ }
+ var aUserAns=new Array();
+ var aCorrAns=new Array();
+ var aNegCorrAns=new Array();
+ aUserAns=getFactorArray(UserAns);
+ if (aUserAns==null) {
+ eqAppAlert(\facNoPropForm, 3);
+ return null;
+ }
+ if (aUserAns==-1) return null;
+ aCorrAns=getFactorArray(CorrAns);
+ if ( aCorrAns==null) {
+ app.beep(); console.show();
+ console.println("Author error in factorization, its not in %
+the proper form");
+ return null;
+ }
+ for ( var i=0; i< aCorrAns.length; i++) {
+ aNegCorrAns[i] = "-" + "(" + aCorrAns[i] + ")"}
+ var numCorrect = 0, match=0,signflag=0;
+ if ( aUserAns.length != aCorrAns.length )
+ return notifyField(false, flag, fieldname);
+ for ( var i=0; i< aCorrAns.length; i++) {
+ match = 0;
+ for ( var j=i; j< aUserAns.length; j++) {
+ var retn = _ProcResp(flag,aCorrAns[i],aUserAns[j],%
+n,epsilon,domain,indepVars,oComp);
+ if ( retn == -1 ) return null;
+ if ( retn == null ) return syntaxError(), null;
+ if (retn==1) {
+ var temp=aUserAns[j];
+ aUserAns[j]=aUserAns[i];
+ aUserAns[i]=temp;
+ match = match + 1;
+ }
+ else {
+ var retn = _ProcResp(flag,aNegCorrAns[i],aUserAns[j],%
+n,epsilon,domain,indepVars,oComp);
+ if ( retn == -1 ) return null;
+ if ( retn == null ) return syntaxError(), null;
+ if (retn==1) {
+ var temp=aUserAns[j];
+ aUserAns[j]=aUserAns[i];
+ aUserAns[i]=temp;
+ match = match + 1;
+ signflag = signflag + 1;
+ }
+ }
+ }
+ numCorrect += (match) ? 1 : 0;
+ }
+ var success = ((numCorrect==aCorrAns.length)&&(signflag\%2==0));
+ if ( success == null ) return syntaxError(), null;
+ return notifyField(success, flag, fieldname);
+}
+function getFactorArray(str) {
+ var aFactors=new Array();
+ var i,j,front,factor,back,bInitGrped=true;
+ if (str.charAt(0) != "\(" ) {
+ bInitGrped=false;
+ i=str.indexOf("\(");
+ if ( i != -1 ) {
+ aFactors.push(str.substring(0,i));
+ str=str.substring(i);
+ }
+ }
+ while ( (i=str.indexOf("\(")) != -1 ) {
+ j=FindBalP(str,i,true);
+ front=str.substring(0,i);
+ factor=str.substring(i,j+1);
+ back = str.substring(j+1);
+ if ( back.charAt(0) == "\^" ) {
+ getExp=back.match(/\^\d+/);
+ theExp=back.substring(0,getExp[0].length);
+ factor+=(theExp);
+ aFactors.push(factor);
+ back=back.substring(getExp[0].length);
+ } else {
+ aFactors.push(factor);
+ }
+ str=front + back;
+ if ( factor.charAt(1)=="-" || factor.charAt(1)=="+" )
+ factor=factor.substring(2);
+ if (!/[+-]/.test(factor)) {
+ eqAppAlert(\noNotEncloseMonos, 3);
+ return -1;
+ }
+ }
+ if (/[A-Za-z]/.test(str)) {
+ var aExp = str.match(/[A-Za-z](\^\d+)*/);
+ factor=aExp[0];
+ i=aExp.index;
+ front=str.substring(0,i);
+ back=str.substring(i+factor.length);
+ str=front+back;
+ if (!bInitGrped) {
+ if (aFactors[0]=="-" || aFactors[0]=="+")
+ aFactors[0]=aFactors[0]+factor;
+ else
+ aFactors[0]="\("+aFactors[0]+"\)"+"\("+factor+"\)";
+ } else {
+ aFactors.push(str);
+ str="";
+ }
+ }
+ if (aFactors[0]=="-"||aFactors[0]=="+"||isFinite(aFactors[0])){
+ factor=aFactors.shift();
+ aFactors[0]=factor+aFactors[0];
+ }
+ return (str!="") ? null : aFactors
+}
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{point}
+\newcommand{\pointErrorMsgi}{%
+ "I'm looking for a point. You need to use proper point notation."}
+\newcommand{\pointErrorMsgii}{"Parentheses are not balanced."}
+\newcommand{\pointErrorMsgiii}{"Incorrect number of components.
+ The answer requires "+ aCorrAns.length+" components."}
+\def\pointEmptyCompMsgiv(#1){
+ "You entered nothing for the component " +(#1+1)
+ +" of your answer. Please enter a component for the point."}
+\fi
+\begin{library@holding}{point}
+\begin{newsegment}{dljslib: Contrib - Processing a Point Response}
+function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+{
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var i, success, truthCnt=1;
+ var aScalar, scalar = 1;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ UserAns = stripWhiteSpace (UserAns); // sets ok2Continue
+ CorrAns = stripWhiteSpace(CorrAns);
+ if ( !ok2Continue ) return null;
+ var isSpecResp=false;
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (CorrAns == aDlLibSpecResp[i]) {
+ isSpecResp=true; break;
+ }
+ }
+ for ( var i=0; i<aDlLibSpecResp.length; i++) {
+ if (UserAns == aDlLibSpecResp[i]) {
+ success = (CorrAns == UserAns);
+ return notifyField(success, flag, fieldname);
+ }
+ }
+ if (isSpecResp) return notifyField(false, flag, fieldname);
+ if (!/[()]/.test(UserAns)) {
+ return eqAppAlert(\pointErrorMsgi, 3), null;
+ }
+ if (!CkBalP(UserAns,"(",")")) {
+ return eqAppAlert(\pointErrorMsgii, 3), null;
+ }
+ var comp = ( typeof oComp == "object" ) ?
+ (typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp : oComp;
+ CorrAns = CorrAns.replace(/[()]/g, ""); // strip off ( and )
+ UserAns = UserAns.replace(/[()]/g, "");
+ if ( typeof oComp == "object" &&
+ typeof oComp.priorParse != "undefined" ) {
+ if ( typeof oComp.priorParse == "object" ) {
+ for ( var i=0; i < oComp.priorParse.length; i++) {
+ var retn = oComp.priorParse[i](UserAns);
+ if ( retn == null ) return null;
+ }
+ } else {
+ var retn = oComp.priorParse(UserAns);
+ if ( retn == null ) return null;
+ }
+ }
+ aUserAns = UserAns.split(",");
+ aCorrAns = CorrAns.split(",");
+ if (scalar != 1)
+ for (i=0; i<aUserAns.length; i++)
+ aUserAns[i]=""+scalar+"*"+aUserAns[i];
+ if (aCorrAns.length != aUserAns.length) {
+ eqAppAlert(\pointErrorMsgiii,3);
+ return null;
+ }
+ indepVars = TypeParameters(indepVars);
+ for (i=0; i<aCorrAns.length; i++) {
+ aCorrAns[i] = ParseInput(aCorrAns[i]);
+ if (!ok2Continue) {
+ eqAppAlert("Author Syntax error!", 3);
+ return null;
+ }
+ aUserAns[i] = ParseInput(aUserAns[i]);
+ if (aUserAns[i]==null) {
+ eqAppAlert(\pointEmptyCompMsgiv(i), 3);
+ return null;
+ }
+ if (!ok2Continue) return null;
+ success=randomPointCompare (
+ n,domain,indepVars,epsilon,aCorrAns[i],aUserAns[i],comp)
+ if ( success == null ) {
+ eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; }
+ truthCnt *= (success) ? 1 : 0;
+ }
+ return notifyField(!!truthCnt, flag, fieldname);
+}
+\end{newsegment}
+\end{library@holding}
+\begin{library@holding}{intervals}
+\begin{newsegment}{dljslib: Contrib - Processing Interval Responses}
+function ProcRespIntervals(flag,CorrAns,n,epsilon,domain,indepVars,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var bSubstVars=(arguments.length>7); // dps17
+ var UserAns=(bSubstVars)?arguments[7]:event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ UserAns = UserAns.replace(/inf/g, "x");
+ CorrAns = CorrAns.replace(/inf/g, "x");
+ indepVars = "x";
+ domain="[0,1]";
+ var aUserAns = UserAns.split("U");
+ var aCorrAns = CorrAns.split("U");
+ var numCorrect = 0;
+ var match = 0;
+ var matchparts = 0;
+ if ( aUserAns.length != aCorrAns.length )
+ return notifyField(false,flag, fieldname);
+ for ( var i=0; i< aCorrAns.length; i++) {
+ match = 0;
+ for ( var j=i; j< aUserAns.length; j++) {
+ CorrInt=aCorrAns[i];
+ UserInt=aUserAns[j];
+ var levaUser = UserInt.charAt(0);
+ var pravaUser = UserInt.charAt(UserInt.length-1);
+ var stredUser = UserInt.substring(1,UserInt.length-1);
+ UserInt = levaUser+","+stredUser+","+pravaUser;
+ var levaCorr = CorrInt.charAt(0);
+ var pravaCorr = CorrInt.charAt(CorrInt.length-1);
+ var stredCorr = CorrInt.substring(1,CorrInt.length-1);
+ CorrInt = levaCorr+","+stredCorr+","+pravaCorr;
+ var aCorrInt = CorrInt.split(",");
+ var aUserInt = UserInt.split(",");
+ if ( aUserInt.length != 4 )
+ return notifyField(false, flag, fieldname);
+ matchparts = 0;
+ if (aCorrInt[0] == aUserInt[0]) matchparts+=1;
+ if (aCorrInt[3] == aUserInt[3]) matchparts+=1;
+ var retn1 = _ProcResp(flag,aCorrInt[1],aUserInt[1],%
+n,epsilon,domain,indepVars,oComp);
+ if (retn1 == -1 ) return null;
+ if (retn1 == null) return syntaxError(), null;
+ if (retn1 == 1) matchparts+=1;
+ var retn2 = _ProcResp(flag,aCorrInt[2],aUserInt[2],%
+n,epsilon,domain,indepVars,oComp);
+ if (retn2 == -1 ) return null;
+ if (retn2 == null) return syntaxError(), null;
+ if (retn2 == 1) matchparts+=1;
+ if (matchparts == 4) {
+ var temp=aUserAns[j];
+ aUserAns[j]=aUserAns[i];
+ aUserAns[i]=temp;
+ match = match + 1;
+ }
+ }
+ numCorrect += (match) ? 1 : 0;
+ }
+ var success = (numCorrect == aCorrAns.length);
+ return notifyField(success, flag, fieldname);
+}
+\end{newsegment}
+\end{library@holding}
+\begin{library@holding}{indefIntegral}
+\begin{newsegment}{dljslib: Indefinite Integral Handling}
+function indefCompare(_a,_c,_v,_F,_G) {
+ var eqC;
+ var aAB = _a.split(",");
+ var aXY = _c.split(",");
+ var _V = _v.split(","); // e.g. _V[0] = "i:x"
+ var _n = aXY.length
+ for (var _i=0; _i< _n; _i++) {
+ if (_V[_i].charAt(0) == "r" )
+ eval ( "var "+ _V[_i].charAt(2)
+ + " = " + aAB[2*_i] + ";");
+ else // assume type "i"
+ eval ( "var "+ _V[_i].charAt(2)
+ + " = " + Math.ceil(aAB[2*_i]) + ";");
+ }
+ var C = 0;
+ if ( app.viewerVersion >= 5)
+ {
+ var rtnCode = 0;
+ eval("try {if (isNaN(eqC = eval(_F)-eval(_G))) rtnCode=-1;}"
+ +" catch (e) { rtnCode=1; }");
+ switch(rtnCode)
+ {
+ case 0: break;
+ case 1: return null;
+ case -1: return -1;
+ }
+ }
+ else
+ if (isNaN(eqC = eval(_F)-eval(_G))) return -1;
+ 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]) + ";");
+ }
+ _F = eval(_F);
+ if ( app.viewerVersion >= 5)
+ {
+ var rtnCode = 0;
+ eval("try { if(isNaN(_G = eval(_G))) rtnCode=-1; }"
+ +" catch (e) { rtnCode=1; }");
+ switch(rtnCode)
+ {
+ case 0: break;
+ case 1: return null;
+ case -1: return -1;
+ }
+ }
+ else
+ if(isNaN(_G = eval(_G))) return -1;
+ return Math.abs( _F - _G - eqC );
+}
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{nodec}
+\newcommand\nodecAlertMsg{%
+ "A decimal answer is not acceptable here.
+ Please express your answer using fractions, square roots,
+ e, log, etc."}
+\fi
+\begin{library@holding}{nodec}
+\begin{newsegment}{dljslib: Contrib - No Decimals}
+function nodec(UserAns)
+{
+ var dot = /[\.\aebdecimalpoint]/;
+ if (dot.test(UserAns)) {
+ eqAppAlert(\nodecAlertMsg,3);
+ return null;
+ } else return true;
+}
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{noBinFac}
+\newcommand\noBinFactBinCoeffAlertMsg{%
+ "You may not use this notation here.
+ Please evaluate the binomial coefficient.
+ You may present your answer as a product rather
+ than calculating a very large number."}
+\newcommand\noBinFactPermAlertMsg{%
+ "You may not use this notation here.
+ Please evaluate the permutation.
+ You may present your answer as a product rather
+ than calculating a very large number."}
+\newcommand\noBinFactFactAlertMsg{%
+ "You may not use this notation here.
+ Please evaluate the factorial.
+ You may present your answer as a product rather
+ than calculating a very large number."}
+\fi
+\begin{library@holding}{noBinFac}
+\begin{newsegment}{dljslib: Contrib - No Binomial Coefficients Allowed}
+aReFact = new Array(
+ /(?=\()?(\d+)(?=\))?!/,
+ /(?=\[)?(\d+)(?=\])?!/,
+ /(?=\{)?(\d+)(?=\})?!/
+);
+function noBinFac(UserAns)
+{
+ var bad = /(C\()/;
+ if (bad.test(UserAns)) {
+ eqAppAlert(\noBinFactBinCoeffAlertMsg,3);
+ return null;
+ }
+ bad = /(P\()/;
+ if (bad.test(UserAns)) {
+ eqAppAlert(\noBinFactPermAlertMsg,3);
+ return null;
+ }
+ for ( var i=0; i<aReFact.length; i++) {
+ if (aReFact[i].test(UserAns)) {
+ eqAppAlert(\noBinFactFactAlertMsg,3);
+ return null;
+ }
+ }
+ bad = /(fact)/;
+ if (bad.test(UserAns)) {
+ eqAppAlert(\noBinFactFactAlertMsg,3);
+ return null;
+ }
+ return true
+}
+\end{newsegment}
+\end{library@holding}
+\@ifcheckedout{limitArith}
+\newcommand{\allowWrngNormSciNotn}{\def\allowWrngNSN{true}}
+\def\allowWrngNSN{false}
+\newcommand{\DecimalsOnlyErrorMsg}{%
+ "Enter only an integer, e.g., 17, or a decimal number, e.g. 12.4.
+ Using arithmetic operations or built in function is not acceptable
+ for this problem."}
+\newcommand{\NoProductsErrorMsg}{%
+ "Multiplication is not allowed for this problem."}
+\newcommand{\NoDivisionErrorMsg}{%
+ "Division is not allowed for this problem."}
+\newcommand{\NoAddOrSubErrorMsg}{%
+ "Neither addition nor subtraction is allowed for this problem."}
+\newcommand{\NoExpAllowedErrorMsg}{%
+ "The use of exponents is not allowed for this problem."}
+\newcommand{\NoTrigAllowedErrorMsg}{%
+ "The use of trig functions in this problem is not allowed."}
+\newcommand{\NoPiAllowedErrorMsg}{%
+ "The use of PI or pi is not allowed in this problem."}
+\newcommand{\NoTrigLogAllowedErrorMsg}{%
+ "The use of trig and log functions is not allowed
+ in this problem."}
+\newcommand{\sciNotSyntaxError}{"Enter the answer in
+ scientific notation."}
+\newcommand{\sciNotNormalForm}{"The scientific notation entered
+ is not in normalized form."}
+\newcommand{\NoNegExpMsg}{"No negative exponents permitted,
+ keep working!"}
+\fi
+\begin{library@holding}{limitArith}
+\begin{newsegment}{dljslib: Limit Arithmetic and Built in Functions}
+function DecimalsOnly(UserAns) {
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ if( !isFinite( UserAns ) ) {
+ eqAppAlert(\DecimalsOnlyErrorMsg,3);
+ return null;
+ }
+ return true;
+}
+function NoProducts (UserAns) {
+ // Requires the ImplMulti option of dljslib
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ UserAns = Ck4Products(UserAns);
+ if ( /\*/.test( UserAns ) )
+ return eqAppAlert(\NoProductsErrorMsg,3), null;
+ return true;
+}
+function NoDivision (UserAns) {
+ if ( /\//.test( UserAns) )
+ return eqAppAlert(\NoDivisionErrorMsg,3), null;
+ return true;
+}
+function NoAddOrSub (UserAns) {
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ UserAns=ChngAllGrpsToParens(UserAns);
+ var result;
+ var re = /.[+-]/g;
+ re.lastIndex = 0;
+ while ( (result = re.exec( UserAns )) != null ) {
+ if ( result[0].charAt(0) != "\(" )
+ return eqAppAlert(\NoAddOrSubErrorMsg,3), null;
+ }
+ return true;
+}
+function NoArithAllowed (UserAns) {
+ var aNoArithmetic = new Array ( NoAddOrSub, NoProducts,
+ NoDivision, NoExpAllowed );
+ for ( var i = 0; i < aNoArithmetic.length; i++ )
+ if ( (retn = aNoArithmetic[i](UserAns)) == null ) return null;
+ return true;
+}
+function NoExpAllowed (UserAns) {
+ // Requires the ImplMulti option of dljslib
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ if ( /\^/.test( UserAns ) || /pow/.test( UserAns ) )
+ return eqAppAlert(\NoExpAllowedErrorMsg,3), null;
+ return true;
+}
+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;
+}
+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;
+}
+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;
+ }
+ }
+ }
+ return true;
+}
+var bAllowWrngNormSciNotn=false;
+var bItsNormSciNot=false;
+function SciNotNoNotify(UserAns) {
+ bAllowWrngNormSciNotn=true;
+ var rtn=SciNotResp(UserAns);
+ return rtn;
+}
+function SciNotResp(UserAns) {
+ bItsNormSciNot=false;
+ var _sciNotation, _a, _b;
+ _sciNotation = /^[+-]*(\d*)*(\.\d*)*E[+-]*\d+$/;
+ UserAns=stripWhiteSpace(UserAns);
+ if ( (_a=_sciNotation.exec(UserAns)) !=null) {
+ if (isNaN(_a[1])) {
+ if (bAllowWrngNormSciNotn)
+ return true;
+ else
+ return eqAppAlert(\sciNotNormalForm,3), null;
+ }
+ if (isNaN(_a[2])) _a[2]=0;
+ _b = Math.abs(Number(_a[1])+Number(_a[2]));
+ if ( _b < 1 || _b >= 10 ) {
+ if (bAllowWrngNormSciNotn)
+ return true;
+ else
+ return eqAppAlert(\sciNotNormalForm,3), null;
+ }
+ else {
+ bItsNormSciNot=true;
+ return true
+ }
+ } else
+ return eqAppAlert(\sciNotSyntaxError,3), null;
+}
+function sciNotResp(UserAns) {return SciNotResp(UserAns);}
+function postSciNotResp(UserAns) {
+ bAllowWrngNormSciNotn=false;
+ return bItsNormSciNot;
+}
+function NoNegExp (UserAns) {
+ var re=/(\^|\^\()+-/g;
+ UserAns=ChngAllGrpsToParens(UserAns);
+ if (re.test(UserAns))
+ return eqAppAlert(\NoNegExpMsg,3), null;
+ return true;
+}
+function noNegExp(UserAns){return NoNegExp(UserAns)}
+\end{newsegment}
+\end{library@holding}
+\begin{library@holding}{combinatorics}
+\begin{newsegment}{dljslib: Contrib - Combinatorial Functions}
+function ch(n,r)
+{
+ if ((n==r)||(r==0)) return(1);
+ if ((n==(r+1))||(r==1)) return(n);
+ if (r > (n-r))
+ var coeff = factorialCancel(
+ expandFactorial(r+1,n),expandFactorial(1,n-r));
+ else
+ var coeff = factorialCancel(
+ expandFactorial(n-r+1,n),expandFactorial(1,r));
+ return (eval(coeff));
+}
+function perm(n,r)
+{
+ if (r==0) return(1);
+ else
+ var coeff = factorialCancel(
+ expandFactorial(n-r+1,n),expandFactorial(1,n-r));
+ return (eval(coeff));
+}
+function expandFactorial(lo,hi)
+{
+ var f = lo;
+ for (var i=lo+1;i<=hi;i++) f = i+"*"+f;
+ return f;
+}
+function factorialCancel(top,bot)
+{
+ var num = top.split("*");
+ var denom = bot.split("*");
+ var len = denom.length;
+ var temp = 0;
+ var i, j;
+ for (i=0;i<=len-1;i++) {
+ for (j=0;j<=len-1;j++) {
+ temp = num[i]/denom[j];
+ if ((temp - Math.round(temp)) == 0) {
+ num[i] = temp;
+ denom[j] = 1;
+ }
+ }
+ }
+ var t = denom.join("");
+ var reg = /[^1]/;
+ if (reg.test(t)) {
+ temp = factorialCancel(denom.join("*"),num.join("*"));
+ } else {
+ temp = num.join("*");
+ }
+ return (temp);
+}
+function fact(num)
+{
+ var tot = 1;
+ for (var r=1; r <= num; r++) tot *= r;
+ return(tot);
+}
+\end{newsegment}
+\end{library@holding}
+\begin{library@holding}{ImplMulti}
+\begin{newsegment}{dljslib: Implied Multiplication}
+function Ck4Products(UserInput)
+{
+ var re, aR;
+ for (var i=0; i<JSf.length; i++)
+ {
+ re = new RegExp("("+JSf[i]+")(\\\()","g");
+ UserInput = UserInput.replace(re, "\\$1@$2");
+ re = new RegExp("([\\w\\\)])(\\"+JSf[i]+")(@\\\()","g");
+ UserInput = UserInput.replace(re, "$1*$2$3");
+ }
+ for (var i=0; i<JSc.length; i++)
+ {
+ re = new RegExp("("+JSc[i]+")","g");
+ if ( JSc[i] != "E" ) {
+ UserInput = UserInput.replace(re, "\\$1@");
+ re = new RegExp("([\\w\\\)])(\\"+JSc[i]+")(@)","g");
+ }
+ }
+ UserInput = UserInput.replace(
+ /([\d\)])([A-DF-Za-z\(\\])/g, "$1*$2");
+ UserInput = UserInput.replace(/(\))(\d)/g, "$1*$2");
+ UserInput = UserInput.replace(/([A-Za-z])([\d\(\\])/g, "$1*$2");
+ UserInput = UserInput.replace(/(@)([A-Za-z\d])/g, "$1*$2");
+ UserInput = UserInput.replace(/(\\)([A-Za-z]{1,})(@)/g, "$2");
+ re = /[A-Za-z]{1,}/g;
+ while ( (aR = re.exec(UserInput)) != null)
+ {
+ for (var i=0; i<JSf.length; i++) if ( aR[0] == JSf[i]) break;
+ if ( i < JSf.length ) continue;
+ for (var i=0; i<JSc.length; i++) if ( aR[0] == JSc[i]) break;
+ if ( i < JSc.length ) continue;
+ aR[0] = aR[0].replace(/([A-Za-z])\B/g,"$1*");
+ UserInput = UserInput.substring(0,aR.index)
+ +aR[0]+UserInput.substring(re.lastIndex);
+ }
+ return UserInput;
+}
+function Ck4Exponents(UserInput)
+{
+ var re, regexp, aP, RightP;
+ for (var i=0; (i<JSf.length) && (ok2Continue); i++)
+ {
+ re = new RegExp(JSf[i]+"\\^");
+ while ( re.test(UserInput) && (ok2Continue) )
+ {
+ regexp = new RegExp(JSf[i]+"\\^\\\(", "g");
+ if ( (aP = regexp.exec(UserInput)) != null ) {
+ // forward search
+ RightP=FindBalP(UserInput,regexp.lastIndex-1,1);
+ var offsetExp = RightP-regexp.lastIndex;
+ regexp = new RegExp(
+ JSf[i]+"\\^\\(.{"+offsetExp+"}\\)\\\(", "g");
+ regexp.lastIndex=0;
+ if ( (aP = regexp.exec(UserInput)) != null ) {
+ // forward search
+ RightP=FindBalP(UserInput,regexp.lastIndex-1,1);
+ var offsetArg = RightP - regexp.lastIndex;
+ regexp = new RegExp("("+JSf[i]
+ +")\\^\\((.{"+offsetExp+"})\\)\\((.{"
+ +offsetArg+"})\\)");
+ regexp.lastIndex=0;
+ if (regexp.test(UserInput))
+ UserInput=UserInput.replace(
+ regexp,"(pow($1($3),$2))");
+ else ok2Continue=false;
+ continue;
+ }
+ }
+ regexp = new RegExp(JSf[i]
+ +"\\^([a-zA-Z]|[+-]?\\d+\\.?\\d*|[+-]?\\d*\\.?\\d+)"
+ +"\\\(","g");
+ if ( (aP = regexp.exec(UserInput)) != null ) {
+ // forward search
+ RightP=FindBalP(UserInput,regexp.lastIndex-1,1);
+ regexp = new RegExp("("
+ +JSf[i]+")\\^([a-zA-Z]|[+-]?\\d+"
+ +"\\.?\\d*|[+-]?\\d*\\.?\\d+)\\((.{"
+ +eval(RightP-regexp.lastIndex)+"})\\)");
+ regexp.lastIndex=0;
+ if (regexp.test(UserInput))
+ UserInput=UserInput.replace(
+ regexp,"(pow($1($3),$2))");
+ else ok2Continue=false;
+ }
+ else ok2Continue=false;
+ }
+ }
+ for (var i=0; (i < JSc.length) && (ok2Continue); i++)
+ {
+ re = new RegExp(JSc[i]+"\\^", "g");
+ while ( re.test(UserInput) && (ok2Continue) )
+ {
+ re.lastIndex = 0;
+ aR = re.exec(UserInput);
+ if (UserInput.charAt(re.lastIndex)=='\(') {
+ // forward search
+ RightP=FindBalP(UserInput,re.lastIndex,1);
+ var offsetExp = RightP - re.lastIndex - 1;
+ re.lastIndex=0;
+ regexp = new RegExp("("+JSc[i]
+ +")\\^\\((.{"+offsetExp+"})\\)");
+ if ( regexp.test(UserInput) )
+ UserInput = UserInput.replace(
+ regexp, "(pow($1,$2))");
+ else ok2Continue = false;
+ }
+ else
+ {
+ re.lastIndex=0;
+ regexp = new RegExp("("+JSc[i]
+ +")\\^([a-zA-Z]|[+-]?\\d+\\.?\\d*|[+-]?\\d*\\.?\\d+)");
+ if (regexp.test(UserInput))
+ UserInput = UserInput.replace(
+ regexp, "(pow($1,$2))");
+ else ok2Continue = false;
+ }
+ }
+ }
+ return UserInput;
+}
+\end{newsegment}
+\end{library@holding}
+\begin{library@holding}{dljslib}
+\end{insDLJS*}
+\end{library@holding}
+\immediate\closeout\dljslib@verbatim@out
+\advance\count17 by -1
+\input{dljslib.ljs}
+\endinput
+%%
+%% End of file `dljslib.sty'.
diff --git a/texmf-dist/tex/latex/acrotex/edvipdfm.def b/texmf-dist/tex/latex/acrotex/edvipdfm.def
index 113d3c80..85cdfec1 100644
--- a/texmf-dist/tex/latex/acrotex/edvipdfm.def
+++ b/texmf-dist/tex/latex/acrotex/edvipdfm.def
@@ -1,99 +1,99 @@
-%%
-%% This is file `edvipdfm.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% eforms.dtx (with options: `copyright,edvipdfm')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% eForms package, %%
-%% Copyright (C) 2002-2018 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\noPeek#1#2{\@pdfm@mark{put @thispage << \noPeekAction{#1}{#2} >> }}
-\let\ef@adjHWxetex\relax
-\def\eq@choice@driver{\ef@adjHWxetex
- \Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \leavevmode\setbox\pdfm@box=%
- \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \@pdfm@mark{ann @\Fld@name\space\dvipdfm@setdim
- <<\common@choiceCode>>}\unhbox\pdfm@box\relax%
- \@pdfm@mark{put @afields @\Fld@name}% record in @afields array
- \ifisCalculate\@pdfm@mark{put @corder @\Fld@name}\fi
-\endgroup}
-\def\eq@Button@driver{\Hy@pdfstringtrue
- \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\ef@djXPD\fi % 12/22
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \setbox\pdfm@box=%
- \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \@pdfm@mark{ann @\Fld@name\space\dvipdfm@setdim
- << \common@pushButtonCode >>}\unhbox\pdfm@box\relax%
- \@pdfm@mark{put @afields @\Fld@name}% record in @afields array
- \endgroup
-}
-\def\eq@RadioCheck@driver{\ef@adjHWxetex\Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
- \setbox\pdfm@box=%
- \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \@pdfm@mark{ann \dvipdfm@setdim
- <<\common@RadioCheckCode>>}\unhbox\pdfm@box\relax%
- \endgroup
-}
-\def\eq@l@check@driver{%
- \setbox\pdfm@box=%
- \hbox{\makebox[\eq@tmpdima]{\phantom{\link@@Content}}}%
- \@pdfm@mark{ann \dvipdfm@setdim<<\common@RadioCheckCode>>}%
- \unhbox\pdfm@box\relax\endgroup
-}
-\def\eq@TextField{\ef@adjHWxetex\Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \leavevmode\setbox\pdfm@box=%
- \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \@pdfm@mark{ann @\Fld@name\space\dvipdfm@setdim
- << \common@TextFieldCode >>}\unhbox\pdfm@box\relax%
- \@pdfm@mark{put @afields @\Fld@name}% record in @afields array
- \ifisCalculate\@pdfm@mark{put @corder @\Fld@name}\fi
- \endgroup
-}
-\def\eq@SigField{\ef@adjHWxetex\Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \leavevmode\setbox\pdfm@box=%
- \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \@pdfm@mark{ann @\Fld@name\space\dvipdfm@setdim
- << \common@SigFieldCode >>}\unhbox\pdfm@box\relax%
- \endgroup
-}
-\def\setLink@driver{%
- \@eqBS{}\leavevmode
- \@pdfm@mark{bann
- <</Subtype/Link\eq@Border\common@LinkCode>>}%
- \Hy@colorlink{\@linkcolor}\link@@Box\Hy@endcolorlink
- \@pdfm@mark{eann}%
- \endgroup
-}
-\def\ef@setTabOrder{\ifx\ef@taborder\@empty\else
- \@pdfm@mark{ put @thispage << /Tabs/\ef@taborder >> }%
- \fi\endgroup
-}
-\endinput
-%%
-%% End of file `edvipdfm.def'.
+%%
+%% This is file `edvipdfm.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% eforms.dtx (with options: `copyright,edvipdfm')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% eForms package, %%
+%% Copyright (C) 2002-2018 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\noPeek#1#2{\@pdfm@mark{put @thispage << \noPeekAction{#1}{#2} >> }}
+\let\ef@adjHWxetex\relax
+\def\eq@choice@driver{\ef@adjHWxetex
+ \Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \leavevmode\setbox\pdfm@box=%
+ \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \@pdfm@mark{ann @\Fld@name\space\dvipdfm@setdim
+ <<\common@choiceCode>>}\unhbox\pdfm@box\relax%
+ \@pdfm@mark{put @afields @\Fld@name}% record in @afields array
+ \ifisCalculate\@pdfm@mark{put @corder @\Fld@name}\fi
+\endgroup}
+\def\eq@Button@driver{\Hy@pdfstringtrue
+ \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\ef@djXPD\fi % 12/22
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \setbox\pdfm@box=%
+ \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \@pdfm@mark{ann @\Fld@name\space\dvipdfm@setdim
+ << \common@pushButtonCode >>}\unhbox\pdfm@box\relax%
+ \@pdfm@mark{put @afields @\Fld@name}% record in @afields array
+ \endgroup
+}
+\def\eq@RadioCheck@driver{\ef@adjHWxetex\Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
+ \setbox\pdfm@box=%
+ \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \@pdfm@mark{ann \dvipdfm@setdim
+ <<\common@RadioCheckCode>>}\unhbox\pdfm@box\relax%
+ \endgroup
+}
+\def\eq@l@check@driver{%
+ \setbox\pdfm@box=%
+ \hbox{\makebox[\eq@tmpdima]{\phantom{\link@@Content}}}%
+ \@pdfm@mark{ann \dvipdfm@setdim<<\common@RadioCheckCode>>}%
+ \unhbox\pdfm@box\relax\endgroup
+}
+\def\eq@TextField{\ef@adjHWxetex\Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \leavevmode\setbox\pdfm@box=%
+ \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \@pdfm@mark{ann @\Fld@name\space\dvipdfm@setdim
+ << \common@TextFieldCode >>}\unhbox\pdfm@box\relax%
+ \@pdfm@mark{put @afields @\Fld@name}% record in @afields array
+ \ifisCalculate\@pdfm@mark{put @corder @\Fld@name}\fi
+ \endgroup
+}
+\def\eq@SigField{\ef@adjHWxetex\Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \leavevmode\setbox\pdfm@box=%
+ \hbox{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \@pdfm@mark{ann @\Fld@name\space\dvipdfm@setdim
+ << \common@SigFieldCode >>}\unhbox\pdfm@box\relax%
+ \endgroup
+}
+\def\setLink@driver{%
+ \@eqBS{}\leavevmode
+ \@pdfm@mark{bann
+ <</Subtype/Link\eq@Border\common@LinkCode>>}%
+ \Hy@colorlink{\@linkcolor}\link@@Box\Hy@endcolorlink
+ \@pdfm@mark{eann}%
+ \endgroup
+}
+\def\ef@setTabOrder{\ifx\ef@taborder\@empty\else
+ \@pdfm@mark{ put @thispage << /Tabs/\ef@taborder >> }%
+ \fi\endgroup
+}
+\endinput
+%%
+%% End of file `edvipdfm.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eforms.sty b/texmf-dist/tex/latex/acrotex/eforms.sty
index 2e1fea4d..fd54f4fe 100644
--- a/texmf-dist/tex/latex/acrotex/eforms.sty
+++ b/texmf-dist/tex/latex/acrotex/eforms.sty
@@ -1,1374 +1,1378 @@
-%%
-%% This is file `eforms.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% eforms.dtx (with options: `copyright,package')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% eForms package, %%
-%% Copyright (C) 2002-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eforms}
- [2018/03/22 v2.9.19 Provides general eforms support (dps)]
-\RequirePackage{ifpdf}[2006/02/20]
-\RequirePackage{ifxetex}[2006/08/21]
-\RequirePackage{ifluatex}
-\RequirePackage{calc}
-\let\ef@driver\@empty
-\DeclareOption{dvipsone}{\def\eq@drivernum{0}%
- \def\eq@drivername{0}\def\ef@driver{dvipsone}%
- \PassOptionsToPackage{dvipsone}{insdljs}%
- \PassOptionsToPackage{dvipsone}{hyperref}%
-}
-\def\eq@drivername{2}
-\DeclareOption{dvips}{\def\eq@drivernum{0}%
- \def\eq@drivername{1}\def\ef@driver{dvips}%
- \PassOptionsToPackage{dvips}{insdljs}%
- \PassOptionsToPackage{dvips}{hyperref}%
-}
-\DeclareOption{pdftex}{%
- \def\eq@drivernum{1}\def\eq@driver{pdftex}%
- \def\eq@drivercode{epdftex.def}\def\ef@driver{pdftex}%
-}
-\DeclareOption{luatex}{%
- \def\eq@drivernum{1}\def\eq@driver{luatex}%
- \def\eq@drivercode{epdftex.def}\def\ef@driver{luatex}%
-}
-\DeclareOption{dvipdfm}{%
- \def\eq@drivernum{2}\def\eq@driver{dvipdfm}%
- \def\eq@drivercode{edvipdfm.def}\def\ef@driver{dvipdfm}%
- \PassOptionsToPackage{dvipdfm}{insdljs}
- \PassOptionsToPackage{dvipdfm}{hyperref}
-}
-\DeclareOption{dvipdfmx}{%
- \def\eq@drivernum{2}\def\eq@driver{dvipdfmx}%
- \def\eq@drivercode{edvipdfm.def}\def\ef@driver{dvipdfmx}%
- \PassOptionsToPackage{dvipdfmx}{insdljs}
- \PassOptionsToPackage{dvipdfmx}{hyperref}
-}
-\DeclareOption{xetex}{%
- \def\eq@drivernum{2}\def\eq@driver{xetex}%
- \def\eq@drivercode{edvipdfm.def}\def\ef@driver{xetex}%
-}
-\DeclareOption{textures}{%
- \def\eq@drivernum{3}\def\eq@driver{textures}%
- \def\eq@drivercode{epdfmark.def}\def\ef@driver{textures}%
- \PassOptionsToPackage{textures}{insdljs}%
- \PassOptionsToPackage{textures}{hyperref}
-}
-\def\eq@driver{dvipsone/dvips}
-\def\eq@drivercode{epdfmark.def}
-\DeclareOption{preview}{\previewtrue}
-\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{insdljs}}
-\@ifundefined{ifpreview}{\newif\ifpreview \previewfalse}{}
-\providecommand{\previewOn}{\previewtrue}
-\providecommand{\previewOff}{\previewfalse}
-\DeclareOption{useui}{\AtEndOfPackage{\ef@InputUIeForms}}
-\def\ef@InputUIeForms{\InputIfFileExists{uieforms.def}%
- {\PackageInfo{eforms}{Inputting code for useui option}}%
- {\PackageInfo{eforms}{Cannot find uieforms.def.\MessageBreak
- Reinstall or refresh your file name database.}}}
-\DeclareOption{setcorder}{\def\inputCalcOrderJS{%
- \InputIfFileExists{setcorder.def}%
- {\PackageInfo{eforms}{Inputting code for setcorder option}}%
- {\PackageWarning{eforms}{Cannot find setcorder.def.\MessageBreak
- Reinstall or refresh your file name database.}}}}
-\let\inputCalcOrderJS\relax
-\@ifpackageloaded{web}{%
- \ExecuteOptions{\eq@driver@name}%
-}{%
- \@ifpackageloaded{exerquiz}{%
- \ExecuteOptions{\eq@driver}%
- }{%
- \ifluatex\ExecuteOptions{luatex}\else
- \ifpdf\ExecuteOptions{pdftex}\else
- \ifxetex\ExecuteOptions{xetex}\else
- \@ifundefined{l@tex@@@@driver}{\ExecuteOptions{dvips}}
- {\ExecuteOptions{dvipsone}}\fi\fi\fi
- }%
-}
-\ProcessOptions
-\ifx\ef@driver\@empty
- \PackageError{eforms}%
- {You have not specified dvips, dvipsone, pdftex,\MessageBreak
- dvipdfm, dvipdfmx, or xetex in the option list of\MessageBreak
- the eforms package}
- {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm,
- dvipdfmx, or xetex
- \MessageBreak in the option list of the eforms package.}%
-}{}
-\fi
-\newlength\eflength
-\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
-\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
-\RequirePackage{hyperref}
-\ifxetex\else\ifpdf\pdflinkmargin1bp\relax\else
- \g@addto@macro\Hy@FirstPageHook{%
- \headerps@out{/HyperBorder {1.00375 PDFToDvips} def}}
-\fi\fi
-\RequirePackage{insdljs}[2017/01/03] % incl conv-xkv
-\@ifpackageloaded{exerquiz}{}{%
- \AtBeginDocument{\Form}
- \AtEndDocument{\csname endForm\endcsname}
-}
-\@ifpackageloaded{aeb_pro}{}{%
- \newcommand{\taggedPDF}{%
- \ifnum\eq@drivernum=0\relax
- \literalps@out{[{Catalog} <<%
- /MarkInfo<</Marked true>>%
- >> /PUT pdfmark}\fi}%
-}
-\let\ef@YES=y \let\ef@NO=n
-\let\ef@One=1 \let\ef@Zero=0
-\ifnum\eq@drivername<2
-\let\to@usepdfmark\ef@One
-\RequirePackage[structure]{taborder}\else
-\let\to@usepdfmark\ef@Zero
-\RequirePackage{taborder}
-\fi
-\@ifundefined{eq@tmpbox}{\newsavebox{\eq@tmpbox}}{}
-\@ifundefined{eq@tmpdima}{\newdimen\eq@tmpdima}{}
-\@ifundefined{eq@tmpdimb}{\newdimen\eq@tmpdimb}{}
-\newlength\ef@dimena
-\newtoks\ef@scratchtoks
-\newif\ifmakeXasPD \makeXasPDtrue % 12/22
-\newif\ifmakePDasX \makePDasXfalse
-\def\makeXasPDOn{\makeXasPDtrue\makePDasXfalse}
-\def\makeXasPDOff{\makeXasPDfalse}
-\def\makePDasXOn{\makePDasXtrue\makeXasPDfalse}
-\def\makePDasXOff{\makePDasXfalse}
-\providecommand\ckboxColor[1]{\def\@rgi{#1}\ifx\@rgi\@empty
- \let\ckbox@Color\relax\else
- \def\ckbox@Color{\color{#1}}\fi}\let\ckbox@Color\relax
-\def\ef@Bbox#1#2{\hbox{\ifpreview
- \setlength\fboxrule{0.4pt}\setlength\fboxsep{0pt}%
- \@tempdima=#1\advance\@tempdima by-\fboxrule
- \@tempdimb=#2\advance\@tempdimb by-\fboxrule \ckbox@Color
- \fbox{\parbox[b][\@tempdimb][c]{\@tempdima}{\hfill\vfill}}\else
- \parbox[b][#2][c]{#1}{\hfill\vfill}\fi}%
-}
-\let\Bbox\ef@Bbox
-\let\ef@passedArgs\@empty
-\def\processAppArgs#1#2{%
- \ifx\end#1% if #1=\end, #2=\@nil.
- \let\ef@next\relax
- \else
- \ifx#1\@empty
- \def\ef@next{\processAppArgs}%
- \else
- \@getCmdName{\ui}\edef\arg@ui{\@CmdName}%
- \@getCmdName{#1}%
- \ifx\arg@ui\@CmdName
- \@ifundefined{@equi}{\PackageError{eforms}%
- {The user interface '\string\ui' is not defined!%
- \MessageBreak Use the useui option of eforms
- and try again}{I said, use the useui option of
- eforms and try again!}}{}%
- \def\ef@next{\setkeys{eforms}{#2}%
- \processAppArgs\presets{\ef@passedArgs}}%
- \else
- \@getCmdName{\Ff}\edef\arg@Ff{\@CmdName}%
- \@getCmdName{#1}%
- \ifx\arg@Ff\@CmdName % if \Ff, let's add arguments
- \ifx\eq@Ff\@empty\def\eq@FfValue{0}\else
- \expandafter\getFfValue\eq@Ff\@nil\fi
- \@tempcnta=\eq@FfValue
- \def\eq@arg{#2}%
- \ifx\eq@arg\@empty\else
- \advance\@tempcnta by#2\fi
- \edef\eq@Ff{/Ff \the\@tempcnta}%
- \def\ef@next{\processAppArgs}%
- \else
- \@getCmdName{\F}\edef\arg@F{\@CmdName}%
- \@getCmdName{#1}%
- \ifx\arg@F\@CmdName % if \Ff, let's add arguments
- \ifx\eq@F\@empty\def\eq@FValue{0}\else
- \expandafter\getFValue\eq@F\@nil\fi
- \@tempcnta=\eq@FValue
- \def\eq@arg{#2}%
- \ifx\eq@arg\@empty\else
- \advance\@tempcnta by#2\fi
- \edef\eq@F{/F \the\@tempcnta}%
- \def\ef@next{\processAppArgs}%
- \else
- \@getCmdName{\presets}%
- \edef\arg@presets{\@CmdName}\@getCmdName{#1}%
- \ifx\arg@presets\@CmdName
- \def\ef@next{\expandafter\processAppArgs#2}%
- \else
- \csname @eq%
- \expandafter\@gobble\string#1\endcsname{#2}%
- \def\ef@next{\processAppArgs}%
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
- \ef@next
-}
-\def\@processEvery{\edef\eqtemp{}\toks0={}\@@processEvery}
-\def\@@processEvery#1{%
- \ifx#1\end\def\ef@next{\the\toks0 }%
- \else
- \edef\eqtemp{\the\toks0 }%
- \toks0=\expandafter{\eqtemp
- \expandafter\processAppArgs#1\end\@nil}%
- \def\ef@next{\@@processEvery}%
- \fi
- \ef@next
-}
-\newdimen\eqcenterWidget
-\def\centerWidget#1{%
- \ifeq@inlineCenter
- \eqcenterWidget=#1\relax
- \eqcenterWidget=.5\eqcenterWidget
- \ifnum\eq@textSize=0\relax
- \dimen@=-\eq@textSizeDefault bp\else
- \dimen@=-\eq@textSize bp\fi
- \dimen@=0.9167\dimen@ % 11/12
- \dimen@=.5\dimen@
- \advance\dimen@\eq@W@value bp
- \ifx\eq@S\@empty\else
- \def\eq@S@cmp{B}%
- \ifx\eq@S@value\eq@S@cmp
- \advance\dimen@ by \eq@W@value bp
- \else
- \def\eq@S@cmp{I}%
- \ifx\eq@S@value\eq@S@cmp
- \advance\dimen@ by \eq@W@value bp
- \else\advance\dimen@ by 1bp
- \fi\fi\fi
- \advance\eqcenterWidget by \dimen@
- \else
- \eqcenterWidget=#1\relax
- \eqcenterWidget=.5\eqcenterWidget
- \advance\eqcenterWidget by -4bp
- \fi
-}
-\def\@eqF#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@F\@empty\else\def\eq@F{/F #1}\fi}\def\eq@F{}
-\def\@eqBS#1{%
- \let\eq@BS=0\relax
- \ifx\eq@W\@empty\else\let\eq@BS=1\fi
- \ifx\eq@S\@empty\else\let\eq@BS=1\fi
- \ifx\eq@D\@empty\else\let\eq@BS=1\fi
- \edef\link@BS{\if\eq@BS1/BS<<\eq@W\eq@S\eq@D>>\fi}%
- \ifx\eq@W\@empty\let\link@BS\@empty\fi
-}\def\link@BS{}
-\def\@eqpresets#1{#1}%
-\def\@eqW#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@W\@empty\def\eq@W@value{0}\else
- \def\eq@W@value{#1}\def\eq@W{/W #1}\fi
- \xdef\g@eq@W@value@bp{\eq@W@value bp}}
-\def\eq@W{}\def\eq@W@value{0}
-\def\g@eq@W@valu@bp{0bp} % dps 12/22
-\def\@eqS#1{\def\eq@S@value{#1}\ifx\eq@S@value\@empty
- \let\eq@S\@empty\else
- \def\eq@S{/S/#1}\def\eq@temp{D}%
- \ifx\eq@S@value\eq@temp
- \ifx\eq@D\@empty\def\eq@D{/D [3]}\fi
- \fi\fi}\def\eq@S{}
-\def\@eqD#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@D\@empty\else
- \def\eq@D{/D [#1]}\fi}\def\eq@D{}
-\def\@eqBorder#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@Border\@empty\else\def\eq@Border{/Border [#1]}\fi}%
-\def\eq@Border{/Border [0 0 0]}
-\def\@eqAP#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AP\@empty\else\def\eq@AP{/AP<<#1>>}\fi}%
- \let\eq@AP\@empty
- \def\@eqOn#1{\def\eq@On{/#1}}\def\eq@On{/Yes}
-\def\@eqAS#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AS\@empty\else\ifpdfmarkup\def\eq@AS{/AS(#1) cvn }\else
- \def\eq@AS{/AS/#1}\fi\fi}\def\eq@AS{}
-\def\ef@gobbleToendmarker#1\ef@endmarker{}
-\let\ef@endmarker\relax
-\def\ef@end{\end}\def\ef@true{true}
-\def\ef@rPage#1{\@tempcnta=#1\relax\advance\@tempcnta-1
- \edef\rPage##1{\the\@tempcnta}}
-\long\def\ef@searchrPage#1\rPage#2#3\@nil{\def\ef@argii{#2}%
- \ifx\ef@argii\ef@end\else\rPage{#2}\fi}
-\def\ef@searchmlLink#1\mlLink#2#3\@nil{\def\ef@argii{#2}%
- \ifx\ef@argii\ef@end\let\ef@mlLink\ef@Zero\else
- \ifx\ef@argii\ef@true\let\ef@mlLink\ef@One\else
- \let\ef@mlLink\ef@Zero\fi\fi}
-\def\ef@searchGoToR#1/GoToR#2\@nil{\def\ef@argii{#2}%
- \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
- \def\ef@thislinkcolor{\@filecolor}\fi
- \expandafter\ef@gobbleToendmarker\fi}
-\def\ef@searchURI#1/URI#2\@nil{\def\ef@argii{#2}%
- \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
- \def\ef@thislinkcolor{\@urlcolor}\fi
- \expandafter\ef@gobbleToendmarker\fi}
-\def\ef@searchCmdURI#1\URI#2\@nil{\def\ef@argii{#2}%
- \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
- \def\ef@thislinkcolor{\@urlcolor}\fi
- \expandafter\ef@gobbleToendmarker\fi}
-\def\ef@searchNamed#1/Named#2\@nil{\def\ef@argii{#2}%
- \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
- \def\ef@thislinkcolor{\@menucolor}\fi
- \expandafter\ef@gobbleToendmarker\fi}
-\def\ef@searchCmdNamed#1\Named#2\@nil{\def\ef@argii{#2}%
- \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
- \def\ef@thislinkcolor{\@menucolor}\fi
- \expandafter\ef@gobbleToendmarker\fi}
-\def\ef@searchLaunch#1/Launch#2\@nil{\def\ef@argii{#2}%
- \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
- \def\ef@thislinkcolor{\@runcolor}\fi
- \expandafter\ef@gobbleToendmarker\fi}
-\def\ef@preprocessA#1{%
- \let\rPage\relax\edef\ef@argi{#1}%
- \ifx\annot@type\annot@type@link
- \expandafter\ef@searchGoToR\ef@argi/GoToR\end\@nil
- \expandafter\ef@searchURI\ef@argi/URI\end\@nil
- \expandafter\ef@searchCmdURI\ef@argi\URI\end\@nil
- \expandafter\ef@searchNamed\ef@argi/Named\end\@nil
- \expandafter\ef@searchCmdNamed\ef@argi\Named\end\@nil
- \expandafter\ef@searchLaunch\ef@argi/Launch\end\@nil
- \ef@endmarker\fi
- \let\rPage\ef@rPage
- \expandafter\ef@searchrPage\ef@argi\rPage\end\@nil
-}
-\def\@eqA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@A\@empty\else\ef@preprocessA{#1}%
- \def\eq@A{/A <<#1>>}\fi}\def\eq@A{}
-\def\@eqmlLink#1{\def\eq@arg{#1}\ifx\eq@arg\ef@true
- \let\ef@mlLink\ef@One\else\let\ef@mlLink\ef@Zero\fi}
-\def\@eqLock#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@Lock\@empty\else\def\eq@Lock{/Lock <<#1>>}\fi}
- \def\eq@Lock{}
-\newif\ifisCalculate\isCalculatefalse
-\def\ef@searchCalc#1\AACalculate#2\@nil{%
- \ifx#2\end\else\aftergroup\isCalculatetrue\fi
-}
-\def\@eqAA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty\let\eq@AA\@empty
- \else\begingroup\ef@searchCalc#1\AACalculate\end\@nil\endgroup
- \def\eq@AA{/AA <<#1>>}\fi}
-\def\eq@AA{/AA <<\eq@AAmouseup\eq@AAmousedown\eq@AAmouseenter%
- \eq@AAmouseexit\eq@AAonfocus\eq@AAonblur\eq@AAformat%
- \eq@AAkeystroke\eq@AAvalidate\eq@AAcalculate\eq@AApageopen%
- \eq@AApageclose\eq@AApagevisible\eq@AApageinvisible>>}
-\def\@eqAAmouseup#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAmouseup\@empty\else\def\eq@AAmouseup{/U<<\JS{#1}>>}\fi}
-\let\eq@AAmouseup\@empty
-\def\@eqAAmousedown#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAmousedown\@empty\else
- \def\eq@AAmousedown{/D<<\JS{#1}>>}\fi}
-\let\eq@AAmousedown\@empty
-\def\@eqAAmouseenter#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAmouseenter\@empty\else
- \def\eq@AAmouseenter{/E<<\JS{#1}>>}\fi}
-\let\eq@AAmouseenter\@empty
-\def\@eqAAmouseexit#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAmouseexit\@empty\else
- \def\eq@AAmouseexit{/X<<\JS{#1}>>}\fi}
-\let\eq@AAmouseexit\@empty
-\def\@eqAAonfocus#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAonfocus\@empty\else
- \def\eq@AAonfocus{/Fo<<\JS{#1}>>}\fi}
-\def\@eqAAmousefocus{\@eqAAonfocus}
-\let\eq@AAonfocus\@empty
-\def\@eqAAonblur#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAonblur\@empty\else
- \def\eq@AAonblur{/Bl<<\JS{#1}>>}\fi}
-\def\@eqAAmouseblur{\def\@eqAAonblur}
-\let\eq@AAonblur\@empty
-\def\@eqAAformat#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAformat\@empty\else
- \def\eq@AAformat{/F<<\JS{#1}>>}\fi}
-\let\eq@AAformat\@empty
-\def\@eqAAkeystroke#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAkeystroke\@empty\else
- \def\eq@AAkeystroke{/K<<\JS{#1}>>}\fi}
-\let\eq@AAkeystroke\@empty
-\def\@eqAAvalidate#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAvalidate\@empty\else
- \def\eq@AAvalidate{/V<<\JS{#1}>>}\fi}
-\let\eq@AAvalidate\@empty
-\def\@eqAAcalculate#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AAcalculate\@empty\else\isCalculatetrue
- \def\eq@AAcalculate{/C<<\JS{#1}>>}\fi}
-\let\eq@AAcalculate\@empty
-\def\@eqAApageopen#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AApageopen\@empty\else
- \def\eq@AApageopen{/PO<<\JS{#1}>>}\fi}
-\let\eq@AApageopen\@empty
-\def\@eqAApageclose#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AApageclose\@empty\else
- \def\eq@AApageclose{/PC<<\JS{#1}>>}\fi}
-\let\eq@AApageclose\@empty
-\def\@eqAApagevisible#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AApagevisible\@empty\else
- \def\eq@AApagevisible{/PV<<\JS{#1}>>}\fi}
-\let\eq@AApagevisible\@empty
-\def\@eqAApageinvisible#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AApageinvisible\@empty\else
- \def\eq@AApageinvisible{/PI<<\JS{#1}>>}\fi}
-\let\eq@AApageinvisible\@empty
-\def\@eqDA#1{\def\eq@DA{#1}}
-\def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
-\def\@eqtextFont#1{\def\eq@textFont{/#1}}
-\def\eq@textFont{/Helv}
-\def\@eqtextSize#1{\def\eq@textSize{#1}}
-\def\eq@textSizeDefault{9}
-\edef\eq@textSize{\eq@textSizeDefault}
-\def\eq@RV@Body{<?xml version="1.0"?><body %
- xfa:APIVersion="Acroform:2.7.0.0" %
- xfa:contentType="text/html" %
- xfa:spec="2.1" xmlns="http://www.w3.org/1999/xhtml" %
- xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">}
-\def\eq@RV@endBody{</body>}
-\def\@eqRV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@RV\@empty\else\def\eq@RV{/RV(\eq@RV@Body#1%
- \eq@RV@endBody)\fi}}\def\eq@RV{}
-\def\@eqDS#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@DS\@empty\else\def\eq@DS{/DS(#1)\fi}}\def\eq@DS{}
-\def\@eqtextColor#1{\ef@parsePDFColor{#1}%
- \HyColor@IfXcolor{%
- \expandafter\HyColor@FieldColor%
- \expandafter{\ef@colorSpec@out}{\eq@textColor}{}{}%
- }{\edef\eq@textColor{\ef@colorSpec@out}}%
-}
-\def\eq@textColor{0 g}
-\def\@eqQ#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@Q\@empty\else\def\eq@Q{/Q #1}\fi}\def\eq@Q{}
-\def\ef@isunicode#1\unicodeStr#2\@nil{\def\argi{#1}%
- \ifx\argi\@empty\def\ifbool@ef{iftrue}\else
- \def\ifbool@ef{iffalse}\fi}
-\def\@eqDV#1{\ef@isunicode#1\unicodeStr\@nil
- \expandafter\csname\ifbool@ef\endcsname\@equDV{#1}\else
- \def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@DV\@empty\else
- \ef@pdfCRLFTABDefns\pdfstringdef\ef@uni@temp{#1}%
- \edef\eq@DV{/DV(\ef@uni@temp)}\makespecialJS\fi\fi}\def\eq@DV{}
-\def\ef@pdfCRLFTABDefns{%
- \def\r{\textCR}\def\t{\textHT}\def\n{\textLF}}
-\def\@eqnuDV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@DV\@empty\else\def\eq@DV{/DV(#1)}\fi}
-\def\@equDV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@DV\@empty\else\def\eq@DV{/DV<#1>}\fi}
-\def\@eqV#1{\ef@isunicode#1\unicodeStr\@nil
- \expandafter\csname\ifbool@ef\endcsname\@equV{#1}\else
- \def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@V\@empty\else
- \ef@pdfCRLFTABDefns\pdfstringdef\ef@uni@temp{#1}%
- \edef\eq@V{/V(\ef@uni@temp)}\makespecialJS\fi\fi}\def\eq@V{}
-\def\@eqnuV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@V\@empty\else\def\eq@V{/V(#1)}\fi}
-\def\@equV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@V\@empty\else\def\eq@V{/V<#1>}\fi}%
-\def\@eqTU#1{\ef@isunicode#1\unicodeStr\@nil
- \expandafter\csname\ifbool@ef\endcsname\@equTU{#1}\else
- \def\eq@arg{#1}\let\r@save\r\let\r\textCR
- \ifx\eq@arg\@empty\let\eq@TU\@empty\else
- \ef@pdfCRLFTABDefns\pdfstringdef\ef@uni@temp{#1}%
- \edef\eq@TU{/TU(\ef@uni@temp)}\makespecialJS\fi\fi
- \let\r\r@save}\def\eq@TU{}
-\def\@equTU#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@TU\@empty\else\def\eq@TU{/TU<#1>}\fi}
-\def\@eqFf#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@Ff\@empty\else\def\eq@Ff{/Ff #1}\fi}
- \def\eq@Ff{}
-\def\@eqMaxLen#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@MaxLen\@empty\else\def\eq@MaxLen{/MaxLen #1}\fi}%
- \def\eq@MaxLen{}
-\def\@eqH#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@H\@empty\else\def\eq@H{/H/#1}\fi}\def\eq@H{}
-\def\@eqMK#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@MK\@empty\else\def\eq@MK{/MK << #1 >> }\fi}%
- \def\eq@MK{}
- \let\@vertRotate=0
- \def\@eqR#1{\def\eq@R@value{#1}\ifx\eq@R@value\@empty
- \let\eq@R\@empty\else
- \@tempcnta=\eq@R@value\relax
- \ifnum\@tempcnta<0 \@tempcnta=-\@tempcnta\fi
- \ifnum\@tempcnta=0 \else\ifnum\@tempcnta=180 \else
- \let\@vertRotate=1\fi\fi
- \def\eq@R{/R #1}\fi}
- \def\eq@R{}
- \def\@eqBC#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@BC\@empty\else % 2010/07/23
- \expandafter\ef@isitnamed\eq@arg\ef@nil
- \ifx\ef@latex@color\ef@y\expandafter
- \HyColor@XZeroOneThreeFour\expandafter{\eq@arg}{\eq@BC}{}{}%
- \edef\eq@BC{/BC [\eq@BC]}\else
- \def\eq@BC{/BC [#1]}\fi
- \fi}
- \def\eq@BC{}
- \def\@eqBG#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@BG\@empty\else % 2010/07/23
- \expandafter\ef@isitnamed\eq@arg\ef@nil
- \ifx\ef@latex@color\ef@y\expandafter
- \HyColor@XZeroOneThreeFour\expandafter{\eq@arg}{\eq@BG}{}{}%
- \edef\eq@BG{/BG [\eq@BG]}\else
- \def\eq@BG{/BG [#1]}\fi
- \fi}
- \def\eq@BG{}
- \def\@eqCA#1{\ef@isunicode#1\unicodeStr\@nil
- \expandafter\csname\ifbool@ef\endcsname\@equCA{#1}\else
- \def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@CA\@empty\let\ef@kvCA\@empty
- \else\ef@pdfCRLFTABDefns
- \pdfstringdef\ef@uni@temp{#1}%
- \def\eq@CA{#1}\edef\ef@kvCA{/CA(\ef@uni@temp)}%
- \makespecialJS\fi\fi}
- \def\eq@CA{}\def\ef@kvCA{}
- \def\@equCA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@CA\@empty\let\ef@kvCA\@empty
- \else\def\eq@CA{#1}\def\ef@kvCA{/CA<#1>}\fi}
- \def\@eqRC#1{\ef@isunicode#1\unicodeStr\@nil
- \expandafter\csname\ifbool@ef\endcsname\@equRC{#1}\else
- \def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@RC\@empty\let\ef@kvRC\@empty
- \else\ef@pdfCRLFTABDefns
- \pdfstringdef\ef@uni@temp{#1}%
- \def\eq@RC{#1}\edef\ef@kvRC{/RC(\ef@uni@temp)}%
- \makespecialJS\fi\fi}
- \def\eq@RC{}\def\ef@kvRC{}
- \def\@equRC#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@RC\@empty\let\ef@kvRC\@empty
- \else\def\eq@RC{#1}\def\ef@kvRC{/RC<#1>}\fi}
- \def\@eqAC#1{\ef@isunicode#1\unicodeStr\@nil
- \expandafter\csname\ifbool@ef\endcsname\@equAC{#1}\else
- \def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AC\@empty\let\ef@kvAC\@empty
- \else\ef@pdfCRLFTABDefns
- \pdfstringdef\ef@uni@temp{#1}%
- \def\eq@AC{#1}\edef\ef@kvAC{/AC(\ef@uni@temp)}%
- \makespecialJS\fi\fi}
- \def\eq@AC{}\def\ef@kvAC{}
- \def\@equAC#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@AC\@empty\let\ef@kvAC\@empty
- \else\def\eq@AC{#1}\def\ef@kvAC{/AC<#1>}\fi}
-\def\eq@define@IconMK{\def\eq@IconMK{\eq@I\eq@RI\eq@IX\eq@TP
- /IF<<\eq@SW\eq@ST\eq@PA\eq@FB>>}}
-\let\eq@IconMK\@empty
-\ifpdf\def\eq@relRef#1{0 0 R}\else %{#1\space 0 R}
- \ifxetex\def\eq@relRef#1{#1}\else
- \def\eq@relRef#1{{#1}}\fi\fi
-\def\ef@null{null}
-\def\@eqI#1{\ifx\annot@type\annot@type@button
- \def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@I\@empty\else
- \def\eq@I{/I \eq@relRef{#1}}%
- \ifpdf\ifx\eq@arg\ef@null
- \def\eq@I{/I 0 0 R}\fi\fi
- \eq@define@IconMK\fi\fi}
-\def\eq@I{}
-\def\@eqRI#1{\ifx\annot@type\annot@type@button
- \def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@RI\@empty\else
- \def\eq@RI{/RI \eq@relRef{#1}}%
- \ifpdf\ifx\eq@arg\ef@null
- \def\eq@RI{/RI 0 0 R}\fi\fi
- \eq@define@IconMK\fi\fi}
-\def\eq@RI{}
-\def\@eqIX#1{\ifx\annot@type\annot@type@button
- \def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@IX\@empty\else
- \def\eq@IX{/IX \eq@relRef{#1}}%
- \ifpdf\ifx\eq@arg\ef@null
- \def\eq@IX{/IX 0 0 R}\fi\fi
- \eq@define@IconMK\fi\fi}
-\def\eq@IX{}
-\def\@eqTP#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@TP\@empty\else\def\eq@TP{/TP #1}\fi}
-\def\eq@TP{/TP 0} % default 0
-\def\@eqSW#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@SW\@empty\else\def\eq@SW{/SW/#1}\fi}
-\def\eq@SW{/SW/A} % the default, always scale
-\def\@eqST#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@ST\@empty\else\def\eq@ST{/S/#1}\fi}
-\def\eq@ST{/S/P} % the default, proportional scaling
-\def\@eqPA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@PA\@empty\else\def\eq@PA{/A [#1]}\fi}
-\def\eq@PA{/A [0.5 0.5]} % the default
-\def\@eqFB#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@PA\@empty\else\def\eq@FB{/FB #1}\fi}
-\def\eq@FB{/FB false} % the default
-\def\@eqmkIns#1{\def\eq@mkIns{#1}}\def\eq@mkIns{}
-\def\@eqOpt#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@Opt\@empty\else\def\eq@Opt{/Opt [#1]}\fi}
- \def\eq@Opt{}
-\def\@eqTI#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@TI\@empty\else\def\eq@TI{/TI #1}\fi}
- \def\eq@TI{}
-\def\@eqrawPDF#1{\def\eq@rawPDF{#1}}\def\eq@rawPDF{}
-\def\@eqQuadPoints#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@QuadPoints\@empty\else
- \def\eq@QuadPoints{/QuadPoints {#1}}\fi}
-\def\eq@QuadPoints{}
-\def\@eqColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
- \let\eq@Color\@empty\else
- \HyColor@XZeroOneThreeFour{#1}{\eq@Color}{}{}%
- \edef\eq@Color{/C[\eq@Color]}\fi}
-\def\eq@Color{}
-\def\@eqlinktxtcolor#1{%
- \def\ef@argi{#1}\ifHy@colorlinks
- \ifx\ef@argi\@empty\let\ef@colorthislink\normalcolor\else
- \let\ef@linktxtcolor@set=1\def\ef@thislinkcolor{#1}\fi\fi
-}\let\ef@linktxtcolor@set=0
-\def\@eqrectH#1{\def\eq@rectH{#1}\ifx\eq@rectH\@empty\else
- \setlength\eflength\eq@rectH\edef\eq@rectH{\the\eflength}\fi}
-\def\@eqrectW#1{\def\eq@rectW{#1}\ifx\eq@rectW\@empty\else
- \setlength\eflength\eq@rectW\edef\eq@rectW{\the\eflength}\fi}
-\def\@eqobjdef#1{\def\ef@arg{#1}\ifx\ef@arg\@empty
- \let\eq@objdef\@empty\else\def\eq@objdefName{#1}%
- \def\eq@objdef{/_objdef {#1}}\fi
-}
-\let\eq@objdef\@empty
-\def\@eqtaborder#1{\def\ef@arg{#1}\ifx\ef@arg\@empty
- \let\eq@taborder\@empty\else
- \def\eq@taborder{#1}\fi
-}
-\let\eq@taborder\@empty
-\def\ef@y{y}\def\ef@n{n}
-\def\@eqautoCenter#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y
- \let\autoCenter\ef@y\else\ifx\ef@arg\ef@n
- \let\autoCenter\ef@n\else\let\autoCenter\ef@y
- \PackageWarning{eforms}{The value of '#1' is not a
- supported value\MessageBreak for \string\autoCenter.\MessageBreak
- Using the default of 'y'}%
- \fi\fi}
-\let\autoCenter\ef@y
-\newif\ifeq@inlineCenter \eq@inlineCenterfalse
-\let\inlineCenter=n
-\def\@eqinline#1{\eq@inlineCenterfalse
- \def\ef@arg{#1}\ifx\ef@arg\ef@y
- \let\inlineCenter\ef@y\eq@inlineCentertrue\else
- \ifx\ef@arg\ef@n\let\inlineCenter\ef@n\else\let\inlineCenter\ef@n
- \PackageWarning{eforms}{The value of '#1' is not a
- supported value\MessageBreak for \string\inline.\MessageBreak
- Using the default of 'n'}%
- \fi\fi}
-\def\@eqsymbolchoice#1{\expandafter\ifx\csname eq@#1\endcsname\relax
- \typeout{exerquiz: `#1' is not an acceptable option
- for \string\symbolechoice, inserting default, `check'.}
- \edef\symbol@choice{\eq@check}\else
- \edef\symbol@choice{\csname eq@#1\endcsname}\fi
-}
-\newif\iffixmlinks \fixmlinkstrue
-\def\mlfixOn{\fixmlinkstrue}
-\def\mlfixOff{\fixmlinksfalse}
-\def\@eqmlfix#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y
- \mlfixOn\else\ifx\ef@arg\ef@n
- \mlfixOff\else\mlfixOn
- \PackageWarning{eforms}{The value of '#1' is not a
- supported value\MessageBreak for \string\mlfix.\MessageBreak
- Using the default of 'y'}%
- \fi\fi}
-\newbox\mlstrutbox
-\def\@eqmlstrut#1{\setbox\mlstrutbox\hbox{#1}%
- \def\ml@strut{\vrule \@height\ht\mlstrutbox
- \@depth\dp\mlstrutbox
- \@width\z@\relax}}
-\def\ml@strut{\relax\ifmmode\copy\mlstrutbox\else
- \unhbox\mlstrutbox\fi}
-\@eqmlstrut{\strut}
-\def\@eqmlcrackat#1{\def\eq@mlcrackat{#1}}
-\let\eq@mlcrackat\@empty
-\def\@eqmlhyph#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y
- \def\eq@mlhyph{-}\else\ifx\ef@arg\ef@n
- \let\eq@mlhyph\@empty\else\let\eq@mlhyph\@empty
- \PackageWarning{eforms}{The value of '#1' is not a
- supported value\MessageBreak for \string\mlhyph.\MessageBreak
- Using the default of 'n'}\fi\fi}
-\let\eq@mlhyph\@empty
-\def\@eqmlignore#1{\let\eq@mlignore\ef@YES}
-\let\eq@mlignore\ef@NO
-\def\@eqmlcrackinsat#1{\def\eq@mlcrackinsat{#1}}
-\let\eq@mlcrackinsat\@empty
-\def\eq@protect#1{\let#1\@empty}
-\begingroup\catcode`\#=12 \catcode`*=6
- \ifpdfmarkup
- \gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\else
- \gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\fi
-\endgroup
-\def\efHxError{\PackageError{eforms}{The glyph is not supported}{}}
-\def\HGERROR{efHxError}
-\ifpdfmarkup
- \def\HexGlyph#1#2{\def\arg@ii{#2}\ifx\arg@ii\HGERROR
- \global\@namedef{efHex#1}{\csname#2\endcsname}\else
- \global\@namedef{efHex#1}{\expandafter
- \string\csname#2\endcsname}\fi}
-\else
- \begingroup\catcode`\#=12 \catcode`*=6
- \gdef\HexGlyph*1*2{\def\arg@ii{*2}\ifx\arg@ii\HGERROR
- \global\@namedef{efHex*1}{\csname*2\endcsname}\else
- \global\@namedef{efHex*1}{#*1}\fi}
- \endgroup
-\fi
-\def\ef@inputPDFHEX{\InputIfFileExists{pdfdochex.def}
- {\PackageInfo{eforms}{Inputting pdfdochex.def}}{}}
-\AtEndOfPackage{\ef@inputPDFHEX}
-\def\ef@semicolon{;}
-\def\ef@stripsemi#1;\@nil{\def\ef@colorSpec@out{#1}}
-\def\ef@isitnamed{\let\ef@latex@color\ef@y
- \@ifnextchar[{\ef@gobbletonil}{%
- \@tfor\mytok:=.0123456789\do{%
- \if\mytok\@let@token
- \let\ef@latex@color\ef@n
- \@break@tfor\fi}\ef@gobbletonil}}
-\def\ef@gobbletonil#1\ef@nil{}
-\def\ef@parsePDFColor#1{\edef\ef@color@arg{#1}\ef@parsePDFColori}
-\def\ef@parsePDFColori{%
- \expandafter\ef@@parsePDFColor\ef@color@arg; ; ; ; ; ;\\}
-\def\ef@@parsePDFColor#1 #2 #3 #4 #5 #6\\{%
- \def\argii{#2}\def\ef@cmp{g;}%
- \ifx\argii\ef@cmp
- \expandafter\ifx\csname convertcolorspec\endcsname\relax
- \def\ef@colorSpec@out{#1 g}\else
- \def\ef@colorSpec@out{[gray]{#1}}%
- \fi
- \else\ifx\argii\ef@semicolon
- \expandafter\ifx\csname convertcolorspec\endcsname\relax
- \ef@isitnamed#1\ef@nil
- \ifx\ef@latex@color\ef@n
- \ef@stripsemi#1\@nil
- \edef\ef@colorSpec@out{\ef@colorSpec@out\space g}%
- \else
- \ef@stripsemi#1\@nil
- \PackageWarning{eforms}{Color specification
- `\ef@colorSpec@out' not supported\MessageBreak
- without xcolor, using a black color}
- \def\ef@colorSpec@out{0 g}%
- \fi
- \else % xcolor
- \ef@isitnamed#1\ef@nil
- \ifx\ef@latex@color\ef@n
- \ef@stripsemi#1\@nil
- \edef\ef@colorSpec@out{[gray]{\ef@colorSpec@out}}%
- \else
- \ef@stripsemi#1\@nil
- \edef\ef@colorSpec@out{\ef@colorSpec@out}%
- \fi
- \fi
- \else % not semicolon
- \def\argiv{#4}\def\ef@cmp{rg;}%
- \ifx\argiv\ef@cmp
- \expandafter\ifx\csname convertcolorspec\endcsname\relax
- \def\ef@colorSpec@out{#1 #2 #3 rg}\else
- \def\ef@colorSpec@out{[rgb]{#1,#2,#3}}\fi
- \else\ifx\argiv\ef@semicolon
- \expandafter\ifx\csname convertcolorspec\endcsname\relax
- \ef@stripsemi#1 #2 #3\@nil
- \edef\ef@colorSpec@out{\ef@colorSpec@out\space rg}\else
- \ef@stripsemi#3\@nil
- \edef\ef@colorSpec@out{[rgb]{#1,#2,\ef@colorSpec@out}}\fi
- \else
- \def\argv{#5}\edef\ef@cmp{k;}
- \ifx\argv\ef@cmp
- \expandafter\ifx\csname convertcolorspec\endcsname\relax
- \def\ef@colorSpec@out{#1 #2 #3 #4 k}\else
- \def\ef@colorSpec@out{[cmyk]{#1,#2,#3,#4}}\fi
- \else
- \ifx\argv\ef@semicolon
- \ef@stripsemi#1 #2 #3 #4\@nil
- \expandafter\ifx\csname convertcolorspec\endcsname\relax
- \edef\ef@colorSpec@out{\ef@colorSpec@out\space k}\else
- \ef@stripsemi#4\@nil
- \edef\ef@colorSpec@out{%
- [cmyk]{#1,#2,#3,\ef@colorSpec@out}}\fi
- \else\ef@parseColor@iv
- \fi\fi\fi\fi\fi\fi
-}
-\def\ef@parseColor@iv{\PackageError{AeB}{%
- The number of arguments
- is incorrect.\MessageBreak I was expecting
- 1, 3, or 4 components of color}{Specify the correct number of
- components for the color space.}}
-\def\calcOrder#1{\let\efCalcOrder\@gobble
- \@for\coi:=#1\do{\edef\efCalcOrder{\efCalcOrder,"\coi"}}%
- \edef\efCalcOrder{[\efCalcOrder]}}
-\@onlypreamble\calcOrder
-\def\efCalcOrder{[]}
-\def\eq@check{4}
-\def\eq@circle{l}
-\def\eq@cross{8}
-\def\eq@diamond{u}
-\def\eq@square{n}
-\def\eq@star{H}
-\let\symbolchoice\@eqsymbolchoice
-\symbolchoice{check}
-\providecommand{\JS}[1]{/S/JavaScript/JS(#1)}
-\newcommand{\URI}[1]{/S/URI/URI(#1)}
-\providecommand{\Named}[1]{/S/Named/N/#1}
-\newcommand{\Next}[1]{/Next<<#1>>}
-\providecommand{\toggleAttachmentsPanel}[2]{%
- \setLink[\Border{0 0 0}\A{\Named{ShowHideFileAttachment}}]
- {\textcolor{#1}{#2}}}%
-\newcommand{\AAMouseUp}[1]{/U<<#1>>}
-\newcommand{\AAMouseDown}[1]{/D<<#1>>}
-\newcommand{\AAMouseEnter}[1]{/E<<#1>>}
-\newcommand{\AAMouseExit}[1]{/X<<#1>>}
-\newcommand{\AAOnFocus}[1]{/Fo<<#1>>}
-\newcommand{\AAOnBlur}[1]{/Bl<<#1>>}
-\newcommand{\AAFormat}[1]{/F<<\JS{#1}>>}
-\newcommand{\AAKeystroke}[1]{/K<<\JS{#1}>>}
-\newcommand{\AAValidate}[1]{/V<<\JS{#1}>>}
-\newcommand{\AACalculate}[1]{/C<<\JS{#1}>>}
-\newcommand{\AAPageOpen}[1]{/PO<<\JS{#1}>>}
-\newcommand{\AAPageClose}[1]{/PC<<\JS{#1}>>}
-\newcommand{\AAPageVisible}[1]{/PV<<\JS{#1}>>}
-\newcommand{\AAPageInvisible}[1]{/PI<<\JS{#1}>>}
-\newcommand{\definePath}[1]{\def\ef@ctrlName{#1}%
- \hyper@normalise\ef@definePath}
-\def\ef@definePath#1{\expandafter\xdef\ef@ctrlName{#1}}
-\def\FHidden{2} % bit 2: hidden field
-\def\FPrint{4} % bit 3: print (we set this bit by default)
-\def\FNoPrint{-4} % bit 3: -print (this clears the bit)
-\def\FNoView{32} % bit 6: no view
-\def\FLock{128} % bit 8: locked field (PDF 1.4)
-\def\FfReadOnly{1} % all
-\def\FfRequired{2} % all
-\def\FfNoExport{4} % all
-\def\FfMultiline{4096} % text
-\def\FfPassword{8192} % text
-\def\FfNoToggleToOff{16384} % radio
-\def\FfRadio{32768} % radio
-\def\FfPushButton{65536} % Push button
-\def\FfCombo{131072} % choice
-\def\FfEdit{262144} % combo
-\def\FfSort{524288} % choice
-\def\FfFileSelect{1048576} % text (PDF 1.4)
-\def\FfMultiSelect{2097152} % choice (PDF 1.4)
-\def\FfDoNotSpellCheck{4194304} % text, combo (PDF 1.4)
-\def\FfDoNotScroll{8388608} % text (PDF 1.4)
-\def\FfComb{16777216} % text (PDF 1.5)
-\def\FfRadiosInUnison{33554432} % radio (PDF 1.5)
-\def\FfCommitOnSelChange{67108864} % choice (PDF 1.5)
-\def\FfRichText{33554432} % radio (PDF 1.5)
-\def\getFfValue/Ff#1\@nil{\def\eq@FfValue{#1}}
-\def\getFValue/F#1\@nil{\def\eq@FValue{#1}}
-\def\@getCmdName#1{\edef\@CmdName{\expandafter\@gobble\string#1}}
-\newcommand{\everyTextField}[1]{\def\every@TextField{#1}}
-\def\every@TextField{}
-\newcommand{\everySigField}[1]{\def\every@sigField{#1}}
-\def\every@sigField{}
-\newcommand{\everyCheckBox}[1]{\def\every@CheckBox{#1}}
-\def\every@CheckBox{}
-\newcommand{\everyRadioButton}[1]{\def\every@RadioButton{#1}}
-\def\every@RadioButton{}
-\newcommand{\everyButtonField}[1]{\def\every@ButtonField{#1}}
-\def\every@ButtonField{}
-\newcommand{\everyPushButton}[1]{\def\every@PushButton{#1}}
-\def\every@PushButton{}
-\newcommand{\everyListBox}[1]{\def\every@listBox{#1}}
-\newcommand{\everyComboBox}[1]{\def\every@comboBox{#1}}
-\def\every@listBox{}\def\every@comboBox{}
-\newcommand{\everyLink}[1]{\def\every@Link{#1}}
-\def\every@Link{}
-\def\ef@adjrectWH#1{\dimen@ii#1\relax
- \ifx\eq@rectW\@empty\else
- \eflength\eq@rectW\relax
- \advance\eflength\dimen@ii
- \edef\eq@rectW{\the\eflength}%
- \eflength\eq@rectH\relax
- \advance\eflength\dimen@ii
- \edef\eq@rectH{\the\eflength}%
- \fi
-}
-\def\ef@djXPD{\ifxetex\ifmakeXasPD\ef@adjrectWH{2bp}\fi
- \else\ifmakePDasX\ef@adjrectWH{-2bp}\fi\fi}
-\def\ef@btnspcr{}
-\def\eq@setButtonProps#1#2{%
- \makeJSspecials
- \processAppArgs#2\end\@nil % set widget properties
- \ifx\eq@BC\@empty\@eqW{}\else
- \if\eq@W@value0\let\eq@BC\@empty\fi\fi
- \Hy@pdfstringfalse
- \ifx\eq@rectW\@empty
- \ifnum\eq@textSize=0 \else
- \dimen@=\eq@textSize bp
- \dimen@1.00375\dimen@
- \edef\eq@textSize@pt{\strip@pt\dimen@}%
- \fontsize{\eq@textSize@pt}{0}\selectfont
- \fi
- \dimen@\eq@W@value bp
- \def\eq@S@B{B}\ifx\eq@S@value\eq@S@B
- \def\eq@btn@sp{\hbox to2\dimen@{\hfill}}%
- \else
- \def\eq@btn@sp{\hbox to\dimen@{\hfill}}%
- \fi
- \expandafter\def\expandafter
- \ef@btnspcr\expandafter{\ef@btnspcr\eq@btn@sp}%
- \sbox{\eq@tmpbox}{\ef@btnspcr\eq@CA\ef@btnspcr}%
- \eq@tmpdima=\wd\eq@tmpbox
- \sbox{\eq@tmpbox}{\ef@btnspcr\eq@RC\ef@btnspcr}%
- \ifdim\eq@tmpdima>\wd\eq@tmpbox\else
- \eq@tmpdima=\wd\eq@tmpbox\fi%
- \sbox{\eq@tmpbox}{\ef@btnspcr\eq@AC\ef@btnspcr}%
- \ifdim\eq@tmpdima>\wd\eq@tmpbox\else
- \eq@tmpdima=\wd\eq@tmpbox\fi
- \ifmakePDasX\advance\eq@tmpdima2bp\fi
- \wd\eq@tmpbox=\eq@tmpdima
- \else
- \wd\eq@tmpbox=\eq@rectW
- \fi
- \ef@djXPD#1% dps 12/22
-}
-\def\eq@setWidgetProps#1#2{%
- \makeJSspecials
- \processAppArgs#2\end\@nil % set widget properties
- \ifx\annot@type@link\annot@type\else
- \ifx\eq@BC\@empty\@eqW{}\else
- \if\eq@W@value0\let\eq@BC\@empty\fi\fi
- \fi
- \ef@djXPD#1% dps 12/22
-}
-\def\ef@sanitize@toks{\@makeother\~\@makeother\#\@makeother\&%
- \@makeother\"\@makeother\_}
-\newcommand\efKern[2]{\ifxetex\kern#2\else\kern#1\fi}
-\newcommand\olBdry{\bgroup\ifxetex % dps 12/22
- \@tempdima-\g@eq@W@value@bp\relax
- \edef\@mtkern{\the\@tempdima}\else
- \@tempdima2bp\relax\advance\@tempdima-\g@eq@W@value@bp\relax % 12/26
- \edef\@mtkern{\the\@tempdima}\fi\kern\@mtkern\egroup
-}
-\newcommand\cgBdry[1][0bp]{\bgroup\def\ef@rgi{#1}\ifx\ef@rgi\@empty
- \def\ef@rgi{0bp}\fi\setlength{\@tempdima}{\ef@rgi}%
- \ifxetex\else\addtolength{\@tempdima}{2bp}\fi
- \kern\@tempdima\egroup\ignorespaces}
-\newcommand{\efSupprIndent}{\ef@scratchtoks=\expandafter{\the\everypar}%
- \everypar{{\setbox\z@\lastbox}\clubpenalty\@M
- \everypar=\expandafter{\the\ef@scratchtoks}}}
-\newcommand\volBdry{\bgroup\parskip0pt\relax\@@par\nointerlineskip
- \olBdry\egroup\efSupprIndent}
-\newcommand\vcgBdry{\@ifstar{\edef\ef@offset{\the\parskip}\vcgBdry@i}
- {\def\ef@offset{0pt}\vcgBdry@i}}
-\newcommand\vcgBdry@i[1][0bp]{\bgroup
- \setlength{\ef@dimena}{#1-\ef@offset}\parskip0pt\relax
- \par\nointerlineskip\cgBdry[\ef@dimena]%
- \egroup\ignorespaces\efSupprIndent}
-\def\common@choiceCode{%
- /Subtype/Widget
- /T (\Fld@name)
- /FT/Ch
- \eq@Ff
- \eq@F
- \eq@TU
- \eq@TI
- /BS << \eq@W\eq@S >>
- /MK <<\eq@R\eq@BC\eq@BG\eq@mkIns>>
- /DA (\eq@DA)
- /Opt [\eq@Opt]
- \eq@DV\eq@V
- \eq@A\eq@AA
- \eq@rawPDF
-}
-\def\eqf@setDimens#1#2{\@eqrectW{#1}\@eqrectH{#2}}
-\let\ef@@nil\relax
-\def\@gobbleto@@nil#1\ef@@nil{}%
-\long\def\g@addto@macrogobble#1#2{\g@addto@macro{#1}{#2}\@gobbleto@@nil}
-\def\passthruCLOpts{*}
-\def\ef@pdfstrCLOpt{\Hy@unicodefalse\def\eq@Opt{}\ef@pdfstrCLOpti}
-\def\ef@pdfstrCLOpti{\@ifnextchar\ef@@nil{\@gobble}{\ef@pdfstrCLOptia}}
-\def\ef@pdfstrCLOptia{\@ifnextchar[{\expandafter
- \ef@pdfstrOptWBii\@gobble}{\ef@pdfstrCLOptb}}
-\def\ef@pdfstrCLOptb{\@ifstar{\g@addto@macrogobble\eq@Opt}
- {\ef@pdfstrOptWPi}}
-\def\ef@pdfstrOptWBii{%
- \@ifnextchar({\ef@pdfstrOptWBiia}{\PackageError{eforms}
- {Left parenthesis expected here}{}}%
-}
-\def\ef@pdfstrOptWBiia(#1){%
- \g@addto@macro\eq@Opt{[(}%
- \pdfstringdef\@optTokstemp{#1}%
- \expandafter\g@addto@macro\expandafter\eq@Opt
- \expandafter{\@optTokstemp}%
- \@ifnextchar({\ef@pdfstrOptWBiib}{\PackageError{eforms}
- {Left parenthesis expected here}{}}%
-}
-\def\ef@pdfstrOptWBiib(#1){%
- \g@addto@macro\eq@Opt{)(}%
- \pdfstringdef\@optTokstemp{#1}%
- \expandafter\g@addto@macro\expandafter\eq@Opt
- \expandafter{\@optTokstemp}%
- \g@addto@macro\eq@Opt{)]}%
- \expandafter\ef@pdfstrCLOpti\@gobble
-}
-\def\ef@pdfstrOptWPi{\@ifnextchar\ef@@nil{\@gobble}{\ef@pdfstrOptWPii}}
-\def\ef@pdfstrOptWPii(#1){%
- \g@addto@macro\eq@Opt{(}%
- \pdfstringdef\@optTokstemp{#1}%
- \expandafter\g@addto@macro\expandafter\eq@Opt
- \expandafter{\@optTokstemp}%
- \g@addto@macro\eq@Opt{)}%
- \ef@pdfstrCLOpti}
-\def\annot@type@listbox{listbox}
-\newcommand\list@@Box[8]{\begingroup
- \edef\annot@type{\annot@type@listbox}%
- \pdfstringdef\Fld@name{#2}%
- \expandafter\ef@pdfstrCLOpt#5\ef@@nil
- \eqf@setDimens{#3}{#4}%
- \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
- \@processEvery#8\end\noindent#6#7{#1}%
-}
-\def\listBoxDefaults{%
- \W{1}\S{I}\F{\FPrint}\BC{0 0 0}
-}
-\newcommand\listBox{\begingroup
- \ef@sanitize@toks\ef@listbox
-}
-\newcommand{\ef@listbox}[1][]{%
- \endgroup\ef@listBox[#1]%
-}
-\newcommand\ef@listBox[5][]{%
- \mbox{\list@@Box{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
- \eq@choice@driver}{\listBoxDefaults\every@listBox}}%
-}
-\def\annot@type@combobox{combobox}
-\newcommand\combo@@Box[8]{\begingroup
- \edef\annot@type{\annot@type@combobox}%
- \@eqFf{\FfCombo}\pdfstringdef\Fld@name{#2}%
- \expandafter\ef@pdfstrCLOpt#5\ef@@nil
- \eqf@setDimens{#3}{#4}%
- \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
- \@processEvery#8\end\noindent#6#7{#1}%
-}
-\def\comboBoxDefaults{%
- \W{1}\S{I}\F{\FPrint}\BC{0 0 0}
-}
-\newcommand\comboBox{\begingroup
- \ef@sanitize@toks\ef@combobox
-}
-\newcommand{\ef@combobox}[1][]{%
- \endgroup\ef@comboBox[#1]%
-}
-\newcommand\ef@comboBox[5][]{%
- \mbox{\combo@@Box{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
- \eq@choice@driver}{\comboBoxDefaults\every@comboBox}}%
-}
-\def\common@pushButtonCode{%
- /Subtype/Widget
- /T (\Fld@name)
- /FT/Btn
- \eq@Ff
- \eq@TU
- \eq@H
- \eq@F
- /BS <<\eq@W\eq@S >>
-\ifx\eq@AP\@empty
- /MK <<\eq@R\eq@BC\eq@BG%
- \ef@kvCA\ef@kvRC\ef@kvAC\eq@IconMK\eq@mkIns>>
-\else
- \eq@AP
-\fi
- /DA (\eq@DA)
- \eq@A\eq@AA
- \eq@rawPDF
-}
-\def\common@RadioCheckCode{%
- /Subtype/Widget
- /T (\Fld@name)
- /FT/Btn
- \eq@Ff
- \eq@F
- \eq@TU
- /BS <<\eq@W\eq@S>>
-\ifx\eq@AP\@empty
- /AP<< /N <<\eq@On<<>>>> >>
- \eq@MK
-\else
- \eq@AP
-\fi
- /DA (\eq@DA)
- \eq@AS
- \eq@DV\eq@V
- \eq@A\eq@AA
- \eq@rawPDF
-}
-\def\annot@type@button{pushbtn}
-\newcommand\push@@Button[7]{\begingroup
- \edef\annot@type{\annot@type@button}%
- \pdfstringdef\Fld@name{#2}%\edef\Fld@name{#2}%
- \makeJSspecials\ef@preProcDefns
- \def\eq@Ff{/Ff \FfPushButton}%
- \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
- \eqf@setDimens{#3}{#4}%
- \@processEvery#7\end\noindent#5#6{#1}%
-}
-\def\pushButtonDefaults{%
- \W{1}\S{B}\F{\FPrint}\BC{0 0 0}
- \H{P}\BG{.7529 .7529 .7529}
-}
-\newcommand\pushButton{\begingroup
- \ef@sanitize@toks\ef@pushbutton
-}
-\newcommand{\ef@pushbutton}[1][]{%
- \endgroup\ef@pushButton[#1]%
-}
-\newcommand\ef@pushButton[4][]{%
- \mbox{\push@@Button{#1}{#2}{#3}{#4}{}{%
- \eq@setButtonProps\eq@Button@driver}%
- {\pushButtonDefaults\every@PushButton}}%
-}
-\def\annot@type@checkbox{checkbox}
-\newcommand\check@@Box[8]
-{%
- \begingroup\let\#\ef@Hx
- \edef\annot@type{\annot@type@checkbox}%
- \pdfstringdef\Fld@name{#2}\@eqAS{Off}%
- \def\@eqDV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty\let\eq@DV\@empty
- \else\ifpdfmarkup\def\eq@DV{/DV(##1) cvn }\else
- \def\eq@DV{/DV/##1}\fi\fi}%
- \def\@eqV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty
- \let\eq@V\@empty\else\ifpdfmarkup\def\eq@V{/V(##1) cvn }\else
- \def\eq@V{/V/##1}\fi\@eqAS{##1}\fi}%
- \eqf@setDimens{#3}{#4}%
- \ifpdfmarkup\def\eq@On{(#5) cvn }\else
- \def\eq@On{/#5}\fi\@eqtextFont{ZaDb}%
- \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
- \@eqMK{\eq@R\eq@BC\eq@BG/CA(\symbol@choice)\eq@mkIns}%
- \@processEvery#8\end\noindent#6#7{#1}%
-}
-\def\checkBoxDefaults{%
- \F{\FPrint}\W{1}\S{S}\BC{0 0 0}%
-}
-\newcommand\checkBox{\begingroup
- \ef@sanitize@toks\ef@checkbox
-}
-\newcommand{\ef@checkbox}[5][]{%
- \endgroup\mbox{\check@@Box{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
- \eq@RadioCheck@driver}{\checkBoxDefaults\every@CheckBox}}%
-}
-\def\annot@type@radio{radiobtn}
-\newcommand\radio@@Button[8]{\begingroup\let\#\ef@Hx
- \edef\annot@type{\annot@type@radio}%
- \pdfstringdef\Fld@name{#2}\@eqAS{Off}%
- \def\@eqDV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty\let\eq@DV\@empty
- \else\ifpdfmarkup\def\eq@DV{/DV(##1) cvn }\else
- \def\eq@DV{/DV/##1}\fi\fi}%
- \def\@eqV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty
- \let\eq@V\@empty\else\ifpdfmarkup\def\eq@V{/V(##1) cvn }\else
- \def\eq@V{/V/##1}\fi\@eqAS{##1}\fi}%
- \eqf@setDimens{#3}{#4}%
- \ifpdfmarkup\def\eq@On{(#5) cvn }\else\def\eq@On{/#5}\fi
- \def\eq@Ff{/Ff \FfRadio}\@eqtextFont{ZaDb}%
- \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
- \@eqMK{\eq@R\eq@BC\eq@BG/CA(\symbol@choice)\eq@mkIns}%
- \@processEvery#8\end\noindent#6#7{#1}%
-}
-\def\radioButtonDefaults
-{%
- \W{1}\S{S}\BC{0 0 0}\F{\FPrint}
-}
-\newcommand\radioButton{\begingroup
- \ef@sanitize@toks\ef@radiobutton
-}
-\newcommand{\ef@radiobutton}[5][]{\endgroup
- \mbox{\radio@@Button{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
- \eq@RadioCheck@driver}{\radioButtonDefaults\every@RadioButton}}%
-}
-\newcommand\ef@radioButton[5][]
-{%
- \mbox{\radio@@Button{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
- \eq@RadioCheck@driver}{\radioButtonDefaults\every@RadioButton}}%
-}
-\def\common@TextFieldCode
-{%
- /Subtype/Widget
- /T (\Fld@name)
- /FT/Tx
- \eq@Ff
- \eq@F
- \eq@Q
- \eq@TU
- \eq@MaxLen
- /BS <<\eq@W\eq@S>>
- /MK <<\eq@R\eq@BC\eq@BG\eq@mkIns>>
- /DA (\eq@DA)
- \eq@DV\eq@V
- \eq@RV\eq@DS
- \eq@A\eq@AA
- \eq@rawPDF
-}
-\def\annot@type@text{textfld}
-\newcommand\text@@Field[7]
-{%
- \begingroup
- \edef\annot@type{\annot@type@text}%
- \pdfstringdef\Fld@name{#2}\def\eq@Title{#2}%
- \eqf@setDimens{#3}{#4}%
- \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
- \@processEvery#7\end\noindent#5#6{#1}%
-}
-\def\textFieldDefaults
-{%
- \F{\FPrint}\BC{0 0 0}\W{1}\S{S}
-}
-\newcommand\textField{\begingroup
- \ef@sanitize@toks\ef@textfield
-}
-\newcommand{\ef@textfield}[2][]{%
- \endgroup\ef@textField[#1]{#2}%
-}
-\newcommand\ef@textField[4][]
-{%
- \mbox{\text@@Field{#1}{#2}{#3}{#4}{}%
- {\eq@setWidgetProps\eq@TextField}%
- {\textFieldDefaults\every@TextField}}%
-}
-\let\eqTextField\textField
-\let\calcTextField\textField
-\def\common@SigFieldCode
-{%
- /Subtype /Widget
- /T (\Fld@name)
- /FT/Sig
- \eq@F
- \eq@TU
- /BS <<\eq@W\eq@S>>
- /MK <<\eq@R\eq@BC\eq@BG\eq@mkIns>>
- /DA (\eq@DA)
- \eq@Lock
- \eq@A\eq@AA
- \eq@rawPDF
-}
-\def\annot@type@sig{sigfld}
-\newcommand\sig@@Field[7]{%
- \begingroup
- \edef\annot@type{\annot@type@sig}%
- \pdfstringdef\Fld@name{#2}\def\eq@Title{#2}%
- \eqf@setDimens{#3}{#4}%
- \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
- \@processEvery#7\end\noindent#5#6{#1}%
-}
-\def\sigFieldDefaults
-{%
- \F{\FPrint}\BC{}\BG{}\W{1}\S{S}
-}
-\newcommand\sigField{\begingroup
- \ef@sanitize@toks\ef@sigfield
-}
-\newcommand{\ef@sigfield}[1][]{%
- \endgroup\ef@sigField[#1]%
-}
-\newcommand\ef@sigField[4][]
-{%
- \mbox{\sig@@Field{#1}{#2}{#3}{#4}{}{\eq@setWidgetProps\eq@SigField}%
- {\sigFieldDefaults\every@sigField}}%
-}
-\def\common@LinkCode
-{%
- \eq@A % Action
- \eq@H % Highlight
- \eq@Color % Border color
- \link@BS % Border styles
- \eq@rawPDF % everything else
-}
-\def\annot@type@link{link}
-\newcommand\set@@Link[7]
-{%
- \begingroup
- \makeJSspecials
- \edef\annot@type{\annot@type@link}%
- \ef@preProcDefns
- \eqf@setDimens{#2}{#3}%
- \ifx\eq@rectW\@empty\def\link@@Box{#4}\else
- \def\eq@arg{#4}\ifx\eq@arg\@empty
- \def\eq@content{\hfill\vfill}\else\def\eq@content{#4}\fi
- \def\link@@Box{\parbox[\eq@pos][\eq@rectH][\eq@innerpos]%
- {\eq@rectW}{\centering\eq@content}}%
- \fi
- \@processEvery#7\end\noindent#5#6{#1}%
-}
-\def\defaultlinkcolor{\@linkcolor}
-\def\setDef@ultLinkColor{\ifHy@colorlinks
- \def\ef@thislinkcolor{\defaultlinkcolor}
- \def\ef@colorthislink{\color{\ef@thislinkcolor}}\else
- \let\ef@colorthislink\relax\fi
-}
-\AtBeginDocument{\setDef@ultLinkColor}
-\def\set@LinkTextDefaults{\S{S}\Border{0 0 0}}
-\newcommand\setLink{\begingroup
- \ef@sanitize@toks\ef@setlinktext
-}
-\let\setLinkText\setLink
-\newcommand{\ef@setlinktext}[1][]{%
- \endgroup\ef@searchmlLink#1\mlLink\end\@nil
- \ifx\ef@mlLink\ef@Zero\def\ef@next{\set@LinkText[#1]}\else
- \def\ef@next{\mlhypertext[#1]}\fi\ef@next
-}
-\newcommand\set@LinkText[2][]{%
- \set@@Link{#1}{}{}{\ef@colorthislink#2}{}%
- {\eq@setWidgetProps{\ef@postProcLinkProps\setLink@driver}}%
- {\set@LinkTextDefaults\every@Link}%
-}
-\def\ef@preProcDefns{%
- \def\Win##1{/Win <<##1>>}%
- \def\fitpage{\dl@fitpage}\def\actualsize{\dl@actualsize}%
- \def\fitwidth{\dl@fitwidth}\def\fitheight{\dl@fitheight}%
- \def\fitvisible{\dl@fitvisible}\def\inheritzoom{\dl@inheritzoom}%
- \let\rPage\ef@rPage
- \edef\Page##1{\ifcase\eq@drivernum
- {Page##1}\or
- \noexpand\pdfpageref##1\space\space 0 R\or
- \noexpand @page##1\fi
- }%
-}
-\def\ef@postProcLinkProps{}
-\newcommand{\mlsetLink}{\mlhypertext}
-\newcommand{\mlhypertext}[2][]{\@ifundefined{mlhypertext@i}
- {\PackageWarning{eforms}{The \string\mlhypertext\space command
- does nothing unless\MessageBreak the aeb_mlink package is loaded}}{}%
- #2}
-\def\set@LinkBboxDefaults{\S{S}\Border{0 0 0}}
-\newcommand{\setLinkBbox}{\begingroup
- \ef@sanitize@toks\ef@linkbbox
-}
-\newcommand{\ef@linkbbox}[1][]{%
- \endgroup\ef@setLinkBbox[#1]%
-}
-\newcommand{\ef@setLinkBbox}[3][]{%
- \@setLinkBbox{#1}{#2}{#3}%
-}
-\def\@setLinkBbox#1#2#3{\@ifnextchar[{\@@setLinkBbox{#1}{#2}{#3}}%
- {\@@setLinkBbox{#1}{#2}{#3}[c]}}
-\def\@@setLinkBbox#1#2#3[#4]{%
- \@ifnextchar[{\@@@setLinkBbox{#1}{#2}{#3}{#4}}%
- {\@@@setLinkBbox{#1}{#2}{#3}{#4}[#4]}%
-}
-\def\@@@setLinkBbox#1#2#3#4[#5]#6{%
- \def\eq@pos{#4}\def\eq@innerpos{#5}%
- \set@@Link{#1}{#2}{#3}{\ef@colorthislink#6}%
- {\eq@setWidgetProps\setLink@driver}{}%
- {\set@LinkBboxDefaults\every@Link}%
-}
-\def\set@LinkPboxDefaults{\S{S}\Border{0 0 0}}
-\newcommand\setLinkPbox{\begingroup
- \ef@sanitize@toks\ef@linkpbox
-}
-\newcommand{\ef@linkpbox}[1]{%
- \endgroup\ef@setLinkPbox{#1}%
-}
-\newcommand\ef@setLinkPbox[1]{%
- \@setLinkPbox{#1\BS{}}{}{}{\hfill\vfill}%
-}
-\def\@setLinkPbox#1#2#3{\@ifnextchar[{\@@setLinkPbox{#1}{#2}{#3}}%
- {\@@setLinkPbox{#1}{#2}{#3}[c]}}
-\def\@@setLinkPbox#1#2#3[#4]{%
- \@ifnextchar[{\@@@setLinkPbox{#1}{#2}{#3}{#4}}%
- {\@@@setLinkPbox{#1}{#2}{#3}{#4}[#4]}
-}
-\def\@@@setLinkPbox#1#2#3#4[#5]#6{%
- \def\eq@pos{#4}\def\eq@innerpos{#5}%
- \set@@Link{#1}{#2}{#3}{#6}{\eq@setWidgetProps\setLinkPbox@driver}%
- {}{\set@LinkPboxDefaults\every@Link}%
-}
-\input{\eq@drivercode}
-\inputCalcOrderJS
-\endinput
-%%
-%% End of file `eforms.sty'.
+%%
+%% This is file `eforms.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% eforms.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% eForms package, %%
+%% Copyright (C) 2002-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{eforms}
+ [2018/08/16 v2.9.20 Provides general eforms support (dps)]
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+\RequirePackage{ifluatex}
+\RequirePackage{calc}
+\let\ef@driver\@empty
+\DeclareOption{dvipsone}{\def\eq@drivernum{0}%
+ \def\eq@drivername{0}\def\ef@driver{dvipsone}%
+ \def\eq@drivercode{epdfmark.def}%
+ \PassOptionsToPackage{dvipsone}{insdljs}%
+ \PassOptionsToPackage{dvipsone}{hyperref}%
+}
+\def\eq@drivername{2}
+\DeclareOption{dvips}{\def\eq@drivernum{0}%
+ \def\eq@drivername{1}\def\ef@driver{dvips}%
+ \def\eq@drivercode{epdfmark.def}%
+ \PassOptionsToPackage{dvips}{insdljs}%
+ \PassOptionsToPackage{dvips}{hyperref}%
+}
+\DeclareOption{pdftex}{%
+ \def\eq@drivernum{1}\def\eq@driver{pdftex}%
+ \def\eq@drivercode{epdftex.def}\def\ef@driver{pdftex}%
+}
+\DeclareOption{luatex}{%
+ \def\eq@drivernum{1}\def\eq@driver{luatex}%
+ \def\eq@drivercode{epdftex.def}\def\ef@driver{luatex}%
+}
+\DeclareOption{dvipdfm}{%
+ \def\eq@drivernum{2}\def\eq@driver{dvipdfm}%
+ \def\eq@drivercode{edvipdfm.def}\def\ef@driver{dvipdfm}%
+ \PassOptionsToPackage{dvipdfm}{insdljs}
+ \PassOptionsToPackage{dvipdfm}{hyperref}
+}
+\DeclareOption{dvipdfmx}{%
+ \def\eq@drivernum{2}\def\eq@driver{dvipdfmx}%
+ \def\eq@drivercode{edvipdfm.def}\def\ef@driver{dvipdfmx}%
+ \PassOptionsToPackage{dvipdfmx}{insdljs}
+ \PassOptionsToPackage{dvipdfmx}{hyperref}
+}
+\DeclareOption{xetex}{%
+ \def\eq@drivernum{2}\def\eq@driver{xetex}%
+ \def\eq@drivercode{edvipdfm.def}\def\ef@driver{xetex}%
+}
+\DeclareOption{textures}{%
+ \def\eq@drivernum{3}\def\eq@driver{textures}%
+ \def\eq@drivercode{epdfmark.def}\def\ef@driver{textures}%
+ \PassOptionsToPackage{textures}{insdljs}%
+ \PassOptionsToPackage{textures}{hyperref}
+}
+\def\eq@driver{dvipsone/dvips}
+\def\eq@drivercode{epdfmark.def}
+\DeclareOption{preview}{\previewtrue}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{insdljs}}
+\@ifundefined{ifpreview}{\newif\ifpreview\previewfalse}{}
+\providecommand{\previewOn}{\previewtrue}
+\providecommand{\previewOff}{\previewfalse}
+\DeclareOption{useui}{\AtEndOfPackage{\ef@InputUIeForms}}
+\def\ef@InputUIeForms{\InputIfFileExists{uieforms.def}%
+ {\PackageInfo{eforms}{Inputting code for useui option}}%
+ {\PackageInfo{eforms}{Cannot find uieforms.def.\MessageBreak
+ Reinstall or refresh your file name database.}}}
+\DeclareOption{setcorder}{\def\inputCalcOrderJS{%
+ \InputIfFileExists{setcorder.def}%
+ {\PackageInfo{eforms}{Inputting code for setcorder option}}%
+ {\PackageWarning{eforms}{Cannot find setcorder.def.\MessageBreak
+ Reinstall or refresh your file name database.}}}}
+\let\inputCalcOrderJS\relax
+\@ifpackageloaded{web}{%
+ \ExecuteOptions{\eq@driver@name}%
+}{%
+ \@ifpackageloaded{exerquiz}{%
+ \ExecuteOptions{\eq@driver}%
+ }{%
+ \ifluatex\ExecuteOptions{luatex}\else
+ \ifpdf\ExecuteOptions{pdftex}\else
+ \ifxetex\ExecuteOptions{xetex}\else
+ \@ifundefined{l@tex@@@@driver}{\ExecuteOptions{dvips}}
+ {\ExecuteOptions{dvipsone}}\fi\fi\fi
+ }%
+}
+\ProcessOptions
+\ifx\ef@driver\@empty
+ \PackageError{eforms}%
+ {You have not specified dvips, dvipsone, pdftex,\MessageBreak
+ dvipdfm, dvipdfmx, or xetex in the option list of\MessageBreak
+ the eforms package}
+ {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm,
+ dvipdfmx, or xetex
+ \MessageBreak in the option list of the eforms package.}%
+}{}
+\fi
+\newlength\eflength
+\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
+\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
+\RequirePackage{hyperref}
+\ifxetex\else\ifpdf\pdflinkmargin1bp\relax\else
+ \g@addto@macro\Hy@FirstPageHook{%
+ \headerps@out{/HyperBorder {1.00375 PDFToDvips} def}}
+\fi\fi
+\RequirePackage{insdljs}[2017/01/03] % incl conv-xkv
+\@ifpackageloaded{exerquiz}{}{%
+ \AtBeginDocument{\Form}
+ \AtEndDocument{\csname endForm\endcsname}
+}
+\@ifpackageloaded{aeb_pro}{}{%
+ \newcommand{\taggedPDF}{%
+ \ifnum\eq@drivernum=0\relax
+ \literalps@out{[{Catalog} <<%
+ /MarkInfo<</Marked true>>%
+ >> /PUT pdfmark}\fi}%
+}
+\let\ef@YES=y \let\ef@NO=n
+\let\ef@One=1 \let\ef@Zero=0
+\ifnum\eq@drivername<2
+\let\to@usepdfmark\ef@One
+\RequirePackage[structure]{taborder}\else
+\let\to@usepdfmark\ef@Zero
+\RequirePackage{taborder}
+\fi
+\@ifundefined{eq@tmpbox}{\newsavebox{\eq@tmpbox}}{}
+\@ifundefined{eq@tmpdima}{\newdimen\eq@tmpdima}{}
+\@ifundefined{eq@tmpdimb}{\newdimen\eq@tmpdimb}{}
+\newlength\ef@dimena
+\newtoks\ef@scratchtoks
+\newif\ifmakeXasPD \makeXasPDtrue % 12/22
+\newif\ifmakePDasX \makePDasXfalse
+\def\makeXasPDOn{\makeXasPDtrue\makePDasXfalse}
+\def\makeXasPDOff{\makeXasPDfalse}
+\def\makePDasXOn{\makePDasXtrue\makeXasPDfalse}
+\def\makePDasXOff{\makePDasXfalse}
+\providecommand\ckboxColor[1]{\def\@rgi{#1}\ifx\@rgi\@empty
+ \let\ckbox@Color\relax\else
+ \def\ckbox@Color{\color{#1}}\fi}\let\ckbox@Color\relax
+\def\ef@Bbox#1#2{\hbox{\ifpreview
+ \setlength\fboxrule{0.4pt}\setlength\fboxsep{0pt}%
+ \@tempdima=#1\advance\@tempdima by-\fboxrule
+ \@tempdimb=#2\advance\@tempdimb by-\fboxrule \ckbox@Color
+ \fbox{\parbox[b][\@tempdimb][c]{\@tempdima}{\hfill\vfill}}\else
+ \parbox[b][#2][c]{#1}{\hfill\vfill}\fi}%
+}
+\let\Bbox\ef@Bbox
+\let\ef@passedArgs\@empty
+\def\processAppArgs#1#2{%
+ \ifx\end#1% if #1=\end, #2=\@nil.
+ \let\ef@next\relax
+ \else
+ \ifx#1\@empty
+ \def\ef@next{\processAppArgs}%
+ \else
+ \@getCmdName{\ui}\edef\arg@ui{\@CmdName}%
+ \@getCmdName{#1}%
+ \ifx\arg@ui\@CmdName
+ \@ifundefined{@equi}{\PackageError{eforms}%
+ {The user interface '\string\ui' is not defined!%
+ \MessageBreak Use the useui option of eforms
+ and try again}{I said, use the useui option of
+ eforms and try again!}}{}%
+ \def\ef@next{\setkeys{eforms}{#2}%
+ \processAppArgs\presets{\ef@passedArgs}}%
+ \else
+ \@getCmdName{\Ff}\edef\arg@Ff{\@CmdName}%
+ \@getCmdName{#1}%
+ \ifx\arg@Ff\@CmdName % if \Ff, let's add arguments
+ \ifx\eq@Ff\@empty\def\eq@FfValue{0}\else
+ \expandafter\getFfValue\eq@Ff\@nil\fi
+ \@tempcnta=\eq@FfValue
+ \def\eq@arg{#2}%
+ \ifx\eq@arg\@empty\else
+ \advance\@tempcnta by#2\fi
+ \edef\eq@Ff{/Ff \the\@tempcnta}%
+ \def\ef@next{\processAppArgs}%
+ \else
+ \@getCmdName{\F}\edef\arg@F{\@CmdName}%
+ \@getCmdName{#1}%
+ \ifx\arg@F\@CmdName % if \Ff, let's add arguments
+ \ifx\eq@F\@empty\def\eq@FValue{0}\else
+ \expandafter\getFValue\eq@F\@nil\fi
+ \@tempcnta=\eq@FValue
+ \def\eq@arg{#2}%
+ \ifx\eq@arg\@empty\else
+ \advance\@tempcnta by#2\fi
+ \edef\eq@F{/F \the\@tempcnta}%
+ \def\ef@next{\processAppArgs}%
+ \else
+ \@getCmdName{\presets}%
+ \edef\arg@presets{\@CmdName}\@getCmdName{#1}%
+ \ifx\arg@presets\@CmdName
+ \def\ef@next{\expandafter\processAppArgs#2}%
+ \else
+ \csname @eq%
+ \expandafter\@gobble\string#1\endcsname{#2}%
+ \def\ef@next{\processAppArgs}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \ef@next
+}
+\def\@processEvery{\edef\eqtemp{}\toks0={}\@@processEvery}
+\def\@@processEvery#1{%
+ \ifx#1\end\def\ef@next{\the\toks0 }%
+ \else
+ \edef\eqtemp{\the\toks0 }%
+ \toks0=\expandafter{\eqtemp
+ \expandafter\processAppArgs#1\end\@nil}%
+ \def\ef@next{\@@processEvery}%
+ \fi
+ \ef@next
+}
+\newdimen\eqcenterWidget
+\def\centerWidget#1{%
+ \ifeq@inlineCenter
+ \eqcenterWidget=#1\relax
+ \eqcenterWidget=.5\eqcenterWidget
+ \ifnum\eq@textSize=0\relax
+ \dimen@=-\eq@textSizeDefault bp\else
+ \dimen@=-\eq@textSize bp\fi
+ \dimen@=0.9167\dimen@ % 11/12
+ \dimen@=.5\dimen@
+ \advance\dimen@\eq@W@value bp
+ \ifx\eq@S\@empty\else
+ \def\eq@S@cmp{B}%
+ \ifx\eq@S@value\eq@S@cmp
+ \advance\dimen@ by \eq@W@value bp
+ \else
+ \def\eq@S@cmp{I}%
+ \ifx\eq@S@value\eq@S@cmp
+ \advance\dimen@ by \eq@W@value bp
+ \else\advance\dimen@ by 1bp
+ \fi\fi\fi
+ \advance\eqcenterWidget by \dimen@
+ \else
+ \eqcenterWidget=#1\relax
+ \eqcenterWidget=.5\eqcenterWidget
+ \advance\eqcenterWidget by -4bp
+ \fi
+}
+\def\@eqF#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@F\@empty\else\def\eq@F{/F #1}\fi}\def\eq@F{}
+\def\@eqBS#1{%
+ \let\eq@BS=0\relax
+ \ifx\eq@W\@empty\else\let\eq@BS=1\fi
+ \ifx\eq@S\@empty\else\let\eq@BS=1\fi
+ \ifx\eq@D\@empty\else\let\eq@BS=1\fi
+ \edef\link@BS{\if\eq@BS1/BS<<\eq@W\eq@S\eq@D>>\fi}%
+ \ifx\eq@W\@empty\let\link@BS\@empty\fi
+}\def\link@BS{}
+\def\@eqpresets#1{#1}%
+\def\@eqW#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@W\@empty\def\eq@W@value{0}\else
+ \def\eq@W@value{#1}\def\eq@W{/W #1}\fi
+ \xdef\g@eq@W@value@bp{\eq@W@value bp}}
+\def\eq@W{}\def\eq@W@value{0}
+\def\g@eq@W@valu@bp{0bp} % dps 12/22
+\def\@eqS#1{\def\eq@S@value{#1}\ifx\eq@S@value\@empty
+ \let\eq@S\@empty\else
+ \def\eq@S{/S/#1}\def\eq@temp{D}%
+ \ifx\eq@S@value\eq@temp
+ \ifx\eq@D\@empty\def\eq@D{/D [3]}\fi
+ \fi\fi}\def\eq@S{}
+\def\@eqD#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@D\@empty\else
+ \def\eq@D{/D [#1]}\fi}\def\eq@D{}
+\def\@eqBorder#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@Border\@empty\else\def\eq@Border{/Border [#1]}\fi}%
+\def\eq@Border{/Border [0 0 0]}
+\def\@eqAP#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AP\@empty\else\def\eq@AP{/AP<<#1>>}\fi}%
+ \let\eq@AP\@empty
+ \def\@eqOn#1{\def\eq@On{/#1}}\def\eq@On{/Yes}
+\def\@eqAS#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AS\@empty\else\ifpdfmarkup\def\eq@AS{/AS(#1) cvn }\else
+ \def\eq@AS{/AS/#1}\fi\fi}\def\eq@AS{}
+\def\ef@gobbleToendmarker#1\ef@endmarker{}
+\let\ef@endmarker\relax
+\def\ef@end{\end}\def\ef@true{true}
+\def\ef@rPage#1{\@tempcnta=#1\relax\advance\@tempcnta-1
+ \edef\rPage##1{\the\@tempcnta}}
+\long\def\ef@searchrPage#1\rPage#2#3\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\else\rPage{#2}\fi}
+\def\ef@searchmlLink#1\mlLink#2#3\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\let\ef@mlLink\ef@Zero\else
+ \ifx\ef@argii\ef@true\let\ef@mlLink\ef@One\else
+ \let\ef@mlLink\ef@Zero\fi\fi}
+\def\ef@searchGoToR#1/GoToR#2\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
+ \def\ef@thislinkcolor{\@filecolor}\fi
+ \expandafter\ef@gobbleToendmarker\fi}
+\def\ef@searchURI#1/URI#2\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
+ \def\ef@thislinkcolor{\@urlcolor}\fi
+ \expandafter\ef@gobbleToendmarker\fi}
+\def\ef@searchCmdURI#1\URI#2\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
+ \def\ef@thislinkcolor{\@urlcolor}\fi
+ \expandafter\ef@gobbleToendmarker\fi}
+\def\ef@searchNamed#1/Named#2\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
+ \def\ef@thislinkcolor{\@menucolor}\fi
+ \expandafter\ef@gobbleToendmarker\fi}
+\def\ef@searchCmdNamed#1\Named#2\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
+ \def\ef@thislinkcolor{\@menucolor}\fi
+ \expandafter\ef@gobbleToendmarker\fi}
+\def\ef@searchLaunch#1/Launch#2\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0%
+ \def\ef@thislinkcolor{\@runcolor}\fi
+ \expandafter\ef@gobbleToendmarker\fi}
+\def\ef@preprocessA#1{%
+ \let\rPage\relax\edef\ef@argi{#1}%
+ \ifx\annot@type\annot@type@link
+ \expandafter\ef@searchGoToR\ef@argi/GoToR\end\@nil
+ \expandafter\ef@searchURI\ef@argi/URI\end\@nil
+ \expandafter\ef@searchCmdURI\ef@argi\URI\end\@nil
+ \expandafter\ef@searchNamed\ef@argi/Named\end\@nil
+ \expandafter\ef@searchCmdNamed\ef@argi\Named\end\@nil
+ \expandafter\ef@searchLaunch\ef@argi/Launch\end\@nil
+ \ef@endmarker\fi
+ \let\rPage\ef@rPage
+ \expandafter\ef@searchrPage\ef@argi\rPage\end\@nil
+}
+\def\@eqA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@A\@empty\else\ef@preprocessA{#1}%
+ \def\eq@A{/A <<#1>>}\fi}\def\eq@A{}
+\def\@eqmlLink#1{\def\eq@arg{#1}\ifx\eq@arg\ef@true
+ \let\ef@mlLink\ef@One\else\let\ef@mlLink\ef@Zero\fi}
+\def\@eqLock#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@Lock\@empty\else\def\eq@Lock{/Lock <<#1>>}\fi}
+ \def\eq@Lock{}
+\newif\ifisCalculate\isCalculatefalse
+\def\ef@searchCalc#1\AACalculate#2\@nil{%
+ \ifx#2\end\else\aftergroup\isCalculatetrue\fi
+}
+\def\@eqAA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty\let\eq@AA\@empty
+ \else\begingroup\ef@searchCalc#1\AACalculate\end\@nil\endgroup
+ \def\eq@AA{/AA <<#1>>}\fi}
+\def\eq@AA{/AA <<\eq@AAmouseup\eq@AAmousedown\eq@AAmouseenter%
+ \eq@AAmouseexit\eq@AAonfocus\eq@AAonblur\eq@AAformat%
+ \eq@AAkeystroke\eq@AAvalidate\eq@AAcalculate\eq@AApageopen%
+ \eq@AApageclose\eq@AApagevisible\eq@AApageinvisible>>}
+\def\@eqAAmouseup#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAmouseup\@empty\else\def\eq@AAmouseup{/U<<\JS{#1}>>}\fi}
+\let\eq@AAmouseup\@empty
+\def\@eqAAmousedown#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAmousedown\@empty\else
+ \def\eq@AAmousedown{/D<<\JS{#1}>>}\fi}
+\let\eq@AAmousedown\@empty
+\def\@eqAAmouseenter#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAmouseenter\@empty\else
+ \def\eq@AAmouseenter{/E<<\JS{#1}>>}\fi}
+\let\eq@AAmouseenter\@empty
+\def\@eqAAmouseexit#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAmouseexit\@empty\else
+ \def\eq@AAmouseexit{/X<<\JS{#1}>>}\fi}
+\let\eq@AAmouseexit\@empty
+\def\@eqAAonfocus#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAonfocus\@empty\else
+ \def\eq@AAonfocus{/Fo<<\JS{#1}>>}\fi}
+\def\@eqAAmousefocus{\@eqAAonfocus}
+\let\eq@AAonfocus\@empty
+\def\@eqAAonblur#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAonblur\@empty\else
+ \def\eq@AAonblur{/Bl<<\JS{#1}>>}\fi}
+\def\@eqAAmouseblur{\def\@eqAAonblur}
+\let\eq@AAonblur\@empty
+\def\@eqAAformat#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAformat\@empty\else
+ \def\eq@AAformat{/F<<\JS{#1}>>}\fi}
+\let\eq@AAformat\@empty
+\def\@eqAAkeystroke#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAkeystroke\@empty\else
+ \def\eq@AAkeystroke{/K<<\JS{#1}>>}\fi}
+\let\eq@AAkeystroke\@empty
+\def\@eqAAvalidate#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAvalidate\@empty\else
+ \def\eq@AAvalidate{/V<<\JS{#1}>>}\fi}
+\let\eq@AAvalidate\@empty
+\def\@eqAAcalculate#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AAcalculate\@empty\else\isCalculatetrue
+ \def\eq@AAcalculate{/C<<\JS{#1}>>}\fi}
+\let\eq@AAcalculate\@empty
+\def\@eqAApageopen#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AApageopen\@empty\else
+ \def\eq@AApageopen{/PO<<\JS{#1}>>}\fi}
+\let\eq@AApageopen\@empty
+\def\@eqAApageclose#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AApageclose\@empty\else
+ \def\eq@AApageclose{/PC<<\JS{#1}>>}\fi}
+\let\eq@AApageclose\@empty
+\def\@eqAApagevisible#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AApagevisible\@empty\else
+ \def\eq@AApagevisible{/PV<<\JS{#1}>>}\fi}
+\let\eq@AApagevisible\@empty
+\def\@eqAApageinvisible#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AApageinvisible\@empty\else
+ \def\eq@AApageinvisible{/PI<<\JS{#1}>>}\fi}
+\let\eq@AApageinvisible\@empty
+\def\@eqDA#1{\def\eq@DA{#1}}
+\def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
+\def\@eqtextFont#1{\def\eq@textFont{/#1}}
+\def\eq@textFont{/Helv}
+\def\@eqtextSize#1{\def\eq@textSize{#1}}
+\def\eq@textSizeDefault{9}
+\edef\eq@textSize{\eq@textSizeDefault}
+\def\eq@RV@Body{<?xml version="1.0"?><body %
+ xfa:APIVersion="Acroform:2.7.0.0" %
+ xfa:contentType="text/html" %
+ xfa:spec="2.1" xmlns="http://www.w3.org/1999/xhtml" %
+ xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">}
+\def\eq@RV@endBody{</body>}
+\def\@eqRV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@RV\@empty\else\def\eq@RV{/RV(\eq@RV@Body#1%
+ \eq@RV@endBody)\fi}}\def\eq@RV{}
+\def\@eqDS#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@DS\@empty\else\def\eq@DS{/DS(#1)\fi}}\def\eq@DS{}
+\def\@eqtextColor#1{\ef@parsePDFColor{#1}%
+ \HyColor@IfXcolor{%
+ \expandafter\HyColor@FieldColor%
+ \expandafter{\ef@colorSpec@out}{\eq@textColor}{}{}%
+ }{\edef\eq@textColor{\ef@colorSpec@out}}%
+}
+\def\eq@textColor{0 g}
+\def\@eqQ#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@Q\@empty\else\def\eq@Q{/Q #1}\fi}\def\eq@Q{}
+\def\ef@isunicode#1\unicodeStr#2\@nil{\def\argi{#1}%
+ \ifx\argi\@empty\def\ifbool@ef{iftrue}\else
+ \def\ifbool@ef{iffalse}\fi}
+\def\@eqDV#1{\ef@isunicode#1\unicodeStr\@nil
+ \expandafter\csname\ifbool@ef\endcsname\@equDV{#1}\else
+ \def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@DV\@empty\else
+ \ef@pdfCRLFTABDefns\pdfstringdef\ef@uni@temp{#1}%
+ \edef\eq@DV{/DV(\ef@uni@temp)}\makespecialJS\fi\fi}\def\eq@DV{}
+\def\ef@pdfCRLFTABDefns{%
+ \def\r{\textCR}\def\t{\textHT}\def\n{\textLF}}
+\def\@eqnuDV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@DV\@empty\else\def\eq@DV{/DV(#1)}\fi}
+\def\@equDV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@DV\@empty\else\def\eq@DV{/DV<#1>}\fi}
+\def\@eqV#1{\ef@isunicode#1\unicodeStr\@nil
+ \expandafter\csname\ifbool@ef\endcsname\@equV{#1}\else
+ \def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@V\@empty\else
+ \ef@pdfCRLFTABDefns\pdfstringdef\ef@uni@temp{#1}%
+ \edef\eq@V{/V(\ef@uni@temp)}\makespecialJS\fi\fi}\def\eq@V{}
+\def\@eqnuV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@V\@empty\else\def\eq@V{/V(#1)}\fi}
+\def\@equV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@V\@empty\else\def\eq@V{/V<#1>}\fi}%
+\def\@eqTU#1{\ef@isunicode#1\unicodeStr\@nil
+ \expandafter\csname\ifbool@ef\endcsname\@equTU{#1}\else
+ \def\eq@arg{#1}\let\r@save\r\let\r\textCR
+ \ifx\eq@arg\@empty\let\eq@TU\@empty\else
+ \ef@pdfCRLFTABDefns\pdfstringdef\ef@uni@temp{#1}%
+ \edef\eq@TU{/TU(\ef@uni@temp)}\makespecialJS\fi\fi
+ \let\r\r@save}\def\eq@TU{}
+\def\@equTU#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@TU\@empty\else\def\eq@TU{/TU<#1>}\fi}
+\def\@eqFf#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@Ff\@empty\else\def\eq@Ff{/Ff #1}\fi}
+ \def\eq@Ff{}
+\def\@eqMaxLen#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@MaxLen\@empty\else\def\eq@MaxLen{/MaxLen #1}\fi}%
+ \def\eq@MaxLen{}
+\def\@eqH#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@H\@empty\else\def\eq@H{/H/#1}\fi}\def\eq@H{}
+\def\@eqMK#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@MK\@empty\else\def\eq@MK{/MK << #1 >> }\fi}%
+ \def\eq@MK{}
+ \let\@vertRotate=0
+ \def\@eqR#1{\def\eq@R@value{#1}\ifx\eq@R@value\@empty
+ \let\eq@R\@empty\else
+ \@tempcnta=\eq@R@value\relax
+ \ifnum\@tempcnta<0 \@tempcnta=-\@tempcnta\fi
+ \ifnum\@tempcnta=0 \else\ifnum\@tempcnta=180 \else
+ \let\@vertRotate=1\fi\fi
+ \def\eq@R{/R #1}\fi}
+ \def\eq@R{}
+ \def\@eqBC#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@BC\@empty\else % 2010/07/23
+ \expandafter\ef@isitnamed\eq@arg\ef@nil
+ \ifx\ef@latex@color\ef@y\expandafter
+ \HyColor@XZeroOneThreeFour\expandafter{\eq@arg}{\eq@BC}{}{}%
+ \edef\eq@BC{/BC [\eq@BC]}\else
+ \def\eq@BC{/BC [#1]}\fi
+ \fi}
+ \def\eq@BC{}
+ \def\@eqBG#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@BG\@empty\else % 2010/07/23
+ \expandafter\ef@isitnamed\eq@arg\ef@nil
+ \ifx\ef@latex@color\ef@y\expandafter
+ \HyColor@XZeroOneThreeFour\expandafter{\eq@arg}{\eq@BG}{}{}%
+ \edef\eq@BG{/BG [\eq@BG]}\else
+ \def\eq@BG{/BG [#1]}\fi
+ \fi}
+ \def\eq@BG{}
+ \def\@eqCA#1{\ef@isunicode#1\unicodeStr\@nil
+ \expandafter\csname\ifbool@ef\endcsname\@equCA{#1}\else
+ \def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@CA\@empty\let\ef@kvCA\@empty
+ \else\ef@pdfCRLFTABDefns
+ \pdfstringdef\ef@uni@temp{#1}%
+ \def\eq@CA{#1}\edef\ef@kvCA{/CA(\ef@uni@temp)}%
+ \makespecialJS\fi\fi}
+ \def\eq@CA{}\def\ef@kvCA{}
+ \def\@equCA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@CA\@empty\let\ef@kvCA\@empty
+ \else\def\eq@CA{#1}\def\ef@kvCA{/CA<#1>}\fi}
+ \def\@eqRC#1{\ef@isunicode#1\unicodeStr\@nil
+ \expandafter\csname\ifbool@ef\endcsname\@equRC{#1}\else
+ \def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@RC\@empty\let\ef@kvRC\@empty
+ \else\ef@pdfCRLFTABDefns
+ \pdfstringdef\ef@uni@temp{#1}%
+ \def\eq@RC{#1}\edef\ef@kvRC{/RC(\ef@uni@temp)}%
+ \makespecialJS\fi\fi}
+ \def\eq@RC{}\def\ef@kvRC{}
+ \def\@equRC#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@RC\@empty\let\ef@kvRC\@empty
+ \else\def\eq@RC{#1}\def\ef@kvRC{/RC<#1>}\fi}
+ \def\@eqAC#1{\ef@isunicode#1\unicodeStr\@nil
+ \expandafter\csname\ifbool@ef\endcsname\@equAC{#1}\else
+ \def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AC\@empty\let\ef@kvAC\@empty
+ \else\ef@pdfCRLFTABDefns
+ \pdfstringdef\ef@uni@temp{#1}%
+ \def\eq@AC{#1}\edef\ef@kvAC{/AC(\ef@uni@temp)}%
+ \makespecialJS\fi\fi}
+ \def\eq@AC{}\def\ef@kvAC{}
+ \def\@equAC#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@AC\@empty\let\ef@kvAC\@empty
+ \else\def\eq@AC{#1}\def\ef@kvAC{/AC<#1>}\fi}
+\def\eq@define@IconMK{\def\eq@IconMK{\eq@I\eq@RI\eq@IX\eq@TP
+ /IF<<\eq@SW\eq@ST\eq@PA\eq@FB>>}}
+\let\eq@IconMK\@empty
+\ifpdf\def\eq@relRef#1{0 0 R}\else %{#1\space 0 R}
+ \ifxetex\def\eq@relRef#1{#1}\else
+ \def\eq@relRef#1{{#1}}\fi\fi
+\def\ef@null{null}
+\def\@eqI#1{\ifx\annot@type\annot@type@button
+ \def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@I\@empty\else
+ \def\eq@I{/I \eq@relRef{#1}}%
+ \ifpdf\ifx\eq@arg\ef@null
+ \def\eq@I{/I 0 0 R}\fi\fi
+ \eq@define@IconMK\fi\fi}
+\def\eq@I{}
+\def\@eqRI#1{\ifx\annot@type\annot@type@button
+ \def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@RI\@empty\else
+ \def\eq@RI{/RI \eq@relRef{#1}}%
+ \ifpdf\ifx\eq@arg\ef@null
+ \def\eq@RI{/RI 0 0 R}\fi\fi
+ \eq@define@IconMK\fi\fi}
+\def\eq@RI{}
+\def\@eqIX#1{\ifx\annot@type\annot@type@button
+ \def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@IX\@empty\else
+ \def\eq@IX{/IX \eq@relRef{#1}}%
+ \ifpdf\ifx\eq@arg\ef@null
+ \def\eq@IX{/IX 0 0 R}\fi\fi
+ \eq@define@IconMK\fi\fi}
+\def\eq@IX{}
+\def\@eqTP#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@TP\@empty\else\def\eq@TP{/TP #1}\fi}
+\def\eq@TP{/TP 0} % default 0
+\def\@eqSW#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@SW\@empty\else\def\eq@SW{/SW/#1}\fi}
+\def\eq@SW{/SW/A} % the default, always scale
+\def\@eqST#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@ST\@empty\else\def\eq@ST{/S/#1}\fi}
+\def\eq@ST{/S/P} % the default, proportional scaling
+\def\@eqPA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@PA\@empty\else\def\eq@PA{/A [#1]}\fi}
+\def\eq@PA{/A [0.5 0.5]} % the default
+\def\@eqFB#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@PA\@empty\else\def\eq@FB{/FB #1}\fi}
+\def\eq@FB{/FB false} % the default
+\def\@eqmkIns#1{\def\eq@mkIns{#1}}\def\eq@mkIns{}
+\def\@eqOpt#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@Opt\@empty\else\def\eq@Opt{/Opt [#1]}\fi}
+ \def\eq@Opt{}
+\def\@eqTI#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@TI\@empty\else\def\eq@TI{/TI #1}\fi}
+ \def\eq@TI{}
+\def\@eqrawPDF#1{\def\eq@rawPDF{#1}}\def\eq@rawPDF{}
+\def\@eqQuadPoints#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@QuadPoints\@empty\else
+ \def\eq@QuadPoints{/QuadPoints {#1}}\fi}
+\def\eq@QuadPoints{}
+\def\@eqColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@Color\@empty\else
+ \HyColor@XZeroOneThreeFour{#1}{\eq@Color}{}{}%
+ \edef\eq@Color{/C[\eq@Color]}\fi}
+\def\eq@Color{}
+\def\@eqlinktxtcolor#1{%
+ \def\ef@argi{#1}\ifHy@colorlinks
+ \ifx\ef@argi\@empty\let\ef@colorthislink\normalcolor\else
+ \let\ef@linktxtcolor@set=1\def\ef@thislinkcolor{#1}\fi\fi
+}\let\ef@linktxtcolor@set=0
+\def\@eqrectH#1{\def\eq@rectH{#1}\ifx\eq@rectH\@empty\else
+ \setlength\eflength\eq@rectH\edef\eq@rectH{\the\eflength}\fi}
+\def\@eqrectW#1{\def\eq@rectW{#1}\ifx\eq@rectW\@empty\else
+ \setlength\eflength\eq@rectW\edef\eq@rectW{\the\eflength}\fi}
+\def\@eqobjdef#1{\def\ef@arg{#1}\ifx\ef@arg\@empty
+ \let\eq@objdef\@empty\else\def\eq@objdefName{#1}%
+ \def\eq@objdef{/_objdef {#1}}\fi
+}
+\let\eq@objdef\@empty
+\def\@eqtaborder#1{\def\ef@arg{#1}\ifx\ef@arg\@empty
+ \let\eq@taborder\@empty\else
+ \def\eq@taborder{#1}\fi
+}
+\let\eq@taborder\@empty
+\def\ef@y{y}\def\ef@n{n}
+\def\@eqautoCenter#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y
+ \let\autoCenter\ef@y\else\ifx\ef@arg\ef@n
+ \let\autoCenter\ef@n\else\let\autoCenter\ef@y
+ \PackageWarning{eforms}{The value of '#1' is not a
+ supported value\MessageBreak for \string\autoCenter.\MessageBreak
+ Using the default of 'y'}%
+ \fi\fi}
+\let\autoCenter\ef@y
+\newif\ifeq@inlineCenter \eq@inlineCenterfalse
+\let\inlineCenter=n
+\def\@eqinline#1{\eq@inlineCenterfalse
+ \def\ef@arg{#1}\ifx\ef@arg\ef@y
+ \let\inlineCenter\ef@y\eq@inlineCentertrue\else
+ \ifx\ef@arg\ef@n\let\inlineCenter\ef@n\else\let\inlineCenter\ef@n
+ \PackageWarning{eforms}{The value of '#1' is not a
+ supported value\MessageBreak for \string\inline.\MessageBreak
+ Using the default of 'n'}%
+ \fi\fi}
+\def\@eqsymbolchoice#1{\expandafter\ifx\csname eq@#1\endcsname\relax
+ \typeout{exerquiz: `#1' is not an acceptable option
+ for \string\symbolechoice, inserting default, `check'.}
+ \edef\symbol@choice{\eq@check}\else
+ \edef\symbol@choice{\csname eq@#1\endcsname}\fi
+}
+\newif\iffixmlinks \fixmlinkstrue
+\def\mlfixOn{\fixmlinkstrue}
+\def\mlfixOff{\fixmlinksfalse}
+\def\@eqmlfix#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y
+ \mlfixOn\else\ifx\ef@arg\ef@n
+ \mlfixOff\else\mlfixOn
+ \PackageWarning{eforms}{The value of '#1' is not a
+ supported value\MessageBreak for \string\mlfix.\MessageBreak
+ Using the default of 'y'}%
+ \fi\fi}
+\newbox\mlstrutbox
+\def\@eqmlstrut#1{\setbox\mlstrutbox\hbox{#1}%
+ \def\ml@strut{\vrule \@height\ht\mlstrutbox
+ \@depth\dp\mlstrutbox
+ \@width\z@\relax}}
+\def\ml@strut{\relax\ifmmode\copy\mlstrutbox\else
+ \unhbox\mlstrutbox\fi}
+\@eqmlstrut{\strut}
+\def\@eqmlcrackat#1{\def\eq@mlcrackat{#1}}
+\let\eq@mlcrackat\@empty
+\def\@eqmlhyph#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y
+ \def\eq@mlhyph{-}\else\ifx\ef@arg\ef@n
+ \let\eq@mlhyph\@empty\else\let\eq@mlhyph\@empty
+ \PackageWarning{eforms}{The value of '#1' is not a
+ supported value\MessageBreak for \string\mlhyph.\MessageBreak
+ Using the default of 'n'}\fi\fi}
+\let\eq@mlhyph\@empty
+\def\@eqmlignore#1{\def\eq@mlchunk{#1}\ifx\eq@mlchunk\@empty
+ \def\eq@mlchunk{0}\fi\let\eq@mlignore\ef@YES}
+\def\eq@mlchunk{0}
+\let\eq@mlignore\ef@NO
+\def\@eqmlcrackinsat#1{\def\eq@mlcrackinsat{#1}}
+\let\eq@mlcrackinsat\@empty
+\def\eq@protect#1{\let#1\@empty}
+\begingroup\catcode`\#=12 \catcode`*=6
+ \ifpdfmarkup
+ \gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\else
+ \gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\fi
+\endgroup
+\def\efHxError{\PackageError{eforms}{The glyph is not supported}{}}
+\def\HGERROR{efHxError}
+\ifpdfmarkup
+ \def\HexGlyph#1#2{\def\arg@ii{#2}\ifx\arg@ii\HGERROR
+ \global\@namedef{efHex#1}{\csname#2\endcsname}\else
+ \global\@namedef{efHex#1}{\expandafter
+ \string\csname#2\endcsname}\fi}
+\else
+ \begingroup\catcode`\#=12 \catcode`*=6
+ \gdef\HexGlyph*1*2{\def\arg@ii{*2}\ifx\arg@ii\HGERROR
+ \global\@namedef{efHex*1}{\csname*2\endcsname}\else
+ \global\@namedef{efHex*1}{#*1}\fi}
+ \endgroup
+\fi
+\def\ef@inputPDFHEX{\InputIfFileExists{pdfdochex.def}
+ {\PackageInfo{eforms}{Inputting pdfdochex.def}}{}}
+\AtEndOfPackage{\ef@inputPDFHEX}
+\def\ef@semicolon{;}
+\def\ef@stripsemi#1;\@nil{\def\ef@colorSpec@out{#1}}
+\def\ef@isitnamed{\let\ef@latex@color\ef@y
+ \@ifnextchar[{\ef@gobbletonil}{%
+ \@tfor\mytok:=.0123456789\do{%
+ \if\mytok\@let@token
+ \let\ef@latex@color\ef@n
+ \@break@tfor\fi}\ef@gobbletonil}}
+\def\ef@gobbletonil#1\ef@nil{}
+\def\ef@parsePDFColor#1{\edef\ef@color@arg{#1}\ef@parsePDFColori}
+\def\ef@parsePDFColori{%
+ \expandafter\ef@@parsePDFColor\ef@color@arg; ; ; ; ; ;\\}
+\def\ef@@parsePDFColor#1 #2 #3 #4 #5 #6\\{%
+ \def\argii{#2}\def\ef@cmp{g;}%
+ \ifx\argii\ef@cmp
+ \expandafter\ifx\csname convertcolorspec\endcsname\relax
+ \def\ef@colorSpec@out{#1 g}\else
+ \def\ef@colorSpec@out{[gray]{#1}}%
+ \fi
+ \else\ifx\argii\ef@semicolon
+ \expandafter\ifx\csname convertcolorspec\endcsname\relax
+ \ef@isitnamed#1\ef@nil
+ \ifx\ef@latex@color\ef@n
+ \ef@stripsemi#1\@nil
+ \edef\ef@colorSpec@out{\ef@colorSpec@out\space g}%
+ \else
+ \ef@stripsemi#1\@nil
+ \PackageWarning{eforms}{Color specification
+ `\ef@colorSpec@out' not supported\MessageBreak
+ without xcolor, using a black color}
+ \def\ef@colorSpec@out{0 g}%
+ \fi
+ \else % xcolor
+ \ef@isitnamed#1\ef@nil
+ \ifx\ef@latex@color\ef@n
+ \ef@stripsemi#1\@nil
+ \edef\ef@colorSpec@out{[gray]{\ef@colorSpec@out}}%
+ \else
+ \ef@stripsemi#1\@nil
+ \edef\ef@colorSpec@out{\ef@colorSpec@out}%
+ \fi
+ \fi
+ \else % not semicolon
+ \def\argiv{#4}\def\ef@cmp{rg;}%
+ \ifx\argiv\ef@cmp
+ \expandafter\ifx\csname convertcolorspec\endcsname\relax
+ \def\ef@colorSpec@out{#1 #2 #3 rg}\else
+ \def\ef@colorSpec@out{[rgb]{#1,#2,#3}}\fi
+ \else\ifx\argiv\ef@semicolon
+ \expandafter\ifx\csname convertcolorspec\endcsname\relax
+ \ef@stripsemi#1 #2 #3\@nil
+ \edef\ef@colorSpec@out{\ef@colorSpec@out\space rg}\else
+ \ef@stripsemi#3\@nil
+ \edef\ef@colorSpec@out{[rgb]{#1,#2,\ef@colorSpec@out}}\fi
+ \else
+ \def\argv{#5}\edef\ef@cmp{k;}
+ \ifx\argv\ef@cmp
+ \expandafter\ifx\csname convertcolorspec\endcsname\relax
+ \def\ef@colorSpec@out{#1 #2 #3 #4 k}\else
+ \def\ef@colorSpec@out{[cmyk]{#1,#2,#3,#4}}\fi
+ \else
+ \ifx\argv\ef@semicolon
+ \ef@stripsemi#1 #2 #3 #4\@nil
+ \expandafter\ifx\csname convertcolorspec\endcsname\relax
+ \edef\ef@colorSpec@out{\ef@colorSpec@out\space k}\else
+ \ef@stripsemi#4\@nil
+ \edef\ef@colorSpec@out{%
+ [cmyk]{#1,#2,#3,\ef@colorSpec@out}}\fi
+ \else\ef@parseColor@iv
+ \fi\fi\fi\fi\fi\fi
+}
+\def\ef@parseColor@iv{\PackageError{AeB}{%
+ The number of arguments
+ is incorrect.\MessageBreak I was expecting
+ 1, 3, or 4 components of color}{Specify the correct number of
+ components for the color space.}}
+\def\calcOrder#1{\let\efCalcOrder\@gobble
+ \@for\coi:=#1\do{\edef\efCalcOrder{\efCalcOrder,"\coi"}}%
+ \edef\efCalcOrder{[\efCalcOrder]}}
+\@onlypreamble\calcOrder
+\def\efCalcOrder{[]}
+\def\eq@check{4}
+\def\eq@circle{l}
+\def\eq@cross{8}
+\def\eq@diamond{u}
+\def\eq@square{n}
+\def\eq@star{H}
+\let\symbolchoice\@eqsymbolchoice
+\symbolchoice{check}
+\providecommand{\JS}[1]{/S/JavaScript/JS(#1)}
+\newcommand{\URI}[1]{/S/URI/URI(#1)}
+\providecommand{\Named}[1]{/S/Named/N/#1}
+\newcommand{\Next}[1]{/Next<<#1>>}
+\providecommand{\toggleAttachmentsPanel}[2]{%
+ \setLink[\Border{0 0 0}\A{\Named{ShowHideFileAttachment}}]
+ {\textcolor{#1}{#2}}}%
+\newcommand{\AAMouseUp}[1]{/U<<#1>>}
+\newcommand{\AAMouseDown}[1]{/D<<#1>>}
+\newcommand{\AAMouseEnter}[1]{/E<<#1>>}
+\newcommand{\AAMouseExit}[1]{/X<<#1>>}
+\newcommand{\AAOnFocus}[1]{/Fo<<#1>>}
+\newcommand{\AAOnBlur}[1]{/Bl<<#1>>}
+\newcommand{\AAFormat}[1]{/F<<\JS{#1}>>}
+\newcommand{\AAKeystroke}[1]{/K<<\JS{#1}>>}
+\newcommand{\AAValidate}[1]{/V<<\JS{#1}>>}
+\newcommand{\AACalculate}[1]{/C<<\JS{#1}>>}
+\newcommand{\AAPageOpen}[1]{/PO<<\JS{#1}>>}
+\newcommand{\AAPageClose}[1]{/PC<<\JS{#1}>>}
+\newcommand{\AAPageVisible}[1]{/PV<<\JS{#1}>>}
+\newcommand{\AAPageInvisible}[1]{/PI<<\JS{#1}>>}
+\newcommand{\definePath}[1]{\def\ef@ctrlName{#1}%
+ \hyper@normalise\ef@definePath}
+\def\ef@definePath#1{\expandafter\xdef\ef@ctrlName{#1}}
+\def\FHidden{2} % bit 2: hidden field
+\def\FPrint{4} % bit 3: print (we set this bit by default)
+\def\FNoPrint{-4} % bit 3: -print (this clears the bit)
+\def\FNoView{32} % bit 6: no view
+\def\FLock{128} % bit 8: locked field (PDF 1.4)
+\def\FfReadOnly{1} % all
+\def\FfRequired{2} % all
+\def\FfNoExport{4} % all
+\def\FfMultiline{4096} % text
+\def\FfPassword{8192} % text
+\def\FfNoToggleToOff{16384} % radio
+\def\FfRadio{32768} % radio
+\def\FfPushButton{65536} % Push button
+\def\FfCombo{131072} % choice
+\def\FfEdit{262144} % combo
+\def\FfSort{524288} % choice
+\def\FfFileSelect{1048576} % text (PDF 1.4)
+\def\FfMultiSelect{2097152} % choice (PDF 1.4)
+\def\FfDoNotSpellCheck{4194304} % text, combo (PDF 1.4)
+\def\FfDoNotScroll{8388608} % text (PDF 1.4)
+\def\FfComb{16777216} % text (PDF 1.5)
+\def\FfRadiosInUnison{33554432} % radio (PDF 1.5)
+\def\FfCommitOnSelChange{67108864} % choice (PDF 1.5)
+\def\FfRichText{33554432} % radio (PDF 1.5)
+\def\getFfValue/Ff#1\@nil{\def\eq@FfValue{#1}}
+\def\getFValue/F#1\@nil{\def\eq@FValue{#1}}
+\def\@getCmdName#1{\edef\@CmdName{\expandafter\@gobble\string#1}}
+\newcommand{\everyTextField}[1]{\def\every@TextField{#1}}
+\def\every@TextField{}
+\newcommand{\everySigField}[1]{\def\every@sigField{#1}}
+\def\every@sigField{}
+\newcommand{\everyCheckBox}[1]{\def\every@CheckBox{#1}}
+\def\every@CheckBox{}
+\newcommand{\everyRadioButton}[1]{\def\every@RadioButton{#1}}
+\def\every@RadioButton{}
+\newcommand{\everyButtonField}[1]{\def\every@ButtonField{#1}}
+\def\every@ButtonField{}
+\newcommand{\everyPushButton}[1]{\def\every@PushButton{#1}}
+\def\every@PushButton{}
+\newcommand{\everyListBox}[1]{\def\every@listBox{#1}}
+\newcommand{\everyComboBox}[1]{\def\every@comboBox{#1}}
+\def\every@listBox{}\def\every@comboBox{}
+\newcommand{\everyLink}[1]{\def\every@Link{#1}}
+\def\every@Link{}
+\def\ef@adjrectWH#1{\dimen@ii#1\relax
+ \ifx\eq@rectW\@empty\else
+ \eflength\eq@rectW\relax
+ \advance\eflength\dimen@ii
+ \edef\eq@rectW{\the\eflength}%
+ \eflength\eq@rectH\relax
+ \advance\eflength\dimen@ii
+ \edef\eq@rectH{\the\eflength}%
+ \fi
+}
+\def\ef@djXPD{\ifxetex\ifmakeXasPD\ef@adjrectWH{2bp}\fi
+ \else\ifmakePDasX\ef@adjrectWH{-2bp}\fi\fi}
+\def\ef@btnspcr{}
+\def\eq@setButtonProps#1#2{%
+ \makeJSspecials
+ \processAppArgs#2\end\@nil % set widget properties
+ \ifx\eq@BC\@empty\@eqW{}\else
+ \if\eq@W@value0\let\eq@BC\@empty\fi\fi
+ \Hy@pdfstringfalse
+ \ifx\eq@rectW\@empty
+ \ifnum\eq@textSize=0 \else
+ \dimen@=\eq@textSize bp
+ \dimen@1.00375\dimen@
+ \edef\eq@textSize@pt{\strip@pt\dimen@}%
+ \fontsize{\eq@textSize@pt}{0}\selectfont
+ \fi
+ \dimen@\eq@W@value bp
+ \def\eq@S@B{B}\ifx\eq@S@value\eq@S@B
+ \def\eq@btn@sp{\hbox to2\dimen@{\hfill}}%
+ \else
+ \def\eq@btn@sp{\hbox to\dimen@{\hfill}}%
+ \fi
+ \expandafter\def\expandafter
+ \ef@btnspcr\expandafter{\ef@btnspcr\eq@btn@sp}%
+ \sbox{\eq@tmpbox}{\ef@btnspcr\eq@CA\ef@btnspcr}%
+ \eq@tmpdima=\wd\eq@tmpbox
+ \sbox{\eq@tmpbox}{\ef@btnspcr\eq@RC\ef@btnspcr}%
+ \ifdim\eq@tmpdima>\wd\eq@tmpbox\else
+ \eq@tmpdima=\wd\eq@tmpbox\fi%
+ \sbox{\eq@tmpbox}{\ef@btnspcr\eq@AC\ef@btnspcr}%
+ \ifdim\eq@tmpdima>\wd\eq@tmpbox\else
+ \eq@tmpdima=\wd\eq@tmpbox\fi
+ \ifmakePDasX\advance\eq@tmpdima2bp\fi
+ \wd\eq@tmpbox=\eq@tmpdima
+ \else
+ \wd\eq@tmpbox=\eq@rectW
+ \fi
+ \ef@djXPD#1% dps 12/22
+}
+\def\eq@setWidgetProps#1#2{%
+ \makeJSspecials
+ \processAppArgs#2\end\@nil % set widget properties
+ \ifx\annot@type@link\annot@type\else
+ \ifx\eq@BC\@empty\@eqW{}\else
+ \if\eq@W@value0\let\eq@BC\@empty\fi\fi
+ \fi
+ \ef@djXPD#1% dps 12/22
+}
+\def\ef@sanitize@toks{\@makeother\~\@makeother\#\@makeother\&%
+ \@makeother\"\@makeother\_}
+\newcommand\efKern[2]{\ifxetex\kern#2\else\kern#1\fi}
+\newcommand\olBdry{\bgroup\ifxetex % dps 12/22
+ \@tempdima-\g@eq@W@value@bp\relax
+ \edef\@mtkern{\the\@tempdima}\else
+ \@tempdima2bp\relax\advance\@tempdima-\g@eq@W@value@bp\relax % 12/26
+ \edef\@mtkern{\the\@tempdima}\fi\kern\@mtkern\egroup
+}
+\newcommand\cgBdry[1][0bp]{\bgroup\def\ef@rgi{#1}\ifx\ef@rgi\@empty
+ \def\ef@rgi{0bp}\fi\setlength{\@tempdima}{\ef@rgi}%
+ \ifxetex\else\addtolength{\@tempdima}{2bp}\fi
+ \kern\@tempdima\egroup\ignorespaces}
+\newcommand{\efSupprIndent}{\ef@scratchtoks=\expandafter{\the\everypar}%
+ \everypar{{\setbox\z@\lastbox}\clubpenalty\@M
+ \everypar=\expandafter{\the\ef@scratchtoks}}}
+\newcommand\volBdry{\bgroup\parskip0pt\relax\@@par\nointerlineskip
+ \olBdry\egroup\efSupprIndent}
+\newcommand\vcgBdry{\@ifstar{\edef\ef@offset{\the\parskip}\vcgBdry@i}
+ {\def\ef@offset{0pt}\vcgBdry@i}}
+\newcommand\vcgBdry@i[1][0bp]{\bgroup
+ \setlength{\ef@dimena}{#1-\ef@offset}\parskip0pt\relax
+ \par\nointerlineskip\cgBdry[\ef@dimena]%
+ \egroup\ignorespaces\efSupprIndent}
+\def\common@choiceCode{%
+ /Subtype/Widget
+ /T (\Fld@name)
+ /FT/Ch
+ \eq@Ff
+ \eq@F
+ \eq@TU
+ \eq@TI
+ /BS << \eq@W\eq@S >>
+ /MK <<\eq@R\eq@BC\eq@BG\eq@mkIns>>
+ /DA (\eq@DA)
+ /Opt [\eq@Opt]
+ \eq@DV\eq@V
+ \eq@A\eq@AA
+ \eq@rawPDF
+}
+\def\eqf@setDimens#1#2{\@eqrectW{#1}\@eqrectH{#2}}
+\let\ef@@nil\relax
+\def\@gobbleto@@nil#1\ef@@nil{}%
+\long\def\g@addto@macrogobble#1#2{\g@addto@macro{#1}{#2}\@gobbleto@@nil}
+\def\passthruCLOpts{*}
+\def\ef@pdfstrCLOpt{\Hy@unicodefalse\def\eq@Opt{}\ef@pdfstrCLOpti}
+\def\ef@pdfstrCLOpti{\@ifnextchar\ef@@nil{\@gobble}{\ef@pdfstrCLOptia}}
+\def\ef@pdfstrCLOptia{\@ifnextchar[{\expandafter
+ \ef@pdfstrOptWBii\@gobble}{\ef@pdfstrCLOptb}}
+\def\ef@pdfstrCLOptb{\@ifstar{\g@addto@macrogobble\eq@Opt}
+ {\ef@pdfstrOptWPi}}
+\def\ef@pdfstrOptWBii{%
+ \@ifnextchar({\ef@pdfstrOptWBiia}{\PackageError{eforms}
+ {Left parenthesis expected here}{}}%
+}
+\def\ef@pdfstrOptWBiia(#1){%
+ \g@addto@macro\eq@Opt{[(}%
+ \pdfstringdef\@optTokstemp{#1}%
+ \expandafter\g@addto@macro\expandafter\eq@Opt
+ \expandafter{\@optTokstemp}%
+ \@ifnextchar({\ef@pdfstrOptWBiib}{\PackageError{eforms}
+ {Left parenthesis expected here}{}}%
+}
+\def\ef@pdfstrOptWBiib(#1){%
+ \g@addto@macro\eq@Opt{)(}%
+ \pdfstringdef\@optTokstemp{#1}%
+ \expandafter\g@addto@macro\expandafter\eq@Opt
+ \expandafter{\@optTokstemp}%
+ \g@addto@macro\eq@Opt{)]}%
+ \expandafter\ef@pdfstrCLOpti\@gobble
+}
+\def\ef@pdfstrOptWPi{\@ifnextchar\ef@@nil{\@gobble}{\ef@pdfstrOptWPii}}
+\def\ef@pdfstrOptWPii(#1){%
+ \g@addto@macro\eq@Opt{(}%
+ \pdfstringdef\@optTokstemp{#1}%
+ \expandafter\g@addto@macro\expandafter\eq@Opt
+ \expandafter{\@optTokstemp}%
+ \g@addto@macro\eq@Opt{)}%
+ \ef@pdfstrCLOpti}
+\def\annot@type@listbox{listbox}
+\newcommand\list@@Box[8]{\begingroup
+ \edef\annot@type{\annot@type@listbox}%
+ \pdfstringdef\Fld@name{#2}%
+ \expandafter\ef@pdfstrCLOpt#5\ef@@nil
+ \eqf@setDimens{#3}{#4}%
+ \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
+ \@processEvery#8\end\noindent#6#7{#1}%
+}
+\def\listBoxDefaults{%
+ \W{1}\S{I}\F{\FPrint}\BC{0 0 0}
+}
+\newcommand\listBox{\begingroup
+ \ef@sanitize@toks\ef@listbox
+}
+\newcommand{\ef@listbox}[1][]{%
+ \endgroup\ef@listBox[#1]%
+}
+\newcommand\ef@listBox[5][]{%
+ \mbox{\list@@Box{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
+ \eq@choice@driver}{\listBoxDefaults\every@listBox}}%
+}
+\def\annot@type@combobox{combobox}
+\newcommand\combo@@Box[8]{\begingroup
+ \edef\annot@type{\annot@type@combobox}%
+ \@eqFf{\FfCombo}\pdfstringdef\Fld@name{#2}%
+ \expandafter\ef@pdfstrCLOpt#5\ef@@nil
+ \eqf@setDimens{#3}{#4}%
+ \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
+ \@processEvery#8\end\noindent#6#7{#1}%
+}
+\def\comboBoxDefaults{%
+ \W{1}\S{I}\F{\FPrint}\BC{0 0 0}
+}
+\newcommand\comboBox{\begingroup
+ \ef@sanitize@toks\ef@combobox
+}
+\newcommand{\ef@combobox}[1][]{%
+ \endgroup\ef@comboBox[#1]%
+}
+\newcommand\ef@comboBox[5][]{%
+ \mbox{\combo@@Box{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
+ \eq@choice@driver}{\comboBoxDefaults\every@comboBox}}%
+}
+\def\common@pushButtonCode{%
+ /Subtype/Widget
+ /T (\Fld@name)
+ /FT/Btn
+ \eq@Ff
+ \eq@TU
+ \eq@H
+ \eq@F
+ /BS <<\eq@W\eq@S >>
+\ifx\eq@AP\@empty
+ /MK <<\eq@R\eq@BC\eq@BG%
+ \ef@kvCA\ef@kvRC\ef@kvAC\eq@IconMK\eq@mkIns>>
+\else
+ \eq@AP
+\fi
+ /DA (\eq@DA)
+ \eq@A\eq@AA
+ \eq@rawPDF
+}
+\def\common@RadioCheckCode{%
+ /Subtype/Widget
+ /T (\Fld@name)
+ /FT/Btn
+ \eq@Ff
+ \eq@F
+ \eq@TU
+ /BS <<\eq@W\eq@S>>
+\ifx\eq@AP\@empty
+ /AP<< /N <<\eq@On<<>>>> >>
+ \eq@MK
+\else
+ \eq@AP
+\fi
+ /DA (\eq@DA)
+ \eq@AS
+ \eq@DV\eq@V
+ \eq@A\eq@AA
+ \eq@rawPDF
+}
+\def\annot@type@button{pushbtn}
+\newcommand\push@@Button[7]{\begingroup
+ \edef\annot@type{\annot@type@button}%
+ \pdfstringdef\Fld@name{#2}%\edef\Fld@name{#2}%
+ \makeJSspecials\ef@preProcDefns
+ \def\eq@Ff{/Ff \FfPushButton}%
+ \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
+ \eqf@setDimens{#3}{#4}%
+ \@processEvery#7\end\noindent#5#6{#1}%
+}
+\def\pushButtonDefaults{%
+ \W{1}\S{B}\F{\FPrint}\BC{0 0 0}
+ \H{P}\BG{.7529 .7529 .7529}
+}
+\newcommand\pushButton{\begingroup
+ \ef@sanitize@toks\ef@pushbutton
+}
+\newcommand{\ef@pushbutton}[1][]{%
+ \endgroup\ef@pushButton[#1]%
+}
+\newcommand\ef@pushButton[4][]{%
+ \mbox{\push@@Button{#1}{#2}{#3}{#4}{}{%
+ \eq@setButtonProps\eq@Button@driver}%
+ {\pushButtonDefaults\every@PushButton}}%
+}
+\def\annot@type@checkbox{checkbox}
+\newcommand\check@@Box[8]
+{%
+ \begingroup\let\#\ef@Hx
+ \edef\annot@type{\annot@type@checkbox}%
+ \pdfstringdef\Fld@name{#2}\@eqAS{Off}%
+ \def\@eqDV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty\let\eq@DV\@empty
+ \else\ifpdfmarkup\def\eq@DV{/DV(##1) cvn }\else
+ \def\eq@DV{/DV/##1}\fi\fi}%
+ \def\@eqV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty
+ \let\eq@V\@empty\else\ifpdfmarkup\def\eq@V{/V(##1) cvn }\else
+ \def\eq@V{/V/##1}\fi\@eqAS{##1}\fi}%
+ \eqf@setDimens{#3}{#4}%
+ \ifpdfmarkup\def\eq@On{(#5) cvn }\else
+ \def\eq@On{/#5}\fi\@eqtextFont{ZaDb}%
+ \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
+ \@eqMK{\eq@R\eq@BC\eq@BG/CA(\symbol@choice)\eq@mkIns}%
+ \@processEvery#8\end\noindent#6#7{#1}%
+}
+\def\checkBoxDefaults{%
+ \F{\FPrint}\W{1}\S{S}\BC{0 0 0}%
+}
+\newcommand\checkBox{\begingroup
+ \ef@sanitize@toks\ef@checkbox
+}
+\newcommand{\ef@checkbox}[5][]{%
+ \endgroup\mbox{\check@@Box{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
+ \eq@RadioCheck@driver}{\checkBoxDefaults\every@CheckBox}}%
+}
+\def\annot@type@radio{radiobtn}
+\newcommand\radio@@Button[8]{\begingroup\let\#\ef@Hx
+ \edef\annot@type{\annot@type@radio}%
+ \pdfstringdef\Fld@name{#2}\@eqAS{Off}%
+ \def\@eqDV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty\let\eq@DV\@empty
+ \else\ifpdfmarkup\def\eq@DV{/DV(##1) cvn }\else
+ \def\eq@DV{/DV/##1}\fi\fi}%
+ \def\@eqV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty
+ \let\eq@V\@empty\else\ifpdfmarkup\def\eq@V{/V(##1) cvn }\else
+ \def\eq@V{/V/##1}\fi\@eqAS{##1}\fi}%
+ \eqf@setDimens{#3}{#4}%
+ \ifpdfmarkup\def\eq@On{(#5) cvn }\else\def\eq@On{/#5}\fi
+ \def\eq@Ff{/Ff \FfRadio}\@eqtextFont{ZaDb}%
+ \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
+ \@eqMK{\eq@R\eq@BC\eq@BG/CA(\symbol@choice)\eq@mkIns}%
+ \@processEvery#8\end\noindent#6#7{#1}%
+}
+\def\radioButtonDefaults
+{%
+ \W{1}\S{S}\BC{0 0 0}\F{\FPrint}
+}
+\newcommand\radioButton{\begingroup
+ \ef@sanitize@toks\ef@radiobutton
+}
+\newcommand{\ef@radiobutton}[5][]{\endgroup
+ \mbox{\radio@@Button{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
+ \eq@RadioCheck@driver}{\radioButtonDefaults\every@RadioButton}}%
+}
+\newcommand\ef@radioButton[5][]
+{%
+ \mbox{\radio@@Button{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps
+ \eq@RadioCheck@driver}{\radioButtonDefaults\every@RadioButton}}%
+}
+\def\common@TextFieldCode
+{%
+ /Subtype/Widget
+ /T (\Fld@name)
+ /FT/Tx
+ \eq@Ff
+ \eq@F
+ \eq@Q
+ \eq@TU
+ \eq@MaxLen
+ /BS <<\eq@W\eq@S>>
+ /MK <<\eq@R\eq@BC\eq@BG\eq@mkIns>>
+ /DA (\eq@DA)
+ \eq@DV\eq@V
+ \eq@RV\eq@DS
+ \eq@A\eq@AA
+ \eq@rawPDF
+}
+\def\annot@type@text{textfld}
+\newcommand\text@@Field[7]
+{%
+ \begingroup
+ \edef\annot@type{\annot@type@text}%
+ \pdfstringdef\Fld@name{#2}\def\eq@Title{#2}%
+ \eqf@setDimens{#3}{#4}%
+ \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
+ \@processEvery#7\end\noindent#5#6{#1}%
+}
+\def\textFieldDefaults
+{%
+ \F{\FPrint}\BC{0 0 0}\W{1}\S{S}
+}
+\newcommand\textField{\begingroup
+ \ef@sanitize@toks\ef@textfield
+}
+\newcommand{\ef@textfield}[2][]{%
+ \endgroup\ef@textField[#1]{#2}%
+}
+\newcommand\ef@textField[4][]
+{%
+ \mbox{\text@@Field{#1}{#2}{#3}{#4}{}%
+ {\eq@setWidgetProps\eq@TextField}%
+ {\textFieldDefaults\every@TextField}}%
+}
+\let\eqTextField\textField
+\let\calcTextField\textField
+\def\common@SigFieldCode
+{%
+ /Subtype /Widget
+ /T (\Fld@name)
+ /FT/Sig
+ \eq@F
+ \eq@TU
+ /BS <<\eq@W\eq@S>>
+ /MK <<\eq@R\eq@BC\eq@BG\eq@mkIns>>
+ /DA (\eq@DA)
+ \eq@Lock
+ \eq@A\eq@AA
+ \eq@rawPDF
+}
+\def\annot@type@sig{sigfld}
+\newcommand\sig@@Field[7]{%
+ \begingroup
+ \edef\annot@type{\annot@type@sig}%
+ \pdfstringdef\Fld@name{#2}\def\eq@Title{#2}%
+ \eqf@setDimens{#3}{#4}%
+ \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
+ \@processEvery#7\end\noindent#5#6{#1}%
+}
+\def\sigFieldDefaults
+{%
+ \F{\FPrint}\BC{}\BG{}\W{1}\S{S}
+}
+\newcommand\sigField{\begingroup
+ \ef@sanitize@toks\ef@sigfield
+}
+\newcommand{\ef@sigfield}[1][]{%
+ \endgroup\ef@sigField[#1]%
+}
+\newcommand\ef@sigField[4][]
+{%
+ \mbox{\sig@@Field{#1}{#2}{#3}{#4}{}{\eq@setWidgetProps\eq@SigField}%
+ {\sigFieldDefaults\every@sigField}}%
+}
+\def\common@LinkCode
+{%
+ \eq@A % Action
+ \eq@H % Highlight
+ \eq@Color % Border color
+ \link@BS % Border styles
+ \eq@rawPDF % everything else
+}
+\def\annot@type@link{link}
+\newcommand\set@@Link[7]
+{%
+ \begingroup
+ \makeJSspecials
+ \edef\annot@type{\annot@type@link}%
+ \ef@preProcDefns
+ \eqf@setDimens{#2}{#3}%
+ \ifx\eq@rectW\@empty\def\link@@Box{#4}\else
+ \def\eq@arg{#4}\ifx\eq@arg\@empty
+ \def\eq@content{\hfill\vfill}\else\def\eq@content{#4}\fi
+ \def\link@@Box{\parbox[\eq@pos][\eq@rectH][\eq@innerpos]%
+ {\eq@rectW}{\centering\eq@content}}%
+ \fi
+ \@processEvery#7\end\noindent#5#6{#1}%
+}
+\def\defaultlinkcolor{\@linkcolor}
+\def\setDef@ultLinkColor{\ifHy@colorlinks
+ \def\ef@thislinkcolor{\defaultlinkcolor}
+ \def\ef@colorthislink{\color{\ef@thislinkcolor}}\else
+ \let\ef@colorthislink\relax\fi
+}
+\AtBeginDocument{\setDef@ultLinkColor}
+\def\set@LinkTextDefaults{\S{S}\Border{0 0 0}}
+\newcommand\setLink{\begingroup
+ \ef@sanitize@toks\ef@setlinktext
+}
+\let\setLinkText\setLink
+\newcommand{\ef@setlinktext}[1][]{%
+ \endgroup\ef@searchmlLink#1\mlLink\end\@nil
+ \ifx\ef@mlLink\ef@Zero\def\ef@next{\set@LinkText[#1]}\else
+ \def\ef@next{\mlhypertext[#1]}\fi\ef@next
+}
+\newcommand\set@LinkText[2][]{%
+ \set@@Link{#1}{}{}{\ef@colorthislink#2}{}%
+ {\eq@setWidgetProps{\ef@postProcLinkProps\setLink@driver}}%
+ {\set@LinkTextDefaults\every@Link}%
+}
+\def\ef@preProcDefns{%
+ \def\Win##1{/Win <<##1>>}%
+ \def\fitpage{\dl@fitpage}\def\actualsize{\dl@actualsize}%
+ \def\fitwidth{\dl@fitwidth}\def\fitheight{\dl@fitheight}%
+ \def\fitvisible{\dl@fitvisible}\def\inheritzoom{\dl@inheritzoom}%
+ \let\rPage\ef@rPage
+ \edef\Page##1{\ifcase\eq@drivernum
+ {Page##1}\or
+ \noexpand\pdfpageref##1\space\space 0 R\or
+ \noexpand @page##1\fi
+ }%
+}
+\def\ef@postProcLinkProps{}
+\newcommand{\mlsetLink}{\mlhypertext}
+\newcommand{\mlhypertext}[2][]{\@ifundefined{mlhypertext@i}
+ {\PackageWarning{eforms}{The \string\mlhypertext\space command
+ does nothing unless\MessageBreak the aeb_mlink package is loaded}}{}%
+ #2}
+\def\set@LinkBboxDefaults{\S{S}\Border{0 0 0}}
+\newcommand{\setLinkBbox}{\begingroup
+ \ef@sanitize@toks\ef@linkbbox
+}
+\newcommand{\ef@linkbbox}[1][]{%
+ \endgroup\ef@setLinkBbox[#1]%
+}
+\newcommand{\ef@setLinkBbox}[3][]{%
+ \@setLinkBbox{#1}{#2}{#3}%
+}
+\def\@setLinkBbox#1#2#3{\@ifnextchar[{\@@setLinkBbox{#1}{#2}{#3}}%
+ {\@@setLinkBbox{#1}{#2}{#3}[c]}}
+\def\@@setLinkBbox#1#2#3[#4]{%
+ \@ifnextchar[{\@@@setLinkBbox{#1}{#2}{#3}{#4}}%
+ {\@@@setLinkBbox{#1}{#2}{#3}{#4}[#4]}%
+}
+\def\@@@setLinkBbox#1#2#3#4[#5]#6{%
+ \def\eq@pos{#4}\def\eq@innerpos{#5}%
+ \set@@Link{#1}{#2}{#3}{\ef@colorthislink#6}%
+ {\eq@setWidgetProps\setLink@driver}{}%
+ {\set@LinkBboxDefaults\every@Link}%
+}
+\def\set@LinkPboxDefaults{\S{S}\Border{0 0 0}}
+\newcommand\setLinkPbox{\begingroup
+ \ef@sanitize@toks\ef@linkpbox
+}
+\newcommand{\ef@linkpbox}[1]{%
+ \endgroup\ef@setLinkPbox{#1}%
+}
+\newcommand\ef@setLinkPbox[1]{%
+ \@setLinkPbox{#1\BS{}}{}{}{\hfill\vfill}%
+}
+\def\@setLinkPbox#1#2#3{\@ifnextchar[{\@@setLinkPbox{#1}{#2}{#3}}%
+ {\@@setLinkPbox{#1}{#2}{#3}[c]}}
+\def\@@setLinkPbox#1#2#3[#4]{%
+ \@ifnextchar[{\@@@setLinkPbox{#1}{#2}{#3}{#4}}%
+ {\@@@setLinkPbox{#1}{#2}{#3}{#4}[#4]}
+}
+\def\@@@setLinkPbox#1#2#3#4[#5]#6{%
+ \def\eq@pos{#4}\def\eq@innerpos{#5}%
+ \set@@Link{#1}{#2}{#3}{#6}{\eq@setWidgetProps\setLinkPbox@driver}%
+ {}{\set@LinkPboxDefaults\every@Link}%
+}
+\input{\eq@drivercode}
+\inputCalcOrderJS
+\endinput
+%%
+%% End of file `eforms.sty'.
diff --git a/texmf-dist/tex/latex/acrotex/epdfmark.def b/texmf-dist/tex/latex/acrotex/epdfmark.def
index 88b4309b..be20a1c6 100644
--- a/texmf-dist/tex/latex/acrotex/epdfmark.def
+++ b/texmf-dist/tex/latex/acrotex/epdfmark.def
@@ -1,127 +1,127 @@
-%%
-%% This is file `epdfmark.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% eforms.dtx (with options: `copyright,epdfmark')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% eForms package, %%
-%% Copyright (C) 2002-2018 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\Rect#1{\pdf@rect{\textcolor{\@linkcolor}{#1}}}
-\def\noPeek#1#2{\literalps@out{%
- [ {ThisPage} << \noPeekAction{#1}{#2} >> /PUT pdfmark}}
-\def\eq@choice@driver
-{%
- \Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \literalps@out{%
- [ \ifisCalculate/_objdef {\Fld@name}\else\eq@objdef\fi
- /Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
- \common@choiceCode
- /ANN pdfmark
- \ifisCalculate[ {corder} {\Fld@name} /APPEND pdfmark\fi
- }\to@insertStrucTabOrder{Form}\endgroup
-}
-\def\eq@Button@driver
-{%
- \Hy@pdfstringtrue
- \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\ef@djXPD\fi
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \literalps@out{%
- [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
- \common@pushButtonCode
- /ANN pdfmark}\to@insertStrucTabOrder{Form}\endgroup
-}
-\def\eq@RadioCheck@driver
-{%
- \Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
- \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \literalps@out{%
- [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
- \common@RadioCheckCode
- /ANN pdfmark}\to@insertStrucTabOrder{Form}\endgroup
-}
-\def\eq@l@check@driver
-{%
- \pdf@rect{\makebox[\eq@tmpdima]{\phantom{\link@@Content}}}%
- \literalps@out{%
- [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
- \common@RadioCheckCode
- /ANN pdfmark}\endgroup
-}
-\def\eq@TextField{\Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \literalps@out{%
- [ \ifisCalculate/_objdef {\Fld@name}\else\eq@objdef\fi
- /Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
- \common@TextFieldCode
- /ANN pdfmark
- \ifisCalculate[ {corder} {\Fld@name} /APPEND pdfmark\fi
- }\to@insertStrucTabOrder{Form}\endgroup
-}
-\def\eq@SigField{\Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
- \literalps@out{%
- [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
- \common@SigFieldCode
- /ANN pdfmark
- }\to@insertStrucTabOrder{Form}\endgroup
-}
-\def\convertAToAction/A#1\@nil{\def\eq@A{/Action#1}}
-\def\setLink@driver
-{%
- \ifx\eq@A\@empty\else\expandafter\convertAToAction\eq@A\@nil\fi
- \@eqBS{}%
- \pdf@rect{\link@@Box}%
- \literalps@out{%
- [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
- \eq@Border
- \common@LinkCode
- /Subtype /Link
- /ANN pdfmark}%
- \to@insertStrucTabOrder{Link}\endgroup
-}
-\def\pboxRect{/Rect [\par@@Rect]}
-\def\mllnkcontainer#1{#1}
-\def\setLinkPbox@driver
-{%
- \ifx\eq@A\@empty\else\expandafter\convertAToAction\eq@A\@nil\fi
- \@eqBS{}%
- \literalps@out{\mllnkcontainer{%
- [ \eq@objdef\pboxRect
- \eq@Border
- \eq@QuadPoints % QuadPoints
- \common@LinkCode
- /Subtype /Link
- /ANN pdfmark}}%
- \to@insertStrucTabOrder{Link}\endgroup
-}
-\endinput
-%%
-%% End of file `epdfmark.def'.
+%%
+%% This is file `epdfmark.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% eforms.dtx (with options: `copyright,epdfmark')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% eForms package, %%
+%% Copyright (C) 2002-2018 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\Rect#1{\pdf@rect{\textcolor{\@linkcolor}{#1}}}
+\def\noPeek#1#2{\literalps@out{%
+ [ {ThisPage} << \noPeekAction{#1}{#2} >> /PUT pdfmark}}
+\def\eq@choice@driver
+{%
+ \Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \literalps@out{%
+ [ \ifisCalculate/_objdef {\Fld@name}\else\eq@objdef\fi
+ /Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ \common@choiceCode
+ /ANN pdfmark
+ \ifisCalculate[ {corder} {\Fld@name} /APPEND pdfmark\fi
+ }\to@insertStrucTabOrder{Form}\endgroup
+}
+\def\eq@Button@driver
+{%
+ \Hy@pdfstringtrue
+ \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\ef@djXPD\fi
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \literalps@out{%
+ [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ \common@pushButtonCode
+ /ANN pdfmark}\to@insertStrucTabOrder{Form}\endgroup
+}
+\def\eq@RadioCheck@driver
+{%
+ \Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
+ \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \literalps@out{%
+ [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ \common@RadioCheckCode
+ /ANN pdfmark}\to@insertStrucTabOrder{Form}\endgroup
+}
+\def\eq@l@check@driver
+{%
+ \pdf@rect{\makebox[\eq@tmpdima]{\phantom{\link@@Content}}}%
+ \literalps@out{%
+ [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ \common@RadioCheckCode
+ /ANN pdfmark}\endgroup
+}
+\def\eq@TextField{\Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \literalps@out{%
+ [ \ifisCalculate/_objdef {\Fld@name}\else\eq@objdef\fi
+ /Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ \common@TextFieldCode
+ /ANN pdfmark
+ \ifisCalculate[ {corder} {\Fld@name} /APPEND pdfmark\fi
+ }\to@insertStrucTabOrder{Form}\endgroup
+}
+\def\eq@SigField{\Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
+ \literalps@out{%
+ [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ \common@SigFieldCode
+ /ANN pdfmark
+ }\to@insertStrucTabOrder{Form}\endgroup
+}
+\def\convertAToAction/A#1\@nil{\def\eq@A{/Action#1}}
+\def\setLink@driver
+{%
+ \ifx\eq@A\@empty\else\expandafter\convertAToAction\eq@A\@nil\fi
+ \@eqBS{}%
+ \pdf@rect{\link@@Box}%
+ \literalps@out{%
+ [ \eq@objdef/Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ \eq@Border
+ \common@LinkCode
+ /Subtype /Link
+ /ANN pdfmark}%
+ \to@insertStrucTabOrder{Link}\endgroup
+}
+\def\pboxRect{/Rect [\par@@Rect]}
+\def\mllnkcontainer#1{#1}
+\def\setLinkPbox@driver
+{%
+ \ifx\eq@A\@empty\else\expandafter\convertAToAction\eq@A\@nil\fi
+ \@eqBS{}%
+ \literalps@out{\mllnkcontainer{%
+ [ \eq@objdef\pboxRect
+ \eq@Border
+ \eq@QuadPoints % QuadPoints
+ \common@LinkCode
+ /Subtype /Link
+ /ANN pdfmark}}%
+ \to@insertStrucTabOrder{Link}\endgroup
+}
+\endinput
+%%
+%% End of file `epdfmark.def'.
diff --git a/texmf-dist/tex/latex/acrotex/epdftex.def b/texmf-dist/tex/latex/acrotex/epdftex.def
index 7edb9d9c..aef1ac3f 100644
--- a/texmf-dist/tex/latex/acrotex/epdftex.def
+++ b/texmf-dist/tex/latex/acrotex/epdftex.def
@@ -1,106 +1,106 @@
-%%
-%% This is file `epdftex.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% eforms.dtx (with options: `copyright,epdftex')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% eForms package, %%
-%% Copyright (C) 2002-2018 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\noPeek#1#2{\global\pdfpageattr=\expandafter{\noPeekAction{#1}{#2}}}
-\def\HyField@@AddToFields#1{%
- \HyField@AfterAuxOpen{%
- \if@filesw
- \write\@mainaux{%
- \string\HyField@AuxAddToFields{#1}}%
- \ifisCalculate\write\@mainaux{%
- \string\HyField@AuxAddToCoFields{}{#1}}\fi
- \fi
- }%
-}%
-\def\eq@choice@driver
-{%
- \Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \hbox{\pdfstartlink user{\common@choiceCode}%
- \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
- \HyField@AddToFields
- \endgroup
-}
-\def\eq@Button@driver
-{%
- \Hy@pdfstringtrue
- \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\ef@djXPD\fi
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
- \hbox{\pdfstartlink user{ \common@pushButtonCode }%
- \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
- \endgroup
-}
-\def\eq@RadioCheck@driver
-{%
- \Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
- \hbox{\pdfstartlink user{\common@RadioCheckCode}%
- \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
- \endgroup
-}
-\def\eq@l@check@driver
-{%
- \pdfstartlink user{\common@RadioCheckCode}%
- \makebox[\eq@tmpdima]{\phantom{\link@@Content}}%
- \pdfendlink\endgroup
-}
-\def\eq@TextField{\Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \leavevmode
- \hbox{\pdfstartlink user{\common@TextFieldCode}%
- \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
- \HyField@AddToFields
- \endgroup
-}
-\def\eq@SigField{\Hy@pdfstringtrue
- \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
- \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
- \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
- \leavevmode\hbox{\pdfstartlink user{\common@SigFieldCode}%
- \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
- \endgroup
-}
-\def\setLink@driver
-{%
- \@eqBS{}%
- \leavevmode\pdfstartlink
- attr {\eq@Border}%
- user{/Subtype/Link \common@LinkCode}%
- \Hy@colorlink{\@linkcolor}\link@@Box
- \close@pdflink
- \endgroup
-}
-\def\ef@setTabOrder{\ifx\ef@taborder\@empty\else
- \edef\ef@tmp@toks{\the\pdfpageattr\space/Tabs/\ef@taborder}%
- \global\pdfpageattr=\expandafter{\ef@tmp@toks}%
- \fi\endgroup
-}
-\endinput
-%%
-%% End of file `epdftex.def'.
+%%
+%% This is file `epdftex.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% eforms.dtx (with options: `copyright,epdftex')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% eForms package, %%
+%% Copyright (C) 2002-2018 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\noPeek#1#2{\global\pdfpageattr=\expandafter{\noPeekAction{#1}{#2}}}
+\def\HyField@@AddToFields#1{%
+ \HyField@AfterAuxOpen{%
+ \if@filesw
+ \write\@mainaux{%
+ \string\HyField@AuxAddToFields{#1}}%
+ \ifisCalculate\write\@mainaux{%
+ \string\HyField@AuxAddToCoFields{}{#1}}\fi
+ \fi
+ }%
+}%
+\def\eq@choice@driver
+{%
+ \Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \hbox{\pdfstartlink user{\common@choiceCode}%
+ \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
+ \HyField@AddToFields
+ \endgroup
+}
+\def\eq@Button@driver
+{%
+ \Hy@pdfstringtrue
+ \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\ef@djXPD\fi
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
+ \hbox{\pdfstartlink user{ \common@pushButtonCode }%
+ \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
+ \endgroup
+}
+\def\eq@RadioCheck@driver
+{%
+ \Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
+ \hbox{\pdfstartlink user{\common@RadioCheckCode}%
+ \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
+ \endgroup
+}
+\def\eq@l@check@driver
+{%
+ \pdfstartlink user{\common@RadioCheckCode}%
+ \makebox[\eq@tmpdima]{\phantom{\link@@Content}}%
+ \pdfendlink\endgroup
+}
+\def\eq@TextField{\Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \leavevmode
+ \hbox{\pdfstartlink user{\common@TextFieldCode}%
+ \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
+ \HyField@AddToFields
+ \endgroup
+}
+\def\eq@SigField{\Hy@pdfstringtrue
+ \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}%
+ \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH
+ \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi
+ \leavevmode\hbox{\pdfstartlink user{\common@SigFieldCode}%
+ \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
+ \endgroup
+}
+\def\setLink@driver
+{%
+ \@eqBS{}%
+ \leavevmode\pdfstartlink
+ attr {\eq@Border}%
+ user{/Subtype/Link \common@LinkCode}%
+ \Hy@colorlink{\@linkcolor}\link@@Box
+ \close@pdflink
+ \endgroup
+}
+\def\ef@setTabOrder{\ifx\ef@taborder\@empty\else
+ \edef\ef@tmp@toks{\the\pdfpageattr\space/Tabs/\ef@taborder}%
+ \global\pdfpageattr=\expandafter{\ef@tmp@toks}%
+ \fi\endgroup
+}
+\endinput
+%%
+%% End of file `epdftex.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqbr.def b/texmf-dist/tex/latex/acrotex/eqbr.def
index 650f2481..95be10d9 100644
--- a/texmf-dist/tex/latex/acrotex/eqbr.def
+++ b/texmf-dist/tex/latex/acrotex/eqbr.def
@@ -1,84 +1,84 @@
-%%
-%% This is file `eqbr.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,eqbr')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{eqbr.def}
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-%%%%%%%%%%%%%%%%%%% eqbr.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Foreign language support for the exerquiz package. %%
-%% Name of translator: Koichi Sameshima %%
-%% e-mail address: ksameshi@usp.br %%
-%% Language: (brazil) %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\renewcommand\exlabel{Exerc\texorpdfstring{\'{\i}}{\string\355}cio}
-\renewcommand\exlabelsol{Exerc\string\'{\string\i}cio}
-
-\renewcommand\exsectitle{Solu\texorpdfstring{\c{c}}{\string\347}%
- \texorpdfstring{\~{o}}{%
- \string\365}es dos Exerc\texorpdfstring{\'{\i}}{\string\355}cios}
- %{Solu\string\\347\string\\363es dos Exerc\string\\355cios}}
-\renewcommand\exsecrunhead{%
- Solu\protect\c{c}\protect\~{o}es dos Exerc\protect\'{i}cios}
-
-\renewcommand{\eq@exsolafterDefault}{\textit{Solu\c{c}\~{a}o}:}
-
-\renewcommand\eq@sqslsectitle{Solu\c{c}\~{o}es
- dos Testes}
-\renewcommand\sqslsectitle{\eq@sqslsectitle}
-
-\renewcommand\eq@sqslsecrunhead{Solu\protect\c{c}\protect\~{o}es
- dos Testes}
-\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
-
-\renewcommand\eq@sqsllabel{%
- \string\textbf{Solu\protect\c{c}\protect\~{a}o do Teste:}}
-\renewcommand\sqsllabel{\eq@sqsllabel}
-
-\renewcommand\sqsolafter{\textit{Solu\protect\c{c}\protect\~{a}o}:}
-
-\renewcommand\eq@sqlabel{\textcolor{red}{Teste.}}
-\renewcommand\sqlabel{\eq@sqlabel}
-
-\renewcommand\eq@sqslrtnlabel{Finaliza Teste}
-\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
-
-\renewcommand\eqsqrtmsg{"Correto!"}
-\renewcommand\eqsqwgmsg{"Incorreto!"}
-
-\renewcommand\eq@bqlabel{Inicia Teste}
-\renewcommand\bqlabel{\eq@bqlabel}
-\renewcommand\eq@bqlabelISO{\eq@bqlabel}
-\renewcommand\bqlabelISO{\eq@bqlabel}
-
-\renewcommand\eq@eqlabel{Finaliza Teste}
-\renewcommand\eqlabel{\eq@eqlabel}
-\renewcommand\eq@Score{Pontos:}\renewcommand\eq@OutOf{de}
-\renewcommand\eqInitQuizMsg{% ******
- "Voc\string\352 precisa iniciar o Teste! Clique sobre "+msg+"."}
-\renewcommand\eqMadeChoice{%
- "Voc\string\352 j\string\341 respondeu.
- Sua resposta foi ("+Responses[probno]+").
- Quer alter\string\341-la?"}
-\renewcommand\eq@local@CA{Corretas}
-\renewcommand\eq@local@RC{Minhas Respostas!}
-\renewcommand\eq@local@AC{Por Favor!}
-\endinput
-%%
-%% End of file `eqbr.def'.
+%%
+%% This is file `eqbr.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqbr')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesFile{eqbr.def}
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+%%%%%%%%%%%%%%%%%%% eqbr.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Koichi Sameshima %%
+%% e-mail address: ksameshi@usp.br %%
+%% Language: (brazil) %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\renewcommand\exlabel{Exerc\texorpdfstring{\'{\i}}{\string\355}cio}
+\renewcommand\exlabelsol{Exerc\string\'{\string\i}cio}
+
+\renewcommand\exsectitle{Solu\texorpdfstring{\c{c}}{\string\347}%
+ \texorpdfstring{\~{o}}{%
+ \string\365}es dos Exerc\texorpdfstring{\'{\i}}{\string\355}cios}
+ %{Solu\string\\347\string\\363es dos Exerc\string\\355cios}}
+\renewcommand\exsecrunhead{%
+ Solu\protect\c{c}\protect\~{o}es dos Exerc\protect\'{i}cios}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Solu\c{c}\~{a}o}:}
+
+\renewcommand\eq@sqslsectitle{Solu\c{c}\~{o}es
+ dos Testes}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{Solu\protect\c{c}\protect\~{o}es
+ dos Testes}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Solu\protect\c{c}\protect\~{a}o do Teste:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{Solu\protect\c{c}\protect\~{a}o}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Teste.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Finaliza Teste}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Correto!"}
+\renewcommand\eqsqwgmsg{"Incorreto!"}
+
+\renewcommand\eq@bqlabel{Inicia Teste}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{Finaliza Teste}
+\renewcommand\eqlabel{\eq@eqlabel}
+\renewcommand\eq@Score{Pontos:}\renewcommand\eq@OutOf{de}
+\renewcommand\eqInitQuizMsg{% ******
+ "Voc\string\352 precisa iniciar o Teste! Clique sobre "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "Voc\string\352 j\string\341 respondeu.
+ Sua resposta foi ("+Responses[probno]+").
+ Quer alter\string\341-la?"}
+\renewcommand\eq@local@CA{Corretas}
+\renewcommand\eq@local@RC{Minhas Respostas!}
+\renewcommand\eq@local@AC{Por Favor!}
+\endinput
+%%
+%% End of file `eqbr.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqcat.def b/texmf-dist/tex/latex/acrotex/eqcat.def
index dce3df50..e0c78acb 100644
--- a/texmf-dist/tex/latex/acrotex/eqcat.def
+++ b/texmf-dist/tex/latex/acrotex/eqcat.def
@@ -1,78 +1,78 @@
-%%
-%% This is file `eqcat.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,eqcat')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{eqcat.def}
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-%%%%%%%%%%%%%%%%%%% eqcat.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Foreign language support for the exerquiz package. %%
-%% Name of translator: Ramon Ballester %%
-%% e-mail address: ramon.ballester@udg.es %%
-%% Language: (catalan) %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\renewcommand\exlabel{Exercici}
-\renewcommand\exlabelsol{\exlabel}
-
-\renewcommand\exsectitle{Solucions als \exlabel s}
-\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
-
-\renewcommand{\eq@exsolafterDefault}{\textit{Soluci\'o}:}
-
-\renewcommand\eq@sqslsectitle{Solucions als Tests}
-\renewcommand\sqslsectitle{\eq@sqslsectitle}
-
-\renewcommand\eq@sqslsecrunhead{Solucions als Tests}
-\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
-
-\renewcommand\eq@sqsllabel{%
- \string\textbf{Soluci\protect\'{o} al Test:}}
-\renewcommand\sqsllabel{\eq@sqsllabel}
-
-\renewcommand\sqsolafter{\textit{Soluci\'o}:}
-
-\renewcommand\eq@sqlabel{\textcolor{red}{Test.}}
-\renewcommand\sqlabel{\eq@sqlabel}
-
-\renewcommand\eq@sqslrtnlabel{Final del Test}
-\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
-
-\renewcommand\eqsqrtmsg{"Correcte!"}
-\renewcommand\eqsqwgmsg{"Incorrecte!"}
-
-\renewcommand\eq@bqlabel{Inici del Test}
-\renewcommand\bqlabel{\eq@bqlabel}
-\renewcommand\eq@bqlabelISO{\eq@bqlabel}
-\renewcommand\bqlabelISO{\eq@bqlabel}
-
-\renewcommand\eq@eqlabel{Final del Test}
-\renewcommand\eqlabel{\eq@eqlabel}
-\renewcommand\eq@Score{Punts:}\renewcommand\eq@OutOf{de}
-\renewcommand\eqInitQuizMsg{"Has d'iniciar el Test!
- Prem sobre "+msg+"."}
-\renewcommand\eqMadeChoice{%
- "Ja has elegit una resposta.
- La teva resposta ha estat ("+Responses[probno]+").
- Vols canviar--la?"}
-\renewcommand\eq@local@CA{Correctes}
-\renewcommand\eq@local@RC{Les meves Respostes!}
-\renewcommand\eq@local@AC{Si us plau!}
-\endinput
-%%
-%% End of file `eqcat.def'.
+%%
+%% This is file `eqcat.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqcat')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesFile{eqcat.def}
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+%%%%%%%%%%%%%%%%%%% eqcat.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Ramon Ballester %%
+%% e-mail address: ramon.ballester@udg.es %%
+%% Language: (catalan) %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\renewcommand\exlabel{Exercici}
+\renewcommand\exlabelsol{\exlabel}
+
+\renewcommand\exsectitle{Solucions als \exlabel s}
+\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Soluci\'o}:}
+
+\renewcommand\eq@sqslsectitle{Solucions als Tests}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{Solucions als Tests}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Soluci\protect\'{o} al Test:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{Soluci\'o}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Test.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Final del Test}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Correcte!"}
+\renewcommand\eqsqwgmsg{"Incorrecte!"}
+
+\renewcommand\eq@bqlabel{Inici del Test}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{Final del Test}
+\renewcommand\eqlabel{\eq@eqlabel}
+\renewcommand\eq@Score{Punts:}\renewcommand\eq@OutOf{de}
+\renewcommand\eqInitQuizMsg{"Has d'iniciar el Test!
+ Prem sobre "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "Ja has elegit una resposta.
+ La teva resposta ha estat ("+Responses[probno]+").
+ Vols canviar--la?"}
+\renewcommand\eq@local@CA{Correctes}
+\renewcommand\eq@local@RC{Les meves Respostes!}
+\renewcommand\eq@local@AC{Si us plau!}
+\endinput
+%%
+%% End of file `eqcat.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqcolor.def b/texmf-dist/tex/latex/acrotex/eqcolor.def
index c95b02b0..77bb0d39 100644
--- a/texmf-dist/tex/latex/acrotex/eqcolor.def
+++ b/texmf-dist/tex/latex/acrotex/eqcolor.def
@@ -1,86 +1,86 @@
-%%
-%% This is file `eqcolor.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,eqcolor')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-\def\eq@getCmdName#1#2{\edef#1{\expandafter\@gobble\string#2}}
-\def\eq@getfirst#1#2\@nil{\def\eq@argi{#1}}
-\def\eq@checkValidityModel#1{%
- \if#1g\else\if#1r\else\if#1c\else
- \PackageError{exerquiz}
- {JavaScript does not support this model}
- {Use a named color from one of the models gray, rgb, or cmyk.}
- \fi\fi\fi
-}
-\def\eq@jsSetColorMsg#1#2{\PackageWarning{exerquiz}
- {The argument `#2' of \string#1\MessageBreak
- is not of the right form.\MessageBreak Using the default}}
-\def\eqModelInfo#1#2{%
- \uppercase{\def\eq@ucmodel{#1}}\def\eq@modelspec{#2}%
- \eq@getfirst#1\@nil\eq@ResetModelForGray{\eq@argi}%
- \eq@checkValidityModel{\eq@argi}%
-}
-\def\eq@ResetModelForGray#1{\if#1g\def\eq@ucmodel{G}\fi}
-\def\eq@checkRawJSColor#1{%
- \edef\eq@argi{#1}\ifx\eq@argi\@empty
- \def\eq@next{\let\eq@rawJSCol\eq@YES}\else
- \def\eq@next{\expandafter\eq@@checkRawJSColor#1\@nil}\fi\eq@next
-}
-\def\eq@@checkRawJSColor#1#2#3\@nil{\let\eq@rawJSCol\eq@NO
- \let\eqpredefineJSCol\eq@NO
- \if[#1\if#2"\let\eq@rawJSCol\eq@YES\fi\fi
- \ifx\eq@rawJSCol\eq@NO\if#1c\if#2o\let\eq@rawJSCol\eq@YES
- \let\eqpredefineJSCol\eq@YES\fi\fi\fi
-}
-\def\eq@jsColorWXColori#1#2{\edef\eq@colorDefn{#2}%
- \ifx\eq@colorDefn\@empty
- \ifx\is@Defined\eq@YES
- \edef\eq@colorDefn{\csname\cmdName Def\endcsname}\else
- \PackageError{exerquiz}{JS color \string#1 has an
- empty definition}{}\fi
- \fi
- \eq@checkRawJSColor{\eq@colorDefn}%
- \ifx\eq@rawJSCol\eq@NO
- \extractcolorspec{\eq@colorDefn}{\eq@tmp@color}%
- \expandafter\eqModelInfo\eq@tmp@color
- \edef#1{["\eq@ucmodel",\eq@modelspec]}%
- \else\edef#1{\eq@colorDefn}\fi
-}
-\def\eq@jsColorWOXColori#1#2{\def\eq@colorDefn{#2}%
- \ifx\eq@colorDefn\@empty
- \ifx\is@Defined\eq@YES
- \edef\eq@colorDefn{\csname cmdName Def\endcsname}\else
- \PackageError{exerquiz}{JS color \string#1 has an
- empty definition}{}\fi
- \fi
- \eq@checkRawJSColor{\eq@colorDefn}%
- \ifx\eq@rawJSCol\eq@YES\edef#1{\eq@colorDefn}\else
- \eq@jsSetColorMsg{#1}{#2}\fi
-}
-\def\jsColor#1#2{\eq@getCmdName{\cmdName}{#1}%
- \let\is@Defined\eq@YES
- \expandafter\ifx\csname\cmdName\endcsname\relax
- \PackageWarning{exerquiz}{\string#1 is not a command used by
- exerquiz.\MessageBreak Will define it anyway}%
- \let\is@Defined\eq@NO\fi
- \HyColor@IfXcolor{\eq@jsColorWXColori{#1}{#2}}%
- {\eq@jsColorWOXColori{#1}{#2}}%
-}
-\endinput
-%%
-%% End of file `eqcolor.def'.
+%%
+%% This is file `eqcolor.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqcolor')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+\def\eq@getCmdName#1#2{\edef#1{\expandafter\@gobble\string#2}}
+\def\eq@getfirst#1#2\@nil{\def\eq@argi{#1}}
+\def\eq@checkValidityModel#1{%
+ \if#1g\else\if#1r\else\if#1c\else
+ \PackageError{exerquiz}
+ {JavaScript does not support this model}
+ {Use a named color from one of the models gray, rgb, or cmyk.}
+ \fi\fi\fi
+}
+\def\eq@jsSetColorMsg#1#2{\PackageWarning{exerquiz}
+ {The argument `#2' of \string#1\MessageBreak
+ is not of the right form.\MessageBreak Using the default}}
+\def\eqModelInfo#1#2{%
+ \uppercase{\def\eq@ucmodel{#1}}\def\eq@modelspec{#2}%
+ \eq@getfirst#1\@nil\eq@ResetModelForGray{\eq@argi}%
+ \eq@checkValidityModel{\eq@argi}%
+}
+\def\eq@ResetModelForGray#1{\if#1g\def\eq@ucmodel{G}\fi}
+\def\eq@checkRawJSColor#1{%
+ \edef\eq@argi{#1}\ifx\eq@argi\@empty
+ \def\eq@next{\let\eq@rawJSCol\eq@YES}\else
+ \def\eq@next{\expandafter\eq@@checkRawJSColor#1\@nil}\fi\eq@next
+}
+\def\eq@@checkRawJSColor#1#2#3\@nil{\let\eq@rawJSCol\eq@NO
+ \let\eqpredefineJSCol\eq@NO
+ \if[#1\if#2"\let\eq@rawJSCol\eq@YES\fi\fi
+ \ifx\eq@rawJSCol\eq@NO\if#1c\if#2o\let\eq@rawJSCol\eq@YES
+ \let\eqpredefineJSCol\eq@YES\fi\fi\fi
+}
+\def\eq@jsColorWXColori#1#2{\edef\eq@colorDefn{#2}%
+ \ifx\eq@colorDefn\@empty
+ \ifx\is@Defined\eq@YES
+ \edef\eq@colorDefn{\csname\cmdName Def\endcsname}\else
+ \PackageError{exerquiz}{JS color \string#1 has an
+ empty definition}{}\fi
+ \fi
+ \eq@checkRawJSColor{\eq@colorDefn}%
+ \ifx\eq@rawJSCol\eq@NO
+ \extractcolorspec{\eq@colorDefn}{\eq@tmp@color}%
+ \expandafter\eqModelInfo\eq@tmp@color
+ \edef#1{["\eq@ucmodel",\eq@modelspec]}%
+ \else\edef#1{\eq@colorDefn}\fi
+}
+\def\eq@jsColorWOXColori#1#2{\def\eq@colorDefn{#2}%
+ \ifx\eq@colorDefn\@empty
+ \ifx\is@Defined\eq@YES
+ \edef\eq@colorDefn{\csname cmdName Def\endcsname}\else
+ \PackageError{exerquiz}{JS color \string#1 has an
+ empty definition}{}\fi
+ \fi
+ \eq@checkRawJSColor{\eq@colorDefn}%
+ \ifx\eq@rawJSCol\eq@YES\edef#1{\eq@colorDefn}\else
+ \eq@jsSetColorMsg{#1}{#2}\fi
+}
+\def\jsColor#1#2{\eq@getCmdName{\cmdName}{#1}%
+ \let\is@Defined\eq@YES
+ \expandafter\ifx\csname\cmdName\endcsname\relax
+ \PackageWarning{exerquiz}{\string#1 is not a command used by
+ exerquiz.\MessageBreak Will define it anyway}%
+ \let\is@Defined\eq@NO\fi
+ \HyColor@IfXcolor{\eq@jsColorWXColori{#1}{#2}}%
+ {\eq@jsColorWOXColori{#1}{#2}}%
+}
+\endinput
+%%
+%% End of file `eqcolor.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqcz.def b/texmf-dist/tex/latex/acrotex/eqcz.def
index 8ec760a9..15ef0e7d 100644
--- a/texmf-dist/tex/latex/acrotex/eqcz.def
+++ b/texmf-dist/tex/latex/acrotex/eqcz.def
@@ -1,114 +1,114 @@
-%%
-%% This is file `eqcz.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,eqcz')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{eqcz.def}
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-%%%%%%%%%%%%%%%%%%% eqcat.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Foreign language support for the exerquiz package. %%
-%% Name of translator: Robert Marik %%
-%% e-mail address: marik@mendelu.cz %%
-%% Language: (czech) %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\SFW{1.75in}
-
-\renewcommand\exlabel{Cvi\v{c}en\'{\i}}
-\renewcommand\exlabelsol{Cvi\protect\v{c}en\protect\'{\protect\i}}
-
-\renewcommand\exsectitle{\texorpdfstring{\v{R}e\v{s}en\'{\i}
- ke cvi\v{c}en\'{\i}m}
- {Resen\355{} ke cvicen\355m}} %% change to @ form
-\renewcommand\exsecrunhead{%
- \string\v{R}e\string\v{s}en\string\'{\string\i}
- ke cvi\string\v{c}en\string\'{\string\i}m}
-
-\renewcommand{\eq@exsolafterDefault}{\textit{\v{R}e\v{s}en\'\i}:}
-
-\renewcommand\eq@sqslsectitle{\texorpdfstring{\v{R}e\v{s}en\'{\i}
- kv\'{\i}z\r{u}}{Resen\355{} kv\355zu}}
-\renewcommand\sqslsectitle{\eq@sqslsectitle}
-
-\renewcommand\eq@sqslsecrunhead{\v{R}e\v{s}en\'{\i} kv\'{\i}z\r{u}}
-\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
-
-\renewcommand\eq@sqsllabel{\string\textbf{%
- \string\v{R}e\string\v{s}en\string\'{\string\i}
- kv\string\'{\string\i}zu:}}
-\renewcommand\sqsllabel{\eq@sqsllabel}
-
-\renewcommand\sqsolafter{\textit{\v{R}e\v{s}en\'{\i}}:}
-
-\renewcommand\eq@sqlabel{\textcolor{red}{Kv\'{\i}z.}}
-\renewcommand\sqlabel{\eq@sqlabel}
-
-\renewcommand\eq@sqslrtnlabel{Zp\string\v{e}t na ot\string\'{a}zky}
-\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
-
-\renewcommand\eqsqrtmsg{"Spravne !"}
-\renewcommand\eqsqwgmsg{"Spatne !"}
-
-\renewcommand\eq@bqlabel{Zacatek kvizu}
-\renewcommand\bqlabel{\eq@bqlabel}
-\renewcommand\eq@bqlabelISO{Zacatek kvizu}
-\renewcommand\bqlabelISO{Zacatek kvizu}
-
-\renewcommand\eq@eqlabel{Konec kvizu}
-\renewcommand\eqlabel{\eq@eqlabel}
-\renewcommand\eq@Score{}
-\renewcommand\eq@OutOf{z celkovych}
-\renewcommand\eqInitQuizMsg{%
- "Chcete-li pracovat s kvizem, musite jej nejprve spustit!
- Kliknete na "+msg+"."}
-\renewcommand\eqMadeChoice{%
- "Uz jste si jednou odpoved vybral(a). Vase odpoved byla (" +
- Responses[probno]+"). Chcete ji opravdu zmenit?"}
-\renewcommand\eq@local@CA{Opravit}
-\renewcommand\eq@local@RC{odpovedi!}
-\renewcommand\eq@local@AC{Prosim!}
-\renewcommand\eqerrABS{"Spatne uzavrena absolutni hodnota.
- Opravte prosim."}
-\renewcommand\eqerrBadMathFunc{"Vyraz `"+aF[i]+"' neni ani
- definovanou funkci ani " +", ani platnym matematickym vyrazem."}
-\renewcommand\eqParens{"Zavorky (kulate)"}
-\renewcommand\eqBrackets{"Hranate zavorky"}
-\renewcommand\eqBraces{"Slozene zavorky"}
-\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " nejsou parove.
- Opravte je prosim."}
-\renewcommand\eqerrBadExp{"Spatny matematicky vyraz - problem v nekterem
- exponentu. Opravte jej prosim."}
-\renewcommand\eqerrUnfinishQuiz{"Chyba: Nektery kviz mate nedokonceny.
- Musite jej dokoncit, nez budete pokracovat u dalsiho kvizu. Pokud si
- nepamatuje, ktery kviz jste nechali rozpracovany, zavrete cely
- soubor, znovu jej otevrete a k testu, ktery chcete vyplnovat,
- se vratte."}
-\renewcommand\noPeekMsg{"Prohlizeni reseni neni povoleno pred dokoncenim
- kvizu!"}
-\renewcommand\highThresholdMsg{"Musite odpovedet na vsechny otazky, nez
- ukoncite kviz."}
-\renewcommand\eqSyntaxErrorUndefVar{"Chyba: Pravdepodobne pouzivate
- nespravnou promennou nebo mate preklep ve jmenu nektere funkce."}
-\renewcommand{\promptButtonMsg}{%
- "Chcete ted videt spravnou odpoved? "\r\t\t
- + "Hodnocena bude Vase soucasna odpoved. "\r\t\t
- + "Kliknete-li na \\"Yes\\", uvidite spravnou odpoved, ale svou
- stavajici odpoved na tuto otazku uz nebudete moct zmenit."
-}
-\endinput
-%%
-%% End of file `eqcz.def'.
+%%
+%% This is file `eqcz.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqcz')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesFile{eqcz.def}
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+%%%%%%%%%%%%%%%%%%% eqcat.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Robert Marik %%
+%% e-mail address: marik@mendelu.cz %%
+%% Language: (czech) %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\SFW{1.75in}
+
+\renewcommand\exlabel{Cvi\v{c}en\'{\i}}
+\renewcommand\exlabelsol{Cvi\protect\v{c}en\protect\'{\protect\i}}
+
+\renewcommand\exsectitle{\texorpdfstring{\v{R}e\v{s}en\'{\i}
+ ke cvi\v{c}en\'{\i}m}
+ {Resen\355{} ke cvicen\355m}} %% change to @ form
+\renewcommand\exsecrunhead{%
+ \string\v{R}e\string\v{s}en\string\'{\string\i}
+ ke cvi\string\v{c}en\string\'{\string\i}m}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{\v{R}e\v{s}en\'\i}:}
+
+\renewcommand\eq@sqslsectitle{\texorpdfstring{\v{R}e\v{s}en\'{\i}
+ kv\'{\i}z\r{u}}{Resen\355{} kv\355zu}}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{\v{R}e\v{s}en\'{\i} kv\'{\i}z\r{u}}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{\string\textbf{%
+ \string\v{R}e\string\v{s}en\string\'{\string\i}
+ kv\string\'{\string\i}zu:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{\v{R}e\v{s}en\'{\i}}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Kv\'{\i}z.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Zp\string\v{e}t na ot\string\'{a}zky}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Spravne !"}
+\renewcommand\eqsqwgmsg{"Spatne !"}
+
+\renewcommand\eq@bqlabel{Zacatek kvizu}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{Zacatek kvizu}
+\renewcommand\bqlabelISO{Zacatek kvizu}
+
+\renewcommand\eq@eqlabel{Konec kvizu}
+\renewcommand\eqlabel{\eq@eqlabel}
+\renewcommand\eq@Score{}
+\renewcommand\eq@OutOf{z celkovych}
+\renewcommand\eqInitQuizMsg{%
+ "Chcete-li pracovat s kvizem, musite jej nejprve spustit!
+ Kliknete na "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "Uz jste si jednou odpoved vybral(a). Vase odpoved byla (" +
+ Responses[probno]+"). Chcete ji opravdu zmenit?"}
+\renewcommand\eq@local@CA{Opravit}
+\renewcommand\eq@local@RC{odpovedi!}
+\renewcommand\eq@local@AC{Prosim!}
+\renewcommand\eqerrABS{"Spatne uzavrena absolutni hodnota.
+ Opravte prosim."}
+\renewcommand\eqerrBadMathFunc{"Vyraz `"+aF[i]+"' neni ani
+ definovanou funkci ani " +", ani platnym matematickym vyrazem."}
+\renewcommand\eqParens{"Zavorky (kulate)"}
+\renewcommand\eqBrackets{"Hranate zavorky"}
+\renewcommand\eqBraces{"Slozene zavorky"}
+\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " nejsou parove.
+ Opravte je prosim."}
+\renewcommand\eqerrBadExp{"Spatny matematicky vyraz - problem v nekterem
+ exponentu. Opravte jej prosim."}
+\renewcommand\eqerrUnfinishQuiz{"Chyba: Nektery kviz mate nedokonceny.
+ Musite jej dokoncit, nez budete pokracovat u dalsiho kvizu. Pokud si
+ nepamatuje, ktery kviz jste nechali rozpracovany, zavrete cely
+ soubor, znovu jej otevrete a k testu, ktery chcete vyplnovat,
+ se vratte."}
+\renewcommand\noPeekMsg{"Prohlizeni reseni neni povoleno pred dokoncenim
+ kvizu!"}
+\renewcommand\highThresholdMsg{"Musite odpovedet na vsechny otazky, nez
+ ukoncite kviz."}
+\renewcommand\eqSyntaxErrorUndefVar{"Chyba: Pravdepodobne pouzivate
+ nespravnou promennou nebo mate preklep ve jmenu nektere funkce."}
+\renewcommand{\promptButtonMsg}{%
+ "Chcete ted videt spravnou odpoved? "\r\t\t
+ + "Hodnocena bude Vase soucasna odpoved. "\r\t\t
+ + "Kliknete-li na \\"Yes\\", uvidite spravnou odpoved, ale svou
+ stavajici odpoved na tuto otazku uz nebudete moct zmenit."
+}
+\endinput
+%%
+%% End of file `eqcz.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqda.def b/texmf-dist/tex/latex/acrotex/eqda.def
index 7bee63ed..95e4b95d 100644
--- a/texmf-dist/tex/latex/acrotex/eqda.def
+++ b/texmf-dist/tex/latex/acrotex/eqda.def
@@ -1,83 +1,83 @@
-%%
-%% This is file `eqda.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,eqda')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{eqda.def}
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-%%%%%%%%%%%%%%%%%%%% eqda.def %%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Foreign language support for the exerquiz package. %%
-%% Name of translator: Erik Leimand %%
-%% e-mail address: buhlleimand@worldonline.dk %%
-%% Language: Danish %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\renewcommand\exlabel{{\O}velse}
-\renewcommand\exlabelsol{{\protect\O}velse}
-
-\renewcommand\exsectitle{L{\o}sning p{\aa} {\o}velserne}
-\renewcommand\exsecrunhead{L{\protect\o}sning p{\protect\aa}
- {\protect\o}velserne}
-
-\renewcommand{\eq@exsolafterDefault}{\textit{L{\o}sning}:}
-
-\renewcommand\eq@sqslsectitle{L{\o}sning p{\aa} opgaverne}
-\renewcommand\sqslsectitle{\eq@sqslsectitle}
-
-\renewcommand\eq@sqslsecrunhead{L{\o}sning p{\aa} opgaverne}
-\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
-
-\renewcommand\eq@sqsllabel{%
- \string\textbf{L{\protect\o}sning p{\protect\aa} opgave:}}
-\renewcommand\sqsllabel{\eq@sqsllabel}
-
-\renewcommand\sqsolafter{\textit{L{\o}sning}:}
-
-\renewcommand\eq@sqlabel{\textcolor{red}{Opgave.}}
-\renewcommand\sqlabel{\eq@sqlabel}
-
-\renewcommand\eq@sqslrtnlabel{Slut}
-\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
-
-\renewcommand\eqsqrtmsg{"Rigtigt!"}
-\renewcommand\eqsqwgmsg{"Forkert!"}
-
-\renewcommand\eq@bqlabel{Start opgaver}
-\renewcommand\bqlabel{\eq@bqlabel}
-\renewcommand\eq@bqlabelISO{\eq@bqlabel}
-\renewcommand\bqlabelISO{\eq@bqlabel}
-
-\renewcommand\eq@eqlabel{Slut}
-\renewcommand\eqlabel{\eq@eqlabel}
-
-\renewcommand\eq@Score{Score:}\renewcommand\eq@OutOf{ud af}
-\renewcommand\eqQuizTotalMsg{"\eqScore\space"+Score+"
- \eqOutOf\space"+nQuestions}
-\renewcommand\eqInitQuizMsg{"Du skal starte testen! Klik
- p\string\\345 "+msg+"."}
-\renewcommand\eqMadeChoice{%
- "Du har allerede valgt.
- Du valgte ("+Responses[probno]+").
- Vil du \string\\346ndre det?"}
-\renewcommand\eq@local@CA{Ret}
-\renewcommand\eq@local@RC{Mine svar!}
-\renewcommand\eq@local@AC{%
- V\texorpdfstring{\ae}{\string\346}r
- s\texorpdfstring{\r}{\string\345}god!}
-\endinput
-%%
-%% End of file `eqda.def'.
+%%
+%% This is file `eqda.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqda')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesFile{eqda.def}
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+%%%%%%%%%%%%%%%%%%%% eqda.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Erik Leimand %%
+%% e-mail address: buhlleimand@worldonline.dk %%
+%% Language: Danish %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{{\O}velse}
+\renewcommand\exlabelsol{{\protect\O}velse}
+
+\renewcommand\exsectitle{L{\o}sning p{\aa} {\o}velserne}
+\renewcommand\exsecrunhead{L{\protect\o}sning p{\protect\aa}
+ {\protect\o}velserne}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{L{\o}sning}:}
+
+\renewcommand\eq@sqslsectitle{L{\o}sning p{\aa} opgaverne}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{L{\o}sning p{\aa} opgaverne}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{L{\protect\o}sning p{\protect\aa} opgave:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{L{\o}sning}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Opgave.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Slut}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Rigtigt!"}
+\renewcommand\eqsqwgmsg{"Forkert!"}
+
+\renewcommand\eq@bqlabel{Start opgaver}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{Slut}
+\renewcommand\eqlabel{\eq@eqlabel}
+
+\renewcommand\eq@Score{Score:}\renewcommand\eq@OutOf{ud af}
+\renewcommand\eqQuizTotalMsg{"\eqScore\space"+Score+"
+ \eqOutOf\space"+nQuestions}
+\renewcommand\eqInitQuizMsg{"Du skal starte testen! Klik
+ p\string\\345 "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "Du har allerede valgt.
+ Du valgte ("+Responses[probno]+").
+ Vil du \string\\346ndre det?"}
+\renewcommand\eq@local@CA{Ret}
+\renewcommand\eq@local@RC{Mine svar!}
+\renewcommand\eq@local@AC{%
+ V\texorpdfstring{\ae}{\string\346}r
+ s\texorpdfstring{\r}{\string\345}god!}
+\endinput
+%%
+%% End of file `eqda.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqde.def b/texmf-dist/tex/latex/acrotex/eqde.def
index 839eea11..94f21c6b 100644
--- a/texmf-dist/tex/latex/acrotex/eqde.def
+++ b/texmf-dist/tex/latex/acrotex/eqde.def
@@ -1,114 +1,114 @@
-%%
-%% This is file `eqde.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,eqde')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{eqde.def}
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-%%%%%%%%%%%%%%%%%%%% eqde.def %%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Foreign language support for the exerquiz package. %%
-%% Name of translator: Michael Wiedmann %%
-%% e-mail address: michael.wiedmann@detewe.de %%
-%% Language: German %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\renewcommand\exlabel{\"Ubung}
-\renewcommand\exlabelsol{\protect\"Ubung}
-
-\renewcommand\exsectitle{L\"osungen der \exlabel en}
-\renewcommand\exsecrunhead{L\protect\"osungen der \exlabelsol en}
-
-\renewcommand{\eq@exsolafterDefault}{\textit{L\"osung}:}
-
-\renewcommand\eq@sqslsectitle{L\"osungen der Aufgaben}
-\renewcommand\sqslsectitle{\eq@sqslsectitle}
-
-\renewcommand\eq@sqslsecrunhead{L\"osungen der Aufgaben}
-\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
-
-\renewcommand\eq@sqsllabel{%
- \protect\textbf{L\protect\"osung zu Aufgabe:}}
-\renewcommand\sqsllabel{\eq@sqsllabel}
-
-\renewcommand\sqsolafter{\textit{L\"osung}:}
-
-\renewcommand\eq@sqlabel{\textcolor{red}{Aufgabe}}
-\renewcommand\sqlabel{\eq@sqlabel}
-
-\renewcommand\eq@sqslrtnlabel{zur\"{u}ck zur Aufgabe}
-\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
-
-\renewcommand\eqsqrtmsg{"Richtig!"}
-\renewcommand\eqsqwgmsg{"Falsch!"}
-
-\renewcommand\eq@bqlabel{Test starten}
-\renewcommand\bqlabel{\eq@bqlabel}
-\renewcommand\eq@bqlabelISO{\eq@bqlabel}
-\renewcommand\bqlabelISO{\eq@bqlabelISO}
-
-\renewcommand\eq@eqlabel{Test beenden}
-\renewcommand\eqlabel{\eq@eqlabel}
-\renewcommand\eq@Score{Punkte:}\renewcommand\eq@OutOf{von}
-\renewcommand\eq@ptScore{Punkte:}
-\renewcommand\eqInitQuizMsg{%
- "Sie m\374ssen die Aufgaben zuerst initialisieren!"
- + " Bitte klicken Sie hierf\374r auf "+msg+" am Anfang des Tests."}
-\renewcommand\eqMadeChoice{%
- "Sie haben bereits geantwortet. Ihre Antwort war
- ("+Responses[probno]+")." + " Wollen Sie dies \string\344ndern?"}
-\renewcommand\eq@local@CA{Korrigiere}
-\renewcommand\eq@local@RC{Meine Antworten!}
-\renewcommand\eq@local@AC{Bitte!}
-\renewcommand{\AnsPromptBtnStr}{Antwort:\space}
-\renewcommand\eqerrABS{"Betr\string\344ge sind nicht ausgeglichen.
- Bitte korrigieren Sie das."}
-\renewcommand\eqerrBadMathFunc{"Der Ausdruck '"+aF[i]+"' ist weder
- eine definierte Funktion noch ein g\string\374ltiger mathematischer
- Ausdruck."}
-\renewcommand\eqParens{"runde Klammern"} % ( )
-\renewcommand\eqBrackets{"eckige Klammern"} % [ ]
-\renewcommand\eqBraces{"geschweifte Klammern"} % { }
-\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " sind nicht ausgeglichen.
- Bitte korrigieren Sie das."}
-\renewcommand\eqerrBadExp{"Ung\string\374ltiger mathematischer Ausdruck.
- Es gibt ein Problem mit einem der Exponenten.
- Bitte korrigieren Sie das!"}
-\renewcommand\eqerrUnfinishQuiz{"Sie haben einen Test nicht beendet.
- Bitte beenden Sie diesen, bevor Sie einen neuen Test beginnen."}
-\dlJSStr*[noquotes]{\noPeekMsg}{"Bevor Sie den Test nicht beendet
- haben, ist es nicht erlaubt, die L\"{o}sungen anzuschauen!"}
-\renewcommand\highThresholdMsg{"Sie m\string\374ssen alle Fragen
- beantworten, bevor der Test ausgewertet wird."}
-\dlJSStr*[noquotes]{\eqSyntaxErrorUndefVar}{"Syntax Error: Es existiert
- m\"{o}glicherweise eine undefinierte Variable oder ein Ausdruck
- ist nicht im erwarteten Format geschrieben."}
-\dlJSStr[noquotes]{\eqSyntaxErrorComma}{"Syntax Error: Ein Komma wurde"
- + " in Ihrer Antwort \""
- + UserAns + "\" gefunden. Bitte entfernen Sie das Komma,"
- + " sonst wird diese Antwort als falsch gewertet."}
-\dlJSStr*[noquotes]{\limSelWarningMsg}{"F\"{u}r diese Aufgabe k\"{o}nnen
- sie h\"{o}chstens " + n + " ausw\string\344hlen."}
-\fieldJSStr*[noquotes]{\promptButtonMsg}{%
- "M\"{o}chten Sie die richtige Antwort jetzt sehen?"
- + " Ihre derzeitige Antwort ist diejenige, die gewertet wird."
- + " Wenn Sie auf \\"Yes\\" klicken, k\"{o}nnen Sie ihre Antwort
- nicht mehr \string\344ndern."
-}
-\renewcommand{\defaultReqFormMsg}{%
- "Der Ausdruck ist nicht in der erwarteten Form."}
-\endinput
-%%
-%% End of file `eqde.def'.
+%%
+%% This is file `eqde.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqde')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesFile{eqde.def}
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+%%%%%%%%%%%%%%%%%%%% eqde.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Michael Wiedmann %%
+%% e-mail address: michael.wiedmann@detewe.de %%
+%% Language: German %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{\"Ubung}
+\renewcommand\exlabelsol{\protect\"Ubung}
+
+\renewcommand\exsectitle{L\"osungen der \exlabel en}
+\renewcommand\exsecrunhead{L\protect\"osungen der \exlabelsol en}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{L\"osung}:}
+
+\renewcommand\eq@sqslsectitle{L\"osungen der Aufgaben}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{L\"osungen der Aufgaben}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \protect\textbf{L\protect\"osung zu Aufgabe:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{L\"osung}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Aufgabe}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{zur\"{u}ck zur Aufgabe}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Richtig!"}
+\renewcommand\eqsqwgmsg{"Falsch!"}
+
+\renewcommand\eq@bqlabel{Test starten}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabelISO}
+
+\renewcommand\eq@eqlabel{Test beenden}
+\renewcommand\eqlabel{\eq@eqlabel}
+\renewcommand\eq@Score{Punkte:}\renewcommand\eq@OutOf{von}
+\renewcommand\eq@ptScore{Punkte:}
+\renewcommand\eqInitQuizMsg{%
+ "Sie m\374ssen die Aufgaben zuerst initialisieren!"
+ + " Bitte klicken Sie hierf\374r auf "+msg+" am Anfang des Tests."}
+\renewcommand\eqMadeChoice{%
+ "Sie haben bereits geantwortet. Ihre Antwort war
+ ("+Responses[probno]+")." + " Wollen Sie dies \string\344ndern?"}
+\renewcommand\eq@local@CA{Korrigiere}
+\renewcommand\eq@local@RC{Meine Antworten!}
+\renewcommand\eq@local@AC{Bitte!}
+\renewcommand{\AnsPromptBtnStr}{Antwort:\space}
+\renewcommand\eqerrABS{"Betr\string\344ge sind nicht ausgeglichen.
+ Bitte korrigieren Sie das."}
+\renewcommand\eqerrBadMathFunc{"Der Ausdruck '"+aF[i]+"' ist weder
+ eine definierte Funktion noch ein g\string\374ltiger mathematischer
+ Ausdruck."}
+\renewcommand\eqParens{"runde Klammern"} % ( )
+\renewcommand\eqBrackets{"eckige Klammern"} % [ ]
+\renewcommand\eqBraces{"geschweifte Klammern"} % { }
+\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " sind nicht ausgeglichen.
+ Bitte korrigieren Sie das."}
+\renewcommand\eqerrBadExp{"Ung\string\374ltiger mathematischer Ausdruck.
+ Es gibt ein Problem mit einem der Exponenten.
+ Bitte korrigieren Sie das!"}
+\renewcommand\eqerrUnfinishQuiz{"Sie haben einen Test nicht beendet.
+ Bitte beenden Sie diesen, bevor Sie einen neuen Test beginnen."}
+\dlJSStr*[noquotes]{\noPeekMsg}{"Bevor Sie den Test nicht beendet
+ haben, ist es nicht erlaubt, die L\"{o}sungen anzuschauen!"}
+\renewcommand\highThresholdMsg{"Sie m\string\374ssen alle Fragen
+ beantworten, bevor der Test ausgewertet wird."}
+\dlJSStr*[noquotes]{\eqSyntaxErrorUndefVar}{"Syntax Error: Es existiert
+ m\"{o}glicherweise eine undefinierte Variable oder ein Ausdruck
+ ist nicht im erwarteten Format geschrieben."}
+\dlJSStr[noquotes]{\eqSyntaxErrorComma}{"Syntax Error: Ein Komma wurde"
+ + " in Ihrer Antwort \""
+ + UserAns + "\" gefunden. Bitte entfernen Sie das Komma,"
+ + " sonst wird diese Antwort als falsch gewertet."}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"F\"{u}r diese Aufgabe k\"{o}nnen
+ sie h\"{o}chstens " + n + " ausw\string\344hlen."}
+\fieldJSStr*[noquotes]{\promptButtonMsg}{%
+ "M\"{o}chten Sie die richtige Antwort jetzt sehen?"
+ + " Ihre derzeitige Antwort ist diejenige, die gewertet wird."
+ + " Wenn Sie auf \\"Yes\\" klicken, k\"{o}nnen Sie ihre Antwort
+ nicht mehr \string\344ndern."
+}
+\renewcommand{\defaultReqFormMsg}{%
+ "Der Ausdruck ist nicht in der erwarteten Form."}
+\endinput
+%%
+%% End of file `eqde.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqes.def b/texmf-dist/tex/latex/acrotex/eqes.def
index 195b6265..680738d0 100644
--- a/texmf-dist/tex/latex/acrotex/eqes.def
+++ b/texmf-dist/tex/latex/acrotex/eqes.def
@@ -1,78 +1,78 @@
-%%
-%% This is file `eqes.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `copyright,eqes')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Exerquiz.sty package, %%
-%% Copyright (C) 1999-2018 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. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{eqes.def}
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-%%%%%%%%%%%%%%%%%%% eqes.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Foreign language support for the exerquiz package. %%
-%% Name of translator: Pedro Luis Luque %%
-%% e-mail address: calvo@cica.es %%
-%% Language: (spanish) %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\renewcommand\exlabel{Ejercicio}
-\renewcommand\exlabelsol{\exlabel}
-
-\renewcommand\exsectitle{Soluciones a los \exlabel s}
-\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
-
-\renewcommand{\eq@exsolafterDefault}{\textit{Soluci\'{o}n}:}
-
-\renewcommand\eq@sqslsectitle{Soluciones a los Tests}
-\renewcommand\sqslsectitle{\eq@sqslsectitle}
-
-\renewcommand\eq@sqslsecrunhead{Soluciones a los Tests}
-\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
-
-\renewcommand\eq@sqsllabel{%
- \string\textbf{Soluci\protect\'{o}n al Test:}}
-\renewcommand\sqsllabel{\eq@sqsllabel}
-
-\renewcommand\sqsolafter{\textit{Soluci\'{o}n}:}
-
-\renewcommand\eq@sqlabel{\textcolor{red}{Test.}}
-\renewcommand\sqlabel{\eq@sqlabel}
-
-\renewcommand\eq@sqslrtnlabel{Final del Test}
-\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
-
-\renewcommand\eqsqrtmsg{"Correcto!"}
-\renewcommand\eqsqwgmsg{"Incorrecto!"}
-
-\renewcommand\eq@bqlabel{Inicio del Test}
-\renewcommand\bqlabel{\eq@bqlabel}
-\renewcommand\eq@bqlabelISO{\eq@bqlabel}
-\renewcommand\bqlabelISO{\eq@bqlabel}
-
-\renewcommand\eq@eqlabel{Final del Test}
-\renewcommand\eqlabel{\eq@eqlabel}
-\renewcommand\eq@Score{Puntos:}\renewcommand\eq@OutOf{de}
-\renewcommand\eqInitQuizMsg{"Debes inicializar el Test!
- Click sobre "+msg+"."}
-\renewcommand\eqMadeChoice{%
- "Ya has elegido una respuesta.
- Tu respuesta fue ("+Responses[probno]+").
- Quieres cambiarla?"}
-\renewcommand\eq@local@CA{Correctas}
-\renewcommand\eq@local@RC{Mis Respuestas!}
-\renewcommand\eq@local@AC{Por Favor!}
-\endinput
-%%
-%% End of file `eqes.def'.
+%%
+%% This is file `eqes.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqes')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2018 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesFile{eqes.def}
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+%%%%%%%%%%%%%%%%%%% eqes.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Pedro Luis Luque %%
+%% e-mail address: calvo@cica.es %%
+%% Language: (spanish) %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\renewcommand\exlabel{Ejercicio}
+\renewcommand\exlabelsol{\exlabel}
+
+\renewcommand\exsectitle{Soluciones a los \exlabel s}
+\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Soluci\'{o}n}:}
+
+\renewcommand\eq@sqslsectitle{Soluciones a los Tests}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{Soluciones a los Tests}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Soluci\protect\'{o}n al Test:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{Soluci\'{o}n}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Test.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Final del Test}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Correcto!"}
+\renewcommand\eqsqwgmsg{"Incorrecto!"}
+
+\renewcommand\eq@bqlabel{Inicio del Test}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{Final del Test}
+\renewcommand\eqlabel{\eq@eqlabel}
+\renewcommand\eq@Score{Puntos:}\renewcommand\eq@OutOf{de}
+\renewcommand\eqInitQuizMsg{"Debes inicializar el Test!
+ Click sobre "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "Ya has elegido una respuesta.
+ Tu respuesta fue ("+Responses[probno]+").
+ Quieres cambiarla?"}
+\renewcommand\eq@local@CA{Correctas}
+\renewcommand\eq@local@RC{Mis Respuestas!}
+\renewcommand\eq@local@AC{Por Favor!}
+\endinput
+%%
+%% End of file `eqes.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqexam.def b/texmf-dist/tex/latex/acrotex/eqexam.def
index 54fe6082..0d2665cd 100644
--- a/texmf-dist/tex/latex/acrotex/eqexam.def
+++ b/texmf-dist/tex/latex/acrotex/eqexam.def
@@ -1,1715 +1,1715 @@
-%%
-%% This is file `eqexam.def',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% exerquiz.dtx (with options: `eqexam')
-%%
-\ProvidesFile{eqexam.def}
- [2018/03/21 v8.2.2 %
- Exerquiz support file for eqexam (dps)]
-\let\eq@YES=y \let\eq@NO=n
-\let\eq@One=1 \let\eq@Zero=0
-\def\eq@r{r}\let\eq@f=f \let\eq@l=l
-\newif\ifeq@noforms \eq@noformsfalse
-\newif\ifeq@noquizsolutions \eq@noquizsolutionsfalse
-\newif\ifnocorrections \nocorrectionsfalse
-\@ifundefined{ifeqe@flextended}{\newif\ifeqe@flextended
- \eqe@flextendedfalse}{}
-\@ifundefined{ifcont@nnot}{\newif\ifcont@nnot \cont@nnotfalse}{}
-\@ifundefined{if@eqalignfilllinestoleft}{\newif\if@eqalignfilllinestoleft
- \@eqalignfilllinestoleftfalse}{}
-\newif\ifkeepdeclaredvspacing \keepdeclaredvspacingfalse
-\newif\ifeq@nolink \eq@nolinkfalse
-\def\eq@ckglobalhide{\ifeq@globalshowsolutions\eq@hidesolutionfalse\fi}
-\def\hidesymbol{h}\def\Hidesymbol{H}
-\newif\iftherearesolutions \therearesolutionsfalse
-\newif\ifIsRespBox \global\IsRespBoxfalse
-\def\SolutionsAfter{\eq@solutionsaftertrue\eq@nolinktrue}
-\newif\ifcqSA\cqSAfalse
-\def\SolutionsAtEnd{\eq@solutionsafterfalse\eq@nolinkfalse
- \displayworkareatrue\ifvspacewithsolns\eq@nosolutionsfalse\else
- \eq@nosolutionstrue\fi\eq@proofingfalse\answerkeyfalse}
-\def\NoSpaceToWork{\let\eq@insertverticalspace\eq@NO}
-\def\SpaceToWork{\let\eq@insertverticalspace\eq@YES}
-\SpaceToWork
-\long\def\ifNoSolutions#1#2{%
- \ifeq@nosolutions\expandafter#1\else
- \expandafter#2\fi
-}
-\newif\ifeq@randomizeChoices \eq@randomizeChoicesfalse
-\newif\ifeq@randomizeallChoices \eq@randomizeallChoicesfalse
-\def\turnOnRandomize{\eq@randomizeallChoicestrue}
-\def\obeyLocalRandomize{\eq@randomizeallChoicesfalse}
-\let\saveRandomSeed\relax
-\let\inputRandomSeed\relax
-\newcommand{\exsolafter}{\eq@exsolafterDefault}
-\newcommand{\resetSolnAfterToDefault}{%
- \def\exsolafter{\eq@exsolafterDefault}}
-\newcommand{\exsolafterDefault}[1]{\def\eq@exsolafterDefault{#1}%
- \def\exSolafterDefault{#1}\resetSolnAfterToDefault}
-\exsolafterDefault{\textit{Solution}:}
-\newcommand{\renameSolnAfterTo}[1]{\def\exsolafter{#1}}
-\newcommand{\adjDisplayBelow}{\vskip-\lastskip\vskip-\baselineskip}
-\newcommand{\adjDisplayBelowPlus}{\adjDisplayBelow\recoverDisplayBelow}
-\def\recoverDisplayBelow{\vskip\belowdisplayskip}
-\newcommand\setDefShortQuizLabelName[1]%
- {\def\eq@defaultShortQuizLabelName{#1}}
-\setDefShortQuizLabelName{Quiz}
-\ifsolutionsonly
-\InputIfFileExists{\jobname_xdefs.cut}{%
- \typeout{^^JExerquiz|Eqexam: Reading \jobname_xdefs.cut^^J}}
- {\PackageWarningNoLine{exerquiz|eqexam}{%
- \jobname_xdefs.cut not found.\MessageBreak
- Recompile file under the vspacewithsolns\MessageBreak
- option, then compile with the solutionsonly\MessageBreak
- option}}
-\else
-\newwrite\ex@solns \immediate\openout \ex@solns \jobname.sol
-\newcommand{\writeToExSolns}[1]{%
- \set@display@protect
- \immediate\write\ex@solns{#1}%
- \set@typeset@protect
-}
-\newwrite\eq@xrefdefns \immediate\openout\eq@xrefdefns\jobname_xdefs.cut
-\fi
-\newwrite\quiz@solns \immediate\openout \quiz@solns \jobname.qsl
-\newcommand{\writeToQzSolns}[1]{%
- \set@display@protect
- \immediate\write\quiz@solns{#1}%
- \set@typeset@protect
-}
-\def\eq@IWAuxOut#1{\immediate\write\@auxout{#1}}
-\def\eq@IWDefs#1{\immediate\write\eq@xrefdefns{#1}}
-\newcounter{eqexno} \setcounter{eqexno}{0}
-\newcounter{@exno} \setcounter{@exno}{0} % running exno
-\newcounter{quizno} \setcounter{quizno}{0}
-\renewcommand\thequizno{\alph{quizno}}
-\newcounter{eqpointvalue} \setcounter{eqpointvalue}{0}
-\newlength\eq@tmplength
-\newlength\eqtmplength
-\newcounter{questionno}
-\newcounter{eqquestionnoi}
-\newcounter{eqquestionnoii}
-\newcounter{eqquestionnoiii}
-\newcount\@eqquestiondepth \@eqquestiondepth=0
-\newcounter{partno}
-\newif\ifuseNumForParts\useNumForPartsfalse
-\def\alphaParts{\def\partnoFmt{\alph}\useNumForPartsfalse}\alphaParts
-\def\numberParts{\def\partnoFmt{\arabic}\useNumForPartstrue}
-\renewcommand\thepartno{\partnoFmt{partno}}
-\newtoks\eq@scratchtoks
-\def\verbatimwrite{\@bsphack
- \let\do\@makeother\dospecials
- \catcode`\^^M\active \catcode`\^^I=12
- \def\verbatim@processline{%
- \immediate\write\verbatim@out
- {\the\verbatim@line}}%
- \verbatim@start}
-\def\endverbatimwrite{\@esphack}
-\providecommand\PBS[1]{\let\temp=\\#1\let\\=\temp}
-\newcommand{\belowexskip}[1]{\setlength{\eq@tmplength}{#1}%
- \edef\eq@exerskip{\noexpand\removelastparskip
- \noexpand\vskip\the\eq@tmplength\relax\kern0pt}}
-\let\eqexerskip\belowexskip
-\belowexskip{\medskipamount}
-\newcommand{\aboveexskip}[1]{\setlength{\eq@tmplength}{#1}%
- \edef\eq@priorexskip{\noexpand\vskip\the\eq@tmplength\relax
- \kern0pt}}
-\let\priorexskip\aboveexskip
-\aboveexskip{\medskipamount}
-\let\eq@postexerciseHook\relax
-\newcommand\belowexsolnskip{\protect\medskip}
-\def\removelastparskip{\ifdim\parskip>0pt\vskip-\parskip\fi}
-\let\marginparpriorhook\@empty % used to material before the exercise
-\let\marginparafterhook\@empty % used to material after the exercise
-\let\afterlabelhskip\space
-\let\exersolnheadhook\@empty
-\let\exer@solnheadhook\@empty
-\newcommand{\eqexheader}
-{%
- \mbox{\color{\@nolinkcolor}\if\exerstar*\exlabelformatwp\else
- \exlabelformat\fi}%
-}
-\def\eqexheader@wrapper{\hypertarget{qex.\the@exno}{\eqexheader}}
-\newcommand{\partsformat}[1]{\def\eq@partsformat{#1}}
-\partsformat{(\hfil\thepartno\hfil)}
-\newcommand{\defaultpartsformat}{%
- \partsformat{(\hfil\thepartno\hfil)}}
-\let\exlisttabheaderpriorhook\@empty
-\let\exlisttabheaderafterhook\@empty
-\newcommand{\eqexlisttabheader}
-{%
- \exlisttabheaderpriorhook
- \color{\@nolinkcolor}\eq@partsformat
-}
-\newcount\cq@Cnt
-\def\cq@CutName{cq-\the\cq@Cnt.cut}
-\let\cq@star\eq@NO
-\newif\ifcqqs \cqqstrue
-\newif\ifcqIsActive \cqIsActivefalse
-\def\cqQS{\@ifstar{\cqQSV}{\cqQSA}}
-\def\cqQSA#1#2{\ifcqqs#1\else#2\fi}
-\@ifpackageloaded{web}{\@ifundefined{IF@AorBswitch}{%
- \PackageWarningNoLine{A version of the web package
- dated\MessageBreak 2016/11/03 or later is required
- for \string\cqQS}}}{}%
-\@ifundefined{webtempboxi}{\newbox\webtempboxi
- \newbox\webtempboxii}{}
-\providecommand\SHOWTEMPBOXi{\unhbox\webtempboxi}
-\providecommand\TRUEACTIONi{\aftergroup\SETTEMPBOXii}
-\providecommand\TRUEACTIONia{\aftergroup\SHOWTEMPBOXi}
-\providecommand\FALSEACTIONii{\aftergroup\SETTEMPBOXi}
-\providecommand\FALSEACTIONiia{\aftergroup\SHOWTEMPBOXi}
-\providecommand\SETTEMPBOXi{\IF@AorBswitch\else
- \afterassignment\TRUEACTIONia\fi
- \setbox\webtempboxi=\hbox}
-\providecommand\SETTEMPBOXii{\IF@AorBswitch
- \afterassignment\FALSEACTIONiia\fi
- \setbox\webtempboxii=\hbox}
-\def\cqQSV{\let\IF@AorBswitch\ifcqqs
- \IF@AorBswitch
- \def\eq@next{\afterassignment\TRUEACTIONi\SETTEMPBOXi}\else
- \def\eq@next{\afterassignment\FALSEACTIONii\SETTEMPBOXii}\fi
- \eq@next}
-\def\eq@turnMessageOff{\let\save@message\message
- \let\message\@gobble}
-\def\eq@turnMessageOn{\let\message\save@message}
-\def\eqCQDeclarations{\cqqsfalse\eq@turnMessageOff
- \includecomment{sPage}\excludecomment{qPage}%
- \eq@turnMessageOn}
-\def\eqTopOfSolnPage{\cqSAfalse
- \eqCQDeclarations}
-\eq@turnMessageOff
-\includecomment{qPage}\excludecomment{sPage}
-\eq@turnMessageOn
-\newenvironment{cq@CQ}
-{%
- \global\cqIsActivetrue
- \global\advance\cq@Cnt1\relax
- \immediate\openout\CommentStream=\cq@CutName
- \let\verbatim@out\CommentStream
- \verbatimwrite
-}{%
- \endverbatimwrite
- \immediate\closeout\CommentStream
- \ifx\cq@star\eq@YES
- \xdef\cq@INPUTCUT{\noexpand\cqqstrue
- \noexpand\input{\cq@CutName}\noexpand
- \def@QuesToSoln}\else
- \xdef\cq@INPUTCUT{\noexpand\cqqstrue
- \noexpand\input{\cq@CutName}\noexpand
- \p@ssQuesToSoln}\fi
- \aftergroup\cq@INPUTCUT
-}
-\newenvironment{cqs@CQ}{\let\cq@star\eq@YES\cq@CQ}{\endcq@CQ}
-\def\declCQQuesStr#1{\def\cqQStr{#1}}
-\declCQQuesStr{Question}
-\def\declCQSolStr#1{\def\cqSStr{#1}}
-\declCQSolStr{Solution}
-\newcommand\declCQPre[1]{\def\cq@Pre{#1}}
-\declCQPre{\emph{\cqQStr}:\space}
-\newcommand\declCQPost[1]{\def\cq@Post{#1}}
-\declCQPost{\par\medskip\noindent\emph{\cqSStr}:\space\ignorespaces}
-\def\cqFmtPasteQues#1{\cq@Pre\input{#1}\cq@Post}
-\def\p@ssQuesToSoln{\ifeq@hidesolution\else
- \global\terminexchangedtrue % dps cq
- \writeToExSolns{\protect
- \decleqterminex{\protect\cqFmtPasteQues{\cq@CutName}}}\fi}
-\def\declCopyQues#1{\def\cqCopiedQues{#1}}
-\def\def@QuesToSoln{\restoreNormalSolns
- \global\terminexchangedfalse % dps cq
- \ifeq@hidesolution\else\writeToExSolns{\protect
- \declCopyQues{\protect\input{\cq@CutName}}}\fi}
-\newcommand\restoreNormalSolns{%
- \writeToExSolns{\protect\decleqterminex{\protect\eqterminexDEF}}}
-\newcommand{\eq@CommonCmd}[1]{\def\eq@@CommonCmd{#1}#1}
-\let\eq@@CommonCmd\@empty
-\newcommand\gExCommonCmd[1]{\gdef\gEx@CommonCmd{\eq@CommonCmd{#1}}}
-\let\gEx@CommonCmd\@empty
-\let\endexerhook\@empty
-\newenvironment{exercise}
-{%
- \let\cq\cq@CQ\let\endcq\endcq@CQ
- \csarg\let{cq*}\cqs@CQ
- \csarg\let{endcq*}\endcqs@CQ
- \par\removelastskip\eq@priorexskip\noindent
- \let\eqCommonCmd\eq@CommonCmd
- \def\eq@argi{eqexno}%% use eqexno counter
- \if\eq@exerstarEnv*\def\exerstar{*}\else\def\exerstar{x}\fi
- \def\currhideopt{x}%
- \@ifnextchar[{\exercise@}%
- {\if\exerstar*\def\eq@next{\@exercise}\else
- \def\eq@next{\exercise@@}\fi\eq@next}%
-}{\eq@postexerciseHook\endexerhook\par
- \global\eq@exerciseheadingtrue\removelastskip\eq@exerskip}
-\def\exercise@[#1]{\edef\eq@arg{#1}%
- \if\eq@arg h\def\currhideopt{h}%
- \eq@hidesolutiontrue\eq@nolinktrue%
- \ifeq@globalshowsolutions
- \eq@hidesolutionfalse\eq@nolinkfalse\fi
- \def\eq@next{\@exercise}% h, no *, no counter
- \else
- \if\eq@arg H%
- \edef\currhideopt{\Hidesymbol}%
- \eq@hidesolutiontrue\eq@nolinktrue%
- \ifeq@globalshowsolutions
- \eq@hidesolutionfalse\eq@nolinkfalse
- \fi
- \def\eq@next{\@exercise}% H, no *, no counter
- \else
- \def\currhideopt{x}%
- \ifx\eq@arg\@empty\else\def\eq@argi{#1}\fi
- \if\exerstar*\def\eq@next{\@exercise}\else
- \def\eq@next{\exercise@@}\fi
- \fi
- \fi
-\eq@next}
-\def\exercise@@{\@ifstar{\def\exerstar{*}\@exercise}{\exercise@@@}}
-\def\exercise@@@{\@ifnextchar[{\exercise@@@@}{\@exercise}}
-\def\exercise@@@@[#1]{\edef\eq@arg{#1}%
- \if\eq@arg h\def\currhideopt{h}%
- \eq@hidesolutiontrue\eq@nolinktrue
- \ifeq@globalshowsolutions
- \eq@hidesolutionfalse\eq@nolinkfalse\fi
- \def\eq@next{\@exercise}% h, no *, no counter
- \else
- \if\eq@arg H\edef\currhideopt{\Hidesymbol}%
- \eq@hidesolutiontrue\eq@nolinktrue%
- \def\eq@next{\@exercise}% h, no *, no counter
- \else
- \def\currhideopt{x}%
- \PackageWarning{exerquiz}{The option #1 is not recognized}
- \let\eq@next\relax
- \fi
- \fi
-\eq@next}
-\newif\ifeq@exerciseheading \eq@exerciseheadingtrue
-\let\prior@exerSolnHeaderHook\@empty
-\newcommand\exerSolnHeader[3]{%
- \prior@exerSolnHeaderHook
- \ifeqforpaper\else\webnewpage\fi\markright{#1}%\par\noindent%
- #3%
- \solnhspace
-}
-\let\solnItemMngt\relax
-\let\eqEXt\@gobbletwo
-\let\endeqEXt\relax
-\let\eqExtArg\@empty
-\let\eqFilterArg\@empty
-\let\eqExerSolnHeader\@empty
-\let\solutionparshape\@empty
-\def\eq@pslnaindnt{0pt}
-\let\eq@setPrbSolnAftrIndnt\relax
-\newcommand{\setPrbSolnAftrIndent}[1]{\ifdim#1=0pt
- \def\eq@pslnaindnt{0pt}\let\eq@setPrbSolnAftrIndnt\relax\else
- \edef\eq@pslnaindnt{#1}\edef\eq@setPrbSolnAftrIndnt{%
- \expandafter\noexpand\expandafter\parindent#1\noexpand\relax}\fi
-}
-\newif\if@restorejustify \@restorejustifyfalse
-\newcommand\restoreJustifyOn{\@restorejustifytrue}
-\newcommand\restoreJustifyOff{\@restorejustifyfalse}
-\def\restorejustify{\if@restorejustify
- \@rightskip\z@skip \rightskip\@rightskip
- \leftskip\z@skip \let\\\@normalcr\fi}
-\def\@exercise{%
- \global\let\solutionparshape\@empty
- \let\verbatim@out=\ex@solns
- \if\eq@argi0\else\refstepcounter{\eq@argi}\fi\stepcounter{@exno}%
- \if\exerstar*% if exercise with parts
- \eq@nolinktrue
- \else
- \if\currhideopt H%
- \else
- \ifeq@solutionsafter
- \eq@nolinktrue % no link to solution
- \else
- \eq@ckglobalhide %
- \ifeq@hidesolution\else
- \global\let\eqExerSolnHeader\eq@@writeexheader
- \fi
- \fi
- \fi
- \fi
- \ifvmode\ifdim\lastskip>\z@
- \vskip-\lastskip
- \fi\fi
- \if\exerstar*%
- \let\solution\solnexer@woparts
- \let\endsolution\endsolnexer@woparts
- \let\parts\exercise@parts
- \let\endparts\endexercise@parts
- \else
- \let\solution\solnexer@woparts
- \let\endsolution\endsolnexer@woparts
- \let\parts\relax
- \let\endparts\relax
- \if\Hidesymbol h\eq@nolinkfalse\ifeq@solutionsafter
- \eq@nolinktrue\fi\fi
- \fi
- \eq@initializeContAnnot
- \ifeq@exerciseheading
- \prior@questionsHook\marginparpriorhook\noindent\eqexheader@wrapper
- \afterlabelhskip\marginparafterhook\gEx@CommonCmd
- \eq@setPrbSolnAftrIndnt\ignorespaces\fi
-}
-\newif\ifterminexchanged \terminexchangedfalse % dps cq
-\newcommand\decleqterminex[1]{\def\eqterminex{#1}}
-\def\eqterminexDEF{\relax\ignorespaces}
-\decleqterminex{\eqterminexDEF}
-\newif\ifmakeExSlLocal \makeExSlLocalfalse
-\def\makeExSolnsLocalOn{\makeExSlLocaltrue}
-\def\makeExSolnsLocalOff{\makeExSlLocalfalse}
-\def\eqExerSolnHeaderSngl{%
- \ifmakeExSlLocal\protect\begingroup^^J\fi
- \protect\eqEXt{\eqExtArg}{\eqFilterArg}\protect
- \solnItemMngt\protect\exerSolnHeader{\exsecrunhead}{ex.\the@exno}%
- {\exsllabelformat}\exer@solnheadhook
- \exersolnheadhook\protect\eqterminex
-}
-\def\eq@@writeexheader{\set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnHeaderSngl}%
- \set@typeset@protect
-}
-\def\eqExerSolnHeaderList{%
- \ifmakeExSlLocal\protect\begingroup^^J\fi
- \protect\eqEXt{\eqExtArg}{\eqFilterArg}\protect
- \solnItemMngt\protect\exerSolnHeader{\exsecrunhead}%
- {ex.\the@exno\thepartno}{\exsllabelformatwp}%
- \exer@solnheadhook\exersolnheadhook\protect\eqterminex
-}
-\def\eq@@writeexheaderlist{\set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnHeaderList}%
- \set@typeset@protect
-}
-\long\def\setsolnspace#1{\def\newsolnspace{#1}%
- \let\solnspace\newsolnspace}
-\newif\ifeq@ckSolnVspace \eq@ckSolnVspacetrue
-\def\ckSolnOpt{\global\eq@ckSolnVspacetrue}
-\def\noSolnOpt{\global\eq@ckSolnVspacefalse}
-\let\solnhspace\space
-\let\solnspace\space
-\let\exsolnonceonlytophook\relax
-\def\solnexer@woparts{%
- \ifanswerkey\ifeqe@flextended\ifcont@nnot
- \ifx\solutionparshape\@empty\else % dpsj8
- \pushEnvir
- \everypar{}\if@eqalignfilllinestoleft\else
- \parshape=1 \leadinIndent \linewidth\fi
- \popEnvir
- \fi\fi\fi\fi\def\bLeaveVspace{x}% = no vertical space added
- \exsolnonceonlytophook % dps27
- \global\let\exsolnonceonlytophook\relax
- \@ifundefined{KV@eqefillLines@bgonly}{}
- {\ifKV@eqefillLines@bgonly\ifvmode\else
- \par\leavevmode\strut\fi\fi
- \ifKV@eqefillLines@outlineonly\leavevmode\strut\fi}%
- \ifeq@ckSolnVspace
- \def\eq@next{\@ifnextchar[{\solnexer@@woparts}%]
- {\solnexer@@woparts[\null]}}\else
- \def\eq@next{\solnexer@@woparts[\null]}\fi
- \eq@next
-}
-\let\eqPriorVspace\@gobble
-\newif\if@eqlinedfiller \@eqlinedfillerfalse
-\newcommand{\vspaceFiller}[1]{\vfill}
-\newcommand{\vspaceFillerDefault}[1]{\vfill}
-\def\eqWriteLine{\hfill}
-\def\eq@linesXPgs{%
- \begingroup\offinterlineskip\parskip0pt
- \@tempcnta=0
- \@whilenum\@tempcnta<\soln@keys@nLines\relax\do
- {\vskip0pt\penalty-50\vglue\wlVspace\eqWriteLine
- \advance\@tempcnta1\relax}\par\endgroup
-}
-\let\leavevspace\relax % dpsj5
-\newcommand{\vspaceFmt}[1]{%
- \ifx\solutionparshape\@empty\else
- \advance\linewidth-\leadinIndentPrtSep\fi
- \ifdim\sameVspace>0pt
- \let\bLeaveVspace\@empty
- \def\leavevspace{%
- \ifx\eq@insertverticalspace\eq@YES\par\eq@quessolskip
- \eqPriorVspace{#1}{\nobreak\noindent
- \if@eqlinedfiller
- \ifx\soln@keys@nLines\@empty
- \def\eq@lines@next{\vspaceFiller{#1}}\else
- \def\eq@lines@next{\eq@linesXPgs}\fi
- \else
- \def\eq@lines@next{\parbox[b][#1][t]{\linewidth}
- {\vspaceFiller{#1}}}%
- \fi\eq@lines@next}%
- \fi
- }\expandafter\leavevspace % dpsj6
- \fi
-}
-\define@key{soln@keys}{nLines}[]{\def\soln@keys@nLines{#1}}
-\let\soln@keys@nLines\@empty
-\def\eqKV@errx#1{\xdef\XKV@rm{\@tempa}}
-\def\eqSolnForEqexam#1{%
- \let\soln@keys@nLines\@empty
- \setkeys*{soln@keys}{#1}%
- \ifx\soln@keys@nLines\@empty
- \ifx\minVspacet@bs\@empty\xdef\sameVspace{\XKV@rm}\else
- \xdef\sameVspace{\minVspacet@bs}\fi
- \else
- \@tempdima\wlVspace
- \@tempdima=\soln@keys@nLines\@tempdima
- \xdef\sameVspace{\the\@tempdima}%
- \ifx\XKV@rm\@empty\else
- \if@equsedim\let\soln@keys@nLines\@empty
- \xdef\sameVspace{\XKV@rm}\fi
- \fi
- \fi
- \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi
-}
-\def\solnexer@@woparts[#1]{%
- \ifcqIsActive\else\ifterminexchanged
- \restoreNormalSolns\fi\fi % dps cq
- \global\cqIsActivefalse
- \def\eq@argi{#1}\def\eq@null{\null}%
- \ifx\eq@argi\@empty\gdef\sameVspace{0pt}\else
- \ifx\eq@argi\eq@null\gdef\sameVspace{0pt}\else
- \@ifundefined{PointsOnLeft}{%
- \let\eqKV@errx@SAVE\KV@errx
- \let\KV@errx\eqKV@errx\let\XKV@rm\@empty
- \edef\temp@exp{\noexpand\setkeys*{soln@keys}{#1}}\temp@exp
- \let\KV@errx\eqKV@errx@SAVE
- \ifx\soln@keys@nLines\@empty\else
- \PackageInfo{exerquiz}{%
- nLines key detected in solution environment,\MessageBreak
- is not not recognized without eqexam,\MessageBreak
- will remove it}%
- \let\soln@keys@nLines\@empty\fi
- \xdef\sameVspace{\XKV@rm}%
- }{\eqSolnForEqexam{#1}}%
- \fi\fi
- \solnexer@@@woparts
-}
-\def\solnsafterSkip#1{\setlength{\@tempdima}{#1}%
- \edef\solnsafterSkipAmt{\the\@tempdima}%
- \def\solutionsafterSkip{\vskip\solnsafterSkipAmt\relax}}
-\solnsafterSkip{\smallskipamount}
-\def\@solnafterSkipOnce#1{\setlength{\@tempdima}{#1}%
- \xdef\@solnafterSkipOnceAmt{\the\@tempdima}}%
-\def\@@solnafterSkipOnce{\vskip\@solnafterSkipOnceAmt\relax %dpsj3
- \gdef\@solnafterSkipOnceAmt{0pt}}
-\def\@solnafterSkipOnceAmt{0pt}
-\def\quessolSkip#1{\setlength{\@tempdima}{#1}%
- \edef\eq@quessolskip{\noexpand\vskip\the\@tempdima\relax}}
-\def\eq@quessolskip{\vskip\smallskipamount}
-\def\eqe@debugVertSkip#1{}
-\def\eqe@showEndHere#1{#1}
-\def\eqe@setStartSolns{%
- \xdef\eq@startSoln{\the\pagetotal}%
- \eqe@debugVertSkip{\marginpar{\smash{b[\sameVspace]}}}%
-}
-\let\eqSavedComment\comment
-\let\eqSavedEndCommet\endcomment
-\def\setTabulrSolnEnv{%
- \@ifundefined{@listii@SAVE}{\global\let\@listii@SAVE\@listii}{}%
- \expandafter\def\expandafter\@listii\expandafter{\@listii@SAVE
- \leftmargin\leftmarginii \labelwidth\leftmarginii
- \advance\labelwidth-\labelsep}%
- \def\everyparShape{\everypar{\parshape \@ne 0pt \linewidth}}%
- \reset@doendpe{\parshape \@ne 0pt \linewidth}%
- \parshape \@ne 0pt \linewidth
- \everyparShape
-}
-\newif\ifthereissolution
-\let\priorexsolafterList\@empty
-\let\priorexsolafterTab\@empty
-\let\priorexsolafterSngl\@empty
-\def\eq@Hid{H}\def\eq@hid{h}
-\def\solutionafterExCmds#1{\def\@rgi{#1}\ifx\@rgi\@empty
- \let\eqSolnExCmds\relax\else
- \def\eqSolnExCmds{#1}\fi}
-\let\eqSolnExCmds\relax
-\def\eq@b@ddCodeSpecialDef#1{#1}% dpsj4
-\let\eq@b@ddCodeSpecial\eq@b@ddCodeSpecialDef % dpsj4
-\def\solnexer@@@woparts{\ifeq@solutionsafter\else
- \expandafter\begingroup\fi %dpsj10
- \global\thereissolutiontrue
- \global\let\procsoln\relax % dpsj6
- \global\let\endprocsoln\relax % dpsj6
- \def\exerwparts@cols{0}%
- \let\verbatim@out\ex@solns
- \if\currhideopt\eq@Hid
- \let\minVspacet@bs\@empty
- \let\procsoln\eqSavedComment
- \let\endprocsoln\eqSavedEndCommet
- \def\eq@next{\procsoln}%
- \else
- \eq@ckglobalhide
- \ifeq@hidesolution
- \let\procsoln\eqSavedComment
- \let\endprocsoln\eqSavedEndCommet
- \else
- \ifeq@solutionsafter\else
- \ifx\eq@@CommonCmd\@empty\else
- \set@display@protect
- \immediate\write\verbatim@out{\eq@@CommonCmd}%
- \set@typeset@protect
- \fi
- \fi
- \let\procsoln\verbatimwrite
- \let\endprocsoln\endverbatimwrite
- \fi
- \def\eq@next{%
- \ifeq@solutionsafter
- \let\procsoln\relax % dpsj6
- \let\endprocsoln\relax
- \removelastskip\removelastparskip
- \cqSAtrue\eqCQDeclarations
- \declCopyQues{\input{\cq@CutName}}%
- \ifx\exsolafter\@empty
- \ifdim\sameVspace=0pt\eqe@setStartSolns
- \else
- \solutionsafterSkip
- \@@solnafterSkipOnce % dpsj3
- \eqe@setStartSolns
- \fi
- \else\par\kern0pt
- \solutionsafterSkip
- \@@solnafterSkipOnce % dpsj3
- \noindent\strut\eqe@setStartSolns
- \fi
- \parskip\eqeques@parsep
- \ifx\endparts\endexercise@parts@tabular
- \eq@setPrbSolnAftrIndnt
- \restorejustify
- \fi
- \ifx\endparts\endexercise@parts@tabular\expandafter
- \priorexsolafterTab\else
- \ifx\endparts\endexercise@parts@list\expandafter
- \priorexsolafterList\else\expandafter
- \priorexsolafterSngl\fi\fi
- \exsolafter\space\ignorespaces
- \solutionparshape
- \else
- \eqExerSolnHeader
- \global\let\eqExerSolnHeader\@empty
- \global\therearesolutionstrue\expandafter\procsoln
- \fi
- }%
- \fi
- \eq@b@ddCodeSpecial{\eq@next}%
-}% dpsj4
-\let\endsolnexerhook\@empty
-\let\pkg@endsolnexerhook\@empty
-\let\endsolnexerhookaux\@empty
-\def\eq@fititin#1{\noindent\unskip\nobreak\hfill\penalty100
- \hskip1em\hbox{}\nobreak\hfill#1}%
-\let\eqfititin\eq@fititin
-\newcommand\eqExerSolnTrailer{%
- \protect\ReturnTo{page.\the\c@page}%
- {\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else
- \exrtnlabelformat\fi}}%
- \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi^^J%
- \ifmakeExSlLocal\protect\endgroup^^J\fi
-}
-\let\eq@e@ddCodeSpecialDef\relax % dpsj4
-\let\eq@e@ddCodeSpecial\eq@e@ddCodeSpecialDef % dpsj6
-\let\kdvsp@Restore\relax % dpsj20
-\def\endsolnexer@woparts{\endprocsoln\eq@e@ddCodeSpecial
- \pkg@endsolnexerhook % djsj8 moved from the end of the macro
- \ifeq@solutionsafter\else
- \expandafter\endgroup\fi % from \begingroup at \solnexer@@@woparts
- \global\let\exsolnonceonlytophook\relax
- \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi % dpsj5
- \ifvspacewithsolns\vspaceFmt{\sameVspace}\else
- \ifeq@nosolutions\ifeq@solutionsafter\else
- \vspaceFmt{\sameVspace}\fi\fi\fi
- \if\currhideopt H%
- \ifkeepdeclaredvspacing\vskip\sameVspace\fi
- \else
- \ifeq@solutionsafter
- \ifx\isitleadin\eq@YES\parshape=0 \fi % dpsj9
- \if\exerstar*%
- \eq@fititin{\mbox{\exrtnlabelformatwp}}\else
- \eq@fititin{\mbox{\exrtnlabelformat}}\fi
- \ifx\istabularexer\eq@YES\unskip\kern0pt\else\par\fi % dpsj6
- \ifx\minVspacet@bs\@empty
- \ifkeepdeclaredvspacing
- \@tempdima\pagetotal
- \advance\@tempdima-\eq@startSoln
- \@tempdimb\sameVspace\relax
- \ifdim\@tempdimb>1sp\relax
- \advance\@tempdimb-\@tempdima
- \ifdim\@tempdimb>0pt\vglue\@tempdimb\kern0pt
- \let\eqe@showEndHere\@gobble
- \edef\tmp@exp{\noexpand\marginpar{%
- \noexpand\smash{e: adj \the\@tempdimb}}}%
- \eqe@debugVertSkip{\tmp@exp}%
- \fi
- \fi
- \fi
- \eqe@showEndHere{\eqe@debugVertSkip{\marginpar{\smash{e}}}}%
- \fi
- \else
- \eq@ckglobalhide
- \ifeq@hidesolution\else
- \endsolnexerhookaux
- \let\verbatim@out\ex@solns
- \set@display@protect
- \immediate\write\verbatim@out{\eqExerSolnTrailer}%
- \set@typeset@protect
- \fi
- \fi
- \fi
- \kdvsp@Restore % dpsj20
- \endsolnexerhook\penalty0\relax}
-\let\eq@exerstarEnv\relax
-\newenvironment{exercise*}{\def\eq@exerstarEnv{*}\exercise}
-{\endexercise}
-\def\exerwparts@cols{0}
-\let\topofpartshook\relax
-\let\@listiiredefined\eq@NO
-\let\itsExerParts\eq@NO
-\newif\if@tableadinitem\@tableadinitemfalse
-\newcommand{\tableadin@external}{\PackageError{exerquiz/eqexam}
- {The \string\tableadin\space command is designed\MessageBreak
- for the problem* environment of eqexam}{Use \string\tableadin\space
- in the problem* environment of eqexam.}%
-}
-\let\tableadin\tableadin@external
-\newcommand{\eq@tableadinparts}{\item\relax
- \PackageError{exerquiz/eqexam}{The \string\tableadin\space
- command is not allowed in the\MessageBreak
- parts environment}{Use \string\tableadin\space
- in the problem* environment of eqexam.}%
-}
-\let\istabularexer\eq@NO
-\def\exercise@parts{\let\rlspar\relax
- \ifx\solutionparshape\@empty
- \let\isitleadin\eq@NO
- \if@tableadinitem\let\rlspar\@gobbletwo\fi
- \else\let\isitleadin\eq@YES\fi
- \rlspar\removelastskip\par
- \if\isitleadin\eq@YES
- \def\eqparts@topsep{0pt}%
- \vskip\eqparts@itemsep\relax\fi
- \topofpartshook
- \let\itsExerParts\eq@YES
- \global\let\@listiiredefined\eq@NO
- \def\exerwparts@cols{0}\@ifnextchar[%
- {%
- \if@tableadinitem\else\removelastparskip\fi
- \let\endparts\endexercise@parts@tabular\exercise@parts@tabular@}%
- {\let\endparts\endexercise@parts@list\exercise@parts@list}}
-\def\eq@extralabelsep{0pt}
-\newcommand{\setPartsWidth}[1]{\def\parts@indent{\normalfont#1}%
- \bgroup\settowidth{\eq@tmpdima}{\parts@indent}%
- \xdef\widthOfParts{\the\eq@tmpdima}\egroup}
-\setPartsWidth{(d)}
-\def\eqe@prtsepPrb{\ }
-\providecommand{\prbPrtsep}[1]{\def\eqe@prtsepPrb{#1}}
-\providecommand{\exPrtsep}[1]{\def\eqe@prtsepPrb{#1}}
-\providecommand{\eqequesparsep}[1]{\def\eqeques@parsep{#1}}
-\eqequesparsep{0pt}
-\let\prior@parts@hook\@empty
-\let\post@parts@hook\@empty
-\let\abovepartshook\@empty
-\let\belowpartshook\@empty
-\let\eqp@rtc@lcm@rk\relax
-\let\eq@insertContAnnot\relax
-\def\eq@item@common{\eq@insertContAnnot\eqp@rtc@lcm@rk
- \def\currhideopt{x}\eq@hidesolutionfalse\eq@nolinkfalse
- \@ifnextchar[{\@ckhide}{\eq@item}}
-\newcommand{\partsitemsep}[1]{{%
- \setlength{\@tempdima}{#1}%
- \xdef\eqparts@itemsep{\the\@tempdima}}}
-\let\eqpartsitemsep\partsitemsep
-\def\eqparts@itemsep{0pt}
-\newcommand\partsparsep[1]{{%
- \setlength{\@tempdima}{#1}%
- \xdef\eqparts@parsep{\the\@tempdima}}}
-\def\eqparts@parsep{0pt}
-\newcommand\partstopsep[1]{{%
- \setlength{\@tempdima}{#1}%
- \xdef\eqparts@topsep{\the\@tempdima}}}
-\def\eqparts@topsep{3pt}
-\newcommand{\leadinitem@external}{\PackageError{exerquiz/eqexam}
- {The \string\leadinitem\space command is designed to be\MessageBreak
- the first item in the problem*\MessageBreak
- environment above the parts environment}
- {Use \string\leadinitem\space in the problem* environment.}%
-}
-\let\leadinitem\leadinitem@external
-\let\itsforleadinitem\eq@NO
-\newcommand{\eq@leadinitemparts}{\item\relax
- \PackageError{exerquiz/eqexam}{The \string\leadinitem\space
- command is not allowed in the\MessageBreak
- parts environment}
- {Use \string\leadinitem\space in the problem* environment.}%
-}
-\def\eq@handleOptArg[#1]{\def\eq@optArg{[#1]}\eq@handleOptArgi}
-\def\eq@handleOptArgi{\expandafter
- \eq@item@latex\eq@optArg\exlisttabheaderafterhook}
-\newif\ifwithinparts
-\let\ex@listtabheader@fterhook\@empty
-\newenvironment{exercise@parts@list}{%
- \settowidth{\eq@tmplength}{\parts@indent}%
- \edef\widthOfParts{\the\eq@tmplength}%
- \eq@initializeContAnnot\eq@nolinkfalse\prior@parts@hook
- \abovepartshook\list{\normalfont
- \if\Hidesymbol h\eq@nolinkfalse\ifeq@solutionsafter
- \eq@nolinktrue\fi\fi
- \if\currhideopt H%
- \else
- \ifeq@solutionsafter
- \eq@nolinktrue % no link to solution
- \else
- \ifeq@nosolutions
- \eq@nolinktrue % no link to solution
- \else
- \eq@ckglobalhide
- \ifeq@hidesolution\eq@nolinktrue\else
- \global\let\eqExerSolnHeader\eq@@writeexheaderlist
- \fi
- \fi
- \fi
- \fi
- \makebox[\widthOfParts][r]{\eqexlisttabheader}%
-}{%
- \usecounter{partno}%
- \if\isitleadin\eq@YES
- \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
- \xdef\prtsIndntSep{\the\eq@tmplength}%
- \if\itsforleadinitem\eqe@YES\setcounter{partno}{\fliPartNo}\else
- \setcounter{partno}{1}\fi\fi
- \let\leadinitem\eq@leadinitemparts
- \let\tableadin\eq@tableadinparts
- \global\let\solutionparshape\@empty
- \setlength{\topsep}{\eqparts@topsep}%
- \setlength{\parskip}{0pt}%
- \setlength{\partopsep}{0pt plus 1pt minus 1pt}%
- \ifdim\eqeques@parsep=0pt
- \setlength{\parsep}{\eqparts@parsep}%
- \else
- \setlength{\parsep}{\eqeques@parsep}%
- \fi
- \setlength{\itemsep}{\eqparts@itemsep-\parsep}%
- \setlength{\itemindent}{0pt}%
- \setlength{\listparindent}{\parindent}%
- \settowidth{\labelsep}{\normalfont\eqe@prtsepPrb}%
- \addtolength{\labelsep}{\eq@extralabelsep}%
- \settowidth{\labelwidth}{\parts@indent}%
- \setlength{\leftmargin}{\labelwidth}%
- \addtolength{\leftmargin}{\labelsep}%
- \let\eq@item@latex\item
- \def\eq@item{\@ifnextchar[{\eq@handleOptArg}
- {\eq@item@latex\ex@listtabheader@fterhook
- \exlisttabheaderafterhook}}%
- \def\eqthisenv{parts}\withinpartstrue
- \def\item{\ifx\@currenvir\eqthisenv
- \def\eq@next{\eq@item@common}\else
- \def\eq@next{\eq@item}\fi
- \eq@next}%
-}}{\endlist\global\let\leadinitem\leadinitem@external
- \post@parts@hook\belowpartshook}
-\def\eq@initializeContAnnot{\@ifundefined{eqequestions}
- {\global\let\eqeCurrProb\relax}
- {\xdef\eqeCurrProb{\theeqquestionnoi}}%
- \xdef\eq@currProbStartPage{\arabic{page}}%
-}
-\define@key{tabp@rts}{nCols}{\def\exerwparts@cols{#1}}
-\define@key{tabp@rts}{minVspace}{\def\minVspacet@bs{#1}}
-\let\minVspacet@bs\@empty
-\def\minVspacetabs#1{\def\minVspacet@bs{#1}}
-\def\priorexsolafterTab{\ifkeepdeclaredvspacing
- \ifeq@solutionsafter\ifx\minVspacet@bs\@empty\else
- \priorexsolafterTab@cont\fi\fi\fi}
-\def\priorexsolafterTab@cont{\let\exsolafter@save\exsolafter
- \let\exsolafter\@empty
- \makebox[0pt][r]{\parbox[t][\minVspacet@bs][t]{0pt}
- {\strut\hfill\vfill\strut}}%
- \minipage[t]{\linewidth}\exsolafter@save}
-\def\pkg@endsolnexerhook{\ifkeepdeclaredvspacing
- \ifeq@solutionsafter\ifx\minVspacet@bs\@empty\else
- \endminipage\fi\fi\fi}
-\def\exercise@parts@tabular@[#1]{%
- \inittabMark
- \let\eq@insertContAnnot\relax
- \let\exerwparts@cols\@empty
- \setkeys*{tabp@rts}{#1}\ifx\exerwparts@cols\@empty
- \edef\exerwparts@cols{\XKV@rm}\fi
- \ifx\minVspacet@bs\@empty\keepdeclaredvspacingfalse\fi
- \let\istabularexer\eq@YES
- \@tempcnta\exerwparts@cols\relax
- \ifnum\@tempcnta<2\relax
- \PackageError{exerquiz}{%
- The number of columns for parts\MessageBreak
- needs to be an integer greater than 1}
- {Enter an integer, 2 or larger}\fi
- \exercise@parts@tabular}
-\newcount\eq@extabColCnt
-\def\autotabOn{\let\eq@tabMarkChk\relax%
- \PackageInfo{exerquiz/eqexam}{Executing \string\autotabOn}}
-\def\autotabOff{\let\eq@tabMarkChk\@gobble
- \PackageInfo{exerquiz/eqexam}{Executing \string\autotabOff}}
-\autotabOff
-\def\inittabMark{\global\eq@extabColCnt=0 }
-\def\resettabMark{\global\eq@extabColCnt=1 }
-\newcommand\autotabnewline[1][\eqparts@tabrowsep]{%
- \ifnum\exerwparts@cols>0\relax
- \ifx\eq@tabMarkChk\@gobble
- \def\eq@atnext{\expandafter
- \tabularnewline\expandafter[#1]}\else
- \def\eq@atnext{\resettabMark\tabularnewline
- \noalign{\expandafter\kern#1}}\fi
- \expandafter\eq@atnext\fi}
-\def\eq@tabMark{%
- \ifnum\eq@extabColCnt=0\relax
- \global\advance\eq@extabColCnt1\relax
- \let\eq@next\relax
- \else
- \ifnum\eq@extabColCnt=1\relax
- \let\eq@next\relax
- \else
- \ifnum\eq@extabColCnt>\exerwparts@cols
- \let\eq@next\autotabnewline
- \else\def\eq@next{&}\fi
- \fi
- \fi
- \eq@next
- \global\advance\eq@extabColCnt1\relax
-}
-\newcommand\partstabcolsep[1]{\def\eq@partstabcolsep{#1}}
-\partstabcolsep{1.5pt}
-\newcommand\partstabtopsep[1]{\def\eq@partstabtopsep{#1}}
-\partstabtopsep{3pt}
-\def\eq@vpartstabtopsep{\vskip\eq@partstabtopsep\relax}
-\newcommand\partstabrowsep[1]{\setlength{\@tempdima}{#1}%
- \edef\eqparts@tabrowsep{\the\@tempdima}}
-\partstabrowsep{0pt}
-\newenvironment{exercise@parts@tabular}{%
- \setcounter{partno}{0}%
- \def\tablrIndent{\hglue\prtsIndntSep\relax}%
- \if\isitleadin\eq@YES
- \if$\the\everypar$\let\tablrIndent\relax\fi
- \setcounter{partno}{1}\fi
- \let\leadinitem\eq@leadinitemparts
- \let\tableadin\eq@tableadinparts
- \global\let\solutionparshape\@empty
- \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
- \xdef\prtsIndntSep{\the\eq@tmplength}%
- \sbox{\eq@tmpbox}{\parts@indent}%
- \let\eq@item@latex\item
- \let\eq@item\item@part@tabular
- \def\eqthisenv{parts}\withinpartstrue
- \def\item{\ifx\@currenvir\eqthisenv
- \def\eq@next{\eq@tabMarkChk\eq@tabMark\eq@item@common}\else
- \def\eq@next{\eq@item@latex}\fi
- \eq@next}\eq@nolinkfalse
- \@ifundefined{@xtabularcr}{\let\@xarraycr\eq@xtabularcr}
- {\let\@xtabularcr\eq@xtabularcr}%
- \eq@tmpdima=\linewidth
- \advance\eq@tmpdima-\prtsIndntSep\relax
- \@tempcnta\exerwparts@cols\relax
- \advance\@tempcnta-1\relax
- \multiply\@tempcnta2\relax
- \@tempdima\prtsIndntSep\relax
- \divide\@tempdima 2\relax
- \edef\halfWidth{\the\@tempdima}%
- \advance\@tempdima\eq@partstabcolsep\relax
- \tabcolsep\@tempdima
- \multiply\@tempdima\@tempcnta
- \advance\eq@tmpdima-\@tempdima
- \divide\eq@tmpdima by\exerwparts@cols\relax %dpsj3
- \edef\widthOfPartsBox{\the\eq@tmpdima}% dpsj2
- \if@tableadinitem\else\vskip\eq@partstabtopsep\relax\fi
- \noindent\normalbaselines\kern0pt
- \prior@parts@hook\abovepartshook
- \tablrIndent\tabular[t]{@{}*{\exerwparts@cols}{>{\setTabulrSolnEnv
- \parskip\eqeques@parsep\relax
- \parindent0pt\relax\strut}p{\eq@tmpdima}}@{\hidewidth}}%
-}{\endtabular\kern0pt
- \@ifundefined{@listii@SAVE}{}{\global\let\@listii\@listii@SAVE
- \global\let\@listii@SAVE\relax}%
- \post@parts@hook\belowpartshook
- \aftergroup\eqe@innermarkpts
- \aftergroup\eq@vpartstabtopsep}
-\let\eqe@innermarkpts\relax
-\def\item@part@tabular{\refstepcounter{partno}%
- \global\let\eqExerSolnHeader\@empty
- \ifeq@solutionsafter
- \eq@nolinktrue % no link to solution
- \else\ifeq@nosolutions
- \eq@nolinktrue % no link to solution
- \else
- \eq@ckglobalhide
- \ifeq@hidesolution\eq@nolinktrue\else
- \gdef\eqExerSolnHeader{\eq@@writeexheaderlist}%
- \fi\fi\fi
- \if@restorejustify\restorejustify\else\PBS\raggedright\fi
- \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
- \xdef\prtsIndntSep{\the\eq@tmplength}%
- \sbox{\eq@tmpbox}{\parts@indent}%
- \eq@tmpdima=\wd\eq@tmpbox
- \addtolength\eq@tmplength{\eq@extralabelsep}%
- \xdef\partshangamount{\the\eq@tmplength}%
- \parshape \@ne 0pt \linewidth
- \everypar{\parshape \@ne 0pt \linewidth}%
- \eq@setPrbSolnAftrIndnt
- \makebox[0pt][r]{\eqexlisttabheader\eqe@prtsepPrb}%
- \ex@listtabheader@fterhook
- \exlisttabheaderafterhook\ignorespaces
-}
-\def\@ckhide[#1]{\edef\eq@arg{#1}%
- \def\currhideopt{x}%
- \ifx\eq@arg\@empty\else
- \if\eq@arg\eq@Hid
- \eq@hidesolutiontrue\eq@nolinktrue%
- \edef\currhideopt{\Hidesymbol}%
- \else
- \ifeq@globalshowsolutions\else
- \if\eq@arg\eq@hid
- \eq@hidesolutiontrue\eq@nolinktrue%
- \def\currhideopt{h}%
- \fi
- \fi
- \fi\fi
- \eq@item
-}
-\def\tabControlOn{\@ifundefined{@xtabularcr}
- {\let\save@@xtabularcr\@xarraycr}
- {\let\save@@xtabularcr\@xtabularcr}}
-\def\tabControlOff{\@ifundefined{@xtabularcr}
- {\let\@xarraycr\save@@xtabularcr}
- {\let\@xtabularcr\save@@xtabularcr}}
-\AtBeginDocument{\tabControlOn}
-\def\eq@xtabularcr{\@ifnextchar[{\save@@xtabularcr}
- {\eqe@tab@parts@rowsep}}%
-\def\eqe@tab@parts@rowsep{\save@@xtabularcr
- \noalign{\expandafter\kern\eqparts@tabrowsep}}%
-\def\includeexersolutions{\@ifstar
- {\let\resetEXsolns\relax\includeexersolutionsi}
- {\def\resetEXsolns{\global\let\include@solutions\relax}%
- \includeexersolutionsi}%
-}
-\newcommand{\includeexersolutionsi}[1][]{%
- \filterFor{#1}\includeexersolutionsii
-}
-\def\includeexersolutionsii{%
- \include@solutions
- \resetEXsolns
- \let\eqFilterArg\@empty
-}
-\long\def\gobbleToEndEXt#1\endeqEXt{%
- \ifeqforpaper\expandafter\@gobbletwo\fi}
-\newcommand\filterFor[1]{\def\eqFilterArg{#1}}
-\newcommand\inclEXtFilter[2]{\def\eqargii{#2}\ifx\eqargii\eqFilterArg
- \else\expandafter\gobbleToEndEXt\fi}
-\newcommand\useEXtFilter{\let\eqEXt\inclEXtFilter}
-\let\eqsolutionshook\@empty
-\let\eq@solutionshook\@empty
-\let\priorexsectitle\@empty
-\let\priorexslinput\@empty
-\def\exerSolnsHeadnToc{\section*{\exsectitle}%
- \addcontentsline{toc}{section}{%
- \@ifundefined{web@latextoc}{}{%
- \ifx\web@latextoc\eq@YES\else
- \protect\numberline{}\fi}\exsectitle}}
-\@ifpackageloaded{web}{\def\eq@normallheader{\lheader{\rightmark}}}
- {\let\eq@normallheader\relax}
-\@ifpackageloaded{web}{\def\eq@defaultlheader{\lheader{\aeb@setmarks}}}
- {\let\eq@defaultlheader\relax}
-\newif\ifExSolutionsSet \ExSolutionsSetfalse
-\newcommand{\exerSolnInput}
-{%
- \@ifundefined{eqe@IWO}{}{\ifsolutionsAtEnd%\ifvspacewithsolns
- \eqe@IWO\@auxout{\string\expandafter\string\gdef
- \string\csname\space eqExamQuesLastPage\string\endcsname
- {\arabic{page}}}\fi}
- \let\webnewpage\relax
- \ifsolutionsonly\else\immediate\closeout\ex@solns\fi
- \ifeq@nosolutions\else
- \iftherearesolutions
- \ifsolutionsonly\eq@solutionshook
- \eqsolutionshook
- \else
- \newpage\eq@solutionshook
- \eqsolutionshook\markright{}\eq@normallheader
- \fi
- \markright{\exsectitle}%
- \ifx\webnewpage\relax
- \def\webnewpage{\global\let\webnewpage\newpage}%
- \fi
- \priorexsectitle\exerSolnsHeadnToc\priorexslinput
- \InputIfFileExists{\jobname.sol}
- {\global\ExSolutionsSettrue}{\PackageWarning{exerquiz}
- {!!! Solutions to exercises not found}}%
- \global\ExSolutionsSetfalse
- \newpage\eq@defaultlheader
- \fi
- \fi
-}
-\def\include@solutions{%
- \exerSolnInput
-}
-\newcommand{\prior@questionsHook}{}
-\let\qMark@Hook\@empty
-\let\aebtitleQuiz\@empty
-\newcommand{\post@questionsHook}{}
-\newcommand{\quesNumColor}[1]{\def\eq@quesNumCol{#1}}
-\quesNumColor{blue}
-\renewcommand{\theeqquestionnoi}{\arabic{eqquestionnoi}}
-\newcommand{\labeleqquestionnoi}{%
- \color{\eq@quesNumCol}\bfseries\theeqquestionnoi.}
-\renewcommand\theeqquestionnoii{(\alph{eqquestionnoii})}
-\newcommand{\labeleqquestionnoii}{%
- \color{\eq@quesNumCol}\bfseries\theeqquestionnoii}
-\renewcommand\theeqquestionnoiii{(\roman{eqquestionnoiii})}
-\newcommand{\labeleqquestionnoiii}{%
- \color{\eq@quesNumCol}\bfseries\theeqquestionnoiii}
-\define@key{props@ques}{labelwidthTo}%
- [\normalsize\normalfont\bfseries00.]%
- {\def\propQ@labelwidthTo{#1}}
-\define@key{props@ques}{labelwidth}[]{\def\propQ@labelwidth{#1}}
-\let\propQ@labelwidth\@empty
-\define@key{props@ques}{topsep}[\the\topsep]{\edef\propQ@topsep{#1}}
-\define@key{props@ques}{partopsep}[\the\partopsep]%
- {\edef\propQ@partopsep{#1}}
-\define@key{props@ques}{parsep}[\the\parsep]{\edef\propQ@parsep{#1}}
-\define@key{props@ques}{itemsep}[\the\itemsep]{\edef\propQ@itemsep{#1}}
-\define@key{props@ques}{labelsepTo}[\normalsize\normalfont\ ]%
- {\def\propQ@labelsepTo{#1}}
-\define@key{props@ques}{labelsep}[\@empty]{\def\propQ@labelsep{#1}}
-\let\propQ@labelsep\@empty
-\define@key{props@ques}{color}[blue]{\quesNumColor{#1}}
-\setkeys{props@ques}{labelwidthTo,topsep,partopsep,parsep,%
- itemsep,labelsepTo,color}%
-\newenvironment{questions}[1][]
-{%
- \ifnum\@eqquestiondepth>\tw@\@toodeep\else
- \advance\@eqquestiondepth\@ne\fi
- \def\@quesctr{eqquestionno\romannumeral\the\@eqquestiondepth}%
- \toks@=\expandafter\expandafter\expandafter{#1}\expandafter
- \xdef\csname quesOpts\@quesctr\endcsname{\the\toks@}%
- \edef\tempexp{\noexpand\setkeys{props@ques}{\the\toks@}}\tempexp
- \list{\qMark@Hook\prior@questionsHook\gdef\eqPTs{1}%
- \global\let\eqQT\eq@na%
- {\@tempcnta=0 \let\@thispr@b\@empty
- \@whilenum\@tempcnta<\@eqquestiondepth\do{\advance\@tempcnta\@ne
- \ifx\@thispr@b\@empty\edef\@thispr@b{%
- \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\else
- \edef\@thispr@b{\@thispr@b%
- \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\fi
- }\xdef\@currentQues{\@thispr@b}}%
- \makebox[\labelwidth][r]{\normalfont\@nameuse{label\@quesctr}}%
- \xdef\eq@pageThisQ{\the\c@page}%
- \post@questionsHook}{\usecounter{\@quesctr}%
- \ifx\propQ@labelsep\@empty
- \settowidth{\labelsep}{\propQ@labelsepTo}\else
- \setlength{\labelsep}{\propQ@labelsep}\fi
- \ifx\propQ@labelwidth\@empty
- \settowidth{\labelwidth}%
- {\propQ@labelwidthTo\hspace{\labelsep}}\else
- \settowidth{\labelwidth}{\hspace{\propQ@labelwidth}%
- \hspace{\labelsep}}\fi
- \setlength{\topsep}{\propQ@topsep}%
- \setlength{\partopsep}{\propQ@partopsep}%
- \ifdim\parskip>\z@\addtolength{\topsep}{-\parskip}\fi
- \setlength{\parsep}{\propQ@parsep}%
- \setlength{\itemsep}{\propQ@itemsep}%
- \setlength{\itemindent}{0pt}%
- \setlength{\leftmargin}{\labelwidth}%
- }%
-}{\endlist}
-\def\pushquestions{\expandafter\xdef\csname save\@quesctr\endcsname
- {\expandafter\the\csname c@\@quesctr\endcsname}\end{questions}}
-\def\popquestions{%
- \begin{questions}[\csname quesOpts\@quesctr\endcsname]%
- \setcounter{\@quesctr}{\csname save\@quesctr\endcsname}%
- \@ifnextchar\popquestions{\item[]}{\@ifnextchar\begin{\item[]}{}}}
-\newcommand{\priorsqhook}[1]{\def\sq@priorhook{#1}}
-\priorsqhook{}
-\newcommand{\abovesqskip}[1]{\def\sq@aboveskip{#1}}
-\abovesqskip{\par\medskip}
-\long\def\endsqhook#1{\def\sq@afterhook{#1}}
-\endsqhook{}
-\def\@shortquizCnt{0}
-\def\@sqGenBaseName{eqSqBn\@shortquizCnt}
-\let\sqhspace\space
-\let\ListOfSQuizNames\@empty
-\newenvironment{shortquiz}
-{%
- \xdef\eq@pageThisQ{\the\c@page}%
- \let\@currentQues\@empty
- {\count0=\@shortquizCnt \advance\count0by1\relax
- \xdef\@shortquizCnt{\the\count0}}%
- \goodbreak\@ifstar{\sqForms\@shortquiz}%
- {\if\aeb@FLOverride\eq@f\def\sqstar{*}\else
- \def\sqstar{}\sqLinks\fi\@shortquiz}%
-}{\aeb@endshortquiz}
-\newenvironment{shortquiz*}
-{%
- \xdef\eq@pageThisQ{\the\c@page}%
- {\count0=\@shortquizCnt\advance\count0by1\relax
- \xdef\@shortquizCnt{\the\count0 }}%
- \sqForms\@shortquiz
-}{\aeb@endshortquiz}
-\def\@shortquiz{\@ifnextchar[%
- {\@@shortquiz}{\@@shortquiz[\@sqGenBaseName]}}
-\def\sq@setCLN#1{\ifx\aebTitleQuiz\@empty
- \protected@edef\@currentlabelname{#1}\else
- \protected@edef\@currentlabelname{\@currentlabelname}\fi
-}
-\let\isQZ=q \let\isSQZ=s
-\let\eqQuizType\relax
-\def\@@shortquiz[#1]{%\begingroup
- \gdef\oField{#1}\gdef\curr@quiz{#1}\gdef\currQuiz{#1}%
- \edef\tmp@Exp{\noexpand\g@addto@macro\noexpand
- \ListOfSQuizNames{,#1}}\tmp@Exp
- \global\let\eqQzQuesList\@empty
- \let\eq@AddProbToQzQuesList\relax
- \edef\@currentlabel{\@shortquizCnt}%
- \edef\@currentHref{shortquiz.\@shortquizCnt}%
- \global\let\eqQuizType\isSQZ\let\@qzsolndest\@empty
- \if\sqstar*\relax
- \let\@Ans\Ans@sq@f
- \ifx\oField\@empty
- \typeout{^^JExerquiz: Base field name required when using
- shortquiz with '*' option}%
- \PackageInfo{exerquiz}{Assuming link style^^J}%
- \let\@Ans\Ans@sq@l
- \fi
- \else
- \let\@Ans\Ans@sq@l
- \fi
- \setcounter{questionno}{0}%
- \let\answers\answers@sq
- \let\endanswers\endanswers@sq
- \let\manswers\manswers@sq
- \let\endmanswers\endmanswers@sq
- \let\solution\solution@sq
- \let\endsolution\endsolution@sq
- \sq@aboveskip\sq@priorhook\ignorespaces
-}
-\newcommand\belowsqskip[1]{\def\aftershortquizskip{#1}}
-\belowsqskip{\medskip}
-\def\aeb@endshortquiz{\setcounter{quizno}{0}%
- \sq@afterhook
- \global\let\sqlabel\eq@sqlabel
- \global\let\sqslrtnlabel\eq@sqslrtnlabel
- \global\let\sqsllabel\eq@sqsllabel
- \par\aftershortquizskip
-}
-\def\sqLinks{\def\sqstar{}}\sqLinks
-\def\sqForms{\def\sqstar{*}}
-\let\eq@tq@star\relax
-\def\qzPriorSolutionAfterHook{\smallskip}
-\let\sqPostHeaderHook\@empty
-\let\qPostHeaderHook\@empty
-\let\eq@sqPostHeaderHook\@empty
-\let\eq@qPostHeaderHook\@empty
-\let\prior@eqQt\@empty
-\let\prior@eqSQt\@empty
-\def\sqsolafterhspace{\space}
-\newif\ifmakeQzSlLocal \makeQzSlLocalfalse
-\def\makeQzSolnsLocalOn{\makeQzSlLocaltrue}
-\def\makeQzSolnsLocalOff{\makeQzSlLocalfalse}
-\def\solution@sq{\let\eq@next\relax
- \ifx\@qzsolndest\@empty
- \PackageWarning{exerquiz}%
- {* Solutions unexpected here, will *\MessageBreak
- * assume solutionsafter option *}%
- \eq@solutionsaftertrue
- \fi
- \ifeq@solutionsafter
- \par\qzPriorSolutionAfterHook\noindent
- \if!\sqsolafter!\else
- \sqsolafter\sqsolafterhspace\fi\ignorespaces
- \else
- \global\therearequizsolutionstrue\let\verbatim@out=\quiz@solns
- \set@display@protect
- \immediate\write\verbatim@out{%
- \ifmakeQzSlLocal\protect\begingroup^^J\fi
- \if\eqQuizType\isQZ
- \ifx\prior@eqQt\@empty\else\prior@eqQt\fi
- \protect\eqQt{\eqFilterArg}\else
- \ifx\prior@eqSQt\@empty\else\prior@eqSQt\fi
- \protect\eqSQt{\eqFilterArg}\fi
- \protect\quizSolnHeader\if\eqQuizType\isQZ\ifx\allow@peek\eq@NO
- [{\curr@quiz}{\currQuizStartPage}]\fi\fi
- {\@qzsolndest}{\sqsllabel}\protect\eqterminex
- \if\eqQuizType\isQZ\expandafter\eq@qPostHeaderHook
- \expandafter\qPostHeaderHook\else
- \expandafter\eq@sqPostHeaderHook
- \expandafter\sqPostHeaderHook\fi}%
- \set@typeset@protect
- \expandafter\verbatimwrite\fi
-}
-\let\qzSolutionsAfterHook\@empty
-\def\endsolution@sq
-{%
- \ifeq@solutionsafter
- \eq@fititin{\mbox{\sqslrtnlabel}}\par\qzSolutionsAfterHook
- \aftergroup\ignorespaces
- \else
- \endverbatimwrite
- \ifx\@qzsolndest\@empty\else\set@display@protect
- \immediate\write\verbatim@out{\eqSqSolnTrailer}%
- \set@typeset@protect
- \fi
- \fi
- \global\let\@qzsolndest\@empty
-}
-\def\fpAfterSolutionsSkip{\par\medskip}
-\let\eqSqSolnTrailerHook\@empty
-\let\eqQzSolnTrailerHook\@empty
-\newcommand\eqSqSolnTrailer{%
- \if\eqQuizType\isQZ
- \eqQzSolnTrailerHook
- \protect\ReturnTo{page.\eq@pageThisQ}%
- {\protect\mbox{\sqslrtnlabel}}\string\endeqQt
- \else
- \eqSqSolnTrailerHook
- \protect\ReturnTo{page.\eq@pageThisQ}%
- {\protect\mbox{\sqslrtnlabel}}\string\endeqSQt%
- \fi
- \ifeqforpaper\protect\fpAfterSolutionsSkip\fi^^J%
- \ifmakeQzSlLocal\protect\endgroup^^J\fi
-}
-\let\eqSQt\@gobble
-\let\endeqSQt\relax
-\let\eqQt\@gobble
-\let\endeqQt\relax
-\let\prior@quizSolnHeaderHook\@empty
-\newcommand\quizSolnHeader[3][]{%
- \prior@quizSolnHeaderHook
- \ifeqforpaper\else\webnewpage\fi\noindent
- #2%
- \solnspace
-}
-\newif\iftherearequizsolutions \therearequizsolutionsfalse
-\let\aeb@FLOverride\relax
-\def\includequizsolutions{\@ifstar
- {\let\resetQZtsolns\relax\includequizsolutionsi}
- {\def\resetQZtsolns{\global\let\include@quizsolutions\relax}%
- \includequizsolutionsi}%
-}
-\newcommand{\includequizsolutionsi}[1][]{%
- \filterFor{#1}\includequizsolutionsii
-}
-\def\includequizsolutionsii{%
- \include@quizsolutions
- \resetQZtsolns
- \let\eqFilterArg\@empty
-}
-\newcommand\useForms{\def\aeb@FLOverride{f}}
-\newcommand\useLinks{\def\aeb@FLOverride{l}}
-\newcommand\restoreFLTypeDefault{\global\let\aeb@FLOverride\relax}
-\let\aeb@FLOverride\relax
-\let\aebtitleQuiz\@empty
-\let\aebTitleQuiz\@empty
-\def\pushEnvir{\xdef\eq@currenvir{\@currenvir}\endgroup}
-\def\popEnvir{\begingroup\@endpefalse
- \edef\@currenvir{\eq@currenvir}%
- \edef\@currenvline{\on@line}%
-}
-\def\answers@sq{\parindent0pt
- \ifx\solutionparshape\@empty\else
- \pushEnvir\par\noindent\expandafter\popEnvir\fi
- \stepcounter{questionno}%
- \if\sqstar*\relax
- \if\aeb@FLOverride\eq@l
- \let\@Ans\Ans@sq@l\else
- \let\@Ans\Ans@sq@f\fi
- \else
- \if\aeb@FLOverride\eq@f
- \let\@Ans\Ans@sq@f\else
- \let\@Ans\Ans@sq@l\fi
- \fi
- \def\aeb@answerType{r}\@ifnextchar[{\answers@@sq}%
- {\@ifstar{\answers@@sq[\curr@quiz.\thequestionno]}{\answers@@sq[]}}}
-\def\manswers@sq{\parindent0pt
- \@ifundefined{ifuserectforms}{}
- {\if\aeb@FLOverride\eq@f\ifuserectforms
- \useRectForMC\else\useCircForMC\fi\fi}%
- \ifx\solutionparshape\@empty\else
- \pushEnvir\par\noindent\expandafter\popEnvir\fi
- \stepcounter{questionno}%
- \if\sqstar*\relax
- \if\aeb@FLOverride\eq@l
- \let\@Ans\Ans@ck@sq@l\else
- \let\@Ans\Ans@ck@sq@f\fi
- \else
- \if\aeb@FLOverride\eq@f
- \let\@Ans\Ans@ck@sq@f\else
- \let\@Ans\Ans@ck@sq@l\fi
- \fi
- \def\aeb@answerType{c}\@ifnextchar[{\answers@@sq}%
- {\@ifstar{\answers@@sq[\curr@quiz.\thequestionno]}{\answers@@sq[]}}}
-\let\sq@hwdest\@empty % hard-wired destination
-\def\answers@@sq[#1]#2{%
- \xdef\aeb@numCols{#2}%
- \ifx\sq@hwdest\@empty
- \xdef\@qzsolndest{#1}\else
- \gdef\@qzsolndest{\sq@hwdest}\fi
- \if\aeb@numCols1\gdef\eq@listType{1}\expandafter\answers@sq@list
- \else
- \gdef\eq@listType{0}\expandafter\answers@@sq@tabular
- \fi{\aeb@numCols}%
-}
-\def\setMClabelsepDefault#1{\def\eq@hspanner@default{#1}}
-\def\setMClabelsep#1{\def\eq@hspanner{#1}}
-\setMClabelsep{\ }\setMClabelsepDefault{\ }
-\def\resetMClabelsep{\expandafter\setMClabelsep\expandafter
- {\eq@hspanner@default}}
-\def\eq@lw@l{\eq@l@l\eq@hspanner}
-\def\eq@l@l{\normalsize\normalfont(d)}
-\def\eq@lw@f{\kern\RadioFieldSize\eq@hspanner}
-\@ifundefined{ifwithsoldoc}{\newif\ifwithsoldoc\withsoldocfalse}{}
-\let\eq@ansChoiceArray\@empty
-\def\eq@recordAnsChoice{%
- \ifx\eq@ansChoiceArray\@empty
- \edef\tmp@exp{\noexpand\g@addto@macro
- \noexpand\eq@ansChoiceArray{"\alph{quizno}"}}\else
- \edef\tmp@exp{\noexpand\g@addto@macro
- \noexpand\eq@ansChoiceArray{,"\alph{quizno}"}}\fi
- \tmp@exp
-}
-\newcommand\Ans@list[2][0]{\gdef\eq@pPTs{#1}\xdef\Ans@choice{#2}%
- \item\relax\noindent\if\eq@listType\eq@One
- \addtocounter{quizno}{-1}\@ifundefined{ifwithsoldoc}
- {\refstepcounter{quizno}}{\ifwithsoldoc\stepcounter{quizno}\else
- \refstepcounter{quizno}\fi}\fi
- \ignorespaces}
-\newenvironment{answers@sq@list}[1]
-{%
- \ifx\aeb@answerType\eq@r
- \let\endanswers\endanswers@sq@list\else
- \let\endmanswers\endanswers@sq@list\fi
- \list{\strut\@Ans}{%
- \if\sqstar*\relax
- \settowidth{\labelwidth}{\eq@lw@f}\else
- \settowidth{\labelwidth}{\eq@lw@l}\fi
- \setlength{\topsep}{-\parskip+\aboveanswersSkip}%
- \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}%
- \setlength{\itemsep}{0pt}\setlength{\partopsep}{0pt}%
- \setlength{\listparindent}{\parindent}%
- \ifnum\exerwparts@cols>1\relax
- \ifx\itsExerParts\eq@YES
- \setlength{\leftmargin}{\labelwidth}\else
- \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi
- \else
- \ifx\solutionparshape\@empty
- \setlength{\leftmargin}{\labelwidth}\else
- \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi\fi
- \setlength{\labelsep}{0pt}%
- \def\Ans{\Ans@list}%
- }%
-}%
-{\endlist\setcounter{quizno}{0}\eq@answersEndHook}
-\newcommand\Ans@tabular[2][0]{\gdef\eq@pPTs{#1}\xdef\Ans@choice{#2}%
- \leavevmode\@Ans
-}
-\newcommand\sqtabsep[1]{\def\eq@argi{#1}\ifx\eq@argi\@empty
- \def\sq@tabsep{1.5pt}\else\def\sq@tabsep{#1}\fi}
-\sqtabsep{1.5pt}
-\def\sqTabPos#1{\def\sq@TabPos{[#1]}}\sqTabPos{}
-\def\answers@@sq@tabular#1{%
- \ifinner
- \ifx\itsExerParts\eq@YES\par\removelastskip
- \removelastparskip\vskip\aboveanswersSkip\fi
- \else\par\removelastskip\removelastparskip
- \vskip\aboveanswersSkip\fi
- \noindent\ifnum\exerwparts@cols>1\relax\parshape=0\fi
- \tabcolsep=0pt
- \eq@tmpdima=\linewidth
- \@tempcnta#1\relax
- \advance\@tempcnta-1\relax
- \multiply\@tempcnta by2
- \@tempdima\sq@tabsep\relax
- \multiply\@tempdima\@tempcnta
- \advance\eq@tmpdima-\@tempdima
- \divide\eq@tmpdima by#1
- \def\Ans{\Ans@tabular}%
- \tabcolsep\sq@tabsep\relax
- \expandafter\tabular\sq@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}}%
-\let\eq@save@doendpe\@doendpe
-\def\reset@doendpe#1{\global\eq@scratchtoks=\expandafter{#1}%
- \gdef\@doendpe{\par\@endpetrue\global\let\@doendpe\eq@save@doendpe
- \def\par{\@restorepar
- \expandafter\everypar
- \expandafter{\the\eq@scratchtoks}\par\@endpefalse}%
- \everypar{{\setbox\z@\lastbox}%
- \everypar{}\@endpefalse}\the\eq@scratchtoks
- }%
-}
-\newcommand\answersEndHook[1]{\def\eq@answersEndHook{#1}}
-\let\eq@answersEndHook\@empty
-\def\endanswers@sq{\endtabular\setcounter{quizno}{0}%
- \eq@answersEndHook\reset@doendpe{\the\everypar}%
- \ifinner\else%\par
- \removelastskip
- \vspace{\aboveanswersSkip}\@endpetrue\fi
-}
-\def\endmanswers@sq{\endtabular\setcounter{quizno}{0}%
- \eq@answersEndHook\reset@doendpe{\the\everypar}%
- \ifinner\else%\par
- \removelastskip
- \vspace{\aboveanswersSkip}\@endpetrue\fi
-}
-\def\popiiictm{\special{CTM: pop pop pop}}
-\def\aebChoiceAltFmt{\noexpand\ifaebshowgrayletters
- \Alph{quizno}\noexpand\else\linkContentFormat\noexpand\fi}
-\def\linkContentFormat{%
- \if\probstar*\Alph{quizno}\else\alph{quizno}\fi}
-\def\linkContentWrapper{(\hfil\linkContentFormat\hfil)}%
-\def\Ans@sq@l{%
- \leavevmode\if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\stepcounter{quizno}\else
- \refstepcounter{quizno}\fi}\fi\PBS\raggedright
- \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
- \eq@tmpdima=\wd\eq@tmpbox
- \def\link@@Content{\linkContentWrapper}%
- \hangindent=\eq@tmplength\hangafter=1\relax
- \Ans@sq@l@driver
-\eq@hspanner\ignorespaces}
-\let\Ans@ck@sq@l\Ans@sq@l
-\let\rbf@Opts\@empty
-\def\Ans@sq@f{%
- \if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
- {\ifwithsoldoc\stepcounter{quizno}\else
- \refstepcounter{quizno}\fi}\fi\PBS\raggedright
- \settowidth{\eq@tmplength}{\eq@lw@f}%
- \eq@tmpdima=\wd\eq@tmpbox%
- \hangindent=\eq@tmplength\hangafter=1\relax
- \insertGrayLetters % 6.3d
- \Ans@sq@f@driver
-\eq@hspanner\ignorespaces}
-\let\Ans@ck@sq@f\Ans@sq@f
-\newskip\aboveanswersSkip
-\setlength\aboveanswersSkip{3pt}
-\providecommand\graylettersColor{gray}
-\def\insertGrayLetters{\ifaebshowgrayletters
- \rlap{\makebox[\RadioFieldSize]%
- {\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi}
-\newcount\eq@tabColCnt
-\define@key{bchoice}{nCols}{\def\bChoiceNumCols{#1}}
-\@for\eqi:=1,2,3,4,5,6,7,8,9,10 \do{\edef\temp@expand@def{%
- \noexpand\define@key{bchoice}{\eqi}[\eqi]{%
- \noexpand\def\noexpand\bChoiceNumCols{\eqi}}%
- }\temp@expand@def
-}
-\def\bChoiceNumCols{\aeb@numCols}
-\define@key{bchoice}{random}[true]{%
- \csname if#1\endcsname\eq@randomizeChoicestrue
- \else\eq@randomizeChoicesfalse\fi
-}
-\define@key{bchoice}{label}[]{\xdef\bChoiceLabel{#1}}
-\def\bChoices{\@ifnextchar[{\@ansChoices}{\@ansChoices[\aeb@numCols]}}
-\def\@ansChoices[#1]%
-{%
- \global\let\@tempholdSaveAns\@empty %4/5
- \global\let\@tempholdSaveChoice\@empty %4/5
- \global\let\bChoiceLabel\@empty %4/5
- \setkeys{bchoice}{#1}%
- \global\eq@tabColCnt=0
- \ifnum\aeb@numCols=1 % list mode
- \def\eq@next{\@layoutListAns}\else % tabular mode
- \def\eq@next{\@layoutTabularAns{\bChoiceNumCols}}\fi
- \eq@next
-}
-\let\eChoices\relax
-\def\@layoutListAns{\@ifnextchar\Ans{\@getListAns}%
- {\@lookforendansChoices{\@layoutListAns}}%
-}
-\newcommand{\eq@saveAns}[2][]{%
- \let\eq@next\@@@SaveAnsGobbleAns
- \ifx\bChoiceLabel\@empty\else
- \def\eq@savedAnsOpt{#1}\def\eq@savedAnsZO{#2}%
- \if\eq@savedAnsZO1 \let\eq@next\@@@SaveAns\fi
- \fi\eq@next
-}
-\long\def\@@@SaveAns#1\eAns{% 4/5
- \g@addto@macro\@tempholdSaveAns{\\{\ignorespaces#1}}%
- \addtocounter{quizno}{1}%
- \edef\temp@expand{\noexpand\g@addto@macro\noexpand
- \@tempholdSaveChoice{%
- \noexpand\\{\ifx\sqstar\@empty\aebChoiceAltFmt\else
- \ifaebshowgrayletters\Alph{quizno}\else
- \linkContentFormat\fi\fi}}}\temp@expand
- \addtocounter{quizno}{-1}%
-}
-\newif\ifoxfordcomma \oxfordcommatrue
-\def\oxfordCommaOn{\oxfordcommatrue}
-\def\oxfordCommaOff{\oxfordcommafalse}
-\def\eq@insertComma{%
- \ifx\eq@comma\@empty
- \ifnum\@nameuse{NumAns\eq@namearg}>2\relax
- \def\eq@comma{,}\fi
- \else\ifx\eq@insertAnd\@empty\eq@comma\space
- \else\ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}%
- \ifoxfordcomma\eq@comma\fi\else\eq@comma\fi\space
- \fi
- \fi
-}
-\newcommand\eqAnd{and}\def\eq@insertAnd{%
- \ifnum\@nameuse{NumAns\eq@namearg}<2\relax\else
- \ifnum\@nameuse{NumAns\eq@namearg}>2\relax
- \else\leavevmode\space\fi\eqAnd\space\fi}
-\long\def\eq@displayAns#1{\advance\@tempcnta1\relax
- \eq@insertComma
- \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
-\def\eq@displayAlts#1{\advance\@tempcnta1
- \eq@insertComma
- \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi
- \savedAltFmt{#1}}
-\def\eq@displayAltsAns#1{\advance\@tempcnta1\relax
- \eq@insertComma
- \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
-\newcommand{\savedAltFmt}[1]{(#1)}
-\newcommand{\useSavedAns}{\bgroup\@ifstar{\useSavedAns@i}
- {\let\eq@insertAnd\@empty\useSavedAns@i}}
-\newcommand{\useSavedAns@i}[2][]{\@tempcnta=0\relax
- \def\eq@namearg{#2}\let\label\@gobble
- \def\eq@argi{#1}\ifx\eq@argi\@empty
- \let\eq@comma\@empty
- \let\\\eq@displayAns\@nameuse{SavedAns#2}\else
- \@nameuse{SavedAns#2-Idx#1}\fi
- \egroup
-}
-\newcommand{\useSavedAlts}{\bgroup\@ifstar{\useSavedAlts@i}
- {\let\eq@insertAnd\@empty\useSavedAlts@i}}
-\newcommand{\useSavedAlts@i}[2][]{\@tempcnta=0\relax
- \def\eq@namearg{#2}\@nameuse{caseFor#2}%
- \def\eq@argi{#1}\ifx\eq@argi\@empty
- \let\eq@comma\@empty
- \let\\\eq@displayAlts\@nameuse{SavedAlts#2}\else
- \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}\fi
- \egroup
-}
-\newcommand{\useSavedAltsAns}{\bgroup\@ifstar{\useSavedAltsAns@i}
- {\let\eq@insertAnd\@empty\useSavedAltsAns@i}}
-\newcommand{\useSavedAltsAns@i}[2][]{\@tempcnta=0\relax
- \def\eq@namearg{#2}\@nameuse{caseFor#2}\let\label\@gobble
- \def\eq@argi{#1}\ifx\eq@argi\@empty
- \let\eq@comma\@empty
- \let\\\eq@displayAltsAns\@nameuse{SavedAltsAns#2}\else
- \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}
- \@nameuse{SavedAns#2-Idx#1}\fi
- \egroup
-}
-\newcommand{\useSavedNumAns}[1]{\@nameuse{NumAns#1}}
-\long\def\@@@SaveAnsGobbleAns#1\eAns{} % 4/5
-\long\def\@getListAns\Ans#1\eAns{%\@@par %start new paragraph
- \eq@saveAns#1\eAns % 4/5
- \Ans#1\vspace{\@rowskip}%
- \@layoutListAns
-}
-\long\def\@lookforendansChoices#1{%
- \@ifnextchar\eChoices{\rowsep{\rowsep@default}%
- \expandafter\@findendans\@gobble}{\expandafter#1\@gobble}%
-}
-\def\@layoutTabularAns#1{%
- \let\eq@tabSep\@empty
- \xdef\numShortCols{#1}%
- \ifnum#1>\aeb@numCols \xdef\numShortCols{\aeb@numCols}\fi
- \@@layoutTabularAns
-}
-\def\@@layoutTabularAns{%
- \@ifnextchar\Ans{\@getTabAns}%
- {\@lookforendansChoices{\@@layoutTabularAns}}%
-}
-\def\rowsep#1{\gdef\@rowsep{[#1]}\gdef\@rowskip{#1}}%
-\rowsep{\rowsep@default}
-\def\rowsepDefault#1{\def\rowsep@default{#1}}
-\def\rowsep@default{0pt}
-\long\def\@getTabAns\Ans#1\eAns{%
- \eq@saveAns#1\eAns
- \global\advance\eq@tabColCnt1
- \let\@save@tabSep=\eq@tabSep
- \ifnum\eq@tabColCnt=\numShortCols
- \global\eq@tabColCnt=0
- \xdef\eq@tabSep{\noexpand\\\noalign{\kern\@rowskip\relax}}%
- \else
- \gdef\eq@tabSep{&}%
- \fi
- \@ifnextchar\eChoices{\@save@tabSep\Ans#1\rowsep{\rowsep@default}
- \expandafter\@findendans\@gobble}%
- {\@save@tabSep\Ans#1\@@layoutTabularAns}%
-}
-\def\@findendans{\@ifnextchar\end{% 4/5
- \ifx\bChoiceLabel\@empty\else
- \processLabeledAns\fi
- }{\expandafter\@findendans\@gobble}}%
-\def\defineEachAns#1{\advance\count0by1\relax
- \@temptokena={#1}\csarg\xdef
- {SavedAns\bChoiceLabel-Idx\the\count0}{\the\@temptokena}%
- \ifsolutionsonly\else
- {\let\\\relax\eq@IWDefs{\string
- \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\count0}%
- {\the\@temptokena}}}\fi
-}
-\def\defineEachChoice#1{\advance\count0by1\relax
- \@temptokena={#1}\csarg\xdef
- {SavedAlts\bChoiceLabel-Idx\the\count0}%
- {\the\@temptokena}\ifsolutionsonly\else
- {\let\\\relax\eq@IWDefs{\string
- \csarg\string\gdef{SavedAlts\bChoiceLabel-Idx\the\count0}%
- {\the\@temptokena}}}\fi
-}
-\def\processLabeledAns{%
- \bgroup
- \let\label\@gobble
-\if\aeb@FLOverride\eq@l
- \global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\else
- \ifaebshowgrayletters
- \global\@namedef{caseFor\bChoiceLabel}{\graylettersOn}\else
- \global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\fi
-\fi
- \toks@=\expandafter{\@tempholdSaveAns}\csarg
- \xdef{SavedAns\bChoiceLabel}{\the\toks@}%
- \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
- \csarg\string\gdef{SavedAns\bChoiceLabel}{\the\toks@}}}\fi
- \count0=0\relax\let\\\defineEachAns\the\toks@
- \xdef\@currNCntAns{\the\count0 }\csarg
- \xdef{NumAns\bChoiceLabel}{\@currNCntAns}%
- \ifsolutionsonly\else{\eq@IWDefs{\string
- \csarg\string\gdef{NumAns\bChoiceLabel}{\the\count0 }}}\fi
- \toks@=\expandafter{\@tempholdSaveChoice}\csarg
- \xdef{SavedAlts\bChoiceLabel}{\the\toks@}%
- \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
- \csarg\string\gdef{SavedAlts\bChoiceLabel}{\the\toks@}}}\fi
- \count0=0\relax\let\\\defineEachChoice\the\toks@
- \count0=1\relax\toks@={}%{\ignorespaces\@gobble}%
- \loop
- \edef\temp@exp{\the\toks@\noexpand\\{%
- \noexpand\useSavedAlts[\the\count0]{\bChoiceLabel}
- \noexpand\useSavedAns[\the\count0]{\bChoiceLabel}}}%
- \toks@=\expandafter{\temp@exp}%
- \ifnum\count0<\@currNCntAns
- \advance\count0by1
- \repeat
- \csarg\xdef{SavedAltsAns\bChoiceLabel}{\the\toks@}%
- \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
- \csarg\string\gdef{SavedAltsAns\bChoiceLabel}{\the\toks@}}}\fi
- \egroup
-}
-\def\graylettersOn{\aebshowgrayletterstrue}
-\def\graylettersOff{\aebshowgraylettersfalse}
-\def\aeb@exiii{\expandafter\expandafter\expandafter}
-\def\REF{\@ifstar{\let\isREFstar\eq@One\aeb@REFstar}
- {\let\isREFstar\eq@Zero\aeb@REF}}
-\def\aeb@REFstar#1{\@ifundefined{r@#1}{\hbox{\reset@font\bfseries ??}}
- {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}%
- \else\ref*{#1}\fi}%
-}
-\def\aeb@REF#1{\@ifundefined{r@#1}{\hbox{\reset@font\bfseries ??}}
- {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}%
- \else\ref{#1}\fi}%
-}
-\def\aeb@buildUpperCaseRef#1{%
- \xdef\tmp@expand{\aeb@exiii\@firstoftwo\csname r@#1\endcsname}%
- \xdef\tmp@expand{\uppercase{\tmp@expand}}\tmp@expand
-}
-\endinput
-%%
-%% End of file `eqexam.def'.
+%%
+%% This is file `eqexam.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `eqexam')
+%%
+\ProvidesFile{eqexam.def}
+ [2018/03/21 v8.2.2 %
+ Exerquiz support file for eqexam (dps)]
+\let\eq@YES=y \let\eq@NO=n
+\let\eq@One=1 \let\eq@Zero=0
+\def\eq@r{r}\let\eq@f=f \let\eq@l=l
+\newif\ifeq@noforms \eq@noformsfalse
+\newif\ifeq@noquizsolutions \eq@noquizsolutionsfalse
+\newif\ifnocorrections \nocorrectionsfalse
+\@ifundefined{ifeqe@flextended}{\newif\ifeqe@flextended
+ \eqe@flextendedfalse}{}
+\@ifundefined{ifcont@nnot}{\newif\ifcont@nnot \cont@nnotfalse}{}
+\@ifundefined{if@eqalignfilllinestoleft}{\newif\if@eqalignfilllinestoleft
+ \@eqalignfilllinestoleftfalse}{}
+\newif\ifkeepdeclaredvspacing \keepdeclaredvspacingfalse
+\newif\ifeq@nolink \eq@nolinkfalse
+\def\eq@ckglobalhide{\ifeq@globalshowsolutions\eq@hidesolutionfalse\fi}
+\def\hidesymbol{h}\def\Hidesymbol{H}
+\newif\iftherearesolutions \therearesolutionsfalse
+\newif\ifIsRespBox \global\IsRespBoxfalse
+\def\SolutionsAfter{\eq@solutionsaftertrue\eq@nolinktrue}
+\newif\ifcqSA\cqSAfalse
+\def\SolutionsAtEnd{\eq@solutionsafterfalse\eq@nolinkfalse
+ \displayworkareatrue\ifvspacewithsolns\eq@nosolutionsfalse\else
+ \eq@nosolutionstrue\fi\eq@proofingfalse\answerkeyfalse}
+\def\NoSpaceToWork{\let\eq@insertverticalspace\eq@NO}
+\def\SpaceToWork{\let\eq@insertverticalspace\eq@YES}
+\SpaceToWork
+\long\def\ifNoSolutions#1#2{%
+ \ifeq@nosolutions\expandafter#1\else
+ \expandafter#2\fi
+}
+\newif\ifeq@randomizeChoices \eq@randomizeChoicesfalse
+\newif\ifeq@randomizeallChoices \eq@randomizeallChoicesfalse
+\def\turnOnRandomize{\eq@randomizeallChoicestrue}
+\def\obeyLocalRandomize{\eq@randomizeallChoicesfalse}
+\let\saveRandomSeed\relax
+\let\inputRandomSeed\relax
+\newcommand{\exsolafter}{\eq@exsolafterDefault}
+\newcommand{\resetSolnAfterToDefault}{%
+ \def\exsolafter{\eq@exsolafterDefault}}
+\newcommand{\exsolafterDefault}[1]{\def\eq@exsolafterDefault{#1}%
+ \def\exSolafterDefault{#1}\resetSolnAfterToDefault}
+\exsolafterDefault{\textit{Solution}:}
+\newcommand{\renameSolnAfterTo}[1]{\def\exsolafter{#1}}
+\newcommand{\adjDisplayBelow}{\vskip-\lastskip\vskip-\baselineskip}
+\newcommand{\adjDisplayBelowPlus}{\adjDisplayBelow\recoverDisplayBelow}
+\def\recoverDisplayBelow{\vskip\belowdisplayskip}
+\newcommand\setDefShortQuizLabelName[1]%
+ {\def\eq@defaultShortQuizLabelName{#1}}
+\setDefShortQuizLabelName{Quiz}
+\ifsolutionsonly
+\InputIfFileExists{\jobname_xdefs.cut}{%
+ \typeout{^^JExerquiz|Eqexam: Reading \jobname_xdefs.cut^^J}}
+ {\PackageWarningNoLine{exerquiz|eqexam}{%
+ \jobname_xdefs.cut not found.\MessageBreak
+ Recompile file under the vspacewithsolns\MessageBreak
+ option, then compile with the solutionsonly\MessageBreak
+ option}}
+\else
+\newwrite\ex@solns \immediate\openout \ex@solns \jobname.sol
+\newcommand{\writeToExSolns}[1]{%
+ \set@display@protect
+ \immediate\write\ex@solns{#1}%
+ \set@typeset@protect
+}
+\newwrite\eq@xrefdefns \immediate\openout\eq@xrefdefns\jobname_xdefs.cut
+\fi
+\newwrite\quiz@solns \immediate\openout \quiz@solns \jobname.qsl
+\newcommand{\writeToQzSolns}[1]{%
+ \set@display@protect
+ \immediate\write\quiz@solns{#1}%
+ \set@typeset@protect
+}
+\def\eq@IWAuxOut#1{\immediate\write\@auxout{#1}}
+\def\eq@IWDefs#1{\immediate\write\eq@xrefdefns{#1}}
+\newcounter{eqexno} \setcounter{eqexno}{0}
+\newcounter{@exno} \setcounter{@exno}{0} % running exno
+\newcounter{quizno} \setcounter{quizno}{0}
+\renewcommand\thequizno{\alph{quizno}}
+\newcounter{eqpointvalue} \setcounter{eqpointvalue}{0}
+\newlength\eq@tmplength
+\newlength\eqtmplength
+\newcounter{questionno}
+\newcounter{eqquestionnoi}
+\newcounter{eqquestionnoii}
+\newcounter{eqquestionnoiii}
+\newcount\@eqquestiondepth \@eqquestiondepth=0
+\newcounter{partno}
+\newif\ifuseNumForParts\useNumForPartsfalse
+\def\alphaParts{\def\partnoFmt{\alph}\useNumForPartsfalse}\alphaParts
+\def\numberParts{\def\partnoFmt{\arabic}\useNumForPartstrue}
+\renewcommand\thepartno{\partnoFmt{partno}}
+\newtoks\eq@scratchtoks
+\def\verbatimwrite{\@bsphack
+ \let\do\@makeother\dospecials
+ \catcode`\^^M\active \catcode`\^^I=12
+ \def\verbatim@processline{%
+ \immediate\write\verbatim@out
+ {\the\verbatim@line}}%
+ \verbatim@start}
+\def\endverbatimwrite{\@esphack}
+\providecommand\PBS[1]{\let\temp=\\#1\let\\=\temp}
+\newcommand{\belowexskip}[1]{\setlength{\eq@tmplength}{#1}%
+ \edef\eq@exerskip{\noexpand\removelastparskip
+ \noexpand\vskip\the\eq@tmplength\relax\kern0pt}}
+\let\eqexerskip\belowexskip
+\belowexskip{\medskipamount}
+\newcommand{\aboveexskip}[1]{\setlength{\eq@tmplength}{#1}%
+ \edef\eq@priorexskip{\noexpand\vskip\the\eq@tmplength\relax
+ \kern0pt}}
+\let\priorexskip\aboveexskip
+\aboveexskip{\medskipamount}
+\let\eq@postexerciseHook\relax
+\newcommand\belowexsolnskip{\protect\medskip}
+\def\removelastparskip{\ifdim\parskip>0pt\vskip-\parskip\fi}
+\let\marginparpriorhook\@empty % used to material before the exercise
+\let\marginparafterhook\@empty % used to material after the exercise
+\let\afterlabelhskip\space
+\let\exersolnheadhook\@empty
+\let\exer@solnheadhook\@empty
+\newcommand{\eqexheader}
+{%
+ \mbox{\color{\@nolinkcolor}\if\exerstar*\exlabelformatwp\else
+ \exlabelformat\fi}%
+}
+\def\eqexheader@wrapper{\hypertarget{qex.\the@exno}{\eqexheader}}
+\newcommand{\partsformat}[1]{\def\eq@partsformat{#1}}
+\partsformat{(\hfil\thepartno\hfil)}
+\newcommand{\defaultpartsformat}{%
+ \partsformat{(\hfil\thepartno\hfil)}}
+\let\exlisttabheaderpriorhook\@empty
+\let\exlisttabheaderafterhook\@empty
+\newcommand{\eqexlisttabheader}
+{%
+ \exlisttabheaderpriorhook
+ \color{\@nolinkcolor}\eq@partsformat
+}
+\newcount\cq@Cnt
+\def\cq@CutName{cq-\the\cq@Cnt.cut}
+\let\cq@star\eq@NO
+\newif\ifcqqs \cqqstrue
+\newif\ifcqIsActive \cqIsActivefalse
+\def\cqQS{\@ifstar{\cqQSV}{\cqQSA}}
+\def\cqQSA#1#2{\ifcqqs#1\else#2\fi}
+\@ifpackageloaded{web}{\@ifundefined{IF@AorBswitch}{%
+ \PackageWarningNoLine{A version of the web package
+ dated\MessageBreak 2016/11/03 or later is required
+ for \string\cqQS}}}{}%
+\@ifundefined{webtempboxi}{\newbox\webtempboxi
+ \newbox\webtempboxii}{}
+\providecommand\SHOWTEMPBOXi{\unhbox\webtempboxi}
+\providecommand\TRUEACTIONi{\aftergroup\SETTEMPBOXii}
+\providecommand\TRUEACTIONia{\aftergroup\SHOWTEMPBOXi}
+\providecommand\FALSEACTIONii{\aftergroup\SETTEMPBOXi}
+\providecommand\FALSEACTIONiia{\aftergroup\SHOWTEMPBOXi}
+\providecommand\SETTEMPBOXi{\IF@AorBswitch\else
+ \afterassignment\TRUEACTIONia\fi
+ \setbox\webtempboxi=\hbox}
+\providecommand\SETTEMPBOXii{\IF@AorBswitch
+ \afterassignment\FALSEACTIONiia\fi
+ \setbox\webtempboxii=\hbox}
+\def\cqQSV{\let\IF@AorBswitch\ifcqqs
+ \IF@AorBswitch
+ \def\eq@next{\afterassignment\TRUEACTIONi\SETTEMPBOXi}\else
+ \def\eq@next{\afterassignment\FALSEACTIONii\SETTEMPBOXii}\fi
+ \eq@next}
+\def\eq@turnMessageOff{\let\save@message\message
+ \let\message\@gobble}
+\def\eq@turnMessageOn{\let\message\save@message}
+\def\eqCQDeclarations{\cqqsfalse\eq@turnMessageOff
+ \includecomment{sPage}\excludecomment{qPage}%
+ \eq@turnMessageOn}
+\def\eqTopOfSolnPage{\cqSAfalse
+ \eqCQDeclarations}
+\eq@turnMessageOff
+\includecomment{qPage}\excludecomment{sPage}
+\eq@turnMessageOn
+\newenvironment{cq@CQ}
+{%
+ \global\cqIsActivetrue
+ \global\advance\cq@Cnt1\relax
+ \immediate\openout\CommentStream=\cq@CutName
+ \let\verbatim@out\CommentStream
+ \verbatimwrite
+}{%
+ \endverbatimwrite
+ \immediate\closeout\CommentStream
+ \ifx\cq@star\eq@YES
+ \xdef\cq@INPUTCUT{\noexpand\cqqstrue
+ \noexpand\input{\cq@CutName}\noexpand
+ \def@QuesToSoln}\else
+ \xdef\cq@INPUTCUT{\noexpand\cqqstrue
+ \noexpand\input{\cq@CutName}\noexpand
+ \p@ssQuesToSoln}\fi
+ \aftergroup\cq@INPUTCUT
+}
+\newenvironment{cqs@CQ}{\let\cq@star\eq@YES\cq@CQ}{\endcq@CQ}
+\def\declCQQuesStr#1{\def\cqQStr{#1}}
+\declCQQuesStr{Question}
+\def\declCQSolStr#1{\def\cqSStr{#1}}
+\declCQSolStr{Solution}
+\newcommand\declCQPre[1]{\def\cq@Pre{#1}}
+\declCQPre{\emph{\cqQStr}:\space}
+\newcommand\declCQPost[1]{\def\cq@Post{#1}}
+\declCQPost{\par\medskip\noindent\emph{\cqSStr}:\space\ignorespaces}
+\def\cqFmtPasteQues#1{\cq@Pre\input{#1}\cq@Post}
+\def\p@ssQuesToSoln{\ifeq@hidesolution\else
+ \global\terminexchangedtrue % dps cq
+ \writeToExSolns{\protect
+ \decleqterminex{\protect\cqFmtPasteQues{\cq@CutName}}}\fi}
+\def\declCopyQues#1{\def\cqCopiedQues{#1}}
+\def\def@QuesToSoln{\restoreNormalSolns
+ \global\terminexchangedfalse % dps cq
+ \ifeq@hidesolution\else\writeToExSolns{\protect
+ \declCopyQues{\protect\input{\cq@CutName}}}\fi}
+\newcommand\restoreNormalSolns{%
+ \writeToExSolns{\protect\decleqterminex{\protect\eqterminexDEF}}}
+\newcommand{\eq@CommonCmd}[1]{\def\eq@@CommonCmd{#1}#1}
+\let\eq@@CommonCmd\@empty
+\newcommand\gExCommonCmd[1]{\gdef\gEx@CommonCmd{\eq@CommonCmd{#1}}}
+\let\gEx@CommonCmd\@empty
+\let\endexerhook\@empty
+\newenvironment{exercise}
+{%
+ \let\cq\cq@CQ\let\endcq\endcq@CQ
+ \csarg\let{cq*}\cqs@CQ
+ \csarg\let{endcq*}\endcqs@CQ
+ \par\removelastskip\eq@priorexskip\noindent
+ \let\eqCommonCmd\eq@CommonCmd
+ \def\eq@argi{eqexno}%% use eqexno counter
+ \if\eq@exerstarEnv*\def\exerstar{*}\else\def\exerstar{x}\fi
+ \def\currhideopt{x}%
+ \@ifnextchar[{\exercise@}%
+ {\if\exerstar*\def\eq@next{\@exercise}\else
+ \def\eq@next{\exercise@@}\fi\eq@next}%
+}{\eq@postexerciseHook\endexerhook\par
+ \global\eq@exerciseheadingtrue\removelastskip\eq@exerskip}
+\def\exercise@[#1]{\edef\eq@arg{#1}%
+ \if\eq@arg h\def\currhideopt{h}%
+ \eq@hidesolutiontrue\eq@nolinktrue%
+ \ifeq@globalshowsolutions
+ \eq@hidesolutionfalse\eq@nolinkfalse\fi
+ \def\eq@next{\@exercise}% h, no *, no counter
+ \else
+ \if\eq@arg H%
+ \edef\currhideopt{\Hidesymbol}%
+ \eq@hidesolutiontrue\eq@nolinktrue%
+ \ifeq@globalshowsolutions
+ \eq@hidesolutionfalse\eq@nolinkfalse
+ \fi
+ \def\eq@next{\@exercise}% H, no *, no counter
+ \else
+ \def\currhideopt{x}%
+ \ifx\eq@arg\@empty\else\def\eq@argi{#1}\fi
+ \if\exerstar*\def\eq@next{\@exercise}\else
+ \def\eq@next{\exercise@@}\fi
+ \fi
+ \fi
+\eq@next}
+\def\exercise@@{\@ifstar{\def\exerstar{*}\@exercise}{\exercise@@@}}
+\def\exercise@@@{\@ifnextchar[{\exercise@@@@}{\@exercise}}
+\def\exercise@@@@[#1]{\edef\eq@arg{#1}%
+ \if\eq@arg h\def\currhideopt{h}%
+ \eq@hidesolutiontrue\eq@nolinktrue
+ \ifeq@globalshowsolutions
+ \eq@hidesolutionfalse\eq@nolinkfalse\fi
+ \def\eq@next{\@exercise}% h, no *, no counter
+ \else
+ \if\eq@arg H\edef\currhideopt{\Hidesymbol}%
+ \eq@hidesolutiontrue\eq@nolinktrue%
+ \def\eq@next{\@exercise}% h, no *, no counter
+ \else
+ \def\currhideopt{x}%
+ \PackageWarning{exerquiz}{The option #1 is not recognized}
+ \let\eq@next\relax
+ \fi
+ \fi
+\eq@next}
+\newif\ifeq@exerciseheading \eq@exerciseheadingtrue
+\let\prior@exerSolnHeaderHook\@empty
+\newcommand\exerSolnHeader[3]{%
+ \prior@exerSolnHeaderHook
+ \ifeqforpaper\else\webnewpage\fi\markright{#1}%\par\noindent%
+ #3%
+ \solnhspace
+}
+\let\solnItemMngt\relax
+\let\eqEXt\@gobbletwo
+\let\endeqEXt\relax
+\let\eqExtArg\@empty
+\let\eqFilterArg\@empty
+\let\eqExerSolnHeader\@empty
+\let\solutionparshape\@empty
+\def\eq@pslnaindnt{0pt}
+\let\eq@setPrbSolnAftrIndnt\relax
+\newcommand{\setPrbSolnAftrIndent}[1]{\ifdim#1=0pt
+ \def\eq@pslnaindnt{0pt}\let\eq@setPrbSolnAftrIndnt\relax\else
+ \edef\eq@pslnaindnt{#1}\edef\eq@setPrbSolnAftrIndnt{%
+ \expandafter\noexpand\expandafter\parindent#1\noexpand\relax}\fi
+}
+\newif\if@restorejustify \@restorejustifyfalse
+\newcommand\restoreJustifyOn{\@restorejustifytrue}
+\newcommand\restoreJustifyOff{\@restorejustifyfalse}
+\def\restorejustify{\if@restorejustify
+ \@rightskip\z@skip \rightskip\@rightskip
+ \leftskip\z@skip \let\\\@normalcr\fi}
+\def\@exercise{%
+ \global\let\solutionparshape\@empty
+ \let\verbatim@out=\ex@solns
+ \if\eq@argi0\else\refstepcounter{\eq@argi}\fi\stepcounter{@exno}%
+ \if\exerstar*% if exercise with parts
+ \eq@nolinktrue
+ \else
+ \if\currhideopt H%
+ \else
+ \ifeq@solutionsafter
+ \eq@nolinktrue % no link to solution
+ \else
+ \eq@ckglobalhide %
+ \ifeq@hidesolution\else
+ \global\let\eqExerSolnHeader\eq@@writeexheader
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifvmode\ifdim\lastskip>\z@
+ \vskip-\lastskip
+ \fi\fi
+ \if\exerstar*%
+ \let\solution\solnexer@woparts
+ \let\endsolution\endsolnexer@woparts
+ \let\parts\exercise@parts
+ \let\endparts\endexercise@parts
+ \else
+ \let\solution\solnexer@woparts
+ \let\endsolution\endsolnexer@woparts
+ \let\parts\relax
+ \let\endparts\relax
+ \if\Hidesymbol h\eq@nolinkfalse\ifeq@solutionsafter
+ \eq@nolinktrue\fi\fi
+ \fi
+ \eq@initializeContAnnot
+ \ifeq@exerciseheading
+ \prior@questionsHook\marginparpriorhook\noindent\eqexheader@wrapper
+ \afterlabelhskip\marginparafterhook\gEx@CommonCmd
+ \eq@setPrbSolnAftrIndnt\ignorespaces\fi
+}
+\newif\ifterminexchanged \terminexchangedfalse % dps cq
+\newcommand\decleqterminex[1]{\def\eqterminex{#1}}
+\def\eqterminexDEF{\relax\ignorespaces}
+\decleqterminex{\eqterminexDEF}
+\newif\ifmakeExSlLocal \makeExSlLocalfalse
+\def\makeExSolnsLocalOn{\makeExSlLocaltrue}
+\def\makeExSolnsLocalOff{\makeExSlLocalfalse}
+\def\eqExerSolnHeaderSngl{%
+ \ifmakeExSlLocal\protect\begingroup^^J\fi
+ \protect\eqEXt{\eqExtArg}{\eqFilterArg}\protect
+ \solnItemMngt\protect\exerSolnHeader{\exsecrunhead}{ex.\the@exno}%
+ {\exsllabelformat}\exer@solnheadhook
+ \exersolnheadhook\protect\eqterminex
+}
+\def\eq@@writeexheader{\set@display@protect
+ \immediate\write\verbatim@out{\eqExerSolnHeaderSngl}%
+ \set@typeset@protect
+}
+\def\eqExerSolnHeaderList{%
+ \ifmakeExSlLocal\protect\begingroup^^J\fi
+ \protect\eqEXt{\eqExtArg}{\eqFilterArg}\protect
+ \solnItemMngt\protect\exerSolnHeader{\exsecrunhead}%
+ {ex.\the@exno\thepartno}{\exsllabelformatwp}%
+ \exer@solnheadhook\exersolnheadhook\protect\eqterminex
+}
+\def\eq@@writeexheaderlist{\set@display@protect
+ \immediate\write\verbatim@out{\eqExerSolnHeaderList}%
+ \set@typeset@protect
+}
+\long\def\setsolnspace#1{\def\newsolnspace{#1}%
+ \let\solnspace\newsolnspace}
+\newif\ifeq@ckSolnVspace \eq@ckSolnVspacetrue
+\def\ckSolnOpt{\global\eq@ckSolnVspacetrue}
+\def\noSolnOpt{\global\eq@ckSolnVspacefalse}
+\let\solnhspace\space
+\let\solnspace\space
+\let\exsolnonceonlytophook\relax
+\def\solnexer@woparts{%
+ \ifanswerkey\ifeqe@flextended\ifcont@nnot
+ \ifx\solutionparshape\@empty\else % dpsj8
+ \pushEnvir
+ \everypar{}\if@eqalignfilllinestoleft\else
+ \parshape=1 \leadinIndent \linewidth\fi
+ \popEnvir
+ \fi\fi\fi\fi\def\bLeaveVspace{x}% = no vertical space added
+ \exsolnonceonlytophook % dps27
+ \global\let\exsolnonceonlytophook\relax
+ \@ifundefined{KV@eqefillLines@bgonly}{}
+ {\ifKV@eqefillLines@bgonly\ifvmode\else
+ \par\leavevmode\strut\fi\fi
+ \ifKV@eqefillLines@outlineonly\leavevmode\strut\fi}%
+ \ifeq@ckSolnVspace
+ \def\eq@next{\@ifnextchar[{\solnexer@@woparts}%]
+ {\solnexer@@woparts[\null]}}\else
+ \def\eq@next{\solnexer@@woparts[\null]}\fi
+ \eq@next
+}
+\let\eqPriorVspace\@gobble
+\newif\if@eqlinedfiller \@eqlinedfillerfalse
+\newcommand{\vspaceFiller}[1]{\vfill}
+\newcommand{\vspaceFillerDefault}[1]{\vfill}
+\def\eqWriteLine{\hfill}
+\def\eq@linesXPgs{%
+ \begingroup\offinterlineskip\parskip0pt
+ \@tempcnta=0
+ \@whilenum\@tempcnta<\soln@keys@nLines\relax\do
+ {\vskip0pt\penalty-50\vglue\wlVspace\eqWriteLine
+ \advance\@tempcnta1\relax}\par\endgroup
+}
+\let\leavevspace\relax % dpsj5
+\newcommand{\vspaceFmt}[1]{%
+ \ifx\solutionparshape\@empty\else
+ \advance\linewidth-\leadinIndentPrtSep\fi
+ \ifdim\sameVspace>0pt
+ \let\bLeaveVspace\@empty
+ \def\leavevspace{%
+ \ifx\eq@insertverticalspace\eq@YES\par\eq@quessolskip
+ \eqPriorVspace{#1}{\nobreak\noindent
+ \if@eqlinedfiller
+ \ifx\soln@keys@nLines\@empty
+ \def\eq@lines@next{\vspaceFiller{#1}}\else
+ \def\eq@lines@next{\eq@linesXPgs}\fi
+ \else
+ \def\eq@lines@next{\parbox[b][#1][t]{\linewidth}
+ {\vspaceFiller{#1}}}%
+ \fi\eq@lines@next}%
+ \fi
+ }\expandafter\leavevspace % dpsj6
+ \fi
+}
+\define@key{soln@keys}{nLines}[]{\def\soln@keys@nLines{#1}}
+\let\soln@keys@nLines\@empty
+\def\eqKV@errx#1{\xdef\XKV@rm{\@tempa}}
+\def\eqSolnForEqexam#1{%
+ \let\soln@keys@nLines\@empty
+ \setkeys*{soln@keys}{#1}%
+ \ifx\soln@keys@nLines\@empty
+ \ifx\minVspacet@bs\@empty\xdef\sameVspace{\XKV@rm}\else
+ \xdef\sameVspace{\minVspacet@bs}\fi
+ \else
+ \@tempdima\wlVspace
+ \@tempdima=\soln@keys@nLines\@tempdima
+ \xdef\sameVspace{\the\@tempdima}%
+ \ifx\XKV@rm\@empty\else
+ \if@equsedim\let\soln@keys@nLines\@empty
+ \xdef\sameVspace{\XKV@rm}\fi
+ \fi
+ \fi
+ \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi
+}
+\def\solnexer@@woparts[#1]{%
+ \ifcqIsActive\else\ifterminexchanged
+ \restoreNormalSolns\fi\fi % dps cq
+ \global\cqIsActivefalse
+ \def\eq@argi{#1}\def\eq@null{\null}%
+ \ifx\eq@argi\@empty\gdef\sameVspace{0pt}\else
+ \ifx\eq@argi\eq@null\gdef\sameVspace{0pt}\else
+ \@ifundefined{PointsOnLeft}{%
+ \let\eqKV@errx@SAVE\KV@errx
+ \let\KV@errx\eqKV@errx\let\XKV@rm\@empty
+ \edef\temp@exp{\noexpand\setkeys*{soln@keys}{#1}}\temp@exp
+ \let\KV@errx\eqKV@errx@SAVE
+ \ifx\soln@keys@nLines\@empty\else
+ \PackageInfo{exerquiz}{%
+ nLines key detected in solution environment,\MessageBreak
+ is not not recognized without eqexam,\MessageBreak
+ will remove it}%
+ \let\soln@keys@nLines\@empty\fi
+ \xdef\sameVspace{\XKV@rm}%
+ }{\eqSolnForEqexam{#1}}%
+ \fi\fi
+ \solnexer@@@woparts
+}
+\def\solnsafterSkip#1{\setlength{\@tempdima}{#1}%
+ \edef\solnsafterSkipAmt{\the\@tempdima}%
+ \def\solutionsafterSkip{\vskip\solnsafterSkipAmt\relax}}
+\solnsafterSkip{\smallskipamount}
+\def\@solnafterSkipOnce#1{\setlength{\@tempdima}{#1}%
+ \xdef\@solnafterSkipOnceAmt{\the\@tempdima}}%
+\def\@@solnafterSkipOnce{\vskip\@solnafterSkipOnceAmt\relax %dpsj3
+ \gdef\@solnafterSkipOnceAmt{0pt}}
+\def\@solnafterSkipOnceAmt{0pt}
+\def\quessolSkip#1{\setlength{\@tempdima}{#1}%
+ \edef\eq@quessolskip{\noexpand\vskip\the\@tempdima\relax}}
+\def\eq@quessolskip{\vskip\smallskipamount}
+\def\eqe@debugVertSkip#1{}
+\def\eqe@showEndHere#1{#1}
+\def\eqe@setStartSolns{%
+ \xdef\eq@startSoln{\the\pagetotal}%
+ \eqe@debugVertSkip{\marginpar{\smash{b[\sameVspace]}}}%
+}
+\let\eqSavedComment\comment
+\let\eqSavedEndCommet\endcomment
+\def\setTabulrSolnEnv{%
+ \@ifundefined{@listii@SAVE}{\global\let\@listii@SAVE\@listii}{}%
+ \expandafter\def\expandafter\@listii\expandafter{\@listii@SAVE
+ \leftmargin\leftmarginii \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep}%
+ \def\everyparShape{\everypar{\parshape \@ne 0pt \linewidth}}%
+ \reset@doendpe{\parshape \@ne 0pt \linewidth}%
+ \parshape \@ne 0pt \linewidth
+ \everyparShape
+}
+\newif\ifthereissolution
+\let\priorexsolafterList\@empty
+\let\priorexsolafterTab\@empty
+\let\priorexsolafterSngl\@empty
+\def\eq@Hid{H}\def\eq@hid{h}
+\def\solutionafterExCmds#1{\def\@rgi{#1}\ifx\@rgi\@empty
+ \let\eqSolnExCmds\relax\else
+ \def\eqSolnExCmds{#1}\fi}
+\let\eqSolnExCmds\relax
+\def\eq@b@ddCodeSpecialDef#1{#1}% dpsj4
+\let\eq@b@ddCodeSpecial\eq@b@ddCodeSpecialDef % dpsj4
+\def\solnexer@@@woparts{\ifeq@solutionsafter\else
+ \expandafter\begingroup\fi %dpsj10
+ \global\thereissolutiontrue
+ \global\let\procsoln\relax % dpsj6
+ \global\let\endprocsoln\relax % dpsj6
+ \def\exerwparts@cols{0}%
+ \let\verbatim@out\ex@solns
+ \if\currhideopt\eq@Hid
+ \let\minVspacet@bs\@empty
+ \let\procsoln\eqSavedComment
+ \let\endprocsoln\eqSavedEndCommet
+ \def\eq@next{\procsoln}%
+ \else
+ \eq@ckglobalhide
+ \ifeq@hidesolution
+ \let\procsoln\eqSavedComment
+ \let\endprocsoln\eqSavedEndCommet
+ \else
+ \ifeq@solutionsafter\else
+ \ifx\eq@@CommonCmd\@empty\else
+ \set@display@protect
+ \immediate\write\verbatim@out{\eq@@CommonCmd}%
+ \set@typeset@protect
+ \fi
+ \fi
+ \let\procsoln\verbatimwrite
+ \let\endprocsoln\endverbatimwrite
+ \fi
+ \def\eq@next{%
+ \ifeq@solutionsafter
+ \let\procsoln\relax % dpsj6
+ \let\endprocsoln\relax
+ \removelastskip\removelastparskip
+ \cqSAtrue\eqCQDeclarations
+ \declCopyQues{\input{\cq@CutName}}%
+ \ifx\exsolafter\@empty
+ \ifdim\sameVspace=0pt\eqe@setStartSolns
+ \else
+ \solutionsafterSkip
+ \@@solnafterSkipOnce % dpsj3
+ \eqe@setStartSolns
+ \fi
+ \else\par\kern0pt
+ \solutionsafterSkip
+ \@@solnafterSkipOnce % dpsj3
+ \noindent\strut\eqe@setStartSolns
+ \fi
+ \parskip\eqeques@parsep
+ \ifx\endparts\endexercise@parts@tabular
+ \eq@setPrbSolnAftrIndnt
+ \restorejustify
+ \fi
+ \ifx\endparts\endexercise@parts@tabular\expandafter
+ \priorexsolafterTab\else
+ \ifx\endparts\endexercise@parts@list\expandafter
+ \priorexsolafterList\else\expandafter
+ \priorexsolafterSngl\fi\fi
+ \exsolafter\space\ignorespaces
+ \solutionparshape
+ \else
+ \eqExerSolnHeader
+ \global\let\eqExerSolnHeader\@empty
+ \global\therearesolutionstrue\expandafter\procsoln
+ \fi
+ }%
+ \fi
+ \eq@b@ddCodeSpecial{\eq@next}%
+}% dpsj4
+\let\endsolnexerhook\@empty
+\let\pkg@endsolnexerhook\@empty
+\let\endsolnexerhookaux\@empty
+\def\eq@fititin#1{\noindent\unskip\nobreak\hfill\penalty100
+ \hskip1em\hbox{}\nobreak\hfill#1}%
+\let\eqfititin\eq@fititin
+\newcommand\eqExerSolnTrailer{%
+ \protect\ReturnTo{page.\the\c@page}%
+ {\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else
+ \exrtnlabelformat\fi}}%
+ \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi^^J%
+ \ifmakeExSlLocal\protect\endgroup^^J\fi
+}
+\let\eq@e@ddCodeSpecialDef\relax % dpsj4
+\let\eq@e@ddCodeSpecial\eq@e@ddCodeSpecialDef % dpsj6
+\let\kdvsp@Restore\relax % dpsj20
+\def\endsolnexer@woparts{\endprocsoln\eq@e@ddCodeSpecial
+ \pkg@endsolnexerhook % djsj8 moved from the end of the macro
+ \ifeq@solutionsafter\else
+ \expandafter\endgroup\fi % from \begingroup at \solnexer@@@woparts
+ \global\let\exsolnonceonlytophook\relax
+ \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi % dpsj5
+ \ifvspacewithsolns\vspaceFmt{\sameVspace}\else
+ \ifeq@nosolutions\ifeq@solutionsafter\else
+ \vspaceFmt{\sameVspace}\fi\fi\fi
+ \if\currhideopt H%
+ \ifkeepdeclaredvspacing\vskip\sameVspace\fi
+ \else
+ \ifeq@solutionsafter
+ \ifx\isitleadin\eq@YES\parshape=0 \fi % dpsj9
+ \if\exerstar*%
+ \eq@fititin{\mbox{\exrtnlabelformatwp}}\else
+ \eq@fititin{\mbox{\exrtnlabelformat}}\fi
+ \ifx\istabularexer\eq@YES\unskip\kern0pt\else\par\fi % dpsj6
+ \ifx\minVspacet@bs\@empty
+ \ifkeepdeclaredvspacing
+ \@tempdima\pagetotal
+ \advance\@tempdima-\eq@startSoln
+ \@tempdimb\sameVspace\relax
+ \ifdim\@tempdimb>1sp\relax
+ \advance\@tempdimb-\@tempdima
+ \ifdim\@tempdimb>0pt\vglue\@tempdimb\kern0pt
+ \let\eqe@showEndHere\@gobble
+ \edef\tmp@exp{\noexpand\marginpar{%
+ \noexpand\smash{e: adj \the\@tempdimb}}}%
+ \eqe@debugVertSkip{\tmp@exp}%
+ \fi
+ \fi
+ \fi
+ \eqe@showEndHere{\eqe@debugVertSkip{\marginpar{\smash{e}}}}%
+ \fi
+ \else
+ \eq@ckglobalhide
+ \ifeq@hidesolution\else
+ \endsolnexerhookaux
+ \let\verbatim@out\ex@solns
+ \set@display@protect
+ \immediate\write\verbatim@out{\eqExerSolnTrailer}%
+ \set@typeset@protect
+ \fi
+ \fi
+ \fi
+ \kdvsp@Restore % dpsj20
+ \endsolnexerhook\penalty0\relax}
+\let\eq@exerstarEnv\relax
+\newenvironment{exercise*}{\def\eq@exerstarEnv{*}\exercise}
+{\endexercise}
+\def\exerwparts@cols{0}
+\let\topofpartshook\relax
+\let\@listiiredefined\eq@NO
+\let\itsExerParts\eq@NO
+\newif\if@tableadinitem\@tableadinitemfalse
+\newcommand{\tableadin@external}{\PackageError{exerquiz/eqexam}
+ {The \string\tableadin\space command is designed\MessageBreak
+ for the problem* environment of eqexam}{Use \string\tableadin\space
+ in the problem* environment of eqexam.}%
+}
+\let\tableadin\tableadin@external
+\newcommand{\eq@tableadinparts}{\item\relax
+ \PackageError{exerquiz/eqexam}{The \string\tableadin\space
+ command is not allowed in the\MessageBreak
+ parts environment}{Use \string\tableadin\space
+ in the problem* environment of eqexam.}%
+}
+\let\istabularexer\eq@NO
+\def\exercise@parts{\let\rlspar\relax
+ \ifx\solutionparshape\@empty
+ \let\isitleadin\eq@NO
+ \if@tableadinitem\let\rlspar\@gobbletwo\fi
+ \else\let\isitleadin\eq@YES\fi
+ \rlspar\removelastskip\par
+ \if\isitleadin\eq@YES
+ \def\eqparts@topsep{0pt}%
+ \vskip\eqparts@itemsep\relax\fi
+ \topofpartshook
+ \let\itsExerParts\eq@YES
+ \global\let\@listiiredefined\eq@NO
+ \def\exerwparts@cols{0}\@ifnextchar[%
+ {%
+ \if@tableadinitem\else\removelastparskip\fi
+ \let\endparts\endexercise@parts@tabular\exercise@parts@tabular@}%
+ {\let\endparts\endexercise@parts@list\exercise@parts@list}}
+\def\eq@extralabelsep{0pt}
+\newcommand{\setPartsWidth}[1]{\def\parts@indent{\normalfont#1}%
+ \bgroup\settowidth{\eq@tmpdima}{\parts@indent}%
+ \xdef\widthOfParts{\the\eq@tmpdima}\egroup}
+\setPartsWidth{(d)}
+\def\eqe@prtsepPrb{\ }
+\providecommand{\prbPrtsep}[1]{\def\eqe@prtsepPrb{#1}}
+\providecommand{\exPrtsep}[1]{\def\eqe@prtsepPrb{#1}}
+\providecommand{\eqequesparsep}[1]{\def\eqeques@parsep{#1}}
+\eqequesparsep{0pt}
+\let\prior@parts@hook\@empty
+\let\post@parts@hook\@empty
+\let\abovepartshook\@empty
+\let\belowpartshook\@empty
+\let\eqp@rtc@lcm@rk\relax
+\let\eq@insertContAnnot\relax
+\def\eq@item@common{\eq@insertContAnnot\eqp@rtc@lcm@rk
+ \def\currhideopt{x}\eq@hidesolutionfalse\eq@nolinkfalse
+ \@ifnextchar[{\@ckhide}{\eq@item}}
+\newcommand{\partsitemsep}[1]{{%
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@itemsep{\the\@tempdima}}}
+\let\eqpartsitemsep\partsitemsep
+\def\eqparts@itemsep{0pt}
+\newcommand\partsparsep[1]{{%
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@parsep{\the\@tempdima}}}
+\def\eqparts@parsep{0pt}
+\newcommand\partstopsep[1]{{%
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@topsep{\the\@tempdima}}}
+\def\eqparts@topsep{3pt}
+\newcommand{\leadinitem@external}{\PackageError{exerquiz/eqexam}
+ {The \string\leadinitem\space command is designed to be\MessageBreak
+ the first item in the problem*\MessageBreak
+ environment above the parts environment}
+ {Use \string\leadinitem\space in the problem* environment.}%
+}
+\let\leadinitem\leadinitem@external
+\let\itsforleadinitem\eq@NO
+\newcommand{\eq@leadinitemparts}{\item\relax
+ \PackageError{exerquiz/eqexam}{The \string\leadinitem\space
+ command is not allowed in the\MessageBreak
+ parts environment}
+ {Use \string\leadinitem\space in the problem* environment.}%
+}
+\def\eq@handleOptArg[#1]{\def\eq@optArg{[#1]}\eq@handleOptArgi}
+\def\eq@handleOptArgi{\expandafter
+ \eq@item@latex\eq@optArg\exlisttabheaderafterhook}
+\newif\ifwithinparts
+\let\ex@listtabheader@fterhook\@empty
+\newenvironment{exercise@parts@list}{%
+ \settowidth{\eq@tmplength}{\parts@indent}%
+ \edef\widthOfParts{\the\eq@tmplength}%
+ \eq@initializeContAnnot\eq@nolinkfalse\prior@parts@hook
+ \abovepartshook\list{\normalfont
+ \if\Hidesymbol h\eq@nolinkfalse\ifeq@solutionsafter
+ \eq@nolinktrue\fi\fi
+ \if\currhideopt H%
+ \else
+ \ifeq@solutionsafter
+ \eq@nolinktrue % no link to solution
+ \else
+ \ifeq@nosolutions
+ \eq@nolinktrue % no link to solution
+ \else
+ \eq@ckglobalhide
+ \ifeq@hidesolution\eq@nolinktrue\else
+ \global\let\eqExerSolnHeader\eq@@writeexheaderlist
+ \fi
+ \fi
+ \fi
+ \fi
+ \makebox[\widthOfParts][r]{\eqexlisttabheader}%
+}{%
+ \usecounter{partno}%
+ \if\isitleadin\eq@YES
+ \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
+ \xdef\prtsIndntSep{\the\eq@tmplength}%
+ \if\itsforleadinitem\eqe@YES\setcounter{partno}{\fliPartNo}\else
+ \setcounter{partno}{1}\fi\fi
+ \let\leadinitem\eq@leadinitemparts
+ \let\tableadin\eq@tableadinparts
+ \global\let\solutionparshape\@empty
+ \setlength{\topsep}{\eqparts@topsep}%
+ \setlength{\parskip}{0pt}%
+ \setlength{\partopsep}{0pt plus 1pt minus 1pt}%
+ \ifdim\eqeques@parsep=0pt
+ \setlength{\parsep}{\eqparts@parsep}%
+ \else
+ \setlength{\parsep}{\eqeques@parsep}%
+ \fi
+ \setlength{\itemsep}{\eqparts@itemsep-\parsep}%
+ \setlength{\itemindent}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+ \settowidth{\labelsep}{\normalfont\eqe@prtsepPrb}%
+ \addtolength{\labelsep}{\eq@extralabelsep}%
+ \settowidth{\labelwidth}{\parts@indent}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \let\eq@item@latex\item
+ \def\eq@item{\@ifnextchar[{\eq@handleOptArg}
+ {\eq@item@latex\ex@listtabheader@fterhook
+ \exlisttabheaderafterhook}}%
+ \def\eqthisenv{parts}\withinpartstrue
+ \def\item{\ifx\@currenvir\eqthisenv
+ \def\eq@next{\eq@item@common}\else
+ \def\eq@next{\eq@item}\fi
+ \eq@next}%
+}}{\endlist\global\let\leadinitem\leadinitem@external
+ \post@parts@hook\belowpartshook}
+\def\eq@initializeContAnnot{\@ifundefined{eqequestions}
+ {\global\let\eqeCurrProb\relax}
+ {\xdef\eqeCurrProb{\theeqquestionnoi}}%
+ \xdef\eq@currProbStartPage{\arabic{page}}%
+}
+\define@key{tabp@rts}{nCols}{\def\exerwparts@cols{#1}}
+\define@key{tabp@rts}{minVspace}{\def\minVspacet@bs{#1}}
+\let\minVspacet@bs\@empty
+\def\minVspacetabs#1{\def\minVspacet@bs{#1}}
+\def\priorexsolafterTab{\ifkeepdeclaredvspacing
+ \ifeq@solutionsafter\ifx\minVspacet@bs\@empty\else
+ \priorexsolafterTab@cont\fi\fi\fi}
+\def\priorexsolafterTab@cont{\let\exsolafter@save\exsolafter
+ \let\exsolafter\@empty
+ \makebox[0pt][r]{\parbox[t][\minVspacet@bs][t]{0pt}
+ {\strut\hfill\vfill\strut}}%
+ \minipage[t]{\linewidth}\exsolafter@save}
+\def\pkg@endsolnexerhook{\ifkeepdeclaredvspacing
+ \ifeq@solutionsafter\ifx\minVspacet@bs\@empty\else
+ \endminipage\fi\fi\fi}
+\def\exercise@parts@tabular@[#1]{%
+ \inittabMark
+ \let\eq@insertContAnnot\relax
+ \let\exerwparts@cols\@empty
+ \setkeys*{tabp@rts}{#1}\ifx\exerwparts@cols\@empty
+ \edef\exerwparts@cols{\XKV@rm}\fi
+ \ifx\minVspacet@bs\@empty\keepdeclaredvspacingfalse\fi
+ \let\istabularexer\eq@YES
+ \@tempcnta\exerwparts@cols\relax
+ \ifnum\@tempcnta<2\relax
+ \PackageError{exerquiz}{%
+ The number of columns for parts\MessageBreak
+ needs to be an integer greater than 1}
+ {Enter an integer, 2 or larger}\fi
+ \exercise@parts@tabular}
+\newcount\eq@extabColCnt
+\def\autotabOn{\let\eq@tabMarkChk\relax%
+ \PackageInfo{exerquiz/eqexam}{Executing \string\autotabOn}}
+\def\autotabOff{\let\eq@tabMarkChk\@gobble
+ \PackageInfo{exerquiz/eqexam}{Executing \string\autotabOff}}
+\autotabOff
+\def\inittabMark{\global\eq@extabColCnt=0 }
+\def\resettabMark{\global\eq@extabColCnt=1 }
+\newcommand\autotabnewline[1][\eqparts@tabrowsep]{%
+ \ifnum\exerwparts@cols>0\relax
+ \ifx\eq@tabMarkChk\@gobble
+ \def\eq@atnext{\expandafter
+ \tabularnewline\expandafter[#1]}\else
+ \def\eq@atnext{\resettabMark\tabularnewline
+ \noalign{\expandafter\kern#1}}\fi
+ \expandafter\eq@atnext\fi}
+\def\eq@tabMark{%
+ \ifnum\eq@extabColCnt=0\relax
+ \global\advance\eq@extabColCnt1\relax
+ \let\eq@next\relax
+ \else
+ \ifnum\eq@extabColCnt=1\relax
+ \let\eq@next\relax
+ \else
+ \ifnum\eq@extabColCnt>\exerwparts@cols
+ \let\eq@next\autotabnewline
+ \else\def\eq@next{&}\fi
+ \fi
+ \fi
+ \eq@next
+ \global\advance\eq@extabColCnt1\relax
+}
+\newcommand\partstabcolsep[1]{\def\eq@partstabcolsep{#1}}
+\partstabcolsep{1.5pt}
+\newcommand\partstabtopsep[1]{\def\eq@partstabtopsep{#1}}
+\partstabtopsep{3pt}
+\def\eq@vpartstabtopsep{\vskip\eq@partstabtopsep\relax}
+\newcommand\partstabrowsep[1]{\setlength{\@tempdima}{#1}%
+ \edef\eqparts@tabrowsep{\the\@tempdima}}
+\partstabrowsep{0pt}
+\newenvironment{exercise@parts@tabular}{%
+ \setcounter{partno}{0}%
+ \def\tablrIndent{\hglue\prtsIndntSep\relax}%
+ \if\isitleadin\eq@YES
+ \if$\the\everypar$\let\tablrIndent\relax\fi
+ \setcounter{partno}{1}\fi
+ \let\leadinitem\eq@leadinitemparts
+ \let\tableadin\eq@tableadinparts
+ \global\let\solutionparshape\@empty
+ \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
+ \xdef\prtsIndntSep{\the\eq@tmplength}%
+ \sbox{\eq@tmpbox}{\parts@indent}%
+ \let\eq@item@latex\item
+ \let\eq@item\item@part@tabular
+ \def\eqthisenv{parts}\withinpartstrue
+ \def\item{\ifx\@currenvir\eqthisenv
+ \def\eq@next{\eq@tabMarkChk\eq@tabMark\eq@item@common}\else
+ \def\eq@next{\eq@item@latex}\fi
+ \eq@next}\eq@nolinkfalse
+ \@ifundefined{@xtabularcr}{\let\@xarraycr\eq@xtabularcr}
+ {\let\@xtabularcr\eq@xtabularcr}%
+ \eq@tmpdima=\linewidth
+ \advance\eq@tmpdima-\prtsIndntSep\relax
+ \@tempcnta\exerwparts@cols\relax
+ \advance\@tempcnta-1\relax
+ \multiply\@tempcnta2\relax
+ \@tempdima\prtsIndntSep\relax
+ \divide\@tempdima 2\relax
+ \edef\halfWidth{\the\@tempdima}%
+ \advance\@tempdima\eq@partstabcolsep\relax
+ \tabcolsep\@tempdima
+ \multiply\@tempdima\@tempcnta
+ \advance\eq@tmpdima-\@tempdima
+ \divide\eq@tmpdima by\exerwparts@cols\relax %dpsj3
+ \edef\widthOfPartsBox{\the\eq@tmpdima}% dpsj2
+ \if@tableadinitem\else\vskip\eq@partstabtopsep\relax\fi
+ \noindent\normalbaselines\kern0pt
+ \prior@parts@hook\abovepartshook
+ \tablrIndent\tabular[t]{@{}*{\exerwparts@cols}{>{\setTabulrSolnEnv
+ \parskip\eqeques@parsep\relax
+ \parindent0pt\relax\strut}p{\eq@tmpdima}}@{\hidewidth}}%
+}{\endtabular\kern0pt
+ \@ifundefined{@listii@SAVE}{}{\global\let\@listii\@listii@SAVE
+ \global\let\@listii@SAVE\relax}%
+ \post@parts@hook\belowpartshook
+ \aftergroup\eqe@innermarkpts
+ \aftergroup\eq@vpartstabtopsep}
+\let\eqe@innermarkpts\relax
+\def\item@part@tabular{\refstepcounter{partno}%
+ \global\let\eqExerSolnHeader\@empty
+ \ifeq@solutionsafter
+ \eq@nolinktrue % no link to solution
+ \else\ifeq@nosolutions
+ \eq@nolinktrue % no link to solution
+ \else
+ \eq@ckglobalhide
+ \ifeq@hidesolution\eq@nolinktrue\else
+ \gdef\eqExerSolnHeader{\eq@@writeexheaderlist}%
+ \fi\fi\fi
+ \if@restorejustify\restorejustify\else\PBS\raggedright\fi
+ \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
+ \xdef\prtsIndntSep{\the\eq@tmplength}%
+ \sbox{\eq@tmpbox}{\parts@indent}%
+ \eq@tmpdima=\wd\eq@tmpbox
+ \addtolength\eq@tmplength{\eq@extralabelsep}%
+ \xdef\partshangamount{\the\eq@tmplength}%
+ \parshape \@ne 0pt \linewidth
+ \everypar{\parshape \@ne 0pt \linewidth}%
+ \eq@setPrbSolnAftrIndnt
+ \makebox[0pt][r]{\eqexlisttabheader\eqe@prtsepPrb}%
+ \ex@listtabheader@fterhook
+ \exlisttabheaderafterhook\ignorespaces
+}
+\def\@ckhide[#1]{\edef\eq@arg{#1}%
+ \def\currhideopt{x}%
+ \ifx\eq@arg\@empty\else
+ \if\eq@arg\eq@Hid
+ \eq@hidesolutiontrue\eq@nolinktrue%
+ \edef\currhideopt{\Hidesymbol}%
+ \else
+ \ifeq@globalshowsolutions\else
+ \if\eq@arg\eq@hid
+ \eq@hidesolutiontrue\eq@nolinktrue%
+ \def\currhideopt{h}%
+ \fi
+ \fi
+ \fi\fi
+ \eq@item
+}
+\def\tabControlOn{\@ifundefined{@xtabularcr}
+ {\let\save@@xtabularcr\@xarraycr}
+ {\let\save@@xtabularcr\@xtabularcr}}
+\def\tabControlOff{\@ifundefined{@xtabularcr}
+ {\let\@xarraycr\save@@xtabularcr}
+ {\let\@xtabularcr\save@@xtabularcr}}
+\AtBeginDocument{\tabControlOn}
+\def\eq@xtabularcr{\@ifnextchar[{\save@@xtabularcr}
+ {\eqe@tab@parts@rowsep}}%
+\def\eqe@tab@parts@rowsep{\save@@xtabularcr
+ \noalign{\expandafter\kern\eqparts@tabrowsep}}%
+\def\includeexersolutions{\@ifstar
+ {\let\resetEXsolns\relax\includeexersolutionsi}
+ {\def\resetEXsolns{\global\let\include@solutions\relax}%
+ \includeexersolutionsi}%
+}
+\newcommand{\includeexersolutionsi}[1][]{%
+ \filterFor{#1}\includeexersolutionsii
+}
+\def\includeexersolutionsii{%
+ \include@solutions
+ \resetEXsolns
+ \let\eqFilterArg\@empty
+}
+\long\def\gobbleToEndEXt#1\endeqEXt{%
+ \ifeqforpaper\expandafter\@gobbletwo\fi}
+\newcommand\filterFor[1]{\def\eqFilterArg{#1}}
+\newcommand\inclEXtFilter[2]{\def\eqargii{#2}\ifx\eqargii\eqFilterArg
+ \else\expandafter\gobbleToEndEXt\fi}
+\newcommand\useEXtFilter{\let\eqEXt\inclEXtFilter}
+\let\eqsolutionshook\@empty
+\let\eq@solutionshook\@empty
+\let\priorexsectitle\@empty
+\let\priorexslinput\@empty
+\def\exerSolnsHeadnToc{\section*{\exsectitle}%
+ \addcontentsline{toc}{section}{%
+ \@ifundefined{web@latextoc}{}{%
+ \ifx\web@latextoc\eq@YES\else
+ \protect\numberline{}\fi}\exsectitle}}
+\@ifpackageloaded{web}{\def\eq@normallheader{\lheader{\rightmark}}}
+ {\let\eq@normallheader\relax}
+\@ifpackageloaded{web}{\def\eq@defaultlheader{\lheader{\aeb@setmarks}}}
+ {\let\eq@defaultlheader\relax}
+\newif\ifExSolutionsSet \ExSolutionsSetfalse
+\newcommand{\exerSolnInput}
+{%
+ \@ifundefined{eqe@IWO}{}{\ifsolutionsAtEnd%\ifvspacewithsolns
+ \eqe@IWO\@auxout{\string\expandafter\string\gdef
+ \string\csname\space eqExamQuesLastPage\string\endcsname
+ {\arabic{page}}}\fi}
+ \let\webnewpage\relax
+ \ifsolutionsonly\else\immediate\closeout\ex@solns\fi
+ \ifeq@nosolutions\else
+ \iftherearesolutions
+ \ifsolutionsonly\eq@solutionshook
+ \eqsolutionshook
+ \else
+ \newpage\eq@solutionshook
+ \eqsolutionshook\markright{}\eq@normallheader
+ \fi
+ \markright{\exsectitle}%
+ \ifx\webnewpage\relax
+ \def\webnewpage{\global\let\webnewpage\newpage}%
+ \fi
+ \priorexsectitle\exerSolnsHeadnToc\priorexslinput
+ \InputIfFileExists{\jobname.sol}
+ {\global\ExSolutionsSettrue}{\PackageWarning{exerquiz}
+ {!!! Solutions to exercises not found}}%
+ \global\ExSolutionsSetfalse
+ \newpage\eq@defaultlheader
+ \fi
+ \fi
+}
+\def\include@solutions{%
+ \exerSolnInput
+}
+\newcommand{\prior@questionsHook}{}
+\let\qMark@Hook\@empty
+\let\aebtitleQuiz\@empty
+\newcommand{\post@questionsHook}{}
+\newcommand{\quesNumColor}[1]{\def\eq@quesNumCol{#1}}
+\quesNumColor{blue}
+\renewcommand{\theeqquestionnoi}{\arabic{eqquestionnoi}}
+\newcommand{\labeleqquestionnoi}{%
+ \color{\eq@quesNumCol}\bfseries\theeqquestionnoi.}
+\renewcommand\theeqquestionnoii{(\alph{eqquestionnoii})}
+\newcommand{\labeleqquestionnoii}{%
+ \color{\eq@quesNumCol}\bfseries\theeqquestionnoii}
+\renewcommand\theeqquestionnoiii{(\roman{eqquestionnoiii})}
+\newcommand{\labeleqquestionnoiii}{%
+ \color{\eq@quesNumCol}\bfseries\theeqquestionnoiii}
+\define@key{props@ques}{labelwidthTo}%
+ [\normalsize\normalfont\bfseries00.]%
+ {\def\propQ@labelwidthTo{#1}}
+\define@key{props@ques}{labelwidth}[]{\def\propQ@labelwidth{#1}}
+\let\propQ@labelwidth\@empty
+\define@key{props@ques}{topsep}[\the\topsep]{\edef\propQ@topsep{#1}}
+\define@key{props@ques}{partopsep}[\the\partopsep]%
+ {\edef\propQ@partopsep{#1}}
+\define@key{props@ques}{parsep}[\the\parsep]{\edef\propQ@parsep{#1}}
+\define@key{props@ques}{itemsep}[\the\itemsep]{\edef\propQ@itemsep{#1}}
+\define@key{props@ques}{labelsepTo}[\normalsize\normalfont\ ]%
+ {\def\propQ@labelsepTo{#1}}
+\define@key{props@ques}{labelsep}[\@empty]{\def\propQ@labelsep{#1}}
+\let\propQ@labelsep\@empty
+\define@key{props@ques}{color}[blue]{\quesNumColor{#1}}
+\setkeys{props@ques}{labelwidthTo,topsep,partopsep,parsep,%
+ itemsep,labelsepTo,color}%
+\newenvironment{questions}[1][]
+{%
+ \ifnum\@eqquestiondepth>\tw@\@toodeep\else
+ \advance\@eqquestiondepth\@ne\fi
+ \def\@quesctr{eqquestionno\romannumeral\the\@eqquestiondepth}%
+ \toks@=\expandafter\expandafter\expandafter{#1}\expandafter
+ \xdef\csname quesOpts\@quesctr\endcsname{\the\toks@}%
+ \edef\tempexp{\noexpand\setkeys{props@ques}{\the\toks@}}\tempexp
+ \list{\qMark@Hook\prior@questionsHook\gdef\eqPTs{1}%
+ \global\let\eqQT\eq@na%
+ {\@tempcnta=0 \let\@thispr@b\@empty
+ \@whilenum\@tempcnta<\@eqquestiondepth\do{\advance\@tempcnta\@ne
+ \ifx\@thispr@b\@empty\edef\@thispr@b{%
+ \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\else
+ \edef\@thispr@b{\@thispr@b%
+ \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\fi
+ }\xdef\@currentQues{\@thispr@b}}%
+ \makebox[\labelwidth][r]{\normalfont\@nameuse{label\@quesctr}}%
+ \xdef\eq@pageThisQ{\the\c@page}%
+ \post@questionsHook}{\usecounter{\@quesctr}%
+ \ifx\propQ@labelsep\@empty
+ \settowidth{\labelsep}{\propQ@labelsepTo}\else
+ \setlength{\labelsep}{\propQ@labelsep}\fi
+ \ifx\propQ@labelwidth\@empty
+ \settowidth{\labelwidth}%
+ {\propQ@labelwidthTo\hspace{\labelsep}}\else
+ \settowidth{\labelwidth}{\hspace{\propQ@labelwidth}%
+ \hspace{\labelsep}}\fi
+ \setlength{\topsep}{\propQ@topsep}%
+ \setlength{\partopsep}{\propQ@partopsep}%
+ \ifdim\parskip>\z@\addtolength{\topsep}{-\parskip}\fi
+ \setlength{\parsep}{\propQ@parsep}%
+ \setlength{\itemsep}{\propQ@itemsep}%
+ \setlength{\itemindent}{0pt}%
+ \setlength{\leftmargin}{\labelwidth}%
+ }%
+}{\endlist}
+\def\pushquestions{\expandafter\xdef\csname save\@quesctr\endcsname
+ {\expandafter\the\csname c@\@quesctr\endcsname}\end{questions}}
+\def\popquestions{%
+ \begin{questions}[\csname quesOpts\@quesctr\endcsname]%
+ \setcounter{\@quesctr}{\csname save\@quesctr\endcsname}%
+ \@ifnextchar\popquestions{\item[]}{\@ifnextchar\begin{\item[]}{}}}
+\newcommand{\priorsqhook}[1]{\def\sq@priorhook{#1}}
+\priorsqhook{}
+\newcommand{\abovesqskip}[1]{\def\sq@aboveskip{#1}}
+\abovesqskip{\par\medskip}
+\long\def\endsqhook#1{\def\sq@afterhook{#1}}
+\endsqhook{}
+\def\@shortquizCnt{0}
+\def\@sqGenBaseName{eqSqBn\@shortquizCnt}
+\let\sqhspace\space
+\let\ListOfSQuizNames\@empty
+\newenvironment{shortquiz}
+{%
+ \xdef\eq@pageThisQ{\the\c@page}%
+ \let\@currentQues\@empty
+ {\count0=\@shortquizCnt \advance\count0by1\relax
+ \xdef\@shortquizCnt{\the\count0}}%
+ \goodbreak\@ifstar{\sqForms\@shortquiz}%
+ {\if\aeb@FLOverride\eq@f\def\sqstar{*}\else
+ \def\sqstar{}\sqLinks\fi\@shortquiz}%
+}{\aeb@endshortquiz}
+\newenvironment{shortquiz*}
+{%
+ \xdef\eq@pageThisQ{\the\c@page}%
+ {\count0=\@shortquizCnt\advance\count0by1\relax
+ \xdef\@shortquizCnt{\the\count0 }}%
+ \sqForms\@shortquiz
+}{\aeb@endshortquiz}
+\def\@shortquiz{\@ifnextchar[%
+ {\@@shortquiz}{\@@shortquiz[\@sqGenBaseName]}}
+\def\sq@setCLN#1{\ifx\aebTitleQuiz\@empty
+ \protected@edef\@currentlabelname{#1}\else
+ \protected@edef\@currentlabelname{\@currentlabelname}\fi
+}
+\let\isQZ=q \let\isSQZ=s
+\let\eqQuizType\relax
+\def\@@shortquiz[#1]{%\begingroup
+ \gdef\oField{#1}\gdef\curr@quiz{#1}\gdef\currQuiz{#1}%
+ \edef\tmp@Exp{\noexpand\g@addto@macro\noexpand
+ \ListOfSQuizNames{,#1}}\tmp@Exp
+ \global\let\eqQzQuesList\@empty
+ \let\eq@AddProbToQzQuesList\relax
+ \edef\@currentlabel{\@shortquizCnt}%
+ \edef\@currentHref{shortquiz.\@shortquizCnt}%
+ \global\let\eqQuizType\isSQZ\let\@qzsolndest\@empty
+ \if\sqstar*\relax
+ \let\@Ans\Ans@sq@f
+ \ifx\oField\@empty
+ \typeout{^^JExerquiz: Base field name required when using
+ shortquiz with '*' option}%
+ \PackageInfo{exerquiz}{Assuming link style^^J}%
+ \let\@Ans\Ans@sq@l
+ \fi
+ \else
+ \let\@Ans\Ans@sq@l
+ \fi
+ \setcounter{questionno}{0}%
+ \let\answers\answers@sq
+ \let\endanswers\endanswers@sq
+ \let\manswers\manswers@sq
+ \let\endmanswers\endmanswers@sq
+ \let\solution\solution@sq
+ \let\endsolution\endsolution@sq
+ \sq@aboveskip\sq@priorhook\ignorespaces
+}
+\newcommand\belowsqskip[1]{\def\aftershortquizskip{#1}}
+\belowsqskip{\medskip}
+\def\aeb@endshortquiz{\setcounter{quizno}{0}%
+ \sq@afterhook
+ \global\let\sqlabel\eq@sqlabel
+ \global\let\sqslrtnlabel\eq@sqslrtnlabel
+ \global\let\sqsllabel\eq@sqsllabel
+ \par\aftershortquizskip
+}
+\def\sqLinks{\def\sqstar{}}\sqLinks
+\def\sqForms{\def\sqstar{*}}
+\let\eq@tq@star\relax
+\def\qzPriorSolutionAfterHook{\smallskip}
+\let\sqPostHeaderHook\@empty
+\let\qPostHeaderHook\@empty
+\let\eq@sqPostHeaderHook\@empty
+\let\eq@qPostHeaderHook\@empty
+\let\prior@eqQt\@empty
+\let\prior@eqSQt\@empty
+\def\sqsolafterhspace{\space}
+\newif\ifmakeQzSlLocal \makeQzSlLocalfalse
+\def\makeQzSolnsLocalOn{\makeQzSlLocaltrue}
+\def\makeQzSolnsLocalOff{\makeQzSlLocalfalse}
+\def\solution@sq{\let\eq@next\relax
+ \ifx\@qzsolndest\@empty
+ \PackageWarning{exerquiz}%
+ {* Solutions unexpected here, will *\MessageBreak
+ * assume solutionsafter option *}%
+ \eq@solutionsaftertrue
+ \fi
+ \ifeq@solutionsafter
+ \par\qzPriorSolutionAfterHook\noindent
+ \if!\sqsolafter!\else
+ \sqsolafter\sqsolafterhspace\fi\ignorespaces
+ \else
+ \global\therearequizsolutionstrue\let\verbatim@out=\quiz@solns
+ \set@display@protect
+ \immediate\write\verbatim@out{%
+ \ifmakeQzSlLocal\protect\begingroup^^J\fi
+ \if\eqQuizType\isQZ
+ \ifx\prior@eqQt\@empty\else\prior@eqQt\fi
+ \protect\eqQt{\eqFilterArg}\else
+ \ifx\prior@eqSQt\@empty\else\prior@eqSQt\fi
+ \protect\eqSQt{\eqFilterArg}\fi
+ \protect\quizSolnHeader\if\eqQuizType\isQZ\ifx\allow@peek\eq@NO
+ [{\curr@quiz}{\currQuizStartPage}]\fi\fi
+ {\@qzsolndest}{\sqsllabel}\protect\eqterminex
+ \if\eqQuizType\isQZ\expandafter\eq@qPostHeaderHook
+ \expandafter\qPostHeaderHook\else
+ \expandafter\eq@sqPostHeaderHook
+ \expandafter\sqPostHeaderHook\fi}%
+ \set@typeset@protect
+ \expandafter\verbatimwrite\fi
+}
+\let\qzSolutionsAfterHook\@empty
+\def\endsolution@sq
+{%
+ \ifeq@solutionsafter
+ \eq@fititin{\mbox{\sqslrtnlabel}}\par\qzSolutionsAfterHook
+ \aftergroup\ignorespaces
+ \else
+ \endverbatimwrite
+ \ifx\@qzsolndest\@empty\else\set@display@protect
+ \immediate\write\verbatim@out{\eqSqSolnTrailer}%
+ \set@typeset@protect
+ \fi
+ \fi
+ \global\let\@qzsolndest\@empty
+}
+\def\fpAfterSolutionsSkip{\par\medskip}
+\let\eqSqSolnTrailerHook\@empty
+\let\eqQzSolnTrailerHook\@empty
+\newcommand\eqSqSolnTrailer{%
+ \if\eqQuizType\isQZ
+ \eqQzSolnTrailerHook
+ \protect\ReturnTo{page.\eq@pageThisQ}%
+ {\protect\mbox{\sqslrtnlabel}}\string\endeqQt
+ \else
+ \eqSqSolnTrailerHook
+ \protect\ReturnTo{page.\eq@pageThisQ}%
+ {\protect\mbox{\sqslrtnlabel}}\string\endeqSQt%
+ \fi
+ \ifeqforpaper\protect\fpAfterSolutionsSkip\fi^^J%
+ \ifmakeQzSlLocal\protect\endgroup^^J\fi
+}
+\let\eqSQt\@gobble
+\let\endeqSQt\relax
+\let\eqQt\@gobble
+\let\endeqQt\relax
+\let\prior@quizSolnHeaderHook\@empty
+\newcommand\quizSolnHeader[3][]{%
+ \prior@quizSolnHeaderHook
+ \ifeqforpaper\else\webnewpage\fi\noindent
+ #2%
+ \solnspace
+}
+\newif\iftherearequizsolutions \therearequizsolutionsfalse
+\let\aeb@FLOverride\relax
+\def\includequizsolutions{\@ifstar
+ {\let\resetQZtsolns\relax\includequizsolutionsi}
+ {\def\resetQZtsolns{\global\let\include@quizsolutions\relax}%
+ \includequizsolutionsi}%
+}
+\newcommand{\includequizsolutionsi}[1][]{%
+ \filterFor{#1}\includequizsolutionsii
+}
+\def\includequizsolutionsii{%
+ \include@quizsolutions
+ \resetQZtsolns
+ \let\eqFilterArg\@empty
+}
+\newcommand\useForms{\def\aeb@FLOverride{f}}
+\newcommand\useLinks{\def\aeb@FLOverride{l}}
+\newcommand\restoreFLTypeDefault{\global\let\aeb@FLOverride\relax}
+\let\aeb@FLOverride\relax
+\let\aebtitleQuiz\@empty
+\let\aebTitleQuiz\@empty
+\def\pushEnvir{\xdef\eq@currenvir{\@currenvir}\endgroup}
+\def\popEnvir{\begingroup\@endpefalse
+ \edef\@currenvir{\eq@currenvir}%
+ \edef\@currenvline{\on@line}%
+}
+\def\answers@sq{\parindent0pt
+ \ifx\solutionparshape\@empty\else
+ \pushEnvir\par\noindent\expandafter\popEnvir\fi
+ \stepcounter{questionno}%
+ \if\sqstar*\relax
+ \if\aeb@FLOverride\eq@l
+ \let\@Ans\Ans@sq@l\else
+ \let\@Ans\Ans@sq@f\fi
+ \else
+ \if\aeb@FLOverride\eq@f
+ \let\@Ans\Ans@sq@f\else
+ \let\@Ans\Ans@sq@l\fi
+ \fi
+ \def\aeb@answerType{r}\@ifnextchar[{\answers@@sq}%
+ {\@ifstar{\answers@@sq[\curr@quiz.\thequestionno]}{\answers@@sq[]}}}
+\def\manswers@sq{\parindent0pt
+ \@ifundefined{ifuserectforms}{}
+ {\if\aeb@FLOverride\eq@f\ifuserectforms
+ \useRectForMC\else\useCircForMC\fi\fi}%
+ \ifx\solutionparshape\@empty\else
+ \pushEnvir\par\noindent\expandafter\popEnvir\fi
+ \stepcounter{questionno}%
+ \if\sqstar*\relax
+ \if\aeb@FLOverride\eq@l
+ \let\@Ans\Ans@ck@sq@l\else
+ \let\@Ans\Ans@ck@sq@f\fi
+ \else
+ \if\aeb@FLOverride\eq@f
+ \let\@Ans\Ans@ck@sq@f\else
+ \let\@Ans\Ans@ck@sq@l\fi
+ \fi
+ \def\aeb@answerType{c}\@ifnextchar[{\answers@@sq}%
+ {\@ifstar{\answers@@sq[\curr@quiz.\thequestionno]}{\answers@@sq[]}}}
+\let\sq@hwdest\@empty % hard-wired destination
+\def\answers@@sq[#1]#2{%
+ \xdef\aeb@numCols{#2}%
+ \ifx\sq@hwdest\@empty
+ \xdef\@qzsolndest{#1}\else
+ \gdef\@qzsolndest{\sq@hwdest}\fi
+ \if\aeb@numCols1\gdef\eq@listType{1}\expandafter\answers@sq@list
+ \else
+ \gdef\eq@listType{0}\expandafter\answers@@sq@tabular
+ \fi{\aeb@numCols}%
+}
+\def\setMClabelsepDefault#1{\def\eq@hspanner@default{#1}}
+\def\setMClabelsep#1{\def\eq@hspanner{#1}}
+\setMClabelsep{\ }\setMClabelsepDefault{\ }
+\def\resetMClabelsep{\expandafter\setMClabelsep\expandafter
+ {\eq@hspanner@default}}
+\def\eq@lw@l{\eq@l@l\eq@hspanner}
+\def\eq@l@l{\normalsize\normalfont(d)}
+\def\eq@lw@f{\kern\RadioFieldSize\eq@hspanner}
+\@ifundefined{ifwithsoldoc}{\newif\ifwithsoldoc\withsoldocfalse}{}
+\let\eq@ansChoiceArray\@empty
+\def\eq@recordAnsChoice{%
+ \ifx\eq@ansChoiceArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\eq@ansChoiceArray{"\alph{quizno}"}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\eq@ansChoiceArray{,"\alph{quizno}"}}\fi
+ \tmp@exp
+}
+\newcommand\Ans@list[2][0]{\gdef\eq@pPTs{#1}\xdef\Ans@choice{#2}%
+ \item\relax\noindent\if\eq@listType\eq@One
+ \addtocounter{quizno}{-1}\@ifundefined{ifwithsoldoc}
+ {\refstepcounter{quizno}}{\ifwithsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi
+ \ignorespaces}
+\newenvironment{answers@sq@list}[1]
+{%
+ \ifx\aeb@answerType\eq@r
+ \let\endanswers\endanswers@sq@list\else
+ \let\endmanswers\endanswers@sq@list\fi
+ \list{\strut\@Ans}{%
+ \if\sqstar*\relax
+ \settowidth{\labelwidth}{\eq@lw@f}\else
+ \settowidth{\labelwidth}{\eq@lw@l}\fi
+ \setlength{\topsep}{-\parskip+\aboveanswersSkip}%
+ \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}%
+ \setlength{\itemsep}{0pt}\setlength{\partopsep}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+ \ifnum\exerwparts@cols>1\relax
+ \ifx\itsExerParts\eq@YES
+ \setlength{\leftmargin}{\labelwidth}\else
+ \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi
+ \else
+ \ifx\solutionparshape\@empty
+ \setlength{\leftmargin}{\labelwidth}\else
+ \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi\fi
+ \setlength{\labelsep}{0pt}%
+ \def\Ans{\Ans@list}%
+ }%
+}%
+{\endlist\setcounter{quizno}{0}\eq@answersEndHook}
+\newcommand\Ans@tabular[2][0]{\gdef\eq@pPTs{#1}\xdef\Ans@choice{#2}%
+ \leavevmode\@Ans
+}
+\newcommand\sqtabsep[1]{\def\eq@argi{#1}\ifx\eq@argi\@empty
+ \def\sq@tabsep{1.5pt}\else\def\sq@tabsep{#1}\fi}
+\sqtabsep{1.5pt}
+\def\sqTabPos#1{\def\sq@TabPos{[#1]}}\sqTabPos{}
+\def\answers@@sq@tabular#1{%
+ \ifinner
+ \ifx\itsExerParts\eq@YES\par\removelastskip
+ \removelastparskip\vskip\aboveanswersSkip\fi
+ \else\par\removelastskip\removelastparskip
+ \vskip\aboveanswersSkip\fi
+ \noindent\ifnum\exerwparts@cols>1\relax\parshape=0\fi
+ \tabcolsep=0pt
+ \eq@tmpdima=\linewidth
+ \@tempcnta#1\relax
+ \advance\@tempcnta-1\relax
+ \multiply\@tempcnta by2
+ \@tempdima\sq@tabsep\relax
+ \multiply\@tempdima\@tempcnta
+ \advance\eq@tmpdima-\@tempdima
+ \divide\eq@tmpdima by#1
+ \def\Ans{\Ans@tabular}%
+ \tabcolsep\sq@tabsep\relax
+ \expandafter\tabular\sq@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}}%
+\let\eq@save@doendpe\@doendpe
+\def\reset@doendpe#1{\global\eq@scratchtoks=\expandafter{#1}%
+ \gdef\@doendpe{\par\@endpetrue\global\let\@doendpe\eq@save@doendpe
+ \def\par{\@restorepar
+ \expandafter\everypar
+ \expandafter{\the\eq@scratchtoks}\par\@endpefalse}%
+ \everypar{{\setbox\z@\lastbox}%
+ \everypar{}\@endpefalse}\the\eq@scratchtoks
+ }%
+}
+\newcommand\answersEndHook[1]{\def\eq@answersEndHook{#1}}
+\let\eq@answersEndHook\@empty
+\def\endanswers@sq{\endtabular\setcounter{quizno}{0}%
+ \eq@answersEndHook\reset@doendpe{\the\everypar}%
+ \ifinner\else%\par
+ \removelastskip
+ \vspace{\aboveanswersSkip}\@endpetrue\fi
+}
+\def\endmanswers@sq{\endtabular\setcounter{quizno}{0}%
+ \eq@answersEndHook\reset@doendpe{\the\everypar}%
+ \ifinner\else%\par
+ \removelastskip
+ \vspace{\aboveanswersSkip}\@endpetrue\fi
+}
+\def\popiiictm{\special{CTM: pop pop pop}}
+\def\aebChoiceAltFmt{\noexpand\ifaebshowgrayletters
+ \Alph{quizno}\noexpand\else\linkContentFormat\noexpand\fi}
+\def\linkContentFormat{%
+ \if\probstar*\Alph{quizno}\else\alph{quizno}\fi}
+\def\linkContentWrapper{(\hfil\linkContentFormat\hfil)}%
+\def\Ans@sq@l{%
+ \leavevmode\if\eq@listType\eq@One\stepcounter{quizno}\else
+ \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
+ {\ifwithsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi\PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
+ \eq@tmpdima=\wd\eq@tmpbox
+ \def\link@@Content{\linkContentWrapper}%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \Ans@sq@l@driver
+\eq@hspanner\ignorespaces}
+\let\Ans@ck@sq@l\Ans@sq@l
+\let\rbf@Opts\@empty
+\def\Ans@sq@f{%
+ \if\eq@listType\eq@One\stepcounter{quizno}\else
+ \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
+ {\ifwithsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi\PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \eq@tmpdima=\wd\eq@tmpbox%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \insertGrayLetters % 6.3d
+ \Ans@sq@f@driver
+\eq@hspanner\ignorespaces}
+\let\Ans@ck@sq@f\Ans@sq@f
+\newskip\aboveanswersSkip
+\setlength\aboveanswersSkip{3pt}
+\providecommand\graylettersColor{gray}
+\def\insertGrayLetters{\ifaebshowgrayletters
+ \rlap{\makebox[\RadioFieldSize]%
+ {\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi}
+\newcount\eq@tabColCnt
+\define@key{bchoice}{nCols}{\def\bChoiceNumCols{#1}}
+\@for\eqi:=1,2,3,4,5,6,7,8,9,10 \do{\edef\temp@expand@def{%
+ \noexpand\define@key{bchoice}{\eqi}[\eqi]{%
+ \noexpand\def\noexpand\bChoiceNumCols{\eqi}}%
+ }\temp@expand@def
+}
+\def\bChoiceNumCols{\aeb@numCols}
+\define@key{bchoice}{random}[true]{%
+ \csname if#1\endcsname\eq@randomizeChoicestrue
+ \else\eq@randomizeChoicesfalse\fi
+}
+\define@key{bchoice}{label}[]{\xdef\bChoiceLabel{#1}}
+\def\bChoices{\@ifnextchar[{\@ansChoices}{\@ansChoices[\aeb@numCols]}}
+\def\@ansChoices[#1]%
+{%
+ \global\let\@tempholdSaveAns\@empty %4/5
+ \global\let\@tempholdSaveChoice\@empty %4/5
+ \global\let\bChoiceLabel\@empty %4/5
+ \setkeys{bchoice}{#1}%
+ \global\eq@tabColCnt=0
+ \ifnum\aeb@numCols=1 % list mode
+ \def\eq@next{\@layoutListAns}\else % tabular mode
+ \def\eq@next{\@layoutTabularAns{\bChoiceNumCols}}\fi
+ \eq@next
+}
+\let\eChoices\relax
+\def\@layoutListAns{\@ifnextchar\Ans{\@getListAns}%
+ {\@lookforendansChoices{\@layoutListAns}}%
+}
+\newcommand{\eq@saveAns}[2][]{%
+ \let\eq@next\@@@SaveAnsGobbleAns
+ \ifx\bChoiceLabel\@empty\else
+ \def\eq@savedAnsOpt{#1}\def\eq@savedAnsZO{#2}%
+ \if\eq@savedAnsZO1 \let\eq@next\@@@SaveAns\fi
+ \fi\eq@next
+}
+\long\def\@@@SaveAns#1\eAns{% 4/5
+ \g@addto@macro\@tempholdSaveAns{\\{\ignorespaces#1}}%
+ \addtocounter{quizno}{1}%
+ \edef\temp@expand{\noexpand\g@addto@macro\noexpand
+ \@tempholdSaveChoice{%
+ \noexpand\\{\ifx\sqstar\@empty\aebChoiceAltFmt\else
+ \ifaebshowgrayletters\Alph{quizno}\else
+ \linkContentFormat\fi\fi}}}\temp@expand
+ \addtocounter{quizno}{-1}%
+}
+\newif\ifoxfordcomma \oxfordcommatrue
+\def\oxfordCommaOn{\oxfordcommatrue}
+\def\oxfordCommaOff{\oxfordcommafalse}
+\def\eq@insertComma{%
+ \ifx\eq@comma\@empty
+ \ifnum\@nameuse{NumAns\eq@namearg}>2\relax
+ \def\eq@comma{,}\fi
+ \else\ifx\eq@insertAnd\@empty\eq@comma\space
+ \else\ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}%
+ \ifoxfordcomma\eq@comma\fi\else\eq@comma\fi\space
+ \fi
+ \fi
+}
+\newcommand\eqAnd{and}\def\eq@insertAnd{%
+ \ifnum\@nameuse{NumAns\eq@namearg}<2\relax\else
+ \ifnum\@nameuse{NumAns\eq@namearg}>2\relax
+ \else\leavevmode\space\fi\eqAnd\space\fi}
+\long\def\eq@displayAns#1{\advance\@tempcnta1\relax
+ \eq@insertComma
+ \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
+\def\eq@displayAlts#1{\advance\@tempcnta1
+ \eq@insertComma
+ \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi
+ \savedAltFmt{#1}}
+\def\eq@displayAltsAns#1{\advance\@tempcnta1\relax
+ \eq@insertComma
+ \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
+\newcommand{\savedAltFmt}[1]{(#1)}
+\newcommand{\useSavedAns}{\bgroup\@ifstar{\useSavedAns@i}
+ {\let\eq@insertAnd\@empty\useSavedAns@i}}
+\newcommand{\useSavedAns@i}[2][]{\@tempcnta=0\relax
+ \def\eq@namearg{#2}\let\label\@gobble
+ \def\eq@argi{#1}\ifx\eq@argi\@empty
+ \let\eq@comma\@empty
+ \let\\\eq@displayAns\@nameuse{SavedAns#2}\else
+ \@nameuse{SavedAns#2-Idx#1}\fi
+ \egroup
+}
+\newcommand{\useSavedAlts}{\bgroup\@ifstar{\useSavedAlts@i}
+ {\let\eq@insertAnd\@empty\useSavedAlts@i}}
+\newcommand{\useSavedAlts@i}[2][]{\@tempcnta=0\relax
+ \def\eq@namearg{#2}\@nameuse{caseFor#2}%
+ \def\eq@argi{#1}\ifx\eq@argi\@empty
+ \let\eq@comma\@empty
+ \let\\\eq@displayAlts\@nameuse{SavedAlts#2}\else
+ \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}\fi
+ \egroup
+}
+\newcommand{\useSavedAltsAns}{\bgroup\@ifstar{\useSavedAltsAns@i}
+ {\let\eq@insertAnd\@empty\useSavedAltsAns@i}}
+\newcommand{\useSavedAltsAns@i}[2][]{\@tempcnta=0\relax
+ \def\eq@namearg{#2}\@nameuse{caseFor#2}\let\label\@gobble
+ \def\eq@argi{#1}\ifx\eq@argi\@empty
+ \let\eq@comma\@empty
+ \let\\\eq@displayAltsAns\@nameuse{SavedAltsAns#2}\else
+ \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}
+ \@nameuse{SavedAns#2-Idx#1}\fi
+ \egroup
+}
+\newcommand{\useSavedNumAns}[1]{\@nameuse{NumAns#1}}
+\long\def\@@@SaveAnsGobbleAns#1\eAns{} % 4/5
+\long\def\@getListAns\Ans#1\eAns{%\@@par %start new paragraph
+ \eq@saveAns#1\e