summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2017-07-12 23:26:39 +0900
committerNorbert Preining <norbert@preining.info>2017-07-12 23:26:39 +0900
commit01c9ee84c09adfc3efe1cd93191a9c0473f985fe (patch)
tree6fe7c1648fa25e3dcc9b4c67657b89ac1525f289
parent542c5a785f8db8d4469e296c69c86bc030285f68 (diff)
add acrotex
-rw-r--r--texmf-dist/doc/latex/acrotex/README.md40
-rw-r--r--texmf-dist/doc/latex/acrotex/aeb_man.pdfbin0 -> 1312812 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/contsolns.pdfbin0 -> 52670 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/eformman.pdfbin0 -> 1118027 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/README.md27
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jquiztst.pdfbin0 -> 108684 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jquiztst.tex284
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jtxttst.pdfbin0 -> 99808 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/jtxttst.tex237
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/test_install.pdfbin0 -> 21312 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/test_install.tex38
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/webeqtst.pdfbin0 -> 204281 bytes
-rw-r--r--texmf-dist/doc/latex/acrotex/examples/webeqtst.tex472
-rw-r--r--texmf-dist/doc/latex/acrotex/install_jsfiles.pdfbin0 -> 237391 bytes
-rw-r--r--texmf-dist/source/latex/acrotex/acrotex.ins125
-rw-r--r--texmf-dist/source/latex/acrotex/aeb.js24
-rw-r--r--texmf-dist/source/latex/acrotex/contsolns.dtx296
-rw-r--r--texmf-dist/source/latex/acrotex/dljslib.dtx2692
-rw-r--r--texmf-dist/source/latex/acrotex/dljslib.ins64
-rw-r--r--texmf-dist/source/latex/acrotex/doc/aeb_man.tex12057
-rw-r--r--texmf-dist/source/latex/acrotex/doc/eformman.tex3522
-rw-r--r--texmf-dist/source/latex/acrotex/eforms.dtx3994
-rw-r--r--texmf-dist/source/latex/acrotex/eforms.ins68
-rw-r--r--texmf-dist/source/latex/acrotex/exerquiz.dtx13306
-rw-r--r--texmf-dist/source/latex/acrotex/exerquiz.ins81
-rw-r--r--texmf-dist/source/latex/acrotex/insdljs.dtx2622
-rw-r--r--texmf-dist/source/latex/acrotex/insdljs.ins61
-rw-r--r--texmf-dist/source/latex/acrotex/taborder.dtx240
-rw-r--r--texmf-dist/source/latex/acrotex/taborder.ins60
-rw-r--r--texmf-dist/source/latex/acrotex/web.cfg10
-rw-r--r--texmf-dist/source/latex/acrotex/web.dtx5473
-rw-r--r--texmf-dist/source/latex/acrotex/web.ins72
-rw-r--r--texmf-dist/tex/latex/acrotex/aebjs.def1378
-rw-r--r--texmf-dist/tex/latex/acrotex/aebrandom.def168
-rw-r--r--texmf-dist/tex/latex/acrotex/aebsumrytbls.def255
-rw-r--r--texmf-dist/tex/latex/acrotex/altadbfncs.def42
-rw-r--r--texmf-dist/tex/latex/acrotex/contsolns.def87
-rw-r--r--texmf-dist/tex/latex/acrotex/dljscc.def76
-rw-r--r--texmf-dist/tex/latex/acrotex/dljslib.sty1725
-rw-r--r--texmf-dist/tex/latex/acrotex/edvipdfm.def99
-rw-r--r--texmf-dist/tex/latex/acrotex/eforms.sty1314
-rw-r--r--texmf-dist/tex/latex/acrotex/epdfmark.def125
-rw-r--r--texmf-dist/tex/latex/acrotex/epdftex.def106
-rw-r--r--texmf-dist/tex/latex/acrotex/eqbr.def83
-rw-r--r--texmf-dist/tex/latex/acrotex/eqcat.def77
-rw-r--r--texmf-dist/tex/latex/acrotex/eqcolor.def85
-rw-r--r--texmf-dist/tex/latex/acrotex/eqcz.def113
-rw-r--r--texmf-dist/tex/latex/acrotex/eqda.def82
-rw-r--r--texmf-dist/tex/latex/acrotex/eqde.def113
-rw-r--r--texmf-dist/tex/latex/acrotex/eqes.def77
-rw-r--r--texmf-dist/tex/latex/acrotex/eqexam.def1651
-rw-r--r--texmf-dist/tex/latex/acrotex/eqfin.def78
-rw-r--r--texmf-dist/tex/latex/acrotex/eqfr.def75
-rw-r--r--texmf-dist/tex/latex/acrotex/eqit.def63
-rw-r--r--texmf-dist/tex/latex/acrotex/eqnl.def79
-rw-r--r--texmf-dist/tex/latex/acrotex/eqno.def80
-rw-r--r--texmf-dist/tex/latex/acrotex/eqpo.def89
-rw-r--r--texmf-dist/tex/latex/acrotex/eqru.def178
-rw-r--r--texmf-dist/tex/latex/acrotex/eqtr.def105
-rw-r--r--texmf-dist/tex/latex/acrotex/exerquiz.sty4355
-rw-r--r--texmf-dist/tex/latex/acrotex/insdljs.sty906
-rw-r--r--texmf-dist/tex/latex/acrotex/setcorder.def66
-rw-r--r--texmf-dist/tex/latex/acrotex/taborder.sty92
-rw-r--r--texmf-dist/tex/latex/acrotex/template.def256
-rw-r--r--texmf-dist/tex/latex/acrotex/uieforms.def376
-rw-r--r--texmf-dist/tex/latex/acrotex/usemcfi.def77
-rw-r--r--texmf-dist/tex/latex/acrotex/web.sty2209
-rw-r--r--texmf-dist/tex/latex/acrotex/webpro.def876
-rw-r--r--texmf-dist/tex/latex/acrotex/websec.def192
-rw-r--r--tlpkg/tlpsrc/acrotex.tlpsrc0
70 files changed, 63673 insertions, 0 deletions
diff --git a/texmf-dist/doc/latex/acrotex/README.md b/texmf-dist/doc/latex/acrotex/README.md
new file mode 100644
index 00000000..2ccde140
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/README.md
@@ -0,0 +1,40 @@
+The AcroTeX eDucation Bundle
+Author: D. P. Story
+Dated: 2017-03-20
+
+AeB contains the following:
+
+1) Web Package: Extensive support for page design.
+
+2) Exerquiz Package: Support for creating online interactive exercises and
+ quizzes.
+
+3) eforms Package: Extensive support for Acrobat forms and links
+
+4) dljslib package: A package of JavaScript functions that extends the
+ capability of exerquiz.
+
+5) taborder package: Supports the create of a tab order for form fields.
+
+6) Documentation for AeB (AcroTeX eDucatation Bundle) and eForms
+ (including insdljs and dljslib).
+
+I maintain a web site featuring TeX/LaTeX/PDF stuff called
+AcroTeX (www.math.uakron.edu/~dpstory/acrotex.html). There you
+will find the home web page of the AcroTeX eDucation Bundle.
+(www.math.uakron.edu/~dpstory/webeq.html).
+
+Examples for AeB have been moved to
+http://www.math.uakron.edu/~dpstory/webeq_ex.html, another copy
+of the examples are at
+http://www.acrotex.net/blog/?cat=89
+
+Additional examples are posted on the AcroTeX Blog page
+http://www.acrotex.net/blog/
+
+Now, I simply must get back to my retirement.
+
+D. P. Story
+www.acrotex.net
+dpstory@uakron.edu
+dpstory@acrotex.net
diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.pdf b/texmf-dist/doc/latex/acrotex/aeb_man.pdf
new file mode 100644
index 00000000..239d1abb
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/aeb_man.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/contsolns.pdf b/texmf-dist/doc/latex/acrotex/contsolns.pdf
new file mode 100644
index 00000000..60488e9a
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/contsolns.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/eformman.pdf b/texmf-dist/doc/latex/acrotex/eformman.pdf
new file mode 100644
index 00000000..07744799
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/eformman.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/README.md b/texmf-dist/doc/latex/acrotex/examples/README.md
new file mode 100644
index 00000000..357ccb88
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/examples/README.md
@@ -0,0 +1,27 @@
+AeB Examples folder
+
+Contents:
+ 1. test_install.pdf : To verify that you correctly installed aeb.js, for
+ Distiller users only, open this file in Acrobat and follow the directions.
+ 2. webeqtst.tex : Basic file highlighting feature of web and exerquiz
+ (exercises and multiple choice quizzes).
+ 3. jquiztst.tex : Features math fill-in quizzes of exerquiz.
+ 4. jtxttst.tex : Features text fill-in question of exerquiz.
+
+There are numerous other examples available, the resources are
+ 1. The full collection of AeB distribution files are located at
+ http://www.acrotex.net/blog/?cat=89
+ 2. Demo files whose focus is the web package are
+ http://www.acrotex.net/blog/?tag=web-package
+ 3. Demo file whose focus is the exerquiz package are
+ http://www.acrotex.net/blog/?tag=exerquiz
+ 4. Demo files for the dljslib package are
+ http://www.acrotex.net/blog/?tag=dljslib
+ 5. Demo files with focus on the extended or pro option of web are here:
+ http://www.acrotex.net/blog/?tag=extended-option
+
+The AcroTeX Blog (http://www.acrotex.net/blog/) is a great resource for all things
+AeB and PDF.
+
+Don Story
+2016/01/29
diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf
new file mode 100644
index 00000000..71cc9934
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex
new file mode 100644
index 00000000..097882db
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex
@@ -0,0 +1,284 @@
+\documentclass{article}
+\usepackage[fleqn]{amsmath}
+\usepackage{graphicx}
+\usepackage
+ [tight,
+% dvips, % <- replace with any supported driver
+ designi,%forpaper,
+ navibar
+ ]{web}
+\usepackage{exerquiz}
+\usepackage[ImplMulti]{dljslib}
+\usepackage{pifont}
+
+\title{Extending the Exerquiz Package Math Fillin Questions}
+\author{D. P. Story}
+\subject{Sample file}
+\keywords{LaTeX, PDF, derivative, calculus, JavaScript}
+\university{NORTHWEST FLORIDA STATE COLLEGE\\
+Department of Mathematics}
+\email{dpstory@acrotex.net}
+\version{3.0}
+\copyrightyears{1999-\the\year}
+\norevisionLabel
+
+% Uncomment the lines below to create buttons
+% for "Begin Quiz", "End Quiz" instead of links
+%\useBeginQuizButton[\textColor{blue}]
+\useEndQuizButton[\textColor{blue}]
+
+
+% Uncomment this line to require the student
+% to answer all questions in the quiz before
+% the quiz is evaluated.
+%\renewcommand\minQuizResp{highThreshold}
+
+\font\hv=cmtt10 \def\hvperk{\char`^}
+%\font\hv=hv at 9pt \def\hvperk{\char142 }
+{\catcode`\^=\active
+\gdef\js{\bgroup\hv\catcode`\^=\active \let^=\hvperk \jsi}
+}\def\jsi#1{#1\egroup}
+
+\def\hr#1{\textcolor{red}{#1}}
+\def\hb#1{\textcolor{blue}{#1}}
+
+\def\D{\dfrac {\text{d}}{\text{d}x}}
+\def\dPose#1{$\D#1=$ }
+
+\begin{document}
+
+\maketitle
+%\tableofcontents
+
+\section{Math Fill-In Question}
+
+The current version of \textsf{exerquiz} included only multiple
+choice questions. That's all well and good, but instructors would
+occasionally like to ask questions that would require the student
+to fill in the answer, whether it be numerical or symbolic.
+
+This new question type, the Math Fill-in, can be used in either
+the \texttt{shortquiz} or \texttt{quiz} environment. In the
+former case, there is immediate feedback as to right or wrong; in
+the latter case, correction is delayed until the quiz is completed
+and the user requests to be corrected.
+
+In either case, you can choose to include the correct answer,
+which can be obtained by the click of a button.
+
+The next section outlines the syntax for the user to enter the
+answer.
+
+\subsection{Instructions}
+
+When responding to a Math Fill-in question, you answer by typing
+in your answer. Use the following notation to enter your answers.
+
+\begin{itemize}
+\item Use \js{*} to indicate multiplication: Type \js{4*x} for $4x$;
+
+\item Use \js{^} to indicate powers: Type \js{4*x^3} for
+$4x^3$; \js{12*x^-6} for $12x^{-6}$.
+
+\item Use parentheses to delimit the argument of a function; i.e., type
+\js{sin(x)} rather than \js{sin x}.
+
+\item Use parentheses to define the {\it scope\/} of an operation: For
+example, type \js{4*x*(x^2+1)^3} for $4x(x^2+1)^3$; \js{ 4^(2*x+1)} for
+$4^{2x+1}$; \js{(sin(x))^2} for $(\sin(x))^2$. {\it Do not\/} type
+\js{sin^2(x)} for $\sin^2(x)$, type \js{(sin(x))^2} instead.
+
+\item You can also use brackets \js{[ ]} or braces \js{\{ \}},
+to delimit a mathematics expression.
+
+\item Functions you may use:
+\begin{itemize}
+ \item Trig: \js{sin}, \js{cos}, \js{tan}, \js{cot}, \js{sec}, \js{csc};
+ \item Inverse Trig: \js{asin}, \js{acos}, \js{atan};
+ \item Log: \js{ln} (natural log), or use \js{\tt log}; e.g. \js{ln(x)};
+ \item Exponential: The natural exponential function, $e^x$,
+ can be entered as \js{exp(x)} or as \js{e^x}.
+ \item The absolute function, \js{abs($\cdot$)} can also be written
+ in the usual way \js{|$\cdot$|}; thus, you can type either
+ \js{abs(x)} or \js{|x|}.
+ \item Misc.: \js{sqrt}, usage \js{sqrt(x)} for $\sqrt{x}$ (or, use
+ exponential notation: \js{x^(1/2)}).
+\end{itemize}
+\end{itemize}
+
+When you enter your response, some attempt will be made to
+determine whether the response is a valid mathematical expression.
+For example, if you say \js{san(x)}, the function `\js{san}' will
+not be recognized as a valid mathematical function; an error
+message is generated, and the user is not penalized for a possible
+typing error. The JavaScript routines will also check for
+unbalanced parentheses; thus, \js{((x^4+1) + sin(x)^2} will be
+flagged as a syntax error.
+
+\medskip\noindent\hr{\textbf{Important:}} When you enter a function
+of a single variable---the only type currently supported---use as
+the independent variable implied by the statement of the problem.
+If the problem statement involves the variable $x$, use \js{x} as
+the independent variable; if the problem statement uses $t$, use
+\js{t} in your answer. To enter a function of $t$ when a function
+of $x$ is expected will, no doubt, result in missed problem.
+
+\subsection{Answers and Solutions}
+
+For fill-in questions, if the document author so wishes, answers
+and (optionally) solutions can be provided. The author provides
+an ``Ans'' button. This button is visible for a \texttt{shortquiz}
+and hidden for a \texttt{quiz}.
+
+For a \texttt{shortquiz}, the ``Ans'' button can be clicked at
+anytime. In the case of a \texttt{quiz}, after a \texttt{quiz} has
+been completed, the hidden ``Ans'' buttons appear. Click on the
+button to get an answer to the problem.
+
+Concerning solutions. If the ``Ans'' button has a green boundary,
+that means that question has a solution. Performing a
+\texttt{Shift-Click} on the ``Ans'' button causes the viewer to
+jump to the solution. For multiple choice questions, the boundary
+for the correct answer is colored green as well. Click on the
+answer field to jump to the solution.
+
+Solutions to a \texttt{quiz} can be protected from prying eyes
+with the \texttt{\string\NoPeeking} command. See the
+\hyperref[s:quiz] {Section~\ref*{s:quiz}} for an example and a
+brief discussion.
+
+\subsection{Practice Example}
+
+\noindent\hb{\textbf{Example:}} Consider the following sample question.
+Practice by typing in the answer:
+\js{2*x^3*(x^4+1)^(-1/2)}
+
+\medskip
+\begin{oQuestion}{example}
+
+\def\RBW{120pt}\def\DefaultHeightOfWidget{16pt}\def\TBW{18pt}
+\edef\STRUT{\noexpand\rule[\ifxetex-1bp\else-5bp\fi]{0pt}{0pt}}
+
+\noindent$\dfrac{\text{d}}{\text{d}x} {(x^4 + 1)^{1/2}} =
+\underset{\text{\rotatebox{-45}{\rlap{The Response Box}}}}
+ {\underbrace{\STRUT\efKern{1bp}{0bp}\RespBoxMath{2*x^3*(x^4+1)^(-1/2)}{4}{.0001}{[1,2]}\relax\efKern{1bp}{0bp}}}\kern-1bp
+\underset{\text{\rotatebox{-45}{\rlap{Answer Button}}}}
+ {\underbrace{\STRUT\efKern{1bp}{0bp}\CorrAnsButton{2*x^3*(x^4+1)^(-1/2)}\efKern{1bp}{0bp}}}\kern-1bp
+\underset{\text{\rotatebox{-45}{\rlap{Num.\ of incorrect tries}}}}
+ {\underbrace{\STRUT\efKern{1bp}{0bp}\sqTallyBox\relax\efKern{1bp}{0bp}}}\olBdry\efKern{-1bp}{0bp}\sqClearButton$
+\end{oQuestion}
+
+\vspace{5\bigskipamount}
+
+When a correct answer is input into the response box, the color of
+the border surrounding the response box changes to \textcolor{webgreen}{green}.
+The answer can also be expressed correctly using the \js{sqrt}
+operator, try modifying the answer using \js{sqrt}.
+
+\newpage
+\subsection{Short Quiz Environment}\label{s:shortquiz}
+
+%In the following problems, answer by typing in your
+%response using the correct syntax.
+
+Problem \#2 illustrates how to define a problem with a variable
+other than the default $x$. Click on the ``Ans'' button to get
+answers, shift-click on ``Ans'' buttons that have a green boundary
+to get a solution.
+
+\begin{shortquiz*}[answer] Answer each of the following. Passing is 100\%.
+
+\answersEndHook{\hfill\makebox[0pt][r]{\sqTallyBox}}
+
+\begin{questions}
+
+\item If $f$ is differentiable, then $f$ is continuous.
+\begin{answers}[diff]{4}
+\Ans1 True & \Ans0 False
+\end{answers}
+\begin{solution}
+Yes, differentiability at a point implies continuity at that point.
+\end{solution}
+
+%If you want another variable other than $x$, then specify the variable immediately
+%following the correct answer in the \RespBoxMath command. Following the optional
+%variable specification is the optional named destination for the solution the
+%the problem.
+
+\item $\dfrac{\text{d}}{\text{d}t} {4 t^{-1/2}}
+ = \RespBoxMath{-2*t^(-3/2)}(t)[diffprob]{4}{.0001}{[1,2]}$\hfill
+\CorrAnsButton{-2*t^(-3/2)}\cgBdry\sqTallyBox
+\begin{solution}
+We use the power rule:
+\begin{equation*}
+ 4 t^{-1/2}
+ = 4(-1/2) t^{-3/2}
+ = \boxed{-2 t^{-3/2}}
+\end{equation*}
+Or, in the syntax of this quiz: \js{-2*t^(-3/2)}.
+\end{solution}
+
+\item \dPose{e^{x^2}}\RespBoxMath{2*x*e^(x^2)}{4}{.0001}{[0,1]}\hfill
+\CorrAnsButton{2*x*e^(x^2)}\olBdry\sqTallyBox
+
+\item $\displaystyle\int_0^\pi \sin(x)\,dx
+ = \RespBoxMath{2}{1}{.0001}{[0,1]}$\hfill\CorrAnsButton{2}\olBdry\sqTallyBox
+\end{questions}
+\end{shortquiz*}
+
+\begin{flushright}
+\sqClearButton\olBdry\sqTallyTotal
+\end{flushright}
+
+\subsection{Quiz Environment}\label{s:quiz}
+
+The example below illustrates multiple choice questions
+and objective math questions in the \texttt{quiz} environment
+and is protected by the \texttt{\string\NoPeeking}
+command. First, browse the solutions at the end
+of the file, when you encounter a solution protected by
+\texttt{\string\NoPeeking}, see what happens.
+Click on the ``Ans'' button to get answers, shift-click on ``Ans''
+buttons that have a green boundary to get a solution.
+
+\NoPeeking % or put in preamble
+
+\begin{quiz}{mathquiz} Answer each of the following. Passing
+is 100\%.
+
+\begin{questions}
+
+\item If $\lim_{x\to a} f(x) = f(a)$, then we say that $f$ is\dots
+\begin{answers}[cont]{3}
+\Ans0 differentiable &\Ans1 continuous &\Ans0 integrable
+\end{answers}
+\begin{solution}
+A function $f$ is said to be continuous at $x=a$ if $x\in\operatorname{Dom}(f)$,
+$\lim_{x\to a} f(x) $ exists and $\lim_{x\to a} f(x) = f(a)$.
+\end{solution}
+
+\item $\cos(\pi) = \RespBoxMath{-1}[cospi]{1}{.0001}{[2,4]}\cgBdry\kern1bp\CorrAnsButton{-1}$
+\begin{solution}
+Of course, everyone knows that $\cos(\pi) = -1 $.
+\end{solution}
+
+\item \dPose{e^{x^2}}\RespBoxMath{2*x*e^(x^2)}[diffexp]{4}{.0001}{[0,1]}\cgBdry\kern1bp
+\CorrAnsButton{2*x*e^(x^2)}
+\begin{solution}
+First apply the rule for differentiating an the natural exponential, then apply
+the power rule:
+\begin{align*}
+ \dfrac d{dx}\,e^{x^2} &
+ = e^{x^2}\,\dfrac d{dx}\,x^2 \\&
+ = e^{x^2}\,(2x) \\&
+ = 2x e^{x^2}
+\end{align*}
+In the syntax of this document, \js{2*x*e^(x^2)}.
+\end{solution}
+\end{questions}
+\end{quiz}\quad\ScoreField\currQuiz\olBdry\eqButton\currQuiz
+
+\noindent
+Answers: \AnswerField\currQuiz
+
+\end{document}
diff --git a/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf
new file mode 100644
index 00000000..3fea2a8c
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/jtxttst.tex b/texmf-dist/doc/latex/acrotex/examples/jtxttst.tex
new file mode 100644
index 00000000..eb2747e4
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/examples/jtxttst.tex
@@ -0,0 +1,237 @@
+\documentclass{article}
+\usepackage{amsmath}
+\usepackage
+ [tight,designi]{web}
+\usepackage{exerquiz}
+\usepackage[indefIntegral]{dljslib}
+
+\title{Extending the Exerquiz Package Text Fill-in Questions}
+\author{D. P. Story}
+\subject{Sample file}
+\keywords{LaTeX, PDF, derivative, calculus, JavaScript}
+
+\university{NORTHWEST FLORIDA STATE COLLEGE\\
+Department of Mathematics}
+\email{dpstory@uakron.edu}
+\version{2.0}
+\copyrightyears{1999-\the\year}
+
+\nocopyright
+\norevisionLabel
+
+\def\D{\dfrac {\hbox{\text{d}}}{\text{d}x}}
+\def\dPose#1{$\D#1=$ }
+
+\newcommand\redpoint{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
+\vskip\medskipamount\noindent
+ \makebox[\parindent][l]{\large\color{red}$\blacktriangleright$}}
+\newcommand{\cs}[1]{\texttt{\char`\\#1}}
+
+\useMCCircles
+
+\begin{document}
+
+\maketitle
+
+\section{Text Fill-in Questions}
+
+\textsf{Exerquiz} can now create text fill-in questions, questions
+in which the response is text (as opposed to a mathematical
+expression). The underlying JavaScript compares the user's
+response against acceptable alternatives, as supplied by the
+author of the question. If there is a match, the response is
+deemed correct. For example:
+
+\redpoint\begin{oQuestion}{ex1}%
+Who was the first President\footnote{of the United States}?\
+\RespBoxTxt{0}{0}{4}{George Washington}{Washington}
+ {G. Washington}{Geo. Washington}
+\end{oQuestion}
+
+\medskip\noindent
+The command \cs{RespBoxTxt} is the one that creates a text fill-in question. Its
+syntax is
+\begin{verbatim}
+\RespBoxTxt[#1]#2#3[#4]#5<plus listing of alternatives>
+\end{verbatim}
+\noindent\textbf{\hypertarget{paraRespBoxTxt}{Parameters:}}
+\begin{enumerate}
+\item[\ttfamily\#1:]Optional parameter used to modify the appearance of the
+ text field.
+\item[\ttfamily\#2:]This required parameter is a number that indicates
+the filtering method to be used. Permissible values of this parameter are
+\begin{enumerate}
+ \item[\ttfamily-1:] (The default) The author's and user's answers are not filtered
+ in any way. (Spaces, case, and punctuation are preserved.)
+ \item[\ttfamily0:] The author's and user's answers are converted to
+ lower case, any white space and non-word characters are removed.
+ \item[\ttfamily1:] The author's and user's answers are converted to
+ lower case, any white space is removed.
+ \item[\ttfamily2:] The author's and user's answers are stripped of
+ white space.
+\end{enumerate}
+See the JavaScript function \texttt{eqFilter} in \texttt{exerquiz.dtx} for
+program code details. Additional filtering options may be added.
+
+\item[\ttfamily\#3:] This parameter is a number that indicates the compare
+method to be used. Permissible values of this parameter are
+\begin{enumerate}
+ \item[\ttfamily0:] (The default) The author's and user's answers are
+ compared for an exact match. (These answers are filtered before they are
+ compared.)
+ \item[\ttfamily1:] The user's response is searched in an attempt to
+ get a substring match with the author's alternatives. Additional comparison
+ methods may be added.
+\end{enumerate}
+See the JavaScript function \texttt{compareTxt} in
+\texttt{exerquiz.dtx} for the program code details.
+
+\item[\ttfamily\#4:] Optional, a named destination to the
+solution to the question. If this parameter appears, then a
+solution must follow the question, enclosed in a \texttt{solution}
+environment. If the forth parameter is a `\texttt*', then an automatic
+naming scheme is used instead.
+\item[\ttfamily\#5:] This required parameter is the
+number of alternative answers that are acceptable. The alternative
+answers are listed immediately after this parameter. (The example
+above specified that $4$ alternatives follow.)
+\end{enumerate}
+
+\makeatletter
+% remove label `Quiz' and gobble up the space that follows it.
+\renewcommand\sqlabel[1]{\@gobble}
+\makeatother
+\begin{shortquiz}[comboexamp]%
+The following series of examples illustrate different combinations
+parameters~\texttt{\#2} and~\texttt{\#3}. All questions are in
+response to the question ``Who was the first president of the
+United States?''
+\begin{questions}
+\item Remove all white space and non-word characters, convert to lower case,
+then look for a match.
+\RespBoxTxt{0}{0}{4}{George Washington}{Washington}
+ {G. Washington}{Geo. Washington}
+Of course, ``George Washington'' and ``G. Washington'' are correct, but
+so too are ``georgewashington''and ``gwashington''.
+
+\item Remove all white space, convert to lower case, then look for an
+exact match. Here we don't remove non-word characters, such as punctuation.
+\RespBoxTxt{1}{0}{4}{George Washington}{Washington}
+ {G. Washington}{Geo. Washington}
+For example, answers ``G. Washington'', ``georgewashington'' and
+``g. washington'' are correct, but ``gwashington'' is not.
+
+\item Remove all white space, then look for an exact match. (Here,
+we do not remove punctuation and do not convert to lower case.)
+\RespBoxTxt{2}{0}{4}{George Washington}{Washington}
+ {G. Washington}{Geo. Washington} The
+response ``G. Washington'' is correct, but ``g. washington'' is not.
+
+\item Now lets put parameter~\texttt{\#3} equal to \texttt1. Here, we convert
+to lower case, remove white space, and look for a substring match.
+\RespBoxTxt{1}{1}{4}{George Washington}{Washington}
+ {G. Washington}{Geo. Washington} Note that ``President Washington'',
+``General Geo. Washington'', and ``Washington, George'' are correct.
+Also ``Fred Washington'' is correct, since it matches the second
+alternative, Washington. (If we eliminate Washington as an
+alternative, then ``Fred Washington'' would be judged incorrect,
+let's test that theory:
+\begin{oQuestion}{wash2}\RespBoxTxt{2}{1}{3}{George Washington}
+{G. Washington}{Geo. Washington}\end{oQuestion}
+\end{questions}
+\end{shortquiz}
+
+\section{Short Quiz Environment}
+
+\begin{shortquiz}
+Answer each of the following. Passing is 100\%.
+
+\begin{questions}
+
+\answersEndHook{\hfill\makebox[0pt][r]{\sqTallyBox}}
+
+\item Who was the first president of the United States?\par\kern3pt\noindent
+\RespBoxTxt{0}{0}[geow]{4}{George Washington}{Washington}{G. Washington}{Geo. Washington}\hfill
+\CorrAnsButton{George Washington}\kern1bp\sqTallyBox
+\begin{solution}
+Yes, George Washington was the first President of the United
+States of America.
+\end{solution}
+
+\item Name \emph{one} of the two people recognized as a founder of
+Calculus.\par\kern3pt\noindent
+\RespBoxTxt{2}{0}{5}{Isaac Newton}{Newton}{I. Newton}{Gottfried Leibniz}{Leibniz}\hfill
+\CorrAnsButton{Isaac Newton or Gottfried Leibniz}\kern1bp\sqTallyBox
+
+\item If $f$ is differentiable, then $f$ is continuous.
+\begin{answers}{4}
+\Ans1 True &
+\Ans0 False
+\end{answers}
+
+\item
+\dPose {4 x^{-1/2}}\RespBoxMath{-2*pow(x,-3/2)}{4}{.0001}{[1,2]}\hfill
+\CorrAnsButton{-2*x^(-3/2)}\kern1bp\sqTallyBox
+
+\item
+$\displaystyle\int \frac 1x\,dx = $\space
+\RespBoxMath{ln(abs(x))}{4}{.0001}{[1,2]}[indefCompare]\hfill
+\CorrAnsButton{ln(|x|)}\kern1bp\sqTallyBox
+
+\end{questions}
+\end{shortquiz}
+\begin{flushright}
+\sqClearButton\kern1bp\sqTallyTotal
+\end{flushright}
+
+\newpage
+\section{Quiz Environment}
+
+Here is a mixture of all types of questions, all with solutions.
+
+\useBeginQuizButton[\CA{Begin}]
+\useEndQuizButton[\CA{Finish}]
+
+\begin{quiz}*{calcquiz} Answer each of the following. Passing
+is 100\%.
+
+\begin{questions}
+
+\item If $\lim_{x\to a} f(x) = f(a)$, then we say that $f$ is\dots
+\begin{answers}[cont]3
+\Ans0 differentiable &\Ans1 continuous &\Ans0 integrable
+\end{answers}
+\begin{solution}
+A function $f$ is said to be continuous at $x=a$ if $x\in\operatorname{Dom}(f)$,
+$\lim_{x\to a} f(x) $ exists and $\lim_{x\to a} f(x) = f(a)$.
+\end{solution}
+
+\item Name \emph{one} of the two people recognized as a founder of
+Calculus.\par\kern3pt
+\RespBoxTxt{0}{0}[calc]{4}{Isaac Newton}{Newton}{Gottfried Leibniz}{Leibniz}%
+\CorrAnsButton{Isaac Newton or Gottfried Leibniz}
+\begin{solution}
+Isaac Newton and Gottfried Leibniz are the co-creators of Calculus.
+\end{solution}
+
+\item $\cos(\pi) = \RespBoxMath{-1}[cospi]{1}{.0001}{[2,4]}\CorrAnsButton{-1}$
+\begin{solution}
+Oh, come on now. You know that $\cos(\pi)=-1$.
+\end{solution}
+
+\item $\displaystyle\int \sin(x)\,dx =
+\RespBoxMath{-cos(x)}[intSin]{4}{.0001}{[0,1]}[indefCompare]\CorrAnsButton{-cos(x)}$
+\begin{solution}
+\relax\begin{equation*}
+ \int \sin(x) \,dx = -\cos(x) + C
+\end{equation*}
+\adjDisplayBelow
+\end{solution}
+
+\end{questions}
+\end{quiz}\quad\ScoreField\currQuiz\eqButton\currQuiz
+
+\noindent
+Answers: \AnswerField\currQuiz
+
+\end{document}
diff --git a/texmf-dist/doc/latex/acrotex/examples/test_install.pdf b/texmf-dist/doc/latex/acrotex/examples/test_install.pdf
new file mode 100644
index 00000000..c3c5e636
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/examples/test_install.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/test_install.tex b/texmf-dist/doc/latex/acrotex/examples/test_install.tex
new file mode 100644
index 00000000..f804b9c8
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/examples/test_install.tex
@@ -0,0 +1,38 @@
+\documentclass{article}
+\usepackage[designiv]{web}
+\usepackage{eforms}
+
+\begin{defineJS}{\isImportAnFDFKnown}
+console.clear(); console.show();
+if ( typeof aebImportAnFDF == "function" ) {
+ app.beep(0);
+ console.println("aeb.js is successfully installed, congratulations!");
+ console.println("\\nYou're ready to Rock with AcroTeX!");
+} else {
+ app.beep(0); app.beep(0);
+ console.println("aeb.js is not, repeat NOT, installed correctly!");
+}
+\end{defineJS}
+
+\thispagestyle{empty}
+\parindent0pt\parskip6pt
+
+\begin{document}
+
+This is a file to test your \textsf{AeB} installation.
+
+To test the \textsf{AeB} installation, press this button:
+\pushButton[\CA{Test AeB}\A{\JS{\isImportAnFDFKnown}}]{btnTest}{}{11bp}
+
+Upon pressing the button, if you have installed the \texttt{aeb.js} file
+correctly, a congratulatory message appears in the console window; if the
+installation is not correct, a message informs you so. On failure, did you
+close \textsf{Acrobat} before opening this file? (The JS files are only read
+once when the \textsf{Acrobat} application is opened.) When all else fails,
+try rereading the installation instructions again
+(\texttt{install\_jsfiles.pdf}), found in the \texttt{doc} folder, but more
+carefully this time.
+
+
+
+\end{document}
diff --git a/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf
new file mode 100644
index 00000000..a82dca64
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex b/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex
new file mode 100644
index 00000000..0d0634ec
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex
@@ -0,0 +1,472 @@
+\documentclass{article}
+\usepackage{amsmath}
+\usepackage[tight,designvi]{web}
+\usepackage[nosolutions]{exerquiz}
+
+\title{\texorpdfstring{Acro\!\TeX}{AcroTeX} eDucation Bundle
+ \texorpdfstring{\\[1ex]}{:}Exercises and Quizzes}
+\author{D. P. Story}
+\subject{File to test web and exerquiz packages}
+\keywords{LaTeX, hyperref, PDF, exercises, quizzes}
+\university{NORTHWEST FLORIDA STATE COLLEGE\\
+ Department of Mathematics}
+\email{dpstory@acrotex.net}
+\version{3.0}
+\copyrightyears{1999-\the\year}
+\nocopyright
+\revisionLabel{}
+
+\sqTurnOffAlerts
+
+
+% To insert a message on the cover page, uncomment the lines below,
+% and insert the 'nodirectory' option into the web package line above.
+\usepackage{pifont}
+\optionalPageMatter{\par\minimumskip\vspace{\stretch{1}}
+ \begin{center}
+ \fcolorbox{blue}{webyellow}{%
+ \begin{minipage}{.67\linewidth}
+ \noindent\textcolor{red}{\textbf{Legend:}} In \hyperref[s:corrections]
+ {Section~\ref*{s:corrections}}, a \textcolor{red}{\ding{52}}
+ indicates that the student gave the correct response; a
+ \textcolor{red}{\ding{56}}, indicates an incorrect response,
+ in this case, the correct answer is marked with a \textcolor{webgreen}
+ {\ding{108}}.
+ \end{minipage}}
+ \end{center}
+}
+
+\newcounter{probno}[section]
+\renewcommand{\theprobno}{\thesection.\arabic{probno}}
+%
+% Define a problem environment with its own counter.
+\newenvironment{problem}{%
+\renewcommand\exlabel{Problem}%
+\renewcommand\exlabelformat{\textbf{\exlabel\ \theprobno.}}%
+\renewcommand\exsllabelformat
+ {\noexpand\textbf{\exlabel\ \theprobno.}}%
+\renewcommand\exrtnlabelformat{$\blacktriangleleft$}%
+\renewcommand\exsecrunhead{Solutions to Problems}%
+\begin{exercise}[probno]}
+{\end{exercise}}
+
+
+% Define a example environment with no counter
+\newenvironment{example}{%
+\renewcommand\exlabel{Example}%
+\renewcommand\exlabelformat{\textbf{\exlabel.}}%
+\renewcommand\exrtnlabelformat{$\square$}%
+\SolutionsAfter
+\begin{exercise}[0]}%
+{\end{exercise}}
+
+% Below is a new command to change the page layout for paper
+% Useful for documents such as homework assignments and other
+% hand-outs to the students. Try it when the forpaper, or
+% forcolorpaper is in effect.
+% \useFullWidthForPaper
+
+% Use circles for MC questions in quiz environments.
+\useMCCircles
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+
+\section{Introduction}
+
+This is a sample file to give templates of the environments
+defined in \texttt{exerquiz}. The file illustrates the
+\texttt{exercise}, the \texttt{shortquiz} and \texttt{quiz}
+environments.
+
+In the case of the quiz environments, only multiple-choice
+questions are illustrated. Open ended, or objective style
+questions are demonstrated in other sample files.
+
+\section{Online Exercises}
+
+A well-designed sequences of exercises can be of aid to the student. The
+\texttt{exercise} environment makes it easy to produce electronic
+exercises. By using the \texttt{forpaper} option, you can also make a
+paper version of your exercises. See the \texttt{aeb\_man.pdf} reference
+manual.
+
+\begin{exercise}
+Evaluate the integral \(\displaystyle\int x^2 e^{2x}\,dx\).
+\begin{solution}
+We evaluate by \texttt{integration by parts}:\normalsize
+\begin{alignat*}{2}
+ \int x^2 e^{2x}\,dx &
+ = \tfrac12 x^2 e^{2x} - \int x e^{2x}\,dx &&\quad
+ \text{$u=x^2$, $dv=e^{2x}\,dx$}\\&
+ = \tfrac12 x^2 e^{2x} -
+ \Bigl[\tfrac12 x e^{2x}-\int \tfrac12 e^{2x}\,dx\Bigr] &&\quad
+ \text{integration by parts}\\&
+ = \tfrac12 x^2 e^{2x} - \tfrac12 x e^{2x} + \tfrac12\int e^{2x}\,dx &&\quad
+ \text{$u=x^2$, $dv=e^{2x}\,dx$}\\&
+ = \tfrac12 x^2 e^{2x} - \tfrac12 x e^{2x} + \tfrac14 e^{2x} &&\quad
+ \text{integration by parts}\\&
+ = \tfrac14(2x^2-2x+1)e^{2x} &&\quad
+ \text{simplify!}
+\end{alignat*}
+\end{solution}
+\end{exercise}
+
+In the preamble of this document, we defined a \texttt{problem}
+environment with its own counter. Here is an example of it.
+
+\begin{problem}
+Is $F(t)=\sin(t)$ an antiderivative of $f(x)=\cos(x)$? Explain
+your reasoning.
+\begin{solution}
+The answer is yes. The definition states that $F$ is an
+antiderivative of $f$ if $F'(x)=f(x)$. Note that
+$$
+ F(t)=\sin(t) \implies F'(t) = \cos(t)
+$$
+hence, $F(x) = \cos(x) = f(x)$.
+\end{solution}
+\end{problem}
+
+\begin{problem}
+Is $F(t)=\sin(t)$ an antiderivative of $f(x)=\cos(x)$? Explain
+your reasoning.
+\begin{solution}
+The answer is yes. The definition states that $F$ is an
+antiderivative of $f$ if $F'(x)=f(x)$. Note that
+$$
+ F(t)=\sin(t) \implies F'(t) = \cos(t)
+$$
+hence, $F(x) = \cos(x) = f(x)$.
+\end{solution}
+\end{problem}
+
+\noindent By modifying the \texttt{exercise} environment, you can
+also create an \texttt{example} environment. The one defined in
+the preamble of this document has no associated counter.
+
+\begin{example}
+Give an example of a set that is \textit{clopen}.
+\begin{solution}
+The real number line is both closed and open in the usual topology of the
+real line.%
+\end{solution}
+\end{example}
+
+There is an \texttt{exercise*} environment, using it signals the presence
+of a multiple part exercise question. The following exercise illustrates
+this environment.
+
+\begin{exercise*}\label{ex:parts}
+Suppose a particle is moving along the $s$-axis, and that its position
+at any time $t$ is given by $s=t^2 - 5t + 1$.
+\begin{parts}
+\item[h]\label{item:part} Find the velocity, $v$, of the particle at any time
+$t$.
+\begin{solution}
+Velocity is the rate of change of position with respect to time. In
+symbols:
+$$
+ v = \frac{ds}{dt}
+$$
+For our problem, we have
+$$
+ v = \frac{ds}{dt} =\frac d{dt}(t^2 - 5t + 1) = 2t-5.
+$$
+The velocity at time $t$ is given by $\boxed{v=2t-5}$.
+\end{solution}
+
+\item Find the acceleration, $a$, of the particle at any time $t$.
+\begin{solution}
+Acceleration is the rate of change of velocity with respect to time.
+Thus,
+$$
+ a = \frac{dv}{dt}
+$$
+For our problem, we have
+$$
+ a = \frac{dv}{dt} =\frac d{dt}(2t-5)=2.
+$$
+The acceleration at time $t$ is constant: $\boxed{a=2}$.
+\end{solution}
+\end{parts}
+\end{exercise*}
+
+References can be made to a particular part of an exercise; for example,
+``see \hyperref[item:part]{Exercise~\ref*{ex:parts}(\ref*{item:part})}.''
+Part (a) is in \textcolor{webblue}{blue}; the solutions for that part is
+``hidden''. This is a new option for the \texttt{exercise} environment.
+
+There is now an option for listing multi-part question in tabular form.
+This problem style does not obey the \texttt{solutions\-after} option.
+
+\begin{exercise*}
+Simplify each of the following expressions in the complex number
+system. \textit{Note}: $\bar z$ is the conjugate of $z$;
+$\operatorname{Re} z$ is the real part of $z$ and
+$\operatorname{Im} z$ is the imaginary part of $z$.
+\begin{parts}[2]
+\item $i^2$
+\begin{solution}[]
+$i^2 = -1$
+\end{solution}
+&
+\item $i^3$
+\begin{solution}[]
+$i^3 = i i^2 = -i$
+\end{solution}
+\\
+\item $z+\bar z$
+\begin{solution}[]
+$z+\bar z=\operatorname{Re} z$
+\end{solution}
+&
+\item[h] $1/z$
+\begin{solution}[]
+$\displaystyle\frac 1z=\frac 1z\frac{\bar z}{\bar z}=\frac z{z\bar z}=\frac z{|z|^2}$
+\end{solution}
+\end{parts}
+\end{exercise*}
+
+\section{Short Quizzes with or without Solutions}
+
+
+Short quizzes are quizzes with immediate response. As soon as the
+user enters an answer, that answer is immediately evaluated, the
+results of the evaluation are communicated to the user.
+
+Solutions can optionally be included in each question. Below is a
+\texttt{shortquiz} without solution.
+
+\begin{shortquiz}
+Was it in Xanadu did Kubla Kahn a stately pleasure dome
+decree?
+\begin{answers}{4}
+\bChoices
+ \Ans1 True\eAns
+ \Ans0 False\eAns
+\eChoices
+\end{answers}
+\end{shortquiz}
+
+\noindent Below is a \texttt{shortquiz} with a solution.
+
+\goodbreak
+
+\begin{shortquiz*}[KublaKhan]
+In what year did Columbus sail the ocean blue?
+\begin{answers}[qzcolumbus1]{4}
+\bChoices
+ \Ans0 1490\eAns
+ \Ans0 1491\eAns
+ \Ans1 1492\eAns
+ \Ans0 1493\eAns
+\eChoices
+\end{answers}
+\begin{solution}
+\begin{quote}
+ In 1492, \\
+ Columbus sailed the ocean blue.\hfill
+
+ Profound was the logic in his quest,\\
+ to get to the east, he headed west.\footnote{This poem was obtained by personal
+ communication from Leonard A. Stefanski,
+Department of Statistics, North Carolina State University.}
+\end{quote}
+\end{solution}
+\end{shortquiz*}
+
+\noindent These two types can be bundled together using the
+\texttt{questions} environment.
+
+\begin{shortquiz}
+Answer each of the following. Passing is 100\%.
+
+\begin{questions}
+
+\item Was it in Xanadu did Kubla Kahn a stately pleasure dome
+decree?
+\begin{answers}{4}
+\Ans1 True & \Ans0 False \\
+\end{answers}
+
+\item In what year did Columbus sail the ocean blue?
+\begin{answers}[qzcolumbus2]{4}
+\Ans0 1490 &\Ans0 1491 &\Ans1 1492 &\Ans0 1493
+\end{answers}
+\begin{solution}
+\begin{quote}
+ In 1492, \\
+ Columbus sailed the ocean blue.
+
+ Profound was the logic in his quest,\\
+ to get to the east, he headed west.\footnote{This poem was obtained by personal
+ communication from Leonard A. Stefanski,
+Department of Statistics, North Carolina State University.}
+\end{quote}
+\end{solution}
+\end{questions}
+\end{shortquiz}
+
+\noindent Try using the \texttt{proofing} option of \textsf{exerquiz}. In
+this case, the correct answer is indicated to the side; useful, perhaps,
+for proof-reading the document
+
+
+\section{Graded Quizzes with JavaScript}
+
+\CorrectionsOff % Don't want corrections for these two quizzes.
+
+You can create graded quizzes using the \texttt{quiz} environment.
+Here is a graded quiz using simple links. This might be suitable for a
+limited number of questions.
+
+\begin{quiz}{qzdiscr1} Using the discriminant, $b^2-4ac$, respond to each of the
+following questions.
+
+\begin{questions}
+\item Is the quadratic polynomial $x^2-4x + 3$ irreducible?
+\begin{answers}{4}
+\Ans0 Yes & \Ans1 No
+\end{answers}
+\item Is the quadratic polynomial $2x^2 - 4x + 3 $ irreducible?
+\begin{answers}{4}
+\Ans1 Yes &\Ans0 No
+\end{answers}
+\item How many solutions does the equation $2x^2 - 3x - 2= 0$ have?
+\begin{answers}{4}
+\Ans0 none &\Ans0 one &\Ans1 two
+\end{answers}
+\end{questions}
+\end{quiz}\qquad\ScoreField{qzdiscr1}
+
+\noindent By using the \texttt*-option, you can create a multiple choice
+set of question using check boxes.
+
+\begin{quiz*}{qzdiscr2}
+Using the discriminant, $b^2-4ac$, respond to each of the
+following questions.
+
+\begin{questions}
+\item Is the quadratic polynomial $x^2-4x + 3$ irreducible?
+\begin{answers}{4}
+\Ans0 Yes &\Ans1 No
+\end{answers}
+\item Is the quadratic polynomial $2x^2 - 4x + 3 $ irreducible?
+\begin{answers}{4}
+\Ans1 Yes &\Ans0 No
+\end{answers}
+\item How many solutions does the equation $2x^2 - 3x - 2= 0$ have?
+\begin{answers}{4}
+\Ans0 none &\Ans0 one &\Ans1 two
+\end{answers}
+\end{questions}
+\end{quiz*}\quad\ScoreField\currQuiz
+
+\noindent The \texttt{proofing} option of \textsf{exerquiz} can be used to
+mark the correct answer to the side; useful, perhaps, for proof-reading
+the document
+
+
+\section{Correcting Quizzes with JavaScript}\label{s:corrections}
+
+\CorrectionsOn % Now we want corrections
+
+Beginning with version 1.2 of \textsf{exerquiz}, you can now grade
+the quizzes created by the \texttt{quiz} environment.
+In this section, we illustrate the \texttt{quiz} environment with
+corrections.
+
+There are two types: link-style and form-style.
+This is the link-style format:
+
+
+\begin{quiz}{qzTeXl} Answer each of the following. Passing
+is 100\%.
+\begin{questions}
+\item Who created \TeX?
+\begin{answers}4
+\Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\item Who originally wrote \LaTeX?
+\begin{answers}{4}
+\Ans0 Knuth &\Ans1 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\end{questions}
+\end{quiz}\quad\ScoreField\currQuiz\eqButton\currQuiz
+
+\medskip
+We can obtain the forms-style quiz simply by inserting an \texttt*
+before the quiz field name.
+\textcolor{red}{Important!} Be sure to name each quiz field
+differently!
+
+%\previewtrue
+
+%\useMCRects
+
+
+\begin{quiz*}{qzTeXf} Answer each of the following. Passing
+is 100\%.
+\begin{questions}
+\item Who created \TeX?
+\begin{answers}*{4}
+\Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\begin{solution}
+Yes, it was Donald Knuth who first created \TeX.
+\end{solution}
+\item Who originally wrote \LaTeX?
+\begin{answers}*{4}
+\Ans0 Knuth &\Ans1 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\begin{solution}
+Yes, it was Leslie Lamport who first created \TeX.
+\end{solution}
+\end{questions}
+\end{quiz*}\quad\ScoreField\currQuiz\eqButton\currQuiz
+
+The ``corrections'' button can be modified to fit your needs. The quiz
+below queries your knowledge of the people who maintain various freeware
+\TeX\ Systems.\footnote{This quiz is a bit out of date.} The corrections
+button has been modified to take on a different look.
+
+\begin{quiz*}{qzTeXc} Answer each of the following. Passing
+is 100\%.
+\begin{questions}
+\item What \TeX\ System does Thomas Esser maintain?
+\begin{answers}{4}
+\Ans0 Mik\TeX &\Ans0 cs\TeX &\Ans1 te\TeX &\Ans0 fp\TeX
+\end{answers}
+\item What \TeX\ System does Fabrice Popineau maintain?
+\begin{answers}{4}
+\Ans0 Mik\TeX &\Ans0 cs\TeX &\Ans0 te\TeX &\Ans1 fp\TeX
+\end{answers}
+\item What \TeX\ System does Christian Schenk maintain?
+\begin{answers}{4}
+\Ans1 Mik\TeX &\Ans0 cs\TeX &\Ans0 te\TeX &\Ans0 fp\TeX
+\end{answers}
+\end{questions}
+\end{quiz*}\quad
+\ScoreField{qzTeXc}%
+ \eqButton[\BC{0 0 1} % blue border color
+ \CA{TeX} % Button text
+ \RC{Users} % rollover text
+ \AC{Group} % pushed text
+ \DA{/TiRo 10 Tf 0 0 1 rg} % times roman, 10 pt, blue text
+ \W{1}\S{I} % border width 1, inset button
+ ]{qzTeXc}
+
+\section{Objective-Style Questions}
+
+It is possible to pose objective-style questions (fill-in-the-blank). The
+demo file for this style question is called
+\href{http://www.math.uakron.edu/~dpstory/acrotex/examples/html/jquiztst.pdf}{jquiztst.pdf}
+(relative link: \href{jquiztst.pdf}{jquiztst.pdf}). Click on the link to
+review this demo file.
+
+\end{document}
diff --git a/texmf-dist/doc/latex/acrotex/install_jsfiles.pdf b/texmf-dist/doc/latex/acrotex/install_jsfiles.pdf
new file mode 100644
index 00000000..7b2d3fab
--- /dev/null
+++ b/texmf-dist/doc/latex/acrotex/install_jsfiles.pdf
Binary files differ
diff --git a/texmf-dist/source/latex/acrotex/acrotex.ins b/texmf-dist/source/latex/acrotex/acrotex.ins
new file mode 100644
index 00000000..99459c8a
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/acrotex.ins
@@ -0,0 +1,125 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1999-2014 D. P. Story
+%%
+%% This file is part of the `AcroTeX eDucation Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2014/08/19}
+\def\batchfile{acrotex.ins}
+
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+%
+% Install the Web Package
+%
+\generate
+{%
+ \file{web.sty}{\from{web.dtx}{copyright,package}}
+ \file{websec.def}{\from{web.dtx}{copyright,websectioning}}
+ \file{webpro.def}{\from{web.dtx}{copyright,webpro}}
+}
+%
+% Install the Exerquiz Package
+%
+\generate{%
+ \file{exerquiz.sty}{\from{exerquiz.dtx}{copyright,package}}
+ \file{aebjs.def}{\from{exerquiz.dtx}{copyright,aebjs}}
+% \file{eqexam.def}{\from{exerquiz.dtx}{eqexam}}
+ \file{aebrandom.def}{\from{exerquiz.dtx}{copyright,randomize}}
+ \file{aebsumrytbls.def}{\from{exerquiz.dtx}{copyright,sumrytbls}}
+ \file{usemcfi.def}{\from{exerquiz.dtx}{copyright,mcfi}}
+ \file{eqcolor.def}{\from{exerquiz.dtx}{copyright,eqcolor}}
+ \file{template.def}{\from{exerquiz.dtx}{copyright,template}}
+ \file{eqfr.def}{\from{exerquiz.dtx}{copyright,eqfr}}
+ \file{eqde.def}{\from{exerquiz.dtx}{copyright,eqde}}
+ \file{eqno.def}{\from{exerquiz.dtx}{copyright,eqno}}
+ \file{eqnl.def}{\from{exerquiz.dtx}{copyright,eqnl}}
+ \file{eqes.def}{\from{exerquiz.dtx}{copyright,eqes}}
+ \file{eqit.def}{\from{exerquiz.dtx}{copyright,eqit}}
+ \file{eqru.def}{\from{exerquiz.dtx}{copyright,eqru}}
+ \file{eqda.def}{\from{exerquiz.dtx}{copyright,eqda}}
+ \file{eqpo.def}{\from{exerquiz.dtx}{copyright,eqpo}}
+ \file{eqfin.def}{\from{exerquiz.dtx}{copyright,eqfin}}
+ \file{eqcat.def}{\from{exerquiz.dtx}{copyright,eqcat}}
+ \file{eqcz.def}{\from{exerquiz.dtx}{copyright,eqcz}}
+ \file{eqbr.def}{\from{exerquiz.dtx}{copyright,eqbr}}
+ \file{eqtr.def}{\from{exerquiz.dtx}{copyright,eqtr}}
+% \file{exerquiz.drv}{\from{exerquiz.dtx}{copyright,driver}}
+}
+%
+% Install eForms Package
+%
+\generate{%
+ \file{eforms.sty}{\from{eforms.dtx}{copyright,package}}
+ \file{epdfmark.def}{\from{eforms.dtx}{copyright,epdfmark}}
+ \file{epdftex.def}{\from{eforms.dtx}{copyright,epdftex}}
+ \file{edvipdfm.def}{\from{eforms.dtx}{copyright,edvipdfm}}
+ \file{uieforms.def}{\from{eforms.dtx}{copyright,userinterface}}
+ \file{setcorder.def}{\from{eforms.dtx}{copyright,setcorder}}
+}
+%
+% Install the Insdljs Package
+%
+\generate
+{%
+ \file{insdljs.sty}{\from{insdljs.dtx}{copyright,package}}
+ \file{dljscc.def}{\from{insdljs.dtx}{copyright,cc4js}}
+ \file{altadbfncs.def}{\from{insdljs.dtx}{copyright,altadbfncs}}
+}
+%
+% Install the dljslib Package
+%
+\generate
+{%
+ \file{dljslib.sty}{\from{dljslib.dtx}{copyright,package}}
+}
+%
+% Install the taborder Package, Acrobat Distiller only
+%
+\generate
+{%
+ \file{taborder.sty}{\from{taborder.dtx}{copyright,package}}
+}
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/aeb.js b/texmf-dist/source/latex/acrotex/aeb.js
new file mode 100644
index 00000000..09310d2e
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/aeb.js
@@ -0,0 +1,24 @@
+/*
+ AEB Import FDF Methods
+
+ Copyright (C) 2006--2016 AcroTeX.Net
+ D. P. Story
+ http://www.acrotex.net
+
+ Version 1.0
+*/
+if ( typeof aebTrustedFunctions == "undefined") {
+ aebTrustedFunctions = app.trustedFunction( function ( doc, oFunction, oArgs )
+ {
+ app.beginPriv();
+ var retn = oFunction( oArgs, doc )
+ app.endPriv();
+ return retn;
+ });
+}
+aebImportAnFDF = app.trustPropagatorFunction( function ( oArgs, doc )
+{
+ app.beginPriv();
+ doc.importAnFDF(oArgs);
+ app.endPriv();
+});
diff --git a/texmf-dist/source/latex/acrotex/contsolns.dtx b/texmf-dist/source/latex/acrotex/contsolns.dtx
new file mode 100644
index 00000000..0020bd15
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/contsolns.dtx
@@ -0,0 +1,296 @@
+%\iffalse meta-comment
+%<*internal>
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+%</internal>
+%<*install>
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+\endpreamble
+\ifx\fmtname\nameofplainTeX
+ \generate{\file{\jobname.def}{\from{\jobname.dtx}{package}}}
+\fi
+%</install>
+%<install>\endbatchfile
+%<*internal>
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile\else
+ \expandafter\endgroup\fi
+%</internal>
+%<*driver>
+\documentclass{ltxdoc}
+%\usepackage[numbered]{hypdoc}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%\title{\textsf{contsolns}}
+%\author{D. P. Story}
+%
+%\maketitle
+%
+% \paragraph{Installation.} Open the file \texttt{\jobname.dtx} in
+% your favorite tex editor (\textsf{WinEdt}) and compile using the
+% \emph{\textbf{tex} compiler}, not the \textbf{latex} compiler. Doing so,
+% generates the file \texttt{\jobname.def}. The files \texttt{\jobname.dtx}
+% and \texttt{\jobname.def} are distributed with AeB. The \textsf{exerquiz}
+% package has the \texttt{contsolns} option to use the code in this file.
+%
+% \subparagraph{Demo file.} The demo file for this feature of \textsf{exerquiz}
+% is \texttt{contsolns\_ex.tex}. This feature is available to users of any
+% supported driver.
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \section{Introduction}
+%
+% This collection of definitions is designed for use with \textbf{AeB}
+% (more specifically, the \textsf{web} and \textsf{exerquiz} package).
+% My occasional friend J\"{u}rgen wanted to have a ``continued on next page'' string to
+% appear at the bottom of a solution (when it appears at the end of the
+% file) to indicate the solution to this current problem continues onto the
+% next page. Originally, this was done for the \texttt{shortquiz}
+% environment, and later extended to the \texttt{quiz} and \texttt{exercise}
+% environments.
+%
+% \paragraph{Assumptions.} The code assumes the \textsf{web} package page style,
+% \texttt{webheadings}, is in effect; otherwise, this code fails.
+%
+%\section{Documentation}
+%
+% The use of the \texttt{contsolns} option should be pretty
+% seamless. The message that appears in the right footer is \DescribeMacro{\rfootContStr}
+% \cmd{\rfootContStr}; the command takes two argument, the second of which is a short
+% string that identifies the question. It can be redefined. The labels \DescribeMacro{\Qlabel}\cmd{\Qlabel}
+% and \DescribeMacro{\Elabel}\cmd{\Elabel} may also be redefined. When compiled
+% for paper (\texttt{forpaper} option), we emit the \textsf{exerquiz} command
+% \cmd{\promoteNewPageHere} with an argument of \DescribeMacro{\promoteNPHskip}\cmd{\promoteNPHskip}
+% in a vain attempt to get the numbers right. \cmd{\promoteNPHskip} is set to
+% \texttt{.1\cs{textheight}} and may be redefined if this value is not working as it should.
+%
+% This code file uses the running headers, left and right. If you want to use these
+% footers and this feature, you need to preserve the code. This is what I do in this
+% code file:
+%\begin{verbatim}
+%\expandafter\lfooter\expandafter{\expandafter\newLFooterCmd\web@lfoot}
+%\expandafter\rfooter\expandafter{\web@rfoot\newRFooterCmd}
+%\end{verbatim}
+%This demonstrates how to put the new code on the left of the old, or on the right.
+%
+% \subparagraph{Problems.} Problems arise if the numbers in the footer do not match
+% the exercise or quiz numbers, this may occur when using the \texttt{forpaper} option,
+% the workaround is to adjust \cmd{\promoteNPHskip} to a larger value.
+%
+% When using the \texttt{navibar} option of \textsf{web}, there may be insufficient
+% room to the right of the navigation bar; in this case, shorten the text created by
+% \cmd{\rfootContStr}, or reduce the number of navigation buttons on the solution pages.
+%
+% \section{The Code}
+% First, we determine if \textsf{web} is loaded.
+% \begin{macrocode}
+\@ifpackageloaded{web}{}{\PackageError{exerquiz}
+ {The consolns option of exerquiz requires\MessageBreak
+ the web package}{Use the web package.}}
+% \end{macrocode}
+% \DescribeMacro{\setQNum}\cmd{\setQNum} sets the question number in to the solutions at
+% end of the file. While \DescribeMacro{\setENum}\cs{setENum} does the same thing
+% for exercises. \DescribeMacro{\Qlabel}\cmd{\Qlabel} provides a label for the
+% quiz question as a result, \cs{setQNum} expands to strings like `Q1', `Q1(a)',
+% or `Q1(a)(i)'. \DescribeMacro{\Elabel}\cmd{\Elabel} does the same for exercises.
+% \cs{setEnum} expands to `E1' and `E1(a)', for example.
+% Both \cs{Qlabel} and \cs{Elabel} are fragile. All four of these commands may be redefined.
+
+% \begin{macrocode}
+\def\setQNum{\Qlabel\ifcase\@eqquestiondepth\or\arabic{eqquestionnoi}%
+ \or\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ \or\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ (\roman{eqquestionnoiii})\fi}
+\def\setENum{\Elabel\if\exerstar*\theeqexno(\alph{partno})\else
+ \theeqexno\fi}
+% \end{macrocode}
+% The default definitions of \cs{Qlabel} and \cs{Elabel} are next.
+% \begin{macrocode}
+\def\Qlabel{Q}\def\Elabel{E}
+% \end{macrocode}
+% \DescribeMacro{\solContMarks}\cmd{\solContMarks} really does nothing other than expand
+% to arguments enclosed in braces. The arguments act as a signal
+% to the running footer telling it to insert some text or not.
+% \begin{macrocode}
+\def\SolContMrk#1#2{\gdef\solContMarks{{#1}{#2}}}
+% \end{macrocode}
+% The default definition of \cs{solContMarks}
+% \begin{macrocode}
+\def\solContMarks{{}{}}
+% \end{macrocode}
+% We use \cs{eq@sqPostHeaderHook} (\cs{eq@qPostHeaderHook}) to insert some
+% special code into the top of each solution. It inserts the command
+% \cmd{\SolContMrk} with two arguments, the quiz number
+% (\verb!Q\@shortquizCnt!, resp., \verb!Q\@quizCnt!) and the question
+% number (\verb!\setQNum!).
+% \begin{macrocode}
+\def\eq@sqPostHeaderHook{%
+ \string\SolContMrk{Q\@shortquizCnt}{\setQNum}\relax}
+\def\eq@qPostHeaderHook{%
+ \string\SolContMrk{Q\@quizCnt}{\setQNum}\relax}
+\def\exer@solnheadhook{%
+ \string\SolContMrk{Ex}{\setENum}}
+% \end{macrocode}
+% \DescribeMacro{\promoteNPHskip} used if compiled for paper, this is the amount
+% that we use to promote a new page. We have to do this for otherwise, if {\TeX}s
+% page breaking algorithm is used, then the page number may be wrong.
+% \begin{macrocode}
+\newlength{\promoteNPHskip}
+\setlength{\promoteNPHskip}{.1\textheight}
+% \end{macrocode}
+% There are two definitions of \DescribeMacro{\redefForContSolns}\cmd{\redefForContSolns},
+% one for paper and one for screen. The command itself redefines the solution markers
+% that appear in the solution files (\textsf{SOL} and \textsf{QSL}).
+% \begin{macrocode}
+\ifeqforpaper
+\def\redefForContSolns{%
+% \end{macrocode}
+% If the document is compiled for paper, we promote a new page using the
+% command \verb!\promoteNewPageHere{\promoteNPHskip}!, and modify the
+% commands \cs{fpAfterSolutionsSkip} and \cmd{\belowexsolnskip}, which appear
+% in the \texttt{forpaper} option.
+% It's the last command that appears at the end of each solution.
+% Here we clear the arguments of \cs{SolContMrk}.
+% The two \cs{prior@...} commands are special hooks at the top of the
+% definitions of \cs{quizSolnHeader} and \cs{exerSolnHeader}. These latter
+% two hooks were added (2013/12/15) to \textsf{exerquiz}
+% \begin{macrocode}
+ \def\prior@quizSolnHeaderHook{\promoteNewPageHere{\promoteNPHskip}}
+ \def\prior@exerSolnHeaderHook{\promoteNewPageHere{\promoteNPHskip}}
+% \end{macrocode}
+% We use \cs{eq@scratchtoks}, a token register declared in \textsf{exerquiz}
+% \begin{macrocode}
+ \eq@scratchtoks=\expandafter{\fpAfterSolutionsSkip\SolContMrk{}{}}
+ \edef\@tempExp{\noexpand\promoteNewPageHere{%
+ \noexpand\promoteNPHskip}\the\eq@scratchtoks}
+ \eq@scratchtoks=\expandafter{\@tempExp}
+ \edef\fpAfterSolutionsSkip{\the\eq@scratchtoks}
+ \eq@scratchtoks=\expandafter{%
+ \belowexsolnskip\protect\SolContMrk{}{}}
+ \edef\belowexsolnskip{\noexpand\noexpand
+ \string\promoteNewPageHere{%
+ \noexpand\noexpand\string\promoteNPHskip}\the\eq@scratchtoks}
+}
+\else
+% \end{macrocode}
+% Now if the document is compiled for the screen, each solution starts
+% on a new digital piece of paper, so no need to modify \cs{eqSQt} as
+% above. The command \cs{fpAfterSolutionsSkip} is not used in the
+% screen version, so the last command is \cs{endeqSqt}, which we
+% modify.
+% \begin{macrocode}
+\def\redefForContSolns{%
+ \let\endeqSQtSAVE\endeqSQt
+ \def\endeqSQt{\endeqSQtSAVE\par\SolContMrk{}{}}
+ \let\endeqQtSAVE\endeqSQt
+ \def\endeqQt{\endeqQtSAVE\par\SolContMrk{}{}}
+ \let\endeqEXtSAVE\endeqEXt
+ \def\endeqEXt{\endeqEXtSAVE\par\SolContMrk{}{}}
+}
+\fi % \ifeqforpaper
+% \end{macrocode}
+% We expand \cmd\redefForContSolns at the beginning of the document so as to
+% include any changes made by the document author, or another package developer.
+% \begin{macrocode}
+\AtBeginDocument{\redefForContSolns}
+% \end{macrocode}
+% \DescribeMacro{\getSolContMarks} is the command that decides whether
+% to put something in the running footer. If the first argument is
+% empty (we have already cleared the arguments of \cs{SolContMrk} we do
+% nothing; if the first argument is nonempty, we emit a message.
+% \DescribeMacro{\rfootContStr} \cmd{\rfootContStr} is the string that
+% contains the string that appears in the running footer.
+% \begin{macrocode}
+\newcommand{\getSolContMarks}[2]{\ifcontSoln
+ \rfootContStr{#1}{#2}\fi}
+\newcommand{\rfootContStr}[2]{Solution to {#2} continues next page}
+% \end{macrocode}
+% Set the running footer; this should only appear in the solutions section
+% at the end of the file. \DescribeMacro{\ifcontSol}We establish a new
+% switch \cs{ifcontSoln} that will be use to signal the need for a
+% continuation of the solution.
+% \begin{macrocode}
+\newif\ifcontSoln \contSolnfalse
+% \end{macrocode}
+% We put this in the left footer. {\TeX} processes from left to right,
+% so we need this on the left, so the switch will be set for the
+% \cs{cfooter} and \cs{rfooter}. The \DescribeMacro{\bSolContMarks}\cmd{\bSolContMarks}
+% command makes the decision of setting the switch \cs{ifcontSoln}. It reads the
+% expansion of \cs{solContMarks}, which holds two arguments.
+% \begin{macrocode}
+\newcommand{\bSolContMarks}[2]{%
+ \def\eq@argi{#1}\def\eq@argii{#2}%
+ \ifx\eq@argi\@empty\global\contSolnfalse\else
+ \global\contSolntrue\fi}
+% \end{macrocode}
+% \DescribeMacro{\lFootbCont} is placed in \cs{lfooter}, and it will set the switch
+% by first expanding \cs{solContMarks}, then \cs{bSolContMarks}.
+% \begin{macrocode}
+\def\lFootbCont{\expandafter\bSolContMarks\solContMarks}
+% \end{macrocode}
+% \cs{rFootCont} goes in \cs{rfooter}, and holds the continuation string.
+% \begin{macrocode}
+\def\rFootCont{\makebox[0pt][r]{%
+ \expandafter\getSolContMarks\solContMarks}}
+% \end{macrocode}
+% Set the left and right footers.
+% \begin{macrocode}
+\@ifundefined{web@footerprivate}{%
+ \def\addtolfooter{\expandafter
+ \lfooter\expandafter{\expandafter\lFootbCont\web@lfoot}}%
+}{%
+ \def\addtolfooter{\def\web@footerprivate{\lFootbCont}}%
+}
+\def\addtorfooter{\expandafter
+ \rfooter\expandafter{\web@rfoot\rFootCont}}
+% \end{macrocode}
+% Install these footers at the beginning of the document. First check
+% to see if the \texttt{webheadings} pagestyle is being used.
+% \begin{macrocode}
+\def\cs@testWH#1#2{\ifx\webfootwrapper#1
+ \def\cs@next{\AtBeginDocument{\addtolfooter\addtorfooter}}\else
+ \def\cs@next{\PackageError{contsoln.def}{%
+ webheadings of the web package are NOT\MessageBreak
+ in effect. The contsoln.def file requires\MessageBreak
+ webheadings}{Use the default webheadings pagestyle
+ from the web package.}}\fi
+ \cs@next
+}
+% \end{macrocode}
+% The default definition of \cs{@oddfoot} is
+%\begin{verbatim}
+% \renewcommand{\@oddfoot}{\webfootwrapper{..}}
+%\end{verbatim}
+% So, the first token is \cs{webfootwrapper}, if that token
+% is there, we install the footers, and they should work as
+% expected; otherwise we declare an error.
+% \begin{macrocode}
+\AtBeginDocument{\expandafter\cs@testWH\@oddfoot}
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%\Finale
+\endinput
+
+\def\addtolfooter{\ifx\web@lfoot\@empty
+ \lfooter{\lFootbCont}\else
+ \expandafter\lfooter\expandafter{\expandafter
+ \noexpand\expandafter\lFootbCont\web@lfoot}\fi
+}
+\def\addtorfooter{\ifx\web@rfoot\@empty
+ \rfooter{\rFootCont}\else
+ \expandafter\rfooter\expandafter{\expandafter
+ \noexpand\expandafter\rFootCont\web@rfoot}\fi
+}
diff --git a/texmf-dist/source/latex/acrotex/dljslib.dtx b/texmf-dist/source/latex/acrotex/dljslib.dtx
new file mode 100644
index 00000000..cb974275
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/dljslib.dtx
@@ -0,0 +1,2692 @@
+% \iffalse
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% dljsLib.sty package, %%
+%% Copyright (C) 2001-2016 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%</copyright>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{dljslib}
+%<package> [2014/10/05 v2.0 Manage a Library of Document Level JavaScripts (dps)]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[colorlinks,hyperindex=false]{hyperref}
+\pdfstringdefDisableCommands{\let\\\textbackslash}%
+%\OnlyDescription % comment out for implementation details
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{dljslib}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{dljslib}{aebdocfmt.def cannot be found}}
+\begin{document}
+ \GetFileInfo{dljslib.sty}
+ \title{The \texttt{dljsLib} Package}
+ \author{D. P. Story\\
+ Email: \texttt{dpstory@uakron.edu}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \let\Email\texttt
+ \DocInput{dljslib.dtx}
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\PrintIndex}{\paragraph*{Index} The index goes here.\\Execute
+ \texttt{makeindex -s gind.ist -o dljslib.ind dljslib.idx} on the command line and recompile
+ \texttt{dljslib.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.\\Execute
+ \texttt{makeindex -s gglo.ist -o dljslib.gls dljslib.glo} on the command line and recompile
+ \texttt{dljslib.dtx}.}
+\end{document}
+%</driver>
+% \fi
+%
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{dljslib}{Inputting aebdonotindex.def}}
+% {\PackageInfo{dljslib}{aebdonotindex.def cannot be found}}
+%
+% \changes{v1.3}{2005/08/27}{Added new user contributed routines for unordered,
+% interval, point and factored responses. Added a feature whereby you
+% can create a file called libcusopt.opt to declare your own options
+% for this package, but these should be a combination of existing
+% options.}
+% \changes{v2.0}{2014/10/05}{replaced app.alert with eqAppAlert}
+%
+%\section{Introduction}
+% This is a companion package to the \texttt{insdljs} package. \texttt{Insdljs} gives the
+% document author the ability to write document level JavaScripts to the PDF docuement, when
+% it is finally built. I personally will be writing a number of general routines to
+% handle situations that arise, and I would hope that other enthusiasts of \texttt{insdljs} will
+% do the same. Therefore, it is desirable to gather together some general purpose routines into
+% a single library, and have a way of selecting the desired function or functions to be used.
+%
+% This package is meant for document authors, not for package developers. This package can only be used
+% once per document, perhaps called from the preamble of a document.
+%
+%\section{The Library Procedures}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Define some convenience commands, \cs{dljsRegister} and \cs{DeclareAndRegister}, see comments that follow.
+% \begin{macrocode}
+\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}}
+% \end{macrocode}
+% Here we ``register'' the functions contained in the library. \cs{dljsRegister} defines a
+% control sequence that records the name of the function (actually, the option name). This
+% control is set to `n'. When a package user chooses a particular function for inclusion, the
+% control is set to `y'.
+% \begin{macrocode}
+\dljsRegister[y]{dljslib}
+% \end{macrocode}
+% \subsection{Library Card Catalog}
+% \IndexOpt{equations}
+% \IndexOpt{vectors}
+% \IndexOpt{indefIntegral}
+% \IndexOpt{ImplMulti}
+% \IndexOpt{nodec}
+% The arguments of the \cs{DeclareAndRegister} command are the options of this package, and
+% their names represent JavaScript functions in the library.
+% \begin{macrocode}
+\DeclareAndRegister{equations}
+\DeclareAndRegister{vectors}
+\DeclareAndRegister{indefIntegral}
+\DeclareAndRegister{ImplMulti}
+\DeclareAndRegister{nodec}
+% \end{macrocode}
+% \IndexOpt{noBinFac}
+% \IndexOpt{limitArith}
+% \IndexOpt{combinatorics}
+% \IndexOpt{setSupport}
+% More options.
+% \begin{macrocode}
+\DeclareAndRegister{noBinFac}
+\DeclareAndRegister{limitArith}
+\DeclareAndRegister{combinatorics}
+\DeclareAndRegister{setSupport}
+% \end{macrocode}
+% \IndexOpt{unordered}
+% \IndexOpt{complex}
+% \IndexOpt{satisfyEq}
+% \IndexOpt{useGermanNums}
+% \IndexOpt{factors}
+% More options still.
+% \begin{macrocode}
+\DeclareOption{unordered}{\PackageWarning{dljslib}
+ {The `unordered' option is now combined with the\MessageBreak
+ `setSupport' option, will use the `setSupport' option\MessageBreak
+ instead}\ExecuteOptions{setSupport}}
+%\DeclareAndRegister{unordered}
+\DeclareAndRegister{complex}
+\DeclareAndRegister{satisfyEq}
+\DeclareAndRegister{useGermanNums}
+\DeclareAndRegister{factors}
+% \end{macrocode}
+% \IndexOpt{point}
+% \IndexOpt{intervals}
+% The final set of options.
+% \begin{macrocode}
+\DeclareAndRegister{point}
+\DeclareAndRegister{intervals}
+\def\includeOptions#1{\@for\@option:=#1\do{\dljsRegister[y]{\@option}}}
+\InputIfFileExists{libcusopt.opt}{}{}
+% \end{macrocode}
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+% \subsection{Requirements for a Library Card}
+%
+% In order to check a function out of this library, you must have
+% the \texttt{insdljs} Package. The \texttt{insdljs} package itself
+% has software requirements: (1) the \texttt{verbatim} and
+% \texttt{hyperref} packages; (2) One of the following,
+% \textsf{Distiller~5.0} or greater, \textsf{pdftex}, or
+% \textsf{dvipdfm}.
+%
+% \begin{macrocode}
+\RequirePackage{insdljs}
+% \end{macrocode}
+% After inputting \textsf{insdljs}, we define |\setdecimalpoint|, which populates
+% the text command |\aebdecimalpoint|. The text command |\aebdecimalpoint| is used in the \texttt{nodec}
+% option.
+% \begin{macrocode}
+\def\setdecimalpoint#1{\def\aebdecimalpoint{\eqbs#1}}
+\setdecimalpoint{.}
+% \end{macrocode}
+%
+% \subsection{Checkout Procedure}
+%
+% Functions can be checkout of the library by using the \texttt{dljslib} package
+% in the usual way. For example:
+%\begin{verbatim}
+%\documentclass{article}
+%\usepackage{amsmath}
+%\usepackage[pdftex,designi]{web}
+%\usepackage{exerquiz}
+%\usepackage[indefIntegral]{dljslib} % <- check out `indefIntegral'
+%\end{verbatim}
+% Here, we first use \texttt{exerquiz}, which has \texttt{insdljs} as a required package.
+% The use of this package is not limited to users of \texttt{exerquiz}, for example, we can
+% say
+%\begin{verbatim}
+%\documentclass{article}
+%\def\mydriver{dvipdfm}
+%\usepackage[\mydriver]{color}
+%\usepackage[\mydriver,colorlinks,pdfpagemode=None]{hyperref}
+%\usepackage[\mydriver]{insdljs}
+%\usepackage[indefIntegral]{dljslib} % <- check out `indefIntegral'
+%\end{verbatim}
+% However, at the time of the release of v1.0 of this package, the only functions in this
+% library are ones used by \texttt{exerquiz}.
+%
+% \subsection{Exiting the Library with your Checkouts}
+%
+% This package has an output stream, \cs{dljslib@verbatim@out},
+% that is used to write all the functions that are to be included.
+% We use a control sequence \cs{js@verbatim@out} defined in
+% \texttt{insdljs}. We also use a verbatim write from
+% \texttt{insdljs} as well, the \cs{js@verbatimwrite} environment.
+% \cs{js@verbatimwrite} writes to the output stream pointed to
+% \cs{js@verbatim@out}.
+% \begin{macrocode}
+\newwrite\dljslib@verbatim@out
+% \end{macrocode}
+% This package generates only one auxiliary file,
+% \texttt{dljslib.ljs}, which can be deleted after the document is
+% latexed. The file \texttt{dljslib.ljs} (\texttt{ljs} means
+% ``library javascripts'') and contains the functions that are
+% specified in the package options. At the end of this package,
+% the file \texttt{dljslib.ljs} is input back into the calling
+% document where the package \texttt{insdljs} takes over.
+% \begin{macrocode}
+\immediate\openout\dljslib@verbatim@out=dljslib.ljs
+% \end{macrocode}
+% \subsection{The Catalog and Checkout Mechanism}
+% \begin{macro}{library@holding}
+% This is a simple environment, it reads its parameter, and if that option was specified by the
+% user, it writes the function verbatim to the \texttt{dljslib.ljs}, otherwise, it comments out
+% that function using the \texttt{comment} environment from the \texttt{verbatim} package.
+% This environment uses, \texttt{js@verbatimwrite}, an environment
+% defined in the \texttt{insdljs} package.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \end{macro}
+%\section{The DLJS Library}
+% We finally reach the ``stacks'', the location of the actual library holdings.
+%
+% \medskip\noindent This item must always accompany the collection of functions that are to be
+% checked out. This is the beginning of the \texttt{insDLJS} environment. To continue this library analogy,
+% this of this as the ``front wrapper'' or ``front cover'' of your library selections. It contains the
+% ``name'' of the library from which you checked out your selections.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+%\subsection{The Stacks}
+% Now we reach of the beginning of the stacks. There are several sections of the library, currently,
+% \nameref{s:respfunctions} and \nameref{s:compfunctions}.
+%
+% \subsection{Response Functions}\label{s:respfunctions}
+%
+% \textbf{Used by Exerquiz.} In this section we catalog response functions. A response function is the one that
+% \cs{RespBoxMath} calls to process the user's response to a math fill-in question. See the sample file
+% \texttt{jqzspec.tex} for a detailed explanation of this type of function.
+%
+% \subsubsection{\texttt{equations}}\label{equations}
+% \IndexOpt{equations}
+% These routines process questions for which an equation is the expected answer.
+% \begin{macrocode}
+\@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,indepVar,oComp)
+{
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var success;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+% \end{macrocode}
+% \begin{macrocode}
+ 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;
+ }
+% \end{macrocode}
+% Check for commas, not permitted here. (2012/05/25)
+% \begin{macrocode}
+ var reComma=/,/;
+ if ( reComma.test(UserAns) ) {
+ eqAppAlert(\eqSyntaxErrorComma,3);
+ return null;
+ }
+% \end{macrocode}
+% \begin{macrocode}
+ var UserExpressions = UserAns.split("=");
+ var zUserAns = "("+UserExpressions[0]+")-("+UserExpressions[1] +")";
+
+% \end{macrocode}
+% If \texttt{oComp} is an object, then see if it has a \texttt{comp} property
+% \begin{macrocode}
+ var comp = ( typeof oComp == "object" ) ?
+ (typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp : oComp;
+% \end{macrocode}
+% The \texttt{comp} parameter, which has been changed to \texttt{oComp} can now be
+% an object. One property of this object is \texttt{comp}, handled above. Another
+% property is \texttt{priorParse}, this is a function that returns \texttt{null}
+% or \texttt{true}. This \texttt{priorParse} function allows for additional
+% filtering of the \texttt{zUserAns} before parsing. If it returns \texttt{true},
+% we are ok to continue, if \texttt{null}, we don't like something the user has entered,
+% and ask him/her to change it.
+% \begin{macrocode}
+ if ( typeof oComp == "object"
+ && typeof oComp.priorParse != "undefined" ) {
+% \end{macrocode}
+% Let's go ahead and allow \texttt{oComp.priorParse} be an array of functions.
+% \begin{macrocode}
+ 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;
+% convert vars to new format, if needed
+ indepVar = TypeParameters(indepVar);
+ var lambda = getNonZeroRatio (domain, indepVar, zCorrAns, zUserAns);
+ if ( lambda == null ) {
+ eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; };
+ if ( !ok2Continue ) return notifyField(false, flag, fieldname);
+ zCorrAns = lambda + "*(" + zCorrAns + ")";
+ success=randomPointCompare (n,domain,indepVar,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}
+% \end{macrocode}
+%
+% \subsubsection{\texttt{vectors}}\label{vectors}
+%
+% \IndexOpt{vectors}
+% This function attempts to process questions that have vectors
+% as answers. Note the name of the function is \texttt{ProcVec}, this is the name used to call it.
+%\begin{verbatim}
+%$\vec a + \vec b = \RespBoxMath{<4, 4, 4>}{1}{.0001}{[2,4]}*{ProcVec}$
+%\end{verbatim}
+%See also the file \texttt{jqzspec.tex} for more details.
+% \begin{macrocode}
+\@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,indepVar,oComp)
+{
+% \end{macrocode}
+% This function attempts to process questions that have vectors
+% as answers.
+% \begin{macrocode}
+ 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)
+ }
+% \end{macrocode}
+% If \texttt{oComp} is an object, then see if it has a \texttt{comp} property
+% \begin{macrocode}
+ var comp = ( typeof oComp == "object" ) ?
+ (typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp : oComp;
+% \end{macrocode}
+% \begin{macrocode}
+ CorrAns = CorrAns.replace(/[<>]/g, ""); // strip of < and >
+ UserAns = UserAns.replace(/[<>]/g, "");
+% \end{macrocode}
+% The \texttt{comp} parameter, which has been changed to \texttt{oComp} can now be
+% an object. One property of this object is \texttt{comp}, handled above. Another
+% property is \texttt{priorParse}, this is a function that returns \texttt{null}
+% or \texttt{true}. This \texttt{priorParse} function allows for additional
+% filtering of the \texttt{UserAns} before parsing. If it returns \texttt{true},
+% we are ok to continue, if \texttt{null}, we don't like something the user has entered,
+% and ask him/her to change it.
+% \begin{macrocode}
+ if ( typeof oComp == "object" && %
+typeof oComp.priorParse != "undefined" ) {
+ var retn=processSpecialParse(oComp.priorParse,UserAns);
+ if (retn==null) return null;
+ }
+% \end{macrocode}
+% Not convert each to an array
+% \begin{macrocode}
+ 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
+ indepVar = TypeParameters(indepVar);
+ 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,indepVar,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}
+% \end{macrocode}
+% \subsubsection{\texttt{setSupport}}
+%
+% \IndexOpt{setSupport}
+% We introduce two JavaScript functions \texttt{ProcRespSetNum} and
+% \texttt{ProcRespSetSym}, for handling a set of answers or a comma
+% delimited list of answers. The first function is for
+% numerical answers, the second for simple symbolic answers. The
+% demo file for these two response functions is
+% \texttt{set\_test.tex}; the examples below were taken from that file.
+%\changes{v1.9h}{2014/01/21}{Combined unordered option with setSupport option}
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+% This function can handle (math fill-in) questions whose answers are a set of numbers or a
+% comma delimited list of numbers.
+%\begin{flushleft}
+% Sample usage:
+%\begin{verbatim}
+% $(x+1)(2x-1)(x-2)^3 = 0$, $x = \RespBoxMath[\rectW{.75in}\textSize{0}]
+% {-1, 1/2, 2, 2, 2}{1}{.0001}{[0,1]}*{ProcRespSetNum}$
+%\end{verbatim}
+%\end{flushleft}
+% \begin{macrocode}
+function ProcRespSetNum(flag,CorrAns,n,epsilon,domain,indepVar,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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(",");
+% \end{macrocode}
+% Make sure all of UserAns are numbers
+% \begin{macrocode}
+ 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,indepVar,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 + " >";
+ }
+}
+% \end{macrocode}
+% Input an order pair of numbers, determine if it satisfies an equation. This problem
+% type is new as there are ``infinitely many answers.'' If we pose the question
+% ``Enter a point that lies on the line $2x+3y=6$.'' The user enters an ordered pair
+% of numbers. The CorrAns that is passed is $2x+3y-6$, and we test the user's input
+% to see if the expression evaluates to zero.
+%
+% \begin{macrocode}
+% \end{macrocode}
+% This function can handle simple symbolic answers. The variable list, \texttt{inderVar}, should
+% be the ``universal set'' of the problem.
+% \begin{flushleft}
+% Sample usage:
+%\begin{verbatim}
+% \def\U{a,b,c,d,e,f,g} % define a universal set
+% $A \cap B = \RespBoxMath[\AddAAFormat{\formatAsSet}
+% \rectW{.75in}\textSize{0}
+% ]{c,d}(\U){1}{.0001}{[0,1]}*{ProcRespSetSym}$
+%\end{verbatim}
+% \end{flushleft}
+% \begin{macrocode}
+function ProcRespSetSym(flag,CorrAns,n,epsilon,domain,indepVar,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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 = indepVar.split(",");
+ for ( var _i=0; _i < _V.length; _i++) {
+ eval ( "var "+ _V[_i] + " = \"" + _i + "\";");
+ }
+% \end{macrocode}
+% Make sure all of UserAns are numbers
+% \begin{macrocode}
+ 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;
+ }
+% console.println( aUserAns.toSource() );
+ var success = (numCorrect == aCorrAns.length);
+% var success = (numCorrect == aCorrAns.length) ? true : false;
+% if ( success == null ) return syntaxError(), null;
+ return notifyField(success, flag, fieldname);
+}
+% \end{macrocode}
+% The function \texttt{ProcRespListFormula} can be used to process a comma-delimited
+% \emph{ordered} list of expressions.
+% \begin{macrocode}
+function ProcRespListFormula(flag,CorrAns,n,epsilon,domain,%
+indepVar,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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(/^,/, "");
+ event.value = UserAns;
+ 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,indepVar,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);
+}
+% \end{macrocode}
+% The JS function \texttt{ProcRespSetFormula} will grade an
+% unordered list of formulas, such as
+% \texttt{x}, \verb!x^2!, \verb!x^3!. The code is a modification of
+% \texttt{ProcRespListFormula}. The idea is to split the user and correct
+% answers and then compare the first correct answer with each of the
+% user answers in turn. If there is a match, swap that user answer
+% with the first user answer. Then compare the second correct answer
+% with the rest of the user answers, and continue in that way.
+%\begin{flushleft}
+% Usage:
+%\begin{verbatim}
+%\def\formulasetbox#1#2#3{\RespBoxMath{#1}(#2)[\thequestionno]{10}
+% {1.0E-15}{#3}*{ProcRespSetFormula}}
+%\formulasetbox{x,x^2,x^3}{x}{[1,2]}
+%\end{verbatim}
+%\end{flushleft}
+% \begin{macrocode}
+function ProcRespSetFormula(flag,CorrAns,n,epsilon,%
+domain,indepVar,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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(/^,/, "");
+ event.value = UserAns;
+ 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,indepVar,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}
+% \end{macrocode}
+% \subsubsection{\texttt{complex}}
+% \IndexOpt{complex}The function \texttt{ProcRespComplex} supplies support for answers that are
+% complex numbers. The function test whether there is exactly one \texttt{i}
+% in the expression, if not, a message appears reminding the user that the form
+% of a complex number is \texttt{a + bi}. The function adds \texttt{i} as one of the
+% variables, and appends \texttt{x[0,1]} to the domain specification. This might be a
+% problem if the document author uses the old style of specifying the domain; use
+% \texttt{[a,b]} to specify the domain, we change this to \texttt{[a,b]x[0,1]}.
+%
+% The rest of the function is like a multiv-ariable problem. Seems to work ok.
+% Here is a sample syntax:
+%\begin{verbatim}
+% $(3+3i)(4+5i) = \RespBoxMath{-3+27i}{3}{0.0001}{[0,1]}*{ProcRespComplex}$
+%\end{verbatim}
+%The correct answer must be supplied with the \cs{RespBoxMath}, and is used to compare
+% with what the student enters.
+% \changes{v1.7}{2007/10/12}
+%{%
+% Added support for answer that are complex numbers.
+%}
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+% Defined (11/11/08). The \texttt{cis} function is undefined unless the \texttt{complex} option is used.
+% \begin{macrocode}
+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,indepVar,oComp)
+{
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var i, success;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ CorrAns = stripWhiteSpace (CorrAns);
+ UserAns = stripWhiteSpace (UserAns); // sets ok2Continue
+ if ( !ok2Continue ) return null;
+ indepVar+="i";
+ domain+="x[0,1]";
+% \end{macrocode}
+% We don't support powers of i
+% \begin{macrocode}
+ if (/(\b|[^a-zA-Z])i\^/.test(UserAns)) {
+ eqAppAlert(\complexPowerAlertMsg,3);
+ return null;
+ }
+% \end{macrocode}
+% Powers of \texttt{cis} function are not supported at this time.
+% \begin{macrocode}
+% var re=/cis\^/
+ if ( /cis\^/.test(UserAns) ) {
+ eqAppAlert(\complexCisAlertMsg,3);
+ return null;
+ }
+% \end{macrocode}
+% (2012/05/25) Check for commas, not permitted here.
+% \changes{v1.9f}{2012/11/17}{Moved this block higher, before testing for comma.}
+% \begin{macrocode}
+ var reComma=/,/;
+ if ( reComma.test(UserAns) ) {
+ eqAppAlert(\eqSyntaxErrorComma,3);
+ return null;
+ }
+% \end{macrocode}
+% To make the \texttt{cis} function work, we've defined it to be a function of two variables,
+% \texttt{cis(x,i)}, but the user does not need to know that. We search for \texttt{cis(<arg>)} and
+% replace with \texttt{cis(<arg>,i)}. I hope this works.
+% \begin{macrocode}
+ UserAns=changeArgs4Cis(UserAns);
+% \end{macrocode}
+% ...and do the same thing for the correct answer.
+% \begin{macrocode}
+ CorrAns=changeArgs4Cis(CorrAns);
+% \end{macrocode}
+% The complex option is not meant to be an option to do complex arithmetic, but only
+% to accept a complex number as an answer. So, we do not accept an answer with two
+% or more i's in it.
+% \begin{macrocode}
+ 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;
+ }
+ }
+% \begin{macrocode}
+ UserAns = ParseInput(UserAns);
+ CorrAns = ParseInput(CorrAns);
+ indepVar = TypeParameters(indepVar);
+ if (!ok2Continue) return null;
+ success=randomPointCompare(
+ n,domain,indepVar,epsilon,CorrAns,UserAns,comp);
+ if ( success == null ) { eqAppAlert(%
+\eqSyntaxErrorUndefVar,3); return null; }
+ return notifyField(success, flag, fieldname);
+}
+% \end{macrocode}
+% \texttt{ProcRespListComplex}, contributed by Bruce Wagner, extends
+% \texttt{ProcRespComplex} to lists; an ordered listing of complex responses.
+% Sample syntax:
+%\begin{verbatim}
+%If $z=4(\cos x+i\sin x)$, compute $z^2$ and $z^3$, in that order.
+%\RespBoxMath{16*cis(2x),64*cis(3x)}{4}{0.0001}{[0,1]}*{ProcRespListComplex}
+%\end{verbatim}
+% \begin{macrocode}
+function ProcRespListComplex(flag,CorrAns,n,epsilon,%
+domain,indepVar,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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;
+ 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;
+ event.value = aUserAns[i];
+ var retn = ProcRespComplex(
+ flag,aCorrAns[i],n,epsilon,domain,indepVar,oComp);
+ event.value = UserAns;
+ if ( retn == null ) return null;
+ numCorrect += (retn) ? 1 : 0;
+ }
+ var success = (numCorrect == aCorrAns.length);
+ return notifyField(success, flag, fieldname);
+}
+% \end{macrocode}
+% \texttt{ProcRespSetComplex}, contributed by Bruce Wagner, extends
+% \texttt{ProcRespComplex} to sets; an un-ordered listing of complex responses.
+%\begin{verbatim}
+% Find all real and complex solutions of the equation $x^2=-9$. \\
+% Express your answer(s) in rectangular form $a+bi$.
+% \RespBoxMath{3i,-3i}{4}{0.0001}{[0,1]}*{ProcRespSetComplex}
+%\end{verbatim}
+% \begin{macrocode}
+function ProcRespSetComplex(flag,CorrAns,n,epsilon,%
+domain,indepVar,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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++) {
+ event.value = aUserAns[j];
+ var retn = ProcRespComplex(%
+flag,aCorrAns[i],n,epsilon,domain,indepVar,oComp);
+ event.value = UserAns;
+ 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}
+% \end{macrocode}
+% \subsubsection{\texttt{satisfyEq}}
+%
+% \IndexOpt{satisfyEq} These functions are used for questions where the student is asked to enter one or more
+% points that satisfy a given equation $ F = G $. For these types of problems, there
+% are infinity many correct answers.
+%
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+%\DescribeMacro{ProcRespEvalEq} is not based on random point generation, as
+%all the other \textsf{exerquiz} functions are. Here, the user enters
+%numerical data, the function then verifies the data entered satisfies the
+%given equation. The role of \texttt{CorrAns} has changed. If the equation
+%is $ F = G $, then $ F - G $ should be passed as the
+%\texttt{CorrAns} variable. This function obeys the value of
+%\texttt{epsilon} but ignores the number of iterations (\verb!{1}! below),
+%and the domain of the variables (\cs{ixdna} below) \cs{ixdna} is a special
+%command that can be used for this parameter, in this context only. The \texttt{oComp}
+%parameter is also ignored.
+%\medskip\noindent\textbf{Sample Use.}
+%\begin{verbatim}
+%\item Enter a point that lies on the line $2x+3y=6$,\\[3pt]
+% $\text{A point is }\RespBoxMath[\rectW{.75in}
+% \textSize{0}]{2x+3y-6}(xy){1}{.0001}{[0,1]x[0,1]}*{ProcRespEvalEq}
+% \CorrAnsButton{various, such as (0,2)}$
+%\end{verbatim}
+% The demo document is \texttt{satisfy\_eq.tex}.
+%\changes{v1.9}{2011/06/24}{Added \texttt{ProcRespEvalEq} in response to
+% a problem posed by David Arnold.}
+% \begin{macrocode}
+var bNotifyWrngNumEntries=\satisfyEqNotify;
+function ProcRespEvalEq(flag,CorrAns,n,epsilon,domain,indepVar,oComp){
+ var retn=_ProcRespEvalEq(true,flag,CorrAns,n,epsilon,indepVar);
+ return retn;
+}
+% \end{macrocode}
+% \DescribeMacro{ProcRespEvalEqNonZero} is the same as \texttt{ProcRespEvalEq}, but requires
+% all entries to be nonzero.
+% \begin{macrocode}
+function ProcRespEvalEqNonZero(flag,CorrAns,n,epsilon,%
+domain,indepVar,oComp) {
+ var retn=_ProcRespEvalEq(false,flag,CorrAns,n,epsilon,indepVar);
+ return retn;
+}
+% \end{macrocode}
+% \begin{macrocode}
+function _ProcRespEvalEq(allowzero,flag,CorrAns,n,epsilon,indepVar)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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(",");
+% \end{macrocode}
+% Make sure all of UserAns are numbers
+% \begin{macrocode}
+ 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(indepVar);
+ 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);
+ }
+% \end{macrocode}
+% The following code is taken from \texttt{diffCompare}, it uses a "safe" technique
+% for evaluating an expression.
+% \begin{macrocode}
+ 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);
+}
+% \end{macrocode}
+% This function takes a semi-colon delimited list of ordered n-tuples.
+% The \texttt{CorrAns} parameter is of the form \texttt{n\_pairs; F-G}
+% \begin{macrocode}
+function ProcRespEvalEqList(flag,CorrAns,n,epsilon,domain,%
+indepVar,oComp) {
+ var retn=_ProcRespEvalEqList(true,flag,CorrAns,n,epsilon,indepVar);
+ return retn;
+}
+function ProcRespEvalEqListNonZero(flag,CorrAns,n,epsilon,domain,%
+indepVar,oComp){
+ var retn=_ProcRespEvalEqList(false,flag,CorrAns,n,epsilon,indepVar);
+ return retn;
+}
+function _ProcRespEvalEqList(allowzero,flag,CorrAns,n,epsilon,indepVar)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ if (!ok2Continue) return null;
+ var success;
+% \end{macrocode}
+% Remove any semicolons at end of line, then remove any duplicated semicolons.
+% This is done to prevent simple errors by user input.
+% \begin{macrocode}
+ UserAns=UserAns.replace(/;+$/,"");
+ UserAns=UserAns.replace(/;+/g,";");
+ var aUsersArray = new Array();
+% \end{macrocode}
+% Split the user's answer up by the delimiting semi-colon.
+% \begin{macrocode}
+ var aUserAns = UserAns.split(";");
+% \end{macrocode}
+% First component is the number of points expected, second component is \texttt{F(x)-G(x)}
+% \begin{macrocode}
+ var aCorrAns = CorrAns.split(";");
+ var l = aCorrAns[0];
+% \end{macrocode}
+% If the user gave too many answers, broadcast alert.
+% \begin{macrocode}
+ if (l < aUserAns.length )
+ return eqAppAlert(\eqTooManyEntries,3), null;
+% \end{macrocode}
+% If the user gave too few answers, broadcast alert.
+% \begin{macrocode}
+ if (l > aUserAns.length )
+ return eqAppAlert(\eqTooFewEntries,3), null;
+ var _v = TypeParameters(indepVar);
+ var _V = _v.split(","); // e.g. _V[0] = "i:x"
+% \end{macrocode}
+% \texttt{\_n} is the number of variables
+% \begin{macrocode}
+ var _n = _V.length;
+% \end{macrocode}
+% \texttt{testFunc} is a random linear function of the form
+% \texttt{ax+by+...}, where \texttt{a} and \texttt{b} are selected at random.
+% \begin{macrocode}
+ var testFunc="";
+ for (var _i=0; _i < _n; _i++)
+ testFunc += ("+"+(Math.random()*9)+"*"+_V[_i].charAt(2));
+% \end{macrocode}
+%\changes{v1.9d}{2012/05/13}{Introduced \texttt{iCorrect} variable}
+% Introduced \texttt{iCorrect} variable to correct check each of the
+% user's pairs of responses.
+% \begin{macrocode}
+ var isCorrect=1;
+ for (var pair=0; pair< l; pair++) {
+% \end{macrocode}
+% We require each ordered pair to be enclosed in parentheses
+% \begin{macrocode}
+ if ( (aUserAns[pair].charAt(0) != "\(") || %
+(aUserAns[pair].charAt(aUserAns[pair].length-1) != "\)"))
+ return eqAppAlert(\eqSyntaxErrorNoParens,3), null;
+% \end{macrocode}
+% Strip away the parentheses, so for example, \texttt{UserAnsPair="3,5"}
+% \begin{macrocode}
+ UserAnsPair=aUserAns[pair].substring(1,aUserAns[pair].length-1);
+% \end{macrocode}
+% \texttt{aUserAnsPair} an the array that contains the components of
+% \texttt{aUserAns[pair]}
+% \begin{macrocode}
+ var aUserAnsPair = UserAnsPair.split(",");
+% \end{macrocode}
+% See if each component is a number
+% \begin{macrocode}
+ for ( var i=0; i < aUserAnsPair.length; i++) {
+ try { if (isNaN(eval(aUserAnsPair[i]))) %
+return syntaxError(), null;
+% \end{macrocode}
+%\changes{v1.9d}{2012/05/13}{Corrected reference, changed
+%\texttt{aUserAns} to \texttt{aUserAnsPair}}
+% \texttt{(2012/05/13)} Corrected reference, changed \texttt{aUserAns} to \texttt{aUserAnsPair}
+% \begin{macrocode}
+ if (!allowzero && (eval(aUserAnsPair[i])==0))
+ return eqAppAlert(\eqNonzeroEntries,3), null;
+ } catch(e) { return syntaxError(), null; }
+ }
+% \end{macrocode}
+% If the number of components does not match the number of variables, this is an
+% error. Give the user a chance to correct it.
+% \begin{macrocode}
+ if ( aUserAnsPair.length != _n) {
+ if (bNotifyWrngNumEntries)
+ return eqAppAlert(\wrongNumEntriesMsg,3), null;
+ else
+ return notifyField(false, flag, fieldname);
+ }
+% \end{macrocode}
+% Evaluate each component of the user's answer.
+% \begin{macrocode}
+ 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])+";");
+ }
+% \end{macrocode}
+% \texttt{UserInput} is misnamed, this is the answer the author provides,
+% for example, \texttt{2x+3y-6}. We parse it, then evaluate it (using the values
+% of the variables computed above.
+% \begin{macrocode}
+ var UserInput=ParseInput(aCorrAns[1]);
+ var UserAns=eval(UserInput);
+% \end{macrocode}
+% We also evaluate the test function \texttt{testFunc} for the values of the
+% variables computed above. We store the result in \texttt{aUsersArray}.
+% \begin{macrocode}
+ aUsersArray[pair]=eval(testFunc);
+% \end{macrocode}
+% If less than \texttt{epsilon}, we set \texttt{success} to \texttt{true},
+% or we return \texttt{false}
+% \begin{macrocode}
+ success=(Math.abs(UserAns) < epsilon)?true:false;
+% \end{macrocode}
+% If \texttt{success} is true, we multiply by 1, else we multiply by 0
+% \begin{macrocode}
+ isCorrect *=Number(success);
+ }
+% \end{macrocode}
+% If \texttt{isCorrect} is \texttt{1}, all comparisons were successful.
+% \begin{macrocode}
+ success=(isCorrect==1);
+% \end{macrocode}
+% Sort \texttt{aUsersArray} from least to greatest
+% \begin{macrocode}
+ var aOrderArray = aUsersArray.sort(function(a,b){return a-b});
+ var m = aUsersArray.length - 1;
+% \end{macrocode}
+% See if any two consecutive entries differ by a little, if not, we'll
+% say the two answers are the same and ask the user for distinct entries.
+% \begin{macrocode}
+ for (i=0; i<m; i++)
+ if (Math.abs(aUsersArray[i]-aUsersArray[i+1])<.0001)
+ return eqAppAlert(\eqDuplEntries,3), null;
+% \end{macrocode}
+% If we have not exited earlier, we exit now with \texttt{success} as \texttt{true} or \texttt{false}.
+% \begin{macrocode}
+ return notifyField(success, flag, fieldname);
+}
+\end{newsegment}
+\end{library@holding}
+% \end{macrocode}
+% \subsubsection{\texttt{useGermanNums}}
+% \IndexOpt{useGermanNums}A simple \texttt{ProcResp()} for processing numbers entered in a German format: 1234,56.
+% The Germans have a block delimiter of period or space (1.234,56 or 1 234,56).
+% The period is not supported and causes an alert box.
+%\changes{v1.9g}{2014/01/14}{Added a proc to accept the comma for the decimal mark}
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+% \DescribeMacro{ProcRespNumsDe} This segment only has one ProcResp function in it,
+% this is named \texttt{ProcRespNumsDe}.
+% \begin{macrocode}
+function ProcRespNumsDe (flag,CorrAns,n,epsilon,%
+domain,indepVar,oComp) {
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+% \end{macrocode}
+% This is the only change over the \texttt{ProcResp}, we call
+% \texttt{\_ProcRespNumsDe}.
+% \begin{macrocode}
+ var success = _ProcRespNumsDe(flag,CorrAns,UserAns,n,%
+epsilon,domain,indepVar,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,indepVar,oComp) {
+ ok2Continue = true;
+ CorrAns = ParseInput(CorrAns);
+ if (!ok2Continue) {
+ eqAppAlert("Syntax error in author's answer! Check console.", 3);
+ return null;
+ }
+% \end{macrocode}
+% Save \texttt{UserAns} as \texttt{UserAnsSave} and pass \texttt{UserAnsSave} to
+% \texttt{processSpecialParse} instead of \texttt{UserAns}.
+% \begin{macrocode}
+ var UserAnsSave=UserAns;
+ var reDe=/,/g;
+ var reDec=/\./g;
+% \end{macrocode}
+% Deny use of the traditional decimal point (.)
+% \begin{macrocode}
+ if ( reDec.test(UserAns) ) {
+ eqAppAlert(\noDecPtGerMsg,3);
+ return -1;
+ }
+% \end{macrocode}
+% Replace all occurrences of \texttt{","} with \texttt{"."}, for internal use
+% \begin{macrocode}
+ 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") ) {
+% \end{macrocode}
+% We pass \texttt{UserAnsSave} in case author uses \texttt{priorParse} etc.
+% \begin{macrocode}
+ var retn=processSpecialParse(oComp.priorParse,UserAnsSave);
+ if (retn==null) return -1;
+ }
+ var reComma=/,/;
+ if ( reComma.test(UserAns) ) {
+ eqAppAlert(\eqSyntaxErrorComma,3);
+ return -1;
+ }
+ UserAns = ParseInput(UserAns);
+ indepVar = TypeParameters(indepVar);
+ if (!ok2Continue) return null;
+ var success=randomPointCompare(n,domain,indepVar,%
+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}
+% \end{macrocode}
+% The following functions, which are \texttt{ProcResp}-types, were written for an online
+% grading system being developed by Drs.\ Bruce Wagner and David Arnold, and Mr.
+% Jacob Miles-Prystowsky. The descriptions given below were provided by the authors.
+% \begin{macrocode}
+\begin{library@holding}{unordered}
+% \end{macrocode}
+% \subsubsection{\texttt{unordered}}
+% \IndexOpt{unordered}The \texttt{unordered} option is deprecated.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+% \subsubsection{\texttt{factors}}
+% \IndexOpt{factors}\texttt{ProcRespFactors} is for grading polynomial factoring
+% questions. For example, if a polynomial factors as
+% \verb!-5x^2(x-4)(x+2)!, then the answer is only unique up to the order of
+% factors and a change of sign on an even number of factors. For
+% example, it could also be written as \verb!-5x^2(x+2)(x-4)! or
+% \verb!5x^2(-x+4)(x+2)! or \verb!-5(x-4)(x+2)x^2!, etc. This script
+% should grade all of these correctly. (However, it will not allow
+% something like \verb!-(x-4)(x+2)5x^2!. The leading coefficient, if
+% there is one, must be placed at the beginning, which conforms to
+% our usual conventions.)
+%\begin{flushleft}
+% Usage:
+%\begin{verbatim}
+%\def\factorsbox#1#2#3{%
+% \RespBoxMath{#1}(#2){4}{1.0E-15}{#3}*{ProcRespFactors}}
+%Some question requiring a factored response
+%\factorsbox{3x(x^2+1)(2x-1)^3}{x}{[0,1]}
+%\end{verbatim}
+%\end{flushleft}
+% (2014/08/08) Rewrote portions of Bruce's code,
+% introduce the \texttt{getFactorArray} function, giving better
+% parsing and error feedback.
+%\changes{v1.9j}{2014/08/08}{Rewrote portions of Bruce's code,
+% introduce the function \texttt{getFactorArray}, giving better
+% parsing and error feedback.}
+% \begin{macrocode}
+\begin{newsegment}{dljslib: Contrib - Processing Factors as Responses}
+function ProcRespFactors(flag,CorrAns,n,epsilon,domain,indepVar,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ if (!ok2Continue) return null;
+ var retn = _ProcResp(flag,CorrAns,UserAns,n,epsilon,%
+domain,indepVar,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,indepVar,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,indepVar,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);
+}
+% \end{macrocode}
+% This function identifies the factors of a factored polynomial, does some
+% rearrangement, and returns an array of the factors.
+% \begin{macrocode}
+function getFactorArray(str) {
+ var aFactors=new Array();
+ var i,j,front,factor,back,bInitGrped=true;
+% \end{macrocode}
+% First, see of the first factor is grouped.
+% \begin{macrocode}
+ if (str.charAt(0) != "\(" ) {
+% \end{macrocode}
+% Not grouped, we'll scan forward for the next left paren and
+% push the whole thing onto aFactors.
+% \begin{macrocode}
+ bInitGrped=false;
+ i=str.indexOf("\(");
+ if ( i != -1 ) {
+ aFactors.push(str.substring(0,i));
+%console.println("Initial factor: "+ str.substring(0,i));
+% \end{macrocode}
+% Reset the string, removing what we've pushed onto aFactos
+% \begin{macrocode}
+ str=str.substring(i);
+%console.println("new str="+str);
+ }
+ }
+%var scan=0
+% \end{macrocode}
+% We now identify grouped factors, push them onto the aFactors array
+% and reset the string.
+% \begin{macrocode}
+ while ( (i=str.indexOf("\(")) != -1 ) {
+%console.println("scan "+(++scan));
+ j=FindBalP(str,i,true);
+ front=str.substring(0,i);
+ factor=str.substring(i,j+1);
+ back = str.substring(j+1);
+% \end{macrocode}
+% See if this factor has multiplicities, if so, combine it with the factor
+% and push onto aFactors
+% \begin{macrocode}
+ if ( back.charAt(0) == "\^" ) {
+ getExp=back.match(/\^\d+/);
+ theExp=back.substring(0,getExp[0].length);
+ factor+=(theExp);
+ aFactors.push(factor);
+%console.println("Adding factor: " + factor);
+ back=back.substring(getExp[0].length);
+ } else {
+ aFactors.push(factor);
+%console.println("Adding factor: " + factor);
+ }
+ str=front + back;
+%console.println("new str="+str);
+% \end{macrocode}
+% Before we finish with this factor, we'll check whether this is an
+% enclosed monomial eg \verb!(-2x^2)!, the sign may not be present, but
+% we need to test for it. We test for a sign, and beyond that, we search
+% \texttt{+/-}. If we find \texttt{+/-}, we emit an warning box and we
+% return a \texttt{-1}, same as null, but indicates an alert has been given.
+% \begin{macrocode}
+ if ( factor.charAt(1)=="-" || factor.charAt(1)=="+" )
+ factor=factor.substring(2);
+ if (!/[+-]/.test(factor)) {
+ eqAppAlert(\noNotEncloseMonos, 3);
+ return -1;
+ }
+ }
+%console.println("finished with scan step");
+% \end{macrocode}
+% Added the initial un-grouped factor and exhausted all grouped factors
+% what's left over is out of place
+% \begin{macrocode}
+ if (/[A-Za-z]/.test(str)) {
+% \end{macrocode}
+% want to pluck off the variable with optional power only, any constant
+% is misplaced
+% \begin{macrocode}
+ 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+"\)";
+%console.println("Modified first factor: " + aFactors[0]);
+ } else {
+ aFactors.push(str);
+%console.println("adding factor: " +str);
+ str="";
+ }
+ }
+% \end{macrocode}
+% finally be sure this factor is not just a \texttt{"+"} or \texttt{"-"}
+% \begin{macrocode}
+ if (aFactors[0]=="-"||aFactors[0]=="+"||isFinite(aFactors[0])){
+ factor=aFactors.shift();
+ aFactors[0]=factor+aFactors[0];
+ }
+%console.println("aFactors: " + aFactors.toSource());
+%console.println("Final str="+str);
+% \end{macrocode}
+% If \texttt{str} is non-empty, that usually means there is a constant left over
+% that was misplaced in the middle or end of the factorization. Otherwise, we return
+% the aFactors array.
+% \begin{macrocode}
+ return (str!="") ? null : aFactors
+}
+\end{newsegment}
+\end{library@holding}
+% \end{macrocode}
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+% \subsubsection{\texttt{point}}
+% \IndexOpt{point}The JS function \texttt{ProcPoint} is an almost exact copy of your
+% \texttt{ProcVec}, but uses parentheses instead of angle brackets as
+% delimiters. This is for questions that have a point $(x,y)$ as the
+% answer.
+%\begin{flushleft}
+% Usage:
+%\begin{verbatim}
+%\def\formulapointbox#1#2#3{%
+% \RespBoxMath{#1}(#2){4}{1.0E-15}{#3}*{ProcPoint}}
+%Some question requiring a point (ordered pair) response
+%\formulapointbox{(e^t,te^t)}{t}{[0,1]}
+%\end{verbatim}
+%\end{flushleft}
+% \begin{macrocode}
+\begin{newsegment}{dljslib: Contrib - Processing a Point Response}
+function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVar,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)) {
+ return eqAppAlert(\pointErrorMsgi, 3), null;
+ }
+ if (!CkBalP(UserAns,"(",")")) {
+ return eqAppAlert(\pointErrorMsgii, 3), null;
+ }
+% \end{macrocode}
+% If \texttt{oComp} is an object, then see if it has a \texttt{comp} property
+% \begin{macrocode}
+ var comp = ( typeof oComp == "object" ) ?
+ (typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp : oComp;
+ CorrAns = CorrAns.replace(/[()]/g, ""); // strip off ( and )
+ UserAns = UserAns.replace(/[()]/g, "");
+% \end{macrocode}
+% The \texttt{comp} parameter, which has been changed to \texttt{oComp} can now be
+% an object. One property of this object is \texttt{comp}, handled above. Another
+% property is \texttt{priorParse}, this is a function that returns \texttt{null}
+% or \texttt{true}. This \texttt{priorParse} function allows for additional
+% filtering of the \texttt{UserAns} before parsing. If it returns \texttt{true},
+% we are ok to continue, if \texttt{null}, we don't like something the user has entered,
+% and ask him/her to change it.
+% \begin{macrocode}
+ if ( typeof oComp == "object" &&
+ typeof oComp.priorParse != "undefined" ) {
+% \end{macrocode}
+% Let's go ahead and allow \texttt{oComp.priorParse} be an array of functions.
+% \begin{macrocode}
+ 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;
+ }
+ }
+% Not convert each to an array
+ 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;
+ }
+ indepVar = TypeParameters(indepVar);
+ 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,indepVar,epsilon,aCorrAns[i],aUserAns[i],comp)
+ if ( success == null ) {
+ eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; }
+ truthCnt *= (success) ? 1 : 0;
+%- if (success) truthCnt +=1;
+ }
+% return notifyField((truthCnt == 3), flag, fieldname);
+ return notifyField(!!truthCnt, flag, fieldname);
+}
+\end{newsegment}
+\end{library@holding}
+% \end{macrocode}
+% \begin{macrocode}
+\begin{library@holding}{intervals}
+% \end{macrocode}
+% \subsubsection{\texttt{intervals}}
+% \IndexOpt{intervals}\texttt{ProcRespIntervals} is for grading questions that have an
+% interval or union of intervals as the answer. Example answers
+% include:
+%\begin{verbatim}
+%(2,3)
+%[2,3]
+%(-inf,4)
+%(-inf,4]
+%(6,inf)
+%[6,inf)
+%(2,3)U[8,9)
+%(-inf,6)U(9,inf)
+%(-inf,6]U[7,8)U(9,inf)
+%\end{verbatim}
+% Here I've used "inf" for infinity and the capital letter "U" for
+% the union symbol. Note also that intervals in a union can appear
+% in any order.
+%\begin{flushleft}
+%The \texttt{ProcRespIntervals} function has been modified by Robert Marik
+%to allow intervals with end points \texttt{ln(2)}, \texttt{exp(4)} or \texttt{sqrt(3)}.
+%Thus, intervals of the form
+%\verb!(ln(2),ln(3)]U(exp(10),inf)! are recognized by this procedure.
+%\medskip\noindent
+% Usage:
+%\begin{verbatim}
+%\def\intervalbox#1{\RespBoxMath{#1}(infU){10}
+% {1.0E-4}{[0,1]x[0,1]x[0,1]x[0,1]}*{ProcRespIntervals}}
+%Some question requiring an interval or union of intervals
+%\intervalbox{(-inf,4]U[5,inf)}
+%\end{verbatim}
+% To avoid problems with unbalanced parentheses, as in this example,
+%\verb!\intervalbox{(-inf,4)U[5,inf)}!.
+% Here there is only one right parenthesis and two left parentheses. As a
+% workaround, escape the odd
+% parenthesis, like so
+%\verb!\intervalbox{(-inf,4)U[5,inf\eqbs)}!,
+% where \cs{eqbs} is defined in the \textsf{insdljs} package.
+%\end{flushleft}
+% \begin{macrocode}
+\begin{newsegment}{dljslib: Contrib - Processing Interval Responses}
+function ProcRespIntervals(flag,CorrAns,n,epsilon,domain,indepVar,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ UserAns = UserAns.replace(/inf/g, "x");
+ CorrAns = CorrAns.replace(/inf/g, "x");
+ indepVar = "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,indepVar,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,indepVar,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}
+% \end{macrocode}
+%
+% \subsection{Compare Functions}\label{s:compfunctions}
+%
+% \textbf{Used by Exerquiz.} A compare function is a JavaScript that compares the author's answer
+% with the user's answer. There may be a need for compare functions other than the default one provided
+% by \texttt{exerquiz}.
+%
+% \subsubsection{\texttt{indefIntegral}}\label{indefIntegral}
+% \IndexOpt{indefIntegral}The answer to an indefinite integral is non-unique; however all answers differ by a constant.
+% This compare function is used with indefinite integrals. See \texttt{jqzspec.tex} for an
+% example of the use of this function. Note the name of the function is \texttt{indefCompare}, this
+% is the name you use to call the function. An example of usage of this function can be found in
+% the sample file \texttt{jslib\_ex.tex} that comes with the Acro\TeX{} Bundle; from that file we
+% have:
+%\begin{verbatim}
+%$\displaystyle\int\sin(x)\,dx =
+% \RespBoxMath{-cos(x)}[intSin]{4}{.0001}{[0,1]}[indefCompare]$
+%\end{verbatim}
+% See also the file \texttt{jqzspec.tex} for more details.
+% \begin{macrocode}
+\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 is used to designate an arbitrary constant
+ 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}
+% \end{macrocode}
+%
+% \subsection{Filter User's Responses}
+% The following two function were contributed by Ross Moore and Frances
+% Griffin, and were taken from their
+% \href{http://rutherglen.ics.mq.edu.au/~macqtex/}{MacQ\TeX} online testing
+% system. See the sample file \texttt{integer\_tst.tex} for sample usage.
+% These two functions take \texttt{UserAns} as a parameter and return
+% \texttt{null} or \texttt{true} to signal the user expression is not an
+% acceptable response, or that it's ok for processing, respectively.
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+% \subsubsection{\texttt{nodec}}
+% \IndexOpt{nodec}Do not allow the use of decimal numbers. (Just searches of ``.''.)
+% \begin{macrocode}
+\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{macrocode}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \subsubsection{\texttt{noBinFac}}
+% \IndexOpt{noBinFac}Disallow binomial coefficients and factorials in math fill-ins.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+% \subsubsection{\texttt{limitArith}}
+% \IndexOpt{limitArith}A collection of functions to limit the use of the arithmetic operations and to limit
+% the use of the trig functions. These functions are called through an optional parameter
+% of \cs{RespBoxMath}, as illustrated below and in the demo document \texttt{limarith.tex}.
+% \begin{macrocode}
+\begin{newsegment}{dljslib: Limit Arithmetic and Built in Functions}
+% \end{macrocode}
+% The \texttt{DecimalsOnly} is a function that takes only numbers, either integer or decimal.
+% Usage
+%\begin{verbatim}
+% $ 2.3 + 4.5=\RespBoxMath[\rectW{.75in}\textSize{0}]{6.8}{1}{.0001}{[0,1]}
+% [{priorParse: DecimalsOnly }]\CorrAnsButton{6.8}$
+%\end{verbatim}
+% \begin{macrocode}
+function DecimalsOnly(UserAns) {
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ if( !isFinite( UserAns ) ) {
+ eqAppAlert(\DecimalsOnlyErrorMsg,3);
+ return null;
+ }
+ return true;
+}
+% \end{macrocode}
+% The function \texttt{NoProducts} requires that \texttt{ImplMulti} be taken.
+% An example of usage is
+%\begin{verbatim}
+%$ 3/4 = \RespBoxMath[\rectW{.75in}\textSize{0}]{.75}{1}{.0001}{[0,1]}
+% [{priorParse: new Array(NoDivision, NoProducts) }]\CorrAnsButton{.75}$
+%\end{verbatim}
+% In the above example, we first call \texttt{NoDivision} then \texttt{NoProducts}. This is
+% the way you can chain these filtering functions together.
+% \begin{macrocode}
+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;
+}
+% \end{macrocode}
+% This function, as the name implies, denies the use of both addition and subtraction.
+% The algorithm I use here is that if a plus or minus follows anything but a left parenthesis,
+% we assume it is a binary operation of addition or subtraction, respectively.
+%\begin{verbatim}
+%$ 5.1 - 3.2 = \RespBoxMath[\rectW{.75in}\textSize{0}]{1.9}{1}{.0001}{[0,1]}
+% [{priorParse: NoAddOrSub }]\CorrAnsButton{1.9}$
+%\end{verbatim}
+% \begin{macrocode}
+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;
+}
+% \end{macrocode}
+% Deny user the use of all arithmetic functions, including exponents.
+% \begin{macrocode}
+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;
+}
+% \end{macrocode}
+% Deny user the use of exponents.
+% \begin{macrocode}
+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;
+}
+% \end{macrocode}
+% Deny user the use all trig functions, as well as the constants \texttt{PI} and \texttt{pi},
+% which are aliases for $\pi$. Example:
+%\begin{verbatim}
+%$ \sin(\pi/4) = \RespBoxMath[\rectW{.75in}\textSize{0}]
+% {sqrt(2)/2}{1}{.0001}{[0,1]}[{priorParse: NoTrigAllowed }]
+% \CorrAnsButton{sqrt(2)/2}$
+%\end{verbatim}
+%You can obviously build similar function to deny the use of logs or square roots, for example.
+%\changes{v1.5}{2007/02/05}
+%{
+% Removed \texttt{"pi"} and \texttt{"PI}" from the \texttt{aTrigFuncs array}, and added
+% \texttt{"arcsin"}, \texttt{"arccos"}, "\texttt{arctan"}.
+%}
+% \begin{macrocode}
+function NoTrigAllowed (UserAns)
+{
+ UserAns = stripWhiteSpace(UserAns);
+ if ( !ok2Continue ) return null;
+ var aTrigfuncs = new Array
+ ( "acos","asin","atan","cos", "sin", "tan","sec","csc","cot",
+ "arcsin", "arccos", "arctan"
+ );
+ var re, regexp;
+ re = /[a-zA-Z]{2,}/g;
+ aF = UserAns.match(re);
+ if ( aF != null ) {
+ for (var i=0; i < aF.length; i++)
+ {
+ for(var j=0; j < aTrigfuncs.length; j++) {
+ if ( aF[i].indexOf(aTrigfuncs[j]) != -1 )
+ return eqAppAlert(\NoTrigAllowedErrorMsg,3), null;
+ }
+ }
+ }
+ return true;
+}
+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;
+}
+% \end{macrocode}
+%\changes{v1.9a}{2011/07/15}{Added \texttt{sciNotResp} and \texttt{SciNotResp}}
+% This filter function checks to see if the user's input is in the form of (normalized)
+% scientific notation: \verb![+-]*d[.d*]*[ ]*E[+-]*d+!, written in pseudo-reg expr.
+% \begin{macrocode}
+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;
+}
+% \end{macrocode}
+%\changes{v1.9a}{2011/07/15}{Added \texttt{noNegExp}}
+% \texttt{noNegExp} does not allow negative exponents in the answer
+% \begin{macrocode}
+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}
+% \end{macrocode}
+% \subsection{Additional mathematical functions}
+% The following are contributions by Ross Moore and Frances Griffin, from their work
+% on \href{http://rutherglen.ics.mq.edu.au/~macqtex/}{MacQ\TeX}.
+% These define function of an integer variable: combinations, permutations and factorials.
+% These can be used for math fill-ins.
+% \begin{macrocode}
+\begin{library@holding}{combinatorics}
+% \end{macrocode}
+% \subsubsection{\texttt{combinatorics}}
+% Combinatorial function\IndexOpt{combinatorics}
+% \begin{macrocode}
+\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));
+}
+% \end{macrocode}
+% \texttt{factorialCancel} and \texttt{expandFactorial} are needed by \texttt{binomialCoeff}
+% \begin{macrocode}
+function expandFactorial(lo,hi)
+{
+ var f = lo;
+ for (var i=lo+1;i<=hi;i++) f = i+"*"+f;
+ return f;
+}
+% \end{macrocode}
+% \texttt{factorialCancel} cancels common factors in \texttt{num} and \texttt{denom} using strings produced
+% by \texttt{expandFactorial}. It expects tails of factorials to have already been cancelled.
+% \begin{macrocode}
+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}
+% \end{macrocode}
+% \subsection{\texttt{ParseInput} Extensions}\label{s:parseinput}
+% The default behavior for processing a math fill-in question is to
+% require the student to insert `\texttt*' for multiplication and to
+% enclose any function being raised to a power in parentheses, e.g.
+% \verb+x*(sin(x))^2+. This becomes quite tiresome if the expression to be entered
+% is complicated. The following two functions enable the student to use
+% `implied multiplication' and simplified exponentiation.
+%
+% \IndexOpt{ImplMulti}
+% The \texttt{ImplMulti} option loads two JavaScript functions, \texttt{Ck4Products()}
+% and \texttt{Ck4Exponents()}. The latter implements the notation, \verb+sin^2(x)+
+% for $\sin^2(x)$, equivalent to $(\sin(x))^2$. The exponent can be complex and enclosed
+% in parentheses, for example \verb-ln^(x+1)(x)-. The former function, \texttt{Ck4Products()},
+% inserts the multiplication symbol, `\texttt{*}', wherever implied. For example,
+% \verb+xysin(xy)+ becomes \verb+x*y*sin(x*y)+.
+% \begin{flushleft}
+% \textcolor{red}{Important:} If loaded, \texttt{Exerquiz} will automatically use these two functions.
+% \end{flushleft}
+% \begin{macrocode}
+\begin{library@holding}{ImplMulti}
+% \end{macrocode}
+% \subsubsection{\texttt{ImplMulti}}
+% \begin{macrocode}
+\begin{newsegment}{dljslib: Implied Multiplication}
+% \end{macrocode}
+% The JavaScript function \texttt{Ck4Products()} takes the user input and tries to
+% insert the multiplication symbol, `\texttt*', wherever implied.
+% \begin{macrocode}
+function Ck4Products(UserInput)
+{
+ var re, aR;
+% \end{macrocode}
+% Search through for matches with known functions
+% \begin{macrocode}
+ for (var i=0; i<JSf.length; i++)
+ {
+% \end{macrocode}
+% Here we mark the beginning of the left parenthesis for a
+% that follows one of the known functions. This way we can
+% distinguish between the built in JavaScript functions and
+% other sequences of letters that may represent products.
+% \begin{flushleft}
+% \textbf{Note:} In the regular
+% expression below, and elsewhere, when our search includes unbalanced parentheses
+% we need to triple escape them, i.e., instead of `\verb+\\(+' we write
+% `\verb+\\\(+'. See comments in \texttt{insdlis.dtx}.
+% \end{flushleft}
+% \begin{macrocode}
+ re = new RegExp("("+JSf[i]+")(\\\()","g");
+ UserInput = UserInput.replace(re, "\\$1@$2");
+% \end{macrocode}
+% If a known function has a letter or a right parenthesis to the left of it,
+% the user must want multiplication, make it so!
+% \begin{macrocode}
+ re = new RegExp("([\\w\\\)])(\\"+JSf[i]+")(@\\\()","g");
+ UserInput = UserInput.replace(re, "$1*$2$3");
+ }
+% \end{macrocode}
+% Now do the same type thing for known constants.
+% \begin{macrocode}
+ for (var i=0; i<JSc.length; i++)
+ {
+% \end{macrocode}
+% We mark the beginning and end of a known predefined constant
+% \changes{v1.6}{2007/02/23}
+%{
+% If we match up with "E", we do nothing. This is support of
+% using "E" for scientific notation.
+%}
+% \begin{macrocode}
+ re = new RegExp("("+JSc[i]+")","g");
+ if ( JSc[i] != "E" ) {
+ UserInput = UserInput.replace(re, "\\$1@");
+% \end{macrocode}
+% If a known constant has a letter or an right parenthesis to the left of it,
+% the user must want multiplication, make it so!
+% \begin{macrocode}
+ re = new RegExp("([\\w\\\)])(\\"+JSc[i]+")(@)","g");
+ }
+ }
+% \end{macrocode}
+% Search for a number or right paren followed by a letter or right paren
+% and insert *.
+%\changes{v1.6}{2007/02/23}
+%{
+% dps/change 02/23/07. In the search below, we exclude the search
+% for the letter "E", because it is used for scientific notation (called exponential)
+%}
+% notation in JavaScript).
+% \begin{macrocode}
+ UserInput = UserInput.replace(
+ /([\d\)])([A-DF-Za-z\(\\])/g, "$1*$2");
+% \end{macrocode}
+% Search for a right paren followed by a number.
+% \begin{macrocode}
+ UserInput = UserInput.replace(/(\))(\d)/g, "$1*$2");
+% \end{macrocode}
+% Search for a letter followed by a number of right paren, and insert *
+% \begin{macrocode}
+ UserInput = UserInput.replace(/([A-Za-z])([\d\(\\])/g, "$1*$2");
+% \end{macrocode}
+% If a predefined constant, such as \texttt{PI}, is multiplied on the
+% right by a factor, there will be a \texttt{@} followed by a letter or decimal.
+% \begin{macrocode}
+% re = /(@)([A-Za-z\d])/g;
+ UserInput = UserInput.replace(/(@)([A-Za-z\d])/g, "$1*$2");
+% \end{macrocode}
+% Now strip off the markers
+% \begin{macrocode}
+ UserInput = UserInput.replace(/(\\)([A-Za-z]{1,})(@)/g, "$2");
+% \end{macrocode}
+% Search through list of known functions for a match.
+% \begin{macrocode}
+% MacQTeX change dps/change 02/23/07
+ 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;
+% \end{macrocode}
+% If there is no match with known functions or constants, then we need to assume
+% this word is a series of products, and separate them on their non-word
+% boundaries by a multiplication operator *. We will not be able to identify
+% mistyped functions, for example, if the user enters \texttt{cis(x)} instead of
+% \texttt{cos(x)}, this will end up as \texttt{c*i*s*(x)}. Ultimately,
+% the user will get a message that there is an error in the expression, but not
+% hints as to what the error is will not be given.
+% \begin{macrocode}
+ 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;
+}
+% \end{macrocode}
+% The function \texttt{Ck4Exponents()} attempts to convert the notation \verb+sin^2(x)+
+% into standard JavaScript format of \texttt{pow(sin(x),2)}.
+% \begin{macrocode}
+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) )
+ {
+% \end{macrocode}
+% Here we seek to match an expression of the form: \verb+cos^(exp)(arg)+
+% \begin{macrocode}
+ 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;
+ }
+ }
+% \end{macrocode}
+% Here we seek to match an expression of the form: \verb+cos^\pmNum.Num(arg)+
+% \begin{macrocode}
+ 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;
+ }
+ }
+% \end{macrocode}
+% Now we do the same thing for declared constants.
+% \begin{macrocode}
+ 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}
+% \end{macrocode}
+% Finally, we have the ``back wrapper'' or ``back cover'' of the selected materials. We close the
+% \texttt{insDLJS} environment
+% \begin{macrocode}
+\begin{library@holding}{dljslib}
+\end{insDLJS*}
+\end{library@holding}
+% \end{macrocode}
+% \section{Out the Door and Close it behind you}
+% \dots and free up this write register.
+% \begin{macrocode}
+\immediate\closeout\dljslib@verbatim@out
+\advance\count17 by -1
+% \end{macrocode}
+% \section{Back Home with your Selections}
+% \begin{macrocode}
+\input{dljslib.ljs}
+%</package>
+% \end{macrocode}
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/dljslib.ins b/texmf-dist/source/latex/acrotex/dljslib.ins
new file mode 100644
index 00000000..46102924
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/dljslib.ins
@@ -0,0 +1,64 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1999-2014 D. P. Story
+%%
+%% This file is part of the `AcroTeX eDucation Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2001/05/26}
+\def\batchfile{dljslib.ins}
+%
+% If you can assume that the target audience for the document all have
+% Acrobat Reader 5.0 or later, then chance the following switch to true,
+% else, leave it as false.
+
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+
+\generate
+{%
+ \file{dljslib.sty}{\from{dljslib.dtx}{copyright,package}}
+}
+
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/doc/aeb_man.tex b/texmf-dist/source/latex/acrotex/doc/aeb_man.tex
new file mode 100644
index 00000000..55eef8df
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/doc/aeb_man.tex
@@ -0,0 +1,12057 @@
+\RequirePackage[!use=preview,!use=usebw]{spdef}
+\documentclass{article}
+%\usepackage{makeidx,showidx}
+\usepackage[fleqn]{amsmath}
+\usepackage[%
+ web={centertitlepage,designv,
+ forcolorpaper,latextoc,pro},
+ exerquiz={nocorrections},aebxmp,
+ dljslib={ImplMulti,limitArith,nodec,satisfyEq}
+]{aeb_pro}
+%\usepackage{myriadpro}
+\usepackage[altbullet]{lucidbry}
+\usepackage{aeb_mlink}
+\usepackage{longtable,colortbl}
+\usepackage{graphicx}
+\usepackage{multicol}
+
+\usepackage{acroman}
+\usepackage[active]{srcltx}
+
+\def\AcroBlog{{Acro\!\TeX} Blog}
+
+\makeatletter
+\def\chgCurrLblName#1{\def\@currentlabelname{#1}}
+\let\gob\@gobble
+\renewcommand*\l@subsection{\@dottedtocline{2}{2em}{3.5em}}
+\renewcommand*\l@subsubsection{\@dottedtocline{4}{5.5em}{1.5em}}
+\renewcommand\@pnumwidth{2.55em}
+\renewcommand*\l@section[2]{%
+ \ifnum \c@tocdepth >\z@
+ \addpenalty\@secpenalty
+ \addvspace{1.0em \@plus\p@}%
+ \setlength\@tempdima{2em}%{1.5em}%
+ \begingroup
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \leavevmode \bfseries
+ \advance\leftskip\@tempdima
+ \hskip -\leftskip
+ #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+ \endgroup
+ \fi}
+\makeatother
+
+
+%\usepackage[usecmtt]{myriadpro}
+
+%\margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
+%\screensize{4.19in}{4.67in} % height, width
+
+%\margins{.5in}{.25in}{24pt}{.25in} % left,right,top, bottom
+%\screensize{4.19in}{4.92in} % height, width
+
+%\hoffset=20pt
+
+\setlongtables
+\LTpre=0pt %\medskipamount
+\LTpost=-2\medskipamount
+%\LTpost=0pt %\medskipamount
+\setlength{\mathindent}{20pt}
+
+\def\AEBBook{\textsl{{Acro\!\TeX} eDucation System Tools: {\LaTeX} for interactive PDF documents}}
+
+
+%\usepackage{makeidx}
+%\makeindex
+%\usepackage[active]{srcltx}
+
+%\DeclareFontFamily{U}{wi}{}
+%\DeclareFontShape{U}{wi}{m}{n}{<-> wingding}{}
+%\DeclareFontFamily{U}{webd}{}
+%\DeclareFontShape{U}{webd}{m}{n}{<-> webdings}{}
+
+%\font\zqacr=zqacr at 8pt
+
+\makeatletter
+
+\renewcommand\exlabelformat{{\exlabel\ \theeqexno.}}
+\renewcommand\exlabelformatwp{{\exlabel\ \theeqexno.}}
+
+%\def\changelinkcolorto#1{\def\@linkcolor{#1}}
+%\useFullWidthForPaper
+\newdimen\totaltextwidth
+\totaltextwidth=\fullscreenwidth
+\advance\totaltextwidth\oddsidemargin
+\renewcommand{\webheadwrapper}[1]{%
+ \hspace{-\oddsidemargin}%
+ \makebox[\totaltextwidth][s]{#1}\hss
+}
+
+%\sectionLayout{indent=-62.5pt,fontsize=large}
+%\subsectionLayout{indent=-31.25pt}
+%\subsubsectionLayout{indent=0pt}
+
+\renewcommand\hproportionwebtitle{.75}
+\universityLayout{fontsize=Large,fontfamily=sffamily}
+\titleLayout{fontsize=LARGE,fontfamily=sffamily}
+\authorLayout{fontsize=Large,fontfamily=sffamily}
+\tocLayout{fontsize=Large,color=aeb,fontfamily=sffamily}
+\sectionLayout{indent=-62.5pt,fontsize=large,color=aeb,fontfamily=sffamily}
+\subsectionLayout{indent=-31.25pt,color=aeb,fontfamily=sffamily}
+\subsubsectionLayout{indent=0pt,color=aeb,fontfamily=sffamily}
+\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}}
+%\renewcommand{\paragraph}
+% {\@startsection{paragraph}{4}{0pt}{12pt}{-3pt}{\bfseries}}
+\renewcommand{\paragraph}
+ {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt}
+ {\normalfont\normalsize\bfseries}}
+\renewcommand{\subparagraph}
+ {\@startsection{subparagraph}{5}{\parindent}{6pt}{-3pt}%
+ {\normalfont\normalsize\bfseries}}
+\newcommand{\aebCng}{\@ifstar{\def\aeb@checked{*}\@aebCng}{\def\aeb@checked{x}\@aebCng}}%
+\newcommand\@aebCng[1][]{}
+%\newcommand{\aebCng}{\@ifstar{\def\aeb@checked{*}\@aebCng}{\def\aeb@checked{x}\@aebCng}}%
+%\newcommand{\@aebCng}[1][]{%
+% \if\aeb@checked*\def\aeb@marker{\textcolor{blue}{aeb}~\textcolor{red}{\ding{052}}\goodbreak}\else
+% \def\aeb@marker{\textcolor{red}{aeb}}\fi
+% \def\argi{#1}\ifx\argi\@empty
+% \marginpar{\scriptsize\aeb@marker}%
+% \else\marginpar{\scriptsize\aeb@marker\goodbreak\raggedright#1}\fi}
+
+%\makeindex
+
+%\widestNumber{00.00.}
+
+\hfuzz=1pt
+
+\pdfstringdefDisableCommands{\let\!\empty}
+
+%\setlongtables
+
+\def\AcroT{Acro\!\TeX}\def\cAcroT{\textcolor{blue}{\AcroT}}
+\def\AcroEB{\AcroT{} eDucation Bundle}\def\cAcroEB{\textcolor{blue}{\AcroEB}}
+\def\AcroB{\AcroT{} Bundle}\def\cAcroB{\textcolor{blue}{\AcroB}}
+\def\AcroFLeX{%
+ AcroF\kern-.1667em\lower.5ex\hbox{L}\kern-.3eme\kern-.125emX}
+\def\APB{\textsf{APB}}
+\def\cAPB{\textcolor{blue}{\APB}}
+\def\AEB{\textsf{AeB}}
+\def\cAEB{\textcolor{blue}{\AEB}}
+\def\Web{\textsf{web}}
+\def\PDF{\textsf{PDF}}
+\def\bUrl{http://www.math.uakron.edu/~dpstory}
+\definePath{\urlAcroTeXBlog}{http://www.acrotex.net/blog}
+
+%\newlength{\aebdimen}
+\def\anglemeta#1{$\langle\textit{\texttt{#1}}\rangle$}
+\def\meta#1{\textit{\texttt{#1}}}
+\let\pkg\textsf
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\def\AEB{\textsf{AeB}}
+\def\AcroTeX{Acro\!\TeX}
+\def\HTML{HTML}\def\FDF{FDF}
+\def\PDF{PDF}\def\URL{URL}
+\let\amtIndent\leftmargini
+\def\bNH{\begin{NoHyper}}\def\eNH{\end{NoHyper}}
+\def\nhnameref#1{\bNH\nameref{#1}\eNH}
+\def\nhNameref#1{\bNH\Nameref{#1}\eNH}
+\def\nhurl#1{\bNH\url{#1}\eNH}
+\def\grayV#1{\textcolor{gray}{#1}}
+\def\darg#1{\{#1\}}
+\def\parboxValign{t}
+\renewcommand*{\backrefalt}[4]{%
+ \ifcase #1\or
+ See page~#2.\else See pages~#2.\fi
+}
+\newenvironment{aebQuote}
+ {\list{}{\leftmargin\amtIndent}%
+ \item\relax}{\endlist}
+\newcommand{\FmtMP}[2][0pt]{\mbox{}\marginpar{%
+ \raisebox{.5\baselineskip+#1}{%
+ \expandafter\parbox\expandafter[\parboxValign]%
+ {\marginparwidth}{\aebbkFmtMp#2}}}}
+\def\aebbkFmtMp{\kern0pt\itshape\small
+ \ifusebw\color{gray}\else\color{blue}\fi
+ \raggedleft\hspace{0pt}}\newcommand{\BlogArticle}{%
+ \makebox[0pt][l]{\hspace{-1pt}\color{blue}\Pisymbol{webd}{254}%
+ }\raisebox{.5pt}{\ifusebw\color{black}\else
+ \color{red}\fi\ding{045}}}
+\def\dps{$\mbox{$\mathfrak D$\kern-.3em\mbox{$\mathfrak P$}%
+ \kern-.6em \hbox{$\mathcal S$}}$}
+\def\FitItIn{\eq@fititin}
+\def\endredpoint{\FitItIn{{\large\ifusebw\color{black}\else\color{red}\fi$\blacktriangleleft$}}}
+
+
+\hypersetup{linktocpage}
+
+\def\AmS{{\protect\usefont{OMS}{cmsy}{m}{n}%
+ A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
+
+\def\latex/{{\protect\LaTeX}}
+\def\amslatex/{{\protect\AmS-\protect\LaTeX}}
+\def\tex/{{\protect\TeX}}
+\def\amstex/{{\protect\AmS-\protect\TeX}}
+
+\definecolor{aeb}{rgb}{0.24,0.38,0.68}%bleu
+\universityColor{aeb}
+\tocColor{aeb}
+
+\makeatother
+
+\def\Y&Y{Y\kern-.2em{\footnotesize\&}\kern-.2emY}
+\def\dps{$\mbox{$\mathfrak D$\kern-.3em\mbox{$\mathfrak P$}%
+ \kern-.6em \hbox{$\mathcal S$}}$}
+
+\title{\texorpdfstring{\LARGE
+%---------------------------------%
+ The \AcroEB\space(AeB)%
+}{%-------------------------------%
+ The AcroTeX eDucation Bundle for LaTeX,
+ Manual of Usage%
+}}
+\author{D. P. Story}
+\subject{How to create on-line exercises and quizzes}
+%\keywords{LaTeX, hyperref, PDF, exercises, quizzes}
+\Keywords{LaTeX,hyperref,PDF,exercises,quizzes}
+\university{{\AcroT} Software Development Team}
+\email{dpstory@acrotex.net}
+\versionLabel{Dated:}
+\version{2017/03/16}
+\copyrightyears{1999-\the\year}
+\nocopyright
+\prepared{2017/03/20}
+\revisionLabel{Distribution Dated:}
+
+\copyrightStatus{True}
+\copyrightNotice{Copyright (C) 1999-\the\year, D. P. Story}
+\copyrightInfoURL{http://www.acrotex.net}
+\authorTitle{Head of AcroTeX Developer}
+\descriptionWriter{Senior Technical Writer of AcroTeX}
+
+%\noPartNumbers
+
+\DesignTitlePageTrailer
+{%
+ ul=Copyright \copyright\ \webcopyrightyears,
+ ur=\thewebemail,
+ lr=\url{http://www.acrotex.net},
+ raise=-25pt
+}
+\def\CMD#1{\textbackslash#1}
+%\newcommand{\exPDF}[2][\expath/]{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
+\newcommand{\exPDF}[2][\bUrl/webeq_ex.html\#]{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
+\vskip\medskipamount\noindent\makebox[0pt][r]
+ {\raisebox{-2pt}{\color{red}\href{#1#2}{{\zqacr
+ b\hspace{9.5pt}}}}\enspace}\ignorespaces}
+
+\def\makeExBox#1{\href{run:\tutpathi/apb_#1.tex}{\scriptsize\fbox{#1}}}
+\renewcommand\expoint[1]{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
+\vskip\medskipamount\noindent\makebox[0pt][r]{\makeExBox{#1}\enspace}\ignorespaces}
+
+\def\tutpath{doc/tutorial}
+\def\tutpathi{tutorial}
+\def\expath{../examples}
+
+\renewcommand{\theaebEx}{\arabic{aebEx}}
+\renewcommand{\theHaebEx}{\arabic{aebEx}}
+
+\def\insMargin{}
+\def\Ex{\par\medskip\noindent\refstepcounter{aebEx}\insMargin\gdef\insMargin{}\textbf{Example~\theaebEx:}}
+\def\CmdLoc{\par\medskip\noindent\textbf{Command Location: }}
+\def\EnvLoc{\par\medskip\noindent\textbf{Environment Location: }}
+\def\KVP{\par\goodbreak\medskip\noindent\textbf{Key-Value Pairs: }}
+\def\PD{\par\goodbreak\medskip\noindent\textbf{Parameter Description: }}
+\def\Important{\par\medskip\noindent\textbf{Important: }}
+\def\CmdDescription{\par\medskip\noindent\textbf{Command Description: }}
+
+\begin{insDLJS}[indefCompare]{compare}{Comparisons}
+function indefCompare(a,b,c,F,G) {
+ var C, eqx;
+ with(Math) {
+ eqx = a;
+ if(isNaN(C = eval(F)-eval(G))) return -1;
+ eqx = c;
+ F = eval(F);
+ if(isNaN(G = eval(G)));
+ return abs( F - G - C );
+ }
+}
+\end{insDLJS}
+
+\frenchspacing
+
+\definePath\bgPath{"C:/Users/Public/Documents/ManualBGs/Manual_BG_Print_AeB.pdf"}
+\begin{docassembly}
+\addWatermarkFromFile({
+ bOnTop: false,
+ cDIPath: \bgPath
+})
+\executeSave()
+\end{docassembly}
+\begin{document}
+
+\maketitle
+
+\newpage
+
+\changelinkcolorto{black}
+
+\tableofcontents
+
+\changelinkcolorto{webgreen}
+
+\part{Forward}
+
+\newtopic For the past several years (this year is 2016), I've been writing a book
+titled,
+\begin{quote}
+\AEBBook.
+\end{quote}
+The book~\cite{book:AEBB} covers {\AEB} and {\AEBP} in \emph{great detail} and includes many
+examples to illustrate concepts and techniques. Numerous new examples are
+available on the CD-ROM that accompanies the book.
+
+During the time of the writing, each of the packages covered was examined,
+bugs were fixed, and many new and major features were created. Any new
+features developed in the course of writing the book are documented in the
+book; however, they are \emph{not included in this documentation}. You can
+either buy the yet-to-be-submitted book sometime in the future, or discover
+the features by studying the DTX documentation of the program files. Sorry,
+it took me three years to write the book, I don't want to spend another year
+on this documentation. \verb!:-{)!
+
+As noted in the part of this manual titled \textbf{\nhnameref{eq2db}} on
+page~\pageref{eq2db}, I've set up two websites that highlight the server-side
+scripts developed for the book (and available on the accompanying CD-ROM).
+You are invited to visit them and comment on them, if the spirit moves.
+
+\begin{flushright}
+Dr. D. P. Story\\[3pt]
+January 5, 2016
+\end{flushright}
+
+\part{Preface}
+
+%\section{Introduction}
+
+% ff, fi, fl, ffl
+
+The {\cAcroEB} (abbreviated {\cAEB} and read ``{\AcroT} Education
+Bundle'') is a collection of {\LaTeX} macro files (briefly described
+below) along with various support and sample files. The theme of {\cAEB}
+is \textit{ePublication} in the \textit{education} sector using {\LaTeX}
+as the authoring application and Adobe's Portable Document Format
+(\textsf{PDF}) as the file format of the output document. The \cAcroB{}
+should be useful to educators who want to post interactive materials for
+their students on the \textsf{WWW}.
+
+\newtopic Currently, there are seven components to the bundle:
+
+\begin{questions}
+
+\item The \hyperref[s:web]{\pkg{web} package} is used to create an
+ attractive, easy-on-the-eye page layout suitable for the \textsf{WWW}
+ (or classroom/conference presentations). There is support for
+ background graphics; a {\Web} document can be re-purposed for
+ paper.
+\item The \hyperref[s:exerquiz]{\pkg{exerquiz} package} makes
+ it very easy to create interactive exercises and quizzes. There are
+ numerous options, solutions at the end of the document, solutions
+ following the question, no solutions; quizzes are self marking, the
+ student can get immediate feedback, or get a final assessment after
+ the student finishes the quiz.
+\item The \href{eformman.pdf#eformsPkg}{\pkg{eforms} package} provides support for
+ PDF form fields, and links with arbitrary actions.
+\item The \href{eformman.pdf#insdljsPkg}{\pkg{insdljs} package} allows for the automatic
+ insertion of document level JavaScript. Document authors can use
+ \textsf{insdljs} to customize the processing of the
+ \textsf{exerquiz} quizzes. See the documentation that accompanies
+ the package (\texttt{insdljs.dtx}) and see also the sample file
+ \texttt{jqzspec.tex} for an extensive example of how to modify the
+ \textsf{exerquiz} macros. The \textsf{insdljs} package also has an
+ \texttt{execJS} environment which can be used to create executable
+ and ``discardable'' JavaScript; see the DTX file for
+ details.
+% and the demo file \texttt{execJStst.tex}, which features
+% an animation built completely from {\LaTeX} source lines.
+ Documentation for the \pkg{insdljs} package appears in the
+ \href{eformman.pdf#insdljsPkg}{\pkg{eforms}} reference manual
+ (on the Web, \href{\bUrl/eformman.pdf#insdljsPkg}{eformman.pdf}).
+\item The \href{eformman.pdf#taborderPkg}{\pkg{taborder} package} supports the creation of the order
+ of tabbing between Acrobat annotations (fields, links, and comments).
+ See the part \textbf{Setting the Tab Order} in \href{eformman.pdf#taborderPkg}{eforms}
+ reference manual (on the Web, \href{\bUrl/eformman.pdf#taborderPkg}{eformman.pdf}) for more details.
+\item The \hyperref[part:dljslib]{\pkg{dljslib} package} is used as a library of
+ JavaScript functions. Some types of question require special
+ processing. A JavaScript function written to process a
+ particular function can be stored in the library, then
+ retrieved as needed.
+
+% See the documentation contained in the
+% file \texttt{\href{\bUrl/dljslib.dtx}{dljslib.dtx}}.% and try
+% the test file for this package,
+% \texttt{\href{\bUrl/jslib_ex.tex}{jslib\_ex.tex}}.
+\item The \href{\bUrl/eqexam.html}{\pkg{eqexam} package} is a stand
+ alone {\LaTeX} package for creating exams, quizzes, homework
+ assignments. There are several options to re-purpose the source
+ document to produce a document with no solutions, solutions at end,
+ solutions after the questions, and solutions only. It can also be used
+ to create surveys, questionnaires, teacher evaluations, etc. The
+ package has an \texttt{email} mode and comes with a server-side script
+ that is used to send the data entered into the form fields to the
+ instructor.
+
+% See my \textsf{\href{\bUrl/eqexam/tex_survey.pdf}{\TeX/\LaTeX{} Survey}} for
+% a demo of this feature.
+\end{questions}
+\handpoint The \pkg{web}, \textsf{exerquiz}, \textsf{eforms}, and \textsf{insdljs}
+packages are stand alone packages, though they were designed to work
+together. The \textsf{dljslib} package is a companion package to
+\textsf{insdljs}. The \textsf{eqexam} package is stand alone, but uses
+some code from the \textsf{exerquiz} package; \textsf{exerquiz} need not
+be installed on your system to use \textsf{eqexam}, however.
+
+\begin{comment}
+To play it safe, you should use the most recent version of
+\pkg{hyperref} by Sebastian Rahtz and Heiko Oberdiek. The
+\textsf{exerquiz} package makes extensive use of forms; Adobe
+Reader 3.0 with Forms 3.5 at least is needed, Adobe Reader 4.0 or
+above is preferred.
+\end{comment}
+
+\handpoint Here is an important point that should be emphasized early in this
+manual. \cAcroT{} only supports three ways of producing a
+\textsf{PDF} file: (1) the \textcolor{blue}{Adobe Acrobat
+Distiller} (version~5.0 or higher \emph{required}); (2)
+\textsf{pdftex} (including \textsf{luatex}); or (3) \textsf{dvipdfm}
+(including \textsf{dvipdfmx} and \textsf{xetex}). In the case of (1), you
+probably use \texttt{dvips} to create a postscript file before
+distilling. Some users have tried to use
+\textcolor{blue}{Ghostscript} to produce a \textsf{PDF}
+from \cAcroT; this will not work! (You will get the \textsf{PDF}
+file, but not much functionality.)
+
+Please contact me at \url{dpstory@acrotex.net} should you encounter
+any problems, or have suggestions to make.
+
+\redpoint See Section~\ref{s:start} on `\nhnameref{s:start}' below for
+instructions on how to get up and running.
+
+\section{Getting Started}\label{s:start}
+
+The distribution for the {\cAcroB} comes in a single ZIP file
+ \texttt{acrotex.zip}. This ZIP file contains program files
+ (\pkg{web}, \pkg{exerquiz}, \pkg{eforms}, \pkg{insdljs},
+ \pkg{dljslib}, \pkg{taborder}, and \texttt{aeb.js}), this manual, and the
+ \href{eformman.pdf}{\pkg{eforms}} reference manual
+ (\texttt{\href{\bUrl/eformman.pdf}{eformman.pdf}}).
+
+\subsection{Installing the Distribution}
+
+The following are the instructions for installing the \cAEB.
+
+\begin{questions}
+
+\item \textbf{Placement.} The ZIP file installs in a folder called
+ \texttt{acrotex}, so place the ZIP file in a directory in the search path
+ of your \LaTeX{} system where you want the \texttt{acrotex} folder to
+ reside. If you already have an \texttt{acrotex} folder, place the ZIP
+ files so that they unzip into this \texttt{acrotex} folder, \emph{unless
+ you are using MiK\TeX~2.8{} or later}.
+
+\item[] \textbf{MiK\TeX~2.8/2.9 Users.} {Mik\TeX}~2.8 (or later) provides
+ problems for {Acro\!\TeX} installations in that it is more particular
+ about where you install packages by hand. {MiK\TeX}~2.8, or later,
+ requires that you install the distribution in a local root TDS tree.
+ Review the {MiK\TeX} help page on this topic
+\begin{quote}
+%
+ \url{http://docs.miktex.org/manual/localadditions.html}
+%
+\end{quote}
+Create a new {MiK\TeX} root folder, in my case, I created
+\begin{quote}
+%
+ \verb!C:\Users\Public\Documents\My TeX Files!
+%
+\end{quote}
+Within the \texttt{My TeX Files} folder (you can name this folder anyway
+you wish), create a \texttt{tex} folder, within the \texttt{tex} folder,
+create a \texttt{latex} folder. Now copy the ZIP file to the
+\texttt{latex} folder, for example, copy them into
+\\[3pt]\hspace*{20pt}
+%
+ \verb!C:\Users\Public\Documents\My TeX Files\tex\latex!\\[3pt]
+%
+Finally, you need to register your new root folder with MiK\TeX. Open the
+{MiK\TeX} Options dialog box (accessible through the WinEdt toolbar, or
+through\\[\topsep]\hspace*{20pt}
+%
+\texttt{Start > All Programs > MiKTeX 2.8 > Maintenance > Settings}\\[3pt]\hspace*{20pt}
+\texttt{Start > All Programs > MiKTeX 2.9 > Maintenance > Settings}\\[\topsep]
+%
+Within this dialog box, select the \textbf{Roots} tab, then press
+\textbf{Add}, and browse for your newly create \texttt{My TeX Files}. When
+finished, the dialog should look like my own dialog box, as shown
+in \hyperref[fig:rootstab]{Figure~\ref*{fig:rootstab}}, page~\pageref*{fig:rootstab}.
+
+\begin{figure}[hbt]\centering
+\includegraphics[scale=.6]{figures/miktex_roots}
+\caption{Roots tab of MiK{\TeX} Options}\label{fig:rootstab}
+\end{figure}
+
+\item \textbf{Unzipping the Distribution.} Once you have found the
+location to unzip the ZIP file, unzip it!
+
+% C:\Users\Public\Documents\My TeX Files\tex\latex
+
+%\item Unpack the \textsf{exerquiz} package by latexing \texttt{exerquiz.ins}.
+%However, see \nameref{s:unpack} for important comments.
+
+\item \textbf{Unpacking the distribution.} The whole distribution can be
+unpacked by latexing \texttt{acrotex.ins}. (The other \texttt{*.ins} files
+are the installation files for the individual packages,
+\texttt{acrotex.ins} is the combined installation file.)
+
+\item[] {MiK\TeX} users should not forget to refresh the file name database.
+
+% \item Unpack \texttt{insdljs.dtx} by latexing \texttt{insdljs.ins}.
+
+\end{questions}
+
+
+
+\subsection{Installing \texttt{aeb.js}}
+
+
+The JavaScript file \texttt{aeb.js} is only needed if you use \textbf{Acrobat
+Pro 8.1} or later and \textbf{Adobe Distiller} as the PDF creator. Increased
+security in that version has made it necessary to install a folder JavaScript
+file. The JavaScript within \texttt{aeb.js} raises the ``trust'' of certain
+JavaScript methods used to import document JavaScript into the document just
+after the distillation process and the newly created PDF is opened in
+\textbf{Acrobat} for the first time. The installation of this file is not
+needed if you use \textsf{pdftex}, or \textsf{dvipdfm} (or any of their
+variations), or use a version of \textbf{Acrobat} prior to 8.1.
+
+The instructions for installing \texttt{aeb.js} are in the
+\texttt{\href{install_jsfiles.pdf}{install\_jsfiles.pdf}}, which resides in
+the \texttt{doc} folder of the \texttt{acrotex} installation. If you use
+\textbf{Distiller} as your PDF creator, please refer to that document.
+
+After you've installed the JavaScript files, as directed by the
+\texttt{\href{install_jsfiles.pdf}{install\_jsfiles.pdf}}, validate the
+installation of the JavaScript files by navigating to the \texttt{examples}
+subfolder and opening the file \texttt{test\_install.pdf} in \app{Acrobat};
+follow the directions contained on that one page document.
+
+
+\begin{comment}
+\paragraph*{Acrobat Pro~8.1 or later.}
+Start \textbf{Acrobat Pro~8.1}\footnote{The file will cause no harm if you
+install it in an earlier version of Acrobat, as early as version 7.} or
+later, and open the console window \textsf{Advanced \texttt> JavaScript
+\texttt> Debugger} (\texttt{Ctrl+J} for Windows or \texttt{Cmd+J} for Mac
+OS). Copy and paste the following code into the window.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+app.getPath("user","javascript");
+\end{Verbatim}
+Now, with the mouse cursor on the line containing this script, press
+the \texttt{Ctrl+Enter} key. This will execute this JavaScript. This
+JavaScript method returns the path to where \texttt{aeb.js} should
+be placed. For example, on my system, the return string is
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+/C/Documents and Settings/story/
+ Application Data/Adobe/Acrobat/8.0/JavaScripts
+\end{Verbatim}
+Follow the path to this folder. If the \texttt{JavaScripts} folder
+does not exist, create it. Finally, copy \texttt{aeb.js}
+into this folder. The file is read each time Acrobat starts.
+
+\paragraph*{Acrobat Pro 10.1.1 for Windows only.} For this version of \textbf{Acrobat},
+things have tightened up even more. The user JavaScripts folder has moved to
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+%AppData%\Adobe\Acrobat\Privileged\10.0\JavaScripts
+\end{Verbatim}
+\exAeBBlogArticle{p=737}where \verb!%AppData%! is an environment variable defined by Acrobat. For details
+of how to install the folder JavaScripts in the new location, see my blog
+article \mlhref{http://www.acrotex.net/blog/?p=737}{Acrobat Security Changes in 10.1.1 and
+Acro\!\TeX}.
+\end{comment}
+
+\subsection{Language Localizations}
+
+Should you wish to customize {\cAEB} to a language other than the ones
+already supported, open the file \texttt{template.def} and add in your
+language customizations.
+
+%After reading the manual you are then ready to write your own set
+%of tutorials, exams, exercises and quizzes.\enspace\dps
+
+
+\subsection{Sample Files and Articles}\label{s:samplefiles}
+
+Test, example, and demo files have been moved to the \href{\bUrl/webeq_ex.html}{Example Files for
+AeB} web page.\footnote{\url{\bUrl/webeq_ex.html}} References seen in this manual reside on this page; each
+sample file is a PDF with the source file attached to the PDF. Files on
+the \href{\bUrl/webeq_ex.html}{Example Files for AeB} web page are
+referenced with the icon \raisebox{-1.5pt}{\color{red}\zqacr b\hspace{12pt}} is the margin.
+
+\paragraph*{{Acro\!\TeX} Blog.} The basic examples from the distribution are also available
+from the {Acro\!\TeX| Blog, accessible from the page
+\href{http://www.acrotex.net/blog/?cat=89}{AeB Demo Files}.\footnote{\url{http://www.acrotex.net/blog/?cat=89}}
+There is another more recent collection of examples on
+\href{\urlAcroTeXBlog}{\AcroTeX{} Blog}, these will be referenced in the margin using the icon %\exAeBBlogPDF
+\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}%
+ \raisebox{-2pt}{\color{red}{{\zqacr b\hspace{9.5pt}}}}}\,, whereas
+\mbox{\makebox[0pt][l]{\hspace{-1pt}\textcolor{blue}{\Pisymbol{webd}{254}}}%
+\raisebox{.5pt}{\color{red}{\ding{045}}}} refers to a written blog
+article. In all cases, the source file and any dependent resources are attached to the
+PDF.
+
+%
+
+%\newcommand{\exAeBBlogArticle}[2][\urlAcroTeXBlog/]{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
+%\vskip\medskipamount\noindent\makebox[0pt][r]{%
+% \makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}%
+% \raisebox{.5pt}{\color{red}\href{#1?#2}{\ding{045}\hspace{8.5pt}}}\enspace}\ignorespaces}
+
+%\exPDF{indexofex} There are numerous sample/demo files that illustrate various
+%features of the {\cAcroB}. View the \textsf{PDF} file
+%\texttt{\href{indexofex.pdf}{indexofex.pdf}}, which is an ``Index of
+%{\AcroT} Examples''. This document contains a list of all
+%examples, a short description of each, and links to the \textsf{PDF}
+%file and source file.
+
+\subsection{Package Requirements}
+
+If you use the Acrobat Distiller, as I do, to create a PDF document, the {\cAcroB}
+now requires the use of version 5.0 or later. I've given up on trying to support
+prior version of Acrobat.
+
+\newtopic In terms of \LaTeX, the following is a listing of package requirements:
+
+\begin{enumerate}
+ \item The \pkg{web} Package
+ \begin{itemize}
+ \item \texttt{color}: \texttt{color} is distributed with \LaTeX, but {\Web}
+ will use \texttt{xcolor}, if available, unless the
+ \texttt{noxcolor} global option is used.
+ \item \texttt{amssymb}: standard with \amslatex/
+ \item \texttt{hyperref}: available from CTAN, get newer version
+ \item \texttt{eso-pic} and \texttt{everyshi}: available from CTAN
+ \end{itemize}
+ \item The \textsf{Exerquiz} Package
+ \begin{itemize}
+ \item \texttt{color}: distributed with \LaTeX
+ \item \texttt{verbatim}: distributed with \LaTeX
+ \item \texttt{hyperref}: available from CTAN, get newer version
+ \item \texttt{insdljs}: distributed with \AcroT
+ \end{itemize}
+ \item The \textsf{insdljs} Package
+ \begin{itemize}
+ \item \texttt{hyperref}: available from CTAN, get newer version
+ \item \texttt{verbatim}: distributed with \LaTeX
+ \item \texttt{everyshi}: available from CTAN
+ \end{itemize}
+ \item The \textsf{dljslib} Package
+ \begin{itemize}
+ \item \texttt{insdljs}: distributed with \AcroT
+ \end{itemize}
+\end{enumerate}
+
+\subsection{\LaTeX ing Your First File}
+
+The functionality of the \texttt{shortquiz} and \texttt{quiz}
+environments depends on JavaScript code that is placed at the
+``document level'', to use Adobe's terminology. The applications
+\textsf{pdftex} and \textsf{dvipdfm} offer direct support for
+writing to this document level. For those who use the
+\textcolor{blue}{Adobe Distiller}, things aren't quite so easy.
+
+In this section, we describe how to insert document level
+Java\-Scripts into a \textsf{PDF} file, prepared from a
+\LaTeX{} source that uses the \texttt{exerquiz} package. Even
+though the handling and insertion of document level JavaScript is
+done with the package \textsf{insdljs}, a little care must be
+taken, at least in the Distiller case, when building your
+{\PDF} document.
+
+%http://www.acrotex.net/blog/?p=803
+
+\exAeBBlogPDF{p=803} Download \texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}} from the {\AcroBlog}
+website. The source file \texttt{webeqtst.tex} is attached to the PDF, save
+it to your local hard drive. \gob{\exPDF{webeqtst}}Open
+\texttt{webeqtst.tex} in your favorite text editor. The top lines read:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage{amsmath}
+\usepackage[tight,designi]{web}
+\usepackage{exerquiz}
+\end{Verbatim}
+
+\subsubsection{For Non-\textsf{dvips} Users}
+
+Edit the third line by inserting your driver; the choices are
+\texttt{pdftex}, \texttt{dvipdfm}, \texttt{dvipdfmx}, and \texttt{xetex}. For
+example, if you use \textsf{dvipdfm}, the lines should read:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage{amsmath}
+\usepackage[dvipdfm,tight,designi]{web}
+\usepackage{exerquiz}
+\end{Verbatim}
+For \textsf{dvipdfm}, you \LaTeX{} the document, then hit it with
+\textsf{dvipdfm}, and your ready to review your \textsf{PDF} file. The
+insertion of the document level JavaScript is automatic.
+
+For the \textsf{pdftex} and \textsf{xetex} applications, you simply
+compile with that application, and you have your nice \textsf{PDF} file, ready for
+review. The insertion of the document level JavaScript is automatic.
+
+\redpoint Both the \textsf{pdftex} and \textsf{xetex} applications are
+automatically detected so there is no need to specify them in the option list
+of \pkg{web}.\endredpoint
+
+
+\subsubsection{For Distiller Users}
+
+If you use the distiller, as I do, the sophisticated features of
+{\AcroB} require Acrobat 5.0 or higher.
+
+%I've discontinued my attempt at supporting Acrobat 4.0.
+
+Edit the optional parameters of the \pkg{web} package by inserting your driver; the choices are
+\texttt{dvips} and \texttt{dvipsone}.\footnote{The choice of driver can be placed in he \texttt{web.cfg} configuration
+file, in which
+case, you need not specify the driver. See \Nameref{sss:driver}.} For example, if you use \textsf{dvips}, the
+lines should read:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage{amsmath}
+\usepackage[dvips,tight,designi]{web}
+\usepackage{exerquiz}
+\end{Verbatim}
+
+\begingroup\raggedright
+\noindent When you latex the source file, you create a DVI file and one or more FDF files.\footnote{The FDF files (for
+example, \texttt{exerquiz.fdf}) contain the document level JavaScript that needs to be imported into your document. They
+are imported when the newly
+created document is opened is Acrobat for the first time.}
+You then convert your \texttt{.dvi} to \texttt{.ps} using either
+\textsf{dvips} or \textsf{dvipsone}, and distill.
+\par\endgroup
+
+\newtopic\textcolor{red}{Important:} When you distill, \emph{save the
+\emph{\texttt{.pdf}} back to the same folder} in which your source file
+(\texttt{.tex}) resides as this is where the \texttt{.fdf} files
+reside too. Insertion of document level JavaScripts automatically
+takes place when you open your newly distilled document
+in the \textsf{Acrobat} application. (It is actually
+\textsf{Acrobat} that imports the scripts, not the
+\textsf{Distiller}.)
+
+\handpoint When your document is opened in \textsf{Acrobat} for
+the first time, the Java\-Script contained in the \texttt{.fdf} files
+(for example, \texttt{exerquiz.fdf}) is imported into the document
+and is stored at the document level.
+
+\redpoint \textcolor{red}{Important:} \emph{Save your document}. When you
+save, the JavaScripts you just imported are also saved with the
+document. At this point you can move your \textsf{PDF} to another
+folder, or to the web. The document does not need the
+\texttt{.fdf} files any more.
+
+\begin{comment}
+\redpoint \textbf{For Distiller~4.0--4.05 Users.} Versions prior
+to~5.0 of the Acrobat product cannot import document level
+JavaScript contained in a \texttt{.fdf} file. The JavaScript needs
+to be inserted ``by hand''.
+
+The procedure is as follows: Modify the preamble and insert the \texttt{acrobativ}
+option for the \textsf{exerquiz} package:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage{amsmath}
+\usepackage[dvips,tight,designi]{web}
+\usepackage[acrobativ]{exerquiz} %<- acrobativ option
+\end{Verbatim}
+\noindent This suppresses all the JavaScript code generation that is used in the case
+of \textsf{pdftex}, \textsf{dvipdfm} or \textsf{Distiller~5.0$^+$}. After that
+change, \LaTeX{} the document, and convert
+the \texttt{.dvi} file to PostScript (using \texttt{dvips} or
+\texttt{dvipsone}), and distill. Now, open the new \textsf{PDF} file
+ in \textsf{Acrobat} (formerly known as
+\textsf{Exchange}). Click on \texttt{Document > Insert Pages},
+browse, and choose the \textsf{PDF} file \textsf{eq\_dljs.pdf},
+which comes with the \cAcroB. The file is now inserted. Next, click
+on \texttt{Document > Delete Pages} and delete the page you just
+inserted! \textcolor{red}{Important:} Do a ``\texttt{Save As}''; now you are done!
+
+The \textsf{PDF} file \textsf{eq\_dljs.pdf} contains all the
+standard JavaScript that goes in at the document level. In all
+the other situations discussed above, you can modify the
+JavaScript from the preamble, for example, in the \textsf{exerquiz}
+source code we have
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\checkColor{["RGB", 0, .6, 0]}
+\end{Verbatim}
+This command is expanded when the document level JavaScript is imported into the
+\textsf{PDF} file. If \cs{checkColor} has been redefined
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\checkColor{["RGB", 1, 0, 0]}
+\end{Verbatim}
+it is this definition that is used in the expansion. This
+convenience is lost for $\text{4.0} \le\text{\textsf{distiller}}\le\text{4.05}$.
+You can edit \textsf{eq\_dljs.pdf} and make whatever changes you
+please to the script, in terms of changing color.
+\end{comment}
+
+There are several ways the Distiller workflow can be accomplished:
+%\begin{itemize}
+% \item \textbf{Through the {\LaTeX} Editor.} Some editors, WinEdt, in particular, have toolbars that can distill
+% a PostScript file. (The default is to use Ghostscript, you'll have to change to Distiller.) From WinEdt, you
+% can latex, convert to Postscript, and distill with a few presses of toolbar buttons. Very smooth and easy.
+% \item \textbf{Do it yourself.} Some systems, most notably on Mac OS, do not have a convenient way of distilling.
+% A Mac user sent in the following steps.
+% \begin{enumerate}
+% \item Drop the \texttt{.ps} file on Distiller.
+% \item Drag the resulting .pdf file out of the folder it was
+% compiled in (for example, to the desktop)
+% \item Open the \texttt{.pdf} file in Acrobat.
+%
+% At this stage readers will be prompted for the location of the existing .fdf file for inclusion.
+%
+% Now, for contrast, try this:
+%
+% 1. Drop the .ps file on Distiller.
+% 2. Open the .pdf file in Acrobat.
+% 3. Save the .pdf file.
+% 4. Drag the .pdf file out of the folder it was compiled in (for example, to the desktop)
+% 5. Open the .pdf file.
+%
+% This will allow readers the opportunity to see what will happen if they fail to save the file before moving it
+to another location, like the web.
+%
+%
+% \end{enumerate}
+%\end{itemize}
+
+\newtopic For distiller users, the
+\href{http://www.math.uakron.edu/~dpstory/aeb_pro.html}{\AEB\ Pro package}
+has many exciting features, functionality requires the document author use
+Acrobat~7.0 or higher.
+
+
+
+\addtocontents{toc}{\protect\vspace{\medskipamount}}
+\part{The Web Package}\label{s:web}
+
+\section{Introduction}
+
+The purpose of the \pkg{web} package is to create a page layout
+for documents meant for screen presentation, whether over the
+\textsf{WWW} or classroom/conference presentations, in
+\textsf{PDF}. Such documents are \emph{not \emph{(necessarily)}
+intended to be printed}; consequently, the page layout is, in some
+sense, optimized for screen viewing.
+
+\subsection{Overview}
+
+The \pkg{web} package redefines \cs{maketitle} and
+\cs{tableofcontents} in a more web friendly way; it colors the
+section headings, and inserts \cs{bullet}s ($\bullet$) at the
+\cs{subsubsection} level. This, to my eyes, is very attractive.
+Additionally, certain navigation devices (a navigation bar and
+some direction icons) are included in the package.
+
+There are options for a small collection of drivers:
+\texttt{dvipsone}, \texttt{dvips}. \texttt{dvipdfm} and \texttt{pdftex}. The language
+option redefines certain language dependent elements of the package
+to other languages. Currently, the following options are supported:
+\begin{quote}
+\begin{tabular}{lll}
+\texttt{dutch} & \texttt{french} & \texttt{german}\\
+\texttt{italian} & \texttt{norsk} & \texttt{russian}\\
+\texttt{spanish} & \texttt{dansk} & \texttt{polish}\\
+\texttt{finnish} & \texttt{czech} & \texttt{catalan}\\
+\texttt{brazil} & \texttt{turkish}
+\end{tabular}
+\end{quote}
+
+There is even an option for reformatting the \texttt{web}
+style to a print format!
+
+The capabilities of the \pkg{web} package and its options are
+discussed below. Any comments and suggested improvements (new
+features) would be greatly appreciated.
+
+\subsection{Package Requirements}
+
+The \pkg{web} package was designed for screen presentations
+tutorials, such as classroom or conference lectures, short technical
+articles, etc.; consequently, the \texttt{article} class of \LaTeX{}
+seems to be sufficient for these purposes. Though you can use
+\pkg{web} with any of the standard classes that define the
+\cs{section}, \cs{subsection} and \cs{subsubsection} commands, the
+package is really meant to be used with the \texttt{article}
+class. It is \textbf{strongly} suggested!
+
+The package heavily depends on Sebastian Rahtz' \pkg{hyperref}
+package (now maintained and developed by Heiko Oberdiek). The
+\pkg{web} package was developed using version 6.56 of
+\pkg{hyperref}. Using prior versions of \pkg{hyperref}
+\emph{may} lead to successful compilation, no guarantees offered.
+It is best to work with the most recent version of
+\pkg{hyperref}.
+
+The \textsf{color} and \textsf{amssymb} packages are also
+required. The former is for obvious reasons, the later is to
+provide certain navigation symbols when the \texttt{navibar}
+option is invoked.
+
+Finally, to create quality PDF documents, type~1 fonts \emph{must}
+be used. Fortunately, type~1 fonts in the Computer Modern font set
+are freely available, and come with all the major
+freeware, shareware and commercial \TeX{} systems. If you haven't
+done so already, learn how to use the type~1 fonts.
+
+In this regard, I have written an article that may be of interest
+to you entitled ``\textit{Using \LaTeX{} to Create Quality PDF Documents
+for the WWW}'', see reference \cite{article:Story:LaTeX}.
+
+\section{Basic Package Options}
+
+To use the \pkg{web} package, insert into the preamble of
+your document the following:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),!meta(other_options)]{web}
+\end{Verbatim}
+\noindent Replace \meta{other\_options} with any of the options recognized by
+\pkg{web}; see \hyperref[s:ListofOpts]{Section~\ref*{s:ListofOpts}}
+for a complete list of options. The first and optional argument
+\meta{driver} above defines the driver to be used; for
+example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[dvips]{web}
+\end{Verbatim}
+
+\paragraph*{Driver options.}\label{para:webdrivers} Below is a list of \meta{driver} options
+for the \pkg{web} package.
+\bgroup\def\rf#1{{\normalfont#1}}
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+dvips dvipsone textures % !rf((DVI)-to-(PS))
+pdftex % !rf(includes the !app(lualatex) application)
+dvipdfm dvipdfmx xetex % !rf((DVI)-to-(PDF))
+\end{Verbatim}
+\egroup\noindent
+Currently, the \pkg{web} package supports five drivers:
+\texttt{dvipsone}, the dvi-to-ps converter by \Y&Y, Inc.; \texttt{dvips},
+the freeware dvi-to-ps converter; \texttt{pdftex}, the
+\texttt{tex}-to-\texttt{pdf} application; \texttt{dvipdfm},
+\texttt{dvipdfmx}, and \texttt{xetex} the \texttt{dvi}-to-\texttt{pdf}
+applications by Mark Wicks and subsequent
+developers;\footnote{\url{http://odo.kettering.edu/dvipdfm/}}${}^{\text{\scriptsize,}}$\footnote{\url{http://scripts.sil.org/xetex}}
+and the
+commercial {\TeX} system for the Mac, \texttt{textures} and
+\href{http://www.uoregon.edu/~koch/texshop/texshop.html}{{\TeX}shop}.
+
+\handpoint\textbf{Automatic driver detection.} {\AEB} now has automatic driver detection for
+\textsf{pdftex} (including \textsf{luatex}) and \textsf{xetex}. Specification of these options
+is no longer needed.
+
+\newtopic {\AEB} is better at passing the driver between its components.
+When the driver is specified in the \pkg{web} package, the driver is passed to
+its components (\textsf{exerquiz}, \textsf{eforms}, \textsf{insdljs}). Similarly, if \pkg{web} is not used,
+exerquiz passes the driver specified to \textsf{eforms} and \textsf{insdljs}. Finally, \textsf{eforms} passes the driver
+specified to \textsf{insdljs}.
+
+\paragraph*{A note on \app{xetex}.}
+The \app{xetex} application may be set to strip out named destinations that
+are not referenced within the document as a target of a `hard-wired' actions.
+\app{AeB} (in particular, \pkg{exerquiz}) sets a lot of destinations (or
+targets) but, in many instances, `dynamic' links are employed using the
+JavaScript method \texttt{\textsl{Doc}.gotoNamedDest(\anglemeta{target})}. In
+such instances, \app{xetex} may strip out these targets; the link or button
+action may not perform the jump to the destination because the destination
+does not exist. If this becomes an issue for your \app{xetex} installation,
+the \textbf{\app{Dvipdfmx} Compatibility Flags} need to be modified. Search
+for the configuration file \texttt{dvipdfmx.cfg}, open the file. Scroll down
+to the line `\texttt{\%C 0x0000}', beneath it insert `\texttt{C 0x0010}',
+save and close the file.\footnote{MiK\TeX{} discourages the direct editing of
+the file \texttt{dvipdfmx.cfg}, instead, on the command-line prompt type and
+execute `\texttt{initexmf -{}-edit-config-file dvipdfmx}' enabling you to
+edit a local version of the configuration file as described above;
+just enter the line `\texttt{C 0x0010}', save and close.} The documentation
+for this bit field is just above the referenced line and an explanation of
+the `\texttt{C 0x0010}' setting is given.
+
+\redpoint The package has been tested using
+\verb+\documentclass{article}+ and it is \emph{strongly}
+recommended that this class be used; however, {\Web} does support the
+\texttt{book} class as well.\endredpoint
+
+%\begin{comment}
+%
+%\redpoint The default paper setting for \textsf{dvips} is
+%\texttt{A4}, but the cropping parameters assumes \texttt{letter}
+%paper size. To get the cropping of the page correct, there are
+%several procedures you can follow.
+%
+%\begin{questions}
+%\item Use the command line switch \texttt{-t letter}.
+%For example,
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+%dvips.exe -j0 -Pcm -Pams -t letter -o <foo>.ps <foo>.dvi
+%\end{Verbatim}
+%\item Change the default paper setting of \textsf{dvips} to
+%\texttt{letter} by placing the paper size for \texttt{letter}
+%first in the \texttt{config.ps} file of \textsf{dvips}:
+%
+%\smallskip
+%\leavevmode\begin{minipage}{.45\linewidth}
+%Change these lines \dots
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+%@ A4size 210mm 297mm
+%@+ %%PaperSize: A4
+%
+%@ letterSize 8.5in 11in
+%
+%@ letter 8.5in 11in
+%@+ %%BeginPaperSize: Letter
+%@+ letter
+%@+ %%EndPaperSize
+%\end{Verbatim}
+%\end{minipage}
+%\hfil
+%\begin{minipage}{.45\linewidth}
+%\dots to these.
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+%@ letter 8.5in 11in
+%@+ %%BeginPaperSize: Letter
+%@+ letter
+%@+ %%EndPaperSize
+%
+%@ A4size 210mm 297mm
+%@+ %%PaperSize: A4
+%
+%@ letterSize 8.5in 11in
+%
+%\end{Verbatim}
+%\end{minipage}
+%
+%\end{questions}
+%
+% If you find changing the command line inconvenient, you can
+%include the command
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+% \hypersetup{pdfpagescrop=53 486 389 754}
+%\end{Verbatim}
+%in the preamble of your document.
+%
+%\end{comment}
+
+%\makeatletter\hy@bookmarksnumberedfalse\makeatother
+%\subsubsection{\texorpdfstring{}{\textbullet\space}Setting the Driver Option}
+%\makeatletter\hy@bookmarksnumberedtrue\makeatother
+
+\subsection{Setting the Driver Option}\label{sss:driver}
+
+You can set your driver option in one of three ways:
+\begin{itemize}
+ \item Pass as a local option: %\\ %[3pt]
+ \cs{usepackage[\meta{driver}]\darg{web}}
+ \item Pass as a global option: %\\ %[3pt]
+ \cs{documentclass[\meta{driver}]\darg{article}}
+ \item Create the file \texttt{web.cfg} with the single command
+ in it:%\\ %[3pt]
+\begin{quote}
+ \cs{ExecuteOptions\darg{\meta{driver}}}
+\end{quote}
+ Place the file \texttt{web.cfg} in any folder where \LaTeX\
+ looks for input files. Then, you need only type
+ \verb+\usepackage{web}+.
+\end{itemize}
+Where \meta{driver} is any of the following options listed in
+the paragraph \textbf{\nameref{para:webdrivers}} on page~\pageref{para:webdrivers}.
+
+The macros of the \pkg{web} package have been extensively
+tested using the \Y&Y\ \TeX\ System for the
+\texttt{dvipsone} option and a MiK\TeX\ System
+(\url{www.miktex.org}) for the \texttt{dvips}, \texttt{pdftex} (which includes lua(la)tex),
+\texttt{dvipdfm}, \texttt{dvipdfmx}, and \texttt{xetex}
+
+%\subsubsection{The \texorpdfstring{\protect\texttt{pdftex}}{pdftex} Option}
+%
+%
+%The \texttt{pdftex} option requires \pkg{hyperref} version 6.60
+%or greater. (The most recent version is preferred.) The
+%\pkg{web} and \textsf{exerquiz} packages will probably run
+%correctly with slightly earlier versions, but you may see
+%`underfull hbox' error messages.
+%
+%The \pkg{web} package uses the AMS Font set for the
+%black triangle that appears in the navigation bar, see
+%\hyperref[ss:naviaids]{Section~\ref*{ss:naviaids}}.
+%
+%The AMS Font sets comes with Mik\TeX, if you don't have
+%\textsf{pdftex} configured the use them, here are some
+%instructions that work for the Mik\TeX{} system.
+%\begin{questions}
+%\item Copy the file \texttt{amsfonts.map} from the folder
+%\texttt{texmf/dvips/ams} to the folder \texttt{texmf/pdftex/base}.
+%(Mik\TeX{} may have restructured the directory tree since the time
+%of this documentation.)
+%\item Edit the file \texttt{pdftex.cfg} to include the lines:
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+%map +amsfonts.map % to get AMSFonts
+%map standard.map % to get dings
+%\end{Verbatim}
+%
+%\item The \texttt{pdftex.cfg} file now looks like this:
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+%output_format 1
+%compress_level 9
+%decimal_digits 2
+%page_width 210mm
+%page_height 297mm
+%horigin 1in % <-- important, see 4.
+%vorigin 1in % <-- important, see 4.
+%map standard.map
+%map +cm.map
+%map +amsfonts.map
+%\end{Verbatim}
+%\item Take note of the settings of \texttt{horigin} and
+%\texttt{vorigin}. Set these two to 1\,in\@. This will align the
+%text on the page where the cropping numbers expects the text to
+%be; the result will be a properly cropped page.
+%\end{questions}
+
+
+\subsection{The \texttt{tight} Option}\label{sss:webtight}
+
+In an effort to compact more material per page, I've introduced a
+\texttt{tight} option. When this option is used, many of the list
+parameters are redefined so that there is not so much space around these
+environments, and between items.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),tight,!meta(other_options)]{web}
+\end{Verbatim}
+
+\subsection{The \texttt{usesf} Option}\label{usesf}
+
+For presentations, some people like a sans serif font. Using this option
+make san serif the default font style.
+
+\subsection{The \texttt{draft} Option}\label{draft}
+
+When you take this option, graphic overlays are not allowed. This
+is useful when you rely heavily on graphic overlays, but during the
+development phase, don't need to read and re-read your overlays. The
+defined background colors will be used instead. Remove this option
+to build the final version of your document.
+
+
+\subsection{The \texttt{nobullets} Option}\label{nobullets}
+
+Traditionally, the subsubsections have been denoted by a bullet, by
+using this option, you can force the use of numbers for the
+subsubsections, This option automatically executes the
+\texttt{latextoc} option.
+
+There is another option \texttt{forceSubSubNumbers}, which does the same thing
+as nobullets. This option is included for compatibility with the {\AcroT}
+Presentation Bundle (\textsf{APB}).
+
+\subsection{The \texttt{unicode} Option}\label{web:unicode}
+
+This option is passed to \pkg{hyperref}, and is placed in {\Web} as a
+convenience. If \textsf{eforms} is subsequently loaded, \textsf{eforms} (and
+\textsf{exerquiz}) will accept {\LaTeX} markup in the optional argument
+of the form fields. See the \href{eformman.pdf}{eforms manual}
+for details.
+
+\subsection{The \texttt{useui} Option}\label{web:useui}
+
+This option is passed to \textsf{eforms}, and is placed in {\Web} as
+a convenience. If \textsf{eforms} is subsequently loaded,
+\textsf{eforms} loads the \textsf{xkeyval} package, and key-value pairs are
+defined for use in the optional argument of form and link commands.
+See the \href{eformman.pdf}{eforms manual} for details.
+
+\subsection{The \texttt{xhyperref} Option}\label{web:xhyperref}
+
+The \pkg{web} package requires \pkg{hyperref} and calls it with a particular
+set of options, given below.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\RequirePackage[%
+ !ameta(driver),
+ bookmarks,bookmarksnumbered,bookmarksopen,%
+ colorlinks,\aeb@useunicode,linkcolor=webgreen,%
+ filecolor=webbrown,citecolor=webgreen,%
+ urlcolor=webbrown,pagebackref,pdfpagemode=UseNone,%
+ pdfstartview=Fit,pdfpagelayout=SinglePage,%
+ !ameta(addtoHyOpts)}
+\end{Verbatim}
+These option choices may be overridden using the \opt{addtoHyOpts} or
+\opt{addtoHyOpts*} option, described in Section~\ref*{web:addtoHyOpts} below.
+
+Now, if this \opt{xhyperref} option is used, the \pkg{hyperref} package is
+\emph{not automatically} included by the \pkg{web} package. It is assumed
+that \pkg{hyperref} will be included in the document prior to \pkg{web}. Use
+the \opt{xhyperref} option if you want to completely revamp the look of a
+\pkg{web} document by custom choices of the \pkg{hyperref} options.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\documentclass{article}
+\usepackage[!ameta(Hy-options)]{hyperref}
+\usepackage[xhyperref,!ameta(web-options)]{web}
+...
+\end{Verbatim}
+This avoids possible ``option clashes'' when your choices conflict with those of \pkg{web}.
+
+
+\subsection{The \texttt{addtoHyOpts} and \texttt{addtoHyOpts*} Options}\label{web:addtoHyOpts}
+
+To maximize the convenience of passing options to \pkg{hyperref}, the \pkg{web} package
+provides the \opt{addtoHyOpts} option.
+\bVerb\takeMeasure{\string\usepackage[\meta{web-options},addtoHyOpts=\darg{\meta{Hy-options}}]\darg{web}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\documentclass{article}
+\usepackage[!meta(web-options),addtoHyOpts={!meta(Hy-options)}]{web}
+...
+\end{dCmd}
+\eVerb The value of \opt{addtoHyOpts} is any combination of key-values that
+\pkg{hyperref} offers as package options. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\documentclass{article}
+\usepackage[!meta(web-options),addtoHyOpts={pdfencoding=auto}]{web}
+...
+\end{Verbatim}
+The \texttt{pdfencoding=auto} is useful for authors writing in the latin1 character set. The
+value of \texttt{pdfencoding}, by the way, overrides the \opt{unicode} option.
+
+There is another option that passes its value to the \cs{hypersetup} command.
+\bVerb\takeMeasure{\string\usepackage[\meta{web-options},addtoHyOpts*=\darg{\meta{Hy-options}}]\darg{web}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\documentclass{article}
+\usepackage[!meta(web-options),addtoHyOpts*={!meta(Hy-options)}]{web}
+...
+\end{dCmd}
+\eVerb The value of \opt{addtoHyOpts*} is any combination of key-values that
+\pkg{hyperref} offers as package options. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\documentclass{article}
+\usepackage[!meta(web-options),addtoHyOpts={pdfencoding=auto}]{web}
+...
+\end{Verbatim}
+
+The \opt{addtoHyOpts} adds its value to the option list of \pkg{hyperref}, as
+built by \pkg{web}, whereas \opt{addtoHyOpts*} passes its value to the
+\cs{hypersetup} command. Both options \opt{addtoHyOpts} and
+\opt{addtoHyOpts*} may appear in the option list of \pkg{web} at the same
+time.
+
+\section{Setting Screen Size}\label{s:setscreensize}
+
+Beginning with version 2.0, the screen size can be set by the
+author. There are two ways to do this: (1) use the macros
+\cs{screensize} and \cs{margins} (These are the same
+macros, slightly redefined, for setting the screen size used by
+Radhakrishnan in his fine screen package \textsf{pdfscreen}.); or (2) use
+a screen design option. The next two sections address each of
+these in turn.
+
+\subsection{Custom Design}\label{cusDesign}
+
+There are six dimensions that need to be specified. As with
+\textsf{pdfscreen}, the two commands \cs{screensize} and
+\cs{margins} are used for doing so.
+
+The command \cs{screensize} takes two length parameters:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\screensize{!ameta(height)}{!ameta(width)}
+\end{Verbatim}
+\noindent The \ameta{width} and \ameta{height} parameters are the desired
+screen size of the page. The screen version of this manual uses
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\screensize{3.72in}{4.67in}
+\end{Verbatim}
+\noindent The other command, \cs{margins}, which determines the desired
+margins, takes four length parameters:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\margins[!ameta(panel_width)]{!ameta(left)}{!ameta(right)}{!ameta(top)}{!ameta(bottom)}
+\end{Verbatim}
+\newtopic The values of \cs{textheight} and \cs{textwidth} are computed
+based on the screen size and the margins. The margin settings for
+this document are given below:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\margins{.25in}{.25in}{30pt}{.25in}
+\end{Verbatim}
+\newtopic The optional first parameter \ameta{panel\_width} is used to set
+the width of the panel, if there is one. The default is \texttt{1in}.
+
+\begin{redpoint}\space\ignorespaces
+An important comment about the third parameter
+\ameta{top} is the following: as with \textsf{pdfscreen}, we put
+\cs{@Topmargin=\ameta{top}}. The running header fits within the top
+margin (this varies from standard \LaTeX{} practice). The
+\pkg{web} package dimension \cs{web@Topmargin} is the distance
+from the top of the screen down to the top of the running header. Thus,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\@Topmargin = \web@Topmargin + \headheight + \headsep
+\end{Verbatim}
+\noindent Also, \cs{web@Topmargin} can be used to adjust the
+positioning of a running header, which is specified in the
+\cs{margins} command. The default value of \cs{headheight} is
+\texttt{8pt}, so the value of \cs{headsep} is determined by the
+above equation. See the \textsf{web.dtx} file for more details.
+\end{redpoint}
+
+\subsection{Screen Design Options}\label{sss:designoptions}
+
+For your convenience, I've included nine options, \texttt{designi},
+\texttt{designii},\dots \texttt{designix}. The first one roughly
+corresponds to the original screen dimensions of \pkg{web}. The
+dimensions of these designs options are\medskip
+\begingroup\par\noindent\hfuzz=3pt\small
+\begin{tabular*}{\linewidth}{>{\ttfamily}l>{\ttfamily}lc|>{\ttfamily}l>{\ttfamily}lc}
+\multicolumn{1}{c}{Design Option}&\multicolumn{1}{c}{width $\times$ height}&\multicolumn{1}{c|}{AR}&%
+\multicolumn{1}{c}{Design Option}&\multicolumn{1}{c}{width $\times$ height}&\multicolumn{1}{c}{AR}\\\hline
+designi & {4.67in} $\times$ {3.736in}&5:4&designv &{6in} $\times$ {4.5in}&4:3\\
+designii &{5in} $\times$ {4.5in}&10:9&designvi &{4.67in} $\times$ {4.17in}&28:25\\
+designiii &{6in} $\times$ {5in}&6:5&designvii &{10in} $\times$ {7.5in}&4:3\\
+designiv &{5in} $\times$ {4in}&5:4&designviii&{6.67in} $\times$ {3.75in}&16:9\\
+&&&designix&3.75in $\times$ 6in&16:10
+\end{tabular*}
+\endgroup
+\newtopic Most of these design values were chosen for their visual appeal, or for some particular need.
+The designs \texttt{designv} and \texttt{designvii} have an aspect ratio of 4:3, this is a standard for video displays,
+while \texttt{designviii} is another one with a standard aspect ratio for wide screen computer monitors.
+
+\newtopic To select a particular design for your document, simply include its name amongst the option
+list for the \pkg{web} package; for example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[designv]{web}
+\end{Verbatim}
+creates a document with dimensions of \texttt{designv}, $6\,\text{in} \times 4.5\,\text{in}$.
+
+\redpoint When you specify a screen design, the macros
+\cs{screensize} and \cs{margins} are redefined to gobble up
+their parameters. To define a custom screen size, therefore, do
+not specify a screen design option for \pkg{web}.\endredpoint
+
+\subsection{\texorpdfstring{\protect\cs{setScreensizeFromGraphic}}{\CMD{setScreensizeFromGraphic}}}\label{setScreensizeFromGraphic}
+
+If a design is \emph{not specified} in the option list of \Web, you
+can use a graphic to set the screen size with
+\Com{setScreensizeFromGraphic}. The command takes two parameters
+that correspond to the parameters of \cs{includegraphics}, and are
+just passed to \cs{includegraphics}. This is useful if you have a
+graphic to be used for a template but cannot be deformed to fit one
+of the standard designs. The solution is to create a screen size
+matching the graphic, then using that graphic as a template. Example
+usage,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\margins{1in}{1in}{24pt}{.25in}
+\setScreensizeFromGraphic{acro_30}
+\template{acro_30}
+\end{Verbatim}
+It may become necessary with some graphics to use the
+\texttt{hiresbb} option for the command \cs{includegraphics}, both in
+\cs{setScreensizeFromGraphic} and \cs{template} like so,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\margins{1in}{1in}{24pt}{.25in}
+\setScreensizeFromGraphic[hiresbb]{acro_30}
+\template[hiresbb]{acro_30}
+\end{Verbatim}
+\newtopic This command should not be used with a panel option for the text screen
+size will be adjusted for the panel, and the graphic will be
+re-scaled appropriately.
+
+\subsection{Using \texorpdfstring{\protect\cs{addtoWebHeight} and \protect\cs{addtoWebWidth}}
+{\CMD{addtoWebHeight} and \CMD{addtoWebWidth}}}
+
+There may be an occasion when you've chosen your design dimensions
+(\texttt{designi}, \texttt{designii}, etc.), but you have determined the
+dimensions provided by the selected design are not quite \emph{wide} or \emph{high} enough.
+You can make adjustments to the width and height without explicitly specifying
+the commands \cs{margins} and \cs{screensize} by using \cs{addtoWebHeight} and/or
+\cs{addtoWebWidth}. The syntax for each is
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\addtoWebHeight{!ameta(length)}
+\addtoWebWidth{!ameta(length)}
+\end{Verbatim}
+These two can only be executed in the preamble, and they add (or subtract)
+the specified \ameta{length} to the height and width of the page. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\addtoWebHeight{1in}
+\end{Verbatim}
+adds one inch to the height of the page. This
+command is roughly equivalent to executing,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\screensize{!ameta(current_height)+1in}{!ameta(current_width)}
+\end{Verbatim}
+
+
+\subsection{Using a panel option}
+
+When the \texttt{rightpanel} or \texttt{leftpanel} option is used
+the page is divided into the text screen and a panel (either on the
+left or right of the page). The default width of the panel is 1in
+and the minimum width of the panel is 1in.
+
+When designing the screen using \cs{screensize} and \cs{margins},
+the panel width of the panel can be set by the first optional
+parameter of \cs{screensize}, as described in
+section~\ref{cusDesign}, page~\pageref*{cusDesign}. When using one
+of the standard design options, the panel width is set to the
+default value of 1in. To set the panel width to another value, use
+\cs{panelwidth} in the preamble. \verb!\panelwidth{1.25in}! sets the
+panel width to 1.25 inches.
+
+If you set the panel width to a length less than the minimal panel
+width, the minimal panel width (1in) will be used. You can reset the
+minimal panel width using \Com{minPanelWidth}. See
+section~\ref{panelscreentemplate},
+page~\pageref*{panelscreentemplate}, for more details on this command.
+
+\section{Hyperref Options}
+
+The \pkg{web} package loads \pkg{hyperref} into the document
+and sets some selected options of that package; therefore,
+including the \pkg{hyperref} package is not needed in the
+preamble of your own document.
+
+Any additional \pkg{hyperref} options that are needed can be
+introduced into the package using \pkg{hyperref}'s
+\cs{hypersetup} macro, for example,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\documentclass{article}
+\usepackage[!ameta(options)]{web}
+% Declare additional hyperref options using \hypersetup
+\hypersetup{pdfpagemode=UseNone,bookmarksopen=false}
+\end{Verbatim}
+An alternate approach is to use the \opt{addtoHyOpts} option of \pkg{web}:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\documentclass{article}
+\usepackage[!ameta(options),addtoHyOpts={pdfpagemode=UseNone,
+ bookmarksopen=false}]{web}
+\end{Verbatim}
+The \opt{addtoHyOpts*} option of \pkg{web} may also be used:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\documentclass{article}
+\usepackage[!ameta(options),addtoHyOpts*={pdfpagemode=UseNone,
+ bookmarksopen=false}]{web}
+\end{Verbatim}
+The \opt{addtoHyOpts} option adds its value to the \pkg{hyperref} option of
+as built by \pkg{web}, whereas, \opt{addtoHyOpts*} passes its value to the
+argument of a \cs{hypersetup} command.
+
+
+\noindent Documentation of the options that \pkg{hyperref}
+recognizes can be had by either \LaTeX ing the file
+\texttt{hyperref.dtx}, or by getting a copy of the \textsl{The
+\LaTeX\ Web Companion} \cite{book:Goossens3} by Michel Goossens,
+{\textsl{et al}}.
+
+\redpoint The \pkg{web} option \texttt{xhyperref} bypasses the inclusion
+of the \pkg{hyperref} package. It is expected that the document author inputs
+\pkg{hyperref} prior to \pkg{web}.
+
+\section{Running Headers and Footers}
+
+There are convenience commands setting the running headers and
+footers; they are \cs{lheader}, \cs{cheader}, \cs{rheader},
+\cs{lfooter}, \cs{cfooter}, and \cs{rfooter}. Each of these takes a
+single argument, which is the text for the header or footer in the
+position desired. In the standard setup for {\Web}, \cs{lheader},
+\cs{rheader} and \cs{cfooter} are used for, respectively, the
+current section title, the current page and the navigation bar (if
+activated).
+
+You can set some basic formatting styles for the header and footer using
+\Com{header\-format} and \cs{footerformat}. For example, executing
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\headerformat{\bfseries\color{red}}
+\end{Verbatim}
+causes the running header to appear in bold red color.
+
+There are a couple of hooks for the header and footers, these are
+\Com{webheadwrapper} and \Com{webfootwrapper}. These commands can be
+use to stylize the entire header or footer. They can be defined to have
+one argument. The argument is the content of the header or footer. For example,
+\begin{Verbatim}[numbers=left,xleftmargin=\amtIndent,fontsize=\small]
+\headerformat{\bfseries\color{red}}
+\footerformat{\bfseries\color{red}}
+\renewcommand{\webheadwrapper}[1]{\fcolorbox{red}{yellow}{%
+ \makebox[\linewidth-2\fboxsep-2\fboxrule][s]{#1}}}
+\renewcommand{\webfootwrapper}[1]{\fcolorbox{red}{yellow}{%
+ \makebox[\linewidth-2\fboxsep-2\fboxrule][s]{#1}}}
+\end{Verbatim}
+\newtopic Lines~(1) and~(2) makes declares bold font for the header and footer.
+Lines~(3) and~(4) defines a \cs{fcolorbox} with hideous red and yellow colors;
+lines~(5) and~(6). Note that adjustment in the width to account for the \cs{fcolorbox}
+rule width and the space surrounding the text in the \cs{fcolorbox}.
+
+\newtopic On occasion you may want to have no running headers at all, this can
+be accomplished by saying in the preamble, or anywhere,
+\verb!\lheader{}!, \verb!\cheader{}!, and/or \verb!\rheader{}!.
+Another solution is to use the commands \cs{clearHeaders} and
+\cs{restoreHeaders}. The command \cs{clearHeaders} first saves the current
+definitions of the headers then sets the headers to the empty
+header. The command \cs{restoreHeaders} restores the definitions that were in
+effect when the last \cs{clearHeaders} was executed.
+
+\newtopic\textbf{No running headers on section pages.}
+One user did not like a running header that includes a section title
+on the same page where the section begins. The default behavior is
+to create a running header where the section title does not appear
+in the header on the same page as the section is inserted, on
+subsequent pages, the section head appears, I hope.
+
+The two commands control this behavior, the default is \emph{to not
+show} the section heading (\cs{lheader}) on the page where the
+section begins. Use \Com{headersOnSectionPage} to place headers on
+the same page as the beginning of a section. You can also change back to
+the default behavior using \Com{noHeadersOnSectionPage} (the default).
+
+
+\section{The Title Page and TOC}
+
+The title page is constructed from the values of the macros:
+\cs{title}, \cs{author}, \cs{uni\-ver\-sity}, \cs{email}, and
+\cs{version}. The values of some of the macros \cs{title} and
+\cs{author} are also transferred to the PDFDocInfo section of the
+Acrobat/Adobe Reader. (Press \texttt{Ctrl+D} while viewing a \PDF{} document
+to see this information.)
+
+Additionally, the values of \cs{subject} and \cs{keywords}---which
+do not appear on the title page---are inserted into the PDFDocInfo
+section.
+
+\newtopic The colors of the text corresponding to \cs{title}, \cs{author} and \cs{university} on the title
+page can be set by using \cs{titleColor}, \cs{authorColor} and \cs{universityColor}.
+Each takes a single argument, a named color. The defaults are
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\universityColor{blue}
+\titleColor{black}
+\authorColor{black}
+\end{Verbatim}
+For more information on defining named \textsf{colors}, see the documentation
+of the color or \textsf{xcolor} packages. A simple example would be
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\definecolor{MyOwnColor}{rgb}{0.945,0.87,0.518}
+\end{Verbatim}
+
+\redpoint When the \texttt{extended} option is used, all colors can be
+specified with \cs{selectColors}, see
+\Nameref{designColor}.\endredpoint
+
+\subsection{Basic Information Commands}\label{ss:BIM}
+
+The basic information commands allows you a convenient way to enter the title and author
+of the document, as well as other information. To enter this basic information,
+just fill in the values of all the basic macros briefly described below.
+
+For example, the following is a copy of the title information for this document:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+% \title,\author,\subject,\keywords are sent to DocInfo
+\title{The Web and Exerquiz Packages Manual of Usage}
+\author{D. P. Story}
+\subject{How to create on-line exercises and quizzes}
+\keywords{LaTeX,hyperref,PDF,exercises,quizzes}
+\end{Verbatim}
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+% \university,\email,\version are used only on title page
+\university{Northwest Florida State College\\
+ Department of Mathematics}
+\email{dpstory@acrotex.net}
+\version{1.0}
+\copyrightyears{1999-2010}
+\end{Verbatim}
+You can optionally specify the \cs{date}. The web packages uses the value of \cs{date}
+at the bottom of the title page. There is says, ``Last Revision Date: \ameta{date}''. If
+the \cs{date} command is not used, the current date is used.
+
+\redpoint The \cs{title}, \cs{author}, \cs{subject}, \cs{keywords}
+are a convenient way of entering information in the Document
+Information fields---see
+\begin{equation*}
+\texttt{File > Document Info > General... (Ctrl+D)}
+\end{equation*}
+in the Acrobat/Adobe Reader.\endredpoint
+
+\newtopic\indent If \cs{title} contains control sequences that do not expand to the
+Standard PDFDocEncoding character set, Distiller will be thrown
+into a tailspin; \pkg{hyperref} defines the \cs{texorpdfstring}
+macro\footnote{The code for handling PDFDocEncoding for
+\pkg{hyperref} is due to Heiko Oberdiek} to avoid these kinds
+of problems. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\title{The \texorpdfstring{$e^x$}{EXP} Function}
+\end{Verbatim}
+\noindent The first argument is the one that is typeset (on the title page,
+the title of the document will be `The $e^x$ Function'); the
+second argument is the one that is sent to the title field of
+DocInfo in the Adobe Reader (and will read `The EXP Function').
+
+Of all the \nameref{ss:BIM}, as listed on page~\pageref*{ss:BIM},
+use \cs{texorpdfstring} only with the \cs{title} and \cs{author};
+these are the only two that are both typeset and placed in the
+DocInfo field of the Adobe Reader.
+
+\redpoint \cs{texorpdfstring} works for \cs{section},
+\cs{subsection}, etc\@. as well.\par\medskip
+
+\newtopic Having entered the values of the basic information
+commands, you can now type the standard sort of \LaTeX\ commands of
+\cs{maketitle} and \cs{tableofcontents}:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{document}
+\maketitle
+\tableofcontents
+...
+...
+\end{document}
+\end{Verbatim}
+
+\exAeBBlogPDF{p=803}\gob{\exPDF{webeqtst}} Use the source file for
+\texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}} as a prototype or
+template for your own document.
+
+\redpoint When the \texttt{extended} option is in effect, the basic document
+information just described can be entered through the
+\cs{DeclareDocInfo} command, see page~\pageref{docinfo}.\endredpoint
+
+\subsection{Title Page Structure}
+
+The title page is divided into three parts: top, middle and bottom.
+\begin{itemize}
+\item \textbf{Title Top:} The content of the top is determined by the \Com{top\-Titl\-ePage}
+command. (This command can be redefined, but it is not recommended.) The
+\cs{topTitlePage} command expands to three elements: the university (affiliation), the title,
+and the author(s), in that order vertically. These are the values of the commands \cs{university},
+\cs{title} and \cs{author} discussed in the previous section.
+
+\item \textbf{Title Middle:} The \Com{optionalPageMatter} command
+is used to enter content into this part of the title page. This
+middle part is optional; if \cs{optionalPageMatter} does
+not appear in the preamble, this part of the title page is
+empty. Here is an example of usage:
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\optionalPageMatter{%
+ \begin{center}
+ \fcolorbox{blue}{webyellow}{
+ \begin{minipage}{.67\linewidth}
+ \noindent\textcolor{red}{\textbf{Abstract:}} This
+ file attempts to teach you how to create a simple
+ \LaTeX\ document.
+ \end{minipage}}
+ \end{center}}
+\end{Verbatim}
+The above definition will create the framed box seen below.
+
+ \begin{center}
+ \fcolorbox{blue}{webyellow}{
+ \begin{minipage}{.67\linewidth}
+ \noindent\textcolor{red}{\textbf{Abstract:}} This file
+ attempts to teach you how to create a simple \LaTeX\ document.
+ \end{minipage}}
+ \end{center}
+
+The \cs{optionalPageMatter} appears just below the \cs{webauthor}
+and above the directory listing if there is any.
+
+The syntax \cs{optionalPageMatter} is\dots
+\bVerb\takeMeasure{\cs{optionalPageMatter[\ameta{vspace}]\darg{\ameta{content}}}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\optionalPageMatter[!ameta(vspace)]{!ameta(content)}
+\end{dCmd}
+\eVerb where \ameta{content} content to be displayed in middle title region, and
+\texttt{[\ameta{vspace}]} consists of one (or more) \cs{vspace} commands. The default
+is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\minimumskip\vspace{\stretch{1}}
+\end{Verbatim}
+The command \cs{minimumskip} expands to \cs{medskip}.
+
+\item \textbf{Title Bottom:} Bottom of the title page is controlled
+by the contents of the command \cs{titlepageTrailer} and consists of
+the values of the commands \cs{email}, \cs{version}, \texttt{copyrightyears}
+Below is a rough figure depicting the location of the elements found
+in the title page trailer.
+
+{\setlength{\tabcolsep}{0pt}
+\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}lr}
+\anglemeta{copyright notice} & \cs{thewebemail}\\
+\anglemeta{revision} & \cs{webversion}
+\end{tabular*}}
+\newtopic The definition of these elements are as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\def\maketitle@trailer@ul{\web@copyright\ \web@copyright@symbol\
+ \webcopyrightyears}
+\def\maketitle@trailer@ll{\web@revision\ \@date}
+\def\maketitle@trailer@ur{\thewebemail}
+\def\maketitle@trailer@lr{\webversion}
+\end{Verbatim}
+
+\begin{description}
+%
+% ?? The ul corner not accurate, need to address this.
+%
+\item The \texttt{ul} corner: The macro \cs{web@copyright} expands to `Copyright', it can be redefined, or removed by
+ executing \Com{nocopyright}. \cs{webcopyrightyears} expands to the argument of \cs{copyrightyears}.
+
+%the final element in the upper left is the email address.
+%To make everything go away except for the email address, executed \Com{nocopyrightNotice}.
+
+\item The \texttt{ll} corner: The \anglemeta{revision} expands to
+\cs{web@revision} followed by \cs{@date}. The \cs{web@revision} expands to
+``Last Revision Date:'', and can be changed by using \cs{revisionLabel}
+(for example \verb!\revisionLabel{Published:}!). The \cs{@date} expands to
+the argument of the \cs{date} command, or if this was not used, expands
+to the current date.
+
+\item The \texttt{ur} corner: The upper-right corner goes the email address, as enter through
+the \cs{email} command.
+
+\item The \texttt{lr} corner: The \cs{webversion} command goes into the
+ lower-right corner. It expands to
+ \cs{web@versionlabel\;\anglemeta{version\_number}}, while, in turn,
+ the command \cs{web@versionlabel} expands to ``Version''. This label can be
+ changed by using \Com{versionLabel} (for example,
+ \verb!versionLabel{Attempt}!). Finally, the variable
+ \anglemeta{version\_number} is the number entered through the
+ \cs{version} command.
+\end{description}
+\end{itemize}
+
+\newtopic The font size of the title page trailer
+ is set by the command \cs{trailerFontSize}, the default is
+\cs{footnotesize}. This command must be re-defined in the usual
+way: for example, \verb!\renewcommand{\trailerFontSize}{\small}!.
+
+
+\redpoint When using the pro option, the elements of the title page trailer
+can be entered by using \Com{DesignTitlePageTrailer}, see
+\Nameref{trailer}.\endredpoint
+
+\subsection{Redefining
+\texorpdfstring{\protect\cs{maketitle}}{\textbackslash maketitle}}
+
+The arguments of the \Nameref{ss:BIM} macros, as just discussed,
+are used to define text macros with no parameters; for example,
+when you type \verb+\title{Web Package}+, the macro \cs{title}
+takes its argument and defines a macro \cs{webtitle} that expands
+to `Web Package'.
+
+You can redesign the title page to suit your needs simply by
+redefining \cs{maketitle}: rearrange the macros listed in the
+second column of \hyperref[table:BIM]{Table~\ref*{table:BIM}} on
+the page, or include a graphic, or change the background color.
+To redefine \cs{maketitle}, use the commands:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\maketitle{...your design...}
+\end{Verbatim}
+\noindent See the definition of \cs{maketitle} in the \texttt{web.sty} file
+for an example.
+
+\begin{table}[hbt]
+\begin{center}
+\begin{tabular}{|l|l|}
+\hline
+\multicolumn1{|l|}{This macro} &
+\multicolumn1{l|}{defines this macro} \\
+\hline
+\cs{title} & \cs{webtitle} \\
+\cs{author} & \cs{webauthor} \\
+\cs{subject} & \cs{websubject} \\
+\cs{keywords} & \cs{webkeywords}\\
+\cs{university} & \cs{webuniversity} \\
+\cs{email} & \cs{webemail} \\
+\cs{version} & \cs{webversion} \\
+\cs{copyrightyears} & \cs{webcopyrightyears} \\
+\hline
+\end{tabular}
+\caption{The Basic Information Macros}\label{table:BIM}
+\end{center}
+\vspace{-\baselineskip}
+\end{table}
+
+When making the design, it is useful to know that the {\Web}
+package uses the command \cs{hypertarget} to create a named destination,
+`\texttt{webtoc}', in the table of contents. Use this
+\texttt{webtoc} to jump to the table of contents using
+the macro \cs{hyperlink}.
+
+\redpoint When the \texttt{extended} option is in effect, a slight redefinition
+of \cs{maketitle} occurs. See the details in section~\ref{maketitlepro},
+\Nameref{maketitlepro}.
+
+\subsection{The Title Page Directory}\label{titlepagedir}
+
+When the \texttt{usedirectory} option is taken, a directory listing
+appears on the title page. The default structure of the directory is
+
+\makeatletter
+ \vbox{\begin{flushleft}{\web@formatWordDirectory\web@directory}%
+ \vspace{-3pt}%
+ \begin{itemize}\setlength{\itemsep}{-3pt}\web@formatDirectoryItems
+ \if\web@removeDirTOC y\else\item\relax\dirTOCItem\fi
+ \if\web@removeDirArticle y\else\item\relax\dirArticleItem\fi
+ \web@addtoDirList
+ \end{itemize}
+ \end{flushleft}}
+\makeatother
+There are several commands that can be used to modify the directory.
+\settowidth{\aebdimen}{\cs{dirContentLink\darg{Begin \string\hyperlink\darg{\string\web@Start.1}\darg{Article}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\directoryName{Directory}
+\tocName{Table of Contents}
+\dirContentLink{Begin \hyperlink{\web@Start.1}{Article}}
+\end{dCmd}
+\newtopic These three define the default text strings
+that appear. In the case of \cs{dirContentLink},
+there is a built-in \cs{hyperlink} to the start of
+the article.
+\settowidth{\aebdimen}{\cs{formatWordDirectory\darg{\string\bfseries\string\large}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\formatWordDirectory{\bfseries\large}
+\formatDirectoryItems{\bfseries}
+\end{dCmd}
+\newtopic The formatting of the \cs{directoryName} can be set by \cs{formatWordDirectory},
+the default definition is given above. The (global) formatting for the listing of the
+items can be set using \cs{formatDirectoryItems}, the default is shown above.
+\settowidth{\aebdimen}{\cs{removeDirTOC\quad\string\removeDirArticle}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\removeDirTOC!quad\removeDirArticle
+\end{dCmd}
+\newtopic These two commands remove the ``Table of Contents'' and
+the ``Begin Article'' items from the list, respectively.
+
+
+\settowidth{\aebdimen}{\cs{addtoDirList\darg{\meta{new\_item}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\addtoDirList{!meta(new_item)}
+\dirTOCItem
+\dirArticleItem
+\end{dCmd}
+\newtopic To add a new item to the end of the directory list, use \cs{addtoDirList}, the argument
+is the new item. The other two commands \cs{dirTOCItem} and \cs{dirArticleItem} are commands
+representing the first two default items. For example, typing
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\addtoDirList{My home page is \url{www.example.com}}
+\end{Verbatim}
+in the preamble, adds this item to the end of the list. Should you want your home page listed first, you could do the
+following
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\removeDirTOC
+\removeDirArticle
+\addtoDirList{My home page is \url{www.example.com}}
+\addtoDirList{\dirTOCItem}
+\addtoDirList{\dirArticleItem}
+\end{Verbatim}
+
+\newtopic The following are for creating some special effects around the directory,
+such as putting the directory into a multicolumn format.
+
+\settowidth{\aebdimen}{\cs{priorDirMatter\darg{\meta{text/commands}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\priorDirMatter{!meta(text/commands)}
+\afterDirMatter{!meta(text/commands)}
+\priorDirList{!meta(text/commands)}
+\afterDirList{!meta(text/commands)}
+\end{dCmd}
+
+Below is a partial listing of the definition of \cs{webdirectory}, the internal name
+for the directory. We present the code so you can see where the prior/after commands
+write to.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\web@priorDirMatter
+\begin{flushleft}{\web@formatWordDirectory\web@directory}%
+\web@priorDirList
+\vspace{\vspaceAfterDirName}%
+\begin{itemize}
+ !anglemeta(directory listing)
+\end{itemize}
+\web@afterDirList
+\end{flushleft}
+\web@afterDirMatter
+\end{Verbatim}
+\newtopic Contained within the code is another command, \Com{vspaceAfterDirName}, not mentioned before.
+It is used to adjust vertical spacing after the directory name and
+the beginning of the itemize list.
+
+A final command that may be useful is \Com{directoryhook}. It is used for manipulating
+the directory as a whole.
+
+\bgroup\obeyspaces %
+\settowidth{\aebdimen}{\ttfamily{ \anglemeta{code that manipulates \#1}}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\directoryhook{
+ !anglemeta(code that manipulates #1)
+}
+\end{dCmd}
+\egroup
+\newtopic The argument of \cs{directoryhook} is some \LaTeX{} code that manipulates \texttt{\#1}, within
+the argument \texttt{\#1} refers to \cs{webdirectory}, the internal name of the directory.
+The following example places a colored box around the directory, and centers it on the title page.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\directoryhook{%
+ \begin{center}
+ \setlength{\topsep}{0pt}%
+ \fcolorbox{red}{webyellow}{%
+ \parbox{.4\linewidth}{#1}}%
+ \end{center}
+}
+\end{Verbatim}
+
+\exAeBBlogPDF{p=283} See the file
+\texttt{\href{\urlAcroTeXBlog/?p=283}{multicol\_dir.pdf}}
+for examples of many of these commands. This file is posted on the
+\href{\urlAcroTeXBlog}{\AcroBlog}.
+
+
+%\directoryhook
+
+
+\subsection{The TOC for Web}
+
+The \pkg{web} style comes with its own table of contents format,
+as seen in the table of contents for the screen version of this document.
+The amount of indentation can be adjusted using \cs{tocindent}. The default is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\tocindent{20pt}
+\end{Verbatim}
+There is another relevant parameter, \cs{widestNumber}. The value of the
+argument of this command declaration sets the amount of indentation for the
+subsection numbers. The default is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\widestNumber{0.0.}
+\end{Verbatim}
+This is a template for the subsection numbers, the default is a one digit
+section number and a one digit subsection number. In the preamble of this
+document, I've set \cs{widestNumber\darg{0.00.}}, since some subsection
+numbers have two digits.
+
+\newtopic The color of the heading of the table of contents is set through
+\settowidth{\aebdimen}{\cs{tocColor\darg{\meta{named\_color}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\tocColor{!meta(named_color)}
+\end{dCmd}
+Specifying a color through this command at any time before the creation of the table of contents
+will change the color of the heading. The default is blue.
+
+
+\redpoint If you prefer the standard {\LaTeX}, the
+\texttt{\hyperref[sss:latextoc]{latextoc}} option can be used.\endredpoint
+
+\subsection{The
+\texorpdfstring{\protect\texttt{usedirectory}}{usedirectory}
+Option}\label{sss:nodir}
+
+When the \texttt{usedirectory} option is specified, a short
+directory appears on the first page, see \Nameref{titlepagedir} for
+more details.
+
+\redpoint \textbf{\textcolor{red}{Important Note:}} In previous versions
+of {\Web}, the directory automatically appeared, and there was a
+\texttt{nodirectory} option to make it go away. Now, the directory
+does not appear by default, and the option \texttt{usedirectory}
+makes it appear. The \texttt{nodirectory} option is still defined,
+but does nothing.\endredpoint
+
+
+\subsection{The \texorpdfstring{\protect\texttt{latextoc}}{latextoc}
+Option}\label{sss:latextoc}
+
+If you don't like the default design for the table of contents,
+you can always recover the standard \LaTeX\ table of contents by
+using the \texttt{latextoc} option with the \pkg{web}
+package:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[latextoc]{web}
+\end{Verbatim}
+\noindent Should you want to go with this option, you might consider
+including
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\hypersetup{linktocpage}
+\end{Verbatim}
+\noindent Look at the table of contents with and without this
+\pkg{hyperref} option to decide which you prefer.
+
+\subsection{The \texttt{centertitlepage} Option}\label{centertitle}
+
+Beginning with version 5.0, there is a \texttt{centertitlepage} option
+that attempts to center the title page better when the \texttt{forpaper} option
+is taken. The \cs{textwidth} of the document is preserved.
+
+\subsection{The \texttt{centertitlepagefull} Option}\label{centertitlefull}
+
+When the \texttt{centertitlepagefull} option is used, the content of the title
+page is centered on the page when the \texttt{forpaper} option
+is taken. The \cs{textwidth} is \cs{paperwidth} minus \texttt{2\cs{coverpagemargin}}.
+The default value of the \emph{command} \cs{coverpagemargin} is \texttt{1\,in}.
+
+
+\subsection{The \texorpdfstring{\protect\cs{makeinlinetitle}}{\CMD{makeinlinetitle}} Command}\label{inlinetitle}
+ \aebCng[makeinlinetitle]
+
+For some short documents,\footnote{Short documents such as white
+papers, homework assignments, for example.} a formal title page may
+not be needed or desirable. In this case, use \cs{makeinlinetitle},
+the ``in-line'' title.
+
+\settowidth{\aebdimen}{\cs{makeinlinetitle}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\makeinlinetitle
+\end{dCmd}
+
+\newtopic The command, which can be redefined to your needs, has the following design:
+\begin{center}\setlength{\tabcolsep}{0pt}
+\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}lcr}
+ & \cs{webtitle} &\\
+\cs{webuniversity} & \cs{webauthor} & \cs{webemail}\\
+\texttt{date} & & \cs{webversion}
+\end{tabular*}
+\end{center}
+The table above extends the entire \cs{linewidth}. The values of \cs{webtitle},
+\cs{web\-uni\-ver\-sity}, \cs{webauthor}, \cs{webmail} and \cs{web\-ver\-sion}
+are populated by their command counterparts, see \hyperref[table:BIM]
+{Table~\ref*{table:BIM}}, page~\pageref*{table:BIM}. The \texttt{date},
+as appears in the lower left row, will expand to the current date,
+or the value specified by the \cs{date} command.
+
+\newtopic Below are notes in the case the \texttt{extended} option is in effect:
+\begin{itemize}
+ \item The basic information above can be entered through
+ \cs{DeclareDocInfo} command as described in
+ section~\ref*{docinfo}, entitled \Nameref{docinfo}.
+ \item If the value of the \texttt{prepared} key is not specified, then
+ \texttt{date} is the current date, otherwise, \texttt{date} is the one specified
+ as the value of the \texttt{prepared} key.
+ \item If the value of the \texttt{talksite} key is not specified, then
+ \cs{webversion} is used; but if \texttt{talksite} is specified, the value of this
+ key is used instead of \cs{webversion}.
+\end{itemize}
+
+\section{Template Options}\label{ss:templates}
+
+The \pkg{web} Package has three options (and supporting
+commands) for creating colored backgrounds, graphics backgrounds,
+and various overlays.
+
+\subsection{The \texttt{usetemplates} Option}
+
+The \texttt{usetemplates} option activates the mechanism for
+creating colored backgrounds and graphic overlays. A complete
+discussion of the commands related to this option can be found
+in the section entitled \Nameref{ss:templagemagement}.
+
+\redpoint See the demo file \texttt{bgtest.tex} for examples.
+
+\subsection{The \texttt{leftpanel} and \texttt{right\-panel} Options}\label{ss:lrpanel}
+
+When either of these two options is specified, a vertical panel
+is created. See the section entitled \Nameref{ss:templagemagement}
+for a complete discussion of the commands related to these options.
+
+\redpoint See the demo file \texttt{bgtest.tex} for examples.
+
+\subsection{The \texttt{leftpanelprt} and \texttt{right\-panelprt} Options}\label{ss:lrpanelprt}
+
+These two options are the same as \texttt{leftpanel} and
+\texttt{right\-panel} \emph{when there is no paper option} (\texttt{forpaper},
+\texttt{forcolorpaper}). When a paper option is taken, these options do
+nothing. The options are useful for creating a paneled PDF for the
+screen, but the paper version that has no panel.
+
+\section{Navigation Aids}\label{ss:naviaids}
+
+The \pkg{web} package offers a couple of navigation aids to
+help you move around: the \texttt{navibar} Option, and some
+\hyperref[sss:diricons]{direction icons}.
+
+\subsection{A Navigation Bar}\label{sss:navibar}
+
+Use the \texttt{navibar} option of \pkg{web} to add a
+navigation toolbar, as seen at the bottom of this page.
+Usage:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),navibar]{web}
+\end{Verbatim}
+The result is the navigation bar you see at the bottom of the
+page.
+
+\NaviBarOn\AddToShipoutPicture*{\NaviBarOff}
+
+\begin{comment}
+\redpoint Here is (almost) the preamble of this document.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage[dvipsone,navibar]{web} % <- navibar option
+
+\hypersetup{pdfpagemode=None,bookmarksopen=false}
+
+\title{The Web and Exerquiz Packages Manual of Usage}
+\author{D. P. Story}
+\subject{How to create on-line exercises and quizzes}
+\keywords{LaTeX, hyperref, PDF, exercises, quizzes}
+\version{1.30}\copyrightyears{1999-2000}
+\email{dpstory@uakron.edu}
+\university{THE UNIVERSITY OF AKRON\\
+ Mathematics and Computer Science}
+\end{Verbatim}
+\end{comment}
+
+\redpoint The toolbar can be turned on or off by the following
+commands: \cs{Navi\-Bar\-On}\sCom{NaviBarOn} and
+\cs{Navi\-Bar\-Off}\sCom{NaviBarOff}. The navigation toolbar at
+the bottom of the page was generated by the \cs{NaviBarOn}.
+\cs{NaviBarOff} was placed on the next page to turn off the bar. The
+exact code used on this page is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\NaviBarOn\AddToShipoutPicture*{\NaviBarOff}
+\end{Verbatim}
+
+\newtopic The colors for the navigation bar can be set with commands
+\Com{navibarTextColor} and \Com{navibarBgColor}. Each take a single
+argument, a named color. The default colors are \texttt{webblue} and
+\texttt{webgray}, respectively.
+
+
+\subsection{\texorpdfstring{\protect\cs{newNaviIcon}}
+ {\textbackslash newNaviIcon}}\label{ss:newnaviicon}
+
+The \cs{newNaviIcon} can be used to define a navigation icon.
+The action of the icon can be to execute a menu item, perform a
+hyper-jump, or execute the JavaScript code. It takes six
+parameters:
+
+\medskip\noindent Parameters
+\begin{Verbatim}[xleftmargin=\amtIndent]
+#1 = m, j, or l
+#2 = command name of the new navigation icon
+#3 = width of icon
+#4 = height of icon
+#5 = text to appear in the center of the icon.
+#6 = if m: named menu action, e.g., NextPage, PrevPage, etc.
+ if j: execute JavaScript
+ if l: \hyperlink{arg} or \href{arg}
+\end{Verbatim}
+\noindent Once the \cs{newNaviIcon} command is executed, a new icon is
+defined. The name of this new icon is the value of parameter \#2.
+
+\redpoint \textcolor{blue}{Example:}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newNaviIcon[m]{\myNext}{34pt}{10pt}{Next}{NextPage}
+\newNaviIcon[j]{\jsWarning}{34pt}{10pt}{Hi}{app.alert("Hi there")}
+\newNaviIcon[l]{\linkJump}{34pt}{10pt}{Go}{\hyperlink{page.1}}
+\end{Verbatim}
+
+\newNaviIcon[m]{\myNext}{34pt}{10pt}{Next}{NextPage}
+\newNaviIcon[j]{\jsWarning}{34pt}{10pt}{Hi}{app.alert("Hi there")}
+\newNaviIcon[l]{\linkJump}{34pt}{10pt}{Go}{\hyperlink{page.1}}
+
+\noindent By typing \verb+\myNext\ \jsWarning\ \linkJump+, we get
+\[
+ \myNext\ \jsWarning\ \linkJump
+\]
+The colors for the navigation bar can be set with commands
+\cs{navibarTextColor} and \cs{navibarBgColor}.
+
+\subsection{Direction Icons}\label{sss:diricons}
+
+The up arrow you see in the upper right-hand corner was
+constructed using colored rules and the AMS symbol font,
+\texttt{amssymb}. The uparrow icon was produced by the command:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\insertnaviiconhere{\ArrowUp{\hyperlink{webtoc}}}
+\end{Verbatim}
+The definition of \cs{ArrowUp}, which be found in the \textsf{web.dtx} file is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\ArrowUp[1]
+{%
+ \setlength{\fboxsep}{6pt}\normalsize
+ \raisebox{-\depth}[0pt][0pt]{%
+ #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
+ {\textcolor{\web@directionIconTextColor}{$\bigl\Uparrow$}}}}%
+}
+\end{Verbatim}
+
+\noindent Or, more generally,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\insertnaviiconhere{\ArrowUp{link_command}}
+\insertnaviiconhere{\ArrowDown{link_command}}
+\end{Verbatim}
+\noindent This will insert direction icons on the current page (I
+hope).
+
+\insertnaviiconhere{\ArrowUp{\hyperlink{toc.1}}}
+
+\medskip
+
+If you want a running direction icon you can use
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\insertnaviiconhereafter{\ArrowUp{link_command}}
+\end{Verbatim}
+\noindent or
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\insertnaviiconhereafter{\ArrowDown{link_command}}
+\end{Verbatim}
+
+
+\redpoint To discontinue a running arrow icon type
+\begin{equation*}
+\cs{defaultpageheader}
+\end{equation*}
+on the page you want the arrow(s) to disappear.
+
+\newtopic The colors of the direction icons by using
+the commands \Com{directionIconTextColor} and
+\Com{directionIconBgColor}. Each command takes a named color as its argument;
+the default values are \texttt{webblue} and \texttt{webgray}, respectively.
+
+\subsection{\texorpdfstring{\protect\cs{panelNaviGroup}}
+ {\textbackslash panelNaviGroup}}\label{ss:panelnavigroup}
+
+When the \texttt{\hyperref[ss:lrpanel]{leftpanel}} or
+\texttt{\hyperref[ss:lrpanel]{rightpanel}} options are chosen, a
+(navigation) panel is created. The command \cs{panelNaviGroup}
+can be used to create the standard navigation panel.
+
+%\exPDF{bgtest} See the sample file \texttt{bgtest.tex} for an example of usage.
+
+\exAeBBlogPDF{p=877} See the file \texttt{\href{\urlAcroTeXBlog/?p=877}{bgtest.pdf}}.
+The source file \texttt{bgtest.tex}, attached to the PDF, offers an example
+of \cs{panelNaviGroup}. This article is posted on the
+\href{\urlAcroTeXBlog}{\AcroBlog}.
+
+
+\section{The Language Options}\label{web:langopts}
+
+The language options redefine all of the language dependent text
+macros that appear on the title page, in the table of contents, and
+in the running headers. Invoke these options in the usual
+way:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),!meta(lang_opt)]{web}
+\end{Verbatim}
+Here, \texttt{\meta{lang\_opt}} is one of the following values:
+\begin{quote}
+\begin{tabular}{lll}
+\texttt{dutch} & \texttt{french} & \texttt{german}\\
+\texttt{italian} & \texttt{norsk} & \texttt{russian}\\
+\texttt{spanish} & \texttt{dansk} & \texttt{polish}\\
+\texttt{finnish} & \texttt{czech} & \texttt{catalan}\\
+\texttt{brazil} & \texttt{turkish}
+\end{tabular}
+\end{quote}
+
+The \pkg{web} and \textsf{exerquiz} packages seem to be
+compatible with the \textsf{babel} package; you can use
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage[french]{babel}
+\usepackage[dvips,french]{web}
+\usepackage{exerquiz}
+\end{Verbatim}
+subject to the usual restrictions on these language packages.
+(Don't use characters declared active by these languages within a
+\cs{label}, or as a field name for a quiz.)
+
+\section{Paper Related Options and Commands}\label{paperoptions}
+
+In this section, several paper options are discussed, and one command.
+
+\subsection{The
+\texorpdfstring{\protect\texttt{forpaper}}{forpaper}
+Option}\label{sss:webforpaper}
+
+Some people may want to create exercises using the
+\texttt{exercise} environment for a paper document. The
+\texttt{forpaper} option can be used to remove the color from the
+document, and to restore the standard \cs{textheight} of a standard
+\texttt{article} class \LaTeX{} document.
+
+The \cs{textwidth} is determined from the \cs{screensize} and
+\cs{margins} parameters or by the design option (see
+\nameref{sss:designoptions}), \emph{if any are given}; consequently,
+the line breaks are the same for the ``web'' version and the
+``print'' version. If the screen dimensions are not set (by a design
+option or by the \cs{screensize} and \cs{margins} commands) when
+using the \texttt{forpaper} option, the standard {\LaTeX} page
+layout dimensions are used for the class.
+
+Using the \texttt{forpaper} option with the \texttt{latexlayout}
+option will give you the standard \LaTeX{} \cs{textwidth}.
+
+The \texttt{forpaper} option also changes the \cs{newpage} command
+to \cs{par}\cs{medskip} at the end of each solution---we don't
+want to waste paper now, do we?
+
+Finally, there is a Boolean switch \verb+\ifeqforpaper+, which you
+are free to use to refine the look your \texttt{forpaper} version.
+
+\subsection{The
+\texorpdfstring{\protect\texttt{forcolorpaper}}{forcolorpaper}
+Option}\label{forcolorpaper}
+
+Same as the \hyperref[sss:webforpaper]{\texttt{forpaper}} option,
+but the color operators are not turned off.
+
+
+\subsection{The
+\texorpdfstring{\protect\texttt{latexlayout}}{latexlayout}
+Option}\label{sss:weblatexlayout}
+
+For those who want to go ``totally native,'' use the
+\texttt{latexlayout} and \texttt{forpaper} options together. When the
+\texttt{latexlayout} option is used, the page layout redefinitions of
+\pkg{web} are bypassed, leaving the original layout values of the
+\texttt{article} class of \LaTeX.
+
+\redpoint If the \texttt{latexlayout} option is taken, all templates
+are turned off, and the \texttt{for\-color\-option} is executed. To remove
+color, you need to explicitly take the \texttt{forpaper} option.
+
+\subsection{The
+\texorpdfstring{\protect\texttt{uselatexparts}}{uselatexparts}
+and \texorpdfstring{\protect\texttt{uselatexchapters}}{uselatexchapters}
+Options}
+
+As described in \hyperref[partsChaptersDots]{section~\ref*{partsChaptersDots}},
+page~\pageref*{partsChaptersDots}, the {\Web} package redefines the \cs{part}
+and \cs{chapter} commands for the purpose of allowing easier access to redefining
+how these section elements are to appear in the document and in the table of contents.
+You can bypass these definitions by using \texttt{uselatexparts} and
+the \texttt{uselatexchapters} options. This may be useful if you want to use AeB
+to create a paper document and you want to use that standard definitions, or perhaps
+want to use another package to define the look of the table of contents or
+of the \cs{part} and \cs{chapter} commands. (The other sectioning comments can be overridden
+as well, but any controls provided by the \texttt{extended} option will be lost.)
+
+\subsection{The \texorpdfstring{\protect\cs{useFullWidthForPaper}}
+ {\CMD{useFullWidthForPaper}} Command}
+
+We introduce a command of resetting the page layout paper \emph{when
+the \emph{\texttt{forpaper}} option is in effect}. The primary use
+is to create standard documents for academics such as homeworks,
+syllabuses or any handout to the student.
+
+This command is used to set the page layout to its maximum width, given
+a 1 inch margin. The height is maximized after taking into account
+other page parameters that effect it. The parameters \cs{marginparwidth}
+and \cs{marginparsep} are set to zero; for this layout, there are no
+marginal comments. The command may be redefined as desired.
+
+\newtopic The command should be used in the preamble, otherwise, it
+has no effect.
+
+\section{Formatting for screen and paper}
+
+As we learned in \hyperref[paperoptions]
+{Section~\ref*{paperoptions}}, {\Web} can format a document in a for
+screen or for paper. The {\Web} package provides several commands and
+environments for changing content as needed.
+
+When the \texttt{forpaper} option is used, the switch
+\cs{ifeqforpaper}\sCom{ifeqforpaper} is set to true. You can use
+this switch, to get different content for the printed page or the
+screen page, or you can use the convenience command \cs{prtscr}:
+
+\settowidth{\aebdimen}{\cs{prtscr\darg{\meta{print\_text}}\darg{\meta{screen\_text}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\prtscr{!meta(print_text)}{!meta(screen_text)}
+\end{dCmd}
+\CmdDescription This command expands to \meta{print\_text} if the \texttt{forpaper} option
+is taken and to \meta{screen\_text} if not.
+
+The \cs{prtscr} command is useful for small changes in content, not
+involving verbatim text or paragraph breaks. {\Web} defines two additional environments,
+\texttt{forpaper} and \texttt{forscreen}.
+\settowidth{\aebdimen}{\cs{begin\darg{forscreen}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\begin{forscreen}
+....
+....
+....
+\end{forscreen}
+\end{dCmd}
+
+\EnvLoc Anywhere.
+
+\newtopic Use the \texttt{forscreen} environment to insert commands or content meant only for
+the screen.
+
+\settowidth{\aebdimen}{\cs{begin\darg{forpaper}}}
+\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\begin{forpaper}
+....
+....
+....
+\end{forpaper}
+\end{dCmd}
+
+\EnvLoc Anywhere.
+
+\newtopic Use the \texttt{forpaper} environment to insert commands
+or content meant only for the paper document.
+
+\newtopic Another command, \cs{NewPage}, is useful for formatting
+the same document for print as well as screen
+
+\settowidth{\aebdimen}{\cs{NewPage}}
+\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\NewPage
+\end{dCmd}
+
+\CmdLoc Anywhere.
+
+\CmdDescription This command expands to \cs{newpage} if the
+\texttt{forpaper} option is \emph{not taken}, and does nothing,
+otherwise. Useful for inserting page breaks in the screen version
+that are not needed in the paper version.
+
+\section{Template Building and Management}\label{ss:templagemagement}
+
+The {\Web} package has a template building capability.
+You can conveniently create backgrounds for your page, insert an
+arbitrary number of graphic overlays, create a left or right
+(navigation) side panel, define your own navigation icons that
+appear in the panel, and write material that will appear in a
+panel.
+
+%\exPDF{bgtest} The demo file for the template feature is \texttt{bgtest.tex}.
+
+\exAeBBlogPDF{p=877} See the file \texttt{\href{\urlAcroTeXBlog/?p=877}{bgtest.pdf}}.
+The source file \texttt{bgtest.tex}, attached to the PDF,
+is demo file for the template feature. This article
+is posted on the \href{\urlAcroTeXBlog}{\AcroBlog}.
+
+
+\subsection{Template options}
+
+As with pdfscreen by Radhakrishnan C. V., we shall have the two
+options, \texttt{leftpanel} and \texttt{rightpanel}. In addition to
+these two, there is the \texttt{usetemplates} option. Use the
+option \texttt{usetemplates} if you want to use colored backgrounds
+or overlays without a left or right panel.
+
+The template, or overlay, capability of the \textsf{Web Package}
+requires the use of two \LaTeX{} Packages: \texttt{everyshi.dtx},
+by Martin Schr\"oder, and \texttt{eso-pic.dtx}, by Rolf
+Niepraschk. If any of the three template options
+(\texttt{usetemplates}, \texttt{leftpanel} or
+\texttt{rightpanel}) are used, the \textsf{eso-pic package} is
+automatically included by \pkg{web}. The \textsf{eso-pic
+package}, in turn, inputs the \textsf{everyshi} package. These two
+packages need to be present on your system, unpacked, and in the
+search path of \LaTeX.
+
+Templates, or overlays, are available for the all driver options.
+
+\subsection{Text Screen Template}
+
+You can specify a graphic that will be overlaid onto the text
+screen, that portion of the screen to which {\LaTeX} content is
+written. If a panel option has not been specified, this is the
+whole screen; otherwise, it is that portion of the screen outside
+the panel.
+
+If one of the options \texttt{usetemplates}, \texttt{leftpanel} or
+\texttt{rightpanel} is specified, the commands
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\template{!meta(graphics_file_name)}
+\textBgColor{!meta(named_color)}
+\end{Verbatim}
+insert a background graphic and a background color,
+respectively, onto the text screen region. The \cs{template} command
+will rescale the graphic to cover the entire text screen region.
+
+Additional graphics can be overlayed with the \cs{AddToTemplate}
+command.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\AddToTemplate{!meta(template_name)}
+\end{Verbatim}
+The command takes one argument, the \meta{template\_name}.
+Define an overlay,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\newcommand\myTemplate
+{%
+ !anglemeta(commands to insert an overlay)
+}
+\end{Verbatim}
+\noindent the \meta{template\_name} for this template is \texttt{myTemplate}. (Note that there
+is no backslash.) To add this template to the list graphics to be overlayed onto the page,
+we would type
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\AddToTemplate{myTemplate}
+\end{Verbatim}
+
+\redpoint \textcolor{blue}{Example:} Insert the ``\AcroT'' logo in lower-left corner, offset by~36pt
+in the $x$ and $y$ directions.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\AEBLogo
+{%
+ \put(36,36){\includegraphics{acrotexlogo}}%
+}
+\AddToTemplate{AEBLogo}
+\end{Verbatim}
+\noindent Because the \textsf{Web Package} uses \textsf{eso-pic}, the
+commands will be executed within a \texttt{picture} environment.
+Within the \texttt{picture} environment, the reference point of the text
+screen is the lower-left corner. The above code puts the
+``\AcroT'' logo at coordinates of \texttt{(36,36)} relative to the
+lower-left corner. The units are measured in (\TeX) points.
+
+\redpoint \textcolor{blue}{Example:} Center the logo within the text screen region.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\AEBLogoCenter
+{%
+ \ifnum\arabic{page}>1\relax
+ \parbox[b][\paperheight][c]{\textscreenwidth}
+ {\centering\includegraphics{acrotexlogo}}%
+ \fi
+}
+\AddToTemplate{AEBLogoCenter}
+\end{Verbatim}
+
+\noindent
+See the section titled \Nameref{sss:templatemanage} for details of
+how to manage your templates.
+
+\subsection{Panel Screen Template}\label{panelscreentemplate}
+
+When the \texttt{leftpanel} or \texttt{rightpanel}
+option is specified, a (navigation/logo) panel is created. The commands
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\paneltemplate{!meta(graphics_file_name)}
+\panelBgColor{!meta(named_color)}
+\end{Verbatim}
+\noindent set the overlay graphic and the background color, respectively.
+The graphic is rescaled to fit the panel region.
+
+Once the panel and its background have been defined, contents and
+form elements can be placed on top of the panel. The command \cs{buildpanel} can
+be used for this purpose. For example, from the sample file
+\texttt{bgtest.tex},
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\buildpanel
+{%
+ \href{http://www.math.uakron.edu/}
+ {\includegraphics[scale=.4]{uakron}}
+ \par\vspace{\stretch{1}}
+ \href{http://www.math.uakron.edu/~dpstory/acrotex.html}
+ {\rotatebox{-90}{\aebLogo}}
+ \par\vspace{\stretch{1}}
+ \panelNaviGroup % defined in web
+}
+\end{Verbatim}
+\noindent The content of the panel is stacked from top to bottom.\footnote{The command \cs{aebLogo}
+is defined in the file, \texttt{bgtest.tex}.}
+
+\redpoint Additional overlays can be added with
+\cs{AddToPanelTemplate}. The command may not be as useful as the panel overlay can
+always be rebuilt using \cs{buildpanel}.\endredpoint
+
+\newtopic The minimal width for the panel is set through the \aebCng[minPanelWidth]
+\Com{minPanelWidth} command, the default size is 1in; that is,
+\verb!\minPanelWidth{1in}! is executed by the package at start up.
+
+\settowidth{\aebdimen}{\cs{minPanelWidth\darg{\meta{length}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\minPanelWidth{!meta(length)}
+\end{dCmd}
+
+\CmdLoc You can reset the minimal width by executing the
+command in the preamble before the \cs{screenwidth} and \cs{margins}
+commands. Or, place it in the \texttt{web.cfg}.
+
+\subsection{Template Management}\label{sss:templatemanage}
+
+In order to change backgrounds or templates, on any page, re-issue
+any one of the commands \cs{template} or \cs{textBgColor} (for the
+screen text region), or \cs{paneltemplate} or \cs{textBgColor}
+(for the panel region).
+
+The panel overlay can be redesigned with \cs{buildpanel}, or some of the
+command components that make up the panel overlay can be redefined.
+
+Templates that are inserted into the output stream using
+either \cs{AddToTemplate} or \cs{AddToPanelTemplate} can also be
+redefined on any page.
+
+Templates, created by either \cs{AddToTemplate} or
+\cs{AddTo\-Panel\-Template}, can also be \emph{disabled} or \emph{enabled}
+individually. For example, if the \texttt{AEBLogoCenter} template
+has been overlayed using the command
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\AddToTemplate{AEBLogoCenter}
+\end{Verbatim}
+\noindent the template can be disabled (turned off) by typing
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\disableTemplate{AEBLogoCenter}
+\end{Verbatim}
+\noindent on any page. (\textcolor{red}{Note:} The effects of this command
+may be not be seen until the following page.) Turn the template
+on by typing
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\enableTemplate{AEBLogoCenter}
+\end{Verbatim}
+\noindent on any page.
+
+For the panel region, there are commands for \emph{disabling}
+(\cs{disablePanelTemplate}) and \emph{enabling} (\cs{enablePanelTemplate}) as
+well. Each of these takes a \meta{template\_name} as an argument.
+
+There are a number of commands for \emph{clearing} backgrounds and
+templates.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\ClearTextTemplate
+\ClearPanelTemplate
+\end{Verbatim}
+\noindent These two clear background colors and background graphics.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\ClearBuildPanel
+\end{Verbatim}
+\noindent This command will clear the build panel as well as the graphics
+and field elements that lay on top of the panel created by the
+\cs{buildpanel} command.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\ClearAllTemplates
+\end{Verbatim}
+\noindent The command \cs{ClearAllTemplates} is equivalent to executing \cs{ClearTextTemplate} and
+\cs{ClearPanelTemplate}.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\ClearTextTemplateBuffer
+\ClearPanelTemplateBuffer
+\end{Verbatim}
+\noindent The commands will clear all overlays, including overlays created by
+\cs{Add\-To\-Template} and \cs{Add\-To\-Panel\-Template}.
+
+\redpoint See the documentation file, \texttt{web.dtx}, for exact definitions of the
+commands in this section.
+
+% \subsubsection{Parameters used in Template Building}\label{sss:partemp}
+
+\section{The \texttt{extended} or \texttt{pro} Option}\label{webpro}
+
+Version 5.0 of {\Web} introduces the \texttt{pro}, which encompasses many new
+features. The \opt{pro} option has a preferred alias of \opt{extended}. The
+\opt{extended} option uses the very fine package \texttt{xkeyval} by
+Hendri Adriaens, which enables developers to create commands with key-value
+pairs.
+
+\newtopic The following new features are provided by the \texttt{extended} option:
+\begin{questions}
+ \item \cs{DeclareDocInfo}: A data structure for setting various document properties.
+ \item A slightly re-designed \cs{maketitle}. Also, increased control over
+ the placement of the elements of the title page.
+ \item Extensive control over the display of \cs{section}, \cs{subsection},
+ \cs{subsubsection} headings. Now color, fonts, size and so on can easily
+ be set.
+ \item A choice of using section numbers (the default) or no sections, or dings.
+ \item A single data structure to set virtually all colors.
+\end{questions}
+Details provided in subsequent sections.
+
+\subsection{\texorpdfstring{\protect\cs{DeclareDocInfo}}{\CMD{DeclareDocInfo}}}\label{docinfo}
+
+The preamble of your document should contain a number of keys that
+identify the document, including the title and author of the
+document. Some of this information is used to construct the
+title page, some is placed in the {\PDF}, to be displayed in the
+`Description' tab of the \textbf{Document Properties} dialog box, which
+is accessed through the \texttt{Ctrl+D} accelerator key, or through
+the menu system \texttt{File > Document Properties...} (for version 8,
+this is \texttt{File > Properties...}).
+
+Information is passed through the \cs{DeclareDocInfo} command which
+takes a number of key-value pairs. This is a simple \textsf{xkeyval}
+interface to many of the text macros that are defined in \Web.
+
+\settowidth{\aebdimen}{\cs{DeclareDocInfo\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\DeclareDocInfo{!meta(KV-pairs)}
+\end{dCmd}
+
+\CmdLoc Place in the preamble.
+
+\KVP The following is a description of the key value pairs.
+\begin{enumerate}
+ \item \texttt{title}: The title of the document.
+ \item \texttt{author}: The author or authors of the document.
+ \item \texttt{subject}: The subject of the presentation. Optional, this appears only in the
+ `Description' tab of the \textbf{Document Properties}.
+ \item \texttt{keywords}: A list of keywords that describe your document. Optional, this appears only in the
+ `Description' tab of the \textbf{Document Properties}. Some search engines use this field.
+ \item \texttt{university}: The university or company the author represents.
+ \item \texttt{email}: The email address of the author. This appears on the title page, and becomes
+ an email link.
+ \item \texttt{version}: The version number of the document.
+ \item \texttt{versionLabel}: Text that precedes the version number. The default is \texttt{Version}.
+ \item \texttt{talkdate}: Date of the presentation.
+
+ The fields \texttt{version} and \texttt{talkdate} occupy the
+ same position on the title page. If the \texttt{talkdate} is
+ specified, then the talk date will appear on the title page, if
+ \texttt{talkdate} is not specified, then \texttt{version} will
+ appear. Both \texttt{version} and \texttt{talkdate} can be
+ specified, but in this case, it is \texttt{talkdate} that will
+ appear. The \texttt{version} can be used for version
+ management.
+
+ \item \texttt{talkdateLabel}: Text that precedes the date of the document. The default text for the talkdate label
+ is \texttt{Presented:}.
+ \item \texttt{talksite}: Site of the presentation. This field can be used for generally anything, for
+ example, you could specify your web site.
+ \item \texttt{copyrightyears}: Year(s) of the copyright of this publication, defaults to this year.
+ \item \texttt{prepared}: The date of preparation of the
+ document, defaults to the day the file was compiled (\LaTeX ed).
+ This was formerly the last revision date.
+ \item \texttt{preparedLabel}: The label that precedes the date \texttt{prepared}. The default string
+ value is \texttt{Prepared:}. The old default was \texttt{Last Revision Date:}, and will remain so
+ if the \texttt{extended} option is not taken.
+ \item \texttt{copyrightStatus}: If the \textsf{aebxmp} package is loaded for advanced metadata,
+ this key allows you to set the copyright status. Possible
+ values \texttt{True}, \texttt{False}, or blank (no value, or the key not listed at all)
+ corresponding to \textsf{Copyrighted}, \textsf{Public Domain} and
+ \textsf{Unknown}, respectively. The values of this key are case sensitive, so you must enter
+ \texttt{True} and \texttt{False}, with the first letter capitalized. If \textsf{aebxmp} is
+ not loaded, specifying this key does nothing.
+ \item \texttt{copyrightNotice}: If the \textsf{aebxmp} package is loaded for advanced metadata,
+ this key allows you to set copyright notice, short text describing the copyright, perhaps,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+copyrightNotice={Copyright D. P. Story, 2009--2012}
+\end{Verbatim}
+ If \textsf{aebxmp} is not loaded, specifying this key does nothing.
+ \item \texttt{copyrightInfoURL}: If the \textsf{aebxmp} package is loaded for advanced metadata,
+ this key allows you to set the copyright info url, a url to
+ a page on the web containing a more detailed description of the copyright. If \textsf{aebxmp} is
+ not loaded, specifying this key does nothing.
+ \item \texttt{authors}: A list of authors, \emph{each enclosed in braces}.
+ Names of individual authors can be accessed using the JavaScript \texttt{info.Authors}
+ property: the first author is \texttt{info.Authors[0]}; the second
+ author is \texttt{info.Authors[1]}, etc.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+authors={D. P. Story}{J\u00FCrgen Gilg}
+\end{Verbatim}
+Notice the use of unicode to create a u-umlaut (\"{u}).
+ \item \texttt{Keywords}: Similar to keywords, but note the capital `K'. Then
+ \texttt{Keywords} is used to list the keywords, they are inserted into the
+ metadata as an array. The individual keywords can be accessed through a special
+ JS function, \texttt{aKeywords()}, defined by the \textsf{aebxmp} package. The syntax
+ is the same as \texttt{keywords}:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+Keywords={AcroTeX.Net,XMP,E4X,Adobe Acrobat,JavaScript}
+\end{Verbatim}
+If you execute \texttt{aKeywords(0)}, the string \texttt{"AcroTeX.Net"} is returned.
+Executing \texttt{aKeywords(4)} returns \texttt{"JavaScript"}, while executing
+\texttt{aKeywords(5)} returns \texttt{undefined}.
+ \item \texttt{authortitle}: The \texttt{authortitle} is a field that appears
+ on the \textsf{Additional Metadata} dialog box. It can be used for whatever purpose you wish.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+authortitle={Programming and Development, AcroTeX.Net}
+\end{Verbatim}
+ \item \texttt{descriptionwriter}: This key fills a field on the
+\begin{Verbatim}[xleftmargin=\amtIndent]
+descriptionwriter={A good, well-liked guy}
+\end{Verbatim}
+ \textsf{Additional Metadata} dialog box. For example
+ \item \texttt{customProperties}: Acrobat allows for the creation of
+ custom properties which are accessible through the \texttt{info}
+ object. The value of this key consists of one or more property
+ definition(s) enclosed in braces. Each property definition has two
+ required key-value pairs, \texttt{name} and \texttt{value}. The
+ \texttt{name} needs to be a simple name consisting of letters and
+ numbers (not starting with a number). The \texttt{value} string
+ can be any string. See the example following:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+customProperties={name=Developer,value={D. P. Story, Esq.}}
+ {name=Motivator,value=J\u00FCrgen Gilg}
+\end{Verbatim}
+Executing \texttt{this.info.Developer} returns the value of
+\texttt{"D. P. Story, Esq."}, while, \texttt{this.info.Motivator} returns
+\texttt{"J\"{u}rgen Gilg"}.
+
+\end{enumerate}
+
+\Ex\label{exDeclareDocInfo} Example of usage of \Com{DeclareDocInfo} can
+be found in
+\hyperref[fig:declaredocinfo]{Figure~\ref*{fig:declaredocinfo}},
+page~\pageref*{fig:declaredocinfo}.
+\paragraph*{Discussion of \texttt{keywords} versus \texttt{Keywords}.} \texttt{Keywords} will overwrite
+\texttt{keywords}; the value of \texttt{keywords} is passed to
+\pkg{hyperref} which enters them as a single string, while
+\texttt{Keywords} enters the keywords. as an array. There is no need to
+have both \texttt{keywords} and \texttt{Keywords}.
+\paragraph*{Discussion of \texttt{author} versus \texttt{authors}.} Similarly,
+\texttt{authors} overwrites \texttt{author}, individual authors names can
+be accessed; however, unlike \texttt{keywords}/\texttt{Keywords}, it may
+make sense to use both \texttt{author} and \texttt{authors}. The
+\pkg{web} package takes a copy of the value of \texttt{author} and uses
+it in the title page. It is possible to have two versions of the author's
+names, one for presentation and one for the PDF info.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+author={Dr. D. P. Story, Herr J. Gilg},
+authors={D. Story,J. Gilg},
+\end{Verbatim}
+You can do the same thing, with the \texttt{author} key only by using
+the \cs{texorpdfstring} command of \texttt{hyperref}:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+author={\texorpdfstring{Dr. D. P. Story, Herr J. Gilg}
+ {D. Story,J. Gilg}},
+\end{Verbatim}
+The difference is that with \texttt{authors}, individual authors are accessible
+through the JavaScript command \texttt{this.info.Authors}.
+\begin{figure}[ht]
+\footnotesize\centering
+\begin{dCmd*}{.9\linewidth}
+\DeclareDocInfo
+{
+ title=My First Presentation,
+ author=D. P. Speaker,
+ university=My University,
+ email=dpspeaker@myu.edu,
+ talkdate={Dec.\ 17, \the\year},
+ talksite=The Talking University,
+ subject=On the Theory of AcroTeX,
+ keywords={AcroTeX.Net,XMP,E4X,Adobe Acrobat,JavaScript},
+ copyrightStatus=False,
+ copyrightNotice={Copyright D. P. Story, 2009--\the\year},
+ copyrightInfoURL=http://www.acrotex.net,
+ authors={D. P. Story}{J\u00FCrgen Gilg},
+ Keywords={AcroTeX.Net,XMP,E4X,Adobe Acrobat,JavaScript},
+ authortitle={Programming and Development, AcroTeX.Net},
+ descriptionwriter={A good, well-liked guy},
+ customProperties={name=Developer,value={D. P. Story, Esq.}}
+ {name=Motivator,value=J\u00FCrgen Gilg}
+}
+\end{dCmd*}
+\caption{The \protect\cs{DeclareDocInfo} Command}\label{fig:declaredocinfo}
+\end{figure}
+
+\handpoint \textbf{Two tricks of importance:} When the value contains a
+comma, then the whole value should be delimited by matching braces,
+as in the \texttt{talkdate} key-value in the
+\textbf{Example~\ref*{exDeclareDocInfo}} above. The \pkg{hyperref}
+command \Com{texorpdfstring} is handy for giving alternate wording, when
+some of the {\LaTeX} commands do not transfer to the {\PDF}'s \textbf{Document Properties}.
+For example, the title might have been ``A Discussion of $e^x$''; this title should appear
+in \cs{DeclareDocInfo} as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+title=A Discussion of \texorpdfstring{$e^x$}{exp(x)},
+\end{Verbatim}
+\noindent Now the phrase, ``A Discussion of exp(x)'' will appear in
+the `Title' field of the \textbf{Document Properties}.
+
+%\exPDF{web_pro} The demo file \texttt{web\_pro} illustrates this command.
+
+\exAeBBlogPDF{p=1112} Download \texttt{\href{\urlAcroTeXBlog/?p=1112}{web\_pro.pdf}}
+from the {\AcroBlog} website. The source file \texttt{web\_pro.tex} is
+attached to the PDF, illustrates this command.
+
+
+\subsection{\texorpdfstring{\protect\cs{DeclarePageLayout}}{\CMD{DeclarePageLayout}}}\label{pagelayout}
+
+The \Com{DeclarePageLayout} command gathers together many page
+layout parameters, both for {\LaTeX} and for {\Web}, into one
+convenient package of key-value pairs.
+
+\CmdLoc Place in the preamble.
+
+\KVP The following is a description of the key value pairs.
+\begin{enumerate}
+\item \texttt{design}: This key sets the \texttt{screensize}
+ according to preset dimensions, permissible values are
+ \texttt{designi}, \texttt{designii}, \texttt{designiii},
+ \texttt{designiv}, \texttt{designv}, \texttt{designvi},
+ \texttt{designvii}, \texttt{designviii}, and \texttt{designix}. These correspond to the
+ package options of the same names. This key is ignored if one of the
+ design options was taken as a {\Web} option. This key sets both the
+ \cs{screensize} and \cs{margins} commands.
+\item \texttt{screensizeOf}: This key sets the \texttt{screensize}
+ only (does not change the margins), possible values are
+ \texttt{designi}, \texttt{designii}, \texttt{designiii},
+ \texttt{designiv}, \texttt{designv}, \texttt{designvi},
+ \texttt{designvii}, \texttt{designviii}, and \texttt{designix}. Use this key, in
+ combination with the \texttt{margins} key, to use a standard design
+ \texttt{screensize}, but with different margins.
+\item \texttt{screensize}: Sets the \texttt{screensize} by executing
+ the \cs{screensize} command. The key takes two dimensions as
+ parameters:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+screensize={!meta(height)}{!meta(width)}
+\end{Verbatim}
+The \texttt{screensize} key sets the screen to a height of
+\meta{height} and a width of \meta{width}. This key is
+ignored if a design option has been taken in the {\Web} option list,
+or if the \cs{screensize} command has already been executed.
+\item \texttt{margins}: Sets the dimensions of the margins of the
+ screen page. The key takes four dimensions as parameters:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+margins={!meta(left)}{!meta(right)}{!meta(top)}{!meta(bottom)}
+\end{Verbatim}
+Here \meta{left}, \meta{right}, \meta{top}, and
+\meta{bottom} are the dimensions of the margins of the screen
+page. These are the same arguments as the \cs{margins} command. This
+key is ignored if a design option has been taken in the {\Web}
+option list, or if the \cs{margins} command has already been
+executed.
+\item \texttt{headheight}: Sets the standard page layout parameter
+ \cs{headheight}. The default is \texttt{8pt}.
+\item \texttt{topmargin}: Sets the position of the running header.
+ The default is 8pt for screen sizes, and the {\LaTeX} default is the
+ \texttt{forpaper} option is taken. You can say
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+topmargin=\prtscr{!meta(paper_dim)}{!meta(screen_dim)}
+\end{Verbatim}
+To get a \texttt{topmargin} value that works for paper and screen.
+(Perhaps you have a border running around the page, and you need to
+reposition the header below the border.) This repositioning differs
+depending on whether you compile with the \texttt{forpaper} option,
+or not.
+
+\item \texttt{additionalheadsep}: Additional separation between the
+ running header and the beginning of the text. This parameter
+ modifies \cs{headsep}, which is computed automatically by the
+ \pkg{web} package. Use \texttt{additionalheadsep} to add in a
+ little bit more, if the calculation does not yield good results. The default
+ value is 0pt.
+
+\item \texttt{marginparsep}: The horizontal distance between body and
+ marginal notes. The default is 11pt. When the page size is designed for
+ viewing on a computer, the margins are often times quite small, and
+ marginal notes are typically not used. You can use a conditional to give
+ two values one for screen and one for paper. See the \texttt{topmargin}
+ key.
+
+\item \texttt{marginparwidth}: The width of marginal notes. The default is .25in.
+ When the page size is designed for viewing on a computer,
+ the margins are often times quite small, and marginal notes are typically not used.
+ You can use a conditional to give two values one for screen and one for paper.
+ See the \texttt{topmargin} key.
+
+\item \texttt{marginparpush}: The minimal vertical space between
+ successive marginal notes. The default is 5pt.
+
+\item \texttt{footskip}: Vertical distance separating the baseline
+ of the last line and the baseline of the footer. The default is
+ 30pt.
+
+\item \texttt{webfootskip}: Same as \texttt{footskip}, but the
+ \texttt{webfootskip} is measured up from the bottom edge of the
+ document. The default is 4pt.
+
+\item \texttt{panelwidth}: Sets the panel width. If not specified,
+ the minimal panel width of 1in is used. Panels appear when either
+ \texttt{leftpanel} or \texttt{rightpanel} is taken in the option
+ list of \Web. This key executes the \cs{panelwidth} command.
+
+\item \texttt{panelsep}: Sets the separation between the text screen
+ and the panel. The default is 10pt.
+\end{enumerate}
+
+\subsection{The Title Page:
+ \texorpdfstring{\protect\cs{maketitle}}{\CMD{maketitle}}}\label{maketitlepro}
+
+In this section, we described the enhanced features for controlling the title page.
+
+\subsubsection{The Title Page Structure}
+
+The title page is divided into three parts: top, middle and bottom.
+\begin{itemize}
+\item \textbf{Title Top:} The content of the top is determined by the \Com{top\-Titl\-ePage}
+command. (This command can be redefined, but it is not recommended.) The
+\cs{topTitlePage} command expands to three elements: the university (affiliation), the title,
+and the author(s), in that order vertically. These are the values of the keys \texttt{university},
+\texttt{title} and \texttt{author} that appear in the \cs{Declare\-Doc\-Info} command.
+
+\item \textbf{Title Middle:} The \Com{optionalPageMatter} command
+is used to enter content into this part of the title page. This middle
+part is optional; if \cs{optionalPageMatter} does not
+appear in the preamble, then this part of the title page is empty.
+
+\item \textbf{Title Bottom:} Bottom of the title page is controlled by the contents
+of the command \cs{titlepageTrailer} and consists of some of the
+document information entered in the \cs{Declare\-DocInfo} command.
+By default, \cs{titlepageTrailer} lists the values of the
+\cs{DeclareDocInfo} keys \texttt{email}, \texttt{talkdate},
+\texttt{talksite}, and \texttt{copy\-right\-years}, as described above. The
+font size of this bottom part is set by the command \cs{trailerFontSize}, the
+default is \cs{footnotesize}. This command can be re-defined in the
+usual way, for example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand{\trailerFontSize}{\scriptsize}
+\end{Verbatim}
+\end{itemize}
+
+\newtopic \hyperref[fig:titlepage]{Figure~\ref*{fig:titlepage}}, page~\pageref*{fig:titlepage}, shows the basic
+composition of the title page of an {\AEB} document. The title page elements are described as they relate to the
+key-values of \nameref{docinfo}, described on page~\pageref{docinfo}.
+\begin{itemize}
+ \item At the very top is the value of the \Indextt{university} key. The color of this
+ element can be set using the \Indextt{universityColor} key of \hyperref[designColor]{\Com{selectColors}},
+ page~\pageref{designColor}.
+ \item Next comes the value of \Indextt{title}, its color is controlled using the \Indextt{titleColor}
+ key of \hyperref[designColor]{\cs{selectColors}}.
+
+ \item The author follows, which is the value of \Indextt{author}. The color is set by
+ \Indextt{authorColor} of \hyperref[designColor]{\cs{selectColors}}.
+ \item The {\AEB} logo is inserted using \Com{optionalPageMatter}. Normally,
+ this macro does nothing unless it is defined. In this example, we have
+\begin{Verbatim}[fontsize=\small]
+\optionalPageMatter
+{%
+ \begin{center}
+ \begin{minipage}{.67\linewidth}
+ \centering\includegraphics[scale=.5]{AeB_Logo}
+ \end{minipage}
+ \end{center}
+}
+\end{Verbatim}
+ \item Finally comes the \Com{titlepageTrailer}, a macro that can
+ be redefined (see the package file \texttt{web.dtx} for its definition. This
+ macro places the other elements at the bottom of the page:
+ \begin{itemize}
+ \item The copyright year and email address, as given by
+ \Com{email}. The color of the email address is set by
+ \Indextt{urlColor} through the command
+ \hyperref[designColor]{\cs{selectColors}}. This color
+ actually sets the color of all external \textsf{URL}s.
+ \item To the right, on the first line of the title page trailer is the value of \Com{talksite}.
+ The color is the default color for text.
+ \item In the lower left is the date of the last revision of the document. The color is the default color for
+ text.
+ \item In the lower right is the date the talk was given. The color is the default color for text.
+ \end{itemize}
+\end{itemize}
+Not shown in Figure~\ref*{fig:titlepage} is the title page directory, which is turned off by default.
+
+\begin{figure}[ht]
+\setlength{\fboxsep}{0pt}
+\centering\fbox{\includegraphics[width=.5\linewidth]{figures/titlepage1}}
+\caption{The Title Page}\label{fig:titlepage}
+\end{figure}
+
+\newtopic The title page layout is, of course, defined by the standard
+\Com{maketitle} command, which has been redefined by the \texttt{extended} option.
+In {\Web}, the \cs{maketitle} has different behaviors, one for screen and one for paper.
+
+\subsubsection{Greater Control of the Top Title Page}\label{top}
+
+The three elements of the top title page are the values of the keys
+\texttt{university}, \texttt{title} and \texttt{author}. Values of these keys
+are declared in the command \cs{DeclareDocInfo}. The \texttt{extended} option
+defines three commands \cs{universityLayout}, \cs{titleLayout}, and
+\cs{authorLayout}, to format these three keys in a variety of ways.
+
+%\handpoint A working example of the commands that follow can be found in \texttt{aebpro\_ex2.tex}.
+
+\exAeBBlogPDF{p=1242} See the file
+\texttt{\href{\urlAcroTeXBlog/?p=1242}{aebpro\_ex2.pdf}}. The source file
+\texttt{aebpro\_ex2.tex}, attached to the PDF, is a working example of the
+commands that follow.
+
+\settowidth{\aebdimen}{\cs{universityLayout\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\universityLayout{!meta(KV-pairs)}
+\titleLayout{!meta(KV-pairs)}
+\authorLayout{!meta(KV-pairs)}
+\end{dCmd}
+
+\CmdLoc Place these optional commands in the preamble.
+
+\KVP Each of these commands have a number of key-value pairs. The
+first thirteen are the same that appear in the description of
+\cs{sectionLayout}, \mlNameref{secHead}. The rest are unique to
+these three commands. In the descriptions below, the word `element'
+refers to the values of the keys \texttt{university},
+\texttt{title} and \texttt{author}.
+
+\begin{enumerate}
+\item \texttt{fontfamily}: Font family to use with this element,
+ permitted values are \texttt{rmfamily}, \texttt{sffamily}, \texttt{ttfamily}.
+
+\item \texttt{fontseries}: Font series to use, possible values are \texttt{bfseries} and \texttt{mdseries}.
+
+\item \texttt{fontshape}: Font shape to use: \texttt{upshape}, \texttt{itshape}, \texttt{scshape}, \texttt{slshape}.
+
+\item \texttt{fontsize}: Font size to use with this element, recognized values are \texttt{tiny},
+ \texttt{script\-size},
+\texttt{footnotesize}, \texttt{small}, \texttt{normalsize},
+ \texttt{large}, \texttt{Large}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}.
+
+\item \texttt{halign}: Alignment of this element within its enclosing \cs{parbox}, permissible
+ values are \texttt{l} (left aligned), \texttt{c} (centered), \texttt{r} (right aligned). See \hyperref[tutex17]
+ {Example~\ref*{tutex17}} for a visualization of the effects of the \texttt{halign} key.
+
+\item \texttt{color}: The color of the section title, this can be any named color. The default is blue
+for \texttt{title}, and black otherwise.
+
+\item \texttt{special}: Through this key, you can a specify predefined layout for the title elements. Permissible
+ values are \texttt{shadow}, \texttt{framebox}, \texttt{colorbox}, \texttt{fcolorbox},
+ \texttt{frame\-box\-fit}, \texttt{color\-box\-fit}, \texttt{fcolor\-box\-fit}, \texttt{custom}, \texttt{default}.
+
+\item[] Custom titles can be created by specifying a value of
+ \texttt{custom}. In this case, {\Web} uses
+ \Com{customUniversity}, \Com{customTitle} and \Com{customAuthor}.
+ These are macros that take one argument, the code for designing the
+ title. The title is referred to as \texttt{\#1}. Depending on how
+ these custom titles are defined, the other keys may not be
+ obeyed.
+
+\item \texttt{framecolor}: The color of the frame surrounding the subject when the \texttt{special}
+ key has a value of \texttt{framebox}, \texttt{fcolorbox} \texttt{frameboxfit} or \texttt{fcolorboxfit}.
+
+\item \texttt{bgcolor}: The background (fill color) of the box enclosing this element, when
+ \texttt{special} has a value of \texttt{colorbox}, \texttt{fcolorbox}, \texttt{colorboxfit}
+ or \texttt{fcolorboxfit}.
+
+\item \texttt{shadowcolor}: The color of the shadow, when \texttt{special} has a value of \texttt{shadow}.
+
+\item \texttt{beforeskip}: The amount of skip before the title element.
+
+\item \texttt{afterskip}: The amount of skip after the title element.
+
+\item \texttt{usefont}: Through this key it is possible to specify
+an arbitrary font and font size. The key takes five parameters, for
+example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+usefont={OT1}{cmdh}{m}{n}{{16}{16pt}}
+\end{Verbatim}
+The first four are the arguments of the {\LaTeX}'s \cs{usefont}, encoding, family, series and shape. The last argument
+are the arguments of the {\LaTeX}'s \cs{fontsize}, size and baselineskip.
+
+\item[] If the fifth parameter is empty, no font size is specified, the current default sizes are used.
+
+
+%\item \texttt{reset}: This key attempts to reset changes to their defaults. Permissible values are
+% \texttt{font} (to reset the font changes only), or \texttt{all} (to reset all the keys).
+
+\item \texttt{hproportion}: Each of the three elements (university, title, author) lie in their own
+\cs{parbox}, the width of this box is determined by the value of this key, as a proportion of the
+total \cs{linewidth}. The default for all three is .7. This value can be set to get more or less
+``natural'' line breaks, without having to insert a new line with a `\verb!\\!'. See \hyperref[tutex17]
+{Example~\ref*{tutex17}} for a visualization of the effects of the \texttt{hproportion} key.
+
+\item \texttt{xhalign}: The \cs{parbox} of each of the three elements are also placed in a \cs{makebox}, additional
+control over positioning can be had by setting this key, which sets the positioning parameter of \cs{makebox}.
+The default value for \texttt{xhalign} is \texttt{c}, the element is centered. See \hyperref[tutex17]
+{Example~\ref*{tutex17}} for a visualization of the effects of the \texttt{xhalign} key.
+\end{enumerate}
+
+%\exPDF{web_pro} The demo file \texttt{web\_pro} illustrates this command.
+
+%\exPDF{webpro_titlepg} The file \texttt{webpro\_titlepg} shows the structure of the title page.
+
+\newtopic Just above the \textbf{Title Top} is a skip that can be \aebCng[aboveTopTitleSkip]
+used to push the top down. The default value of this skip is
+\texttt{0pt}, but this can be changed through
+\cs{aboveTopTitleSkip}.
+
+\settowidth{\aebdimen}{\cs{aboveTopTitleSkip\darg{\meta{skip}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\aboveTopTitleSkip{!meta(skip)}
+\end{dCmd}
+
+\newtopic There is one other title page parameter that effects the layout.
+
+\settowidth{\aebdimen}{\cs{topTitlePageProportion\darg{0..1}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\topTitlePageProportion{0..1}
+\end{dCmd}
+
+\CmdLoc Place this (optional) command in the preamble.
+
+\PD The top part of the title page is enclosed in a big \cs{parbox}
+with depth set to a proportion of \cs{textheight}.
+\cs{topTitlePageProportion} is used to set this proportion. The
+argument of this command should be a number between 0 and 1,
+obviously a value of 0 makes no sense. The default value is set by
+the {\Web} package to .33, i.e., the default is
+\verb!\topTitlePageProportion{.33}!.
+
+\begin{figure}[ht]
+\setlength{\fboxsep}{0pt}
+\centering\fbox{\includegraphics[width=.5\linewidth]{figures/titlepage}}
+\caption{The Title Page Layout Structure}\label{fig:titlepage1}
+\end{figure}
+
+\Ex\label{tutex17} \hyperref[fig:titlepage1]{Figure~\ref*{fig:titlepage1}}
+gives a representation of the page layout of the title page. The
+big \cs{parbox} of depth equal to the proportion of
+\cs{textheight} set by \cs{topTitlePage\-Proportion} is
+shown as a blue box. Each of the three top title elements are
+enclosed in a \cs{makebox}, shown in yellow. Inside this
+\cs{makebox}, the top title elements are placed in a \cs{parbox},
+shown in gray. The image shown in
+\hyperref[fig:titlepage1]{Figure~\ref*{fig:titlepage1}} came about
+as a result of the following commands in the preamble:
+\begin{pCmd*}{fontsize=\small}{254pt}
+\topTitlePageProportion{.5}
+\universityLayout{halign=l,color=red}
+\titleLayout{halign=r,xhalign=r,hproportion=.4}
+\authorLayout{color=webbrown}
+\end{pCmd*}
+
+\medskip
+In \hyperref[fig:titlepage1]
+{Figure~\ref*{fig:titlepage1}}, notice that the
+\texttt{university} is left aligned within its \cs{parbox}. For
+\texttt{title}, the proportion is changed from the default of .7
+to .4, this is manifested by the shorter gray box (which
+represents the underlying \cs{parbox}); \texttt{halign} and
+\texttt{xhalign} are both set to \texttt{r}, so the title appears
+right aligned within its \cs{parbox}, and the \cs{parbox} is right
+aligned within its \cs{makebox}, understand? Finally, for the
+\texttt{author} key, we change only the color. Swave!
+
+\subsubsection{Greater Control over Title Page Trailer}\label{trailer} \aebCng[trailer]
+
+The pro option defines the command \Com{DesignTitlePageTrailer} that takes a
+number of key-value pairs to describe the title page trailer. The use of this
+command is not needed unless you want something in the trailer other than the default
+information.\settowidth{\aebdimen}{\cs{DesignTitlePageTrailer\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\DesignTitlePageTrailer{KV-pairs}
+\end{dCmd}
+
+\KVP The key-value pairs are described below:
+\begin{enumerate}
+ \item \texttt{ul}: The text in the upper left corner of the trailer, the default is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\web@copyright\ \web@copyright@symbol\
+ \webcopyrightyears\ \thewebemail
+\end{Verbatim}
+ \item \texttt{ur}: The text in the upper right corner of the trailer,
+ the default is \cs{aeb@talksite}, as defined by the \cs{talksite}
+ command or the \texttt{talksite} key of the \cs{DeclareDoc\-Info}
+ command.
+ \item \texttt{ll}: The text in the lower left corner of the trailer,
+ the default is \cs{aeb@Prepared}, as defined by the \cs{prepared}
+ command or the \texttt{prepared} key of the \cs{De\-clare\-Doc\-Info}
+ command.
+ \item \texttt{lr}: The text in the lower right corner of the trailer,
+ the default is \cs{webversion}, as defined by the \cs{version}
+ command, by the \texttt{version} key, or by the \texttt{talkdate} key.
+ If \texttt{version} and \texttt{talkdate} both have values,
+ \texttt{talkdate} is used.
+ \item \texttt{textColor}: The default color of the text. The default is black.
+ \item \texttt{bgColor}: The background of the trailer. This is a named color. The default is there is no color.
+ \item \texttt{borderColor}: The border color of the trailer. This is a named color. If specified, then
+ \texttt{bgColor} must have a named color too, otherwise, this
+ key does nothing. The default is that there is no border color.
+ \item \texttt{fboxsep}: The previous two keys use \cs{colorbox} and \cs{fcolorbox}. You can adjust
+ the parameters \cs{fboxsep} through this key. The default is 3pt.
+ \item \texttt{fboxrule}: The width of the rule created when there are values for
+ \texttt{bgColor} and for \texttt{borderColor}. This key sets the value of \cs{fboxrule}. The default
+ is .4pt.
+ \item \texttt{graphic}: The value of this key is the base name of a graphic to be used as the background
+ of the trailer. The graphic is rescaled to the width and the height of the trailer. It also reduces
+ \cs{linewidth} so that the text is \cs{fboxsep} from the borders. The default is no graphic.
+ If the key graphic is specified, then \texttt{bgColor} and \texttt{borderColor} are ignored.
+
+ \item[] If the \textsf{graphicxbox} package is loaded, AeB uses this package to place the graphic.
+ In this case, the \texttt{borderColor} key is obeyed; whereas, it is not obeyed without the
+ \textsf{graphicxbox} package.
+
+ \item \texttt{namedgraphic}: This key requires the use of \textsf{graphicxsp}, and Acrobat Distiller.
+ Use \textsf{graphicxsp} to embed a graphic and give it a symbolic name \anglemeta{mygraphic}.
+ If you then say \texttt{namedgraphic=\anglemeta{mygraphic}}, the graphic is used without re-embedding the graphic.
+ The advantage of this method is that the graphic can be used and re-used in the document, without
+ significantly increasing file size.
+
+ \item[] If the \textsf{graphicxbox} package is loaded, AeB uses this package to place the named graphic.
+ In this case, the \texttt{borderColor} key is obeyed; whereas, it is not obeyed without the
+ \textsf{graphicxbox} package.
+
+ \item \texttt{raise}: A key that takes a dimension as its value. The trailer will be raised or
+ lowered by the amount specified. For example, \texttt{raise=-10pt} lowers the trailer 10pt from its natural
+ position.
+
+ \item \texttt{fontSize}: Set the font size of the text, the default is \cs{footnotesize}. This key
+ simply redefines \cs{trailerFontSize}.
+
+ \item \texttt{formatting}: Any additional formatting you wish
+ that does not cause trouble; for example,
+ \verb!formatting=\bfseries!.
+\end{enumerate}
+
+%\exPDF{web_pro} The demo file \texttt{web\_pro} illustrates this command.
+
+\exAeBBlogPDF{p=1112} The demo file \texttt{\href{\urlAcroTeXBlog/?p=1112}{web\_pro.pdf}}
+illustrates this command.
+
+
+\subsection{The Table of Contents}
+
+The pro option also defines \Com{tocLayout} for controlling the
+title of the table of contents.
+
+\settowidth{\aebdimen}{\cs{tocLayout\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\tocLayout{!meta(KV-pairs)}
+\end{dCmd}
+
+\newtopic The key-value pairs are the same as layout commands for the section titles, see
+\mlNameref{secHead}.
+
+\CmdLoc Place this command in the preamble.
+
+\settowidth{\aebdimen}{\cs{selectTocDings\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\selectTocDings{!meta(KV-pairs)}
+\end{dCmd}
+
+\newtopic When the \cs{noSectionNumbers} command is used (\Nameref{secHead}), the entries in the table of
+contents have no section number. You can define a ding for each of the three
+levels of the table of contents with this command. The key-value entries in the
+\cs{selectTocDings} command are ignored if \cs{noSectionNumbers} is not in effect.
+
+\CmdLoc Place this (optional) command in the preamble.
+
+\KVP The following are the recognized key-value pairs:
+
+\begin{enumerate}
+\item \texttt{dDing}: The ding for the first (section) level entry.\\Example,
+\verb!dDing=\ding{072}!.
+\item \texttt{ddDing}: The ding for the second (subsection) level entry.
+\item \texttt{dddDing}: The ding for the third (subsubsection) level entry.
+\item \texttt{dDingColor}: The (named) color for the ding of the first level entry. The default is red.
+\item \texttt{ddDingColor}: The (named) color for the ding of the first level entry. The default is blue.
+\item \texttt{dddDingColor}: The (named) color for the ding of the first level entry. The default is webgreen.
+
+\end{enumerate}
+
+%\exPDF{web_pro} The demo file \texttt{web\_pro} illustrates this command.
+
+\exAeBBlogPDF{p=1112} The demo file \texttt{\href{\urlAcroTeXBlog/?p=1112}{web\_pro.pdf}}
+illustrates this command.
+
+
+\subsection{Selecting Colors}\label{designColor}
+
+The \cs{selectColors} command can be used to set the color of most all elements of
+the document that have a color attribute.
+
+\settowidth{\aebdimen}{\cs{selectColors\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\selectColors{!meta(KV-pairs)}
+\end{dCmd}
+
+\CmdLoc There are no restrictions on this command. In the preamble,
+it will set the defaults for the entire document.
+
+\KVP Each of the following keys take a named color. Many of these keys have a
+command interface as well, these are also noted.
+\begin{enumerate}
+\item \texttt{universityColor}: The color of the value of the \cs{university}
+ declaration (refer to page~\pageref{docinfo}). The value of
+ \cs{university} appears on the title page. The default is blue.
+\item \texttt{titleColor}: The color of the value of the \cs{title} declaration
+ (see page~\pageref{docinfo}).
+ The value of \cs{title} appears on the title page. The default is black.
+\item \texttt{authorColor}: The color of the value of the \cs{author} declaration
+ (see page~\pageref{docinfo}).
+ The value of \cs{author} appears on the title page. The default is black.
+\item \texttt{textBgColor}: The background color of the text screen. The default is white.
+\item \texttt{panelBgColor}: The background color of the navigation panel. The default is white.
+\item \texttt{urlColor}: The color of an \textsf{URL} link. The default is webbrown.
+\item \texttt{linkColor}: The color of a link. The default is webgreen.
+\item \texttt{fileColor}: The color of a link to a local file. The default is webbrown.
+\end{enumerate}
+There are several other colors as well, these can be set through their interface, see
+\hyperref[secHead]{Section~\ref*{secHead}}, page~\pageref*{secHead}, for a discussion of
+the commands \cs{sectionLayout}, \cs{sub\-sec\-iion\-Layout} and \cs{sub\-sub\-sec\-tion\-Layout}.
+
+%\exPDF{web_pro} The demo file \texttt{web\_pro} illustrates this command.
+
+\exAeBBlogPDF{p=1112} The demo file \texttt{\href{\urlAcroTeXBlog/?p=1112}{web\_pro.pdf}}
+illustrates this command.
+
+
+\subsection{Section Headings}\label{secHead}
+
+The {\Web} package uses the section heading commands \cs{section}, \cs{subsection}, and \cs{sub\-sub\-section}, but the
+\texttt{extended} option modifies their definitions so that the document author can easily design how the section titles
+look.
+
+\settowidth{\aebdimen}{\cs{noSectionNumbers}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\noSectionNumbers
+\end{dCmd}
+\newtopic The command \Com{noSectionNumbers} causes {\Web} to remove the usual
+numbering system for a {\LaTeX} document. This may be useful when
+preparing a document for presentation, and a numbering system is not
+needed. The default is to use section numbers.
+
+\CmdLoc The use of this command is restricted to the preamble. The
+decision must be made for the whole document at the beginning of the
+document.
+
+\settowidth{\aebdimen}{\cs{subsubsectionLayout\darg{\meta{KV-pairs}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\sectionLayout{!meta(KV-pairs)}
+\subsectionLayout{!meta(KV-pairs)}
+\subsubsectionLayout{!meta(KV-pairs)}
+\end{dCmd}
+
+\CmdLoc No restriction on the use of this command. In the preamble, you set the layout
+for sections for the whole document. In the body of the document, changes occur immediately
+starting with the next relevant section.
+
+\KVP Each of these takes the same key-value pairs.
+\begin{enumerate}
+\item \texttt{fontfamily}: Font family to use for section titles,
+ permitted values are \texttt{rmfamily}, \texttt{sffamily}, \texttt{ttfamily}.
+\item \texttt{fontseries}: Font series to use for the section title, values are \texttt{bfseries} and
+ \texttt{mdseries}.
+\item \texttt{fontshape}: Font shapes to use for the section title, values are \texttt{upshape}, \texttt{itshape},
+ \texttt{scshape}, \texttt{slshape}.
+\item \texttt{fontsize}: Font size of the section title, permissible values are \texttt{tiny}, \texttt{scriptsize},
+\texttt{foot\-note\-size}, \texttt{small}, \texttt{normalsize}.
+ \texttt{large}, \texttt{Large}, \texttt{LARGE}, \texttt{huge}, \texttt{Huge}.
+\item \texttt{halign}: Alignment of the section title, permissible
+ values are \texttt{l} (left aligned), \texttt{c} (centered), \texttt{r} (right aligned).
+\item \texttt{ding}: You can specify a ding to display where the section number is usually placed; e.g.,
+ \verb+ding=\ding{066}+.
+
+\item \texttt{color}: The color of the section title, this can be any named color. The default is blue.
+
+\item \texttt{special}: Through this key, you can a specify predefined layout for the section titles. Permissible
+ values are \texttt{shadow}, \texttt{framebox}, \texttt{colorbox}, \texttt{fcolorbox},
+ \texttt{frame\-box\-fit}, \texttt{color\-box\-fit}, \texttt{fcolorbox\-fit}, \texttt{custom}, \texttt{default}.
+
+\item[] Custom section heads can be used by specifying a value of \texttt{custom}. In this
+ case, {\Web} uses the values of \Com{customSecHead}, \Com{custom\-Sub\-sec\-Head} and
+ \Com{custom\-Sub\-sub\-sec\-Head}. Each of these macros take one argument, the code for designing
+ the title. The title is referred to as \texttt{\#1}. Depending on how these custom section titles
+ are defined, the other keys may not be obeyed.
+
+% See an \hyperref[customHeadEx]
+% {Example~\ref*{customHeadEx}} below; there are other examples in the demo files.
+
+\item \texttt{framecolor}: The color of the frame surrounding the subject when the \texttt{special}
+ key has a value of \texttt{framebox}, \texttt{fcolorbox} \texttt{frameboxfit} or \texttt{fcolorboxfit}.
+
+\item \texttt{bgcolor}: The background (fill color) of the box enclosing the section title, when
+ \texttt{special} has a value of \texttt{colorbox}, \texttt{fcolorbox}, \texttt{colorboxfit}
+ or \texttt{fcolorboxfit}.
+
+\item \texttt{shadowcolor}: The color of the shadow, when \texttt{special} has a value of \texttt{shadow}.
+
+\item \texttt{beforeskip}: The amount of skip before the section title.
+
+\item \texttt{afterskip}: The amount of skip after the section title.
+
+\item \texttt{usefont}: Through this key it is possible to specify
+an arbitrary font and font size. The key takes five parameters, for
+example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+usefont={OT1}{cmdh}{m}{n}{{16}{16pt}}
+\end{Verbatim}
+The first
+four are the arguments of the {\LaTeX}'s \cs{usefont}, encoding,
+family, series and shape. The last argument are the arguments of the
+{\LaTeX}'s \cs{fontsize}, size and baselineskip.
+
+\item[] If the fifth parameter is empty, no font size is specified, the current default sizes are used.
+
+\item \texttt{numdingcolor}: The color of the section number or ding, if defined. The default is blue.
+
+\item \texttt{reset}: This key attempts to reset changes to their defaults. Permissible values are
+ \texttt{font} (to reset the font changes only), or \texttt{all} (to reset all the keys).
+\end{enumerate}
+
+\Ex\label{tutex7} The following example sets the section
+title with shadows: text is red and shadow is blue. We center the
+title horizontally, and specify an after skip of \texttt{12pt}.
+\begin{dCmd*}{.5\linewidth}
+\sectionLayout{%
+ afterskip=12pt,
+ halign=c,
+ color=red,
+ shadowcolor=blue,
+ special=shadow
+}
+\end{dCmd*}
+\noindent Similarly for \Com{subsectionLayout} and \Com{subsubsectionLayout}.
+
+% \expoint{ex7} Use \texttt{apb\_ex7.tex} to explore the section layout commands.
+
+\settowidth{\aebdimen}{\cs{subsubsectionLayout\darg{\meta{length}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\shadowhoffset{!meta(length)}
+\shadowvoffset{!meta(length)}
+\end{dCmd}
+\newtopic When \texttt{$\text{special} = \text{shadow}$}, shadowing is
+obtained by typesetting the text twice with different colors. The
+amount of horizontal and vertical offset are controlled by these two
+commands. The defaults are \verb!\shadowhoffset{.2ex}! and
+\verb!\shadowvoffset{-.2ex}!.
+
+\newtopic The interface for writing custom section layouts are the following three
+commands.
+
+\settowidth{\aebdimen}{\cs{customSubsubsecHead\darg{\anglemeta{tex\_code}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\customSecHead{!anglemeta(tex_code)}
+\customSubsecHead{!anglemeta(tex_code)}
+\customSubsubsecHead{!anglemeta(tex_code)}
+\end{dCmd}
+\CmdLoc Use in the preamble or before a section head.
+
+\PD These three commands are used to write custom section,
+subsection and subsubsection layouts. Here, the parameter \anglemeta{tex\_code} is
+{\TeX} code for laying out the section titles, and should use
+\texttt{\#1} to represent the section title.
+
+\Ex\label{customHeadEx} The following definitions can appear
+anywhere, they are global unless appearing in a group.
+This puts a colored box around the section title, which
+is assumed to appear in one line. We use the internal color names
+for the \texttt{color} (\cs{aeb@sectioncolor}) and \texttt{bgcolor}
+(\cs{aeb@sectionbgcolor}) keys, in this way, the title will obey the
+values of these keys. This particular custom head obeys the
+\texttt{halign} key as well.
+\begin{dCmd*}{\linewidth}
+\makeatletter
+\customSecHead{\vbox{\colorbox{\aeb@sectionbgcolor}
+ {\color{\aeb@sectioncolor}#1}}}
+\sectionLayout{%
+ special=custom,
+ halign=l,
+ bgcolor=red,
+ color=white
+}
+\makeatother
+\end{dCmd*}
+\noindent The above code is a simplified version of the \texttt{colorboxfit},
+a value of the \texttt{special} key.
+
+%\exPDF{web_pro} The demo file \texttt{web\_pro} illustrates these commands.
+
+\exAeBBlogPDF{p=1112} The demo file \texttt{\href{\urlAcroTeXBlog/?p=1112}{web\_pro.pdf}}
+illustrates these commands.
+
+%\expoint{ex7} See \texttt{apb\_ex7.tex} for a working example of custom section
+%head layout.
+
+%\Important It is important to remark that between slides \texttt{@}
+%is made into a `letter', and reset to `other' at the beginning of
+%the next slide. This makes it convenient to make these definitions
+%between slides. In the preamble, however, such a definition must be
+%between \cs{makeatletter} and \cs{makeatother}.
+
+\section{On Parts, Chapters, and Final Dots}\label{partsChaptersDots}
+
+The {\Web} package has several commands for customizing the \cs{part} and
+\cs{chapter} commands.
+
+\subsection{The \texorpdfstring{\protect\cs{part}}{\CMD{part}} command}
+
+The appearance of the part title can be controlled by \cs{formatPartTitle}.
+
+\settowidth{\aebdimen}{\cs{customSubsubsecHead\darg{\anglemeta{tex\_code}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\formatPartTitle{!anglemeta(tex_code)}
+\noPartNumbers
+\end{dCmd}
+
+\newtopic The argument of \anglemeta{tex\_code} consists of formatting commands; within the
+argument \texttt{\#1} represents the title. The command \cs{noPartNumbers}
+is a convenience macro to turn off all part number, if you want to create
+a document that has no part numbers, such as this document.
+
+The default argument for \cs{formatPartTitle}
+
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\large\bfseries
+ \ifnum \c@secnumdepth >\m@ne
+ \partname~\thepart:\space
+\fi#1
+\end{Verbatim}
+\newtopic This typesets as {\large\bfseries Part I: The Web Package}, for example. You can
+modify the basic definition to introduce colors, fonts, sizes of your choice, and
+even special effects; for example, the declaration
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\formatPartTitle{\fbox{\large\bfseries
+ \ifnum \c@secnumdepth >\m@ne
+ \partname~\thepart:\space
+\fi#1}}
+\end{Verbatim}
+gives a part title like this, {\large\bfseries\fbox{Part I: The Web Package}}
+
+\newtopic
+A companion comment for changing the format of a part title, is \cs{tocPartTitle},
+which modifies how the part title appears in the table of contents.
+
+\settowidth{\aebdimen}{\cs{tocPartTitle\darg{\cs{thepart}\cs{hspace\darg{1em}\#1}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\tocPartTitle{!anglemeta(tex_code)}
+\tocPartTitle{\thepart\hspace{1em}#1}
+\end{dCmd}
+
+\newtopic Again, within the argument of \cs{tocPartTitle}, \texttt{\#1} refers to the
+text of the part title. The default definition is given above also.
+
+\redpoint Finer control over the formatting of the \cs{part} command can be obtained by redefining
+\cs{web@makeparthead} or \cs{web@makesparthead}, the latter one for \cs{part*}.\endredpoint
+
+\subsection{The \texorpdfstring{\protect\cs{chapter}}{\CMD{chapter}} command}
+
+The \cs{chapter} command is available in the \texttt{book} and \texttt{report} classes.
+There are several defined in the {\Web} package for getting a little control over these.
+
+
+\long\def\formatChapterNumber#1{\def\web@formatChapterNumber{#1}}
+\formatChapterNumber{\large\bfseries
+ \@chapapp\space\thechapter\par\nobreak}
+\long\def\formatChapterTitle#1{\def\web@formatChapterTitle##1{#1}}
+\formatChapterTitle{%
+ \interlinepenalty\@M
+ \noindent\hspace{1em}\large\bfseries#1\par\nobreak
+}
+
+\settowidth{\aebdimen}{\cs{formatChapterNumber\darg{\anglemeta{tex\_code}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\formatChapterNumber{!anglemeta(tex_code)}
+\formatChapterTitle{!anglemeta(tex_code)}
+\end{dCmd}
+
+\newtopic The argument of \ameta{tex\_code} consists of formatting commands; within the
+argument \texttt{\#1} represents the title.
+
+The default definitions for these are
+
+\begin{dCmd*}{.85\linewidth}
+\formatChapterNumber{\large\bfseries
+ \@chapapp\space\thechapter\par\nobreak}
+\formatChapterTitle{%
+ \interlinepenalty\@M
+ \noindent\hspace{1em}\large\bfseries#1\par\nobreak
+}
+\end{dCmd*}
+\newtopic These are slighly modified versions of what is found in \texttt{book.cls}.
+
+\redpoint A finer control can be obtained over the \cs{chapter} command
+formatting by redefining \cs{web@makechapterhead} or
+\cs{web@makeschapterhead}, the latter one is used for \cs{chapter*}.\endredpoint
+
+\subsection{The \texorpdfstring{\protect\cs{noFinalDot}}{\CMD{noFinalDot}} Command}\label{nofinaldot}
+
+The default behavior for the {\Web} package is to place a dot (.) at the end of the section
+number in both the body of the document and in the table of contents. Thus,
+this section is numbered as \textcolor{blue}{\ref*{nofinaldot}.} (note the final dot following
+the section number). This section will appear in the table of contents the same way. The default
+behavior of all (that I know of) standard {\LaTeX} classes is not to place this final
+dot (.) at the end of the section number. To revert to this behavior, use the
+\Com{noFinalDot} command in the preamble.
+
+%---------------------- Exerquiz -----------------------------------%
+
+\addtocontents{toc}{%
+ \par\vskip6pt\vskip0pt plus .25\vsize\penalty-1000 \vskip0pt plus-.25\vsize}
+
+%\addtocontents{toc}{\par\protect\vspace{\bigskipamount}\kern0pt\vspace{-\medskipamount}}
+\part{The Exerquiz Package}\label{s:exerquiz}
+
+%The \textsf{exerquiz} package contains a series of macros for
+%creating on-line exercises, short quizzes (with or without
+%solutions), and longer quizzes that are graded using JavaScript.
+
+%\section{Overview}
+
+The \textsf{exerquiz} package provides environments for creating
+the following interactive elements in a \textsf{PDF} file.
+
+\begingroup
+\def\mylabel#1{\hfil\hyperref[#1]{\large$\bullet$}\ }
+\begin{list}{}
+{\usecounter{questionno}\setlength{\parsep}{0pt}\setlength{\topsep}{0pt}
+\renewcommand{\makelabel}{\mylabel}
+\settowidth{\labelwidth}{\normalfont\bfseries00.\ }%
+\setlength{\itemindent}{0pt}\setlength{\labelsep}{0pt}}%
+
+\item[ss:online] \begin{NoHyper}\nameref{ss:online}\end{NoHyper}:
+Macros for creating on-line exercises.
+
+\item[ss:QuizIR] \begin{NoHyper}\nameref{ss:QuizIR}\end{NoHyper}:
+Macros for creating interactive quizzes with immediate feedback.
+
+
+%\item[ss:QuizS] \begin{NoHyper}\nameref{ss:QuizS}\end{NoHyper}:
+%Macros for creating quizzes with immediate feedback
+%and a link to the solutions to the quizzes.
+
+\item[ss:GradedQuizzes]
+\begin{NoHyper}\nameref{ss:GradedQuizzes}\end{NoHyper}:
+Macros for creating quizzes graded by Java\-Script, with an option
+to have the quizzes corrected using JavaScript.
+
+\end{list}
+\endgroup
+
+\noindent In each of the quiz environments, you can pose multiple
+choice, math fill-in, or text fill-in questions.
+
+The \textsf{exerquiz} provides the above listed environments for
+the \texttt{dvips\-one}, \texttt{dvips}, \texttt{textures}, \texttt{pdftex} (including
+lua(la)tex), \texttt{dvipdfm}, \texttt{dvipdfmx}, and \texttt{xetex} options. The package
+automatically detects \textsf{pdftex} and \textsf{xetex}, and passes the driver name to
+all subordinate packages, \textsf{eforms} and \textsf{insdljs}.
+
+There are options for reformatting the exercises to a print
+format, for excluding the solutions to the exercises, for writing
+the solutions to the exercises so they follow the question, and
+for different languages, and much more.
+
+The \textsf{exerquiz} also allows you to rearrange the order and
+location of the solutions to the exercises and quizzes, to
+redefine many running headers, to customize the exercises and
+quizzes, and to use the \texttt{exercise} environment to create
+a new environment with its own counter, or with no counter at all.
+
+All the above mentioned macros and the options of the package are
+discussed in this section.
+
+\section{\protect\textsf{Exerquiz} and Acrobat JavaScript}
+
+\textsf{Exerquiz} now uses the \textsf{insdljs} Package to insert
+Document level Java\-Scripts into the \textsf{PDF} file. The quizzes
+created using the \texttt{shortquiz} or \texttt{quiz} environment are
+graded, marked and scored using these inserted JavaScript functions.
+
+Because the package \textsf{insdljs} is already loaded, it is easy
+for the document author to develop JavaScripts that can be called
+from the standard \textsf{Exerquiz} commands. The ability to write
+JavaScript, therefore, right in the \LaTeX{} document gives a
+unique programming flair to \textsf{Exerquiz}.
+
+\section{Package Requirements}
+
+The \textsf{exerquiz} package is independent of the \pkg{web}
+package; however, \textsf{exerquiz} utilizes \pkg{hyperref}
+just as \pkg{web} does. Use the latest version of
+\pkg{hyperref}. In addition to the \textsf{color} package,
+also used by \pkg{web}, \textsf{exerquiz} also uses the
+\textsf{verbatim} package. This is used to write verbatim
+solutions to exercises and quizzes to certain auxiliary files.
+
+Results from the quizzes created by the \texttt{shortquiz} and
+\texttt{quiz} environments are evaluated using document level
+JavaScripts. These JavaScripts are inserted into the final
+\textsf{PDF} file using the \textsf{insdljs} package. This package
+makes it easy for the package writer or document author to write
+JavaScripts.
+
+The \textsf{exerquiz} package uses \emph{form features} of
+\textsf{PDF} that \pkg{web} does not use. For the interactive
+features to properly work, use \textcolor{blue}{Adobe Reader
+5.0} or higher.
+
+\section{Basic Package Options}\label{ss:exbasicusage}
+
+Place in the preamble of your document
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage{exerquiz}
+\end{Verbatim}
+
+\redpoint to use \textsf{exerquiz} with the \pkg{web} package, specify,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),!meta(web_options)]{web}
+\usepackage[!meta(eq_options)]{exerquiz}
+\end{Verbatim}
+A complete list of the options recognized by \textsf{exerquiz} can be
+found in \hyperref[s:ListofOpts]{Section~\ref*{s:ListofOpts}}, page~\pageref*{s:ListofOpts}; they are
+also discussed below.
+
+The driver options for the \pkg{web} package are \texttt{dvipsone},
+\texttt{dvips}, \texttt{pdftex}, \texttt{dvipdfm} and \texttt{textures}.
+No driver option with \textsf{exerquiz} is needed if you are using the
+\pkg{web} package, \textsf{exerquiz} inherits the driver option from
+the \pkg{web} package.
+
+For the \texttt{dvipdfm} option to work properly you
+will need \textsf{dvipdfm}, version 0.12.7b or later, and
+\pkg{hyperref}, version 6.68a or later.
+
+\redpoint To use \pkg{hyperref} and \textsf{exerquiz} with
+\texttt{dvips}, specify,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[dvips,!meta(hy_options)]{hyperref}
+\usepackage[dvips,!meta(eq_options)]{exerquiz}
+\end{Verbatim}
+
+\redpoint To use \pkg{hyperref} and \textsf{exerquiz} with
+\texttt{pdftex} or \texttt{xetex}, specify,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(hy_options)]{hyperref}
+\usepackage[!meta(eq_options)]{exerquiz}
+\end{Verbatim}
+Both \pkg{hyperref} and \pkg{exerquiz} automatically detect the \app{pdflatex}
+and \app{xelatex} applications so specification of the driver is not required.
+
+\redpoint To use \pkg{hyperref} and \textsf{exerquiz} with
+any other driver, specify,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),!meta(hy_options)]{hyperref}
+\usepackage[!meta(driver),!meta(eq_options)]{exerquiz}
+\end{Verbatim}
+the \meta{driver} for both \pkg{hyperref} and \pkg{exerquiz}.
+
+\redpoint To use \pkg{hyperref} and \textsf{exerquiz}, specify,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[!meta(pdfs_options)]{pdfscreen}
+\usepackage{exerquiz}
+\end{Verbatim}
+\makebox[0pt][r]{\raisebox{-2pt}{\color{red}\href{{\bUrl/tutorial/webeq/eq_pdfs.zip}}{{\zqacr
+ b\hspace{9.5pt}}}}\enspace}\ignorespaces
+See the sample file \texttt{eq\_pdfs.tex} already set up for use
+with \textsf{pdfscreen}, obtained by downloading the zipped file
+\texttt{\href{\bUrl/tutorial/webeq/eq_pdfs.zip}{eq\_pdfs.zip}}.
+
+
+\paragraph*{Some \app{xetex} issues.}
+In recent versions of \app{xetex}, the application may be set to strip out
+named destinations that are not referenced within the document as a target of
+a `hard-wired' link; this is an optimization feature. The \pkg{exerquiz}
+package sets a lot of destinations (or targets) but, in some instances,
+`dynamic' links are employed using the JavaScript method
+\texttt{\textsl{Doc}.gotoNamedDest(\anglemeta{target})}. In such instances,
+\app{xetex} may strip out these targets; the link or button action may not
+perform the jump to the destination because the destination does not exist.
+If this becomes an issue for your \app{xetex} installation, the
+\textbf{\app{Dvipdfmx} Compatibility Flags} needs to be modified. Search for
+the configuration file \texttt{dvipdfmx.cfg} and open the file. Scroll down
+to the line `\texttt{\%C 0x0000}', beneath it insert `\texttt{C 0x0010}',
+save and close the file.\footnote{MiK\TeX{} discourages the direct editing of
+the file \texttt{dvipdfmx.cfg}, instead, execute the line of code
+`\texttt{initexmf -{}-edit-config-file dvipdfmx}' at the \app{Windows}
+command-line prompt, and edit a local version of the configuration file as
+described above.} The documentation for this bit field is just above the
+referenced line and an explanation of the `\texttt{C 0x0010}' setting is
+given.
+
+
+\begin{comment}
+\subsection{The \texorpdfstring{\protect\texttt{pdftex}}{pdftex}
+Option}\label{ss:pdftexerquiz}
+
+The \textsf{exerquiz} package is independent of the \pkg{web}
+package. Therefore, you can create your own page layout package
+and use \textsf{exerquiz} to help you create exercises and
+quizzes. Of course, \pkg{hyperref} must be used.
+
+%\redpoint Using \textsf{exerquiz} with \pkg{hyperref} or
+%\textsf{pdfscreen}
+
+Should you want to use the \textsf{exerquiz} package using
+\textsf{pdftex} without the \pkg{web} package, use the
+\texttt{pdftex} option:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[pdftex,<more options>]{hyperref}
+\usepackage[pdftex]{exerquiz}
+\end{Verbatim}
+\noindent In particular,
+\textsf{pdfscreen}\footnote{CTAN:macros/latex/contrib/supported/pdfscreen},
+a screen design package written for \textsf{pdftex} by C. V.
+Radhakrishnan, has been tested and works correctly with
+\textsf{exerquiz}. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[screen,article,sidebar]{pdfscreen}
+\usepackage[pdftex]{exerquiz}
+\end{Verbatim}
+\noindent See the sample file \texttt{eq\_pdfs.tex} already set up for use
+with \textsf{pdfscreen}, obtained by downloading the zipped file
+\texttt{\href{\bUrl/tutorial/webeq/eq_pdfs.zip}{eq\_pdfs.zip}}.
+
+\subsection{The \texttt{dvipdfm} Option}\label{ss:dvipdfm}
+
+Should you want to use the \textsf{exerquiz} package without
+the \pkg{web} package, in this case, the usage is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[dvipdfm,<more_options>]{hyperref}
+\usepackage[dvipdfm]{exerquiz}
+\end{Verbatim}
+
+%\subsection{The \texttt{dvi\-windo} Option}\label{ss:dviwindo}
+%
+%Beginning with version 1.3 of \pkg{web} and \textsf{exerquiz},
+%\textsf{dviwindo} (the \texttt{.dvi} previewer by
+%\href{http://www.yandy.com/}{\Y&Y, Inc.}) is supported. This
+%means that hypertext links will be active from within the
+%\textsf{dviwindo} previewer---as well as from within the Adobe
+%Reader after the file has been converted to \textsf{pdf}.
+%
+%Should you want to use the \textsf{exerquiz} package without
+%the \pkg{web} package, in this case, the usage is
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+% \usepackage[dviwindo,<more_options>]{hyperref}
+% \usepackage[dviwindo]{exerquiz}
+%\end{Verbatim}
+
+
+\redpoint \textbf{\textcolor{red}{Important Note:}} \emph{Only}
+the \texttt{exercise} environment (this is the material described in
+\hyperref[ss:online]{Section~\ref*{ss:online}}) is supported by
+these two options. None of the quiz environments can be used with
+these two options at this time. \Y&Y{} users need to use the
+\texttt{dvipsone} option if the quiz environment is needed.
+\end{comment}
+
+\subsection{The Language Option}\label{sss:exerquizlangopts}
+
+The \hyperref[web:langopts]{language option}, available in the
+\pkg{web} package, can be invoked even when the \pkg{web} package is
+not used.\footnote{Otherwise, the language option is introduced as an
+option of the \pkg{web} package.} Currently, language options supported are
+\begin{quote}
+\begin{tabular}{lll}
+\texttt{dutch} & \texttt{french} & \texttt{german}\\
+\texttt{italian} & \texttt{norsk} & \texttt{russian}\\
+\texttt{spanish} & \texttt{dansk} & \texttt{polish}\\
+\texttt{finnish} & \texttt{czech} & \texttt{catalan}\\
+\texttt{brazil} & \texttt{turkish}
+\end{tabular}
+\end{quote}
+For example, with \pkg{hyperref}, you could use:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),!meta(hy_options)]{hyperref}
+\usepackage[!meta(driver),french]{exerquiz}
+\end{Verbatim}
+\meta{driver} is any of the supported drivers.
+
+\redpoint\textbf{\textcolor{red}{Unicode required for \texttt{turkish} and \texttt{russian} options:}} When using the
+\texttt{turkish} or the \texttt{russian} option, without using the \pkg{web}
+package, use the \texttt{unicode} option for \pkg{hyperref}, like so,\footnote{The
+\pkg{web} package passes the \texttt{unicode} option to
+\pkg{hyperref} when using the \texttt{turkish} or \texttt{russian} option through the \pkg{web}
+option list so there is no need to explicitly use the \texttt{unicode}
+option.}\def\1{\hspace*{-\amtIndent}}
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),!meta(hy_options),unicode]{hyperref}
+\usepackage[!meta(driver),turkish]{exerquiz}
+!1or
+\usepackage[!meta(driver),russian]{exerquiz}
+\end{Verbatim}
+%\noindent This is because the word for ``Table of Contents'' is ``{\.I}{\c
+%c}indekiler'' in Turkish. For {\.I}\c{c}indekiler to appear
+%correctly in the bookmarks, hyperref needs the \texttt{unicode}
+%option.\footnote{The glyph {\.I} (latin capital letter I with dot above) is in the Latin Extended-A group,
+%unicode \texttt{U+0130}.}
+
+\subsection{The
+\texorpdfstring{\protect\texttt{forpaper{\protect\normalfont\protect\space and }forcolorpaper}}{forpaper and
+forcolorpaper}
+ Options}\label{sss:exquizforpaper}
+
+The \texttt{forpaper} or \texttt{forcolorpaper} option, also available in the
+\textsf{\hyperref[sss:webforpaper]{web}} package, is needed in the
+\textsf{exerquiz} package if you are are using \textsf{exerquiz}
+without \pkg{web}. The option is invoked in the usual way.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),!meta(hy_options)]{hyperref}
+\usepackage[!meta(driver),forpaper]{exerquiz}
+\end{Verbatim}
+\noindent See the discussion of the \texttt{\hyperref[sss:webforpaper]{forpaper}} on
+page~\pageref{sss:webforpaper} given earlier.
+
+\subsection{The \texttt{preview} Option}\label{sss:preview}
+
+The \textsf{exerquiz} package can generate a large number of form
+fields: buttons, check boxes, radio buttons, and text fields. These
+are PDF objects and cannot be seen in a dvi previewer. By using
+the \texttt{preview} option, the bounding rectangles of the form
+objects are surrounded with rules, which outline the form fields
+and make their positions visible.
+
+This option may help you to fine tune the positions of the form
+fields. The option is for developmental use only. When you are
+satisfied with the positioning and are ready to publish, remove
+this option.
+
+\redpoint This option is not useful with the \texttt{pdftex} option, as
+\textsf{pdftex} does not (normally) produce a dvi file.
+
+\subsection{The \texttt{nodljs} Option}\label{sss:nodljs}
+
+If you are creating a document that is meant to be printed or your
+document only has exercises and solutions in it (which do not
+require JavaScript), the size of the document can be reduced
+significantly by using the \texttt{nodljs} option. This option is
+just passed on to the \textsf{insdljs} package.
+
+% \subsubsection{The \texttt{acrobativ} Option}\label{sss:acrobativ}
+%
+% If the document author is using the \texttt{dvips} or the \texttt{dvipsone} option
+% but has only Acrobat~4.0 or~4.05, then the document level JavaScripts need
+% to be inserted manually. Therefore, we need to turn off the automatic inclusion of JavaScript.
+% This option does exactly that; it is equivalent to the \texttt{nodljs} option.
+
+\subsection{The \texttt{exercisesonly} Option}\label{sss:noquizzes}
+
+If the document author only uses the \texttt{exercise} environment, then all
+the document level JavaScripts of \texttt{exerquiz} are not needed. Use either
+one of these two equivalent options to exclude the insertion of the JavaScripts.
+
+This is a convenience option that simply calls the \texttt{nodljs} option described above.
+
+\begin{comment}
+\subsection{The \texttt{de\-bug} Option}\label{sss:debug}
+
+Developing JavaScript functions can be tricky. Quite often, it is
+useful to insert some code lines that will help you in debugging a
+particular function or a set of functions. For example, you might
+want to verify that the parameters being passed to a function are
+the correct ones, or that the return value is correct. You can
+have Acrobat write the values to its console like so:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+console.println("Function myFunc");
+console.println("Parameters: x = " x + ", y = " + y );
+console.println("Return Value: retnValue = " + retnValue);
+\end{Verbatim}
+\noindent In the above code, I have used the
+\texttt{console.println()} method, which is only available in the
+Acrobat application, not the Reader. For the Reader, one could
+use \texttt{app.alert()}, but this method is not well-suited for
+monitoring values of a large number variables as the script
+executes. If you don't have the full Acrobat, the \texttt{debug}
+option will not be useful.
+
+\textsf{Exerquiz} just passes this option on to the
+\textsf{insdljs} package. Additional details on the debug option
+can be found there. Within the \texttt{insDLJS} environment, you
+can place debugging code lines as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+function myFunc(x,y)
+{
+ retnValue = x + y;
+\db console.println("Function myFunc");\db%
+\db console.println("Parameters: x = " x + ", y = " + y );\db%
+\db console.println("Return Value: retnValue = " + retnValue);\db%
+ return retnValue;
+}
+\end{Verbatim}
+\noindent Any line that begins with \cs{db} and ends with \cs{db} is a
+debugging line. These lines will be included if the \texttt{debug} option
+is taken; otherwise they are removed. The `\texttt{\%}', is
+the comment character within the \texttt{insDLJS} environment, and prevents,
+in this case, the introduction of a carriage return.
+\end{comment}
+
+\subsection{The \texttt{allowrandomize} Option}\label{ss:allowrandomize}
+
+Use this option to load in the macros to randomize the choices
+of a multiple choice question. See \hyperref[s:random]{Section~\ref*{s:random}},
+\Nameref{s:random} for details.
+
+\subsection{The \texttt{unicode} Option}\label{eq:unicode}
+
+This option is passed to \pkg{hyperref}, and is placed in {\Web} as a
+convenience. If \textsf{eforms} is subsequently loaded, \textsf{eforms} (and
+\textsf{exerquiz}) will accept {\LaTeX} markup in the optional argument
+of the form fields. See the \href{eformman.pdf}{eforms manual}
+for details.\footnote{eforms manual on Web: \url{\bUrl/eformman.pdf}}\edef\fnEForms{\thefootnote}
+
+\subsection{The \texttt{useui} Option}\label{eq:useui}
+
+This option is passed to \textsf{eforms}, and is placed in {\Web} as
+a convenience. If \textsf{eforms} is subsequently loaded,
+\textsf{eforms} loads the \pkg{xkeyval} package, and key-value pairs are
+defined for use in the optional argument of form and link commands.
+See the \href{eformman.pdf}{eforms manual} for details.${}^\text{\fnEForms}$
+
+\subsection{The \texttt{usesumrytbls} Option}\label{eq:usesumrytbls}
+
+When this option is taken, the code for creating quiz summary tables is input.
+See \hyperref[s:sumrytbl]{Section~\ref*{s:sumrytbl}}, page~\pageref*{s:sumrytbl} for details.
+
+\subsection{The \texttt{contsolns} Option}\label{eq:contsolns}
+
+When this option is taken, a message appears in the right running footer
+that a solution has crossed the page boundary and that the solution
+continues on the next page. Further documentation can be found in
+\texttt{contsolns.pdf} in the \texttt{doc} folder, the demo file for this
+feature is \texttt{contsolns\_ex.tex}, found in the \texttt{examples}
+folder.
+
+\section{The \texttt{exercise} Environment}\label{ss:online}
+
+The \textsf{exerquiz} package defines \texttt{exercise} and
+\texttt{solution} environments, the latter being nested inside the
+former. With these environments, you can create questions
+(exercises) with solutions. Solutions are written
+\texttt{verbatim} to the auxiliary file \cs{jobname.sol}, then
+input back in near the end of the document. A hypertext link is
+created to connect the exercise with the solution.
+
+An exercise with \hyperref[sss:exwparts]{multiple parts} can also
+be defined, with hypertext links to the solutions of the
+individual parts of the exercise.
+
+The \texttt{exercise} environment has its own counter
+(\texttt{eqexno}), but there is an \hyperref[sss:eqexno]{option}
+for using another counter, or no counter at all. This may be
+useful for creating a numbered example environment.
+
+There is an option for placing the
+\hyperref[sss:solutionsafter]{solutions immediately after} the
+statement of the problem. This, again, may be useful for an
+example environment where you want the solution to the example to
+follow the statement, rather than being hypertext-linked to the
+solution.
+
+Finally, there is an option for \hyperref[sss:hide]{hiding
+solutions}, in the following sense: When the hidden option is
+used, the solutions are commented out rather then being written to
+the \verb+\jobname.sol+ file. Additionally, there is a global
+option, \texttt{nohiddensolutions}; in this case, when you
+re-\LaTeX, the solutions are written to \verb+\jobname.sol+, and
+input back into the document.
+
+\subsection{Basic Usage}\label{ss:basicexer}
+
+The syntax for the \texttt{exercise} and \texttt{solution}
+environments is as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{exercise}
+Your Question.
+\begin{solution}
+The Solution to Your Question
+. . . . . . . . . . . . . . .
+. . . . . . . . . . . . . . .
+. . . . . . . . . . . . . . .
+\end{solution}
+\end{exercise}
+\end{Verbatim}
+\noindent Here is an example of the usage.
+
+\begin{exercise}\label{ex:int}%
+Evaluate the integral \(\displaystyle\int x^2 e^{2x}\,dx\).
+\begin{solution}
+We evaluate by \textit{integration by parts}:
+\begin{alignat*}{2}
+ \int x^2 e^{2x}\,dx &
+ = \frac12 x^2 e^{2x} - \int x e^{2x}\,dx &&\quad
+ \text{$u=x^2$, $dv=e^{2x}\,dx$}\\&
+ = \frac12 x^2 e^{2x} -
+ \left[\frac12 x e^{2x}-\int \frac12 e^{2x}\,dx\right] &&\quad
+ \text{integration by parts}\\&
+ = \frac12 x^2 e^{2x} - \frac12 x e^{2x} + \frac12\int e^{2x}\,dx &&\quad
+ \text{$u=x^2$, $dv=e^{2x}\,dx$}\\&
+ = \frac12 x^2 e^{2x} - \frac12 x e^{2x} + \frac14 e^{2x} &&\quad
+ \text{integration by parts}\\&
+ = \frac14(2x^2-2x+1)e^{2x} &&\quad
+ \text{simplify!}
+\end{alignat*}
+\end{solution}
+\end{exercise}
+
+The code for this is
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{exercise}\label{ex:int}%
+Evaluate the integral \(\displaystyle\int x^2 e^{2x}\,dx\).
+\begin{solution}
+We evaluate by \texttt{integration by parts}:
+\begin{alignat*}{2}
+ \int x^2 e^{2x}\,dx &
+ = \frac12 x^2 e^{2x} - \int x e^{2x}\,dx &&\quad
+ \text{$u=x^2$, $dv=e^{2x}\,dx$}\\&
+... lines removed ...
+ = \frac14(2x^2-2x+1)e^{2x} &&\quad
+ \text{simplify!}
+\end{alignat*}
+\end{solution}
+\end{exercise}
+\end{Verbatim}
+\exAeBBlogPDF{p=803} See the source file for the PDF
+\texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}} for a complete
+listing of this exercise.
+
+
+%\noindent See the demo file \textsf{webeqtst.tex} for a complete listing of this exercise.
+
+
+\redpoint Questions and solutions are kept together \textit{\`a la
+Knuth}. The solutions are written to the file
+\cs{jobname.sol} verbatim then input back using
+\cs{includeexersolutions}.
+
+
+\redpoint You can redefine the counter to include the section
+number. For example, the code
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand{\theeqexno}{\thesection.\arabic{eqexno}}
+\end{Verbatim}
+\noindent can be placed in the preamble of your document. In this
+case, the above exercise would appear as
+\textsf{Exercise~\thesection.\ref*{ex:int}}.
+
+\redpoint The usual cross-referencing mechanisms for \LaTeX, i.e.,
+using \cs{ref} and \cs{pageref}, work as expected.
+
+\medskip\noindent
+For example, the label `\verb+\label{ex:int}+' was placed
+just after the \verb+\begin{exercise}+ on the previous page. Let us now
+reference Exercise~\ref{ex:int}, on page~\pageref{ex:int}.
+\begin{quote}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+let us now reference Exercise~\ref{ex:int},
+on~\pageref{ex:int}.
+\end{Verbatim}
+\end{quote}
+\noindent Of course, the nicer looking variations can be done as well.
+For example, see \hyperref[ex:int]{\textsf{Exercise~\ref*{ex:int}}}.
+\begin{center}
+\verb+\hyperref[ex:int]{\textsf{Exercise~\ref*{ex:int}}}+
+\end{center}
+\noindent The \texttt*-form of \cs{ref} was used to turn off the
+redundant link creation. (\pkg{hyperref} would normally make
+the \cs{ref} macro into a link.)
+
+\redpoint An `\textsf{Exercise}' that is also a hypertext link
+appears in the default color \textcolor{webgreen}{green}; if an
+`\textsf{Exercise}' is not a link, it appears in \textcolor{blue}
+{blue}. (The word `\textsf{Exercise}' is not a link if it is an
+\hyperref[sss:exwparts]{exercise with parts}, or if the
+\texttt{\hyperref[sss:nosolutions]{nosolutions}} option is used.
+Finally, if the \texttt{web} option
+\texttt{\hyperref[sss:webforpaper]{forpaper}} is used, color is
+turned off and `\textsf{Exercise}' appears in black.
+
+\redpoint\textbf{\textcolor{red}{Caveat:}} There is one problem
+you might watch for. There is an optional argument to the
+\texttt{solution} environment. When \LaTeX{} searches the source
+looking for the optional parameter, which may not exist, it expands
+macros looking for a `\texttt['. This causes problem when you have
+a solution that begins with a math display environment and \LaTeX{}
+prematurely expands such an environment.
+
+\begin{exercise}
+Write an equation of a line that crosses the $x$- and $y$-axes at 1.
+\begin{solution}[]
+\begin{equation*}
+\boxed{x+y=1}
+\end{equation*}
+\end{solution}
+\end{exercise}
+
+\noindent To prevent \LaTeX{} errors that will stop the compilation,
+just place the empty optional argument `\texttt{[]}' prior to the math environment. The code for
+the previous exercise is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{exercise}
+Write an equation of a line that crosses
+the $x$- and $y$-axes at 1.
+\begin{solution}[]
+\begin{equation*}
+\boxed{x+y=1}
+\end{equation*}
+\end{solution}
+\end{exercise}
+\end{Verbatim}
+
+
+\noindent This is only necessary if the solution \textbf{does not} begin with text.
+
+\subsubsection{Exercises with Parts: The \texttt{exercise*} Environment}\label{sss:exwparts}
+
+Beginning with version 6.07, the \texttt{exercise*} environment is used to create exercises with multiple
+parts.\footnote{For users of exerquiz, this is equivalent
+to the \texttt*-option with the \texttt{exercise} environment. The \texttt{exercise*} environment is the preferred form
+but the \texttt*-option works as before.}
+
+A companion environment to \texttt{exercise*} is the
+\texttt{parts} environment, used to enclose the multiple parts of
+the question. The \texttt{parts} environment takes one optional
+argument, the number of columns to be used. The argument must be a
+positive integer greater than 1, in this case, a tabular
+environment is used, with the number of columns equal to the
+specified argument. If no optional parameter is given, then a list
+environment is used.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{exercise*}
+Preamble for your multi-parted question.
+\begin{parts} % begin listing of the parts
+\item First question.
+\begin{solution}
+Solution to first question.
+\end{solution}
+...
+...
+\item Final question.
+\begin{solution}
+Solution to the final question.
+\end{solution}
+\end{parts} % end listing of parts
+\end{exercise*}
+\end{Verbatim}
+
+\exAeBBlogPDF{p=803} The following exercise illustrates this option.
+This example appears in \texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}}.
+
+
+%\noindent The following exercise illustrates this option. \texttt{\href{\bUrl/webeq_ex.html\#webeqtst}{webeqtst.tex}}.
+
+\begin{exercise*}
+Suppose a particle is moving along the $s$-axis, and that its position
+at any time $t$ is given by $s=t^2 - 5t + 1$.
+\begin{parts}
+\item Find the velocity, $v$, of the particle at any time
+$t$.\label{item:part}
+\begin{solution}
+Velocity is the rate of change of position with respect to time. In
+symbols:
+\[
+ v = \frac{ds}{dt}
+\]
+For our problem, we have
+\[
+ v = \frac{ds}{dt} =\frac d{dt}(t^2 - 5t + 1) = 2t-5.
+\]
+The velocity at time $t$ is given by $\boxed{v=2t-5}$.
+\end{solution}
+\item Find the acceleration, $a$, of the particle at any time $t$.
+\begin{solution}
+Acceleration is the rate of change of velocity with respect to time.
+Thus,
+\[
+ a = \frac{dv}{dt}
+\]
+For our problem, we have
+\[
+ a = \frac{dv}{dt} =\frac d{dt}(2t-5)=2.
+\]
+The acceleration at time $t$ is constant: $\boxed{a=2}$.
+\end{solution}
+\end{parts}
+\end{exercise*}
+
+\noindent There is also an option for listing multi-parts questions in tabular form.
+
+%\makeatletter
+%\@ifundefined{@xtabularcr}{\let\save@@xtabularcr\@xarraycr}
+% {\let\save@@xtabularcr\@xtabularcr}
+%\def\eq@xtabularcr{\@ifnextchar[{\save@@xtabularcr}
+% {\eqe@tab@parts@rowsep}}%
+%\def\eqe@tab@parts@rowsep{\save@@xtabularcr[\eqparts@tabrowsep]}%
+%\def\eqe@tab@parts@rowsep{\save@@xtabularcr
+% \noalign{\expandafter\kern\eqparts@tabrowsep}}%
+%
+%\makeatother
+
+\begin{exercise*}\relax\label{ex:tabular}
+Simplify each of the following expressions in the complex number system.
+\textit{Note}: $\bar z$ is the conjugate of $z$; $\operatorname{Re} z$ is the real
+part of $z$ and $\operatorname{Im} z$ is the imaginary part of $z$.
+
+\begin{parts}[2]
+\item $i^2$
+\begin{solution}
+$i^2 = -1$
+\end{solution}
+&
+\item $i^3$
+\begin{solution}
+$i^3 = i i^2 = -i$
+\end{solution}
+\\
+\item $z+\bar z$
+\begin{solution}
+$z+\bar z=\operatorname{Re} z$
+\end{solution}
+&
+\item $1/z$
+\begin{solution}
+$\displaystyle\frac{1}{z}=\frac{1}{z}\frac{\bar{z}}{\bar{z}}
+ =\frac{\bar{z}}{z\bar{z}}=\frac{\bar{z}}{|z|^2}$
+\end{solution}
+\end{parts}
+\end{exercise*}
+
+\noindent The syntax is the same as an exercise with multiparts.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{exercise*} % <- star indicates multipart
+Simplify each...
+\begin{parts}[2] % <- optional argument indicates tabular
+\item $i^2$
+\begin{solution}[] $i^2 = -1$ \end{solution}
+&
+\item $i^3$ \begin{solution}[] $i^3 = i i^2 = -i$\end{solution}
+\\
+\item $z+\bar z$
+\begin{solution}[] $z+\bar z=\operatorname{Re} z$\end{solution}
+&
+...
+\end{solution}
+\end{parts}
+\end{exercise*}
+\end{Verbatim}
+
+\redpoint This problem style does not obey the
+\texttt{solutionsafter} option. (See the section entitled
+\Nameref{sss:solutionsafter}).
+
+\exAeBBlogPDF{p=803} The demo PDF
+\texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}}
+contains this particular example.
+
+
+%\exPDF{webeqtst} The sample file
+%\texttt{\href{\bUrl/webeq_ex.html\#webeqtst.tex}{webeqtst.tex}}
+%contains this particular example.
+
+\subsection{Options of the \texttt{exercise} Environment}
+
+\subsubsection{Leaving Vertical Space instead of a
+Solution}\label{sss:leavevspace}
+
+The \texttt{exercise} environment can be used for test
+construction. Initially, you may want to pose a questions and
+leave space beneath for the student to write in an answer.
+
+\newtopic The \texttt{solutions} environment has an optional parameter for
+inserting a vertical space.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{exercise}
+This is the question.
+\begin{solution}[1in] % <-- optional vertical skip
+This is the solution.
+\end{solution}
+\end{exercise}
+\end{Verbatim}
+
+\noindent This vertical space only appears when the
+\texttt{\hyperref[sss:nosolutions] {nosolutions}} option is in
+effect.
+
+Within the context of test construction, write the test (including
+the solutions), then publish it with the \texttt{nosolutions}
+option (leaving vertical spaces as appropriate), then publish the
+key with the \texttt{\hyperref[sss:solutionsafter]
+{solutionsafter}} option.\footnote{If \texttt{solutionsafter} and
+\texttt{nosolutions} both appear in the option list,
+\texttt{solutionsafter} overrides \texttt{nosolutions}.}
+
+\redpoint The optional parameter for the solution is ignored for
+exercises with parts having a tabular format
+(\hyperref[ex:tabular]{Example~\ref{ex:tabular}} is an example of
+a tabular multipart exercise).
+
+
+\subsubsection{Hiding some Solutions}\label{sss:hide}
+
+A subset of the solutions can be hidden by using the `\texttt{h}'
+option. This option is an option of the \texttt{exercise}
+environment, as well as an option of \cs{item}, when there is an
+exercise with parts. For example, the following code
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{exercise}[h] % <- hide solution
+Give an example of a set that is \textit{clopen}.
+\begin{solution}
+The real number line is both closed and open in the
+usual topology of the real line.
+\end{solution}
+\end{exercise}
+\end{Verbatim}
+\noindent
+yields the following exercise.
+
+\begin{exercise}[h] % <- hide solution
+Give an example of a set that is \textit{clopen}.
+\begin{solution}
+The real number line is both closed and open in the
+usual topology of the real line.
+\end{solution}
+\end{exercise}
+
+Notice that there is no hypertext link to the solution; indeed,
+the solution was not even written to the \cs{jobname.sol} file.
+
+The `\texttt{h}' option works with exercises with parts as well.
+Just apply the `\texttt{h}' option to the \cs{item}:
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{exercise*}
+A particle has position $s=t^2 - 5t + 1$ at time $t$.
+\begin{parts}
+
+\item Find the velocity, $v$, at time $t$.
+\begin{solution}
+$v = 2t-5$.
+\end{solution}
+
+% This solution will not be included in the solutions
+% section at the end of the document.
+\item[h] Find the acceleration, $a$, at time $t$.
+\begin{solution}
+$a = 2$.
+\end{solution}
+\end{parts}
+\end{exercise*}
+\end{Verbatim}
+
+\noindent The results of this code follow:
+
+\begin{exercise*}
+A particle has position $s=t^2 - 5t + 1$ at time $t$.
+\begin{parts}
+
+\item Find the velocity, $v$, at time $t$.
+\begin{solution}
+$v = 2t-5$.
+\end{solution}
+
+\item[h] Find the acceleration, $a$, at time $t$.
+\begin{solution}
+$a = 2$.
+\end{solution}
+\end{parts}
+\end{exercise*}
+
+Part (a) is hypertext linked to its solution, whereas part (b) is
+blue, indicating there is no link there.
+
+\redpoint Multipart exercises in the tabular format behave the same way; use
+\cs{item[h]} to ``hide'' a solution.
+
+\redpoint There is also an `\texttt{H}' option as well. Specifying
+`\texttt{H}' also hides the solutions. See the next two sections for a discussion
+of revealing the solutions marked by either `\texttt{h}' or `\texttt{H}' to understand
+the distinction between the two.
+
+
+\subsubsection{The \texttt{nohiddensolutions} Option}\label{sss:nohideopt}
+
+Hidden solutions can be included in the document by either
+removing the `\texttt{h}' option everywhere and re-\LaTeX ing, or
+by simply using the \texttt{nohiddensolutions} of
+\textsf{exerquiz}.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[nohiddensolutions]{exerquiz}
+\end{Verbatim}
+
+\noindent This option overrides the local `\texttt{h}' option throughout the
+document.
+
+\redpoint When the \texttt{solutionsafter} option of \textsf{exerquiz} is invoked,
+the hidden solutions are also revealed. To keep the solutions hidden, in this case,
+you should use `\texttt{H}' option instead of `\texttt{h}'. See the next section.
+
+\subsubsection{The \texttt{noHiddensolutions} Option}\label{sss:noHideopt}
+
+In addition to the `\texttt{h}', you can also use the `\texttt{H}'
+option with exercises. The solution will be hidden with
+`\texttt{H}', but will not be revealed when either the
+\texttt{nohiddensolutions} or the \texttt{solutionsafter}
+options are used.
+
+The `\texttt{H}' option can be overridden by using the
+\texttt{noHiddensolutions} of \textsf{exerquiz}.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[noHiddensolutions]{exerquiz}
+\end{Verbatim}
+This option overrides the `\texttt{H}' and `\texttt{h}' options throughout
+the document.
+
+\subsubsection{The \protect\texttt{exercise} environment Counter}\label{sss:eqexno}
+
+The counter for the \texttt{exercise} environment is \texttt{eqexno},
+and will number your exercises consecutively throughout the
+document. Should you want the counter to be reset after each
+\texttt{section}, place in the preamble of your document
+the following lines:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\makeatletter
+\@addtoreset{eqexno}{section}
+\makeatother
+\end{Verbatim}
+
+\subsubsection{The
+\texorpdfstring{\protect\texttt{nosolutions}}{nosolutions}
+Option}\label{sss:nosolutions}
+
+Some educators may initially want to post a series of exercises on the
+Web without the solutions. Then, at a later date, repost the
+exercises with the solutions included. For this application there
+is the \texttt{nosolutions} option for the \textsf{exerquiz}
+package.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage[pdftex]{web} % dvipsone, dvips or dvipdfm
+\usepackage[nosolutions]{exerquiz}
+\end{Verbatim}
+\noindent For this kind of application, it might make sense to publish the exercises
+with the \texttt{forpaper} option.
+
+
+\subsubsection{The
+\texorpdfstring{\texttt{solutions\-after}}{solutionsafter}
+Option}\label{sss:solutionsafter}
+
+For additional flexibility with how you want the solutions to the
+exercises presented, there is a \texttt{sol\-u\-tions\-af\-ter} option
+with \textsf{exerquiz}. Should you invoke this option,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage[dvipsone]{web} % dvips or pdftex
+\usepackage[solutionsafter]{exerquiz}
+\end{Verbatim}
+\noindent the solutions to the exercises appear just \emph{after} the
+exercise question. For example,
+
+\SolutionsAfter
+\begin{exercise}
+Let $V$ be a vector space, show that the zero vector, $\mathbf 0$, is
+unique.
+\begin{solution}
+Let $\mathbf 0'$ be a vector that satisfies the axiom of being a
+zero of the vector space $V$. We want to show $\mathbf 0=\mathbf
+0'$. Since $\mathbf 0$ is a zero, we have $\mathbf 0 + \mathbf 0'=\mathbf
+0'$. But we are assuming $\mathbf 0'$ is a zero vector as well,
+hence, $\mathbf 0' + \mathbf 0=\mathbf 0$. Finally,
+\[
+ \mathbf0' = \mathbf0 + \mathbf0' = \mathbf0' + \mathbf0 = \mathbf0
+\]
+and this completes the proof.
+\end{solution}
+\end{exercise}
+\SolutionsAtEnd
+
+As you can see in the above example, the word \textit{Solution:} is typeset
+at the beginning of the solutions. The command \Com{renameSolnAfterTo} can be used
+for conveniently changing the solution after label, for example,
+\verb!\renameSolnAfterTo{\textbf{Proof:}}! changes the label to \textbf{Proof:},
+and \verb!\renameSolnAfterTo{}! produces no label. These changes will be local
+to the group in which they are made, or global of there they are not made in a group.
+
+The command \cs{resetSolnAfterToDefault} sets the label text back to
+the default. The default label is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand{\eq@exsolafterDefault}{\textit{Solution}:}
+\end{Verbatim}
+
+
+\newtopic The option \texttt{solutionsafter} is global; all exercises are
+typeset this way---unless you change it within the document using
+the macros \cs{SolutionsAfter} and \cs{Solutions\-At\-End}. This
+manual was typeset without the \texttt{solutionsafter} option. The
+above example was typeset as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\SolutionsAfter % show solution following exercise
+\begin{exercise}
+Let $V$ be a vector space, show ...
+\begin{solution}
+............
+\end{solution}
+\end{exercise}
+\SolutionsAtEnd % turn back on solutions at end of document
+\end{Verbatim}
+
+\noindent Normally, a typical document might have all solutions at the end
+of the document (the default behavior), or all solutions following
+each exercise (\texttt{solutionsafter} option). Mixtures of these two
+types can be obtained by using the two commands
+\cs{Solutions\-After} and \cs{Solutions\-At\-End}.
+
+\newtopic This feature might be an easy way of typsetting examples. See the example
+in the section entitled \Nameref{sss:redesignex}.
+
+\redpoint The \texttt{solutionsafter} option has no effect on
+multipart exercises in \textit{tabular form}; I haven't been
+able to find a convenient way of displaying the solutions after
+the questions when the questions are in tabular form.\endredpoint
+
+%\exPDF{webeqtst} See the file \texttt{\href{\bUrl/webeq_ex.html\#webeqtst}{webeqtst.pdf}} for examples.
+
+\exAeBBlogPDF{p=803} See the file \texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}} from the {\AcroBlog}
+website for examples.
+
+
+\subsubsection{Moving the Solution Set}
+
+The solution set, by default, comes last in the file. You can
+move its positioning by including the command
+\cs{includeexersolutions} at any point \emph{after} the last
+exercise. You'll note that I have moved the solutions in this
+file \emph{before} the \nameref{references} section, as indicated, for
+example, by its position in the table of contents.
+
+
+\subsection{Redesigning the
+\texorpdfstring{\protect\texttt{exercise}}{exercise}
+Environment}\label{sss:redesignex}
+
+You can customize the \texttt{exercise} environment to suit your
+own needs. To customize, you need to change some or all of the
+following six commands. In the listing below, the \LaTeX{} definition
+of each follows a short description.
+\begin{questions}
+ \item \cs{exlabel}: This command expands to the name of the exercise label,
+ the default string is `Exercise'.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\exlabel{Exercise}
+\end{Verbatim}
+ \item \cs{exlabelformat}: Typesets the exercise
+ label; use it to introduce additional type style such as
+ boldface, italic, small caps, etc.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\exlabelformat{%
+ {\scshape\exlabel\ \theeqexno.}}
+\end{Verbatim}
+ \item \cs{exlabelsol}: Expands to the name of the exercise
+ label in the solutions section. Usually its value is the same
+ as \cs{exlabel}.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\exlabelsol{\exlabel}
+\end{Verbatim}
+ \item \cs{exsllabelformat}: The format of the solutions label,
+ \verb+\bfseries\exlabel+ is the default.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\exsllabelformat
+ {\noexpand\textbf{\exlabelsol\ \theeqexno.}}
+\end{Verbatim}
+ \item \cs{exrtnlabelformat}: This is the label you click on to
+ return from the solution of the exercise.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\exrtnlabelformat{\exlabelsol\ \theeqexno}
+\end{Verbatim}
+ \item \cs{exsectitle}: The section title of the solutions to
+ the exercises.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\exsectitle{Solutions to \exlabel s}
+\end{Verbatim}
+ \item \cs{exsecrunhead}: The running header for the solution
+ section for the exercises.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\exsecrunhead{\exsectitle}
+\end{Verbatim}
+\end{questions}
+
+\redpoint The counter \texttt{eqexno} is used to count exercises.
+When an \texttt{exercise} environment starts, this counter is
+incremented. The value of this counter is used in
+the definitions of \cs{exlabelformat}, \cs{exsllabelformat} and
+\cs{exrtnlabelformat}. Still, the use of \texttt{eqexno} is
+optional; for example, you might want to state a problem just as `Special
+Exercise', without an associated exercise number.
+
+Below is an example of redefining the \texttt{exercise}
+environment. We define a \texttt{problem} environment based on
+the \texttt{exercise} environment.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newenvironment{problem}{%
+\renewcommand\exlabel{Problem}
+\renewcommand\exlabelformat{\textbf{\exlabel\ \theeqexno.}}
+\renewcommand\exsllabelformat
+ {\noexpand\textbf{\exlabel\ \theeqexno}}
+\renewcommand\exrtnlabelformat{$\blacktriangleleft$}
+\renewcommand\exsecrunhead{\exsectitle}
+\begin{exercise}}{\end{exercise}}
+\end{Verbatim}
+
+\newenvironment{problem}{%
+\renewcommand\exlabel{Problem}
+\renewcommand\exlabelformat{\textbf{\exlabel\ \theeqexno.}}
+\renewcommand\exsllabelformat
+ {\noexpand\textbf{\exlabel\ \theeqexno.}}
+\renewcommand\exrtnlabelformat{$\blacktriangleleft$}
+\renewcommand\exsecrunhead{Solutions to Problems}
+\begin{exercise}}%
+{\end{exercise}}
+
+\noindent See any standard \LaTeX{} reference on how to define a new
+environment, for example \cite{book:Goossens1}.
+
+\newtopic Here is an example of the new \texttt{problem} environment:\medskip
+
+\begin{problem}
+This is a question.
+\begin{solution}
+This is the solution.
+\end{solution}
+\end{problem}
+
+\noindent
+The code for this problem was simply:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{problem}
+This is a question.
+\begin{solution}
+This is the solution.
+\end{solution}
+\end{problem}
+\end{Verbatim}
+
+\redpoint Two of these commands, \cs{exsllabelformat} and
+\cs{exrtnlabelformat}, must be handled with special care. Formatting such
+as \cs{textbf} or \cs{scseries} must be preceded by a \cs{noexpand}. These
+commands are written to a file, and must be prevented from expanding.
+
+When you use the \texttt{exercise} environment, the counter
+\texttt{eqexno} is automatically incremented by default. The
+\texttt{exercise} does have an optional argument for inserting
+your own counter.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{exercise}[!ameta(ctr)]
+.......................
+\end{exercise}
+\end{Verbatim}
+\noindent Where \ameta{ctr} is a counter already defined. This option is
+useful if you want to use the \texttt{exercise} environment to
+create a new environment with its own numbering scheme, as the
+following example illustrates.
+
+This example demonstrates how to define an \texttt{example}
+environment with its own counter. For examples, we don't want the
+solutions to appear at the end of the file, so we'll use
+the commands \cs{SolutionsAfter} and \cs{SolutionsAtEnd}. All changes are
+local.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+% put a counter in preamble
+\newcounter{exampleno}
+\newenvironment{example}{%
+\renewcommand\exlabel{Example}
+\renewcommand\exlabelformat
+ {\textbf{\exlabel\ \theexampleno.}}
+\renewcommand\exrtnlabelformat{$\square$}
+\SolutionsAfter
+\begin{exercise}[exampleno]}%
+{\end{exercise}
+\SolutionsAtEnd}
+\end{Verbatim}
+
+
+\newcounter{exampleno}
+\newenvironment{example}{%
+\renewcommand\exlabel{Example}
+\renewcommand\exlabelformat{\textbf{\exlabel\ \theexampleno.}}
+\renewcommand\exrtnlabelformat{$\square$}
+\SolutionsAfter
+\begin{exercise}[exampleno]}%
+{\end{exercise}
+\SolutionsAtEnd}
+
+\noindent Now we simply type
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{example}
+What is $2+2$?
+\begin{solution}
+It is well known that $2+2=4$.
+\end{solution}
+\end{example}
+\end{Verbatim}
+\newtopic to obtain
+
+\begin{example}
+What is $2+2$?
+\begin{solution}
+It is well known that $2+2=4$.
+\end{solution}
+\end{example}
+
+\noindent The changes are local to the new \texttt{example} environment. If
+we have another exercise, we get a correctly numbered exercise.
+
+
+\begin{exercise}
+What is $2+2$?
+\begin{solution}
+It is well known that $2+2=4$.
+\end{solution}
+\end{exercise}
+
+\redpoint The command \cs{exsolafter} typesets the solution label
+to the exercise in the case the \texttt{solutionsafter} option is in effect.
+The default definition of \cs{exsolafter} is `\verb+\textit{Solution}:+'.
+You can redefine it as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\exsolafter{\textit{L\"osung}:}
+\end{Verbatim}
+\noindent The command \cs{renameSolnAfterTo} is a convenience macro for changing this label.
+We can redefine the label above like so:
+This redefinition yields:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renameSolnAfterTo{\textit{L\"osung}:}
+\end{Verbatim}
+
+\renewenvironment{example}{%
+\renewcommand\exlabel{Example}
+\renewcommand\exsolafter{\textit{L\"osung}:}
+\renewcommand\exlabelformat{\textbf{\exlabel\ \theexampleno. }}
+\renewcommand\exrtnlabelformat{$\square$}
+\SolutionsAfter
+\begin{exercise}[exampleno]}%
+{\end{exercise}
+\SolutionsAtEnd}
+
+\begin{example}
+What is $2+2$?
+\begin{solution}
+It is well known that $2+2=4$.
+\end{solution}
+\end{example}
+
+\redpoint There is a special option to the \texttt{exercise}
+environment as well,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{exercise}[0]
+.......................
+\end{exercise}
+\end{Verbatim}
+When the optional argument is \texttt{0} rather than a counter. In
+this case, no counter is associated with the environment. For
+example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newenvironment{project}{%
+\renewcommand\exlabel{Project}
+\renewcommand\exlabelformat{\textbf{\exlabel. }}
+\renewcommand\exsllabelformat
+ {\noexpand\textbf{\exlabel\ Hint:}}
+\renewcommand\exrtnlabelformat{$\blacktriangleleft$}
+\begin{exercise}[0]}%
+{\end{exercise}}
+\end{Verbatim}
+
+\newenvironment{project}{%
+\renewcommand\exlabel{Project}
+\renewcommand\exlabelformat{\textbf{\exlabel. }}
+\renewcommand\exsllabelformat
+ {\noexpand\textbf{\exlabel\ Hint:}}
+\renewcommand\exrtnlabelformat{$\blacktriangleleft$}
+\renewcommand\exsecrunhead{Hints to Projects}
+\begin{exercise}[0]}%
+{\end{exercise}}
+
+\noindent Thus, we obtain,
+
+\begin{project}
+Find a shorter proof of \textsf{Fermat's Last Theorem}. Do not
+look at the project hints until you have finished the
+project.
+\begin{solution}
+There, you didn't need my help after all.
+\end{solution}
+\end{project}
+
+\noindent The code:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{project}
+Find a shorter proof of \textsf{Fermat's Last Theorem}. Do not
+look at the project hints until you have finished the project.
+\begin{solution}
+There, you didn't need my help after all.
+\end{solution}
+\end{project}
+\end{Verbatim}
+
+\noindent Note that the solutions are typeset at the end of the file in the
+`Solutions to Exercises' section. At this time, there is no
+feature for sorting out these different types of environments;
+they are all \texttt{exercise} environments, which is what they are.
+
+\section{The \texttt{shortquiz} Environment}\label{ss:QuizIR}
+
+The \texttt{shortquiz} environment is used to create multiple
+choice question and math/text fill-in questions with immediate
+response. The discussion of math and text fill-in questions is
+post-phoned to \hyperref[s:oQ]{Section~\ref*{s:oQ}}, entitled
+\nameref{s:oQ}. The environment allows redefinition to customize
+the look of your quizzes. (See
+\mlNameref{sss:redefinesq}.)
+
+% The presentation of the answers will either be in a \texttt{list}
+% or a \texttt{tabular} environment, depending on the parameter
+% \texttt{num\_cols}. (A \texttt{list} is used if \texttt{num\_col}
+% is set to~1.)
+
+\subsection{Basic Usage}\label{BasicUsage}
+
+The syntax for the environment (\texttt{tabular} version) is as
+follows:
+
+\def\T#1{\makebox[0pt][l]{\hspace*{200pt}\% #1}}
+\def\1{\T{begin shortquiz}}
+\def\2{\T{begin proposed answers}}
+\def\3{\T{a wrong answer}}
+\def\4{\T{the right answer}}
+\def\5{\T{end listing of answers}}
+\def\6{\T{end shortquiz}}
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+!1\begin{shortquiz}[!meta(base_name)]
+...Question goes here...
+!2\begin{answers}{!meta(num_cols)}
+...
+!3\Ans0 !anglemeta(an incorrect answer) &
+...
+!4\Ans1 !anglemeta(a correct answer) &
+...
+!5\end{answers}
+!6\end{shortquiz}
+\end{Verbatim}
+The optional \meta{base\_name} is used to build names of the form fields associated with
+this quiz; if one is not provided, a \meta{base\_name} is automatically created. The name
+must be unique to the entire document.
+
+The parameter \meta{num\_cols} is the number of
+columns you want to typeset for your multiple choice responses. The
+environment sets up a \texttt{tabular} environment if
+\meta{num\_cols} is greater than~1, and a \texttt{list}
+environment if \texttt{num\_cols} is~1.
+
+This type of quiz is suitable for asking a short series of
+question of the reader, perhaps after explaining some concept.
+Quizzes can be used to direct the reader's attention to an
+important point.
+
+\redpoint Here is an example of the \texttt{shortquiz}
+environment. Responses are graded without comment using
+JavaScript.
+
+\begin{shortquiz}
+Which of the following is the $\dfrac{d}{dx}{\sin(x^3)}$?
+\begin{answers}{4}
+\Ans0 $\sin(3x^2)$ & \Ans0 $\cos(x^3)$ & \Ans1 $3x^2\cos(x^3)$ &
+\Ans0 $3x^2\cos(3x^2)$ \\
+\end{answers}
+\end{shortquiz}
+
+\noindent The verbatim listing follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{shortquiz} % begin shortquiz environment
+Which of the following is the $\dfrac{d}{dx}{\sin(x^3)}$?
+\begin{answers}{4} % 4 columns of answers
+ \Ans0 $\sin(3x^2)$ & % \Ans0 is a false answer
+ \Ans0 $\cos(x^3)$ &
+ \Ans1 $3x^2\cos(x^3)$ & % \Ans1 is the correct answer
+ \Ans0 $3x^2\cos(3x^2)$
+\end{answers} % end answers environment
+\end{shortquiz} % end shortquiz environment
+\end{Verbatim}
+If \texttt{num\_cols} is greater than 1, the
+\texttt{answers} sets up a \texttt{tabular} environment,
+\texttt{p\darg{\meta{width}}} to sets up the column widths. The \cs{parbox}es are
+typeset ragged right.
+
+
+\redpoint Below is a two-column example in which the posed
+alternatives are rather long. The \texttt{answers} environment
+produces is a nicely aligned set of paragraphs.
+
+\goodbreak
+\begin{shortquiz}
+Which of the following best describes Augustin Cauchy?
+\begin{answers}{2}
+\Ans0 He developed the Calculus while his University was closed
+for the plague. & % Newton
+\Ans0 Given credit for first using the functional notation
+$f(x)$.\\ % Euler
+\Ans0 He created the ``bell-shaped curve'' and first used the
+method of
+least squares. & % Guass
+\Ans1 He first formulated a precise
+definition of the limit and continuity of a function. \\ % Cauchy
+\Ans0 Gave a rigorous definition of the definite integral---an
+integral
+that now bears his name. & % Riemann
+\Ans0 His notation for the derivative and the integral is used
+even to this day. % Leibniz
+\end{answers}
+\end{shortquiz}
+
+\noindent Here is the same example in which the \texttt{num\_cols} is set
+to~1; in this case, a \texttt{list} environment is used.
+
+\begin{shortquiz}
+Which of the following best describes Augustin Cauchy?
+\begin{answers}{1}
+\Ans0 He developed the Calculus while his University was closed
+for the plague. % Newton
+\Ans0 Given credit for first using the functional notation
+$f(x)$. % Euler
+\Ans0 He created the ``bell-shaped curve'' and first used the
+method of
+least squares. % Guass
+\Ans1 He first formulated a precise
+definition of the limit and continuity of a function. % Cauchy
+\Ans0 Gave a rigorous definition of the definite integral---an
+integral
+that now bears his name. % Riemann
+\Ans0 His notation for the derivative and the integral is used
+even to this day. % Leibniz
+\end{answers}
+\end{shortquiz}
+
+%\exPDF{webeqtst} See the sample file
+%\texttt{\href{\bUrl/webeq_ex.html\#webeqtst} {webeqtst.tex}} for
+%examples.
+
+\exAeBBlogPDF{p=803} See the file \texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}} from the {\AcroBlog}
+website for examples.
+
+
+\newtopic\indent The space between the label and the text of a multiple
+choice question change be adjusted using two commands,
+\Com{setMClabelsep} and \Com{resetMClabelsep}. The default
+horizontal space between the label and text is a hard space `\verb!\ !'.
+The first command takes as its argument
+anything that creates a horizontal white space, for example,
+\verb!\setMClabelsep{\quad}! or \verb!\setMClabelsep{\kern20pt}!. If
+\cs{setMClabelsep} is set in a group, its value will revert to the
+default on exit from the group. The second command
+\cs{resetMClabelsep} resets the space back to its default `\verb!\ !'.
+
+The space above the beginning of the \texttt{answer} environment can be
+adjusted using the length \Com{aboveanswersSkip}. The default value for
+this is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\setlength\aboveanswersSkip{3pt}
+\end{Verbatim}
+and this can be reset to any desired vertical skip.
+
+
+\subsubsection{\texttt{shortquiz} with Radio Buttons}\label{sqwRadio}
+
+The short quizzes (with multiple choices) can also be laid out using
+radio buttons rather than typeset lettering. Use a
+\texttt{shortquiz*} environment, with an optional argument the value
+of which is a unique name (which will be used to construct the
+titles of the radio buttons).\footnote{In previous versions of \textsf{exerquiz}, there was a
+\texttt*-option that was use to signal the use of radio buttons. This option is still
+available, but the shortquiz* environment is preferred.} If you do not provide an optional
+argument name, one will programmatically be provided for you.
+
+\newtopic For example, the following code
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{shortquiz*}[KublaKhan1]
+Was it in Xanadu did Kubla Kahn a stately pleasure dome decree?
+\begin{answers}{4}
+\Ans1 True & \Ans0 False
+\end{answers}
+\end{shortquiz*}
+\end{Verbatim}
+\noindent yields the following question:
+
+\begin{shortquiz*}[KublaKhan2]
+Was it in Xanadu did Kubla Kahn a stately pleasure dome decree?
+\begin{answers}{4}
+\Ans1 True & \Ans0 False
+\end{answers}
+\end{shortquiz*}
+\noindent Check the functionality of this question, and contrast it with
+the same question.
+
+\sqTurnOffAlerts \sqCorrections
+
+\begin{shortquiz*}[KublaKhan3]
+Was it in Xanadu did Kubla Kahn a stately pleasure dome decree?
+\begin{answers}{4}
+\Ans1 True & \Ans0 False
+\end{answers}
+\end{shortquiz*}
+\noindent We have inserted two new commands prior to this last
+short quiz \cs{sqTurnOffAlerts} and \cs{sqCorrections} to change
+response feedback. The former turns off the alerts and the latter
+turns on the corrections: check for a correct answer and an cross
+for an incorrect answer. (It doesn't make sense to
+\cs{sqTurnOffAlerts} without \cs{sqCorrections};
+\cs{sqCorrections} can be used without turning off the alerts.)
+
+\redpoint These two commands only apply to a short quiz that uses radio buttons.
+You can reverse these two commands with \cs{sqTurnOnAlerts} and
+\cs{sqNoCorrections}, respectively. These settings are the
+defaults of the \texttt{shortquiz} with check boxes.
+
+\subsubsection{\texttt{shortquiz} with Solutions}\label{ss:QuizS}
+
+Another type of quiz that is easy to implement in PDF is the
+multiple choice quiz with immediate response with solution given.
+This too is a \texttt{shortquiz} environment:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{shortquiz}
+...Question goes here...
+\begin{answers}!anglemeta(dest){!meta(num_cols)}
+...
+\Ans0 !anglemeta(an incorrect answer) &
+...
+\Ans1 !anglemeta(a correct answer) &
+...
+\end{answers}
+\begin{solution}
+ !anglemeta(solution to correct answer)
+\end{solution}
+\end{shortquiz}
+\end{Verbatim}
+
+\newtopic The \anglemeta{name} takes on two forms, in either case, it is used to create a hypertext jump to
+the solution. The first form of \anglemeta{name} is an explicit named
+definition `\texttt{[\meta{named\_dest}]}', where \meta{named\_dest} is a
+word selected by the document author for a ``named destination.'' The other
+form is the star-form `\texttt{*}', when the star-form is used,
+\textsf{exerquiz} automatically generates the name. Use the
+`[\meta{named\_dest}]' form when you want to refer to a solution in another
+part of the document; otherwise, use `\texttt{*}' for convenience.
+
+\newtopic As before, \meta{num\_cols} is the number of columns to
+typeset the answers in.
+
+\newtopic The following example illustrates the quiz with
+solution.
+
+%\renewcommand\sqslrtnlabel{\string\raisebox{1pt}{$\blacktriangleleft$}Return to Quiz}
+
+\begin{shortquiz}
+Define a function $f(s)=4s^3$ and another function
+$F(t)=t^4$. Is $F$ an antiderivative of $f$?
+\begin{answers}[quiz:anti]{4}
+\Ans1 Yes &\Ans0 No
+\end{answers}
+\begin{solution}
+The answer is `Yes'. The definition requires that
+\[
+ F'(x) = f(x) \quad\text{for all $x$,}
+\]
+well, let's check it out.
+
+The definition of $f$ is $f(s)=4s^3$ and so $f(x)=4x^3$.
+The definition of $F$ is $F(t)=t^4$ and so, by the rules of
+differentiation, $F'(t)=4t^3$. Thus, $F'(x)=4x^3$. Therefore,
+\[
+ F'(x) = 4x^3 = f(x)\quad\text{for all $x$,}
+\]
+as required by the definition.
+\end{solution}
+\end{shortquiz}
+
+\newtopic The verbatim listing that uses the explicit form of the destination, shown
+in bold font.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{shortquiz}
+Define a function $f(s)=4s^3$ and another
+function $F(t)=t^4$. Is $F$ an antiderivative of $f$?
+\begin{answers}!textbf([quiz:anti]){4}
+\Ans1 Yes &\Ans0 No
+\end{answers}
+...solution not shown...
+\end{solution}
+\end{shortquiz}
+\end{Verbatim}
+
+\newtopic Here is a listing of the same quiz using the \texttt{*} to
+automatically assign a destination label.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{shortquiz}
+Define a function $f(s)=4s^3$ and another
+function $F(t)=t^4$. Is $F$ an antiderivative of $f$?
+\begin{answers}!textbf(*){4}
+\Ans1 Yes &\Ans0 No
+\end{answers}
+...solution not shown...
+\end{solution}
+\end{shortquiz}
+\end{Verbatim}
+
+
+
+\subsubsection{The \texorpdfstring{\protect\cs{bChoices}/\-\protect\cs{eChoices}}
+ {\textbackslash bChoices/\textbackslash eChoices} Commands}\label{bChoices}
+
+
+Beginning with \textsf{exerquiz} version~6.03, the command pair
+\cs{bChoices} and \cs{eChoices} are defined to help lay out
+the list of choices for a multiple choice question. This pair of
+macros is not really an environment, the \cs{eChoices} really
+does nothing other than to act as an ending marker. The idea
+behind this pair of macros is twofold:
+\begin{questions}
+
+\item To provide a convenient way of listing alternate choices for
+a multiple choice questions, the ``environment'' makes it easy to
+change the number of columns, or to change from tabular to list
+(or visa-versa);
+
+\item To lay out the alternatives in a uniform manner, which will
+make it easy to develop techniques of randomizing the
+alternatives.
+
+\end{questions}
+Here is an example of usage:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{answers}{4} %<- 4 columns
+\bChoices[2] %<- use only first 2 columns
+ \Ans0 a choice\eAns %<- choices delimited by
+ \Ans1 another choice\eAns % \Ans...\eAns
+ \Ans0 still another choice\eAns
+ \Ans0 another\eAns
+ \Ans0 incoming\eAns
+ \Ans0 more choices\eAns
+ \Ans0 another still\eAns
+ \Ans0 too many\eAns
+ \Ans0 choices\eAns
+\eChoices
+\end{answers}
+\end{Verbatim}
+\noindent Note that the choices begin with the \cs{Ans} macro
+followed by a 0 or 1, as described in the previous pages. The
+end of the choice is delimited by the \cs{eAns} command (which is
+undefined, but is used as a argument delimiter). Note that it is
+not necessary (and would be a mistake) to place the column
+delimiter~`\texttt\&', or the end of line
+command~`\texttt{\string\\}', this is done by the \cs{bChoices}
+command.
+
+The commands \cs{bChoices} and \cs{eChoices} can be used within
+the \texttt{answers} environment as part of a \texttt{shortquiz} or a
+\texttt{\hyperref[ss:GradedQuizzes]{quiz}} environment.
+
+Concerning the example above, the argument of the \texttt{answers}
+environment is 4 which means we are going to use the tabular
+environment with 4 columns. Now within those 4 columns we are
+going to only use the first 2 columns (this is the optional
+argument of \cs{bChoices}). If the optional argument is removed
+from \cs{bChoices}, the choices are typeset in the with 4
+columns.
+
+If the argument of \texttt{answers} or \texttt{manswers} is changed to 1, the
+optional argument of \cs{bChoices} is ignored, and the
+alternatives are typeset in a one column list environment.
+
+By changing the two parameters (the one for \cs{answers} and the
+one for \cs{bChoices}) you can easily modify how the
+alternatives are typeset.
+
+\redpoint \cs{rowsep}: Space between rows (or items in list environment)
+can be adjusted with the \cs{rowsep} command. If you
+say \verb+\rowsep{3pt}+, an additional \texttt{3pt} space is added
+between rows or items in a list environment. The default is \texttt{0pt}. The default is
+controlled through the command \cs{rowsepDefault}, like so,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\rowsepDefault{0pt}
+\end{Verbatim}
+\noindent For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{answers}{4}
+\rowsep{3pt}
+\bChoices[2]
+ \Ans0 a choice\eAns
+ \Ans1 another choice\eAns
+ \Ans0 still another choice\eAns
+ \Ans0 another\eAns
+ \Ans0 incoming\eAns
+\eChoices
+\end{answers}
+\end{Verbatim}
+\noindent Do not place this command inside the
+\cs{bChoices}/\cs{eChoices} pair, the above example shows
+the optimal placement, just before \cs{bChoices}. This
+separation {\cs{rowsep}} is reset to the default at the end of the
+listing. To get a uniform separation between rows across the
+document, redefine \cs{rowsepDefault} in the preamble, like so,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\rowsepDefault{3pt}
+\end{Verbatim}
+
+
+\redpoint No commands should appear \textit{between} the pair
+\cs{bChoices} and \cs{eChoices} and \textit{outside} an
+\cs{Ans} and \cs{eAns} pair. All such tokens are gobbled up.
+
+\newtopic\textcolor{red}{Limitations:} The command \cs{eAns} acts as
+a macro parameter delimiter: Everything between \cs{Ans} and \cs{eAns}
+is taken in as the argument of a macro; therefore, verbatim content
+generated by \cs{verb} is not permitted by {\LaTeX}. If you want
+your choices to contain verbatim text, use the style as described in
+\Nameref{BasicUsage}.
+
+\subsubsection{The
+\texorpdfstring{\protect\texttt{questions}}{questions} Environment}
+
+The \texttt{questions} environment was designed to work with the
+\texttt{quiz} environment---taken up in
+\hyperref[ss:GradedQuizzes]{Section~\ref*{ss:GradedQuizzes}}
+below---but it works equally well with \texttt{shortquiz}.
+
+Using the \texttt{questions} environment, quizzes defined by
+\texttt{shortquiz}, with/without solutions, can be
+mixed together and combined to make a ``mini-quiz''. For example,
+
+\begin{shortquiz} Determine the LCD for each of the following.
+\begin{questions}
+\item $\dfrac{3x}{2y^2z^3}-\dfrac2{xy^3 z^2}$.
+\begin{answers}{2}
+\bChoices
+ \Ans0 $\text{LCD}=2xy^5z^5$\eAns
+ \Ans0 $\text{LCD}=2y^3 z^3$\eAns
+ \Ans1 $\text{LCD}=2x y^3 z^3$\eAns
+ \Ans0 $\text{LCD}=2 x y^3 z^5$\eAns
+\eChoices
+\end{answers}
+\item $\dfrac{x+y}{3 x^{3/2}y^2}-\dfrac{x^2+y^2}{6 x y^4}$.
+\begin{answers}[quiz:LCB]{2}
+\bChoices
+ \Ans0 $\text{LCD}=18 x^{3/2}y^4$\eAns
+ \Ans1 $\text{LCD}=6x^{3/2}y^4$\eAns
+ \Ans0 $\text{LCD}=18 x y^4$\eAns
+ \Ans0 $\text{LCD}=6 x y^4$\eAns
+\eChoices
+\end{answers}
+\begin{solution}
+If you erred on this one, more than likely it was on the
+appropriate multiplicative constant: 6 not 18. At least
+that's what I'm betting on.
+
+The instructions of the LCD Algorithm said to \textit{completely
+factor the denominator}. Here's a list of the factors
+\[\def\us#1#2{\underbrace{#2}_{\text{#1 term}}}
+ \us{first}{3, x^{3/2}, y^2}\,,\,\us{second}{2, 3, x, y^4}
+\]
+Let's rearrange them
+\[
+ 2, 3, 3, x, x^{3/2}, y^2, y^4
+\]
+Now drop duplicate factors---that's the 3. Oops! I did mention
+dropping identical factors, didn't I?
+\[
+ 2, 3, x, x^{3/2}, y^2, y^4
+\]
+Now, group together all terms which have the same base, then drop,
+from each of these groups all terms but the one with the highest
+power. We obtain then,
+\[
+ 2, 3, x^{3/2}, y^4
+\]
+The LCD is the product of same:
+\[
+ \text{LCD}=(2)(3) x^{3/2} y^4 = 6 x^{3/2} y^4.
+\]
+{\it Solution Notes\/}: Alternative (a) will work as a common
+denominator, but it is not the least common denominator. If you
+use (a), you will be working with larger numbers than is really
+necessary.
+\end{solution}
+\end{questions}
+\end{shortquiz}
+
+\noindent The first question is given without a solution, the second has a
+solution attached to it. An abbreviated verbatim listing follows.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{shortquiz}
+Determine the LCD for each of the following.
+\begin{questions}
+\item $\dfrac{3x}{2y^2z^3}-\dfrac2{xy^3 z^2}$.
+\begin{answers}{2}
+...
+\end{answers}
+\item $\dfrac{x+y}{3 x^{3/2}y^2}
+ -\dfrac{x^2+y^2}{6 x y^4}$.
+\begin{answers}[quiz:LCB]{2}
+...
+\end{answers}
+\begin{solution}
+If you erred on this one, ... ...
+\end{solution}
+\end{questions}
+\end{shortquiz}
+\end{Verbatim}
+
+\Important The questions environment can be nested three deep.
+
+\newtopic Between items, you can say \Com{pushquestions}, make a comment, to continue
+with more questions, type \Com{popquestions}. Here is an example without using \texttt{shortquiz} environment.
+
+\begin{questions}
+ \item This is my first question.
+ \item This is my second question.
+\pushquestions
+We now begin a multipart question.
+\popquestions
+ \item Answer each of the following:
+ \begin{questions}
+ \item First part of the question.
+\pushquestions
+Be sure to concentrate on this next question, its a hard one; recall that $1+1=2$.
+\popquestions
+ \item Second part of the question.
+ \begin{questions}
+ \item This is a subpart of this part.
+\pushquestions
+The questions environment can be nested up to three deep.
+\popquestions
+ \item This is a second subpart of this part.
+ \end{questions}
+ \end{questions}
+ \item This is the fourth question.
+\end{questions}
+The color of the item labels is set by the command \cs{quesNumColor}. The command take one
+argument, a named color. The default is \verb!\quesNumColor{blue}!.
+
+
+\newtopic A partial listing of the above environment is presented below.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{questions}
+ \item This is my first question.
+ \item This is my second question.
+\pushquestions
+We now begin a multipart question.
+\popquestions
+ \item Answer each of the following:
+...
+\end{questions}
+\end{Verbatim}
+
+\subsection{Options of the \texttt{shortquiz} Environment}\label{sq:opts}
+
+\subsubsection{The
+\texorpdfstring{\protect\texttt{forpaper}}{forpaper} Option}
+
+The \texttt{forpaper} option has already been described. The
+solutions to \texttt{short\-quiz} questions are not typeset on
+separate pages, but are separated by a \cs{medskip}.
+
+Following up on the pre-test angle discussed in
+``\mlnameref{sss:redefinesq}'', page~\pageref*{sss:redefinesq}, a single
+document can be constructed that can be published on-line, or
+published for paper distribution. This feature may be useful to
+some educators.
+
+
+
+\subsubsection{The \texttt{solutionsafter} Option}
+
+The \texttt{solutionsafter} option works as described for the
+\texttt{exercise} environment. The option just sets a Boolean
+switch. This switch can be controlled with
+\cs{Solutions\-After} and \cs{SolutionsAtEnd}. Here is a simple
+example.
+
+\SolutionsAfter
+\begin{shortquiz}
+In what year did Columbus sail the ocean blue?
+\begin{answers}[qz:columbus2]{4}
+\Ans0 1490 &\Ans0 1491 &\Ans1 1492 &\Ans0 1493
+\end{answers}
+\begin{solution}
+Columbus sailed the ocean blue in 1492. Some say he discovered
+San Salvatore, others say he first sited Cat Island in the
+Bahamas.
+\end{solution}
+\end{shortquiz}
+\SolutionsAtEnd
+In the example above, \cs{SolutionsAfter} was placed before the \texttt{shortquiz} environment and
+the \cs{SolutionsAtEnd} was placed just after.
+
+This option may be useful in publishing an answer key to a multiple
+choice quiz. The quiz and solutions can be created together. The
+quiz can be published, then later, the quiz with complete
+solutions.
+
+
+\subsubsection{The \texorpdfstring{\texttt{proof\-ing}}{proofing}
+Option}\label{sss:proofing}
+
+For proofreading, use the \texttt{proofing} option of
+\textsf{exerquiz}.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[proofing]{exerquiz}
+\end{Verbatim}
+
+\noindent When used, a symbol, defined by the command \cs{proofingsymbol},
+will mark the correct answers, as defined in your source file. The
+command \cs{proofingsymbol} may be redefined, its definition is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\proofingsymbol{\textcolor{webgreen}{$\bullet$}}
+\end{Verbatim}
+\noindent
+This option works for the
+\texttt{\hyperref[ss:GradedQuizzes]{quiz}} environment defined
+below
+(\hyperref[ss:GradedQuizzes]{page~\pageref*{ss:GradedQuizzes}}),
+as well.
+
+\subsubsection{The \texttt{showgrayletters} Option}\label{showgraylettersOpt} \aebCng[showgrayletters]
+
+When \texttt{showgrayletters} is used, the form field check boxes
+that appear in a \texttt{quiz} or in a \texttt{shortquiz} will have a gray capital letter
+\texttt{A}, \texttt{B}, \texttt{C}, etc. underneath it. This letter
+can then be referred to in the text or the solution.
+
+This option is global and is controlled by a switch, \cs{ifaebshowgrayletters}. The gray letter feature can be turned on
+and off locally: To turn on this feature, insert the command \Com{graylettersOn} at some appropriately chosen point in
+the document; to turn off the gray letter feature insert \Com{graylettersOff}.
+
+\newtopic In support of the \texttt{showgrayletters} option is a new command \Com{REF}.
+\cs{REF} acts like the {\LaTeX} command \cs{ref} with the hyperref modifications, but it converts
+the reference to uppercase. When \cs{ref} would typeset the letter `a', for example, \cs{REF}
+would typeset the letter `A'. \cs{REF}, like \cs{ref}, typesets a hyperref link. Hyperref defines a
+\texttt{*} version of \cs{ref}; \cs{ref*} typesets the reference, but does not create a link;
+\cs{REF*} does the same. When \cs{aebshowgraylettersfalse} is in effect, \cs{REF} does not capitalize
+the reference.
+
+The \texttt{showgrayletters} feature and the \cs{REF} command work equally
+well for the \texttt{quiz} environment.
+
+\redpoint Below is an example of this.
+
+\graylettersOn
+
+\begin{shortquiz*}[TestSQ]
+Answer this if you can!
+\begin{answers}{2}
+\bChoices
+ \Ans0\label{testsqFirst} This is a possible answer.\eAns
+
+ \Ans1\label{testsqSecond} Try this one (the correct one)\eAns
+
+ \Ans0 This is an answer.\eAns
+
+ \Ans0 Another alternative.\eAns
+\eChoices
+\end{answers}
+\end{shortquiz*}
+
+\noindent Reference both (\REF{testsqFirst}) and (\REF*{testsqSecond}).
+
+\graylettersOff
+
+\newtopic The code is
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\graylettersOn
+\begin{shortquiz*}[TestSQ]
+Answer this if you can!
+\begin{answers}{2}
+\bChoices
+ \Ans0\label{testsqFirst} This is a possible answer.\eAns
+ \Ans1\label{testsqSecond} Try this one (the correct one).\eAns
+ \Ans0 This is an answer.\eAns
+ \Ans0 Another alternative.\eAns
+\eChoices
+\end{answers}
+\end{shortquiz*}
+\noindent Reference both (\REF{testsqFirst}) and (\REF*{testsqSecond}).
+\graylettersOff
+\end{Verbatim}
+\newtopic Notice that the gray letters was not turned to off
+until after the usage of \cs{REF}.
+
+\textcolor{red}{\Important} The gray letters are typeset into the document. Do not
+use a background color for the checkboxes as this color will cover
+up the gray letters. The default background color checkboxes is
+transparent, keep it that way.
+
+\newtopic The command \Com{insertGrayLetters} is used to insert the gray letters;
+this command can be redefined as desired. See the source file \texttt{exerquiz.dtx}.
+Also see the definition of \Com{bottomOfAnsfStack}.
+
+\subsubsection{Moving the Solution Set}
+
+The solution set, by default, comes last in the file. You can move
+its positioning by including the command \cs{includequizsolutions}
+at any point \emph{after} the last quiz (created by the \texttt{shortquiz} and \texttt{quiz} environments). You'll note
+that I
+have moved the solutions in this file before the
+\nameref{references} section, as indicated, for example, by its
+position in the table of contents.
+
+\subsection{Redesigning the
+\texorpdfstring{\protect\texttt{shortquiz}}{shortquiz}
+Environment}\label{sss:redefinesq}
+
+The \texttt{shortquiz} environment can be redesigned to better suit
+your needs. In the paragraphs below, we describe how you can change
+titles and form elements.
+
+
+\subsubsection{Changing Titles}
+
+You can temporarily change the title for the \texttt{shortquiz}
+environment by redefining the macro \cs{sqlabel}; for example, the
+default definition of this macro is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\sqlabel{\textcolor{red}{Quiz.}}
+\end{Verbatim}
+\noindent The syntax for redefining \cs{sqlabel} is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\sqlabel{...new code goes here...}
+\end{Verbatim}
+\noindent You can redefine the \textit{default} label as well; the
+default label is the title label that \texttt{short\-quiz} uses when
+\cs{sqlabel} is \textit{not present}. The default label is
+\verb+\eq@sqlabel+ and must be redefined using the macro
+\cs{renewcommand}. The best place for this to be done is the
+preamble. The syntax:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\makeatletter % make `at'=@ a normal letter
+\renewcommand\eq@sqlabel{...new code goes here...}
+\makeatother % make `at'=@ something special(other)
+\end{Verbatim}
+\noindent To change the entire document to use `Exam' instead of `Quiz',
+make the following changes in the preamble:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\makeatletter
+% change default quiz title to 'Exam'
+\renewcommand\eq@sqlabel{\textcolor{red}{Exam.}}
+% change quiz solutions return label
+\renewcommand\eq@sqslrtnlabel{End Soln}
+% change solutions label
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Solution to Exam:}}
+\renewcommand\eq@sqslsectitle{Solutions to Exams}
+% change default running header for solutions
+\renewcommand\eq@sqslsecrunhead{Solutions to Exams}
+\makeatother
+\end{Verbatim}
+
+% ?? Did not document \sqsolafter
+
+\redpoint The above commands are `global'---they are in effect
+throughout the entire document. You can temporarily change these
+labels using the \cs{sqlabel}, \cs{sqslrtnlabel}, \cs{sqsllabel} and
+\cs{sqslsectitle}. Note that you cannot temporarily change the running label
+\cs{eq@qslsecrunhead}, this should be set in the
+preamble.
+
+Should you want to make a series of multiple choice questions
+(using the \texttt{questions} environment) and combine them into a
+sort of review or pretest, a useful idea would be to number the
+solutions. The counter that maintains the question number is
+called \texttt{questionno}. You can then, for example, define
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Solution to Question \thequestionno:}}
+\end{Verbatim}
+
+%\exPDF{webeqtst} See the sample file
+%\texttt{\href{\bUrl/webeq_ex.html\#webeqtst}{webeqtst.tex}}
+%for examples.
+
+\exAeBBlogPDF{p=803} See the file \texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}} from the {\AcroBlog}
+website for examples.
+
+
+\subsubsection{Modifying Form Elements}\label{sqMFE1}
+
+For quizzes that use radio buttons (see page~\pageref{sqwRadio}
+above), the appearance of the radio buttons can be controlled
+using the ``every'' mechanism as described in the document
+\href{eformman.pdf}{eFormMan.pdf} on
+\textit{\href{eformman.pdf}{eForm Support}} for the \cAcroB.
+The radio buttons can be modified using the command \cs{everysqRadioButton}.
+
+Prior to the short quiz below, the following command was executed
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\everysqRadioButton{\BC{.690 .769 .871}\BG{.941 1 .941}}
+\end{Verbatim}
+
+\sqTurnOffAlerts \sqCorrections
+\everysqRadioButton{\BC{.690 .769 .871}\BG{.941 1 .941}}
+
+\begin{shortquiz*}[KublaKhan3]
+Was it in Xanadu did Kubla Kahn a stately pleasure dome decree?
+\begin{answers}{4}
+\Ans1 True & \Ans0 False
+\end{answers}
+\end{shortquiz*}
+
+\everysqRadioButton{}
+\sqTurnOnAlerts\sqNoCorrections
+
+\noindent Return to the defaults, if desired, by then emitting
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\everysqRadioButton{}
+\end{Verbatim}
+
+\redpoint The short quiz can also have fill-in questions and
+various other controls, these are described in
+Section~\ref{s:oQsq}, \nameref{s:oQsq}. There too, methods of
+modifying the appearance of the form elements are discussed.
+
+\subsection{\texorpdfstring{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}
+ and \texorpdfstring{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}\label{titleQuizSQ}
+
+%\exPDF{title_quiz}The demo file for these features is \texttt{title\_quiz.tex}.
+
+\exAeBBlogPDF{p=908} See the file \texttt{\href{\urlAcroTeXBlog/?p=908}{title\_quiz.pdf}} from the {\AcroBlog}
+website for examples.
+
+
+
+\subsubsection{\texorpdfstring{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}}
+
+To assign a title to your short quiz use \Com{titleQuiz}. This title
+appears just after the typeset word ``Quiz''.
+
+\fancyQuizHeaders
+\titleQuiz{Two Question MC}
+\begin{shortquiz}\label{myCoolSQ}
+Answer each of these to the best of your ability.
+\begin{questions}
+\item Math is fun.
+\begin{answers}*{4}
+\Ans1 True & \Ans0 False\\
+\end{answers}
+\begin{solution}
+ The answer is true, of course, math is fun!
+\end{solution}
+
+\item Statistics is fun.
+\begin{answers}*{4}
+\Ans0 True & \Ans1 False\\
+\end{answers}
+\begin{solution}
+ The answer is false, statistics is interesting but not fun.
+\end{solution}
+\end{questions}
+\end{shortquiz}
+
+\noindent The partial verbatim code for the above quiz follows:
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\titleQuiz{Two Question MC}
+\begin{shortquiz}\label{myCoolSQ}
+Answer each of these to the best of your ability.
+\begin{questions}
+...
+\end{questions}
+\end{shortquiz}
+\end{Verbatim}
+
+\restoreDefaultQuizHeaders
+
+\noindent The format of the title is controlled by the command \Com{titleQuizfmt},
+the default definition is \verb!\newcommand\titleQuizfmt{\bfseries}!. The value
+of the \cs{titleQuiz} command can act as an argument for \cs{titleQuizfmt} if you redefine
+\cs{titleQuizfmt} to have an argument. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\titleQuizfmt[1]{\bfseries(#1)}
+\end{Verbatim}
+Now, the title will appear in a set of parentheses. The title and formatting are enclosed
+in a \cs{mbox}, so font and style changes are localized to that \cs{mbox}.
+
+\newtopic If a quiz does not have a title, as defined by \cs{titleQuiz}, the title defaults to
+an empty title.
+
+\newtopic The definition of \cs{titleQuiz} is such that the command \cs{makeatletter} is executed
+before the argument for \cs{titleQuiz} is read. This means that the special character
+`\texttt{@}' can be used within the argument of \cs{titleQuiz}. For example, the \texttt{shortquiz}
+environment maintains a text macro \cs{@shortquizCnt} which contains the current short quiz
+count number. Thus you can say \verb!\titleQuiz{Short Quiz \@shortquizCnt}!, the title of
+the short quiz will include a short quiz number as well.
+
+The \cs{titleQuiz} is used for quizzes as well as with short quizzes. It is possible to have
+different formatting for each of these two environments by using the \Com{ifQuizType}
+command. The command takes two arguments:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\ifQuizType{!anglemeta(quiz_code)}{!anglemeta(shortquiz_code)}
+\end{Verbatim}
+For example, we could define \cs{titleQuizfmt} as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\titleQuizfmt{\ifQuizType{\bfseries}{\slshape}}
+\end{Verbatim}
+or with an argument, as mentioned above, you could define \cs{titleQuizfmt} with an argument,
+like so,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand{\titleQuizfmt}[1]{%
+ \ifQuizType{\bfseries(#1)}{\slshape[#1]}}
+\end{Verbatim}
+
+\subsubsection{\texorpdfstring{\protect\cs{titleQuiz*}}{\CMD{titleQuiz*}}}
+
+For \texttt{shortquiz} environment---not for the \texttt{quiz}
+environment---there is a `\texttt*' optional first parameter. When
+the `\texttt*' option is taken, the quiz label (\cs{sqlabel}) is
+redefined to be the title of the quiz text.
+
+%\exPDF{title_quiz} The \texttt{title\_quiz.tex} demo file illustrates the `\texttt{*}' option.
+
+\exAeBBlogPDF{p=908} See
+\texttt{\href{\urlAcroTeXBlog/?p=908}{title\_quiz.pdf}} demo file illustrates
+the `\texttt{*}' option.
+
+
+\newtopic Thus, if we title a quiz with the `\texttt{*}', we get
+
+\titleQuiz*{My Cool Quiz}
+\begin{shortquiz}
+Answer each of these to the best of your ability.
+\begin{questions}
+\item Math is fun.
+\begin{answers}{4}
+\Ans1 True & \Ans0 False\\
+\end{answers}
+\item Statistics is fun.
+\begin{answers}{4}
+\Ans0 True & \Ans1 False\\
+\end{answers}
+\end{questions}
+\end{shortquiz}
+The formatting is that defined by the \cs{titleQuizfmt}, which is \cs{bfseries}. In addition
+to the \Com{ifQuizType} command, there is also the \cs{ifstaroption} command. It takes two
+parameters
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\ifstaroption{!ameta(code if \titleQuiz*)}{!ameta(otherwise)}
+\end{Verbatim}
+This allows us to not only format for quizzes, but for short quizzes, with or without
+the `\texttt*' option. If we redefine \cs{titleQuizfmt} to be
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand{\titleQuizfmt}{\ifQuizType{\bfseries}%
+ {\ifstaroption{\color{red}}{\bfseries}}}
+\end{Verbatim}
+we format the quiz title as \cs{bfseries} is either a quiz or a
+short quiz without `\texttt*' option, and as \verb!\color{red}! with
+a short quiz with the `\texttt*' option. The results are seen in the next quiz,
+with this redefinition:
+
+\renewcommand{\titleQuizfmt}{\ifQuizType{\bfseries}%
+ {\ifstaroption{\color{red}}{\bfseries}}}
+
+\titleQuiz*{My Swave Quiz}
+\begin{shortquiz}
+Answer each of these to the best of your ability.
+\begin{questions}
+\item Math is fun.
+\begin{answers}{4}
+\Ans1 True & \Ans0 False\\
+\end{answers}
+\item Statistics is fun.
+\begin{answers}{4}
+\Ans0 True & \Ans1 False\\
+\end{answers}
+\end{questions}
+\end{shortquiz}
+
+\subsubsection{Cross-Referencing}
+
+Quizzes and shortquizzes conform to the cross-referencing system of
+{\LaTeX}. For example, we used the label \verb!\label{myCoolSQ}! in the
+last quiz, the one on page~\pageref{myCoolSQ}. The title of the quiz is
+\nameref{myCoolSQ}. The code for the past two sentences is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+For example, we used the label \verb!\label{myCoolSQ}! in the
+last quiz, the one on page~\pageref{myCoolSQ}. The title of
+the quiz is \nameref{myCoolSQ}.
+\end{Verbatim}
+%\noindent If the shortquiz does not have a title, as defined by the \cs{titleQuiz} command, a generic label of
+%`Quiz' is generated. The default label name is
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+% \newcommand\eq@defaultShortQuizLableName{Quiz}
+%\end{Verbatim}
+%\noindent This definition can be change using \cs{renewcommand}.
+
+
+\subsubsection{\texorpdfstring{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}
+
+The \Com{fancyQuizHeaders} command, a companion feature to \Com{titleQuiz}, enhances
+the labeling of the quiz in the solutions section of the document. If
+\cs{fancyQuizHeaders} is executed in the preamble, or prior to a quiz, the solution header has the
+following default format:
+
+\newtopic{\color{blue}Two Question MC: Question 1.} The answer is true, of course, math is fun!
+
+\newtopic The above assumes the title of the quiz is the one given in the previous section.
+
+\newtopic When a quiz has no title, the header reverts to
+\textcolor{blue}{Solution to Quiz:} followed by the question number.
+
+\redpoint You can turn off fancy quiz headers by using
+\Com{restoreDefaultQuizHeaders}.
+
+\newtopic You can modify the fancy headers with a combination of setting \Com{setsolnspace}
+and/or redefining the command \Com{eq@fancyQuizHeadersfmt}. First
+\cs{setsolnspace}: This is a hook into the space immediately
+following the header. To insert a \cs{medskip} after the header, for example, you
+can say \verb!\setsolnspace{\par\medskip\noindent}! a
+\cs{medskip} is created after the solution header and the solution
+above appears as
+
+\newtopic{\color{blue}Two Question MC: Question 1.}\par\medskip\noindent The answer is true, of course, math is fun!
+
+\newtopic The definition of \cs{eq@fancyQuizHeadersfmt} is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\def\eq@fancyShrtQuizHeadersfmt{\eq@fancyQuizHeadersfmt}
+\end{Verbatim}
+The \Com{eq@fancyQuizHeadersfmt} is the \texttt{quiz} counterpart to
+this \texttt{shortquiz} construct. The fancy short quiz solutions header
+defaults to the same header used for a quiz. You can copy
+and paste the definition of \cs{eq@fancyQuizHeadersfmt} into the definition
+of the command \cs{eq@fancyShrtQuizHeadersfmt}, then modify as described in
+\Nameref{fancyQuizHeadersQ}.
+
+%See the section \Nameref{fancyQuizHeadersQ} for a full discussion of this topic.
+
+% \subsection{Graded Quizzes using JavaScript}
+\section{The \texttt{quiz} Environment}\label{ss:GradedQuizzes}
+
+Use the \texttt{quiz} environment to create graded quizzes. In
+this case, several (many) questions are bundled together. The
+student takes the quiz and responses are recorded by
+JavaScript. Upon completion of the quiz, the total score is
+reported to the student.
+
+The \texttt{quiz} environment can generate multiple choice
+questions and math/text fill-in questions. The discussion of math
+and text fill-in questions is postponed to \hyperref[s:oQ]
+{Section~\ref*{s:oQ}} on page~\pageref*{s:oQ}
+
+
+There are two types of quizzes, the
+\hyperref[sss:QuizwLinks]{link-style} and
+\hyperref[sss:QuizwChecks]{form-style}.
+In \hyperref[ss:correct]{Section~\ref*{ss:correct}}, we see that
+the \texttt{quiz} environment can also correct the quizzes.
+
+The quiz environment takes one required parameter, the
+\meta{base\_name}, which is a string.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{quiz}{!meta(base_name)}
+...
+\end{quiz}
+\end{Verbatim}
+\textcolor{red}{\Important} The \pkg{exerquiz} package uses the
+\meta{base\_name} to build Acrobat form fields, and also JavaScript
+variables; therefore, there are restrictions on the choice of the
+name. The name must be a (JavaScript) \emph{identifier}, the rules to
+be an identifier are these.
+\begin{quote}
+The first character shall be a letter, an underscore (\texttt{\_}),
+or a dollar sign (\texttt{\$}); subsequent characters may be any
+letter or digit, or an underscore or a dollar sign.
+\end{quote}
+Do not use other symbols, like a colon (\texttt{\:}) or a period as part of the field name,
+these will confuse the JavaScript interpreter, and may cause the quiz not to function as
+designed.
+
+
+The \texttt{quiz} environment consists of a series of nested
+environments. Inside the \texttt{quiz} environment is the
+\texttt{questions} environment (an enumerated list), and within
+that environment is the \texttt{answers} environment.
+Symbolically, we can express this as
+\[
+ \mbox{\texttt{quiz}} \supseteq
+ \mbox{\texttt{questions}} \supseteq
+ \mbox{\texttt{answers}}
+\]
+The term `answers' is, perhaps, not sufficiently descriptive;
+`alternatives' would be more appropriate, but it requires more
+typing. \verb!{:-{)!
+
+\redpoint The \texttt{answers} environment requires one parameter,
+the \texttt{num\_cols}. If \texttt{num\_cols} is~1, a
+\texttt{list} environment is created; otherwise, a
+\texttt{tabular} environment is used.
+
+This (\texttt{tabular}) environment has the following syntax:
+
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{quiz}{!meta(base_name)}
+The preamble to the questions goes here.
+\begin{questions}
+\item State first question....
+\begin{answers}{4} % <- num_cols = 4
+\Ans0 ... &\Ans1 ... &\Ans0 ... &\Ans0 ...
+\end{answers}
+...
+\item n th question....
+\begin{answers}{4} % <- 4 column format
+\Ans0 ... &\Ans1 ... &\Ans0 ... &\Ans0 ...
+\end{answers}
+\end{questions}
+\end{quiz}
+\end{Verbatim}
+
+\redpoint Following the quiz, or anywhere in the document, place
+the macro \cs{ScoreField}, defined in \textsf{exerquiz}, to
+display the results of the quiz:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\ScoreField{!meta(base_name)}
+\end{Verbatim}
+\noindent\textcolor{red}{\bfseries Important.} The value of the parameter of
+the macro \cs{ScoreField} must match the \meta{base\_name}
+defined in the argument of the \texttt{quiz} environment.
+
+\redpoint There is a convenience macro, \cs{currQuiz}, that holds the name
+of the current quiz. Thus, we could have instead typed:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\ScoreField\currQuiz
+\end{Verbatim}
+
+\noindent Read the paragraph entitled \Nameref{sss:scorefield} for more
+details on this macro.
+
+%An alternative to \cs{ScoreField} is to use \cs{TextField}.
+%a macro defined by \pkg{hyperref}. See more details later. %??
+
+\begin{comment}
+The \textsf{exerquiz} macro \cs{eqScore} is a text macro that
+expands to the phrase `Score:'. (It expands to `Punkte:' with the
+\texttt{german} language option and `Score :' with the
+\texttt{french}.)
+
+
+The \cs{TextField} macro takes two arguments, we need only the
+first---the second is left empty. This \cs{TextField} can be
+modified by changing the options; the layout of the field can be
+changed as well using the \cs{LayoutTextField}. For more
+information see the paragraphs on \nameref{ss:modoutputfield}
+beginning on page~\pageref{ss:modoutputfield}. There are
+extensive examples on how to set up the \cs{TextField} in the
+paragraph \nameref{sss:modtextfield} on
+page~\pageref{sss:modtextfield}, with examples following on
+page~\pageref{sss:exampltextfield}.
+\end{comment}
+
+\subsection{Options of the \texttt{quiz} Environment}
+
+In addition to the options listed in the section \ref{sq:opts}, page \pageref*{sq:opts}, the following is
+designed for quizzes.
+
+\subsubsection{The option
+\texorpdfstring{\protect\texttt{noquiz\-solutions}}{noquizsolutions}}\label{sss:noquizsolutions}
+
+For online quizzing, where results are stored in some way (database,
+e-mail, text file) the presence of the solutions in the same file as the
+questions is a breach in security of the quiz. Using the
+\texttt{noquizsolutions} removes the solutions to a \texttt{quiz} and
+\texttt{shortquiz} from the document under construction.
+
+
+\subsection{The \texttt{answers} Environment}\label{answersQuiz}
+
+The simplest type of question that can be posed is the multiple choice question.
+For this question type, the \texttt{answers} environment is used. The basic syntax
+is
+
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\item A question
+\begin{answers}!anglemeta(dest){!meta(num_cols)}
+\Ans[!meta(partial_pts)]{0|1}....
+\end{answers}
+\end{Verbatim}
+
+\newtopic The \anglemeta{dest}, an optional argument, is a name used to create a hypertext jump to
+the solution; it has two forms: \texttt{[\meta{named\_dest}]}, an explicit
+``named destination.''; and the \texttt{*}-form, \textsf{exerquiz} automatically
+generates the name. Use \meta{named\_dest} when you want to refer to a solution
+in another part of the document; otherwise, use \texttt{*}, for convenience.
+
+If either the \texttt{[\meta{named\_dest}]} or \texttt{*} is used, a
+\texttt{solution} environment should follow.
+
+\newtopic The \meta{num\_cols} is the number of columns to
+typeset the answers in. When \meta{num\_cols} is 1, the answers are set
+in a list environment; otherwise, a tabular environment is used. In the latter case,
+the usual table syntax is used. (Use \texttt{\&} to separate columns, and \verb!\\! to
+terminate a row.)
+
+\newtopic The \cs{Ans} command has one required argument, a 1 to mark that this
+answer is a correct answer, and a 0 to mark that this answer is not true. \cs{Ans}
+also has an optional argument to pass partial points rewarded for a wrong answer.
+
+\newtopic This environment is illustrated extensively in this section. See also the
+\texttt{manswers} environment, \Nameref{manswersQuiz}, for posting questions with multiple
+correct answers.
+
+\subsection{Basic Usage}
+
+In this section we discuss the two \texttt{quiz} styles:
+\nameref{sss:QuizwLinks} and \nameref{sss:QuizwChecks}.
+
+A paragraph is devoted to some modifications that can be made at
+the beginning and end of the quiz. In addition, a
+\texttt{\hyperref[sss:proofing]{proofing}} option is also
+described.
+
+\subsubsection{Link-Style Quiz}\label{sss:QuizwLinks}
+
+%\renewcommand\bqlabel{Begin Exam}
+%\renewcommand\eqlabel{End Exam}
+
+%There are actually two variations on this type of quiz, one uses
+%links, the other uses radio button fields.
+
+This style uses links to record the choices to the alternatives.
+The link method takes up less space in the pdf file than does the
+form-style.
+
+Below is an example of a link-style quiz. Instructions should be
+given to guide the student in operating the quiz correctly.
+
+\medskip\noindent\textcolor{red}{Instructions.} You must click on
+`Begin Quiz' to initialize the quiz. Not doing so brings forth
+an error message. When finished, click on `End Quiz'.
+
+\begin{quiz}{qzdiscrl}
+Using the discriminant, $b^2-4ac$, respond to each of the
+following questions.
+\begin{questions}
+\item Is the quadratic polynomial $x^2-4x + 3$ irreducible?
+\begin{answers}{4}
+\Ans0 Yes &\Ans1 No
+\end{answers}
+\item Is the quadratic polynomial $2x^2 - 4x + 3 $ irreducible?
+\begin{answers}{4}
+\Ans1 Yes &\Ans0 No
+\end{answers}
+\item How many solutions does the equation $2x^2 - 3x - 2= 0$ have?
+\begin{answers}{4}
+\Ans0 none &\Ans0 one &\Ans1 two
+\end{answers}
+\end{questions}
+\end{quiz}\par
+\ScoreField\currQuiz
+%\TextField[name=qz:discr,width=3in,default=\eqScore]{}
+
+\redpoint While you are taking the test, and before you click on
+`End Quiz', you can change your answers.
+
+%A message box comes out,
+%gives you your original choice, and asks you whether you really
+%want to change your answer.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{quiz}{qzdiscrl} % qzdiscrl=base_name
+Using the discriminant, $b^2-4ac$, respond to each of the
+following questions.
+\begin{questions}
+\item Is the quadratic polynomial $x^2-4x + 3$ irreducible?
+\begin{answers}{4}
+\Ans0 Yes &\Ans1 No
+\end{answers}
+\item Is the quadratic polynomial $2x^2-4x+3$ irreducible?
+\begin{answers}{4}
+\Ans1 Yes &\Ans0 No
+\end{answers}
+\item How many solutions does the equation $2x^2-3x-2=0$ have?
+\begin{answers}{4}
+\Ans0 none &\Ans0 one &\Ans1 two
+\end{answers}
+\end{questions}
+\end{quiz}\par
+\ScoreField\currQuiz % matching quiz field name
+\end{Verbatim}
+
+\redpoint The convenience text macro, \cs{currQuiz}, contains the name
+of the current quiz. This macro can be used as the argument of
+\cs{ScoreField}.
+
+\subsubsection{Form-Style Quiz}\label{sss:QuizwChecks}
+
+You may be thinking that such a quiz format---one in which the
+student cannot see the choices made---is not very good. It is
+perhaps adequate for two or three quick questions. For a longer
+quiz format, one would like to see a ``checkbox'' format.
+A quiz with a checkbox format can be obtained using the
+\texttt{quiz*} environment:\footnote{In previous versions of \textsf{exerquiz}, there was a \texttt*-option
+for this purpose. The \texttt{quiz*} has replaced the \texttt*-option and is the preferred method, though
+the \texttt*-option is still defined so as not to break previous code.}
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{quiz*}{!meta(base_name)}
+...
+...same format as before...
+...
+\end{quiz*}
+\end{Verbatim}
+
+\noindent Here is the same sample quiz with the form-style option. The only
+change in the code is the insertion of the \texttt*-option.
+
+\medskip\noindent\textcolor{red}{Instructions.} You must click on
+`Begin Quiz' to initialize the quiz. Not doing so, brings forth
+an error message. When finished, click on `End Quiz'.
+
+
+\begin{quiz*}{qzdiscrf}
+Using the discriminant, $b^2-4ac$, respond to each of the
+following questions.
+\begin{questions}
+\item Is the quadratic polynomial $x^2-4x + 3$ irreducible?
+\begin{answers}4
+\Ans0 Yes &\Ans1 No
+\end{answers}
+\item Is the quadratic polynomial $2x^2 - 4x + 3 $ irreducible?
+\begin{answers}4
+\Ans1 Yes &\Ans0 No
+\end{answers}
+\item How many solutions does the equation $2x^2 - 3x - 2= 0$ have?
+\begin{answers}4
+\Ans0 none &\Ans0 one &\Ans1 two
+\end{answers}
+\end{questions}
+\end{quiz*}
+
+\ScoreField{qzdiscrf}
+
+\redpoint Before completing the quiz, a student can easily change
+alternatives.
+
+\redpoint This type is more suitable for longer quizzes. The
+choices the student makes are visually recorded for the student to
+review and change before clicking on `End Quiz'. A partial
+verbatim listing:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{quiz*}{qzdiscrf}
+Using the discriminant, $b^2-4ac$, respond to each of the
+following questions.
+\begin{questions}
+.............
+.............
+\end{questions}
+\end{quiz*}\par
+\ScoreField{qzdiscrf}
+\end{Verbatim}
+
+%\exPDF{webeqtst} See the sample file
+%\texttt{\href{\bUrl/webeq_ex.html\#webeqtst} {webeqtst.tex}}
+%and for examples.
+
+\exAeBBlogPDF{p=803} See the file \texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}} from the {\AcroBlog}
+website for examples.
+
+
+\subsubsection{Using Circular Radio Buttons with MC Questions}
+
+As seen with the examples of the previous section, the form-type quizzes
+have a rectangular check box for the user to make his selection. Acrobat also
+offers a circular radio button that can be used to make a multiple choice.
+
+To create circular radio buttons for a MC question execute \Com{useMCCircles} before
+the quiz, or, perhaps, in the preamble of your document.
+
+To return to the default rectangular choice boxes, execute \Com{useMCCRects}. This
+setting is the default, there is no need to executed it unless
+\cs{useMCCircles} has already been executed.
+
+Executing \cs{useMCCircles} does not affect the \texttt{manswers}
+environment, page~\pageref*{manswersQuiz}), so you can have circular radio
+buttons for multiple choice, and rectangular choice boxes for multiple
+selection problems.
+
+%\exPDF{quiz_w_circ} The sample file \texttt{quiz\_w\_circ.tex} illustrates these two commands.
+
+
+\exAeBBlogPDF{p=914} The demo file \texttt{\href{\urlAcroTeXBlog/?p=914}{quiz\_w\_circ.pdf}}
+illustrates these two commands.
+
+
+
+\subsubsection{Overriding the `quiztype' Parameter}
+
+You can globally declare that all quizzes to be a link-type or
+form-type by using the command \Com{quiztype}. Placing
+\verb+\quiztype{f}+ in the preamble (or prior to any quiz) will
+cause all quizzes following that command to be form-type quizzes.
+Similarly, executing \verb+\quiztype{l}+ will produce all link-type quizzes.
+
+You can make the environments revert back to their normal behavior by using
+the command \Com{defaultquiztype}, which cancels out the \cs{quiztype} command.
+
+%\exPDF{quizpts} The sample file \texttt{\href{\bUrl/webeq_ex.html\#quizpts}
+%{quizpts.tex}} illustrates these collections of commands.
+
+\exAeBBlogPDF{p=1054} The demo file \texttt{\href{\urlAcroTeXBlog/?p=1054}{quizpts.pdf}}
+illustrates these collections of commands.
+
+
+
+\newtopic \emph{Within a quiz}, you can say \Com{useForms}, to change the style to a visible checkbox
+for multiple choice or multiple selection questions; use \Com{useLinks} to change
+the style to links with alphabetized alternatives. Using \cs{restoreFLTypeDefault}
+restores the next multiple choice/selection question back to the default determined
+by the quiz environment (\texttt{quiz} versus \texttt{quiz*}), or as set by the
+\cs{quiztype} command.
+
+\subsubsection{The BeginQuiz and EndQuiz Form Buttons}\label{sss:FormButton}
+
+The default setup the \texttt{quiz} environment is to have
+hypertext links for the `Begin Quiz' and `End Quiz'. You can also
+redefine this linking and use a form button instead
+Prior to your quiz, use the following code, if desired.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\useBeginQuizButton
+\useEndQuizButton
+\end{Verbatim}
+
+\useBeginQuizButton\useEndQuizButton
+%\makeatletter
+%\renewcommand\eq@beginQuiz{\eq@BeginQuizButton}
+%\renewcommand\eq@endQuiz{\eq@EndQuizButton}
+%\makeatother
+
+
+\begin{quiz}{qzTeXf} Answer each of the following. Passing
+is 100\%.
+\begin{questions}
+\item Who created \TeX?
+\begin{answers}4
+\Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\item Who originally wrote \LaTeX?
+\begin{answers}4
+\Ans0 Knuth &\Ans1 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\end{questions}
+\end{quiz}\quad\ScoreField{qzTeXf}
+
+\medskip
+\noindent Revert back to link-style as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\useBeginQuizLink
+\useEndQuizLink
+\end{Verbatim}
+
+\useBeginQuizLink\useEndQuizLink
+
+\noindent The commands \cs{useBeginQuizButton} and \cs{useEndQuizButton} each
+have an optional argument that can be used to modify the appearance
+of the buttons.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\useBeginQuizButton[\textColor{0 0 1}]
+\end{Verbatim}
+\noindent would create a `Begin Quiz' button with blue text for the button label.
+
+\subsubsection{The \texorpdfstring{\texttt{proof\-ing}}{proofing}
+Option}\label{ss:proofing}
+
+For proofreading, use the \texttt{proofing} option of
+\textsf{exerquiz}.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[proofing]{exerquiz}
+\end{Verbatim}
+\noindent When used, a symbol, defined by the command \cs{proofingsymbol},
+will mark the correct answers, as defined in your source file. The
+command \cs{proofingsymbol} can be redefined, its definition is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\proofingsymbol{\textcolor{webgreen}{$\bullet$}}
+\end{Verbatim}
+\noindent
+This option works for the \texttt{\hyperref[ss:QuizIR]{shortquiz}}
+environments defined above
+(\hyperref[ss:QuizIR]{page~\pageref*{ss:QuizIR}}), as well.
+
+\subsubsection{The \texttt{showgrayletters} Option} \aebCng[showgrayletters]
+
+The showgrayletters option is valid for the \texttt{quiz} and \texttt{shortquiz} environments.
+See the section entitled \Nameref{showgraylettersOpt} for a detailed explanation
+of this option.
+
+\subsubsection{Setting the Threshold}\label{threshold}
+
+The default behavior of the \texttt{quiz} environment is that a
+student can begin the quiz and finish the quiz without answering
+any or all of the questions. This is called a \texttt{lowThreshold}
+and is the default behavior.
+
+The document author can set a \texttt{highThreshold} by re-defining
+the \cs{minQuizResp} macro. The default definition is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\minQuizResp{lowThreshold}
+\end{Verbatim}
+\noindent However, if you make the definition
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\minQuizResp{highThreshold}
+\end{Verbatim}
+\noindent the student is required to answer all the questions of a
+quiz.
+
+Actually, \texttt{lowThreshold} and \texttt{highThreshold} are
+JavaScript functions that are called when the ``End
+Quiz'' button is clicked. If the threshold is not met, an alert box
+appears informing the user of this.
+
+The document author can write a custom threshold function and place
+its name in the \cs{minQuizResp} macro. See the \textsf{exerquiz}
+source code---in either \textsf{exerquiz.dtx} or
+\textsf{exerquiz.sty}---for the \texttt{highThreshold()} function
+for an example of how to do this.
+
+\subsection{The \texttt{manswers} Environment}\label{manswersQuiz}
+
+Beginning with \textsf{Exerquiz} v.6.2, the \texttt{manswers}
+environment is defined to support multiple selection questions.
+(\texttt{manswers} stands for multiple answers). This is in contrast
+with the \texttt{answers} environment in which there is only one
+correct answer; for \texttt{manswers}, there are several correct
+answers.
+
+%\exPDF{manswers} See the example file for this feature is \texttt{manswers.tex}.
+
+\exAeBBlogPDF{p=903} See the example file for this feature is \texttt{\href{\urlAcroTeXBlog/?p=903}{manswers.pdf}}.
+
+\newtopic\indent The syntax is the same as that of the \texttt{answers} environment,
+\mlNameref{answersQuiz}. Below is example fragment, taken from \texttt{manswers.tex}
+
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\item\PTs{5} Select which people were the President
+ of the United States.
+\begin{manswers}{4}
+ \bChoices[2]
+ \Ans[-1]{0} Henry Clay\eAns
+ \Ans[-1]{0} Ben Franklin\eAns
+ \Ans[1.5]{1} Andrew Jackson\eAns
+ \Ans[1.5]{1} Ronald Reagan\eAns
+ \Ans[-1]{0} George Meade\eAns
+ \Ans[2]{1} Grover Cleveland\eAns
+ \Ans[-1]{0} John Jay\eAns
+ \Ans[-1]{0} Paul Revere\eAns
+ \eChoices
+\end{manswers}
+\end{Verbatim}
+
+\newtopic The arguments of the \cs{Ans} command is the same as
+those of \cs{Ans} in the \texttt{answers} environment.
+
+\newtopic When the \cs{ScoreField} is used to display results, a manswers
+question is correct if and only if all correct answers are checked, and none
+of the incorrect answers are checked.
+
+When the \cs{PointsField} is used (see \Nameref{sss:asignPts}), and
+points are assigned, as in the above code fragment, the optional
+argument of \cs{Ans} is used to assign points for each response (if
+there is no optional argument, it defaults to 0). When a student
+selects a choice, the point value in the optional argument is added
+to the point score. In the case of choosing \texttt{Ronald Reagan},
+1.5 points are added to the point score, while -1 point is added to
+the point score for choosing \texttt{John Jay}. The minimal point
+score for each question is zero, unless \cs{negPointsAllowed} command
+is executed in the preamble, see \Nameref{negPtsAllowed}.
+
+
+\subsection{Correcting the Quizzes with JavaScript}\label{ss:correct}
+
+%\makeatletter\eq@nocorrectionsfalse\makeatother
+\CorrectionsOn
+
+Beginning with \textsf{exerquiz}, version 1.2, you can now correct
+quizzes created by the \texttt{quiz} environment. To correct the
+quizzes, simply include an additional element into your quiz, a
+correction button. The correction button with
+\cs{CorrButton}.
+
+\redpoint The following is a link-style quiz.
+
+% \begin{center}
+% \noindent\fcolorbox{blue}{webyellow}{%
+% \begin{minipage}{.965\linewidth}%
+% \noindent\textcolor{red}{\textbf{Instructions:}} Click on
+% `\textcolor{webgreen}{Begin Quiz}' to initialize the quiz.
+% When finished, click on `\textcolor{webgreen}{End Quiz}'.
+% Then, click on the `Correct' button.
+% % To grade your quiz, press the `Correct' button.
+% \end{minipage}
+% }%
+% \end{center}
+
+\begin{quiz}{qzdiscr1l} Using the discriminant, $b^2-4ac$,
+respond to each of the following questions.
+\begin{questions}
+\item Is the quadratic polynomial $x^2-4x + 3$ irreducible?
+\begin{answers}4
+\Ans0 Yes &\Ans1 No
+\end{answers}
+\item Is the quadratic polynomial $2x^2 - 4x + 3 $ irreducible?
+\begin{answers}4
+\Ans1 Yes &\Ans0 No
+\end{answers}
+\item How many solutions does the equation $2x^2 - 3x - 2= 0$ have?
+\begin{answers}4
+\Ans0 none &\Ans0 one &\Ans1 two
+\end{answers}
+\end{questions}
+\end{quiz}\par
+\ScoreField{qzdiscr1l}\CorrButton{qzdiscr1l}%
+
+\medskip
+%\fcolorbox{blue}{webyellow}{%
+% \begin{minipage}{.975\linewidth}%
+ \noindent\textcolor{red}{\textbf{Legend:}}
+ A \textcolor{webgreen}{\ding{52}} indicates a
+ correct response; a \textcolor{red}{\ding{56}}, indicates an
+ incorrect response, in this case, the correct answer is marked
+ with a \textcolor{webgreen} {\ding{108}}.
+% \end{minipage}}
+
+\begin{comment}
+ \begin{center}
+ \fcolorbox{blue}{webyellow}{%
+ \begin{minipage}{.95\linewidth}
+ \noindent\textcolor{red}{\textbf{Legend:}}
+ A \textcolor{red}{\ding{52}} indicates that the student gave the
+ correct response; a \textcolor{red}{\ding{56}}, indicates an
+ incorrect response, in this case, the correct answer is marked
+ with a \textcolor{webgreen} {\ding{108}}.
+ \end{minipage}}
+ \end{center}
+\end{comment}
+
+\medskip
+A partial verbatim listing of this quiz follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{quiz}{qzdiscr1l} Using the discriminant, $b^2-4ac$,
+respond to each of the following questions.
+\begin{questions}
+............................
+............................
+............................
+\end{questions}
+\end{quiz}
+
+\ScoreField{qzdiscr1l}\CorrButton{qzdiscr1l}
+\end{Verbatim}
+
+
+\redpoint The macro \cs{CorrButton} is used to create a nice
+``correction'' button. JavaScript is used to correct the quiz.
+The only required argument is the field label that uniquely
+defines the field in which the total score is placed. See the
+section entitled \mlNameref{sss:CorrButton} for more details on how
+to use this macro.
+
+\redpoint The \cs{CorrButton} will not work until the user has
+clicked on `End Quiz'. The user can re-take the quiz simply by
+clicking on `Begin Quiz', the form fields and JavaScript variables
+will be cleared.
+
+\redpoint It is possible to take this form data and submit it to a
+CGI script for processing. (The data can be saved to a database,
+for example.) However, there is no built-in capability for this
+in the \textsf{exerquiz} package.
+
+\symbolchoice{check}
+
+\medskip
+
+\noindent The same quiz can be written in form-style simply by inserting the
+\texttt*-option.
+
+\medskip\noindent\textcolor{red}{Instructions.} You must click on
+`Begin Quiz' to initialize the quiz. Not doing so, brings forth
+an error message. When finished, click on `End Quiz'.
+
+\begin{quiz*}{qzdiscr1f} Using the discriminant, $b^2-4ac$,
+respond to each of the following questions.
+\begin{questions}
+\item Is the quadratic polynomial $x^2-4x + 3$ irreducible?
+\begin{answers}4
+\Ans0 Yes &\Ans1 No
+\end{answers}
+\item Is the quadratic polynomial $2x^2 - 4x + 3 $ irreducible?
+\begin{answers}4
+\Ans1 Yes &\Ans0 No
+\end{answers}
+\item How many solutions does the equation $2x^2 - 3x - 2= 0$ have?
+\begin{answers}4
+\Ans0 none &\Ans0 one &\Ans1 two
+\end{answers}
+\end{questions}
+\end{quiz*}\quad\ScoreField\currQuiz\CorrButton\currQuiz
+
+\redpoint In the partial verbatim listing that follows, notice the field
+name has been changed from \texttt{qzdiscr1l}, which is the name of the
+quiz previous to his one, to \texttt{qzdiscr1f}. Different quizzes must
+have unique field names.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{quiz*}{qzdiscr1f} Using the discriminant, $b^2-4ac$,
+respond to each of the following questions.
+\begin{questions}
+............................
+............................
+............................
+\end{questions}
+\end{quiz*}\quad\ScoreField\currQuiz\CorrButton\currQuiz
+\end{Verbatim}
+
+\redpoint Notice that in this example, the \cs{ScoreField} and the
+\cs{CorrButton} are positioned following the `End Quiz'; this makes
+the design more compact and nicer looking.
+
+\subsubsection{The
+\texorpdfstring{\protect\texttt{nocorrections}}{nocorrections}
+Option}\label{sss:nocorrections}
+
+Including the corrections adds quite a bit more JavaScript code to
+the \texttt{.pdf} document, this feature is `on' by default. If
+you have a document in which you do not want to have the option of
+offering corrected quizzes, then just specify
+\texttt{nocorrections} in the option list of \textsf{exerquiz}.
+
+There are also a couple of macros you can use to override the option switch, they are
+\cs{CorrectionsOn} and \cs{CorrectionsOff}. Each remains in
+effect until the other is invoked.
+
+\redpoint If the \texttt{nocorrections} option is taken, then the \cs{CorrButton}
+does not appear for a quiz.
+
+\subsubsection{Showing Partial Credit Markup}\label{showcreditmarkup}
+
+When a quiz is corrected, it is possible to show how much credit was given.
+
+%\exPDF{pc_test} The demo file for this feature is \texttt{pc\_test.tex}.
+
+\exAeBBlogPDF{p=881} The demo file for this feature is
+\texttt{\href{\urlAcroTeXBlog/?p=881}{pc\_test.pdf}}.
+
+
+%\exPDF{pc_test1} The example file \texttt{pc\_test1.tex} illustrates
+%how to have a multiple selection problem and a grouped problem with
+%no partial credit. The student must get all parts correct to get
+%full credit for that problem, otherwise, no credit is assigned.
+
+\exAeBBlogPDF{p=884} The example file
+\texttt{\href{\urlAcroTeXBlog/?p=884}{pc\_test1.pdf}} illustrates
+how to have a multiple selection problem and a grouped problem with
+no partial credit. The student must get all parts correct to get
+full credit for that problem, otherwise, no credit is assigned.
+
+
+\newtopic Place the command \Com{showCreditMarkup} before a quiz you want the
+partial credit markup. The command \Com{hideCreditMarkup} hides this
+markup (it switches off the previous \cs{show\-Credit\-Mark\-up}); place
+this command before a quiz for which you don't want the markup. The
+default is not to show any partial credit markup.
+
+When a question item introduces a series of question, but poses no question itself,
+place \Com{multipartquestion} prior to that item, for example
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\multipartquestion
+\item\PTs{6} Answer each of these questions
+\begin{question}
+ \item\PTs{3} Answer this
+ \item\PTs{3} Answer that
+\end{question}
+\end{Verbatim}
+Other relevant commands are \cs{aeb@creditmarkup} and
+\cs{aeb@creditmarkupfmt}; the first one defines a little text field to
+hold the partial-credit data and the second one sets the placement of the
+text field. These can be redefined if the default definitions are not to
+your liking. The markup in red that appears in the left margin shows the
+number of points the student received for that problem, for example
+\texttt{\textcolor{red}{3\,pts}}. The string \texttt{pts} (and its singular
+counterpart, \texttt{pt}) is language dependent, in English it refers to
+``points'' (or ``point''). You can change this string to an abbreviation
+of points (point) using the commands commands \Com{ptsLabel} and
+\Com{ptLabel}. The default definitions are \verb!\ptsLabel{pts}! and
+\verb!\ptLabel{pt}!, respectively.
+
+\newtopic\textbf{\textcolor{red}{Important:}} Adobe Reader 5.0 or
+later is required for this feature.
+
+\subsection{Quizzes with Solutions}
+
+In addition to scoring and marking the quizzes, you can also
+(optionally) provide solutions as well. To enter a solution to a
+multiple choice question, use a \texttt{solution} environment, and
+attach a named destination to the \texttt{answers} environment.
+A partial verbatim listing follows the next example.
+
+%\ifeqforpaper\else\NoPeeking\fi
+
+
+\begin{quiz*}{qzTeXl} Answer each of the following. Passing
+is 100\%.
+
+\begin{questions}
+
+\hfuzz=2pt
+
+\item Who created \TeX?
+\begin{answers}[knuth]{4}%
+\Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\begin{solution}
+Yes, Donald Knuth was the creator of \TeX.
+\end{solution}
+
+\item Who originally wrote \LaTeX?
+\begin{answers}[lamport]{4}
+\Ans0 Knuth &\Ans1 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\begin{solution}
+Yes, Leslie Lamport was the creator of \LaTeX.
+\end{solution}
+\end{questions}
+\end{quiz*}\quad\ScoreField\currQuiz\CorrButton\currQuiz
+
+\AllowPeeking
+
+After the quiz is completed and the corrections button is pressed,
+the corrections appear. The correct answer has a green filled
+circle or a green check; this circle is now outlined by a green
+rectangle to indicate that this is a link to the solution. Click on
+the green dot and jump to the solution!
+
+Solutions do not have to appear. Some problems can have solutions,
+while others do not. The ones with the solutions have the green
+boundary to indicate a link to the solution.
+
+Here is a partial listing of the above example.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{quiz*}{qzTeXl} Answer each of the following.
+Passing is 100\%.
+\begin{questions}
+\item Who created \TeX?
+\begin{answers}[knuth]4
+\Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\begin{solution}
+Yes, Donald Knuth was the creator of \TeX.
+\end{solution}
+....
+\end{questions}
+\end{quiz*}\quad\ScoreField\currQuiz\CorrButton\currQuiz
+\end{Verbatim}
+
+\redpoint Notice that in the \texttt{answers} environment, an
+optional parameter \texttt{[knuth]} appears. The value of this
+parameter is a unique name for the solution to the quiz. Notice as well that
+the \texttt{solution} environment follows, and is not nested
+within the \texttt{answers} environment.
+
+
+\subsection{How to Modify the \texttt{quiz} Environment}
+
+There are four ways the appearance of the quizzes can change:
+
+\begingroup
+\def\mylabel#1{\hfil\hyperref[#1]{\large$\bullet$}\ }
+\begin{list}{}
+%{\normalfont\bfseries\arabic{questionno}.\ }%
+{\usecounter{questionno}\setlength{\parsep}{0pt}\setlength{\topsep}{0pt}
+\renewcommand{\makelabel}{\mylabel}
+\settowidth{\labelwidth}{\normalfont\bfseries00.\ }%
+\setlength{\itemindent}{0pt}\setlength{\labelsep}{0pt}}%
+\item[sss:quiztitles] change the titles
+\item[sss:ckappear] change the `check' appearance
+\item[sss:scorefield] change the text field in which the score appears,
+\item[sss:CorrButton] change the appearance of the `Correction' button.
+\end{list}
+\par\endgroup
+
+\noindent This section discusses each of these four in turn.
+
+\subsubsection{The Quiz Titles}\label{sss:quiztitles}
+
+It is possible to redefine the quiz titles and other labels if
+desired.
+
+\redpoint Locally:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\bqlabel{Begin Exam}
+\renewcommand\eqlabel{End Exam}
+\end{Verbatim}
+
+\redpoint Globally:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\makeatletter
+\renewcommand\eq@bqlabel{Begin Exam}
+\renewcommand\eq@eqlabel{End Exam}
+\makeatother
+\end{Verbatim}
+
+\subsubsection{The check appearance}\label{sss:ckappear}
+
+The appearance of the `check' can be chosen using the
+\cs{symbolchoice} macro of the \textsf{exerquiz} package. The
+permissible values for the argument of \cs{symbolchoice} are
+\texttt{check} (the default), \texttt{circle}, \texttt{cross},
+\texttt{diamond}, \texttt{square}, and \texttt{star}.
+
+This quiz was generated by inserting
+\verb+\symbolchoice{diamond}+ before the quiz. The multiple choice field
+is actually a radio button field. The appearance of these radio buttons can
+be modified using the command \cs{everyqRadioButton}.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\symbolchoice{diamond}
+\everyqRadioButton{\textColor{0 0 1}
+ \BC{.690 .769 .871}\BG{.941 1 .941}}
+\end{Verbatim}
+
+\symbolchoice{diamond}
+\everyqRadioButton{\symbolchoice{diamond}\textColor{0 0 1}\BC{.690 .769 .871}\BG{.941 1 .941}}
+
+
+\begin{quiz*}{qzTeX} Answer each of the following. Passing
+is 100\%.
+\begin{questions}
+\item Who created \TeX?
+\begin{answers}4
+\Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\item Who originally wrote \LaTeX?
+\begin{answers}4
+\Ans0 Knuth &\Ans1 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\end{questions}
+\end{quiz*}\quad\ScoreField{qzTeX}\CorrButton{qzTeX}
+
+\noindent If desired, we can return to the defaults:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\symbolchoice{check} % restore the default
+\everyqRadioButton{}
+\end{Verbatim}
+
+\symbolchoice{check} % restore the default
+\everyqRadioButton{}
+
+\redpoint The \cs{symbolchoice} can also be introduced into the flow of the code through
+the \cs{every\-qRadio\-Button}:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\everyqRadioButton{\symbolchoice{diamond}\textColor{0 0 1}
+ \BC{.690 .769 .871}\BG{.941 1 .941}}
+\end{Verbatim}
+\noindent After the quiz, we could return to the defaults by
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\everyqRadioButton{}
+\end{Verbatim}
+
+\redpoint See the document \texttt{\href{eformman.pdf}{eformman.pdf}} for complete
+documentation on how to modify a field using the optional first argument, and
+how to use the ``every'' command.\footnote{eforms manual on Web:
+\url{\bUrl/eformman.pdf}}\xdef\fnEFormi{\thefootnote}
+
+\subsubsection{Change color of Correction Marks}
+
+The colors used to mark the quiz can be changed by redefining the
+commands \cs{check\-Color}, \cs{crossColor} and \cs{correctColor} in
+the \textit{preamble} or before. Below are the
+defaults:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\checkColor{["RGB", 0, .6, 0]}
+\renewcommand\crossColor{color.red}
+\renewcommand\correctColor{["RGB", 0, .6, 0]} % webgreen
+\end{Verbatim}
+\noindent The colors are inserted into the field using JavaScript, so the color definitions
+are in the color space of the JavaScript object model.
+
+
+\subsubsection{The `Correction' Button}\label{sss:CorrButton}
+
+The `Correction' button is defined by the \cs{CorrButton} has two
+parameters.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\CorrButton[mod_appear]{field_name}
+\end{Verbatim}
+The second parameter is the field name that contains the total score for the
+quiz (see the above examples). It also has one optional argument that can be
+used to modify the appearance of the button.
+
+Also defined is the \cs{eqButton} command, which performs the same function as
+\cs{CorrButton}; use of \cs{eqButton} is discouraged in favor of \cs{CorrButton}.
+
+In addition to the optional parameter to modify the appearance of
+\cs{CorrButton}, there is also a ``global'' mechanism for modifying the
+appearance of the button field. These are
+
+\paragraph*{Global Modification:} \cs{everyButtonField} and \cs{everyCorrButton}
+
+\newtopic The first one modifies the appearance of every quiz button field, the second can be used
+to modify all \cs{CorrButton}s.
+
+\redpoint See the document \texttt{\href{eformman.pdf}{eformman.pdf}} for complete
+documentation on how to modify a field using the optional first argument, and
+how to use the ``every'' command.${}^{\text{\fnEFormi}}$\def\fnEFormi{\thefootnote}
+
+
+
+% \begin{table}[hbt]
+% \setlength{\extrarowheight}{1mm}
+% \setlength{\tabcolsep}{2mm}
+% \begin{center}
+% \makeatletter
+% \begin{tabular}{|l|l|l|l|}
+% \hline
+% \multicolumn1{|l|}{Local} &
+% \multicolumn1{l|}{Global} &
+% \multicolumn1{l|}{Default} &
+% \multicolumn1{l|}{Description}\\
+% \hline
+% \cs{BC} &\cs{eq@BC} & 1 0 0 & border color\\
+% \cs{BG} &\cs{eq@BG} & .7529 .7529 .7529 & face color\\
+% \cs{CA} &\cs{eq@CA} & Correct & button text\\
+% \cs{RC} &\cs{eq@RC} & My Answers! & rollover\\
+% \cs{AC} &\cs{eq@AC} & Please! & pushed text \\
+% \cs{DA} &\cs{eq@DA} & /Helv 10 Tf 0 g & text format\\
+% \cs{BS} &\cs{eq@BS} & /W 1 /S /B & button spec\\
+% \hline
+% \end{tabular}
+% \caption{\protect\cs{CorrButton} Parameters}\label{table:CorrButton}
+% \end{center}
+% \vspace{-\baselineskip}
+% \end{table}
+%
+%
+% The macros listed in the first column of \autoref{table:CorrButton}
+% are permitted in the optional parameter field of
+% \cs{CorrButton}---there is not parameter checking, \TeX\ or
+% Distiller/Reader will find the errors.
+%
+% The meaning of these values is beyond the scope of this manual.
+% Refer to the internet article ``Pdfmarks: Links and Forms'',
+% \cite{article:Story:Pdfmarks}, for details; in particular, see the
+% ``Forms'' article.
+
+\subsubsection{The Score Field}\label{sss:scorefield}
+
+The score field is the text field to which the quiz (and its
+underlying JavaScript) reports the score. This field can be
+constructed using the \cs{ScoreField} macro
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\ScoreField[mod_appear]{field_name}
+\end{Verbatim}
+\noindent In the simplest case, \cs{ScoreField} takes one argument, as above,
+the \texttt{field\_name} of the associated quiz. The expansion of \cs{ScoreField}
+produces a \texttt{read-only} text field that is 1.5 inches in
+width with a red border. The initial text that appears in the
+field is the expansion of the macro \cs{eqScore}. The expansion of
+\cs{eqScore} depends on the language option: \cs{eqScore} expands
+to `Score:' by default, to `Punkte:' for the \texttt{german}
+option and to `Score :' for the \texttt{french} option.
+
+The macro \cs{ScoreField} also has an optional parameter that can
+be used to modify the appearance of the text field. Should the
+document author want to change the basic look of the text field produced
+by \cs{ScoreField}, just introduce the changes through this
+optional parameter.
+
+In addition to the optional parameter for modifying the appearance of
+the text field, \cs{Score\-Field}, there is also a ``global'' mechanism for
+modifying the appearance of the button field. These are
+
+\newtopic\textbf{Global Modification:} \cs{everyeqTextField} and \cs{everyScoreField}
+
+\newtopic The first one modifies the appearance of every quiz text field, the second can be used
+to modify all \cs{ScoreField}s.
+
+\redpoint See the document \texttt{\href{eformman.pdf}{eformman.pdf}} for complete
+documentation on how to modify a field using the optional first argument, and
+how to use the ``every'' command.${}^{\text{\fnEFormi}}$\def\fnEFormi{\thefootnote}
+
+
+\begin{quiz*}{qzTeXc} Answer each of the following. Passing
+is 100\%.
+\begin{questions}
+\item What \TeX\ System does Thomas Esser maintain?
+\begin{answers}4
+\Ans0 MiK\TeX &\Ans0 cs\TeX &\Ans1 te\TeX &\Ans0 fp\TeX
+\end{answers}
+\item What \TeX\ System does Fabrice Popineau maintain?
+\begin{answers}4
+\Ans0 MiK\TeX &\Ans0 cs\TeX &\Ans0 te\TeX &\Ans1 fp\TeX
+\end{answers}
+\item What \TeX\ System does Christian Schenk maintain?
+\begin{answers}4
+\Ans1 MiK\TeX &\Ans0 cs\TeX &\Ans0 te\TeX &\Ans0 fp\TeX
+\end{answers}
+\end{questions}
+\end{quiz*}\quad%
+\ScoreField[\BC{0 0 1}]{qzTeXc}%
+ \CorrButton[\BC{0 0 1}% blue border color
+ \CA{TeX}% Button text
+ \RC{Users}% rollover text
+ \AC{Group}% pushed text
+ \textFont{TiRo}% text font: Times Roman
+ \textSize{10}% text size: 10 point
+ \textColor{0 0 1}% times roman, 10 pt, blue text
+ \W{1}\S{I}% border width 1, inset button
+ ]{qzTeXc}
+
+\noindent The new part is the customized scoring and correction button. Here
+is a verbatim listing of the \cs{ScoreField} and \cs{CorrButton}
+macros.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\ScoreField[\BC{0 0 1}]{qz:TeXc}%
+ \CorrButton[\BC{0 0 1} % blue border color
+ \CA{TeX} % Button text
+ \RC{Users} % rollover text
+ \AC{Group} % pushed text
+ \textFont{TiRo} % text font: Times Roman
+ \textSize{10} % text size: 10 point
+ \textColor{0 0 1} % blue text
+ \W{1}\S{I} % border width 1, inset button
+ ]{qz:TeXc}
+\end{Verbatim}
+
+%\exPDF{webeqtst} This example---as well as others---appears in
+%\texttt{\href{\bUrl/webeq_ex.html\#webeqtst}{webeqtst.tex}}, a
+%test file that accompanies the \cAcroB.
+
+\exAeBBlogPDF{p=803} This example---as well as others---appears in
+\texttt{\href{\urlAcroTeXBlog/?p=803}{webeqtst.pdf}}, a demo file from the
+{\AcroBlog}
+
+
+
+\subsection{\texorpdfstring{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}
+ and \texorpdfstring{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}\label{titleQuiz}
+
+%\exPDF{title_quiz} The demo file for these features is \texttt{title\_quiz.tex}.
+
+\exAeBBlogPDF{p=908} The demo file for these features is
+\texttt{\href{\urlAcroTeXBlog/?p=908}{title\_quiz.pdf}}.
+
+
+\subsubsection{\texorpdfstring{\protect\cs{titleQuiz}}{\CMD{titleQuiz}}}
+
+To assign a title to your quiz use \Com{titleQuiz}. This title appears just after
+the `Begin Quiz' button
+
+\fancyQuizHeaders
+\titleQuiz{Two Question MC}
+\begin{quiz}{MyMCQuiz}\label{MyMCQuiz}
+Answer each of these to the best of your ability.
+\begin{questions}
+\item Math is fun.
+\begin{answers}*{4}
+\Ans1 True & \Ans0 False\\
+\end{answers}
+\begin{solution}
+ The answer is true, of course, math is fun!
+\end{solution}
+
+\item Statistics is fun.
+\begin{answers}*{4}
+\Ans0 True & \Ans1 False\\
+\end{answers}
+\begin{solution}
+ The answer is false, statistics is interesting but not fun.
+\end{solution}
+\end{questions}
+\end{quiz}\quad\ScoreField\currQuiz\CorrButton\currQuiz
+
+\noindent The partial verbatim code for the above quiz follows:
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\titleQuiz{Two Question MC}
+\begin{quiz}{MyMCQuiz}\label{MyMCQuiz}
+Answer each of these to the best of your ability.
+\begin{questions}
+...
+\end{questions}
+\end{quiz}\quad\ScoreField\currQuiz\CorrButton\currQuiz
+\end{Verbatim}
+
+\restoreDefaultQuizHeaders
+
+\noindent The format of the title is controlled by the command \Com{titleQuizfmt},
+the default definition is \verb!\newcommand\titleQuizfmt{\bfseries}!. The value
+of the \cs{titleQuiz} command can act as an argument for \cs{titleQuizfmt} if you redefine
+\cs{titleQuizfmt} to have an argument. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\titleQuizfmt[1]{\bfseries(#1)}
+\end{Verbatim}
+Now, the title will appear in a set of parentheses. The title and formatting are enclosed
+in a \cs{mbox}, so font and style changes are localized to that \cs{mbox}.
+
+\newtopic If a quiz does not have a title, as defined by \cs{titleQuiz}, the title defaults to
+an empty title.
+
+\newtopic The definition of \cs{titleQuiz} is such that the command \cs{makeatletter} is executed
+before the argument for \cs{titleQuiz} is read. This means that the special character
+`\texttt{@}' can be used within the argument of \cs{titleQuiz}. For example, the \texttt{quiz}
+environment maintains a text macro \cs{\@quizCnt} which contains the current quiz
+count number. Thus you can say \verb!\titleQuiz{Quiz \@quizCnt}!, the title of
+the quiz will include a short quiz number as well.
+
+
+\newtopic The \cs{titleQuiz} is used for short quizzes as well as
+with quizzes. It is possible to have different formatting for each
+of these two environments by using the \Com{ifQuizType} command. The
+command takes two arguments:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\ifQuizType{!anglemeta(quiz_code)}{!anglemeta(shortquiz_code)}
+\end{Verbatim}
+For example, we could define \cs{titleQuizfmt} as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\titleQuizfmt{\ifQuizType{\bfseries}{\slshape}}
+\end{Verbatim}
+or with an argument, as mentioned above, you could define \cs{titleQuizfmt} with an argument,
+like so,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand{\titleQuizfmt}[1]{%
+ \ifQuizType{\bfseries(#1)}{\slshape[#1]}}
+\end{Verbatim}
+
+\subsubsection{Cross-Referencing}
+
+Quizzes and short-quizzes conform to the cross-referencing system
+of {\LaTeX}. For example, we used the label \verb!\label{MyMCQuiz}! in the last quiz, the one
+on page~\pageref{MyMCQuiz}. The title of the quiz is \nameref{MyMCQuiz}. The code for the past
+two sentences is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+For example, we used the label \verb!\label{MyMCQuiz}! in the
+last quiz, the one on page~\pageref{MyMCQuiz}. The title of the
+quiz is \nameref{MyMCQuiz}.
+\end{Verbatim}
+\noindent If the quiz does not have a title, as defined by the \cs{titleQuiz} command, a generic label of
+`Quiz' is generated. The default label name is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\eq@defaultQuizLableName{Quiz}
+\end{Verbatim}
+\noindent This definition can be change using \cs{renewcommand}.
+
+\subsubsection{\texorpdfstring{\protect\cs{fancyQuizHeaders}}{\CMD{fancyQuizHeaders}}}\label{fancyQuizHeadersQ}
+
+The \Com{fancyQuizHeaders} command, a companion feature to \Com{titleQuiz}, enhances
+the labeling of the quiz in the solutions section of the document. If
+\cs{fancyQuizHeaders} is executed in the preamble, or prior to a quiz, the solution header has the
+following default format:
+
+\begin{quote}
+\newtopic{\color{blue}Two Question MC: Question 1.} The answer is true, of course, math is fun!
+\end{quote}
+
+
+\newtopic The above assumes the title of the quiz is the one given in the previous section.
+
+\newtopic When a quiz has no title, the header reverts to
+\textcolor{blue}{Solution to Quiz:} followed by the question number.
+
+\redpoint You can turn off fancy quiz headers by using
+\Com{restoreDefaultQuizHeaders}.
+
+\newtopic You can modify the fancy headers with a combination of setting \Com{setsolnspace}
+and/or redefining the command \Com{eq@fancyQuizHeadersfmt}. First
+\cs{setsolnspace}: This is a hook into the space immediately
+following the header. To insert a \cs{medskip} after the header, for example, you
+can say \verb!\setsolnspace{\par\medskip\noindent}! a
+\cs{medskip} is created after the solution header and the solution
+above appears as
+
+\begin{quote}
+\newtopic{\color{blue}Two Question MC: Question 1.}\par\medskip\noindent The answer is true, of course, math is fun!
+\end{quote}
+
+
+\newtopic The definition of \cs{eq@fancyQuizHeadersfmt} is
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\def\eq@fancyQuizHeadersfmt{{\protect\color{blue}\protect
+ \textbf{\ifx\aebTitleQuiz\@empty\ifnum\@eqquestiondepth>0
+ Solution to Quiz:\fi\else
+ \aebTitleQuiz:\protect\
+ \ifnum\@eqquestiondepth=0\else
+ Question\fi
+ \fi\space
+ \ifcase\@eqquestiondepth
+ \ifx\aebTitleQuiz\@empty Solution to Quiz:\fi\or
+ \arabic{eqquestionnoi}.\or
+ \arabic{eqquestionnoi}(\alph{eqquestionnoii})\or
+ \arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ (\roman{eqquestionnoiii})%
+ \fi}}%
+}
+\end{Verbatim}
+Ugly isn't it. We need to set the header in all cases: with or without a title;
+multiple questions within a \texttt{questions} environment, or a single question
+with no \texttt{questions} environment.
+
+\newtopic A simple re-definition might be
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\def\eq@fancyQuizHeadersfmt{{\protect\color{blue}\protect
+ \textbf{\ifx\aebTitleQuiz\@empty
+ \ifnum\@eqquestiondepth>0
+ Solution to Quiz\fi\else
+ \aebTitleQuiz\protect\
+ \ifnum\@eqquestiondepth=0\else\\Question%
+ \fi\fi\space
+ \ifcase\@eqquestiondepth
+ \ifx\aebTitleQuiz\@empty Solution to Quiz\fi
+ \or\arabic{eqquestionnoi}.\or
+ \arabic{eqquestionnoi}(\alph{eqquestionnoii})\or
+ \arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ (\roman{eqquestionnoiii})%
+ \fi}}%
+}
+\end{Verbatim}
+
+\noindent The colons (\texttt{:}) are removed and a \verb!\\! inserted in the fourth
+line; that line now reads, in part, \verb!\else\\Question\fi!, instead of
+\verb!\else Question\fi!.
+
+\newtopic The results of these changes, in combination with the earlier
+change of
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\setsolnspace{\par\medskip\noindent}
+\end{Verbatim}
+\noindent are
+
+\begin{quote}
+\newtopic{\color{blue}Two Question MC\\Question 1.}\par\medskip\noindent The answer is true, of course, math is fun!
+\end{quote}
+
+\newtopic Other (minor) changes such as color, style, font can be done in this way.
+
+\newtopic As a reminder, you can use the web package's switch, \Com{ifeqforpaper} to further
+refine these headers. You can have one style of solution headers for paper, and another
+style for the screen.
+
+\subsection{Adding Points to a Quiz}\label{sss:asignPts}
+
+%The discussion of this topic can be found in \Nameref{sss:asignPts}.
+
+%\subsubsection{Assigning Points}\label{sss:asignPts}
+
+The questions on a quiz, especially a quiz meant for credit, may
+not have the same weight. A point scheme, therefore, has been
+created; several additional text fields in support have also been
+defined.
+
+Here is a simple two question example to illustrate:
+
+\begin{quiz*}{mathquiz} Answer each of the following. Passing
+is 100\%.\hfill\smash{\GradeField[\rectH{30bp}\rectW{30bp}\textSize{0}]\currQuiz}
+
+\begin{questions}
+
+\PTsHook{($\eqPTs^{\text{pts}}$)}
+
+\item\PTs{4} If $\lim_{x\to a} f(x) = f(a)$, then we say that $f$ is\dots
+\begin{answers}{4}
+\Ans0 differentiable &\Ans1 continuous &\Ans0 integrable
+\end{answers}
+
+\item\PTs{6} Name \emph{one} of the two people recognized as a founder of
+Calculus.\\[1ex]
+\RespBoxTxt{0}{0}{4}{Isaac Newton}{Newton}{Gottfried Leibniz}{Leibniz}%
+\CorrAnsButton{Isaac Newton or Gottfried Leibniz}
+
+\end{questions}
+\end{quiz*}\quad\ScoreField\currQuiz\CorrButton\currQuiz
+
+\noindent
+Answers: \AnswerField\currQuiz
+
+\medskip\noindent
+Points: \PointsField\currQuiz\ Percent: \PercentField\currQuiz
+
+%\exPDF{quizpts} See the sample file
+%\href{\bUrl/webeq_ex.html\#quizpts}{quizpts.tex} for a more
+%elaborate version of this question, as well as the source code.
+
+\exAeBBlogPDF{p=1054} See source file for the PDF
+\texttt{\href{\urlAcroTeXBlog/?p=1054}{quizpts.pdf}} for a more elaborate
+version of this question, as well as the source code.
+
+
+\begin{questions}
+\item \verb+\PTs#1+: This macro takes one argument, the number of
+points to be assigned to the current problem. Place this command
+immediately after the \cs{item} in the \textsf{questions} environment.
+For example, in the above quiz we had
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\item\PTs{6} Name \emph{one} of the two people recognized
+ as a founder of Calculus.
+\end{Verbatim}
+\item \verb+\PTsHook#1+: This macro, which takes one argument, can
+be used to typeset the points assigned. and is called by
+\cs{PTs}. The argument is what is to be typeset. The value
+assigned the current problem by \cs{PTs} is contained within the
+macro \cs{eqPTs}. In the quiz above, we had
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\PTsHook{($\eqPTs^{\text{pts}}$)}
+\end{Verbatim}
+
+\item There are three other commands that create text fields to
+display results from a quiz with points assigned:
+\begin{itemize}
+ \item \verb+\PointsField[#1]#2+: The number of points earned for the quiz, the
+ total points are also reported. The parameter \texttt{\#2} is the base name
+ of the quiz.
+ \item \verb+\PercentField[#1]#2+: The percentage score for the
+ quiz. The parameter \texttt{\#1} is the base name of the quiz.
+ \item \verb+\GradeField[#1]#2+: The letter grade of the
+ performance on the quiz. The parameter \texttt{\#2} is the
+ base name of the quiz. The values placed in this field are determined
+ by the macro \cs{eqGradeScale}.
+\end{itemize}
+\item \cs{eqGradeScale}: This macro sets the grade scale of a quiz, the default
+definition is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\eqGradeScale{"A",[90, 100],"B",[80,90],
+ "C",[70,80],"D",[60,70],"F",[0,60]}
+\end{Verbatim}
+\noindent The ways things are defined now, there can be only one grade scale
+per document. The value of \cs{eqGradeScale} is a matrix with an
+even number of elements. The odd numbered elements are the grades;
+the even number elements are intervals of percentages (percentages
+of the total number of points on the quiz). If the percentage of
+the score falls into a particular range, the corresponding grade
+is assigned.
+
+\item[] Note, obviously, you can redefine this command. The
+letter grades do not actually have to be grades, they can be little
+messages to the student upon completion of the quiz.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\eqGradeScale{%
+ "Excellent Work.",[90, 100],
+ "Solid Effort.",[80,90],
+ "Fair.",[70,80],
+ "Needs improvement, better work expected.",[60,70],
+ "Learning still in progress.",[0,60]
+}
+\end{Verbatim}
+\end{questions}
+
+\subsubsection{\texorpdfstring{\protect\cs{negPointsAllowed}}{\CMD{negPointsAllowed}}}\label{negPtsAllowed}
+
+The \texttt{answers} and \texttt{manswers} environments allow for partial credit,
+and even assigning of negative points for wrong answers (see \Nameref{manswersQuiz});
+consequently, it is possible for a student taking a quiz to get a
+negative points for the quiz. By default \textsf{exerquiz} reports a point score of zero
+to \cs{PointsField} if the points are negative.
+
+If you want exerquiz to report the true point score, use the command
+\cs{neg\-Points\-Allowed} in the preamble. This will allow the reporting
+of a negative point total.
+
+%\exPDF{manswers} See the example file for this feature \texttt{manswers.tex}.
+%Compare the results of when the default behavior is used, versus
+%the results when \cs{negPointsAllowed} is used in the preamble.
+
+\exAeBBlogPDF{p=903} See the source file for the PDF \texttt{\href{\urlAcroTeXBlog/?p=903}{manswers.pdf}}.
+Compare the results of when the default behavior is used, versus
+the results when \cs{negPointsAllowed} is used in the preamble.
+
+\subsection{Floating a Quiz}\label{floatQuiz}
+
+The quiz structure is to have a `Begin Quiz' button or link at the
+beginning of the quiz and an `End Quiz' button or link at the end.
+In some settings, you might want to place the `Begin Quiz' button on
+another page, with, perhaps, some instructions. For this purpose
+\textsf{exerquiz} defines five commands \Com{DeclareQuiz},
+\Com{floatQuiz}, \Com{startQuizHere}, \Com{endQuizHere} and
+\Com{dockQuiz}.
+
+The \cs{DeclareQuiz} command takes one argument, which is the name
+of the quiz, for example \verb!\DeclareQuiz{myQuiz}!. This command
+takes it argument and creates a text macro \cs{currQuiz}, which
+expands to the quiz name. \cs{currQuiz} can then be used in the
+\texttt{quiz} environment command argument for the quiz name. This
+makes it easy to change the names without having to search through
+and make all changes.
+
+The command \cs{floatQuiz} declares the current quiz, as set by the
+\cs{DeclareQuiz} command, is floating, which means the `Begin Quiz' and
+`End Quiz' link-text or buttons are separated from their usual placement
+and are allowed to ``float.'' The third command \cs{startQuizHere}
+inserts the `Begin Quiz' link text or form button, while the
+\cs{endQuizHere} command inserts the `End Quiz' link or form button.
+
+\newtopic For example,
+
+\DeclareQuiz{myQuiz}
+\useBeginQuizButton[\CA{Start}\RC{the}\AC{Quiz}\BC{}\W0]
+\useEndQuizButton[\CA{End}\RC{the}\AC{Quiz}\BC{}\W0]
+\floatQuiz
+
+\begin{flushleft}
+\fcolorbox{blue}{webyellow}{\begin{minipage}{.67\linewidth}
+Solve each of the following problems. To begin the quiz,
+click on the \startQuizHere\space button.
+\end{minipage}}
+\end{flushleft}
+
+\begin{quiz}{\currQuiz}
+Answer these questions truthfully.
+\begin{questions}
+ \item Do you understanding the concept of \cs{floatQuiz}?
+ \begin{answers}{4}
+ \Ans1 Yes & \Ans0 No
+ \end{answers}
+ \item Do you understanding the concept of \cs{dockQuiz}?
+ \begin{answers}*{4}
+ \Ans0 Yes & \Ans1 No
+ \begin{solution}
+ You can't understand it until I explain it!
+ \end{solution}
+ \end{answers}
+\end{questions}
+\end{quiz}\ScoreField\currQuiz\CorrButton\currQuiz
+
+\begin{flushleft}
+\fcolorbox{blue}{webyellow}{\begin{minipage}{.67\linewidth}
+After you have finished the quiz, click on the
+\endQuizHere\space button. Click the\ \smash[b]{\CorrButton[\CA{Correct}\RC{the}\AC{Quiz}\S{S}\BC{}\W0]\currQuiz}\ button
+if you
+wish and your quiz will be marked. Click on the choice with
+the green border to jump to the solution.
+\end{minipage}}
+\end{flushleft}
+\dockQuiz
+
+\newtopic To return to the default behavior of the quiz environment
+place \cs{dockQuiz} following the quiz. Quizzes that come
+after the \cs{dockQuiz} will then have the standard quiz format.
+
+%\exPDF{floatquiz} See the example file \texttt{floatquiz.tex} for the {\LaTeX} code of the above example.
+
+\exAeBBlogPDF{p=897} See the source file for the PDF
+\texttt{\href{\urlAcroTeXBlog/?p=897}{floatquiz.pdf}} for the {\LaTeX} code
+of the above example.
+
+
+\section{Objective Style Questions}\label{s:oQ}
+
+Beginning with version~2.0 of \textsf{exerquiz}, objective style
+questions can be posed. Single questions can be posed in the
+\texttt{\hyperref[ss:oquestion]{oQuestion}} environment,
+multiple questions can be placed in either the \texttt{shortquiz}
+or the \texttt{quiz} environments. This section discusses this
+type of question and all of its supporting commands.
+
+
+\subsection{Math and Text Questions}
+
+\textsf{Exerquiz} distinguishes between two types of open ended or objective
+questions:
+\begin{questions}
+\item A mathematical question that requires a mathematical expression
+as the answer.
+\item A question that requires a text answer.
+\end{questions}
+
+\redpoint The demo file \texttt{jquiztst.tex} is an important
+source of examples and instruction for the mathematical type
+question; additionally, the file \texttt{jtxttst.tex} has many
+examples for the text type question.
+
+
+\subsubsection{The Mathematical Question}
+
+At this stage in the development of \textsf{exerquiz}, a
+(mathematical) question can be posed that requires an answer that
+is a function of one or more declared variables $x$, $y$, $z$, etc.
+Thus, when the declared variables $x$, $y$, $z$ are given a value,
+the answer is reduced to a number.
+%\begin{questions}
+%\item A question that has a numerical value.
+%\item A question that has a symbolic answer in one variable, $x$.
+%The symbolic answer must reduce, however, to a numerical value
+%when $x$ is given a numerical value.
+%\end{questions}
+%Thus, only questions whose answers can be reduced to numerical
+%values can be posed.
+
+For example, the answer to the question ``Differentiate $\frac
+d{dx} \sin^2(x)$'', is a function in one variable $x$, it can be
+evaluated numerically and can, therefore, be posed:
+
+\begin{oQuestion}{ex1}
+\redpoint Differentiate $\dfrac d{dx} \sin^2(x) =
+$\space\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}
+\end{oQuestion}
+
+\smallskip
+See \Nameref{ss:respbox} for details.
+
+In contrast, consider the question: ``Name the probability
+distribution popularly referred to as the `bell-shaped curve' ''.
+The answer to this question cannot be reduced to a numerical
+value. This question can be posed as an \hyperref[sss:oTxtQ]{text
+objective question}, or, it does lend itself to a multiple choice
+question, however.
+
+\subsubsection{The Text Question}\label{sss:oTxtQ}
+
+You can also pose questions that require a text answer:
+
+\redpoint\begin{oQuestion}{exTxt2}
+Name the probability
+distribution popularly referred to as the ``bell-shaped curve''.\\
+\RespBoxTxt{0}{0}{4}{Normal}{Normal Distribution}{Gaussian}{Gaussian Distribution}
+\end{oQuestion}
+
+See \Nameref{ss:respboxtxt} for details.
+
+\subsection{The \texttt{oQuestion} Environment}\label{ss:oquestion}
+
+The \texttt{oQuestion} environment is a very simple environment
+for posing a \textit{single} question and will be used in this
+section to discuss in detail the macros for posing mathematical
+and text open questions.
+
+The syntax for the \texttt{oQuestion} environment is
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{oQuestion}{!ameta(field_name)}
+ !ameta(A math or text open ended question.)
+\end{oQuestion}
+\end{Verbatim}
+\noindent The environment takes one required argument, a unique name for the question.
+This name, \texttt{field\_name}, is used by other supporting
+macros.
+
+\subsubsection{\texorpdfstring{\protect\cs{RespBoxMath}}
+{\textbackslash RespBoxMath}: The Math Question}\label{ss:respbox}
+
+%\subsubsection{\texorpdfstring{\protect\cs{RespBox},
+%\protect\cs{Resp\-BoxNT}}{\textbackslash RespBox, \textbackslash
+%RespBoxNT}}
+
+The \cs{RespBoxMath} command is used for posing an objective
+question. This command must appear in the \texttt{oQuestion},
+\texttt{short\-quiz} or \texttt{quiz} environments. In this
+section we discuss only the \texttt{oQuestion} environment.
+
+The following is a \hypertarget{minExample}{minimal example}.
+Additional enhancements will be discussed in subsequent sections.
+
+\begin{oQuestion}{sine1}
+\redpoint Differentiate $\dfrac d{dx} \sin^2(x) =
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{[0,1]}$
+\end{oQuestion}
+\par\medskip\noindent
+The code for the above example is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{oQuestion}{sine1}
+\redpoint Differentiate $\dfrac d{dx} \sin^2(x) =
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{[0,1]}$
+\end{oQuestion}
+\end{Verbatim}
+\noindent The \cs{RespBoxMath} need not appear in math mode. The definition
+of the \cs{redpoint} command, a command written for this document follows.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\redpoint{\par\removelastskip\vskip\medskipamount\noindent
+ \makebox[\parindent][l]{\large\color{red}$\blacktriangleright$}}
+\end{Verbatim}
+
+\newtopic You can also pose multivariate questions as well, for example
+
+\begin{oQuestion}{multivariate}
+\redpoint $\dfrac{\partial}{\partial y} {4 x^2 y^3 }
+ = \RespBoxMath{12*x^2*y^2}(xy){4}{.0001}{[0,1]x[0,1]}$
+\end{oQuestion}
+\par\medskip\noindent
+The code for the above example is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{oQuestion}{multivariate}
+\redpoint $\dfrac{\partial}{\partial y} {4 x^2 y^3 }
+ = \RespBoxMath{12*x^2*y^2}(xy){4}{.0001}{[0,1]x[0,1]}$
+\end{oQuestion}
+\end{Verbatim}
+\noindent See the file \texttt{multivar.tex} for more examples
+quizzes involving multivariate problems.
+
+The algorithm used for determining the correctness of the answer
+entered by the user is very simple: The user's answer and the
+correct answer are evaluated at randomly selected points in an
+interval, then compared. If any of the comparisons differ by more
+than a pre-selected amount, an $\epsilon$ value, if you will, the
+user's answer is declared incorrect; otherwise, it is considered
+correct.\footnote{The idea for evaluating user input in this way
+comes from Drs.\ Wlodzimierz Bryc and Stephan Pelikan of The
+University of Cincinnati.}
+
+\newtopic The command \cs{RespBoxMath} takes ten parameters,
+five optional and five required:%\hypertarget{respboxargs}{}
+\begin{dCmd}{.67\linewidth}
+\RespBoxMath[#1]#2(#3)[#4]#5#6#7#8[#9]*#10
+\end{dCmd}
+\paragraph*{Parameters:}\label{paraRespBox}
+\begin{description}
+\item[\ttfamily\#1 :] Optional parameter used to modify the appearance of the
+ text field. See the section entitled \nameref{sss:CorrButton} for examples, and \textsf{exerquiz.dtx}
+ for a listing of all controlling macros.
+\item[\ttfamily\#2 :] The correct answer to the question.
+ This must be a numerical value, or a function of one or more variable(s).
+
+\item[\ttfamily\hypertarget{paraRespBoxThree}{\#3} :] An optional parameter, \textit{delimited by
+parentheses}, that defines the independent variable; \texttt{x},
+is the default value. Note that this parameter is set off by
+parentheses. For a multivariate question, just list the variables
+in juxtaposition, \texttt{(xyz)}.
+
+Beginning with version 5.5 of \textsf{exerquiz}, an alternate
+method is to delimit with commas \texttt{(x,y,n)} and include the
+type of the variables \texttt{(r:x,r:y,i:n)}, where \texttt{"r"}
+means a real variable and \texttt{"i"} means an integer variable.
+When a type is not specified explicitly, \texttt{"r"} is assumed.
+The variables must be either of the old style (no commas, no
+typing) or the new style. Do not mix the styles.
+
+See the \hyperlink{exofT}{example} in \Nameref{enhancements}
+of the section below and see the demo file \texttt{integer\_test.tex} to
+demonstrate the new method for specifying variables, found in the
+\texttt{dljslib\_examples} folder.
+
+%\item[\ttfamily\#3 :] An optional parameter, \textit{delimited by parentheses},
+%that defines the independent variable; \texttt{x}, is the default value. Note
+%that this parameter is set of by parentheses.
+
+\item[\ttfamily\#4 :] Optional, a named destination to the solution to the
+question. There are two forms: the \texttt{[mydest]} an explicit destination for the solution to the problem, or
+a `\texttt*', in which case, the name is
+\texttt{[\string\curr@quiz.\string\thequestionno]} is automatically assigned.
+
+If this parameter appears, a solution must follow the
+question, enclosed in a \texttt{solution} environment.
+
+
+\item[\ttfamily\#5 :] The number of samples points to be used, usually 3 or 4 is
+sufficient.
+\item[\ttfamily\#6 :] Precision required, a \emph{non-negative} ``$\epsilon$'' value, if you will. If the precision
+is set to zero, \texttt{reldiffCompare} is used as the default compare, and the precision
+is set to a small positive value, \text{1E-14}, by default. The small value is may reset with
+\cs{defaultRDPrecision}. The default definition, \verb!\defaultRDPrecision{1E-14}!.
+
+\item[\ttfamily\#7 :] Parameters \#7 and \#8 are used to define the interval from
+which to draw the sample points. There are two forms: (1) \#7 is the left-hand endpoint
+of the interval and \#8 is the right-hand endpoint (the use of \#7 and \#8 in this form
+is deprecated); (2) the interval is defined by standard interval notation, \texttt{[a,b]}.
+For a multivariate question---one where parameter \#2 lists more than one variable,
+separate the intervals for each variable by a `\texttt{x}', \texttt{[0,2]x[1,2]x[3,4]}.
+\item[\ttfamily\#8 :] (1) \#8 is the right-hand endpoint of the interval (the use of this
+parameter is deprecated); (2) in the second
+case, \#8 is not used.
+
+\item[\ttfamily\#9 :]\label{paraRespBoxNine} This optional parameter is the name of a customized
+comparison function.
+
+Beginning with version 5.5 of \textsf{exerquiz}, this argument can also be
+a JavaScript object with at most two properties: \texttt{priorParse} and
+\texttt{comp}. \texttt{priorParse} is used to insert additional JavaScript
+into \texttt{ProcResp} prior to processing the user's answer; this allows
+additional ``filtering'' of the user's response. The value of
+\texttt{priorParse} can either be a single function, or an array of
+functions. These functions take \texttt{UserAns} as its argument and
+return either \texttt{null}, if \texttt{UserAns} is not acceptable, or
+\texttt{true}, if it is ok for processing. The value of \texttt{comp} is
+the name of the function to be used to compare answers.
+
+See the demo file \texttt{integer\_tst.tex} for examples of usage.
+
+%There is a built-in filter function, \texttt{requireForm}, that may be quite useful
+%for filtering out responses that that are not of a specified form. See
+
+\item[\ttfamily\#10:] (Only detected if following an asterisk, `\texttt*')
+The name of a JavaScript function that is to be used to process the user input.
+\end{description}
+
+\redpoint For the above example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{[0,1]}
+\end{Verbatim}
+\noindent no optional parameter is specified. The correct answer written in
+valid JavaScript is given by \verb+2*sin(x)*cos(x)+; evaluation of the
+user's answer is done by randomly selecting 4 points from the
+interval $[\,0,1\,]$; if the evaluation at any of the 4 points
+differs from the evaluation of the correct answer at the same
+point by more than $\epsilon=0.0001$, the user's answer is
+considered wrong.
+
+Once you choose the question to ask, you must then select the
+values of the parameters for \cs{RespBoxMath}.
+
+\noindent\redpoint \textbf{Some Comments}:
+\begin{questions}
+\item The correct answer can be written either with valid JavaScript,
+or in the same syntax a user would enter the answer with. The
+functions and operators are pretty much as expected. See the
+demo file \textsf{jquiztst.tex} for some discussion how authors
+and users should enter their answers.
+
+\item The interval from which the sample points are taken
+needs to be chosen with care. The interval must, obviously, be a
+subset of the domain of the answer function. Choose an interval
+away from any singularities the answer may have.
+
+%\item The JavaScript of Acrobat 5.0 does have exception
+%handling, but this has not been incorporated into the code yet.
+%Taking advantage of this new capability will be my next project.
+%Exception handling will give the code protection against user's
+%entering spurious answers. For example, based on the correct
+%answer, the author chooses the interval $[\,0,1\,]$, but the user
+%enters a function whose domain does not contain the interval, such
+%as \verb=(x-1)^(1/2)=.
+\end{questions}
+
+%\exPDF{jquiztst} See the file \href{\bUrl/webeq_ex.html\#jquiztst}
+%{jquiztst.pdf} for various examples of the math questions.
+
+\exAeBBlogPDF{p=810} See the PDF file
+\texttt{\href{\urlAcroTeXBlog/?p=810}{jquiztst.pdf}} for various examples of
+the math questions.
+
+\newtopic\indent
+By using the optional first parameter, you can modify the appearance
+of the field ``locally.'' There is also a ``global'' mechanism as well:
+
+\newtopic\textbf{Global Modification:} \cs{everyeqTextField}, \cs{everyRespBoxMath}
+
+\newtopic The first one modifies the appearance of every quiz text field,
+and the second can be used to modify all fields created using
+\cs{RespBoxMath}.
+
+\redpoint See the document \href{eformman.pdf}{eformman.pdf} for complete
+documentation on how to modify a field using the optional first
+argument, and how to use the ``every'' command.\footnote{eforms manual on Web: \url{\bUrl/eformman.pdf}}
+
+\subsubsection{\texorpdfstring{\protect\cs{RespBoxTxt}}%
+ {\textbackslash RespBoxTxt}: The Text Question}\label{ss:respboxtxt}
+
+You can also pose a question that takes a simple text response. The
+basic command for posing this type of question is
+\cs{RespBoxTxt}. Consider the example given
+earlier:
+\begin{oQuestion}{exTxt1}
+\redpoint Name the probability
+distribution popularly referred to as the ``bell-shaped curve''.\\
+\mbox{\strut\RespBoxTxt{0}{0}{4}{Normal}{Normal Distribution}%
+{Gaussian}{Gaussian Distribution}}
+%\raisebox{-3bp}{\RespBoxTxt{0}{0}{4}{Normal}{Normal Distribution}%
+%{Gaussian}{Gaussian Distribution}}
+\end{oQuestion}
+
+The underlying JavaScript compares the user's response against
+acceptable alternatives, as supplied by the author of the
+question. If there is a match, the response is deemed correct.
+
+The code for this example is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{oQuestion}{exTxt1}
+\redpoint Name the probability distribution popularly
+referred to as the ``bell-shaped curve''.\\
+\RespBoxTxt{0}{0}{4}{Normal}{Normal Distribution}%
+{Gaussian}{Gaussian Distribution}
+\end{oQuestion}
+\end{Verbatim}
+
+\noindent The command \cs{RespBoxTxt} takes five or more parameters.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\RespBoxTxt[#1]#2#3[#4]#5!ameta(list of alternatives)
+\end{Verbatim}
+\noindent\textbf{\hypertarget{paraRespBoxTxt}{Parameters:}}
+\begin{description}
+\item[\ttfamily\#1 :] Optional parameter used to modify the appearance of the
+ text field. See the section entitled \nameref{sss:CorrButton},
+ page~\pageref*{sss:CorrButton} for examples, and
+ \textsf{exerquiz.dtx} for a listing of all controlling macros.
+\item[\ttfamily\#2 :] This required parameter is a number that indicates
+the filtering method to be used. Permissible values of this parameter are
+\begin{description}
+ \item[\ttfamily -1: ] (The default) The author's and user's answers are not filtered
+ in any way. (Spaces, case, and punctuation are preserved.)
+ \item[\ttfamily 0: ] The author's and user's answers are converted to
+ lower case, any white space and non-word characters are removed.
+ \item[\ttfamily 1: ] The author's and user's answers are converted to
+ lower case, any white space is removed.
+ \item[\ttfamily 2: ] The author's and user's answers are stripped of any
+ white space.
+\end{description}
+See the JavaScript function \texttt{eqFilter} in \texttt{exerquiz.dtx} for the
+program code details. Additional filtering options may be added.
+
+\item[\ttfamily\#3 :] This parameter a number that indicates the compare
+method to be used. Permissible values of this parameter are
+\begin{description}
+ \item[\ttfamily 0: ] (The default) The author's and user's answers are
+ compared for an exact match. (These answers are filtered before they are
+ compared.)
+ \item[\ttfamily 1: ] The user's response is searched in an attempt to
+ get a substring match with the author's alternatives. Additional comparison
+ methods may be added.
+\end{description}
+See the JavaScript function \texttt{compareTxt} in \texttt{exerquiz.dtx} for the
+program code details.
+
+\item[\ttfamily\#4 :] Optional, a named destination to the solution
+to the question. If this parameter appears, then a solution must
+follow the question, enclosed in a \texttt{solution} environment. If
+the fourth parameter is a `\texttt*', then an automatic naming scheme
+is used instead.
+\item[\ttfamily\#5 :] This required parameter is the number of alternative
+answers that are acceptable. The alternative answers are listed
+immediately after this parameter. (The example above specified
+that 4 alternatives follow.)
+\end{description}
+
+%\exPDF{jtxttst} See the file \href{\bUrl/webeq_ex.html\#jtxttst}
+%{jtxttst.pdf} for examples of the differences between various combinations
+%of filtering rules and comparison methods.
+
+\exAeBBlogPDF{p=813} See the PDF file
+\texttt{\href{\urlAcroTeXBlog/?p=813}{jtxttst.pdf}} for examples of the
+differences between various combinations of filtering rules and comparison
+methods.
+
+
+\newtopic By using the optional first parameter, you can modify the appearance
+of the field ``locally''. There is also a ``global'' mechanism as well:
+
+\newtopic\textbf{Global Modification:} \cs{everyeqTextField} and \cs{everyRespBoxTxt}
+
+\newtopic The first mechanism modifies the appearance of every quiz text
+field, the second can be used to modify all fields created using
+\cs{RespBoxTxt}.
+
+\redpoint See the document \href{eformman.pdf}{eFormMan.pdf} on
+\textit{\href{eformman.pdf}{eForm Support}} for complete
+documentation on how to modify a field using the optional first
+argument, and how to use the ``every'' command.\footnote{eforms manual on Web: \url{\bUrl/eformman.pdf}}
+
+\subsubsection{\texorpdfstring{\protect\cs{RespBoxTxtPC}}%
+ {\textbackslash RespBoxTxtPC}: The Text Question with Partial Credit}\label{ss:respboxtxtpc}
+
+\textsf{Exerquiz} can now create text fill-in questions that awards
+credit each time one of the key words are found in the student's input string.
+
+\newtopic The command \cs{RespBoxTxtPC} is the one that creates a text fill-in question. Its
+syntax is
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()]
+\RespBoxTxtPC[#1]#2[#3]#4[!meta(num1)]{!meta(word1)}...[!meta(num_n)]{!meta(word_n)}
+\end{Verbatim}
+The new command \cs{RespBoxTxtPC} behaves differently than \cs{RespBoxTxt}.
+JavaScript performs a regular expression search for each word listed (the word,
+can be a regular expression), if the word is found (the search is successful), the total credit
+for this problem is incremented by the amount associated with the word.
+
+\medskip\noindent\textbf{\hypertarget{paraRespBoxTxtPC}{Parameters:}}
+\begin{enumerate}
+\item[\ttfamily\#1:]Optional parameter used to modify the appearance of the
+ text field.
+\item[\ttfamily\#2:]This required parameter is a number indicating
+the filtering method to be used. Permissible values of this parameter are
+\begin{enumerate}
+ \item[\ttfamily-1:] (The default) The author's and user's answers are not filtered
+ in any way. (Spaces, case, and punctuation are preserved.)
+ \item[\ttfamily0:] The author's and user's answers are converted to
+ lower case, any white space and non-word characters are removed.
+ \item[\ttfamily1:] The author's and user's answers are converted to
+ lower case, any white space is removed.
+ \item[\ttfamily2:] The author's and user's answers are stripped of
+ white space.
+ \item[\ttfamily 3:] Same as -1, but a case insensitive search is performed.
+ \emph{This is the recommended value for this function.}
+\end{enumerate}
+See the JavaScript function \texttt{eqFilter} in \texttt{exerquiz.dtx} for
+program code details. Additional filtering options may be added.
+
+\textbf{Recommendation:} For \cs{RespBoxTxtPC}, use either~-1
+(case sensitive search) or~3 (case insensitive search).
+
+\item[\ttfamily\#3:] Optional, a named destination to the
+solution to the question. If this parameter appears, then a
+solution must follow the question, enclosed in a \texttt{solution}
+environment. If the third parameter is a `\texttt*', then an automatic
+naming scheme is used instead.
+\item[\ttfamily\#4:] This required parameter is the
+number of alternative answers that are acceptable. The alternative
+answers are listed immediately after this parameter.
+\item[]The parameters that follow \texttt{\#4} are of the form
+\texttt{[\meta{num}]\darg{\meta{word}}}. The \texttt{[\meta{num}]} is the amount of credit
+the user gets if his answer contains \meta{word}. Actually,
+\texttt{\meta{word}} can be a regular expression so that a more sophisticated
+search criteria can be set up. This is illustrated in the examples above,
+and explained below.
+
+A \cs{RespBoxTxtPC} question is deemed correct (and marked with a green rectangle,
+in the case of a quiz) if at least one of the words is found.
+
+If a word does not have a partial credit \texttt{[\meta{num}]} before it, that word has a partial
+credit of zero, and may as well not be included in the list of words.
+\end{enumerate}
+
+%\exPDF{jtxttst_pc} The demo file for this section is \texttt{jtxttst\_pc.tex}.
+%The file contains extensive examples, and discusses techniques of searching
+%using regular expressions.
+
+\exAeBBlogPDF{p=296} The demo file for this section is
+\texttt{\href{\urlAcroTeXBlog/?p=296}{jtxttst\_pc.pdf}}. The file contains
+extensive examples, and discusses techniques of searching using regular
+expressions.
+
+
+
+\subsection{Some Enhancements}\label{enhancements}
+
+There are several enhancements to the math (using \cs{RespBoxMath})
+and text (using \cs{Resp\-Box\-Txt}) open-ended question beyond the
+minimal examples given earlier. These enhancements can be used
+within the \texttt{oQuestion}, the \texttt{shortquiz}, and the
+\texttt{quiz} environments.
+
+\subsubsection{Including an Answer Key with \texorpdfstring
+{\protect\cs{CorrAnsButton}}{\textbackslash CorrAnsButton}}
+
+The correct solution can be included in the question as well; just include
+the command \cs{Corr\-Ans\-Button}. This command takes one parameter, the correct
+answer that will be viewed when the user clicks on the button.
+
+The example below also illustrates the (optional) third parameter of
+\cs{RespBoxMath}. Here we pose the question in the variable $t$ rather
+than the default variable of $x$.
+\begin{oQuestion}{sine2}
+\redpoint Differentiate\\[1ex]
+$\dfrac d{dt} \sin^2(t) =$
+\RespBoxMath{2*sin(t)*cos(t)}(t){4}{.0001}{0}{1}\kern1bp\CorrAnsButton{2*sin(t)*cos(t)}
+\end{oQuestion}
+
+\medskip\noindent
+The listing follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{oQuestion}{sine2}\\[1ex]
+\redpoint Differentiate $\dfrac d{dt} \sin^2(t) =$
+\RespBoxMath{2*sin(t)*cos(t)}(t){4}{.0001}{0}{1}\kern1bp
+\CorrAnsButton{2*sin(t)*cos(t)}
+\end{oQuestion}
+\end{Verbatim}
+
+\noindent The \cs{CorrAnsButton} takes one parameter, the correct answer.
+This answer is (usually) the same as the one given as the second
+argument (the optional argument is the first) in the \cs{RespBoxMath}
+command.
+
+\redpoint The \cs{CorrAnsButton} also controls access to the (optional) solution, see
+the next section.
+
+\subsubsection{Including a Solution}\label{inclsoln}
+
+In addition to a correct answer, you can also include a solution
+to the question. Insert the optional fourth parameter---fourth for both
+\cs{RespBoxMath} and \cs{RespBoxTxt}---into the parameter list giving the name of
+the destination to the solution. Follow the question by a \texttt{solution}
+environment containing the solution.
+
+The user \texttt{Shift-Click}s on the \cs{CorrAnsButton} button to jump
+to the solution.
+
+\begin{oQuestion}{sine3}
+\redpoint Differentiate\\[1ex]
+$\dfrac d{dt} \sin^2(t) =$
+\RespBoxMath{2*sin(t)*cos(t)}(t)[sine3]{4}{.0001}{0}{1}\kern1bp\CorrAnsButton{2*sin(t)*cos(t)}
+\begin{solution}
+\[
+ \frac d{dx}\sin^2(x) = 2\sin(x)\cos(x) = \sin(2x)
+\]
+\end{solution}
+\end{oQuestion}
+
+\medskip\noindent
+The listing follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{oQuestion}{sine3}\\[1ex]
+\redpoint Differentiate $\dfrac d{dt} \sin^2(t) =$
+\RespBoxMath{2*sin(t)*cos(t)}(t)[sine3]{4}{.0001}{0}{1}\kern1bp
+\CorrAnsButton{2*sin(t)*cos(t)}
+\begin{solution}
+\[
+ \frac d{dx}\sin^2(x) = 2\sin(x)\cos(x) = \sin(2x)
+\]
+\end{solution}
+\end{oQuestion}
+\end{Verbatim}
+
+\redpoint The \cs{CorrAnsButton} works the same way for the \texttt{shortquiz} and
+the \texttt{quiz} environments.
+
+\newtopic Actually, \cs{CorrAnsButton} has an optional argument. The full syntax is
+\settowidth{\aebdimen}{\cs{CorrAnsButton\darg{\meta{display\_answer}}*\darg{\meta{JS\_function}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\CorrAnsButton{!meta(display_answer)}*{!meta(JS_function)}
+\end{dCmd}
+\newtopic When the \texttt* is detected following the \meta{display\_answer}, the \meta{JS\_function}
+is used to evaluate \meta{display\_answer}, before displaying it. There is
+one built-in function called \texttt{EvalCorrAnsButton}, the definition of
+which is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+function EvalCorrAnsButton(fieldname,theanswer)
+{
+ theanswer = eval(theanswer);
+ DisplayAnswer(fieldname,theanswer);
+}
+\end{Verbatim}
+Other JavaScript functions may be defined using the \texttt{insDLJS} environment, then
+passed to \cs{CorrAnsButton} with the optional argument.
+
+An example of this optional parameter is
+
+\begin{oQuestion}{add1}
+\redpoint Perform the indicated operation, and enter
+result into the box.\\[1ex]
+$ \text{9} + \text{8} =$
+\RespBoxMath{9 + 8}{1}{.0001}{[0,1]}\kern1bp\CorrAnsButton{9 + 8}*{EvalCorrAnsButton}\kern1bp
+\sqTallyBox
+\end{oQuestion}
+
+\medskip\noindent
+The listing follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{oQuestion}{add1}
+\redpoint Perform the indicated operation, and enter
+result into the box.\\[1ex]
+$ 9 + 8 = $
+\RespBoxMath{9 + 8}{1}{.0001}{[0,1]}\kern1bp
+ \CorrAnsButton{9 + 8}*{EvalCorrAnsButton}\kern1bp
+\sqTallyBox
+\end{oQuestion}
+\end{Verbatim}
+
+
+\subsubsection{Including a Tally Box}
+
+The macro \cs{sqTallyBox} is used to keep a running total of the
+number of wrong answers a user has entered into the response box.
+
+For example,
+
+\begin{oQuestion}{sine4}
+\redpoint \hypertarget{exofT}{Differentiate}\\[1ex]
+$\dfrac d{dx} \sin^2(x) =$
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}\kern1bp\CorrAnsButton{2*sin(x)*cos(x)}\kern1bp
+\sqTallyBox
+\end{oQuestion}
+
+\medskip\noindent
+The listing follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{oQuestion}{sine4}
+\redpoint Differentiate\\[1ex]
+$\dfrac d{dx} \sin^2(x) =$
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}\kern1bp
+\CorrAnsButton{2*sin(x)*cos(x)}\kern1bp
+\sqTallyBox
+\end{oQuestion}
+\end{Verbatim}
+
+\redpoint The tally box can be used within the \texttt{oQuestion}
+and \texttt{shortquiz} environments; in the \texttt{quiz}
+environment, no tally box is used.
+
+\subsubsection{Clearing the Fields}
+
+For the \texttt{oQuestion} and the \texttt{shortquiz}
+environments, you can clear the response box fields by placing
+insert \cs{sqClearButton}.
+
+
+\begin{oQuestion}{sine5}
+\redpoint Differentiate\\[1ex]
+$\dfrac d{dx} \sin^2(x) =$
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}\kern1bp\CorrAnsButton{2*sin(x)*cos(x)}\kern1bp
+\sqTallyBox\kern1bp\sqClearButton
+\end{oQuestion}
+
+
+\medskip\noindent
+The listing follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{oQuestion}{sine5}
+\redpoint Differentiate\\[1ex]
+$\dfrac d{dx} \sin^2(x) =$
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}%
+\CorrAnsButton{2*sin(x)*cos(x)}\kern1bp
+\sqTallyBox\kern1bp\sqClearButton
+\end{oQuestion}
+\end{Verbatim}
+
+\newtopic Notice that I've inserted a \cs{kern1bp} to separate the
+two fields \cs{sqTallyBox} and \cs{sq\-Clear\-Button}. This is to keep
+their borders from overlapping.
+
+\subsection{More on Math Fill-in Questions}\label{s:moremath}
+
+This section covers rules for author and user input into a math fill-in question.
+
+\subsubsection{Comments on Authoring}\label{s:mathauthoring}
+
+When authoring a math fill-in, that is, when using \cs{RespBoxMath} to
+construct a question, several things must be kept in mind.
+
+\begin{itemize}
+ \item The \hyperref[paraRespBox]{second parameter} of \cs{RespBoxMath},
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\RespBoxMath[#1]#2(#3)[#4]#5#6#7#8[#9]*#10
+\end{Verbatim}
+ is the correct answer parameter. You need not compute the
+ correct answer, you can let the JavaScript of exerquiz do that.
+ For example, if the answer is $\sqrt{2}$ you can enter
+ \texttt{sqrt(2)}. All the rules of entering user input outlined
+ in the next section on
+ \begin{NoHyper}`\nameref{ss:userinput}'\end{NoHyper} holds for
+ this second parameter as well.
+
+ \item[] If you choose to restrict user input in some way, perhaps using the \texttt{limitArith}
+ option of \textsf{dljslib}, these limitations only apply to the user input, not to the author's
+ input in parameter \texttt{\#2}. See \Nameref{limitArith} for more information on how to limit
+ arithmetic operations.
+
+ \item The question must posed so as to make it clear to the student what is expected
+ by way of input into the text field, an expression, an equation, and so on.
+
+\end{itemize}
+
+\subsubsection{Comments on User Input}\label{ss:userinput}
+
+When responding to a Math Fill-in question, the student responds by typing
+in an answer. The following notation is expected by \textsf{exerquiz}.
+
+\begin{itemize}
+\item Use \texttt{*} to indicate multiplication: Type \texttt{4*x} for $4x$.
+
+\item[] If the \texttt{ImplMulti} option of the \textsf{dljslib} package is taken, then the
+ student need only type in \texttt{4x} for $4x$. Exerquiz attempts to
+ insert the multiplication symbol \texttt{*} by parsing the user input.
+ For information on, see the section on \Nameref{ImplMulti}.
+
+\item Use \verb|^| to indicate powers: Type \verb|4*x^3| for
+$4x^3$; \verb|12*x^-6| for $12x^{-6}$. Again, if the \texttt{ImplMulti} option is taken,
+entering \verb|12x^-6| is sufficient.
+
+\item Use parentheses to delimit the argument of a function; that is, type
+\texttt{sin(x)}, rather than \texttt{sin~x}.
+
+\item Use parentheses to define the \textit{scope} of an operation: Type \verb|4*x*(x^2+1)^3| for $4x(x^2+1)^3$;
+ \verb|4^(2*x+1)| for $4^{2x+1}$; \verb|(sin(x))^2| for $(\sin(x))^2$. \textit{Do not} type an expression like
+ \verb|sin^2(x)| for $\sin^2(x)$, type \verb|(sin(x))^2| instead.
+
+\item[] If the \texttt{ImplMulti} option of the \textsf{dljslib} package is taken,
+ the use of \texttt{*} is unnecessary, but also the simplified notation for powers
+ of functions is supported, now you can type \verb|sin^2(x)| for $\sin^2(x)$.
+
+\item Brackets \texttt{[ ]} or braces \texttt{\{ \}} can be used
+to delimit mathematical expressions.
+
+\item Functions that are recognized:
+\begin{itemize}
+ \item Trig: \texttt{sin}, \texttt{cos}, \texttt{tan}, \texttt{cot}, \texttt{sec}, \texttt{csc}.
+ \item Inverse Trig: \texttt{arcsin} (or \texttt{asin}) , \texttt{arccos} (or \texttt{acos}),
+ \texttt{arctan} (or \texttt{atan}).
+ \item Logarithms: \texttt{ln} for natural logs, and \texttt{log} for common logs.
+ For example, \texttt{ln(x)} or \texttt{log(x)}.
+ \item Exponential: The natural exponential function, $e^x$,
+ can be entered as \texttt{exp(x)} or as \verb|e^x|.
+ \item The absolute function, \texttt{abs($\cdot$)} can also be written
+ in the usual way \texttt{|$\cdot$|}; thus, you can type either
+ \texttt{abs(x)} or \texttt{|x|}.
+ \item Misc.: \texttt{sqrt}, usage \texttt{sqrt(x)} for $\sqrt{x}$ (or, use
+ exponential notation: \verb|x^(1/2)|).
+ \item[] When the \texttt{combinatorics} option of \textsf{dljslib} is taken, the binomial coefficient function
+ \texttt{C(n,r)}, the permutation function \texttt{P(n,r)}, and the factorial function
+ \texttt{fact}, are defined. See \Nameref{combinatorics} for additional details.
+\end{itemize}
+\end{itemize}
+A variation of these listings should appear as instructions to the student on how to enter
+math fill-in questions.
+
+\newtopic When a user enters a response, some attempt is made to
+determine whether the response is a valid mathematical expression.
+For example, if \texttt{san(x)} is entered, the function `\texttt{san}' will
+not be recognized as a valid mathematical function; an error
+message is generated, and the user is not penalized for a possible
+typing error. The JavaScript routines will also check for
+unbalanced parentheses; thus, \verb|((x^4+1) + sin(x)^2| will be
+flagged as a syntax error.
+
+\Important The student must use the variables declared for the
+problem when entering mathematical expressions. If the problem
+statement involves the variable $x$, then \texttt{x} must be used;
+if the problem statement uses $t$, then \texttt{t} must be used.
+To enter an expression using $t$ when an expression with variable $x$ is expected will,
+no doubt, result in missed problem.
+
+\subsection{The \texttt{shortquiz} Environment}\label{s:oQsq}
+
+The objective question (with or without the presence of a
+correction box, \cs{corr\-Ans\-Button} or a tally box \cs{sqTallyBox})
+can be mixed in with multiple choice questions.
+
+Solutions to the questions can also be included using a
+\texttt{solution} environment. Click on the ``Ans'' button to get
+the answer to a question; shift-click on the ``Ans'' button to get
+the solution.
+
+\begin{shortquiz}[oQsq]
+Answer each of the following. Passing is 100\%.
+
+\begin{questions}
+\item If $f$ is differentiable, then $f$ is continuous.
+\begin{answers}{4}
+\Ans1 True & \Ans0 False
+\end{answers}\hfill\sqTallyBox
+
+\item $\displaystyle\frac d{dx} \sin^2(x) =$
+\RespBoxMath{2*sin(x)*cos(x)}[sinsqx]{4}{.0001}{0}{1}%
+\hfill\CorrAnsButton{2*sin(x)*cos(x)}%
+\kern1bp\sqTallyBox
+\begin{solution}
+\[
+ \frac d{dx}\sin^2(x) = 2\sin(x)\cos(x) = \sin(2x)
+\]
+\end{solution}
+
+\item Name \emph{one} of the two people recognized as a founder of
+Calculus.\vadjust{\kern3pt}\newline
+\RespBoxTxt{2}{0}[newton]{5}%
+{Isaac Newton}{Newton}{I. Newton}{Gottfried Leibniz}{Leibniz}\hfill
+\CorrAnsButton{Isaac Newton or Gottfried Leibniz}\kern1bp\sqTallyBox
+\end{questions}
+\begin{solution}
+Yes, Isaac Newton and Gottfried Leibniz are considered founders of
+Calculus.
+\end{solution}
+\end{shortquiz}%\hfill
+%\begin{flushright}
+%\sqClearButton\kern1bp\sqTallyTotal
+%\end{flushright}
+
+\redpoint When using objective questions within a
+\texttt{shortquiz} environment, you must give a unique field name
+as an optional argument of the environment. The listing of this
+example follows:
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{shortquiz}[oQsq] % <-- unique field name
+Answer each of the following. Passing is 100\%.
+\begin{questions}
+
+\item If $f$ is differentiable, then $f$ is continuous.
+\begin{answers}{4}
+\Ans1 True & \Ans0 False
+\end{answers}\hfill\sqTallyBox
+
+\item $\displaystyle\frac d{dx} \sin^2(x) =$
+\RespBoxMath{2*sin(x)*cos(x)}[sinsqx]{4}{.0001}{0}{1}%
+\hfill\CorrAnsButton{2*sin(x)*cos(x)}%
+\kern1bp\sqTallyBox
+\begin{solution}
+\[
+ \frac d{dx}\sin^2(x) = 2\sin(x)\cos(x) = \sin(2x)
+\]
+\end{solution}
+
+\item Name \emph{one} of the two people recognized
+as a founder of Calculus.\vadjust{\kern3pt}\newline
+\RespBoxTxt{2}{0}[newton]{5}{Isaac Newton}{Newton}{I. Newton}%
+{Gottfried Leibniz}{Leibniz}\hfill
+\CorrAnsButton{Isaac Newton or Gottfried Leibniz}%
+\kern1bp\sqTallyBox
+\begin{solution}
+Yes, Isaac Newton and Gottfried Leibniz are considered
+founders of Calculus.
+\end{solution}
+\end{questions}
+\end{shortquiz}
+\begin{flushright}
+\sqClearButton\kern1bp\sqTallyTotal %<-- total tally
+\end{flushright}
+\end{Verbatim}
+
+\noindent\textbf{Example Notes:}
+\begin{itemize}
+\item Note the optional argument gives this collection of
+questions a common base name. All supporting macros use this name.
+\item The named destination to the solution is entered with parameter
+\texttt{\#5} of the command \hyperref[paraRespBox]{\cs{RespBoxMath}}, and with parameter
+\texttt{\#4} of \hyperlink{paraRespBoxTxt}{\cs{RespBoxTxt}}.
+\item In this example, another built-in macro,
+\cs{sqTallyTotal} was used. This macro creates a text field that
+accumulates the totals of all the tally boxes.
+\end{itemize}
+
+\redpoint The \texttt{shortquiz} environment can also be used for
+a single objective question. Just don't use the
+\texttt{questions} environment within.
+
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{shortquiz}[anExample]
+ !ameta(an objective style question)
+\end{shortquiz}
+\end{Verbatim}
+
+
+\subsection{The \texttt{quiz} Environment}\label{s:oQquiz}
+
+Objective questions can be mixed in with multiple choice questions
+within the \texttt{quiz} environment. When posing an objective
+style question in the \texttt{quiz} environment, use
+\cs{RespBoxMath} and \cs{RespBoxTxt}, and optionally include
+the \cs{CorrAnsButton} button and the \cs{AnswerField} text field.
+
+Since the evaluation of the quiz is delayed until the user has
+finished the quiz, the \cs{sqTally\-Box} macro is not applicable here.
+
+\begin{quiz*}{oQq}
+Answer each of the following. Passing is 100\%.
+
+\begin{questions}
+\item If $f$ is differentiable, then $f$ is continuous.
+\begin{answers}{4}
+\Ans1 True & \Ans0 False
+\end{answers}
+
+\item $\displaystyle\frac d{dx} \sin^2(x) =$
+\RespBoxMath{2*sin(x)*cos(x)}[sinsqx2]{4}{.0001}{0}{1}%
+\hfill\CorrAnsButton{2*sin(x)*cos(x)}%
+\begin{solution}
+\[
+ \frac d{dx}\sin^2(x) = 2\sin(x)\cos(x) = \sin(2x)
+\]
+\end{solution}
+
+\item Name \emph{one} of the two people recognized as a founder of
+Calculus.\vadjust{\kern3pt}\newline
+\RespBoxTxt{2}{0}[leibniz]{5}{Isaac Newton}{Newton}{I. Newton}{Gottfried Leibniz}{Leibniz}\hfill
+\CorrAnsButton{Isaac Newton or Gottfried Leibniz}
+\begin{solution}
+Yes, Isaac Newton and Gottfried Leibniz are considered
+founders of Calculus.
+\end{solution}
+
+\end{questions}
+\end{quiz*}\quad\ScoreField{oQq}\CorrButton{oQq}
+
+\noindent Answers: \AnswerField{oQq}
+
+\redpoint The buttons created by \cs{CorrAnsButton} are hidden
+until the user ends the quiz (and gets scored) and clicks on the
+corrections button (\cs{CorrButton}). The \cs{Corr\-Ans\-Button} should
+not be included if there is no \cs{CorrButton}.
+
+\redpoint Pressing on the ``Ans'' button populates the text
+field created by \cs{AnswerField} with the author's correct answer.
+If there is a solution to the problem, the ``Ans'' button
+is outlined in green. Shift-click on the ``Ans'' button to jump to
+the solution.
+
+\redpoint The \texttt{quiz} environment requires a field name.
+This same name is used by the objective style question as well.
+
+\medbreak
+
+The listing for the above example follows.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{quiz*}{oQq}
+Answer each of the following. Passing is 100\%.
+\begin{questions}
+
+\item If $f$ is differentiable, then $f$ is continuous.
+\begin{answers}{4}
+\Ans1 True & \Ans0 False
+\end{answers}
+
+\item $\displaystyle\frac d{dx} \sin^2(x) =$
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}%
+\hfill\CorrAnsButton{2*sin(x)*cos(x)}%
+
+\item Name \emph{one} of the two people recognized
+as a founder of Calculus.\vadjust{\kern3pt}\newline
+\RespBoxTxt{2}{0}[leibniz]{5}{Isaac Newton}{Newton}{I. Newton}%
+{Gottfried Leibniz}{Leibniz}\hfill
+\CorrAnsButton{Isaac Newton or Gottfried Leibniz}
+\begin{solution}
+Yes, Isaac Newton and Gottfried Leibniz are considered
+founders of Calculus.
+\end{solution}
+\end{questions}
+\end{quiz*}\quad\ScoreField{oQq}\CorrButton{oQq}
+
+\noindent Answers: \AnswerField{oQq}
+\end{Verbatim}
+
+\noindent The \cs{AnswerField} has the following syntax:
+\settowidth{\aebdimen}{\cs{AnswerField[\anglemeta{field\_opts}]\darg{\meta{base\_name}}}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\AnswerField[!anglemeta(field_opts)]{!meta(base_name)}
+\end{dCmd}
+\noindent The parameter \anglemeta{field\_opts} is the typical optional
+parameter for all \textsf{eform} fields; it is used to change the appearance
+of the field. The parameter \meta{base\_name} is the (base) name of the quiz
+this field will hold the answers for.
+
+You may have \cs{AnswerField} commands on several pages---possibly for
+different quizzes. By using the command \cs{resetAnsFieldOnClose}, the
+answer field for the current quiz will be cleared when the page containing
+it closes. You can revert back to the default behavior (answer fields not cleared) by executing
+\cs{noResetAnsFieldOnClose}.
+
+\redpoint There are some additional grade reporting and statistical fields
+defined: \textsf{exerquiz} defines \cs{PointsField}, \cs{PercentField}, and \cs{GradeField}.
+The demo file \texttt{quizpts.tex} illustrates these commands; see also
+the section below entitled \nameref{sss:asignPts}.
+
+\subsubsection{The Prompt Button}
+
+In addition to the \cs{CorrAnsButton}, the document author can
+provide a prompt button (probably not the best descriptive term).
+
+For some quizzes, the author might want to ask a series of
+questions where the answer to one question depends on the correct
+answer of a previous question. In this situation, you'd like to
+provide the correct answer so the student can make a good run at
+the next question. The \cs{@PromptButton} not only provides the
+answer to the question but it also makes the corresponding math
+fill-in read only, so that the student cannot change the answer
+already provided.
+
+Ideally, the student first enters an answer, and once satisfied
+with the answer, can then get the correct answer for future
+questions.
+
+%\redpoint See the demo file \texttt{prompt\_tst.tex} for an example of usage.
+
+\exAeBBlogPDF{p=888} See the demo file \texttt{\href{\urlAcroTeXBlog/?p=888}{prompt\_tst.pdf}} from the {\AcroBlog}
+for an example of usage.
+
+\subsubsection{Grouped Math/Text Fill-in Questions}\label{grouped}
+
+\textsf{Exerquiz} defines a grouping environment, \texttt{mathGrp},
+for math fill-in and \emph{text fill-in} questions where the response to the question
+might require entering text into multiple math fill-in fields.
+
+When you use the \texttt{mathGrp} environment to enclose a set of
+related math questions, you need to use the \cs{CorrAnsButtonGrp}
+button, instead of the \cs{CorrAnsButton} button. The required
+argument for this button is a comma delimited list of the answers
+that appear within the grouped questions. The answers should be
+listed in the same order {\TeX} processes the math (or text)
+questions. The group of questions is processed as if it were a
+single question.
+
+\redpoint For example\dots
+
+\noindent \begin{minipage}{\linewidth}
+\useBeginQuizButton[\textColor{0 0 1}\CA{Begin}\AC{}\RC{}\rectW{}]
+\useEndQuizButton[\textColor{0 0 1}\CA{End}\AC{}\RC{}\rectW{}]
+\begin{quiz*}{grpExample}\PTsHook{($\eqPTs^{\text{pts}}$)}\PTs{3}
+Compute the following cross product:
+\begin{equation*}
+\def\vi#1{\setlength{\fboxrule}{0pt}\setlength{\fboxsep}{1bp}
+\fbox{\RespBoxMath[\rectW{11bp}\Q{1}\textSize{0}]{#1}{1}{.0001}{[0,1]}}}
+%
+ (3\vec i - 2\vec j) \times (\vec i + 5\vec k) = \begin{mathGrp}\PTs*{1}
+ \vi{-10}\,\vec i + \vi{-15}\, \vec j + \vi{2}\,\vec k
+ \end{mathGrp}\tag*{\CorrAnsButtonGrp{-10,-15,2}}
+%
+\end{equation*}
+\end{quiz*}\ $\underset{\text{ScoreField}}{\underbrace{\ScoreField[\DV{}\V{}\rectW{1in}]\currQuiz}}$%
+ \kern1bp$\underset{\text{PointsField}}{\underbrace{\PointsField[\rectW{1in}]\currQuiz}}$\CorrButton[\CA{Correct}\AC{}\RC{}]\currQuiz
+ \hfill Ans: \AnswerField[\rectW{.5in}]\currQuiz
+\end{minipage}
+
+\medskip\noindent
+\textbf{Notes:}
+\begin{questions}
+\item[\color{blue}\ding{042}] If you miss any one of the three
+answers, the \texttt{ScoreField} reports back `\texttt{Score: 0
+out of 1}'. There is only one question there, to get it correct,
+you must answer all three inputs correctly.
+
+\item[\color{blue}\ding{042}] Points can be assigned to the individual
+ responses and a score is given based on the validity of the inputs and
+ the corresponding points. There is a default JavaScript function that
+ scores the results. The author can define a custom JavaScript function
+ to have a more ``exotic'' method of evaluating the group. See the
+ test file \texttt{grp\_test.tex} for details.
+
+\item[\color{blue}\ding{042}]Notice that after you take the quiz
+and click on ``Correct'' button, the ``Ans'' button appears (as
+usual). If you click repeatedly on this ``Ans'' button, you can
+cycle through all answers to this question; the response box is
+highlighted (or put in focus) and the answer appears in the answer
+field provided.
+\end{questions}
+
+\redpoint See the demo file \texttt{grp\_test.tex} for the source
+code of this example, as well as more technical details of the
+\texttt{mathGrp} environment.
+
+\subsection{Modifying Form Elements}
+
+All form elements have a first optional parameter for modifying their appearance,
+and they have an associated ``every'' command for global modifications as well.
+
+\begingroup
+\setlength{\extrarowheight}{1mm}
+\setlength{\tabcolsep}{2mm}
+\begin{longtable}{|>{\ttfamily}l|>{\PBS\raggedright}p{.5\linewidth}|}
+\hline
+\multicolumn2{|c|}{\bfseries Global Modification Commands} \\
+\hline
+\endfirsthead
+\hline
+\multicolumn2{|c|}{\bfseries Global Modification Commands} \\
+\hline
+\endhead
+\hline
+\endfoot
+\multicolumn2{|c|}{For the \texttt{shortquiz} Environment} \\
+\hline
+\cs{Ans} & \cs{everysqRadioButton}\\
+\cs{sqTallyBox} &\cs{everysqTallyBox}\\
+\cs{sqTallyTotal}& \cs{everysqTallyTotal}\\
+\cs{sqClearButton}&\cs{everysqClearButton}\\\hline
+\multicolumn2{|c|}{For the \texttt{quiz} Environment} \\ \hline
+\cs{useBeginQuizButton}&\cs{everyBeginQuizButton}\\
+\cs{useEndQuizButton}&\cs{everyEndQuizButton}\\
+\cs{Ans} & \cs{everyqRadioButton}\\
+\cs{ScoreField}&\cs{everyScoreField}\\
+\cs{CorrButton}&\cs{everyCorrButton}\\
+\cs{AnswerField}&\cs{everyAnswerField}\\
+\cs{PointsField}&\cs{everyPointsField}\\
+\cs{PercentField}&\cs{everyPercentField}\\
+\cs{GradeField}&\cs{everyGradeField}\\\hline
+\multicolumn2{|c|}{For Both Environments} \\ \hline
+\cs{RespBoxMath}&\cs{everyRespBoxMath}\\
+\cs{RespBoxTxt}&\cs{everyRespBoxTxt}\\
+\cs{CorrAnsButton}&\cs{everyCorrAnsButton}
+\end{longtable}
+\par\endgroup
+
+\bigskip
+\handpoint In additional to these, there are other ``every'' commands that effect
+the appearance of the various buttons and text fields. The two commands
+\cs{everyCorrButtonField} and \cs{every\-eqText\-Field} are executed before every
+\texttt{exerquiz} button and text field (respectfully). These can be used to give
+a general uniform appearance for all the short quiz or quiz form elements; use
+the more specific version, as listed in the above table, to make additional refinements
+in appearance.
+
+\redpoint See the document \href{eformman.pdf}{eformman.pdf} (relative link
+\href{eformman.pdf}{eformman.pdf}) for complete documentation on how to
+modify a field using the optional first argument, and how to use the
+``every'' mechanism.
+
+\subsection{Evaluating Equivalent Expressions}
+
+The \hypertarget{EquivExpr}{\cs{RespBoxMath}} macro, and its underlying JavaScript code, is designed to
+determine the correctness of an answer, numerical or symbolic. We can pose
+such questions as ``find the derivative'' of this function or ``find the (definite or
+indefinite) integral'' of that function, and so on. This is all accomplished
+by randomly choosing numbers from a specified interval and evaluating both
+the user's and author's answer to the question; if they are close to each
+other, then the user's answer is called correct. The system works pretty well.
+
+The \textsf{exerquiz} scheme does not perform well with such questions as
+``fully simplify the radical \verb!sqrt(72)!,'' or ``factor the polynomial
+\verb!2x^2-4x+2!;'' in both cases, the student can simply type in
+the given expression and \textsf{exerquiz} will call them equal. Indeed
+it is true that \verb!sqrt(72)! equates to \verb!sqrt(72)! and the polynomial \verb!2x^2-4x+2!
+equates to \verb!2x^2-4x+2!, as is shown by evaluating randomly
+selected numbers from an interval, \textsf{exerquiz}-style!
+
+\newtopic To illustrate, we use the problem of simplifying
+\verb!sqrt{72}!.
+
+\begin{shortquiz}[simplfyIllus]
+Simplify the following radial expression by factoring out all perfect squares.
+
+\newcommand{\Msgi}{"We are expecting a simplification of the radical."}
+\newcommand{\Msgii}{"Write the simplification in standard form, numerical constants first."}
+
+\begin{questions}
+\item Simplify $\sqrt{72}$ by factoring out all perfect squares.
+\begin{equation*}
+ \sqrt{72} = \RespBoxMath{6sqrt(2)}{1}{.0001}{[0,1]}[{%
+ priorParse:\Array(nodec,%
+ \preDenyForm(%
+ /sqrt\refac{\reany+}\redigit+/,\Msgii),%
+ \preReqForm(%
+ /\rechrclass{+-}*\redigit+sqrt\refac{\reany+}/,\Msgi)%
+ ),%
+ postParse:\Array(\postDenyForm(/sqrt(\refac{72}|\refac{8})/)%
+ )%
+ }]\CorrAnsButton{6sqrt(2)}\kern1bp\sqTallyBox
+\end{equation*}
+\end{questions}
+\end{shortquiz}
+\noindent\texttt{Exerquiz} performs its magic by a combination of the
+usual \textsf{exerquiz} processing and new pre- and post-parsing
+techniques, where appropriate code is passed through of the ninth
+parameter of \cs{RespBoxMath}.
+
+\newtopic The verbatim listing follows.\label{verbReqForm}
+\begin{Verbatim}[numbers=left,xleftmargin=\amtIndent,fontsize=\small]
+\item Simplify $\sqrt{72}$ by factoring out all perfect squares.
+\begin{equation*}
+ \sqrt{72} = \RespBoxMath{6sqrt(2)}{1}{.0001}{[0,1]}[{%
+ priorParse:\Array(nodec,%
+ \preDenyForm(%
+ /sqrt\refac{\reany+}\redigit+/,\Msgii),%
+ \preReqForm(%
+ /\rechrclass{+-}*\redigit+sqrt\refac{\reany+}/,\Msgi)%
+ ),%
+ postParse:\Array(\postDenyForm(/sqrt(\refac{72}|\refac{8})/))%
+ }]\CorrAnsButton{6sqrt(2)}\kern1bp\sqTallyBox
+\end{equation*}
+\end{Verbatim}
+It becomes a bit complicated here. \verb!:-)! The ninth parameter can take a
+JavaScript object as its value (The object is opened on line~(3) with a left
+brace (\verb!{!) and is closed in line~(11) with a right brace (\verb!}!).
+This object has three properties: \texttt{comp} for defining the compare function
+(not used in this example); \texttt{priorParse}, which is used to inspect the
+user's input to filter out unwanted responses prior to evaluation; \texttt{postParse} is used
+to look at the user's answer \emph{after} the \textsf{exerquiz}
+evaluation of random points stage. At the \texttt{postParse} stage, it has already
+been determined if the user's answer is correct or incorrect, \texttt{postParse} only applies
+to answers that are \emph{correct}.
+
+\paragraph*{The \texttt{priorParse} property.} See also the (brief) description
+of \texttt{priorParse} as part of the \hyperref[paraRespBoxNine]{ninth parameter},
+page~\pageref*{paraRespBoxNine}. There are new two built-in filter functions which
+are accessed through the helper commands \cs{preDenyForm} and \cs{preReqForm}. As shown
+in the verbatim text, they are both enclosed in \cs{Array()}.
+\begin{itemize}
+ \item \cs{preDenyForm}: The idea behind this filter function is to define regular expressions
+ which if the pattern is present, processing would stop for the user input, and an alert
+ message would appear; that is, we \emph{deny} the user the use of certain defined patterns.
+ There is no penalty, the user has a chance to change his/her
+ answer. \cs{preDenyForm} takes up to two arguments, enclosed in parentheses:
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\preDenyForm(regexp|array_regexps, cMsg)
+\end{Verbatim}
+The first argument is a regular expression or an array of regular expressions.
+The second argument, \texttt{cMsg}, is a string that will be displayed in the alert
+box if the pattern or patterns appear in the user's answer.
+
+When the first argument is an array of regular expressions, the same
+message (\texttt{cMsg}) will appear if any one of the patterns is present.
+The command may be repeated using additional regular expressions with different
+warning messages.
+
+Let's have a look at the above example,
+\begin{Verbatim}[numbers=left,firstnumber=4,xleftmargin=\amtIndent,fontsize=\small]
+priorParse:\Array(nodec,%
+ \preDenyForm(%
+ /sqrt\refac{\reany+}\redigit+/,\Msgii),%
+ \preReqForm(%
+ /\rechrclass{+-}*\redigit+sqrt\refac{\reany+}/,\Msgi)%
+),%
+\end{Verbatim}
+In line~~(4) we begin with \cs{Array} followed by \textsf{dljslib} filter function
+\texttt{nodec}, this function denies the use of decimal numbers, it is important
+in this problem but not our central focus. In line~(5) we begin with \cs{preDenyForm},
+the arguments are on line~(6). The correct answer is \texttt{6sqrt(2)}, we want
+to force the student write the answer in this form, not, for example, as
+\texttt{sqrt(2)6} or \texttt{sqrt(2)*6}, while correct, it bad form. (We will deny them bad form!)
+This will deny them even if not correct, for example, if the student enters
+\texttt{sqrt(3)4}.
+
+To make it easier on the document author, I've defined a series of ``helper commands,''
+and oh, by the way, you should know how to use regular expressions. Let's now examine
+line~(6). First argument is a single regular expression, the second is a command that defines
+the string message to be exhibited if this pattern is found (try it on the working example above
+to see what the message is).
+
+Let's now look at the regular expression (\texttt{/.../} in line~(6).
+\begin{Verbatim}[numbers=left,firstnumber=6,xleftmargin=\amtIndent,fontsize=\small]
+/sqrt\refac{\reany+}\redigit+/
+\end{Verbatim}
+We take each in turn.
+\begin{itemize}
+ \item \texttt{sqrt\cs{refac(\cs{reany+)}}}: we search for the string \texttt{sqrt}
+ followed by the pattern \cs{refac(\cs{reany+)}}. \cs{refac} defines literal parentheses, within
+ these parentheses can by anything \cs{reany+}. The whole sequence expands
+ to the pattern `{\def\\{\eqbs\eqbs}\texttt{sqrt\refac{\reany+}}}'.
+ \item \cs{redigit+}: This command is a macro for one or more digits, it expands
+ to `{\def\\{\eqbs\eqbs}\texttt{\redigit+}}'.
+ \item Summarizing, we deny the student from typing in a square root of
+ anything followed by one or more digits.
+\end{itemize}
+
+\item \cs{preReqForm}: This is the positive version of \cs{preDenyForm}. It uses
+the same syntax
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\preReqForm(regexp|array_regexps, cMsg)
+\end{Verbatim}
+The first argument is a regular expression or an array of regular expressions, the patterns
+are ones that we wish to see in the user's answer. If the user's answer does not
+fit into any of the patterns, an alert is emitted using the optional string
+declared in the second argument, \texttt{cMsg}. The second argument is option, there
+is a default, generic string message that will be shown.
+
+As with \cs{preDenyForm}, let's take a close look at the regular expression.
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\rechrclass{+-}*\redigit+sqrt\refac{\reany+}/
+\end{Verbatim}
+\begin{itemize}
+ \item \cs{rechrclass(+-)*} defines a character class consisting of the characters
+ `\texttt{+-}' the \texttt{*} means zero or more occurrences. (Probably I should use \texttt{?} instead of
+ \texttt{*},
+ meaning 0 or 1 occurrences.) It expands to
+ `{\def\\{\eqbs\eqbs}\texttt{\rechrclass{+-}*}}'.
+ \item \cs{redigit+} describes one or more digits, this would expand to
+ `{\def\\{\eqbs\eqbs}\texttt{\redigit+}}'.
+ \item sqrt\cs{refac(\cs{reany+)}} is the same as before, it describes
+ the square root of anything expression.
+\end{itemize}
+\item[] The \cs{preReqForm} only searches for the specified patterns. For example,
+the responses \texttt{sin(PI/2)6sqrt(2)} and \texttt{6sqrt(2)x} pass both the
+\cs{preDenyForm} (no digits follow the square root),
+and pass the \cs{preReqForm} because both answers have (or do not have) the patterns;
+in the former case, the answer is judged correct, and in the latter case, incorrect.
+You can try to improve the pattern like so
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+/\rebstr\rechrclass{+-}*\redigit+sqrt\refac{\reany+}\reestr/
+\end{Verbatim}
+The \cs{rebstr} (begin string anchor) expands to `\texttt{\^}' and
+represents the beginning of the line, while \cs{reestr} (end string anchor)
+expands to `\texttt{\$}' represents the end of the line. In this case, the user's answer
+is required to begin with an optional plus or minus, followed by one or
+more digits, followed by a square root, followed by the end of the line.
+\end{itemize}
+
+\newtopic Here is that same short quiz with the above changes (and \texttt{*} replaced by
+\texttt{?}).
+
+\begin{shortquiz}[simplfyIllus1]
+Simplify the following radial expression by factoring out all perfect squares.
+
+\newcommand{\Msgi}{"We are expecting a simplification of the radical."}
+\newcommand{\Msgii}{"Write the simplification in standard form, numerical constants first."}
+
+\begin{questions}
+\item $\sqrt{72}$
+\begin{equation*}
+ \sqrt{72} = \RespBoxMath{6sqrt(2)}{1}{.0001}{[0,1]}[{%
+ priorParse:\Array(nodec,%
+ \preDenyForm(%
+ /sqrt\refac{\reany+}\redigit+/,\Msgii),%
+ \preReqForm(%
+ /\rebstr\rechrclass{+-}?\redigit+sqrt\refac{\reany+}\reestr/,\Msgi)%
+ ),%
+ postParse:\Array(\postDenyForm(/sqrt(\refac{72}|\refac{8})/)%
+ )%
+ }]\CorrAnsButton{6sqrt(2)}\kern1bp\sqTallyBox
+\end{equation*}
+\end{questions}
+\end{shortquiz}
+Now try \texttt{sin(PI/2)6sqrt(2)} or \texttt{6sqrt(2)x}, and other aberrant variations.
+
+\paragraph*{The \texttt{postParse} property.} After the
+\texttt{priorParse} stage, \texttt{exerquiz} checks the answer for correctness,
+against the author's answer, using randomly selected numbers. After that comes
+the \texttt{postParse} event. The syntax is the same except there is no warning
+message.
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\preReqForm(regexp|array_regexps)
+\end{Verbatim}
+If the user's \emph{answer is correct} at this stage \textit{and} fits
+into one of the patterns as defined by the regular expressions, the answer
+will then be marked wrong.
+
+Let's look at the post parse code for this example, from line~(10)
+on page~\pageref*{verbReqForm}, we see,
+\begin{Verbatim}[numbers=left,firstnumber=10,xleftmargin=\amtIndent,fontsize=\small]
+postParse:\Array(\postDenyForm(/sqrt(\refac{72}|\refac{8})/))%
+\end{Verbatim}
+Even though there is not an array of filter functions, a filter function
+with arguments must always be enclosed in an array.
+
+Within the array, we execute our \cs{postDenyForm}, it has only one
+argument, a single regular expression:
+\verb!/sqrt(\refac{72}|\refac{8})/!.\footnote{The use of alternation here is
+not needed, an answer involving \texttt{sqrt(72)} would have been filtered out by the
+\cs{preReqForm} filter, do you know why?} There are three ``correct
+answers'' to this problem, they are \texttt{sqrt(72)}, \texttt{3sqrt(8)},
+and \texttt{6sqrt(2)}, this latter one being the only correct answer to
+this question, for the instructions were to factor out \emph{all} perfect
+squares. The regular expression here catches any answer containing
+\texttt{sqrt(72)} or \texttt{3sqrt(8)} and marks it wrong. \verb!:-(!
+
+\paragraph*{List of RegExp helper macros.}
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\def\refac#1{\\(#1\\)}\def\rediv{\\/}\def\repow{\\^}
+\def\redigit{\\d}\def\rechrclass#1{[#1]}\def\reany{.}
+\def\remul{[\\*]}\def\rebstr{\\^}\def\reestr{\\$}
+\end{Verbatim}
+
+\exAeBBlogPDF{p=1020} Refer to the source file of
+\texttt{\href{\urlAcroTeXBlog/?p=1020}{equiv\_expr.pdf}} for working
+examples. Additional examples will (eventually) appear on the
+\href{\urlAcroTeXBlog}{\AcroTeX{} Blog}.
+
+
+\section{Randomizing the Multiple Choices}\label{s:random}
+
+Beginning with version~6.1 of \textsf{exerquiz}, the choices of a
+multiple choice question can be randomized. The \texttt{random.tex}
+macro file by Donald Arseneau is used for this purpose.
+
+%\exPDF{randomize} The demo file for this section is \texttt{randomize.tex}.
+
+\exAeBBlogPDF{p=901} The demo file for this section is
+\texttt{\href{\urlAcroTeXBlog/?p=901}{randomize.pdf}}.
+
+\newtopic The randomization is only allowed if the \texttt{allowrandomize}
+option of \textsf{exerquiz} is used; otherwise, no randomization
+can occur.
+
+The randomization is only defined for choices listed between the
+pair \cs{bChoices} and \cs{eChoices} (see \Nameref{bChoices}). The
+command \cs{bChoices} now takes two optional key-value arguments:
+\begin{itemize}
+ \item \texttt{nCols=\anglemeta{num}}: The number of columns to create, as described
+ on page~\pageref{bChoices}. You can also use the old style by specifying just
+ \anglemeta{num}. Thus, \cs{bChoices[nCols=2]} and \cs{bChoices[2]}
+ are equivalent.
+ \item \texttt{random=\anglemeta{\upshape true|false}}: Specify this option to randomize choices.
+ You can use the key word \texttt{random} instead of
+ \texttt{random=true}. For example, the following commands will randomize the
+ choices, \cs{bChoices[random]}, \cs{bChoices[nCols=2,random]}, or
+ \cs{bChoices[2,random]}. The default is to not randomize the
+ choices.
+\end{itemize}
+
+\newtopic The following is an example of the \texttt{random} option of \cs{bChoices}.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{shortquiz}
+This is a quiz.
+\begin{questions}
+ \item Try to guess the correct answer.
+ \begin{answers}{3}
+ \bChoices[nCols=2,random]
+ \Ans0 1 a choice\eAns
+ \Ans1\label{eq} 2 another choice\eAns
+ \Ans0 3 still another choice\eAns
+ \Ans0 4 another\eAns
+ \Ans0 5 incoming\eAns
+ \Ans0 6 more choices\eAns
+ \Ans0 7 another still\eAns
+ \Ans0 8 too many\eAns
+ \Ans0 9 choices\eAns
+ \eFreeze
+ \Ans0 10 None of these\eAns
+ \eChoices
+ \end{answers}
+\end{questions}
+\end{shortquiz}
+\end{Verbatim}
+
+\newtopic Note the presence of the command \Com{eFreeze}. Any of
+the items listed after \cs{eFreeze} are not randomized, and are
+placed at the end of the list. So, for the example above, the first
+nine items will be randomized, whereas, the last item (None of
+these) will placed at the end of the list.
+
+\newtopic Additional, there are five other commands that support the
+randomization feature.\settowidth{\aebdimen}{\ttfamily\string\saveRandomSeed\quad\string\inputRandomSeed}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\saveRandomSeed!quad\inputRandomSeed
+\end{dCmd}
+
+\newtopic A pseudo-random sequence of numbers requires an initial \emph{seed
+value}. The example file \texttt{random.tex} creates, by default, a
+seed value based on the date and time (the number of minutes since
+midnight); consequently, after every minute, the random sequence
+will change. By setting the value of the count register \cs{randomi},
+the document author can also set the initial seed of the pseudo-random
+sequence.
+
+The command \cs{saveRandomSeed} will write the last seed used in the
+source file to an auxiliary file (\cs{jobname\_rt.sav}), while the
+command \cs{inputRandomSeed} inputs the seed stored in the
+\cs{jobname\_rt.sav} back into the beginning of the source file.
+These two commands should be placed in the preamble.
+
+By invoking both of these commands, a new pseudo-random sequence will be generated
+each time the source file is compiled.
+
+Assuming a \cs{jobname\_rt.sav} has already been created, by
+invoking the command \cs{inputRandomSeed} only (and not
+\cs{saveRandomSeed}), the seed already saved will be used for every
+subsequent compiling of the source document. Using the same seed is
+necessary in two situations:
+\begin{enumerate}
+ \item When the quiz contains one or more \cs{label} commands, using the same
+ seed gives you the same sequence every time you latex the document. This will
+ give the auxiliary files a chance to come up to date so that any referencing of the label
+ will be accurate.
+
+ \item When creating an online (or paper) quiz with randomization, which later you publish
+ the solutions to, it is important that the randomization for the
+ quiz document is the same as that for the solution document. By
+ using \cs{inputRandomSeed} (rather than \cs{save\-Ran\-dom\-Seed}), you
+ get the same sequence for the solution document (unless you modify the
+ source file, adding or removing questions that have randomization).
+\end{enumerate}
+
+\newtopic\textcolor{red}{Things to look for:} If \textsf{exerquiz} is not rearranging the order
+of the choices as you expect it to, it could be that
+\textsf{exerquiz} is reading an old \texttt{.sav} file. Either delete that file
+in your source folder, or comment out \cs{inputRandomSeed} in your document.
+
+\settowidth{\aebdimen}{\cs{useRandomSeed\darg{\meta{number}}}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\useRandomSeed{!meta(number)}
+\end{dCmd}
+
+\newtopic\indent You may have several sections of the same class take a quiz with the
+questions rearranged for each. Save the seed value used by
+\textsf{exerquiz} to randomize the choices for the class by opening the
+\texttt{.sav} and by copying and pasting the line you see into your document;
+for example, it could read \cs{randomi=132088850}, then use
+\cs{useRandomSeed} with that seed value for that class as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\useRandomSeed{132088850} % 11:00 class
+% \useRandomSeed{634952429} % 12:30 class
+\end{Verbatim}
+Of course comment out \cs{inputRandomSeed}.
+
+\settowidth{\aebdimen}{\cs{obeyLocalRandomize}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\turnOnRandomize
+\obeyLocalRandomize
+\end{dCmd}
+
+\newtopic\indent The command \cs{turnOnRandomize} overrides all local settings of \cs{bChoices}
+and causes all choice lists to be randomized. While \cs{obeyLocalRandomize}
+returns control to the local settings. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\turnOnRandomize
+...
+\bChoices
+ \Ans...\eAns
+ \Ans...\eAns
+ ...
+\eChoices
+\end{Verbatim}
+will cause the choice list to be randomized, even though the
+\texttt{random} option was not specified. Whereas, in this code
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\turnOnRandomize
+...
+\obeyLocalRandomize
+...
+\bChoices
+ \Ans...\eAns
+ \Ans...\eAns
+ ...
+\eChoices
+\end{Verbatim}
+the choices will not be randomized, because the \texttt{random}
+option was not specified; or they will be randomized if the
+\texttt{random} option is used.
+
+\newtopic\textcolor{red}{Limitations:} There are natural limitations on the use
+of \cs{bChoices} and \cs{eChoices} and consequently, there are
+limitations on the randomization. The content between \cs{Ans} and
+\cs{eAns} cannot have any verbatim text. This is usually not a
+problem for mathematical content, but could be a limitation for
+computer science where questions about syntax may be posed. I have
+in mind a work-around, but haven't pursued the problem as of yet.
+
+\section{Creating a Quiz Summary Table}\label{s:sumrytbl}
+
+This feature is designed for a \texttt{quiz} (as opposed to a
+\texttt{shortquiz}) and is probably most useful for a long quiz, spanning
+several pages. The \cs{displaySumryTbl} command creates a table that summarizes
+the user's effort for the quiz; \cs{displaySumryTbl} must follow the final
+\verb!\end{questions}! and \emph{must be on a separate page} from the last question of the quiz.
+An example of the generated table is shown below in \hyperref[fig:qzSumryTbl]{Figure~\ref*{fig:qzSumryTbl}}.
+
+\exAeBBlogPDF{p=377} The demo file for this section is
+\texttt{\href{\urlAcroTeXBlog/?p=377}{sumry\_tbl.pdf}}, found
+at the \href{\urlAcroTeXBlog}{\AcroTeX{} Blog}.
+
+
+\Important The code for these commands are only input when the \textsf{exerquiz} option
+\texttt{usesumrytbls} is taken.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{quiz*}{!ameta(quiz_name)}
+Solve each of the following.
+\begin{questions}
+\item...
+...
+\item...
+\end{questions}
+
+\newpage %<--start new page
+Before you complete your quiz by pressing `End Quiz', review the
+list below. A check mark indicates that you responded to that
+question; otherwise, you did not respond to the question.
+
+\begin{center}
+\displaySumryTbl{\currQuiz}
+\end{center}
+
+If you are satisfied with your answers, press `End Quiz' to
+complete the quiz.\medskip
+
+\end{quiz*}\quad\ScoreField\currQuiz\CorrButton\currQuiz
+\end{Verbatim}
+
+\begin{figure}[htb]
+\begin{center}
+\includegraphics{figures/sumrytbl}
+\caption{Quiz Summary Table}\label{fig:qzSumryTbl}
+\end{center}
+\end{figure}
+
+
+The table (as seen in \hyperref[fig:qzSumryTbl]{Figure~\ref*{fig:qzSumryTbl}}) shows a check mark for each question to
+which the student gave a response. The student
+can review the table, and optionally return to questions that had no response.
+
+\settowidth{\aebdimen}{\cs{displaySumryTbl[\ameta{KV-pairs}]\darg{\ameta{quiz\_name}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\displaySumryTbl[!ameta(KV-pairs)]{!ameta(quiz_name)}
+\end{dCmd}
+\newtopic\textbf{Parameter Description:} The second parameter is the quiz name of the quiz this table represents,
+in most cases, \cs{currQuiz} is used. The first parameter consists of key-value pairs, these
+are described below.
+
+\KVP The first parameter takes key-value pairs
+\begin{enumerate}
+ \item\texttt{ntables} is a key that has a value of 1 or 2, the
+ default is determined by command \cs{smrytbl@ntables}, which is set to 2 in
+ this package. If \texttt{ntables=1} only one table is created, and
+ if \texttt{ntables=2} two tables are created, each containing half
+ the information, as seen in \hyperref[fig:qzSumryTbl]{Figure~\ref*{fig:qzSumryTbl}}.
+ \item \texttt{showmarkup}: If this switch is true, then markup fields are
+ created that will hold the number of points the student received for
+ each problem. The default is that there is no markup. Entering
+ \texttt{showmarkup} in the option list will generate the markup fields.
+ The code
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\displaySumryTbl[ntables=1,showmarkup]{\currQuiz}
+\end{Verbatim}
+ produces a single table with the points markup.
+ \item \texttt{nocorrections}: If this switch is true, corrections will not
+ be shown when the user presses the `End Quiz' button. Because of the
+ way this key is implemented, if \texttt{nocorrections} is true, then
+ it will be true for any ``duplicate table,'' that is, any table that
+ references the same quiz.
+\end{enumerate}
+
+\newtopic When the user presses the `Corrections' button, the borders of the checkboxes
+are colored, and if \texttt{showmarkup} is used, the points earned for each
+problem are shown as well.
+
+When corrections are made, a red border indicates the answer is
+wrong, a green border means the answer is correct, and a
+blue border the question was answered incorrectly, but partial credit was
+given. The colors are determined by the commands \cs{correctColor}, \cs{wrongColor},
+and \cs{partialColor}. These are ``global color'' that need to set in the preamble;
+the quiz and shortquiz system uses the first two, change them will yield changes everywhere.
+However, you can change the \cs{partialColor} as this is the only place it is used.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\partialColor{color.blue}
+\end{Verbatim}
+This is a JavaScript color, if you redefined it to be a nonstandard color, for example,
+this redefinition makes the partial credit color yellow.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\partialColor{["RGB", 1, 1, 0]}
+\end{Verbatim}
+
+\Important The table must be on a different page from the questions
+because there is an open page action that activates and populates the table
+based on the user's responses.
+
+\newtopic Other related commands are
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand{\sumryTblQ}{Question}
+\renewcommand{\sumryTblR}{Responded}
+\renewcommand{\sumryTblP}{Page}
+\end{Verbatim}
+The above three commands form the column titles of the table.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand{\sumrytablesep}{\space}
+\end{Verbatim}
+Sets the separation between the tables, in the case that two tables are generated.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand{\sumryTblProbFmt}[1]{\textbf{\textcolor{blue}{#1}}}
+\end{Verbatim}
+The above command sets the {\LaTeX} formatting of the problems, the
+default is bold and blue, but may be redefined.
+
+\subsection{Placing the Quiz Summary Table Elsewhere}
+
+You may want the Quiz Summary Table in a
+place other than the default location (after the final
+\verb!\end{questions}! and before the `End Quiz'). There is no problem
+putting it after the quiz and\emph{ before the next quiz};
+however, if you want to put the table up front (that is, in front of the quiz) for
+whatever reasons, you need additional commands.
+
+\newtopic In the area just after \cs{end\darg{questions}} and before `End
+Quiz,' place the command
+\settowidth{\aebdimen}{\cs{writeProListAux}}
+\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\writeProListAux
+\end{dCmd}
+\newtopic\indent This command saves to the auxiliary file the two pieces of information the
+\cs{dis\-playSumryTbl} needs to build the table. Then, in the location of
+your choice---usually outside of any quiz environment---enclose
+\cs{displaySumryTbl} in the \texttt{sumryTblAux} environment.
+\settowidth{\aebdimen}{\cs{displaySumryTbl[\ameta{KV-keys}]\darg{\ameta{quiz\_name}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\begin{sumryTblAux}{!meta(quiz_name)}
+\displaySumryTbl[!ameta(KV-keys)]{!ameta(quiz_name)}
+\end{sumryTblAux}
+\end{dCmd}
+\newtopic\indent Here, \ameta{quiz\_name} is the name of the quiz that this table represents. An example
+of this environment follows.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{sumryTblAux}{\currQuiz}\small %<--make a little smaller
+\renewcommand{\sumryTblQ}{\sffamily\bfseries Question}
+\renewcommand{\sumryTblR}{\sffamily\bfseries Answered}
+\renewcommand{\sumryTblP}{\sffamily\bfseries Page}
+\begin{center}
+ {\normalsize\sffamily\bfseries Quiz Summary Table}\\[3pt]
+ \displaySumryTbl[showmarkup]{\currQuiz}
+\end{center}
+\end{sumryTblAux}
+\end{Verbatim}
+
+
+%sumryTblAux
+
+\section{Bookmarking Exercises and Quizzes}\label{bmExQz}
+
+It is unlikely that anyone would use this feature: Bookmarking exercises
+and quizzes.
+
+%\exPDF{bkmrk_eq} The demo file for this feature is \texttt{bkmrk\_eq.tex}.
+
+\exAeBBlogPDF{p=906} The demo file for this feature is
+\texttt{\href{\urlAcroTeXBlog/?p=906}{bkmrk\_eq.pdf}}.
+
+
+\subsection{For Exercises}
+
+This ``intelligent'' bookmarking system requires
+the minimum of effort to use. For exercises, the command for bookmarking
+is \Com{expdfbookmark},
+\settowidth{\aebdimen}{\cs{expdfbookmark\darg{\ameta{bookmark\_title}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\expdfbookmark{!ameta(bookmark_title)}
+\end{dCmd}
+\newtopic and should be placed immediately following the beginning of an
+exercise environment, like so,\def\OR{\hspace*{-\amtIndent}\normalfont or,}
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{exercise}\expdfbookmark{!ameta(bookmark_title)}
+!OR
+\begin{exercise*}\expdfbookmark{!ameta(bookmark_title)}
+\end{Verbatim}
+or, in the case of exercises with parts, and you want to bookmark an
+individual part to a question, place \cs{expdfbookmark} immediately
+after the \cs{item}, like so
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\item\expdfbookmark{!ameta(bookmark_title)}
+\end{Verbatim}
+
+\newtopic Every bookmark title, \ameta{bookmark\_title}, has a
+suffix defined with \Com{exbookmarkfmt} or
+\Com{partbookmarkfmt}, depending on whether
+the entry is for the top-level exercise, or one of its parts.
+The default definitions are
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand{\exbookmarkfmt}{\exlabel\space\theeqexno.\space}
+\newcommand{\partbookmarkfmt}{(\thepartno)\space}
+\end{Verbatim}
+The command \cs{exlabel} expands to the language
+dependent word for `Exercise', while \cs{theeqexno} expands to
+the exercise number, and \cs{thepartno} to the part
+letter. These commands can be redefined.
+
+\subsection{For Quizzes}
+
+To bookmark a \texttt{shortquiz} or \texttt{quiz}, use \Com{quizpdfbookmark}.
+\settowidth{\aebdimen}{\cs{quizpdfbookmark\darg{\ameta{bookmark\_title}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\quizpdfbookmark{!ameta(bookmark_title)}
+\end{dCmd}
+\newtopic\indent It should be placed immediately following the beginning of the environments,
+\def\OR{\hspace*{-\amtIndent}\normalfont or,}
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\begin{shortquiz}\quizpdfbookmark{!ameta(bookmark_title)}
+!OR
+\begin{quiz}{!ameta(quiz_name)}\quizpdfbookmark{!ameta(bookmark_title)}
+\end{Verbatim}
+
+\redpoint Unlike bookmarking for exercises, the bookmark command for quizzes does not
+support bookmarking individual questions within the quiz.
+
+\newtopic Every bookmark title, \meta{bookmark\_title}, for a
+\texttt{shortquiz} environment has a suffix defined with the
+\Com{sqbookmarkfmt} command, the default definition is
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand{\sqbookmarkfmt}{Short Quiz \@shortquizCnt.\space}
+\end{Verbatim}
+
+\newtopic The command \cs{@shortquizCnt} is a macro (not a counter)
+that contains the current short quiz count. This command can be redefined.
+
+\newtopic Every bookmark title, \ameta{bookmark\_title}, for a \texttt{quiz} environment has a
+suffix defined with the \Com{qzbookmarkfmt} command, the
+default definition is
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand{\qzbookmarkfmt}{Quiz \@quizCnt.\space}
+\end{Verbatim}
+
+\newtopic The command \cs{@quizCnt} is a macro (not a counter)
+that contains the current quiz count. This command can be redefined.
+
+\redpoint \cs{quizpdfbookmark} interacts with the command \Com{titleQuiz}.
+(for more information on this, see \hyperref[titleQuiz]{Section~\ref*{titleQuiz}}
+and \hyperref[titleQuizSQ]{Section~\ref*{titleQuizSQ}}, pages~\pageref*{titleQuiz}
+and~\pageref*{titleQuizSQ}, to learn about \cs{title\-Quiz} for quizzes and short quizzes, respectively.) When a quiz has
+a defined title, as defined
+by the \cs{titleQuiz}, and the argument of \cs{quizpdfbookmark} is left empty,
+the value passed to \cs{titleQuiz} is used as the bookmark text. Thus, the code
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\titleQuiz{Differentiation Quiz}
+\begin{quiz}{MyDiffQuiz}\quizpdfbookmark{}
+...
+\end{quiz}
+\end{Verbatim}
+will bookmark the quiz under the name ``Differentiation Quiz.''
+
+
+\subsection{Final Note}
+
+If the bookmarks for exercises, or parts of the exercises, or quizzes do not appear,
+you may have to increase the \texttt{tocdepth}. Exerquiz sets this at
+\verb!\setcounter{tocdepth}{5}!.
+
+\section{Extending \AcroT{} with \texttt{dljslib} and \texttt{insdljs}}
+
+The \textsf{exerquiz} Package, especially the math fill-in question, is quite
+programmable. In this section, we discuss two methods of extending the
+capabilities of the \AcroB: (1) through the use of the package \texttt{dljslib},
+which is a JavaScript library of extensions; (2) by writing your own custom
+extensions using the \texttt{insdljs} package for inserting JavaScripts into the
+PDF document.
+
+\subsection{Using the \texttt{dljslib} Package}\label{sss:dljslib}
+
+The \texttt{dljslib} Package is actually a ``library'' of JavaScript
+functions. At the time of this writing, the library has JavaScripts that can
+process answers to math fill-in questions where an \textit{equation}
+or a \textit{vector} answer is expected. There is also a JavaScript compare
+function that properly evaluates an answer when an indefinite integral is
+expected. See the documentation that accompanies the package (by latexing
+\texttt{dljslib.dtx}) for details of how to use the library.
+
+\redpoint For full documentation of \textsf{dljslib} package, see \Nameref{part:dljslib}.
+
+%\redpoint \textbf{Equation handling.} See the sample file \texttt{jqzequat.tex} for examples
+%of posing and evaluating questions that expect an equation as the response. Below is
+%a portion of the preamble of that file; basically, to use one or more of the JavaScripts in
+%the JavaScript library, you specify that option \cs{usepackage} command for \texttt{dljslib}
+%package. In this case, we want to process equations so type\dots
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+%\documentclass{article}
+%\usepackage{amsmath,amscd}
+%\usepackage[tight,pdftex,designi,nodirectory]{web}
+%\usepackage{exerquiz}
+%\usepackage[equations]{dljslib} % <--choose equations
+%\end{Verbatim}
+%
+%\redpoint \textbf{Vector Handling} There are also JavaScript functions for processing
+%vector answers. See the sample file \texttt{jqzspec.tex}. Actually this file does not
+%use the JavaScript library, but is more of a tutorial on how to use \cs{insdljs} to
+%write custom JavaScripts to process \textsf{exerquiz} math fill-in questions.
+%
+%The preamble of that document could actually be replaced with\dots
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+%\documentclass{article}
+%\usepackage{amsmath,amscd}
+%\usepackage[tight,dvipdfm,designi,nodirectory]{web}
+%\usepackage{exerquiz}
+%\usepackage[vectors,indefIntegral]{dljslib}
+%\end{Verbatim}
+%\noindent The \texttt{vectors} option specifies JavaScripts for processing
+%vector questions. The option \texttt{in\-def\-In\-te\-gral} is also
+%specified. This is because that in the file \texttt{jqzspec.tex} a
+%comparison function is developed for properly evaluating questions
+%in which an indefinite integral is expected.
+%
+%\redpoint \textbf{Comma Delimited Answers and Sets} The
+%\texttt{setSupport} option of the \textsf{dljslib} Package
+%provides basic support for math fill-in questions requiring a
+%(unordered) list of comma delimited numerical or symbolic answers,
+%or for a set. The demo and tutorial file is
+%\texttt{set\_test.tex}. See that file for more details.
+%
+%\redpoint In addition to the two above mentioned sets of JavaScripts there are
+%a couple of comparison functions, one for processing indefinite integrals (see
+%\texttt{dljs\_ex.tex}), and the other for using relative absolute error rather
+%than absolute error. Again, see the documentation of \texttt{dljslib.dtx} and
+%the sample file \texttt{jqzspec.tex}.
+
+\subsection{Using the \texttt{insdljs} Package}
+
+With the \texttt{insdljs} package you can write your own JavaScript functions
+right in the \LaTeX{} source file. These custom JavaScripts are then inserted
+into the section of the PDF document where the document level JavaScripts
+reside. This package is a stand-alone package, and does not need \textsf{exerquiz},
+though \textsf{exerquiz} now uses this package to insert its JavaScripts into
+the document.
+
+\redpoint Refer to \href{\bUrl/eformman.pdf}{eformman.pdf}
+(relative link \href{eformman.pdf}{eformman.pdf}) for the \textsf{insdljs} and the \textsf{eforms}
+documentation. Also, see the sample file \texttt{insdljs\_ex.tex}
+for examples that do not use \textsf{exerquiz}, and the file
+\texttt{jqzspec.tex}, for examples that does use \textsf{exerquiz}.
+
+\section{Submitting a \protect\texttt{quiz} to a Web Server}
+
+Quizzes created by the \texttt{quiz} environment are entirely self-contained.
+They function within the Web browser (or from within the Adobe Reader) and
+do not communicate with any server. This kind of quiz is ideal for a
+do-it-yourself tutorial system, read by a well-motivated student who has the
+discipline to read the material and to take the quizzes in the spirit in which
+they are given.
+
+However, some educators, myself included, may wish to use the quizzes created
+by the \texttt{quiz} environment for classroom credit. It is necessary,
+therefore, for the student to be able to submit quiz results to a Web server
+which, in turn, should store the results to a database.
+
+In this section we discuss techniques of turning the quiz into something that
+can be submitted to a server.
+
+\redpoint I have released the \textsf{eq2db} Package, a {\LaTeX} macro package and
+server-side script to process \textsf{exerquiz} quizzes. See \Nameref{eq2db}.
+
+\subsection{Technical Info for ``Do It Yourself''}\label{DIY}
+
+All one really has to do is to redefine the `End Quiz' link or button to
+submit the results of the quiz to the Web server and CGI of your choice. Since
+the quiz itself is scored, (optionally) marked, with (optional) answers and
+solutions provided, the CGI simply stores the quiz results to a database.
+
+\subsubsection{Redefining `End Quiz'}
+
+I've written the `End Quiz' link (button) to have various
+programming hooks available to the developer.
+The following code is common to both \cs{eq@EndQuizLink} and
+\cs{eq@EndQuizButton}, the macros that control the action of
+the end quiz link and button, respectively.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+if (\minQuizResp(\thequestionno)) {\r\t
+ var f = this.getField("ScoreField.\curr@quiz");\r\t\t
+ if ( f != null )\r\t\t\t
+ this.getField("ScoreField.\curr@quiz").value
+ =(\eq@QuizTotalMsg);\r\t\t
+ \eq@submitURL
+ resetQuiz("\curr@quiz")\r\t
+}
+\end{Verbatim}
+
+\redpoint The code is a mixture of \LaTeX{} macros and JavaScript.
+You can see from this code, that there is a submit hook macro
+provided, \cs{eq@submitURL}. Normally, this macro has a definition
+of \cs{@empty}. A developer needs only redefine this macro
+accordingly; one would use the Acrobat JavaScript method
+\texttt{this.submitForm()} to do this. See the \textit{Acrobat JavaScript
+Scripting Reference} \cite{tech:AcroJS} for more detail about this
+method.
+
+\redpoint The code flow above is as follows: (1) Execute this code if the
+threshold has been met. (See \nameref{threshold}.) The text macro
+\cs{curr@quiz} holds the base name of the current quiz.
+
+(2) If the field \texttt{"ScoreField.\cs{curr@quiz}"} exists, then
+write the student's score to that field. (This is the ``Score: 2
+out of 3'' that you see in the demo quizzes.)
+
+(3) We then submit with the macro \cs{eq@submitURL}. (This would
+do nothing if its value is \cs{empty}, the default value.) At this
+point we call a \texttt{resetQuiz("\cs{curr@quiz}")} which
+sets some values in an array to indicate the state of this quiz.
+
+\subsubsection{Gathering ID Information with
+\texorpdfstring{\protect\cs{textField}}{\textbackslash textField}}
+
+\redpoint What kind of information would one submit to a CGI?
+Well, there is the usual information concerning the identity of
+the student (Name, SSN, etc.) and the course, section and so on.
+
+This basic information can be gathered from the student by
+inserting text fields into the document to be filled in. \textsf{Exerquiz}
+provides the macro \cs{textField}\footnote{You can also use hyperref's
+\cs{TextField} command for this purpose as well.} for this purpose.
+For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\FirstName[2]{\textField
+ [\DV{First Name}\textFont{TiRo}\textSize{10}\textColor{0 0 1}]
+ {IdInfo.Name.First}{#1}{#2}}
+\end{Verbatim}
+\noindent This defines a text field with a name of \texttt{"IdInfo.Name.First"}, the two
+arguments are the width and height of the field that you want to create. E.g.,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\FirstName{100pt}{10pt}
+\end{Verbatim}
+\noindent creates a text field 100pt wide and 10pt high.
+
+The \cs{textField} macro takes four parameters.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[#1]#2#3#4
+\end{Verbatim}
+\noindent The first (optional) parameter can be used to custom
+design the field; the second is the name of the field; the third
+and fourth are the width and height of the field desired.
+
+\redpoint See the file \texttt{eqformman.tex} on {\cAcroT} \textsf{eForm}
+support for complete documentation on
+\cs{textField}.
+
+\subsubsection{Gathering Quiz Specific Information with
+\texorpdfstring{\protect\cs{eqSubmit}}{\textbackslash eqSubmit}}
+
+In addition to ID information on the one taking the quiz,
+specific information about what quiz is being taken and where the
+results of the quiz are to be stored are needed as well.
+
+\textsf{Exerquiz} provides a basic macro, called \cs{eqSubmit}
+that can be used to gather basic formation of this type. The definition
+of it and related commands are given below:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\databaseName[1]{\def\db@Name{#1}}\def\db@Name{}
+\newcommand\tableName[1]{\def\db@Table{#1}}\def\db@Table{}
+\newcommand\eqCGI[1]{\def\eq@CGI{#1}}\def\eq@CGI{}
+\newcommand\eqSubmit[3]
+ {\eqCGI{"#1"}\databaseName{#2}\tableName{#3}}
+\end{Verbatim}
+
+\noindent The meaning of the parameters are self-explanatory.
+
+Just prior to the quiz you can type:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\eqSubmit{http://www.myschool.edu/cgi-bin/myCGI.cgi}%
+ {CalcIII}{Quizzes}
+\begin{quiz*}{Quiz3} Answer each of the following.
+\begin{questions}
+...
+...
+\end{questions}
+\end{quiz*}\quad\ScoreField\currQuiz\CorrButton\currQuiz
+
+\noindent
+Answers: \AnswerField\currQuiz
+\end{Verbatim}
+
+\redpoint Any redefinition of \cs{eq@submitURL} would then
+include the values of some or all of these text parameters:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\eq@CGI, \db@Name, \db@Table, \curr@quiz
+\end{Verbatim}
+\noindent The last text macro is not gathered by \cs{eqSubmit}, it
+is known, however, at the time \cs{eq@submit\-URL} is expanded.
+
+\subsubsection{Some Variables to Submit}
+
+When you submit a quiz to a server, the values of \textit{all}
+fields are also submitted, unless you define specifically which
+fields are to be submitted.
+
+In addition to the ID info, you would like also to submit the results
+of the quiz itself. The relevant variables are as follows:
+\begin{questions}
+ \item The JavaScript variable \texttt{Score} has the number of
+ correct responses as its value.
+ \item The \LaTeX{} counter variable \cs{thequestionno} has the count
+ of the total number of questions in the quiz.
+ \item The JavaScript array \texttt{Responses} contains the responses of
+ the student: multiple choice and fill-in responses. The contents of this
+ array can be converted to a comma-delimited string by using the
+ \texttt{toString()} method, \texttt{Responses.toString()}.
+\end{questions}
+
+\noindent Now, how does one submit these values? The \cs{eq@submitURL}
+command can be used not only to submit the data, but to also
+populate certain \textit{hidden} fields with this information. The
+hidden data is submitted along with the ID info to be processed.
+You can use the \cs{textField} to create hidden text fields for
+this purpose. See the next section for a discussion of how to create
+hidden text fields.
+
+\subsection{Features \protect\textit{apropos} to Submitting}
+
+%\subsubsection{\texorpdfstring{\protect\cs{RespBoxEssay}}
+%{\textbackslash RespBoxEssay}: The Essay Question}
+%
+%Some disciplines make heavy use of the essay question. In an effort to
+%expand \textsf{exerquiz} to this question type, the \cs{RespBoxEssay}
+%question has been defined.
+%
+%The syntax is
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+%\RespBoxEssay[<commands to modify the appearance>]
+%\end{Verbatim}
+%The default width of is \cs{linewidth} and the default height is
+%\verb+6\baselineskip+. For example,
+%
+%\begin{oQuestion}{bioNewton}
+%\redpoint Sketch the biography of Isaac Newton:\par
+%\RespBoxEssay[\rectH{3\baselineskip}]\par\smallskip
+%\end{oQuestion}
+%
+%This type of question is not evaluated by JavaScript, but is meant
+%to be submitted to a CGI for storage in a database. Later, the
+%instructor can review the essay answer.
+
+\subsubsection{Assigning Points}
+
+See \Nameref{sss:asignPts} for information on this subject.
+
+\subsubsection{\texorpdfstring{\protect\cs{NoPeeking}}
+{\textbackslash NoPeeking}}\label{sss:nopeek}
+
+If you execute the command \cs{NoPeeking} in the preamble of your
+document, or prior to a \texttt{quiz}, then any quiz question with
+solution will be protected somewhat from prying eyes.
+
+In this case, an open page action is placed on the first page of
+each solution. If the user (student) tries to view a quiz solution
+before doing the quiz, the \textcolor{blue}{Adobe Reader} will
+automatically change the page to the page containing the quiz and
+place an alert box on the screen saying that viewing the solution
+before taking the quiz is not permitted.
+
+To resort to the default behavior, use the \cs{AllowPeeking}
+command.
+
+The previous \texttt{quiz} has been surrounded with a
+\cs{NoPeeking}/\-\cs{AllowPeeking} pair. If you go to one
+of the \hyperlink{knuth}{solutions} to that quiz, you will see
+what happens. If nothing interesting happens, read the next
+red point.
+
+\redpoint Protection is removed when you click on `End Quiz' and
+restored when you click on some `Begin Quiz'.
+
+\section{Functions and Syntax supported by \textsf{Exerquiz}}
+
+In addition to the JavaScript built in math functions, exerquiz defines a number
+of other functions useful in mathematical work. These functions are typically input
+in a math question created by \cs{RespBoxMath}, for example, or in the function input
+field of an {\AcroFLeX} document.\footnote{The {\AcroFLeX} Graphing Bundle,
+\url{http://www.math.uakron.edu/~dpstory/acroflex.html}}
+
+Exerquiz also has its own syntax for entering algebraic expression in the
+\cs{Resp\-Box\-Math} field, these are document here as well.
+
+\subsection{Functions supported by \textsf{Exerquiz}}
+
+The following functions are built-in to JavaScript:
+
+\setlength{\extrarowheight}{1mm}
+\setlength{\tabcolsep}{2mm}
+
+\noindent\begin{longtable}{@{}>{\ttfamily}lp{2.8in}>{\PBS\raggedright}p{1.5in}}
+\hline
+\multicolumn{1}{@{}l}{Function}&\multicolumn{1}{l}{Description}&\multicolumn{1}{l}{Usage}\\
+\hline
+\endfirsthead
+\hline
+\multicolumn{1}{@{}l}{Function}&\multicolumn{1}{l}{Description}&\multicolumn{1}{l}{Usage}\\
+\hline
+\endhead
+\hline
+\endfoot
+abs\textrm{, }|$\cdot$| & absolute value function, preferred form, \texttt{|$\cdot$|} & \texttt{|-3|=3}, \texttt{|x|}\\
+sin & the sine function & \texttt{sin(pi/2)=1}, see the definition of \texttt{pi} below\\
+cos & the cosine function & \texttt{cos(1.5)}, \texttt{cos(2*x)}\\
+tan & the tangent function & \texttt{tan(pi/4)=1}\\
+asin& inverse sine function & \texttt{asin(x)}\\
+acos& inverse cosine function & \texttt{acos(.2)}\\
+atan& inverse tangent function& \texttt{atan(-4)}\\
+exp & the natural exponential function, this function is also implemented as a \verb!e^x!,
+ where \texttt{e} is the natural number & \texttt{exp(-.5)}, \texttt{exp(-x\string^2)}\\
+log & the common logarithm. In JavaScript log is the natural logarithm, \textsf{exerquiz}
+ redefines this to be the common logarithm, use \texttt{ln} for natural logarithm & \texttt{log(10)=1}\\
+sqrt & the square root function & \texttt{sqrt(4.5)}\\
+ceil & the \texttt{ceil} function, \texttt{ceil(x)} is the smallest integer greater than or equal to \texttt{x} &
+\texttt{ceil(4.5)=5}\\
+floor&the \texttt{floor} function, where \texttt{floor(x)} is the largest integer less than or equal to \texttt{x} &
+\texttt{floor(4.5)=4}\\
+max & the maximum between two numbers & \texttt{max(2, 3.4) = 3.4}\\
+min & the minimum between two numbers & \texttt{max(2, 3.4) = 2}\\
+random & a pseudo-random number generator, this function is used internally by \textsf{exerquiz}, and is
+ available to users, \texttt{random()} returns a number between 0.0 and 1.0 & \texttt{random()}\\
+round & a rounding function, rounds a number to the nearest integer
+ & \texttt{round(4.5)= 5}, \texttt{round(-3.3)=-3}
+\end{longtable}
+
+\bigskip
+
+\newtopic The next set of functions are defined by \textsf{exerquiz}.
+
+\noindent\begin{longtable}{@{}>{\ttfamily}lp{2.8in}>{\PBS\raggedright}p{1.5in}}
+\hline
+\multicolumn{1}{@{}l}{Function}&\multicolumn{1}{l}{Description}&\multicolumn{1}{l}{Usage}\\
+\hline
+\endfirsthead
+\hline
+\multicolumn{1}{@{}l}{Function}&\multicolumn{1}{l}{Description}&\multicolumn{1}{l}{Usage}\\
+\hline
+\endhead
+\hline
+\endfoot
+cot & the \texttt{cotangent} function & \texttt{cot(1)}\\
+sec & the secant function & \texttt{sec(2)}\\
+csc & the \texttt{cosecant} function & \texttt{csc(2)}\\
+arcsin & the inverse sine function, same as \texttt{asin} & \texttt{arcsin(.5)}\\
+arccos & the inverse cosine function, same as \texttt{acos} & \texttt{arccos(-.5)}\\
+arctan & the inverse tangent function, same as \texttt{atan} & \texttt{arctan(1)}\\
+ln & the natural logarithm & \texttt{ln(3.4)}\\
+sinh & the hyperbolic sine function & \texttt{sinh(0)}, \texttt{sinh(x)}\\
+cosh & the hyperbolic cosine function & \texttt{cosh(0)}, \texttt{cosh(x)}\\
+tanh & the hyperbolic tangent function & \texttt{tanh(x)}\\
+coth & the hyperbolic cotangent function & \texttt{coth(x)}\\
+sech & the hyperbolic secant function & \texttt{sech(x)}\\
+csch & the hyperbolic cosecant function & \texttt{csch(x)}\\
+asinh & the inverse hyperbolic sine function & \texttt{asinh(0)}, \texttt{asinh(x)}\\
+acosh & the inverse hyperbolic cosine function & \texttt{acosh(0)}, \texttt{acosh(x)}\\
+atanh & the inverse hyperbolic tangent function & \texttt{atanh(x)}\\
+acoth & the inverse hyperbolic cotangent function & \texttt{acoth(x)}\\
+asech & the inverse hyperbolic secant function & \texttt{asech(x)}\\
+acsch & the inverse hyperbolic cosecant function & \texttt{acsch(x)}\\
+sgn & the sign function, \texttt{sgn(x)} is -1 if \texttt{x} is negative, 1 if \texttt{x} is positive, and 0 of
+\texttt{x} is zero
+ & \texttt{sgn(-3.2) = -1} \\
+cis & the polar representation of a complex number,
+ $\operatorname{cis}(\theta)=\cos(\theta)+\imath\sin(\theta)$. This function
+ is only defined if the \texttt{complex} option of \textsf{dljslib} is used.
+ & \texttt{cis(pi/3)}
+\end{longtable}
+
+\bigskip
+
+\newtopic There are several other \textsf{exerquiz}-defined
+functions that are available through options of the
+\textsf{dljslib}, these are \texttt{C} (combinations), \texttt{P}
+(permutations), and \texttt{fact} (permutations). See the section
+titled \Nameref{extNumerFuncs} for details.
+
+\paragraph*{Recognized Constants.} \textsf{Exerquiz} recognizes
+\texttt{PI} and \texttt{pi} as symbols for the mathematical constant
+$\pi\approx \text{3.14159}$. The letter \texttt{e} is recognized as
+the natural number, which is approximately 2.7182818285.
+
+\subsection{Syntax supported by \textsf{Exerquiz}}
+
+\textsf{Exerquiz} attempts to make entering mathematics as easy and
+as natural as using a modern calculator. The following paragraphs
+outline the syntax of \textsf{exerquiz}. Authors should reproduce
+some form of these rules to their students, and perhaps some
+practice documents for them to test themselves with.
+
+\paragraph*{Grouping.} Algebraic expressions are grouped with
+matching parentheses~\texttt{(\,)}, brackets~\texttt{[\,]}, or
+braces~\texttt{\{\,\}}.
+
+\paragraph*{Spaces.} When the user enters a math expression, all
+spaces are removed before parsing of the expression begins.
+Students can write \texttt{1+(2+3)} or \texttt{1 + ( 2 + 3 )}, these
+are the same.
+
+\paragraph*{Addition and Subtraction.} These operations are
+performed using \texttt{+} and \texttt{-}, as expected. For example,
+\texttt{(x+1)-(x-2)}, \texttt{x+sin(x-pi)}
+
+\paragraph*{Multiplication and Division.} These operations are
+performed using \texttt{*} and \texttt{/}, as expected. For example,
+\texttt{2*x*(3*x+1)} and \texttt{(2*x-1)/(2*x+1)}.
+
+The use of the multiplication (\texttt{*}), is required, by default,
+and its use can be very tedious to the student. If you include the
+\textsf{dljslib} package with the \texttt{ImplMulti} option,
+\texttt{exerquiz} automatically inserts the multiplication symbol
+(\texttt{*}). The examples above, can be written as
+\texttt{2x(3x+1)} and \texttt{(2x-1)/(2x+1)}; it is recommended,
+therefore, that the \texttt{ImplMulti} option should normally be
+used. (Note: The use of \texttt{*} is still correct even when
+\texttt{ImplMulti} option is in effect.)
+
+\paragraph*{Powers and Exponents.} \textsf{Exerquiz} uses
+\texttt{\string^} to indicate exponents, for example,
+\texttt{x\string^2} means $x^2$. Other examples are \verb!17^(x+1)!,
+\verb!(x^2+1)^3!, \verb!(sin(x))^3!, and \verb!(x+1)^(2x+1)!.
+
+Recall that the letter \texttt{e} is recognized as the natural
+number, so \verb!e^{-x^2}! is the same as \verb!exp(-x^2)!.
+Normally, the use of \texttt{e} is preferred by students over the
+use of \texttt{exp}. For work in elementary mathematics, the
+existence of \texttt{exp} need not be even mentioned to the
+students.
+
+The difficulty of entering powers of functions is another issue for
+students. As illustrated above, in entering \verb!(sin(x))^3! or
+more complex expression, students find a source of difficulty, pain,
+and anguish. \textsf{Exerquiz} allows entering powers in the
+calculator style, the student can enter \verb!sin(x)^3! for
+$(\sin(x))^3$ (often written as $\sin^3(x)$) or \verb!3^sin(x)! to
+mean $3^{\sin(x)}$. Expressions like \verb!2^2^3! are interpreted as
+\verb!(2^2)^3! (the typeset version is $(2^2)^3$), which evaluates
+to 64. The use of parentheses is needed if the desired expression is
+$2^{2^3}$; this expression needs to be typed as \verb!2^(2^3)!,
+which evaluates to 256.
+
+If the \texttt{ImplMulti} option of the \texttt{dljslib} package is
+in effect, powers of functions can be entered in a more
+mathematically traditional, for example \verb!sin^2(x)! is
+recognized as the same as \verb!sin(x)^2!, or \verb!(sin(x))^2!;
+consequently, \verb!sin^2(x)^2! is the same as \verb!sin(x)^4!!
+
+\part{The \protect\textsf{eq2db} Package}\chgCurrLblName{The \textsf{eq2db} Package}\label{eq2db}
+
+\newtopic
+As the name suggests, Converts a self-contained exerquiz quiz to one that is
+submitted to a server-side script. The {\LaTeX} package itself does very
+little other than to define some useful commands that make it easy to convert
+a self-contained quiz into one that is submitted to server-side script.
+
+The \texttt{eq2db} currently has several options, including \texttt{eqRecord}, \opt{eqText},
+\opt{eqEmail}, and \opt{submitAs}.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[eqText,submitAs=!anglemeta(!upshape(FDF|HTML))]{eq2db}
+\end{Verbatim}
+The option \texttt{eqText} and \texttt{submitAs=FDF} sets up the quiz to use
+an ASP (Active Server Page) that I have written. This ASP, named naturally,
+\texttt{eqRecord.asp}, takes the data and stores it to a database, such as
+Microsoft Access.
+
+You can also submit your form data as HTML, as the the two websites
+demonstrate.\footnote{These websites were prepared as a script demonstration
+site that is referenced in my yet-to-be submitted book \AEBBook~\cite{book:AEBB}.}
+\begin{quote}
+\url{http://faculty.nwfsc.edu/web/math/storyd/dps/}
+\end{quote}
+The above Web page is on a \app{Windows} server hosted by Northwest Florida State
+College (NWFSC). The server-side
+script is written as ASP pages using VBScript.
+\begin{quote}
+\url{http://www.acrotex.net/dps/}
+\end{quote}
+This Web page is on a \app{Linux} server hosted by {\AcroTeX.Net}. The
+server-side script is written with PHP.
+
+\redpoint For more details, see the package documentation,
+\texttt{eq2dbman.pdf}.\footnote{The absolute URL is
+\url{\bUrl/acrotex/eq2dbman.pdf}} The \textsf{eq2db} package is available
+from CTAN (\url{ctan.org/pkg/eq2db}).\endredpoint
+
+
+\part{{\AcroT} \protect\textsf{eForm} Support}
+
+\newtopic
+In this document, we describe the support for form elements in an
+{\cAcroT} document. The PDF Specifications indicate there are four
+different categories of fields for a total of seven types of
+fields.
+
+\begin{questions}
+\setbox0=\hbox{(d)}
+\def\I#1{\makebox[\wd0]{\color{blue}(\hfil#1\hfil)}\ }
+
+ \item \textbf{Button Fields}
+ \begin{description}
+ \item[\I{a}] \textbf{Push Button}
+ \item[\I{b}] \textbf{Check Box}
+ \item[\I{c}] \textbf{Radio Button}
+ \end{description}
+ \item \textbf{Choice Fields}
+ \begin{description}
+ \item[\I{a}] \textbf{List Box}
+ \item[\I{b}] \textbf{Combo Box}
+ \end{description}
+ \item \textbf{Text Fields}
+ \item \textbf{Signature Fields}
+
+\end{questions}
+The {\cAcroB} does not support \textit{signature fields}, this
+leaves six types of fields. Commands for creating each of the
+remaining six types will be discussed.
+
+The \pkg{hyperref} Package (Rahtz, Oberdiek \textit{et al})
+provides support for the same set of form fields; however, not all
+features of these fields can be accessed through the
+\pkg{hyperref} commands. I was determined to write my own set
+of commands which would be sufficiently comprehensive and
+extendable to suit all the needs of the \cAcroB. All the quiz
+environments have been modified to use this new set of form
+commands, in this way, there is a uniform treatment of all form
+fields in \cAcroB.
+
+\redpoint The documentation for \textsf{eForm} support is too voluminous
+to include in this already voluminous document. See
+\href{\bUrl/eformman.pdf}{eformman.pdf} (relative link
+\href{eformman.pdf}{eformman.pdf}) for complete details.
+
+
+\part{The AeB JavaScript Library}\label{part:dljslib}
+
+\newtopic
+The \textsf{dljslib} package---document level JavaScript
+library---is a companion to \textsf{exerquiz} and utilizes
+\textsf{insdljs} package. It is a library of JavaScript code that
+can be referenced in the preamble of a {\LaTeX} document, the code
+is then extracted from the package files, and inserted into the {\LaTeX}
+source using the \texttt{insDLJS} environment.
+
+The code belonging to the library supports the processing
+of the quizzes and short quizzes produced by \textsf{exerquiz}; they
+extend the capabilities of the core features of the
+\textsf{exerquiz} quizzes. Many of the JavaScript functions in the
+library were contributed by users of AeB.
+
+\newtopic My deep appreciation goes out to the contributors to the AeB JavaScript library.
+\begin{itemize}
+ \item The options \texttt{unordered}, \texttt{factors},
+ \texttt{point} and \texttt{intervals} were written by Dr. Bruce Wagner
+ for an online grading system developed by Drs.\ Bruce Wagner and David
+ Arnold, and Mr.~Jacob Miles-Prystowsky. Dr. Robert Marik contributed to the \texttt{intervals} option, as well.
+ \item The options \texttt{nodec}, \texttt{noBinFact} and \texttt{combinatorics} were contributed by
+ Ross Moore and Frances Griffin, and were developed for their
+ \href{http://rutherglen.ics.mq.edu.au/~macqtex/}{MacQ\TeX}
+ online testing system.\footnote{\url{http://rutherglen.ics.mq.edu.au/~macqtex/}}
+\end{itemize}
+The AeB JavaScript library continues to accept contributions from AeB developers.
+
+\section{Usage and Options}
+
+As with all {\LaTeX} package, you use \textsf{dljslib} as follows,
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\usepackage[!ameta(options)]{dljslib}
+\end{Verbatim}
+where \ameta{options} is a comma-delimited list of options. With each of the
+\ameta{options}, the associated JavaScript code is brought into the {\LaTeX}
+source document. The JavaScript functions, then, are available to your
+\textsf{exerquiz} quizzes.
+
+A list of the \ameta{options} of the \textsf{dljslib} package are listed below,
+and each are described in detail in the sections that follow.
+\begin{enumerate}
+\item \texttt{ImplMulti}: Use this option to allow implied multiplication, e.g., the user can input
+ \texttt{2xsin(x)} instead of \texttt{2*x*sin(x)}. See \Nameref{ImplMulti}.
+\item \texttt{equations}: Use this option to process questions that take an equation as an answer.
+ See \Nameref{equations}.
+\item \texttt{vectors}: Use this option to process questions that take a vector as an answer.
+ See \Nameref{vectors}.
+\item \texttt{setSupport}: Use this option to process questions that take a set as an answer.
+ See \Nameref{setSupport}.
+\item \texttt{unordered}: Use this option to process questions that take an unordered list as an answer.
+ See \Nameref{unordered}.
+\item \texttt{factors}: Use this option to process questions that take a factored form of a polynomial.
+ See \Nameref{factors}.
+\item \texttt{point}: Use this option to process questions that take an ordered pair $(x,y)$ as an answer.
+ See \Nameref{point}.
+\item \texttt{intervals}: Use this option to process questions that take an interval, or a union of intervals
+ as an answer. See \Nameref{intervals}.
+\item \texttt{indefIntegral}: Use this compare function when evaluating the response to an indefinite integral.
+ See \Nameref{indefIntegral}.
+\item \texttt{nodec}: Use this filter function to deny the use of decimal numbers in an answer.
+ See \Nameref{nodec}.
+\item \texttt{noBinFac}: User this filter function to deny the use of \texttt{combinatorial} functions.
+ See \Nameref{noBinFac}.
+\item \texttt{limitArith}: Use any of this collection of filter functions to limit the use of arithmetic operations
+ in an answer. See \Nameref{limitArith}.
+\item \texttt{combinatorics}: Use this option to add combinatorial functions. The user may use these in an answer,
+ unless denied by the \texttt{noBinFact} filter.
+ See \Nameref{combinatorics}.
+\end{enumerate}
+
+\newtopic For a document author that is building a system of quizzes and who regularly
+uses a subset of these options, sets of options can be grouped
+together into a custom option. Use the \texttt{libcusopt.opt} file
+to declare your own sets of options. These declarations should be a
+combination of existing options. For example, The declarations in the
+\texttt{libcusopt.opt} file
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\DeclareOption{procrespgrp}{\includeOptions{%
+ vectors,setSupport,equations,intervals,limitArith,%
+ unordered,point,factors,ImplMulti}
+}
+\end{Verbatim}
+creates a new option for \textsf{dljslib} called
+\texttt{procrespgrp} which bundles together all frequently used
+options. The file \texttt{libcusopt.opt} can be placed in the
+{\LaTeX} search path, but it's perhaps best to put it in your source
+file, so that the options are local to that folder. The command
+\cs{includeOptions} is defined in the \textsf{insdljs} package.
+
+%\exPDF{dljslib_apw} A sample \texttt{libcusopt.opt} is distributed with the {\AEB},
+%this sample file consists of the example given above, and is used
+%by the sample file \texttt{dljslib\_apw.tex}, which can be found in the folder \texttt{dljslib\_examples}.
+
+\exAeBBlogPDF{p=959} A sample \texttt{libcusopt.opt} is distributed with the
+{\AEB}, this sample file consists of the example given above, and is used by
+the sample file \texttt{\href{\urlAcroTeXBlog/?p=959}{dljslib\_apw.pdf}}.
+
+
+
+
+\newtopic The JavaScript functions are organized into five categories:
+\begin{questions}
+ \item \nameref{piExt} are support functions whose capabilities are built
+ into the core \textsf{exerquiz} package. When \textsf{exerquiz} detects the presence of these
+ support functions, it utilizes them seamlessly.
+ \item \nameref{respfunc} are functions the take over the task of processing the user input. Discussion
+ of these functions begins on page~\pageref*{respfunc}.
+ \item \nameref{compareFuncs} are functions that perform the comparison between the author's answer
+ and the student's answer. Based on this comparison, the student's answer is judged correct or not.
+ Refer to page~\pageref*{compareFuncs} for the compare functions.
+ \item \nameref{filterUserResp} are functions that are called immediately after the user
+ commits the response. A filter function can examine the response before passing it on to
+ the response function. The filter function can cancel the user input if the input does not
+ meet certain criterion. The filter functions begin on page~\pageref*{filterUserResp}.
+ \item \nameref{extNumerFuncs} extend the collection of built-in functions that perform
+ numerical calculations. These numerical functions are discussed beginning on page~\pageref*{extNumerFuncs}.
+\end{questions}
+
+\def\respBoxPara{%
+\texttt{\hyperref[paraRespBox]{\string\RespBoxMath[\#1]\#2(\#3)[\#4]\#5\#6\#7\#8[\#9]*\#10}}}
+
+\subsection{Parse Input Extensions}\label{piExt}
+
+This type of JavaScript functions are support functions whose
+capabilities are built into the core \textsf{exerquiz} package.
+When \textsf{exerquiz} detects the presence of these support
+functions, it utilizes them seamlessly.
+
+\subsubsection{\texttt{ImplMulti}}\label{ImplMulti}
+
+The default behavior for processing a math fill-in question is to
+require the student to insert `\texttt*' for multiplication and to
+enclose any function being raised to a power in parentheses, e.g.
+\verb+x*(sin(x))^2+. This becomes quite tiresome if the expression to be entered
+is complicated. The \texttt{ImplMulti} option enables the student to use
+\emph{implied multiplication} and \emph{simplified exponentiation}.
+
+The \texttt{ImplMulti} option loads two JavaScript functions, \texttt{Ck4Products}
+and \texttt{Ck4Expo\-nents}. The latter implements the notation, \verb+sin^2(x)+
+for $\sin^2(x)$, and is equivalent to $(\sin(x))^2$. A more complex exponent must be enclosed enclosed
+in parentheses, for example \verb-ln^(x+1)(x)-. The former function, \texttt{Ck4Products},
+inserts the multiplication symbol, `\texttt{*}', wherever multiplication is implied. For example,
+\verb+xysin(xy)+ becomes \verb+x*y*sin(x*y)+.
+
+\newtopic\textcolor{red}{Important:} If loaded, \texttt{exerquiz}
+will automatically use these two functions in any math fill-in question, no further action is needed.
+
+%\exPDF{jquiztst} Many of the demo files that come with AeB use the \texttt{ImplMulti} option, one such
+%representative file is \texttt{jquiztst.tex}.
+
+\exAeBBlogPDF{p=810} Many of the demo files that come with AeB use the \texttt{ImplMulti} option, one such
+representative file is \texttt{\href{\urlAcroTeXBlog/?p=810}{jquiztst.pdf}}.
+
+
+\subsection{Response Functions} \label{respfunc}
+
+For fill-in questions, a response function is one that is called immediately after the user
+enters and commits an answer. The default response function that processes the user's response
+is \texttt{ProcResp}. The $\text{10}^{\text{th}}$ argument of the \cs{RespBoxMath} command,
+\begin{equation*}
+ \text{\respBoxPara}
+\end{equation*}
+is used to specify another response function. This section discusses the alternate
+response functions available in the library, and gives examples of each.
+
+\subsubsection{\texttt{equations}} \label{equations}
+
+Use this option to process questions for which an equation is the
+expected answer. This option defines the JavaScript function
+\texttt{ProcRespEq}. When using a math fill-in question (the
+\cs{RespBoxMath} command), this function is placed in the optional
+$\text{10}^{\text{th}}$ argument, the one that follows \texttt{*}.
+See \Nameref{ss:respbox} for a description of the parameters of
+\cs{RespBoxMath}
+
+\newtopic The following question goes inside a \texttt{quiz} or
+\texttt{shortquiz} environment.
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\RespBoxMath{y = 4 * x - 3}(xy){4}{.0001}{[0,1]x[0,1]}*{ProcRespEq}
+\end{Verbatim}
+
+%\exPDF{jqzequat} The demo file \texttt{jqzequat.tex} includes the
+%above example as well as other in the context of a working
+%\texttt{shortquiz}, found in the \texttt{dljslib\_examples} folder.
+
+\exAeBBlogPDF{p=951} The demo file
+\texttt{\href{\urlAcroTeXBlog/?p=951}{jqzequat.pdf}} includes the above
+example as well as other in the context of a working \texttt{shortquiz}.
+
+\newtopic Alert box message: May be redefined.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\equationsAlertMsg{"An equation is expected"}
+\end{Verbatim}
+
+\subsubsection{\texttt{vectors}}\label{vectors}
+
+Use this option to process questions for which a vector is the
+expected answer. This option defines the JavaScript function
+\texttt{ProcVec}. When using a math fill-in question (the
+\cs{RespBoxMath} command), this function is placed in the optional
+$\text{10}^{\text{th}}$ argument,
+the one that follows \texttt{*}. See \Nameref{ss:respbox} for a
+description of the parameters of \cs{RespBoxMath}.
+
+\newtopic The following question goes inside a \texttt{quiz} or
+\texttt{shortquiz} environment. The premise of these two questions
+is that the definitions of $\vec a$, $\vec b$ and $f(t)$ are given:
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\item $\vec a + \vec b =
+ \RespBoxMath{<4, 4, 4>}{1}{.0001}{[2,4]}*{ProcVec}$
+\item $\vec f'(t) =
+ \RespBoxMath{<e^t, 2*t, cos(t)>}(t){3}{.0001}{[0,1]}*{ProcVec}$
+\end{Verbatim}
+The first question takes a three component vector of numerical values, the second
+takes a three component vector of function values.
+
+%\exPDF{jqzvector} These two examples were taken from the demo file \texttt{jqzvector.tex},
+%which includes both \texttt{quiz} and \texttt{shortquiz} environments, found in the \texttt{dljslib\_examples} folder.
+
+\exAeBBlogPDF{p=949} These two examples were taken from the demo file
+\texttt{\href{\urlAcroTeXBlog/?p=949}{jqzvector.pdf}},
+which includes both \texttt{quiz} and \texttt{shortquiz} environments.
+
+
+\newtopic Alert box messages: May be redefined.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\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."}
+\end{Verbatim}
+
+\subsubsection{\texttt{setSupport}} \label{setSupport}
+
+We introduce three JavaScript (response) functions
+for handling a set of answers or a comma delimited list of answers, these
+are \texttt{ProcRespSetNum}, \texttt{ProcRespSetSym}, and
+\texttt{ProcRespListFormula}. The first function is for numerical
+answers, the second for simple symbolic answers. These JavaScript response
+functions are passed to \cs{RespBoxMath} as the $\text{10}^{\text{th}}$ argument.
+
+%\exPDF{set_test} The demo file for these three
+%response functions is \texttt{set\_test.tex}; the examples below
+%were taken from that file, found in the \texttt{dljslib\_examples}
+%folder.
+
+\exAeBBlogPDF{p=953} The demo file for these three
+response functions is \texttt{\href{\urlAcroTeXBlog/?p=953}{set\_test.pdf}}.
+
+
+\newtopic\indent The functions \texttt{ProcRespSetNum}, \texttt{ProcRespSetSym} can
+handle (math fill-in) questions whose answers are a \textit{set of
+numbers (symbols)} or a comma delimited \emph{list of numbers
+(symbols)}.
+
+\paragraph*{ProcRespSetNum:} The function can handle (math fill-in)
+questions whose answers are a \textit{set of numbers} or a
+comma delimited \textit{list of numbers}.
+
+\newtopic This example takes a comma-delimited
+list as its expected response. After the student enters the
+response, the answer is formatted as a set, with enclosing braces,
+like so \verb!{ ... }!. The student does not enter the braces, the
+JavaScript does after the comma-delimited list is entered and
+committed.
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+$(x+1)^2 (x+3) = 0$, $S = \RespBoxMath[\AddAAFormat{\formatAsSet}
+ \rectW{.75in}\textSize{0}]{-1,-3}{1}{.0001}{[0,1]}*{ProcRespSetNum}$
+\end{Verbatim}
+\noindent The formatting of answer is accomplished by passing
+\verb!\AddAAFormat{\formatAsSet}! as an optional argument of
+\cs{RespBoxMath}. The command \cs{formatAsSet} expands to a
+JavaScript function that is defined when the \texttt{setSupport}
+option is taken. The little-known key \cs{AddAAFormat} is
+defined in \textsf{exerquiz} and is specifically designed for inserting
+special formatting into a math fill-in response. The use of the set
+formatting is optional.
+
+\newtopic This next example again uses \texttt{ProcRespSetNum}. The
+equation has repeated roots. To require the student to enter the
+repeated roots, just list them as part of the answer argument.
+%Here,the set notation is not used (since it would be incorrect
+%\verb~{-1, 1/2, 2, 2, 2} = {-1, 1/2, 2}~).
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+$(x+1)(2x-1)(x-2)^3 = 0$, $x = \RespBoxMath[\rectW{.75in}\textSize{0}]
+ {-1, 1/2, 2, 2, 2}{1}{.0001}{[0,1]}*{ProcRespSetNum}$
+\end{Verbatim}
+
+\paragraph*{ProcRespSetSym:} The function can handle (math fill-in)
+questions whose answers are a \textit{set of symbols}.
+
+This function can handle simple symbolic answers. The variable list should
+be the ``universal set'' of the problem.
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\def\U{a,b,c,d,e,f,g} % define a universal set
+$A \cap B = \RespBoxMath[\AddAAFormat{\formatAsSet}
+ \rectW{.75in}\textSize{0}]{c,d}(\U){1}{.0001}{[0,1]}*{ProcRespSetSym}$
+\end{Verbatim}
+
+\paragraph*{ProcRespListFormula:} This function can handle a (math fill-in)
+question whose answer is a comma-delimited list of expressions. Similar to
+\texttt{ProcVec}, but the angle brackets are not used to specify the vector.
+
+\newtopic In this example, taken from \texttt{set\_test.tex}, a
+vector response is required, but without the enclosing angle
+brackets.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+$\vec f'(t) = \RespBoxMath{e^t, 2*t,cos(t)}(t){3}
+ {.0001}{0}{1}*{ProcRespListFormula}$
+\end{Verbatim}
+You can also define your own formatting function, to format
+the input.
+
+\subsubsection{\texttt{unordered}} \label{unordered}
+
+This option defines the JavaScript (response) function
+\texttt{ProcRespSetFormula} that will grade an \emph{unordered list} of
+formulas, such as \texttt{x}, \verb!x^2!, \verb!x^3!. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+Some question requiring an unordered list of responses.
+\RespBoxMath{x,x^2,x^3}{10}{.0001}{[1,2]}*{ProcRespSetFormula}
+\end{Verbatim}
+A correct answer is a list of the monomials \verb!x!,\verb!x^2!,\verb!x^3! in any order.
+As usual, this JavaScript response function is passed to
+\cs{RespBoxMath} as the $\text{10}^{\text{th}}$ argument.
+
+%\exPDF{dljslib_apw} The demo file that uses the \texttt{unordered} option is
+%\texttt{dljslib\_apw.tex}, which can be found in the \texttt{dljslib\_examples} folder
+
+\exAeBBlogPDF{p=959} The demo file that uses the \texttt{unordered} option is
+\texttt{\href{\urlAcroTeXBlog/?p=959}{dljslib\_apw.pdf}}.
+
+
+\subsubsection{\texttt{factors}} \label{factors}
+
+The factors option defines \texttt{ProcRespFactors}, passed to
+\cs{RespBoxMath} as the $\text{10}^{\text{th}}$ argument. The
+response function \texttt{ProcRespFactors} is used for grading
+polynomial factoring questions. For example, if a polynomial factors
+as \verb!-5x^2(x-4)(x+2)!, then the answer is only unique up to the
+order of factors and a change of sign on an even number of factors.
+The student could respond with \verb!-5x^2(x+2)(x-4)! or
+\verb!5x^2(-x+4)(x+2)! or \verb!-5(x-4)(x+2)x^2!. The function
+should grade all of these variations correctly; however, it will not
+grade \verb!-(x-4)(x+2)5x^2! as correct. The leading coefficient, if
+there is one, must be placed at the beginning, which conforms to our
+usual conventions.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+Completely factor the polynomial $x^3-4x^2 + 2x - 8$.
+\RespBoxMath{(x^2+2)(x-4)}{10}{0.0001}{[0,1]}*{ProcRespFactors}
+\end{Verbatim}
+Note that \texttt{ProcRespFactors} is passed to
+\cs{RespBoxMath} as the $\text{10}^{\text{th}}$ argument.
+
+%\exPDF{dljslib_apw} The demo file that uses the \texttt{factors} option is
+%\texttt{dljslib\_apw.tex}, which can be found in the \texttt{dljslib\_examples} folder
+
+\exAeBBlogPDF{p=959} The demo file that uses the \texttt{factors} option is
+\texttt{\href{\urlAcroTeXBlog/?p=959}{dljslib\_apw.pdf}}.
+
+
+\subsubsection{\texttt{point}} \label{point}
+
+The response function \texttt{ProcPoint} is an almost exact copy of your
+\texttt{ProcVec}, but uses parentheses instead of angle brackets as
+delimiters. Used with questions that have a point $(x,y)$ as the
+answer.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+Calculate the derivative of $\vec f(t) = (e^t,e^(t^2))$.
+\RespBoxMath{(e^t,2te^t)}(t){10}{0.0001}{[0,1]}*{ProcPoint}
+\end{Verbatim}
+\texttt{ProcPoint} is passed to
+\cs{RespBoxMath} as the $\text{10}^{\text{th}}$ argument.
+
+
+%\exPDF{dljslib_apw}The demo file that uses the \texttt{point} option is
+%\texttt{dljslib\_apw.tex}.
+
+\exAeBBlogPDF{p=959} The demo file that uses the \texttt{point} option is
+\texttt{\href{\urlAcroTeXBlog/?p=959}{dljslib\_apw.pdf}}.
+
+
+\newtopic Alert box messages: May be redefined.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\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."}
+\end{Verbatim}
+
+\subsubsection{\texttt{intervals}} \label{intervals}
+
+\texttt{ProcRespIntervals} is for grading questions that have an
+interval or union of intervals as the answer. Examples of answers
+supported by this function are listed below:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+(2,3)
+[2,3]
+(-inf,4)
+(-inf,4]
+(6,inf)
+[6,inf)
+(2,3)U[8,9)
+(-inf,6)U(9,inf)
+(-inf,6]U[7,8)U(9,inf)
+\end{Verbatim}
+Here \texttt{inf} for infinity and the capital letter \texttt{U} for
+the union symbol. Note also that intervals in a union can appear
+in any order.
+
+The \texttt{ProcRespIntervals} function has been modified by Robert Marik
+to allow intervals with end points \texttt{ln(2)}, \texttt{exp(4)} or \texttt{sqrt(3)}.
+Thus, intervals of the form
+\begin{Verbatim}[xleftmargin=\amtIndent]
+(ln(2),ln(3)]U(exp(10),inf)
+\end{Verbatim}
+are recognized by this procedure.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\RespBoxMath{(-inf,4]U[5,inf)}{10}
+ {.0001}{[0,1]x[0,1]x[0,1]x[0,1]}*{ProcRespIntervals}
+\end{Verbatim}
+\Important Problems with unbalanced parentheses while
+authoring and building the PDF file. The code below
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\intervalbox{(-inf,4)U[5,inf)}
+\end{Verbatim}
+the right parenthesis of the second interval does not have a
+matching left parenthesis. This causes problems with Acrobat
+Distiller. As a work around, escape the odd parenthesis (using
+\cs{eqbs}), like so \verb!\intervalbox{(-inf,4)U[5,inf\eqbs)}!,
+ where \cs{eqbs} is defined in the \textsf{insdljs} package.
+
+%\exPDF{dljslib_apw}The demo file that uses the \texttt{factors} option is
+%\texttt{dljslib\_apw.tex}.
+
+\exAeBBlogPDF{p=959} The demo file that uses the \texttt{factors} option is
+\texttt{\href{\urlAcroTeXBlog/?p=959}{dljslib\_apw.pdf}}.
+
+
+\subsubsection{\texttt{complex}}\label{complex}
+
+This option extends the ability of \textsf{exerquiz} to process questions
+that are expecting a complex number as an answer.
+
+\paragraph*{ProcRespComplex:} The \texttt{complex} option defines
+the function \texttt{ProcRespComplex}, which is specified in the usual way, as seen below.
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+$(3+3i)+(4+5i) = \RespBoxMath{7+8i}{3}{0.0001}{[0,1]}*{ProcRespComplex}$
+\end{Verbatim}
+The \texttt{complex} option also defines the \texttt{cis} function,
+the definition of which is
+$\operatorname{cis}(x)=\cos(x)+\imath\sin(x)$. When \texttt{complex}
+is not loaded, this function is undefined, and will be caught by the
+parser of exerquiz as a syntax error. If \texttt{complex} is loaded
+and the user enters the \texttt{cis} function in a non-complex
+problem, the user's answer is not flagged as a syntax error and will
+most probably be scored as \emph{wrong}. The exerquiz implementation of the \texttt{cis}
+function, does not, at this time, support powers of the \texttt{cis} function, the parser
+attempts to find expressions of the form \texttt{cis\string^}, flag it, and emit
+an alert message, see below. This implementation does not detect powers of the form
+\texttt{(cis(x))\string^2}, however.
+
+The next two functions are due to Bruce Wagner, with modifications by D. P. Story.
+
+\paragraph*{ProcRespListComplex:} This response function evaluates an \emph{ordered} list
+of comma-delimited complex numbers. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+If $z=4(\cos x+i\sin x)$, compute $z^2$ and $z^3$, in that order.
+\RespBoxMath{16*cis(2x),64*cis(3x)}{4}{0.0001}
+ {[0,1]}*{ProcRespListComplex}
+\end{Verbatim}
+
+
+\paragraph*{ProcRespSetComplex:} This response function evaluates an \emph{unordered} list
+of comma-delimited complex numbers. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+ Find all real and complex solutions of the equation $x^2=-9$.
+ Express your answer(s) in rectangular form $a+bi$.
+ \RespBoxMath{3i,-3i}{4}{0.0001}{[0,1]}*{ProcRespSetComplex}
+\end{Verbatim}
+
+
+%\exPDF{dljslib_complex}The demo file that uses the \texttt{complex} option is
+%\texttt{dljslib\_complex.tex}.
+
+\exAeBBlogPDF{p=1129} The demo file that uses the \texttt{complex} option is
+\texttt{\href{\urlAcroTeXBlog/?p=1129}{dljslib\_complex.pdf}}.
+
+
+\newtopic Alert box messages: May be redefined.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\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."
+}
+\end{Verbatim}
+The latter definition takes a delimited argument, necessary since it executes
+within a verbatim environment where braces \texttt{\{} and \texttt{\}} are
+not grouping delimiters.
+
+\subsection{Compare Functions} \label{compareFuncs}
+
+Compare functions are used to compare the author's answer with the
+student's answer. Based on the comparison, the student's answer is
+judged correct, or not. The \textsf{exerquiz} package has two
+built-in compare functions: \texttt{diffCompare} (the default) and
+\texttt{reldiffCompare}. The former makes the comparison based on absolute differences
+\[
+ \texttt{diffCompare} = |\,\text{Author Ans} - \text{Student Ans}\,|
+\]
+while the latter uses absolute relative differences to make the comparison
+\[
+ \texttt{reldiffCompare} = \frac{|\,\text{Author Ans} - \text{Student Ans}\,|}
+ {|\text{Author Ans}|}
+\]
+Comparison functions are passed through the $\text{9}^{\text{th}}$ argument of \cs{RespBoxMath},
+if no such argument is passed, \texttt{diffCompare} is used.
+
+\subsubsection{\texttt{indefIntegral}}\label{indefIntegral}
+
+The answer to an indefinite integral is non-unique; however all
+answers differ by a constant. This compare function is used with
+indefinite integrals. Note the name of the function is
+\texttt{indef\-Com\-pare}, this is the name you use to call the
+function. To use this compare function, insert its name in optional
+$\text{9}^{\text{th}}$ argument,
+\begin{equation*}
+ \text{\respBoxPara}
+\end{equation*}
+that's the argument that follows the interval specification.
+
+
+An example of usage of this function is found in the sample file
+\texttt{dljslib\_ex.tex}, referenced below; from that file we have:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+$\displaystyle\int\sin(x)\,dx =
+ \RespBoxMath{-cos(x)}{4}{.0001}{[0,1]}[indefCompare]$
+\end{Verbatim}
+
+%\exPDF{dljslib_ex} See the demo file
+%\texttt{dljslib\_ex.tex} for an example of indefinite integration
+%comparison. Numerous other files use indefinite integration as well.
+
+\exAeBBlogPDF{p=961} See the demo file
+\texttt{\href{\urlAcroTeXBlog/?p=961}{dljslib\_ex.pdf}} for an example of
+indefinite integration comparison.
+
+
+\subsubsection{satisfyEq}
+
+The \texttt{satisfyEq} library of procedures supports the type of question where
+the student is asked to enter one or more points that satisfy an equation.
+
+We pose a problem where the student is asked to enter an order pair or triple
+that satisfies an equation. For example
+
+\newtopic\makebox[0pt][r]{\large\color{red}$\blacktriangleright$\enspace}%
+\begin{oQuestion}{satisfyEqQuiz}%
+Enter a point that lies on the line $2x+3y=6$, the answer is an
+ordered pair of numbers, for example $(1,2)$.
+\begin{equation*}
+ \text{A point is }\RespBoxMath[%
+ \rectW{1.5in}\textSize{0}]{2x+3y-6}(xy){1}{.0001}{\viidna}*{ProcRespEvalEq}\kern1bp
+ \CorrAnsButton{various, such as (0,2)}
+\end{equation*}
+\end{oQuestion}
+The verbatim listing follows:
+\begin{Verbatim}[numbers=left,xleftmargin=\amtIndent,fontsize=\small]
+\RespBoxMath[\rectW{1.5in}\textSize{0}]{2x+3y-6}(xy){1}
+ {.0001}{\viidna}*{ProcRespEvalEq}\kern1bp
+ \CorrAnsButton{various, such as (0,2)}
+\end{Verbatim}
+Line~(2) shows the placement of one of the procedures, \texttt{ProcRespEvalEq},
+that is part of \texttt{satisfyEq}.
+
+\newtopic There are four procedures in this set:
+\begin{enumerate}
+ \item \texttt{ProcRespEvalEq}: Supports a single equation, the answer
+ is a single ordered $n$-tuple, the entries are allowed to be zero.
+ \item \texttt{ProcRespEvalEqNonZero}: Supports a single equation, the
+ answer is a single ordered n-tuple, the entries are \emph{not
+ allowed} to be zero.
+ \item \texttt{ProcRespEvalEqList}: Supports a single equation, the
+ answer consists of $k$, $n$-tuples, the components of the
+ $n$-tuples are allowed to be zero. Each $n$-tuple is separated
+ by a semi-colon (;).
+ \item \texttt{ProcRespEvalEqListNonZero}: Supports a single equation,
+ the answer consists of $k$, ordered $n$-tuples, the components of the
+ $n$-tuples are \emph{not allowed} to be zero. Each $n$-tuple is separated
+ by a semi-colon (;).
+\end{enumerate}
+
+\paragraph*{Some Technical Details.} Recall the parameter list for
+\cs{RespBoxMath},
+\begin{equation*}
+ \text{\respBoxPara}
+\end{equation*}
+
+
+\noindent\texttt{ProcRespEvalEq}, \textsl{et al}, are not based on random
+point generation, as are all the other \textsf{exerquiz} functions. Here,
+the user enters numerical data, the function then verifies the data
+entered satisfies the given equation. The role of one of the parameters
+has changed, others are ignored:
+\begin{itemize}
+ \item The role of parameter \texttt{\#2} (the correct answer) has
+ changed. Suppose the equation presented to the user is $ F = G $.
+ \begin{itemize}
+ \item For \texttt{ProcRespEvalEq} and \texttt{ProcRespEvalEqNonZero},
+ pass \texttt{F - G} as parameter \texttt{\#2}.
+ \item For \texttt{ProcRespEvalEqList} and \texttt{ProcRespEvalEqListNonZero},
+ pass \texttt{k;F-G} as the parameter \texttt{\#2}. For this type of
+ problem, the author is asking the user to enter \texttt{k}, $n$-tuples
+ that satisfy the equation. Note \texttt{k} and \texttt{F-G} are delimited
+ by a semicolon (\texttt{;}).
+ \end{itemize}
+ \item The value of \texttt{epsilon} (parameter \texttt{\#6}) is obeyed.
+ \item Parameter \texttt{\#5}, the number of iterations, is not used.
+ Though this parameter is not used, \texttt{\#5} is required by the
+ macro, so just use \texttt{1} as the number of iterations.
+ \item Parameter \texttt{\#7}, the domain of the variables, is not
+ used. Again, since this is a required parameter, use \cs{viidna};
+ \cs{viidna} is a special command that can be used for this
+ parameter, in this context only.
+ \item The optional parameter \texttt{\#9} is not used and is ignored if present.
+\end{itemize}
+
+\exAeBBlogPDF{p=} Additional examples will (eventually) appear
+on the \href{\urlAcroTeXBlog}{\AcroTeX{} Blog}.
+
+
+\subsection{Filter User's Responses} \label{filterUserResp}
+
+Filters are JavaScript functions that process the user input before being passed to the response function.
+Filters are passed to \cs{RespBoxMath} through the $\text{9}^{\text{th}}$ argument,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+$\displaystyle\int\sin(x)\,dx =
+ \RespBoxMath{-cos(x)}{4}{.0001}{[0,1]}[indefCompare]$
+\end{Verbatim}
+This $\text{9}^{\text{th}}$ argument can take on two formats: (1) the name of the compare function,
+as illustrated in `\nameref{indefIntegral}' above; (2) a JavaScript object. Use a JavaScript object
+as the $\text{9}^{\text{th}}$ argument to specify a filter.
+
+The JavaScript object that can be passed in the $\text{9}^{\text{th}}$ argument has two properties
+\texttt{comp} and \texttt{priorParse}. The object has the form
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+{ comp: !ameta(compare), priorParse: !ameta(JS_func) | !ameta(array_JS_funcs) }
+\end{Verbatim}
+The first property is used to specify a compare function, the second
+property specifies a filter or filters. The value of
+\texttt{priorParse} may be a JavaScript function to filter the
+user's response, or an array of JavaScript functions to filter the
+user input. (The array must be specified using the \Com{Array}
+command, illustrated below, see the paragraph
+`\nameref{NoProducts}', on page~\pageref*{NoProducts}.)
+
+\subsubsection{\texttt{nodec}} \label{nodec}
+
+The \texttt{nodec} option defines the JavaScript function
+\texttt{nodec} that attempts to prohibit the use of decimal numbers
+in the response. The function simply searches the user response for
+any occurrence of the decimal point. (The German language uses
+the comma as a decimal point, you can set the decimal point to some
+other symbol that \texttt{nodec} searches for through the command
+\Com{setdecimalpoint}, the default definition is
+\verb!\setdecimalpoint{.}!.)
+
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+$ 0.75 = \RespBoxMath{3/4}{1}{.0001}{[0,1]}[{priorParse: nodec }] $
+\end{Verbatim}
+
+\newtopic Alert box message: May be redefined.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\nodecAlertMsg{%
+ "A decimal answer is not acceptable here
+ Please express your answer using fractions, square roots,
+ e, log, etc."}
+\end{Verbatim}
+
+\subsubsection{\texttt{noBinFac}} \label{noBinFac}
+
+The \texttt{noBinFac} option defines the JavaScript filter function
+\texttt{noBinFac}, that disallows binomial coefficients and
+factorials in math fill-in questions. Binomial and factorial
+functions are defined through the \texttt{combinatorics} option,
+page~\pageref*{combinatorics}.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+The number of ways to choose four object from a set of ten is
+ \RespBoxMath{C(10,4)}{1}{.0001}{[0,1]}[{priorParse: noBinFac}]
+ \CorrAnsButton{C(10,4)}*{EvalCorrAnsButton}
+\end{Verbatim}
+The \texttt{noBinFac} filter is used, so the student is not allowed
+to enter binomial coefficients; however, the document author can use
+binomial coefficients, note the use in the answer (first argument)
+and in the \cs{CorrAnsButton}. The special syntax used for
+\cs{CorrAnsButton}, \Nameref{inclsoln}.
+
+%\exPDF{dljs_comb} Illustrations of this filter can be
+%found in the \texttt{dljs\_comb.tex}.
+
+\exAeBBlogPDF{p=963} Illustrations of this filter can be found in
+\texttt{\href{\urlAcroTeXBlog/?p=963}{dljs\_comb.pdf}}.
+
+
+\newtopic Alert box messages: May be redefined.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\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."}
+\end{Verbatim}
+
+\subsubsection{\texttt{limitArith}} \label{limitArith}
+
+The \texttt{limitArith} option defines a number of filter functions:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+DecimalsOnly, NoProducts, NoDivision, NoAddOrSub,
+NoArithAllowed,NoExpAllowed,NoTrigAllowed, NoTrigLogAllowed
+\end{Verbatim}
+
+%\exPDF{limarth} Examples of these filtering functions
+%can be found in the demo file \texttt{limarth.tex}.
+
+\exAeBBlogPDF{p=947} Examples of these filtering functions
+can be found in the demo file
+\texttt{\href{\urlAcroTeXBlog/?p=947}{limarth.pdf}}.
+
+
+\paragraph*{DecimalsOnly} The \texttt{DecimalsOnly} is a function
+that takes only numbers, either integer or decimal. Usage
+\begin{Verbatim}[xleftmargin=\amtIndent]
+ $ 2.3 + 4.5 = \RespBoxMath{6.8}{1}{.0001}{[0,1]}
+ [{priorParse: DecimalsOnly }]$
+\end{Verbatim}
+
+\paragraph*{NoProducts}\label{NoProducts} The function
+\texttt{NoProducts} requires that \texttt{ImplMulti} is taken. An
+example of usage is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+$ 3/4 = \RespBoxMath{.75}{1}{.0001}{[0,1]}
+ [{priorParse: \Array(NoDivision, NoProducts) }]$
+\end{Verbatim}
+In the above example, we first call \texttt{NoDivision} then \texttt{NoProducts}. Several
+filtering functions can be executed by putting them into an array, using the \cs{Array}
+command.\footnote{The \cs{Array} command was originally named \cs{array}, it has been renamed
+to avoid clashing with the \texttt{amsmath} package.}
+
+\paragraph*{NoAddOrSub} This function, as the name implies, denies the use of both addition and subtraction.
+The algorithm I use here is that if a plus or minus follows anything but a left parenthesis,
+we assume it is a binary operation of addition or subtraction, respectively.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+$ 5.1 - 3.2 =
+ \RespBoxMath{1.9}{1}{.0001}{[0,1]}[{priorParse: NoAddOrSub}]$
+\end{Verbatim}
+
+\paragraph*{NoArithAllowed} Deny user the use of all arithmetic functions, including exponents.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+$ 6/5 = \RespBoxMath{1.25}{1}{.0001}{[0,1]}
+ [{priorParse: NoArithAllowed}]$
+\end{Verbatim}
+
+\paragraph*{NoExpAllowed} Deny user the use of exponents.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+$ 25^2 = \RespBoxMath{625}{1}{.0001}{[0,1]}
+ [{priorParse: NoExpAllowed}]
+\end{Verbatim}
+
+\paragraph*{NoTrigAllowed} Deny user the use all trig functions, as
+well as the constants \texttt{PI} and \texttt{pi}, which are aliases
+for $\pi$. Example:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+$ \sin(\pi/4) = \RespBoxMath{sqrt(2)/2}{1}{.0001}{[0,1]}
+ [{priorParse: NoTrigAllowed }]$
+\end{Verbatim}
+
+\paragraph*{NoTrigLogAllowed} Deny the use of trig and log functions.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+$ \ln(e^2)\sin(\pi/4) = \RespBoxMath{sqrt(2)}{1}{.0001}{[0,1]}
+ [{priorParse: NoTrigLogAllowed }]\CorrAnsButton{sqrt(2)}$
+\end{Verbatim}
+
+\paragraph*{sciNotResp} Allow only a response in \emph{normalized} scientific notation:
+\texttt{aE([+]|-)d}, where $1\le|\texttt{a}|\le9$, and \texttt{d} is one or more digits
+(0-9) prefixed by a \texttt{-}, or an optional \texttt{+}.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+Convert 123.4 to scientific notation.
+\begin{equation*}
+ 123.4 = \RespBoxMath{1.234E+2}*{1}{0}{[0,1]}[%
+ {priorParse: sciNotResp }]\CorrAnsButton{1.234E+2}
+\end{equation*}
+\end{Verbatim}
+
+\paragraph*{noNegExp} Does not allow negative exponents. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\item Simplify $\displaystyle\frac{4}{r^4}\cdot\frac{r^3}{12}=
+ \RespBoxMath{1/(3r)}(r)*{3}{.0001}{[0,1]}[{%
+ priorParse:\Array( nodec, noNegExp )
+ }]\CorrAnsButton{1/(3r)}$
+\end{Verbatim}
+
+\paragraph*{Alert box messages:} May be redefined.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\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 not 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\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!"}
+\end{Verbatim}
+
+\subsection{Extending Numerical Functions} \label{extNumerFuncs}
+
+These JavaScript functions extend the collection of built-in
+functions that perform numerical calculations.
+
+\subsubsection{\texttt{combinatorics}}\label{combinatorics}
+
+This option defines three JavaScript functions: a binomial
+coefficient function \texttt{ch(n,r)}; a number of permutations
+function \texttt{perm(n,r)}, and a factorial function
+\texttt{fact(n)}.
+
+\paragraph*{User Accessible Functions} The user should use the names \texttt{C}, \texttt{P} and \texttt{fact}
+to access the functions \texttt{ch}, \texttt{perm} and \texttt{fact}, respectively:
+\begin{itemize}
+ \item $ \texttt{C(n,r)} = \texttt{ch(n,r)} = \dbinom{n}{r} = \dfrac{n\,!}{r\,!(n-r)\,!}$
+ \item $ \texttt{P(n,r)} = \texttt{perm(n,r)} = n\cdot(n-1)\cdots(n-r)$
+ \item $ \texttt{fact(n)} = n\cdot(n-1)\cdots3\cdot2\cdot1$
+\end{itemize}
+\textbf{Note: }If you place \verb!\replaceExclPt{true}! in the preamble, the user is allowed to enter factorials using
+the
+traditional exclamation notation: for example, \texttt{17!} is the same as fact(17), and \texttt{(17)!}, \texttt{[17]!}
+or \verb|{17}!|
+are all interpreted as \texttt{fact(17)}.
+
+%\exPDF{dljs_comb} Illustrations of the \texttt{combinatorics} option can be
+%found in the \texttt{dljs\_comb.tex}.
+
+\exAeBBlogPDF{p=963} Illustrations of the \texttt{combinatorics} option can be
+found in \texttt{\href{\urlAcroTeXBlog/?p=963}{dljs\_comb.pdf}}.
+
+
+%------------------------ List of Options ------------------------------------
+\newpage
+\section{List of Options}\label{s:ListofOpts}
+
+%\begin{tabular}{|>{\bfseries\color{red}}l|>{\PBS\raggedright}p{.5\linewidth}|}\hline
+% \multicolumn1{|>{\bfseries\columncolor{light-blue}}c|}{Component} &
+% \multicolumn1{>{\bfseries\columncolor{light-blue}}c|}{Brief Description}\\ \hline \rowcolor[gray]{.9}
+
+\def\currentPackage{Web}
+
+\begin{center}
+\setlength{\extrarowheight}{1mm}
+\setlength{\tabcolsep}{2mm}
+\begin{longtable}{|>{\ttfamily}l|>{\PBS\raggedright}p{.5\linewidth}|}
+\hline
+\multicolumn2{|c|}{Options of the Web/Exerquiz Packages} \\
+\hline
+\endfirsthead
+\hline
+\multicolumn2{|c|}{Options of the Web/Exerquiz Packages (cont.)} \\
+\hline
+\endhead
+\hline
+\endfoot
+\multicolumn2{|c|}{Options of the Web Package} \\
+\hline
+\hyperref[sss:driver]{dvipsone} & dvi-to-ps driver by {\Y&Y}, Inc. \\
+\hyperref[sss:driver]{dvips} & dvi-to-ps driver \\
+\hyperref[sss:driver]{pdftex} & tex-to-pdf application \\
+\hyperref[sss:driver]{dvipdfm} & dvi-to-pdf application \\
+\hyperref[sss:driver]{textures} & the Textures System for Mac \\
+\hyperref[sss:designoptions]
+ {\parbox[t]{.75in+4pt}{designi,\newline
+ designii,\newline designiii,\newline
+ designiv,\newline designv}} & these set screen design parameters \\
+\hyperref[ss:templates]{usetemplates} & this option activates mechanism for
+ creating colored backgrounds and overlays\\
+\hyperref[ss:templates]{leftpanel} & creates a left navigation panel\\
+\hyperref[ss:templates]{rightpanel} & creates a right navigation panel\\
+\hyperref[sss:navibar]{navibar} & inserts a menu bar at the bottom or each
+ page\\
+\hyperref[sss:latextoc]{latextoc} & displays the standard toc \\
+%\hyperref[sss:nodir]{nodirectory} & eliminates the directory listing on the title page\\
+\hyperref[sss:nodir]{usedirectory} & causes the title page directory to appear on the title page\\
+\hyperref[sss:webforpaper]{forpaper} & this turns off color, and does not put solutions on
+ separate pages. \\
+\hyperref[forcolorpaper]{forcolorpaper} & Same as \texttt{forpaper}, but
+ does not turn off color, useful for color printers.\\
+\hyperref[sss:weblatexlayout]%
+ {latexlayout} & \texttt{web} uses page
+ layout for \texttt{article} class.
+ For use with \texttt{forpaper}.\\
+\hyperref[sss:webtight]{tight} & Redefines list environment parameters so
+ lists don't take up so much space \\
+\hyperref[webpro]{pro} & Causes web to input enhanced control
+ over various web elements\\
+\hyperref[nobullets]{nobullets} & Forces the use of numbers for subsubsections, also executes the
+\texttt{latextoc} option\\
+\hyperref[usesf]{usesf} & switches to sans serif as the default font, good for presentations\\
+\hyperref[web:unicode]{unicode} & Passes the \texttt{unicode} option to \pkg{hyperref}.\\
+\hyperref[web:useui]{useui} & Passes the \texttt{useui} option to \textsf{eforms}.\\
+\hyperref[web:xhyperref]{xhyperref} & Causes web not to include the hyperref package.\\
+\hyperref[web:langopts]{dutch} & Dutch for web, passed to exerquiz. (Thanks to Henny Wilbrink)\\
+\hyperref[web:langopts]{french} & French for web, passed to exerquiz. (Thanks to Jean-Michel Sarlat)\\
+\hyperref[web:langopts]{german} & German for web, passed to exerquiz. (Thanks to Michael Wiedmann)\\
+\hyperref[web:langopts]{italian} & Italian for web, passed to exerquiz. (Thanks to PierLuigi Zezza)\\
+\hyperref[web:langopts]{norsk} & Norwegian for web, passed to exerquiz. (Thanks to Hans Fredrik Nordhaug)\\
+\hyperref[web:langopts]{russian} & Russian for web, passed to exerquiz. (Thanks to Sergei V. Znamenskii)\\
+\hyperref[web:langopts]{spanish} & Spanish for web, passed to exerquiz. (Thanks to Pedro Luis Luque)\\
+\hyperref[web:langopts]{polish} & Polish for web, passed to exerquiz. (Thanks to Jerzy Mycielski)\\
+\hyperref[web:langopts]{finnish} & Finnish for web, passed to exerquiz. (Thanks to P\"aivi Porras)\\
+\hyperref[web:langopts]{catalan} & Catalan for web, passed to exerquiz. (Thanks to Ramon Ballester)\\
+\hyperref[web:langopts]{czech} & Czech for web, passed to exerquiz. (Thanks to Robert Marik)\\
+\hyperref[web:langopts]{brazil} & Brazilian Portuguese for web, passed to exerquiz. (Thanks to Koichi
+Sameshima)\\
+\hyperref[web:langopts]{turkish} & Turkish for web, passed to exerquiz. (Thanks to Mahmut Ko\c{c}ak)\\
+\hline
+\multicolumn2{|c|}{Options of the Exerquiz Package\gdef\currentPackage{Exerquiz}} \\ \hline
+%\hyperref[ss:pdftexerquiz]{pdftex} & tex-to-pdf application \\
+%\hyperref[ss:exbasicusage]{dvipdfm} & dvi-to-pdf application \\
+\hyperref[sss:nosolutions]{nosolutions} & removes the solutions to the exercises \\
+\hyperref[sss:noquizsolutions]%
+ {noquizsolutions} & removes the solutions to the quizzes \\
+\hyperref[sss:nohideopt]%
+ {nohiddensolutions} & overrides the `\texttt{h}' (hidden)
+ option for the exercises.\\
+\hyperref[sss:noHideopt]%
+ {noHiddensolutions} & overrides the `\texttt{h}' and `\texttt{H}'
+ (hidden) options for the exercises.\\
+\hyperref[sss:nocorrections]%
+ {nocorrections} & removes the ability to correct the quizzes\\
+\hyperref[sss:solutionsafter]%
+ {solutionsafter} & solutions to exercises are typeset just after the question\\
+\hyperref[sss:exquizforpaper]{forpaper} & same function as in \pkg{web}.
+ Needed when \textsf{exerquiz} is not
+ used with \pkg{web}\\
+\hyperref[sss:exquizforpaper]%
+ {forcolorpaper} & same function as in \pkg{web}.
+ Needed when \textsf{exerquiz} is not
+ used with \pkg{web}\\
+\hyperref[sss:preview]{preview} & shows the outline of all form fields
+ in the dvi previewer \\
+\hyperref[sss:nodljs]{nodljs} & turns off the insertion of DLJS \\
+%\hyperref[sss:acrobativ]{acrobativ} & equivalent to \texttt{nodljs}\\
+\hyperref[sss:noquizzes]{exercisesonly} & if document has only exercises, no doc level JS needed\\
+%\hyperref[sss:debug]{debug} & this option is passed on to the \texttt{insdljs} package\\
+\hyperref[sss:proofing]{proofing} & mark the correct answers for
+ \texttt{shortquiz} \&
+ \texttt{quiz} for
+ proof reading. \\
+\hyperref[showgraylettersOpt]%
+ {showgrayletters} & Show gray letters under check boxes\\
+\hyperref[ss:allowrandomize]%
+ {allowrandomize} & Allow the randomization of choices in multiple choie questions\\
+\hyperref[eq:unicode]{unicode} & Passes the \texttt{unicode} option to \pkg{hyperref}.\\
+\hyperref[eq:useui]{useui} & Passes the \texttt{useui} option to \textsf{eforms}.\\
+\hyperref[eq:usesumrytbls]{usesumrytbls}& Inputs the code used to create quiz summary tables,
+ \hyperref[s:sumrytbl]{Section~\ref*{s:sumrytbl}}, page~\pageref*{s:sumrytbl}.\\
+\hyperref[eq:contsolns]{contsolns} & Places a `continued' message in the right footer on a solution page.\\
+\hyperref[sss:exerquizlangopts]{dutch} & JavaScript messages in Dutch (Thanks to Henny Wilbrink)\\
+\hyperref[sss:exerquizlangopts]{french} & JavaScript messages in French (Thanks to Jean-Michel Sarlat)\\
+\hyperref[sss:exerquizlangopts]{german} & JavaScript messages in German (Thanks to Michael Wiedmann)\\
+\hyperref[sss:exerquizlangopts]{italian}& JavaScript messages in Italian (Thanks to PierLuigi Zezza)\\
+\hyperref[sss:exerquizlangopts]{norsk} & JavaScript messages in Noregian (Thanks to Hans Fredrik Nordhaug)\\
+\hyperref[sss:exerquizlangopts]{russian}& JavaScript messages in Russian (Thanks to Sergei V. Znamenskii)\\
+\hyperref[sss:exerquizlangopts]{spanish}& JavaScript messages in Spanish (Thanks to Pedro Luis Luque)\\
+\hyperref[sss:exerquizlangopts]{polish} & JavaScript messages in Polish (Thanks to Jerzy Mycielski)\\
+\hyperref[sss:exerquizlangopts]{finnish}& JavaScript messages in Finnish. (Thanks to P\"aivi Porras)\\
+\hyperref[sss:exerquizlangopts]{catalan}& JavaScript messages in Catalan. (Thanks to Ramon Ballester)\\
+\hyperref[sss:exerquizlangopts]{czech} & JavaScript messages in Czech. (Thanks to Robert Marik)\\
+\hyperref[sss:exerquizlangopts]{brazil} & JavaScript messages in Brazilian Portuguese. (Thanks to Koichi Sameshima)\\
+\hyperref[sss:exerquizlangopts]{turkish}& JavaScript messages in Turkish. (Thanks to Mahmut Ko\c{c}ak)\\
+\hline
+\end{longtable}
+\end{center}
+
+\includeexersolutions
+
+\includequizsolutions
+
+\newpage
+\markright{References}
+
+\begin{thebibliography}{[1]}\label{references}
+\addcontentsline{toc}{section}{\protect\numberline{}References}
+\backrefparscanfalse
+\def\srtln{\vskip-\baselineskip\vskip-\parsep}
+\def\lngln{\vskip-\parsep}
+
+\item[] We list cited referenced documents, articles, and webpages, as well as
+ recommended reading. Cited material has the page number where that entry
+ was referenced.
+
+\bibitem{tech:AcroJS}\hypertarget{references}{}%
+ Acrobat JavaScript Scripting Refernce, Technical Note \#5431, Version~6.0.,
+ Adobe Systems, Inc. \backrefprint
+ \srtln\hfill{\small\url{http://partners.adobe.com/asn/acrobat/docs.jsp}}
+
+\bibitem{book:Lamport}
+ Leslie Lamport, \textit{\LaTeX: A Document Preparation}
+ System (2nd ed.), Addison-Wesley Publishing Company,
+ 1994, ISBN 0-201-52983-1. \backrefprint
+
+\bibitem{book:Goossens1}
+ Michel Goossens, Frank Mittelbach and Alexander
+ Samarin, \textit{The \LaTeX{} Companion}, second ed., Addison-Wesley
+ Publishing Company, 2004, ISBN 0-201-36299-6. \backrefprint
+
+\bibitem{book:Goossens2}
+ Michel Goossens, Sebastian Rahtz, and Frank
+ Mittelbach, \textit{The \LaTeX{} Graphics Companion},
+ Addison-Wesley Publishing Company, 1997, ISBN
+ 0-201-85469-4. \backrefprint
+
+\bibitem{book:Goossens3} Michel Goossens, and Rahtz, Sebastian,
+ with Gurari, Eitan, Moore, Ross, and Sutor, Robert,
+ \textit{The \LaTeX\ Web Companion},
+ Addison Wesley Longman, Reading, Massachusetts, USA, 1999.
+ ISBN: 0-201-43311-7. \backrefprint
+
+\bibitem{book:Kopka}
+ Helmut Kopka and Patrick W. Daly, \textit{A Guide to
+ \LaTeX2e} (2nd ed.), Addison-Wesley Publishing Company,
+ 1995, ISBN 0-201-43777-X.
+
+\bibitem{book:Knuth}
+ Donald E. Knuth, \textit{The \TeX book}, Addison-Wesley
+ Publishing Company, 1987, ISBN 0-201-13448-9. \backrefprint
+
+\bibitem{book:Merz}
+ Thomas Merz, \textit{Web Publishing with Acrobat/PDF},
+ Springer-Verlag Berlin Heidelberg New York, 1998,
+ ISBN 3-540-63762-1. \backrefprint
+
+\bibitem{article:Story:Pdfmarks}
+ D.P. Story, \textit{Pdfmarks: Links and Forms}, AcroTeX Web
+ Site, 1998. \backrefprint
+ \lngln\hfill{\small\url{www.math.uakron.edu/~dpstory/acrotex.html}}
+
+\bibitem{article:Story:LaTeX}
+ D.P. Story, \textit{Using \LaTeX\ to Create Quality PDF Documents for the
+ WWW}, Acro\!\TeX\ Web Site, 1998. \backrefprint
+ \srtln\hfill{\small\url{www.math.uakron.edu/~dpstory/acrotex.html}}
+
+\bibitem{book:AEBB}
+ D. P. Story, \textsl{\AEBBook}, in preparation. \backrefprint
+
+
+\end{thebibliography}
+
+
+% \printindex
+\end{document}
+
+\newpage
+
+\makeatletter
+\renewcommand{\section}{%
+ \renewcommand{\@seccntformat}[1]{}%
+ \@startsection{section}{1}{\z@}%
+ {-3ex\@plus -1ex \@minus-.2ex}%
+ {1ex\@plus .2ex}% 6pt
+ {\noindent\normalfont\normalsize\bfseries\color{aeb}}}%
+\renewcommand\subsection{%
+ \renewcommand{\@seccntformat}[1]{\textbullet\enspace}%
+ \@startsection{subsection}{2}{\z@}%
+ {-2.5ex\@plus -1ex \@minus -.2ex}%
+ {1ex \@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries\color{aeb}}}
+\renewcommand\subsubsection{%
+ \renewcommand{\@seccntformat}[1]{\color{aeb}\large$\bullet$\enspace}
+ \@startsection{subsubsection}{3}{\z@}%
+ {-2ex\@plus -1ex \@minus -.2ex}%
+ {.5ex \@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries}}
+\renewcommand*\thesection{}
+\renewcommand*\thesubsection{\textbullet}
+%\renewcommand*{\thesubsubsection}{\textbullet}
+\renewcommand*\l@subsection{\@dottedtocline{2}{2.8em}{1.2em}}
+%\l@subsection{\@dottedtocline{3}{3.8em}{1.2em}}
+\makeatother
+
+\addtocontents{toc}{\string\renewcommand*\string\l@subsection{\string\@dottedtocline{2}{2.8em}{1.2em}}}
+
+\section{What's New}
+
+The following is a brief enumeration of some of the major new
+features of the \pkg{web} and \textsf{exerquiz} packages.
+
+\subsection{Web}
+
+\begin{questions}
+
+ \item (Version 4.1) Added the option \texttt{useui}, which is passed
+ \textsf{eforms}. If \textsf{eforms} is subsequently loaded,
+ \textsf{eforms} loads the xkeyval package, and key-value pairs are
+ defined for use in the optional argument of form and link commands.
+ See the \href{eformman.pdf}{eforms manual} for details.
+
+ \item (Version 4.1) Added a unicode option. This option is passed to hyperref, if eforms
+ is subsequently loaded, eforms (and exerquiz) will accept {\LaTeX} markup in the optional
+ argument of the form fields. See the \href{eformman.pdf}{eforms manual} for details.
+
+ \item (Version 4.1) Added the \texttt{turkish} language option. I extend my appreciation
+ to Mahmut Ko\c{c}ak for this translation.
+
+ \item (Version 4.0g) Added the command \cs{useFullWidthForPaper}, see the discussion
+ in \Nameref{paperoptions}.
+ \item (Version 4.0f) Added \cs{setScreensizeFromGraphic}, see
+ \hyperref[setScreensizeFromGraphic]{Section~\ref*{setScreensizeFromGraphic}},
+ page~\pageref*{setScreensizeFromGraphic}.
+ \item (Version 4.0d) \cs{makeinlinetitle}, see \Nameref{inlinetitle}.
+ \item (Version 4.0c) Added \cs{aboveTopTitleSkip}, the amount of skip above the first
+ line on the title page, so the whole title can be move downwards, if
+ desired. See the section \Nameref{top}.
+ \item (Version 4.0) The pro option with many user-convenient features,
+ see \Nameref{webpro}.
+ \item (Version 4.0) New \Web{} options of \texttt{usesf},
+ \hyperref[usesf]{page~\pageref*{usesf}} and \texttt{center\-title\-page},
+ \hyperref[centertitle]{page~\pageref*{centertitle}}.
+
+\item[] \rule[2pt]{1in}{.4pt} Older New Stuff \rule[2pt]{1in}{.4pt}
+
+ \item (Version 3.3) Made many internal changes for my new package, the
+ \textsf{\textcolor{blue}{Acro\!\TeX{} Presentation Bundle}} (\cAPB), yet
+ to be released, but see \url{http://www.acrotex.net} for details and demos.
+ \item (Version 3.3) Added some commands for running headers
+ and footers, these are \cs{lheader}, \cs{cheader}, \cs{rheader},
+ \cs{lfooter}, \cs{cfooter}, \cs{rfooter}, \cs{clearHeaders} and \cs{re\-store\-Head\-ers}.
+ \item (Version 3.2) Added support for the Dr. Uwe Kern's \textsf{xcolor}
+ package. Unrecognized options are passed to the color package,
+ in particular, the \textsf{(x)color} option \texttt{dvipsnames} is passed
+ from \Web{} to the color package.
+ \item[] If available, \textsf{xcolor} is used, otherwise
+ \pkg{web} uses the standard \textsf{color} package.
+ \item[] There is a \texttt{noxcolor} which should be used as a
+ global option, that is passed as an option of the class. Thus,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass[noxcolor]{article}
+\end{Verbatim}
+ will cause \pkg{web} (and other packages such as
+ \textsf{PSTricks}) to use the \textsf{color} package, even
+ though \textsf{xcolor} may be present.
+ \item (Version 3.2) Added a \texttt{nobullets} option. When taken, the bullets
+ that traditionally appear for the \cs{subsubection} now appear
+ with subsubsection numbers.
+
+ \item (Version 3.2) Added a \texttt{draft} option: When you take this option,
+ graphic overlays are not allowed. This is useful when you rely
+ heavily on graphic overlays, but during the development phase,
+ don't need to read and re-read your overlays. The defined
+ background colors will be used instead. Remove this option to
+ build the final version of your document.
+
+ \item (Version 3.2) Defined macros for conveniently
+ setting the color of some of the title page elements:
+ \cs{titleColor}, \cs{authorColor} and \cs{universityColor}.
+ Each takes a single argument, a named color. The defaults are
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\universityColor{blue}
+\titleColor{black}
+\authorColor{black}
+\end{Verbatim}
+
+ \item (Version 3.2) Changed optional argument for the template commands
+ \cs{template} and \cs{panel\-template}:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\template[<includegraphics\_opts>]{<path\_to\_template>}
+\paneltemplate[<includegraphics\_opts>]{<path\_to\_template>}
+\end{Verbatim}
+ The optional argument \texttt{[<includegraphics\_opts>]} can be used
+ to pass options to the underlying \cs{includegraphics} command. Do
+ not use the \texttt{width} and \texttt{height} keys; probably, it is
+ safest to use only the Boolean keys. The Boolean key
+ \texttt{hiresbb} is quite useful when stretching a small graphic to
+ fit over a larger area. The one required argument is the path to the
+ graphic file.
+
+ \item (Version 3.2) Added a number of new commands to improve template management. See
+ the \texttt{web.dtx} for documentation.
+ \item (Version 3.2) Added language option \texttt{czech}, the translation due
+ to Robert Marik.
+ \item (Version 3.2) Added language option \texttt{catalan}, the translation due
+ to Ramon Ballester.
+ \item (Version 3.2) Added language option \texttt{brazil}, the translation due to
+ Koichi Sameshima.
+ \item Added language \texttt{finnish} Options. Translation due
+ to Paivi Porras.
+ \item Added a \texttt{\hyperref[forcolorpaper]{forcolorpaper}} option. This is the same as \texttt{forpaper}
+ but the color operators are not turned off.
+ \item Added three new options for creating color backgrounds
+ and overlays, \texttt{usetemplates}. \texttt{rightpanel} and
+ \texttt{leftpanel}, see the section \Nameref{ss:templates}.
+ The various template options requires the \textsf{eso-pic}
+ package by Rolf Niepraschk and the \textsf{everyshi} package
+ by Martin Schr\"oder. The \textsf{web package} supports graphics overlays
+ for the \texttt{dvipsone}, \texttt{dvips}, \texttt{pdftex} and
+ \texttt{dvipdfm} options.
+ \item Added a command to create navigation icons,
+ \nameref{ss:newnaviicon}, page~\pageref{ss:newnaviicon}.
+ \item Added a \texttt{textures} option, due to Ross Moore.
+ \item Made some minor changes to make \pkg{web} work better
+ with the \texttt{book} document class.
+ \item The introduction of the \textsf{polish} option. This
+ makes a total of nine localizations of \textsf{web/exerquiz}:
+ french, german, norsk, dutch, spanish, italian, russian,
+ dansk and polish.
+ \item Set an alias between \cs{marginsize} and \cs{margins}.
+ The latter is used by pdfscreen. This will make it easier for
+ people to switch between using web and pdfscreen. The use of
+ \cs{marginsize} is now deprecated.
+\end{questions}
+
+\normalcolor
+
+\subsection{Exerquiz}
+
+
+\begin{questions}
+
+ \item (Version 6.3) Added the option \texttt{useui}, which is passed
+ \textsf{eforms}. If \textsf{eforms} is subsequently loaded,
+ \textsf{eforms} loads the xkeyval package, and key-value pairs are
+ defined for use in the optional argument of form and link commands.
+ See the \href{eformman.pdf}{eforms manual} for details.
+
+ \item (Version 6.3) Added a unicode option. This option is passed to hyperref, if eforms
+ is subsequently loaded, eforms (and exerquiz) will accept {\LaTeX} markup in the optional
+ argument of the form fields. See the \href{eformman.pdf}{eforms manual} for details.
+
+ \item (Version 6.3) Added the \texttt{turkish} language option. I extend my appreciation
+ to Mahmut Ko\c{c}ak for this translation.
+
+ \item (Version 6.2d) Added \cs{titleQuiz} and \cs{fancyQuizHeaders},
+ see \hyperref[titleQuiz]{Section~\ref*{titleQuiz}}, page~\pageref*{titleQuiz}
+ and \hyperref[titleQuizSQ]{Section~\ref*{titleQuizSQ}}, page~\pageref*{titleQuizSQ}.
+ \item (Version 6.2c) Added a feature that I have used for years to \textsf{exerquiz}:
+ see the section titled \Nameref{showcreditmarkup}.
+ \item (Version 6.2a) Added a feature for bookmarking exercises and quizzes,
+ see \hyperref[bmExQz]{Section~\ref*{bmExQz}} on page~\pageref*{bmExQz}.
+ \item (Version 6.2) Added the manswers environment for multiple answer
+ questions, that is, multiple choice questions that have several correct
+ answers. Multiple selection is permitted. See the \Nameref{manswersQuiz}.
+ \item (Version 6.1) Added the ability to randomize the multiple
+ choice alternatives, see the two sections \Nameref{ss:allowrandomize} and
+ \Nameref{s:random} for details.
+ \item (Version 6.05f) For inputting math fill-in responses. \texttt{log} now means common log,
+ and as before \texttt{ln} means natural log. Also,
+ re-engineered things so that math fill-in now accepts, and
+ correctly interprets, scientific notation (using E-notation)
+ $\texttt{<decimal\_number>}\text{E}\texttt{<integer>}$. The
+ capital letter E represents ``times ten raised to the power'',
+ the lower case e is reserved for use as the natural number.
+ \item (Version 6.05d) Added option \texttt{showgrayletters},
+ see \Nameref{showgraylettersOpt}.
+ \item (Version 6.05e) Added \cs{setMClabelsep} and
+ \cs{resetMClabelsep} to adjust the horizontal distance between
+ the label and text for multiple choice questions. See the
+ discussion in \Nameref{BasicUsage}.
+
+ \item (Version 6.05g) Added \cs{renameSolnAfterTo} for conveniently
+ changing the solution after label, and
+ \cs{resetSolnAfterToDefault} for resetting back to the default.
+ These two commands are available for use in \textsf{exerquiz} or
+ in \textsf{eqexam}. There is a brief discussion of these
+ commands in \Nameref{sss:solutionsafter}.
+
+ \item (Version 6.05c) Added the commands \Com{DeclareQuiz}, \Com{floatQuiz},
+ \Com{startQuizHere}, \Com{endQuizHere}, and \Com{dockQuiz}. to
+ start a quiz in an arbitrary place prior to the beginning of the
+ quiz. See \Nameref{floatQuiz}.
+
+\item[] \rule[2pt]{1in}{.4pt} Older New Stuff \rule[2pt]{1in}{.4pt}
+
+\item (Version 6.03) Added the \hyperref[bChoices]{\cs{bChoices}}/\cs{eChoices} command
+ pair, this makes it easy to lay out multiple choice alternatives.
+
+\item (Version 6.0) Improved the \texttt{mathGrp} environment so
+ that it treats grouped question truly as a unit. Added two
+ optional parameters to the environment. The document author
+ can specify a JavaScript function to grade the grouped
+ questions. Despite its name, \texttt{mathGrp} environment
+ works for text fill-in as well as math fill-ins (but not for
+ multiple choice). The \texttt{mathGrp} environment also now
+ works for the \texttt{shortquiz} environment (in addition to
+ the \texttt{quiz} environment). See \Nameref{grouped}.
+
+ \item Separated the \href{eformman.pdf}{eforms} support from
+ the \textsf{exerquiz} package. \textsf{eforms} is now a
+ stand-alone package that can be used by people who may want to
+ use PDF forms outside the context of a document that contains
+ quizzes. See the demo file \texttt{eforms\_tst.tex}.
+
+ \item \textcolor{red}{Important:} There is one required
+ parameter for the \texttt{quiz} environment, a base name used
+ to build the names of the form fields used in the quiz, e.g.,
+ \verb+\begin{quiz}{qzQuiz1}+. Now this base name of the quiz
+ should only contain ascii characters or numbers. This name is
+ now used to construct a JavaScript object, so it must be a
+ valid JavaScript object name. For example \texttt{qzQuiz1} is
+ correct, but \texttt{qz:Quiz-1} is not.
+
+ \item Created \cs{@PromptButton} a new correct answer button for quizzes. Quiz
+ questions might have a series of parts in which the answer
+ to one part depends on the answer to the previous part.
+ With \cs{@PromptButton}, the answer can be optionally
+ provided while the student is taking the quiz. See the section on the
+ Prompt Button for details.
+
+ \item Created a grouping environment for math fill-in questions. See the section
+ entitled Grouping Math Fill-in Questions.
+
+ \item Added a \texttt{noquizsolutions} option -- mostly for online quizzing --
+ see page~\pageref{sss:noquizsolutions}.
+ \item Changed the behavior of \cs{CorrButton}: If \hyperref[sss:nocorrections]{\texttt{nocorrections}}
+ is used, the \cs{CorrButton} does not appear. This is reasonable,
+ \cs{CorrButton} is used to display corrections to the quiz.
+ \item Modified the \texttt{questions} environment so that it behaves more like
+ standard {\LaTeX} list environments. You can now nest the \texttt{questions}
+ environment three deep. See \texttt{pc\_test.tex} for examples.
+ \item Added an optional argument to the \cs{Ans} command for multiple-choice questions
+ for assigning \textit{partial credit}. See the demo file \texttt{pc\_test.tex}.
+ \item Modified the behavior of the link-type multiple choice questions When you select
+ an alternative, a check appears superimposed over the letter. I've removed the
+ alert dialog informing the user that he has change his selection. The file
+ \texttt{pc\_test.tex} illustrates this.
+ \item The \hyperref[paraRespBoxNine]{ninth parameter} of \cs{RespBoxMath} has been modified to take an JS object.
+ This object can have two properties:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+{ [ priorParse: <js function> | <array of js functions> ],
+ [ comp: <compare function> ] }
+\end{Verbatim}
+ The \texttt{priorParse} property is used to filter the user's answer prior to be fully parsed,
+ while the \texttt{comp} property is used to specify a custom compare function.
+ See the demo file \texttt{integer\_tst.tex} for examples.
+ \item Again for the math fill-in (\cs{RespBoxMath}), the way in which you specify variables (the
+ \hyperlink{paraRespBoxThree}{third parameter})
+ has changed: Specify the variables using a comma-delimited list, for example, \texttt{(r:x,i:n,y)}.
+ Typing the variables has been introduced: \texttt{r:x} means that \texttt{x} is a real variable (the default)
+ and \texttt{i:n} means that \texttt{n} is an integer variable. See the demo file \texttt{integer\_tst.tex}.
+
+ \item Added complete support with \textsf{eForms}. Integrated
+ this support into the quiz environments. See the \texttt{\href{eformman.pdf}{eForms Manual}}
+ documentation file for complete details.
+ \item Documented the use of form check boxes with the \texttt{shortquiz}
+ environment and introduced the commands
+ \begin{Verbatim}[xleftmargin=\amtIndent]
+ \sqTurnOffAlerts,\sqTurnOnAlerts,\sqNoCorrections,\sqNoCorrections
+ \end{Verbatim}
+ to control response feedback.
+ \item Added language \texttt{finnish} Options. Translation due
+ to Paivi Porras.
+ \item Eliminated the need for the \cs{ifforAcroV} switch in the
+ \texttt{*.ins} files. I've written new code that detects whether Acro4 or
+ Acro5 is being used; in the latter case, a \texttt{try/catch} strategy is
+ used to catch exceptions.
+ \item Added a \texttt{textures} option, due to Ross Moore.
+ \item Wrote same JavaScripts and placed them in the \texttt{dljslib} to
+ process questions in which an equation is the expected answer. See the
+ sample file \texttt{jqzequat.tex}.
+ \item Wrote the \texttt{dljslib} Package, this is a library of JavaScript
+ functions that extends the capabilities of \textsf{exerquiz}.
+ \item Extended math fill-in questions to include arbitrary multivariate
+ questions. See the sample file \texttt{multivar.tex}.
+ \item Added several macros: \cs{defaultquiztype} and
+ \cs{quiztype}. The first command takes no arguments, the
+ second on takes one: either l or f; e.g. \verb+quiztype{f}+
+ (\verb+quiztype{l}+) causes the quiz environment to ignore the
+ optional `quiztype' parameter (\texttt* or no \texttt*) and to
+ use a form-type (resp.\ link-type). Placing
+ \cs{defaultquiztype} reverts the quiz environment back to its
+ default behavior (obeying the first optional parameter).
+ \item Added the convenience commands for the \texttt{quiz} environment: \cs{useBeginQuizButton},
+ \cs{use\-EndQuizButton}, \cs{useBeginQuizLink} and \cs{useEndQuizLink}.
+ See \mlNameref{sss:FormButton} for details.\footnote{This link requires Adobe Reader 7.0 or later.}
+ \item Added the \texttt{noHiddensolutions} for \textsf{exerquiz}, and
+ added an `\texttt{H}' option for exercises to hide solutions, see
+ \nameref{sss:hide} and \nameref{sss:noHideopt}, for details.
+ \item Added a method of assigning points to a quiz question. Useful
+ for submitting questions to a CGI for recording in a database.
+ \item Added a \texttt{noPeeking()} JS function and supporting macros.
+ When the \cs{NoPeeking} command is executed, the student cannot
+ see the solutions to the quizzes (not shortquizzes) by browsing
+ through the file. See \Nameref{sss:nopeek}.
+ \item Added new JS functions \texttt{lowThreshold()} and
+ \texttt{highThreshold()}. I modified the end of quiz macros to
+ incorporate the calling of one of these two (or calling a
+ document author defined routine). See \Nameref{threshold}.
+ \item Added a `\texttt{debug}' option, which gets passed on
+ to \texttt{insdljs} package. This can be used to write some
+ debugging commands within your JS. (\Nameref{sss:debug})
+ \item For math fill-ins, the author does not use the
+ JavaScript syntax; the author can use simplified notation, e.g,
+ \verb+2*x*e^(x^2)+ instead of \texttt{2*x*exp(pow(x,2))}.
+ Author's answer now passes through the ParseInput JS routine.
+ \item Now the document author can define a custom
+ JS function to process an answer. Also, when writing
+ Math fill-in questions, you can also define your
+ own variable (no longer restricted to just `$x$').
+ \item Added in a \texttt{solutions} environment to
+ \texttt{quiz} environment. Added additional optional parameter
+ into the \cs{RespBox}, \cs{RespBoxTxt} macros to indicate the
+ presence of a solution. The solution is viewed by
+ shift-clicking on the ``Ans'' Button (\cs{CorrAnsButton}). A
+ button or checkbox that has a solution has a boundary color of
+ \cs{solutionColor}.
+ \item \texttt{Exerquiz} now uses the package \texttt{insDLSJ} to
+ insert document level JavaScripts; this gives the document author
+ a chance to write custom JavaScripts. I've also modified many macros
+ that enable the document author to ``hook'' into.
+ \item New command \cs{RespBoxEssay} that can be used to pose
+ Essay-type questions. The question is not evaluated by JavaScript
+ within the document; rather, this question should be submitted
+ to a CGI for later review by the instructor.
+ \item \cs{RespBoxMath} has been defined to be the same as
+ \cs{RespBox} to give a little more consistency in naming.
+ \item The use of \cs{RespBoxNT} has been deprecated. Added in
+ feature to customize the comparison of two answers.
+ \item Added a text fill-in question type that can be used in the
+ \texttt{short\-quiz} and \texttt{quiz} environments.
+ (\Nameref{sss:oTxtQ})
+ \item A \texttt{preview} option has been added. When this
+ option is used, the bounding rectangles of all form fields
+ are framed so their positions can be seen in a dvi previewer.
+ See \mlNameref{sss:preview}.\footnote{This link requires Adobe Reader 7.0 or later.}
+ \end{questions}
+
+ \subsection{insdljs}
+
+ The \texttt{insdljs} Package is a general purpose \LaTeX{} package
+ for inserting Acrobat JavaScript into the document level section
+ of a PDF document. The package features the \texttt{insDLJS}
+ environment. This environment typically goes in the preamble of a
+ \LaTeX{} source file, or in the style files of a \LaTeX{} package.
+ See the documentation contained within the \texttt{insdljs.dtx}
+ file for additional details. There is a sample file,
+ \texttt{insdljs\_ex.tex} that can be used as a startup test file.
+
+\begin{questions}
+ \item (Version 2.0f) Added a command \cs{previewMiKTeX} which redefines \cs{jsR} and
+ \cs{jsT} that enables, I hope, the \textsf{yap} previewer to preview
+ an \textsf{AeB} document.
+ \item Added the \texttt{defineJS} environment. Use this environment to
+ write JavaScript for buttons and other form fields.
+ \item Added the \texttt{execJS} environment. Use this environment to write
+ ``discardable'' JavaScript that will execute when the newly created document is opened
+ in the Acrobat Viewer. (The Acrobat Viewer, not the Reader, is required.)
+ See the demo file \texttt{execjstst.tex}.
+\end{questions}
+
+\subsection{dljslib}
+
+The \texttt{dljslib} Package acts as a library of JavaScript
+functions. Due to the increased programmability of
+\texttt{exerquiz} and its new-found flexibility, it is possible to
+write a number of different routines to handle various kinds of
+math fill-in questions. These JavaScript functions can be stored
+in the library and retrieved when needed. This package requires
+the \texttt{insdljs} package.
+ \begin{questions}
+
+ \item There are some major user-contributed JavaScript routines.
+ The following functions, which are \texttt{ProcResp}-types, were
+ written for an online grading system being developed by Drs.\
+ Bruce Wagner and David Arnold, and Mr. Jacob Miles-Prystowsky.
+ The descriptions given below were provided by the authors.
+ I want to extend my deep thanks for their contribution! See the
+ documentation of \textsf{dljslib.dtx} for extended details.
+ \begin{questions}
+ \item The JS function \texttt{ProcRespSetFormula} grades an
+ unordered list of formulas, such as \texttt{x}, \verb!x^2!, \verb!x^3!.
+ \item \texttt{ProcRespFactors} is for grading polynomial factoring
+ questions. If a polynomial factors as
+ \verb!-5x^2(x-4)(x+2)!, the answer is only unique
+ up to the order of factors and a change of sign on an
+ even number of factors. For example, it could also be
+ written as \verb!-5x^2(x+2)(x-4)! or
+ \verb!5x^2(-x+4)(x+2)! or \verb!-5(x-4)(x+2)x^2!, etc.
+ This script should grade all of these correctly.
+ \item The JS function \texttt{ProcPoint} is almost an exact copy of
+ the JS function \texttt{ProcVec}, but uses parentheses instead of angle brackets as
+ delimiters. This is for questions that have a point $(x,y)$ as the
+ answer.
+ \item \texttt{ProcRespIntervals} is for grading questions that have an
+ interval or union of intervals as the answer.
+ \end{questions}
+ \item[] The sample file for this contribution is \texttt{dljslib\_apw.tex}.
+
+ \item Added a feature whereby you can create a file
+ \texttt{libcusopt.opt} to declare your own options for this
+ package. These declarations should be a combination of existing options.
+ For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\DeclareOption{procrespgrp}{\includeOptions{%
+ vectors,setSupport,equations,intervals,%
+ unordered,point,factors,ImplMulti}
+}
+\end{Verbatim}
+ creates a new option for \textsf{dljslib} called \texttt{procrespgrp} which bundles
+ together all frequently used JS functions frequently used. The file
+ \texttt{libcusopt.opt} can be placed in the {\LaTeX} search path, but it's perhaps
+ best to put it in your source file, so that the options are local to that folder.
+ The command \cs{includeOptions} is defined in \texttt{dljslit.dtx}.
+
+ \item[] A sample \texttt{libcusopt.opt} is distributed with the
+ {\AEB}, this sample file consists of the example given above,
+ and is used by the sample file \texttt{dljslib\_apw.tex}.
+
+\item[] \rule[2pt]{1in}{.4pt} Older New Stuff \rule[2pt]{1in}{.4pt}
+
+ \item Added an option \texttt{limitArith} to the
+ \textsf{dljslib}, which limits the use of arithmetic operations
+ and built-in functions. The demo file is
+ \texttt{limarth.tex}, found in the \texttt{dljslib\_examples}
+ folder. \item Added \texttt{setSupport} option to
+ \textsf{dljslib}. This gives support to math fill-in questions
+ for processing (1) a set of numerical answers or a comma
+ delimited list of answers; (2) a symbolic set of answers. The
+ demo file is \texttt{set\_test.tex}.
+
+ \item Added \texttt{combinatorics}, \texttt{nodec} and
+ \texttt{noBinFac} to the JavaScript library. These additions
+ are due to Ross Moore and Frances Griffin and were developed
+ for their
+ \href{http://rutherglen.ics.mq.edu.au/~macqtex/}{MacQ{\TeX}}
+ online testing system. Some of the changes listed in the
+ \textsf{exerquiz} section above were to accommodate these new
+ functions (for example, having integer variables). Many, many
+ thanks for generously sharing their JavaScript with the
+ \TeX/PDF community. The test file for these features is
+ \texttt{integer\_tst.tex}.
+\end{questions}
+% See the documentation contained within the \texttt{dljslib.dtx} document, and
+% see \Nameref{sss:dljslib}.
+
+\section{What's Old}
+
+\paragraph*{History.} The \pkg{web} and \textsf{exerquiz} packages were written in
+preparation for a two-day workshop on \LaTeX/PDF that I gave at
+the \textcolor{red}{College of the Redwoods}, April~30-May~1,
+1999, at the invitation of David Arnold. The workshop forced me
+to take many of the basic macros that I had developed in plain
+\TeX\ and convert them to \LaTeX.
+
+Significant additions to the \textsf{exerquiz} were made immediately
+following the $\text{20}^{\text{th}}$ Annual Conference of the \TeX\
+User's Group (\textsf{tug}), in August, 1999, Vancouver, British
+Columbia, which I attended.
+
+The \textsf{insdljs} package was written for the $\text{22}^{\text{nd}}$
+Annual Conference of the \TeX\ User's Group (\textsf{tug}), in
+August 2001, at the University of Delaware, Newark, Delaware.
+
+The \texttt{execJS} environment was created as a result of some
+work I did for the Seybold SF Convention, 2002 (see article at
+\href{http://www.planetpdf.com/mainpage.asp?webpageid=2130}{planetPDF});
+the techniques were first presented to the PDF public at this
+convention. My complete presentation from that conference is
+again available from
+\href{http://www.planetpdf.com/mainpage.asp?webpageid=2310}{planetPDF}.
+
+\paragraph*{Acknowledgements.} Noel Vaillant, \url{www.probability.net}, deserves my thanks for
+his enthusiasm for the \pkg{web} style file and his initial
+work on it inspired me to make a serious effort at writing a
+\LaTeX\ package.
+
+Thanks also goes out to Jean-Michel Sarlat for writing a French
+version of the \pkg{web} and \textsf{exerquiz} packages. See
+his \href{http://melusine.eu.org/syracuse/}{Syracuse} Web site. He
+urged me to include a language option. Thanks also goes to
+Michael Wiedmann who suggested a language option many months
+earlier, but I'm afraid it landed on deaf ears at the time.
+These two provided the translations for the \texttt{french} and
+\texttt{german} options. (January 1, 2000)
+
+My thanks to Heiko Oberdiek, who took a close look at
+\textsf{insdljs}. He made several suggestions, and urged me to
+make some significant improvements to this package.
+
+\medbreak\noindent
+Now, I really must get back to retirement.\enspace\dps
+
+\addtocontents{toc}{\protect\vspace{2ex}}
+\includeexersolutions
+\includequizsolutions
+
+
+\newpage
+\markright{References}
+
+\begin{thebibliography}{[1]}\label{references}
+\addcontentsline{toc}{section}{\protect\numberline{}References}
+
+\bibitem{tech:AcroJS}\hypertarget{references}{}%
+ Acrobat JavaScript Scripting Refernce, Technical Note \#5431, Version~6.0.,
+ Adobe Systems, Inc., 200\\ \url{http://partners.adobe.com/asn/acrobat/docs.jsp}
+
+\bibitem{book:Lamport}
+ Leslie Lamport, \textit{\LaTeX: A Document Preparation}
+ System (2nd ed.), Addison-Wesley Publishing Company,
+ 1994, ISBN 0-201-52983-1.
+
+\bibitem{book:Goossens1}
+ Michel Goossens, Frank Mittelbach and Alexander
+ Samarin, \textit{The \LaTeX{} Companion}, Addison-Wesley
+ Publishing Company, 1994, ISBN 0-201-54199-8.
+
+\bibitem{book:Goossens2}
+ Michel Goossens, Sebastian Rahtz, and Frank
+ Mittelbach, \textit{The \LaTeX{} Graphics Companion},
+ Addison-Wesley Publishing Company, 1997, ISBN
+ 0-201-85469-4.
+
+\bibitem{book:Goossens3} Michel Goossens, and Rahtz, Sebastian,
+ with Gurari, Eitan, Moore, Ross, and Sutor, Robert,
+ \textit{The \LaTeX\ Web Companion},
+ Addison Wesley Longman, Reading, Massachusetts, USA, 1999.
+ ISBN: 0-201-43311-7.
+
+\bibitem{book:Kopka}
+ Helmut Kopka and Patrick W. Daly, \textit{A Guide to
+ \LaTeX2e} (2nd ed.), Addison-Wesley Publishing Company,
+ 1995, ISBN 0-201-43777-X.
+
+\bibitem{book:Knuth}
+ Donald E. Knuth, \textit{The \TeX book}, Addison-Wesley
+ Publishing Company, 1987, ISBN 0-201-13448-9.
+
+\bibitem{book:Merz}
+ Thomas Merz, \textit{Web Publishing with Acrobat/PDF},
+ Springer-Verlag Berlin Heidelberg New York, 1998,
+ ISBN 3-540-63762-1.
+
+\bibitem{article:Story:Pdfmarks}
+ D.P. Story, \textit{Pdfmarks: Links and Forms}, AcroTeX Web
+ Site, 1998,\\\url{www.math.uakron.edu/~dpstory/acrotex.html}
+
+\bibitem{article:Story:LaTeX}
+ D.P. Story, \textit{Using \LaTeX\ to Create Quality PDF Documents for the
+ WWW}, Acro\!\TeX\ Web Site, 1998,\\
+ \url{www.math.uakron.edu/~dpstory/acrotex.html}
+
+
+\end{thebibliography}
+
+
+% \printindex
+\end{document}
+
+I copied the file amsfonts.map from texmf/dvips/ams
+to texmf/pdftex/base. I then edited the file
+pdftex.cfg and included the line
+map +amsfonts.map.
+map standard.map % to get dings
+
+output_format 1
+compress_level 9
+decimal_digits 2
+page_width 210mm
+page_height 297mm
+horigin 1in
+vorigin 1in
+map standard.map
+map +cm.map
+map +amsfonts.map
+% map +logo.map
+% map +lucida.map
+% map +misc.map
+% map +cs.map
+% map +cmttf.map
+% map +test.map
+% map +ttftest.map
+% map +mono.map
+
+
+\subsubsection{An Example}\label{sss:quizexample}
+
+
+%\renewcommand\bqlabel{Begin Quiz}
+%\renewcommand\eqlabel{End Quiz}
+
+The following example is used at the Acro\!\TeX\ Web Site in a
+demonstration program on how to use \emph{Adobe's FDF Toolkit} to
+process form data from a pdf file. (Form data exported from a pdf
+file is in the \emph{Forms Data Format}, or FDF.) The url for
+this demonstration program is \url{\bUrl/demo/quiz1_q.pdf}.
+
+
+\symbolchoice{diamond}
+
+\begin{quiz*}{QuizTotal} Answer each of the following. Passing is 100\%.
+
+\begin{questions}
+
+\item Calculate the limit, if it exists, otherwise, state that it does not
+exist (d.n.e.).
+\[
+ \lim_{x\to3}\frac{\sqrt{3x}(x^2-4)^2}{x^2-2x-1}.
+\]
+\begin{answers}4
+\Ans0 $75$ &\Ans1 $\dfrac{75}2$ &\Ans0 $25$ &\Ans0 d.n.e.
+\end{answers}
+
+\item Calculate the limit, if it exists, otherwise, state that it does not
+exist (d.n.e.).
+\[
+ \lim_{t\to2}\frac{t^2-4}{t-2}.
+\]
+\begin{answers}4
+\Ans0 $2$ &\Ans0 $+\infty$ &\Ans1 4 &\Ans0 d.n.e.
+\end{answers}
+
+\item Calculate the limit,
+$\displaystyle\lim_{t\to2^-}\frac{t^2}{t-2}$, if it exists, otherwise,
+state that it does not exist (d.n.e.).
+\begin{answers}4
+\Ans1 $-\infty$ &\Ans0 $+\infty$ &\Ans0 $4$ &\Ans0 d.n.e.
+\end{answers}
+
+\item Using one-sided limit techniques, determine whether the limit
+$\lim_{x\to2}f(x)$ exists and state its value, where
+\[
+ f(x) = \begin{cases}
+ |x^2-5| & \text{for }x\le2 \\
+ \dfrac{x-2}{x-2} & \text{for }x>2
+ \end{cases}
+\]
+\begin{answers}4
+\Ans0 $-1$& \Ans0 0 &\Ans1 1 &\Ans0 d.n.e.
+\end{answers}
+
+\item Calculate the limit,
+$\displaystyle\lim_{x\to-2}\frac{\sqrt{x+8}-\sqrt6}{x+2}$,
+if it exists, otherwise, state that it does not
+exist (d.n.e.).
+\begin{answers}4
+\Ans0 $\dfrac1{\sqrt6}$ &\Ans1 $\dfrac{\sqrt6}{12}$ &
+ \Ans0 $\dfrac12$ &\Ans0 d.n.e.
+\end{answers}
+
+\item There is some function $f$ and some number $a$ in the domain of
+$f$ such that
+\[
+ f'(a)=\lim_{x\to-2}\frac{\sqrt{x+8}-\sqrt6}{x+2}
+\]
+Name the function $f$ and the number $a$.
+\begin{answers}2
+\Ans1 \strut$f(x)=\sqrt{x+8}$; $a=-2$ &\Ans0 $f(x)=\sqrt{x}$; $a=-2$\\[3pt]
+\Ans0 \strut$f(x)=\sqrt{x+8}$; $a=0$ &\Ans0 $f(x)=\sqrt{x+8}$; $a=2$
+\end{answers}
+\end{questions}
+\end{quiz*}\quad\raisebox{-3pt}
+{\TextField[width=3in,name=QuizTotal,bordercolor=0 0 1,default=\eqScore]{}}
+
+\medskip\noindent
+The partial code for this quiz looks like this.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\symbolchoice{diamond} % change to diamond `check'
+\begin{quiz*}{QuizTotal} Answer each of the following....
+\begin{questions}
+.........
+\end{questions}
+\end{quiz*}\quad\raisebox{-3pt}{\TextField[name=QuizTotal,
+ default=\eqScore,bordercolor=0 0 1,width=3in]{}}
+\end{Verbatim}
+
+
+\begin{quiz*}{qzTeXc} Answer each of the following. Passing
+is 100\%.
+\begin{questions}
+\item What \TeX\ System does Thomas Esser maintain?
+\begin{answers}4
+\Ans0 MiK\TeX &\Ans0 cs\TeX &\Ans1 te\TeX &\Ans0 fp\TeX
+\end{answers}
+\item What \TeX\ System does Fabrice Popineau maintain?
+\begin{answers}4
+\Ans0 MiK\TeX &\Ans0 cs\TeX &\Ans0 te\TeX &\Ans1 fp\TeX
+\end{answers}
+\item What \TeX\ System does Christian Schenk maintain?
+\begin{answers}4
+\Ans1 MiK\TeX &\Ans0 cs\TeX &\Ans0 te\TeX &\Ans0 fp\TeX
+\end{answers}
+\end{questions}
+\end{quiz*}\quad
+\raisebox{-2pt}{\renewcommand\LayoutTextField[2]{% label, field
+\medskip\noindent#2}%
+\TextField[name=qzTeXc,width=1.25in,align={0 /Ff 1},
+ default=\eqScore]{}\raisebox{3.5pt}{%
+ \CorrButton[\BC{0 0 1}% blue border color
+ \CA{TeX}% Button text
+ \RC{Users}% rollover text
+ \AC{Group}% pushed text
+ \DA{/TiRo 10 Tf 0 0 1 rg}% times roman, 10 pt, blue text
+% \W{1}\S{I}%
+ \BS{/W 1 /S /I}% % border width 1, inset button
+ ]{qzTeXc}}}
+
+
+%\noindent\begin{minipage}{\linewidth}
+\begin{quiz}*{qzTeX} Answer each of the following. Passing
+is 100\%.
+\begin{questions}
+\item Who created \TeX?
+\begin{answers}4
+\Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\item Who originally wrote \LaTeX?
+\begin{answers}4
+\Ans0 Knuth &\Ans1 Lamport &\Ans0 Carlisle &\Ans0 Rahtz
+\end{answers}
+\end{questions}
+\end{quiz}
+
+
+\subsection{Greater Customization with
+ \texorpdfstring{\protect\cs{TextField}}
+ {\textbackslash TextField}}\label{ss:modoutputfield}
+
+The \cs{ScoreField} macro is defined as
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand{\ScoreField}[2][width=1.5in]{%
+ \TextField[name=#2,default=\eqScore,align={0 /Ff 1},#1]{}}
+\end{Verbatim}
+
+\noindent You can see the command takes one required argument and one
+optional argument (the required one is label \texttt{\#2} and the
+optional one is \texttt{\#1}). The required argument becomes the
+\texttt{name} of the field, and the optional parameter is just
+added into the parameter list of \cs{TextField}. You can also see
+the \texttt{value} of the field is set to \cs{eqScore}, which
+expands to `Score:' in English.
+
+More sophisticated score fields can be obtained by manipulating
+\cs{TextField} directly.
+
+We can modify the appearance of the text field in a couple of
+ways: (1) by changing some of the options in \cs{TextField}; (2)
+changing the macro definition of \cs{LayoutTextField}.
+
+\subsubsection{Admissible key-value pairs of
+\texorpdfstring{\protect\cs{TextField}}
+ {\textbackslash TextField}}\label{sss:modtextfield}
+
+In this section we will outline methods of modifying the
+appearance of \cs{TextField} text box, which is a macro defined in
+the \pkg{hyperref} package.
+
+The following table lists several useful options for
+\cs{TextField}.
+
+%Numerous examples on how to use these options
+%follow the table.
+
+
+\begin{longtable}{>{\ttfamily}lll>{\PBS\raggedright}p{1.5in}}
+\multicolumn{4}{l}{\large\color{red}$\blacktriangleright$
+\color{blue} \cs{TextField} Options: Dimension Related} \\ [3pt]
+height & dimen & & height of box \\
+width & dimen & & width of field box \\ [12pt]
+%
+\multicolumn{4}{l}{\large\color{red}$\blacktriangleright$
+\color{blue} \cs{TextField} Options: Text Related} \\ [3pt] align
+&name &0 & $0=\text{left-aligned}$,\newline
+ $1=\text{centered}$\newline
+ $2=\text{right-aligned}$ \\
+charsize & dimen & 10pt & Font size of text \\ [12pt]
+%
+\multicolumn{4}{l}{\large\color{red}$\blacktriangleright$
+\color{blue} \cs{TextField} Options: Color Related} \\ [3pt]
+backgroundcolor & RGB &1 1 1& Color of background color.\\
+bordercolor & RGB & 1 0 0 & Color of the border.\\ [12pt]
+color & RGB & 0 0 0 & Color of text within field\\
+borderstyle & name &S& S (solid), B (beveled),
+ I (insert), U (underlined) \\ [12pt]
+%
+\multicolumn{4}{l}{\large\color{red}$\blacktriangleright$
+\color{blue} \cs{TextField} Options: Style Related} \\ [3pt]
+borderwidth & number & 1 & Width of the border of the
+ box (in points)\\[12pt]
+%
+\multicolumn{4}{l}{\large\color{red}$\blacktriangleright$
+\color{blue} \cs{TextField} Options: Field Related} \\ [3pt]
+default & & & default value of the field \\
+name & name & & name of the field\\
+readonly & Boolean& false & set read-only switch
+\end{longtable}
+%\end{flushleft}
+
+A complete list of options comes with the \pkg{hyperref}
+documentation; or see Michel Goossens \textit{et
+al}~\cite{book:Goossens3}, entitled \textit{The \LaTeX\ Web
+Companion}
+
+We next present several examples that illustrate the use of these
+options.
+
+\subsubsection{Some Examples of
+\texorpdfstring{\protect\cs{Textfield}}
+ {\textbackslash Textfield}}\label{sss:exampltextfield}
+
+\def\LayoutTextField#1#2{\redpoint\raisebox{-3pt}{#2}}
+
+\TextField[width=2in,name=QuizTotal,bordercolor=0 0 1,
+ default=\eqScore]{}
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\TextField[width=2in,name=QuizTotal,
+ bordercolor=0 0 1,default=\eqScore]{}
+\end{Verbatim}
+
+\noindent The \texttt{readonly} is an important attribute to have---the
+students cannot modify their score. Unfortunately,
+\texttt{readonly} \emph{does not work} with \pkg{hyperref}. To
+overcome this ``bug'' in \pkg{hyperref}, you have to be a
+little sneaky.
+
+\TextField[width=2in,name=Example,bordercolor=0 0 1,
+ backgroundcolor=0.98 0.92 0.73,color=1 0 0,align={0 /Ff 1},
+ default=Text Field with Various Options]{}
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\TextField[width=2in,name=Example,bordercolor=0 0 1,
+ backgroundcolor=0.98 0.92 0.73,color=1 0 0,
+ align={0 /Ff 1}, % realonly is /Ff 1 in pdf code
+ default=Text Field with Various Options]{}
+\end{Verbatim}
+
+\noindent The read only key-value (\texttt{/Ff 1}) can ``ride'' into the
+code on the ``back'' of the \texttt{align} parameter.
+(\texttt{align=0} means left-aligned in the text field.)
+
+\TextField[width=2in,name=Example,bordercolor=1 1 1,color=0 0 1,
+ backgroundcolor=.753 .753 .753,borderstyle=B,align={1 /Ff 1},
+ default=Your Score goes here]{}
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\TextField[width=1.25in,name=Example,bordercolor=1 1 1,
+ backgroundcolor=.753 .753 .753,color=0 0 1,
+ borderstyle=B,align={1 /Ff 1}, % /Ff 1 = readonly
+ default=Your Score goes here]{}
+\end{Verbatim}
+
+\subsubsection{Modifying
+\texorpdfstring{\protect\cs{LayoutTextField}} {\textbackslash
+LayoutTextField}}\label{sss:modlayout}
+
+\renewcommand\LayoutTextField[2]{#1 #2}
+
+The macro \cs{LayoutTextField} allows you to design how your text
+box is formated by \TeX. The default definition for
+\pkg{hyperref} is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+ \newcommand\LayoutTextField[2]{#1 #2}
+\end{Verbatim}
+\noindent The first argument is the \textsf{label}, the second is the
+textfield. For example, above definition yields:\\
+\TextField[width=2.4in,name=Name]{\bfseries Enter your name: }
+\begin{Verbatim}[xleftmargin=\amtIndent]
+ \TextField[width=2.5in,name=Name]{Enter your name: }
+\end{Verbatim}
+
+\medskip
+The \textsf{exerquiz} package redefines this to
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\renewcommand\LayoutTextField[2]{% label, field
+ \medskip\noindent#2}
+\end{Verbatim}
+
+Finally, the field examples given earlier had the following
+definition for \cs{LayoutTextField}:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\redpoint{\par\medskip\noindent
+ \makebox[\parindent][l]{\large\textcolor{red}
+ {$\blacktriangleright$}}}
+\renewcommand\LayoutTextField[2]{\redpoint
+ \raisebox{-3pt}{#2}}
+\end{Verbatim}
+
+\noindent I lowered the text field to line up better with the
+\texttt{amssymb} symbol \cs{blacktriangleright}
+($\blacktriangleright$), which is painted red. In this way we
+obtain
+
+\def\LayoutTextField#1#2{\redpoint\raisebox{-3pt}{#2}}
+\TextField[width=2in,name=QuizTotal,bordercolor=0 0 1,
+ default=\eqScore]{}
+\begin{comment}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\TextField[width=2in,name=QuizTotal,bordercolor=0 0 1,
+ default=\eqScore]{}
+\end{Verbatim}
+\end{comment}
+
+\subsubsection{Custom Comparisons}\label{cusComp}
+
+This section is devoted to customizing the method of comparison
+for the math type objective question using \cs{RespBoxMath} command.
+
+When the user enters an answer into the response box, a
+document level JavaScript function, \texttt{ProcResp}, is called.
+As discussed earlier, the value of the expression entered by the
+user is compared the corresponding value of the answer given by
+the document author. The key word in the last sentence is ``compared''. There
+is a compare function that compares the author's answer with the user's answer.
+
+In general, the \texttt{ProcResp} passes five parameters to a compare function.
+The compare function can be be customized by the document author; there is, however,
+a standard, or default, compare function. It is defined as follows:
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+function diffCompare(a,b,c,F,G) {
+ var x;
+ with(Math) {
+ x = c;
+ F = eval(F);
+ G = eval(G);
+ return abs ( F - G );
+ }
+}
+\end{Verbatim}
+\noindent The meaning of these five parameters of this comparison function are
+
+\begin{description}
+ \item[\ttfamily a:] The left-hand endpoint of the interval.
+ \item[\ttfamily b:] The right-hand endpoint of the interval.
+ \item[\ttfamily c:] The point at which both the user and author answers are to
+ be evaluated.
+ \item[\ttfamily F:] The author's answer, a function in $x$.
+ \item[\ttfamily G:] The user's answer, a function in $x$.
+\end{description}
+
+The function \texttt{diffCompare} evaluates each of the two
+functions \texttt F and \texttt G at \texttt{x = c}, and returns
+the absolute difference in the two. For this simple comparison, the parameters
+\texttt a and \texttt b are not used.
+
+The \texttt{diffCompare} will be sufficient for most, but not
+all mathematical questions. For example, consider the following question:
+
+\medskip
+\begin{oQuestion}{indefInt1}
+$\displaystyle\int \sin(x)\,dx = $\space
+\RespBoxMath{-cos(x)}{4}{.0001}01\kern1bp\CorrAnsButton{-cos(x)}
+\end{oQuestion}
+
+\medskip\noindent
+There are infinitely many answers, all of them of the form $-\cos(x)+C$. Note that
+the only input that is marked as correct is $-\cos(x)$, the JavaScript does not judge
+$-\cos(x)+1$, to be correct, for example. The problem is, of course, the method of
+comparison, \texttt{diffCompare}, is not appropriate to this particular problem.
+
+The above question needs a specialized method of comparison. Consider
+the compare function:
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{insDLJS}[indefCompare]{compare}{Comparisons}
+function indefCompare(a,b,c,F,G) {
+ var C, eqx;
+ with(Math) {
+ eqx = a;
+ C = eval(F)-eval(G);
+ eqx = c;
+ F = eval(F);
+ G = eval(G);
+ return abs( F - G - C );
+ }
+}
+\end{insDLJS}
+\end{Verbatim}
+\noindent This environment was placed in the preamble of this document, and uses the
+\texttt{insdljs} package, which comes with the \texttt{exerquiz} distribution.
+This will add the function \texttt{indefCompare} function to the document level
+JavaScript section of the PDF file when it is created.
+
+\redpoint It is \emph{important} to note that when you are writing your
+own compare functions, the independent variable must be named
+`\texttt{eqx}'. The functions \texttt F and \texttt G have been
+searched and their original independent variable has been replaced with
+`\texttt{eqx}'. To get a correct evaluation, therefore, any compare functions
+must use the `\texttt{eqx}' to evaluate the functions.
+
+Let's try that same question, but with this compare function instead of the
+default compare function
+
+\medskip
+\begin{oQuestion}{indefInt2}
+$\displaystyle\int \sin(x)\,dx = $\space
+\RespBoxMath{-cos(x)}{4}{.0001}01[indefCompare]\kern1bp\CorrAnsButton{-cos(x)}
+\end{oQuestion}
+
+\medskip\noindent
+Now, if you enter $-\cos(x) + 10$, for example, that answer will be judged as
+correct by \texttt{ProcResp}.
+
+The code for the above response box is
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{oQuestion}{indefInt2}
+$\displaystyle\int \sin(x)\,dx = $\space
+\RespBoxMath{-cos(x)}{4}{.0001}01[indefCompare]\kern1bp
+\CorrAnsButton{-cos(x)}
+\end{oQuestion}
+\end{Verbatim}
+
+\noindent The optional ninth parameter is present in the
+\cs{\hyperlink{paraRespBox}{RespBoxMath}}. Use this parameter to
+pass the name of the compare function that is to process the
+question. Here, we specify \texttt{indefCompare}, which was
+defined in the preamble of this document using the
+\texttt{insDLJS} environment.
diff --git a/texmf-dist/source/latex/acrotex/doc/eformman.tex b/texmf-dist/source/latex/acrotex/doc/eformman.tex
new file mode 100644
index 00000000..51d9f00f
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/doc/eformman.tex
@@ -0,0 +1,3522 @@
+% makeindex < aebpro_man.idx > aebpro_man.ind
+\documentclass{article}
+\usepackage[fleqn]{amsmath}
+\usepackage[%
+ web={centertitlepage,designv,
+ forcolorpaper,latextoc,pro,useui},
+ exerquiz,aebxmp
+]{aeb_pro}
+\usepackage{aeb_mlink}
+\usepackage[altbullet]{lucidbry}
+%\usepackage{myriadpro}
+
+\usepackage{graphicx,array,longtable}
+%\usepackage[usecmtt]{myriadpro}
+
+%\makeatletter
+%\renewcommand*\l@subsection{\@dottedtocline{2}{2.5em}{3.5em}}
+%\renewcommand*\l@subsubsection{\@dottedtocline{4}{5em}{1em}}
+%\def\numberline#1{\hb@xt@2.5em{#1\hfil}}
+%\makeatother
+\makeatletter
+\renewcommand*\l@subsection{\@dottedtocline{2}{2em}{3.5em}}
+\renewcommand*\l@subsubsection{\@dottedtocline{4}{5.5em}{1.5em}}
+\renewcommand\@pnumwidth{2.55em}
+\renewcommand*\l@section[2]{%
+ \ifnum \c@tocdepth >\z@
+ \addpenalty\@secpenalty
+ \addvspace{1.0em \@plus\p@}%
+ \setlength\@tempdima{2em}%{1.5em}%
+ \begingroup
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \leavevmode \bfseries
+ \advance\leftskip\@tempdima
+ \hskip -\leftskip
+ #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+ \endgroup
+ \fi}
+\makeatother
+
+\hfuzz=1pt
+
+\setlongtables
+
+\usepackage{makeidx}
+\makeindex
+\usepackage{acroman}
+
+\usepackage[active]{srcltx}
+
+\urlstyle{rm}
+
+\def\tutpath{doc/tutorial}
+\def\tutpathi{tutorial}
+\def\expath{../examples}
+
+\DeclareDocInfo
+{
+ university={\AcroTeX.Net\protect\\[1ex]eforms and insdljs Documentation},
+ title={Support for AcroForms and Links, and for\texorpdfstring{\protect\\[2ex]}{ }Document JavaScript and Open Page Events},
+ author={D. P. Story},
+ email={dpstory@acrotex.net},
+ subject={Documentation for the eforms and insdljs packages},
+ talksite={\url{www.acrotex.net}},
+ version={2.0},
+ keywords={LaTeX, hyperref, PDF, exercises, quizzes},
+ copyrightStatus=True,
+ copyrightNotice={Copyright (C) \the\year, D. P. Story},
+ copyrightInfoURL={http://www.acrotex.net}
+}
+
+\def\AEBBook{\textsl{{Acro\!\TeX} eDucation System Tools: {\LaTeX} for interactive PDF documents}}
+
+
+\renewcommand\hproportionwebtitle{.75}
+\universityLayout{fontsize=Large,fontfamily=sffamily}
+\titleLayout{fontsize=LARGE,fontfamily=sffamily}
+\authorLayout{fontsize=Large,fontfamily=sffamily}
+\tocLayout{fontsize=Large,color=aeb,fontfamily=sffamily}
+\sectionLayout{indent=-62.5pt,fontsize=large,color=aeb,fontfamily=sffamily}
+\subsectionLayout{indent=-31.25pt,color=aeb,fontfamily=sffamily}
+\subsubsectionLayout{indent=0pt,color=aeb,fontfamily=sffamily}
+\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}}
+
+\def\verygoodbreak{%
+\vskip0pt plus1in\goodbreak\vskip0pt plus-1in}
+
+\hyphenation{Java-Script}
+
+\def\AcroT{Acro\!\TeX}\def\cAcroT{{\textcolor{blue}{\AcroT}}}
+\def\AcroEB{\AcroT{} eDucation Bundle}\def\cAcroEB{\textcolor{blue}{\AcroEB}}
+\def\AcroB{\AcroT{} Bundle}\def\cAcroB{\textcolor{blue}{\AcroB}}
+\def\bUrl{http://www.math.uakron.edu/~dpstory}
+\definePath{\urlAcroTeXBlog}{http://www.acrotex.net/blog}
+
+
+\makeatletter
+\let\bslash=\@backslashchar
+\renewcommand{\paragraph}{\@startsection{paragraph}{4}{0pt}{6pt}{-3pt}{\bfseries}}
+
+% Begin definition of \appendixsubsection
+\newcounter{appendixsubsection} %\setcounter{appendixsubsection}{0}
+\def\theappendixsubsection{\Alph{appendixsubsection}}
+\def\theHappendixsubsection{\Alph{appendixsubsection}}
+\newcommand\appendixsubsection{%
+ \renewcommand{\@seccntformat}[1]{\csname the##1\endcsname.\enspace}%
+ \@startsection{appendixsubsection}{1}{\z@}%
+ {-2.5ex\@plus -1ex \@minus -.2ex}%
+ {1ex \@plus .2ex}%
+ {\normalfont\normalsize\bfseries\color{blue}}}
+\let\appendixsubsectionmark=\@gobble
+\expandafter\def\csname toclevel@appendixsubsection\endcsname{1}
+
+\let\l@appendixsubsection=\l@section
+\def\web@appendixsubsection#1#2#3{\web@parse#1\\\par\penalty-50 \hspace*{\@tempdima}\mbox{}%
+ \textbf{\makebox[0pt][r]{\makebox[\@tempdima][r]{\hyperlink{#3}{\numberline.\enspace}}}\web@title}\endgraf}
+% end definition of appendixsubsection
+
+\newcommand{\aebDescriptionlabel}[1]{%
+ \setlength\dimen@{\amtIndent+\labelsep}%
+ {\hspace*{\dimen@}#1}}
+\newenvironment{aebDescript}
+ {\begin{list}{}{\setlength{\labelwidth}{0pt}%
+% \setlength{\leftmargin}{\leftmargin}%
+ \setlength{\leftmargin}{\leftmargin+\amtIndent}%
+ \setlength\itemindent{-\leftmargin}%
+ \let\makelabel\aebDescriptionlabel
+ }}{\end{list}}
+
+\def\hardspace{{\fontfamily{cmtt}\selectfont\symbol{32}}}
+\def\AcroBlog{{Acro\!\TeX} Blog}
+%\newlength{\aebdimen}
+\def\anglemeta#1{$\langle\textit{\texttt{#1}}\rangle$}
+\def\meta#1{\textit{\texttt{#1}}}
+\let\pkg\textsf
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\def\AEB{\textsf{AeB}}
+\def\AcroTeX{Acro\!\TeX}
+\def\HTML{HTML}\def\FDF{FDF}
+\def\PDF{PDF}\def\URL{URL}
+\let\amtIndent\leftmargini
+\def\bNH{\begin{NoHyper}}\def\eNH{\end{NoHyper}}
+\def\nhnameref#1{\bNH\nameref{#1}\eNH}
+\def\nhNameref#1{\bNH\Nameref{#1}\eNH}
+\def\nhurl#1{\bNH\url{#1}\eNH}
+\def\grayV#1{\textcolor{gray}{#1}}
+\def\darg#1{\{#1\}}
+\def\parboxValign{t}
+\renewcommand*{\backrefalt}[4]{%
+ \ifcase #1\or
+ See page~#2.\else See pages~#2.\fi
+}
+\newenvironment{aebQuote}
+ {\list{}{\leftmargin\amtIndent}%
+ \item\relax}{\endlist}
+\newcommand{\FmtMP}[2][0pt]{\mbox{}\marginpar{%
+ \raisebox{.5\baselineskip+#1}{%
+ \expandafter\parbox\expandafter[\parboxValign]%
+ {\marginparwidth}{\aebbkFmtMp#2}}}}
+\def\aebbkFmtMp{\kern0pt\itshape\small
+ \ifusebw\color{gray}\else\color{blue}\fi
+ \raggedleft\hspace{0pt}}
+\def\dps{$\mbox{$\mathfrak D$\kern-.3em\mbox{$\mathfrak P$}%
+ \kern-.6em \hbox{$\mathcal S$}}$}
+\def\FitItIn{\eq@fititin}
+\def\endredpoint{\FitItIn{{\large\ifusebw\color{black}\else\color{red}\fi$\blacktriangleleft$}}}
+
+
+\makeatother
+
+\hypersetup{linktocpage}
+
+%\newenvironment{sverbatim}
+%{\par\footnotesize\verbatim}{\endverbatim}
+
+%\newcommand\redpoint{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
+%\vskip\medskipamount\noindent
+% \makebox[\parindent][l]{\large\color{red}$\blacktriangleright$}}
+%\newcommand\handpoint{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
+%\vskip\medskipamount\noindent
+% \makebox[\parindent][l]{\large\color{blue}\ding{042}}}
+%\newcommand\newtopic{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
+%\vskip\medskipamount\noindent
+%}
+
+\def\cs#1{\texttt{\bslash#1}}
+\def\Cs#1{\hyperlink{#1}{\cs{#1}}}
+\def\tableCs#1{\hyperlink{table#1}{\cs{#1}}}
+\def\targ#1#2?{\hypertarget{#2}{\bslash#2}#1}
+
+\def\dps{$\mbox{$\mathfrak D$\kern-.3em\mbox{$\mathfrak P$}%
+ \kern-.6em \hbox{$\mathcal S$}}$}
+
+\def\eForm{\textsf{eForm}}
+
+
+\def\OpenToHere{\OpenAction{\JS{this.gotoNamedDest("Here")}}}
+\def\OpenHere{\hypertarget{Here}{\strut}}%\OpenToHere
+
+\makeatletter
+\let\web@copyright\@gobble
+\let\web@revision\@gobble
+\renewcommand\webdirectory
+{%
+ \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}%
+ \begin{flushleft}\textbf{\large\web@directory}%
+ \vspace{-3pt}
+ \begin{itemize}\setlength{\itemsep}{-3pt}%
+ \bfseries
+ \item \leavevmode\hyperlink{webtoc}{\web@toc}%
+ \item \web@article
+ \item[] \rule[2pt]{2.25in}{.4pt}
+ \item \textsf{\href{apb_man.pdf}{APB}} Documentation
+ \item \href{webeqman.pdf}{\AcroEB} Documentation
+ \end{itemize}
+ \end{flushleft}
+}
+\renewcommand\titlepageTrailer
+{%
+ \web@copyright\ \copyright\ \webcopyrightyears\ \webversion
+ \hfill\url{http://www.acrotex.net}\\
+ \web@revision\ \@date \hfill\href{mailto:\webemail}{\webemail}
+}
+\makeatother
+
+\newcounter{exampleno}
+\def\theexampleno{\arabic{exampleno}}
+\newcommand\Example{\refstepcounter{exampleno}%
+\paragraph*{Example~\arabic{exampleno}.}}
+
+\definecolor{aeb}{rgb}{0.24,0.38,0.68}%bleu
+\universityColor{aeb}
+\tocColor{aeb}
+
+\everyCheckBox{\BC{.690 .769 .871}\BG{.941 1 .941}\textColor{1 0 0}}
+\everyRadioButton{\BC{.690 .769 .871}\BG{.941 1 .941}\textColor{0 0 1}\symbolchoice{star}}
+
+\chngDocObjectTo{\newDO}{doc}
+\begin{docassembly}
+var titleOfManual="The AeB eforms MANUAL";
+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;
+if ( buildIt ) {
+ console.println("Creating new " + manualfilename + " file.");
+ doc = \appopenDoc({cPath: _pathToBlank, bHidden: true});
+ var _path=this.path;
+ var pos=_path.lastIndexOf("/");
+ _path=_path.substring(0,pos)+"/"+manualfilename;
+ \docSaveAs\newDO({ cPath: _path });
+ doc.closeDoc();
+ doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true});
+ f=doc.getField("ManualTitle");
+ f.value=titleOfManual;
+ doc.flattenPages();
+ \docSaveAs\newDO({ cPath: manualfilename });
+ doc.closeDoc();
+} else {
+ console.println("Using the current "+manualfilename+" file.");
+}
+var _path=this.path;
+var pos=_path.lastIndexOf("/");
+_path=_path.substring(0,pos)+"/"+manualfilename;
+\addWatermarkFromFile({
+ bOnTop:false,
+ bOnPrint:false,
+ cDIPath:_path
+});
+\executeSave();
+\end{docassembly}
+\begin{document}
+
+\maketitle
+
+\selectColors{linkColor=black}
+
+\tableofcontents
+
+\selectColors{linkColor=webgreen}
+
+\part{PDF Links and Forms}
+
+%\section{Introduction}
+
+In \hypertarget{eformsPkg}{this} document we describe the support for Acrobat form elements
+in an {\cAcroT} document. The \textit{PDF Reference} indicates there
+are four different categories of fields for a total of seven types
+of fields.
+\begin{questions}
+
+\setbox0=\hbox{(d)}
+\def\I#1{\makebox[\wd0]{\color{blue}(\hfil#1\hfil)}\ }
+
+ \item \textbf{Button Fields}
+ \begin{description}
+ \item[\I{a}] \textbf{Push Button}
+ \item[\I{b}] \textbf{Check Box}
+ \item[\I{c}] \textbf{Radio Button}
+ \end{description}
+ \item \textbf{Choice Fields}
+ \begin{description}
+ \item[\I{a}] \textbf{List Box}
+ \item[\I{b}] \textbf{Combo Box}
+ \end{description}
+ \item \textbf{Text Fields}
+ \item \textbf{Signature Fields}
+
+\end{questions}
+The {\cAcroB} now supports \textit{signature fields}. Using the
+command \cs{sigField}, an unsigned signature field is created.
+The field can be signed, either by using Acrobat, or programmatically
+from a {\LaTeX} source, but you need to use \textsf{aeb\_pro} and to
+create the PDF using Acrobat Distiller.
+
+The \textsf{hyperref} Package (Rahtz, Oberdiek \textit{et al})
+provides support for the same set of form fields; however, not all
+features of these fields can be accessed through the
+\textsf{hyperref} commands. I was determined to write my own set
+of commands which would be sufficiently comprehensive and
+extendable to suit all the needs of the \cAcroB. All the quiz
+environments have been modified to use this new set of form
+commands, in this way, there is a uniform treatment of all form
+fields in the \cAcroB.
+
+\redpoint The demo files for {\eForm} support are
+\texttt{eqform.tex}, for those using the \textsf{Acrobat
+Distiller} to create a PDF document, and \texttt{eqform\_pd.tex},
+for those who use \textsf{pdftex} or \textsf{dvipdfm}.
+
+\newtopic\textbf{\textcolor{red}{Online Resources:}} The following online
+resources are recommended:
+\begin{itemize}
+ \item \href{https://developer.mozilla.org/en/JavaScript}{Core JavaScript Reference} at
+ Mozilla Developer Center.
+ \item \href{http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?&accessible=true}
+ {\emph{JavaScript for Acrobat API Reference}} at the Acrobat Developer Center. In the navigation panel
+ on the left, select JavaScript.
+ \item \href{\urlAcroTeXBlog/?cat=5}{PDF Blog},
+ by D. P. Story.
+ \item \href{\urlAcroTeXBlog/?cat=24}{AeB Blog},
+ by D. P. Story.
+\end{itemize}
+
+\section{Package Requirement and Options}
+
+Prior to \textsf{Exerquiz} version 5.9, \textsf{eforms} was
+an integral part of \textsf{Exerquiz}. I've now separated the two, making
+\textsf{eforms} into a stand-alone package that is called by
+\textsf{Exerquiz}.
+
+\subsection{Package Requirements}
+
+The \textsf{eforms} package requires \textsf{hyperref} (a newer version)
+and \textsf{insdljs}, a package that is part of the {\cAcroB}.
+
+\subsection{Package Options}
+
+The \textsf{eforms} package has the usual driver options:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+dvipsone, dvips, pdftex, dvipdfm, dvipdfmx, xetex
+\end{Verbatim}
+The package also works correctly with the \textsf{luatex} executable.
+Informing the package what driver you are using is important, because each
+driver has its own code that needs to be used to create form fields. For
+dvips, you should use
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\usepackage[dvips]{eforms}
+\end{Verbatim}
+The \textsf{eforms} package now does automatic detection of
+\textsf{pdftex} (including luatex) and \textsf{xetex}. If the \textsf{web}
+or \textsf{exerquiz} package is used, \textsf{eforms} will use the driver
+defined in these earlier included packages.
+
+\newtopic A minimal document is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage{eforms} % <-- the driver is pdftex or xetex
+\begin{document}
+ % Content containing form fields, such as...
+ Don't \pushButton[\CA{Push Me}]{myButton}{}{12bp},
+ I fall down easily.
+\end{document}
+\end{Verbatim}
+\noindent The \textsf{eforms} package brings in the \textsf{hyperref} package
+and passes it the driver, so there is no need to specify
+\textsf{hyperref}, usually. If you wish to introduce \textsf{hyperref}
+yourself with specific options, place it before \textsf{eforms}.
+
+If you use the \textsf{exerquiz} package, \textsf{exerquiz} brings
+in the \textsf{eforms} package and passes it to the driver.
+
+\subsection{The \texttt{preview} option}
+
+Use the \texttt{preview} option if you use a \texttt{dvi} previewer
+to view your document. When \texttt{preview} is taken, a frame box
+is drawn around any form field created by \textsf{eforms}, making
+the position of the field visible in the previewer. This makes it
+easy to make any additional adjustments for the position of the
+field. Turn off this option when you build a PDF file.
+
+\subsection{The \texttt{useui} option}
+
+The \texttt{useui} option includes the \textsf{xkeyval} package, and
+defines a number of key-value pairs that are used in the optional
+arguments of the form fields and links. These key-value pairs are
+more ``user-friendly'' to use. See
+\hyperref[useui]{Section~\ref*{useui}}, page~\pageref*{useui}, for a
+description of these key-value pairs.
+
+\subsection{The \texttt{unicode} option of \textsf{hyperref}}
+
+The \textsf{eforms} package will obey the \texttt{unicode} option of
+\textsf{hyperref}. Whenever this option is taken in hyperref, for
+certain keys (namely, \cs{V}, \cs{DV}, \cs{TU}, \cs{CA}, \cs{RC}, and
+\cs{AC}), standard latex markup may be used to enter the values of
+these keys, for example, in a text field, you might set
+\verb!\V{J\"{u}rgen}!. This key-value pair will produce a field
+value of ``J\"{u}rgen'' in that text field.
+
+
+\section{Form Fields}
+
+The \texttt{eforms} support for {\eForm} defines seven basic (and internal)
+commands for creating the seven types of form elements. These seven are used
+as ``building blocks'' for defining all buttons, check boxes, radio buttons
+and text fields used in the \texttt{exerquiz} quizzes; and for defining seven
+user-commands: \cs{listBox}, \cs{comboBox}, \cs{pushButton}, \cs{checkBox},
+\cs{radioButton}, \cs{textField}, and \cs{sigField}. These user commands are
+the topic of the subsequent sections.
+
+Each of the above listed field commands has an optional first
+parameter that is used to modify the appearance of the field,
+and/or to add actions to the field. This is a ``local''
+capability, i.e., a way of modifying an individual field. There is
+also a ``global'' mechanism. Each field type has its own
+\cs{every\anglemeta{FieldTypeName}} command. For example, all buttons
+created by \cs{pushButton} can be modified using the
+\cs{everyPushButton} command. See the sections on
+\nameref{CheckBoxes} and \nameref{RadioButtons} for examples and
+additional comments.
+
+\redpoint The local modifications (the ones inserted into the
+field by the first parameter) are read \textit{after} the global
+modifications, in this way, the local modifications overwrite the
+global ones.
+
+\paragraph*{Key-value Pairs.} The optional first parameter of each of the form and link commands take
+two styles of key-values:
+\begin{enumerate}
+ \item \textsf{eforms} KVP: This is the key-value system originally developed, each KVP has the form
+ \cs{\anglemeta{key}\darg{\meta{val}}}. Through these keys, you can set the appearance of a form or link, and
+ set the actions as well.
+
+ \item[] The \cs{presets} key is useful for developing collections of pre-defined
+ key-value pairs for insertion into the optional parameter list. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\def\myFavFive{%
+ \BC{1 0 0}\BG{0 1 0}\textColor{1 0 0}\Q{2}\CA{Push Me}}
+\end{Verbatim}
+Later, a button can be created using these preset values:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\presets{\myFavFive}
+ \A{\JS{app.alert("AcroTeX rocks!")}}]{pb1}{}{11bp}
+\end{Verbatim}
+
+ \item[] The \textsf{eforms} KVP system is explained throughout the manual, a complete listing
+ of all supported KVPs is found in the \hyperref[appendix]{Appendices}, page~\pageref{appendix}.
+
+ \item \textsf{xkeyval} KVP: When the \texttt{useui} option is taken, key-value pairs are
+ defined of the form \texttt{\anglemeta{key}[=\anglemeta{value}]}. The key-value pairs are actually a value of
+ a special \textsf{eforms} key, \cs{ui}. The value of \cs{ui} consists of a comma-delimited list of
+ \textsf{xkeyval} key-value pairs.
+
+ \item[] This style of key-value pairs also has
+ a \texttt{presets} key, useful for developing collections of pre-defined
+ key-value pairs for insertion into the optional parameter list. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\def\myFavFive{%
+ bordercolor={1 0 0},bgcolor={0 1 0},
+ textcolor={1 0 0},align={right},uptxt={Push Me}}
+\end{Verbatim}
+Later, a button can be created using these preset values:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\ui{presets=\myFavFive,
+ js={app.alert("AcroTeX rocks!")}}]{pb1}{}{11bp}
+\end{Verbatim}
+
+ \item[] The \textsf{xkeyval} KVP system is described in \mlNameref{useui}.
+
+\end{enumerate}
+\redpoint The first (optional) parameter is read in first, but only after ``sanitizing'' certain
+characters that have special meaning to {\LaTeX}, these are \texttt{\string~}, \texttt{\#},
+and \texttt{\&}; each of these may appear as part of a URL, or may appear in JavaScript code.
+Within the first parameter, these three character can be used freely, without escaping them.
+
+\subsection{Button Fields}
+
+Buttons are form elements that the user interacts with using only a
+mouse. There are three types of buttons: push buttons, check boxes
+and radio buttons.
+
+\subsubsection{Push Buttons}
+
+The push button is a button field that has no
+value, it is neither on nor off. Generally, push buttons are used
+to initiate some action, such as JavaScript action.
+
+\settowidth{\aebdimen}{\cs{pushButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\pushButton[#1]{#2}{#3}{#4}
+\end{dCmd}
+
+\PD
+\begin{enumerate}
+\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
+\item[\texttt{\#2}:] the title of the button field
+\item[\texttt{\#3}:] the width of the bounding rectangle
+\item[\texttt{\#4}:] the height of the bounding rectangle
+\end{enumerate}
+
+\paragraph*{Default Appearance:} The default appearance of
+a push button is determined by the following:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\W{1}\S{B}\F{\FPrint}\BC{0 0 0}
+\H{P}\BG{.7529 .7529 .7529}
+\end{Verbatim}
+
+\paragraph*{Key Variables:} The first (optional) parameter can be
+used to modify the default appearance of a button field and to add
+some actions. Following is a list of the variables used within the
+brackets of this optional argument for the pushbutton: \tableCs{Ff},
+\tableCs{F}, \Cs{H}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{R}, \Cs{BC},
+\Cs{BG}, \Cs{CA}, \Cs{RC}, \Cs{AC}, \Cs{mkIns}, \Cs{textFont},
+\Cs{textSize}, \Cs{textColor}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}.
+See the \hyperlink{kv}{Support Key Variables} table for
+descriptions and notes on each of these variables.
+
+\handpoint If the \textit{width} argument (\texttt{\#3}) is left
+empty, the {\LaTeX} code attempts to determine the appropriate
+width based on the width of the text given by \Cs{CA}, \Cs{RC} and
+\Cs{AC}. See \textbf{Example~2}, below.
+
+\paragraph*{Global Modification:} \cs{everyPushButton\darg{\anglemeta{KV-pairs}}}
+
+\Example This example resets all forms in this document:
+ \pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]{myButton}{36bp}{12bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]
+ {myButton}{36bp}{12bp}
+\end{Verbatim}
+
+\Example Button with empty \textit{width} argument:
+ \pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]{myButton}{}{12bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]
+ {myButton}{}{12bp}
+\end{Verbatim}
+
+\subsubsection{Check Boxes}\label{CheckBoxes}
+
+A check box is a type of button that has one of two values,
+``off'' or ``on''. The value of the field when the field is
+``off'' is \texttt{Off}; the value of the ``on'' state can be
+defined by the user.
+
+\settowidth{\aebdimen}{\cs{checkBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\checkBox[#1]{#2}{#3}{#4}{#5}
+\end{dCmd}
+
+\PD
+\begin{enumerate}
+\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
+\item[\texttt{\#2}:] the title of the check box button
+\item[\texttt{\#3}:] the width of the bounding rectangle
+\item[\texttt{\#4}:] the height of the bounding rectangle
+\item[\texttt{\#5}:] the name of the ``on'' state (the export value)
+\end{enumerate}
+
+\paragraph*{Default Appearance:} The default appearance of
+a standard check box is determined by the following:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\W{1}\S{S}\BC{0 0 0}\F{\FPrint}
+\end{Verbatim}
+
+\paragraph*{Key Variables:} The first (optional) parameter can be
+used to modify the default appearance of a check box and to add
+some actions. Following is a list of the variables used within the
+brackets of this optional argument for the check box: \tableCs{Ff},
+\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{MK}, \Cs{DA}, \Cs{AP},
+\Cs{AS}, \Cs{R}, \Cs{textFont}, \Cs{textSize}, \Cs{textColor},
+\Cs{DV}, \Cs{V}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}. See the
+\hyperlink{kv}{Supported Key Variables} table for descriptions and
+notes on each of these variables.
+
+\paragraph*{Global Modification:} \cs{everyCheckBox\darg{\anglemeta{KV-pairs}}}
+
+\Example Are you married? Yes: \checkBox[\symbolchoice{circle}]{myCheck}{10bp}{10bp}{On}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\checkBox[\symbolchoice{circle}]{myCheck}{10bp}{10bp}{On}
+\end{Verbatim}
+\noindent In the example, the appearance of this check box was
+modified through the global modification scheme. The following
+command appears in the preamble of this document:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\everyCheckBox{
+ \BC{.690 .769 .871} % border color
+ \BG{.941 1 .941} % background color
+ \textColor{1 0 0} % text color
+}
+\end{Verbatim}
+
+\subsubsection{Radio Buttons}\label{RadioButtons}
+
+A radio button field is similar to a check box, but is meant to be
+used in unison with one or more additional radio buttons.
+
+\settowidth{\aebdimen}{\cs{radioButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\radioButton[#1]{#2}{#3}{#4}{#5}
+\end{dCmd}
+
+\PD
+\begin{enumerate}
+\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
+\item[\texttt{\#2}:] the title of the radio button
+\item[\texttt{\#3}:] the width of the bounding rectangle
+\item[\texttt{\#4}:] the height of the bounding rectangle
+\item[\texttt{\#5}:] the name of the ``on'' state (the export value)
+\end{enumerate}
+\redpoint A collection of radio buttons meant to be used in unison
+need to all have the same title (parameter~\texttt{\#2}) but
+different export values (parameter~\texttt{\#5)}.
+
+\paragraph*{Default Appearance:} The default appearance of
+a standard radio button is determined by the following:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\W{1}\S{S}\BC{0 0 0}\F{\FPrint}
+\end{Verbatim}
+
+\paragraph*{Key Variables:} The first (optional) parameter can be
+used to modify the default appearance of a radio button and to add
+some actions. Following is a list of the variables used within the
+brackets of this optional argument for the radio button: \tableCs{Ff},
+\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{MK}, \Cs{DA}, \Cs{AP},
+\Cs{AS}, \Cs{R}, \Cs{textFont}, \Cs{textSize}, \Cs{textColor},
+\Cs{DV}, \Cs{V}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}. See the
+\hyperlink{kv}{Supported Key Variables} table for descriptions and
+notes on each of these variables.
+
+%\redpoint \cs{Ff} \textbf{Field flags.} The values
+%{250606175054} appropriate to a radio button are \Cs{FfNoToggleToOff} (if set,
+%one radio button must be set at all times) and
+%\Cs{FfRadiosInUnison} (if set, radio buttons with the same value
+%will be turned on or off in unison, PDF 1.5).
+
+\paragraph*{Global Modification:} \cs{everyRadioButton\darg{\anglemeta{KV-pairs}}}
+
+\Example What is your gender? Male: \radioButton{myRadio}{10bp}{10bp}{Male} %[\Ff{\FfNoToggleToOff}]
+ Female: \radioButton{myRadio}{10bp}{10bp}{Female}
+ Neither: \radioButton[\A{\JS{app.alert("You can't be 'neither'! I'm resetting the field, guess again!");\r
+ this.resetForm(["myRadio"])}}]{myRadio}{10bp}{10bp}{Neither}
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+Male: \radioButton{myRadio}{10bp}{10bp}{Male}
+Female: \radioButton{myRadio}{10bp}{10bp}{Female}
+Neither: \radioButton[\A{\JS{app.alert("You can't be 'neither'!
+ I'm resetting the field, guess again!");\r
+ this.resetForm(["myRadio"])}}]{myRadio}{10bp}{10bp}{Neither}
+\end{Verbatim}
+\noindent In the example, the appearance of these radio button fields was
+modified through the global modification scheme. The following
+command appears in the preamble of this document:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\everyRadioButton{
+ \BC{.690 .769 .871} % border color
+ \BG{.941 1 .941} % background color
+ \textColor{0 0 1} % text color
+ \symbolchoice{star} % check symbol
+}
+\end{Verbatim}
+
+\subsection{Choice Fields}
+
+A choice field is a list of text items, one or more of which can
+be selected by the user.
+
+\subsubsection{List Boxes}
+
+A scrollable list box is a type of choice field in which several
+of the choices are visible in a rectangle. A scroll bar becomes
+available if any of the items in the list are not visible in the
+rectangle provided.
+
+\settowidth{\aebdimen}{\cs{listBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\listBox[#1]{#2}{#3}{#4}{#5}
+\end{dCmd}
+
+\PD
+\begin{enumerate}
+\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
+\item[\texttt{\#2}:] the title of the list box
+\item[\texttt{\#3}:] the width of the bounding rectangle
+\item[\texttt{\#4}:] the height of the bounding rectangle
+\item[\texttt{\#5}:] an array of appearance/values of list.
+\end{enumerate}
+\newtopic The fifth parameter needs more explanation. The value of this
+parameter which defines the items in the list---their appearance
+text and their export values---take two forms:
+\begin{questions}
+ \item An array of arrays:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+[(v1)(item1)][(v2)(item2)]...[(vn)(itemn)]
+\end{Verbatim}
+ The first entry in the two member array is the export value of the item, the second
+ is the appearance text of that item.
+ \item An array of strings:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+(item1)(item2)...(itemn)
+\end{Verbatim}
+ In this case, the export value is the same as the appearance text.
+\end{questions}
+
+\paragraph*{Default Appearance:} The default appearance of
+a standard list box is determined by the following:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\W{1}\S{I}\F{\FPrint}\BC{0 0 0}
+\end{Verbatim}
+
+\paragraph*{Key Variables:} The first (optional) parameter can be
+used to modify the default appearance of a list and to add some
+actions. Following is a list of the variables used within the
+brackets of this optional argument for the list box: \tableCs{Ff},
+\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{R}, \Cs{BC}, \Cs{BG},
+\Cs{mkIns}, \Cs{textFont}, \Cs{textSize}, \Cs{textColor}, \Cs{DV},
+\Cs{V}, \Cs{A} and \Cs{AA}. See the \hyperlink{kv}{Supported Key
+Variables} table for descriptions and notes on each of these
+variables.
+
+\redpoint \cs{Ff} \textbf{Field flags.} Values appropriate to a
+list box are \Cs{FfCommitOnSelChange} (commits
+immediately after selection, PDF 1.5); \Cs{FfSort} (sorts\footnote
+{This flag really is not useful unless you have the full Acrobat application, the
+\texttt{Sort} \texttt{items} check box is checked in the Options
+tab of the Fields Properties dialog for the field.
+Initially, the items are listed in the same order as listed in the
+\texttt{\#5} argument; the Acrobat application will sort the list
+if you view the \textit{Fields Properties} for the field and click
+\texttt{OK}. Be sure to save the changes.\label{FfSortfoot}}the
+items); \Cs{FfMultiSelect} (allows more than one value to be
+selected, PDF 1.4). It is important to note
+that the flags \Cs{FfMultiSelect} and \Cs{FfCommitOnSelChange}
+cannot both be in effect. See the \hyperref[appendix]{Appendix}
+for a complete list of values for the
+\hyperlink{tableFf}{\textsf{Ff} flag}.
+
+\paragraph*{Global Modification:} \cs{everyListBox\darg{\anglemeta{KV-pairs}}}
+
+\Example List Box (Version 5.0 Required):
+\hfill\smash[b]{\raisebox{-45bp}{\listBox[\autoCenter{n}\DV{1}\V{1}\BG{0.98 0.92 0.73}\BC{0 .6 0}
+ \Ff\FfSort
+ \AA{\AAKeystroke{%
+ if(!event.willCommit)app.alert(%
+ "You chose \\"" + event.change\r
+ + "\\""+", which has an export value of "
+ + event.changeEx);}}]
+ {myList}{1in}{55bp}{[(1)(Socks)][(2)(Shoes)][(3)(Pants)][(4)(Shirt)][(5)(Tie)]}}}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\listBox[\autoCenter{n}\DV{1}\V{1}
+ \BG{0.98 0.92 0.73}\BC{0 .6 0}
+ \AA{\AAKeystroke{%
+ if(!event.willCommit)app.alert(%
+ "You chose \\"" + event.change\r
+ + "\\""+", which has an export value of "
+ + event.changeEx);}}]{myList}{1in}{55bp}
+ {[(1)(Socks)][(2)(Shoes)][(3)(Pants)][(4)(Shirt)][(5)(Tie)]}
+\end{Verbatim}
+
+
+\subsubsection{Combo Boxes}
+
+A combo box is a drop down list of items that can optionally have
+an editable text box for the user to type in a value other than
+the predefined choices.
+
+\settowidth{\aebdimen}{\cs{comboBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
+\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\comboBox[#1]{#2}{#3}{#4}{#5}
+\end{dCmd}
+
+\PD
+\begin{enumerate}
+\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
+\item[\texttt{\#2}:] the title of the combo box
+\item[\texttt{\#3}:] the width of the bounding rectangle
+\item[\texttt{\#4}:] the height of the bounding rectangle
+\item[\texttt{\#5}:] an array of appearance/values of list
+\end{enumerate}
+\newtopic The fifth parameter needs more explanation. The value of this
+parameter which defines the items in the list---their appearance text
+and their export values---take two forms:
+\begin{questions}
+ \item An array of arrays:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+[(v1)(item1)][(v2)(item2)]...[(vn)(itemn)]
+\end{Verbatim}
+ The first entry in the two member array is the export value of the item, the second
+ is the appearance text of that item.
+ \item An array of strings:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+(item1)(item2)...(itemn)
+\end{Verbatim}
+ In this case, the export value is the same as the appearance text.
+\end{questions}
+
+\paragraph*{Default Appearance:} The default appearance of
+a standard combo box is determined by the following:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\W{1}\S{I}\F{\FPrint}\BC{0 0 0}
+\end{Verbatim}
+
+\paragraph*{Key Variables:} The first (optional) parameter can be
+used to modify the default appearance of a list and to add some
+actions. Following is a list of the variables used within the
+brackets of this optional argument for the list box: \tableCs{Ff},
+\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{R}, \Cs{BC}, \Cs{BG},
+\Cs{mkIns}, \Cs{textFont}, \Cs{textSize}, \Cs{textColor}, \Cs{DV}
+and \Cs{V}, \Cs{A} and \Cs{AA}. See the \hyperlink{kv}{Support Key
+Variables} table for descriptions and notes on each of these
+variables.
+
+\redpoint \cs{Ff} \textbf{Field flags.} Values appropriate to a
+combo box are \Cs{FfEdit} (allows the user to type in a choice);
+\Cs{FfDoNotSpellCheck} (turn spell check off, applicable only if
+\Cs{FfEdit} is set);
+\Cs{FfCommitOnSelChange} (commits immediately after selection);
+ and \Cs{FfSort} (sorts the
+items, see~\hyperref[FfSortfoot]{footnote~\ref*{FfSortfoot}}, page~\pageref*{FfSortfoot}).
+See the \hyperref[appendix]{Appendix} for a complete list of values
+for the \hyperlink{tableFf}{\textsf{Ff} flag}.
+
+\paragraph*{Global Modification:} \cs{everyComboBox\darg{\anglemeta{KV-pairs}}}
+
+\begin{defineJS}{\getComboJS}
+var f = this.getField("myCombo");
+var a = f.currentValueIndices;
+if ( a == -1 )
+ app.alert("You've typed in \\"" + f.value +"\\".");
+else
+ app.alert("Selection: " + f.getItemAt(a, false)
+ + " (export value: " + f.getItemAt(a, true)+").");
+\end{defineJS}
+
+\Example \label{defineJSEx} Editable combo box (Version 5.0):
+ \comboBox[\Ff\FfEdit\DV{1}\V{1}\BG{0.98 0.92 0.73}\BC{0 .6 0}]
+ {myCombo}{.8in}{11bp}{[(1)(Socks)][(2)(Shoes)][(3)(Pants)][(4)(Shirt)][(5)(Tie)]}\kern1bp%
+ \pushButton[\BC{0 .6 0}\CA{Get}\RC{Combo}\AC{Box}\A{\JS{\getComboJS}}]
+ {myComboButton}{33bp}{11bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\comboBox[\Ff\FfEdit\DV{1}\V{1}
+\BG{0.98 0.92 0.73}\BC{0 .6 0}]{myCombo}{1in}{11bp}
+{[(1)(Socks)][(2)(Shoes)][(3)(Pants)][(4)(Shirt)][(5)(Tie)]}\kern1bp%
+% Follow up with a pushbutton
+\pushButton[\BC{0 .6 0}\CA{Get}\AC{Combo}\RC{Box}\A{\JS{\getComboJS}}]
+{myComboButton}{33bp}{11bp}
+\end{Verbatim}
+\newtopic The JavaScript action for the button is given below:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{defineJS}{\getComboJS}
+var f = this.getField("myCombo");
+var a = f.currentValueIndices;
+if ( a == -1 )
+ app.alert("You've typed in \\"" + f.value +"\\".");
+else
+ app.alert("Selection: " + f.getItemAt(a, false)
+ + " (export value: " + f.getItemAt(a, true)+").");
+\end{defineJS}
+\end{Verbatim}
+
+\subsection{Text Fields}
+
+A text field is the way a user can enter text into a form.
+
+\settowidth{\aebdimen}{\cs{textField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
+\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\textField[#1]{#2}{#3}{#4}
+\end{dCmd}
+
+\PD
+\begin{enumerate}
+\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
+\item[\texttt{\#2}:] the title of the text field
+\item[\texttt{\#3}:] the width of the bounding rectangle
+\item[\texttt{\#4}:] the height of the bounding rectangle
+\end{enumerate}
+
+\paragraph*{Default Appearance:} The default appearance of
+a standard text field is determined by the following:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\F{\FPrint}\BC{0 0 0}\W{1}\S{S}
+\end{Verbatim}
+
+\paragraph*{Key Variables:} The first (optional) parameter can be
+used to modify the default appearance of a text field and to add some
+actions. Following is a list of the variables used within the
+brackets of this optional argument for the text field: \tableCs{Ff},
+\tableCs{F}, \Cs{TU}, \Cs{Q}, \Cs{W}, \Cs{S}, \Cs{MaxLen}, \Cs{R},
+\Cs{BC}, \Cs{BG}, \Cs{mkIns}, \Cs{textFont}, \Cs{textSize},
+\Cs{textColor}, \Cs{DV}, \Cs{V}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}.
+See the \hyperlink{kv}{Supported Key Variables} table for
+descriptions and notes on each of these variables.
+
+\redpoint \cs{Ff} \textbf{Field flags.} There are several values
+appropriate to a text field:\ \Cs{FfMultiline} (create a multiline
+text field); \Cs{FfPassword} (create a password field);
+\Cs{FfFileSelect} (select a file from the local hard drive as the
+value of the text field, PDF 1.4); \Cs{FfComb} (if set, the text field
+becomes a comb field, the number of combs is determined by the
+value of \Cs{MaxLen}, PDF 1.5); \Cs{FfDoNotSpellCheck}
+(automatic spell check is not performed, PDF 1.4);
+\Cs{FfDoNotScroll} (disable the scrolling of long text, this
+limits the amount of text that can be entered to the width of the
+text field provided, PDF 1.4); \Cs{FfRichText} (allows rich text
+to be entered into the text field, PDF 1.5).
+
+\paragraph*{Global Modification:} \cs{everyTextField\darg{\anglemeta{KV-pairs}}}
+
+\Example Enter Name:
+ \textField
+ [\BC{0 0 1}
+ \BG{0.98 0.92 0.73}
+ \textColor{1 0 0}
+ ]{myText}{1.5in}{12bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField
+ [\BC{0 0 1}\BG{0.98 0.92 0.73}
+ \textColor{1 0 0}
+ ]{myText}{1.5in}{12bp}
+\end{Verbatim}
+
+
+\Example An example of a calculation using a Calculate script. (Calculate works correctly
+with drivers \texttt{dvips}, \texttt{dvipsone}, or \texttt{dvipdfm} are used.)
+
+\newtopic\begin{tabular}{@{\hspace{20pt}}rl}
+Number 1: & \textField[\AA{%
+ \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
+ \AAFormat{AFNumber_Format(1,1,0,0,"",true)}}]{num.1}{1in}{11bp} \\[6pt]
+%
+Number 2: & \textField[\AA{%
+ \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
+ \AAFormat{AFNumber_Format(1,1,0,0,"",true)}}]{num.2}{1in}{11bp}\\[6pt]
+%
+Total: & \textField[\AA{%
+ \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
+ \AAFormat{AFNumber_Format(1,1,0,0,"",true)}
+ \AACalculate{AFSimple_Calculate("SUM", new Array("num"))}
+}]{totalNum}{1in}{11bp}
+\end{tabular}
+
+\newtopic The listing for this list of three text fields is\medskip
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[\AA{%
+ \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
+ \AAFormat{AFNumber_Format(1,1,0,0,"",true)}}
+]{num.1}{1in}{11bp}
+\textField[\AA{%
+ \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
+ \AAFormat{AFNumber_Format(1,1,0,0,"",true)}}
+]{num.2}{1in}{11bp}
+\textField[\AA{%
+ \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
+ \AAFormat{AFNumber_Format(1,1,0,0,"",true)}
+ \AACalculate{AFSimple_Calculate("SUM", new Array("num"))}
+]{sum}{1in}{11bp}
+\end{Verbatim}
+
+\subsection{Signature Fields}\label{sigfields}
+
+A signature field is a field that can be digitally signed.
+
+\settowidth{\aebdimen}{\cs{sigField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
+\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
+\sigField[#1]{#2}{#3}{#4}
+\end{dCmd}
+
+\PD
+\begin{enumerate}
+\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
+\item[\texttt{\#2}:] the title of the signature field
+\item[\texttt{\#3}:] the width of the bounding rectangle
+\item[\texttt{\#4}:] the height of the bounding rectangle
+\end{enumerate}
+
+\paragraph*{Default Appearance:} The default appearance of
+a standard signature field is determined by the following:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\F{\FPrint}\BC{}\BG{}\W{1}\S{S}
+\end{Verbatim}
+
+\paragraph*{Key Variables:} The first (optional) parameter can be
+used to modify the default appearance of a signature field and to add some
+actions. Following is a list of the variables used within the
+brackets of this optional argument for the signature field:
+\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{R}, \Cs{Lock},
+\Cs{BC}, \Cs{BG}, \Cs{mkIns}, \Cs{textFont}, \Cs{textSize},
+\Cs{textColor}, \Cs{DV}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}.
+See the \hyperlink{kv}{Supported Key Variables} table for
+descriptions and notes on each of these variables.
+
+\paragraph*{Global Modification:} \cs{everySigField\darg{\anglemeta{KV-pairs}}}
+
+\Example Sign here:\\[3pt]
+ \sigField[\BC{0 0 0}]{mySig}{2in}{4\baselineskip}\hfill
+ \begin{minipage}{\linewidth-2in-10bp}
+ \verb!\sigField[\BC{0 0 0}]!\\
+ \verb! {mySig}{2in}{4\baselineskip}!
+ \end{minipage}
+
+\newtopic To sign this field, use the Acrobat user interface, or use the
+package \textsf{aeb\_pro}, and the following \texttt{docassembly} code:
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{docassembly}
+\signInfo{
+ cSigFieldName: "mySig", ohandler: security.PPKLiteHandler,
+ cert: "D_P_Story.pfx", password: "dps017",
+ oInfo: { location: "Niceville, FL",
+ reason: "I am approving this document",
+ contactInfo: "dpstory@acrotex.net",
+ appearance: "My Signature" }
+};
+\signatureSign
+\end{docassembly}
+\end{Verbatim}
+
+\begin{itemize}
+ \item \texttt{cSigFieldName} is the name of the field to be signed.
+ \item \texttt{ohandler} is the name of the security handler to be
+ used to sign the field, usually, this is \texttt{security.PPKLiteHandler};
+ \texttt{security.PPKLiteHandler} is used if \texttt{ohandler} is not listed in the property list.
+ \item \texttt{cert} is the name of the Digital ID certificate file to be used.
+ The extension for this file is \texttt{.pfx} (Windows) and \texttt{.p12} (Mac OS).
+ These files reside in the folder,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+app.getPath( {cCategory:"user"})/Security
+\end{Verbatim}
+However, just enter the file name, such as \texttt{cert:} \texttt{"D\_P\_Story.pfx"}.
+\item \texttt{password}: The Digital ID requires a password to access and to use.
+For example: \texttt{password:} \texttt{"dps017"}.
+\item \texttt{oInfo} is a JavaScript object with various properties to be filled in,
+\texttt{location}, \texttt{reason}, \texttt{contactInfo}, and \texttt{appearance}.
+The \texttt{appearance} is important, through it, you can choose a particular appearance
+for the digital signature, including a custom signature that you've created. In the example
+above, we have \texttt{appearance: "My Signature"}. \texttt{My Signature} is the name I've
+given a particular digital ID of mine. If the \texttt{appearance} property is not
+included in \texttt{oInfo}, Acrobat will use the one named \texttt{"Standard Text"}.
+\end{itemize}
+
+\Important Additional information on signatures can be found
+at the \mlhref{http://www.adobe.com/go/acrobat_developer}{Acrobat Developer Center};
+or go to the \href{http://www.adobe.com/go/acrobat_security}{Security page};
+in particular, see the document \textit{Digital Signature User Guide for Acrobat 9.0
+and Adobe Reader 9.0}. Other comments on the topic of signature fields:
+\begin{itemize}
+\item The open key \cs{textSize} is recognized, but is change to 0.
+\item The Signed tab of the Digital Signatures Properties dialog box, lists
+an entry titled ``This script executes when the field is signed.'' This
+JavaScript is implemented through the format script of the \texttt{AA} key.
+Thus,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\AA{\AAFormat{console.println("Signed!");}}
+\end{Verbatim}
+places message in the console when the field is signed.
+
+\item The \cs{Lock} key can be used to lock various fields when the document
+is signed.
+\begin{Verbatim}[xleftmargin=\amtIndent,numbers=left]
+\Lock{/Action/All}
+\Lock{/Action/Include/Fields [(field1)(field2)...]}
+\Lock{/Action/Exclude/Fields [(field1)(field2)...]}
+\end{Verbatim}
+\begin{itemize}
+ \item In (1), all fields are locked when the signature field is signed.
+ \item In (2), only the listed fields are locked when the signature
+ field is signed.
+ \item In (3), all fields, except the ones listed, are locked when the
+ signature field is signed.
+\end{itemize}
+The \texttt{/Fields} key is required when the action is either \texttt{/Include} or \texttt{/Exclude}.
+\end{itemize}
+
+
+\verygoodbreak
+
+
+\section{Link Annotations}\label{linkAnnots}
+
+The \textsf{eforms} package has several link commands that are
+sufficiently general that they can be given arbitrary appearances,
+and can perform a wide range of actions.
+
+The borders of the link commands can be controlled through optional
+parameter, their default appearance follow the same pattern of
+hyperref: If the \texttt{colorlinks} option is used (in
+\textsf{hyperref}) then the border is invisible by default;
+otherwise, there is a visible border.
+
+When the \texttt{colorlinks} option is chosen (in hyperref), the
+link text is colored using the command \cs{defaultlinkcolor}, this
+is a named color. \cs{defaultlinkcolor} has a definition of
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand{\defaultlinkcolor}{\@linkcolor}
+\end{Verbatim}
+\noindent where \cs{@linkcolor} is a command defined in
+\textsf{hyperref}, and is defined to be \texttt{red}. This can be
+redefined as desired.\footnote{The {\Web} package redefines
+\cs{@linkcolor} to be a flavor of green.}
+
+The first link command is a general link for text, or any
+{\LaTeX} content. It is used, for example, by the \textsf{aeb\_mlink}
+package to create multiple-line links.
+
+\settowidth{\aebdimen}{\cs{setLinkText[\meta{options}]\darg{\meta{link\_text}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\setLink[!meta(options)]{!meta(link_text)}
+\setLinkText[!meta(options)]{!meta(link_text)}
+\end{dCmd}
+\newtopic Both link commands are the same, the use of the second one, \cs{setLink}, is
+discouraged in favor of the use of \cs{setLink}.
+
+\PD The command has two arguments, the first is optional. The first
+parameter takes key-value pairs to change appearance and define
+actions. The default appearance of this link is \verb!\S{S}\Border{0 0 0}!,
+an invisible yet solid border line. (The visibility of the border is
+actually controlled by the \texttt{colorlinks} option of
+\textsf{hyperref}, as explained above.) The second parameter is the
+link text. This argument does not have to be text, it can be
+anything that takes up space, such as a graphic or \cs{parbox}.
+
+\Example \setLink[\A{\JS{app.alert("AcroTeX rocks!")}}
+ \linktxtcolor{blue}\Color{0 0 1}\W1\S{U}\H{P}]{Push me!}
+\begingroup\obeyspaces\settowidth{\aebdimen}{\ttfamily%
+ \string\linktxtcolor\darg{blue}\string\Color\darg{0 0 1}\string\W1\string\S\darg{U}\string\H\darg{P}]\darg{Push me!}%
+}%
+\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule}
+\setLink[\A{\JS{app.alert("AcroTeX rocks!")}}
+ \linktxtcolor{blue}\Color{0 0 1}\W1\S{U}\H{P}]{Push me!}
+\end{dCmd*}
+\endgroup
+
+\exAeBBlogPDF{p=371} Additional examples of \cs{setLink} may be found in the
+rather comprehensive article \textit{Support for Links in AeB/eForms},
+\texttt{\href{\urlAcroTeXBlog/?p=371}{aeb\_links.pdf}}, found on the
+{\AcroBlog} website.
+
+\newtopic\indent The next link command is a convenience command to put the link content into a parbox,
+the parameters enable you to set the width, height and position of material in the box.
+
+\settowidth{\aebdimen}{\cs{setLinkBbox[\meta{options}]\darg{\meta{width}}\darg{\meta{height}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\setLinkBbox[!meta(options)]{!meta(width)}{!meta(height)}
+ [!meta(position)]{!meta(link_content)}
+\end{dCmd}
+\PD The command has five arguments, the first is optional.
+\begin{aebDescript}
+\item [\meta{options}] are optional key-value pairs to change the appearance or action
+ of this link.
+\item [\meta{width}] is the width of the \cs{parbox}.
+\item [\meta{height}] is the height of the \cs{parbox}.
+\item [\meta{position}] is the positioning parameter of the \cs{parbox} (\texttt{b}, \texttt{c}, \texttt{t}).
+\item [\meta{link\_content}] is the text or object to be enclosed in a \cs{parbox}
+\end{aebDescript}
+
+\Example \setLinkBbox[\W{1}\Color{1 0 0}\A{\JS{app.alert("Thank you for using AcroTeX!")}}]{50bp}{30bp}[c]{\centering Press Me!}
+\begingroup\obeyspaces%
+\settowidth{\aebdimen}{\ttfamily%
+ \string\A\darg{\string\JS\darg{app.alert("Thank you for using AcroTeX!")}}%
+}%
+\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule}
+\setLinkBbox[\W{1}\Color{1 0 0}
+ \A{\JS{app.alert("Thank you for using AcroTeX!")}}
+]{50bp}{30bp}[c]{\centering Press Me!}
+\end{dCmd*}
+\endgroup
+
+\section{Actions}\label{Actions}
+
+A form field may simply gather data from the user; additionally,
+it may perform one or more \textit{actions}. Actions include
+execute JavaScript code, going to a particular page in a document,
+open a file, execute a menu item, reset a form, play media or a
+sound, and so on. Beginning with Acrobat~5.0, most actions can be
+performed using JavaScript methods.
+
+An action is initiated by a \textit{trigger}, a field may have
+many actions, each with a separate trigger. The different triggers
+are discussed in \nameref{triggers}, and the various types of
+actions available are covered in the
+section~\nameref{actiontypes}.
+
+\subsection{Trigger Events}\label{triggers}
+
+Event actions are initiated by \textit{triggers}. For fields,
+there are ten different triggers.
+\begin{questions}
+ \item \textbf{Mouse Enter:} The event is triggered when mouse
+ enters the region defined by the bounding rectangle. The
+ \cs{AAMouseEnter} key is used within the argument of \Cs{AA}
+ to define a mouse enter event:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[\AA{\AAMouseEnter{%
+ \JS{app.alert("You've entered my text field, get out!")}}}]
+ {myText}{1.5in}{12bp}
+\end{Verbatim}
+ \item \textbf{Mouse Exit:} The event is triggered when mouse
+ exits the region defined by the bounding rectangle. The
+ \cs{AAMouseExit} key is used within the argument \Cs{AA} to
+ define a mouse exit event:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[\AA{\AAMouseExit{%
+ \JS{app.alert("You've exited my domain, never return!")}}}]
+ {myText}{1.5in}{12bp}
+\end{Verbatim}
+ \item \textbf{Mouse Down:} The event is triggered when the
+ (left) mouse button is pushed down while the mouse is within the
+ bounding rectangle of the field. The \cs{AAMouseDown} key is
+ used within the argument of \Cs{AA} to define a mouse down
+ event:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\AA{\AAMouseDown{\JS{app.alert("Mouse Down!")}}}]
+ {myButton}{30bp}{12bp}
+\end{Verbatim}
+ \item \textbf{Mouse Up:} The event is triggered when the
+ (left) mouse button is released while the mouse is within the
+ bounding rectangle of the field. The \Cs{A} key (or
+ \cs{AAMouseUp} key is used within the argument of \Cs{AA}) is
+ used to define a mouse up event:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\A{\JS{app.alert("Mouse Up!")}}]
+ {myButton}{30bp}{12bp}
+\end{Verbatim}
+The same code can be performed as follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\AA{\AAMouseUp{\JS{app.alert("Mouse Up!")}}}]
+ {myButton}{30bp}{12bp}
+\end{Verbatim}
+When both types of mouse up actions are defined for the same
+field, the one defined by \Cs{A} is the one that is executed.
+
+ \item \textbf{On Focus:} The event is triggered when the field
+ comes into focus (either by tabbing from another field, or
+ clicking the mouse within the bounding rectangle. The \cs{AAOnFocus}
+ key is used within the argument of \Cs{AA} to define an `on focus'
+ event:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[\AA{\AAOnFocus{\JS{%
+ app.alert("Please enter some data!")}}}]
+{myText}{1.5in}{12bp}
+\end{Verbatim}
+
+ \item \textbf{On Blur:} The event is triggered when the field
+ loses focus (either by tabbing to another field, by clicking
+ somewhere outside the field, or (in the case of a text field,
+ for example) pressing the \texttt{Enter} button. The \cs{AAOnBlur}
+ key is used within the argument of \Cs{AA} to define an `on blur'
+ event:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[\AA{\AAOnBlur{%
+ \JS{app.alert("Thanks for the data, I think!")}}}]
+{myText}{1.5in}{12bp}
+\end{Verbatim}
+
+ \item \textbf{Format:}\label{format} The format event is the event that
+ occurs when text is entered into a text or combo box; during
+ this event, optionally defined JavaScript code is executed to
+ format the appearance of the text within the field. The
+ \cs{AAFormat} key is used within the argument of \Cs{AA} to
+ define a format event:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[\AA{%
+ \AAKeystroke{AFNumber_Keystroke(2,0,1,0,"\\u0024",true);}
+ \AAFormat{AFNumber_Format(2,0,1,0,"\\u0024",true);}}]
+{myText}{1.5in}{12bp}
+\end{Verbatim}
+The above example creates a text field which will accept only a
+number into it and which will format the number into U.S.
+currency.
+
+ \item \textbf{Keystroke:} This keystroke event is the event
+ that occurs when individual keystroke is entered into a choice
+ field (list or combo) or a text field; during this event,
+ optionally defined JavaScript can be used to process the
+ keystroke. The \cs{AAKeystroke} key is used within the
+ argument of \Cs{AA} to define a keystroke event; see the format
+ example above.
+
+ \item \textbf{Validate:} The validate event is an event for
+ which JavaScript code can be defined to validate the data that
+ has been entered (text and combo fields only). The
+ \cs{AAVali\-date} key is used within the argument of \Cs{AA} to
+ define a validate event:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[\AA{%
+ \AAKeystroke{AFNumber_Keystroke(2,0,1,0,"\\u0024",true);}
+ \AAFormat{AFNumber_Format(2,0,1,0,"\\u0024",true);}
+ \AAValidate{%
+ if (event.value > 1000 || event.value < -1000) {\r\t
+ app.alert("Invalid value, rejecting your value!");\r\t
+ event.rc = false;\r
+ }}
+}]{myText}{1.5in}{12bp}
+\end{Verbatim}
+
+ \item \textbf{Calculate:} The calculate event is an event for
+ which JavaScript code can be defined to make automatic
+ calculations based on entries of one or more fields (text and
+ combo fields only). The \cs{AACalculate} key is used within the
+ argument of \Cs{AA} to define a calculate event:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[\AA{%
+ \AAKeystroke{AFNumber_Keystroke(2,0,1,0,"\\u0024",true);}
+ \AAFormat{AFNumber_Format(2,0,1,0,"\\u0024",true);}
+ \AACalculate{AFSimple_Calculate("SUM",new Array("Prices"));}
+}]{myText}{1.5in}{12bp}
+\end{Verbatim}
+ \item \textbf{PageOpen:} (The \textbf{PO} key, Table 8.10, PDF 1.5) An
+ action to be performed when the page containing the annotation
+ is opened (for example, when the user navigates to it from the
+ next or previous page or by means of a link annotation or outline
+ item). The action is executed after the page's open action. The
+ \cs{AAPageOpen} key is used within the argument of \Cs{AA} to
+ define an annotation page open event:
+ \item \textbf{PageClose:} (The \textbf{PC} key, Table 8.10, PDF 1.5) An
+ action to be performed when the page containing the annotation
+ is closed (for example, when the user navigates to the next or
+ previous page, or follows a link annotation or outline item).
+ The action is executed before the page's close action.
+ \cs{AAPageClose} key is used within the argument of \Cs{AA} to
+ define an annotation page close event.
+ \item \textbf{PageVisible:} (The \textbf{PV} key, Table 8.10,
+ PDF 1.5) An action to be performed when the page containing the
+ annotation becomes visible in the viewer application's user
+ interface. \cs{AAPageVisible} key is used within the
+ argument of \Cs{AA} to define an annotation page visible event.
+ \item \textbf{PageInvisible:} (The \textbf{PI} key, Table 8.10,
+ PDF 1.5) An action to be performed when the page containing
+ the annotation is no longer visible in the viewer
+ application's user interface. \cs{AAPageInvisible} key is used
+ within the argument of \Cs{AA} to define an annotation page
+ invisible event.
+ \item[] Below is a simple example of usage. The actions write to the console.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\textField[\AA{%
+ \AAPageOpen{console.println("Page \thepage: PO");}
+ \AAPageClose{console.println("Page \thepage: PC");}
+ \AAPageVisible{console.println("Page \thepage: PV");}
+ \AAPageInvisible{console.println("Page \thepage: PI");}
+ }]{tf\thepage}{2in}{11bp}
+}
+\end{Verbatim}
+\end{questions}
+Additional examples appear in the file \texttt{eqforms.tex}.
+
+\subsection{Action Types}\label{actiontypes}
+
+The following is only a partial listing of the action types, as
+given in \textsf{Table~8.36} of the \textit{PDF
+Reference}~\cite{tech:PDFRef}. The entire list and the details of
+usage can be obtained from the \textit{PDF Reference}.
+
+\begin{center}
+\begin{tabular}{>{\ttfamily\small}l>{\small}l}
+\multicolumn{1}{>{\bfseries}l}{Action Type} & \multicolumn{1}{>{\bfseries}l}{Description}\\\hline
+GoTo & Go to a destination in the current document\\
+GoToR& Go to a destination in another document\\
+Launch& Launch an application, usually to open a file\\
+URI&Resolve a uniform resource identifier\\
+Named & Execute an action predefined by the viewer\\
+SubmitForm & Send data to a uniform resource locator\\
+JavaScript & Execute a JavaScript script (PDF 1.3)\\
+\end{tabular}
+\end{center}
+Examples of each type of action follow.
+
+\redpoint{\texttt{GoTo}:} Go to a (named or explicit) destination
+within the current document. In this example, we `go to' the named
+destination \texttt{toc.1}, which references the table of contents
+pages. This button goes to a \textit{named destination}:
+\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}\A{/S/GoTo/D(toc.1)}]{myButton1}{}{10bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}
+ \A{/S/GoTo/D(toc.1)}]{myButton1}{}{10bp}
+\end{Verbatim}
+\noindent For a named destination, the value of the \texttt{/D} key is a string, \texttt{(toc.1)}
+in the above example, that specifies the destination name.
+
+The following is an example of an \textit{explicit destination}:
+\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}\A{/S/GoTo/D[{Page3}/Fit]}]{myButton1}{}{10bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}
+\A{/S/GoTo/D[{Page3}/Fit]}]{myButton1}{}{10bp}
+\end{Verbatim}
+\noindent The value of the destination key \texttt{/D} is an array
+referencing a page number (\verb+{Page3}+) and a view
+(\texttt{/Fit}).
+
+For a \texttt{GoTo} action, the first entry in the destination
+array, \texttt{\char123Page3\char125}, is an indirect reference to
+a page, the notation \texttt{\char123Page3\char125} is understood
+by the \textsf{distiller}. For \textsf{dvipdfm}, use the \texttt{@page}
+primitive:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\makeatletter\def\Page#1{@page#1}\makeatother
+\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}
+\A{/S/GoTo/D[\Page3/Fit]}]{myButton1}{}{10bp}
+\end{Verbatim}
+\noindent \textsf{pdftex} has no mechanism for inserting
+indirect page references.
+
+See section~8.5.3, `Go-To Actions', of the \textit{PDF
+Reference}~\cite{tech:PDFRef} for details of the syntax of
+\texttt{GoTo}, and section~8.2.1 for documentation on explicit and
+named destinations.
+
+\redpoint{\texttt{GoToR}:} Go to a (named or explicit) destination in a remote
+document. In this example, we `go to a remote' destination, a
+\textit{named destination} in another document.
+\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}\A{/S/GoToR/F(webeqtst.pdf)/D(webtoc)}]{myButton2}{}{10bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}
+ \pushButton[\CA{Go}\AC{Now!}\RC{to TOC}
+ \A{/S/GoToR/F(webeqtst.pdf)/D(webtoc)]{myButton2}{}{10bp}
+\end{Verbatim}
+\noindent This example illustrates an \textit{explicit destination};
+the following button jumps to page~3 in another document:
+\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}\A{/S/GoToR/F(webeqtst.pdf)/D[2/Fit]}]{myButton2}{}{10bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}
+\A{/S/GoToR/F(webeqtst.pdf)/D[2/Fit]}]{myButton2}{}{10bp}
+\end{Verbatim}
+\noindent The value of the destination key \texttt{/D} is an array
+referencing a page number and a view (\texttt{/Fit}).
+
+For an \textit{explicit destination}, the \textit{PDF
+Reference}~\cite{tech:PDFRef} specifies that the first entry in
+the destination array should be a page number (as contrasted with
+an indirect reference to a page number, for the case of
+\texttt{GoTo}). The destination, \texttt{/D[2/Fit]} would correctly work
+for \textsf{distiller}, \textsf{dvipdfm} and \textsf{pdftex}.
+
+See section~8.5.3, `Remote Go-To Actions', of the \textit{PDF
+Reference}~\cite{tech:PDFRef} for details of the syntax of
+\texttt{GoToR}, and section~8.2.1 for documentation on explicit
+and named destinations.
+
+\redpoint{\texttt{Launch}:} Launch an application (`Open a file').
+In this example, we open a {\TeX} file using the application
+associated with the \texttt{.tex} extension:
+\pushButton[\CA{Go}\AC{TeX Doc!}\RC{to a}\A{/S/Launch/F(webeqtst.tex)}]{myButton3}{}{10bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}
+\A{/S/Launch/F(webeqtst.tex)}]{myButton3}{}{10bp}
+\end{Verbatim}
+\noindent See section~8.5.3, `Launch Actions', of the \textit{PDF Reference}~\cite{tech:PDFRef}
+for details of the syntax.
+
+\redpoint{\texttt{URI}:} Open a web link. In this example, we go to the Adobe web site:
+\pushButton[\CA{Go}\AC{Adobe!}\RC{To}\A{/S/URI/URI(http://www.adobe.com/)}]{myButton4}{}{10bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Go}\AC{Adobe!}\RC{To}
+\A{/S/URI/URI(http://www.adobe.com/)}]{myButton4}{}{10bp}
+\end{Verbatim}
+\noindent See section~8.5.3, `URI Actions', of the \textit{PDF
+Reference}~\cite{tech:PDFRef} for details of the syntax.
+
+Acrobat (Adobe Reader) also support open parameters, using these key-value pairs,
+we can go to a specific page in a PDF on the web, and even search for words, for example
+\pushButton[\CA{Go & Search}\A{/S/URI/URI(http://www.math.uakron.edu/~dpstory/acrotex/aeb_man.pdf#page=8&search=AcroTeX web exerquiz)}]{myButton4a}{}{10bp}
+opens the AeB Manual on the Internet, goes to page 8, and searches for the words
+AcroTeX, web, and exerquiz.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Go & Search}
+\A{/S/URI/URI(http://www.math.uakron.edu/~dpstory/
+ acrotex/aeb_man.pdf#page=8&search=AcroTeX web exerquiz)}]
+ {myButton4a}{}{10bp}
+\end{Verbatim}
+The same can be accomplished using \cs{setLink}.
+
+\redpoint{\texttt{Named}:} Execute a `named' action (i.e., a menu
+item). Named actions listed in the \textit{PDF Reference} are
+\texttt{NextPage}, \texttt{PrevPage}, \texttt{FirstPage} and
+\texttt{LastPage}. A complete list of named actions can be
+obtained by executing the code \texttt{app.listMenuItems()} in
+the JavaScript console of Acrobat (Pro).
+\pushButton[\CA{Go}\AC{Previous!}\RC{To}\A{/S/Named/N/PrevPage}]{myButton5}{}{10bp}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Go}\AC{Previous!}\RC{To}
+\A{/S/Named/N/PrevPage}]{myButton5}{}{10bp}
+\end{Verbatim}
+\newtopic See section~8.5.3, `Named Actions,' of the \textit{PDF
+Reference}~\cite{tech:PDFRef} for details of the syntax. The named
+actions listed in the PDF Reference are \texttt{NextPage},
+\texttt{PrevPage}, \texttt{FirstPage}, and \texttt{LastPage}.
+
+In theory, any menu item can be executed as a named actions; there
+are several factors to be taken into consideration: (1) Not all menu
+items available to Acrobat are listed on the menu bar of Adobe
+Reader, when choosing a name event to use, you should decide if the
+application executing the named action supports that action; (2) In
+recent versions, starting with version 7, there have been security
+restrictions on the execution of menu items, the so-called ``white
+list.'' Only named actions listed on the white list are allowed to
+execute. The white list for version 8.0 is
+
+\begin{small}
+\begin{longtable}{@{}>{\small\ttfamily}l>{\small}l>{\small}l@{}}
+\multicolumn{3}{>{\bfseries}c}{Named Actions on Whitelist}\\\hline
+\endfirsthead
+\multicolumn{3}{>{\bfseries}c}{Named Actions on Whitelist}\\\hline
+\endhead
+AcroSendMail:SendMail & LastPage & ShowHideToolbarCommenting \\
+ActualSize & NextPage & ShowHideToolbarData \\
+AddFileAttachment & OneColumn & ShowHideToolbarEdit \\
+BookmarkShowLocation & OpenOrganizer & ShowHideToolbarEditing \\
+Close & PageSetup & ShowHideToolbarFile \\
+CropPages & PrevPage & ShowHideToolbarFind \\
+DeletePages & Print & ShowHideToolbarForms \\
+ExtractPages & PropertyToolbar & ShowHideToolbarMeasuring \\
+Find & Quit & ShowHideToolbarNavigation \\
+FindCurrentBookmark & ReplacePages & ShowHideToolbarPageDisplay \\
+FindSearch & RotatePages & ShowHideToolbarPrintProduction \\
+FirstPage & SaveAs & ShowHideToolbarRedaction \\
+FitHeight & Scan & ShowHideToolbarTasks \\
+FitPage & ShowHideAnnotManager & ShowHideToolbarTypewriter \\
+FitVisible & ShowHideArticles & SinglePage \\
+FitWidth & ShowHideBookmarks & Spelling \\
+FullScreen & ShowHideFields & Spelling:Check \\
+GeneralInfo & ShowHideFileAttachment & TwoColumns \\
+GeneralPrefs & ShowHideModelTree & TwoPages \\
+GoBack & ShowHideOptCont & Web2PDF:OpenURL \\
+GoForward & ShowHideSignatures & ZoomTo \\
+GoToPage & ShowHideThumbnails & ZoomViewIn \\
+InsertPages & ShowHideToolbarBasicTools & ZoomViewOut
+\end{longtable}
+\end{small}
+In addition to the Whitelist for version 8, the following menu items are added for version 9.
+
+\begin{small}
+\begin{longtable}{>{\small\ttfamily}l>{\small}l>{\small}l}
+\multicolumn{3}{>{\bfseries}c}{Named Actions on Whitelist}\\\hline
+\endfirsthead
+\multicolumn{3}{>{\bfseries}c}{Named Actions on Whitelist}\\\hline
+\endhead
+Annots:Tool:InkMenuItem & CollectionShowRoot & HandMenuItem\\
+CollectionDetails & DocHelpUserGuide & HelpReader\\
+CollectionHome & GoBackDoc & rolReadPage\\
+CollectionPreview & GoForwardDoc & ZoomDragMenuItem\\
+\end{longtable}
+\end{small}
+\newtopic As mentioned before, some of these are for Acrobat only, others are available for Adobe Reader. I'll
+let you sort them out. If you try to execute a named action that is not on the white list, the action will
+silently fail.
+
+\definePath{\URL}{http://www.math.uakron.edu/~dpstory}
+
+\redpoint{\texttt{SubmitForm}:} Submit forms Action. In this example, we submit
+a URL to a CGI, which then sends the requested file back to the browser:\\[1ex]
+\comboBox[\DV{\URL}\V{\URL}\BG{webyellow}\BC{webgreen}]
+{dest}{1.75in}{11bp}{%
+ [(\URL)( Homepage of D. P. Story)]
+ [(\URL/acrotex.html)( AcroTeX Homepage)]
+ [(\URL/webeq.html)( AcroTeX Bundle)]
+ [(\URL/acrotex/examples/webeqtst.pdf)( Exerquiz Demo file {(PDF)})]
+}\kern1bp%
+\pushButton[\BC{webgreen}\CA{Go!}
+\A{\JS{app.alert("This example no longer works!");}}]{redirect}{33bp}{11bp}
+
+\newtopic\textbf{\textcolor{red}{Note:}} This script no longer works, server-side scripting
+at the \texttt{uakron.edu} server is no longer permitted (for security reasons). The
+verbatim lisiting of the code as it used to be when it worked.
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\definePath{\URL}{http://www.math.uakron.edu/~dpstory}
+\comboBox[\DV{\URL}\V{\URL}\BG{webyellow}\BC{webgreen}]
+{dest}{1.75in}{11bp}{%
+ [(\URL)( Homepage of D. P. Story)]
+ [(\URL/acrotex.html)( AcroTeX Homepage)]
+ [(\URL/webeq.html)( AcroTeX Bundle)]
+ [(\URL/acrotex/examples/webeqtst.pdf)(Exerquiz Demo file {(PDF)})]
+}\kern1bp\pushButton[\BC{webgreen}\CA{Go!}
+\A{/S/SubmitForm/F(http://www.math.uakron.edu/cgi-bin/nph-cgiwrap/%
+dpstory/scripts/nph-redir.cgi)/Fields[(dest)]/Flags 4}]
+{redirect}{33bp}{11bp}
+\end{Verbatim}
+\noindent See section~8.6.4 of the \textit{PDF Reference}~\cite{tech:PDFRef}
+for details of the syntax for `Submit Actions'.
+
+\redpoint{\texttt{JavaScript}:} Execute a JavaScript action. This is perhaps
+the most important type of action. In this example,
+the previous example is duplicated using the \texttt{Doc.getURL()} method, we don't
+need to submit to a CGI.\\[1ex]
+\comboBox[\DV{\URL}\V{\URL}\BG{webyellow}\BC{webgreen}]
+{dest}{1.75in}{11bp}{%
+ [(\URL)( Homepage of D. P. Story)]
+ [(\URL/acrotex.html)( AcroTeX Homepage)]
+ [(\URL/webeq.html)( AcroTeX Bundle)]
+ [(\URL/acrotex/examples/webeqtst.pdf)( Exerquiz Demo file {(PDF)})]
+}\kern1bp%
+\pushButton[\BC{webgreen}\CA{Go!}
+\A{\JS{%
+ var f = this.getField("dest");\r
+ app.launchURL(f.value,false);
+}}]{redirect}{33bp}{11bp}
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\definePath{\URL}{http://www.math.uakron.edu/~dpstory}
+\comboBox[\DV{\URL}\V{\URL}\BG{webyellow}\BC{webgreen}]
+{dest}{1.75in}{11bp}{%
+ [(\URL)( Homepage of D. P. Story)]
+ [(\URL/acrotex.html)( AcroTeX Homepage)]
+ [(\URL/webeq.html)( AcroTeX Bundle)]
+ [(\URL/acrotex/examples/webeqtst.pdf)(Exerquiz Demo file {(PDF)})]
+}\kern1bp\pushButton[\BC{webgreen}\CA{Go!}
+\A{\JS{%
+ var f = this.getField("dest");\r
+ app.launchURL(f.value,false);
+}}]{redirect}{33bp}{11bp}
+\end{Verbatim}
+\newtopic\hypertarget{JSdefined}{Note} the use of the convenience
+command \cs{JS}, defined in the \textsf{insldjs} package, it expands to the correct syntax:
+\texttt{/S/JavaScript/JS(\#1)}, where \texttt{\#1} is the argument
+of \cs{JS}.
+
+Most all actions can be performed using JavaScript, the reader is
+referred to the \textit{JavaScript for Acrobat API
+Reference}~\cite{tech:AcroJSRef}.
+
+\section{JavaScript}
+
+Acrobat JavaScript is the cross-platform scripting language of the
+Acrobat suite of products. For Acrobat 5.0 or later, Acrobat
+JavaScript based on JavaScript version 1.5 of ISO-16262 (formerly
+known as ECMAScript), and adds extensions to the core language to
+manipulate Acrobat forms, pages, documents, and even the viewer
+application.
+
+Web-based references to core JavaScript are the \textit{Core
+JavaScript Guide}~\cite{tech:NetscapeJSGuide} and the \textit{Core
+JavaScript Reference}~\cite{tech:NetscapeJSReference}. For Acrobat
+JavaScript, we refer you to the \textit{Developing Acrobat
+Applications using JavaScript}~\cite{tech:AcroJSGuide} and the
+\textit{JavaScript for Acrobat API Reference}~\cite{tech:AcroJSRef}.
+
+\verygoodbreak
+
+\subsection{Support of JavaScript}
+
+The {\cAcroEB} has extensive support for JavaScript, not only for
+JavaScript executed in response to a field trigger, but for
+document level and open page actions as well. As the topic of this
+document is \textsf{eForm} support, the reader is referred to the
+documentation in the \textsf{insdljs} package, which is distributed with
+the {\cAcroB}.
+
+\subsubsection{The Convenience Command
+ \texorpdfstring{\protect\cs{JS}}{\CMD{JS}}}\label{convienceJS}
+
+The syntax for writing JavaScript actions is
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!~@]
+\pushButton[\A{/S/JavaScript/JS(!anglemeta~script@)}]
+ {jsEx}{22bp}{11bp}
+\end{Verbatim}
+Notice the code is enclosed in matching parentheses.
+\hyperlink{JSdefined}{As noted earlier}, {\cAcroT} defines the command
+\cs{JS} as a convenience for this very common actions; the above example
+becomes:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\pushButton[\A{\JS{!anglemeta(script)}}]{jsEx}{22bp}{11bp}
+\end{Verbatim}
+\noindent The code is now enclosed in matching braces.
+
+\subsubsection{Inserting Simple JavaScript}
+
+Actions are introduced into a field command through its optional
+first parameter. JavaScript actions, in particular, can be
+inserted by a mouse up\footnote{Other types of possible actions
+are discussed and illustrated in \Nameref{Actions}.} action, for
+example, using the \Cs{A} and \hyperref[convienceJS]{\cs{JS}}
+commands.
+
+The ``environment'' for entering JavaScript is not a verbatim
+environment: `\verb+\+' is the usual {\TeX} escape character and
+expandable commands are expanded; active characters are expanded
+(which is usually not what you want); and primitive commands
+appear verbatim (so you can use, for example, `\verb+{+' and
+`\verb+}+). Within the optional argument, the macro
+\cs{makeJSspecials}, which can be redefined, is expanded; the
+macro makes several special definitions: (1) it defines \verb+\\+ to be
+`\verb+\\+'; (2) defines \cs{r} to be the JavaScript escape
+sequence for new line; and (3) defines \cs{t} to be the JavaScript
+escape sequence for tab.
+
+\Example\label{ex:formattedBtn} \pushButton[\CA{Sum}\A{\JS{%
+ var n = app.response("Enter a positive integer", "Summing the first \\"n\\" integers");\r
+ if ( n != null ) {\r\t
+ var sum = 0;\r\t
+ for ( var i=1; i <= n; i++ ) {\r\t\t
+ sum += i;\r\t
+ }\r
+ app.alert("The sum of the first n = " + n + " integers is " + sum + ".", 3);
+ }
+ }}]{jsSum}{22bp}{11bp}
+
+\smallskip\noindent The verbatim listing for this button is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\CA{Sum}\A{\JS{%
+ var n = app.response("Enter a positive integer",
+ "Summing the first \\"n\\" integers");\r
+ if ( n != null ) {\r\t
+ var sum = 0;\r\t
+ for ( var i=1; i <= n; i++ ) {\r\t\t
+ sum += i;\r\t
+ }\r
+ app.alert("The sum of the first n = " + n
+ + " integers is " + sum + ".", 3);
+ }
+}}]{jsSum}{22bp}{11bp}
+\end{Verbatim}
+
+\paragraph*{Code Comments.} Within the JavaScript string, we want
+literal double quotes \texttt{"}, to avoid \texttt{"} being
+interpreted as the end of the string (or the beginning of a string)
+we have to double escape the double quotes, as in \verb+\\"+. (This
+is not necessary when entering code in the JavaScript editor if you
+have the Acrobat application.) I try to write JavaScript that I can easily
+read, edit, and debug in the JavaScript editor (available in
+the full Acrobat application); for this reason, I've added in new
+lines and tabbing (\cs{r} and \cs{t}). Many people, however, have
+only the Adobe Reader and cannot see their code to debug it; in this
+case, the formatting is really not needed.
+
+%\newtopic Consider the following code
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+% \pushButton[\A{\JS{var x = "~"}}]{jsTilde}{22bp}{11bp}
+%\end{Verbatim}
+%\noindent In {\LaTeX}, `\texttt{\~}' is an active character. JavaScript above appears
+%within the JavaScript editor as
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+%var x = "protect unhbox voidb@x penalty @M {}"
+%\end{Verbatim}
+%\noindent Not good! Using `\verb+\~+' or `\verb+\\~+ fairs no better.
+%The work around is to use \verb!\string~!.
+%\begin{Verbatim}[xleftmargin=\amtIndent]
+% \pushButton[\A{\JS{var x = "\jslit~"}}]{jsTilde}{22bp}{11bp}
+%\end{Verbatim}
+
+\newtopic Needless to say, the following sample will not compile because we do not have
+matching braces.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\A{\JS{var x = "{"}}]{jsBrace}{22bp}{11bp}
+\end{Verbatim}
+\noindent The work around here is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\A{\JS{var x = "\jslit\{"}}]{jsBrace}{22bp}{11bp}
+\end{Verbatim}
+
+\newtopic In the above work about, the \cs{jslit} command (for JavaScript literal) is used. This command is defined only within the optional arguments of a form field. The definition of \cs{jslit} is \verb!\let\jslit\string!
+
+
+\subsubsection{Inserting Complex or Lengthy JavaScript}\label{lengthyJS}
+
+For JavaScript that is more complex or lengthy, the
+\textsf{insdljs} Package, distributed with the \cAcroB, has the
+verbatim \texttt{defineJS} environment. Details and idiosyncracies of this
+environment are documented in \Nameref{defineJS}. The
+example given in \hyperref[defineJSEx]{Example~\ref*{defineJSEx}} will suffice; the verbatim listing
+is reproduced here for convenience.
+
+\redpoint First, we define the JavaScript action and name it
+\cs{getComboJS} for the button (prior to defining the field,
+possibly in the preamble, or in style files):
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{defineJS}{\getComboJS}
+ var f = this.getField("myCombo");
+ var a = f.currentValueIndices;
+ if ( a == -1 )
+ app.alert("You've typed in \\"" + f.value +"\\".");
+ else
+ app.alert("Selection: " + f.getItemAt(a, false)
+ + " (export value: " + f.getItemAt(a, true)+").");
+\end{defineJS}
+\end{Verbatim}
+\noindent There is no need for the \cs{r} and \cs{t} commands to format the JavaScript;
+the environment obeys lines and spaces; contrast this example with \textbf{Example~\ref*{ex:formattedBtn}},
+page~\pageref{ex:formattedBtn}.
+
+Now we can define our fields, a combo box (not shown) and button, in
+this example. It is the button that uses the JavaScript defined
+above.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\BC{0 .6 0}\CA{Get}\AC{Combo}\RC{Box}
+ \A{\JS{\getComboJS}}]{myComboButton}{33bp}{11bp}
+\end{Verbatim}
+\noindent Within the argument of \cs{JS} we insert the macro
+command, \verb!\JS{\getComboJS}!
+for our JavaScript defined earlier in the
+\texttt{defineJS} environment
+
+%\redpoint The demo file \href{examples/definejs.pdf}{definejs.pdf}
+%(source \texttt{definejs.tex}) has additional examples of this
+%environment.
+
+\exAeBBlogPDF{p=875} The demo file
+\texttt{\href{\urlAcroTeXBlog/?p=875}{aeb\_links.pdf}}, with source attached,
+is found on the {\AcroBlog} website.
+
+
+\subsection{Defining JavaScript Strings with
+ \texorpdfstring{\protect\cs{defineJSStr}}{\CMD{defineJSStr}}}
+
+The command \Com{defineJSStr} is used to define JavaScript strings, such as in dialog boxes.
+The syntax for this command is
+\settowidth{\aebdimen}{\cs{defineJSStr\darg{\cs{\anglemeta{CMD}}}\darg{\anglemeta{JS\_string}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\defineJSStr{\!anglemeta(CMD)}{!anglemeta(JS_string)}
+\end{dCmd}
+\PD The parameter \cs{\anglemeta{CMD}} is a command to be define by
+\cs{defineJSStr}, for example, \cs{myMessage}, and \anglemeta{JS\_string} is
+the JavaScript string to be defined as the expansion of the
+\cs{\anglemeta{CMD}}.
+
+\CmdDescription \cs{defineJSStr} executes \verb!\xdef#1{"#2"}!, so
+the JavaScript is expanded at the time of definition. (Note the
+enclosing double quotes) Before the expansion occurs, however, there
+are a number of definitions that occur locally:
+\begin{itemize}
+ \item \cs{uXXXX} is recognized as a unicode escape sequence. So, within the JavaScript string,
+ unicode can be entered directly, for example, \cs{u00FC} is the u-umlaut.
+
+ \item Backslash is still the tex escape character, so any commands
+ in the JavaScript string get expanded. You can delay the expansion
+ by using \cs{protect}. Expansion occurs when the tex compiler
+ actually expands \cs{\anglemeta{CMD}}.
+
+ \item \cs{r} (carriage return), \cs{n} (line feed) and, \cs{t}
+ (tab) can be used to format the message, as desired.
+
+ \item Use the \cs{cs} command to write a word containing a literal backslash in it;
+ for example, to get \cs{LaTeX} to appear in a JavaScript string, you must type \verb!\cs{LaTeX}!
+ in the JavaScript string.
+ \item The JavaScript string is enclosed in double quotes (\texttt{"}), if you want
+ a literal double quote, use \verb!\\"! to get a literal double quote
+ to appear in a JavaScript string. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\defineJSStr{\myMessage}
+ {My name is \\"Stan\\" and I'm \\"the man.\\"}
+\end{Verbatim}
+
+ \item The command \cs{jslit} is recognized within the JavaScript string. Using \cs{jslit}
+ (short for JavaScript literal), you can insert, for example, unbalanced braces:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\defineJSStr{\myMessage}
+ {You forgot the left brace \\"\jslit\{\\",
+ please insert it.}
+\end{Verbatim}
+The definition of \cs{jslit} is \verb!\let\jslit\string!.
+
+
+\end{itemize}
+
+\newtopic The design decision to automatically insert the double
+quotes in the definition of the string has its faults. When you want
+to break the string to insert dynamic content, you must always be
+aware of the definition \verb!\xdef#1{"#2"}! contained with the
+definition of \cs{defineJSStr}. To illustrate, we return to an
+earlier example presented in \nameref{lengthyJS}, on
+page~\pageref*{lengthyJS}.
+
+We begin by defining some JavaScript strings. Note that in each of
+these two definitions, the leading and trailing double quote
+(\texttt{"}) is missing (these are the ones inserted automatically).
+The definitions look a bit strange because we break the string to
+insert dynamic content (\texttt{f.value}, \texttt{f.getItemAt(a,
+false)}, etc.), then continue on with the string from there.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\defineJSStr\myAlerti{You've typed in \\"" + f.value +"\\".}
+\defineJSStr\myAlertii{Selection: " + f.getItemAt(a, false)
+ + " (export value: " + f.getItemAt(a, true)+").}
+\end{Verbatim}
+
+\newtopic We use the \texttt{defineJS} environment, after setting the escape code to \texttt{@}. The \texttt{defineJS}
+is a fully verbatim environment, the escape character cannot be changed to \verb!\!, but it
+may be changed to another character, such as \texttt{@}.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\begin{defineJS}[\catcode`\@=0\relax]{\getComboJS}
+var f = this.getField("myCombo");
+var a = f.currentValueIndices;
+if ( a == -1 )
+ app.alert(@myAlerti);
+else
+ app.alert(@myAlertii);
+\end{defineJS}
+\end{Verbatim}
+
+\newtopic Then again, the use of \cs{defineJSStr} is not required, it is a convenience for creating
+JavaScript strings, especially ones with embedded Unicode. The previous example could have been
+done by defining \cs{myAlerti} and \cs{myAlertii} by
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\newcommand\myAlerti{"You've typed in \\"" + f.value +"\\"."}
+\newcommand\myAlertii{"Selection: " + f.getItemAt(a, false)
+ + " (export value: " + f.getItemAt(a, true)+")."}
+\end{Verbatim}
+\noindent Note the \emph{presence} of the leading and trailing double quotes.
+
+\section{The \texttt{useui} option: A User-Friendly Interface}\label{useui}
+
+\def\myFavFive{%
+bordercolor={1 0 0},bgcolor={0 1 0},
+textcolor={1 0 0},align={right},
+uptxt={Push Me}}
+
+
+To use the ``user-friendly'' interface, the \texttt{useui} option must be taken. The key-value pairs
+described below are enclosed as the argument of the special \cs{ui} key. For example,
+\bgroup\obeyspaces\ttfamily%
+\settowidth{\aebdimen}{ bordercolor=\darg{1 0 0},bgcolor=\darg{0 1 0},}%
+\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule}
+\pushButton[\ui{%
+ bordercolor={1 0 0},bgcolor={0 1 0},
+ textcolor={1 0 0},align={right},
+ uptxt={Push Me},
+ js={app.alert("AcroTeX rocks!")}
+}]{pb1}{}{11bp}
+\end{dCmd*}
+\egroup\newtopic You can develop your own set of appearances and use the \texttt{presets} key to conveniently set these.
+For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\def\myFavFive{%
+ bordercolor={1 0 0},bgcolor={0 1 0},
+ textcolor={1 0 0},align={right},
+ uptxt={Push Me}
+}
+\end{Verbatim}
+Later, a push button can use this preset, like so,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\ui{presets=\myFavFive,
+ js={app.alert("AcroTeX rocks!")}}]{pb1}{}{11bp}
+\end{Verbatim}
+\newtopic which produces \pushButton[\ui{presets=\myFavFive, js={app.alert("AcroTeX rocks!")}}]{pb1}{}{11bp}\,
+\footnote{The reader is reminded once again that the author has no understanding of colors.}
+
+\newtopic You can mix your \cs{myFavFive} with different key-value pairs, such as a JavaScript action.
+
+\subsection{The Appearance Tab}
+
+We set these key-value pairs to model the user interface of Acrobat.
+
+The key is \texttt{border}. In the case of a link, this is the Link Type: \textsf{Visible Rectangle}
+or \textsf{Invisible Rectangle}. For forms, this key has no counterpart
+in the user interface. If you set border equal to \texttt{invisible}, that
+will set border line width to zero \verb!\W{0}!.
+
+\settowidth{\aebdimen}{\ttfamily border=visible|invisible}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+border=visible|invisible
+\end{dCmd}
+\CmdDescription Used with link annotations and determines whether the border surrounding the bounding
+box of the link is visible. If this key is not specified, the \textsf{eforms}
+follows the rule: If \texttt{colorlinks} option of \textsf{hyperref} is used, the border is invisible;
+otherwise, it is visible (and the default \texttt{linewidth} is 1). Use the border key to override
+this behavior.
+
+\settowidth{\aebdimen}{\ttfamily linewidth=thin|medium|thick}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+linewidth=thin|medium|thick
+\end{dCmd}
+\CmdDescription The \texttt{linewidth} of the border around a link
+or a form. The user interface choices are \texttt{thin},
+\texttt{medium}, and \texttt{thick}. This key-value is ignored if the
+document author has set the border to \texttt{invisible}.
+
+\settowidth{\aebdimen}{\ttfamily highlight=none|invert|outline|inset|push}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+highlight=none|invert|outline|inset|push
+\end{dCmd}
+\CmdDescription The highlight type for links and forms, choices are
+\texttt{none}, \texttt{invert}, \texttt{outline}, \texttt{inset} and
+\texttt{push}. The term \texttt{inset} is used with links, and
+\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}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+bordercolor=!anglemeta(num)!hardspace!anglemeta(num)!hardspace!anglemeta(num)
+\end{dCmd}
+\CmdDescription The color of the border, when visible, in RGB color space.
+For example, \texttt{bordercolor=1 0 0}, is the color red.
+
+\settowidth{\aebdimen}{\ttfamily linestyle=solid|dashed|underlined|beveled|inset}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+linestyle=solid|dashed|underlined|beveled|inset
+\end{dCmd}
+\CmdDescription The line style of the border, possible values are \texttt{solid},\texttt{dashed},
+\texttt{underlined}, \texttt{beveled},and \texttt{inset}. Links do not support
+the \texttt{beveled} option.
+
+\settowidth{\aebdimen}{\ttfamily dasharray=\anglemeta{num}[\hardspace\anglemeta{num}]}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+dasharray=!anglemeta(num)[!hardspace!anglemeta(num)]
+\end{dCmd}
+\CmdDescription When a line style of \texttt{dashed} is chosen, you can specify a dash array.
+The default is 3.0, which means a repeating pattern of 3 points of line, followed by 3 points of space.
+A value of \texttt{dasharray=3~2} means three points of line, followed
+by two points of space. When this key is used without a value, the value is 3.0.
+When the \texttt{dashed} key is not present, 3.0 is used.
+
+\settowidth{\aebdimen}{\ttfamily linktxtcolor=\anglemeta{named\_color}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+linktxtcolor=!anglemeta(named_color)
+\end{dCmd}
+\CmdDescription Set the color of the link text. Ignored if the
+\texttt{colorlinks} option of hyperref has not been taken. The
+value of \texttt{linktxtcolor} is a named color. For example,
+\texttt{linktxtcolor=red}. The default is \verb|\@linkcolor| from hyperref.
+This default can be changed by redefining \cs{@linkcolor}, or
+redefining \cs{defaultlinkcolor}. If \verb!linktxtcolor={}! (an
+empty argument), or simply \texttt{linktxtcolor}, no color is
+applied to the text, the color of the text will be whatever the current color is.
+
+\settowidth{\aebdimen}{\ttfamily annotflags=hidden|print|-print|noview|lock}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+annotflags=hidden|print|-print|noview|lock
+\end{dCmd}
+
+\CmdDescription This is a bit field, possible values are \texttt{hidden}, \texttt{print},
+\texttt{-print}, \texttt{noview}, and \texttt{lock}. \textit{Multiple values can
+be specified}. The values are ``or-ed'' together. Most all forms are printable
+by default. If you don't want a form field to print specify \texttt{-print}.
+For example, \verb|annotflags={-print,lock}| makes the field not printable and is
+locked, so the field cannot be moved through the UI.
+
+
+\settowidth{\aebdimen}{\ttfamily fieldflags=readonly|required|noexport|multiline|password|}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+fieldflags=readonly|required|noexport|multiline|password|
+ notoggleoff|radio|pushbutton|combo|edit|
+ sort|fileselect|multiselect|nospellcheck|
+ noscrolling|comb|radiosinunison|commitonchange|
+ richtext
+\end{dCmd}
+\CmdDescription There are a large number of field flags (\texttt{Ff}) that set a
+number of properties of a field. This is a multiple-selection key as well. The
+values are ``or-ed'' together.
+
+Normally, a document author would not specify \texttt{radio}, \texttt{pushbutton} or \texttt{combo}. These properties are used by \textsf{eforms} to construct a radio button field, a push button and a combo box. The others can be used as appropriate.
+
+\settowidth{\aebdimen}{\ttfamily maxlength=\anglemeta{num}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+maxlength=!anglemeta(num)
+\end{dCmd}
+\CmdDescription Use \texttt{maxlength} to limit the number of characters input into a text field.
+Example: \texttt{maxlength=12}. When the \texttt{fieldflags} is set to \texttt{comb}, the value
+of \texttt{maxlength} determines the number of combs in the field.
+
+
+\settowidth{\aebdimen}{\ttfamily tooltip=\anglemeta{string}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+tooltip=!anglemeta(string)
+\end{dCmd}
+\CmdDescription Enter a text value to appear as a tool tip. A tool
+tip is text that appears in a frame when the user hovers the mouse
+over the field. The link annotation does not have a tool tip
+feature. Enclose in parentheses if the text string contains a comma;
+for example, \verb|tooltip={Hi, press me and see what happens!}|.
+The \texttt{tooltip} key obeys the \texttt{unicode} option. If the
+unicode option of hyperref is in effect, then setting
+\begin{Verbatim}[xleftmargin=\amtIndent]
+tooltip = {J\"{u}rgen, press me and see what happens!}
+\end{Verbatim}
+\noindent yields a tool tip of ``J\"{u}rgen, press me and see what happens!''
+
+\settowidth{\aebdimen}{\ttfamily default=\anglemeta{string}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+default=!anglemeta(string)
+value=!anglemeta(string)
+\end{dCmd}
+\CmdDescription Set default value of a field (text, list, combobox)
+using the \texttt{default} key. The default value is the value used
+for the field when the field is reset. Example:
+\texttt{default=Name}.
+
+The \texttt{value} key is used to set the current value of a
+field (text, list, combobox). Example: \texttt{value=AcroTeX}. % unicode
+
+These two keys obey the \texttt{unicode} option.
+If the unicode option of hyperref is in effect, then setting
+\verb|value = \texteuro\ 1 000 000| sets the (initial) value of this field to
+``\char1 \ 1 000 000''.
+
+\settowidth{\aebdimen}{\ttfamily rotate=0|90|180|270}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+rotate=0|90|180|270
+\end{dCmd}
+\CmdDescription Set the orientation of the field, values are 0, 90, 180 and 270. If 90 or 270
+are chosen, the height and width of the field need to be reversed. This is not
+done automatically by \textsf{eforms}
+
+\settowidth{\aebdimen}{\ttfamily bgcolor=\anglemeta{num}\hardspace\anglemeta{num}\hardspace\anglemeta{num}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+bgcolor=!anglemeta(num)!hardspace!anglemeta(num)!hardspace!anglemeta(num)
+\end{dCmd}
+\CmdDescription The background color of a form field. This is a RGB color value.
+
+\settowidth{\aebdimen}{\ttfamily rollovertxt=\anglemeta{string}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+uptxt=!anglemeta(string)
+downtxt=!anglemeta(string)
+rollovertxt=!anglemeta(string)
+\end{dCmd}
+\CmdDescription The normal (mouse up), mouse down and rollover text
+for a button field. All three of these keys obey the \texttt{unicode} option.
+If the \opt{unicode} option of \pkg{hyperref} is in effect, then setting
+\verb!uptxt = J\"{u}rgen! yields a normal caption of ``J\"{u}rgen'' on the button.
+
+% \texttt{eqforms\_pro.tex}
+
+
+\newtopic \textbf{Push buttons only.} The following list of keys are used for
+creating custom appearances on button faces. Acrobat Distiller required for
+this set. The example files
+\marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr
+b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=879}{eqforms.pdf}} and
+\texttt{\href{\urlAcroTeXBlog/?p=1291}{eqforms\_pro.pdf}} illustrate the
+creation of icons as button appearances. In the latter PDF,
+\texttt{eqforms\_pro.pdf}, \textsf{Acrobat Distiller} is required to be the
+PDF creator.
+\begin{itemize}
+\item[]
+\settowidth{\aebdimen}{\ttfamily normappr=\anglemeta{string}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+normappr=!anglemeta(string)
+rollappr=!anglemeta(string)
+downappr=!anglemeta(string)
+\end{dCmd}
+\item[]\CmdDescription The normal, rollover, and down appearances of the button face icon. The value of each
+key is an indirect reference to a form XObject. Normally, you can use the \texttt{graphicxsp} package
+to embed graphics and give a symbolic name which is used as the value of these keys.
+
+\item[]
+\settowidth{\aebdimen}{\ttfamily layout=labelonly|icononly|icontop|iconbottom|}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+layout=labelonly|icononly|icontop|iconbottom|
+ iconleft|iconright|labelover
+\end{dCmd}
+\item[]\CmdDescription The value of this key determines the layout of the icon relative to the label (or caption).
+ The default is \texttt{labelonly}, if if you define icons, you need to set layout to something
+ other than \texttt{labelonly}.
+
+\item[]
+\settowidth{\aebdimen}{\ttfamily scalewhen=always|never|iconbig|iconsmall}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+scalewhen=always|never|iconbig|iconsmall
+\end{dCmd}
+\item[]\CmdDescription The value of this key tells when to scale the icon. The \texttt{iconbig}
+ scales the icon when it is too big for the bounding rectangle; while
+ \texttt{iconsmsll} scales the icon when it is too small for the bounding rectangle.
+ The default is \texttt{always}.
+
+\item[]
+\settowidth{\aebdimen}{\ttfamily scale=proportional|nonproportional}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+scale=proportional|nonproportional
+\end{dCmd}
+\item[]\CmdDescription This parameter sets the scale type, either \texttt{proportional} scaling, where
+the aspect ratio of the icon is preserved; or \texttt{nonproportional} scaling is used. The
+default is \texttt{proportional}.
+
+\item[]
+\settowidth{\aebdimen}{\ttfamily position=\anglemeta{x}\hardspace\anglemeta{y})}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+position=!anglemeta(x)!hardspace!anglemeta(y)
+\end{dCmd}
+\item[]\CmdDescription Both \anglemeta{x} and \anglemeta{y} are numbers
+ between 0 and 1, inclusive, and separated by a space (not a comma). They
+ indicate the fraction of the left over space to allocate at the left
+ and bottom of the icon. A value of \verb!{0.0 0.0}! positions the
+ icon at the bottom-left corner; a value of \verb!{0.5 0.5}! centers
+ it within the rectangle. This entry is only used of the icon is
+ scaled proportionally. The default is \verb!{0.5 0.5}!.
+
+\item[]
+\settowidth{\aebdimen}{\ttfamily fitbounds=true|false}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+fitbounds=true|false
+\end{dCmd}
+\item[]\CmdDescription A Boolean value, if \texttt{true}, indicates
+ that the button appearance should be scaled to fit fully
+ within the bounds of the field's bounding rectangle without
+ taking into consideration the line width of the border. The
+ default is \texttt{false}. \texttt{fitbounds} is the same as \texttt{fitbounds=true}.
+
+\end{itemize}
+
+\newtopic \textbf{Check boxes and Radio Buttons Only.} The following
+list of keys are used for creating custom appearances on check boxes and
+radio buttons. Acrobat Distiller required for this set. The example files
+\marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr
+b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=879}{eqforms.pdf}} and
+\texttt{\href{\urlAcroTeXBlog/?p=1291}{eqforms\_pro.pdf}} illustrate the
+creation of these appearances.. In the latter PDF, \texttt{eqforms\_pro.pdf},
+\textsf{Acrobat Distiller} is required to be the PDF creator.
+
+\begin{itemize}
+
+\item[]
+\settowidth{\aebdimen}{\ttfamily appr=\darg{ norm=\darg{on=\darg\anglemeta{normOnAppr}},off=\darg{\anglemeta{normOffAppr}}},}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+appr={ norm={on={!anglemeta(normOnAppr)},off={!anglemeta(normOffAppr)}},
+ down={on={!anglemeta(downOnAppr)},off={!anglemeta(downOffAppr)}},
+ roll={on={!anglemeta(rollOnAppr)},off={!anglemeta(rollOffAppr)}}}
+\end{dCmd}
+\item[] \CmdDescription The \texttt{norm} key is the normal appearance of the button;
+ it has two appearances, the \texttt{on} and the \texttt{off} appearances. The
+ \texttt{on} and \texttt{off} are indirect references to a form XObject. The other
+ two keys, down and roll, are the down and rollover appearances, respectively; they
+ have the same structure as \texttt{norm} does.
+
+\item[] If \texttt{appr} is not specified, then, by default, the usual appearances of the
+ buttons are used, as provided by Acrobat/AR.
+
+\item[] The \texttt{down} and \texttt{roll} are optional, if you use \texttt{appr} at all, you should
+ specify the norm appearance, both \texttt{on} and \texttt{off} appearances.
+
+\end{itemize}
+
+\settowidth{\aebdimen}{\ttfamily align=left|centered|right}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+align=left|centered|right
+\end{dCmd}
+\CmdDescription The type of alignment of a text field. Permitted values are
+\texttt{left}, \texttt{centered}, and \texttt{right}.
+
+
+\settowidth{\aebdimen}{\ttfamily textcolor=\anglemeta{num}[\hardspace\anglemeta{num}\hardspace\anglemeta{num}[\hardspace\anglemeta{num}]]}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+textfont=!anglemeta(font_name)
+textsize=!anglemeta(num)
+textcolor=!anglemeta(num)[!hardspace!anglemeta(num)!hardspace!anglemeta(num)[!hardspace!anglemeta(num)]]
+\end{dCmd}
+\CmdDescription
+The key \texttt{textfont} is the text font to be used with the text of the field,
+while \texttt{textsize} is the text size to be used. A value of 0 means auto size.
+The color of the text in the field. This can be in \textsf{G}, \textsf{RGB} or \textsf{CMYK} color
+space by specifying 1, 3 or 4 numbers between 0 and 1.
+
+\settowidth{\aebdimen}{\ttfamily autocenter=yes|no}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+autocenter=yes|no
+\end{dCmd}
+\CmdDescription This is a feature of \textsf{eforms}. Use
+\texttt{autocenter=yes} (the default) to moderately center the bounding box,
+and use \texttt{autocenter=no} otherwise.
+
+\settowidth{\aebdimen}{\ttfamily presets=\meta{\string\CMD}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+presets=!meta(\CMD)
+\end{dCmd}
+\CmdDescription Set presets from inside a \cs{ui} argument. The value of \cs{ui} must be a user defined
+command, which expands to a comma-delimited list of ui-key-value pairs.
+
+\Example Use the presets key to place pre-defined key-value pairs into the option
+argument of a link. Define a command,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\def\myUIOpts{%
+ border=visible,linktxtcolor=blue,
+ linewidth=medium,highlight=outline,
+ linestyle=dashed,bordercolor={1 0 0},
+ js={app.alert("AcroTeX rocks!")}
+}
+\end{Verbatim}
+Later, we can type,
+\settowidth{\aebdimen}{\ttfamily \string\setLink[\string\ui\darg{presets=\darg{\string\myUIOpts}}]\darg{Press Me Again!!}}
+\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule}
+\setLink[\ui{presets={\myUIOpts}}]{Press Me Again!!}
+\end{dCmd*}
+
+\settowidth{\aebdimen}{\ttfamily symbolchoice=check|circle|cross|diamond|square|star}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+symbolchoice=check|circle|cross|diamond|square|star
+\end{dCmd}
+\CmdDescription Used with a checkbox or radio button field. This sets the symbol
+that appears in the field when the box is checked. Choices are
+\texttt{check}, \texttt{circle}, \texttt{cross}, \texttt{diamond},
+\texttt{square}, and \texttt{star}.
+
+
+\subsection{The Action Tab}
+
+There are several common actions that are supported through the user-friendly interface, these
+are \texttt{goto} actions, and JavaScript actions.
+
+
+\settowidth{\aebdimen}{\ttfamily goto=\darg{\meta{KV-pairs}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+goto={!meta(KV-pairs)}
+\end{dCmd}
+\CmdDescription This key incorporates jumps to pages and destinations within the current PDF file,
+and to pages and destinations to another PDF file. these are
+\KVP There are a number of key-value pairs that are recognized,
+\texttt{file}, \texttt{targetdest}, \texttt{labeldest}, \texttt{page},
+\texttt{view}, and \texttt{open}. A brief description of each follows.
+\begin{enumerate}
+ \item \texttt{file}: Specify a relative path to the PDF file. This will work on the Web if
+ the position is the same relative to the calling file. If the \texttt{file} key is not present,
+ the jump is to a page or destination in the current file.
+ \item \texttt{url}: This key is used to create a weblink, similar to what \cs{href} does.
+ The value of this key is a url (\texttt{http}, \texttt{https}, \texttt{mailto}, etc.).
+ If the \texttt{url} key is present, only the \texttt{openparams} key is recognized.
+ \item \texttt{openparams}: Open parameters that should be included with the URL, as passed by
+ the \texttt{url} key. These parameters are key value pairs \texttt{key=value} and are separated
+ by an ampersand (\texttt{\&}).
+ See \emph{\href{http://www.adobe.com/devnet/acrobat/?view=documentation}{Parameters for Opening PDF Files}} for more information, examples are found below.
+ \item \texttt{targetdest}: Jump to a target, perhaps created by \verb|\hypertarget|. For example,
+ if we say \verb|\hypertarget{acrotex}{Welcome!}|, we jump to the
+ \texttt{acrotex} named destination by specifying \texttt{targetdest=acrotex}.
+ \item \texttt{labeldest}: Same as \texttt{targetdest}, but we jump to a destination specified by
+ a latex label. For example, if we type \verb|\section{AcroTeX}\label{acrotex}|,
+ we can jump to this section by specifying \texttt{labeldest=acrotex}.
+
+ \item \texttt{page}: The page number to which the \texttt{goto}
+ action is to jump. If we set \texttt{page=1}, we will jump to the
+ first page of the document.
+
+ \item \texttt{view}: The view can be set when the \texttt{page} key is used.
+ Possible values are \texttt{fitpage}, \texttt{actualsize},
+ \texttt{fitwidth}, \texttt{fitvisible}, and \texttt{inheritzoom}.
+ These terms correspond to Acrobat's UI. When jumping to a
+ destination, the view is set by the destination code.
+
+ \item \texttt{open}: This key is used when you specify the \texttt{file} key. The
+ \texttt{open} key determines if a new window is opened or not when the PDF viewer
+ jumps to the file. Possible values are \texttt{userpref} (use user preferences),
+ \texttt{new} (open new window), \texttt{existing} (use the existing window).
+
+\end{enumerate}
+
+\Example The following are examples of the \texttt{goto} key.
+\begin{itemize}
+ \item \setLink[\ui{goto={file=aeb_man.pdf,page=8,view=fitwidth}}]{AeB Manual}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\setLink[\ui{goto={file=aeb_man.pdf,page=8,%
+ view=fitwidth}}]{AeB Manual}
+\end{Verbatim}
+This link should work on your local hard drive and it should work on
+the web, from within a web browser, assuming \texttt{aeb\_man.pdf} is
+in the same folder as \texttt{eformman.pdf}.
+
+\item \setLink[\ui{goto={url=http://www.math.uakron.edu/~dpstory/acrotex/aeb_man.pdf,
+ openparams={page=8&search=AcroTeX web exerquiz}}}]{AeB Manual on Web}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\setLink[\ui{%
+ goto={url=http://www.math.uakron.edu/~dpstory/%
+ acrotex/aeb_man.pdf,%
+ openparams={page=8&search=AcroTeX web exerquiz}}}
+ ]{AeB Manual on Web}
+\end{Verbatim}
+Here, we open the AeB Manual that is on the web, go to page 8, and search for the words
+\texttt{AcroTeX}, \texttt{web}, and \texttt{exerquiz}. Notice that we don't have to
+do anything special with the tilde (\texttt{\string~}) or the sharp (\texttt{\#}), both of
+these are handled by the \textsf{eforms} package.
+\end{itemize}
+
+
+\settowidth{\aebdimen}{\ttfamily js=\darg{\anglemeta{script}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+js={!anglemeta(script)}
+\end{dCmd}
+\CmdDescription A general purpose key to execute JavaScript actions on a mouse up trigger.
+The argument is a JavaScript text string, for example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+js={app.alert("Hello World!")}
+\end{Verbatim}
+The value of \texttt{js} may be a macro containing JavaScript, which would include
+a macro created by the \texttt{defineJS} environment of \textsf{insdljs}.
+
+% Next up are additional actions, and there are a lot of them. All these
+% take JavaScript code as their values.
+\settowidth{\aebdimen}{\ttfamily pageinvisible=\darg{\anglemeta{script}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+mouseup={!anglemeta(script)}
+mousedown={!anglemeta(script)}
+onenter={!anglemeta(script)}
+onexit={!anglemeta(script)}
+onfocus={!anglemeta(script)}
+onblur={!anglemeta(script)}
+format={!anglemeta(script)}
+keystroke={!anglemeta(script)}
+validate={!anglemeta(script)}
+calculate={!anglemeta(script)}
+pageopen={!anglemeta(script)}
+pageclose={!anglemeta(script)}
+pagevisible={!anglemeta(script)}
+pageinvisible={!anglemeta(script)}
+\end{dCmd}
+\CmdDescription These are all additional actions (\texttt{AA}) of a form field, which take as their values
+JavaScript code (\anglemeta{script}).
+ \begin{itemize}
+ \item \texttt{mouseup}: Executes its code with a mouse up event. If there is a JavaScript
+ action defined by the \texttt{js} key (or the \verb|\A| key), the \texttt{js} (\verb|\A|) action is executed.
+ \item \texttt{mousedown}: Executes its when the mouse is hovering over the field and the user clicks
+ on the mouse.
+ \item \texttt{onenter}: Executes its code when the user moves the mouse into the form field (the bounding rectangle).
+ \item \texttt{onexit}: Executes its code when the user moves the mouse out of the form field (the bounding rectangle).
+ \item \texttt{onfocus}: Executes its code when the user brings the field into focus.
+ \item \texttt{onblur}: Executes its code when the user brings the field loses focus (the user tabs away from
+ the field, or click outside the field).
+ \item \texttt{format}: JavaScript to format the text that appears to
+ the user in a text field or editable combo box.
+ \item \texttt{keystroke}: JavaScript to process each keystroke in a text field or editable combo box.
+ \item \texttt{validate}: JavaScript to validate the committed data input into a text field or editable combo box.
+ \item \texttt{calculate}: JavaScript to make calculations based on the values of other fields.
+ \item \texttt{pageopen}: JavaScript that executes when the page containing the field is opened.
+ \item \texttt{pageclose}: JavaScript that executes when the page containing the field is closed.
+ \item \texttt{pagevisible}: JavaScript that executes when the page containing the field first becomes visible to the user.
+ \item \texttt{pageinvisible}: JavaScript that executes when the page containing the field is no longer visible to the user.
+ \end{itemize}
+
+ \subsection{The Signed Tab}
+
+ A signature field has a Signed tab. On that tab is an option to mark a set of fields
+ as readonly (locked). The locked key controls that option.
+
+\settowidth{\aebdimen}{\ttfamily lock=\darg{\anglemeta{PDF KV-pairs}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+lock={!anglemeta(PDF KV-pairs)}
+\end{dCmd}
+
+\CmdDescription The \texttt{lock} key is used with signature fields, currently, there is
+ no nice user interface to this key. Typical entries are
+\begin{Verbatim}[xleftmargin=\amtIndent]
+lock={/Action/All} % lock all fields in the doc
+lock={/Action/Include % lock all fields listed in Fields
+ /Fields [(field1)(field2)...]}
+lock={/Action/Exclude % lock all fields not listed in Fields
+ /Fields [(field1)(field2)...]}
+\end{Verbatim}
+
+\newtopic Another option that is included in the Signed tab is titled ``This script executes
+when field is signed.''
+
+This is an option that, through the user interface, is mutually exclusive from
+locking fields. This option is implemented through the format event;
+thus, to populate this option with JavaScript use the \texttt{format} key. For example,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+format={app.alert("Thank you for signing this field.");}
+\end{Verbatim}
+
+\part{Setting the Tab Order}
+
+The \hypertarget{\pkg{taborder}}{taborderPkg} package is an internal AeB package that is called by
+both the \textsf{eforms} and the \texttt{annot\_pro packages}. The
+\texttt{taborder} package sets the tab order for form fields and link
+annotations (when the link is created by the command \cs{setLink}, defined
+in the \textsf{eforms} package. The package works for all drivers when
+setting tab order by column, row, or widget order. For setting tabbing
+order by structure, only documents generated using the \textbf{pdfmark}
+are supported; those using the \textsf{dvips} or \textsf{dvipsone} driver along with Adobe
+Distiller.
+
+\section{Setting the Tab Order}
+
+The tabbing order of the fields is usually the order in which the fields were created. In rare cases, it may be desirable to set the order to one of the orders defined by the PDF Reference.
+\settowidth{\aebdimen}{\ttfamily \string\setTabOrder\darg{c|C|r|R|s|S|w|W|a|A|unspecified}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\setTabOrder{c|C|r|R|s|S|w|W|a|A|unspecified}
+\end{dCmd}
+
+\CmdDescription Command Description: This command is page oriented, it sets to the tab order of fields on
+the page the TEX compiler executes this command. The permissible values of the parameter are
+described below, taken verbatim from the \emph{PDF Reference}, the cross-references that appear in the
+descriptions are references to the \emph{PDF Reference} document.
+\begin{itemize}
+\item \texttt{c|C} (column order): ``Annotations are visited in columns running vertically up and down
+the page. Columns are ordered by the Direction entry in the viewer preferences dictionary
+(see Section 8.1, `Viewer Preferences'). The first annotation visited is the one at the top of
+the first column. When the end of a column is encountered, the first annotation in the next
+column is visited.''
+\item \texttt{r|R} (row order): ``Annotations are visited in rows running horizontally across the page.
+The direction within a row is determined by the Direction entry in the viewer preferences
+dictionary (see Section 8.1, `Viewer Preferences'). The first annotation visited is the first
+annotation in the topmost row. When the end of a row is encountered, the first annotation
+in the next row is visited.''
+\item \texttt{s|S} (structure order): ``Annotations are visited in the order in which they appear in the
+structure tree (see Section 10.6, ``Logical Structure''). The order for annotations that are not
+included in the structure tree is application-dependent.''
+\item \texttt{w|W} (version 9.0, widget order): ``Widget annotations are visited in the order in which they
+appear in the page Annots array, followed by other annotation types in row order.''
+\item \texttt{a|A} (version 9.0, annotations array order): ``All annotations are visited in the order in which
+they appear in the page Annots array.'' (In version 9.0, this key is not implemented.)
+\item \texttt{unspecified|empty} The tab order follows the order of the annotations as listed in the
+Annots array. For LATEX, this is the order in which the annotations were created. You get
+the same result if the argument is left empty \verb!\setTabOrder{}!, or if \cs{setTabOrder} is
+not used at all. If an unrecognized argument is passed to \cs{setTabOrder}, \texttt{unspecified}
+is used.
+\end{itemize}
+The behavior of tabbing has changed over the years; documentation of tabbing behavior is given
+in the \emph{Adobe Supplement to the ISO 32000, BaseVersion 1.7, ExtensionLevel 3}.\footnote{\url{http://www.adobe.com/devnet/acrobat/pdfs/PDF3200_2008.pdf}} See the section
+Errors and Implementation Notes. Annotations include things like form fields (widget annotations), links (link annotations) and
+the various types of comment annotations. See section 8.4.5 of the PDF Reference.
+
+The \cs{setTabOrder} command is available for users of pdftex and dvipdfm, as well as users of dvipsone and dvips (with distiller); for row, column, and widget (version 9 or later), the PDF viewer does all the work on tabbing, for tabbing using structure, one necessarily needs structure, otherwise, the tabbing follows row order. For users of Adobe Distiller, the \texttt{taborder} package provides two ways for defining the structure order; on any page in which structure order is used, use only one of the following commands:
+\settowidth{\aebdimen}{\ttfamily\string\setTabOrderByNumber}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\setTabOrderByList
+\setTabOrderByNumber
+\end{dCmd}
+
+\subsection{Using \texorpdfstring{\protect\cs{setTabOrderByList}}{\CMD{setTabOrderByList}}}
+
+We illustrate with a simple example, followed by a verbatim listing of the code, and a discussion
+afterward. We begin by placing two text fields in a row; normally,we would tab from the first one created
+by the {\TeX} compiler to the next one created. We use structure to reverse the order of tabbing.
+
+\setTabOrder{s} % set tab order to structure
+\setTabOrderByList % the default initially
+
+\textField[\V{text1}\objdef{otext1}]{text1}{1.25in}{11bp}\\[3bp]
+\textField[\V{text2}\objdef{otext2}]{text2}{1.25in}{11bp}
+
+\setStructTabOrder{% The list of the fields in the desired order
+ {otext2}
+ {otext1}
+}
+\newtopic The verbatim listing of the above form fields follows:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\setTabOrder{s} % set tab order to structure
+\setTabOrderByList % the default initially
+
+\textField[\V{text1}\objdef{otext1}]{text1}{1.25in}{11bp}\\[3bp]
+\textField[\V{text2}\objdef{otext2}]{text2}{1.25in}{11bp}
+
+\setStructTabOrder{% The list of the fields in the desired order
+ {otext2}
+ {otext1}
+}
+\end{Verbatim}
+\newtopic We begin by specifying \verb!\setTabOrder{s}! structure tab order. In the optional argument of the two text fields, we specify an object name for each. These names must be unique throughout the whole document; they are used to reference the fields when setting up the tabbing order.
+
+The \cs{setStructTabOrder} is used to set up the tabbing order, its arguments (enclosed in
+braces) consists of a list of object names (which must exist on the current page). The order of
+the object names is the order of visitation when you tab. PDF objects not referenced are visited
+last after the structure tabbing is complete.
+
+After all annotations have been created on a page, we use the \cs{setStructTabOrder} to
+actually set the tab order; this is none by simply listing the object names, in the desired order, of
+the annotations you want included in the tabbing order. These annotations can be fields, links,
+and markup comments, like sticky notes.
+
+The syntax for \cs{setStructTabOrder} is
+
+\bgroup\obeyspaces%
+\settowidth{\aebdimen}{\ttfamily [type=\anglemeta{type},title=\anglemeta{title}]\darg{\anglemeta{oRef\_n}}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\setStructTabOrder{%
+ [type=!anglemeta(type),title=!anglemeta(title)]{!anglemeta(oRef_1)}
+ [type=!anglemeta(type),title=!anglemeta(title)]{!anglemeta(oRef_1)}
+ ...
+ [type=!anglemeta(type),title=!anglemeta(title)]{!anglemeta(oRef_n)}
+}
+\end{dCmd}
+\egroup\newtopic Each argument has an optional argument, the required argument (\anglemeta{<oRef\_i>}) is an object name
+of a previously defined PDF object, such as a form field (widget), a link, or an annotation. The
+optional argument takes two optional key-value pairs: (1) The type is a declaration of the type
+the PDF object is, the default is \texttt{Form} (you can use \texttt{Link} if its a link, and \texttt{Annot} if its a comment);
+(2) \texttt{title} is the title of the structure, the value of title appears in the Tags panel of the Acrobat
+user interface. The default title is to have no title.
+
+\newtopic The demo file is \marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr
+b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=320}{settaborder.pdf}} for these tabbing features,
+including tabbing using structure, has its source file attached to the PDF file.
+The file is posted one the \href{\urlAcroTeXBlog}{AeB Blog}.
+
+\subsection{Using \texorpdfstring{\protect\cs{setTabOrderByNumber}}{\CMD{setTabOrderByNumber}}}
+
+An alternate method for setting tab order by structure is to directly enter the tab order into the
+optional argument of the field, link, or comment annotation.
+
+\setTabOrder{s} % set tab order to structure
+\setTabOrderByNumber
+
+\textField[\V{text3}\objdef{otext3}\taborder{1}]{text3}{1.25in}{11bp}\\[3bp]
+\textField[\V{text3}\objdef{otext4}\taborder{0}]{text4}{1.25in}{11bp}
+
+\newtopic The verbatim listing of the above form fields follows:
+\begin{Verbatim}[xleftmargin=\amtIndent,]
+\setTabOrder{s} % set tab order to structure
+\setTabOrderByNumber
+
+\textField[\V{text3}\objdef{otext3}\taborder{1}]
+ {text3}{1.25in}{11bp}\\[3bp]
+\textField[\V{text3}\objdef{otext4}\taborder{0}]
+ {text4}{1.25in}{11bp}
+\end{Verbatim}
+\newtopic Note the user of the \cs{objdef} and \cs{taborder} keys. The latter is used to set the order of tabbing.
+
+\newtopic\textcolor{red}{\textbf{Important:}} When setting tab order, there must be an object with \verb!\taborder{0}!; from what I've been able to observe, if no PDF object has tab order zero, the tabbing reverts to what is listed in the Annots array, which is the order the PDF objects were created. If you specify 0, 0, 1, 2, 3\dots, then the two PDF objects with tab order of 0 are visited in the order they were created. Similarly, for the other tab values. A tab order of 0, 2, 3, 4\dots seems to work as well. The object labeled 2 will be visited after the object labeled 0.
+
+%The demo file, \texttt{settaborder1.pdf}, for these tabbing features, including tabbing using structure, has its source file attached to the PDF file. The file is posted one the \href{http://www.math.uakron.edu/~dpstory/aebblog.html}{AeB Blog}.
+
+\newtopic The demo file is \marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr
+b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=334}{settaborder1.pdf}} for these tabbing features, including tabbing using structure, has its source file attached to the PDF file. The file is posted one the \href{\urlAcroTeXBlog}{AeB Blog}.
+
+
+%------------------ End PDF Forms and Link ----------------------------
+
+\part{Document and Page JavaScript}
+
+%\section{Introduction}
+
+The \hypertarget{\pkg{insdljs}}{insdljsPkg} package provides support to {\LaTeX} in four areas:
+\begin{enumerate}
+ \item for embedding document level JavaScript into the PDF file created from a {\LaTeX} source,
+ the \texttt{insDLJS} environment.
+ \item for creating open page actions that are executed when the document is first opened to the first
+ page, the \cs{OpenAction} command.
+ \item for writing JavaScript code in an environment that preserves the formatting of the code,
+ this is the \texttt{defineJS} environment.
+ \item for executing JavaScript code once to perform post
+ distill tasks, this is the \texttt{execJS} environment. This environment works only for document
+ authors that use Acrobat/Acrobat Distiller to create PDF files.
+\end{enumerate}
+
+\newtopic This package defines a new environment, \texttt{insDLJS}, used
+for inserting Acrobat JavaScript into a PDF file created from a \LaTeX{}
+source. This package works correctly for users of \textsf{pdftex} (and
+luatex), \textsf{dvipdfm}, \textsf{dvipdfmx}, and \texttt{xetex}. For
+those that use the \textsf{Acrobat Distiller} (specifically, those that
+use either \textsf{dvips} or \textsf{dvipsone} to produce a postscript
+file, which is then distilled), you are required to have Acrobat~5.0 (or
+later).
+
+\section{Package Options}
+
+The \textsf{insdljs} supports five common ``drivers'': \texttt{dvipsone},
+\texttt{dvips}, \texttt{pdftex} (including the executable \textsf{lu(la)tex}), \texttt{dvipdfm},
+\texttt{dvipdfmx}, \texttt{xetex}, and \texttt{tex\-tures}. When using
+\texttt{dvipsone} or \texttt{dvips}, Acrobat Distiller and Acrobat
+(version 5.0 or later) are required to embed the JavaScripts at the
+document level. The other drivers have primitives that allow the embedding
+of the JavaScripts.
+
+\newtopic Other options are discussed in the following paragraphs.
+\begin{description}\def\NH{\hspace{-\labelsep}}
+\item\NH\texttt{nodljs} turns off the embedding of the document level
+ JavaScript. This might be useful, for creating a paper document that is
+ not interactive. For a non-interactive paper document, no JS is needed.
+
+\item\NH\texttt{execJS} is a very useful option/feature if you know how to use
+ it. Any JavaScript that is written in an \env{execJS} environment is
+ executed once when the document is first opened in Acrobat, then
+ discarded. AeB uses this for post-distillation document processing. The
+ default is that the JavaScript in an \texttt{execJS} environment is not
+ executed; using this option turns on this feature.
+\end{description}
+
+\section{The \texttt{insDLJS} and \texttt{insDLJS*} Environments}
+
+These are the main environments defined by this package. There are
+two forms of the document level environment, the \texttt{insDLJS} and the
+\texttt{insDLJS*}. First, we discuss what a document JavaScript is.
+
+\subsection{What is Document Level JavaScript?}
+The document level is a location in the PDF document where scripts can be stored.
+When the PDF document is opened, the document level functions are scanned, and any
+``exposed script'' is executed.
+
+Normally, the type of scripts you would place at the document level are
+general purpose JavaScript functions, functions that are called repeatedly
+or large special purpose functions. Functions at the document level are
+known throughout the document, so they can be called by links, form
+buttons, page open actions, etc.
+
+Variables declared within a JavaScript function have local scope, they are
+not known outside that function. However, if you can declare variables and
+initialize them at the document level outside of a function, these
+variables will have document wide scope. Throughout the document, the
+values of these global variables are known. For example, suppose the
+following code is at the document level:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+var myVar = 17; // defined outside a function, global scope
+function HelloWorld()
+{
+ var x = 3; // defined inside a function, local scope
+ app.alert("AcroTeX, by Hech!", 3);
+}
+\end{Verbatim}
+Both the function \texttt{HelloWorld()} and the variable \texttt{myVar}
+are known throughout the document. The function \texttt{HelloWorld()} can
+be called by a mouse up button action; some form field, executing some
+JavaScript, may access the value of \texttt{myVar} and/or change its
+value. The variable \texttt{x} is not known outside of the
+\texttt{HelloWorld()} function.
+
+\subsection{The \texttt{insDLJS} Environment}
+
+The \texttt{insDLJS} is the simplest of the two environments. Any material
+within the environment, eventually ends up in the \textsf{DLJS} section of the
+PDF document.
+
+The environment takes the \meta{base\_name} and writes the
+file \texttt{\anglemeta{base\_name}.djs}. This file contains a verbatim
+listing of the JavaScript within the environment, plus some lines
+that change catcodes. The file is then input into the document at
+\cs{AtBeginDocument}.
+
+The case of \textsf{dvipsone} and \textsf{dvips} is a little different. A
+\texttt{\anglemeta{base\_name}.djs} is written and input back, and a second file
+\texttt{\anglemeta{base\_name}.fdf} is written. The second file is later input
+into the PDF document after distillation.
+
+The syntax of usage for this environment, which takes three
+arguments, is given next.
+\settowidth{\aebdimen}{\cs{begin\darg{insDLJS}[\meta{js\_var}]\darg{\meta{base\_name}}\darg{\meta{script\_name}}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\begin{insDLJS}[!meta(js_var)]{!meta(base_name)}{!meta(script_name)}
+...
+ !anglemeta(JavaScript functions or exposed code)
+...
+\end{insDLJS}
+\end{dCmd}
+\EnvDescription JavaScript code is written within the \texttt{insDLJS} environment.
+The code is stored as document-level JavaScript, and is global to the document. Functions
+and variables defined at the top-most level are known to other form elements in the document.
+
+The \texttt{insDLJS} is a verbatim environment, with backslash (\verb!\!)
+and percentage (\texttt{\%}) maintaining their usual {\LaTeX} meaning.
+Commands defined in the {\LaTeX} source file, therefore, are expanded
+before the JavaScript is embedded in the PDF file. The left and right
+braces are set to normal characters, so the commands can't have any
+argument, they should be just text macros.
+
+\PD The environment takes three parameters, the first is optional, but required
+when using the Acrobat Distiller.
+\begin{description}\def\NH{\hspace{-\labelsep}}%
+\item\NH\texttt{[\meta{js\_var}]} is an
+ optional parameter \emph{was required} for the \texttt{dvipsone}
+ and \texttt{dvips} options; otherwise it is ignored. Its value
+ must be the name of one of the functions or JavaScript variables
+ defined in the environment. This is used to detect whether the
+ \textsf{DLJS} has already been loaded by Acrobat.
+
+\handpoint The \texttt{[\meta{js\_var}]} is now optional even for
+ users of \textsf{dvipsone} and \textsf{dvips}. If one is not
+ provided, then appropriate code is automatically generated.
+
+\item\NH \meta{base\_name} is an alphabetic word with no spaces and limited
+ to eight characters.\footnote{There is actually no limitation on the
+ number of characters in the name, this is a legacy statement from the
+ days of DOS, you remember DOS, don't you?} It is used to build the
+ names of auxiliary files and to build the names of macros used by the
+ environment.
+
+\item\NH\meta{script\_name} is the name of the JavaScript that you are
+ embedding in the document. This title will appear in the document
+ JavaScript dialog in Acrobat; unless you use Acrobat, you can't
+ see this name in the user interface anyway. The
+ \meta{script\_name} should be a string that is descriptive of
+ the functionality of the code.
+\end{description}
+
+\paragraph*{Commenting.} Within the \texttt{insDLJS} environment, there
+are two types of comment characters: (1) a \TeX{} comment (\verb|%|) and
+(2) a JavaScript comment. The JavaScript comments are `\texttt{//}', a
+line comment, and `\texttt{/*...*/}' for more extensive commenting. These
+comments will survive and be placed into the PDF file. In JavaScript the
+`\verb|%|' is used as well, use \verb|\%| when you want to use the percent
+character in a JavaScript statement, for example \verb|app.alert("\%.2f", 3.14159);|,
+this statement will appear within your JavaScript code as \verb|app.alert("%.2f", 3.14159);|.
+
+
+\Example The following is a minimal illustration of the use of the
+new environment. Here we assume the document author is using pdftex,
+and is not using the wonderful packages of \textsf{web},
+\textsf{exerquiz} or \textsf{eforms}. In this case, the hyperref
+package with driver in the option must be introduced first, followed
+by \textsf{insdljs} with the same driver, of course. The optional argument
+of the \texttt{insDLJS} environment is not used in this example.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage[pdftex]{hyperref}
+\usepackage[pdftex]{insdljs}
+
+\newcommand\tugHello{Welcome to TUG 2001!}
+\begin{insDLJS}{mydljs}{My Private DLJS}
+function HelloWorld() { app.alert("\tugHello", 3); }
+\end{insDLJS}
+\begin{document}
+\begin{Form} % a hyperref environment, needed for \PushButton
+% use built in form button of hyperref
+Push \PushButton[name=myButton,onclick={HelloWorld();}]{Button}
+\end{Form}
+\end{document}
+\end{Verbatim}
+\noindent The Form environment and the \cs{PushButton} command are defined
+in the hyperref package. The \textsf{insDLJS} uses the Form environment,
+the \textsf{eforms} package defines its own \cs{pushButton} command.
+
+\Example Here is the same example as above, but with \textsf{dvips} as the
+driver and using the \textsf{eforms} package, which calls
+\textsf{insdljs}. Note the use of the optional argument in the
+\texttt{insDLJS} environment, and the missing \textsf{hyperref} package
+statement and \texttt{Form} environment, the \textsf{eforms} package
+automatically inserts this code.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\documentclass{article}
+\usepackage[dvips]{eforms}
+
+\newcommand\tugHello{Welcome to TUG 2001!}
+\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
+function HelloWorld() { app.alert("\tugHello", 3); }
+\end{insDLJS}
+\begin{document}
+\pushButton[\CA{Push}\A{\JS{HelloWorld();}}]{Button}{}{11bp}
+\end{document}
+\end{Verbatim}
+
+\subsection{The \texttt{insDLJS*} Environment}
+
+The \texttt{insDLJS*} environment can be used to better organize,
+edit and debug your JavaScript. It is suitable for package
+developers who write a large amount of code package application.
+
+If you have the full Acrobat product, you can open the DLJS edit
+dialog. There you will see a listing of all DLJS contained in the
+document. When you double click on one of the \textit{script names},
+you enter the edit window, where you can edit all JavaScript
+contained under that name.
+
+\bgroup\obeyspaces%
+\settowidth{\aebdimen}{\ttfamily \anglemeta{JavaScript functions or exposed code}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\begin{insDLJS*}[!meta(js_var)]{!meta(base_name)}
+\begin{newsegment}{!meta(script_name_1)}
+ !anglemeta(JavaScript functions or exposed code)
+\end{newsegment}
+\begin{newsegment}{!meta(script_name_2)}
+ !anglemeta(JavaScript functions or exposed code)
+\end{newsegment}
+...
+...
+\begin{newsegment}{!meta(script_name_n)}
+ !anglemeta(JavaScript functions or exposed code)
+\end{newsegment}
+\end{insDLJS*}
+\end{dCmd}
+\egroup
+\PD The environment takes two parameters, the first is optional, but required
+when using the Acrobat Distiller. The nested environment \texttt{newsegment} takes
+one required parameter.
+\begin{description}\def\NH{\hspace{-\labelsep}}
+\item\NH\texttt{[\meta{js\_var}]} is an optional parameter, its use is discouraged.
+
+\item\NH\meta{base\_name} is an alphabetic word with no spaces and
+ limited to eight characters. It is used to build the names of auxiliary
+ files and to build the names of macros used by the environment.
+\item\NH\meta{script\_name\_i} is the script name (title) that appears in
+ the Document level JavaScript dialog of Acrobat.
+\end{description}
+
+\subsection{Escaping}
+
+JavaScript uses the backslash as an escape character, just as does \TeX. The insdljs pacakge
+tries to make the transition from {\TeX} to JavaScript as easy as possible. In the table below,
+is a listing of the more useful characters represented by a backslash.
+
+\begin{tabular}{ll}
+Sequence & Character represented \\
+\cs{t} & horizontal tab (\cs{u0009}) \\
+\cs{n} & newline (\cs{u000A}) \\
+\cs{r} & carriage return (\cs{u000D}) \\
+\cs{"} & double quote (\cs{u0022}) \\
+\cs{'} & apostrophe or single quote (\cs{u0027}) \\
+\verb|\\| & backslash (\cs{u005C})\\
+\cs{xXX} & the Latin-1 character specified by the two hexadecimal digits \texttt{XX} \\
+\cs{uXXXX}& the unicode character specified by the four hexadecimal digits \texttt{XXXX} \\
+\cs{XXX} & the Latin-1 character specified by the octal digits \texttt{XXX}, between \\
+ & 1 and 377. \\
+\end{tabular}
+
+\newtopic Within a JavaScript string, these special characters should be double escaped, \verb|\\|, like so:
+
+\newtopic \pushButton[\textFont{Arial}\CA{Push Me}\A{\JS{%
+ app.alert("The \\"cost\\" of this package is \\u20AC 0.\\rThis, \\"\\\\\\" is a backslash");
+}}]{demoEsc}{}{11bp}
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\pushButton[\textFont{Arial}\CA{Push Me}\A{\JS{%
+ app.alert("The \\"cost\\" of this package is \\u20AC 0.\\rThis,
+ \\"\\\\\\" is a backslash");
+}}]{demoEsc}{}{11bp}
+\end{Verbatim}
+\newtopic Note the double backslash of backslash, which comes out to four, count them four backslashes,
+`'\verb|\\\\|''.
+
+Again, both JavaScript and \TeX, certain punctuation marks have special meaning; in the case of
+JavaScript, punctuation has a special meaning within regular expressions:
+\begin{flushleft}
+\textbf{Special Punctuation in Regular Expressions}
+\begin{Verbatim}[xleftmargin=\amtIndent]
+ ^ $ . * + ? = ! : | \ / ( ) [ ] { }
+\end{Verbatim}
+\end{flushleft}
+\noindent When these occur in a regular expression, within a string, they need to be double escaped, \verb|\\|.
+Outside of a sting, they need only be escaped.
+
+\Example The following code searches through the string \texttt{str} and
+replaces every occurrence of the period character with ``\verb|\.|''.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+str = "AcroTeX rocks. AcroTeX rolls."
+str = str.replace(/\./g, "\\.");
+\end{Verbatim}
+\noindent When this code is executed, the result is
+``AcroTeX rocks\verb|\.| AcroTeX rolls\verb|\.|''.
+
+\Example If one of these special characters appears outside a
+JavaScript string, within a regular expression pattern, for example,
+they need only be escaped. The code \verb|(/\)\^\(/.test(str))|
+searches the string \texttt{str} for any occurrence of ``\verb!)^(!''
+and returns \texttt{true} if such a pattern is found, \texttt{false}
+otherwise. If \verb!str="(x+1)^(3)"!, the search returns \texttt{true}.
+
+\subsection{Access and Debugging}
+For those who do not have \textsf{Acrobat}, the application,
+unless you are writing very simple code, writing and debugging
+JavaScript will be very difficult. From the Acrobat Reader,
+there is no access to the document JavaScript. You will be
+pretty much writing blind.
+
+Normally, I develop the JavaScript from within Acrobat. The GUI editor
+does check for syntax errors, giving you a chance to correct some simple
+errors as you go. After I am satisfied with my code, I copy it from the
+editor and paste it into a \texttt{insDLJS} environment. This is how the
+JavaScript code of \textsf{exerquiz} was developed.
+
+In my opinion, if you want to develop rather complicated code, having the
+full Acrobat product is a must. (This implies that the Windows or Mac
+platform is needed!)
+
+\subsection{JavaScript References}
+
+The JavaScript used by Acrobat consists of the core JavaScript plus Acrobat's JavaScript extensions.
+The \textit{Core JavaScript Reference}~\cite{tech:NetscapeJSReference} may be found at \mlhref{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}.
+The documentation for the Acrobat extensions may be found in the guides \textit{JavaScript for Acrobat API Reference}~\cite{tech:AcroJSRef}
+and \textit{Developing Acrobat Applications using JavaScript}~\cite{tech:AcroJSGuide}, both of which I've had a hand in writing. These
+are found at \href{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center}. (Click on \textbf{JavaScript for Acrobat} in the right-hand navigation panel.)
+
+\section{Open Action}
+
+This package also defines an \cs{OpenAction} command to introduce actions that are
+executed when the PDF document is opened on page~1. The open action command only
+applies to page~1.
+\settowidth{\aebdimen}{\ttfamily\string\OpenAction\darg{\meta{action\_code}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\OpenAction{!meta(action_code)}
+\end{dCmd}
+\CmdLoc This command must appear in the preamble of the document.
+
+\CmdDescription Executes the action(s) each time page~1 is
+opened. The argument \texttt{<action\_code>} is any action subtype, as listed
+in Section 8.5.3 of the \emph{PDF Reference, sixth edition, PDF
+1.7}. Two common types are JavaScript and Named actions. The \cs{OpenAction}
+command may be repeated, which will add to the list of open actions
+to be executed at the opening of page~1.
+
+Special commands are defined in \textsf{insdljs}, \cs{JS} and \cs{Named}, that
+make it easy to specify these types of actions.
+
+\Example \verb|\OpenAction{\JS{app.alert("Hello World!");}}|
+
+\Example You can use \cs{r} and \cs{t}---carriage return and tab,
+respectively---to format multiple lines of JavaScript:
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\OpenAction{\JS{%
+ app.alert("Hello World!");\r
+ app.alert("Good Day to You!");
+}}
+\end{Verbatim}
+
+\Example Multiple \cs{OpenAction} can be entered. Code is executed in the same order.
+Here, we show an alert box with a message, then jump to the last page.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\OpenAction{\JS{app.alert("AcroTeX rocks the world!");}}
+\OpenAction{\Named{LastPage}}
+\end{Verbatim}
+
+\newtopic For the other pages, beyond page~1, \cs{thisPageAction} can be used;
+the command can also be used for page~1 as well (it must go in the
+preamble).
+
+\settowidth{\aebdimen}{\ttfamily\string\thisPageAction\darg{\meta{open\_script}}\darg{\meta{close\_script}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\thisPageAction{!meta(open_script)}{!meta(close_script)}
+\end{dCmd}
+\CmdLoc For page~1, this command must go in the preamble, otherwise, it
+goes on the page for which it is intended.
+
+\CmdDescription \meta{open\_script} is an action that is to be
+executed when the current page is opened; \meta{close\_script} is an
+action to be executed when the current page is closed.
+
+\Example Below is a simple example of how to use \cs{thisPageAction}.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+...
+\thisPageAction{\JS{console.println("Open: page 1");}}
+ {\JS{console.println("Close: page 1");}}
+\begin{document}
+page 1
+\newpage
+page 2
+\thisPageAction{\JS{console.println("Open: page 2");}}
+ {\JS{console.println("Close: page 2");}}
+...
+\end{document}
+\end{Verbatim}
+When \cs{thisPageAction} is executed in the preamble,
+the \texttt{<open\_action>} argument gets passed to
+the \cs{OpenAction} command.
+
+\section{The \textsf{execJS} Environment}
+
+This is an environment useful to PDF developers who want to tap into
+the power of JavaScript. To use this environment, the developer
+needs Acrobat~5.0 or higher. \textsf{pdftex} or \textsf{dvipdfm} can
+be used to produce the PDF document, but the developer needs
+the Acrobat product for this environment to do anything.
+
+The \texttt{execJS} is used primarily for post-distillation
+processing (post-creation processing, in the case of \textsf{pdftex}
+and \textsf{dvipdfm}). The \texttt{execJS} environment can be used,
+for example, to automatically import named icons into the document,
+which can, in turn, be used for an animation.
+
+The \textsf{execJS} is an environment in which you can write
+verbatim JavaScript code. This environment is a variation on
+\textsf{insdljs}, it writes a couple of auxiliary files to disk; in
+particular, the environment creates an \texttt{.fdf} file. When the
+newly produced PDF is loaded for the first time into the viewer
+(Acrobat, not Reader), the \texttt{.fdf} file generated
+by the \textsf{execJS} environment is imported, and the JavaScript
+executed. This JavaScript is \emph{not} saved with the document.
+The syntax of this environment is\dots
+
+\settowidth{\aebdimen}{\ttfamily\string\begin\darg{execJS}\darg{\meta{name}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\begin{execJS}{!meta(name)}
+....
+!anglemeta(JavaScript code)
+....
+\end{execJS}
+\end{dCmd}
+
+\PD The environment takes one required argument, the base name of the
+auxiliary files to be generated.
+
+Many of the more useful JavaScript methods have security restrictions,
+the developer must create folder JavaScript that can be used to \emph{raise
+the privilege} of the methods.
+
+\Example Here is an extensive example taken from the AeB Pro distribution.
+The following code is user folder JavaScript code, see the AeB Pro documentation
+on how to locate the user JavaScript folder. We define a function \texttt{aebTrustedFunctions}
+that is the interface to accessing the restricted methods.
+\begin{Verbatim}[xleftmargin=\amtIndent]
+/*
+ AEB Pro Document Assembly Methods
+ Copyright (C) 2006 AcroTeX.Net
+ D. P. Story
+ http://www.acrotex.net
+ Version 1.0
+*/
+if ( typeof aebTrustedFunctions == "undefined") {
+ aebTrustedFunctions = app.trustedFunction(
+ function ( doc, oFunction, oArgs ) {
+ app.beginPriv();
+ var retn = oFunction( oArgs, doc )
+ app.endPriv();
+ return retn;
+ });
+}
+// Add a watermark background to a document
+aebAddWatermarkFromFile = app.trustPropagatorFunction (
+ function ( oArgs, doc ) {
+ app.beginPriv();
+ return retn = doc.addWatermarkFromFile(oArgs);
+ app.endPriv();
+});
+\end{Verbatim}
+
+Once this code is installed in the user JavaScript folder, and Acrobat is re-started, the code
+is ready to be used. The way the code is used is with the \texttt{execJS} environment.
+
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\def\bgPath{"/C/acrotex/ManualBGs/Manual_AeB.pdf"}
+\begin{execJS}{execjs}
+ aebTrustedFunctions( this, aebAddWatermarkFromFile,
+ {bOnTop: false, cDIPath: \bgPath} )
+\end{execJS}
+\end{Verbatim}
+
+\newtopic This is the code used to prepare this manual. It places a
+background graphic on each page of the document. When the newly
+distilled document is first opened in Acrobat, (version 7.0 or
+higher, is when the privilege bit started to appear), the trusted
+function \texttt{aebTrustedFunctions} is executed with its
+arguments. Looking at the definition of
+\texttt{aebTrustedFunctions}, what is executed is
+\begin{Verbatim}[xleftmargin=\amtIndent]
+app.beginPriv();
+ return retn = this.addWatermarkFromFile({bOnTop: false,
+ cDIPath: "/C/acrotex/ManualBGs/Manual_AeB.pdf"});
+app.endPriv();
+\end{Verbatim}
+\newtopic AeB Pro, the {Acro\!\TeX} Presentation Bundle and @EASE use these execJS techniques.
+
+\section{The \textsf{defineJS} Environment}\label{defineJS}
+
+When you create a form element (button, text field, etc.), you
+sometimes want to attach JavaScript. The \texttt{defineJS}
+environment aids you in writing your field level JavaScript. It too
+is a verbatim environment, however, this environment does not write to an auxiliary
+file, but saves the contents in a token register. The contents of
+the register are used in defining a macro that expands to the
+verbatim listing.
+
+\settowidth{\aebdimen}{\ttfamily\string\begin\darg{defineJS}[\anglemeta{tex/latex\_cmds}]\darg{\meta{Cmd}}}
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+\begin{defineJS}[!anglemeta(tex/latex_cmds)]{!meta(Cmd)}
+...
+!anglemeta(JavaScript code)
+...
+\end{defineJS}
+\end{dCmd}
+
+\PD The \texttt{defineJS} environment takes two parameters, the
+first optional. the required parameter is the command name to be
+defined. Use the optional first parameter to modify the verbatim
+environment, as illustrated in the example below. The
+\texttt{defineJS} is a complete verbatim environment: no escape, and
+no comment characters are defined. You can use the optional
+parameter to create an escape character. You can pretty much use
+any character you wish, \emph{except} the usual one `\verb+\+',
+backslash.
+
+\Example The following example illustrates the usage of the \texttt{defineJS} environment.
+\begin{dCmd*}{.67\linewidth}
+% Make @ the escape so we can
+% demonstrate the optional parameter.
+\def\HelloWorld{Hello World!}
+\begin{defineJS}[\catcode`\@=0\relax]{\JSA}
+var sum = 0;
+for (var i = 0; i < 10; i++)
+{
+ sum += i;
+ console.println("@HelloWorld i = " + i );
+}
+console.println("sum = "+sum);
+\end{defineJS}
+\begin{defineJS}{\JSAAE}
+console.println("Enter the button area");
+\end{defineJS}
+\begin{defineJS}{\JSAAX}
+console.println("Exiting the button area");
+\end{defineJS}
+\pushButton[\A {\JS{\JSA}}
+ \AA{\AAMouseEnter{\JS{\JSAAE}}
+ \AAMouseExit{\JS{\JSAAX}}}
+]{myButton}{30bp}{15bp}
+\end{dCmd*}
+\newtopic The code of \cs{JSAAE} and \cs{JSAAX} are so simple, the \texttt{defineJS} environment
+was really not needed. A simple \cs{newcommand} definition would have been sufficient.
+
+\newtopic See \Nameref{lengthyJS} for an additional example of the use of the \texttt{defineJS} environment.
+
+\newpage
+%\appendix
+\markright{Appendix}
+\part{Appendices}\label{appendix}
+%\section*{Appendix}\label{appendix}
+% \addcontentsline{toc}{section}{\protect\numberline{}Appendix}
+
+\appendixsubsection{The Annotation Flag \textsf{F}}
+%\addcontentsline{toc}{appendixsubsection}{\protect\numberline{}The Annotation Flag \textsf{F}}
+
+The annotation flag \textsf{F} is a bit field that is common to all
+annotations.
+
+\begin{center}
+\begin{tabular}{>{\small\ttfamily\bslash}l>{\small}l}
+\multicolumn{2}{>{\bfseries}l}{Annotation Flag \textsf{F}}\\\hline
+\multicolumn{1}{>{\bfseries\small}l}{\hypertarget{tableF}{Flag}} &\multicolumn{1}{>{\bfseries\small}l}{Description}\\
+FHidden & hidden field \\
+FPrint & print\\
+FNoView & no view\\
+FLock & locked field (PDF 1.4)\\
+\end{tabular}
+\end{center}
+
+\medskip\noindent
+In the user interface for Acrobat, there are four visibility
+attributes for a form field. The table below is a list of these,
+and an indication of how each visibility attribute can be attained
+through the \textsf{F}.
+
+\begin{center}
+\begin{tabular}{>{\small}l>{\small}l}
+\bfseries \hypertarget{visibility}{UI Description}&\bfseries Use\\\hline
+ Visible (and printable) & \\
+ Hidden but printable & \verb+\F{\FNoView}+\\
+ Visible but doesn't print & \verb+\F{\FNoPrint}+\\
+ Hidden (and does not print) & \verb+\F{\FHidden}+ \\
+\end{tabular}
+\end{center}
+\redpoint All fields created by the \textsf{eForm} commands are
+printable by default.
+
+
+\newpage
+
+% Field Flags /Ff
+% Choice : Pushbuttons, Checkboxes, Radio Buttons
+% Text Fields
+% Choice Fields: list box, combo box
+% Signature fields
+\appendixsubsection{Annotation Field flags \textsf{Ff}}
+%\addcontentsline{toc}{appendixsubsection}{\protect\numberline{}Annotation Field flags \textsf{Ff}}
+
+The table below lists some convenience macros for setting the \textsf{Ff} bit field.
+
+\begin{longtable}{>{\small\ttfamily\targ}l>{\small}l>{\small}l}
+\multicolumn3{>{\bfseries}c}{\hypertarget{tableFf}{Annotation Field flags} \textsf{Ff}}\\\hline
+\multicolumn1{>{\bfseries\small}l}{Flag}& \multicolumn1{>{\bfseries\small}l}{Description}&\multicolumn1{>{\bfseries\small}l}{Fields}\\
+\endfirsthead
+\multicolumn1{>{\bfseries\small}l}{Flag}& \multicolumn1{>{\bfseries\small}l}{Description}&\multicolumn1{>{\bfseries\small}l}{Fields}\\
+\endhead
+FfReadOnly? & Read only field & all \\
+FfRequired? & Required field (Submit) & all \\
+FfNoExport? & Used with Submit Action & all \\
+FfMultiline? & For Multiline text field & text\\
+FfPassword? & Password field & text \\
+FfNoToggleToOff? & Used with Radio Buttons & Radio only\\
+FfRadio? & Radio Button Flag & Radio if set\\
+FfPushButton? & Push Button Flag & Push button\\
+FfCombo? & Combo Flag & choice\\
+FfEdit? & Edit/NoEdit & combo\\
+FfSort? & Sort List & choice\\
+FfFileSelect? & File Select (PDF 1.4) & text\\
+FfMultiSelect? & multiple select (PDF 1.4) & choice\\
+FfDoNotSpellCheck? & Do not spell check (PDF 1.4) & text, combo\\
+FfDoNotScroll? & do not scroll (PDF 1.4) & text\\
+FfComb? & comb field (PDF 1.5) & text\\
+FfRadiosInUnison? & radios in unison (PDF 1.5) & radio\\
+FfCommitOnSelChange? & commit on change (PDF 1.5) & choice\\
+FfRichText? & rich text (PDF 1.5) & text\\
+\end{longtable}
+
+\newpage
+
+\appendixsubsection{Supported Key Variables}
+%\addcontentsline{toc}{appendixsubsection}{\protect\numberline{}Supported Key Variables}
+
+Below is a list of the keys supported for modifying the appearance
+or for creating an action of a field. If the default value of a
+key is empty, e.g., \verb+\Ff{}+, then that key does not appear in
+the widget. The Acrobat viewer may have a default when any
+particular key does not appear, e.g. \verb+\W{}+ will be
+interpreted as \verb+\W{1}+ by the viewer.
+
+\newtopic In the past, the value of the \Cs{textColor} key must include the color model specification:
+\begin{itemize}
+\item \texttt{g} (for gray scale): a single number between 0 and 1; example, \verb!\textColor{.5 g}!
+\item \texttt{rg}: Red Green Blue: a list of three numbers between 0 and 1 giving the components of color; for example \verb!\textColor{.1 .2 .3 rg}!
+\item \texttt{k} Cyan Magenta Yellow [K]Black: a list of four numbers between 0 and 1 giving the components of the color according to the subtractive model used in most printers; for example \verb!\textColor{.1 .2 .3 .4 k}!
+\end{itemize}
+In this current version of \textsf{eforms}, the color model can be optionally included. The \textsf{eforms} package will supply the correct specification as a function of the number of arguments provided. Thus, the examples above can now be written as \verb!\textColor{.5}!, \verb!\textColor{.1 .2 .3}!, and \verb!\textColor{.1 .2 .3 .4}!.
+
+\newtopic\textbf{\textcolor{red}{Note:}} Regarding the keys \Cs{textColor}, \Cs{BG}, \Cs{BC}, and \cs{Color}\footnote{Information regarding the \cs{Color}
+key may be found in \hyperref[linkAnnots]{Section~\ref*{linkAnnots}},
+page~\pageref*{linkAnnots}. The \cs{Color} key is more fully documented in
+the rather comprehensive article
+\textsl{\href{http://www.math.uakron.edu/~dpstory/aebblog/aeb_links.pdf}{Support
+for Links in AeB/eForms}} posted on the
+\href{\urlAcroTeXBlog}{AeB Blog}.},
+beginning with \textsf{eforms} dated 2010/07/23 or later, \textsf{eforms}
+now uses the \textsf{hycolor} package to process all color keys (listed
+above); consequently, if the \textsf{xcolor} package is also loaded on
+your system, you can use \emph{named colors} to specify color for the
+\textsf{eforms} keys. For example, if the definition was made
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\definecolor{myBlue}{rgb}{0.24,0.38,0.68}
+\end{Verbatim}
+then each of the following is valid: \verb!\textColor{myBlue}! (for specifying text color for text fields), \verb!\BG{myBlue}! (for specifying the background color of a field), \verb!\BC{myBlue}! (for specifying the border color of a field), and \verb!\Color{myBlue}! (for specifying the border color of a link).
+
+\newpage
+\begingroup
+\setlength{\extrarowheight}{3mm}\setlength{\tabcolsep}{3pt}
+
+\begin{longtable}{>{\small\ttfamily\targ}l>{\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
+\multicolumn1{>{\bfseries\small}l}{Key}& \multicolumn1{>{\bfseries\small}l}{Description}&\multicolumn1{>{\bfseries\small}l}{Default}\\\hline
+\endhead
+%----------------------------------------------------------------
+\multicolumn{3}{l}{\color{blue}Entries common to all annotations:}\\
+F? & See the \hyperlink{tableF}{annotation \textsf{F} flag Table} &\verb+\F{}+\\
+\multicolumn{3}{>{\small\bfseries}l}{Border Style Dictionary (BS)}\\
+W? & Width in points around the boundary of the field,
+ for example, \verb+\W{1}+. &\verb+\W{}+\newline (same as \verb+\W{1})+\\
+S? & Line style, values are \texttt{S} (solid), \texttt{D} (dashed),
+ \texttt{B} (beveled), \texttt{I} (inset), \texttt{U} (underlined); \verb+\S{B}+ &\verb+\S{}+\\
+AA? & Additional actions, a dictionary. These actions are triggers by mouse up, mouse down,
+ mouse enter, mouse exit, on focus, on blur events; for text and editable combo boxes there is also
+ the format, keystroke, validate and calculate events. The various triggers are discussed in
+ \nameref{triggers}.
+ & \verb+\AA{}+ \newline(no actions)\\
+A? & Action dictionary, use this to define JavaScript actions, as well as other actions,
+ for mouse up events. See \nameref{triggers} for a discussion of the mouse up event.
+ & \verb+\A{}+\newline(no action)\\
+Border? & Used with link annotations, an array of three numbers and an optional dash array.
+ If all three numbers are 0, no border is drawn &\verb+\Border{0 0 0}+\newline (no border)\\
+AP? & Appearance dictionary, used mostly in {\AcroT} with check boxes
+ to define the `On' value. &\verb+\AP{}+\\
+AS? & Appearance state, normally used with check boxes and radio buttons when there are
+ more than one appearance. Advanced techniques only. &\verb+\AS{}+\\\hline
+%--------------------------------------------------------------
+\multicolumn{3}{l}{\color{blue}Entries common to all fields:}\\
+TU? & Tool tip (PDF 1.3), for example, \verb+\TU{Address}+. Obeys \texttt{unicode} option.&\verb+\TU{}+\\
+Ff? & See the \hyperlink{tableFf}{Field flag \textsf{Ff} table}; e.g. \verb+\Ff{\FfReadOnly}+
+ makes the field read only. & \verb+\Ff{}+\\
+DV? & Default value of a field. This is the value that appears when the field is reset;
+ e.g., \verb+\DV{Name:}+. Obeys \texttt{unicode} option.&\verb+\DV{}+\\
+V? & Current value of the field; for example, \verb+\V{D. P. Story}+. Obeys \texttt{unicode} option.&\verb+\V{}+\\\hline
+%--------------------------------------------------------------
+\multicolumn{3}{l}{\color{blue}Entries specific to a widget annotation:}\\
+H? & Highlight, used in button fields and link annotations. Possible values
+ are \texttt{N} (None), \texttt{P} (Push), \texttt{O} (Outline), \texttt{I} (Invert); e.g.,
+ \verb+\H{P}+.&\verb+\H{}+\newline(same as \verb+\H{I}+)\\
+%\pagebreak
+\multicolumn{3}{>{\small\bfseries}l}{Appearance Characteristics Dictionary (MK)}\\
+MK?& A dictionary that contains the keys listed below. For all fields
+ the \texttt{MK} has a template that is filled in using the keys below; this key
+ is available only for check boxes and radio buttons. & various\\
+R? & Number of degrees the field is to be rotated counterclockwise.
+ Must be a multiple of 90 degrees; \verb+\R{90}+.&\verb+\R{}+\\
+BC?& The boundary color, a list of 0 (transparent), 1 (gray), 3 (RGB) or 4 (CMYK)
+ numbers between 0 and 1. For example, \verb+\BC{1 0 0}+ is a red border.
+ &\verb+\BC{}+\newline(transparent)\\
+BG?& Background color. Color specification same as \cs{BC}&\verb+\BG{}+\newline(transparent)\\
+CA?& Button fields (push, check, radio) The widget's normal caption; e.g. \verb+\CA{Push}+,
+ in the case of a push button. For check boxes and radio, the value of
+ \cs{CA} is a code that indicates whether a check, circle, square, star, etc.
+ is used. These codes are introduced through \cs{symbolchoice}. Obeys \texttt{unicode} option.&\verb+\CA{}+\\
+RC?& Push button fields only. The roll over text caption. Obeys \texttt{unicode} option.&\verb+\RC{}+\\
+AC?& Push button fields only. The down button caption. Obeys \texttt{unicode} option.&\verb+\AC{}+\\
+mkIns?& A variable for introducing into the \texttt{MK} dictionary any other key-value pairs not listed above.
+ 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),
+ \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}
+ (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
+ 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
+ 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
+%--------------------------------------------------------------
+%\pagebreak
+\multicolumn{3}{l}{\color{blue}Entries common to fields containing variable text:}\\
+Q? & 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
+%------------------------------------------------------------------
+%\pagebreak
+\multicolumn{3}{l}{\color{blue}Entries specific to text fields:}\\
+MaxLen? & 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
+%------------------------------------------------------------------
+\multicolumn{3}{l}{\color{blue}Entries specific to signature fields:}\\
+Lock? & This key is used to lock fields after the signature field is
+ signed. Example, \verb+\Lock{/Actions/All}+. See
+ \autoref{sigfields}, page~\pageref*{sigfields} for more examples.
+ &\verb+\Lock{}+\\\hline
+%-------------------------------------------------------------------
+%\pagebreak
+\multicolumn{3}{l}{\color{blue}Specialized, non-PDF Spec, commands:}\\
+rawPDF? & 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
+ placement of the field. Say \verb+\autoCenter{n}+ to
+ turn this off.&\\
+presets? & 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
+ 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
+ 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}+
+\end{longtable}
+\endgroup
+
+%The JavaScript used by Acrobat consists of the core JavaScript plus Acrobat's JavaScript extensions.
+%Core JavaScript can be found at \href{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}.\footnote
+%{\url{http://developer.mozilla.org/en/docs/JavaScript}}
+%and documentation of the Acrobat extensions can be found in the guides \texttt{JavaScript for Acrobat API Reference}
+%and \emph{Developing Acrobat Applications using JavaScript}, both of which I've had a hand in writing. These
+%can be found at the \href{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center},\footnote
+%{\url{http://www.adobe.com/devnet/acrobat/}}. Click on \textbf{JavaScript for Acrobat} in the right-hand navigation panel.
+
+
+\newpage
+\markright{References}
+
+\begin{thebibliography}{[1]}\label{references}
+\addcontentsline{toc}{section}{\protect\numberline{}References}
+
+\bibitem{tech:NetscapeJSGuide}
+ \textit{Core JavaScript Guide}, available from \href{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}.
+
+\bibitem{tech:NetscapeJSReference}
+ \textit{Core JavaScript Reference} available from \href{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}.
+
+\bibitem{tech:AcroJSGuide}
+ \textit{Developing Acrobat Applications using JavaScript}, available from
+ \mlhref{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center}
+
+\bibitem{tech:AcroJSRef}\hypertarget{references}{}%
+ \textit{JavaScript for Acrobat API Reference},available from
+ \href{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center}
+
+
+\bibitem{tech:PDFRef}
+ \textit{PDF Reference, sixth edition, PDF 1.7}, available from
+ \href{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center}
+
+\end{thebibliography}
+
+\end{document}
+
+
+\def\@eqautoCenter#1{\let\autoCenter=#1}
+\let\autoCenter=y
+\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
+}
+\def\eq@protect#1{\let#1=\@empty}
+
+
+% \begin{localJS}
+% \begin{defineJS}{\validateJS}
+% if (event.value > 1000 || event.value < -1000) {
+% app.alert("Invalid value, rejecting your value!");
+% event.rc = false;
+% }
+% \end{defineJS}
+% \textField[\AA{
+% \AAKeystroke{AFNumber_Keystroke(2, 0, 1, 0, "\\u0024", true);}
+% \AAFormat{AFNumber_Format(2, 0, 1, 0, "\\u0024", true);}
+% \AAValidate{\validateJS}}]{myTexta}{1.5in}{12bp}
+% \end{localJS}
+
+% \textField[\AA{
+% \AAKeystroke{AFNumber_Keystroke(2, 0, 1, 0, "\\u0024", true);}
+% \AAFormat{AFNumber_Format(2, 0, 1, 0, "\\u0024", true);}
+% \AAValidate{%
+% if (event.value > 1000 || event.value < -1000) {\r\t
+% app.alert("Invalid value, rejecting your value!");\r\t
+% event.rc = false;\r
+% }
+% }
+% }]{myTexta}{1.5in}{12bp}
+
+9.0:Close|GeneralInfo|Quit|FirstPage|PrevPage|NextPage|LastPage|ActualSize|FitPage|FitWidth|FitHeight|SinglePage|OneColumn|TwoPages|TwoColumns|ZoomViewIn|ZoomViewOut|ShowHideBookmarks|ShowHideThumbnails|Print|GoToPage|ZoomTo|GeneralPrefs|SaveAs|FullScreen|OpenOrganizer|Scan|Web2PDF:OpnURL|AcroSendMail:SendMail|Spelling:CheckSpelling|PageSetup|Find|FindSearch|GoBack|GoForward|FitVisible| ShowHideToolbarCommenting|ShowHideToolbarEdit|ShowHideToolbarFile|ShowHideToolbarFind|ShowHideToolbarForms|ShowHideToolbarMeasuring|ShowHideToolbarData|ShowHideToolbarPageDisplay|ShowHideToolbarNavigation|ShowHideToolbarPrintProduction|ShowHideToolbarRedaction|ShowHideToolbarBasicTools|ShowHideToolbarTasks|ShowHideToolbarTypewriter|PropertyToolbar|ShowHideArticles|ShowHideFileAttachment|ShowHideAnnotManager|ShowHideFields|ShowHideOptCont|ShowHideModelTree|ShowHideSignatures|InsertPages|ExtractPages|ReplacePages|DeletePages|CropPages|RotatePages|AddFileAttachment|FindCurrentBookmark|BookmarkShowLocation|GoBackDoc|GoForward |DocHelpUserGuide|HelpReader|rolReadPage|HandMenuItem|ZoomDragMenuItem|ShowHideToolbarEditing|Annots:Tool:InkMenuItem
+9.2:Close|GeneralInfo|Quit|FirstPage|PrevPage|NextPage|LastPage|ActualSize|FitPage|FitWidth|FitHeight|SinglePage|OneColumn|TwoPages|TwoColumns|ZoomViewIn|ZoomViewOut|ShowHideBookmarks|ShowHideThumbnails|Print|GoToPage|ZoomTo|GeneralPrefs|SaveAs|FullScreen|OpenOrganizer|Scan|Web2PDF:OpnURL|AcroSendMail:SendMail|Spelling:CheckSpelling|PageSetup|Find|FindSearch|GoBack|GoForward|FitVisible|ShowHideToolbarEditing|ShowHideToolbarCommenting|ShowHideToolbarEdit|ShowHideToolbarFile|ShowHideToolbarFind|ShowHideToolbarForms|ShowHideToolbarMeasuring|ShowHideToolbarData|ShowHideToolbarPageDisplay|ShowHideToolbarNavigation|ShowHideToolbarPrintProduction|ShowHideToolbarRedaction|ShowHideToolbarBasicTools|ShowHideToolbarTasks|ShowHideToolbarTypewriter|PropertyToolbar|ShowHideArticles|ShowHideFileAttachment|ShowHideAnnotManager|ShowHideFields|ShowHideOptCont|ShowHideModelTree|ShowHideSignatures|InsertPages|ExtractPages|ReplacePages|DeletePages|CropPages|RotatePages|AddFileAttachment|FindCurrentBookmark|BookmarkShowLocation|GoBackDoc|GoForwardDoc|DocHelpUserGuide|HelpReader|rolReadPage|HandMenuItem|ZoomDragMenuItem| Annots:Tool:InkMenuItem|CollectionHome|CollectionDetails|CollectionPreview|CollectionShowRoot
diff --git a/texmf-dist/source/latex/acrotex/eforms.dtx b/texmf-dist/source/latex/acrotex/eforms.dtx
new file mode 100644
index 00000000..7f949e23
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/eforms.dtx
@@ -0,0 +1,3994 @@
+% \iffalse
+% makeindex -s gglo.ist -o eforms.gls eforms.glo
+% makeindex -s gind.ist -o eforms.ind eforms.idx
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% eForms package, %%
+%% Copyright (C) 2002-2017 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%</copyright>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{eforms}
+%<package> [2017/02/27 v2.9l Provides general eforms support (dps)]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12] % to support calculate for pdfyrc
+\pdfstringdefDisableCommands{\let\\\textbackslash}
+\OnlyDescription
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\def\ltag{<}\def\rtag{>}
+\let\app\textsf\let\pkg\textsf
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{eforms}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro} \let\setupFullwidth\relax
+ \PackageInfo{eforms}{aebdocfmt.def cannot be found}}
+\begin{document}
+ \GetFileInfo{eforms.sty}
+ \title{eForm: PDF Form support for \LaTeX}
+ \author{D. P. Story\\
+ Email: \texttt{dpstory@uakron.edu}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \let\Email\texttt
+ \DocInput{eforms.dtx}
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\PrintIndex}{\paragraph*{Index} The index goes here.\\Execute
+ \texttt{makeindex -s gind.ist -o eforms.ind eforms.idx} on the command line and recompile
+ \texttt{eforms.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.\\Execute
+ \texttt{makeindex -s gglo.ist -o eforms.gls eforms.glo} on the command line and recompile
+ \texttt{eforms.dtx}.}
+\end{document}
+%</driver>
+% \fi
+%
+% \MakeShortVerb{|}
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{eforms}{Inputting aebdonotindex.def}}
+% {\PackageInfo{eforms}{aebdonotindex.def cannot be found}}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% \section{Introduction}
+%
+% This {\LaTeX} code was originally part of the \textsf{exerquiz} package.
+% I decided it would be useful to others if I separated the two and make
+% the forms part of \textsf{exerquiz} into a separate package. The
+% \textsf{eforms} Package is now a part of the \textsf{{Acro\TeX} eDucation
+% Bundle} and is called by \textsf{exerquiz}, but it is now a stand alone
+% package for others who may want to use PDF form fields and JavaScript
+% interactivity.
+%
+% \section{Package Options}
+%
+% The package options consist mostly of driver options.
+%
+% \subsection{Driver Options}
+%
+% The \textsf{web} package passes these driver options to \textsf{exerquiz}.
+% These options are needed is \textsf{exerquiz} is used without
+% \textsf{web}; in this case, the options below must explicitly included.
+% Set the driver dependent code for the |quiz| environments.
+%
+% \changes{v2.5o}{2012/06/18}{Added required package \string\textsf{ifpdf}}
+% \begin{macrocode}
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+% \end{macrocode}
+% \changes{v2.6c}{2014/02/18}{Added the \string\textsf{calc} package as required package.}
+% \begin{macrocode}
+\RequirePackage{calc}
+% \end{macrocode}
+% Set the driver for \texttt{dvipsone}\IndexOpt{dvipsone}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Set the driver for \texttt{dvips}\IndexOpt{dvips}
+% \begin{macrocode}
+\DeclareOption{dvips}{\def\eq@drivernum{0}%
+ \def\eq@drivername{1}\def\ef@driver{dvips}%
+ \PassOptionsToPackage{dvips}{insdljs}%
+ \PassOptionsToPackage{dvips}{hyperref}%
+}
+% \end{macrocode}
+% Set the driver for \texttt{pdftex}\IndexOpt{pdftex}
+% \begin{macrocode}
+\DeclareOption{pdftex}{%
+ \def\eq@drivernum{1}\def\eq@driver{pdftex}%
+ \def\eq@drivercode{epdftex.def}\def\ef@driver{pdftex}%
+% \end{macrocode}
+% \changes{v2.9b}{2016/07/22}{Do not pass pdftex driver to insdljs or hyperref}
+% \begin{macrocode}
+% \PassOptionsToPackage{pdftex}{insdljs}
+% \PassOptionsToPackage{pdftex}{hyperref}
+}
+% \end{macrocode}%
+% Set the drivers for \texttt{dvipdfm}\IndexOpt{dvipdfm}. \texttt{dvipdfmx}\IndexOpt{dvipdfmx},
+% and \texttt{xetex}\IndexOpt{xetex}.
+% \begin{macrocode}
+\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}%
+% \end{macrocode}
+% \changes{v2.9b}{2016/07/22}{Do not pass xetex driver to insdljs or hyperref}
+% \begin{macrocode}
+% \PassOptionsToPackage{xetex}{insdljs}
+% \PassOptionsToPackage{xetex}{hyperref}
+}
+% \end{macrocode}
+% \IndexOpt{textures}
+% This option, and testing are due to Ross Moore 3/6/02
+% \begin{macrocode}
+\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}
+}
+% \end{macrocode}
+% If no driver is passed, assume it is
+% \textsf{dvipsone} or \textsf{dvips}---\textsf{hyperref} defines the specials.
+% Default driver dvipsone/dvips
+% \begin{macrocode}
+% \def\eq@drivernum{0}
+\def\eq@driver{dvipsone/dvips}
+\def\eq@drivercode{epdfmark.def}
+% \end{macrocode}
+%
+% \subsection{Other Options}
+%
+% The \texttt{preview}\IndexOpt{preview} option displays the bounding box of each form field with a frame box.
+% Useful for laying out field with a dvi previewer.
+% \changes{v2.5n}{2012/04/30}{Changed \string\cs{ifpreview} to a conditional
+% definition; this allows the \string\textsf{spdef} package to control the state
+% of \cs{ifpreview}.}
+% \begin{macrocode}
+\DeclareOption{preview}{\previewtrue}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{insdljs}}
+\@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}}
+% \begin{macrocode}
+\providecommand{\previewOn}{\previewtrue}
+\providecommand{\previewOff}{\previewfalse}
+% \end{macrocode}
+% Use\IndexOpt{useui} the \textsf{xkeyval} package to specify the options for the links and
+% forms, key-values are enclosed in the \cs{ui} command inside the option list.
+% \changes{v2.0}{2008/03/14}
+% {
+% Added the \string\texttt{useui} option, which inputs \string\textsf{xkeyval} package,
+% and defines a user-friendly interface to the option arguments.
+% }
+% \begin{macrocode}
+\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.}}}
+% \end{macrocode}
+% The \texttt{setcorder} option\IndexOpt{setcorder} is used to set the calculation order
+% in a forms document. Normally, the calculation order is the order the fields are created.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \changes{v2.5o}{2012/06/18}{Added automatic test for \string\textsf{pdftex}.}
+% \begin{macrocode}
+\@ifpackageloaded{web}{%
+ \ExecuteOptions{\eq@driver@name}%
+}{%
+ \@ifpackageloaded{exerquiz}{%
+ \ExecuteOptions{\eq@driver}%
+ }{%
+ \ifpdf\ExecuteOptions{pdftex}\else
+ \ifxetex\ExecuteOptions{xetex}\else
+ \@ifundefined{l@tex@@@@driver}{\ExecuteOptions{dvips}}
+ {\ExecuteOptions{dvipsone}}\fi\fi
+ }%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Changed \textsf{hyperref} definitions/parameters to add \texttt{1bp} rather than \texttt{1pt} around a form field
+% or link.
+% \changes{v2.9e}{2016/12/22}{Changed hyperref to add 1bp rather than 1pt}
+% \begin{macrocode}
+\ifxetex\else\ifpdf\pdflinkmargin1bp\relax\else
+ \g@addto@macro\Hy@FirstPageHook{%
+ \headerps@out{/HyperBorder {1.00375 PDFToDvips} def}}
+\fi\fi
+% \end{macrocode}
+% Changed the requirement for \textsf{insdljs}
+% \changes{v2.9a}{2016/06/09}{Change in \string\textsf{insdljs} package}
+% \changes{v2.9g}{2017/01/03}{Change in \string\textsf{insdljs} package}
+% \begin{macrocode}
+\RequirePackage{insdljs}[2017/01/03] % incl conv-xkv
+% \end{macrocode}
+% \changes{v1.0a}{2006/10/03}
+% {
+% If \string\textsf{exerquiz} is not loaded, we do an automatic begin and end of Form.
+% Also, if \string\textsf{exerquiz} is loaded, then we use the driver declared in
+% \string\textsf{exerquiz}; otherwise, we set the default to 0
+% (\string\texttt{dvipsone}/\string\texttt{dvips}).
+% }
+% If exerquiz is not loaded, we insert |\begin{Form}| and |\end{Form}|,
+% and if undefined, we set the default driver.
+% \begin{macrocode}
+\@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
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% When the \texttt{preview} option is used, draw a frame box
+% around the \textit{inner} bounding rectangle.
+% \begin{macrocode}
+%<*package>
+\@ifundefined{eq@tmpbox}{\newsavebox{\eq@tmpbox}}{}
+\@ifundefined{eq@tmpdima}{\newdimen\eq@tmpdima}{}
+\@ifundefined{eq@tmpdimb}{\newdimen\eq@tmpdimb}{}
+\newlength\ef@dimena
+% \end{macrocode}
+% (2016/12/22) Added switches \cs{ifmakeXasPD} and \cs{ifmakePDasX}, if true, the form fields created
+% by \app{xetex} (\app{pdflatex/Distiller})
+% are adjusted in dimension to conform to the fields produced by \app{pdftex}/\app{Distiller} (\app{xetex}).
+% Four convenience commands are defined, \DescribeMacro{\makeXasPDOn}\cs{makeXasPDOn},
+% \DescribeMacro{\makeXasPDOff}\cs{makeXasPDOff}, \DescribeMacro{\makePDasXDOn}\cs{makePDasXDOn}, and
+% \DescribeMacro{\makePDasXDOff}\cs{makePDasXDOff} to set the switch to true and false, respectively.
+% \changes{v2.9d}{2016/12/22}{Added switches \string\cs{ifmakeXasPD} and \string\cs{ifmakePDasX}}
+% \begin{macrocode}
+\newif\ifmakeXasPD \makeXasPDtrue % 12/22
+\newif\ifmakePDasX \makePDasXfalse
+\def\makeXasPDOn{\makeXasPDtrue\makePDasXfalse}
+\def\makeXasPDOff{\makeXasPDfalse}
+\def\makePDasXOn{\makePDasXtrue\makeXasPDfalse}
+\def\makePDasXOff{\makePDasXfalse}
+% \end{macrocode}
+% \changes{v2.8a}{2015/06/06}{Added \string\cs{previewColor}}
+% \DescribeMacro\previewColor sets the color of the preview bounding rectangle. The
+% default is black. Used mostly by the \textsf{eqexam} package with the \texttt{online}
+% option.
+% \begin{macrocode}
+\providecommand\previewColor{black}
+\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\color{\previewColor}%
+ \fbox{\parbox[b][\@tempdimb][c]{\@tempdima}{\hfill\vfill}}\else
+ \parbox[b][#2][c]{#1}{\hfill\vfill}\fi}%
+}
+\let\Bbox\ef@Bbox
+%</package>
+% \end{macrocode}
+% \section{eForms Support}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Listed below are the various types of form objects available in PDF.
+%\begin{itemize}
+% \item \hyperref[button]{Button}
+% \begin{itemize}
+% \item \hyperref[pushbutton]{Push buttons}
+% \item \hyperref[checkbox]{Check boxes}
+% \item \hyperref[radiobutton]{Radio Buttons}
+% \end{itemize}
+% \item \hyperref[textfield]{Text Fields}
+% \item \hyperref[choice]{Choice Fields}
+% \begin{itemize}
+% \item \hyperref[listbox]{list box}
+% \item \hyperref[combobox]{combo box}
+% \end{itemize}
+%\item \hyperref[sigfield]{Signature Fields}
+%\end{itemize}
+% \normalcolor
+%
+% \subsection{Process Key-Value Pairs: Main Macro}\label{procArgs}
+%
+% The following macro, \cs{processAppArgs}, is due in part to
+% Dan Luecking. He proposed a very nice modification of my original
+% macros.
+%
+% The macro \cs{processAppArgs} takes an \textit{even} number of arguments; it
+% picks off two at a time, processes them, then picks off two more. The macro is meant to
+% process the optional arguments of a form field.
+%
+% All legal arguments (see \nameref{eformvariables} for a detailed
+% listing) are of the form |\<name>{arg}|.
+% The macro takes two tokens at a time and constructs a macro
+% |\@eq<name>{arg}|. Each of the macros |\@eq<name>| must be
+% defined. Such a macro defines another macro as follows
+% |\def\eq@<name>{arg}|. For example if the user enters the token
+% pair |\RC{Users}|, \cmd{\processAppArgs} will construct
+% |\@eqRC|, with argument \verb+{arg}+, this macro will be
+% executed, which expands to \verb+\def\eq@RC{arg}+. The macro
+% \cmd{\eq@RC} may then be used within the construction of the
+% widget object.
+%
+% The macro \cs{processAppArgs} also does the addition operation for
+% \texttt{/F} and \texttt{/Ff} keys.
+% \begin{macrocode}
+\let\ef@passedArgs\@empty
+\def\processAppArgs#1#2{%
+ \ifx\end#1% if #1=\end, #2=\@nil.
+ \let\ef@next\relax
+ \else
+% \end{macrocode}
+% If a token has a value of \cs{@empty} then it has been protected. It is skipped
+% and there is no user redefinition of that form field attribute allowed. Normally,
+% this is done for \cs{A} and \cs{AA} to prevent overwriting critical functionality.
+% \begin{macrocode}
+ \ifx#1\@empty
+ \def\ef@next{\processAppArgs}%
+ \else
+% \end{macrocode}
+% This is the user interface to the new optional argument of links and forms. If
+% the key is \cs{ui}, we pass its argument to |\setkeys{eforms}{#2}| to process
+% the key values of \textsf{xkeyval} style. If one of the keys is \texttt{annotflags} or
+% \texttt{fieldflags}, we pass those back to this stream to be analyzed the special cases
+% that follow for |\F| and |\Ff|.
+% \begin{macrocode}
+ \@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
+% \end{macrocode}
+% If current key is |\Ff|, we add its value to the current value of |\Ff|.
+% We basically are `or-ing' the new value with the old value in the bit field.
+% \begin{macrocode}
+ \@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
+% \end{macrocode}
+% If current key is |\F|, we add its value to the current value of |\F|.
+% We basically are ```or-ing'' new value with the old value in the bit field.
+% \begin{macrocode}
+ \@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
+% \end{macrocode}
+% If the key we are processing is \cs{presets}, then use \cs{expandafter} to
+% expand its argument (it is assumed the argument is a macro), then put it back
+% into the input stream.
+% \begin{macrocode}
+ \@getCmdName{\presets}%
+ \edef\arg@presets{\@CmdName}\@getCmdName{#1}%
+ \ifx\arg@presets\@CmdName
+ \def\ef@next{\expandafter\processAppArgs#2}%
+ \else
+% \end{macrocode}
+% This is the last, and the most frequent case. We process a common key, one
+% that is not |\presets|, |\ui|, |\Ff| or |\F|.
+% \begin{macrocode}
+ \csname @eq%
+ \expandafter\@gobble\string#1\endcsname{#2}%
+ \def\ef@next{\processAppArgs}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \ef@next
+}
+% \end{macrocode}
+% Process the field defaults and the `every' changes. Build up the required command
+% in a token list, then execute.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% \begin{macrocode}
+\newdimen\eqcenterWidget
+% \end{macrocode}
+% This macro is used to vertically center text fields and buttons on a
+% line. Seems to work well.
+% \changes{v2.5h}{2012/11/17}{Introduce the \string\cs{inline} key designed for
+% inline form fields.}
+% \begin{macrocode}
+\def\centerWidget#1{%
+ \ifeq@inlineCenter
+% \end{macrocode}
+% Inline form field, do a better job at centering it.
+% \begin{macrocode}
+ \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
+}
+% \end{macrocode}
+% \subsection{eForm Variables}\label{eformvariables}
+%
+% \subsubsection{Key-Value Definitions}
+%
+% The following definitions are used in various field templates.
+% Some convenience macros to help define the button attributes. The default
+% values are defined within the button macros themselves. Use these macros
+% within the optional argument of buttons and text fields to modify their
+% appearance.
+%
+% You'll notice, for example, the macros listed are not actually defined. For example
+% \cmd{\CA} is never actually defined; we define instead \cmd{\@eqCA} and \cmd{\eq@CA}.
+% The macros \cmd{\processAppArgs} treats \cmd{\CA} as a token, and prefixes with
+% \texttt{@eq} in a clever sort of way. It's done so that these macros cannot be used
+% outside the optional macro arguments of the button and text field macros.
+%
+% \paragraph*{Entries common to all annotation dictionaries:}
+% \texttt{F, BS, Border, AP, AS, T, A, AA}.
+%
+% \medskip\noindent\textsl{Annotation Flag Bit Field:} See \nameref{F} for values.
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\BS}The \textbf{Border Style} key, \texttt{BS}: \texttt{W}, \texttt{S}, \texttt{D} (dictionary, optional)
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \changes{v1.0e}{2008/03/04}
+% {
+% Added a \string\cs{presets} key to make it easier to dynamically change options%
+% }
+%
+% \noindent\DescribeMacro{\presets} We define the \texttt{presets} key. The argument of presets is a macro, that is
+% expanded and put back into the parsing stream.
+% \begin{macrocode}
+\def\@eqpresets#1{#1}%
+% \end{macrocode}
+% \DescribeMacro{\W} The width of the boundary line.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% (2016/12/22) Add a global value for boundary width, used to adjust the spacing between form fields
+% \changes{v2.9d}{2016/12/22}{Add a global value for boundary width}
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% \DescribeMacro{\S} Line style, values are \texttt{S} (solid), \texttt{D} (dashed),
+% \texttt{B} (beveled), \texttt{I} (inset), \texttt{U} (underlined)
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\D} The dash array.
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\Border} Used with \emph{link annotations}, an array of three numbers and an optional dash array.
+% If all three numbers are 0, no border is drawn
+% \begin{macrocode}
+\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]}
+% \end{macrocode}
+% \DescribeMacro{\AP} Appearance dictionary, used mostly with check boxes
+% to define the `On' value.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% In the \texttt{AP} dictionary for checkboxes is the `On' value.
+% It is introduced into \texttt{AP} by passing a TeX parameter
+% normally, this variable is not used.
+% \begin{macrocode}
+ \def\@eqOn#1{\def\eq@On{/#1}}\def\eq@On{/Yes}
+% \end{macrocode}
+% \DescribeMacro{\AS} Appearance state, normally used with check boxes and radio buttons when there are
+% more than one appearance. Advanced techniques only.
+% \begin{macrocode}
+\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\eq@setAS#1{\ifx\annot@type\annot@type@checkbox\@eqAS{#1}\else
+% \ifx\annot@type\annot@type@radio\@eqAS{#1}\fi\fi}
+% \end{macrocode}
+% \paragraph*{The A Dictionary.} In the \texttt{A} dictionary for actions.
+%\changes{v2.5a}{2009/12/22}
+%{%
+% Added special commands for processing the optional argument
+% for links. We search for keys words in order to set the
+% correct link color. \string\cs{ef@preprocessA} was defined to
+% execute these search routines, this is introduced
+% for in \string\cs{@eqA} (for \string\cs{rPage}). For links and
+% buttons, the command \string\cs{ef@preProcDefns} is also
+% inserted.
+%}
+% Added special commands for processing the optional argument
+% for links. We search for keys words in order to set the
+% correct link color. \cs{ef@preprocessA} was defined to
+% execute these search routines, this is introduced
+% for in \cs{@eqA} (for \cs{rPage}). For links and
+% buttons, the command \cs{ef@preProcDefns} is also
+% inserted.
+% \begin{macrocode}
+\def\ef@gobbleToendmarker#1\ef@endmarker{}
+\let\ef@endmarker\relax
+% \end{macrocode}
+% \textsf{eform} definitions of \texttt{true} and \texttt{false}, used in the search
+% algorithm.
+% \begin{macrocode}
+\def\ef@end{\end}\def\ef@true{true}
+% \end{macrocode}
+% This is the internal definition of |rPage|, a command is used
+% in the destination array and the \texttt{GoToR} action. When
+% we jump to page number, the number must be zero-based, so we
+% take the number provided by the author (1-based), descrement
+% by one, and re-define |rPage|.
+% \begin{macrocode}
+\def\ef@rPage#1{\@tempcnta=#1\relax\advance\@tempcnta-1
+ \edef\rPage##1{\the\@tempcnta}}
+% \end{macrocode}
+% We search for |\rPage| in the argument of |\eq@A|, get the page
+% number and decrement it.
+% \begin{macrocode}
+\long\def\ef@searchrPage#1\rPage#2#3\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\else\rPage{#2}\fi}
+% \end{macrocode}
+% When the user specifies |\mlLink{true}| in the option list, we branch off to
+% \cs{mlhypertext}.
+% \begin{macrocode}
+\def\ef@searchmlLink#1\mlLink#2#3\@nil{\def\ef@argii{#2}%
+ \ifx\ef@argii\ef@end\let\ef@mlLink=0\else
+ \ifx\ef@argii\ef@true\let\ef@mlLink=1\else\let\ef@mlLink=0\fi\fi}
+% \end{macrocode}
+% Search for \texttt{/GoToR}, if found, change the link color to |\@filecolor|
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Search for \texttt{/URI}, if found, change the link color to |\@urlcolor|
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Search for \texttt{/Named}, if found, change the link color to |\@menucolor|
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Search for \texttt{/Launch}, if found, change the link color to |\@runcolor|
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Executed by |\eq@A|, which calls the search routines defined above, at least
+% in the case of links. It also searches for |\rPage|.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% \DescribeMacro{\A} This is the \emph{action dictionary} (used by links and forms). If the argument
+% is empty, we do nothing, otherwise, we call |\ef@preprocessA|, then define
+% the \texttt{/A <<...>>} dictionary.
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\mlLink} This is a key for the \cs{setLink} command. If
+% we say \verb!\mlLink{true}! in the \cs{setLink} option list, we use
+% \cs{mlhypertext} from \texttt{aeb\_mlink}, if that package is loaded.
+% \begin{macrocode}
+\def\@eqmlLink#1{\def\eq@arg{#1}\ifx\eq@arg\ef@true
+ \let\ef@mlLink=1\else\let\ef@mlLink=0\fi}
+% \end{macrocode}
+% \DescribeMacro{\Lock} The Lock key is used with signature fields, currently, there is
+% no nice user interface to this key. Typical entries are
+%\begin{verbatim}
+% \Lock{/Action/All} % all fields in the doc
+% \Lock{/Action/Include % include all fields listed in Fields
+% /Fields [(field1)(field2)...]}
+% \Lock{/Action/Exclude % exclude all fields listed in Fields
+% /Fields [(field1)(field2)...]}
+%\end{verbatim}
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+%\paragraph*{Additional Actions.}
+% We search for \cs{AACalculate}.
+% The \cs{ef@searchCalc} searches for \cs{AACalculate}. If, for some reason,
+% \cs{AA\-Cal\-cu\-late} is within a pair of braces, this search will not find it,
+% so don't group \cs{AACalculate} within braces, there is no reason to do so
+% anyway. If we find \cs{AACalculate}, we set \cs{isCalculate} to \texttt{true}, which is normally
+% \texttt{false}.
+% \begin{macrocode}
+\newif\ifisCalculate\isCalculatefalse
+\def\ef@searchCalc#1\AACalculate#2\@nil{%
+ \ifx#2\end\else\aftergroup\isCalculatetrue\fi
+}
+% \end{macrocode}
+% \DescribeMacro{\AA} (02/06/09) The argument of \cs{@eqAA} is nonempty, we search for the token \cs{AACalculate}
+% if found, we set \cs{ifisCalculate} to \texttt{true}. When the document author
+% uses the \cs{ui}, the key \cs{AA} is not used, so this change does not affect
+% this option. The user interface populates \cs{eq@AA} with a series of commands
+% that are either empty or expand to the correct code.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Begin some additional action definitions for the user interface option
+% \begin{macrocode}
+\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>>}
+% \end{macrocode}
+% \begin{macro}{AAmouseup}
+% \begin{macro}{AAmousedown}
+% \begin{macro}{AAmouseenter}
+% \begin{macro}{AAmouseexit}
+% \begin{macro}{AAonfocus}
+% \begin{macro}{AAonblur}
+% These keys are generated internally and put into the parsing stream when
+% the uses specifies actions using the user interface (|\ui|).
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \begin{macro}{AAformat}
+% \begin{macro}{AAkeystroke}
+% \begin{macro}{AAvalidate}
+% \begin{macro}{AAcalculate}
+% Formatting, keystroke, validate, calculate tabs.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \begin{macro}{AApageopen}
+% \begin{macro}{AApageclose}
+% \begin{macro}{AApagevisible}
+% \begin{macro}{AApageinvisible}
+% Page related additional actions.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% This ends the definitions use by the user interface option for additional actions.
+%
+% \paragraph*{Additional entries common to fields containing variable text:} \texttt{DR, DA, Q,
+% DS, RV}.
+% \begin{macrocode}
+% \end{macrocode}
+% \DescribeMacro{\DA} Default appearance (required)
+% \begin{macrocode}
+\def\@eqDA#1{\def\eq@DA{#1}}
+\def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
+% \end{macrocode}
+% \DescribeMacro{\textFont} PDF form font
+% \begin{macrocode}
+\def\@eqtextFont#1{\def\eq@textFont{/#1}}
+\def\eq@textFont{/Helv}
+% \end{macrocode}
+% \DescribeMacro{\textSize} PDF form text size
+% \begin{macrocode}
+\def\@eqtextSize#1{\def\eq@textSize{#1}}
+\def\eq@textSizeDefault{9}
+\edef\eq@textSize{\eq@textSizeDefault}
+% \end{macrocode}
+% \DescribeMacro{\RV} Rich text value
+%\changes{v2.5l}{2011/01/28}{%
+% Wrap the \cs{RV} key in an XHTML \string\texttt{{\string\ltag}body\string\rtag} element, part of adding
+% better support for rich text strings for form fields.
+%}
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\DS} Rich text default style
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\textColor} Text color
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \DescribeMacro{\Q} Quadding for text fields: \texttt{Q=0} left-justified, \texttt{Q=1} centered
+% \texttt{Q=2} right-justified.
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \paragraph*{Entries common to all fields:} \texttt{TU, Ff, V, DV, A, AA}
+% \par\medskip\noindent
+% \DescribeMacro{\DV} The DV key sets the value of the field when the form field is reset.
+% When the unicode option is taken (\cs{ifHy@unicode is \texttt{true}},
+% we pass the argument through \cs{pdfstringdef} to get the octal encoding,
+% which is the method hyperref uses.
+% \changes{v2.7}{2014/07/08}{Removed the use of \string\cs{ifHy@unicode}, now pass all PDF text strings
+% through \cs{pdfstringdef}.}
+% \changes{v2.8a}{2015/07/12}{Added \string\cs{ef@isunicode} to automatically detect
+% unicode}
+% (2015/07/12) Added \cs{ef@isunicode} to automatically detect
+% unicode. When the first token of the argument of \cs{@eqDV}
+% and \cs{@eqV} is \cs{unicodeStr}, we bifurcate to \cs{@equDV}
+% and \cs{@equV}, respectively.
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\nuDV} \cs{@eqnuDV} is the old definition of DV. This version does not
+% use hyperref's unicode option. This version comes in handy
+% in the acroflex package, where it is undesirable to unicode
+% the default (and initial values).
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \DescribeMacro{\uDV} Unicoded DV, used in \textsf{acroflex.dtx}
+% \begin{macrocode}
+\def\@equDV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@DV\@empty\else\def\eq@DV{/DV<#1>}\fi}
+% \end{macrocode}
+% \DescribeMacro{\V} |\V| is the field value (optional)
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\nuV} No Unicode V
+% \begin{macrocode}
+\def\@eqnuV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@V\@empty\else\def\eq@V{/V(#1)}\fi}
+% \end{macrocode}
+% \DescribeMacro{\uV} Unicode version of V
+% \begin{macrocode}
+\def\@equV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@V\@empty\else\def\eq@V{/V<#1>}\fi}%
+% \end{macrocode}
+% \DescribeMacro{\TU} Tool tip (optional, PDF 1.3)
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\uTU} Tool tip (optional, PDF 1.3), unicode version
+% \begin{macrocode}
+\def\@equTU#1{\def\eq@arg{#1}\ifx\eq@arg\@empty
+ \let\eq@TU\@empty\else\def\eq@TU{/TU<#1>}\fi}
+% \end{macrocode}
+% \DescribeMacro{\Ff} The Field flags bit field, these values are listed below.
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \paragraph*{keys specific to text fields:} \texttt{MaxLen}
+% \begin{macrocode}
+% \end{macrocode}
+% \DescribeMacro{\MaxLen} text fields only. Restricts number of characters
+% input. Required if a comb field.
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\H} Highlight, used in button fields and link annotation. Possible values
+% are None, Push, Outline, Invert (respectively, \verb!\H{N}!, \verb!\H{P}!,
+% \verb!\H{O}!, \verb!\H{I}!)
+% The default highlighting is invert (I).
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \paragraph*{Appearance characteristics dictionary:}
+% \texttt{MK=R, BC, BG, CA, RC, AC, I, RI, IX, IF, TP}
+% \begin{macrocode}
+% \end{macrocode}
+% \DescribeMacro{\MK} A dictionary containing other keys
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\R} Rotation of field, values 0, 90, 180, 270.
+% \begin{macrocode}
+ \let\@vertRotate=0
+ \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
+% \cs{@vertRotate} to 1
+% \begin{macrocode}
+ \@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{}
+% \end{macrocode}
+% \DescribeMacro{\BC} Boundary color
+% \changes{v2.5j}{2011/01/18 }{%
+% Changed \string\cs{def}\string\cs{eq@arg} to \string\cs{edef}\string\cs{eq@arg} in the definition of
+% \string\cs{@eqBC} and \string\cs{@eqBG}. When the argument is a macro that is empty,
+% we can exceed {\string\TeX} capacity.
+%}
+% \begin{macrocode}
+ \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{}
+% \end{macrocode}
+% \DescribeMacro{\BG} Background color
+% \begin{macrocode}
+ \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{}
+% \end{macrocode}
+% \DescribeMacro{\CA} normal appearance text
+% \begin{macrocode}
+ \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{}
+% \end{macrocode}
+% \DescribeMacro{\uCA} normal appearance text, unicode version
+% \begin{macrocode}
+ \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}
+% \end{macrocode}
+% \DescribeMacro{\RC} Roll over text
+% \begin{macrocode}
+ \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{}
+% \end{macrocode}
+% \DescribeMacro{\uRC} Roll over text, unicode version
+% \begin{macrocode}
+ \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}
+% \end{macrocode}
+% \DescribeMacro{\AC} Push text
+% \begin{macrocode}
+ \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{}
+% \end{macrocode}
+% \DescribeMacro{\uAC} Push text, unicode version
+% \begin{macrocode}
+ \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}
+% \end{macrocode}
+% Other keys of \texttt{MK} include: \texttt{I}, \texttt{RI}, \texttt{IX}, \texttt{IF} and \texttt{TP}
+% If I haven't covered everything, use this macro to insert
+% material into \texttt{MK}\par\medskip\noindent
+% (02/07/09) We begin support for the \texttt{MK} dictionary for a push
+% button with an icon appearance, the entries in the \texttt{MK} dictionary that
+% effect an icon of the push button has this form:
+%\begin{verbatim}
+% \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
+%\end{verbatim}
+% The \cs{eq@IconMK} macro inserts the appropriate code for an icon appearance.
+% \begin{macrocode}
+% \end{macrocode}
+% \cs{eq@define@IconMK} defines the elements of the \texttt{MK} dictionary,
+% used only if there is an icon appearance. The default definition of
+% \cs{eq@IconMK} is empty.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \DescribeMacro{\I} an indirect reference to a form XObject defining the
+% buttons's \emph{normal icon}
+% \changes{v2.9}{2016/05/09}{Modified \string\cs{I}, \string\cs{RI}, and
+% \string\cs{IX} to accommodate pdftex for null argument.}
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\RI} an indirect reference to a form XObject defining
+% the buttons's \emph{rollover icon}
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\IX} an indirect reference to a form XObject defining
+% the buttons's \emph{down icon}
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\TP} 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.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \DescribeMacro{\SW} 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}.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \DescribeMacro{\ST} The \emph{scaling type.} Permissible values are \texttt{A}
+% (anamorphic scaling); \texttt{P} (proportional scaling). The default is \texttt{P}.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \DescribeMacro{\PA} 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}!
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \DescribeMacro{\FB} 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}.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \DescribeMacro{\mkIns} used for miscellaneous entries for \texttt{MK} dictionary.
+% \begin{macrocode}
+\def\@eqmkIns#1{\def\eq@mkIns{#1}}\def\eq@mkIns{}
+% \end{macrocode}
+% \paragraph*{Additional entries specific to choice fields:} \texttt{Opt, TI, I}
+% \begin{macrocode}
+% an array of options in the list
+\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{}
+% for scrollable list boxes, the top index.
+\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{}
+% \end{macrocode}
+% When all else fails, use the \cs{rawPDF} command to modify the widget.
+% \begin{macrocode}
+\def\@eqrawPDF#1{\def\eq@rawPDF{#1}}\def\eq@rawPDF{}
+% \end{macrocode}
+% The following is in support for multi-line links
+% \begin{macrocode}
+% \end{macrocode}
+% \DescribeMacro{\QuadPoints} Used by \texttt{aeb\_mlink}, used internally by that
+% package to create multi-line links.
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{\Color} Changed |\def\eq@arg| to |\edef\eq@arg| (01/18/11)
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \DescribeMacro{linktxtcolor} key to set the color of the link through
+% the option list.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \paragraph*{Specialized, non-PDF Spec, commands}
+% \begin{macrocode}
+% \end{macrocode}
+% \begin{macro}{\rectH}
+% \begin{macro}{\rectW}
+% Use to set the height and width of a widget.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \DescribeMacro{\objdef} Insert an indirect reference (ps only drivers). The value of this
+% key must be unique throughout the whole document.
+% This is a \textbf{pdfmark} feature that inserts a references to this COS object,
+% used with setting the tab order using the structure.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \DescribeMacro{\taborder} The \cs{taborder} key is used for the
+% \texttt{dvipsone}/\texttt{dvips} options on a page where the tab order is
+% determined through structure.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \DescribeMacro{\autoCenter} Auto-center feature, values are
+% |\autoCenter{y}| (the default) or |\antoCenter{n}|.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \DescribeMacro{\inline} The if |\inline{y}|, then we attempt to
+% get a better vertical positioning. Designed for inline form fields.
+% \changes{v2.5h}{2012/11/17}{Introduce the \string\cs{inline} key designed for
+% inline form fields.}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \DescribeMacro{\symbolchoice} The symbol used for a check box or radio button.
+% Elsewhere, we have defined,
+%\begin{verbatim}
+% \def\eq@check{4}
+% \def\eq@circle{l}
+% \def\eq@cross{8}
+% \def\eq@diamond{u}
+% \def\eq@square{n}
+% \def\eq@star{H}
+%\end{verbatim}
+% Possible values for this key are \texttt{check}, \texttt{circle},
+% \texttt{cross}, \texttt{diamond}, \texttt{square}, and \texttt{star}.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% We take \texttt{\#1} and form the command \cs{eq@\#1}, to match one of
+% the definitions listed above.
+% \begin{macrocode}
+ \edef\symbol@choice{\csname eq@#1\endcsname}\fi
+}
+% \end{macrocode}
+% \DescribeMacro{\protect} A protect feature for protecting a key from begin changed
+% by the user through the optional arguments.
+% \begin{macrocode}
+\def\eq@protect#1{\let#1\@empty}
+% \end{macrocode}
+%
+% \subsubsection{Support for Hex escapes in PDF names}
+% \begin{macrocode}
+\begingroup\catcode`\#=12 \catcode`*=6
+\gdef\HEXNAME{efHex}
+\ifpdfmarkup\gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\else
+\gdef\ef@Hx*1*2{#*1*2}\fi
+\endgroup
+\ifpdfmarkup
+\def\HexGlyph#1#2{\global\@namedef{efHex#1}{#2}}
+\def\ef@inputPDFHEX{\InputIfFileExists{pdfdochex.def}
+ {\typeout{Inputtingpdfdochex.def}}{}}
+\expandafter\ef@inputPDFHEX\fi
+% \end{macrocode}
+% \subsubsection{Parsing PDF Color}
+%
+% The command is called by the \cs{textColor} key of a form field,
+% the return value, \cs{ef@colorSpec@out}, is then used in the color
+% specification of the text. If \textsf{xcolor} is loaded, we pass
+% the named color or latex color specification with color model back,
+% and is turned processed by the \textsf{hycolor} command \cs{HyColor@FieldColor}.
+% \begin{macrocode}
+\def\ef@semicolon{;}
+\def\ef@stripsemi#1;\@nil{\def\ef@colorSpec@out{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+\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}}
+% \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}
+% \cs{ef@parsePDFColor} tries to guarantee backward compatibility, and tries to
+% assure the color passed to \textsf{hycolor} fits its design expectations.
+% We begin by completely expanding the argument, for the argument may be in
+% macro form.
+% \begin{macrocode}
+\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\\{%
+% \end{macrocode}
+% \paragraph*{Test of gray or model or named.} We test whether this is either a named color, or gray color space. This is
+% the case if \texttt{\#3} is either `\texttt{g;}' or `\texttt{;}'.
+% \begin{macrocode}
+ \def\argii{#2}\def\ef@cmp{g;}%
+ \ifx\argii\ef@cmp
+% \end{macrocode}
+% It is a PDF color \texttt{<num> g}, if \textsf{xcolor} is loaded we pass it as
+% \verb![gray]{#1}!; otherwise, we return \texttt{\#1 g}.
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% Either a named color or a single number
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% If \textsf{xcolor} is not loaded, we do nothing; if \texttt{xcolor} is loaded
+% we determine if the first token is a `\texttt{[}' indicating a color space
+% specification; or if the first token is a number, indicating that this is a number.
+% If neither cases are detected, we assume a named color.
+% \begin{macrocode}
+ \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;}%
+% \end{macrocode}
+% \paragraph*{RGB test.} If \texttt{\#4} is either `\texttt{rg;}' or `\texttt{;}', we are RGB
+% \begin{macrocode}
+ \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
+% Help!: {#1,#2,\ef@colorSpec@out}%
+ \else
+ \def\argv{#5}\edef\ef@cmp{k;}
+% \end{macrocode}
+% \paragraph*{CMYK test.} If \texttt{\#5} is either `\texttt{k;}' or `\texttt{;}', we are CMYK.
+% \begin{macrocode}
+ \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
+}
+% \end{macrocode}
+% \end{macro}
+% Error messages for color spec parsing
+% \begin{macrocode}
+\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.}}
+% \end{macrocode}
+%
+% \subsection{Support for setting the calculation order}
+% The command \cs{calcOrder}\DescribeMacro{\calcOrder} set the order of calculation
+% of all calculation fields listed in this comma delimited list.
+%\begin{verbatim}
+% \calcOrder{field3,field2,field1}
+%\end{verbatim}
+% \begin{macrocode}
+\def\calcOrder#1{\let\efCalcOrder\@gobble
+ \@for\coi:=#1\do{\edef\efCalcOrder{\efCalcOrder,"\coi"}}%
+ \edef\efCalcOrder{[\efCalcOrder]}}
+\@onlypreamble\calcOrder
+\def\efCalcOrder{[]}
+% \end{macrocode}
+%
+%\subsection{Symbol Definitions}
+%
+% Some definitions for radio fields and checkboxes
+% \begin{macrocode}
+\def\eq@check{4}
+\def\eq@circle{l}
+\def\eq@cross{8}
+\def\eq@diamond{u}
+\def\eq@square{n}
+\def\eq@star{H}
+% \end{macrocode}
+% \begin{macro}{\symbolchoice}
+% Use this macro to change the symbol used in radio and
+% checkboxes. The default is \cmd{\eq@check}. This macro takes one
+% argument: permissible values are: check, circle, cross, diamond,
+% square, and star. The definition of \cs{symbolchoice} is given
+% above in the definition of \cs{@eqsymbolchoice}.
+% \begin{macrocode}
+\let\symbolchoice\@eqsymbolchoice
+% \end{macrocode}
+% Set the default to `check'.
+% \begin{macrocode}
+\symbolchoice{check}
+% \end{macrocode}
+% \end{macro}
+%\subsection{Convenience Commands}
+%
+%\subsubsection{Writing Actions}
+%
+% Writing actions for eForms requires certain key-value combinations. The following
+% commands provides the correct syntax, the code is inserted via the required
+% argument of each.
+%
+% \begin{macro}{\JS}
+% \begin{macro}{\Named}
+% \begin{macro}{\URI}
+% \begin{macro}{\Next}
+% \begin{macro}{\toggleAttachmentsPanel}
+% Convenience commands for writing JavaScript and for executing named events.
+% \begin{macrocode}
+\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}}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% When entering triggers into the AA dictionary, use these commands (all the ones of
+% the form \cs{AA<Name>}. These all have one argument, the action to take, usually
+% a JavaScript action. There is now a routine in the parsing of the AA dictionary
+% that searches for \cs{AACalculate}, if found, sets the switch \cs{ifisCalculate}.
+% For this search to succeed, these helper macros must be used.
+% \begin{macro}{\AAMouseUp}
+% \begin{macro}{\AAMouseDown}
+% \begin{macro}{\AAMouseEnter}
+% \begin{macro}{\AAMouseExit}
+% \begin{macro}{\AAOnFocus}
+% \begin{macro}{\AAOnBlur}
+% This set of six appear in the Action tab of the field properties dialog box.
+% Here, we don't assume the actions are JavaScript actions. The \cs{AAMouseUp}
+% key is normally not used, rather, the mouse up action can be define using
+% the \cs{A} key, such as \verb!\A{\JS{app.beep(0)}}!
+% \begin{macrocode}
+\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>>}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\AAFormat}
+% \begin{macro}{\AAKeystroke}
+% \begin{macro}{\AAValidate}
+% \begin{macro}{\AACalculate}
+% These four triggers are JavaScript only, so we use \cs{JS}
+% to insert the appropriate code. In the user interface, they appear
+% in the Format, Validate, and Calculate tabs of the text field, and the
+% combo box.
+% \begin{macrocode}
+\newcommand{\AAFormat}[1]{/F<<\JS{#1}>>}
+\newcommand{\AAKeystroke}[1]{/K<<\JS{#1}>>}
+\newcommand{\AAValidate}[1]{/V<<\JS{#1}>>}
+\newcommand{\AACalculate}[1]{/C<<\JS{#1}>>}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\AAPageOpen}
+% \begin{macro}{\AAPageClose}
+% \begin{macro}{\AAPageVisible}
+% \begin{macro}{\AAPageInvisible}
+% Page actions associated with a form field (PDF 1.5 or later)
+% Originally designed for multimedia annotations, but can be
+% use for form fields as well. There is no UI for these JavaScripts. The
+% order of execution of these is Page 1: PV, Page 1: PO, Page 2: PV,
+% Page 1: PC, Page 2: PO.
+%\changes{v1.0b}{2006/10/14}
+%{
+% Added page actions for annotations, PDF 1.5 or later
+%}
+% \begin{macrocode}
+\newcommand{\AAPageOpen}[1]{/PO<<\JS{#1}>>}
+\newcommand{\AAPageClose}[1]{/PC<<\JS{#1}>>}
+\newcommand{\AAPageVisible}[1]{/PV<<\JS{#1}>>}
+\newcommand{\AAPageInvisible}[1]{/PI<<\JS{#1}>>}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%\subsubsection{Saving Paths}
+% \begin{macro}{\definePath}
+% A convenience command for saving a path or an URL, usage,
+%\begin{verbatim}
+%\definePath{\myPath}{http://www.example.edu/~dpstory}
+% ...
+%\setLink[\A{\URI{\myPath}}]{Go There!}
+%\end{verbatim}
+% \begin{macrocode}
+\newcommand{\definePath}[1]{\def\ef@ctrlName{#1}%
+ \hyper@normalise\ef@definePath}
+\def\ef@definePath#1{\expandafter\xdef\ef@ctrlName{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Annotation and Field Flags}
+%
+% \subsubsection{Annotation Flag \texttt{/F} Definitions}\label{F}
+%
+% \begin{macrocode}
+\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)
+% \end{macrocode}
+%\paragraph*{Notes:}\par
+%\noindent\begin{tabular}{ll}
+% Visible (and printable) &|\F\FPrint|\\
+%Hidden but printable &|\F\FNoView\F\FPrint|\\
+%Visible but doesn't print &|\F\FNoPrint|\\
+%Hidden (and does not print) &|\F\FHidden\F\FPrint|
+%\end{tabular}
+%
+%\subsubsection{Field Flags /Ff Definitions}\label{Ff}
+% \begin{macrocode}
+\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)
+% \end{macrocode}
+% The keys \texttt{/F} and \texttt{/Ff} will be additive, that is,
+% for example, \verb+\F\FHidden\F\FPrint+ will get \texttt{/F 6},
+% a field that is both printable and hidden. These are the only
+% flags that are additive this way. The following to macros
+% are supportive of the additivity.
+% \begin{macrocode}
+\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}}
+% \end{macrocode}
+%
+% \subsection{The \texorpdfstring{\protect\cs{every\dots}}{\textbackslash{every...}} Commands}
+%
+% \begin{macro}{\everyTextField}
+% \begin{macro}{\everySigField}
+% Insert optional arguments for every \cs{textField}.
+% \begin{macrocode}
+\newcommand{\everyTextField}[1]{\def\every@TextField{#1}}
+\def\every@TextField{}
+\newcommand{\everySigField}[1]{\def\every@sigField{#1}}
+\def\every@sigField{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\everyCheckBox}
+% Here, you can control the appearance of all the standard checkboxes, also
+% effects radio fields of shortquiz and quiz.
+% \begin{macrocode}
+\newcommand{\everyCheckBox}[1]{\def\every@CheckBox{#1}}
+\def\every@CheckBox{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\everyRadioButton}
+% Pass key-values to every radio button through this key.
+% \begin{macrocode}
+\newcommand{\everyRadioButton}[1]{\def\every@RadioButton{#1}}
+\def\every@RadioButton{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\everyButtonField}
+% \begin{macro}{\everyPushButton}
+% \begin{macro}{\everyListBox}
+% \begin{macro}{\everyComboBox}
+% \begin{macro}{\everyLink}
+% Here, you can control the appearance of all the standard buttons.
+% \begin{macrocode}
+\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{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Set Field Properties}
+%
+% These are the two commands that process the field properties. This is
+% done by calling \cs{processAppArgs} to loop through pairs of tokens
+% and executing them, as explained in the discussion of \cs{processAppArgs}.
+% \medskip\par\noindent
+% The \DescribeMacro{\ef@djXPD}\cs{ef@djXPD} command attempts to reduce the size of a form field created by \app{xelatex} so its
+% dimensions are consistent with what \app{pdflatex}/\app{Distiller} produce.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \begin{macro}{\eq@setButtonProps}
+% This macro measure the width of the largest text on defined for the
+% button, and then passes the this info on to a driver specific macro
+% \#1, the first parameter.
+%\begin{verbatim}
+% #1 is the driver specific macro to build the button widget
+% #2 are the button properties
+%\end{verbatim}
+%\changes{v2.5m}{2012/01/27}{Added \string\cs{ef@btnspcr} to give user
+% ability to adjust the spacing around text for a button.}
+% \begin{macrocode}
+%\def\ef@btnspcr{\ }
+\def\ef@btnspcr{}
+\def\eq@setButtonProps#1#2{%
+ \makeJSspecials
+ \processAppArgs#2\end\@nil % set widget properties
+% \end{macrocode}
+% Coordinate the values of \cs{BC} and \cs{W}, if one is empty
+% the other is too.
+% \changes{v2.9f}{2017/01/01}{BC=empty iff W=0 or empty}
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% If rectW is nonempty, and textSize is not zero, we calculate with
+% width of the caption on the button by first adjusting the for size
+% to properly gauge the width of the text. This may not be really accurate
+% because the font used by tex will no doubt be different from the font used
+% by the button.
+% \begin{macrocode}
+ \dimen@=\eq@textSize bp
+ \dimen@1.00375\dimen@
+ \edef\eq@textSize@pt{\strip@pt\dimen@}%
+ \fontsize{\eq@textSize@pt}{0}\selectfont
+ \fi
+% \end{macrocode}
+% If the button is beveled, we pad the width by 2 times the width of the border,
+% the beveled edge taking up a width approx equal to the border.
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% (2017/01/22) If X-like, increase by 2bp
+% \changes{v2.9k}{2017/01/22}{If X-like, increase by 2bp}
+% \begin{macrocode}
+ \ifmakePDasX\advance\eq@tmpdima2bp\fi
+ \wd\eq@tmpbox=\eq@tmpdima
+ \else
+ \wd\eq@tmpbox=\eq@rectW
+ \fi
+% \end{macrocode}
+% (2016/12/22) \cs{ef@djXPD} adjusts the size of the field dimensions, if \cs{makeXasPD} is true.
+% \begin{macrocode}
+ \ef@djXPD#1% dps 12/22
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\eq@setWidgetProps}
+% Same as \cmd{\eq@setButtonProps} but does not measure the width of the
+% field. Simply lays in the optional parameters that modify the appearance
+% then calls the driver specific macro to build the widget.
+%\begin{verbatim}
+% #1 is the driver specific macro to build the widget
+% #2 are the widget properties
+%\end{verbatim}
+% \begin{macrocode}
+\def\eq@setWidgetProps#1#2{%
+ \makeJSspecials
+ \processAppArgs#2\end\@nil % set widget properties
+% \end{macrocode}
+% Coordinate the values of \cs{BC} and \cs{W}, if one is empty
+% the other is too. This rule does not apply to links.
+% \changes{v2.9f}{2017/01/01}{BC=empty iff W=0 or empty}
+% \begin{macrocode}
+ \ifx\annot@type@link\annot@type\else
+ \ifx\eq@BC\@empty\@eqW{}\else
+ \if\eq@W@value0\let\eq@BC\@empty\fi\fi
+ \fi
+% \end{macrocode}
+% (2016/12/22) \cs{ef@djXPD} adjusts the size of the field dimensions, if \cs{makeXasPD} is true.
+% \begin{macrocode}
+ \ef@djXPD#1% dps 12/22
+}
+% \end{macrocode}
+% \end{macro}
+% We now begin creating various commands for creating Acrobat Form fields. These
+% fall into four categories: \hyperref[choice]{Choice Fields} (list box and the combo box),
+% \hyperref[button]{Button Fields} (push button, check box, and radio button), \hyperref[textfield]{Text Fields},
+% and \hyperref[sigfield]{Signature Fields}.
+%
+% Each of these fields has an optional first parameter which is used to
+% change the appearance properties of the field, to set action of the
+% field, and so on. For this optional parameter, we sanitize certain
+% characters so they can be used in, for example, urls, or JavaScript strings.
+%\changes{v2.5k}{2011/01/19}
+%{%
+% Added double quotes as other to the \string\cs{ef@sanitize@toks} command to
+% keep Babel from changing the JavaScript string. This definition remains
+% in effect only for the optional argument for form fields and links.
+%}
+% \begin{macrocode}
+\def\ef@sanitize@toks{\@makeother\~\@makeother\#\@makeother\&%
+ \@makeother\"\@makeother\_}
+% \end{macrocode}
+% \begin{macro}{\efKern}
+% A convenience macro to adjust spacing between fields.
+%\begin{itemize}
+% \item \texttt{\#1} is the spacing for ps/pdftex drivers
+% \item \texttt{\#2} is the spacing for xetex
+%\end{itemize}
+%Unlike ps/pdftex, xetex includes the border width as part of the bounding rectangle
+%dimensions. As a result, this wider boundary is known to {\TeX} as it lays out the line. For
+% ps/pdftex, the boundary width is invisible to {\TeX}. The command \cs{ef@adjHWxetex} tries to
+% adjust the dimensions for xetex so the form field dimensions are the over all platforms. The boundary
+% is still ``visible'' in {\TeX} space.
+%
+%\paragraph*{Sample uses:}
+%\begin{enumerate}
+% \item Two contiguous fields of the same border color \verb!\efKern{1bp}{-1bp}!. The right and
+% left borders exactly overlap.
+% \item Two contiguous fields of different border colors \verb!\efKern{2bp}{0bp}!. The right
+% and left border are contiguous but do not overlap.
+%\end{enumerate}
+% \begin{macrocode}
+\newcommand\efKern[2]{\ifxetex\kern#2\else\kern#1\fi}
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro{\olBdry}\cs{olBdry} and \DescribeMacro{\cgBdry}\cs{cgBdry}
+% are convenience commands to setting the gap between two contiguous fields.
+% \cs{olBdry} gives positions the fields so that the boundary lines overlap
+% (ol) and \cs{cgBdry} positions the field so the boundary lines are
+% contiguous (cg).
+% \changes{v2.9d}{2016/12/22}{Added \string\cs{olBdry} and\string\cs{cgBdry}}
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% (2017/01/15) Add optional argument to \cs{cgBdry}
+% \changes{v2.9h}{2017/01/15}{Add optional argument to \string\cs{cgBdry}}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \DescribeMacro{\volBdry}\cs{volBdry} and \DescribeMacro{\vcgBdry}\cs{vcgBdry}
+% are convenience commands to setting the gap between two vertically oriented fields.
+% \cs{volBdry} gives positions the fields so that the boundary lines overlap
+% (ol) and \cs{vcgBdry} positions the field so the boundary lines are
+% contiguous (cg).
+% \changes{v2.9h}{2017/01/15}{Added \string\cs{volBdry} and\string\cs{vcgBdry}}
+% \begin{macrocode}
+\newcommand\volBdry{\bgroup\parskip0pt\relax\@@par\nointerlineskip
+ \olBdry\noindent\egroup}
+\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]\noindent
+ \egroup\ignorespaces}
+% \end{macrocode}
+%
+% \subsection{Choice Fields}\label{choice}
+%
+% This is the form template used for all choice fields, list box and combo box.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% Sets the dimensions of the fields/links based on \texttt{\#1} (width)
+% and \texttt{\#2} (height).
+% \begin{macrocode}
+\def\eqf@setDimens#1#2{\@eqrectW{#1}\@eqrectH{#2}}
+% \end{macrocode}
+% The \cs{ef@pdfstrCLOpt} command runs the option array for list and combo box through
+% \cs{pdfstringdef}. There are two forms:
+% \begin{enumerate}
+% \item |[(1)(Zur Info)][(2)(Bitte um R\"{u}cksprache)]|
+% \item |(Zur Info)(Bitte um R\"{u}cksprache)|
+%\end{enumerate}
+% In the code below, we distinguish these two cases based on the first character:
+% if \texttt{[} then it is form (1), otherwise, it is form (2). The \cs{pdfstringdef}
+% will convert the accented character \verb!\"{u}! into a PD1 character. (2015/06/06)
+% the token \DescribeMacro\passthruCLOpts\cs{passthruCLOpts} is used to pass through
+% raw option syntax for combo and list boxes; this allows a unicode notation.
+% \begin{macrocode}
+\let\ef@@nil\relax
+\def\@gobbleto@@nil#1\ef@@nil{}%
+% \end{macrocode}
+% When \cs{passthruCLOpts} (or \texttt{*}) is used, there may be a
+% lingering space that survives after the closing right brace of the
+% argument, we attempt to absorb it with \cs{@gobbleto@@nil} immediately
+% after the \cs{g@addto@macro}.
+% \begin{macrocode}
+\long\def\g@addto@macrogobble#1#2{\g@addto@macro{#1}{#2}\@gobbleto@@nil}
+% \end{macrocode}
+% \changes{v2.8a}{2015/07/15}{New def for \string\cs{passthruCLOpts}, and modified
+% \cs{ef@pdfstrCLOpts} and its spawn.}
+% (2015/07/15) New def for \cs{passthruCLOpts}, and modified \cs{ef@pdfstrCLOpts} and its spawn.
+% \begin{macrocode}
+\def\passthruCLOpts{*}
+\def\ef@pdfstrCLOpt{\Hy@unicodefalse\def\eq@Opt{}\ef@pdfstrCLOpti}
+\def\ef@pdfstrCLOpti{\@ifnextchar\ef@@nil{\@gobble}{\ef@pdfstrCLOptia}}
+% \end{macrocode}
+% The final argument of \cs{comboBox} or \cs{listBox} is any of three forms.
+%\begin{verbatim}
+% {[(1)(Socks)][(2)(Shoes)][(3)(Pants)][(4)(Shirts)][(5)(Tie)]}
+% {(Socks)(Shoes)(Pants)(Shirts)(Tie)}
+% {\passthruCLOpts{%
+% [(Euro)<\unicodeStr(myEuro)>]%
+% [(Yen)<\unicodeStr(myYen)>]
+% [(Sheqel)<\unicodeStr(mySheqel)>]%
+% [(Pound)<\unicodeStr(myPound)>]%
+% [(Franc)<\unicodeStr(myFranc)>]}
+%\end{verbatim}
+% As long as the first token is not \cs{passthruCLOpts}, the argument may also be
+% a combination of the first two, such as
+%\begin{verbatim}
+% {[(1)(Socks)](Shoes)[(3)(Pants)](Shirts)[(5)(Tie)]}
+%\end{verbatim}
+% The trick is to identify the first token of the group (\texttt{[} or \texttt{(}).
+% When the first token is \cs{passthruCLOpts}, the extensive parse does not take place,
+% and the whole argument just passes to \cs{eq@Opt}.
+%\medskip\noindent
+% If next char is `\texttt{[}' then we have an array element of the form
+% \verb![(val)(appr)]!, we \cs{@gobble} the left brace in this case. If
+% the next char is not a left bracket, go to next state.
+% \begin{macrocode}
+\def\ef@pdfstrCLOptia{\@ifnextchar[{\expandafter
+ \ef@pdfstrOptWBii\@gobble}{\ef@pdfstrCLOptb}}
+% \end{macrocode}
+% If not a left bracket, check for \cs{passthruCLOpts}, which expands to `\texttt{*}'.
+% If `\texttt{*}', then we pass the whole argument to \cs{eq@Opt} and end parsing. If
+% not `\texttt{*}', check for parentheses.
+% \begin{macrocode}
+\def\ef@pdfstrCLOptb{\@ifstar{\g@addto@macrogobble\eq@Opt}
+ {\ef@pdfstrOptWPi}}
+% \end{macrocode}
+%\changes{v2.6d}{2014/04/26}{Added additional parsing, so spaces
+% can occur between arguments.}
+% (2014/04/26) Added additional parsing, so spaces
+% can occur between arguments.
+%\par\medskip\noindent
+% Following a bracket, the next token can only be a left parenthesis, if not error.
+% \begin{macrocode}
+\def\ef@pdfstrOptWBii{%
+ \@ifnextchar({\ef@pdfstrOptWBiia}{\PackageError{eforms}
+ {Left parenthesis expected here}{}}%
+}
+% \end{macrocode}
+% We process the element of the form by pushing \verb![(val)(appr)]! onto the
+% \cs{eq@Opt} stack.
+% \begin{macrocode}
+\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}{}}%
+}
+% \end{macrocode}
+% Get the second element of the array, which is enclosed in parentheses.
+% push its value onto the stack too.
+% \begin{macrocode}
+\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{)]}%
+% \end{macrocode}
+% Now after removing the final right bracket, return to the beginning,
+% which is the \cs{ef@pdfstrCLOpti} command.
+% \begin{macrocode}
+ \expandafter\ef@pdfstrCLOpti\@gobble
+}
+% \end{macrocode}
+% Process the purely parentheses version of the array.
+% \begin{macrocode}
+\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{)}%
+% \end{macrocode}
+% Return to the beginning, \cs{ef@pdfstrCLOpti}.
+% \begin{macrocode}
+ \ef@pdfstrCLOpti}
+% \end{macrocode}
+% \subsubsection{List Box}\label{listbox}
+% The main list box code that can be used to build list box commands, such as
+% \cs{listBox}, defined below.
+% \begin{macrocode}
+\def\annot@type@listbox{listbox}
+\newcommand\list@@Box[8]{\begingroup
+ \edef\annot@type{\annot@type@listbox}%
+ \pdfstringdef\Fld@name{#2}%
+% \edef\Fld@name{#2}%\def\eq@Opt{#5}%
+% \end{macrocode}
+% Run \texttt{\#5} through \cs{ef@pdfstrCLOpt}.
+% \begin{macrocode}
+ \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}%
+}
+% \end{macrocode}
+% \begin{macro}{\listBox}
+%\begin{verbatim}
+% #1 = optional, used to enter any modification of the appearance/actions
+% #2 = the title of the list box field
+% #3 = the width of the bounding rectangle
+% #4 = the height of the bounding rectangle
+% #5 = the face values/export values of list.
+%\end{verbatim}
+% \begin{macrocode}
+\def\listBoxDefaults{%
+ \W{1}\S{I}\F{\FPrint}\BC{0 0 0}
+}
+% \end{macrocode}
+% We sanitize the optional first parameter.
+% \begin{macrocode}
+\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}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Combo Box}\label{combobox}
+% \begin{macrocode}
+\def\annot@type@combobox{combobox}
+\newcommand\combo@@Box[8]{\begingroup
+ \edef\annot@type{\annot@type@combobox}%
+ \@eqFf{\FfCombo}\pdfstringdef\Fld@name{#2}%
+% \edef\Fld@name{#2}%\def\eq@Opt{#5}%
+% \end{macrocode}
+% Run \texttt{\#5} through \cs{ef@pdfstrCLOpt}.
+% \begin{macrocode}
+ \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}%
+}
+% \end{macrocode}
+% \begin{macro}{\comboBox}
+% A general combo box command.
+%\begin{verbatim}
+% #1 = optional, used to enter any modification of the appearance/actions
+% #2 = the title of the radio field
+% #3 = the width of the bounding rectangle
+% #4 = the height of the bounding rectangle
+% #5 = the face values/export values of combo box.
+%\end{verbatim}
+% \begin{macrocode}
+\def\comboBoxDefaults{%
+ \W{1}\S{I}\F{\FPrint}\BC{0 0 0}
+}
+% \end{macrocode}
+% We sanitize the optional first parameter.
+% \begin{macrocode}
+\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}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \subsection{Button Fields}\label{button}
+% Here is the field template for push button fields.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% Here is the field template for check boxes and radio button fields fields.
+% \begin{macrocode}
+\def\common@RadioCheckCode{%
+ /Subtype/Widget
+ /T (\Fld@name)
+ /FT/Btn
+ \eq@Ff
+ \eq@F
+ \eq@TU
+ /BS <<\eq@W\eq@S>>
+% \end{macrocode}
+% \changes{v1.0d}{2007/09/01}{%
+% Corrected a problem with radio buttons. The problem was created by earlier
+% changes so that the \string\textbf{AP} key could play a greater role in creating
+% different appearances.
+%}
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% \subsubsection{Push Button}\label{pushbutton}
+% Here is the basic command for creating a button field. This is the building block
+% for all other buttons.
+%\changes{v2.0b}{2008/06/19}
+%{
+% Added code to take the dimensions and pass them through
+% \string\cs{setlength}, so that calc type dimensions can be used
+% when setting the dimensions of this widget. Made the same
+% changes for all AcroForm elements and for linking.
+%}
+% \begin{macrocode}
+\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}%
+}
+% \end{macrocode}
+% \begin{macro}{\pushButton}
+%\begin{verbatim}
+%#1 = optional, used to enter any modification of the appearance/actions
+%#2 = the title of the button field
+%#3 = the width of the bounding rectangle
+%#4 = the height of the bounding rectangle
+%\end{verbatim}
+% \begin{macrocode}
+\def\pushButtonDefaults{%
+ \W{1}\S{B}\F{\FPrint}\BC{0 0 0}
+ \H{P}\BG{.7529 .7529 .7529}
+}
+% \end{macrocode}
+% We sanitize the optional first parameter.
+% \begin{macrocode}
+\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}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Check Box}\label{checkbox}
+% The basic command for creating check boxes.
+% \begin{macrocode}
+\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}%
+}
+% \end{macrocode}
+% \begin{macro}{\checkBox}
+%\begin{verbatim}
+%#1 = optional, used to enter any modification of the appearance/actions
+%#2 = the title of the check box field
+%#3 = the width of the bounding rectangle
+%#4 = the height of the bounding rectangle
+%#5 = the 'on value' or export value, the default is "Yes".
+%\end{verbatim}
+% \begin{macrocode}
+\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}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Radio Button}\label{radiobutton}
+% The basic command for creating radio button fields.
+% \begin{macrocode}
+% Basic command for building all radio buttons.
+% \end{macrocode}
+% \begin{macrocode}
+\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}%
+% \edef\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}%
+}
+% \end{macrocode}
+% \begin{macro}{\radioButton}
+%\begin{verbatim}
+%#1 = optional, used to enter any modification of the appearance/actions
+%#2 = the title of the radio button field
+%#3 = the width of the bounding rectangle
+%#4 = the height of the bounding rectangle
+%#5 = the 'on value' or export value, the default is "Yes"
+%\end{verbatim}
+% \begin{macrocode}
+\def\radioButtonDefaults
+{%
+ \W{1}\S{S}\BC{0 0 0}\F{\FPrint}
+}
+% \end{macrocode}
+% We sanitize the optional first parameter.
+% \begin{macrocode}
+\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}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Text Field}\label{textfield}
+%
+% The template for a text field.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% The basic text field macro for constructing all other text fields.
+% \begin{macrocode}
+\def\annot@type@text{textfld}
+\newcommand\text@@Field[7]
+{%
+ \begingroup
+ \edef\annot@type{\annot@type@text}%
+ \pdfstringdef\Fld@name{#2}\def\eq@Title{#2}%
+% \edef\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}%
+}
+% \end{macrocode}
+% \begin{macro}{\textField}
+%\begin{verbatim}
+%#1 = optional, used to enter any modification of the appearance/actions
+%#2 = the title of the text field
+%#3 = the width of the bounding rectangle
+%#4 = the height of the bounding rectangle
+%\end{verbatim}
+% \begin{macrocode}
+\def\textFieldDefaults
+{%
+ \F{\FPrint}\BC{0 0 0}\W{1}\S{S}
+}
+% \end{macrocode}
+% We sanitize the optional first parameter.
+% \begin{macrocode}
+\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}}%
+}
+% \end{macrocode}
+% Some legacy assignments.
+% \begin{macrocode}
+\let\eqTextField\textField
+\let\calcTextField\textField
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Signature Field}\label{sigfield}
+%
+% The template for a signature field.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% The basic text field macro for constructing all other text fields.
+% \begin{macrocode}
+\def\annot@type@sig{sigfld}
+\newcommand\sig@@Field[7]{%
+ \begingroup
+ \edef\annot@type{\annot@type@sig}%
+ \pdfstringdef\Fld@name{#2}\def\eq@Title{#2}%
+% \edef\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}%
+}
+% \end{macrocode}
+% \begin{macro}{\sigField}
+%\begin{verbatim}
+%#1 = optional, used to enter any modification of the appearance/actions
+%#2 = the title of the text field
+%#3 = the width of the bounding rectangle
+%#4 = the height of the bounding rectangle
+%\end{verbatim}
+% \begin{macrocode}
+\def\sigFieldDefaults
+{%
+ \F{\FPrint}\BC{}\BG{}\W{1}\S{S}
+}
+% \end{macrocode}
+% We sanitize the optional first parameter.
+% \begin{macrocode}
+\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}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Additional Link Support}
+%
+% The links in \textsf{hyperref} are not sufficiently general to
+% allow actions other than jumping. I've included a general link
+% that increases the usage of the links provided by
+% \textsf{hyperref}.
+% \paragraph{Common Link Code.} All the link commands eventually come back
+% to this template for constructing a link annotation.
+% \begin{macrocode}
+\def\common@LinkCode
+{%
+ \eq@A % Action
+ \eq@H % Highlight
+ \eq@Color % Border color
+ \link@BS % Border styles
+ \eq@rawPDF % everything else
+}
+% \end{macrocode}
+% The low-level link command and is the building block of all the
+% other, more user-friendly link commands. Takes seven parameters:
+%\begin{enumerate}
+%\item[\texttt{\#1}:] Optional arguments to modify the appearance and actions of the link.
+%\item[\texttt{\#2}:] The width of the bounding rectangle.
+%\item[\texttt{\#3}:] The height of the bounding rectangle.
+%\item[\texttt{\#4}:] The text to be enclosed by the link.
+%\item[\texttt{\#5}:] Used to set link properties and link driver.
+%\item[\texttt{\#6}:] I don't remember what this one was about, same as \texttt{\#5}.
+%\item[\texttt{\#7}:] Used to set link defaults and to execute \cs{everyLink}.
+%\end{enumerate}
+% \begin{macrocode}
+\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}%
+}
+% \end{macrocode}
+% \paragraph{The Visibility of Border of the Link.} We use \textsf{hyperref}'s
+% option \texttt{colorlinks} to determine if we
+% make the bounding rectangle visible or not by default.
+% \begin{macrocode}
+\def\defaultlinkcolor{\@linkcolor}
+% \end{macrocode}
+% Delay default link color until beginning of document.
+%\changes{v2.8f}{2016/04/05}{Delay default link color until beginning of document.}
+% \begin{macrocode}
+\def\setDef@ultLinkColor{\ifHy@colorlinks
+ \def\ef@thislinkcolor{\defaultlinkcolor}
+ \def\ef@colorthislink{\color{\ef@thislinkcolor}}\else
+ \let\ef@colorthislink\relax\fi
+}
+\AtBeginDocument{\setDef@ultLinkColor}
+% \end{macrocode}
+% \begin{macro}{\setLink}
+% \begin{macro}{\mlsetLink}
+% \begin{macro}{\setLinkText}
+% This is the basic high-level link command, it is used to surround text.
+%\begin{verbatim}
+% \setLinkText[\A{\JS{this.pageNum=6;}}\Color{1 0 0}]{Go There!}
+%\end{verbatim}
+% \paragraph{Link Parameters.} This link takes two parameters, one of which
+% is optional.
+%\begin{enumerate}
+%\item[\texttt{[\#1]}:] Optional key-value pairs to change the appearance or action
+% of this link.
+%\item[\texttt{\#2}:] The text to be enclosed in the bounding rectangle of this link.
+%\end{enumerate}
+%\paragraph{Link default parameters.} We set the line style on solid, and
+% the border array to \texttt{0 0 0}, no visible border.
+% \begin{macrocode}
+\def\set@LinkTextDefaults{\S{S}\Border{0 0 0}}
+% \end{macrocode}
+% If the \texttt{colorlinks} option is in effect with hyperref, we color links when author
+% uses |\setLinkText|, a command used by many other commands defined in AeB.
+% \begin{macrocode}
+\newcommand\setLink{\begingroup
+ \ef@sanitize@toks\ef@setlinktext
+}
+\newcommand{\mlsetLink}{\mlhypertext}
+\let\setLinkText\setLink
+\newcommand{\ef@setlinktext}[1][]{%
+% \end{macrocode}
+% \changes{v2.5b}{2009/12/24}{added path to \string\cs{mlhypertext}}
+% Added a path to \cs{mlhypertext} of the \textsf{aeb\_mlink} package. When the
+% user specifies \verb!\mlLink{true}! in the option list, we branch off to
+% \cs{mlhypertext}.
+% \begin{macrocode}
+ \endgroup\ef@searchmlLink#1\mlLink\end\@nil
+ \ifx\ef@mlLink0\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}%
+}
+% \end{macrocode}
+% Definitions we want make locally to the options parameters; otherwise,
+% these are undefined.
+% \begin{macrocode}
+\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
+ }%
+}
+% \end{macrocode}
+% After the properties are processed, the flow comes to |\ef@postProcLinkProps|
+% for one last chance to process the properties more finely. The flow continues
+% to |\setLink@@driver|.
+% \begin{macrocode}
+\def\ef@postProcLinkProps{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\setLinkBbox}
+% Set a link around a |\parbox|.
+%\begin{verbatim}
+%\setLinkBbox [\Color{1 0 0}}]{50bp}{30bp}[b]{\centering Press Me!}
+%\end{verbatim}
+% \paragraph{Link Parameters.} There are four parameters, two of which
+% are optional.
+%\begin{enumerate}
+%\item[\texttt{[\#1]}:] Optional key-value pairs to change the appearance or action
+% of this link.
+%\item[\texttt{\#2}:] The width of the \cs{parbox}.
+%\item[\texttt{\#3}:] The height of the \cs{parbox}.
+%\item[\texttt{[\#4]}:] The positioning parameter of the \cs{parbox} (\texttt{b}, \texttt{c}, \texttt{t}).
+%\item[\texttt{[\#5]}:] The text or object to be enclosed in a \cs{parbox}
+%\end{enumerate}
+%\paragraph{Link default parameters.} We set the line style on solid, and
+% the border array to \texttt{0 0 0}, no visible border.
+% \begin{macrocode}
+\def\set@LinkBboxDefaults{\S{S}\Border{0 0 0}}
+% \end{macrocode}
+% \begin{macrocode}
+\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}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\setLinkPbox}
+% This is a special link for creating a fixed box around the
+% current paragraph and is used with the multi-line link commands.
+%\changes{v1.0c}{2007/07/21}
+%{
+% Added \string\cs{setLinkPbox} to support multi-line links for dvips
+% and dvipsone. Added to \string\cs{setLinkPbox@driver} a special link
+% driver that supports \string\textbf{QuadPoints}.
+%}
+% \begin{macrocode}
+\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}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \section{A User Interface to links and forms}
+%
+% Through the years, I've developed my own version of a ``key-value''
+% system, and this system works very well (see
+% Section~\ref{procArgs}, page~\pageref{procArgs}, for the main
+% macro); however, in a feeble attempt to make the system more user
+% friendly, I've incorporated an \textsf{xkeyval} system into the
+% \textsf{eforms} package. My old key-value system---which requires less
+% typing and, in my opinion, is easier to use---still works,
+% and the new one is just a user interface to the old system; parameters are
+% passed to the main processing macro, defined in Section~\ref{procArgs}.
+% \begin{macrocode}
+%<*userinterface>
+% \end{macrocode}
+% Let's bring in the \textsf{xkeyval} package.
+% \begin{macrocode}
+%\usepackage{xkeyval}
+% \end{macrocode}
+% The |\ui| interface is undefined if the \texttt{useui} option is not taken. We use this fact
+% to send a message to the user that using |\ui| most accompany the \texttt{useui}.
+% \begin{macrocode}
+\def\@equi#1{}
+% \end{macrocode}
+% The visibility of the border of a link depends on where the \texttt{colorlinks} option of hyperref has been
+% taken. If the author does not take \texttt{colorlinks}, a visible rectangle appears by default. By putting
+% \texttt{border=visible}, the author can override this behavior. If \texttt{colorlinks} option was taken, then the same
+% link has an invisible border by default. Again, the author can override this by putting \texttt{border=visible}.
+% \begin{macrocode}
+\ifHy@colorlinks\def\eq@bordervisibledefault{0}\@eqW{}\else
+\def\eq@bordervisibledefault{1}\@eqW{1}\fi
+% \end{macrocode}
+% \subsection{Some Utility Commands}
+% Some utility commands that are defined elsewhere in the AeB, but this package does not assume AeB, so
+% we'll define them here as well.
+% \begin{macrocode}
+\def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
+\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start}
+ {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}}
+\def\aeb@exiii{\expandafter\expandafter\expandafter}
+\newtoks\ef@flagtoks
+\newtoks\ef@jstoks
+\def\noexpandiii{\noexpand\noexpand\noexpand}
+% \end{macrocode}
+%
+% \subsection{The Appearance Tab}
+%
+% We set this user interface up to model the UI of Acrobat/Reader.
+% \IndexKey{border}
+% In the case of a link, this is the Link Type: \textsf{Visible Rectangle}
+% or \textsf{Invisible Rectangle}. For forms, this key has not counterpart
+% in the user interface. If you set border equal to \texttt{invisible}, that
+% will set border line width to zero |\W{0}|.
+% \begin{macrocode}
+\define@choicekey{eforms}{border}[\val\nr]{visible,invisible}
+{%
+ \ifcase\nr
+% \end{macrocode}
+% Author has chosen a visible border |\eq@W@buffered|.
+% \begin{macrocode}
+ \def\eq@visibleborder{1}%
+ \ifx\eq@W\@empty
+ \ifx\eq@W@buffered\@empty\@eqW{1}\else
+ \@eqW{\eq@W@buffered}\fi
+ \else
+ \ifnum\eq@W@value=0 \@eqW{1}\fi
+ \ifx\eq@W@buffered\@empty\else
+ \@eqW{\eq@W@buffered}\fi
+ \fi
+ \@eqBorder{0 0 \eq@W@value}%
+ \or
+ % author has chosen invisible border
+ \def\eq@visibleborder{0}\@eqW{}%
+ \@eqBorder{0 0 0}\@eqBC{}%
+ \fi
+}
+% \end{macrocode}
+% This choice key is for the \texttt{linewidth}\IndexKey{linewidth} of a link or form. The user interface choices
+% are \texttt{thin}, \texttt{medium}, and \texttt{thick}. This number is ignored if the document
+% author has set the border to \texttt{invisible}.
+% \begin{macrocode}
+\define@choicekey{eforms}{linewidth}[\val\nr]{thin,medium,thick}
+{%
+ \ifx\annot@type\annot@type@link
+% \end{macrocode}
+% This is a link, so, depending on whether the color package is loaded, we show or don't
+% show the boundary, depending on the explicate choices of the author
+% \begin{macrocode}
+ \ifx\eq@visibleborder\@empty
+% \end{macrocode}
+% Author has not committed to a border type, so we'll assume the default
+% \begin{macrocode}
+ \ifnum\eq@bordervisibledefault=0
+% \end{macrocode}
+% A color package is loaded, use invisible border by default.
+% \begin{macrocode}
+ \edef\eq@W@buffered{\ifcase\nr 1\or2\or3\fi}%
+ \@eqW{}%
+ \else
+% \end{macrocode}
+% No color is loaded, show the border.
+% \begin{macrocode}
+ \ifcase\nr \@eqW{1}\or\@eqW{2}\or
+ \@eqW{3}\else\@eqW{1}\fi\@eqBorder{0 0 \eq@W@value}%
+ \fi
+ \else
+% \end{macrocode}
+% Author has set the border type before line width, we'll do what the
+% author wants. If invisible, ignore |\W|, if visible obey |\W|.
+% \begin{macrocode}
+ \ifnum\eq@visibleborder=1 % visible border
+ \ifcase\nr \@eqW{1}\or\@eqW{2}\or
+ \@eqW{3}\else\@eqW{1}\fi\@eqBorder{0 0 \eq@W@value}%
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% This is not a link, its a form, so things are easier. The invisible border will override
+% the linewidth. If the author wants a border, s/he better get her/his act together and
+% remove \texttt{border=invisible}.
+% \begin{macrocode}
+ \ifx\eq@visibleborder\@empty
+% \end{macrocode}
+% If the value of |\eq@visibleborder|, author has not used the border key at this time,
+% so just set the \texttt{linewidth} as stated.
+% \begin{macrocode}
+ \ifcase\nr \@eqW{1}\or\@eqW{2}\or
+ \@eqW{3}\else\@eqW{1}\fi\@eqBorder{0 0 \eq@W@value}%
+ \edef\eq@W@buffered{\ifcase\nr 1\or2\or3\fi}%
+ \else
+% \end{macrocode}
+% The author has used the border key, so we don't need to save this value.
+% \begin{macrocode}
+ \ifnum\eq@visibleborder>0
+ \ifcase\nr \@eqW{1}\or\@eqW{2}\or
+ \@eqW{3}\else\@eqW{1}\fi\@eqBorder{0 0 \eq@W@value}%
+ \fi
+ \fi
+ \fi
+}
+\let\eq@visibleborder\@empty
+\let\eq@W@buffered\@empty
+% \end{macrocode}
+%
+% The highlight\IndexKey{highlight} type, choices are \texttt{none}, \texttt{invert},
+% \texttt{outline}, \texttt{inset} and \texttt{push}. The term \texttt{inset}
+% is used with links, and \texttt{push} is used with forms. They each have the
+% same key value pair.
+% \begin{macrocode}
+\define@choicekey{eforms}{highlight}[\val\nr]{none,invert,outline,%
+ inset,push}
+{%
+ \ifcase\nr
+ \@eqH{}\or\@eqH{I}\or\@eqH{O}\or\@eqH{P}\or\@eqH{P}\fi
+}{}
+% \end{macrocode}
+% \IndexKey{bordercolor}
+% This is an rgb color, \texttt{bordercolor=1 0 0}, is the color red.
+% \begin{macrocode}
+\define@key{eforms}{bordercolor}[]{%
+ \ifx\annot@type\annot@type@link\@eqColor{#1}\else
+% If border is invisible, we ignore bordercolor
+ \ifx\eq@visibleborder\@empty\@eqBC{#1}\else
+ \ifnum\eq@visibleborder>0\relax\@eqBC{#1}\fi\fi\fi
+}
+% \end{macrocode}
+%
+% The line style\IndexKey{linestyle} of the border, possible values are \texttt{solid},\texttt{dashed},
+% \texttt{underlined}, \texttt{beveled},and \texttt{inset}. Links do not support
+% the \texttt{beveled} and \texttt{inset} options.
+% \begin{macrocode}
+\define@choicekey{eforms}{linestyle}[\val\nr]{solid,dashed,underlined,%
+ beveled,inset}
+{%
+ \ifcase\nr\relax
+ \@eqS{S}\or\@eqS{D}\or\@eqS{U}%
+ \or\@eqS{B}\or\@eqS{I}\else\@eqS{S}%
+ \fi
+}
+% \end{macrocode}
+%
+% When a line style of dashed is chosen, you can specify a dashed array\IndexKey{dasharray}.
+% The default is 3, which means 3 points of line, 3 points gap.
+% A value of \texttt{dashedarray=3 2} means three points of line, followed
+% by two points of space.
+% \begin{macrocode}
+\define@key{eforms}{dasharray}[3]{\@eqD{#1}}
+% \end{macrocode}
+% Set the color of the link text. Ignored if the colorlinks option of hyperref
+% has not been taken. The value of \texttt{linktxtcolor}\IndexKey{linktxtcolor} is a named color. For example,
+% \texttt{linkcolor=red}. The default is |\@linkcolor| from hyperref. This default
+% can be changed by redefining |\@linkcolor|, or be redefining |\defaultlinkcolor|.
+% If |linktxtcolor={}| (an empty argument), or simply \texttt{linktxtcolor}, no color is applied to the text.
+% \begin{macrocode}
+\define@key{eforms}{linktxtcolor}[]{%
+ \let\ef@linktxtcolor@set=1\@eqlinktxtcolor{#1}}
+\let\ef@linktxtcolor@set=0
+% \end{macrocode}
+%
+% \subsection{The General and Option Tab}
+% In the general and option tabs of Acrobat a variety of attributes
+% of the field can be set, such visibility, printability, readonly,
+% orientation, captions (for button), values, default values, etc.
+% can be set.
+%
+% The \texttt{annotflags}\IndexKey{annotflags} is a bit field, possible values are \texttt{hidden}, \texttt{print},
+% \texttt{-print}, \texttt{noview}, and \texttt{lock}. Multiple values can
+% be specified. The values are ``or-ed'' together. Most all forms are printable
+% by default. If you don't want a form field to print specify \texttt{-print}.
+% For example, |annotflags={-print,lock}| makes the field not printable and is
+% locked, so the field cannot be moved through the UI.
+% \begin{macrocode}
+\define@key{eforms}{annotflags}[]{\ef@flagtoks={}%
+ \setkeys{annotflags}{#1}}
+\@tfor\ef@flagopts:={{hidden}{FHidden}}{{print}{FPrint}}{{noprint}%
+ {FNoPrint}}{{-print}{FNoPrint}}{{noview}{FNoView}}{{lock}{FLock}}%
+ \do{\expandafter\getargs\ef@flagopts
+ \edef\temp@expand@def{%
+ \noexpand\define@key{annotflags}{\aeb@argi}[true]{%
+ \noexpand\ef@flagtoks=%
+ \noexpand\expandafter{\noexpand\ef@passedArgs}%
+ \noexpand\edef\noexpand\ef@passedArgs{\noexpandiii%
+ \F{\noexpandiii\csname\aeb@argii\noexpandiii\endcsname}%
+ \noexpand\the\noexpand\ef@flagtoks}%
+ }%
+ }\temp@expand@def
+}
+% \end{macrocode}
+% A large number of fields that sets a number of properties of a field. Some of these
+% are specified through the bitfield \texttt{fieldflags}\IndexKey{fieldflags}.
+% These appear in the first of the paired groups listed below. Normally, a document
+% author would not specify \texttt{radio}, \texttt{pushbutton} or \texttt{combo}.
+% These properties are used
+% by eforms to construct a radio button field, a push button and a combo box.
+% The others can be used as appropriate.
+% \begin{macrocode}
+\define@key{eforms}{fieldflags}[]{\ef@flagtoks={}%
+ \setkeys{fieldflags}{#1}}
+\@tfor\ef@flagopts:={{readonly}{FfReadOnly}}{{required}{FfRequired}}%
+ {{noexport}{FfNoExport}}{{multiline}{FfMultiline}}%
+ {{password}{FfPassword}}{{notoggleoff}{FfNoToggleToOff}}%
+ {{radio}{FfRadio}}{{pushbutton}{FfPushButton}}{{combo}{FfCombo}}%
+ {{edit}{FfEdit}}{{sort}{FfSort}}{{fileselect}{FfFileSelect}}%
+ {{multiselect}{FfMultiSelect}}{{nospellcheck}{FfDoNotSpellCheck}}%
+ {{noscrolling}{FfDoNotScroll}}{{comb}{FfComb}}%
+ {{radiosinunison}{FfRadiosInUnison}}%
+ {{commitonchange}{FfCommitOnSelChange}}{{richtext}{FfRichText}}\do{%
+ \expandafter\getargs\ef@flagopts
+ \edef\temp@expand@def{%
+ \noexpand\define@key{fieldflags}{\aeb@argi}[true]%
+ {%
+ \noexpand\ef@flagtoks=\noexpand\expandafter{%
+ \noexpand\ef@passedArgs}%
+ \noexpand\edef\noexpand\ef@passedArgs{\noexpandiii%
+ \Ff{\noexpandiii\csname\aeb@argii\noexpandiii\endcsname}%
+ \noexpand\the\noexpand\ef@flagtoks}%
+ }%
+ }\temp@expand@def
+}
+% \end{macrocode}
+% Enter a text value to appear as a tool tip\IndexKey{tooltip}. For example,
+% \texttt{tooltip={Hi, press me and see what happens!}}. Enclose in
+% parentheses if the text string contains a comma.
+% \begin{macrocode}
+\define@key{eforms}{tooltip}{\@eqTU{#1}}
+% \end{macrocode}
+% The default value\IndexKey{default}\IndexKey{defaultstyle} of a field (text, list, combobox) what is used
+% when the field is reset. Example: \texttt{default=Name}
+% \begin{macrocode}
+\define@key{eforms}{default}{\@eqDV{#1}}
+\define@key{eforms}{defaultstyle}{\@eqDS{#1}}
+% \end{macrocode}
+% The \texttt{value}\IndexKey{value}\IndexKey{richvalue}\IndexKey{apprD} of the field (text, list, combobox). Example: \texttt{value=AcroTeX}.
+% \begin{macrocode}
+\define@key{eforms}{value}{\@eqV{#1}}
+\define@key{eforms}{richvalue}{\@eqRV{#1}}
+\define@key{eforms}{apprD}{\@eqAP{#1}}
+% \end{macrocode}
+% Set the orientation\IndexKey{rotate} of the field, values are 0, 90, 180 and 270. If 90 or 270
+% are chosen, the height and width of the field need to be reversed. This is not
+% done automatically by eForms (probably should).
+% \begin{macrocode}
+\define@choicekey{eforms}{rotate}[\val\nr]{0,90,180,270}
+ {\expandafter\@eqR\expandafter{\val}}{}
+% \end{macrocode}
+% The background color\IndexKey{bgcolor} of the field. This is an RGB value.
+% \begin{macrocode}
+\define@key{eforms}{bgcolor}[]{\@eqBG{#1}}
+% \end{macrocode}
+% The normal text\IndexKey{uptxt} that appears on a button. Example \texttt{uptxt=Push Me}
+% \begin{macrocode}
+\define@key{eforms}{uptxt}{\@eqCA{#1}}
+% \end{macrocode}
+% The (mouse) down text\IndexKey{downtxt} of the button caption. Example: \texttt{downtxt=Thanks!}
+% \begin{macrocode}
+\define@key{eforms}{downtxt}{\@eqAC{#1}}
+% \end{macrocode}
+% The (mouse) rollover\IndexKey{rollovertxt} caption of a button. Example: \texttt{rollovertxt=AcroTeX!}
+% \begin{macrocode}
+\define@key{eforms}{rollovertxt}{\@eqRC{#1}}
+% \end{macrocode}
+% The type of alignment\IndexKey{align} of a text field. Permitted values are
+% \texttt{left}, \texttt{centered}, and \texttt{right}.
+% \begin{macrocode}
+\define@choicekey{eforms}{align}[\val\nr]{left,centered,right}{%
+ \ifx\annot@type\annot@type@text
+ \expandafter\@eqQ\expandafter{\nr}\fi}{}
+% \end{macrocode}
+% The text font\IndexKey{textfont} to be used with the text of the field.
+% \begin{macrocode}
+\define@key{eforms}{textfont}{\@eqtextFont{#1}}
+% \end{macrocode}
+% The text size\IndexKey{textsize} to be used. A value of 0 means auto size.
+% \begin{macrocode}
+\define@key{eforms}{textsize}{\@eqtextSize{#1}}
+% \end{macrocode}
+% The color of the text\IndexKey{textcolor} in the field. This can be in \textsf{G}, \textsf{RGB} or \textsf{CMYK} color
+% space.
+% \begin{macrocode}
+\define@key{eforms}{textcolor}{%
+ \@eqtextColor{#1}%
+% \aeb@cntargs#1 \\\relax
+% \ifcase\aeb@nArgs\relax\or
+% \@eqtextColor{#1 g}\or\or
+% \@eqtextColor{#1 rg}\or
+% \@eqtextColor{#1 k}\fi
+}
+% \end{macrocode}
+% Use \texttt{maxlength}\IndexKey{maxlength} to limit the number of characters input into a text field.
+% Example: \texttt{maxlength=12}.
+% \begin{macrocode}
+\define@key{eforms}{maxlength}{\@eqMaxLen{#1}}
+% \end{macrocode}
+% \paragraph*{Icon Appearances} We begin a section for creating icon
+% appearances for a push button. We define three keys \texttt{normappr}\IndexKey{normappr},
+% \texttt{rollappr}\IndexKey{rollappr}, and \texttt{downappr}\IndexKey{downappr}
+% \begin{macrocode}
+\define@key{eforms}{normappr}{\@eqI{#1}}
+\define@key{eforms}{rollappr}{\@eqRI{#1}}
+\define@key{eforms}{downappr}{\@eqIX{#1}}
+\define@choicekey{eforms}{layout}[\val\nr]{labelonly,icononly,%
+ icontop,iconbottom,iconleft,iconright,labelover}{%
+ \ifx\annot@type\annot@type@button
+ \expandafter\@eqTP\expandafter{\nr}\fi}{}
+% \end{macrocode}
+% Scaling keys, \texttt{scalewhen}\IndexKey{scalewhen} and \texttt{scale}\IndexKey{scale}
+% \begin{macrocode}
+\define@choicekey{eforms}{scalewhen}[\val\nr]{always,never,%
+ iconbig,iconsmall}{%
+ \ifx\annot@type\annot@type@button
+ \ifcase\nr\relax
+ \def\eq@@SW{A}\or
+ \def\eq@@SW{N}\or
+ \def\eq@@SW{B}\or
+ \def\eq@@SW{S}\else
+ \def\eq@@SW{A}\fi
+ \expandafter\@eqSW\expandafter{\eq@@SW}\fi}{}
+\define@choicekey{eforms}{scale}[\val\nr]{proportional,%
+ nonproportional}{%
+ \ifx\annot@type\annot@type@button
+ \ifcase\nr\relax
+ \def\eq@@ST{P}\or
+ \def\eq@@ST{A}\else
+ \def\eq@@ST{P}\fi
+ \expandafter\@eqST\expandafter{\eq@@ST}\fi}{}
+% \end{macrocode}
+% Positioning keys, \texttt{position}\IndexKey{position} and \texttt{fitbounds}\IndexKey{fitbounds}
+% \begin{macrocode}
+\define@key{eforms}{position}{\@eqPA{#1}}
+\define@choicekey{eforms}{fitbounds}[\val\nr]{true,false}[true]{%
+ \ifx\annot@type\annot@type@button
+ \ifcase\nr\relax
+ \def\eq@@FB{true}\or
+ \def\eq@@FB{false}\else
+ \def\eq@@FB{false}\fi
+ \expandafter\@eqFB\expandafter{\eq@@FB}\fi}{}
+% \end{macrocode}
+% This set of key-values\IndexKey{norm}\IndexKey{roll}\IndexKey{down} are designed to fill in the AP dictionary for the check box
+% and the radio button field.
+%\begin{verbatim}
+% appr={norm={on={},off={}}},roll={on={},off={}}},down={on={},off={}}}}
+% \AP{/N << /On {xO} /Off {xX} >> /R << /On {xX} /Off {xO} >>}
+%\end{verbatim}
+% \begin{macrocode}
+\define@key{efappr}{norm}[]{\def\efappr@norm{#1}}
+\define@key{efappr}{roll}[]{\def\efappr@roll{#1}}
+\define@key{efappr}{down}[]{\def\efappr@down{#1}}
+\setkeys{efappr}{norm,roll,down}
+\define@key{efappr@state}{on}[]{%
+ \expandafter\def\csname \ef@state @on\endcsname{#1}}
+\define@key{efappr@state}{off}[]{%
+ \expandafter\def\csname \ef@state @off\endcsname{#1}}
+\let\norm@on\@empty\let\norm@off\@empty
+\let\roll@on\@empty\let\roll@off\@empty
+\let\down@on\@empty\let\down@off\@empty
+% \end{macrocode}
+% The key \texttt{appr}\IndexKey{appr} corresponds to the \textbf{AP} dictionary.
+% and the radio button field.
+%\begin{macrocode}
+\define@key{eforms}{appr}{\setkeys{efappr}{#1}%
+ \def\ef@state{norm}%
+ \edef\ef@edef@tmp{\noexpand\setkeys{efappr@state}{\efappr@norm}}%
+ \ef@edef@tmp\def\ef@state{roll}%
+ \edef\ef@edef@tmp{\noexpand\setkeys{efappr@state}{\efappr@roll}}%
+ \ef@edef@tmp\def\ef@state{down}%
+ \edef\ef@edef@tmp{\noexpand\setkeys{efappr@state}{\efappr@down}}%
+ \ef@edef@tmp\def\eq@AP{%
+ /AP<<
+ \ifx\efappr@norm\@empty\else/N <<
+ \eq@On\space{\norm@on}/Off {\norm@off}>>\fi
+ \ifx\efappr@roll\@empty\else/R <<
+ \eq@On\space{\roll@on}/Off {\roll@off}>>\fi
+ \ifx\efappr@down\@empty\else/D <<
+ \eq@On\space{\down@on}/Off {\down@off}>>\fi
+ \space>>
+ }%
+}
+% \end{macrocode}%
+% The \texttt{autocenter}\IndexKey{autocenter} is a feature of eforms. Use \texttt{autocenter=yes} (the default) to center the bounding
+% box, and use \texttt{autocenter=no} otherwise.
+% \begin{macrocode}
+\define@choicekey{eforms}{autocenter}[\val\nr]{yes,no}
+{%
+ \ifcase\nr\relax\@eqautoCenter{y}\or
+ \@eqautoCenter{n}\fi
+}{}
+\define@choicekey{eforms}{inline}[\val\nr]{yes,no}
+{%
+ \ifcase\nr\relax\@eqinline{y}\or
+ \@eqinline{n}\fi
+}{}
+% \end{macrocode}
+% Set presets\IndexKey{presets} from inside a \cs{ui} argument. For example,
+%\begin{verbatim}
+%\def\myUIOptsi{%
+% border=visible, % Link Type
+% linktxtcolor=blue, % blue link color
+% linewidth=medium, % Line thickness
+% highlight=outline, % Highlight style
+% linestyle=dashed, % Line style
+% bordercolor={1 0 0}, % border color
+% js={app.alert("Good, good, good!")},
+%}
+%\end{verbatim}
+% Then we can say,
+%\begin{verbatim}
+%\setLinkText[\ui{presets={\myUIOptsii}}]{Press Me Again!!}
+%\end{verbatim}
+% \begin{macrocode}
+\define@key{eforms}{presets}{%
+ \ef@jstoks=\expandafter{#1}%
+ \edef\ef@temp@expand{\noexpand\setkeys{eforms}{\the\ef@jstoks}}%
+ \ef@temp@expand
+}
+% \end{macrocode}
+% \texttt{symbolchoice}\IndexKey{symbolchoice}is used with a checkbox or radio button field. This sets the symbol
+% that appears in the field with the box is checked, choices are
+% \texttt{check}, \texttt{circle}, \texttt{cross}, \texttt{diamond},
+% \texttt{square}, and \texttt{star}.
+% \begin{macrocode}
+\define@choicekey{eforms}{symbolchoice}[\val\nr]%
+ {check,circle,cross,diamond,square,star}
+ {\expandafter\@eqsymbolchoice\expandafter{\val}}{}
+% \end{macrocode}
+%
+% \subsection{The Signed Tab}
+%
+% A signature field has a signed tab. On that tab is an option to mark a set of fields
+% as readonly (locked). The locked key controls that option.
+%
+% The \texttt{lock}\IndexKey{lock} key is used with signature fields, currently, there is
+% no nice user interface to this key. Typical entries are
+%\begin{verbatim}
+% lock={/Action/All} % lock all fields in the doc
+% lock={/Action/Include % lock all fields listed in Fields
+% /Fields [(field1)(field2)...]}
+% lock={/Action/Exclude % lock all fields not listed in Fields
+% /Fields [(field1)(field2)...]}
+%\end{verbatim}
+%
+% \begin{macrocode}
+\define@key{eforms}{lock}{\@eqLock{#1}}
+% \end{macrocode}
+%
+% Another option that is included in the Signed tab is titled ``This script executes
+% when field is signed.''
+%
+% This is an option that, through the user interface, is mutually exclusive from
+% locking fields. This option appears to be implemented through the format event.
+% Thus, to populate this option with JavaScript use \texttt{format}. For example,
+%\begin{verbatim}
+% format={app.alert("Thank you for signing this field.");}
+%\end{verbatim}
+%
+% \subsection{Specifying Actions}
+% Here, we offer up various common actions for a document author to choose from.
+%
+% The \texttt{goto}\IndexKey{goto} key is a combines \textsf{GoTo} and \textsf{GoToR} action. There are options for jumping to a page
+% with a particular view, a latex label, or a named destination.
+%
+% The goto key first calls |\setkeys{efgoto}{#1}|, which parses the parameters. Following the
+% reading of the parameters, we determined whether this is a GoTo or a GoToR request, whether
+% we are jumping to a page, a named destination or a latex label.
+%
+% Documentation for the parameters of \texttt{goto} follow this definition.
+%
+% Process the \texttt{goto} key using \pkg{conv-xkv}.
+% \changes{v2.9g}{2017/01/03}{Process the \string\texttt{goto} key using \string\pkg{conv-xkv}}
+% \begin{macrocode}
+\define@key{eforms}{goto}[]{%
+% \end{macrocode}
+% (2017/01/03) Use \cs{cxkvsetkeys} for \texttt{goto}
+% \changes{v2.9g}{2017/01/03}{Use \string\cs{cxkvsetkeys} for \string\texttt{goto}}
+% \begin{macrocode}
+ \cxkvsetkeys{efgoto}{#1}%
+ \ifx\ef@goto@url\@empty
+ \ifx\ef@goto@file\@empty
+ % Jump within the file
+ \def\ef@subtype{/S/GoTo }%
+ \ifcase\eq@drivernum
+ \def\ef@formatpage{{Page\ef@page}}%
+ \or
+ \def\ef@formatpage{\pdfpageref\ef@page\space\space 0 R}%
+ \or
+ \def\ef@formatpage{@page\ef@page}%
+ \fi
+ \let\ef@open\@empty
+ \let\ef@formatfile\@empty
+ \else
+ % Jump to another PDF
+% \ifx\ef@linktxtcolor@set0%
+% \def\ef@thislinkcolor{\@filecolor}\fi
+ \def\ef@subtype{/S/GoToR }%
+ \count0=\ef@page\advance\count0by-1
+ \edef\ef@formatpage{\the\count0 }%
+ \def\ef@formatfile{/F (\ef@goto@file)}%
+ \fi
+ \ifx\ef@goto@targetdest\@empty
+ \ifx\ef@labeldest\@empty
+ % we will jump to a page, it might be the default page
+ \expandafter\@eqA\expandafter{\ef@subtype
+ /D[\ef@formatpage\ef@view]%
+ \ef@formatfile\ef@open}%
+ \else
+ % jump to a label
+ \expandafter\@eqA\expandafter{\ef@subtype%
+ /D (\labelRef{\ef@labeldest})%
+ \ef@formatfile\ef@open}%
+ \fi
+ \else
+ % jump to a target
+ \expandafter\@eqA\expandafter{\ef@subtype%
+ /D (\ef@goto@targetdest)%
+ \ef@formatfile\ef@open}%
+ \fi
+ \else % go to url
+ \ifx\ef@goto@openparams\@empty
+ \@eqA{/S/URI/URI(\ef@goto@url)}\else
+ \@eqA{/S/URI/URI(\ef@goto@url\#\ef@goto@openparams)}%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% The keys for \texttt{goto} are \texttt{file},
+% \texttt{targetdest}, \texttt{labeldest}, \texttt{page},
+% \texttt{view}, and \texttt{open}.
+% Specify a relative path\IndexKey{file} to the PDF file. This will work on the Web if
+% the position is the same relative to the calling file.
+% \begin{macrocode}
+\define@key{efgoto}{file}[]{\def\ef@goto@file{#1}}
+\let\ef@goto@file\@empty
+% \end{macrocode}
+% Specify a url\IndexKey{url} to create a weblink
+% \begin{macrocode}
+\define@key{efgoto}{url}[]{%
+ \if\ef@linktxtcolor@set0\@eqlinktxtcolor{\@urlcolor}\fi
+ \def\ef@goto@url{#1}%
+}
+\let\ef@goto@url\@empty
+% \end{macrocode}
+% Specify a relative path to the PDF file with \texttt{openparams}\IndexKey{openparams}.
+% This will work on the Web if the position is the same relative to the calling file.
+% \begin{macrocode}
+\define@key{efgoto}{openparams}[]{\def\ef@goto@openparams{#1}}
+\let\ef@goto@openparams\@empty
+% \end{macrocode}
+% Jump to a target\IndexKey{targetdest}, perhaps created by |\hypertarget|. For example,
+% if we say |\hypertarget{acrotex}{Welcome!}|, we can then jump to
+% \texttt{acrotex} by specifying \texttt{targetdest=acrotex}.
+% \begin{macrocode}
+\define@key{efgoto}{targetdest}[]{\def\ef@goto@targetdest{#1}}
+\let\ef@goto@targetdest\@empty
+% \end{macrocode}
+% \texttt{labeldest}\IndexKey{labeldest} is the
+% same as targetdest, but now we jump to a destination specified by
+% a latex label. For example, |\section{AcroTeX}\label{acrotex}|,
+% we can jump to this section by specifying \texttt{labeldest=acrotex}.
+% \begin{macrocode}
+\define@key{efgoto}{labeldest}[]{\def\ef@labeldest{#1}}
+\let\ef@labeldest\@empty
+% \end{macrocode}
+% The page number\IndexKey{page} that you want to jump to. If we set \texttt{page=1},
+% we will jump to the first page of the document.
+% \begin{macrocode}
+\define@key{efgoto}{page}[1]{\def\ef@page{#1}}
+\def\ef@page{1}
+\def\ef@view{/Fit}%
+% \end{macrocode}
+% The view\IndexKey{view} can be set when the page key is used. Possible values are
+% \texttt{fitpage}, \texttt{actualsize}, \texttt{fitwidth},
+% \texttt{fitvisible}, and \texttt{inheritzoom}. These terms correspond
+% to Acrobat's UI. When jumping to a destination, the view is set by the
+% destination code.
+%\begin{verbatim}
+%\def\dl@fitpage{/Fit}
+%\def\dl@actualsize{/XYZ -32768 -32768 1.0}
+%\def\dl@fitwidth{/FitH -32768}
+%\def\dl@fitvisible{/FitBH -32768}
+%\def\dl@inheritzoom{/XYZ 0 0 0}
+%\end{verbatim}
+% \begin{macrocode}
+\define@choicekey{efgoto}{view}[\val\nr]{fitpage,actualsize,fitwidth,%
+ fitheight,fitvisible,inheritzoom}
+{%
+ \edef\ef@view{\csname dl@\val\endcsname}%
+}{}
+% \end{macrocode}
+% The \texttt{open}\IndexKey{open} key is use when you specify the \texttt{file} key. The
+% open key determines if a new window is opened or not when we
+% jump to the file. Possible values are \texttt{userpref} (use user preferences),
+% \texttt{new} (open new window), \texttt{existing} (use the existing window).
+% \begin{macrocode}
+\define@choicekey{efgoto}{open}[\val\nr]{userpref,new,existing}
+{%
+ \ifcase\nr\relax
+ \let\ef@open\@empty\or
+ \def\ef@open{/NewWindow true }\or
+ \def\ef@open{/NewWindow false }\fi
+}{}
+\let\ef@open\@empty
+% \end{macrocode}
+% Through the \texttt{launch}\IndexKey{launch} key, we support the subtype \textbf{Launch}. The launch action dictionary
+% contains six keys, four of which we support: \texttt{S}, \texttt{F}, \texttt{Win},
+% and \texttt{New Window} (boolean). The Win key is a dictionary with keys \texttt{F}, \texttt{D}, \texttt{O},
+% and \texttt{P}. If the \texttt{Win} key is used, the F key in the launch dictionary is optional. The parameters
+% of the Win dictionary are passed to the \textsf{ShellExecute}.
+%
+% Process the \texttt{launch} key using \pkg{conv-xkv}.
+% \changes{v2.9g}{2017/01/03}{Process the \string\texttt{launch} key using \string\pkg{conv-xkv}}
+% \begin{macrocode}
+\define@key{eforms}{launch}[]{%
+% \end{macrocode}
+% (2017/01/03) Use \cs{cxkvsetkeys} for \texttt{launch}
+% \changes{v2.9g}{2017/01/03}{Use \string\cs{cxkvsetkeys} for \string\texttt{launch}}
+% \begin{macrocode}
+ \cxkvsetkeys{eflaunch}{#1}%
+ \@eqA{/S/Launch\ifx\ef@launch@file\@empty\else
+ /F(\ef@launch@file)\fi\ef@launch@open
+ \ifx\ef@launch@win\@empty\else
+ /Win<<\ifx\ef@launchwin@file\@empty
+ /F(\ef@launch@file)\else/F(\ef@launchwin@file)\fi
+ \ifx\ef@launchwin@params\@empty\else
+ /P(\ef@launchwin@params)\fi
+ \ifx\ef@launchwin@open\@empty\else
+ /O(\ef@launchwin@open)\fi
+ \ifx\ef@launchwin@dir\@empty\else
+ /D(\ef@launchwin@dir)\fi>>
+ \fi
+ }%
+}
+% \end{macrocode}
+% The value of the \texttt{file} key can be an application or a file. If a
+% document, the operating system will launch an application associated with
+% the file extension. The path can be given relative to the current source
+% folder.
+% \begin{macrocode}
+\define@key{eflaunch}{file}[]{\def\ef@launch@file{#1}}
+\let\ef@launch@file\@empty
+% \end{macrocode}
+% The value of the \texttt{open} key is ignored, if the value of the
+% \texttt{file} key is not a PDF file. If the file is a PDF, a new window
+% can be optionally opened, or not. The default is to use the user
+% preferences.
+% \begin{macrocode}
+\define@choicekey{eflaunch}{open}[\val\nr]{userpref,new,existing}
+{%
+ \ifcase\nr\relax
+ \let\ef@launch@open\@empty\or
+ \def\ef@launch@open{/NewWindow true }\or
+ \def\ef@launch@open{/NewWindow false }\fi
+}{}
+\let\ef@launch@open\@empty
+% \end{macrocode}
+% The PDF Specification allows for additional parameters to be passed on
+% the windows operating system. (No such key is available for the Mac or
+% for Unix.) This is a windows-only feature. The \texttt{winParams} key
+% itself takes key values pairs; these keys are \texttt{file} (\texttt{F}),
+% \texttt{directory} (\texttt{D}), \texttt{open} (\texttt{O}), and
+% \texttt{params} (\texttt{P}), these keys are defined below.
+% \begin{macrocode}
+\define@key{eflaunch}{winParams}[]{\def\ef@launch@win{#1}%
+ \setkeys{eflaunchwin}{#1}%
+}\let\ef@launch@win\@empty
+% \end{macrocode}
+% As far as I can see, the \texttt{file} (application or file) must have a
+% full path (absolute path). The path should be enclosed in double quotes if
+% the path contains any spaces.
+% \begin{macrocode}
+\define@key{eflaunchwin}{file}[]{\def\ef@launchwin@file{#1}}
+\let\ef@launchwin@file\@empty
+% \end{macrocode}
+% As far as I can see, this key does nothing. The value of the key
+% is a path to the (startup) folder.
+% \begin{macrocode}
+\define@key{eflaunchwin}{directory}[]{\def\ef@launchwin@dir{#1}}
+\let\ef@launchwin@dir\@empty
+% \end{macrocode}
+% The \texttt{open} key takes one of two (documented) values: \texttt{open}
+% (the default) or \texttt{print}. But because these parameters are passed
+% to Window's \texttt{ShellExecute} a value of explore is recognized as well
+% (when the value of \texttt{file} is a path to a folder).
+% \begin{macrocode}
+\define@key{eflaunchwin}{open}[]{\def\ef@launchwin@open{#1}}
+\let\ef@launchwin@open\@empty
+% \end{macrocode}
+% The launch parameters. Any paths must be absolute and enclosed in double quotes, if the
+% path contains a space.
+% \begin{macrocode}
+\define@key{eflaunchwin}{params}[]{\def\ef@launchwin@params{#1}}
+\let\ef@launchwin@params\@empty
+% \end{macrocode}
+% The \texttt{js}\IndexKey{js} key is used to execute JavaScript actions on a mouse up trigger.
+% The argument is a JavaScript text string: |js={app.alert("Hello World!"}|.
+% The value of \texttt{js} may be a macro containing JavaScript, which would include
+% a macro created by the \texttt{defineJS} environment of \textsf{insdljs}.
+% \begin{macrocode}
+\define@key{eforms}{js}[]{\@eqA{\JS{#1}}}
+% \end{macrocode}
+% Next up are additional actions, and there are a lot of them. All these
+% take JavaScript code as their values.%
+% \begin{itemize}
+% \item \texttt{mouseup}\IndexKey{mouseup}: Executes its code with a mouse up event. If there is a JavaScript
+% action defined by the \texttt{js} key (or the |\A| key), the \texttt{js} (|\A|) action is executed.
+% \item \texttt{mousedown}\IndexKey{mousedown}: Executes when the mouse is hovering over the field and the user clicks
+% on the mouse.
+% \item \texttt{onenter}\IndexKey{onenter}: Executes its code when the user moves the mouse into the form field (the bounding rectangle).
+% \item \texttt{onexit}\IndexKey{onexit}: Executes its code when the user moves the mouse out of the form field (the bounding rectangle).
+% \item \texttt{onfocus}\IndexKey{onfocus}: Executes its code when the user brings the field into focus.
+% \item \texttt{onblur}\IndexKey{onblur}: Executes its code when the user brings the field loses focus (the user tabs away from
+% the field, or click outside the field).
+% \item \texttt{format}\IndexKey{format}: JavaScript to format the text that appears to
+% the user in a text field or editable combo box.
+% \item \texttt{keystroke}\IndexKey{keystroke}: JavaScript to process each keystroke in a text field or editable combo box.
+% \item \texttt{validate}\IndexKey{validate}: JavaScript to validate the committed data input into a text field or editable combo box.
+% \item \texttt{calculate}\IndexKey{calculate}: JavaScript to make calculates based on the values of other fields.
+% \item \texttt{pageopen}\IndexKey{pageopen}: JavaScript that executes when the page containing the field is opened.
+% \item \texttt{pageclose}\IndexKey{pageclose}: JavaScript that executes when the page containing the field is closed.
+% \item \texttt{pagevisible}\IndexKey{pagevisible}: JavaScript that executes when the page containing the field first becomes visible to the user.
+% \item \texttt{pageinvisible}\IndexKey{pageinvisible}: JavaScript that executes when the page containing the field is no longer visible to the user.
+% \end{itemize}
+% \begin{macrocode}
+\@tfor\ef@AActions:={{mouseup}{AAmouseup}}{{mousedown}{AAmousedown}}%
+ {{onenter}{AAmouseenter}}{{onexit}{AAmouseexit}}%
+ {{onfocus}{AAonfocus}}{{onblur}{AAonblur}}%
+ {{format}{AAformat}}{{keystroke}{AAkeystroke}}%
+ {{validate}{AAvalidate}}{{calculate}{AAcalculate}}%
+ {{pageopen}{AApageopen}}{{pageclose}{AApageclose}}%
+ {{pagevisible}{AApagevisible}}%
+ {{pageinvisible}{AApageinvisible}}\do{%
+ \expandafter\getargs\ef@AActions\ef@jstoks={#1}%
+ \edef\temp@expand@def{\noexpand\define@key{eforms}{\aeb@argi}[]%
+ {\noexpand\csname @eq\aeb@argii\noexpand\endcsname%
+ {\the\ef@jstoks}}}%
+ \temp@expand@def
+}
+% \end{macrocode}
+% The \texttt{objdef}\IndexKey{objdef} key is used to create indirect references to the form field.
+% The value of this key must be unique throughout the whole document. Both \texttt{objdef}
+% and \texttt{taborder}\IndexKey{taborder} are used for structured tabbing. (Distiller only)
+% \begin{macrocode}
+\define@key{eforms}{objdef}{\@eqobjdef{#1}}
+\define@key{eforms}{taborder}{\@eqtaborder{#1}}
+% \end{macrocode}
+% \begin{macrocode}
+%</userinterface>
+% \end{macrocode}
+%
+% \section{Input Driver Specific Code}
+% Now bring in driver dependent macros. The macros defined are
+% the answer macros for the \texttt{shortquiz} environment and most all
+% for the \texttt{quiz} environment. These macros make heavy use of
+% JavaScript. The method of introducing these JavaScripts and
+% PDF code related elements depends on the driver.
+% \changes{v2.9j}{2017/01/22}{\string\cs{eq@rectH} and \string\cs{eq@rectW} pass through \string\cs{setlength}
+% to enable arithmetic for the arguments of those commands}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% \begin{macrocode}
+\input{\eq@drivercode}
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \subsection{For the \texttt{dvips} and \texttt{dvipsone} options}
+% \begin{macrocode}
+%<*epdfmark>
+% \end{macrocode}
+% This is the code for the \texttt{dvipsone} and \texttt{dvips}
+% options. These two are done together. \textsf{hyperref}
+% redefines the macro \cmd{\literalps@out} appropriate to each of
+% these drivers. Both use pdfmarks, so we can put them together.
+% \par\medskip\noindent
+% This sets the rectangle size allowing for a literal
+% hyperlink---meaning we can insert arbitrary links actions.
+% \begin{macrocode}
+\def\Rect#1{\pdf@rect{\textcolor{\@linkcolor}{#1}}}
+% \end{macrocode}
+% Code to hide the solutions page to a quiz that has solutions.
+% \begin{macrocode}
+\def\noPeek#1#2{\literalps@out{%
+ [ {ThisPage} << \noPeekAction{#1}{#2} >> /PUT pdfmark}}
+% \end{macrocode}
+% Driver dependent code (distiller) for choice fields, list and combo.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% Driver dependent code (distiller) for push button fields.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% Driver dependent code (distiller) for radio and button fields.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% Driver dependent code for text fields.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% \changes{v2.5p}{2012/09/25}{Corrected a bug in \string\cs{eq@SigField} for
+% the dvipdfm-type drivers}
+% \begin{macrocode}
+\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
+% \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
+}
+% \end{macrocode}
+% For processing the \texttt{pdfmark} with distiller, the key \texttt{/Action} is
+% required (not \texttt{/A}). This macro converts \texttt{/A} to \texttt{/Action},
+% and is used for the drivers using distiller.
+% \begin{macrocode}
+\def\convertAToAction/A#1\@nil{\def\eq@A{/Action#1}}
+% \end{macrocode}
+% Driver dependent code for links.
+% \begin{macrocode}
+\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\setLinkPbox@driver
+{%
+ \ifx\eq@A\@empty\else\expandafter\convertAToAction\eq@A\@nil\fi
+ \@eqBS{}%
+ \literalps@out{%
+ [ \eq@objdef/Rect [\par@@Rect]
+ \eq@Border
+ \eq@QuadPoints % QuadPoints
+ \common@LinkCode
+ /Subtype /Link
+ /ANN pdfmark}%
+ \to@insertStrucTabOrder{Link}\endgroup
+}
+% \end{macrocode}
+% \begin{macrocode}
+%</epdfmark>
+% \end{macrocode}
+% \subsection{For the \texttt{pdftex} option}
+% \begin{macrocode}
+%<*epdftex>
+% \end{macrocode}
+% Code used in the case of the \texttt{pdftex} option.
+%\par\medskip\noindent
+% Code to hide the solutions page to a quiz that has solutions.
+% \begin{macrocode}
+\def\noPeek#1#2{\global\pdfpageattr=\expandafter{\noPeekAction{#1}{#2}}}
+% \end{macrocode}
+% Support for automatic calculation fields for the \textsf{pdflatex} driver. The command
+% \cs{HyField@AddToFields}, not modified here, is inserted at the end of the code
+% for \cs{eq@choice@driver} and \cs{eq@TextField} below.
+%\changes{v2.8}{2014/11/23}{Modified a macro from hyperref (2012/11/06) to support
+%automatic calculation of fields using eforms (and hyperref).}
+% \begin{macrocode}
+\def\HyField@@AddToFields#1{%
+ \HyField@AfterAuxOpen{%
+ \if@filesw
+ \write\@mainaux{%
+ \string\HyField@AuxAddToFields{#1}}%
+% added for eforms
+ \ifisCalculate\write\@mainaux{%
+ \string\HyField@AuxAddToCoFields{}{#1}}\fi
+% end eforms
+ \fi
+ }%
+}%
+% \end{macrocode}
+% driver dependent code for choice fields
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% \begin{macrocode}
+%</epdftex>
+% \end{macrocode}
+% \subsection{For the \texttt{dvipdfm}, \texttt{dvipdfmx}, \texttt{xetex} options}
+% \begin{macrocode}
+%<*edvipdfm>
+% \end{macrocode}
+% Code to hide the solutions page to a quiz that has solutions.
+% \begin{macrocode}
+\def\noPeek#1#2{\@pdfm@mark{put @thispage << \noPeekAction{#1}{#2} >> }}
+% \end{macrocode}
+% (2016/12/22) Removed \cs{ef@adjHWxetex} in favor of \cs{ef@djXPD}.
+% \changes{v2.9d}{2016/12/22}{Removed \string\cs{ef@adjHWxetex} in favor of \string\cs{ef@djXPD}}
+% \begin{macrocode}
+%\def\ef@adjHWxetex{%
+% \setlength{\@tempdima}{\eq@W@value bp}%
+% \setlength{\@tempdima}{2\@tempdima}%
+% \edef\ef@border@adj{\the\@tempdima}%
+% \setlength{\@tempdima}{\eq@rectH+\ef@border@adj}%
+% \edef\eq@rectH{\the\@tempdima}%
+% \setlength{\@tempdima}{\eq@rectW+\ef@border@adj}%
+% \edef\eq@rectW{\the\@tempdima}}
+\let\ef@adjHWxetex\relax
+% \end{macrocode}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% (2013/06/09) xelatex apparently includes the boundary in its width and height
+% calculations. So we must too.
+% \begin{macrocode}
+\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
+}
+%</edvipdfm>
+% \end{macrocode}
+% \begin{macrocode}
+%<*setcorder>
+% \end{macrocode}
+% \section{Document JavaScripts}
+% \subsection{Support for setting calculation order}
+% \begin{macrocode}
+\begin{insDLJS}{cojs}{eforms: JavaScript to set calculation order}
+var debugCalc=false;
+ef_setCalcOrder.lastIndex=0;
+function ef_setCalcOrder (a) {
+ var o1, o2, f;
+ while ( a.length > 0) {
+ if (a.length > 1) {
+ f=a.shift();
+ o1=this.getField(f);
+ if ( o1 == null ) {
+ ef_CalcOrderErr(f);
+ continue;
+ }
+ f = a[0];
+ o2=this.getField(f);
+ if ( o2 == null ) {
+ ef_CalcOrderErr(f);
+ a.shift();
+ continue;
+ }
+ if ( o2.calcOrderIndex < o1.calcOrderIndex ) {
+ o2.calcOrderIndex=o1.calcOrderIndex+1;
+ ef_setCalcOrder.lastIndex=o2.calcOrderIndex;
+ }
+ } else {
+ f=a.shift();
+ o1=this.getField(f);
+ if ( o1 == null ) {
+ ef_CalcOrderErr(f);
+ continue;
+ }
+ o1.calcOrderIndex=ef_setCalcOrder.lastIndex;
+ }
+ }
+}
+function ef_CalcOrderErr(f) {
+ console.show(); app.beep(0);
+ console.println("calcOrder: the field \""+ f
+ + "\" does not exist in this document, skipping it.\n\n"
+ + "calcOrder: Check the case sensitive spelling of the field.");
+}
+var _EfCalcOrder=\efCalcOrder;
+ef_setCalcOrder(_EfCalcOrder);
+\end{insDLJS}
+%</setcorder>
+% \end{macrocode}
+% \begin{macrocode}
+%<*package>
+\inputCalcOrderJS
+%</package>
+% \end{macrocode}
+% \Finale
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/eforms.ins b/texmf-dist/source/latex/acrotex/eforms.ins
new file mode 100644
index 00000000..b474df85
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/eforms.ins
@@ -0,0 +1,68 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1999-2006 D. P. Story
+%%
+%% This file is part of the `AcroTeX eDucation Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2008/04/22}
+\def\batchfile{eforms.ins}
+%
+% If you can assume that the target audience for the document all have
+% Acrobat Reader 5.0 or later, then chance the following switch to true,
+% else, leave it as false.
+
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+
+\generate{%
+ \file{eforms.sty}{\from{eforms.dtx}{copyright,package}}
+ \file{epdfmark.def}{\from{eforms.dtx}{copyright,epdfmark}}
+ \file{epdftex.def}{\from{eforms.dtx}{copyright,epdftex}}
+ \file{edvipdfm.def}{\from{eforms.dtx}{copyright,edvipdfm}}
+ \file{uieforms.def}{\from{eforms.dtx}{copyright,userinterface}}
+ \file{setcorder.def}{\from{eforms.dtx}{copyright,setcorder}}
+}
+
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/exerquiz.dtx b/texmf-dist/source/latex/acrotex/exerquiz.dtx
new file mode 100644
index 00000000..0cae45ef
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/exerquiz.dtx
@@ -0,0 +1,13306 @@
+% \iffalse
+% makeindex -s gglo.ist -o exerquiz.gls exerquiz.glo
+% makeindex -s gind.ist -o exerquiz.ind exerquiz.idx
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%</copyright>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{exerquiz}
+%<driver>\ProvidesFile{exerquiz.drv}
+%<aebjs>\ProvidesFile{aebjs.def}
+%<eqexam>\ProvidesFile{eqexam.def}
+%<randomize>\ProvidesFile{aebrandom.def}
+%<sumrytbls>\ProvidesFile{aebsumrytbls.def}
+%<template>\ProvidesFile{template.def}
+%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2017/03/16 v7.8g %
+%<package> Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
+%<driver> Exerquiz documentation driver file (dps)]
+%<aebjs> Exerquiz document level JavaScript (dps)]
+%<eqexam> Exerquiz support file for eqexam (dps)]
+%<randomize> Exerquiz support for randomization (dps)]
+%<sumrytbls> Exerquiz support for summary tables (dps)]
+%<template> Exerquiz template for language support (dps)]
+%<eqfr>\ProvidesFile{eqfr.def}
+%<eqde>\ProvidesFile{eqde.def}
+%<eqno>\ProvidesFile{eqno.def}
+%<eqnl>\ProvidesFile{eqnl.def}
+%<eqes>\ProvidesFile{eqes.def}
+%<eqit>\ProvidesFile{eqit.def}
+%<eqru>\ProvidesFile{eqru.def}
+%<eqda>\ProvidesFile{eqda.def}
+%<eqpo>\ProvidesFile{eqpo.def}
+%<eqfin>\ProvidesFile{eqfin.def}
+%<eqcat>\ProvidesFile{eqcat.def}
+%<eqcz>\ProvidesFile{eqcz.def}
+%<eqbr>\ProvidesFile{eqbr.def}
+%<eqtr>\ProvidesFile{eqtr.def}
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[colorlinks,hyperindex=false]{hyperref}
+\pdfstringdefDisableCommands{\let\\\textbackslash}
+\OnlyDescription % comment out for implementation details
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{exerquiz}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{exerquiz}{aebdocfmt.def cannot be found}}
+\begin{document}
+ \let\env\texttt\let\pkg\textsf
+ \GetFileInfo{exerquiz.sty}
+ \title{Exerquiz: Exercises and Quizzes for \LaTeX/PDF}
+ \author{D. P. Story\\
+ Email: \texttt{dpstory@uakron.edu}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \let\Email\texttt
+ \DocInput{exerquiz.dtx}
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\PrintIndex}{\paragraph*{Index}
+ The index goes here.\\Execute
+ \texttt{makeindex -s gind.ist -o exerquiz.ind exerquiz.idx} on the command line
+ and recompile \texttt{exerquiz.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of
+ changes goes here.\\Execute
+ \texttt{makeindex -s gglo.ist -o exerquiz.gls exerquiz.glo} on the command line
+ and recompile \texttt{exerquiz.dtx}.}
+\end{document}
+%</driver>
+% \fi
+%
+% \MakeShortVerb{|}
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{exerquiz}{Inputting aebdonotindex.def}}
+% {\PackageInfo{exerquiz}{aebdonotindex.def cannot be found}}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% \changes{v7.7k}{2016/04/18}{Minor bug fixes, improved driver recognition}
+% \changes{v7.7j}{2016/04/05}{Change in eforms to 2016/04/05 v2.8f}
+%
+% \section{Package options and setup}\label{options}
+%
+% Introduce a number of useful options for \textsl{exerquiz}.
+% \subsection{Options for paper, solutions, JavaScript and preview}
+% \begin{macrocode}
+\usepackage{keyval}
+% \end{macrocode}
+%\changes{v6.4t}{2012/06/18}{Added ifpdf as a required package}
+% \begin{macrocode}
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+\@ifundefined{exqtable}{\def\exqtable{table}}{}
+\IfFileExists{xcolor.sty}{%
+ \def\eq@ColorPackage{xcolor}%
+ \PassOptionsToPackage{\exqtable,hyperref}{xcolor}}
+ {\def\eq@ColorPackage{color}}
+% \end{macrocode}
+% \IndexOpt{noxcolor} An option to force
+% the use of the \textsf{color} package.
+% \begin{macrocode}
+\DeclareOption{noxcolor}{\def\eq@ColorPackage{color}}
+% \end{macrocode}
+% \IndexOpt{forpaper}\IndexOpt{forcolorpaper}
+% Pass the |monochrome| option to the color package
+%\changes{v6.06a}{2007/04/09}
+%{
+% Added the \texttt{forcolorpaper} option for those using
+% \textsf{exerquiz} without \textsf{web}.
+%}
+% \begin{macrocode}
+\DeclareOption{forpaper}{%
+ \eqforpapertrue\PassOptionsToPackage{monochrome}{\eq@ColorPackage}
+ \AtBeginDocument{\ifnum\eq@drivernum=4 \else\AllowPeeking\fi}
+}
+\DeclareOption{forcolorpaper}{\eqforpapertrue % for print
+ \AtBeginDocument{\ifnum\eq@drivernum=4 \else\AllowPeeking\fi}
+}
+% \end{macrocode}
+% \IndexOpt{preview}
+% With this option, the bounding boxes of all form fields appear in the
+% dvi preview. Use this option of properly positioning your fields, then
+% remove this option on the final build of the document. This option is no
+% appropriate for the \texttt{pdftex} option which does not have a dvi preview.
+% \begin{macrocode}
+\DeclareOption{preview}{\PassOptionsToPackage{preview}{eforms}}
+% \end{macrocode}
+% \IndexOpt{nosolutions}
+% With the option, the solutions to the exercises are not
+% included in the typeset document.
+% \begin{macrocode}
+\DeclareOption{nosolutions}{\eq@nosolutionstrue\eq@nolinktrue}
+% \end{macrocode}
+% \IndexOpt{noquizolutions}
+% No solutions for quizzes (shortquiz and quiz environments).
+% \begin{macrocode}
+\DeclareOption{noquizsolutions}{\eq@noquizsolutionstrue\eq@nolinktrue}
+% \end{macrocode}
+% \IndexOpt{online}
+% An \texttt{online} options.
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\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
+%</package|eqexam>
+%<*package>
+\DeclareOption{online}{\let\eq@online\eq@YES}
+\let\eq@online\eq@NO
+% \end{macrocode}
+% \IndexOpt{nohiddensolutions}\IndexOpt{noHiddensolutions}
+% Overrides any hidden solutions specified with the \texttt{exercise}
+% environment.
+% \begin{macrocode}
+\DeclareOption{nohiddensolutions}{\eq@globalshowsolutionstrue}
+\DeclareOption{noHiddensolutions}%
+ {\eq@globalshowsolutionstrue\AtBeginDocument{\def\Hidesymbol{h}}}
+% \end{macrocode}
+% \IndexOpt{solutionsafter}
+% Solutions will appear after the statement of the exercise.
+% \begin{macrocode}
+\DeclareOption{solutionsafter}{\eq@solutionsaftertrue\eq@nolinktrue}
+% \end{macrocode}
+% \IndexOpt{solutionsonly}
+% Here is a highly specialized option, put in at the request of a former friend.
+%\changes{v6.2f}{2007/12/21}{Added a solutionsonly option}
+% \begin{macrocode}
+\DeclareOption{solutionsonly}{\solutionsonlytrue\answerkeytrue
+ \therearesolutionstrue\AtEndOfPackage{\let\exerSolnsHeadnToc\relax}}
+\newif\ifsolutionsonly\solutionsonlyfalse
+% \end{macrocode}
+% \IndexOpt{contsolns}
+% This option requires both \textsf{web} and \textsf{exerquiz}. The package
+% tests for the presence of the \textsf{web} and whether webheadings pagestyle
+% is used.
+% \begin{macrocode}
+\DeclareOption{contsolns}{\AtEndOfPackage{\InputIfFileExists
+ {contsolns.def}{\contsolnsInputMsg}{\contsolnsErrorMsg}}}
+\def\contsolnsInputMsg{\PackageInfo{exerquiz}{contsolns option,
+ inputting file contsolns.def}}
+\def\contsolnsErrorMsg{\PackageWarning{exerquiz}{contsolns option,
+ cannot find file contsolns.def}}
+% \end{macrocode}
+% \IndexOpt{nocorrections}
+% The code for correcting the |quiz| environment is
+% not written; this results in a smaller file.
+% \begin{macrocode}
+\DeclareOption{nocorrections}{\nocorrectionstrue}
+% \end{macrocode}
+% \IndexOpt{proofing}
+% An option for marking the correct answers for shortquiz and quiz
+% \begin{macrocode}
+\DeclareOption{proofing}{\eq@proofingtrue}
+% \end{macrocode}
+% \IndexOpt{showgrayletters}
+% When this option is in effect, capital letters in gray appear under
+% the multiple choice question boxes of quizzes.
+% \begin{macrocode}
+\newif\ifaebshowgrayletters\aebshowgraylettersfalse
+\DeclareOption{showgrayletters}{\aebshowgrayletterstrue}
+% \end{macrocode}
+% \IndexOpt{vspacewithsolns}
+% This is for the \texttt{vspacewithsolns} option designed for
+% \textsf{eqexam}, but can be used in \textsf{exerquiz}. The switch
+% \cs{ifvspacewithsolns} is defined in \textsf{eqexam}, and we olnly
+% define it here is \textsf{eqexam} is not loaded.
+% \changes{v6.3x}{2011/04/05}{Added \texttt{vspacewithsolns}}
+% \begin{macrocode}
+\@ifundefined{ifvspacewithsolns}{%
+ \DeclareOption{vspacewithsolns}{\vspacewithsolnstrue}
+ \newif\ifvspacewithsolns\vspacewithsolnsfalse
+}{}
+% \end{macrocode}
+% \IndexOpt{nodljs}
+% An option for excluding all DLJS from the document. Useful with the
+% \texttt{forpaper} option, or a document destined to be printed. Pass
+% on to insdljs package.
+% \begin{macrocode}
+\DeclareOption{nodljs}{\PassOptionsToPackage{nodljs}{insdljs}%
+ \AtEndOfPackage{\let\importdljs\eq@YES}}
+% \end{macrocode}
+% \IndexOpt{execAfter}
+% Execute any JS defined within the \texttt{execJS} environment. Works only for
+% authors using Acrobat 5.0 or Acrobat Approval.
+% \begin{macrocode}
+\DeclareOption{execJS}{\PassOptionsToPackage{execJS}{insdljs}}
+% \end{macrocode}
+% \IndexOpt{exercisesonly}
+% If the document author wants only to create a series of exercises, no quizzes, there is no
+% need for the Document-level JavaScript. So, we have a couple of convenience options.
+% \begin{macrocode}
+\DeclareOption{exercisesonly}{\PassOptionsToPackage{nodljs}{insdljs}}
+% \end{macrocode}
+% \IndexOpt{debug}
+% An option for debugging JavaScript. Pass on to insdljs package.
+% \begin{macrocode}
+\DeclareOption{debug}{\PassOptionsToPackage{debug}{insdljs}}
+% \end{macrocode}
+% \IndexOpt{allowrandomize}
+% Beginning with version 6.1 of \textsf{exerquiz}, it is possible to randomize
+% the choices in a multiple choice question. These choices must be set off
+% by the command \cs{bChoices}/\cs{eChoices} pair. The command \cs{bChoices} now has
+% two optional arguments \texttt{nCols} and \texttt{random}. See \autoref{randomize}.
+% \begin{macrocode}
+\DeclareOption{allowrandomize}{\AtEndOfPackage{\inputRandomizeChoices}}
+\def\inputRandomizeChoices{\InputIfFileExists{aebrandom.def}
+ {\PackageInfo{exerquiz}{inputting aebrandom.def}}
+ {cannot find aebrandom.def}}
+% \end{macrocode}
+% \IndexOpt{usesumrytbls}
+% \begin{macrocode}
+\newif \ifusesumrytbls \usesumrytblsfalse
+\DeclareOption{usesumrytbls}{\usesumrytblstrue
+ \def\inputSumryTblCode{\InputIfFileExists{aebsumrytbls.def}
+ {\PackageInfo{exerquiz}{inputting aebsumrytbls.def}}%
+ {cannot find aebsumrytbls.def}}}
+\let\inputSumryTblCode\relax
+% \end{macrocode}
+% The \IndexOpt{usemcfi}\texttt{usemcfi} option inputs special code for creating a MC/math fill-in question, a type
+% of question suggested to me by Stefka K.\ of Bulgaria.
+% \begin{macrocode}
+\DeclareOption{usemcfi}{%
+ \def\inputMCFICode{\InputIfFileExists{usemcfi.def}
+ {\PackageInfo{exerquiz}{inputting usemcfi.def}}%
+ {cannot find usemcfi.def}}}
+\let\inputMCFICode\relax
+% \end{macrocode}
+% \changes{v7.7o}{2016/07/08}{Added switch \string\cs{ifwithinMCFI}}
+% The switch \cs{ifwithinMCFI} help to determine if a quiz problem occurs within
+% the command \cs{bMCFI}/\cs{eMCFI} pair.
+% \begin{macrocode}
+\newif\ifwithinMCFI\withinMCFIfalse
+% \end{macrocode}
+%
+% \subsection{Driver Options}
+% The \textsf{web} package passes these driver options to \textsf{exerquiz}.
+% These options are needed is \textsf{exerquiz} is used without
+% \textsf{web}; in this case, the options below must explicitly included.
+% \IndexOpt{dvipsone}\IndexOpt{dvips}\IndexOpt{pdftex}
+% Set the driver dependent code for the |quiz| environments.
+% \begin{macrocode}
+% \def\eq@drivernum{5} % 5 = no choice
+\DeclareOption{dvipsone}{%
+ \def\eq@drivernum{0}\def\eq@driver{dvipsone}%
+ \PassOptionsToPackage{dvipsone}{eforms}
+}
+\DeclareOption{dvips}{%
+ \def\eq@drivernum{0}\def\eq@driver{dvips}%
+ \PassOptionsToPackage{dvips}{eforms}
+}
+\DeclareOption{pdftex}{%
+ \def\eq@drivernum{1}\def\eq@driver{pdftex}%
+ \PassOptionsToPackage{pdftex}{\eq@ColorPackage}
+ \PassOptionsToPackage{pdftex}{eforms}
+}
+% \end{macrocode}
+% \IndexOpt{dvipdfm}\IndexOpt{dvipdfmx}\IndexOpt{xetex}
+% Set the driver dependent code for the \texttt{quiz} and \texttt{quiz}
+% environments.
+% \begin{macrocode}
+\DeclareOption{dvipdfm}{%
+ \def\eq@drivernum{2}\def\eq@driver{dvipdfm}%
+ \PassOptionsToPackage{dvipdfm}{\eq@ColorPackage}%
+ \PassOptionsToPackage{dvipdfm}{eforms}%
+}
+\DeclareOption{dvipdfmx}{%
+ \def\eq@drivernum{2}\def\eq@driver{dvipdfmx}%
+ \PassOptionsToPackage{dvipdfmx}{\eq@ColorPackage}%
+ \PassOptionsToPackage{dvipdfmx}{eforms}%
+}
+\DeclareOption{xetex}{%
+ \def\eq@drivernum{2}\def\eq@driver{xetex}%
+ \PassOptionsToPackage{xetex}{\eq@ColorPackage}
+ \PassOptionsToPackage{xetex}{eforms}%
+}
+% \end{macrocode}
+% \IndexOpt{textures}
+% This option, and testing are due to Ross Moore 3/6/02
+% \begin{macrocode}
+\DeclareOption{textures}{\def\eq@drivernum{3}%
+ \def\eq@driver{textures}%
+ \PassOptionsToPackage{textures}{\eq@ColorPackage}%
+ \PassOptionsToPackage{textures}{eforms}%
+}
+% \end{macrocode}
+% \IndexOpt{dviwindo}
+% Set \cmd{\eq@noformstrue}, this inserts an \cmd{\endinput} just after
+% the end of the |exercise| environment. No quizzes for
+% \texttt{dviwindo}.
+% \begin{macrocode}
+\DeclareOption{dviwindo}{\def\eq@drivernum{4}\def\eq@driver{dviwindo}%
+ \eq@noformstrue\PassOptionsToPackage{nodljs}{insdljs}}
+% \end{macrocode}
+% If no driver is passed to \textsf{exerquiz}, assume it is
+% dvipsone or dvips---\textsf{hyperref} defines the specials.
+% Default driver dvipsone/dvips
+% \def\eq@drivernum{5}
+% \def\eq@driver{dvipsone/dvips}
+% \def\eq@driver{no driver specified}
+% \IndexOpt{unicode}
+% Passes the unicode option to \textsf{hyperref}.
+% \changes{v6.3}{2008/03/19}
+% {
+% Added the \texttt{unicode} option, which is passed to hyperref.
+% }
+% \begin{macrocode}
+\DeclareOption{unicode}{\PassOptionsToPackage{unicode}{hyperref}}
+% \end{macrocode}
+% \IndexOpt{useui}
+% Passes the useui option to eforms. With this option,
+% the key-value pairs \textsl{\'{a} la xkeyval} can be used.
+% \changes{v6.3}{2008/03/19}
+% {
+% Added the \texttt{useui} option, which is passed to eforms.
+% }
+% \begin{macrocode}
+\DeclareOption{useui}{\PassOptionsToPackage{useui}{eforms}}
+% \end{macrocode}
+%
+% \subsection{Language Options}
+% \textsf{exerquiz} uses many language dependent typeset labels
+% and JavaScript messages. These messages are defined in the
+% English language in Section~\ref{ss:ldm}. The language options
+% defines the macro \cmd{\LangRedefinition} to input language
+% dependent redefinitions of these messages. Initially,
+% \cmd{\LangRedefinition} is set to relax and no redefinition files
+% are input.
+% \begin{macrocode}
+\let\LangRedefinitions\relax
+% \end{macrocode}
+% \IndexOpt{french}
+% Translations due to Jean-Michel SARLAT.
+% \begin{macrocode}
+\DeclareOption{french}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqfr.def}%
+ {\PackageInfo{exerquiz}{Inputting French Option}}%
+ {\PackageInfo{exerquiz}{French Option: Cannot find the file
+ eqfr.def, using the default, English.}}}}
+% \end{macrocode}
+% \IndexOpt{german}
+% Translation due to Michael Wiedmann.
+% \begin{macrocode}
+\DeclareOption{german}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqde.def}%
+ {\PackageInfo{exerquiz}{Inputting German Option}}%
+ {\PackageInfo{exerquiz}{German Option: Kann die Datei eqde.def
+ nicht finden, benutze Default, Englisch.}}}}
+% \end{macrocode}
+% \IndexOpt{norsk}
+% Translation due to Hans Fredrik Nordhaug.
+% \begin{macrocode}
+\DeclareOption{norsk}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqno.def}%
+ {\PackageInfo{exerquiz}{Inputting Norsk Option}}%
+ {\PackageInfo{exerquiz}{Norsk Option: Cannot find the file eqno.def,
+ using the default, English.}}}}
+% \end{macrocode}
+% \IndexOpt{dutch}
+% Translation due to Henny Wilbrink
+% \begin{macrocode}
+\DeclareOption{dutch}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqnl.def}%
+ {\PackageInfo{exerquiz}{Inputting Dutch Option}}%
+ {\PackageInfo{exerquiz}{Dutch Option: Kan bestand eqnl.def niet
+ vinden, gebruik default, Engels.}}}}
+% \end{macrocode}
+% \IndexOpt{spanish}
+% Translation due to Pedro Luis Luque
+% \begin{macrocode}
+\DeclareOption{spanish}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqes.def}%
+ {\PackageInfo{exerquiz}{Inputting Spanish Option}}%
+ {\PackageInfo{exerquiz}{Spanish Option: Opci\'on Espa\~nola: no puede
+ encontrar el fichero eqes.def, usar\'a por defecto, English.}}}}
+% \end{macrocode}
+% \IndexOpt{italian}
+% Translation due to PierLuigi Zezza
+% \begin{macrocode}
+\DeclareOption{italian}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqit.def}%
+ {\PackageInfo{exerquiz}{Opzione Lingua Italiana}}%
+ {\PackageInfo{exerquiz}{pzione Italiano: Non trovo il file eqit.def,
+ utilizzo quello di default, English.}}}}
+% \end{macrocode}
+% \IndexOpt{russian}
+% Translation due to Sergei V. Znamenskii
+% \begin{macrocode}
+\DeclareOption{russian}{%
+ \@ifpackageloaded{hyperref}{%
+ \ifHy@unicode\else\PackageWarning{exerquiz}{%
+ The unicode option recommended for hyperref\MessageBreak}\fi
+ }{\PassOptionsToPackage{unicode}{hyperref}}
+ \def\LangRedefinitions{\InputIfFileExists{eqru.def}%
+ {\PackageInfo{exerquiz}{Inputting Russian Option}}%
+ {\PackageInfo{exerquiz}{Russian Option: Cannot find the file
+ eqru.def, using the default, English.}}}}
+% \end{macrocode}
+% \IndexOpt{dansk}
+% Translation due to Erik Leimand
+% \begin{macrocode}
+\DeclareOption{dansk}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqda.def}%
+ {\PackageInfo{exerquiz}{Inputting Dansk Option}}%
+ {\PackageInfo{exerquiz}{Dansk Option: Cannot find the file eqda.def,
+ using the default, English.}}}}
+% \end{macrocode}
+% \IndexOpt{polish}
+% Translation due to Jerzy Mycielski
+% \begin{macrocode}
+\DeclareOption{polish}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqpo.def}%
+ {\PackageInfo{exerquiz}{Inputting Polish Option}}%
+ {\PackageInfo{exerquiz}{Polish Option: Cannot find the file
+ eqpo.def, using the default, English.}}}}
+% \end{macrocode}
+% \IndexOpt{finnish}
+% Translation due to Paivi Porras
+% \begin{macrocode}
+\DeclareOption{finnish}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqfin.def}%
+ {\PackageInfo{exerquiz}{Inputting Finnish Option}}%
+ {\PackageInfo{exerquiz}{Finnish Option: Cannot find the file
+ eqfin.def, using the default, English.}}}}
+% \end{macrocode}
+% \IndexOpt{catalan}
+% Translation due to Ramon Ballester
+% \begin{macrocode}
+\DeclareOption{catalan}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqcat.def}%
+ {\PackageInfo{exerquiz}{Inputting Catalan Option}}%
+ {\PackageInfo{exerquiz}{Catalan Option: Cannot find the file
+ eqcat.def, using the default, English.}}}}
+% \end{macrocode}
+% \IndexOpt{czech}
+% Translation due to Robert Marik
+% \begin{macrocode}
+\DeclareOption{czech}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqcz.def}%
+ {\PackageInfo{exerquiz}{Inputting Czech Option}}%
+ {\PackageInfo{exerquiz}{Czech Option: Cannot find the file eqcz.def,
+ using the default, English.}}}}
+% \end{macrocode}
+% \IndexOpt{brazil}
+% Translation due to Koichi Sameshima
+% \begin{macrocode}
+\DeclareOption{brazil}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqbr.def}%
+ {\PackageInfo{exerquiz}{Inputting Brazilian Portuguese Option}}%
+ {\PackageInfo{exerquiz}{Portuguese Option: Opc\~ao Portugu\^es:
+ n\~ao foi poss\'ivel encontrar o arquivo eqbr.def, usaremos
+ o padr\~ao, English.}}}}
+% \end{macrocode}
+% \IndexOpt{turkish}
+% Translation due to Mahmut Ko\c{c}ak
+% \begin{macrocode}
+\DeclareOption{turkish}{%
+ \@ifpackageloaded{hyperref}{%
+ \ifHy@unicode\else\PackageWarning{exerquiz}{%
+ The unicode option recommended for hyperref\MessageBreak}\fi
+ }{\PassOptionsToPackage{unicode}{hyperref}}
+ \def\LangRedefinitions{\InputIfFileExists{eqtr.def}%
+ {\PackageInfo{exerquiz}{Inputting Turkish Option}}%
+ {\PackageInfo{exerquiz}{Cannot find the file eqtk.def,
+ using the default, English.}}}}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{\eq@ColorPackage}}
+\@ifpackageloaded{xcolor}%
+{%
+ \@ifpackagelater{xcolor}{2004/07/04}{}
+ {%
+ \PackageError{exerquiz}{%
+ *************************************************\MessageBreak
+ * Your Version of `xcolor.sty' is too old!\MessageBreak
+ * You need the version from 2004/07/04 or newer\MessageBreak
+ * or use: \string\usepackage[noxcolor]{exerquiz}\MessageBreak
+ *************************************************}{}%
+ }%
+}{}
+% \end{macrocode}
+% \subsection{Switches}
+% Boolean switches used by the declared options.
+% \begin{macrocode}
+\let\iterate\relax
+\newif\ifeq@solutionsafter \eq@solutionsafterfalse
+\newif\ifeq@hidesolution \eq@hidesolutionfalse
+\newif\ifeq@globalshowsolutions \eq@globalshowsolutionsfalse
+\newif\ifeq@nosolutions \eq@nosolutionsfalse
+\newif\ifeq@proofing \eq@proofingfalse
+\providecommand\turnProofingOn{\eq@proofingtrue}
+\providecommand\turnProofingOff{\eq@proofingfalse}
+\newif\ifeqforpaper \eqforpaperfalse
+%</package>
+%<*package|eqexam>
+\newif\ifeq@noforms \eq@noformsfalse
+\newif\ifeq@noquizsolutions \eq@noquizsolutionsfalse % dps new
+\newif\ifnocorrections \nocorrectionsfalse
+% changed \ifeq@nocorrections to \ifnocorrections
+%\newif\ifeq@nocorrections \eq@nocorrectionsfalse
+% \end{macrocode}
+% (4/28/11) A switch to control whether the declared vertical space
+% for the \texttt{solution} environment will be preserved during the \texttt{answerkey}
+% option. This is an \textsf{eqexam} feature.
+%\changes{v6.3z}{2011/04/28}{%
+%Created a switch \cs{ifkeepdeclaredvspacing}, used primarily by \textsf{eqexam}}
+% \begin{macrocode}
+\newif\ifkeepdeclaredvspacing \keepdeclaredvspacingfalse
+\newif\ifeq@nolink \eq@nolinkfalse
+\def\eq@ckglobalhide{\ifeq@globalshowsolutions\eq@hidesolutionfalse\fi}
+\def\hidesymbol{h}\def\Hidesymbol{H}
+% \end{macrocode}
+% When the first solution is written, \cs{therearesolutions} is
+% made true. When the solutions are input back into the file, and
+% this switch is still false, then no exercise header is typeset;
+% this avoids an empty exercise section with only the header.
+% \begin{macrocode}
+\newif\iftherearesolutions \therearesolutionsfalse
+% \end{macrocode}
+%\DescribeMacro{\ifIsRespBox}\cmd{\ifIsRespBox} is a switch used to detect the presence
+% of a response box, math or text, on a page. The switch is used to automatically place
+% an \cs{AnswerField} in the running footer.
+% \begin{macrocode}
+\newif\ifIsRespBox \global\IsRespBoxfalse
+% \end{macrocode}
+% \begin{macro}{\SolutionsAfter}
+% \begin{macro}{\SolutionsAtEnd}
+% \begin{macro}{\NoSpaceToWork}
+% \begin{macro}{\SpaceToWork}
+% Some macros to turn \cs{eq@solutionsafter} on or off, and to suppress
+% the vertical space in the solutions environment when the \texttt{nosolutions}
+% option is in effect. Concerning leaving space to work, the default is to
+% leave space to work (\cs{SpaceToWork}).
+% \begin{macrocode}
+\def\SolutionsAfter{\eq@solutionsaftertrue\eq@nolinktrue}
+\newif\ifcqSA\cqSAfalse
+\def\SolutionsAtEnd{\eq@solutionsafterfalse\eq@nolinkfalse}
+\def\NoSpaceToWork{\let\eq@insertverticalspace\eq@NO}
+\def\SpaceToWork{\let\eq@insertverticalspace\eq@YES}
+\SpaceToWork
+% \end{macrocode}
+% (2017/03/16) Made def of \cs{ifNoSolutions} long.
+% \changes{v7.8g}{2017/03/16}{Made def of \string\cs{ifNoSolutions} long}
+% \begin{macrocode}
+\long\def\ifNoSolutions#1#2{%
+ \ifeq@nosolutions\expandafter#1\else
+ \expandafter#2\fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% Some switches to control the randomization process, which comes into play
+% with the \texttt{allowrandomize} option. These are set to \texttt{false} initially,
+% The first one is set locally by the random option of \cs{bChoices}; the second
+% one overrides the first so that all multiple choice questions can be randomized
+% without having to edit every \cs{bChoices} command. The user has access to this
+% switch through the \cs{turnOnRandomize} and \cs{obeyLocalRandomize} commands.
+% The topic of randomizing the choices is taken up in \autoref{randomize}.
+% \begin{macrocode}
+\newif\ifeq@randomizeChoices \eq@randomizeChoicesfalse
+\newif\ifeq@randomizeallChoices \eq@randomizeallChoicesfalse
+% \end{macrocode}
+% \begin{macro}{\turnOnRandomize}
+% \begin{macro}{\obeyLocalRandomize}
+% When the \texttt{allowrandomize} option is in effect, the randomization can be
+% turned on and off locally by the optional parameter in \cs{bChoices}. These
+% two commands can be used to override \texttt{random=false}. Consequently,
+% by saying \cs{turnOnRandomize} you can convert your old multiple choice
+% questions so that are randomly arranged, without having to edit them and
+% add the optional \texttt{random} key.
+% \begin{macrocode}
+\def\turnOnRandomize{\eq@randomizeallChoicestrue}
+\def\obeyLocalRandomize{\eq@randomizeallChoicesfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\saveRandomSeed}
+% \begin{macro}{\inputRandomSeed}
+% These two commands are used when the \texttt{allowrandomize} option is in effect,
+% Until then, they do nothing. See the definition in the section \autoref{randomize}.
+% \begin{macrocode}
+\let\saveRandomSeed\relax
+\let\inputRandomSeed\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \begin{macro}{\CorrectionsOn}
+% \begin{macro}{\CorrectionsOff}
+% Use these macros to locally turn on or off the inclusion
+% of the correction code.
+% \begin{macrocode}
+\def\CorrectionsOn{\global\nocorrectionsfalse}
+\def\CorrectionsOff{\global\nocorrectionstrue}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \subsection{Process Options and Require Packages}
+% The \texttt{quiz} environments use Acrobat forms and JavaScript
+% so we need to load in the AcroForm Dictionary---unless the
+% \texttt{dviwindo} (\cmd{\eq@noformstrue}) option is requested.
+%\changes{v6.3y}{2011/04/23}{%
+% As per Heiko's suggestion, I've change the \texttt{Form} environment
+% no longer creates a grouping. This was causing problems with
+% the \textsf{atveryend} package.
+%}
+% \begin{macrocode}
+\AtBeginDocument{\ifeq@noforms\else\Form\fi}
+\AtEndDocument{%
+ \include@solutions
+ \ifeq@noforms\else\include@quizsolutions\fi
+ \clearpage
+ \csname endForm\endcsname
+% \end{macrocode}
+% (04/12/07) I put a \cs{clearpage} for some good reason, can't remember, I think
+% it had to do with templates, but dvipdfm has problems with this. The document
+% level JavaScript are not inserted, they are cleared out by the \cs{clearpage}.
+% So, we'll only to a \cs{clearpage} if the driver is not dvipdfm.
+% \begin{macrocode}
+ \if\eq@drivernum2\else\clearpage\fi
+}
+% \end{macrocode}
+% \subsection{Load Configuration File: exerquiz.cfg}
+% Look for configuration file, exerquiz.cfg.
+%\begin{verbatim}
+% \ExecuteOptions{noquizsolutions,nocorrections}
+%\end{verbatim}
+% sets several options.
+% \begin{macrocode}
+\InputIfFileExists{exerquiz.cfg}{}{}
+% \end{macrocode}
+% If web is already loaded, we use its driver.
+% \changes{v6.4t}{2012/06/18}{Testing for pdflatex and xetex}
+% \begin{macrocode}
+\@ifpackageloaded{web}{%
+ \ExecuteOptions{\eq@driver@name}%
+}{%
+ \ifpdf\ExecuteOptions{pdftex}\else
+ \ifxetex\ExecuteOptions{xetex}\else
+ \InputIfFileExists{web.cfg}{}
+ {\@ifundefined{l@tex@@@@driver}{\ExecuteOptions{dvips}}
+ {\ExecuteOptions{dvipsone}}}\fi\fi
+}
+% \end{macrocode}
+% \begin{macrocode}
+\ProcessOptions
+% \end{macrocode}
+% Input required packages.
+% \changes{v7.03}{2015/03/02}{Added the \texttt{array} package, mostly
+% for use in the tabular setup of parts in tabular mode.}
+% \begin{macrocode}
+\RequirePackage{array}
+\RequirePackage{\eq@ColorPackage}
+\RequirePackage{verbatim}
+\RequirePackage{comment}
+\RequirePackage{hyperref}
+\RequirePackage{amssymb}% used for return symbols
+\RequirePackage{eforms}[2012/06/20]
+% \end{macrocode}
+% \begin{macrocode}
+\@ifundefined{eq@drivernum}{%
+ \PackageError{exerquiz}%
+ {You have not specified dvips, dvipsone, pdftex, dvipdfm,
+ dvipdfmx, or xetex
+ \MessageBreak in the option list of the exerquiz package}
+ {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm,
+ dvipdfmx, or xetex
+ \MessageBreak in the option list of the exerquiz package.}
+}{}
+% \end{macrocode}
+% Determine whether we have solutions at end.
+% \begin{macrocode}
+\@ifundefined{ifsolutionsAtEnd}
+ {\newif\ifsolutionsAtEnd\solutionsAtEndtrue}{}
+\ifeq@nosolutions\solutionsAtEndfalse\fi
+\ifeq@solutionsafter\solutionsAtEndfalse\fi
+\@ifundefined{if@fleqn}{\let\fleqnOn\relax\let\fleqnOff\relax}
+ {\def\fleqnOn{\@fleqntrue}\def\fleqnOff{\@fleqnfalse}}
+% \end{macrocode}
+% \changes{v7.7o}{2016/07/08}{Added Boolean \string\cs{if@inclkey} in support of the
+% \string\textsf{eq2db} package}
+% \begin{macrocode}
+\@ifundefined{if@inclkey}{\newif\if@inclkey\@inclkeytrue}{}
+%</package>
+% \end{macrocode}
+% \subsection{The Template \& Language dependent messages}\label{ss:ldm}
+% The following define labels and messages for the exercise and
+% various quiz environments. They are all redefined when a
+% language option is used. All of them can be redefined to
+% customize a users document.
+%
+% In attempt to better manage the language localizations, I've placed the
+% template for Web and Exerquiz in the Exerquiz.dtx file.
+% \begin{macrocode}
+%<*template>
+%%------------- Instructions ------------------------------------
+%% Make your language localizations to this file and rename it to
+%% something like \texttt{eq<mylang>.def}, where \texttt{<mylang>}
+%% is a short 2-letter designator of the language. Test the tile
+%% by inputting it in the preamble of your document
+%% \input{eq<mylang>.def}. When satisfied, send it to me at
+%% dpstory@uakron.edu or dpstory@acrotex.net.
+%</template>
+%<template>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%<template>%% Web.sty %%
+%<template>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%<template>% Language dependent definitions for Web.sty
+%<*template>
+\DeclareOption{newlanguage}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or January
+ \or February \or March \or April
+ \or May \or June \or July \or August
+ \or September \or October \or November
+ \or December \fi \the\day, \the\year}
+ \def\web@versionlabel{Version}
+ \def\web@toc{Table of Contents}
+ \def\web@continued{cont.}
+ \def\web@article{Begin \hyperlink{section.1}{Article}}
+ \def\web@directory{Directory}
+ \def\web@revision{Last Revision Date:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Section}
+ % Label Navibar
+ \def\web@back{Back}
+ \def\web@doc{Doc}} % restricted to three characters
+ \PassOptionsToPackage{newlanguage}{exerquiz}
+}
+%</template>
+% \end{macrocode}
+% \begin{macrocode}
+%<template>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%<template>%% Exerquiz.sty %%
+%<template>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%<template>\DeclareOption{newlanguage}{%
+%<template> \def\LangRedefinitions{\InputIfFileExists{eqlang.def}%
+%<template> {\PackageInfo{exerquiz}{Inputting a New Language Option}}%
+%<template> {\PackageInfo{exerquiz}{Language Option: Cannot find the file
+%<template> eqpo.def, using the default, English.}}}}
+%<template>
+%<package>\def\eqretnSymb{$\blacksquare$}%{\rule{6bp}{6.8bp}}
+% The exercise label
+%<package>\newcommand\exlabel{Exercise}
+%<package>\newcommand\exlabelsol{\exlabel}
+%<template>% The exercise label
+%<template>% Accents: \renewcommand\exlabel{\"Ubung} (German)
+%<template>\renewcommand\exlabel{Exercise}
+%<template>% The value of this macro is written to \jobname.sol,
+%<template>% accented characters must be protected with a \protect
+%<template>% E.g., \renewcommand\exlabelsol{\protect\"Ubung} (German)
+%<template>\renewcommand\exlabelsol{\exlabel}
+% \end{macrocode}
+% \begin{macrocode}
+% Title of exercise solution section
+%<package>\newcommand\exsectitle{Solutions to \exlabel s}
+%<package>\newcommand\exsecrunhead{\exsectitle} %% change to @ form
+%<template>
+%<template>% Title of exercise solution section
+%<template>% E.g.: \renewcommand\exsectitle
+%<template>% {L\"osungen der \exlabel en} (German)
+%<template>\renewcommand\exsectitle{Solutions to \exlabel s}
+%<template>\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
+% \end{macrocode}
+% \begin{macrocode}
+%<*package|eqexam>
+% \end{macrocode}
+% \begin{macro}{\exsolafter}
+% Solution label for \texttt{solutionafter} option for exercise, this is a command
+% that may be redefined. Either by a \cs{recommand} or by the use of
+% \cs{renameSolnAfterTo}.
+% \begin{macro}{\resetSolnAfterToDefault}
+% This command resets \cs{exsolafter} to the default value.
+% \begin{macro}{\exsolafterDefault}
+% Takes one argument, the argument is the default value of \cs{exsolafter}
+% \begin{macro}{\renameSolnAfterTo}
+% This command takes one command, it redefines \cs{exsolafter}, but does
+% not change the default value.
+%\changes{v6.05g}{2007/01/28}
+%{
+% Added to commands for use in exerquiz or in \textsf{eqexam}. They are
+% \cs{renameSolnAfterTo} for conveniently changing the solution
+% after label, and \cs{resetSolnAfterToDefault} for resetting
+% back to the default.
+%}
+% \begin{macrocode}
+\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}}
+\def\recoverDisplayBelow{\vskip\belowdisplayskip}
+\newcommand{\adjDisplayBelow}{\vskip-\lastskip\vskip-\baselineskip}
+% \ifsolutionsAtEnd\recoverDisplayBelow\fi}
+\newcommand{\adjDisplayBelowPlus}{\adjDisplayBelow\recoverDisplayBelow}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+%</package|eqexam>
+%<template>
+%<template>% Solution label for solutionafter option for exercise
+%<template>\renewcommand\exsolafter{\textit{Solution}:}
+% \end{macrocode}
+% \begin{macrocode}
+% Title of quiz solution section
+%<package>\newcommand\eq@sqslsectitle{Solutions to Quizzes}
+%<package>\newcommand\sqslsectitle{\eq@sqslsectitle}
+%<template>
+%<template>% Title of short quiz solution section
+%<template>% Example: \renewcommand\eq@sqslsectitle
+%<template>% {L\"osungen der Aufgaben} (German)
+%<template>\renewcommand\eq@sqslsectitle{Solutions to Quizzes}
+%<template>\renewcommand\sqslsectitle{\eq@sqslsectitle}
+% \end{macrocode}
+% \begin{macrocode}
+% Running header/section title for solutions to short quizzes
+%<package>\newcommand\eq@sqslsecrunhead{Solutions to Quizzes}
+% User access
+%<package>\newcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+%<template>
+%<template>% Running header/section title for solutions to short quizzes
+%<template>\renewcommand\eq@sqslsecrunhead{Solutions to Quizzes}
+%<template>% User access
+%<template>\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+% \end{macrocode}
+% \begin{macrocode}
+% Label for solutions to quizzes, appears in solutions sections
+%<package>\newcommand\eq@sqsllabel{\protect\textbf{Solution to Quiz:}}
+% User access
+%<package>\newcommand\sqsllabel{\eq@sqsllabel}
+%<template>
+%<template>% Label for solutions to short quizzes, appears
+%<template>% in solutions sections
+%<template>% Protect accents with \protect
+%<template>% E.g.: \renewcommand\eq@sqsllabel
+%<template>% {\string\textbf{L\protect\"osung zu Aufgabe:}} (German)
+%<template>\renewcommand\eq@sqsllabel{\string\textbf{Solution to Quiz:}}
+%<template>% User access
+%<template>\renewcommand\sqsllabel{\eq@sqsllabel}
+% \end{macrocode}
+% \begin{macrocode}
+% Solution label for solutionafter option for shortquiz
+%<package>\newcommand\sqsolafter{\textit{Solution}:}
+%<template>
+%<template>% Solution label for solutionafter option for shortquiz
+%<template>\renewcommand\sqsolafter{\textit{Solution}:}
+% \end{macrocode}
+% \begin{macrocode}
+% Here is the default short quiz label.
+%<package>\newcommand{\sqDefaultFmtTitle}[1]%
+%<package> {\def\eq@sqlabel{#1}\def\sqlabel{#1}}
+% User access to shortquiz label
+%<package>\newcommand\sqlabel{\eq@sqlabel}
+%<package>\sqDefaultFmtTitle{\textcolor{red}{Quiz}}
+%<template>
+%<template>% User access to shortquiz label
+%<template>\renewcommand\sqlabel{\eq@sqlabel}
+%<template>% Here is the default short quiz label.
+%<template>\sqDefaultFmtTitle{\textcolor{red}{Quiz.}}
+% \end{macrocode}
+% \begin{macrocode}
+% Here is the default short quiz return label
+% No formatting allowed
+%<package>\newcommand\eq@sqslrtnlabel{\protect\eqretnSymb}
+% User access to shortquiz label
+%<package>\newcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+%<template>
+%<template>% Here is the default short quiz return label
+%<template>% No formatting allowed
+%<template>\renewcommand\eq@sqslrtnlabel{End Quiz}
+%<template>% User access to shortquiz label
+%<template>\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+% \end{macrocode}
+% \begin{macrocode}
+% Short quiz feedback messages
+%<package>\newcommand\eqsqrtmsg{"Right!"}
+%<package>\newcommand\eqsqwgmsg{"Wrong!"}
+%<package>\newcommand\doNotShowAgainMsg{Do not show this message again}
+%<template>
+%<template>% Short quiz feedback messages
+%<template>\renewcommand\eqsqrtmsg{"Right!"}
+%<template>\renewcommand\eqsqwgmsg{"Wrong!"}
+%<template>\renewcommand\doNotShowAgainMsg{Do not show this message again}
+% \end{macrocode}
+% \begin{macrocode}
+% Here is the default quiz label.
+%<package>\newcommand\eq@bqlabel{Begin Quiz}
+% User access to quiz label
+%<package>\newcommand\bqlabel{\eq@bqlabel}
+% Used for writing JavaScript Messages on screen
+%<package>\newcommand\eq@bqlabelISO{\eq@bqlabel}
+%<package>\newcommand\bqlabelISO{\eq@bqlabelISO}
+% Default title for a quiz used for \verb!\@currentlablename!
+%<package|eqexam>\newcommand\setDefShortQuizLabelName[1]%
+%<package|eqexam> {\def\eq@defaultShortQuizLabelName{#1}}
+%<package|eqexam>\setDefShortQuizLabelName{Quiz}
+%<package>\newcommand\setDefQuizLabelName[1]
+%<package> {\def\eq@defaultQuizLabelName{#1}}
+%<package>\setDefQuizLabelName{Quiz}
+%<template>
+%<template>% Here is the default quiz label.
+%<template>% No formatting allowed
+%<template>% For Example: \renewcommand\eq@bqlabel{D\'ebut} (French)
+%<template>\renewcommand\eq@bqlabel{Begin Quiz}
+%<template>% User access to shortquiz label
+%<template>\renewcommand\bqlabel{\eq@bqlabel}
+%<template>% Used for writing JavaScript Messages on screen.
+%<template>% Use PDFDocEncoding
+%<template>% For Example:
+%<template>% \renewcommand\eq@bqlabelISO{D\string\351but} (French)
+%<template>% Use \string not \protect, this helps out
+%<template>% TeX4ht by Eitan Gurari.
+%<template>\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+%<template>\renewcommand\bqlabelISO{\eq@bqlabel}
+%<template>% Default title for a quiz used for \verb!\@currentlablename!
+%<template>\setDefShortQuizLabelName{Quiz}
+%<template>\setDefQuizLabelName{Quiz}
+% \end{macrocode}
+% \begin{macrocode}
+% Here is the default quiz label.
+% No formatting allowed
+%<package>\newcommand\eq@eqlabel{End Quiz}
+% User access to quiz label
+%<package>\newcommand\eqlabel{\eq@eqlabel}
+%<template>
+%<template>% Here is the default quiz label.
+%<template>% No formatting allowed
+%<template>\renewcommand\eq@eqlabel{End Quiz}
+%<template>% User access to shortquiz label
+%<template>\renewcommand\eqlabel{\eq@eqlabel}
+% \end{macrocode}
+% \begin{macrocode}
+% JavaScript Messages for Quiz Environments
+%<package>\newcommand\eq@Score{Score:}\newcommand\eq@OutOf{out of}
+%<package>\newcommand\eq@ptScore{Score:}
+%<package>\newcommand\stOutOf{of}
+%<package>\newcommand\eqScore{\eq@Score}\newcommand\eqOutOf{\eq@OutOf}
+%<package>\newcommand\eqptScore{\eq@ptScore}
+%<template>
+%<template>% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+%<template>% Note: Use \string rather than \protect for escape codes,
+%<template>% i.e. \string\374
+%<template>%
+%<template>% In the Text Field showing the score, there is the default
+%<template>% phrase in English
+%<template>% Score: 2 out of 3, the word "Score" and "out of" needs
+%<template>% translation.
+%<template>\renewcommand\eq@Score{Score:}\renewcommand\eq@OutOf{out of}
+%<template>\renewcommand\eq@ptScore{Score:}
+%<template>% used in summary tables
+%<template>\renewcommand\stOutOf{of}
+% \end{macrocode}
+% \begin{macrocode}
+%<package>\newcommand\eqInitQuizMsg{%
+%<package> "You must initialize the Quiz! Click on "+msg+"."}
+%<template>% If you are taking a quiz and click on an alternative without
+%<template>% initializing the quiz
+%<template>% first, this message appears.
+%<template>% This string is placed in the DLJS, so the escape sequences
+%<template>% need to be protected more. Instead of \string\340 we need
+%<template>% \string\\340.
+%<template>% Example: \renewcommand\eqInitQuizMsg{% (German)
+%<template>% "Sie m\string\\374ssen die Aufgaben initialisieren!
+%<template>% Bitte klicken Sie auf "+msg+"."}
+%<template>\renewcommand\eqInitQuizMsg{%
+%<template> "You must initialize the Quiz! Click on "+msg+"."}
+% \end{macrocode}
+% \begin{macrocode}
+%<package>\newcommand\eqQuizTotalMsg{%
+%<package> "\eqScore\space"+Score+" \eqOutOf\space"+nQuestions}
+%<package>\newcommand\eqQuizPointsMsg{%
+%<package> "\eqptScore\space"+ptScore+" \eqOutOf\space"+nPointTotal}
+%<package>\newcommand\eqQuizPercentMsg{pcScore+"\%"}
+%<package>\newcommand\eqQuizGradeMsg{quizGrade}
+%<template>
+%<template>% This macro doesn't usually need translation, it uses \eqScore
+%<template>% and \eqOutOf. However, if the sentence "Score: 2 out of 3"
+%<template>% does not translate conveniently into a particular language,
+%<template>% this macro may have to be modified. It's the one that puts
+%<template>% the message in the message box.
+%<template>\renewcommand\eqQuizTotalMsg
+%<template> {"\eqScore\space"+Score+" \eqOutOf\space"+nQuestions}
+%<template>\renewcommand\eqQuizPointsMsg{%
+%<template> "\eqptScore\space"+ptScore+" \eqOutOf\space"+nPointTotal}
+%<template>\renewcommand\eqQuizPercentMsg{pcScore+"\%"}
+%<template>\renewcommand\eqQuizGradeMsg{quizGrade}
+% \end{macrocode}
+% \begin{macrocode}
+%<package>\newcommand\eqMadeChoice{%
+%<package> "You have already made a choice."
+%<package> + " Your choice was ("+Responses[probno]+")."
+%<package> + " Do you want to change it?"}
+%<template>
+%<template>% In the link form of a quiz, of you change your choice,
+%<template>% this message appears. This string is placed in the
+%<template>% DLJS, so the escape sequences need to be protected more.
+%<template>% Instead of \string\340 we need \string\\340.
+%<template>% For Example: \renewcommand\eqMadeChoice{%
+%<template>% "Vous avez d\string\\351j\string\\340 fait un choix,
+%<template>% ce choix est ("+Responses[probno]+").
+%<template>% Souhaitez vous le modifier ?"} (French)
+%<template>\renewcommand\eqMadeChoice{%
+%<template> "You have already made a choice.
+%<template> Your choice was ("+Responses[probno]+").
+%<template> Do you want to change it?"}
+% \end{macrocode}
+% Default language phrases used by \cmd{\eqButton}. These are overwritten by the
+% language options.
+% \begin{macrocode}
+%<package>\newcommand\eq@local@CA{Correct}
+%<package>\newcommand\eq@local@RC{My Answers!}
+%<package>\newcommand\eq@local@AC{Please!}
+%<template>% Default button labels for \eqButton
+%<template>% Accents are handled as above:
+%<template>% A French Language Example
+%<template>% \renewcommand\eq@local@CA{R\string\351ponses}
+%<template>% \renewcommand\eq@local@RC{Correctes}
+%<template>% \renewcommand\eq@local@AC{SVP !}
+%<template>\renewcommand\eq@local@CA{Correct}
+%<template>\renewcommand\eq@local@RC{My Answers!}
+%<template>\renewcommand\eq@local@AC{Please!}
+% \end{macrocode}
+% Default language phrases used by \cmd{\CorrAnsButton}. These are overwritten by the
+% language options.
+% \begin{macrocode}
+%<package>\newcommand\eq@local@CorrAnsButton{Ans}
+%<template>
+%<template>% Default button label of \CorrAnsButton.
+%<template>\renewcommand\eq@local@CorrAnsButton{Ans}
+%<package>\newcommand{\eq@local@sqClearButton}{Clear}
+%<template>% Default button label of \sqClearButton
+%<template>\renewcommand{\eq@local@sqClearButton}{Clear}
+%<template>% Short string used by the \PromptButton
+%<template>\renewcommand{\AnsPromptBtnStr}{Answer:\space}
+% \end{macrocode}
+% The following are (error) messages generated from the math fill-in questions.
+% \begin{macrocode}
+%<*package>
+\newcommand\eqerrABS{"Absolute values not balanced. Please correct."}
+\dlJSStr[noquotes]\eqerrBadMathFunc{"The expression \""+aF[i]
+ +"\" is neither a defined function nor a valid math expression."}
+\newcommand\eqParens{"Parentheses"}
+\newcommand\eqBrackets{"Brackets"}
+\newcommand\eqBraces{"Braces"}
+\newcommand\eqerrDelimNotBal{aGroup[i][2] + " not balanced.
+ Please correct."}
+\newcommand\eqerrBadExp{"Invalid mathematical expression.
+ A problem with one of the exponents. Please correct."}
+\newcommand\eqerrUnfinishQuiz{"There is an unfinished quiz,
+ please finish before moving on to another."}
+\newcommand\noPeekMsg{"Viewing Solutions to quizzes is not allowed
+ until you take or finish this quiz!"}
+\newcommand\highThresholdMsg{"You are required to respond to all
+ questions before the quiz is evaluated."}
+\newcommand\eqSyntaxErrorUndefVar{"Syntax Error: Possibly an undefined
+ variable present, or an expression is not written in an expected
+ format."}
+\dlJSStr[noquotes]{\eqSyntaxErrorComma}{%
+ "Syntax Error: A comma was found"
+ + " in your response \""
+ + UserAns + "\". Please remove the comma, or this answer"
+ + " will be marked as wrong."}
+\newcommand{\limSelWarningMsg}{"For this question, you are allowed to
+ make at most " + n + " selections."}
+\newcommand{\defaultReqFormMsg}{%
+ "The expression is not in the expected form."}
+%</package>
+%<template>
+%<template>% These (error) messages are generated when the user enters an
+%<template>% invalid math expression into a math fill-in response box.
+%<template>% The messages come in the form of an eqAppAlert() so
+%<template>% PDFDocEncoding needs to be used.
+%<*template>
+\renewcommand\eqerrABS{"Absolute values not balanced. Please correct."}
+\renewcommand\eqerrBadMathFunc{"The expression \""+aF[i]+"\" is neither
+ a defined " +"function, nor a valid math expression."}
+\renewcommand\eqParens{"Parentheses"}
+\renewcommand\eqBrackets{"Brackets"}
+\renewcommand\eqBraces{"Braces"}
+\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " not balanced.
+ Please correct."}
+\renewcommand\eqerrBadExp{"Invalid mathematical expression.
+ A problem with one of the exponents. Please correct."}
+\renewcommand\eqerrUnfinishQuiz{"There is an unfinished quiz,
+ please finish before moving on to another."}
+\renewcommand\noPeekMsg{"Viewing Solutions to quizzes is not allowed
+ until you take or finish this quiz!"}
+\renewcommand\highThresholdMsg{"You are required to respond to all
+ questions before the quiz is evaluated."}
+\renewcommand\eqSyntaxErrorUndefVar{"Syntax Error: Possibly an
+ undefined variable present."}
+\newcommand{\eqSyntaxErrorComma}{"Syntax Error: A comma was found"
+ + " in your response \\""
+ + UserAns + "\\". Please remove the comma, or this answer"
+ + " will be marked as wrong."}
+\renewcommand{\limSelWarningMsg}{"For this questions, you are allowed to
+ make at most " + n + " selections."}
+\renewcommand{\promptButtonMsg}{%
+ "Would you like to see the correct answer at this time? "
+ + "Your current answer will be the one that will be scored. "
+ + "If you click on \\"Yes\\",
+ you will not be able to change your answer."
+}
+\renewcommand{\defaultReqFormMsg}{%
+ "The expression is not in the expected form."}
+\renewcommand\eqAnd{and}
+%</template>
+%<*template>
+%%%%%%%%%%%%%%%%%%%%%% End Message Section %%%%%%%%%%%%%
+%% Some typeout messages %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% In exerquiz.sty
+\typeout{Inputting French Option}
+\typeout{French Option: Cannot find the file eqfr.def, using the
+ default, English.}
+\typeout{Solutions not allowed with this option}
+\typeout{Check: `#1' is not an acceptable option, inserting
+ default, `check'.}
+%</template>
+% \end{macrocode}
+%
+% Announce driver option
+% \begin{macrocode}
+%<*package>
+\typeout{^^Jexerquiz: * Using \eq@driver\space option *^^J}
+% \end{macrocode}
+% \subsection{Handles, counters and such}
+% Handles to write solutions to quizzes and exercises to a file.
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\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
+}
+% \end{macrocode}
+% If we are not in \cs{ifsolutionsonly} mode, we write some definitions to a .def
+% file to be read back in at the beginning of the document.
+% \begin{macrocode}
+\newwrite\eq@xrefdefns \immediate\openout\eq@xrefdefns\jobname_xdefs.cut
+\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}}
+% \end{macrocode}
+% Counters to keep track of exercise questions.
+% \begin{macrocode}
+\newcounter{eqexno} \setcounter{eqexno}{0}
+\newcounter{@exno} \setcounter{@exno}{0} % running exno
+% \end{macrocode}
+% Counter to keep track of quiz questions.
+% \begin{macrocode}
+\newcounter{quizno} \setcounter{quizno}{0}
+\renewcommand\thequizno{\alph{quizno}}
+%</package|eqexam>
+%<*package>
+\def\theHquizno{\curr@quiz.\theeqquestionnoi.%
+ \ifcase\@eqquestiondepth\or\or\arabic{eqquestionnoii}.%
+ \or\arabic{eqquestionnoii}.\roman{eqquestionnoiii}.%
+ \else\fi\alph{quizno}}
+% \end{macrocode}
+% (2016/05/17) \cs{eqemargin} is used in \textsf{eqexam}, but some calculations use it for the list version of
+% answers. We declare this length to be 0pt. The \textsf{eqexam} resets this value.
+% \begin{macrocode}
+\newlength\eqemargin \eqemargin=0pt
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+% \end{macrocode}
+% Keep track of point values of quizzes
+% \begin{macrocode}
+\newcounter{eqpointvalue} \setcounter{eqpointvalue}{0}
+% \end{macrocode}
+% Some scratch registers and boxes.
+% \begin{macrocode}
+\newlength\eq@tmplength
+\newlength\eqtmplength
+% \end{macrocode}
+% \begin{macro}{eqquestionno}
+% The counter that keeps track of the question number.
+% Used by the \texttt{questions environment}
+% \begin{macrocode}
+\newcounter{questionno}
+\newcounter{eqquestionnoi}
+\newcounter{eqquestionnoii}
+\newcounter{eqquestionnoiii}
+\newcount\@eqquestiondepth \@eqquestiondepth=0
+% \end{macrocode}
+% \begin{macrocode}
+%</package|eqexam>
+%<*package>
+\newcounter{grpquestionno}
+%</package>
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{partno}
+% This counter keeps track of the parts of an exercise, when the *-option
+% is used.
+% \begin{macrocode}
+%<*package|eqexam>
+\newcounter{partno}
+% \end{macrocode}
+% (2017/01/11) Added \DescribeMacro{\numberParts}\cs{numberParts} to change how this counter is displayed
+% as a number. The default is \DescribeMacro{\alphaParts}\cs{alphaParts} to display the \texttt{partno}
+% counter as a letter.
+%\begin{verbatim}
+% \renewcommand{\partnoFmt}{\arabic}
+% \setPartsWidth{(00)}
+% \partsformat{\makebox[\widthOfParts][c]{(\hfil\thepartno\hfil)}}
+%\end{verbatim}
+% With this code, the items in the \texttt{parts} environment are numbered.
+% \changes{v7.8d}{2017/01/11}{Added \string\cs{partnoFmt} to change how this counter is displayed}
+% \begin{macrocode}
+\newif\ifuseNumForParts\useNumForPartsfalse
+\def\alphaParts{\def\partnoFmt{\alph}\useNumForPartsfalse}\alphaParts
+\def\numberParts{\def\partnoFmt{\arabic}\useNumForPartstrue}
+\renewcommand\thepartno{\partnoFmt{partno}}
+\newtoks\eq@scratchtoks
+%</package|eqexam>
+%<*package>
+\def\theHpartno{partno\the@exno\thepartno}
+%</package>
+%<*package|eqexam>
+% \end{macrocode}
+% \end{macro}
+% \subsection{Write to a file}
+% We must have a way to write the solutions of our exercises and
+% quizzes to a file. The following \cmd{\verbatimwrite} was
+% taken from the \texttt{moreverb} package, it uses the
+% \texttt{verbatim} package.
+%
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \section{The \texttt{exercise} Environment}
+%
+% We use \cmd{\raggedright} within a \texttt{tabular} environment,
+% so we must use a little trick, illustrated in the \textsl{\LaTeX\
+% Companion} by M. Goossens et al. This macro is used with \texttt{exercise}
+% with parts, \texttt{shortquiz} and \texttt{quiz} environments.
+% \begin{macrocode}
+\providecommand\PBS[1]{\let\temp=\\#1\let\\=\temp}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% Define some formatting commands. These can all be redefined to
+% customize the document.
+% \begin{macro}{\exlabelformat}
+% This is the formatted label for the exercise environment.
+% \begin{macrocode}
+\newcommand\exlabelformat{{\scshape\exlabel\ \theeqexno.}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exlabelformatwp}
+% This is the formatted label for the exercise environment with parts.
+% When an exercises has parts, the word `Exercise' is not a link,
+% so we color this word for emphasis.
+% \begin{macrocode}
+%\newcommand\exlabelformatwp{{\scshape\exlabel\ \theeqexno.}}
+\newcommand\exlabelformatwp{\exlabelformat}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exsllabelformat}
+% This is the formatted solution label.
+% \begin{macrocode}
+\newcommand\exsllabelformat{\protect\textbf{\exlabelsol\ \theeqexno.}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exsllabelformatwp}
+% This is the formatted solution when the *-options is use, that is,
+% when there are multiple parts to the question.
+% \begin{macrocode}
+\newcommand\exsllabelformatwp
+ {\protect\textbf{\exlabelsol\ \theeqexno(\thepartno)}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exrtnlabelformat}
+% This is the formatted return label (return from the solution).
+% \begin{macrocode}
+\newcommand\exrtnlabelformat{$\square$}
+%\newcommand\exrtnlabelformat{\exlabelsol\ \theeqexno}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\exrtnlabelformat}
+% This is the formatted return label (return from the solution),
+% for an exercise with parts.
+% \begin{macrocode}
+\newcommand\exrtnlabelformatwp{$\square$}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\aboveexskip}
+% \begin{macro}{\belowexskip}
+% Amount of skip before and after exercise environment
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\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
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\belowexsolnskip}
+% Amount of skip after solutions, this one is written to a file, so
+% we must protect it from early expansion.
+% \begin{macrocode}
+\newcommand\belowexsolnskip{\protect\medskip}
+%\let\eqafterexersolnskip\belowexsolnskip
+% \end{macrocode}
+% \changes{v7.4}{2015/03/23}{added \cmd\removelastparskip}
+% \DescribeMacro\removelastparskip removes last \cmd\parskip, as needed.
+% \begin{macrocode}
+\def\removelastparskip{\ifdim\parskip>0pt\vskip-\parskip\fi}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\nolinkcolor}
+% This is the color to paint the word 'Exercise' with parts;
+% or it colors all the 'Exercise's when the nosolutions option
+% has been used
+% \changes{v6.05a}{2006/05/08}
+% {
+% Changed \cs{nolinkcolor} into a text fill-in. Now, the command \cs{nolinkcolor}
+% fills in \cs{@nolinkcolor}, which holds the named color.
+% }
+% \begin{macrocode}
+\newcommand{\nolinkcolor}[1]{\def\@nolinkcolor{#1}}
+\nolinkcolor{blue}
+% \end{macrocode}
+% \end{macro}
+% \subsection{Define \texttt{exercise} Environment}
+% Defines the \texttt{exercise} environment for writing exercises,
+% and solutions. The solutions are written to the file
+% \cmd{\jobname.sol}, and input at the end of the file. Hypertext
+% links connect the statement of the exercise with its solution.
+%
+%\smallskip\noindent\textbf{Basic usage}
+%\begin{verbatim}
+%\begin{exercise}
+%The exercise question is posed.
+%\begin{solution}
+%The solution to exercise goes here.
+%\end{solution}
+%\end{exercise}
+%\end{verbatim}
+% These environments should be nested as illustrated above.
+%
+% The \texttt{exercise} environment has three optional arguments. The syntax
+% for an exercise without parts is\dots
+%\begin{verbatim}
+% \begin{exercise}[<ctr>][h|H] ...\end{exercise}
+%\end{verbatim}%
+%
+% (1) The value of this first optional argument, \texttt{<ctr>}, is a counter.
+% You can use the \texttt{exercise}
+% environment then to create other environments with their own
+% counters. A special value of zero (0) for this optional argument,
+% means not to associate any counter with the environment. These
+% features can be used in combination with the \cs{SolutionsAfter}
+% and \cs{SolutionsAtEnd} commands to obtain different effects,
+% see the manual for examples
+%
+% (2) The second optional argument is an `\texttt{h}' or an \texttt{H}, this signals that the
+% solution to the exercise should not be written to the \cmd{\jobname.sol}
+% file. See manual for examples.
+%
+% The \texttt{exercise} environment has three optional arguments. The syntax
+% for an exercise with parts is\dots
+%\begin{verbatim}
+% \begin{exercise}[<ctr>]* ...\end{exercise}
+% \begin{exercise*}[<ctr>] ...\end{exercise*}
+%\end{verbatim}%
+%
+% (1) The value of this first optional argument, \texttt{<ctr>}, is a counter.
+% You can use the \texttt{exercise}
+% environment then to create other environments with their own
+% counters. A special value of zero (0) for this optional argument,
+% means not to associate any counter with the environment. These
+% features can be used in combination with the \cs{SolutionsAfter}
+% and \cs{SolutionsAtEnd} commands to obtain different effects,
+% see the manual for examples
+%
+% (2) The second argument is a star \texttt{*}. The presence of a * signals
+% that this exercise has multiple parts. See the manual for the proper
+% syntax.
+%
+% Beginning with version 6.07, there is now a \texttt{exercise*}
+% environment, this is what I should have done originally, but now its
+% done. The \texttt{exercise*} signals an exercise with parts. It takes
+% one optional parameter, the name of a counter \texttt{<ctr>} that is to
+% be used.
+% \begin{macro}{\exerSolnInExtFile}
+% With the exercises, you have the option of including them in the main document, or putting them
+% in an external document. The \cs{exerSolnsInExtFile} command lets you specify an external file name.
+% Just use the \textit{basename}, hyperref will add the extension. If an external file is specified, all
+% solution links are changed to links between documents. Usage:
+%\begin{verbatim}
+%\exerSolnsInExtFile{myExSonls}
+%\end{verbatim}
+% \begin{macrocode}
+\newcommand{\exerSolnsInExtFile}[2][]
+ {\let\exerSolns@ExtFile\eq@YES\gdef\eq@exerSolns@fileName{#2}%
+ \gdef\exerSolns@ReturnPath{#1}}
+\let\exerSolns@ExtFile\eq@NO
+\def\exerSolns@ReturnPath{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+% \end{macrocode}
+%\DescribeMacro{\marginparpriorhook}\DescribeMacro{\marginparafterhook}
+%\DescribeMacro{\afterlabelhskip} Various hooks into an exercise.
+% \begin{macrocode}
+\let\marginparpriorhook\@empty % used to material before the exercise
+\let\marginparafterhook\@empty % used to material after the exercise
+\let\afterlabelhskip\space
+% \end{macrocode}
+% \DescribeMacro{\exersolnheadhook}
+% Inserted in the header of each exercise solution. May be used for inserting
+% addition text or macros in the solution.
+% \begin{macrocode}
+\let\exersolnheadhook\@empty
+\let\exer@solnheadhook\@empty
+% \end{macrocode}
+% \begin{macro}{\eqexheader}
+% \begin{macro}{\eqexheader@wrapper}
+% \cs{eqexheader} typesets `Exercise xx'. \cs{eqexheader@wrapper} creates a hypertarget
+% at the heading. Portions of \cs{eqexheader} is also used by \textsf{eqExam}.
+% \begin{macrocode}
+\newcommand{\eqexheader}
+{%
+%</package|eqexam>
+%<*package>
+ \ifeq@nolink % no link to solution
+%</package>
+%<*package|eqexam>
+ \mbox{\color{\@nolinkcolor}\if\exerstar*\exlabelformatwp\else
+ \exlabelformat\fi}%
+%</package|eqexam>
+%<*package>
+ \else
+ \if\exerSolns@ExtFile\eq@YES
+ \mbox{\href{\eq@exerSolns@fileName\#ex.\the@exno}%
+ {\exlabelformat}}%
+ \else
+ \mbox{\hyperlink{ex.\the@exno}{\exlabelformat}}%
+ \fi
+ \fi
+%</package>
+%<*package|eqexam>
+}
+\def\eqexheader@wrapper{\hypertarget{qex.\the@exno}{\eqexheader}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\eqexlisttabheader}
+% \cs{eqexlisttabheader} typesets `(a)' when we have exercises with parts.
+% Portions are also used by \textsf{eqExam}.
+% \begin{macrocode}
+\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
+%</package|eqexam>
+%<*package>
+ \ifeq@nolink
+%</package>
+%<*package|eqexam>
+ \color{\@nolinkcolor}\eq@partsformat
+%</package|eqexam>
+%<*package>
+ \else
+ \if\exerSolns@ExtFile\eq@YES
+ \href{\eq@exerSolns@fileName\#ex.\the@exno\thepartno}%
+ {\eq@partsformat}%
+ \else
+ \hyperlink{ex.\the@exno\thepartno}{\eq@partsformat}%
+ \fi
+ \fi
+%</package>
+%<*package|eqexam>
+}
+% \end{macrocode}
+% \end{macro}
+% Introduce a method of copying questions from \env{exercise} environment to solution page. The \env{cq@CQ}
+% is \cs{let} to the \env{cq} environment, only defined within the \env{exercise} environment.
+% \changes{v7.8}{2016/11/02}{Added support to copy questions in the exercise environment to solution pages.}
+% \begin{macrocode}
+\newcount\cq@Cnt
+\def\cq@CutName{cq-\the\cq@Cnt.cut}
+% \end{macrocode}
+% \begin{environment}{cq}
+% The \env{cq} environment is \cs{let} to the \env{cq@CQ} environment at the beginning of
+% the \env{exercise} environment, \env{cq@CQ} begin the internal name of the environment.
+% \par\medskip\noindent\textbf{Example}
+%\begin{verbatim}
+% \begin{exercise}
+% \begin{cq}
+% This is the question
+% \end{cq}
+% \begin{solution}
+% This is its solution
+% \end{solution}
+% \end{exercise}
+%\end{verbatim}
+% \begin{macrocode}
+\let\cq@star\eq@NO
+% \end{macrocode}
+% We declare a new switch \cs{ifcqs}
+% \changes{v7.8}{2016/11/02}{Added code to copy questions of exercises to
+% the solution page}
+% \begin{macrocode}
+\newif\ifcqqs \cqqstrue
+\newif\ifcqIsActive \cqIsActivefalse
+\def\cqQS{\@ifstar{\cqQSV}{\cqQSA}}
+\def\cqQSA#1#2{\ifcqqs#1\else#2\fi}
+% \end{macrocode}
+% Also defined in the \pkg{web} package.
+% \begin{macrocode}
+\@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
+%</package|eqexam>
+%<*package>
+\def\writecqQSfalse{\writeToExSolns{\protect\eqTopOfSolnPage}}
+\AtBeginDocument{\writecqQSfalse}
+%</package>
+%<*package|eqexam>
+\newenvironment{cq@CQ}
+{%
+% \end{macrocode}
+% Begin verbatim write, the listing is saved to \cs{cq@CutName}, indexed by
+% \cs{cq@Cnt}.
+% \begin{macrocode}
+ \global\cqIsActivetrue
+ \global\advance\cq@Cnt1\relax
+ \immediate\openout\CommentStream=\cq@CutName
+ \let\verbatim@out\CommentStream
+ \verbatimwrite
+}{%
+ \endverbatimwrite
+ \immediate\closeout\CommentStream
+% \end{macrocode}
+% Close out the stream, define \cs{cq@INPUTCUT}, which is then input back in
+% after the end of the group.
+% \begin{macrocode}
+ \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
+}
+% \end{macrocode}
+% \end{environment}
+% \begin{environment}{cq*}
+% The \env{cq*} version of \env{cq}; within the \env{exercise} environment \env{cq*}
+% is \cs{let} to \env{cqs@CQ}. This version does not automatically paste the question
+% into the solution, instead, the command \cs{cqCopiedQues} is defined for that solution,
+% which expands to the question statement.
+% \begin{macrocode}
+\newenvironment{cqs@CQ}{\let\cq@star\eq@YES\cq@CQ}{\endcq@CQ}
+% \end{macrocode}
+% \end{environment}
+% The default formatting on the solution page is, when \env{cq} is used,
+%\begin{flushleft}
+%\textbf{Exercise 1.} \emph{Question}: This is the question
+%\medskip\par
+%\emph{Solution}: This is its solution
+%\end{flushleft}
+%The word `Question' may be localized using \cs{declCQQuesStr}\DescribeMacro{\declCQQuesStr}, the default is
+%seen below. The word `Solution' can be localized with \cs{declCQSolStr}\DescribeMacro{\declCQSolStr}, the default is seen below.
+% \begin{macrocode}
+\def\declCQQuesStr#1{\def\cqQStr{#1}}
+\declCQQuesStr{Question}
+\def\declCQSolStr#1{\def\cqSStr{#1}}
+\declCQSolStr{Solution}
+% \end{macrocode}
+% Aside from the words `Question' and `Solution', the way these two are formatting is determined
+% through \cs{declCQPre}\DescribeMacro{\declCQPre} and \cs{declCQPost}\DescribeMacro{\declCQPost}.
+% These declarations are seen below. The \cs{declCQPost} is more complicated in that it handles the
+% formatting after the copied question; in the default definition, we skip a \cs{medskip} and do a \cs{indent}.
+% Trailing the string \cs{cqSStr}, the internal command defined by \cs{declCQSolnStr}, is a space and
+% an \cs{ignorespaces}. Use \cs{writeToExSolns} to make local changes, for example,
+%\begin{verbatim}
+%...
+%\end{exercise}
+% Changed the string from Solution to Answer, do this prior to the
+% exercise.
+%\writeToExSolns{\protect\declCQSolStr{Answer}}
+%
+%\begin{exercise*}
+%...
+%\end{verbatim}
+%Best placed between exercises.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% The command \cs{cqFmtPasteQues}\DescribeMacro{\cqFmtPasteQues} inputs the copied question text,
+% along with \cs{cq@Pre} to the left and \cs{cq@Post} to the right. This command is normally
+% not redefined.
+% \begin{macrocode}
+\def\cqFmtPasteQues#1{\cq@Pre\input{#1}\cq@Post}
+% \end{macrocode}
+% The command \cs{p@ssQuesToSoln} does the work of formatting the question that is pasted
+% to the solution page. It is executed at the end of the \env{cq} environment.
+% \begin{macrocode}
+\def\p@ssQuesToSoln{\ifeq@hidesolution\else
+% \end{macrocode}
+% Inform the system that the definition of \cs{eqterminex} is changing. This to prevent
+% writing the same line multiple times.
+% \begin{macrocode}
+ \global\terminexchangedtrue % dps cq
+ \writeToExSolns{\protect
+ \decleqterminex{\protect\cqFmtPasteQues{\cq@CutName}}}\fi}
+\def\declCopyQues#1{\def\cqCopiedQues{#1}}
+\def\def@QuesToSoln{\restoreNormalSolns
+% \end{macrocode}
+% Here we restore \cs{eqterminex} to its default value, we set the stitch to false.
+% \begin{macrocode}
+ \global\terminexchangedfalse % dps cq
+ \ifeq@hidesolution\else\writeToExSolns{\protect
+ \declCopyQues{\protect\input{\cq@CutName}}}\fi}
+% \end{macrocode}
+% \cs{restoreNormalSolns}\DescribeMacro{\restoreNormalSolns} restores \cs{eqterminex} to its
+% default definition. It is place between exercises.
+% \begin{macrocode}
+\newcommand\restoreNormalSolns{%
+ \writeToExSolns{\protect\decleqterminex{\protect\eqterminexDEF}}}
+% \end{macrocode}
+% \begin{environment}{exercise}
+% With some of the preliminaries out of the way, we begin the exercise `environment'.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% the exercise environment takes two sets of optional parameter,
+% the first one is a counter (or 0) and second one is either \texttt{h} or \texttt{H}.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Specified counter, test for *
+% \begin{macrocode}
+\def\exercise@@{\@ifstar{\def\exerstar{*}\@exercise}{\exercise@@@}}
+% \end{macrocode}
+% We have recorded the presence of a star, is there
+% another optional argument, h
+% \begin{macrocode}
+\def\exercise@@@{\@ifnextchar[{\exercise@@@@}{\@exercise}}
+% \end{macrocode}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \begin{macro}{\exerSolnHeader}
+% When a solution is written to the .sol file, there is a header line that contains formatting information.
+% This command can be redefined as desired. We also introduce to markers, \cs{eqEXt} and \cs{endeqEXt} which
+% can be used in any way your imaginations can conjure up. Basically, the mark the beginning and ending of the solution.
+% \begin{macrocode}
+\newif\ifeq@exerciseheading \eq@exerciseheadingtrue
+% \end{macrocode}
+% \changes{v6.7q}{2013/12/15}{Added this hook for use by \textsf{contsolns.dtx}}
+% \begin{macrocode}
+\let\prior@exerSolnHeaderHook\@empty
+\newcommand\exerSolnHeader[3]{%
+ \prior@exerSolnHeaderHook
+ \ifeqforpaper\else\webnewpage\fi\markright{#1}%\par\noindent%
+%</package|eqexam>
+%<*package>
+ \noindent\hypertarget{#2}{#3}\relax
+%</package>
+%<*eqexam>
+ #3%
+%</eqexam>
+%<*package|eqexam>
+ \solnhspace
+}
+% \end{macrocode}
+% (2015/05/18) Made this definition conditional on whether \textsf{eqexam}
+% is loaded. The command is meant for \textsf{eqexam}. The \textsf{exerquiz}
+% package should be loaded after \textsf{eqexam} if the two are to be used
+% together, preferably by the \texttt{links} or \texttt{online} options of \textsf{eqexam}.
+% \begin{macrocode}
+%\newif\iffirstitem
+\let\solnItemMngt\relax
+%\def\eqeSolnItemMngt{\iffirstitem\global\firstitemfalse
+% \let\eqe@next\@empty\else\let\eqe@next\item\fi\eqe@next\relax}
+%\@ifpackageloaded{eqexam}{\let\solnItemMngt\eqeSolnItemMngt}
+% {\let\solnItemMngt\relax}
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro{\eqEXt}These two mark the beginning and end of solution to an exercise. \cs{eqEXt} is
+% set up to have two required arguments, usually both empty. The arguments are
+% used for filtering. The first might be a number, so we can filter out even numbered
+% exercises from odd ones. The second one is a keyword, we can filter by keyword.
+%\changes{v6.7}{2013/04/07}{Changing \cs{eqEXt} so that it has two
+%required arguments}
+% \begin{macrocode}
+%\let\eqEXt\@gobble
+\let\eqEXt\@gobbletwo
+\let\endeqEXt\relax
+% \end{macrocode}
+% \DescribeMacro{\eqExtArg}\cs{eqExtArg} and \DescribeMacro{\eqFilterArg}\cs{eqFilterArg}
+% are the arguments for \cs{eqEXt}. They are redefined at the creation of the
+% exercise.
+% \begin{macrocode}
+\let\eqExtArg\@empty
+\let\eqFilterArg\@empty
+% \end{macrocode}
+% The format of the solutions to exercises as they appear in the SOL file is,
+%\begin{verbatim}
+%\eqEXt{\eqExtArg}{\eqFilterArg}\exerSolnHeader
+% {\exsecrunhead}{ex.1}{\textbf{Exercise\ 1.}}\relax
+% ...
+% <solution content>
+% ...
+%\ReturnTo{qex.1}{\hbox {$\square $}}\endeqEXt\par\medskip
+%\end{verbatim}
+% \changes{v6.7a}{2013/05/03}{Change name of \cs{eq@writeexheader} to \cs{eqExerSolnHeader}}
+% \begin{macrocode}
+\let\eqExerSolnHeader\@empty
+%\let\eq@writeexheader\@empty
+% \end{macrocode}
+% The \cs{solutionparshape} is a command that supports the \cs{leadinitem} command
+% of \texttt{eqexam}. Its normal value is \cs{@empty}.
+% \begin{macrocode}
+\let\solutionparshape\@empty
+% \end{macrocode}
+%\changes{v7.2}{2015/03/22}{added \cs{setPrbSolnAftrIndent}}
+% \DescribeMacro{\setPrbSolnAftrIndent}\cmd{\setPrbSolnAftrIndent} sets the amount of indent
+% for the statement of problem and the solution-after solution. The command saves its argument
+% in \cs{eq@pslnaindnt} (default \texttt{0pt}) and sets the hook
+% \cs{eq@setPrbSolnAftrIndnt}. This latter macro appears in \cs{@exercise} below. Its
+% initial value is \cs{relax}; otherwise, it sets \cs{parindent=\#1}.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+%\changes{v7.2}{2015/03/22}{added \cs{restorejustify}}
+%The command \DescribeMacro\restorejustify\cmd{\restorejustify} is designed
+%for use in the \texttt{solution} environment of an \cs{item} within the
+%\texttt{parts} environment in \texttt{tabular} mode. By default,
+%\texttt{parts[2]}, for example, sets up a tabular, each entry is in a
+%paragraph (\texttt{p\{\}}) but \cs{raggedright} is used. We change this for
+%the solution using \cmd{\restorejustify}. Use \DescribeMacro\restoreJustifyOn\cmd{\restoreJustifyOn}
+% to turn on this feature and \DescribeMacro\restoreJustifyOff\cmd{\restoreJustifyOff}
+% to turn it off (default).
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% The \DescribeMacro\@exercise definition of the \texttt{exercise} environment continues here.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% Here's where we write the header to the .sol file.
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% Here is where `Exercise' is typeset; the commands \cs{marginparpriorhook} and \cs{marginpartafterhook}
+% can be used to insert content in before and after the `Exercise'.
+% \begin{macrocode}
+ \eq@initializeContAnnot
+ \ifeq@exerciseheading
+ \prior@questionsHook\marginparpriorhook\noindent\eqexheader@wrapper
+ \afterlabelhskip\marginparafterhook\gEx@CommonCmd
+ \eq@setPrbSolnAftrIndnt\ignorespaces\fi
+}
+% \end{macrocode}
+% \end{environment}
+% \changes{v6.4z}{2012/11/28}{Extracted code to make it available elsewhere.}
+% (2012/11/28) Extracted the code below from the macro above so it can be used
+% elsewhere as well.
+%\par\medskip\noindent
+% The \cs{eqterminex} command is one that appears on the solution page, just after the exercise number.
+% We redefine it to do our will. The convenience macro \cs{decleqterminex}\DescribeMacro{\decleqterminex} is used for that purpose.
+% We use \cs{ifterminexchanged} to track whether the default definition is changed.
+% \begin{macrocode}
+\newif\ifterminexchanged \terminexchangedfalse % dps cq
+\newcommand\decleqterminex[1]{\def\eqterminex{#1}}
+% \end{macrocode}
+% The default definition of \cs{eqterminex} is saved under \cs{eqterminexDEF}.
+% \begin{macrocode}
+\def\eqterminexDEF{\relax\ignorespaces}
+\decleqterminex{\eqterminexDEF}
+% \end{macrocode}
+%\changes{v6.7}{2013/04/07}{Inserted another argument into \cs{eqEXt}}
+% Added another argument into \cs{eqEXt}, used for filtering.
+% \begin{macrocode}
+\def\eqExerSolnHeaderSngl{%
+ \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
+}
+% \end{macrocode}
+%\changes{v6.7}{2013/04/07}{Inserted another argument into \cs{eqEXt}}
+% Added another argument into \cs{eqEXt}, used for filtering.
+% \begin{macrocode}
+\def\eqExerSolnHeaderList{%
+ \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
+}
+% \end{macrocode}
+% \subsection{Define \texttt{solution} Environment for \texttt{exercise}}
+% \begin{macro}{solution}
+% This is the \texttt{solution} environment for
+% \texttt{exercise}; either start \cmd{\verbatim} or,
+% \cmd{\eq@solutionsaftertrue} write the label \cmd{\exsolafter}.
+%
+% The solution macro for the \texttt{exercise} environment now takes an optional
+% argument. This argument must be a vertical skip ( i.e., \texttt{[1in]} ). When the solution
+% does not correspond to a tabular multi-part question, a vertical skip
+% |\vspace{#1}| is introduced when the \texttt{nosolutions} is in effect and when
+% \texttt{solutionsafter} is not. This feature may be useful for constructing
+% tests in this space is left for the student to write in the answer; yet, later
+% when \texttt{solutionsafter} is true, the solutions appear instead of the vertical
+% white space.
+% \begin{macrocode}
+\long\def\setsolnspace#1{\def\newsolnspace{#1}%
+ \let\solnspace\newsolnspace}
+% \end{macrocode}
+% \begin{macro}{\ckSolnOpt}
+% \begin{macro}{\noSolnOpt}
+% \cs{noSolnOpt} turns off the check for the option argument
+% of the \texttt{solution} environment for the \texttt{exercise}
+% environment. Designed for use with \textsf{eqexam}.
+% \changes{v6.4v}{2012/07/27}{Added \cs{ckSolnOpt} and \cs{noSolnOpt}
+% to switch on and off checking for the optional vertical space in the
+% \texttt{solution} environment.}
+% \begin{macrocode}
+\newif\ifeq@ckSolnVspace \eq@ckSolnVspacetrue
+\def\ckSolnOpt{\global\eq@ckSolnVspacetrue}
+\def\noSolnOpt{\global\eq@ckSolnVspacefalse}
+\let\solnhspace\space
+\let\solnspace\space
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% This macro is the beginning of the \texttt{solution} environment for
+% exercises.
+% \begin{macrocode}
+\def\solnexer@woparts{\def\bLeaveVspace{x}% = no vertical space added
+ \ifeq@ckSolnVspace
+ \def\eq@next{\@ifnextchar[{\solnexer@@woparts}%
+ {\solnexer@@woparts[\null]}}\else
+ \def\eq@next{\solnexer@@woparts[\null]}\fi
+% \end{macrocode}
+% The code below, now removed, used to deny the use of the optional parameter
+% in the parts-tabular environment. (2013/03/26)
+%\begin{verbatim}
+% \ifx\endparts\endexercise@parts@tabular
+% \def\eq@next{\solnexer@@@woparts}\fi
+%\end{verbatim}
+% \begin{macrocode}
+ \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
+}
+\newcommand{\vspaceFmt}[1]{%
+ \ifx\solutionparshape\@empty\else
+% \end{macrocode}
+% This must be part of the solution for a \cs{leadinitem} question.
+% We need to make an adjustment to the \cs{linewidth}.
+% \begin{macrocode}
+ \advance\linewidth-\leadinIndentPrtSep\fi
+ \ifdim\sameVspace>0pt
+ \let\bLeaveVspace\@empty
+ \def\leavevspace{%
+ \ifx\eq@insertverticalspace\eq@YES\par
+ \eqPriorVspace{#1}{\nobreak\noindent
+% \end{macrocode}
+% If \texttt{nLines} is non-empty, we'll use some spacial code
+% to generate the lines so it breaks across pages.
+% \begin{macrocode}
+ \ifx\soln@keys@nLines\@empty
+ \if@eqlinedfiller
+ \def\eq@lines@next{\vspaceFiller{#1}}\else
+ \def\eq@lines@next{\parbox[b][#1][t]{\linewidth}
+ {\vspaceFiller{#1}}}\fi
+ \else
+ \def\eq@lines@next{\eq@linesXPgs}%
+ \fi\eq@lines@next
+ }%
+ \fi
+ }%
+ \fi
+}
+% \end{macrocode}
+% \changes{v6.8g}{2014/04/08}{Added key-val here for \textsf{eqexam}.}
+% New option for the \texttt{solution} environment, \IndexKey{nLines}\texttt{nLines}.
+% \begin{macrocode}
+\define@key{soln@keys}{nLines}[]{\def\soln@keys@nLines{#1}}
+\let\soln@keys@nLines\@empty
+% \end{macrocode}
+% \cs{eqKV@errx} is a hack into the \textsf{keyval} package. The change, made
+% below in \cs{solnexer@@woparts} is temporary. We use it to get the dimen
+% of the \texttt{solution} env. Necessary since we have an \texttt{nLines} key defined
+% for \textsf{eqexam}.
+% \begin{macrocode}
+% keyval package \@tempa contains undefined key
+\def\eqKV@errx#1{\xdef\XKV@rm{\@tempa}}
+% \end{macrocode}
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% Now the beginning of the \textsf{solution} environment for \texttt{exercise} env.
+% \begin{macrocode}
+\def\solnexer@@woparts[#1]{%
+ \ifcqIsActive\else\ifterminexchanged
+% \end{macrocode}
+% If this problem does not use \env{cq} or \env{cq*}, we reset the solution page,
+% to the default definition of \cs{eqterminex}.
+% \begin{macrocode}
+ \restoreNormalSolns\fi\fi % dps cq
+ \global\cqIsActivefalse
+% \end{macrocode}
+% \changes{v6.3z}{2011/04/28}{Added definition of \cs{sameVspace} for the cases
+% where there is no vertical space specified.}
+% Is the argument \cs{null}? If yes, same as \texttt{0pt}.
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% \changes{v6.8g}{2014/04/08}{Added key-val here for \textsf{eqexam}.}
+% Now, if the optional argument is non-null, we must discern the argument:
+% is it a vertical space or a key-value?
+% \begin{macrocode}
+ \@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}}%
+% \end{macrocode}
+% (03/04/11) Try to insert a new option: if there are \cs{ifvspacewithsolns} option
+% then \textsf{eqexam} should leave space for writing an answer, and put solutions at the end
+% of the document.
+% \begin{macrocode}
+ \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi
+ \ifvspacewithsolns\vspaceFmt{\sameVspace}\fi
+ \ifeq@nosolutions\ifeq@solutionsafter\else
+ \vspaceFmt{\sameVspace}\fi\fi
+ \fi\fi
+ \solnexer@@@woparts
+}
+% \end{macrocode}
+% \changes{v7.7q}{2016/07/22}{Added \string\cs{solnsafterSkip}}
+% \begin{macrocode}
+\def\solnsafterSkip#1{\setlength{\@tempdima}{#1}%
+ \def\solnsafterSkipAmt{\the\@tempdima}%
+ \def\solutionsafterSkip{\vskip#1\relax}}
+\solnsafterSkip{\smallskipamount}
+% \end{macrocode}
+% The next two definitions are used for debugging the
+% \cs{ifkeepdeclaredvspacing} feature (\textsf{eqexam} only).
+% \begin{macrocode}
+\def\eqe@debugVertSkip#1{}
+\def\eqe@showEndHere#1{#1}
+% \end{macrocode}
+% Used to set the starting point of the solution
+% \begin{macrocode}
+\def\eqe@setStartSolns{%
+ \xdef\eq@startSoln{\the\pagetotal}%
+ \eqe@debugVertSkip{\marginpar{\smash{b[\sameVspace]}}}%
+}
+% \end{macrocode}
+%\changes{v6.4b}{2011/06/30}{%
+% Save the definitions of \cs{comment} and \cs{endcomment}. For some reason,
+% yet to be determined, there are problems when using the \texttt{fortextbook}
+% option when hiding solutions.
+%}
+% \begin{macrocode}
+\let\eqSavedComment\comment
+\let\eqSavedEndCommet\endcomment
+% \end{macrocode}
+%\changes{v7.4}{2015/03/23}{added \cs{setTabulrSolnEnv}}
+% \begin{macrocode}
+\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}}%
+% \end{macrocode}
+% \cmd{\reset@doendpe} resets the definition of the core command
+% \cmd{\@doendpe} so behavior is correct whether list environment
+% starts in vertical mode or not.
+% \begin{macrocode}
+ \reset@doendpe{\parshape \@ne 0pt \linewidth}%
+% \expandafter\def\expandafter\@par\expandafter{\@par\everyparShape}%
+ \parshape \@ne 0pt \linewidth
+ \everyparShape
+}
+\newif\ifthereissolution
+\let\priorexsolafterList\@empty
+\let\priorexsolafterTab\@empty
+\let\priorexsolafterSngl\@empty
+\def\eq@Hid{H}\def\eq@hid{h}
+\def\solnexer@@@woparts{%
+ \global\thereissolutiontrue
+ \def\exerwparts@cols{0}%
+ \let\verbatim@out\ex@solns
+ \if\currhideopt\eq@Hid
+% \end{macrocode}
+% (2017/02/09) Hide \cs{minVspacet@bs} for `H' option
+% \changes{v7.8e}{2017/02/09}{Hide \string\cs{minVspacet@bs} for `H' option}
+% \begin{macrocode}
+ \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
+ \ifx\bLeaveVspace\@empty\leavevspace\fi
+ \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%\par
+ \removelastskip\removelastparskip
+ \cqSAtrue\eqCQDeclarations
+ \declCopyQues{\input{\cq@CutName}}%
+ \ifx\exsolafter\@empty
+% \end{macrocode}
+% If we have solutions after and there is no label and no vertical
+% skip specified, we do nothing other than to execute \cs{eqe@setStartSolns},
+% which marks the beginning of the ``solution.''
+% \begin{macrocode}
+ \ifdim\sameVspace=0pt\eqe@setStartSolns
+ \else
+% \end{macrocode}
+% If there is vertical space specified, we do a standard skip, and mark the beginning
+% of the solution with \cs{eqe@setStartSolns}.
+% \begin{macrocode}
+ \solutionsafterSkip
+ \eqe@setStartSolns
+ \fi
+ \else\par\kern0pt
+ \solutionsafterSkip
+ \noindent\strut\eqe@setStartSolns
+ \fi
+ \parskip\eqeques@parsep
+ \ifx\endparts\endexercise@parts@tabular
+ \eq@setPrbSolnAftrIndnt
+ \restorejustify
+% \expandafter\setTabulrSolnEnv
+ \fi
+% \end{macrocode}
+% (2017/02/09) Added prior \cs{exsolafter} hooks.
+% \changes{v7.8e}{2017/02/09}{Added prior \string\cs{exsolafter} hooks}
+% \begin{macrocode}
+ \ifx\endparts\endexercise@parts@tabular\expandafter
+ \priorexsolafterTab\else
+ \ifx\endparts\endexercise@parts@list\expandafter
+ \priorexsolafterList\else\expandafter
+ \priorexsolafterSngl\fi\fi
+% \end{macrocode}
+% The solution after label, followed by a space.
+% \begin{macrocode}
+ \exsolafter\space\ignorespaces
+% \end{macrocode}
+% We set the shape of the solutionafter.
+% This is empty if \cs{leadinitem} is not used.
+% \begin{macrocode}
+ \solutionparshape
+ \else
+% \end{macrocode}
+% Write the solution header 11/03/05
+% \begin{macrocode}
+ \eqExerSolnHeader
+ \global\let\eqExerSolnHeader\@empty
+ \global\therearesolutionstrue\expandafter\procsoln
+ \fi
+ }%
+ \fi
+\eq@next}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\let\endsolnexerhook\@empty
+\let\pkg@endsolnexerhook\@empty
+\let\endsolnexerhookaux\@empty
+% \end{macrocode}
+% This macro attempts to insert the return link at the end of the
+% last paragraph of the solutions, this makes the return label
+% look nice, and saves a little space.
+% \begin{macrocode}
+\def\eq@fititin#1{\noindent\unskip\nobreak\hfill\penalty100
+ \hskip1em\hbox{}\nobreak\hfill#1}%
+\let\eqfititin\eq@fititin
+%</package|eqexam>
+%<*package>
+\def\ReturnTo#1#2{\eq@fititin{\hyperlink{#1}{#2}}}
+\def\xReturnTo#1#2{\eq@fititin{\href{#1}{#2}}}
+%</package>
+% \end{macrocode}
+% \begin{macro}{\eqExerSolnTrailer}
+% The material that follows the solution in the .sol file.
+% \begin{macrocode}
+%<*package|eqexam>
+\newcommand\eqExerSolnTrailer{%
+%</package|eqexam>
+%<*package>
+ \if\exerSolns@ExtFile\eq@YES\protect\xReturnTo
+ {\exerSolns@ReturnPath\jobname\#qex.\the@exno}%
+ \else\protect\ReturnTo{qex.\the@exno}\fi
+ {\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else
+ \exrtnlabelformat\fi}}%
+ \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi^^J%
+%</package>
+%<*eqexam>
+ \protect\ReturnTo{page.\the\c@page}%
+ {\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else
+ \exrtnlabelformat\fi}}%
+ \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi^^J%
+%</eqexam>
+%<*package|eqexam>
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\endsolnexer@woparts}
+% Unless \cmd{\eq@solutionsaftertrue}, then \cmd{\endverbitim},
+% and write return labels.
+% \begin{macrocode}
+\def\endsolnexer@woparts{%
+ \if\currhideopt H%
+ \ifkeepdeclaredvspacing\vskip\sameVspace\fi
+ \csname endprocsoln\endcsname
+ \else
+% \end{macrocode}
+% If solutions after, we start a new paragraph, then add some kerning glue,
+% this gives a better gauge for calculating the \cs{pagetotal}.
+% \begin{macrocode}
+ \ifeq@solutionsafter
+ \if\exerstar*%
+ \eq@fititin{\mbox{\exrtnlabelformatwp}}\else
+ \eq@fititin{\mbox{\exrtnlabelformat}}\fi
+ \ifx\istabularexer\eq@YES\kern0pt\else\par\fi
+% \ifnum\exerwparts@cols>0\relax\kern0pt\else\par\fi
+% \end{macrocode}
+% \changes{v6.3z}{2011/04/28}{if \cs{ifkeepdeclaredvspacing} is true, we attempt
+% to preserve the vertical space declared by the \textsf{solution} environment when
+% \cs{ifeq@solutionsafter} is true.}
+% \begin{macrocode}
+\ifx\minVspacet@bs\@empty
+ \ifkeepdeclaredvspacing
+% \end{macrocode}
+% We get the current \cs{pagetotal}, and subtract off the page total as recorded
+% by \cs{eq@startSoln}.
+% \begin{macrocode}
+ \@tempdima\pagetotal
+ \advance\@tempdima-\eq@startSoln
+% \end{macrocode}
+% \changes{v6.4w}{2012/26/27}{Added \cs{relax} following the assignment.}
+% {\TeX} was looking ahead looking for the rest of the dimension, this caused
+% problems because later code was expanded when it should not have been. Inserted
+% \cs{relax}, \verb~\@tempdimb\sameVspace\relax~.
+% \begin{macrocode}
+ \@tempdimb\sameVspace\relax
+% \end{macrocode}
+% if \cs{soln@keys@nLines} is nonempty, we put \cs{sameVspace} to \texttt{1sp},
+% unless the author asks for \texttt{1sp}, this is how it is set.
+% \begin{macrocode}
+ \ifdim\@tempdimb>1sp\relax
+% \end{macrocode}
+% If there is a positive value for \cs{sameVspace}, we calculate
+% the difference between\cs{@tempdimab} and \cs{@tempdima}, that is, we calculate
+%\begin{verbatim}
+% \sameVspace-(\pagetotal-\eq@startSoln)
+%\end{verbatim}
+% \begin{macrocode}
+ \advance\@tempdimb-\@tempdima
+% \end{macrocode}
+% If this difference is positive, we will skip this amount.
+% \begin{macrocode}
+ \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
+ \endprocsoln
+ \eq@ckglobalhide
+ \ifeq@hidesolution\else
+ \endsolnexerhookaux
+% \end{macrocode}
+% Here's were we write the trailer for the solution
+% \begin{macrocode}
+ \set@display@protect
+ \immediate\write\verbatim@out{\eqExerSolnTrailer}%
+ \set@typeset@protect
+ \fi
+ \fi
+ \fi
+\pkg@endsolnexerhook\endsolnexerhook}
+% \end{macrocode}
+% \end{macro}
+% \subsection{The \texttt{exercise*} Environment: Exercises with Parts}
+% Exercises with parts are enclosed within a \texttt{parts} environment. There are two types
+% of parts listing: list-type and tabular-type.
+% \begin{environment}{exercise*}
+% For the exercise* environment, we set a flag to indicate that the \cs{exerstar}
+% has been set in the star environment, the begin the \cs{exercise} and finished with
+% \cs{endexercise}.
+%\changes{v6.07}{2007/05/05}
+%{
+% Created the \texttt{exercise*} environment, this is equivalent to the \texttt{*} option of the
+% \texttt{exercise} environment. You can use either version, but now, \texttt{exercise*} is preferred.
+%}
+% \begin{macrocode}
+\let\eq@exerstarEnv\relax
+\newenvironment{exercise*}{\def\eq@exerstarEnv{*}\exercise}
+{\endexercise}
+% \end{macrocode}
+% \end{environment}
+% \begin{environment}{parts}
+% Initially, we see if there is an optional argument, if yes, the
+% tabular environment is used, the argument is the number of columns
+% requested. Otherwise, we use a list environment.
+% \begin{macrocode}
+\def\exerwparts@cols{0}
+\let\topofpartshook\relax
+\let\@listiiredefined\eq@NO
+\let\itsExerParts\eq@NO
+% \end{macrocode}
+% (2015/05/30) Added a feature for lead in for tabular mode for parts environment.
+% \DescribeMacro{\tableadin}\cmd{\tableadin} is placed prior to
+% \verb!\begin{parts}[2}!, no preamble leading into the question is assumed.
+% Using the switch \cs{if@tableadinitem} we remove any \cs{par}s and \cs{vskip}s.
+% \begin{macrocode}
+\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.}%
+}
+% \end{macrocode}
+% (2016/12/16) Define a flag \cs{istabularexer} that signals to the solution environment it is in a tab environment
+% \changes{v7.8b}{2016/12/16}{Added \string\cs{istabularexer}}
+% \begin{macrocode}
+\let\istabularexer\eq@NO % dps 2016/12/16
+\def\exercise@parts{\let\rlspar\relax
+ \ifx\solutionparshape\@empty
+ \let\isitleadin\eq@NO
+% \end{macrocode}
+% If \cs{tableadin}, we remove the \cs{removelastskip} and \cs{par} that follows.
+% \begin{macrocode}
+ \if@tableadinitem\let\rlspar\@gobbletwo\fi
+ \else\let\isitleadin\eq@YES\fi
+ \rlspar\removelastskip\par
+ \if\isitleadin\eq@YES
+% \end{macrocode}
+% \changes{v7.6}{2015/05/24}{Some vspace adjustment at the beginning of
+% a leadinitem.} If there is a lead-in, we set \cs{topsep} to \texttt{0pt}
+% and skip \cs{itemsep}.
+% \begin{macrocode}
+ \def\eqparts@topsep{0pt}% dps88
+ \vskip\eqparts@itemsep\relax\fi % dps88
+ \topofpartshook
+ \let\itsExerParts\eq@YES % dps17
+ \global\let\@listiiredefined\eq@NO
+ \def\exerwparts@cols{0}\@ifnextchar[%
+ {%
+% \end{macrocode}
+% When there is a \cs{tableadin}, we remove \cs{removelastparskip} because it does not occur above.
+% \begin{macrocode}
+ \if@tableadinitem\else\removelastparskip\fi % dps11
+% \keepdeclaredvspacingfalse
+ \let\endparts\endexercise@parts@tabular\exercise@parts@tabular@}%
+ {\let\endparts\endexercise@parts@list\exercise@parts@list}}
+% \end{macrocode}
+% \subsubsection{List-type Parts Question}
+% This is a redesigned \texttt{list} environment. Meant to be used with the
+% \texttt{exercise} environment with the *-option.
+% \begin{macrocode}
+\def\eq@extralabelsep{0pt}
+% \end{macrocode}
+% \begin{macro}{\setPartsWidth}
+% Convenience macro to set \cs{part@indent}.
+%\changes{v6.4h}{2011/07/28}{%
+% Added \cs{setPartsWidth} to set \cs{part@indent}. Also
+% defined \cs{eqe@prtsepPrb}.
+%}
+% \begin{macrocode}
+\newcommand{\setPartsWidth}[1]{\def\parts@indent{\normalfont#1}%
+ \bgroup\settowidth{\eq@tmpdima}{\parts@indent}%
+ \xdef\widthOfParts{\the\eq@tmpdima}\egroup}
+\setPartsWidth{(d)}
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro{\eqe@prtsepPrb} is used to set \cs{labelsep}.
+% I've also added the two hooks \DescribeMacro{\prior@parts@hook}\cs{prior@parts@hook} and
+% \DescribeMacro{\post@parts@hook}\cs{post@parts@hook} as well; these are used
+% by \textsf{eqexam} for hanging the solutions with parts correctly.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% (2012/02/04) Common code to the definition of \cs{item}
+% both list and tabular versions.
+% \begin{macrocode}
+\def\eq@item@common{\eq@insertContAnnot\eqp@rtc@lcm@rk
+ \def\currhideopt{x}\eq@hidesolutionfalse\eq@nolinkfalse
+ \@ifnextchar[{\@ckhide}{\eq@item}}
+% \end{macrocode}
+% \DescribeMacro{\eqpartsitemsep}(2012/02/03) Fine tune the control over space between
+% parts.
+%\changes{v6.4o}{2012/02/04} {Fine tune the control over space between parts.}
+% \begin{macrocode}
+\newcommand{\partsitemsep}[1]{{% dps88
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@itemsep{\the\@tempdima}}}
+\let\eqpartsitemsep\partsitemsep
+\def\eqparts@itemsep{0pt}
+\newcommand\partsparsep[1]{{% dps88
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@parsep{\the\@tempdima}}}
+\def\eqparts@parsep{0pt}
+\newcommand\partstopsep[1]{{% dps88
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@topsep{\the\@tempdima}}}
+\def\eqparts@topsep{3pt}
+% \end{macrocode}
+% The next two commands are in support of the \cs{leadinitem} definition
+% of \textsf{eqexam}
+% \begin{macrocode}
+\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.}%
+}
+% \end{macrocode}
+% (2014/03/23) Problems when description env is used with parts env. The
+% hook \cs{exlisttabheaderafterhook} is interfering with the optional argument.
+% \begin{macrocode}
+\def\eq@handleOptArg[#1]{\def\eq@optArg{[#1]}\eq@handleOptArgi}
+\def\eq@handleOptArgi{\expandafter
+ \eq@item@latex\eq@optArg\exlisttabheaderafterhook}
+% \end{macrocode}
+% We add a new switch \cs{ifwithinparts} (2014/12/03) that is used to detect whether
+% we are within the parts environment.
+% \begin{macrocode}
+\newif\ifwithinparts
+\let\ex@listtabheader@fterhook\@empty
+% \end{macrocode}
+% Begin the list version of the parts environment.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% Write the solution header to .sol for list type question.
+% \begin{macrocode}
+ \global\let\eqExerSolnHeader\eq@@writeexheaderlist
+ \fi
+ \fi
+ \fi
+ \fi
+% \end{macrocode}
+% (2013/04/28) Inserted \texttt{[r]}
+% \begin{macrocode}
+ \makebox[\widthOfParts][r]{\eqexlisttabheader}%
+}{%
+ \usecounter{partno}%
+% \end{macrocode}
+% (2012/11/30) If \cs{solutionparshape} is nonempty, the user has used
+% \cs{leadinitem}, so we increment \texttt{partno}.
+% \begin{macrocode}
+ \if\isitleadin\eq@YES % dps7
+ \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
+ \xdef\prtsIndntSep{\the\eq@tmplength}% dps7
+% \advance\linewidth-\prtsIndntSep\relax
+ \if\itsforleadinitem\eqe@YES\setcounter{partno}{\fliPartNo}\else
+ \setcounter{partno}{1}\fi\fi
+ \let\leadinitem\eq@leadinitemparts
+ \let\tableadin\eq@tableadinparts
+ \global\let\solutionparshape\@empty
+% \setlength{\topsep}{3pt}%
+ \setlength{\topsep}{\eqparts@topsep}%
+% \ifdim\parskip>\z@
+% \addtolength{\topsep}{-\parskip}\fi
+ \setlength{\parskip}{0pt}%
+ \setlength{\partopsep}{0pt plus 1pt minus 1pt}%
+ \ifdim\eqeques@parsep=0pt
+ \setlength{\parsep}{\eqparts@parsep}%
+% \setlength{\itemsep}{\eqparts@itemsep-\eqparts@parsep}%
+ \else
+ \setlength{\parsep}{\eqeques@parsep}%
+% \setlength{\itemsep}{\eqparts@itemsep-\eqeques@parsep}%
+ \fi
+ \setlength{\itemsep}{\eqparts@itemsep-\parsep}%
+ \setlength{\itemindent}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+% \end{macrocode}
+% For \cs{itemsep}, we subtract off, for reasons not precisely known to me.
+% This is done for \textsf{eqexam}, what effect does it have on a straight
+% \textsf{exerquiz} file?
+% \begin{macrocode}
+% \setlength{\itemsep}{\eqparts@itemsep-\eqparts@parsep}%
+ \settowidth{\labelsep}{\normalfont\eqe@prtsepPrb}%
+ \addtolength{\labelsep}{\eq@extralabelsep}%
+ \settowidth{\labelwidth}{\parts@indent}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}%
+% \end{macrocode}
+% When a \texttt{trivlist} appear with the parts environment, it executes
+% \cs{item}\cs{relax}, which causes problems because \cs{item} has been
+% redefined. We try to correct this.
+% \begin{macrocode}
+ \let\eq@item@latex\item
+% \def\eq@item{\eq@item@latex\exlisttabheaderafterhook}%
+% \end{macrocode}
+% We handle the problem of seeing the optional argument by getting the argument,
+% if there is one, and switching commands around.
+% \begin{macrocode}
+ \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}
+% \end{macrocode}
+% The following command is inserted at the beginning of the parts environment
+% and defines the current problem number and the page the \texttt{problem*} environment
+% starts. The command is used by the \textsf{eqexam} package.
+% \begin{macrocode}
+\def\eq@initializeContAnnot{\@ifundefined{eqequestions}
+ {\global\let\eqeCurrProb\relax}
+ {\xdef\eqeCurrProb{\theeqquestionnoi}}%
+ \xdef\eq@currProbStartPage{\arabic{page}}%
+}
+% \end{macrocode}
+% \subsubsection{Tabular-type Parts Question}
+% Now for the tabular style of multi-part exercise, the argument
+% \#1 is the number of columns requested.\medskip
+%
+% (2017/02/09) Added xkeyvals to optional argument of \texttt{parts}. Syntax is now
+%\begin{verbatim}
+% \begin{parts}[<num>|nCols=<num>,minVspace=<length>]
+%\end{verbatim}
+% \changes{v7.8e}{2017/02/09}{Added xkeyvals to optional argument of \string\texttt{parts}}
+% \begin{macrocode}
+\define@key{tabp@rts}{nCols}{\def\exerwparts@cols{#1}}
+\define@key{tabp@rts}{minVspace}{\def\minVspacet@bs{#1}}
+% \end{macrocode}
+% Code to create vertical space when \texttt{answerkey} are in effect and
+% \cs{vspacewithkeyOn} is present.
+% \changes{v7.8e}{2017/02/09}{Added code for tab parts environment}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Begin the core of the \texttt{parts} tabular-mode environment.
+% \begin{macrocode}
+\def\exercise@parts@tabular@[#1]{%
+% \end{macrocode}
+% \cs{inittabMark} initializes the auto-tab feature. (2013/03/26)
+% \begin{macrocode}
+ \inittabMark
+% \end{macrocode}
+% locally, turn off continued annotations. Not allowed in tabular parts.
+% \begin{macrocode}
+ \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}
+% \end{macrocode}
+% For the tabular environment for the \texttt{exercise*} environment, we try
+% to automatically insert the column delimiter (\texttt{\&}) and the end of line.
+% \cs{eq@extabColCnt} keeps track of the column number for the auto-tab feature.
+% \begin{macrocode}
+\newcount\eq@extabColCnt
+% \end{macrocode}
+% \DescribeMacro{\autotabOn} turns on the auto-tab feature for the \texttt{parts} environment,
+% while \cs{autotabOff}\DescribeMacro{\autotabOff} turns it off. The off setting is the default.
+% \begin{macrocode}
+\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 }
+% \end{macrocode}
+% \DescribeMacro{\autotabnewline} is the new line command for the auto-tab feature.
+% It does a |\\| and resets the column counter \cs{eq@extabColCnt}. The user can use
+% \texttt{[vspace]}, the default is \cs{eqparts@tabrowsep}. We use \cs{noalign} so that the space
+% is added to the bottom of the whole row.
+% \begin{macrocode}
+\newcommand\autotabnewline[1][\eqparts@tabrowsep]{%
+% \end{macrocode}
+% If this is not tabular env, \cs{autotabnewline} does nothing
+% \begin{macrocode}
+ \ifnum\exerwparts@cols>0\relax % dps cq
+ \ifx\eq@tabMarkChk\@gobble
+ \def\eq@atnext{\expandafter
+ \tabularnewline\expandafter[#1]}\else
+ \def\eq@atnext{\resettabMark\tabularnewline
+ \noalign{\expandafter\kern#1}}\fi % dps7
+ \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
+}
+% \end{macrocode}
+% Set up the tabular environment, after making a lot of decisions.
+% \begin{macrocode}
+\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}{%
+% \ifx\eq@tabMarkChk\@gobble
+% \partstabrowsep{\@rowskip}\fi % detecting autotab off or on
+ \setcounter{partno}{0}%
+% \end{macrocode}
+% (2015/01/10) If \cs{solutionparshape} is nonempty, the user has used
+% \cs{leadinitem}, so we increment \texttt{partno}.
+% \begin{macrocode}
+ \def\tablrIndent{\hglue\prtsIndntSep\relax}%
+ \if\isitleadin\eq@YES % dps7
+ \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
+% \end{macrocode}
+%\changes{v6.4x}{2012/11/27}{Added control over row spacing in parts environment}
+% Added control over row spacing in parts environment. The spacing
+% is controlled by \cs{eqpartstabrowsep}, default value of \texttt{0pt}. The macro
+% \cs{@xtabularcr} is from the {\LaTeX} core. Definition \cs{eq@xtabularcr} is found
+% after the current definition block.
+% \begin{macrocode}
+ \@ifundefined{@xtabularcr}{\let\@xarraycr\eq@xtabularcr}
+ {\let\@xtabularcr\eq@xtabularcr}%
+% \end{macrocode}
+% We reduce the width of the \cs{parbox}es (p|{width}|) by \cs{exertabsep} to leave
+% room for \cs{tabcolsep=}\cs{exertabsep} between columns.
+%\begin{verbatim}
+% n=\exerwparts@cols
+% width=(\linewidth-2*(n-1)*\tabcolsep)/n
+%\end{verbatim}
+% \begin{macrocode}
+ \eq@tmpdima=\linewidth
+% \ifx\isitleadin\eq@NO
+ \advance\eq@tmpdima-\prtsIndntSep\relax
+% \fi
+ \@tempcnta\exerwparts@cols\relax
+ \advance\@tempcnta-1\relax
+ \multiply\@tempcnta2\relax
+ \@tempdima\prtsIndntSep\relax
+ \divide\@tempdima 2\relax
+ \edef\halfWidth{\the\@tempdima}%
+% \ifx\isitleadin\eq@YES\@tempdima0pt\fi
+ \advance\@tempdima\eq@partstabcolsep\relax
+% \@tempdima\eq@partstabcolsep\relax
+ \tabcolsep\@tempdima
+ \multiply\@tempdima\@tempcnta
+ \advance\eq@tmpdima-\@tempdima
+ \divide\eq@tmpdima by\exerwparts@cols
+% \ifx\isitleadin\eq@NO
+ \advance\eq@tmpdima\prtsIndntSep\relax
+% \advance\eq@tmpdima\halfWidth\relax % dps17
+% \else\advance\eq@tmpdima\halfWidth\relax\fi
+% \end{macrocode}
+% If there is a \cs{tableadin}, we do not perform a \cs{vskip}.
+% \begin{macrocode}
+ \if@tableadinitem\else\vskip\eq@partstabtopsep\relax\fi % dps11
+ \noindent\normalbaselines\kern0pt
+ \prior@parts@hook\abovepartshook
+% \end{macrocode}
+%\changes{v7.03}{2015/03/02}{Added \texttt{>\{\cs{strut}\}}, this gives
+% better control over vertical spacing.}%
+% \changes{v7.4}{2015/03/23}{inserted \cmd\setTabulrSolnEnv}%
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% \changes{v7.4}{2015/03/23}{added an adjustment to the command \cs{endexercise@parts@tabular}}
+% A vertical space adjustment
+% \begin{macrocode}
+% \ifeq@solutionsafter\adjDisplayBelow
+% \ifthereissolution\else\vskip\baselineskip\fi\fi
+% \end{macrocode}
+% (201/05/09) There is a problem of communicating the totals through
+% the \cs{mark} command (use in \textsf{eqexam}). In \textsf{eqexam}
+% the command \cs{eqe@innermarkpts} is defined. Once the group is closed
+% we emit this mark.
+% \begin{macrocode}
+ \aftergroup\eqe@innermarkpts
+ \aftergroup\eq@vpartstabtopsep}
+% \end{macrocode}
+% (201/05/09) We make a default definition for \cs{eqe@innermarkpts}, this is needed
+% when \textsf{exerquiz} is used without \textsf{eqexam}.
+% \begin{macrocode}
+\let\eqe@innermarkpts\relax
+% \end{macrocode}
+% Redefine \verb+\item+, could be risky
+% \begin{macrocode}
+\def\item@part@tabular{\refstepcounter{partno}%
+% \end{macrocode}
+% As of 2013/03/25, I am allowing solutions after for tabular parts. I'm commenting
+% out the following line.\\
+% |%\eq@solutionsafterfalse % no solutionsafter are allowed|
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% Write the solution header to \texttt{.sol} for tabular type question.
+% \begin{macrocode}
+ \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}%
+ \advance\linewidth-\eq@tmplength
+ \parshape \@ne 0pt \linewidth
+ \everypar{\parshape \@ne 0pt \linewidth}%
+ \eq@setPrbSolnAftrIndnt
+% \end{macrocode}
+% (2013/04/28) Inserted \texttt{[r]}
+% \begin{macrocode}
+ \makebox[0pt][r]{\eqexlisttabheader\eqe@prtsepPrb}%
+ \ex@listtabheader@fterhook
+ \exlisttabheaderafterhook\ignorespaces
+}
+% \end{macrocode}
+% \begin{macrocode}
+\def\@ckhide[#1]{\edef\eq@arg{#1}%
+ \def\currhideopt{x}%
+ \ifx\eq@arg\@empty\else
+ \if\eq@arg\eq@Hid
+ \eq@hidesolutiontrue\eq@nolinktrue%
+ \edef\currhideopt{\Hidesymbol}%
+ \else
+ \ifeq@globalshowsolutions\else
+ \if\eq@arg\eq@hid
+ \eq@hidesolutiontrue\eq@nolinktrue%
+ \def\currhideopt{h}%
+ \fi
+ \fi
+ \fi\fi
+ \eq@item
+}
+% \end{macrocode}
+% In the above tabular parts environment, \cs{@xtabularcr} is \cs{let} to
+% equal to \cs{eq@xtabularcr}.
+% \begin{macrocode}
+\def\tabControlOn{\@ifundefined{@xtabularcr}
+ {\let\save@@xtabularcr\@xarraycr}
+ {\let\save@@xtabularcr\@xtabularcr}}
+% \end{macrocode}
+%\changes{v7.0}{2014/11/05}{Added \cs{tabControlOn} and \cs{tabControlOff}.
+% Tab control is interfering with regular tabular environments, or anywhere
+% \texttt{d} is used.}
+% \begin{macrocode}
+\def\tabControlOff{\@ifundefined{@xtabularcr}
+ {\let\@xarraycr\save@@xtabularcr}
+ {\let\@xtabularcr\save@@xtabularcr}}
+\AtBeginDocument{\tabControlOn}
+\def\eq@xtabularcr{\@ifnextchar[{\save@@xtabularcr}
+ {\eqe@tab@parts@rowsep}}%
+\def\eqe@tab@parts@rowsep{\save@@xtabularcr
+ \noalign{\expandafter\kern\eqparts@tabrowsep}}%
+% \end{macrocode}
+% End of the \texttt{parts} environment.
+% \end{environment}
+% \begin{macrocode}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \subsection{Enumerating exercises}
+% Here we provide the \texttt{exEnumerate} environment for enumerating exercises.
+% We provide several key-values for adjusting the spacing of the environment.
+% The keys defined here are \texttt{labelwidthTo}, \texttt{labelwidth}, \texttt{topsep},
+% \texttt{parsep},\texttt{itemsep}, \texttt{labelsep}, and \texttt{continue}.%
+% \IndexKey{labelwidthTo}\IndexKey{labelwidth}\IndexKey{topsep}%
+% \IndexKey{parsep}\IndexKey{itemsep}\IndexKey{labelsep}\IndexKey{continue}%
+% \begin{macrocode}
+\define@key{exEnum}{labelwidthTo}[\normalsize\normalfont\bfseries00.\ ]%
+ {\def\exE@labelwidthTo{#1}}
+\define@key{exEnum}{labelwidth}[\@empty]{\def\exE@labelwidth{#1}}
+\let\exE@labelwidth\@empty
+\define@key{exEnum}{topsep}[3pt]{\def\exE@topsep{#1}}
+\define@key{exEnum}{parsep}[3pt]{\def\exE@parsep{#1}}
+\define@key{exEnum}{itemsep}[0pt]{\def\exE@itemsep{#1}}
+\define@key{exEnum}{labelsep}[\normalsize\normalfont\ ]%
+ {\settowidth{\@tempdima}{#1}\edef\exE@labelsep{\the\@tempdima}}
+\define@key{exEnum}{continue}[]{\let\eq@ExEnumResetCnt\@empty}
+\def\eq@ExEnumResetCnt{\setcounter{questionno}{0}}
+\setkeys{exEnum}{labelwidthTo,topsep,parsep,itemsep,labelsep}%
+% \end{macrocode}
+% \begin{environment}{exEnumerate}
+% The environment for enumerating exercises. The companion definitions for
+% these exercises follow. The argument is expanded first before being passed
+% to \cs{setkeys}; therefore you can pass a command of key-value options through
+% the optional argument:
+% |\def\myOpts{topsep=0pt}|, |\begin{exEnumerate}[\myOpts]|.
+% \begin{macrocode}
+\newenvironment{exEnumerate}[1][]{\everypar{}%
+ \toks@=\expandafter{#1}%
+ \edef\tempexp{\noexpand\setkeys{exEnum}{\the\toks@}}\tempexp
+ \eq@ExEnumResetCnt
+ \let\afterlabelhskip\@empty
+ \let\solnhspace\@empty
+ \aboveexskip{0pt}\belowexskip{\exE@parsep}%\belowexskip{0pt}%
+ \def\eqexheader@wrapper{\makebox[0pt][r]{%
+ \hypertarget{qex.\the@exno}{\eqexheader}\hspace{\labelsep}}}%
+% \end{macrocode}
+% The next two definitions are to correctly format bookmarks for these exercises.
+% \begin{macrocode}
+ \def\exbookmarkfmt{\thequestionno.\space}
+ \def\partbookmarkfmt{(\thepartno)\space}
+% \end{macrocode}
+% The definition of \cmd{\setEnum} supports the \texttt{contsolns} option.
+% \begin{macrocode}
+ \def\setENum{\Elabel\if\exerstar*\thequestionno(\thepartno)\else
+ \thequestionno\fi}%
+ \ifExSolutionsSet\else
+ \writeToExSolns{\protect\begin{exEnumerate}}\fi
+ \list{}{%
+ \ifx\exE@labelwidth\@empty
+ \settowidth{\labelwidth}{\exE@labelwidthTo}\else
+ \setlength{\labelwidth}{\exE@labelwidth}\fi
+ \setlength{\topsep}{\exE@topsep}%
+ \ifdim\parskip>\z@\addtolength{\topsep}{-\parskip}\fi
+ \setlength{\parsep}{\exE@parsep}%
+ \setlength{\itemsep}{\exE@itemsep}%
+ \setlength{\itemindent}{0pt}%
+ \setlength{\listparindent}{0pt}%
+ \setlength{\itemindent}{0pt}%
+% \setlength{\labelsep}{0pt}%
+ \settowidth{\labelsep}{\normalfont\ }%
+ \setlength{\leftmargin}{\labelwidth}%
+ }\item\relax}{\ifExSolutionsSet\else
+ \writeToExSolns{\protect\end{exEnumerate}}\fi
+\endlist}
+% \end{macrocode}
+% \end{environment}
+% \begin{environment}{enumex}
+% \begin{environment}{enumex*}
+% Prototype environments for enumerating exercises. These can be redefined as desired.
+% \begin{macrocode}
+\newenvironment{enumex}{%
+ \renewcommand\exlabelformat{\textbf{\thequestionno.}}%
+ \renewcommand\exsllabelformat
+ {\protect\makebox[0pt][r]{\protect\textbf{\thequestionno.\ }}}%
+\begin{exercise}[questionno]}{\end{exercise}}
+\newenvironment{enumex*}{%
+ \renewcommand\exlabelformatwp{\textbf{\thequestionno.}}%
+ \renewcommand\exsllabelformatwp
+ {\protect\makebox[0pt][r]{\protect\textbf{\thequestionno.}\ }%
+ \protect\textbf{(\thepartno)}\ }%
+\begin{exercise*}[questionno]}{\end{exercise*}}
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+% \end{macrocode}
+% \subsection{Including the \texttt{exercise} Solutions}
+% Include solutions to the exercises back into the file. This
+% section also handles solutions to quizzes as well. This macro
+% was taken from the \TeX book.
+% \begin{macro}{\includeexersolutions}
+% This macro inserts the solutions to the exercises, if there are
+% any solutions. If a user uses this macro to insert the solutions
+% elsewhere, \cmd{\include@solutions} is called, then put is to
+% \cmd{\relax}.
+% \begin{macrocode}
+%\def\includeexersolutions{%
+\def\includeexersolutions{\@ifstar
+ {\let\resetEXsolns\relax\includeexersolutionsi}
+ {\def\resetEXsolns{\global\let\include@solutions\relax}%
+ \includeexersolutionsi}%
+}
+\newcommand{\includeexersolutionsi}[1][]{%
+ \filterFor{#1}\includeexersolutionsii
+}
+\def\includeexersolutionsii{%
+%</package|eqexam>
+%<*package>
+ \if\exerSolns@ExtFile\eq@NO
+%</package>
+%<*package|eqexam>
+% \end{macrocode}
+% \cmd{\include@solutions} is the internal command that insert solutions. This command
+% appears at the end of document, where it will insert the
+% solutions, unless it has been redefined to \cmd{\relax} by
+% \cmd{\includesolutions}.
+% \begin{macrocode}
+ \include@solutions
+ \resetEXsolns
+ \let\eqFilterArg\@empty
+%</package|eqexam>
+%<*package>
+ \fi
+%</package>
+%<*package|eqexam>
+}
+% \end{macrocode}
+%
+%\subsection{Filtering solutions to exercises}
+%
+% The \cs{eqEXt} command has two arguments designed to be used to filter
+% solutions to exercises. The demo document is \texttt{filter\_exercises.tex},
+% but basically, we can include the solutions several times, once for each set filtered set.
+% \begin{macrocode}
+\long\def\gobbleToEndEXt#1\endeqEXt{%
+ \ifeqforpaper\expandafter\@gobbletwo\fi}
+% \end{macrocode}
+% \DescribeMacro\filterFor is used to mark a exercise with a name
+% \begin{macrocode}
+\newcommand\filterFor[1]{\def\eqFilterArg{#1}}
+\newcommand\inclEXtFilter[2]{\def\eqargii{#2}\ifx\eqargii\eqFilterArg
+ \else\expandafter\gobbleToEndEXt\fi}
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro\useEXtFilter is used to \cs{let} \cs{eqEXt} to \cs{EXtFilter}, which does the
+% filtering based on the value of \cs{eqFilterArg}.
+% \begin{macrocode}
+\newcommand\useEXtFilter{\let\eqEXt\inclEXtFilter}
+% \end{macrocode}
+% The basic methodology is as follows: We use \cs{filterFor} to mark an exercise, or block
+% of exercises by a name, for example, \verb!\filterFor{Problems}!. Now, at the end of the document, we can
+% say
+%\begin{verbatim}
+%\useEXtFilter
+%\renewcommand\exsectitle{Solutions to Exercises}
+%\includeexersolutions*[Exercises]
+%\renewcommand\exsectitle{Solutions to Examples}
+%\includeexersolutions*[Examples]
+%\renewcommand\exsectitle{Solutions to Problems}
+%\includeexersolutions[Problems]
+%\end{verbatim}
+% \DescribeMacro{\eqsolutionshook}\DescribeMacro{\priorexsectitle}
+% \DescribeMacro{\priorexslinput} These are commands that can be
+% redefined by the user, their location can be found below.
+% \begin{macrocode}
+\let\eqsolutionshook\@empty
+\let\eq@solutionshook\@empty
+\let\priorexsectitle\@empty
+\let\priorexslinput\@empty
+% \end{macrocode}
+%\DescribeMacro{\exerSolnsHeadnToc} sets the section title for the solutions
+% to the exercises. May be redefined, I suppose.
+% \begin{macrocode}
+\def\exerSolnsHeadnToc{\section*{\exsectitle}%
+ \addcontentsline{toc}{section}{%
+ \@ifundefined{web@latextoc}{}{%
+ \ifx\web@latextoc\eq@YES\else
+ \protect\numberline{}\fi}\exsectitle}}
+% \end{macrocode}
+%\changes{v6.4q}{2012/03/23}{define \cs{eq@defaultlheader}}
+% Determine whether \textsf{web} package is loaded, and define \cs{eq@normallheader}
+% and \cs{eq@defaultlheader}. These are designed to fix a problem of disappearing
+% headers in the solutions section of the document.
+% \begin{macrocode}
+\@ifpackageloaded{web}{\def\eq@normallheader{\lheader{\rightmark}}}
+ {\let\eq@normallheader\relax}
+\@ifpackageloaded{web}{\def\eq@defaultlheader{\lheader{\aeb@setmarks}}}
+ {\let\eq@defaultlheader\relax}
+% \end{macrocode}
+% \DescribeMacro{\exerSolnInput} is the macro that formats the opening page
+% of the solutions page and inputs \cmd{\jobname.sol}.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+%\changes{v6.3w}{2011/03/15}{%
+% Moved \cs{eqsolutionshook} from below to a higher position
+% in the macro \cs{exerSolnInput} so the running header for
+% the solution page appears on the first page of the solutions.
+%}%
+% Moved the following line to two location below.
+% \begin{macrocode}
+% \eqsolutionshook % moved 2012/02/24
+% \end{macrocode}
+% \changes{v6.4p}{2012/02/24}{Moved location of \cs{eqsolutionshook} again}%
+% \begin{macrocode}
+ \iftherearesolutions
+ \ifsolutionsonly\eq@solutionshook
+ \eqsolutionshook
+ \else
+% \end{macrocode}
+% If there are solutions and this is not the \texttt{solutionsonly} option,
+% we start a new page, clear the right mark and start a normal header.
+% \changes{v6.4q}{2012/03/23}{Inserted \cs{eq@normalheader} after \cs{newpage}
+% to get running headers to appear on each page of solutions}%
+% Inserted |\markright{}| and \cs{eq@normalheader} to fix a problem with
+% disappearing running headers.
+% \begin{macrocode}
+ \newpage\eq@solutionshook
+ \eqsolutionshook\markright{}\eq@normallheader
+ \fi
+% \end{macrocode}
+% We are still under the assumption that there are solutions to be input.
+% We set the mark of \cs{exsectitle}.
+% \begin{macrocode}
+ \markright{\exsectitle}%
+ \ifx\webnewpage\relax
+% \end{macrocode}
+% \cs{webnewpage} is a mechanism to initially do nothing, then
+% to be redefined to \cs{newpage}. It is used in \cs{exerSolnHeader}.
+% The reasons for this definition are lost in time.
+% \begin{macrocode}
+ \def\webnewpage{\let\webnewpage\newpage}%
+ \fi
+% \end{macrocode}
+% We have a prior command, followed by the section title
+% \cs{exerSolnsHeadnToc}, followed by a post command. The prior and
+% post commands may be defined as the document author wishes.
+% Both of these are used in the \textsf{APB} pacakge.
+% \begin{macrocode}
+ \priorexsectitle\exerSolnsHeadnToc\priorexslinput
+% \end{macrocode}
+% Finally, we input the solutions file, \cs{jobname.sol}, if one exists.
+% \begin{macrocode}
+ \InputIfFileExists{\jobname.sol}
+ {\global\ExSolutionsSettrue}{\PackageWarning{exerquiz}
+ {!!! Solutions to exercises not found}}%
+ \global\ExSolutionsSetfalse
+% \end{macrocode}
+% Convert back to \cs{eq@defaultlheader} cleanly by first executing \cs{newpage}
+% \begin{macrocode}
+ \newpage\eq@defaultlheader
+ \fi
+ \fi
+}
+% \end{macrocode}
+% The \cs{include@solutions} is a wrapper command for \cs{exerSolnInput}
+% \begin{macrocode}
+\def\include@solutions{%
+%</package|eqexam>
+%<*package>
+ \if\exerSolns@ExtFile\eq@NO
+%</package>
+%<*package|eqexam>
+ \exerSolnInput
+%</package|eqexam>
+%<*package>
+ \fi
+%</package>
+%<*package|eqexam>
+}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \subsection{Bookmarking Exercises}
+%
+% Someone asked how to bookmark the exercises, it was an interesting
+% little exercise for a Saturday morning. So, here it is.
+% \par\medskip\noindent
+% \cs{eqexpdfentry} marks first entry into an exercise.
+% \begin{macrocode}
+\let\eqexpdfentry=0
+% \end{macrocode}
+% \cs{eq@postexerciseHook}: Restores the \cs{Hy@currentbookmarklevel} bookmark level to what it was when
+% we first entered the exercise. This is executed at the end of the exercise
+% environment.
+% \begin{macrocode}
+\let\eq@postexerciseHook\relax
+\def\eq@postexerciseHook@BM{%
+ \xdef\Hy@currentbookmarklevel{\eq@currentbookmarklevel}}
+% \end{macrocode}
+% \begin{macro}{\exbookmarkfmt}
+% \begin{macro}{\partbookmarkfmt}
+% \begin{macro}{\expdfbookmark}
+% ``Intelligent'' bookmarking for \textsf{Exerquiz} exercises. Detects the correct bookmark level
+% determines if this is a part of an exercise, or the entry into an exercise and
+% automatically sets a unique destination.
+%
+% \cs{expdfbookmark} is the main interface to bookmarking an exercise. The single argument
+% is the text that is to appear in the bookmark panel. \cs{exbookmarkfmt} and
+% \cs{partbookmarkfmt} formats the exercise number and part letter. These can be redefined.
+%
+%\changes{v6.2a}{2007/11/10 }
+%{
+% Added \cs{expdfbookmark} to bookmark exercises.
+%}
+% We have to increase the \texttt{tocdepth} so hyperref will create the bookmark at the
+% subsection level.
+% \begin{macrocode}
+{\count0=\value{tocdepth}
+\advance\count0by2 \xdef\eqbmkmrkdepth{\the\count0}}
+\@ifundefined{Hy@bookmarksdepth}
+ {\setcounter{tocdepth}{\eqbmkmrkdepth}}
+ {\hypersetup{bookmarksdepth=\eqbmkmrkdepth}}
+\newcommand{\exbookmarkfmt}{\exlabel\space\theeqexno.\space}
+\newcommand{\partbookmarkfmt}{(\thepartno)\space}
+\newcommand{\expdfbookmark}[1]{\relax
+ \def\expdfbookmarktitle{#1}%
+% \end{macrocode}
+% The default definition of \cs{eq@postexerciseHook} is \cs{relax}. We'll
+% check if someone is using \cs{eq@postexerciseHook}.
+% \begin{macrocode}
+ \ifx\eq@postexerciseHook\relax
+ \let\eq@postexerciseHook\eq@postexerciseHook@BM
+ \else
+% \end{macrocode}
+% Yes, \cs{eq@postexerciseHook} is in use, we'll add our stuff onto the end of it.
+% \begin{macrocode}
+ \let\eq@postexerciseHook@save\eq@postexerciseHook
+ \def\eq@postexerciseHook@BM@plus{\eq@postexerciseHook@save
+ \eq@postexerciseHook@BM}%
+ \let\eq@postexerciseHook\eq@postexerciseHook@BM@plus
+ \fi
+ \if\exerstar*%
+% \end{macrocode}
+% If entering an exercise with parts for the first time, we also capture current bookmark level,
+% and mark, using \cs{eqexpdfentry} that we have entered an exercises with parts.
+% \begin{macrocode}
+ \if\eqexpdfentry0\let\eqexpdfentry=1
+ \xdef\eq@currentbookmarklevel{\Hy@currentbookmarklevel}%
+ \def\eqex@next{\subpdfbookmark{\exbookmarkfmt#1}%
+ {qex.\the@exno}}%
+ \else
+% \end{macrocode}
+% Already in an exercise with parts, no need to reduce bookmark level again
+% \begin{macrocode}
+ \def\eqex@next{\belowpdfbookmark{\partbookmarkfmt#1}%
+ {qex.\the@exno.\thepartno}}%
+ \fi
+ \else
+% \end{macrocode}
+% A regular exercise, no parts, we also capture current bookmark level
+% \begin{macrocode}
+ \xdef\eq@currentbookmarklevel{\Hy@currentbookmarklevel}%
+ \def\eqex@next{\subpdfbookmark{\exbookmarkfmt#1}%
+ {qex.\the@exno}}%
+ \fi
+ \eqex@next\ignorespaces
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \section{Early end of input}
+%
+% There is no support for the Acrobat Forms features with the
+% \texttt{dviwindo} option by \textsf{hyperref}; therefore there is
+% none here as well. \textsf{dviwindo} can use the
+% \texttt{exercise} environment, but not the quizzes, so end here.
+% \begin{macrocode}
+\ifeq@noforms\endinput\fi
+% \end{macrocode}
+% \section{Common code for quizzes.}
+% Here, we include a few commands common to both
+% quiz environments.
+%
+% Colors used by \textsf{exerquiz}: \texttt{webgreen} normally defined in \textsf{web}
+% \begin{macrocode}
+\definecolor{webgreen}{rgb}{0,.6,0}
+% \end{macrocode}
+% \begin{macro}{\proofingsymbol}
+% \begin{macro}{\proofingsymbolColor}
+% Proofing symbol and accompanying color (little green bullet)
+% \changes{v6.05b}{2006/05/12}
+% {
+% added a command to change the color of the proofing symbol
+% changed the definition of \cs{proofingsymbol} to a text fillin. This creates the command
+% \cs{@proofingsymbol}. Can now control the symbol and the color (through \cs{proofingsymbolColor}
+% }
+% \begin{macrocode}
+\newcommand{\proofingsymbolColor}[1]{\def\@proofingsymbolColor{#1}}
+\proofingsymbolColor{red}
+%\newcommand{\proofingsymbol}[1]{%
+% \def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{#1}}}
+%\proofingsymbol{$\bullet$}
+%\proofingsymbol{\ding{52}}
+\let\@proofsymbolredefined=0
+\newcommand{\proofingsymbol}[1]{\let\@proofsymbolredefined=1%
+ \def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{#1}}}
+\def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{\ding{52}}}
+\def\setproofingsymbol{%
+ \if\@proofsymbolredefined1\else
+ \@ifpackageloaded{pifont}{\proofingsymbol{\ding{52}}}
+ {\proofingsymbol{$\bullet$}}\fi
+}
+\AtBeginDocument{\setproofingsymbol}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+% \end{macrocode}
+%
+% \subsection{The \texttt{questions} Environment}
+% The \texttt{questions} environment is used inside the
+% \texttt{shortquiz} and \texttt{quiz} environments, though it can
+% also be used a stand alone list. Beginning with version 5.5, the \texttt{questions}
+% environment can be nested three deep.
+% \begin{macro}{questions}
+% This is a redesigned \texttt{list} environment.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \paragraph*{Properties of the questions environment.} (2013/07/10) These include
+% \IndexKey{labelwidthTo}\texttt{labelwidthTo} and
+% \IndexKey{labelwidth}\texttt{labelwidth}.
+% \begin{macrocode}
+\define@key{props@ques}{labelwidthTo}%
+ [\normalsize\normalfont\bfseries00.]%
+ {\def\propQ@labelwidthTo{#1}}
+\define@key{props@ques}{labelwidth}[]{\def\propQ@labelwidth{#1}}
+\let\propQ@labelwidth\@empty
+% \end{macrocode}
+% \IndexKey{topsep}\texttt{topsep}, \IndexKey{partopsep}\texttt{partopsep},
+% \IndexKey{parsep}\texttt{parsep}, and \IndexKey{itemsep}\texttt{itemsep}.
+% \begin{macrocode}
+\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}}
+% \end{macrocode}
+% \IndexKey{labelsepTo}\texttt{labelsepTo} and \IndexKey{labelsep}\texttt{labelsep}
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \IndexKey{color}\texttt{color}
+% \begin{macrocode}
+\define@key{props@ques}{color}[blue]{\quesNumColor{#1}}
+% \end{macrocode}
+% The default properties of the \texttt{questions} environment.
+% \begin{macrocode}
+\setkeys{props@ques}{labelwidthTo,topsep,partopsep,parsep,%
+ itemsep,labelsepTo,color}%
+% \end{macrocode}
+% Now we begin the \texttt{questions} environment. There is an optional parameter
+% wherein we pass the key-value pairs defined above.
+% \begin{macrocode}
+\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%
+% \end{macrocode}
+% (06/06/10) We create a macro \cs{@currentQues} that holds the current
+% problem number 2(a)(i), for example.
+% \begin{macrocode}
+ {\@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}%
+% \end{macrocode}
+% We set the list parameter for the \texttt{questions} environment.
+% \begin{macrocode}
+ \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}%
+ }%
+% \setlength{\labelsep}{\propQ@labelsep}}%
+}{\endlist}
+% \end{macrocode}
+% \begin{macro}{\pushquestions}
+% \begin{macro}{\popquestions}
+% Between \cs{item}s within a question environment, you can execute
+% \cs{pushquestions}, this save the question counter, you are then free
+% to make comments between problem, when finished, executed a \cs{popquestions}
+% to return to questioning where you left off.
+% \begin{macrocode}
+\def\pushquestions{\expandafter\xdef\csname save\@quesctr\endcsname
+ {\expandafter\the\csname c@\@quesctr\endcsname}\end{questions}}
+\def\popquestions{%
+ \begin{questions}[\csname quesOpts\@quesctr\endcsname]%
+ \setcounter{\@quesctr}{\csname save\@quesctr\endcsname}%
+ \@ifnextchar\popquestions{\item[]}{\@ifnextchar\begin{\item[]}{}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \section{The \texttt{shortquiz} and \texttt{shortquiz*} Environments}
+%
+% This \texttt{shortquiz} environment sets up multiple choice
+% questions, with immediate feedback whether the user clicked on the
+% right or wrong answer. Solutions to the \texttt{shortquiz} may,
+% or may not be included.
+% \begin{environment}{shortquiz}
+% The \texttt{shortquiz} environment, really just a shell to define the
+% \cmd{\Ans} macro and the \texttt{solution} environment that go with
+% the \texttt{shortquiz}
+%\par\medskip\noindent
+% After all the parsing is done, the parameters for this environment are
+%\begin{verbatim}
+% \begin{shortquiz}*[<basename>]
+%\end{verbatim}
+%The `\texttt{*}' is optional and signals that forms should be used instead
+%of links. This option is regressed. The user should use the \texttt{shortquiz*}
+% environment. The \verb![<basename>]! is the basename of any form fields
+% generated. If not present, an base fieldname is generated based on the
+% \cs{@shortquizCnt} macro (not a counter). The actual name is given in \cs{@sqGenBaseName}.
+%\par\medskip\noindent
+% \DescribeMacro{\priorsqhook}\cmd{\priorsqhook} and \DescribeMacro{\abovesqskip}\cmd{\abovesqskip}
+% are early hooks and skips.
+% \begin{macrocode}
+\newcommand{\priorsqhook}[1]{\def\sq@priorhook{#1}}
+\priorsqhook{}
+\newcommand{\abovesqskip}[1]{\def\sq@aboveskip{#1}}
+\abovesqskip{\par\medskip}
+% \end{macrocode}
+%\changes{v6.4a}{2011/05/11}{%
+% Added \cs{sq@afterhook} for use by \textsf{eqexam}, but may be useful elsewhere.
+%}
+%\DescribeMacro\endsqhook\cmd\endsqhook is a late hook
+% \begin{macrocode}
+\long\def\endsqhook#1{\def\sq@afterhook{#1}}
+\endsqhook{}
+\def\@shortquizCnt{0}
+\def\@sqGenBaseName{eqSqBn\@shortquizCnt}
+% \end{macrocode}
+%\DescribeMacro\sqhspace\cmd\sqhspace\ is the space that follows \cmd\sqlabel
+% \begin{macrocode}
+\let\sqhspace\space
+\newenvironment{shortquiz}
+{%
+% \end{macrocode}
+% (06/08/10) The next two lines initialize the macros for registering the
+% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
+% the \texttt{oQuestion} and \texttt{quiz} environments.
+% \begin{macrocode}
+ \xdef\eq@pageThisQ{\the\c@page}%
+ \let\@currentQues\@empty
+ {\count0=\@shortquizCnt \advance\count0by1\relax
+ \xdef\@shortquizCnt{\the\count0}}%
+ \goodbreak\@ifstar{\sqForms\@shortquiz}%
+ {\if\aeb@FLOverride\eq@f\def\sqstar{*}\else
+ \def\sqstar{}\sqLinks\fi\@shortquiz}%
+}{\aeb@endshortquiz}
+% \end{macrocode}
+% \end{environment}
+% \begin{environment}{shortquiz*}
+% The \texttt{shortquiz*} is a short quiz that uses forms.
+%\par\medskip\noindent
+% The parameter for this environment is
+%\begin{verbatim}
+% \begin{shortquiz}[<basename>]
+%\end{verbatim}
+% The \verb![<basename>]! is the basename of any form fields
+% generated. If not present, an base fieldname is generated based on the
+% \cs{@shortquizCnt} macro (not a counter). The actual name is given in \cs{@sqGenBaseName}.
+% \begin{macrocode}
+\newenvironment{shortquiz*}
+{%
+ \xdef\eq@pageThisQ{\the\c@page}%
+ {\count0=\@shortquizCnt\advance\count0by1\relax
+ \xdef\@shortquizCnt{\the\count0 }}%
+ \sqForms\@shortquiz
+}{\aeb@endshortquiz}
+% \end{macrocode}
+% Determines if the next argument is optional, if yes, we pass to
+% \cs{@@shortquiz}, else, we supply a automated form name, then
+% continue to \cs{@@shortquiz}.
+% \begin{macrocode}
+\def\@shortquiz{\@ifnextchar[%
+ {\@@shortquiz}{\@@shortquiz[\@sqGenBaseName]}}
+% \end{macrocode}
+% \end{environment}
+% \cs{@@shortquiz} continues the parsing of \texttt{shortquiz} and \texttt{shortquiz*}.
+% Here we take in the basename for any fields generated. The basename is passed
+% as a delimited parameter \texttt{\#1}.
+% \begin{macrocode}
+\def\sq@setCLN#1{\ifx\aebTitleQuiz\@empty
+ \protected@edef\@currentlabelname{#1}\else
+ \protected@edef\@currentlabelname{\@currentlabelname}\fi
+}
+% \end{macrocode}
+% (2013/09/29) Added \cs{isQZ} and \cs{isSQZ}
+% \begin{macrocode}
+\let\isQZ=q \let\isSQZ=s
+%</package|eqexam>
+%<*package>
+\def\sq@IDTxtField{\makebox[0pt][l]{\textField[\autoCenter{n}\BC{}\BG{}
+ \S{S}\textSize{0}\Ff{\FfReadOnly}
+ \AA{\AAFormat{%
+ var \oField=new Object;\r
+ \oField.Grp={};
+ \ifx\defaultColorJSLoc\@empty\else\r
+ \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
+ \ifx\rghtColorJSLoc\@empty\else\r
+ \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
+ \ifx\wrngColorJSLoc\@empty\else\r
+ \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
+ \ifx\rghtAnsSymbJSLoc\@empty\else\r
+ \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
+ \ifx\wrngAnsSymbJSLoc\@empty\else\r
+ \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
+ }}]{sqID\oField}{0bp}{0bp}}%
+}
+%</package>
+%<*package|eqexam>
+\def\@@shortquiz[#1]{%\begingroup
+ \gdef\oField{#1}\gdef\curr@quiz{#1}\gdef\currQuiz{#1}%
+% \end{macrocode}
+% We try to support {\LaTeX}'s cross-referencing system by defining
+% \cs{@currentlabel}, \cs{@currentHlabel}, and \cs{@currentlabelname}.
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% Lay down the question header. \cs{sqlabel} defaults to a red ``Quiz''.
+% \begin{macrocode}
+%</package|eqexam>
+% \end{macrocode}
+% The next segment is for \textsf{exerquiz} only, and not for eqexam.
+% \begin{macrocode}
+%<*package>
+ \let\ifstaroption\eq@ifstaroption
+ \if\eq@tq@star*%
+% \end{macrocode}
+% The next code lines supports the \cs{titleQuiz*} option.
+% If its the star option, we define \cs{sqlabel}, and finished up with
+% a \cs{@gobbletwo}, this eats up the next two tokens that immediately
+% follow \cs{sqlabel} in the beginning of the \texttt{shortquiz} environment.
+% \begin{macrocode}
+ \def\sqlabel{\aebtitleQuiz\@gobbletwo}%
+ \fi
+% \end{macrocode}
+% When the online (or email) options are used in eqexam, the \cs{hypertarget}
+% command is adding vertical space. Normally \cs{sqlabel} is empty, so we don't
+% need \cs{hypertarget} in this case here.
+% \begin{macrocode}
+ \sq@aboveskip\sq@priorhook
+ \@ifundefined{PointsOnLeft}%
+ {\sq@setCLN{\eq@defaultShortQuizLabelName}%
+ \ifx\sqlabel\@empty\else\noindent\fi
+ \hypertarget{sqH\@currentHref}{}\sq@IDTxtField
+ \ifx\sqlabel\@empty\else\expandafter
+ \sqlabel\expandafter\sqhspace\fi
+ {\set@typeset@protect\aebtitleQuiz}}{}\ignorespaces
+%</package>
+%<eqexam> \sq@aboveskip\sq@priorhook\ignorespaces
+%<*package|eqexam>
+}
+% \end{macrocode}
+% \begin{macro}{\aeb@endshortquiz}
+% \begin{macro}{\aftershortquizskip}
+% We reset the labels to the default in case the author
+% of the document has redefined them temporarily. The author can
+% avoid this reset, by redefining the global variables.
+% \begin{macrocode}
+\newcommand\belowsqskip[1]{\def\aftershortquizskip{#1}}
+\belowsqskip{\medskip}
+\def\aeb@endshortquiz{\setcounter{quizno}{0}%
+ \sq@afterhook
+%</package|eqexam>
+%<*package>
+ \global\let\aebtitleQuiz\@empty
+ \global\let\aebTitleQuiz\@empty
+ \global\let\eq@tq@star\relax
+%</package>
+%<*package|eqexam>
+ \global\let\sqlabel\eq@sqlabel
+ \global\let\sqslrtnlabel\eq@sqslrtnlabel
+ \global\let\sqsllabel\eq@sqsllabel
+ \par\aftershortquizskip
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\sqLinks}
+% \begin{macro}{\sqForms}
+% (01/01/05) Use these two commands to locally change the style of multiple choice
+% questions: link or form.
+% \begin{macrocode}
+\def\sqLinks{\def\sqstar{}}\sqLinks
+\def\sqForms{\def\sqstar{*}}
+\let\eq@tq@star\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% The \texttt{shortquiz} contains two other environments, each nested inside
+% the next: The \texttt{answers} environment and the \texttt{solution}
+% environment. The latter environment is optional.
+%
+% \smallskip\noindent\textbf{Basic Usage for the \texttt{shortquiz} environment}
+%\begin{verbatim}
+%No solutions included With Solutions
+%\begin{shortquiz} \begin{shortquiz}
+%The question The question
+%\begin{answers} \begin{answers}[qz:mysoln]
+%\Ans1 ... &\Ans0 &... &\Ans0 ... \Ans1 ... &\Ans0 &... &\Ans0 ...
+%\end{answers} \begin{solution}
+%\end{shortquiz} .....
+% \end{solution}
+% \end{answers}
+% \end{shortquiz}
+%\end{verbatim}
+% To further complicate matters, the \texttt{shortquiz} can be
+% used with the \texttt{questions} environment to create a series of
+% numbered short question quizzes. See the manual for examples.
+% \texttt{solution} environment is defined next.
+% \begin{macro}{solution}
+% The \texttt{solution} environment does double duty, it is used by both
+% the \texttt{shortquiz} and \texttt{quiz} environments.
+% The macro \cmd{\solution@sq} is the one that actually does the work
+% of \cmd{\solution}: It writes the solutions to the file
+% \cmd{\jobname.qsl}. This macro obeys the \texttt{forpaper}
+% option. In this case, solutions are separated by a
+% \cmd{\medskip} rather then put on a separate page. It also
+% obeys the \texttt{solutionsafter} option
+% \changes{v6.4s}{2012/06/03}{Added hooks \cmd{\sqPostHeaderHook} and
+% \cmd{\qPostHeaderHook}}
+%\par\medskip\noindent
+% Hooks \DescribeMacro\sqPostHeaderHook\cmd{\sqPostHeaderHook},
+% \DescribeMacro\qzPriorSolutionAfterHook\cmd\qzPriorSolutionAfterHook,
+% \DescribeMacro\qPostHeaderHook\cmd{\qPostHeaderHook}
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\def\qzPriorSolutionAfterHook{\smallskip}
+\let\sqPostHeaderHook\@empty
+\let\qPostHeaderHook\@empty
+% \end{macrocode}
+% Private versions of the two above. Used by the \texttt{contsolns} option
+% \begin{macrocode}
+\let\eq@sqPostHeaderHook\@empty
+\let\eq@qPostHeaderHook\@empty
+\let\prior@eqQt\@empty
+\let\prior@eqSQt\@empty
+% \end{macrocode}
+% \DescribeMacro\sqsolafterhspace The space after the solution label
+% \begin{macrocode}
+\def\sqsolafterhspace{\space}
+\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{%
+% \end{macrocode}
+% Mark in the solutions files whether this is a quiz or a shortquiz solution.
+% \begin{macrocode}
+ \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
+}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \DescribeMacro{\promoteNewPageHere}\cmd{\promoteNewPageHere} promotes
+% a new page. The argument is a vertical skip. If there is \texttt{\#1}
+% or more space remaining on the page, the command does nothing, otherwise
+% it issues a \cs{newpage}.
+% \changes{v6.4s}{2012/06/03}{Added \cs{promoteNewPageHere}}
+% \changes{v6.8a}{2014/01/01}{Made an optional argument, but test for required argument as swell.}
+% \begin{macrocode}
+\newcommand\pnphDflt{.1\textheight}
+\newcommand{\promoteNewPageHere}[1][\pnphDflt]{%
+ \@ifnextchar\bgroup{\eq@promoteNewPageHere}
+ {\eq@promoteNewPageHere{#1}}%
+}
+\def\eq@promoteNewPageHere#1{\par
+ \bgroup\@nobreakfalse\addpenalty{-500}%
+ \setlength{\@tempdimb}{#1}%
+ \@tempdima \pagegoal \advance \@tempdima -\pagetotal
+ \ifdim \@tempdima<\@tempdimb\ifnum\col@number>\@ne\columnbreak
+ \else\newpage\penalty1\fi\fi\egroup
+}
+% \end{macrocode}
+% \begin{macro}{\saveDest}
+% \begin{macro}{\useDest}
+% These two macros are used, as needed to save the destination name of a solution, then
+% re-emitting it later, just prior to the solution. Useful for grouped questions.
+% \begin{macrocode}
+\newcommand{\saveDest}[1][]{%
+ \def\sd@arg{#1}\ifx\sd@arg\@empty
+ \xdef\holdDest{\@qzsolndest}\else
+ \xdef\@qzsolndest{#1}\xdef\holdDest{#1}\fi}
+\def\useDest{\def\@qzsolndest{\holdDest}}
+\let\holdDest\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\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%
+}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\eqQt}
+% \begin{macro}{\endeqQt}
+% \begin{macro}{\eqSQt}
+% \begin{macro}{\endeqSQt}
+% The \cmd{\eqQt} and \cmd{\eqSQt} are markers at the beginning of each
+% quiz (short quiz, respectively) solution. These markers, along with
+% ``end'' versions, \cmd{\endeqQt} and \cmd{\endeqSQt}, respectively, can be used to filter out the quiz solutions or the
+% short quiz solutions. The following example removes all short quizzes.
+%\begin{verbatim}
+%\long\def\eqSQt#1\endeqSQt{}
+%\begin{document}
+%\input{mydoc.qsl}
+%\end{document}
+%\end{verbatim}
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\let\eqSQt\@gobble
+\let\endeqSQt\relax
+\let\eqQt\@gobble
+\let\endeqQt\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\quizSolnHeader}
+% Each solution begins with \cmd{\quizSolnHeader}. This can be redefined
+% for whatever reason. It takes three arguments, one of which is optional.
+% \#1 is the \cmd{\noPeek} parameters; \#2 is the named destination to this
+% solution; \#3 is the \cmd{\sqsllabel}.
+%
+% If you want to typeset solutions separately, you can redefine
+% \cmd{\quizSolnHeader} as desired, and used in conjunction with
+% \cmd{eqQt}.
+% \changes{v6.7q}{2013/12/15}{Added this hook for use by \textsf{contsolns.dtx}}
+% \begin{macrocode}
+\let\prior@quizSolnHeaderHook\@empty
+\newcommand\quizSolnHeader[3][]{%
+ \prior@quizSolnHeaderHook
+ \ifeqforpaper\else\webnewpage\fi\noindent
+%</package|eqexam>
+%<*package>
+ \def\eq@argi{#1}%
+ \ifx\eq@argi\@empty\else\noPeek#1\fi
+ \hypertarget{#2}{#3}\relax
+%</package>
+%<*eqexam>
+ #2%
+%</eqexam>
+%<*package|eqexam>
+ \solnspace
+}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\NoPeeking}
+% \begin{macro}{\AllowPeeking}
+% A \texttt{quiz} solution has an additional (optional) feature. If
+% \cmd{\NoPeeking} is executed, then an open action is placed on the opening
+% page of each solution. This open action simply changes the page back to
+% the page of the quiz. This is an attempt at keeping students from ``peeking''
+% at the solutions before, or while they are taking a quiz. \cmd{\AllowPeeking}
+% is the default.
+% \begin{macrocode}
+\def\AllowPeeking{\global\let\allow@peek\eq@YES}\AllowPeeking
+\def\NoPeeking{\global\let\allow@peek\eq@NO}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\noPeekAction}
+% The default definition of \cmd{quizSolnHeader} contains a macro called
+% \cmd{\noPeek}. This is the action that \cmd{\noPeek} performs. The actual
+% definition of \cmd{\noPeek} is driver dependent, and is listed elsewhere.
+% An open page action will be created with a JavaScript action, which calls
+% a DLJS function \texttt{noPeek("\#1",\#2)}. The first parameter is the base
+% name of the quiz; the second parameter is the page number the quiz starts from
+% (so that we can return to that page when the student tries to view the solution
+% when he is not authorized to).
+% \begin{macrocode}
+\def\noPeekAction#1#2{%
+ /AA <</O<</S/JavaScript/JS(noPeek("#1",#2))>> >>
+}
+% \end{macrocode}
+% \end{macro}
+% \subsection{The \texttt{shortquiz} Solutions}
+% When the first solution is written, \cmd{\therearequizsolutions} is
+% made true. When the solutions are input back into the file, and
+% this switch is still false, then no quiz header is typeset;
+% this avoids an empty quiz solutions section with only the header.
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\newif\iftherearequizsolutions \therearequizsolutionsfalse
+\let\aeb@FLOverride\relax
+% \end{macrocode}
+% \begin{macro}{\includequizsolutions}
+% This macro inserts the solutions to the short quizzes, if there are
+% any solutions. If a user uses this macro to insert the solutions
+% elsewhere, \cmd{\include@quizsolutions} is called, then put is to
+% \cmd{\relax}.
+% \begin{macrocode}
+\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
+}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro{\eqqzsolutionshook}\DescribeMacro{\priorsqslsectitle}
+% \DescribeMacro{\priorsqslinput} are commands executed at the beginning of the page of quiz solutions.
+% These may be defined by the document author.
+% \begin{macrocode}
+\let\eqqzsolutionshook\@empty
+\let\priorsqslsectitle\@empty
+\let\priorsqslinput\@empty
+% \end{macrocode}
+% \DescribeMacro{\quizSolnsHeadnToc} sets up the quiz solution title.
+% \begin{macrocode}
+\def\quizSolnsHeadnToc{\section*{\sqslsectitle}%
+ \addcontentsline{toc}{section}{%
+ \@ifundefined{web@latextoc}{}{%
+ \ifx\web@latextoc\eq@YES\else
+ \protect\numberline{}\fi}\sqslsectitle}}
+% \end{macrocode}
+% \DescribeMacro{\quizSolnInput} is the command that actually inputs
+% the solutions file \cmd{\jobname.qsl}.
+% \begin{macrocode}
+\newcommand{\quizSolnInput}
+{%
+ \let\webnewpage\relax
+ \immediate\closeout\quiz@solns
+ \ifeq@noquizsolutions\else
+% \end{macrocode}
+% If there are quiz solutions, we start a new page, and clear the right mark.
+% We execute \cmd{\eq@normallheader} which sets the running left header,
+% except on the page with a section head. We set the right mark as
+% \cmd{\eq@sqslsecrunhead}. (2013/09/23) replaced \cmd{\eq@sqslsecrunhead}
+% with \cmd{\sqslsecrunhead}, makes it easier to define running headers
+% when solutions are filtered.
+% \begin{macrocode}
+ \iftherearequizsolutions\newpage\markright{}%
+ \eq@normallheader\markright{\sqslsecrunhead}%
+ \ifx\webnewpage\relax
+ \def\webnewpage{\let\webnewpage\newpage}\fi
+% \end{macrocode}
+% Here we have various prior commands, and the setting of the
+% section title.
+% \begin{macrocode}
+ \priorsqslsectitle\quizSolnsHeadnToc\priorsqslinput
+% \end{macrocode}
+% Now input the solution file \cmd{\jobname.qsl}.
+% \begin{macrocode}
+ \InputIfFileExists{\jobname.qsl}{}%
+ {!!! Solutions to quizzes not found}
+% \end{macrocode}
+% A hook for hanging things
+% \begin{macrocode}
+ \eqqzsolutionshook
+% \end{macrocode}
+% Reset the running header cleanly
+% \begin{macrocode}
+ \newpage\eq@defaultlheader
+ \fi
+ \fi
+}
+% \end{macrocode}
+% The internal command that insert solutions. This command
+% appears at the end of document, where it will insert the
+% solutions, unless it has been redefined to \cmd{\relax} by
+% \cmd{\includequizsolutions}.
+% \begin{macrocode}
+\def\include@quizsolutions{\quizSolnInput}
+% \end{macrocode}
+%
+% \section{The \texttt{quiz} and \texttt{quiz*} Environments}
+%
+% In this section we introduce the \texttt{quiz} environment, and all its
+% supporting elements.
+%
+% \subsection{Define the \texttt{quiz} Environment}
+% \DescribeMacro{\priorqhook}\DescribeMacro{\aboveqskip}
+% \DescribeMacro{\endqhook}\DescribeMacro{\belowqskip} These are hooks and skip
+% before and after the \texttt{quiz} environment.
+% \begin{macrocode}
+\newcommand{\priorqhook}[1]{\def\q@priorhook{#1}}
+\priorqhook{}
+\newcommand{\aboveqskip}[1]{\def\q@aboveskip{#1}}
+\aboveqskip{\par\medskip}
+\newcommand{\qhspace}{\space}
+\def\endqhook#1{\def\eq@prior@endQuiz{#1}}
+\endqhook{}
+\newcommand{\belowqHooknSkip}[1]{\def\eq@belowqskip{#1}}
+\belowqHooknSkip{\medskip}
+\def\belowqskip{\belowqHooknSkip}
+% \end{macrocode}
+% \begin{macrocode}
+\let\eq@initializeServerSubmit\@empty
+% \end{macrocode}
+% \begin{macro}{\quiztype}
+% \begin{macro}{\defaultquiztype}
+% The command \cs{quiztype} can be used to force subsequent quizzes to be link
+% style or form style, independent of the environment. Recognized values are
+% \texttt{f} and \texttt{l}. Once the override \cs{quiztype} has been used,
+% you can recover the default behavior of the quizzes by expanding
+% \cs{defaultquiztype}.
+% \begin{macrocode}
+\newcommand{\quiztype}[1]{%
+ \def\@quiztype{#1}\def\aeb@FLOverride{#1}}
+\let\@quiztype\@empty
+\newcommand{\defaultquiztype}{\let\@quiztype\@empty
+ \let\aeb@FLOverride\relax}
+\let\aeb@FLOverride\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+\def\@setFormLinkType{%
+ \if\qstar*%
+ \ifx\aeb@FLOverride\relax%
+ \def\@@quiztype{f}%
+ \else
+ \if\aeb@FLOverride l\def\@@quiztype{l}\else
+ \def\@@quiztype{f}\fi
+ \fi
+ \else
+ \ifx\aeb@FLOverride\relax
+ \def\@@quiztype{l}%
+ \else
+ \if\aeb@FLOverride f\def\@@quiztype{f}\else
+ \def\@@quiztype{l}\fi
+ \fi
+ \fi
+}
+\def\setdefault@Ans{\@setFormLinkType
+ \expandafter\global\expandafter
+ \let\expandafter\@Ans\expandafter=\csname Ans@\@@quiztype\endcsname
+}
+% \end{macrocode}
+% \begin{macro}{\useForms}
+% \begin{macro}{\useLinks}
+% \begin{macro}{\restoreFLTypeDefault}
+% For multiple choice questions, here we give the option of using a mixture of links
+% and forms.
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\newcommand\useForms{\def\aeb@FLOverride{f}}
+\newcommand\useLinks{\def\aeb@FLOverride{l}}
+\newcommand\restoreFLTypeDefault{\global\let\aeb@FLOverride\relax}
+\let\aeb@FLOverride\relax
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{environment}{quiz}
+% The \texttt{quiz} environment takes an optional `\texttt*'
+% and one required argument. There are two styles of quizzes:
+% links or checkboxes. Beginning with v6.08, the use of the \texttt*-option
+% is discouraged, use the quiz* environment instead.
+%\begin{verbatim}
+%\begin{quiz}[*]{<base_name>}
+% ...
+%\end{quiz}
+%\end{verbatim}
+% \begin{itemize}
+% \item optional \texttt{*} $=$ use checkboxes, otherwise use links
+% \item \texttt{<base\_name>}: required argument $=$ base name of quiz.
+% \end{itemize}
+%
+% Note that I set \verb!\tabcolsep=0pt! in preparation for a tabular environment.
+% If authors wants to use a tabular environment within a question, he/she must
+% reset this value to its default, \verb!\setlength{\tabcolsep}{6pt}!.
+% \begin{macrocode}
+\newenvironment{quiz}
+{\goodbreak\@ifstar{\gdef\qstar{*}\@quiz*f}{\gdef\qstar{x}\@quiz*l}}
+ {\aeb@endquiz}
+\def\@quizCnt{0}
+\def\@quiz*#1#2{%
+% \end{macrocode}
+% (06/08/10) The next two lines initialize the macros for registering the
+% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
+% the \texttt{oQuestion} and \texttt{shortquiz} environments.
+% \begin{macrocode}
+ \xdef\eq@pageThisQ{\the\c@page}%
+ \let\@currentQues\@empty
+ \global\let\eqQzQuesList\@empty
+ \global\let\pointValuesArray\@empty
+% \end{macrocode}
+% Initialize \texttt{ptypeArray} to track problem types better
+% \changes{v7.7m}{2016/07/04}{Initialize \string\texttt{ptypeArray} to track problem types better}
+% \begin{macrocode}
+ \global\let\ptypeArray\@empty
+% \end{macrocode}
+% Initialize \texttt{corrAnsArray} to track the correct answers
+% \changes{v7.7n}{2016/07/06}{Initialize \string\texttt{ptypeArray} to track problem types better}
+% \begin{macrocode}
+ \global\let\corrAnsArray\@empty
+% \end{macrocode}
+% Update the internal quiz counter.
+% \begin{macrocode}
+ {\count0=\@quizCnt\advance\count0by1\relax
+ \xdef\@quizCnt{\the\count0 }}%
+% \end{macrocode}
+% We try to support {\LaTeX}'s cross-referencing system by defining
+% \cs{@currentlabel}, \cs{@currentHlabel}, and \cs{@currentlabelname}.
+% \begin{macrocode}
+ \edef\@currentlabel{\@quizCnt}%
+ \edef\@currentHref{quiz.\@quizCnt}%
+ \sq@setCLN{\eq@defaultQuizLabelName}%
+ \setcounter{eqpointvalue}{0}\setcounter{questionno}{0}%
+ \eq@initializeServerSubmit
+ \global\let\eqQuizType\isQZ %\tabcolsep=0pt
+ \gdef\eqPTs{1}\global\let\eqQT\eq@na
+% \end{macrocode}
+% \changes{v6.3u}{2010/11/04}{%
+% Added \cs{xdef}\cs{oField}\texttt{\{\#2\}}, this is
+% needed for \textsf{apb.dtx}.
+%}
+% \begin{macrocode}
+ \gdef\quiz@total{#2}\xdef\curr@quiz{#2}\xdef\oField{#2}%
+ \xdef\currQuiz{#2}\xdef\currQuizStartPage{\thepage}%
+ \xdef\aPointType{0}%
+% \end{macrocode}
+% (2013/12/20) Pass \cs{bqlabelISO} through \cs{pdfstringdef}.
+% \begin{macrocode}
+ \def\fieldJSStr@CMD{\fieldJSStr*[noquotes]\bqlabelISO}%
+ \expandafter\fieldJSStr@CMD\expandafter{\bqlabelISO}%
+ \ifx\@quiztype\@empty\gdef\@@quiztype{#1}\else
+ \xdef\@@quiztype{\@quiztype}\fi
+ \let\@qzsolndest\@empty
+ \let\answers\answers@q\let\endanswers\endanswers@q
+ \let\manswers\manswers@q\let\endmanswers\endanswers@q
+ \let\solution\solution@sq\let\endsolution\endsolution@sq
+ \expandafter%
+ \xdef\csname titleOf\currQuiz\endcsname{\aebTitleQuiz}%
+% \end{macrocode}
+% Modified the destination name of \cs{hypertarget} to avoid deplicate
+% destinations. Did the same thing for the \texttt{shortquiz}.
+% \changes{v7.8a}{2016/12/07}{Modified destination name of \string\cs{hypertarget}}
+% \begin{macrocode}
+ \q@aboveskip\q@priorhook\noindent\hypertarget{qzH\@currentHref}{}%
+ \eq@beginQuiz\qhspace{\set@typeset@protect\aebtitleQuiz}%
+ \ignorespaces
+}
+% \end{macrocode}
+% Here is the end for the \texttt{quiz} and \texttt{quiz*} environments. The
+% \cs{eq@prior@endQuiz} can be used for whatever purposes a
+% developer wants.
+% \begin{macrocode}
+\def\aeb@endquiz
+{%
+ \eq@prior@endQuiz\noindent\eq@endQuiz
+ \global\let\eqQuizType\relax
+ \global\let\aebtitleQuiz\@empty
+ \global\let\aebTitleQuiz\@empty
+ \global\let\bqlabel\eq@bqlabel % reset beginning label to default
+ \global\let\eqlabel\eq@eqlabel % reset ending label to default
+% \end{macrocode}
+% (2013/10/18) Added \cs{sqsllabel} to list of commands that are reset.
+% \begin{macrocode}
+ \global\let\sqsllabel\eq@sqsllabel
+ \global\let\sqslrtnlabel\eq@sqslrtnlabel
+ \global\let\bqlabelISO\eq@bqlabelISO
+ \eq@belowqskip
+}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Define the \texttt{quiz*} Environment}
+%
+% \begin{environment}{quiz*}
+% This environment is more latexy, \texttt{quiz*} environment is for quizzes with forms. Equivalent
+% to \verb!\begin{quiz}*...\end{quiz}!/
+% \begin{macrocode}
+\newenvironment{quiz*}{\goodbreak\gdef\qstar{*}\@quiz*f}{\aeb@endquiz}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Begin/End Quiz with Link or Buttons}
+%
+% Redefine this macro to \cmd{\eq@BeginQuizButton} to get a form button
+% for the \texttt{quiz} environment. Pressing on the link or button
+% initializes the quiz. The default is `link': \cmd{\eq@BeginQuizLink}.
+% \begin{macrocode}
+\newcommand\eq@beginQuiz{\eq@BeginQuizLink}
+% \end{macrocode}
+% Redefine this macro to |\eq@EndQuizButton| to get a form button
+% for the \texttt{quiz} environment. Pressing on the link or button
+% will score the quiz. The default is `link': |\eq@EndQuizLink|.
+% \begin{macrocode}
+\newcommand\eq@endQuiz{\eq@EndQuizLink}
+% \end{macrocode}
+% \begin{macro}{\useBeginQuizButton}
+% Use a button instead of a link for begin quiz
+% \begin{macrocode}
+\newcommand\useBeginQuizButton[1][]
+ {\renewcommand\eq@beginQuiz{\eq@BeginQuizButton[#1]}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\useEndQuizButton}
+% Use a button instead of a link for end quiz
+% \begin{macrocode}
+\newcommand\useEndQuizButton[1][]
+ {\renewcommand\eq@endQuiz{\eq@EndQuizButton[#1]}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\useBeginQuizLink}
+% Use a link begin quiz (the default)
+% \begin{macrocode}
+\newcommand\useBeginQuizLink
+ {\renewcommand\eq@beginQuiz{\eq@BeginQuizLink}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\useEndQuizLink}
+% Use a link end quiz (the default)
+% \begin{macrocode}
+\newcommand\useEndQuizLink
+ {\renewcommand\eq@endQuiz{\eq@EndQuizLink}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\def\listOfQuizzes{}
+\def\listOfSubmitQuizzes{}
+\def\initializeAllSubmitQuizzes{}
+% \end{macrocode}
+% \begin{macro}{\@initQuiz}
+% \begin{macro}{\priorInitQuiz}
+% \begin{macro}{\postInitQuiz}
+% \cs{@initQuiz} is executed when you click on `Begin Quiz'. Included here are some
+% macro hooks for insert code prior to, and after the quiz initialization. This
+% command appears in the commands \cs{eq@@BeginQuizLinkActions} and \cs{eq@@BeginQuizButtonActions} below.
+%\changes{v7.0}{2014/11/05}{Added some JS: lstOfQuizzes is an associative array
+% listing all quizzes in the document, the value is the quiz object. We add properties
+% isSubmitted and initializeWith to the quiz object.}
+% \begin{macrocode}
+\newcommand\@initQuiz{%
+ var \curr@quiz=new Object();\jsR
+ lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR
+ \curr@quiz.oAlertCheck={bAfterValue:false};\jsR
+ \curr@quiz.Grp={};
+ \ifx\defaultColorJSLoc\@empty\else\jsR
+ \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
+ \ifx\rghtColorJSLoc\@empty\else\jsR
+ \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
+ \ifx\wrngColorJSLoc\@empty\else\jsR
+ \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
+ \ifx\partialColorJSLoc\@empty\else\r
+ \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
+ \ifx\rghtAnsSymbJSLoc\@empty\else\jsR
+ \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
+ \ifx\wrngAnsSymbJSLoc\@empty\else\jsR
+ \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
+ \ifx\corrAnsSymbJSLoc\@empty\else\jsR
+ \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
+ \ifx\eqGradeScaleLoc\@empty\else\jsR
+ \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
+ \ifx\priorInitQuiz\@empty\else\jsR\priorInitQuiz\fi\jsR
+ InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);
+ \ifx\eq@CGI\@empty\jsR\curr@quiz.isSubmitted=false;\else
+ \jsR\curr@quiz.isSubmitted=true;\fi
+ \jsR\curr@quiz.initializeWith=%
+'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);'
+ \ifx\postInitQuiz\@empty\else\jsR\postInitQuiz\fi
+}
+% \end{macrocode}
+% \cs{priorInitQuiz} and \cs{postInitQuiz} are hooks that allow a document author to
+% execute JavaScript just prior to initializing the quiz and just after. These appear in
+% \cs{eq@@BeginQuizLinkActions} and \cs{eq@@BeginQuizButtonActions} below.
+% \begin{macrocode}
+\newcommand{\priorInitQuiz}{}
+\newcommand{\postInitQuiz}{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% Here are a couple of macros used with `End Quiz', and are used for
+% submitting quiz results to a web server.
+% \begin{macrocode}
+\let\eq@submitURL\@empty
+\let\eq@insertHiddenFields\@empty
+% \end{macrocode}
+%
+% \subsubsection{With Links}
+%
+% \begin{macro}{\eq@BeginQuizLink}
+% Begin quiz with links
+% \begin{macrocode}
+\def\eq@@BeginQuizLinkActions
+{%
+ \A{\JS{%
+% \ifx\priorInitQuiz\@empty\else\priorInitQuiz\jsR\fi
+ \@initQuiz
+% \ifx\postInitQuiz\@empty\else\jsR\postInitQuiz\fi
+ }}%
+}
+\def\eq@BeginQuizLinkDefaults{\Border{0 0 0}}
+\let\bqlabelFmt\@empty
+\def\eq@BeginQuizLink
+{%
+ \set@@Link{}{}{}{\color{\@linkcolor}\bqlabelFmt\bqlabel}{}%
+ {\eq@setWidgetProps\setLink@driver}%
+ {\eq@BeginQuizLinkDefaults\eq@@BeginQuizLinkActions\every@Link}%
+ \space\ignorespaces
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\eq@EndQuizLink}
+% Code the the link version of `End Quiz'.
+% \begin{macrocode}
+\newcommand\priorSubmitQuiz{}
+\newcommand\postSubmitQuiz{}
+\def\eq@@EndQuizLinkActions
+{%
+ \A{\JS{%
+ if (!isQuizInitialized("\curr@quiz"))\jsR\jsT
+ eqAppAlert(InitMsg("\bqlabelISO"),3);\jsR
+ else {\jsR\jsT
+ if (\minQuizResp(\thequestionno)) {\jsR\jsT\jsT
+ \curr@quiz.PtValues=new %
+Array(\pointValuesArray);\jsR\jsT\jsT
+ ProbType = [\ptypeArray];\jsR\jsT\jsT
+\if@inclkey
+ \curr@quiz.CorrAns=(new %
+Array(\corrAnsArray));\jsR\jsT\jsT
+\fi
+ DisplayQuizResults("\curr@quiz",\theeqpointvalue,%
+\thequestionno);\jsR\jsT\jsT
+% \priorSubmitQuiz
+ \eq@submitURL
+ \postSubmitQuiz
+ resetQuiz("\curr@quiz");\jsR\jsT
+ }\jsR
+ }}}%
+}
+\def\eq@EndQuizLinkDefaults{\Border{0 0 0}}
+\let\eqlabelFmt\@empty
+\def\eq@EndQuizLink
+{%
+ \ifx\eq@CGI\@empty
+ \let\eq@submitURL\@empty
+ \let\eq@insertHiddenFields\@empty
+ \fi
+ \set@@Link{}{}{}{\color{\@linkcolor}\eqlabelFmt\eqlabel}{}%
+ {\eq@setWidgetProps\setLink@driver}%
+ {\eq@EndQuizLinkDefaults\eq@@EndQuizLinkActions\every@Link}%
+ \makebox[0pt][r]{\textField[\BC{}\autoCenter{n}]%
+ {htxtfld.\curr@quiz}{0bp}{0bp}}%
+ \makebox[0pt][r]{\eq@insertHiddenFields}\global\let\eq@CGI\@empty
+ \ignorespaces
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{With Buttons}
+%
+% \begin{macro}{\eq@BeginQuizButton}
+% This is the button when the user wants button rather than link for the
+% \texttt{quiz} environment.
+% \begin{macrocode}
+\def\BeginQuizButtonDefaults
+{%
+ \CA{\bqlabel}\H{P}\F{\FPrint}
+ \BC{1 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}
+}
+\def\eq@@BeginQuizButtonActions
+{%
+ \A{\JS{%
+% \ifx\priorInitQuiz\@empty\else\priorInitQuiz\r\fi
+ \@initQuiz
+% \ifx\postInitQuiz\@empty\else\r\postInitQuiz\fi
+ }}%
+}
+\newcommand\eq@BeginQuizButton[1][]
+{%
+ \mbox{\push@@Button{#1}{beginQuiz.\curr@quiz}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\BeginQuizButtonDefaults\eq@@BeginQuizButtonActions
+ \every@ButtonField\every@BeginQuizButton}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\eq@EndQuizButton}
+% The `End Quiz' code for Links
+% \begin{macrocode}
+\def\EndQuizButtonDefaults
+{%
+ \CA{\eqlabel}\F{\FPrint}\BC{1 0 0}
+ \BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}
+}
+\def\eq@@EndQuizButtonActions
+{%
+ \A{\JS
+ {if (!isQuizInitialized("\curr@quiz"))\jsR\jsT
+ eqAppAlert(InitMsg("\bqlabelISO"),3);\jsR
+ else {\jsR\jsT
+ if (\minQuizResp(\thequestionno)&&_ModalNotOn){\jsR\jsT\jsT
+ \curr@quiz.PtValues=(new %
+Array(\pointValuesArray));\jsR\jsT\jsT
+ ProbType=[\ptypeArray];\jsR\jsT\jsT
+\if@inclkey
+ \curr@quiz.CorrAns=(new %
+Array(\corrAnsArray));\jsR\jsT\jsT
+\fi
+ DisplayQuizResults("\curr@quiz",\theeqpointvalue,%
+\thequestionno);\jsR\jsT\jsT
+ \eq@submitURL
+ \postSubmitQuiz
+ resetQuiz("\curr@quiz");\jsR\jsT
+ }\jsR
+ }}%
+ }
+}
+\newcommand\eq@EndQuizButton[1][]
+{%
+ \ifx\eq@CGI\@empty
+ \let\eq@submitURL\@empty
+ \let\eq@insertHiddenFields\@empty
+ \fi
+ \mbox{\push@@Button{#1}{endQuiz.\curr@quiz}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\EndQuizButtonDefaults\eq@@EndQuizButtonActions
+ \every@ButtonField\every@EndQuizButton}}%
+ \makebox[0pt][r]{\eq@insertHiddenFields}\global\let\eq@CGI\@empty
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\databaseName}
+% \begin{macro}{\tableName}
+% \begin{macro}{\eqCGI}
+% \begin{macro}{\eqSubmit}
+% These four commands give general support for submitting quiz data
+% to a web server for storage in a database. Use in my \textsf{eq2db} Package
+% which I have not completed yet. (2014/09/14) Sanitized first argument of \cs{eqSubmit}.
+% \begin{macrocode}
+\newcommand\databaseName[1]{\gdef\db@Name{#1}}\def\db@Name{}
+\newcommand\tableName[1]{\gdef\db@Table{#1}}\def\db@Table{}
+\newcommand\eqCGI{\definePath{\eq@CGI}}\def\eq@CGI{}
+\newcommand\eqSubmit{\hyper@normalise\eqSubmiti}
+\def\eqSubmiti#1{\xdef\eq@CGI{"#1"}\eqSubmitii}
+\def\eqSubmitii#1#2{\databaseName{#1}\tableName{#2}}
+\providecommand{\rtnURL}{\definePath{\thisRtnURL}}
+\let\thisRtnURL\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% The next two commands are used in the \textsf{eq2db} package. We make the
+% definitions here so that they can be used even if the package is not loaded.
+% In this way, a self-contained quiz can be submitted just by loading the
+% package.
+% \begin{macrocode}
+\newcommand\addHiddenTextField[3][]{}
+\newcommand\populateHiddenField[2]{}
+% \end{macrocode}
+% \subsection{Correcting the Quiz}
+%
+% \begin{macro}{\eqButton}
+% Use this button to correct the quiz. Can be customize with
+% optional arguments.
+% section.
+%\begin{verbatim}
+% #1 = optional attributes of button
+% #2 = title of textfield that contains the score.
+%\end{verbatim}
+% \begin{macrocode}
+\def\eqButtonDefaults
+{%
+ \CA{\eq@local@CA}\AC{}\H{P}\W{1}\S{B}
+ \BC{1 0 0}\BG{.7529 .7529 .7529}
+}
+\def\@@eqButtonActions
+{%
+ \A{\JS{if (isEndQuizPushed("\eqBaseName")){\jsR\jsT%
+ correctQuiz("\eqBaseName",\thequestionno);%
+ \ifusesumrytbls\jsR\jsT\else\jsR\fi
+% \end{macrocode}
+% (06/13/10) Added the quiz summary table, and the function
+% \texttt{correctSumryTbl}. If a summary table is not present
+% the function does nothing.
+% \begin{macrocode}
+ if (typeof correctSumryTbl == "function")\jsR\jsT\jsT
+ correctSumryTbl("\eqBaseName",\thequestionno);\jsR
+ }
+ }}%
+}
+\newcommand\eqButton[2][]
+{%
+% \end{macrocode}
+% If nocorrections is true, then this button does not appear.
+% \begin{macrocode}
+ \ifnocorrections\else
+ \def\eqBaseName{#2}%
+ \mbox{\push@@Button{#1}{correct.#2}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\eqButtonDefaults\@@eqButtonActions\every@ButtonField
+ \every@eqButton}}%
+ \fi
+}
+% \end{macrocode}
+% \changes{v6.7n}{2013/09/17}{\cs{CorrButton} is now an alias for \cs{eqButton}}
+% \DescribeMacro{\CorrButton} is a name better suited for the task of this button
+% than the \cs{eqButton} name.
+% \begin{macrocode}
+\def\CorrButton{\eqButton}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\rbMarkup}
+% An optional element for quizzes. Place just after a response box (perhaps, before the
+% \cs{CorrAnsButton}. When the correct button is pressed, this check box will show a
+% green check or a red cross (by default).
+% \begin{macrocode}
+\def\rbMarkup@Defaults
+{%
+ \BC{}\F{\FHidden}\Ff{\FfReadOnly}\textSize{12}
+ \textColor{0 g}\symbolchoice{check}\W{}
+}
+\newcommand\rbMarkup[1][]{%
+ \ifx\grpquestions\eq@One
+ \def\Fld@name{%
+ \oField.\thequestionno.\thegrpquestionno}\else
+ \def\Fld@name{\oField.\thequestionno}\fi
+ \mbox{\check@@Box{#1\V{Yes}\DV{Yes}}%
+ {rbmarkup.\Fld@name}%
+% {rbmarkup.\curr@quiz.\thequestionno}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\rbMarkup@Defaults\every@CheckBox\every@rbMarkup}}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Measuring Quiz Results}
+%
+% \begin{macro}{\minQuizResp}
+% Define the threshold level. The two permissible values are \texttt{lowTreshold}
+% and \texttt{highThreshold}. These are names of DLJS. New threshold functions
+% can be defined and specified.
+% \begin{macrocode}
+\newcommand\minQuizResp{lowThreshold}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\PTs}
+% Use this macro to assign weights to the quiz questions. Use only within
+% the \texttt{questions} environment, just after an \cmd{\item}. If
+% \cmd{\PTs} does not appear, then a weight of $1$ is assumed.
+%\par\noindent|#1 = number of points for the current question.|
+% The star-form records the points but does not display the points.
+% \begin{macrocode}
+\newcommand\PTs{\@ifstar{\def\eq@star{*}\@PTs}{\def\eq@star{x}\@PTs}}
+\def\@PTs#1{\gdef\eq@PTs{#1}\ifx\eq@PTs\@empty\gdef\eq@PTs{1}\fi
+ \global\let\eqPTs\eq@PTs\global\let\eq@PTs\@empty
+ \if\eq@star*\else\PTs@Hook\fi}
+\def\eq@PTs{0} % initialize this variable
+% \end{macrocode}
+% \begin{macro}{\QT}
+% \cs{QT} is used for entering the ``question type'' for the question (optional).
+% This question type is entered into the ``\texttt{tagged}'' data, and is meant to be
+% used for classifying and in tracking the problem types. Example: \verb+\QT{limits}+.
+% \begin{macrocode}
+\newcommand\QT[1]
+{%
+ \gdef\eq@qT{#1}\ifx\eq@qT\@empty\global\let\eq@qT\eq@na\fi
+% \end{macrocode}
+% \cs{eqQT} saves the value, then we put \cs{eq@qT} back to its default.
+% \begin{macrocode}
+ \global\let\eqQT\eq@qT\global\let\eq@qT\eq@na
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\def\eq@na{na} % not applicable
+\let\eq@qT\eq@na
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\PTsHook}
+% Used to typeset the number of points.
+% \begin{macrocode}
+\newcommand\PTsHook[1]{\def\PTs@Hook{#1}}
+\let\PTs@Hook\@empty
+\let\eq@PTs\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\eqGradeScale}
+% This is an array of letter grades and grade ranges. This macro is use as the argument
+% of the JS function \texttt{GetGrade}.
+% \begin{macrocode}
+\newcommand\eqGradeScale{%
+ "A",[90, 100],"B",[80,90],"C",[70,80],"D",[60,70],"F",[0,60]}
+\let\eqGradeScaleLoc\@empty
+\newcommand{\resetGradeScaleLoc}{\global\let\eqGradeScaleLoc\@empty}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\DefaultHeightOfWidget}
+% \begin{macro}{\RBW}
+% \begin{macro}{\SFW}
+% \begin{macro}{\GFW}
+% \begin{macro}{\PtW}
+% \begin{macro}{\PcW}
+% \cmd{\DefaultHeightOfWidget} is the default height of all form
+% fields (except radio fields and checkboxes). \cmd{\RBW} is the
+% default width of the \cmd{\RespBox}; and \cmd{\SFW} is the
+% default width of the \cmd{\ScoreField}. \cs{GFW} is the default
+% width of a grade field button; \cs{PtFW} is the default width
+% of a points field button; and \cs{PcFW} is the default width
+% of the percent field button.
+% \begin{macrocode}
+\def\tallywidth#1{\def\TBW{#1}}
+\def\TBW{15bp}
+\def\DefaultHeightOfWidget{11bp}
+\def\RadioFieldSize{11bp}
+\def\RBW{2in} % Response Box width (math,txt, txtpc, answer field)
+\def\SFW{1.5in} % Score Field Width
+\def\GFW{20pt} % Grade Field Width
+\def\PtFW{1.5in} % Point Field Width
+\def\PcFW{1.5in} % Percent Field Width
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ScoreField}
+% This text field will receive the scores
+% of a quiz. The command \cmd{\eqScore} was defined
+% in Section~\ref{ss:ldm}. This command takes an optional
+% argument and a required argument.
+%\begin{verbatim}
+%#1 = one or more commands that will customize the design of the
+% field. See the manual for examples.
+%#2 = Base name of the quiz
+%\end{verbatim}
+% \begin{macrocode}
+\def\ScoreFieldDefaults
+{%
+ \Ff{\FfReadOnly}\BC{1 0 0}\BG{}\S{S}
+ \DV{\eqScore}\V{\eqScore}\W{1}
+}
+\newcommand\ScoreField[2][]
+{%
+ \mbox{\text@@Field{#1}{ScoreField.#2}{\SFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\ScoreFieldDefaults\every@eqTextField\every@ScoreField}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\GradeField}
+% This command creates a text field that shows the letter grade of the user's
+% effort on the current quiz.
+% \begin{macrocode}
+\def\GradeFieldDefaults
+{%
+ \textColor{0 0 1 rg}\BC{1 0 0}\BG{1 1 1}\S{S}
+ \Ff{\FfReadOnly}\Q{1}\W{1}
+}
+\newcommand\GradeField[2][]
+{%
+ \mbox{\text@@Field{#1}{GradeField.#2}{\GFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\GradeFieldDefaults\every@eqTextField\every@GradeField}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AnswerField}
+% This command creates a text field to receive the answers to the
+% fill-in questions.
+% \begin{macro}{\resetAnsFieldOnClose}
+% When expanded, the \cs{AnswerField}s will be reset whenever the user changes pages.
+% \begin{macro}{\noResetAnsFieldOnClose}
+% When expanded, the \cs{AnswerField}s will not be reset, this is the default behavior.
+% \begin{macrocode}
+\def\AnswerFieldDefaults
+{%
+ \BC{0 0 0}\S{S}\Ff{\FfReadOnly}\W{1}%
+ \presets{\eq@resetAnsFieldOnClose}%
+}
+\let\eq@resetAnsFieldOnClose\@empty
+\newcommand{\noResetAnsFieldOnClose}{%
+ \global\let\eq@resetAnsFieldOnClose\@empty}
+\newcommand{\resetAnsFieldOnClose}{%
+ \gdef\eq@resetAnsFieldOnClose{%
+ \AApageclose{this.resetForm(["\Fld@name"]);}}}
+\newcommand\AnswerField[2][]
+{%
+ \mbox{\text@@Field{#1}{Ans.#2}{\RBW}{\DefaultHeightOfWidget}%
+ {}{\eq@setWidgetProps\eq@TextField}%
+ {\AnswerFieldDefaults\every@eqTextField\every@AnswerField}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\autoAnswerField}
+% An attempt at putting \cs{AnswerField} in the left running footer on each page where there
+% is a response box.
+% \begin{macrocode}
+%
+\newcommand\autoAnswerField{%
+ \@ifundefined{lfooter}{\def\eq@next{\eq@autoAnswerFieldgobble}%
+ \PackageError{exerquiz}{The \string\autoAnswerField\space
+ command\MessageBreak requires the web package}{Use web package}
+ }{%
+ \PackageInfo{exerquiz}{%
+ For this auto answer field feature to run\MessageBreak
+ the webheadings pagestyle of the web package\MessageBreak
+ is required}\def\eq@next{\eq@autoAnswerField}%
+ \ifx\web@lfoot\@empty\else
+ \PackageWarning{exerquiz}{The left running footer already in
+ use\MessageBreak Will overwrite what is there now.
+ Better fix it.}\fi
+ }%
+ \eq@next
+}
+\newcommand\eq@autoAnswerFieldgobble[1][]{\relax}
+\newcommand\autoAnsFldRaiseBox[1]{\def\ef@aAFRB{#1}}
+\autoAnsFldRaiseBox{0pt}
+\let\autoAFOpts\@empty
+\newcommand\eq@autoAnswerField[1][]{\gdef\autoAFOpts{#1}%
+ \def\eq@insertAnswerField{\AnswerField[#1]{\currQuiz}}%
+ \eq@@autoAnswerField
+}
+\newcommand\eq@@autoAnswerField{\lfooter{\ifIsRespBox
+ \raisebox{\ef@aAFRB}{\eq@insertAnswerField}%
+ \global\IsRespBoxfalse\fi}%
+}
+\newcommand\manualAnswerField[1][\autoAFOpts]{%
+ \expandafter\AnswerField\expandafter[#1]{\currQuiz}}
+% \end{macrocode}
+% \end{macro}
+% Now let's define some additional text fields for the quiz environment.
+% \begin{macro}{\PointsField}
+% This command creates a text field which displays the number of points in the
+% quiz scored by the user of the \texttt{quiz}.
+% \begin{macrocode}
+\def\PointsFieldDefaults
+{%
+ \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}
+ }
+\newcommand\PointsField[2][]
+{%
+ \mbox{\text@@Field{#1}{PointsField.#2}{\PtFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\PointsFieldDefaults\every@eqTextField\every@PointsField}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\PercentField}
+% This command creates a text field which displays user's score in percent
+% form.
+% \begin{macrocode}
+\def\PercentFieldDefaults
+{%
+ \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}%
+}
+\newcommand\PercentField[2][]
+{%
+ \mbox{\text@@Field{#1}{PercentField.#2}{\PcFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\PercentFieldDefaults\every@eqTextField\every@PercentField}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\RestoreScoreField}
+% Reset the score field to its default, in case some author
+% changed things.
+% \begin{macrocode}
+\newcommand\RestoreScoreField
+{%
+ \global\let\eqScore\eq@Score
+ \global\let\eqOutOf\eq@OutOf
+}
+% \end{macrocode}
+% \end{macro}
+% \subsection{Floating and Docking a Quiz}
+%
+% \begin{macro}{\DeclareQuiz}
+% A convenience macro for setting the name of the quiz. This command defines the
+% text macro \cs{currQuiz} which contains the quiz name. Can be used in conjunction
+% with \cs{floatQuiz} and \cs{startQuizHere}.
+% \changes{v6.05c}{2006/05/19}
+% {
+% Added a convenience macro for setting the name of the quiz. This command defines the
+% text macro \cs{currQuiz} which contains the quiz name. Can be used in conjunction
+% with \cs{floatQuiz} and \cs{startQuizHere}.
+% }
+% \begin{macrocode}
+\def\DeclareQuiz#1{%
+ \edef\thisQuiz{#1}%
+ \edef\curr@quiz{#1}%
+ \edef\currQuiz{#1}%
+ \edef\curr@quiz{#1}%
+}
+\let\Quiz\DeclareQuiz
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\floatQuiz}
+% \begin{macro}{\dockQuiz}
+% Use \cs{floatQuiz} to create commands \cs{startQuizHere} and \cs{endQuizHere}. These commands expand to the
+% `Begin Quiz' button or link (`End Quiz' button or link). But these commands can be placed anywhere before the
+% \texttt{quiz} environment (after the \texttt{quiz} environment). Use \cs{dockQuiz} to return to the default behavior of the
+% \texttt{quiz} environment.
+% \changes{v6.05c}{2006/05/19}
+% {
+% Added \cs{floatQuiz}, \cs{dockQuiz} and \cs{startQuizHere} to start a quiz in an
+% arbitrary place prior to the beginning of the quiz.
+% }
+%\par\medskip\noindent Usage:
+%\begin{verbatim}
+%\Quiz{myQuiz}
+%\floatQuiz
+%........
+%\begin{center}
+%\startQuizHere
+%\end{center}
+%....
+%\begin{quiz*}{\thisQuiz}
+%....
+%\end{quiz*}
+%....
+%\endQuizHere
+% ...
+%\docQuiz
+%\begin{quiz}{anotherQuiz}
+%....
+%\end{verbatim}
+% \begin{macrocode}
+\def\aeb@noindgobble{\noindent\@gobbletwo}
+\let\startQuizHere\relax
+\let\endQuizHere\relax
+\let\dockQuiz\relax
+\newcommand\floatQuiz{%
+ \global\let\eq@beginQuiz@saved\eq@beginQuiz
+ \global\let\eq@endQuiz@saved\eq@endQuiz
+ \global\let\startQuizHere\eq@beginQuiz
+ \global\let\endQuizHere\eq@endQuiz
+ \global\let\eq@beginQuiz\aeb@noindgobble
+ \global\let\eq@endQuiz\@empty
+ \global\let\dockQuiz\eq@dockQuiz
+}
+\newcommand\eq@dockQuiz{%
+ \global\let\eq@beginQuiz\eq@beginQuiz@saved
+ \global\let\eq@endQuiz\eq@endQuiz@saved
+ \global\let\startQuizHere\relax
+ \global\let\endQuizHere\relax
+ \global\let\eq@beginQuiz@saved\relax
+ \global\let\eq@endQuiz@saved
+ \global\let\dockQuiz\relax
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{\texorpdfstring{\protect\cs{titleQuiz} and \protect\cs{fancyQuizHeaders}}
+% {\textbackslash{titleQuiz} and \textbackslash{fancyQuizHeaders}}}
+%
+% \begin{macro}{\fancyQuizHeaders}
+% \begin{macro}{\restoreDefaultQuizHeaders}
+% \begin{macro}{\dfltFncyQHdrsFmt}
+% \begin{macro}{\dclrFncyQzHdrsFmt}
+% \begin{macro}{\dclrFncySqHdrsFmt}
+% The commands for \cs{fancyQuizHeaders}: \cs{restoreDefaultQuizHeaders} restores
+% solution headers to the old style; \cs{eq@fancyQuizHeadersfmt} determines the
+% formatting for quizzes; and \cs{eq@fancyShrtQuizHeadersfmt} does the same for
+% short quizzes.
+% \begin{macrocode}
+\def\fancyQuizHeaders{%
+ \global\let\eq@sqsllabel@fancy@save\eq@sqsllabel
+ \gdef\eq@sqsllabel{\eq@fancyQuizHeaders}}
+\def\eq@fancyQuizHeaders{%
+ \if\eqQuizType\isQZ\expandafter\eq@fancyQuizHeadersfmt\else
+ \expandafter\eq@fancyShrtQuizHeadersfmt\fi
+}
+\let\eq@sqsllabel@fancy@save\@empty
+% \end{macrocode}
+% We set \cs{eq@sqsllabel} back to its value when \cs{fancyQuizHeaders} was last
+% invoked.
+% \begin{macrocode}
+\def\restoreDefaultQuizHeaders{%
+ \global\let\eq@sqsllabel\eq@sqsllabel@fancy@save}
+% \end{macrocode}
+% Here is the definition of the format for quizzes. This can be redefined, a few
+% suggestions are made in the documentation. \DescribeMacro{\dfltFncyQHdrsFmt}
+% \cmd{\dfltFncyQHdrsFmt} is the common format for both \texttt{quiz} and \texttt{shortquiz}.
+% \begin{macrocode}
+\newcommand\fncyQHdrsColor{blue}
+% \end{macrocode}
+% (2016/12/21) Localized some text strings in \cs{dfltFncyHdrsFmt}.
+% \changes{v7.8c}{2016/12/21}{Localized some text strings in \string\cs{dfltFncyHdrsFmt}}
+% \begin{macrocode}
+\newcommand\FncyHdrsFmtNoTitleQuiz{Solution to Quiz:}
+\newcommand\FncyHdrsFmtQuestion{Question}
+\newcommand\dfltFncyQHdrsFmt{%
+ \protect\bfseries\protect\color{\fncyQHdrsColor}%
+ \ifx\aebTitleQuiz\@empty
+ \ifnum\@eqquestiondepth>0\relax\FncyHdrsFmtNoTitleQuiz\fi
+ \else\aebTitleQuiz:\ifnum\@eqquestiondepth=0\else\protect\ %
+ \FncyHdrsFmtQuestion\fi\fi\ifcase\@eqquestiondepth
+ \ifx\aebTitleQuiz\@empty\FncyHdrsFmtNoTitleQuiz\fi
+ \or\space\arabic{eqquestionnoi}.%
+ \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ (\roman{eqquestionnoiii})\fi
+}
+% \end{macrocode}
+% \DescribeMacro{\dclrFncyQzHdrsFmt}\cmd{\dclrFncyQzHdrsFmt} is used to declare the formatting for quizzes.
+% \begin{macrocode}
+\newcommand\dclrFncyQzHdrsFmt[1]{%
+ \def\eq@fancyQuizHeadersfmt{{#1}}%
+}
+\dclrFncyQzHdrsFmt{\dfltFncyQHdrsFmt}
+% \end{macrocode}
+% \DescribeMacro{\dclrFncySqHdrsFmt}\cmd{\dclrFncySqHdrsFmt} is for short quizzes, we make the formatting the same as that for quizzes.
+% re-defined.
+% \begin{macrocode}
+\newcommand\dclrFncySqHdrsFmt[1]{%
+ \def\eq@fancyShrtQuizHeadersfmt{{#1}}%
+}
+\dclrFncySqHdrsFmt{\dfltFncyQHdrsFmt}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\titleQuiz}
+% \begin{macro}{\titleQuizfmt}
+% \begin{macro}{\ifQuizType}
+% \begin{macro}{\ifstaroption}
+% \begin{macro}{\eq@ifstaroption}
+% The \cs{titleQuiz} command adds a title to the quiz or short quiz, using
+% a format, as defined in \cs{titleQuizfmt}. The switches \cs{ifQuizType}
+% and \cs{eq@ifstaroption} allows you to distinguish between quizzes and
+% short quizzes, a \texttt{*} option or non-\texttt{*} option.
+%
+%\cs{titleQuiz} takes two parameters: an optional \texttt{*} and the
+%text for the title of the quiz. When \texttt{*} is used---for short
+%quizzes only---the title of the quiz is used for the definition of
+%\cs{sqlabel}. Note that \cs{makeatletter} is invoked before the
+% parameters are read.
+% \changes{v6.7o}{2013/11/25}{Changed \cs{aeb@@titleQuzi} to \cs{aebTitleQuiz}}
+% \changes{v6.7p}{2013/12/11}{Added optional parameter to \cs{titleQuiz}
+% to execute a command, such as incrementing a counter.}
+% \begin{macrocode}
+\let\tqhspace\space
+\newcommand\titleQuiz[1][]{#1\@titleQuizi}
+\def\@titleQuizi{\makeatletter
+ \@ifstar{\def\eq@tq@star{*}\eq@titleQuiz}%
+{\def\eq@tq@star{x}\eq@titleQuiz}}
+\def\eq@titleQuiz#1{%
+ \gdef\aebTitleQuiz{#1}\def\@currentlabelname{#1}%
+ \gdef\aeb@@titleQuiz{#1}%
+ \gdef\aebtitleQuiz{\mbox{\titleQuizfmt{#1}}\tqhspace}%
+\makeatother}
+%</package>
+%<package|eqexam>\let\aebtitleQuiz\@empty
+%<package|eqexam>\let\aebTitleQuiz\@empty
+%<*package>
+% \end{macrocode}
+% The command to format the \cs{titleQuiz}.
+% \begin{macrocode}
+\newcommand\titleQuizfmt{\bfseries}
+% \end{macrocode}
+% A user interface to distinguish between quizzes and short quizzes.
+% \begin{macrocode}
+\def\ifQuizType#1#2{\if\eqQuizType\isQZ\def\qt@next{#1}%
+ \else\def\qt@next{#2}\fi\qt@next}
+% \end{macrocode}
+% Used to distinguish between whether \cs{titleQuiz} was invoked with
+% the \texttt{*} option. In the short quiz environment, this command
+% is let equal to \cs{ifstaroption}, which is the user-access to this command.
+% Outside the \texttt{shortquiz} environment, \cs{ifstaroption} is \cs{@gobbletwo}
+% \begin{macrocode}
+\def\eq@ifstaroption#1#2{\if\eq@tq@star*\def\sq@next{#1}%
+ \else\def\sq@next{#2}\fi\sq@next}
+\let\eq@tq@star\relax
+\def\ifstaroption{\PackageWarning{exerquiz}
+ {\protect\ifstaroption\space is only defined within the\MessageBreak
+ shortquiz environment. Gobbling up its two\MessageBreak
+ arguments, sorry. This occurred}%
+ \@gobbletwo
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Showing Partial Credit Markup}
+%
+% \begin{macro}{\aeb@creditmarkup}
+% \begin{macro}{\aeb@creditmarkupfmt}
+% \begin{macro}{\ptsLabel}
+% \begin{macro}{\ptLabel}
+% \begin{macro}{\multipartquestion}
+% \begin{macro}{\hideCreditMarkup}
+% \begin{macro}{\showCreditMarkup}
+% \cs{showCreditMarkup} will show points assigned to individual questions in a quiz.
+% \cs{showCreditMarkup} turns off this feature. Should be placed before the next quiz,
+% not within a quiz. The command \cs{multipartquestion} is placed just prior to a question
+% that introduces a problem with sub-parts. See the demo file \texttt{pc\_test.tex} for examples.
+% The other two commands \cs{aeb@creditmarkup} and \cs{aeb@creditmarkupfmt} can be redefined
+% to suite your tastes.
+%
+%\changes{v6.2c}{2007/11/14}
+%{
+% Added the commands \cs{showCreditMarkup} and \cs{hideCreditMarkup} to show partial credit markup
+%}
+%\changes{v6.3k}{2008/01/09}
+%{
+% Added \cs{ptsLabel} and \cs{ptLabel} to localize the markup in the margin of a quiz
+%}
+% \begin{macrocode}
+\newcounter{qMarkCnt}
+\def\multipartquestion{\global\let\aeb@multipart\eq@One}
+% \end{macrocode}
+% The labeling for the partial credit markup. These two commands are
+% are defined (identically) in the \textsf{eqexam} package, hence the
+% use of \cs{providecommand}.
+% \begin{macrocode}
+\providecommand{\ptsLabel}[1]{\def\eqptsLabel{#1}}\ptsLabel{pts}
+\providecommand{\ptLabel}[1]{\def\eqptLabel{#1}}\ptLabel{pt}
+\let\aeb@multipart\eq@Zero
+% \end{macrocode}
+% \DescribeMacro{\pcMarkupColor} is the named color in RGB color space to
+% use for the color of the partial credit markup. (2013/09/14).
+% \begin{macrocode}
+\newcommand\pcMarkupColor{red}
+% \end{macrocode}
+% \cs{aeb@creditmarkup} creates a small text fields that holds the partial
+% credit markup. The command may be redefined, perhaps to changes the dimensions
+% of the rectangular bounding box, set at \texttt{12bp} by \texttt{8bp}.
+%
+% We supply basic controls for the text field, width (\DescribeMacro{\markupWidth}\cmd\markupWidth),
+% height (\DescribeMacro{\markupHeight}\cmd{\markupHeight}), and text size
+% (\DescribeMacro{\markupTextSize}\cmd{\markupTextSize})
+% \begin{macrocode}
+\def\markupWidth{12bp}\def\markupHeight{8bp}\def\markupTextSize{0}
+% \end{macrocode}
+% \cmd\aeb@creditmarkup creates the text field that appears in the margins.
+% \begin{macrocode}
+\newcommand{\aeb@creditmarkup}{%
+ \textField[\Ff\FfReadOnly\BC{}\F\FHidden
+ \textColor{\pcMarkupColor}\textSize{\markupTextSize}\autoCenter{n}%
+ \DV{0 \eqptsLabel}\V{0 \eqptsLabel}]%
+ {qMark.\currQuiz.\thequestionno.\arabic{qMarkCnt}}%
+ {\markupWidth}{\markupHeight}%
+}
+% \end{macrocode}
+% The \cs{showCreditMarkup} command defines \cs{qMark} and \cs{qMark@Hook}.
+% \begin{macrocode}
+\def\showCreditMarkup{%
+% \end{macrocode}
+% \cs{qMark} makes the decision whether to place a mark or not. If
+% the command \cs{multipartquestion} has been expanded, \cs{aeb@multipart} is one, otherwise
+% it is zero. If zero we do place the markup, otherwise, no.
+% \begin{macrocode}
+ \def\qMark{\if\aeb@multipart\eq@Zero\aeb@creditmarkup
+ \stepcounter{qMarkCnt}\else\global\let\aeb@multipart\eq@Zero\fi}%
+% \end{macrocode}
+% \cs{qMark@Hook} is a hook that is normally \cs{@empty}. The hook is strategically
+% placed at the beginning of each question \cs{item}. Here we define it to be
+% \cs{aeb@creditmarkupfmt}.
+% \begin{macrocode}
+ \def\qMark@Hook{\aeb@creditmarkupfmt}%
+}
+% \end{macrocode}
+% Turn off partial credit markup by putting \cs{qMark@Hook} back to its default.
+% \begin{macrocode}
+\def\hideCreditMarkup{\global\let\qMark@Hook\@empty}
+% \end{macrocode}
+% A simple command to place the \cs{qMark} in a \cs{makebox[0pt][r]}, with
+% a little adjustment to please the eye.
+% \begin{macrocode}
+\newcommand{\aeb@creditmarkupfmt}{\makebox[0pt][r]{\qMark\hspace{-2bp}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%\subsection{Filtering solutions to quizzes}
+% The \cs{eqQt} and \cs{eqSQt} commands have one argument designed to be used to filter
+% solutions to quizzes. The demo document is \texttt{filter\_quizzes.tex},
+% but basically, we can include the solutions several times, once for each set filtered set.
+% \begin{macrocode}
+\long\def\gobbleToEndQt#1\endeqQt{\ifeqforpaper\expandafter\@gobble\fi}
+\long\def\gobbleToEndSQt#1\endeqSQt{%
+ \ifeqforpaper\expandafter\@gobble\fi}
+% \end{macrocode}
+% The \DescribeMacro{\inclQtFilter}\cmd{\inclQtFilter} operates on the quizzes. If the argument \texttt{\#1}
+% matches the optional argument of \cs{filterFor}, we include, otherwise, we gobble
+% up everything to the end of the quiz, including the token that follows
+% \cmd{\gobbleToEndQt}.
+% \begin{macrocode}
+\newcommand\inclQtFilter[1]{\def\eqarg{#1}\ifx\eqarg\eqFilterArg
+ \else\expandafter\gobbleToEndQt\fi}
+% \end{macrocode}
+% The \DescribeMacro{\exclQt}\cmd{\exclQt} command exclude all quiz solutions.
+% \begin{macrocode}
+\newcommand{\exclQt}[1]{\gobbleToEndQt}
+% \end{macrocode}
+% The \DescribeMacro{\useQtFilter}\cmd{\useQtFilter} command \cs{let}s \cs{eqQt} to
+% \cs{inclQtFilter}, and it also \cs{let}s \cs{eqSQt} to
+% \cs{exclSQt}.
+% \begin{macrocode}
+\newcommand{\useQtFilter}{%
+ \let\eqQt\inclQtFilter\let\eqSQt\exclSQt
+}
+% \end{macrocode}
+% Now we repeat the same sequence of construct for short quizzes.
+% The command \DescribeMacro{\inclSQtFilter}\cmd{\inclSQtFilter} includes a short quiz
+% solution if it meets the filter criteria.
+% \begin{macrocode}
+\newcommand\inclSQtFilter[1]{\def\eqarg{#1}\ifx\eqarg\eqFilterArg
+ \else\expandafter\gobbleToEndSQt\fi}
+% \end{macrocode}
+% The \DescribeMacro{\exclSQt}\cmd{\exclSQt} command excludes all short quiz solutions.
+% \begin{macrocode}
+\newcommand{\exclSQt}[1]{\gobbleToEndSQt}
+% \end{macrocode}
+% The \DescribeMacro{\useSQtFilter}\cmd{\useSQtFilter} \cs{let}s \cs{eqSQt} to
+% \cs{inclSQtFilter}.
+% \begin{macrocode}
+\newcommand{\useSQtFilter}{\let\eqSQt\inclSQtFilter\let\eqQt\exclQt}
+% \end{macrocode}
+%
+%\section{Bookmarking the Quizzes}
+%
+% \begin{macro}{\sqbookmarkfmt}
+% \begin{macro}{\qzbookmarkfmt}
+% \begin{macro}{\quizpdfbookmark}
+% Support for bookmarking the quizzes and shortquizzes. Unlike the bookmarking
+% of the exercises, there is no support for bookmarking individual questions
+% within a quiz.
+%\changes{v6.2a}{2007/11/10}
+%{
+% Added \cs{quizpdfbookmark} to bookmark quizzes.
+%}
+% \begin{macrocode}
+\newcommand{\sqbookmarkfmt}{Short Quiz \@shortquizCnt.\space}
+\newcommand{\qzbookmarkfmt}{Quiz \@quizCnt.\space}
+\newcommand{\quizpdfbookmark}[1]{\relax\def\argi{#1}%
+ \if\eqQuizType\isSQZ\edef\aeb@bmmrkdest{sqbm.\@shortquizCnt}%
+ \def\aeb@thisbkmrkfmt{\sqbookmarkfmt}\else
+ \edef\aeb@bmmrkdest{qzbm.\@quizCnt}%
+ \def\aeb@thisbkmrkfmt{\qzbookmarkfmt}\fi
+ \def\quizpdfbookmarktitle{#1}%
+ \def\eqex@next{\belowpdfbookmark{\aeb@thisbkmrkfmt#1}%
+ {\aeb@bmmrkdest}}%
+ \ifx\aebTitleQuiz\@empty\else\ifx\argi\@empty
+ \def\quizpdfbookmarktitle{\aebTitleQuiz}%
+ \def\eqex@next{\belowpdfbookmark{\aebTitleQuiz}%
+ {\aeb@bmmrkdest}}\fi\fi
+ \eqex@next\ignorespaces
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \section{Multiple Choice Alternatives}
+% \subsection{For \texttt{shortquiz}}
+% \subsubsection{The \texttt{answers} Environment}
+% \begin{macro}{answers}
+% The alternatives of a multiple choice question are enclosed in
+% the \texttt{answers} environment.
+% This environment takes an optional argument, and one
+% required argument. The required parameter is the number of
+% columns to construct in the underlying \texttt{tabular}
+% environment; the presence of the optional argument means the author
+% wants to include the solution to this quiz question. The value of
+% the optional parameter is the named destination of the solution.
+% The optional parameter for the named destination can also be a
+% `\texttt*', in which case a name of \texttt{\string\curr@quiz.\string\thequestionno}
+% is assigned.
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\def\pushEnvir{\xdef\eq@currenvir{\@currenvir}\endgroup}
+\def\popEnvir{\begingroup\@endpefalse
+ \edef\@currenvir{\eq@currenvir}%
+ \edef\@currenvline{\on@line}%
+}
+\def\answers@sq{\parindent0pt
+% \end{macrocode}
+% The \texttt{answers} environment needs to go into horizontal mode for the
+% \cs{linelength} to be correct when using \cs{leadinitem}.
+% \begin{macrocode}
+ \ifx\solutionparshape\@empty\else
+% ?? remove the \par, why is it there to begin with?
+ \pushEnvir\par\noindent\expandafter\popEnvir\fi
+% \pushEnvir\par\noindent\expandafter\popEnvir\fi
+ \stepcounter{questionno}%
+ \if\sqstar*\relax
+ \if\aeb@FLOverride\eq@l
+ \let\@Ans\Ans@sq@l\else
+ \let\@Ans\Ans@sq@f\fi
+ \else
+ \if\aeb@FLOverride\eq@f
+ \let\@Ans\Ans@sq@f\else
+ \let\@Ans\Ans@sq@l\fi
+ \fi
+ \def\aeb@answerType{r}\@ifnextchar[{\answers@@sq}%
+ {\@ifstar{\answers@@sq[\curr@quiz.\thequestionno]}{\answers@@sq[]}}}
+\def\manswers@sq{\parindent0pt
+% \end{macrocode}
+% \cs{ifuserectforms} is defined in \textsf{eqexam},
+% \begin{macrocode}
+ \@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
+% \if\aeb@FLOverride l\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[]}}}
+% \end{macrocode}
+% \end{macro}
+%\begin{verbatim}
+% #1 = named destination to be associated with solution
+% #2 = number of columns in the tabular environment
+%\end{verbatim}
+% If the number of columns specified, then we use a list environment.
+% \begin{macrocode}
+\let\sq@hwdest\@empty % hard-wired destination
+\def\answers@@sq[#1]#2{%
+ \xdef\aeb@numCols{#2}%
+ \ifx\sq@hwdest\@empty
+ \xdef\@qzsolndest{#1}\else
+ \gdef\@qzsolndest{\sq@hwdest}\fi
+ \if\aeb@numCols1\gdef\eq@listType{1}\expandafter\answers@sq@list
+ \else
+ \gdef\eq@listType{0}\expandafter\answers@@sq@tabular
+ \fi{\aeb@numCols}%
+}
+% \end{macrocode}
+% \begin{macro}{\setMClabelsep}
+% \changes{v6.05e}{2006/18/06 v6.05e}
+% {
+% Added control over the separation between the MC label and subsequent text:
+% \cs{setMClabelsep} and \cs{resetMClabelsep}.
+% }
+% \begin{macro}{\resetMClabelsep}
+% \begin{macro}{\eq@hspanner}
+% \begin{macro}{\eq@hspanner@default}
+% Some convenience macros for computing the width of labels. The command \cs{setMClabelsep}
+% can be used to set the separation between the MC label and the beginning of text. The
+% argument for this command is anything that takes up horizontal space. The command sets
+% the value of \cs{eq@hspanner}. The default value % of the separation is given by \cs{eq@hspanner@default}.
+% The default value can be restored by executing \cs{resetMClabelsep}.
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% For the link-style MC question, the default width, \cs{eq@l@l}, of the label is the normalsize width of
+% `(d)'. For a form checkbox or radiobutton bux, the default width, cs{eq@lw@f}, is \cs{RadioFieldSize},
+% normally defined as \texttt{11bp}.
+% \begin{macrocode}
+\def\eq@l@l{\normalsize\normalfont(d)}
+\def\eq@lw@f{\kern\RadioFieldSize\eq@hspanner}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% This macro will pick up the arguments of the \cs{Ans} command.
+%\begin{verbatim}
+% [#1] = points to be awarded if problem is false (partial credit)
+% #2 = 1 (for true) or 0 (for false)
+%\end{verbatim}
+% In a list, each time the \cs{item} is executed, \cs{@Ans}
+% is executed as the default label.
+%
+% These parameters are saved in the commands \cs{eq@pPTs} and
+% \cs{Ans@choice}.
+% \begin{macrocode}
+\@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}
+% \end{macrocode}
+% Answers environment for a list environment.
+% \begin{macrocode}
+\newenvironment{answers@sq@list}[1]
+{%
+ \ifx\aeb@answerType\eq@r
+ \let\endanswers\endanswers@sq@list\else
+ \let\endmanswers\endanswers@sq@list\fi
+ \list{\strut\@Ans}{%
+ \if\sqstar*\relax
+ \settowidth{\labelwidth}{\eq@lw@f}\else
+ \settowidth{\labelwidth}{\eq@lw@l}\fi
+% \end{macrocode}
+% (2013/05/17) Incorporated \cs{aboveanswersSkip} into \cs{topsep}
+% \begin{macrocode}
+ \setlength{\topsep}{-\parskip+\aboveanswersSkip}%
+ \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}%
+% \end{macrocode}
+% (2014/04/05) Added a specification for \cs{itemsep} so that the
+% \cs{rowsep} acts identically for tabular and list.
+% \begin{macrocode}
+ \setlength{\itemsep}{0pt}\setlength{\partopsep}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+% \end{macrocode}
+% (2013/05/17) When inside the parts environment in tabular-mode,
+% we need to add in \cs{eqemargin}. For \textsf{exerquiz} defaults
+% to 0pt; when \textsf{eqexam} is used, it has a nonzero value.
+% \begin{macrocode}
+ \ifnum\exerwparts@cols>1\relax
+ \ifx\itsExerParts\eq@YES % dps17
+ \setlength{\leftmargin}{\labelwidth}\else
+ \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi
+ \else
+% \end{macrocode}
+% (2013/05/17) Some adjustments depending on whether \cs{solutionparshape}
+% is empty or not. If empty, \cs{leftmargin} is its usual value; otherwise
+% we add in \cs{eqemargin} (0pt in \textsf{exerquiz}, nonzero in \textsf{eqexam}).
+% \begin{macrocode}
+ \ifx\solutionparshape\@empty
+ \setlength{\leftmargin}{\labelwidth}\else
+ \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi\fi
+% \end{macrocode}
+% (2013/10/10) I'm changing the \cs{labelsep}, one definition for \texttt{eqexam}
+% another for \texttt{exerquiz}.
+% to the following.
+% \begin{macrocode}
+%</package|eqexam>
+%<package> \setlength{\labelsep}{0pt}%
+%<package>% \settowidth{\labelsep}{\eq@hspanner}%
+%<eqexam> \setlength{\labelsep}{0pt}%
+%<*package|eqexam>
+ \def\Ans{\Ans@list}%
+ }%
+}%
+{\endlist\setcounter{quizno}{0}\eq@answersEndHook}
+% \end{macrocode}
+% Answers environment for a tabular environment. This command picks
+% up the arguments of \cs{Ans}, then passes on the \cs{@Ans}
+%\begin{verbatim}
+% [#1] = points to be awarded if problem is false (partial credit)
+% #2 = 1 (for true) or 0 (for false)
+%\end{verbatim}
+% These parameters are saved in the commands \cs{eq@pPTs} and
+% \cs{Ans@choice}.
+% \begin{macrocode}
+\newcommand\Ans@tabular[2][0]{\gdef\eq@pPTs{#1}%
+ \xdef\Ans@choice{#2}\leavevmode\@Ans
+}
+% \end{macrocode}
+% (2013/05/17) \DescribeMacro{\sqtabsep} sets the \cs{tabsep} between columns.
+% \DescribeMacro{\sqTabPos} \cs{sqTabPos} allows you to set the positioning
+% optional parameter (t,c,b) on the tabular env. The default is no optional parameter.
+% \begin{macrocode}
+\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\else\par\vskip-\parskip\vspace{\aboveanswersSkip}\fi
+ \ifinner % dps17
+ \ifx\itsExerParts\eq@YES\par\removelastskip
+ \removelastparskip\vskip\aboveanswersSkip\fi
+ \else\par\removelastskip\removelastparskip
+ \vskip\aboveanswersSkip\fi
+% \end{macrocode}
+% (2013/05/17) If within a parts environment in tabular mode, the tab env
+% needs to be shifted over by an amount of \cs{eqemargin}, for
+% \textsf{exerquiz} this is 0pt, nonzero for \textsf{eqexam}.
+% \begin{macrocode}
+ \noindent\ifnum\exerwparts@cols>1\relax\parshape=0\fi
+ \tabcolsep=0pt
+% \end{macrocode}
+%\begin{verbatim}
+% n=#1
+% width=(\linewidth-2*(n-1)*\tabcolsep)/n
+%\end{verbatim}
+% In the next line, we adjust \cs{linewidth}, \cs{eqemargin} is \texttt{0pt}
+% in \textsf{exerquiz} and nonzero otherwise.
+% \begin{macrocode}
+% \setlength{\linewidth}{\linewidth-\eqemargin}%
+ \eq@tmpdima=\linewidth
+ \@tempcnta#1\relax
+% n-1
+ \advance\@tempcnta-1\relax
+% 2(n-1)
+ \multiply\@tempcnta by2
+ \@tempdima\sq@tabsep\relax
+% 2*(n-1)*\eq@partstabcolsep
+ \multiply\@tempdima\@tempcnta
+% \linewidth-(n-1)*\sq@tabsep
+ \advance\eq@tmpdima-\@tempdima
+% (\linewidth-(n-1)*\sq@tabsep)/n
+ \divide\eq@tmpdima by#1
+ \def\Ans{\Ans@tabular}%
+ \tabcolsep\sq@tabsep\relax
+% \end{macrocode}
+% (2013/05/17) We allow the position argument (t,b,c). It changed
+% through \cs{sqTabPos} defined above.
+% \begin{macrocode}
+ \expandafter\tabular\sq@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}}%
+% \end{macrocode}
+% \changes{v7.4}{2015/03/23}{added \cmd{\reset@doendpe}}
+% \DescribeMacro{\reset@doendpe} attempts to restore the \cs{parshape}
+% following a list environment. It appears in several locations, includeing
+% \cs{endanswers}, \cs{endmanswers}, and \cs{setTabulrSolnEnv}.
+% \par\medskip\noindent We begin by saving the core definition of \cs{@doendpe},
+% it is restored after each usage of \cs{reset@doendpe}.
+% \begin{macrocode}
+\let\eq@save@doendpe\@doendpe
+% \end{macrocode}
+% The argument \texttt{\#1} consists of the \cs{parshape} parameters to be restored
+% following the closing of any environment that uses \cs{doendpe}
+% \begin{macrocode}
+\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
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macro}{\endanswers}
+% Close off \texttt{tabular} environment, and reinitialize the
+% \texttt{quizno} counter. Added \cs{answersEndHook}.
+% \begin{macrocode}
+\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
+% \removelastparskip
+ \vspace{\aboveanswersSkip}\@endpetrue\fi
+}
+\def\endmanswers@sq{\endtabular\setcounter{quizno}{0}%
+ \eq@answersEndHook\reset@doendpe{\the\everypar}%
+ \ifinner\else%\par
+ \removelastskip
+% \removelastparskip
+ \vspace{\aboveanswersSkip}\@endpetrue\fi
+}
+\def\popiiictm{\special{CTM: pop pop pop}}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Link Style}
+% \begin{macro}{\Ans@sq@l}
+% For the link multiple choice type question. The driver independent stuff starts
+% here, then goes to |\Ans@sq@l@driver| the rest of the code that depends on the
+% driver.
+% \begin{macrocode}
+\def\sqWrongRespJS{OnBlurRespBox( false, "\oField" );}
+\def\sqRightRespJS{OnBlurRespBox( true, "\oField" );}
+\def\Ans@sq@l@Actions
+{%
+ \A{\if\Ans@choice1
+ \JS{\sqRightRespJS}
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@solutionsafter\else
+ /Next <</S/GoTo/D(\@qzsolndest)>>
+ \fi
+ \fi
+ \else
+ \JS{\sqWrongRespJS\jsR
+ \ifx\oField\@empty\else
+ updateTally("\oField.\thequestionno");
+ \fi}%
+ \fi
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\def\linkContentFormat{\alph{quizno}}
+\def\aebChoiceAltFmt{\noexpand\ifaebshowgrayletters
+ \Alph{quizno}\noexpand\else\linkContentFormat\noexpand\fi}
+%</package>
+%<*eqexam>
+\def\aebChoiceAltFmt{\noexpand\ifaebshowgrayletters
+ \Alph{quizno}\noexpand\else\linkContentFormat\noexpand\fi}
+\def\linkContentFormat{%
+ \if\probstar*\Alph{quizno}\else\alph{quizno}\fi}
+%</eqexam>
+%<*package|eqexam>
+\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
+%</package|eqexam>
+%<*eqexam>
+ \Ans@sq@l@driver
+%</eqexam>
+%<*package>
+ \set@@Link{}{}{}%
+ {\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}}
+ {\eq@protect\A}{\eq@setWidgetProps\setLink@driver}%
+ {\set@LinkTextDefaults\Ans@sq@l@Actions\every@Link}%
+ \Ans@proofing{\eq@tmpdima}%
+%</package>
+%<*package|eqexam>
+\eq@hspanner\ignorespaces}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \begin{macro}{\Ans@ck@sq@l}
+% Created in support of eqExam to give multiple selection for the
+% online and email options. Otherwise, it defaults to a radio button field.
+% \begin{macrocode}
+\def\Ans@ck@sq@l{\Ans@ck@sq@f}
+%</package>
+%<*eqexam>
+% dps 4/16/05
+\let\Ans@ck@sq@l\Ans@sq@l
+%</eqexam>
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Form Style}
+% \begin{macro}{\Ans@sq@f}
+% For the link multiple choice type question. The driver independent stuff starts
+% here, then goes to |\Ans@sq@f@driver| the rest of the code that depends on the
+% driver.
+% \changes{v7.7d}{2015/11/15}{Changed mc.\cs{oFields} so it is printable}
+% \begin{macrocode}
+\def\@@Ans@sq@f@Defaults
+{%
+ \BC{0 0 0}\Ff{\FfNoToggleToOff}\W{1}
+ \F{\FPrint}\textSize{12}\textColor{0 g}
+}
+% \end{macrocode}
+% For short quizzes, refine the type of responses: turn off the alert
+% message (the default is on); or have a (red) `\texttt{x}' make an
+% incorrect answer, and a (green) check mark a correct answer.
+% \begin{macrocode}
+\def\sqTurnOffAlerts{\let\@sqTurnOffAlerts\eq@Zero}
+\def\sqTurnOnAlerts{\let\@sqTurnOffAlerts\eq@One}
+\sqTurnOnAlerts
+% \end{macrocode}
+% This feature was discontinued sometime between version 5.x and 6.x.
+% \begin{macrocode}
+\def\sqNoCorrections{\let\@sqAlertsOnly\eq@One}
+\def\sqCorrections{\let\@sqAlertsOnly\eq@Zero}
+\sqNoCorrections
+% \end{macrocode}
+% The actions for the form version of a multiple choice question of a \texttt{shortquiz}.
+% \begin{macrocode}
+\def\Ans@sq@f@Actions
+{%
+ \A{\if\Ans@choice\eq@One
+ \JS{%
+% \end{macrocode}
+%\changes{v6.7d}{2013/05/27}{removed JS control of checks and color, they
+% are hardwired instead.}
+% \begin{macrocode}
+ \if\@sqTurnOffAlerts1OnBlurRespBox(true,"\oField");\jsR\fi
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@solutionsafter\else
+ jmpToNamedDest("\oField","\@qzsolndest",%
+\if\@sqTurnOffAlerts00\else1\fi);\fi
+ \fi}%
+ \else
+ \JS{%
+ \if\@sqTurnOffAlerts1OnBlurRespBox( false, %
+"\oField" );\jsR\fi
+ \ifx\oField\@empty\else
+ updateTally("\oField.\thequestionno");
+ \fi}%
+ \fi%
+ }%
+ \AA{\AAMouseDown{\JS{%
+ updateTally.downState=!!event.target.isBoxChecked%
+(\arabic{quizno}-1);}}}%
+}
+\def\Ans@proofing
+#1{%
+ \ifeq@proofing\if\Ans@choice1\relax
+ \llap{\@proofingsymbol\,\hskip#1\relax}%
+ \fi\fi
+}
+% \end{macrocode}
+%\DescribeMacro{\sqRghtSymbChoice}\DescribeMacro{\sqRghtSymbColor} for the \texttt{shortquiz}
+% environment, these first two commands assign the right symbol (default check) and
+% color (default webgreen). The second two\DescribeMacro{\sqWrngSymbChoice}\DescribeMacro{\sqWrngSymbColor}
+% does the same thing for the wrong answer.
+% \begin{macrocode}
+\def\sqRghtSymbChoice#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \edef\sq@corrsymch{\sqRghtSymbChoiceDef}\else
+ \edef\sq@corrsymch{#1}\fi}
+\def\sqRghtSymbColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
+ \edef\sq@corrsymcol{\sqRghtSymbColorDef}\else
+ \edef\sq@corrsymcol{#1}\fi}
+\def\sqWrngSymbChoice#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \edef\sq@wrgsymch{\sqWrngSymbChoiceDef}\else
+ \edef\sq@wrgsymch{#1}\fi}
+\def\sqWrngSymbColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
+ \edef\sq@wrgsymcol{\sqWrngSymbColorDef}\else
+ \edef\sq@wrgsymcol{#1}\fi}
+\def\sqRghtSymbChoiceDef{check}
+\def\sqRghtSymbColorDef{0 .6 0 rg}
+\def\sqWrngSymbChoiceDef{cross}
+\def\sqWrngSymbColorDef{1 0 0 rg}
+\edef\sq@corrsymch{\sqRghtSymbChoiceDef}
+\edef\sq@corrsymcol{\sqRghtSymbColorDef}
+\edef\sq@wrgsymch{\sqWrngSymbChoiceDef}
+\edef\sq@wrgsymcol{\sqWrngSymbColorDef}
+\def\sqResetSymbToDef{%
+ \sqRghtSymbChoice{}\sqRghtSymbColor{}%
+ \sqWrngSymbChoice{}\sqWrngSymbColor{}%
+}
+% \end{macrocode}
+%\DescribeMacro{\qChoiceSymb}\DescribeMacro{\qChoiceColor} for the \texttt{quiz}
+% environment, these two commands assign the selection symbol (default check) and the
+% color (default webgreen).
+% \begin{macrocode}
+\def\qChoiceSymb#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \edef\qz@chksymb{\qChoiceSymbDef}\else
+ \edef\qz@chksymb{#1}\fi}
+\def\qChoiceColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
+ \edef\qz@chksymbcol{\qChoiceColorDef}\else
+ \edef\qz@chksymbcol{#1}\fi}
+\def\qChoiceSymbDef{check}
+\def\qChoiceColorDef{0 0 0 rg}
+\edef\qz@chksymb{\qChoiceSymbDef}
+\edef\qz@chksymbcol{\qChoiceColorDef}
+%</package>
+%<*package|eqexam>
+\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
+%</package|eqexam>
+% \end{macrocode}
+%\changes{v6.7d}{2013/05/27}{added \cs{rbf@Opts} to hardwire choices.}
+% \begin{macrocode}
+%<*package>
+ \if\Ans@choice\eq@One
+ \def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
+ \textColor{\sq@corrsymcol}}\else
+ \def\rbf@Opts{\symbolchoice{\sq@wrgsymch}%
+ \textColor{\sq@wrgsymcol}}\fi
+%</package>
+%<*package|eqexam>
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \eq@tmpdima=\wd\eq@tmpbox%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \insertGrayLetters % 6.3d
+%</package|eqexam>
+%<*eqexam>
+ \Ans@sq@f@driver
+%</eqexam>
+%<*package>
+% \end{macrocode}
+%\changes{v6.7d}{2013/05/27}{new \cs{rbf@Opts} option.}
+% \begin{macrocode}
+ \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}%
+ {mc.\oField.\thequestionno}%
+ {\RadioFieldSize}% 11/16/05 changed from \oField to mc.\oField
+ {\RadioFieldSize}{\Ans@choice\alph{quizno}}{\eq@protect\A}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\@@Ans@sq@f@Defaults\Ans@sq@f@Actions\every@RadioButton
+ \every@sqRadioButton}}%
+ \Ans@proofing{\RadioFieldSize}%
+%</package>
+%<*package|eqexam>
+\eq@hspanner\ignorespaces}
+%</package|eqexam>
+%<*package>
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Ans@ck@sq@f}
+% Created in support of \textsf{eqExam} to give multiple selection for the
+% online and email options. Otherwise, it defaults to a radio button field.
+% \begin{macrocode}
+%
+%</package>
+%<*eqexam>
+% dps 4/16/05
+\let\Ans@ck@sq@f\Ans@sq@f
+%</eqexam>
+%<*package>
+\def\@@Ans@ck@sq@f@Defaults
+{%
+ \BC{0 0 0}\Ff{\FfNoToggleToOff}
+ \F{\FPrint}\textSize{12}\textColor{0 g}\W{1}
+}
+\begingroup
+\catcode`\&=12
+\gdef\eq@AND{&&}
+\endgroup
+\def\Ans@ck@sq@f@Actions
+{%
+ \A{\if\Ans@choice1%
+ \JS{%
+var fName=event.target.name;\jsR
+var g=this.getField("mc.\oField.\thequestionno");\jsR
+var a=g.getArray();\jsR
+for (var i=0; i<a.length; i++)\jsR\jsT
+ if ( a[i].isBoxChecked(0) \eq@AND\space
+a[i].value.charAt(0)==0)\jsR\jsT\jsT
+ a[i].checkThisBox(0,false);\jsR
+ \if\@sqTurnOffAlerts1OnBlurRespBox( %
+ true, "\oField" );\jsR\fi
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@solutionsafter\else
+% if all correct answers are check, jump to solution
+for (var i=0; i<a.length; i++){\jsR\jsT
+ if ( a[i].exportValues[0].charAt(0)==1 \eq@AND\space
+!a[i].isBoxChecked(0) )\jsR\jsT\jsT
+ break;\jsR
+}\jsR
+ if (i>=a.length) jmpToNamedDest("\oField","\@qzsolndest",%
+ \if\@sqTurnOffAlerts00\else1\fi);
+ \fi
+ \fi}%
+ \else%
+ \JS{%
+var fName=event.target.name;\jsR
+var g=this.getField("mc.\oField.\thequestionno");\jsR
+var a=g.getArray();\jsR
+for (var i=0; i<a.length; i++)\jsR
+{\jsR\jsT
+ if (a[i].value.charAt(0)==0) {\jsR\jsT\jsT
+ if ( fName != a[i].name )\jsR\jsT\jsT\jsT
+ a[i].checkThisBox(0,false);\jsR\jsT
+ }\jsR
+}\jsR
+ \if\@sqTurnOffAlerts1OnBlurRespBox( false, "\oField" );\fi%
+ \ifx\oField\@empty\else%
+ updateTally("\oField.\thequestionno");
+ \fi}%
+ \fi%
+ }%
+ \AA{\AAMouseDown{%
+\JS{updateTally.downState=!!event.target.isBoxChecked(0);}}}
+}
+\def\Ans@ck@sq@f{%
+ \if\eq@listType\eq@One\stepcounter{quizno}\else
+ \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
+ {\ifwithsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi\PBS\raggedright
+ \if\Ans@choice1%
+ \def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
+ \textColor{\sq@corrsymcol}}\else
+ \def\rbf@Opts{\symbolchoice{\sq@wrgsymch}%
+ \textColor{\sq@wrgsymcol}}\fi
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \eq@tmpdima=\wd\eq@tmpbox%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \insertGrayLetters % 6.3d
+ \mbox{\expandafter\check@@Box\expandafter{\rbf@Opts}%
+ {mc.\oField.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}
+ {\Ans@choice\alph{quizno}}{\eq@protect\A}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\@@Ans@ck@sq@f@Defaults\Ans@ck@sq@f@Actions\every@CheckBox
+ \every@sqCheckBox}}%
+ \Ans@proofing{\RadioFieldSize}%
+\eq@hspanner\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+% \subsection{For \texttt{quiz}}
+% \subsubsection{The \texttt{answers} and \texttt{manswers} Environment}
+% \begin{macro}{answers}
+% This is the answers environment for the \texttt{quiz}
+% environment. The \texttt{quiz} environment states
+% \verb+\let\answers=\answers@q+. This is to avoid a conflict
+% with \texttt{shortquiz}, which also as an \texttt{answers}
+% environment.
+%
+% The following parameters are recognized:
+%\begin{verbatim}
+% [#1]|* = named destination to be associated with solution;
+% with *, the destination is automatically generated
+% #2 = number of columns in the tabular environment
+%\end{verbatim}
+% If the number of columns is $1$, then we use a list environment,
+% else, we use a tabular environment.
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+\newskip\aboveanswersSkip
+\setlength\aboveanswersSkip{3pt}
+%</package|eqexam>
+%<*package>
+\let\q@hwdest\@empty % hard-wired destination
+\let\pointValuesArray\@empty
+\newif\ifeqshowmarkup\eqshowmarkupfalse
+\newif\ifeqshowOutOf \eqshowOutOffalse
+\def\showOutOfinSmryTbl{false}
+\def\eq@recordThesePTs{%
+ \ifx\pointValuesArray\@empty
+ \edef\ptsValue{\showOutOfinSmryTbl,\eqPTs}\else
+ \edef\ptsValue{,\eqPTs}\fi
+ \expandafter\g@addto@macro\expandafter\pointValuesArray
+ \expandafter{\ptsValue}}
+% \end{macrocode}
+% \changes{v7.7m}{2016/07/04}{Added \string\texttt{ptypeArray} to track problem types better}
+% \begin{macrocode}
+\let\ptypeArray\@empty
+\def\eq@recordProbType{%
+ \ifx\ptypeArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\ptypeArray{null,"\eqQT"}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\ptypeArray{,"\eqQT"}}\fi
+ \tmp@exp
+}
+\let\corrAnsArray\@empty
+\def\eq@recordCorrAns#1{%
+ \ifx\corrAnsArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\corrAnsArray{null,#1}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\corrAnsArray{,#1}}\fi
+ \tmp@exp
+}
+\def\aeb@answerType@r{r}
+\def\aeb@answerType@c{c}
+\newcommand\answers@q{%
+ \eq@AddProbToQzQuesList
+ \def\aeb@answerType{r}\setdefault@Ans\eq@recordThesePTs
+ \eq@recordProbType
+ \addtocounter{eqpointvalue}{\eqPTs}\stepcounter{questionno}%
+ \def\aeb@thisType{"mc"}\@ifnextchar[{\answers@@q}%
+ {\@ifstar{\answers@@q[\curr@quiz.\thequestionno]}{\answers@@q[]}}%
+}
+\def\answers@@q[#1]#2{\global\let\eq@ansChoiceArray\@empty
+ \xdef\aeb@numCols{#2}\edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,\aeb@thisType]}%
+ \ifx\q@hwdest\@empty
+ \xdef\@qzsolndest{#1}\else
+ \gdef\@qzsolndest{\q@hwdest}\fi
+ \ifnum\aeb@numCols=1
+ \gdef\eq@listType{1}\expandafter\answers@q@list\else
+ \gdef\eq@listType{0}\expandafter\answers@q@tabular\fi{\aeb@numCols}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{manswers}
+% The \texttt{manswers} environment is used for multiple selection questions for the quiz
+% environment only. Within this environment, the \cs{Ans} command (\cs{@Ans} actually) is let equal to
+% \cs{Ans@ck@f} or \cs{Ans@ck@l} for forms or links respectively. These commands are defined
+% in the sections that follow.
+% \changes{v6.2}{2007/11/08 }
+%{
+% Added the \texttt{manswers} environment, and supporting elements, both {\LaTeX}
+% and JavaScript. This \texttt{manswers} environment is for the \texttt{quiz} environment
+% only. There is a \texttt{manswers} environment for the \texttt{shortquiz} environment, but
+% this is used by \textsf{eqExam} only.
+%}
+%
+% The following parameters are recognized
+%\begin{verbatim}
+% [#1]|* = named destination to be associated with solution;
+% with *, the destination is automatically generated
+% #2 = number of columns in the tabular environment
+%\end{verbatim}
+% \begin{macrocode}
+\newcommand\manswers@q
+{%
+ \eq@AddProbToQzQuesList
+ \def\aeb@answerType{c}\@setFormLinkType
+ \global\expandafter\let\expandafter\@Ans
+ \expandafter=\csname Ans@ck@\@@quiztype\endcsname
+ \eq@recordThesePTs\eq@recordProbType
+ \addtocounter{eqpointvalue}{\eqPTs}\stepcounter{questionno}%
+ \def\aeb@thisType{"ms"}\@ifnextchar[{\answers@@q}%
+ {\@ifstar{\answers@@q[\curr@quiz.\thequestionno]}{\answers@@q[]}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\newenvironment{answers@q@list}[1]{%
+ \ifx\aeb@answerType\eq@r
+ \let\endanswers\endanswers@q@list\else
+ \let\endmanswers\endanswers@q@list\fi
+ \list{\strut\@Ans}{%
+ \if\qstar*\relax
+ \if\aeb@FLOverride\eq@l
+ \settowidth{\labelwidth}{\eq@lw@l}\else
+ \settowidth{\labelwidth}{\eq@lw@f}\fi
+ \else
+ \if\aeb@FLOverride\eq@f
+ \settowidth{\labelwidth}{\eq@lw@f}\else
+ \settowidth{\labelwidth}{\eq@lw@l}\fi
+ \fi
+ \setlength{\topsep}{-\parskip+\aboveanswersSkip}%
+ \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{0pt}%
+ \def\Ans{\Ans@list}%
+ }%
+}{\endlist\setcounter{quizno}{0}%
+ \eq@answersEndHook
+ \setdefault@Ans
+ \ifx\aeb@answerType\aeb@answerType@r
+% \end{macrocode}
+% If this is a MC question, we record the author's correct answer
+% \begin{macrocode}
+ \eq@recordCorrAns{\eq@ansChoiceArray}\ifwithinMCFI
+% \end{macrocode}
+% If within a \cs{bMCFI}/\cs{eMCFI} command pair, we also record
+% the author's correct answer.
+% \begin{macrocode}
+ \eq@recordCorrAns{\s@veCorrAnsMCFI}\fi\else
+% \end{macrocode}
+% If this is a MS question, we record the author's correct answer as an array
+% \begin{macrocode}
+ \eq@recordCorrAns{[\eq@ansChoiceArray]}\fi
+ \global\let\eqlimselTo\@empty
+}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand\qztabsep[1]{\def\eq@argi{#1}\ifx\eq@argi\@empty
+ \def\qz@tabsep{1.5pt}\else\def\qz@tabsep{#1}\fi}
+\qztabsep{1.5pt}
+\def\qzTabPos#1{\def\qz@TabPos{[#1]}}\qzTabPos{}
+\def\answers@q@tabular#1{%
+ \ifinner\else\par\removelastparskip\vspace{\aboveanswersSkip}\fi
+ \eq@tmpdima=\linewidth
+ \@tempcnta#1\relax
+% n-1
+ \advance\@tempcnta-1\relax
+% 2(n-1)
+ \multiply\@tempcnta by2
+ \@tempdima\qz@tabsep\relax
+% 2*(n-1)*\qz@tabsep
+ \multiply\@tempdima\@tempcnta
+% \linewidth-(n-1)*\qz@tabsep
+ \advance\eq@tmpdima-\@tempdima
+% (\linewidth-(n-1)*\qz@tabsep)/n
+ \divide\eq@tmpdima by#1
+% \begin{macrocode}
+ \tabcolsep\qz@tabsep\relax
+ \def\Ans{\Ans@tabular}%
+ \ifx\aeb@answerType\eq@r
+ \let\endanswers\endanswers@q@tabular\else
+ \let\endmanswers\endanswers@q@tabular\fi
+ \noindent\expandafter
+ \tabular\qz@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}%
+}
+% \end{macrocode}
+% \begin{macro}{\endanswers}
+% Again, we put \verb+\let\endanswers=\endanswers@q+.
+% \begin{macrocode}
+\def\endanswers@q@tabular
+{%
+ \endtabular\setcounter{quizno}{0}%
+ \eq@answersEndHook
+ \setdefault@Ans
+ \ifx\aeb@answerType\aeb@answerType@r
+% \end{macrocode}
+% If this is a MC question, we record the author's correct answer
+% \begin{macrocode}
+ \eq@recordCorrAns{\eq@ansChoiceArray}\ifwithinMCFI
+% \end{macrocode}
+% If within the MCFI command pair, we record the author's fill-in as well.
+% \begin{macrocode}
+ \eq@recordCorrAns{\s@veCorrAnsMCFI}\fi\else
+% \end{macrocode}
+% If this is a MS question, we record the author's correct answer as an array
+% \begin{macrocode}
+ \eq@recordCorrAns{[\eq@ansChoiceArray]}\fi
+ \global\let\eqlimselTo\@empty
+}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Link Style}
+% \begin{macro}{\Ans@l}
+% For the forms version of the \texttt{quiz} environment.
+% dps 12/19/03 removed the notify because we are not embedding a radio button field
+% \begin{macrocode}
+\let\qRadionActionsHook\@empty
+\def\Ans@@l@Actions{\A{\JS{%
+ this.getField("mc.\curr@quiz.\thequestionno").value
+ = "\Ans@choice\alph{quizno}";\jsR
+ RecordPointValue([0,\eqPTs,\eq@pPTs],\thequestionno);\jsR
+ RecordProblemType("\eqQT",\thequestionno);\jsR
+ ProcessQuestion(\Ans@choice,"\alph{quizno}",\thequestionno,%
+\arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+"\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+\ifeq@noquizsolutions\else,1\fi\fi\fi);\qRadionActionsHook}}%
+}
+\def\Ans@r@l@Defaults
+{%
+ \BC{}\S{S}\W{1}\Ff{\FfNoToggleToOff}\F{\FPrint}
+ \textSize{12}\textColor{0 g}\Ff{\FfReadOnly}
+}
+\def\Ans@l{\leavevmode\if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi\PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \eq@tmpdima=\wd\eq@tmpbox
+ \def\link@@Content{(\hfil\linkContentFormat\hfil)}%
+% begin dps changes 12/19/03
+% \end{macrocode}
+% (2013/10/24) Imperative that radio button has no boundary line.
+% \begin{macrocode}
+ \def\late@options{\BC{}}%
+\if\Ans@choice1\relax\eq@recordAnsChoice\fi
+ \makebox[0pt][l]{\radio@@Button{}{mc.\curr@quiz.\thequestionno}%
+ {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@r@l@Defaults\every@RadioButton
+ \every@qRadioButton\late@options}}%
+% end dps changes 12/19/03
+ \set@@Link{}{}{}%
+ {\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}}%
+ {\eq@protect\A}{\eq@setWidgetProps\setLink@driver}%
+ {\set@LinkTextDefaults\Ans@@l@Actions\every@Link}%
+ \ifnocorrections\else
+ \if\Ans@choice1\relax
+ \edef\Ans@c@l@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty
+ \noexpand\Ff{\FfReadOnly}%
+ \else % there is a solution
+ \ifeq@noquizsolutions
+ \noexpand\Ff{\FfReadOnly}%
+ \else
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}%
+ \fi
+ \fi
+ }%
+ \else
+ \def\Ans@c@l@Choice{\Ff{\FfReadOnly}\BC{}}%
+ \fi
+ \def\late@options{\BC{}}%
+ \if\Ans@choice1\relax
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@noquizsolutions\else
+ \edef\late@options{\noexpand\BC{\solution@Color}}%
+ \fi
+ \fi
+ \fi
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\eq@tmpdima}{0pt}{Yes}{}% \@tempdimb
+ {\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@c@f@Defaults\Ans@c@l@Choice\every@RadioButton
+ \every@qRadioButton\late@options}}%
+ \fi
+ \Ans@proofing{\eq@tmpdima}%
+\eq@hspanner\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+% Now for the code to support the \texttt{manswers} environment for link style.
+% \begin{macro}{\Ans@ck@l}
+% Below is \cs{Ans@ck@l} and its supporting default appearances and actions. The command \cs{Ans@ck@l} defines
+% a checkbox, on top of that a link (that the user interacts with) and on top another check box.
+% \begin{macrocode}
+\def\Ans@ck@@l@Actions{\A{\JS{%
+ var ckfName="mck.\curr@quiz.\thequestionno.\arabic{quizno}";\jsR
+ var ckf = this.getField(ckfName);\jsR
+ ckf.checkThisBox(0,!ckf.isBoxChecked(0));\jsR
+ var _bOK=true;\jsR
+\ifx\eqlimselTo\@empty\else _bOK = LimitSelection(\eqlimselTo,%
+"mck.\curr@quiz.\thequestionno","\arabic{quizno}");\jsR\fi
+if (_bOK) {\jsR\jsT
+ var aPMSretn=ProcessMultiSelection(\Ans@choice,"\alph{quizno}",%
+\thequestionno,\arabic{quizno},"\curr@quiz",\eqPTs,\eq@pPTs);\jsR\jsT
+ RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
+ ProcessQuestion(aPMSretn[0],aPMSretn[1],\thequestionno,%
+\arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+"\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+\ifeq@noquizsolutions\else,1\fi\fi\fi);\jsR
+}
+ }}
+}
+\def\Ans@ck@l@Defaults
+{%
+ \BC{}\S{S}\W{1}\H{N}\Ff{\FfNoToggleToOff}
+ \textSize{12}\textColor{0 g}\Ff{\FfReadOnly}
+}
+\def\Ans@ck@l{%
+ \leavevmode\if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi
+ \if\Ans@choice1\eq@recordAnsChoice\fi\PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \eq@tmpdima=\wd\eq@tmpbox
+ \def\link@@Content{(\hfil\linkContentFormat\hfil)}%
+% begin dps changes 12/19/03
+ \makebox[0pt][l]{%
+ \check@@Box{}{mck.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@ck@l@Defaults\every@RadioButton
+ \every@qckCheckbox}}%
+% end dps changes 12/19/03
+ \set@@Link{}{}{}%
+ {\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}}%
+ {\eq@protect\A}{\eq@setWidgetProps\setLink@driver}%
+ {\set@LinkTextDefaults\Ans@ck@@l@Actions\every@Link}%
+ \ifnocorrections\else
+ \if\Ans@choice1\relax
+ \edef\Ans@c@l@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty\noexpand\BC{}%
+ \noexpand\Ff{\FfReadOnly}%
+ \else % there is a solution
+ \ifeq@noquizsolutions
+ \noexpand\BC{}\noexpand\Ff{\FfReadOnly}%
+ \else
+ \noexpand\BC{\solution@Color}%
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}%
+ \fi
+ \fi
+ }%
+ \else
+ \def\Ans@c@l@Choice{\Ff{\FfReadOnly}\BC{}}%
+ \fi
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\eq@tmpdima}{0pt}{Yes}{}%
+ {\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@c@f@Defaults\Ans@c@l@Choice\every@RadioButton
+ \every@qRadioButton}}%
+ \fi
+ \Ans@proofing{\eq@tmpdima}%
+\eq@hspanner\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Form Style}
+% \begin{macro}{\Ans@f}
+% For the form button multiple choice type question. The driver independent stuff starts
+% here, then goes to |\Ans@f@driver| the rest of the code that depends on the
+% driver.
+% \begin{macrocode}
+\def\Ans@f{\leavevmode\if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi
+ \PBS\raggedright\Ans@@f}
+\def\Ans@r@f@Defaults
+{%
+ \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff}
+ \F{\FPrint}\textSize{12}\textColor{0 g}
+}
+% Action of the radio button field
+\def\Ans@r@f@Actions{\A{\JS{%
+ RecordPointValue([0,\eqPTs,\eq@pPTs],\thequestionno);\jsR
+ RecordProblemType("\eqQT",\thequestionno);\jsR
+ ProcessQuestion(\Ans@choice,"\alph{quizno}",\thequestionno,%
+ \arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+ "\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions\else,1\fi\fi\fi);\qRadionActionsHook}}
+}
+% Action of the check box underlying the radio button field
+\def\quiz@SolutionActionHook{%
+ /S/GoTo/D(\@qzsolndest)/Next<<\JS{this.resetForm(%
+ ["mcq.\curr@quiz.\thequestionno.\arabic{quizno}"]);}>>
+}
+\def\Ans@c@f@Defaults
+{%
+ \BC{0 0 0}\S{S}\W{1}\F{\FHidden}\textSize{12}
+ \textColor{0 g}\symbolchoice{circle}
+}
+% \end{macrocode}
+% \changes{v6.05d}{2007/04/14}
+% {
+% Added the command \cs{insertGrayLetters}. This can be defined to place symbols under
+% the multiple choice form boxes. The command \cs{bottomOfAnsfStack} is there as a
+% hook for whatever purposes are desired.
+% }
+% \begin{macrocode}
+\let\bottomOfAnsfStack\relax
+%</package>
+%<*package|eqexam>
+% \end{macrocode}
+% \changes{v7.7}{2015/06/04}{Added \cs{graylettersColor}}
+% \DescribeMacro\graylettersColor sets the color of the gray letters, the default is
+% \texttt{gray}.
+% \begin{macrocode}
+\providecommand\graylettersColor{gray}
+\def\insertGrayLetters{\ifaebshowgrayletters
+ \rlap{\makebox[\RadioFieldSize]%
+ {\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi}
+%</package|eqexam>
+%<*package>
+\def\Ans@@f
+{%
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \hangindent=\eq@tmplength\hangafter=1
+ \bottomOfAnsfStack\insertGrayLetters
+% dps add
+ \edef\rbf@Opts{\ifaeb@usecircles\else
+ \noexpand\symbolchoice{\qz@chksymb}\fi
+ \noexpand\textColor{\qz@chksymbcol}}%
+ \if\Ans@choice1\eq@recordAnsChoice\fi
+ \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}%
+ {mc.\curr@quiz.\thequestionno}%
+ {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\Ans@r@f@Defaults\Ans@r@f@Actions\every@RadioButton
+ \every@qRadioButton\insert@circlesymbol}}%
+ \let\late@options\@empty
+ \ifnocorrections\else
+ \if\Ans@choice1\relax
+ \edef\Ans@c@f@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty\noexpand\Ff{\FfReadOnly}%
+ \else
+ \ifeq@noquizsolutions
+ \noexpand\Ff{\FfReadOnly}%
+ \else
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}%
+ \fi
+ \fi
+ }%
+ \else
+ \def\Ans@c@f@Choice{\Ff{\FfReadOnly}}%
+ \fi
+% \end{macrocode}
+% \changes{v6.7h}{2013/08/19}{When the \cs{useMCCircles} is used, the boundary
+% color is transparent. We try a fix for this to show the colored solution
+% boundary. The fix uses the \cs{late@options} commands.}
+% \begin{macrocode}
+ \ifaeb@usecircles\def\late@options{\BC{}}\fi
+ \if\Ans@choice1\relax
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@noquizsolutions\else
+ \edef\late@options{\noexpand\BC{\solution@Color}}%
+ \fi
+ \fi
+ \fi
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\Ans@c@f@Defaults\Ans@c@f@Choice\every@CheckBox
+ \every@qCheckBox\late@options}}%
+ \fi
+ \Ans@proofing{\RadioFieldSize}%
+\eq@hspanner\ignorespaces}
+% \end{macrocode}
+% \DescribeMacro{\limitSelectionTo} limits the selection to the number specified
+% by its argument for multiple selection questions.
+% \begin{macrocode}
+\def\limitSelectionTo#1{\def\eqlimselTo{#1}}
+\let\eqlimselTo\@empty
+% \end{macrocode}
+% \begin{macro}{\Ans@ck@f}
+% The support for multiple selection answers within the \texttt{manswers} environment.
+% \begin{macrocode}
+\def\Ans@ck@f{\leavevmode\if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi
+ \if\Ans@choice1\eq@recordAnsChoice\fi
+ \PBS\raggedright\Ans@@ck@f}
+\def\Ans@ck@f@Defaults
+{%
+ \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff}
+ \textSize{12}\textColor{0 g}
+}
+% Action of the radio button field
+\def\Ans@ck@f@Actions
+{%
+ \A{\JS{%
+% \end{macrocode}
+% Here is limit the number of selections. If \cs{eqlimselTo} is nonempty,
+% we call \texttt{LimitSelection()} to count the number of checks in this
+% current field. If too many, we uncheck the current effort and inform the
+% user.
+% \begin{macrocode}
+ var _bOK=true;\jsR
+\ifx\eqlimselTo\@empty\else _bOK = LimitSelection(\eqlimselTo,%
+"mck.\curr@quiz.\thequestionno","\arabic{quizno}");\jsR\fi
+% \end{macrocode}
+% As a result of the previous changes, we make this a condition:
+% if the JavaScript function \texttt{LimitSelection()} returns false, we do not execute. The default
+% value is \texttt{\_bOK=true}.
+% \begin{macrocode}
+if (_bOK) {\jsR\jsT
+ var aPMSretn=ProcessMultiSelection(\Ans@choice,"\alph{quizno}",%
+\thequestionno,\arabic{quizno},"\curr@quiz",\eqPTs,\eq@pPTs);\jsR\jsT
+ RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
+ ProcessQuestion(aPMSretn[0],aPMSretn[1],\thequestionno,%
+\arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+"\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+\ifeq@noquizsolutions\else,1\fi\fi\fi);\jsR
+}}}%
+}
+% Action of the check box underlying the radio button field
+\def\quiz@SolutionActionHook{%
+ /S/GoTo/D(\@qzsolndest)/Next<<\JS{this.resetForm(%
+["mcq.\curr@quiz.\thequestionno.\arabic{quizno}"]);}>>
+}
+% \end{macrocode}
+% \cs{Ans@@ck@f} is the definition of the \cs{Ans} command within the
+% \texttt{manswers} environment.
+% \begin{macrocode}
+\def\Ans@@ck@f
+{%
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \hangindent=\eq@tmplength\hangafter=1
+ \bottomOfAnsfStack\insertGrayLetters
+% \end{macrocode}
+% The bottom most checkbox
+% \begin{macrocode}
+ \bottomOfAnsfStack\insertGrayLetters
+% dps add
+\def\cbf@Opts{\symbolchoice{\qz@chksymb}%
+ \textColor{\qz@chksymbcol}}%
+ \mbox{\expandafter\check@@Box\expandafter{\cbf@Opts}%
+ {mck.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\Ans@ck@f@Defaults\Ans@ck@f@Actions\every@RadioButton
+ \every@qckCheckbox}}%
+ \ifnocorrections\else
+ \if\Ans@choice1\relax
+ \edef\Ans@c@f@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty\noexpand\Ff{\FfReadOnly}%
+ \else
+ \ifeq@noquizsolutions
+ \noexpand\Ff{\FfReadOnly}%
+ \else
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}%
+ \fi
+ \fi
+ }%
+ \else
+ \def\Ans@c@f@Choice{\Ff{\FfReadOnly}}%
+ \fi
+ \let\late@options\@empty
+ \if\Ans@choice1\relax
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@noquizsolutions\else
+ \edef\late@options{\noexpand\BC{\solution@Color}}%
+ \fi
+ \fi
+ \fi
+% \end{macrocode}
+% The top most checkbox
+% \begin{macrocode}
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\Ans@c@f@Defaults\Ans@c@f@Choice\every@CheckBox
+% \end{macrocode}
+% (2012/12/22) Replace \cs{every@qRadioButton} with \cs{every@qCheckBox}.
+% \begin{macrocode}
+ \every@qCheckBox\late@options}}%
+ \fi
+ \Ans@proofing{\RadioFieldSize}%
+\eq@hspanner\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+%<*package|eqexam>
+% \end{macrocode}
+%\subsection{The \texorpdfstring{\protect\cs{bChoices}/\protect\cs{eChoices}}
+% {\textbackslash{bChoices}/\textbackslash{eChoices}} Pair}
+% (2/15/05) This pair of macros is not really an environment, the
+% \cs{eChoices} really does nothing other than to act as an ending marker. The idea
+%behind this pair of macros twofold: (1) To provide a convenient way of listing
+%alternate choices for a multiple choice questions, the ``environment'' makes it
+%easy to change the number of columns, or to change from tabular to list (or visa-versa);
+%(2) Laying out the alternatives in a list style, makes it easy to develop techniques
+%of randomizing the alternatives. Here is an example of usage:
+%\begin{verbatim}
+%\begin{answers}{4}
+%\bChoices[2]
+% \Ans0 a choice\eAns
+% \Ans1 another choice\eAns
+% \Ans0 still another choice\eAns
+% \Ans0 another\eAns
+% \Ans0 incoming\eAns
+% \Ans0 more choices\eAns
+% \Ans0 another still\eAns
+% \Ans0 too many\eAns
+% \Ans0 choices\eAns
+%\eChoices
+%\end{answers}
+%\end{verbatim}
+%\noindent The argument of the \texttt{answers} environment is $4$ which means we are
+%going to use the tabular environment with $4$ columns. Now within those $4$ we are going
+%to only use the first $2$ columns ( this is the optional argument of \cs{bChoices}.
+%
+% If the optional argument is removed from \cs{bChoices}, the choices are typeset
+% in the with $4$ columns. If the argument of \cs{answers} is changed to $1$, then the
+% optional argument of \cs{bChoices} is ignored, and the alternatives are typeset in a
+% one column list environment.
+%
+% By changing the two parameters (one for \cs{answers} and one for \cs{bChoices})
+% you can easily modify how the alternatives are typeset.
+%\par\medskip\noindent
+% This counter tracts the column number we are in.
+% \begin{macrocode}
+\newcount\eq@tabColCnt
+% \end{macrocode}
+% \begin{macro}{\bChoices}
+% This command has one optional argument, the number of columns to use.
+%
+% When the answer environment sets the number of columns, the answers are set in
+% tabular form. If you say \verb!\begin{answers}[4]!, four columns are used.
+% If you then say \IndexKey{nCols}\verb!\Choices[nCols=2]!, only the first two columns are used.
+% To maintain backward compatibility, you can also say \verb!\Choices[2]!
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% The number of columns specified in the answers environment is saved as the value
+% of \cs{aeb@numCols}. This the default value of \cs{bChoiceNumCols}.
+% \begin{macrocode}
+\def\bChoiceNumCols{\aeb@numCols}
+% \end{macrocode}
+% This is the definition of the random key\IndexKey{random}, a boolean.
+% \begin{macrocode}
+\define@key{bchoice}{random}[true]{%
+ \csname if#1\endcsname\eq@randomizeChoicestrue
+ \else\eq@randomizeChoicesfalse\fi
+}
+% \end{macrocode}
+% \changes{v6.3x}{2011/04/05}{%
+% Added \texttt{label} parameter to \cs{bChoices}.
+%}
+% A new key, \IndexKey{label}\texttt{label}, if this label is specified, then we keep track of all the
+% correct alternatives, put them into a commands to make them accessible by the user.
+% \begin{macrocode}
+\define@key{bchoice}{label}[]{\xdef\bChoiceLabel{#1}}
+% \end{macrocode}
+% The \cs{bChoices} command is now processed by the \texttt{keyval} package. There
+% are two keys: \texttt{nCols} and \texttt{random}. The first key
+% sets the number of columns we are limited to; the second one obviously declares
+% that this list of choices should be randomized, a boolean. The \texttt{random}
+% key is ignored unless the document author has use the \texttt{allowrandomize} option.
+% \begin{macrocode}
+\def\bChoices{\@ifnextchar[{\@ansChoices}{\@ansChoices[\aeb@numCols]}}
+% \end{macrocode}
+% If \cs{numCols} is $1$, we use a list environment, otherwise, a tabular is used.
+% \begin{macrocode}
+\def\@ansChoices[#1]%
+{%
+% \end{macrocode}
+% We initialize some variables that the new label option uses.
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% \end{macro}
+% If the next token is \cs{Ans} we grab its all stuff between
+% \cs{Ans} and \cs{eAns} and typeset it. We continue until the
+% next token is not \cs{Ans}. (This last token
+% should be \cs{eChoices}.)
+% \begin{macrocode}
+\def\@layoutListAns{\@ifnextchar\Ans{\@getListAns}%
+ {\@lookforendansChoices{\@layoutListAns}}%
+}
+% \end{macrocode}
+% \changes{v6.3x}{2011/04/05}{%
+% Supporting commands that use the value of the \texttt{label} parameter
+% of \cs{bChoices}: \cs{eq@saveAns}, \cs{eq@displayAns}, \cs{eq@displayAlts}, etc.
+%}
+% \texttt{4/5} We begin an experimental series of commands. The idea is to be able to
+% conveniently reference a multiple choice problem when the
+% \texttt{vspacewithsolns} option is in effect (\textsf{eqexam}).
+%
+% \cs{eq@saveAns} is an internal macro, it gathers up the first two
+% arguments of \cs{Ans}, if the second arg is a 1, it passes the flow
+% to \cs{@@@SaveAns}; otherwise, it gobbles all leftovers.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% \cs{@@@SaveAns} collects the answer to the problem, and placed
+% it in the holding command \cs{@tempholdSaveAns}, it also saves
+% the alternative letter as well in \cs{@tempholdSaveChoice}.
+% \begin{macrocode}
+\long\def\@@@SaveAns#1\eAns{% 4/5
+ \g@addto@macro\@tempholdSaveAns{\\{\ignorespaces#1}}%
+% \end{macrocode}
+% This code is expanded before the \cs{Ans} command is, so we'll simulate
+% incrementing the \texttt{quizno} counter, \dots
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% and decrement when we are finished adding to the token list.
+% \begin{macrocode}
+ \addtocounter{quizno}{-1}%
+}
+% \end{macrocode}
+% \cs{eq@displayAns} is \cs{let} to \verb!\\!. Definition and name may change.
+% \cs{useSaveAns} is a simple interface to accessing the list of all correct
+% answers. Probably this definition will change.
+%
+% \cs{eq@insertComma} is a simple way of delimiting the list. We put a comma
+% before each expression, except for the first one.
+%
+% (2016/11/21) The \DescribeMacro{\oxfordCommaOn}\cs{oxfordCommaOn} is on by default, while
+% \DescribeMacro{\oxfordCommaOn}\cs{oxfordCommaOff} turns off the Oxford comma. The
+% Oxford comma comes into play only with the star-forms of \cs{useSavedAns},
+% \cs{useSavedAlts}, and \cs{useSavedAltsAns}.
+% \changes{v7.8}{2016/11/21}{Added star option to each of the \string\cs{useSaved...} commands}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% \begin{macro}{\useSavedAns}
+% \begin{macro}{\useSavedAlts}
+% \begin{macro}{\useSavedAltsAns}
+% \begin{macro}{\useSavedNumAns}
+% \changes{v6.3x}{2011/04/05}{%
+% Added \cs{useSavedAns}, \cs{useSavedAlts}, and \cs{useSavedAltsAns}.
+%}
+% These three commands hold the correct alternatives and answers to a multiple choice
+% or multiple selection problem. The optional first argument allows you to display
+% a particular result, the second argument is the value of the \texttt{label} key-value,
+% given in the enclosing \cs{bChoices}/\cs{eChoices} ``environment.''
+% \begin{macrocode}
+\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}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+\long\def\@@@SaveAnsGobbleAns#1\eAns{} % 4/5
+% \end{macrocode}
+% This command gets, and sets the list of alternatives
+% \begin{macrocode}
+\long\def\@getListAns\Ans#1\eAns{%\@@par %start new paragraph
+% \end{macrocode}
+% We record the list as we process each item.
+% \begin{macrocode}
+ \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}%
+}
+% \end{macrocode}
+% The argument is the number of columns to typeset, this number
+% is forced to be \texttt{<=} to the number of columns specified in the \texttt{answers}
+% environment.
+% \begin{macrocode}
+\def\@layoutTabularAns#1{%
+ \let\eq@tabSep\@empty
+ \xdef\numShortCols{#1}%
+ \ifnum#1>\aeb@numCols \xdef\numShortCols{\aeb@numCols}\fi
+ \@@layoutTabularAns
+}
+% \end{macrocode}
+% If the next token is \cs{Ans} we grab its all stuff between
+% \cs{Ans} and \cs{eAns} and typeset it and insert the appropriate
+% token, either \texttt{\&} or \texttt{\string\cr}.
+% We continue until the next token is not \cs{Ans}. (This last token
+% should be \cs{eChoices}.)
+% \begin{macrocode}
+\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}%
+}
+% \end{macrocode}
+% This command, I think, is executed after we've found the \cs{eChoices}.
+% \begin{macrocode}
+\def\@findendans{\@ifnextchar\end{% 4/5
+% \end{macrocode}
+% If there is a \cs{bChoiceLabel} we process the alternatives.
+% \begin{macrocode}
+ \ifx\bChoiceLabel\@empty\else
+ \processLabeledAns\fi
+ }{\expandafter\@findendans\@gobble}}%
+% \end{macrocode}
+% The command that processes the alternatives.
+% \changes{v6.7g}{2013/08/09}{Changed \texttt{\#1} to \cs{the}\cs{@temptokena} Fixing
+% a nasty bug. Reported by Christopher C.}
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \changes{v7.7c}{2015/10/08}{Added memory for the case}
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</package|eqexam>
+% \end{macrocode}
+% \begin{macrocode}
+%<*randomize>
+% \end{macrocode}
+%
+% \subsection{Randomizing the Order of the Multiple Choices}\label{randomize}
+%
+% When the author wants to randomize the multiple choices, we require the \texttt{keyval}
+% package and the \texttt{random.tex} macro file. This works only when using \cs{bChoices}
+% and \cs{eChoices}. The use of \cs{bChoices} and \cs{eChoices} is limited to non-verbatim
+% items.
+%
+% \changes{v6.7f}{2013/08/03}{Added conditional input of random.tex}
+% The \texttt{random.tex}, by Donald Arseneau, provides the random number support.
+% \begin{macrocode}
+\@ifundefined{nextrandom}{\input{random.tex}}{}
+% \end{macrocode}
+% We redefine \cs{nextrandom} from \texttt{random.tex} to save the initializing seed.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% Save the initial seed value to \cs{eqInitSeedValue}.
+% \changes{v6.7f}{2013/08/03}{Save the initial seed value to \cs{eqInitSeedValue}.}
+% \begin{macrocode}
+ \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
+}
+% \end{macrocode}
+% The \cs{bChoices} command is now processed by the \texttt{keyval} package. There
+% are two keys: \texttt{nCols} and \texttt{random}. The first key
+% sets the number of columns we are limited to; the second one obviously declares
+% that this list of choices should be randomized, a boolean.
+%
+% We redefine \cs{@ansChoices} above to take key-value optional arguments.
+% We allow for a global override of the random key. If random is true, we
+% call \cs{@@bChoices}, which begins the process of randomization; otherwise
+% we call \cs{@@ansChoices} which is roughly equal to the earlier
+% \cs{@ansChoices}.
+% \changes{v6.1}{2007/10/28}
+% {%
+% Added support for randomizing the multiple choices, requires the use of \cs{bChoices}
+% and \cs{eChoices}.
+% }
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% This is actually the old \cs{@ansChoices} only slightly modified.
+% \begin{macrocode}
+\def\@@ansChoices{%
+ \ifnum\aeb@numCols=1 % list mode
+ \def\eq@next{\@layoutListAns}%
+ \else % tabular mode
+ \edef\eq@next{\noexpand\@layoutTabularAns{\bChoiceNumCols}}%
+ \fi
+ \eq@next
+}
+% \end{macrocode}
+% The following are some registers to hold integers and tokens.
+% \begin{macrocode}
+\newcount\aeb@numChoices
+\newcount\aeb@ranChoice
+\newtoks\aeb@hold\aeb@hold={}
+% \end{macrocode}
+% This is the command that begins the randomization of the alternatives.
+% First we initialize some scratch macros to hold the choices, then
+% we look for the next token, if it is \cs{Ans} we then execute \cs{@getAns}
+% otherwise, we're finished.
+% \begin{macrocode}
+\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}}}%
+}
+% \end{macrocode}
+% The non-frozen questions will be held in the macro \cs{@temphold}.
+% We keep track of the number of choices using the counter \cs{aeb@numChoices}.
+% \begin{macrocode}
+\long\def\@getAns\Ans#1\eAns{%
+ \g@addto@macro\@temphold{{\Ans#1\eAns}}%
+ \aeb@searchfortoken{\@getAns}%
+}
+% \end{macrocode}
+% We've encountered \cs{eFreeze}, if the next token is \cs{Ans}, go get the
+% choices, otherwise, we are finished.
+% \begin{macrocode}
+\def\@getFreezeAns{\aeb@searchfortoken{\@@getFreezeAns}}
+% \end{macrocode}
+% Get the frozen choice, then look for another. Hold these frozen choices
+% in the macro \cs{@tempholdfreeze}.
+% \begin{macrocode}
+\long\def\@@getFreezeAns\Ans#1\eAns{%
+ \g@addto@macro\@tempholdfreeze{\Ans#1\eAns}%
+ \aeb@searchfortoken{\@@getFreezeAns}%
+}
+% \end{macrocode}
+% When we are finished finding all the choices, we come here to randomize the choices.
+% \begin{macrocode}
+\long\def\@eChoices#1\eChoices{%
+ \aeb@randomizeChoices{\the\aeb@numChoices}%
+}
+% \end{macrocode}
+% The routine that randomizes the choices. Basically, we use \texttt{random.tex} to get
+% a random number between one and \cs{aeb@numChoices}, inclusive. Then we search through
+% the list of choices (\cs{@temphold}, moved to \cs{aeb@hold}). The one selected at random
+% is moved to \cs{@tempholdrandom}, and the rest of the choices are moved to \cs{@temphold},
+% here \cs{aeb@hold} is used as a scratch token register.
+% \begin{macrocode}
+\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
+ }%
+% \end{macrocode}
+% We repeat this process a total of \cs{aeb@numChoices}, the original count of the number
+% of choices. Once finished, we go to \cs{aeb@finishedRandomizing} to lay out the
+% randomized choices for typesetting.
+% \begin{macrocode}
+ \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
+}
+% \end{macrocode}
+% This command assembles the questions held in random order in the command \cs{@tempholdrandom} and
+% the frozen ones held in \cs{@tempholdfreeze}, and lays out the choices for typesetting.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% \begin{macro}{\saveRandomSeed}
+% \begin{macro}{\inputRandomSeed}
+% \begin{macro}{\useRandomSeed}
+%
+% \cs{saveRandomSeed} causes \texttt{exerquiz/eqexam} to save the last random seed used.
+%
+% When you have labels, as we might have in a list of multiple choices, the save feature
+% needs to be turned off for several runs of latex until the label reference
+% becomes up to date.
+%
+% \cs{inputRandomSeed} causes \texttt{exerquiz/eqexam} to input the last random seed used, if
+% one exists, to re-seed the randomization so a new random sequence
+% will be generated. This allows you to get a new sequence every time
+% you latex.
+%
+% (2013/09/17) Made a number of changes so that the randomization of \cs{bChoices}
+% and \cs{eChoices} works well with the \textsf{ran\_toks}. There is a lot of common
+% code, and commands with the same name. I've also change from using the aux file
+% \cs{jobname\_ran.sav} to \cs{jobname\_rt.sav}, the latter being the aux file used
+% by \textsf{ran\_toks}. Now, there share a common aux file and common initial and final
+% seeds.
+% \begin{macrocode}
+%\def\saveRandomSeed{\AtEndDocument{\eq@writeRandomData}}
+\def\saveRandomSeed{\PackageInfo{exerquiz}
+ {The command \string\saveRandomSeed\space
+ is deprecated.\MessageBreak Seed automatically saved}}
+% \end{macrocode}
+% I \cs{let} the commands in this file to the companion commands in \textsf{ran\_toks} file.
+% The user can use either set of commands \cs{inputRandomSeed} or \cs{useLastSeed} as one
+% pair and \cs{useRandomSeed} and \cs{useThisSeed} as the other pair.
+% \begin{macrocode}
+\@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
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% Save the data to the file \cs{jobname\_ran.sav}.
+% \begin{macrocode}
+\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}%
+}}
+% \end{macrocode}
+% \begin{macrocode}
+%</randomize>
+% \end{macrocode}
+%\subsection{In Support of showgrayletters}
+%
+% This is a hack to reference multiple choice questions when the
+% \texttt{showgrayletters} option is in effect. We define \cs{REF} to
+% return the uppercase version of the letters.
+% \begin{macrocode}
+%<*package|eqexam>
+% \end{macrocode}
+% \begin{macro}{\graylettersOn}
+% \begin{macro}{\graylettersOff}
+% Convenience commands for turning on or off the gray letter feature
+% \begin{macrocode}
+\def\graylettersOn{\aebshowgrayletterstrue}
+\def\graylettersOff{\aebshowgraylettersfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+\def\aeb@exiii{\expandafter\expandafter\expandafter}
+% \end{macrocode}
+% \begin{macro}{\REF}
+% Same syntax as \cs{ref}, including a \texttt{*} option. the
+% \texttt{*} version does not create a link. If
+% \texttt{showgrayletters} is not in effect, then \cs{REF} is
+% equivalent to \cs{ref}.
+%\changes{v6.06c}{2007/04/26}
+%{
+% Added \cs{REF} in support of the \texttt{showgrayletters} option.
+%}
+%\changes{v6.4d}{2011/07/14}{%
+% Correct \cs{REF} so that a link is created.
+%}
+% \begin{macrocode}
+\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}%
+}
+%</package|eqexam>
+%<*eqexam>
+\def\aeb@buildUpperCaseRef#1{%
+ \xdef\tmp@expand{\aeb@exiii\@firstoftwo\csname r@#1\endcsname}%
+ \xdef\tmp@expand{\uppercase{\tmp@expand}}\tmp@expand
+}
+%</eqexam>
+%<*package>
+\def\aeb@buildUpperCaseRef#1{%
+ \xdef\tmp@expand{\aeb@exiii\@firstoffive\csname r@#1\endcsname}%
+ \xdef\tmp@expand{\uppercase{\tmp@expand}}%
+ \if\isREFstar\eq@One\tmp@expand\else\hyperref[#1]{\tmp@expand}\fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Circles instead of Rectangles}
+%
+% For quizzes only, there is now an way to use circles for the radio button
+% fields for multiple choice questions (not for multiple selection questions, however).
+%
+% \begin{macro}{\useMCCircles}
+% Execute this command prior to the quiz you want to use circular radio buttons. The command
+% saves the values of \cs{every@qRadioButton} and \cs{every@qCheckBox}, then uses the
+% every mechanism to set the all radio buttons created in a quiz to a circle symbol, we also
+% set all check boxes used in multiple choice question to a transparent border.
+%
+%\changes{v6.3j}{2008/12/08}
+%{
+% Added \cs{useMCCircles} and \cs{useMCCRects}.
+%}
+% \par\medskip\noindent We use a switch to keep track of ``circle mode.'' If the
+% document author invokes \cs{useMCCircles} when we are already in circle mode,
+% \cs{useMCCircles} does nothing.
+% \begin{macrocode}
+\newif\ifaeb@usecircles\aeb@usecirclesfalse
+% \end{macrocode}
+% \begin{macrocode}
+\let\insert@circlesymbol\@empty
+\def\useMCCircles{\useForms
+ \ifaeb@usecircles\else
+ \global\aeb@usecirclestrue
+ \gdef\insert@circlesymbol{\symbolchoice{circle}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\useMCRects}
+% We can restore the default behavior by executing \cs{useMCRects} prior to the next quiz.
+% The command restores the state of \cs{every@qRadioButton} and \cs{every@qCheckBox}
+% to their values prior to the last invocation of \cs{useMCCircles}.
+% \begin{macrocode}
+\def\useMCRects{\useForms
+ \ifaeb@usecircles\global\aeb@usecirclesfalse
+ \global\let\insert@circlesymbol\@empty
+ \fi
+}
+\let\useMCCRects\useMCRects
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Objective Style Questions}
+%
+% The code for objective style questions is very simple. The
+% evaluation of the user's response is done by JavaScript. The
+% JavaScript is inserted into the PDF file through DLJS. For
+% authors using \textsf{pdftex} or \textsf{dvipdfm}, this process
+% is automatic; for authors using the distiller (hence, would use
+% the \texttt{dvips} or \texttt{dvipsone} option), the solution is
+% also automatic if you use \textbf{Acrobat 5.0}. If you do not have
+% the latest version of Acrobat, the DLJS must be inserted
+% manually using the \texttt{Document > Insert Pages} menu item. See
+% paragraphs below for a little more detail, or see the manual.
+%
+% There are two kinds of questions that can be posed (actually only one type):
+% (1) a question that has a numerical answer;
+% (2) a question that has a symbolic answer in one variable,
+% $x$. The symbolic answer must reduce, however, to a numerical value when
+% $x$ is given a numerical value. Thus, only questions whose answers can
+% be reduced to numerical values can be posed.
+%
+% If the author has Acrobat 5.0, the \textsf{exerquiz} package should be
+% built using the \texttt{Acrobatv} option in the
+% \textsf{exerquiz.ins} file. In this case, Document level
+% Javascript will be input when the newly distilled file is
+% first opened in the Acrobat Viewer. If the function ``CkBalP'' is
+% undefined, the we input the FDF file contained the Doc Level JS.
+% The file needs to be saved (Save As) for the Doc Level JS to
+% remain in the PDF file.
+%
+% In the case of the author using Acrobat 4.0, he/she needs to load
+% manually insert the \texttt{eq\_DLJS.pdf} file. If only exercises
+% are used, this insertion is not needed.
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% \begin{environment}{oQuestion}
+% This was my first attempt and I have not deleted it from the package yet.
+% Useful for posing a single question only. The argument is the (unique) name
+% of this question. This name is used to define the macro \cmd{\oField} which is used
+% by support macros. The \texttt{shortquiz} environment can also be used for
+% single/multiple questions as well.
+% \begin{macrocode}
+\let\oqpriorhook\@empty
+\newenvironment{oQuestion}[1]{%
+% \end{macrocode}
+% (06/08/10) The next two lines initialize the macros for registering the
+% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
+% the \texttt{shortquiz} and \texttt{quiz} environments.
+% \begin{macrocode}
+ \let\@currentQues\@empty
+ \xdef\eq@pageThisQ{\the\c@page}%
+ \global\let\eqQzQuesList\@empty
+ \xdef\oField{#1}\xdef\curr@quiz{#1}\xdef\currQuiz{#1}%
+ \let\@qzsolndest\@empty
+ \stepcounter{questionno}%
+ \let\eqQuizType\isSQZ\gdef\eqPTs{1}\global\let\eqQT\eq@na
+ \let\answers\answers@sq
+ \let\endanswers\endanswers@sq
+ \let\manswers\manswers@sq
+ \let\endmanswers\endmanswers@sq
+ \let\solution\solution@sq
+ \let\endsolution\endsolution@sq
+ \noindent\oqpriorhook\sq@IDTxtField\ifx\aebTitleQuiz\@empty
+ \else\aebtitleQuiz\fi\ignorespaces
+}{%
+ \global\let\aebtitleQuiz\@empty
+ \global\let\aebTitleQuiz\@empty
+ \global\let\eq@tq@star\relax
+}
+\def\oSolution#1{\edef\@qzsolndest{#1}}
+% \end{macrocode}
+% \end{environment}
+% \begin{macro}{\replaceExclPt}
+% When processing a mathematical expression, replace \texttt{n!} or \texttt{(n)!} with
+% \texttt{fact(n)}. Used with the \texttt{combinatorics} option of \textsf{dljslib} package.
+% \begin{macrocode}
+\def\replaceExclPt#1{\def\replaceexclaim{#1}}
+\replaceExclPt{false}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\negPointsAllowed}
+% Used with the \texttt{ProcessMultiSelection} when processing \texttt{manswers} environments.
+% The default is not to allow the score to go below 0. By executing \cs{negPointsAllowed}
+% in the preamble, we allow the score to go below zero.
+%\changes{v6.3i}{2008/10/22}
+%{
+% Added \cs{negPointsAllowed} to allow negative scores on quizzes. This is only relevant
+% when the quiz has a \texttt{manswers} environment.
+%}
+% \begin{macrocode}
+\def\negPointsAllowed{\def\negpointsallowed{true}}
+\@onlypreamble{\negPointsAllowed}
+\def\negpointsallowed{false}
+\def\negPointsMarkupAllowed{\def\negpointsmarkupallowed{true}}
+\def\negpointsmarkupallowed{false}
+\@onlypreamble{\negPointsMarkupAllowed}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\requireAlertBox}
+% Turn off the ``Do not show this message again'' checkbox for objective questions
+% and multiple choice questions.
+%\changes{v6.3m}{2010/01/27}
+%{
+% Added \cs{requireAlertBox} to turn off the ``Do not show this message again'' checkbox for objective questions.
+%}
+%The alert box displays the message \cs{doNotShowAgainMsg} which by default is
+%``Do not show this message again''
+% \begin{macrocode}
+\def\requireAlertBox{\def\bcheckboxused{false}}
+\def\allowNoAlertBox{\def\bcheckboxused{true}}
+\allowNoAlertBox
+% \end{macrocode}
+% \end{macro}
+% \subsection{Math Fill-In Questions}
+% \begin{macro}{\RespBox}
+% \begin{macro}{\RespBoxMath}
+% \begin{macro}{\RespBoxNT}
+% \cmd{\RespBox} and \cmd{\RespBoxNT} lay out a text box, into which the
+% user enters his/her response to the question. \cmd{\RespBox} expects the presence
+% of \cmd{\sqTallyBox}, whereas \cmd{\RespBoxNT} does not (NT = No Tally ).
+%\par\medskip
+% Usage: |\RespBox[#1]#2(#3)[#4]#5#6#7#8[#9]*#10|
+% \begin{description}
+% \item[\ttfamily\#1 :] Optional parameter used to modify the appearance of the
+% text field.
+% \item[\ttfamily\#2 :] The correct answer to the question.
+% This must be a numerical value, or a function of one variable.
+% JavaScript Note:
+% In JavaScript, functions such as \texttt{sin(x)} and \texttt{cos(x)} are
+% methods of the \texttt{Math} object. It is not necessary, however, to
+% type \texttt{Math.sin(x)} or \texttt{Math.cos(x)}; this is done by inserting
+% the expression into a \texttt{with(Math)} group.
+% \item[\ttfamily\#3 :] An optional parameter, \textit{delimited by parentheses},
+% that defines the independent variable; \texttt{x}, is the default value. Note
+% that this parameter is set off by parentheses. For a multivariate question, just
+% list the variables in juxtaposition, \texttt{(xyz)}. An alternate method is to
+% delimit with commas \texttt{(x,y,n)} and include the type of the variables
+% \texttt{(r:x,r:y,i:n)}, where \texttt{"r"} means a real variable and \texttt{"i"}
+% means an integer variable. The variables must be either of the old style (no commas, no typing)
+% or the new style. Do not mix the styles.
+% \item[\ttfamily\#4 :] Optional, a named destination to the solution to the
+% question. If this parameter appears, then a solution must follow the
+% question, enclosed in a \texttt{solution} environment.
+% Alternately, the fourth parameter can be a `\texttt*', in which case, we have
+% automatic naming of the destination, namely, \texttt{[\string\curr@quiz.\string\thequestionno]}
+% \item[\ttfamily\#5 :] The number of samples points to be used, usually $3$ or $4$ is
+% sufficient.
+% \item[\ttfamily\#6 :] Precision required, the $\epsilon$ value, if you will.
+% \item[\ttfamily\#7 :] Parameters \#7 and \#8 are used to define the interval from
+% which to draw the sample points. There are two forms: (1) \#7 is the left-hand endpoint
+% of the interval and \#8 is the right-hand endpoint (the use of \#7 and \#8 in this form
+% is deprecated); (2) the interval is defined by standard interval notation, \texttt{[a,b]}.
+% For a multivariate question---one where parameter \#2 lists more than one variable,
+% separate the intervals for each variable by a `x', \texttt{[0,2]x[1,2]x[3,4]}.
+% \item[\ttfamily\#8 :] (1) \#8 is the right-hand endpoint of the interval (the use of this
+% parameter is deprecated); (2) in the second
+% case, \#8 is not used.
+% \item[\ttfamily\#9 :] This optional parameter is either the name of a customized
+% comparison function \textit{or} a JavaScript object with at most two properties:
+% \texttt{priorParse} and \texttt{comp}. See the demo file \texttt{integer\_tst.tex} for
+% examples of usage.
+% \item[\ttfamily\#10:] (Only detected if following an asterisk, `\texttt*')
+% The name of a JavaScript function that is to be used to process the user input.
+% \end{description}
+% Example:
+%\begin{flushleft}\footnotesize
+%|\RespBoxMath{<exp(t), 2*t, sin(t)>}(t)[soln]{3}{.0001}{[0,1]}[compare]*{ProcVec}|
+%\end{flushleft}
+% or (the deprecated form)
+%\begin{flushleft}\footnotesize
+%|\RespBoxMath{<exp(t), 2*t, sin(t)>}(t)[soln]{3}{.0001}{0}{1}[compare]*{ProcVec}|
+%\end{flushleft}
+% \begin{macrocode}
+\newcommand\RespBoxNT{\def\rbFlag{0}\@RespBox}
+\newcommand\RespBox{\def\rbFlag{0}\@RespBox}
+\newcommand\RespBoxMath{\def\rbFlag{0}\@RespBox}
+% \end{macrocode}
+% These commands can be used define the default appearance of the \cs{RespBoxMath},
+% \cs{RespBoxTxt} et al. This first set controls all standard text fields.
+% \begin{macrocode}
+% \end{macrocode}
+% Get any changes in the appearance of the text box
+% \changes{v6.4c}{2011/07/01}{\cs{RespBoxMath} now records its lists of
+% independent variables under the global variable \texttt{\_mathVars}.}
+% \begin{macrocode}
+\begin{defineJS}[%
+ \catcode`\%=14\relax\catcode`\@=0\relax]{\AAKqRespBoxMath}
+if(event.willCommit){
+ RecordPointValue(@eqPTs,@thequestionno@ifx@grpquestions1,%
+@thegrpquestionno,@grpPointValue,@grpTotalWeight,%
+"@grpEvalFunction"@fi);
+ RecordProblemType("@eqQT",@thequestionno);
+ _mathVars=@indepVar;
+ var retn = @processJSfunc(@rbArgs,@compareJSfunc);
+ ProcUserResp(retn,event.value,@thequestionno,%
+0@ifx@grpquestions1,@thegrpquestionno@fi);
+}
+if (!isQuizInitialized("@currQuiz")) {
+ @eqObjAlert@space eqAppAlert(InitMsg("@bqlabelISO"),3);
+ event.rc = false;
+}
+\end{defineJS}
+\def\RespBoxMathDefaults
+{%
+ \BC{0 0 0}\S{S}\textColor{0 g}\F{\FPrint}\W{1}
+}
+\def\moreRespBoxMathDefaults
+{%
+ \edef\@moreRespBoxMathDefaults{%
+ \if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions
+ \else\noexpand\Ff{\FfReadOnly}\fi\fi\fi
+ }%
+}
+\let\eqFormatArg\@empty
+\def\@@RespBoxMathActions
+{%
+ \AA{\if\eqQuizType\isQZ
+ \AAKeystroke{\AAKqRespBoxMath\eqAAKeystrokeArg}
+ \AAFormat{\eqFormatArg}
+ \else
+ \AAKeystroke{if(event.willCommit) {\r\t
+ _mathVars=\indepVar;\r\t
+ retn=\processJSfunc(\rbArgs,\compareJSfunc);\r
+\if\@sqTurnOffAlerts1
+ \t OnBlurRespBox(%
+ \if\@sqTurnOffAlerts1retn\else null\fi,"\curr@quiz");
+ \eqAAKeystrokeArg\r
+\fi
+ }%
+ }
+ \AAFormat{\eqFormatArg}%
+ \AAOnFocus{\JS{var retn = null;}}%
+ \AAOnBlur{\JS{OnBlurRespBox(null,"\curr@quiz");}}%
+ \fi
+ }
+}
+\newcommand\@RespBox[1][]
+{%
+ \eq@AddProbToQzQuesList
+ \smallskip\ifx\grpquestions\eq@Zero
+ \addtocounter{eqpointvalue}{\eqPTs}\fi
+ \if\eqQuizType\isQZ
+ \def\rbFlag{1}\global\IsRespBoxtrue
+ \ifx\grpquestions\eq@One
+ \stepcounter{grpquestionno}%
+ \def\Fld@name{%
+ grpobj.\curr@quiz.\thequestionno.\thegrpquestionno}%
+ \else
+ \eq@recordThesePTs\eq@recordProbType
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"math"]}%
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\curr@quiz.\thequestionno}%
+ \fi
+ \else % shortquiz
+ \ifx\grpquestions\eq@One
+ \stepcounter{grpquestionno}%
+ \def\Fld@name{%
+ grpobj.\oField.\thequestionno.\thegrpquestionno}%
+ \else
+ \stepcounter{questionno}%
+ \def\Fld@name{%
+ obj.\oField.\thequestionno}%
+ \fi
+ \fi
+% \end{macrocode}
+% Changed (v6.3f, 2008/10/08) the command \cs{array} to \cs{Array} to avoid clashing with the
+% array command defined in \texttt{amsmath}.
+% \begin{macrocode}
+ \let\Array\aeb@array
+ \moreRespBoxMathDefaults
+% \end{macrocode}
+% (2014/01/23) This is tricky, I'm enclosing \cs{text@@Field} in an \cs{mbox}, beginning here
+% \begin{macrocode}
+ \leavevmode\hbox\bgroup\text@@Field{#1}{\Fld@name}%
+ {\RBW}{\DefaultHeightOfWidget}%
+ {\eq@protect\AA}{\eq@setWidgetProps\eq@RespBox}%
+ {\RespBoxMathDefaults\@moreRespBoxMathDefaults
+ \@@RespBoxMathActions\every@eqTextField\every@RespBoxMath}%
+}
+% \end{macrocode}
+% Get the second parameter, which is the correct answer to the question, and
+% test to see if there is a specification for the optional third parameter,
+% which is the variable list, `\texttt x' is the default.
+% \begin{macrocode}
+\def\eq@RespBox#1{\gdef\eqCorrectAns{#1}\if\grpquestions\eq@Zero
+% \end{macrocode}
+% If not within a \texttt{mathGrp} environment, if within a MCFI command pair we save the author's
+% answer as \cs{s@veCorrAnsMCFI}; otherwise, we record the author's answer. If within
+% \texttt{mathGrp} environment, we record is as part of the group array to be use later.
+% \begin{macrocode}
+ \ifwithinMCFI\gdef\s@veCorrAnsMCFI{"#1"}\else
+% \eq@recordCorrAns{"#1"}
+\fi\else\eq@recordGrpAnsArray{"#1"}\fi
+ \@ifnextchar({\@eq@RespBox{#1}}{\@eq@RespBox{#1}(x)}}
+% \end{macrocode}
+% Pick up the optional third parameter, then test whether the optional fourth parameter is there.
+% There are two forms: the [mydest] an explicit destination for the solution to the problem, or
+% a `\texttt*', in which case, we have automatic naming, the name is
+% \texttt{[\string\curr@quiz.\string\thequestionno]}.
+% \begin{macrocode}
+\def\@eq@RespBox#1(#2){\@ifnextchar[{\@eq@RespB@x{#1}(#2)}%
+ {\@ifstar{\@eq@RespB@x{#1}(#2)[\curr@quiz.\thequestionno]}%
+ {\@eq@RespB@x{#1}(#2)[]}}}
+% \end{macrocode}
+% Now get the next three parameters: the number of samples, the precision, and the first of the
+% two interval parameters.
+% \begin{macrocode}
+\def\eq@ZERO{0}
+\def\defaultRDPrecision#1{\def\eq@defaultRDPrecision{#1}}
+\defaultRDPrecision{1E-14}
+% \end{macrocode}
+% dps/change 02/23/07 Here we try to implement a suggest of Bruce Wagner. If the tolerance
+% is set to zero, then use \texttt{reldiffCompare} as the default compare, and set the tolerance
+% to some small value. Here, the small value is the value of the command
+% \cs{eq@defaultRDPrecision} which can be set by \cs{defaultRDPrecision}. The default definition
+% is \verb!\defaultRDPrecision{1E-14}!.
+% \begin{macrocode}
+\def\@eq@RespB@x#1(#2)[#3]#4#5#6{\xdef\@qzsolndest{#3}%
+ \def\indepVar{"#2"}\def\eq@precision{#5}%
+ \ifx\eq@precision\eq@ZERO
+ \def\eq@defaultCompare{reldiffCompare}%
+% \end{macrocode}
+% (2017/01/11) Replace \texttt{\#1} by \cs{eqCorrectAns} to delay expansion
+% \changes{v7.8d}{2017/01/11}{Replace \string\texttt{\#1} by \string\cs{eqCorrectAns} to delay expansion}
+% \begin{macrocode}
+ \def\rbArgstmp{%
+ \rbFlag,"\eqCorrectAns",#4,\eq@defaultRDPrecision}\else
+ \def\eq@defaultCompare{diffCompare}%
+ \def\rbArgstmp{\rbFlag,"\eqCorrectAns",#4,#5}\fi
+% \end{macrocode}
+% We have arrived at the first of possibly two parameters that define the interval(s)
+% from which to sample random points. There are two forms, the old style (deprecated)
+% and the new style. We must detect which form this is.
+% \par\medskip\noindent
+% (10/10/11) To support \cs{viidna}, we expand \texttt{\#6} first before passing it
+% to the command \cs{@checkforInterval}.
+% \begin{macrocode}
+ \edef\eq@ixparam{#6}%
+ \expandafter\@checkforInterval\eq@ixparam\\%
+}
+% \end{macrocode}
+% \DescribeMacro{\viidna} is used with the \texttt{satisfyEq} for the seventh parameter,
+% these routines do not use the ninth, but there needs to be something that does not
+% stop compilation.
+% \begin{macrocode}
+\def\viidna{[]}
+% \end{macrocode}
+% If the next token is a `\texttt[', then that signals the beginning of an interval
+% such as \texttt{[a,b]}, must be the new style. The second parameter is not
+% needed, and not expected in this case. It would be a mistake to include it.
+% \begin{macrocode}
+\def\@checkforInterval{%
+ \@ifnextchar[{\@checkforIntervali}{\@checkforIntervalii}}
+% \end{macrocode}
+% This is the case of the new style of defining the interval. We insert it into the
+% arguments list, and continue on to the next stage.
+%
+% I have detected a problem when the ninth parameters is a JavaScript object and the left brace
+% is next to the left bracket. Somehow, the left brace and right brace get absorbed. We do a
+% work around, and insert a space after the left bracket.
+% \begin{macrocode}
+\def\@checkforIntervali#1\\{%
+ \def\rbArgs{\rbArgstmp,"#1",\indepVar}%
+ \@ifnextchar[{\@eq@@RespBox[ \expandafter\@gobble}%
+ {\@eq@@RespBox[\eq@defaultCompare]}%
+}
+% \end{macrocode}
+% This is assumed to be the old style for defining the interval. In this case, the next
+% token is the right-hand endpoint of the interval, we need it. It would be a mistake
+% \texttt{not} to include it. We also test for the presence of the optional
+% of a customized comparison function, parameter \texttt{\#9}
+% \begin{macrocode}
+\def\@checkforIntervalii#1\\#2{%
+ \def\rbArgs{\rbArgstmp,"[#1,#2]",\indepVar}%
+ \@ifnextchar[{\@eq@@RespBox}{\@eq@@RespBox[\eq@defaultCompare]}%
+}
+% \end{macrocode}
+% Finally, we see if there will be a 10th parameter by seeing if `\texttt*' comes
+% next. We change the catcodes here, so we can have a left and right brace in the
+% optional argument \#9. Hope it works. dps 12/30/03
+%\changes{v6.4g}{2011/07/21}{%
+% Changing the definition of \cs{@eq@@RespBox}, removing the change
+% in \cs{catcode}s. If this causes problems, can restore the
+% old definition.
+%}
+% \begin{macrocode}
+%\def\@eq@@RespBox{\begingroup\catcode`\<=1\relax\catcode`\>=2\relax
+% \catcode`\{=12\relax\catcode`\}=12\relax\@eq@@@RespBox}
+%\def\@eq@@@RespBox[#1]{\endgroup\@ifstar{\jsRespBox[#1]}%
+% {\jsRespBox[#1]{ProcResp}}}
+% \end{macrocode}
+% Below is an alternate (and obvious) definition for \cs{@eq@@RespBox}. Whatever
+% reason I had to change the catcodes, I don't remember, and things seem to work
+% without it. But, will keep things as they are.
+% \begin{macrocode}
+\def\@eq@@RespBox{\@eq@@@RespBox}
+\def\@eq@@@RespBox[#1]{\@ifstar{\jsRespBox[#1]}%
+ {\jsRespBox[#1]{ProcResp}}}
+\def\eq@ProcRespIntervals{ProcRespIntervals}
+\def\jsRespBox[#1]#2{\def\compareJSfunc{#1}%
+ \def\processJSfunc{#2}\gdef\g@processJSfunc{#2}% 01/11
+% \end{macrocode}
+% (2017/01/11) Run answer through \cs{pdfstringdef} if
+% \texttt{ProcRespIntervals} is used to avoid unbalanced parentheses.
+% \changes{v7.8d}{2017/01/11}{Run answer through \string\cs{pdfstringdef} if
+% \string\texttt{ProcRespIntervals} is used.}
+% \begin{macrocode}
+ \ifx\eq@ProcRespIntervals\g@processJSfunc
+% \end{macrocode}
+% When the response function is \texttt{ProcRespIntervals} there is no `real' math, no subscripts,
+% no superscripts. We turn of the math mode warning before \cs{pdfstringdef}.
+% \begin{macrocode}
+ \let\@inmathwarn@SAVE\@inmathwarn\let\@inmathwarn\@gobble
+% \end{macrocode}
+% When the response function is \texttt{ProcRespIntervals}, there may be unbalanced parentheses, we'll
+% pass \cs{eqCorrectAns} through \cs{pdfstringdef} to escape them.
+% \begin{macrocode}
+ \pdfstringdef{\eqCorrectAns}{\eqCorrectAns}%
+ \let\@inmathwarn\@inmathwarn@SAVE\fi
+ \eq@recordCorrAns{"\eqCorrectAns"}% 01/11
+ \ifeq@proofing\makebox[0pt][l]{\space\math@correctAnswer}\fi
+ \eq@TextField % send to the driver-dependent macro
+% \end{macrocode}
+% (2014/01/23) Closing the \cs{hbox} here, begun at the opening of \cs{text@@Field} above.
+% \begin{macrocode}
+ \egroup
+}
+% \end{macrocode}
+% The primitive \cs{meaning} is used to get a typeset version of the answer for the \texttt{proofing}
+% option. I found it a difficult problem because once the answer is scanned, it has catcodes attached.
+% Once that is done, it is impossible to use standard methods to make a typeset the answer in
+% verbatim mode. This trick appears in the \TeX book. \cs{meaning} inserts additional spaces on occasion,
+% for example, following a period (`.'). Oh, well.
+% \begin{macrocode}
+\def\gobbleMacro#1>{}
+\gdef\math@correctAnswer{%
+ \ttfamily\color{\@proofingsymbolColor}\spaceskip=2pt\xspaceskip=2pt%
+ \expandafter\gobbleMacro\meaning\eqCorrectAns
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%\subsection{Text Fill-In}
+% \begin{macro}{\RespBoxTxt}
+% \begin{macro}{\RespBoxTxtNT}
+% These two macros process open-ended questions that require a text response.
+% There are several ways to customize these macros; as described below.
+% \par\medskip
+% \noindent Usage: |\RespBoxTxt[#1]#2#3[#4]#5<plus listing of alternatives>|
+% \begin{description}
+% \item[\ttfamily\#1 :] Optional parameter used to modify the appearance of the
+% text field.
+% \item[\ttfamily\#2 :] This required parameter is a number that indicates
+% the filtering method to be used. Permissible values of this parameter are
+% \begin{description}
+% \item[\ttfamily -1: ] (The default) The author's and user's answers are not filtered
+% in any way. (Spaces, case, and punctuation are preserved.)
+% \item[\ttfamily 0: ] The author's and user's answers are converted to
+% lower case, any white space and non-word characters are removed.
+% \item[\ttfamily 1: ] The author's and user's answers are converted to
+% lower case, any white space is removed.
+% \item[\ttfamily 2: ] The author's and user's answers are stripped of any
+% white space.
+% \end{description}
+% \item[\ttfamily\#3 :] This parameter a number that indicates the compare
+% method to be used. Permissible values of this parameter are
+% \begin{description}
+% \item[\ttfamily 0: ] (The default) The author's and user's answers are
+% compared for an exact match. (These answers are filtered before they are
+% compared.)
+% \item[\ttfamily 1: ] The user's response is searched in an attempt to
+% get a substring match with the author's alternatives. Additional comparison
+% methods may be added.
+% \end{description}
+% \item[\ttfamily\#4 :] Optional, a named destination to the solution to the
+% question. If this parameter appears, then a solution must follow the
+% question, enclosed in a \texttt{solution} environment.
+% \item[\ttfamily\#5 :] This required parameter is the number of alternative
+% answers that are acceptable. The alternative answers are listed
+% immediately after this parameter. (The example above specified
+% that $4$ alternatives follow.)
+% \end{description}
+% \begin{macrocode}
+\newcommand\RespBoxTxtNT{\def\rbFlag{0}\@RespBoxTxt}
+\newcommand\RespBoxTxt{\def\rbFlag{0}\@RespBoxTxt}
+% \end{macrocode}
+% Pick up any parameters that would modify the appearance of this text field.
+% \begin{macrocode}
+\def\RespBoxTxtOnBlur{OnBlurRespBox(%
+ \if\@sqTurnOffAlerts1retn\else null\fi,"\curr@quiz");}
+\def\eqObjAlert{%
+ \ifx\eqQuizType\isQZ\ifx\eq@online\eq@YES\ifeq@noquizsolutions
+ \else if (false)\fi\fi\fi}
+\begin{defineJS}[%
+ \catcode`\@=0\relax\catcode`\%=14\relax]{\AAKqRespBoxTxt}
+if(event.willCommit){
+ RecordPointValue(@eqPTs,@thequestionno@ifx@grpquestions1,%
+@thegrpquestionno,@grpPointValue,@grpTotalWeight,%
+"@grpEvalFunction"@fi);
+ RecordProblemType("@eqQT",@thequestionno);
+ var retn = ProcRespTxt(@rbTxtAlt);
+ ProcUserResp(retn,event.value,@thequestionno,%
+0@ifx@grpquestions1,@thegrpquestionno@fi);
+}
+if (!isQuizInitialized("@currQuiz")) {
+ @eqObjAlert@space eqAppAlert(InitMsg("@bqlabelISO"),3);
+ event.rc = false;
+}
+\end{defineJS}
+\def\RespBoxTxtDefaults
+{%
+ \BC{0 0 0}\W{1}\S{S}\textColor{0 g}\F{\FPrint}%
+}
+\def\moreRespBoxTxtDefaults
+{%
+ \edef\@moreRespBoxTxtDefaults{%
+ \if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions\else
+ \noexpand\Ff{\FfReadOnly}\fi\fi\fi
+ }%
+}
+\def\@@RespBoxTxtActions
+{%
+ \AA{\if\eqQuizType\isQZ
+ \AAKeystroke{\AAKqRespBoxTxt}
+ \else
+ \AAKeystroke{%
+ if(event.willCommit) {\r\t
+ retn = ProcRespTxt(\rbTxtAlt);\r
+\if\@sqTurnOffAlerts1
+ \t\RespBoxTxtOnBlur\r
+\fi
+ }%
+ }
+ \AAOnFocus{\JS{var retn = null;}}
+% \end{macrocode}
+% dps 2/12/05 A fix for Acro7.0, a change in the blur event, must
+% move this event to keystroke so behavior is the same as in previous
+% versions.
+% \begin{macrocode}
+\if\@sqTurnOffAlerts0
+ \AAOnBlur{\JS{\RespBoxTxtOnBlur}}%
+\fi
+ \fi
+ }
+}
+\newcommand\@RespBoxTxt[1][]
+{%
+ \eq@AddProbToQzQuesList
+% \smallskip
+ \ifx\grpquestions\eq@Zero\addtocounter{eqpointvalue}{\eqPTs}\fi
+ \if\eqQuizType\isQZ
+ \def\rbFlag{1}\global\IsRespBoxtrue
+ \ifx\grpquestions\eq@One
+ \stepcounter{grpquestionno}%
+ \def\Fld@name{%
+ grpobj.\curr@quiz.\thequestionno.\thegrpquestionno}%
+ \else
+ \eq@recordThesePTs\eq@recordProbType
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"text"]}%
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\curr@quiz.\thequestionno}%
+ \fi
+ \else
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\oField.\thequestionno}%
+ \fi
+ \moreRespBoxTxtDefaults
+ \leavevmode\hbox\bgroup\text@@Field{#1}{\Fld@name}%
+ {\RBW}{\DefaultHeightOfWidget}%
+ {\eq@protect\AA}{\eq@setWidgetProps\@@RespBoxTxt}%
+ {\RespBoxTxtDefaults\@moreRespBoxTxtDefaults
+ \@@RespBoxTxtActions\every@eqTextField\every@RespBoxTxt}%
+}
+% \end{macrocode}
+% Now get the next two required parameters. Also, see if there is going to be a solution.
+% This can be specified in two ways: (1) By inserting an explicit named destination \texttt{[mydest]}
+% or (2) by specifying a `\texttt*', in which case, automatic naming is performed. The name is
+% \texttt{\string\curr@quiz.\string\thequestionno}, \texttt{[\string\curr@quiz.\string\thequestionno]]} is inserted
+% as the parameter.
+% \medskip\noindent
+% |#1 = filter|, |#2 = comp|
+% \begin{macrocode}
+\def\@@RespBoxTxt#1#2{%
+ \@ifnextchar[{\@@@RespBoxTxt{#1}{#2}}
+ {\@ifstar{\@@@RespBoxTxt{#1}{#2}[\curr@quiz.\thequestionno]}%
+ {\@@@RespBoxTxt{#1}{#2}[]}}}
+% \end{macrocode}
+% |#1 = filter|, |#2 = comp|, |#3 = dest|, |#4 = num_alts|
+% \begin{macrocode}
+\def\eq@ZERO{0}\def\eq@ONE{1}\def\eq@TWO{2}
+\def\@@@RespBoxTxt#1#2[#3]#4{%
+ \xdef\@qzsolndest{#3}%
+ \def\eq@argi{#1}\ifx\eq@argi\eq@ZERO\else
+ \ifx\eq@argi\eq@ONE\else\ifx\eq@argi\eq@TWO\else
+ \def\eq@argi{-1}\fi\fi\fi
+ \def\eq@argii{#2}\ifx\eq@argii\eq@ONE\else\def\eq@argii{0}\fi
+ \begingroup
+ \ifnum\eq@argii=1\relax
+% \end{macrocode}
+% local definitions: \DescribeMacro{\rexpStr}\cs{rexpStr},
+% \DescribeMacro{\\<RegEXP>}|\\|, and \DescribeMacro{\word}\cs{word}.
+% \begin{macrocode}
+ \def\rexpStr##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\\##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\word##1{\\b##1\\b}\def\any{@any@}\fi
+ \xdef\rbTxtAlt{\rbFlag,\eq@argi,\eq@argii}%
+ \global\let\txtAltList\@empty
+ \count0=#4 \ifnum\count0 > 0 \expandafter\@argRead\else
+ \PackageError{exerquiz}{%
+ The fourth required parameter of \string\RespBoxTxt\MessageBreak
+ is required to be a positive integer. You entered\MessageBreak
+ #4\space instead}{Enter a positive integer.}\fi
+}
+\def\@argRead#1{\xdef\jsTempArgs{\txtAltList}%
+ \ifx\txtAltList\@empty\xdef\txtAltList{"#1"}\else
+ \xdef\txtAltList{\jsTempArgs,"#1"}\fi\@@argRead}
+\def\@@argRead{\advance\count0 by-1\relax
+ \ifnum\count0=0\relax
+ \def\eq@next{\endgroup
+ \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}%
+ \if\grpquestions\eq@Zero
+ \ifwithinMCFI
+ \xdef\s@veCorrAnsMCFI{[\txtAltList]}\else
+ \eq@recordCorrAns{[\txtAltList]}\fi
+ \else
+% \end{macrocode}
+% \changes{v7.8a}{2016/11/18}{Fixed a typo, \string\texttt{...AnsArrayi} should be
+% \string\texttt{...AnsGrpAnsArray}}
+% Fixed typo, changed \cs{eq@recordGrpAnsArrayi} to \cs{eq@recordGrpAnsArray}.
+% \begin{macrocode}
+ \eq@recordGrpAnsArray{[\txtAltList]}%
+ \fi
+ \eq@@RespBoxTxt
+ }%
+ \else
+ \def\eq@next{\@argRead}%
+ \fi\eq@next
+}
+\def\eq@@RespBoxTxt{%
+ \ifeq@proofing\makebox[0pt][l]{\space\txt@correctAnswer}\fi
+ \eq@TextField
+% \end{macrocode}
+% Closing of the \cs{hbox} begun above.
+% \begin{macrocode}
+ \egroup
+}
+% \end{macrocode}
+% If the \texttt{proofing} option is specified, then we type out the author's list of
+% acceptable answers. Again, we use \cs{meaning}, probably not needed here.
+% \begin{macrocode}
+\def\gobbleTxt#1>#2,#3,#4,{}
+\gdef\txt@correctAnswer{\ttfamily\color{\@proofingsymbolColor}%
+ \spaceskip=2pt\xspaceskip=2pt
+ \expandafter\gobbleTxt\meaning\rbTxtAlt
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\RespBoxTxtPC}
+% This is pretty much a copy of \cs{RespBoxTxt}, with slight modifications. Here,
+% we attempt to award partial credit for words that appear in the answer.
+% This is a feature request of Kate of Kenya.
+% \par\medskip
+% \noindent Usage:
+%\begin{verbatim}
+% \RespBoxTxt[#1]#2[#3]#4[<num1>]{<word1>}...[<num_n>]{<word_n>}
+%\end{verbatim}
+% \begin{description}
+% \item[\ttfamily\#1 :] Optional parameter used to modify the appearance of the
+% text field.
+% \item[\ttfamily\#2 :] This required parameter is a number that indicates
+% the filtering method to be used. Permissible values of this parameter are
+% \begin{description}
+% \item[\ttfamily -1: ] (The default) The author's and user's answers are not filtered
+% in any way. (Spaces, case, and punctuation are preserved.)
+% \item[\ttfamily 0: ] The author's and user's answers are converted to
+% lower case, any white space and non-word characters are removed.
+% \item[\ttfamily 1: ] The author's and user's answers are converted to
+% lower case, any white space is removed.
+% \item[\ttfamily 2: ] The author's and user's answers are stripped of any
+% white space.
+% \item[\ttfamily 3: ] The author's and user's answers are converted to
+% lower case only. \emph{This is the recommended value for this function.}
+% \end{description}
+% \item[\ttfamily\#3 :] Optional, a named destination to the solution to the
+% question. If this parameter appears, then a solution must follow the
+% question, enclosed in a \texttt{solution} environment.
+% \item[\ttfamily\#4 :] This required parameter is the number of alternative
+% answers that are acceptable. The alternative answers are listed
+% immediately after this parameter. (The example above specified
+% that $4$ alternatives follow.)
+% \end{description}
+% \begin{macrocode}
+\begin{defineJS}[%
+ \catcode`\@=0\relax\catcode`\%=14\relax]{\AAKqRespBoxTxtPC}
+if(event.willCommit){
+ RecordPointValue(@eqPTs,@thequestionno@ifx@grpquestions1,%
+@thegrpquestionno,@grpPointValue,@grpTotalWeight,%
+"@grpEvalFunction"@fi);
+ RecordProblemType("@eqQT",@thequestionno);
+ var retn = ProcRespTxtPC(@rbTxtAlt);
+@ifx@grpquestions1%
+ ProbValue[@thequestionno][3+@thegrpquestionno]%
+=ProcRespTxtPC.txtPCpCr;@else%
+ ProbValue[@thequestionno]=ProcRespTxtPC.txtPCpCr;@fi
+ ProcUserResp(retn,event.value,@thequestionno,0%
+@ifx@grpquestions1,@thegrpquestionno@fi);
+}
+if (!isQuizInitialized("@currQuiz")) {
+ @eqObjAlert@space eqAppAlert(InitMsg("@bqlabelISO"),3);
+ event.rc = false;
+}
+\end{defineJS}
+\def\@@RespBoxTxtPCActions
+{%
+ \AA{\if\eqQuizType\isQZ
+ \AAKeystroke{\AAKqRespBoxTxtPC}
+ \else
+ \AAKeystroke{%
+ if(event.willCommit) {\r\t
+ retn = ProcRespTxtPC(\rbTxtAlt);\r
+\if\@sqTurnOffAlerts1%
+ \t\RespBoxTxtOnBlur\r
+\fi
+ }%
+ }
+ \AAOnFocus{\JS{var retn = null;}}
+\if\@sqTurnOffAlerts0%
+ \AAOnBlur{\JS{\RespBoxTxtOnBlur}}%
+\fi
+ \fi
+ }
+}
+% \end{macrocode}
+% Here is the beginning of \cs{RespBoxTxtPC}.
+% \begin{macrocode}
+\newcommand{\RespBoxTxtPC}{\def\rbFlag{0}\@RespBoxTxtPC}
+\newcommand\@RespBoxTxtPC[1][]
+{%
+ \eq@AddProbToQzQuesList
+ \smallskip\ifx\grpquestions\eq@Zero
+ \addtocounter{eqpointvalue}{\eqPTs}\fi
+ \if\eqQuizType\isQZ\def\rbFlag{1}\global\IsRespBoxtrue
+ \ifx\grpquestions\eq@One
+ \stepcounter{grpquestionno}%
+ \def\Fld@name{%
+ grpobj.\curr@quiz.\thequestionno.\thegrpquestionno}%
+ \else
+ \eq@recordThesePTs\eq@recordProbType
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"text"]}%
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\curr@quiz.\thequestionno}%
+ \fi
+ \else
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\oField.\thequestionno}%
+ \fi
+ \moreRespBoxTxtDefaults
+ \leavevmode\hbox\bgroup\text@@Field{#1}{\Fld@name}%
+ {\RBW}{\DefaultHeightOfWidget}%
+ {\eq@protect\AA}{\eq@setWidgetProps\@@RespBoxTxtPC}%
+ {\RespBoxTxtDefaults\@moreRespBoxTxtDefaults
+ \@@RespBoxTxtPCActions\every@eqTextField\every@RespBoxTxt}%
+}
+\def\@@RespBoxTxtPC#1{\@ifnextchar[{\@@@RespBoxTxtPC{#1}}
+ {\@ifstar{\@@@RespBoxTxtPC{#1}[\curr@quiz.\thequestionno]}%
+ {\@@@RespBoxTxtPC{#1}[]}}}
+\def\@@@RespBoxTxtPC#1[#2]#3{\xdef\@qzsolndest{#2}%
+ \begingroup
+% \end{macrocode}
+% We make special definitions for retrieving the parameters.
+% \begin{macrocode}
+ \def\rexpStr##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\\##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\word##1{\\b##1\\b}\def\any{@any@}
+ \gdef\rbTxtAlt{\rbFlag,#1,1}% force sub-string match
+ \global\let\txtAltList\@empty
+ \count0=#3 \ifnum\count0>0 \expandafter\@argReadPC\else
+ \PackageError{exerquiz}{%
+ The third required parameter of
+ \string\RespBoxTxtPC\MessageBreak
+ is required to be a positive integer.
+ You entered\MessageBreak #3\space instead}
+ {Enter a positive integer.}\fi
+}
+% \end{macrocode}
+% \texttt{\#1=<num>}, partial credit for this answer, \texttt{\#2=word}.
+% \begin{macrocode}
+\newcommand\@argReadPC[2][0]{\xdef\jsTempArgs{\txtAltList}%
+ \ifx\txtAltList\@empty\xdef\txtAltList{["#2",#1]}\else
+ \xdef\txtAltList{\jsTempArgs,["#2",#1]}\fi\@@argReadPC}
+\def\@@argReadPC{\advance\count0 by-1\relax
+ \ifnum\count0=0\relax
+ \def\eq@next{\endgroup
+ \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}%
+ \if\grpquestions\eq@Zero
+ \ifwithinMCFI
+ \xdef\s@veCorrAnsFCFI{[\txtAltList]}\else
+ \eq@recordCorrAns{[\txtAltList]}\fi
+ \else
+ \eq@recordGrpAnsArray{[\txtAltList]}%
+ \fi
+ \eq@@RespBoxTxtPC
+ }%
+ \else
+ \def\eq@next{\@argReadPC}%
+ \fi\eq@next
+}
+\def\eq@@RespBoxTxtPC{%
+ \ifeq@proofing\makebox[0pt][l]{\space\txt@correctAnswer}\fi
+ \eq@TextField
+% \end{macrocode}
+% Closing of the \cs{hbox} begun above.
+% \begin{macrocode}
+ \egroup
+}
+% \end{macrocode}
+% \end{macro}
+%\subsection{Essay Fill-In}
+% \begin{macro}{\RespBoxEssay}
+% Here is a simple text field with a multi-line attribute for entering
+% essay-type questions. This question will not be graded by JavaScript,
+% of course; ideally, the response will be submitted to a CGI for storage
+% in a database. The instructor can later bring up the student's response
+% and assign a grade.
+% \begin{macrocode}
+\def\RespBoxEssayDefaults
+{%
+ \BC{0 0 0}\W{1}\S{S}\Ff{\FfMultiline}\rawPDF{}%
+}
+\def\@@RespBoxEssayActions
+{%
+ \AA{\if\eqQuizType\isQZ
+ \AAKeystroke{%
+ if(event.willCommit){\jsR\jsT
+ RecordPointValue(\eqPTs,\thequestionno);\jsR\jsT
+ RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
+ }\jsR
+ if (!isQuizInitialized("\curr@quiz")) {\jsR\jsT
+ @eqObjAlert\space eqAppAlert(%
+ InitMsg("\bqlabelISO"),3);\jsR\jsT
+ event.rc = false;\jsR
+ }%
+ }%
+ \fi
+ }
+}
+\newcommand\RespBoxEssay[3][]
+{%
+ \smallskip\addtocounter{eqpointvalue}{\eqPTs}%
+ \stepcounter{questionno}%
+ \mbox{\text@@Field{#1}{essay.\curr@quiz.\thequestionno}{#2}{#3}%
+ \edef\eqtmp{\aPointType}\xdef\aPointType{\eqtmp,[\eqPTs,"essay"]}%
+ {\eq@protect\AA}{\eq@setWidgetProps\@@RespBoxEssayActions
+ \eq@TextField}{\RespBoxEssayDefaults\every@eqTextField}}%
+}
+% \end{macrocode}
+% \end{macro}
+%\subsection{Fields that Support the Fill-Ins}
+% \begin{macro}{\sqTallyBox}
+% The \cmd{\sqTallyBox} holds the number of incorrect responses to the
+% question. This box is not required to appear. If it does not
+% appear, use \cmd{\RespBoxNT} to prevent the doc level JavaScript
+% from trying to write a nonexistent text field.
+% \begin{macrocode}
+\let\@@sqTallyBoxActions\@empty
+\@ifundefined{calcOrder}{%
+\ifpdf\def\@@sqTallyBoxActions{%
+ \AA{\AAValidate{getTotalTally("\oField");}}}\fi}{}
+\def\sqTallyBoxDefaults
+{%
+ \BC{0 0 0}\W{1}\textColor{1 0 0 rg}\S{I}\Q{2}\Ff{\FfReadOnly}
+}
+\ifpdf\def\@@sqTallyBoxActions{%
+ \AA{\AAValidate{getTotalTally("\oField");}}}\else
+ \let\@@sqTallyBoxActions\@empty
+\fi
+\newcommand\sqTallyBox[1][]
+{%
+ \mbox{\text@@Field{#1}{tally.\oField.\thequestionno}%
+ {\TBW}{\DefaultHeightOfWidget}%
+ {}{\eq@setWidgetProps\eq@TextField}%
+ {\sqTallyBoxDefaults\@@sqTallyBoxActions\every@eqTextField
+ \every@sqTallyBox}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\sqTallyTotal}
+% This text field stores the tally total. Only used within the
+% \texttt{shortquiz} environment. Takes on optional parameter; this
+% parameter can be used to modify the appearance of the fields.
+% \begin{macrocode}
+\def\sqTallyTotalDefaults
+{%
+ \rawPDF{}\W{1}\BC{0 0 0}\S{I}\textColor{1 0 0 rg}%
+ \Q{2}\Ff{\FfReadOnly}%
+}
+\def\@@sqTallyTotalActions
+{%
+ \AA{%
+ \AAKeystroke{AFNumber_Keystroke(0,0,0,0,"",true);}
+ \AAFormat{AFNumber_Format(0,0,0,0,"",true);}
+ \AACalculate{%
+ AFSimple_Calculate("SUM",new Array("tally.\oField"));
+ }}
+}
+\newcommand\sqTallyTotal[1][]
+{%
+ \mbox{\text@@Field{#1}{tallytotal.\oField}{\TBW}%
+ {\DefaultHeightOfWidget}{\eq@protect\AA}%
+% {\eq@setWidgetProps\eq@calcTextField}%
+ {\eq@setWidgetProps\eq@TextField}%
+ {\sqTallyTotalDefaults\@@sqTallyTotalActions\every@eqTextField
+ \every@sqTallyTotal}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\CorrAnsButton}
+% The \cmd{\CorrAnsButton} is a button macro which, when pressed, will
+% display the correct answer for the user. This button is again
+% optional. This macro takes one parameter and one optional parameter
+%\begin{verbatim}
+%#1 : the correct answer as the user should enter it.
+%\end{verbatim}
+% The value if \texttt{\#1} may be different from the parameter
+% \texttt{\#2} in \cmd{\RespBox}; for example, if the answer is
+% $x^2$, then \texttt{\#2} of \cmd{\RespBox} would be
+% \texttt{pow(x,2)}; but the user would enter |x^2|.
+%
+% The optional parameter is specified by a star * followed by a
+% name of a JavaScript function. The arguments of this JS function
+% is the same as that of DisplayAnswer. For example,
+%\begin{verbatim}
+%\CorrAnsButton{convertFrac('#1','#2')}*{EvalCorrAnsButton}}
+%\end{verbatim}
+% The JavaScript function might be
+%\begin{verbatim}
+%function EvalCorrAnsButton(fieldname,theanswer)
+%{
+% theanswer = eval(theanswer);
+% DisplayAnswer(fieldname,theanswer);
+%}
+%\end{verbatim}
+% Here, we call a function to evaluate the answer for us.
+% \begin{macrocode}
+\def\CorrAnsButtonDefaults
+{%
+ \CA{\eq@local@CorrAnsButton}\W{1}\S{S}
+ \BC{0 0 0}\BG{.7529 .7529 .7529}\H{P}
+}
+\def\normalCABtnBC{0 0 0}
+ \def\qCorrAnsButtonActionHook
+ {%
+ \JS{%
+ \ifx\@qzsolndest\@empty\else
+ if (event.shift)\jsR\jsT
+ this.gotoNamedDest("\@qzsolndest");\jsR
+ else\jsR\jsT
+ \fi
+ \processJSfunc("Ans.\curr@quiz","\CorrectAns",\currQuiz);
+ }%
+ }
+ \def\sqCorrAnsButtonActionHook
+ {%
+ \JS{%
+% \end{macrocode}
+% Allow local definition the reset color for response boxes. The reset color
+% is normally black (\cs{eqDefaultColor}). Now if \cs{sqCorrAnsResetBC} is none
+% empty, we put it in as a property of the \cs{oField} object.
+% \begin{macrocode}
+ \ifx\@qzsolndest\@empty\else
+ if (event.shift)\jsR\jsT
+ this.gotoNamedDest("\@qzsolndest");\jsR
+ else\jsR\jsT
+ \fi
+ \processJSfunc("obj.\oField.\thequestionno","\CorrectAns",%
+\currQuiz);
+ }%
+ }
+\newcommand\CorrAnsButton[1][]{\eq@@CorrAnsButton{#1}}
+\def\eq@@CorrAnsButton#1#2{\bgroup\makeJSspecials % 1/12
+ \@ifstar{\eq@@@CorrAnsButton{#1}{#2}}{%
+ \eq@@@CorrAnsButton{#1}{#2}{DisplayAnswer}}%
+}
+\def\eq@@@CorrAnsButton#1#2#3{\gdef\CorrectAns{#2}%
+ \def\processJSfunc{#3}%
+ \ifx\eq@ProcRespIntervals\g@processJSfunc % 01/11
+ \let\@inmathwarn@SAVE\@inmathwarn\let\@inmathwarn\@gobble
+% \end{macrocode}
+% When the response function is \texttt{ProcRespIntervals}, there may be unbalanced parentheses, we'll
+% pass \cs{CorrectAns} through \cs{pdfstringdef} to escape them.
+% \begin{macrocode}
+ \pdfstringdef{\CorrectAns}{\CorrectAns}%
+ \let\@inmathwarn\@inmathwarn@SAVE\fi
+ \if\eqQuizType\isQZ\def\Fld@name{corr.\curr@quiz.\thequestionno}%
+ \else\def\Fld@name{corr.\oField.\thequestionno}\fi
+ \if\eqQuizType\isQZ
+ \edef\@@CorrAnsButtonActions{\noexpand\F{\FHidden}%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}%
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\qCorrAnsButtonActionHook}}%
+ \ifeq@noquizsolutions\else
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonDefaults\@@CorrAnsButtonActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
+ \else
+ \edef\@@CorrAnsButtonActions{%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\sqCorrAnsButtonActionHook}}%
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonDefaults\@@CorrAnsButtonActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
+ \egroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\sqClearButton}
+% This button will clear the tallyfields and change the color of
+% the \cmd{\RespBox} back to \cmd{\defaultColorJS}. The button clears the fields
+% based on the current value of \cmd{\oField}. This text macro is
+% given its value when the optional parameter in the
+% \texttt{shortquiz} environment is specified.
+%\changes{v6.3g}{2008/10/13 }
+%{%
+% Fixed a problem with the clear button not setting the boundary color
+% back to the default. I must have changed the name of an objective field,
+% now, we say \texttt{this.getField("obj.\cs{oField}")}.
+%}
+% \begin{macrocode}
+\def\sqClearButtonDefaults
+{%
+ \CA{\eq@local@sqClearButton}\textColor{0 g}\F{\FPrint}
+ \BC{0 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}\Ff{\FfNoExport}
+}
+% \end{macrocode}
+% In an attempt to supply some custom colors for the shortquiz, we
+% define \cmd{\sqRespBoxResetColor}. It determines the clear
+% \begin{macrocode}
+\def\@@sqClearButtonActions
+{%
+ \A{\JS{ProcessIt = false;\jsR
+ if ( typeof \oField\space== "undefined" )\jsR\jsT
+ \oField\space= new Object;\jsR
+ if (typeof appAlerts["\oField"] == "undefined")\jsR\jsT
+ appAlerts["\oField"] = new Object;\jsR
+ this.resetForm(new Array("mc.\oField","obj.\oField",%
+ "tally.\oField","grpobj.\oField"));\jsR
+ var f = this.getField("obj.\oField");\jsR
+% \end{macrocode}
+% Here, we give the user an opportunity to designate the color
+% of the response boxes when they are reset by the \cs{sqClearButton}.
+% The default is to use \cs{eqDefaultColor}.
+% \begin{macrocode}
+ if ( f != null ) f.strokeColor=\ifx\defaultColorJSLoc\@empty
+\defaultColorJS\else\defaultColorJSLoc\fi;\jsR
+ f = this.getField("grpobj.\oField");\jsR
+ if ( f != null ) f.strokeColor=\ifx\defaultColorJSLoc\@empty
+\defaultColorJS\else\defaultColorJSLoc\fi;\jsR
+ f = this.getField("rbmarkup.\oField");\jsR
+ if ( f != null ) f.display=display.hidden;\jsR
+ \oField.Grp = {};\jsR
+ appAlerts["\oField"].bAfterValue=false;\jsR
+ ProcessIt=true;}%
+ }
+}
+\newcommand\sqClearButton[1][]
+{%
+ \mbox{\push@@Button{#1}{clear.\oField}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\sqClearButtonDefaults\@@sqClearButtonActions\every@ButtonField
+ \every@sqClearButton}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@PromptButton}
+% The \cs{@PromptButton} is used to create a ``progressive-style'' question (for math fill-in).
+% Some series of questions build on one another. You can use this button to show the solution
+% for one problem, so the student can try the next problem. On clicking on the prompt button,
+% the student cannot enter another answer in the text field, and the input that is already
+% there will be the one that is counted has the student's response.
+% \begin{macrocode}
+\def\PromptButtonDefaults
+{%
+ \CA{\eq@local@CorrAnsButton}\W{1}\S{S}\BC{0 0 0}
+ \BG{.7529 .7529 .7529}\H{P}
+}
+\newcommand{\promptButtonMsg}{%
+ "Would you like to see the correct answer at this time? "\r\t\t
+ + "Your current answer will be the one that will be scored. "\r\t\t
+ + "If you click on \\"Yes\\",
+ you will not be able to change your answer."
+}
+\newcommand{\AnsPromptBtnStr}{Answer:\space}
+\def\PromptButtonActionHook
+{%
+ \JS{%
+ if (!isQuizInitialized("\currQuiz")) {\r\t
+ eqAppAlert(InitMsg("\bqlabelISO"),3);\r\t
+ event.rc=false;\r
+ } else {\r\t
+ if ( !\currQuiz.oAlertCheck.bAfterValue ) {\r\t
+ var resp=eqAppAlert({\r\t\t
+ cMsg:\promptButtonMsg,\r\t\t
+ nIcon: 2, nType: 2,\r\t\t
+ cTitle: ("AcroTeX Prompt Message"),\r\t\t
+ oCheckbox: \currQuiz.oAlertCheck\r\t
+ });\r\t
+ }\r
+% \end{macrocode}
+% Correction to the if condition below
+% \changes{v7.8d}{2017/01/11}{Correction to the if condition in \string\cs{PromptButtonActionHook}}
+% \begin{macrocode}
+ if ( promptQuiz.oAlertCheck.bAfterValue || resp==4 )\r\t
+ {\r\t\t
+ var field=this.getField(%
+ "obj.\currQuiz.\thequestionno");\r\t\t
+ field.readonly=true;\r\t\t
+ field=this.getField("Ans.\currQuiz");\r\t\t
+ if (field!=null)
+ field.value = "\AnsPromptBtnStr\PromptAns";\r\t
+ }\r
+ }
+ }%
+}
+% \end{macrocode}
+% This button takes the standard two arguments
+% \begin{flushleft}
+% \texttt{\#1}: Optional parameters to change the appearance of the field\\
+% \texttt{\#2}: Prompt answer
+% \end{flushleft}
+% \begin{macrocode}
+\newcommand\@PromptButton[2][]
+{%
+ \def\PromptAns{#2}\if\eqQuizType\isQZ
+ \def\Fld@name{promptButton.\curr@quiz.\thequestionno}%
+ \else\def\Fld@name{promptButton.\oField.\thequestionno}\fi
+ \if\eqQuizType\isQZ
+ \def\@@PromptButtonActions{%
+ \A{\PromptButtonActionHook}}%
+ \mbox{\push@@Button{#1}{\Fld@name}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\PromptButtonDefaults\@@PromptButtonActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \else\PackageWarning{exerquiz}{The \string\PromptButton
+ is for quiz questions only.}
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro{\PromptButton} is the default definition of the \cs{PromptButton},
+% it can be redefined. The \cs{CorrectAns} command is defined in the
+% \cs{CorrAnsButton} as the answer provided by the author.
+% \begin{macrocode}
+\newcommand{\PromptButton}{\makebox[0pt][r] % assumes xcolor
+ {\@PromptButton[\textColor{1 0 0 rg}]{\CorrectAns}}}
+% \end{macrocode}
+% \begin{environment}{mathGrp}
+% An environment for enclosing a collection of math/text fill-ins that are to be grouped
+% together. This grouping should not cross a begin or end of another environment, or include more
+% an \cs{item}. This environment has two optional arguments:
+%\begin{description}
+% \item[\texttt{[\#1]}] : total weight (needed when sum of weight is greater than total number of points
+% \item[\texttt{[\#2]}] : evaluation function, a JavaScript function to evaluate the user's responses.
+% The default evaluation function is \texttt{groupEval}.
+%\end{description}
+% The way the parsing of the parameters works out, to specify \texttt{\#1}, you must specify
+%\texttt{\#2}.
+% \begin{macrocode}
+\let\eq@ansGrpArray\@empty
+\def\eq@recordGrpAnsArray#1{%
+ \ifx\eq@ansGrpArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\eq@ansGrpArray{#1}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\eq@ansGrpArray{,#1}}\fi
+ \tmp@exp
+}
+\let\grpquestions\eq@Zero
+\def\mathGrp{\global\let\eq@ansGrpArray\@empty
+ \@ifnextchar[{\@imathGrp}{\@imathGrp[groupEval]}}
+\def\@imathGrp[#1]{\def\argi{#1}%
+ \@ifnextchar[{\@iimathGrp}{\@iimathGrp[]}}
+\def\@iimathGrp[#1]{\def\argii{#1}%
+ \eq@AddProbToQzQuesList
+ \global\let\grpquestions\eq@One
+ \setcounter{grpquestionno}{0}%
+ \stepcounter{questionno}%
+ \xdef\beginGrp{\thequestionno}%
+ \xdef\grpPointValue{\eqPTs}%
+ \eq@recordThesePTs\eq@recordProbType
+ \if\eqQuizType\isQZ
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"grp"]}\fi
+ \addtocounter{eqpointvalue}{\eqPTs}%
+ \ifx\argii\@empty
+ \xdef\grpTotalWeight{\eqPTs}%
+ \xdef\grpEvalFunction{\argi}%
+ \else
+ \xdef\grpTotalWeight{\argi}%
+ \xdef\grpEvalFunction{\argii}%
+ \fi
+}
+\def\endmathGrp{\global\let\grpquestions\eq@Zero
+ \eq@recordCorrAns{[\eq@ansGrpArray]}%
+ \xdef\endGrp{\thequestionno}}
+% \end{macrocode}
+% \end{environment}
+% \begin{macro}{\CorrAnsButtonGrp}
+% The correct answer button for grouped questions.
+% \begin{macrocode}
+\def\CorrAnsButtonGrpDefaults
+{%
+ \CA{\eq@local@CorrAnsButton}\W{1}\S{S}\BC{0 0 0}
+ \BG{.7529 .7529 .7529}\H{P}
+}
+\def\CorrAnsButtonGrpActionHook{\JS{%
+\ifx\@qzsolndest\@empty\else
+ if (event.shift)\jsR\jsT
+ this.gotoNamedDest("\@qzsolndest");\jsR
+ else\jsR
+\fi
+ {\jsR\jsT
+ var aCorrectAns=\CorrectAns;\jsR\jsT
+ var beginGrp = 1;\jsR\jsT
+ grpOffset = beginGrp;\jsR\jsT
+% if ( typeof \currQuiz == "undefined" ) {\jsR\jsT\jsT
+% \currQuiz = new Object;\jsR\jsT\jsT
+% \currQuiz.Grp = {};\jsR\jsT
+% }\jsR\jsT
+ if ( \currQuiz.Grp==null ) \currQuiz.Grp = {};\jsR\jsT
+ if (typeof \currQuiz.Grp["\thequestionno"]=="undefined")\jsR\jsT
+ {\jsR\jsT\jsT
+ \currQuiz.Grp["\thequestionno"] = {offset: 0};\jsR\jsT\jsT
+ var f = this.getField(%
+ "grpobj.\curr@quiz.\thequestionno."
+ + grpOffset)\jsR\jsT\jsT
+% \end{macrocode}
+% When the field is readonly, then we cannot set the focus. We'll remove the readonly, set focus, then
+% reset readonly to true again; however, we must wait a little for \texttt{setFocus} to finish.
+% \begin{macrocode}
+ if ( f.readonly ) {\jsR\jsT\jsT
+ f.readonly = false;\jsR\jsT\jsT
+ f.setFocus();\jsR\jsT\jsT
+ eqDelay = app.setTimeOut(%
+ "f.readonly = true;
+ app.clearTimeOut(eqDelay);",10);\jsR\jsT
+ } else f.setFocus();\jsR\jsT
+ }\jsR\jsT
+ else \jsR\jsT
+ {\jsR\jsT\jsT
+ \currQuiz.Grp["\thequestionno"].offset =
+ ++\currQuiz.Grp["\thequestionno"].offset
+ \% aCorrectAns.length;\jsR\jsT\jsT
+ grpOffset = beginGrp
+ + \currQuiz.Grp["\thequestionno"].offset;\jsR\jsT\jsT
+ var f = this.getField("grpobj.\curr@quiz.\thequestionno."
+ + grpOffset);\jsR\jsT\jsT
+ if ( f.readonly ) {\jsR\jsT\jsT
+ f.readonly = false;\jsR\jsT\jsT
+ f.setFocus();\jsR\jsT\jsT
+ eqDelay = app.setTimeOut("f.readonly = true;
+ app.clearTimeOut(eqDelay);",10);\jsR\jsT
+ } else f.setFocus();\jsR\jsT
+ }\jsR\jsT
+\if\eqQuizType\isQZ
+ DisplayAnswer("Ans.\curr@quiz",
+ aCorrectAns[\currQuiz.Grp["\thequestionno"].offset],%
+\currQuiz);
+%\ifx\sqCorrAnsResetBC\@empty\else,\currQuiz\fi);\jsR
+\else
+% \end{macrocode}
+% Allow local definition the reset color for response boxes. The reset color
+% is normally black (\cs{eqDefaultColor}). Now if \cs{sqCorrAnsResetBC} is none
+% empty, we put it in as a property of the \cs{oField} object.
+% \begin{macrocode}
+%\ifx\sqCorrAnsResetBC\@empty\else
+% if ( typeof \oField=="undefined")\jsR\jsT\jsT
+% var \oField = new Object;\jsR\jsT
+% \oField.CorrAnsResetBC=\sqCorrAnsResetBC;\jsR\jsT
+%\fi
+ DisplayAnswer("grpobj.\oField.\thequestionno."+ grpOffset,
+ aCorrectAns[\currQuiz.Grp["\thequestionno"].offset],%
+\oField);\jsR
+\fi
+ }
+}}
+\newcommand\CorrAnsButtonGrp[2][]
+{%
+ \makeStringArray{#2}%
+ \edef\CorrectAns{\stringArray}%
+ \if\eqQuizType\isQZ\def\Fld@name{corr.\curr@quiz.\thequestionno}%
+ \else\edef\currQuiz{\oField}%
+ \def\Fld@name{corr.\oField.\thequestionno}\fi
+ \if\eqQuizType\isQZ
+ \edef\@@CorrAnsButtonGrpActions{\noexpand\F{\FHidden}%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\CorrAnsButtonGrpActionHook}}%
+ \ifeq@noquizsolutions\else
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonGrpDefaults\@@CorrAnsButtonGrpActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
+ \else
+ \edef\@@CorrAnsButtonGrpActions{%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\CorrAnsButtonGrpActionHook}}%
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonGrpDefaults\@@CorrAnsButtonGrpActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
+}
+\def\makeStringArray#1{\def\stringArray{[}\@makeStringArray#1,\@nil}
+\def\@makeStringArray#1,#2\@nil{%
+ \edef\eq@temp{\stringArray}\def\argii{#2}%
+ \ifx\argii\@empty
+ \edef\stringArray{\eq@temp"#1"]}%
+ \def\eq@next{}%
+ \else
+ \edef\stringArray{\eq@temp"#1",}%
+ \def\eq@next{\@makeStringArray#2\@nil}%
+ \fi
+ \eq@next
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Quiz Summary Tables}
+%
+% This code is designed for use with a \texttt{quiz}, as opposed to a
+% \texttt{shortquiz}. Insert the command \cs{displaySumryTbl} after the
+% end of the quiz, but before \verb!\end{quiz}!. The expansion of
+% \cs{displaySumryTbl} is a table summarizing the user's effort on the
+% quiz, indicating which questions had responses, and which did not.
+%\par\medskip\noindent
+% (06/08/10) We define \cs{eq@AddProbToQzQuesList}, which adds the current question label to
+% the list \cs{eqQzQuesList}. The command \cs{@eqListExp} is initially defined
+% to be \cs{relax} and is redefined just before \cs{eqQzQuesList} is expanded.
+% \begin{macrocode}
+\let\@eqListExp\relax
+\let\@currentQues\@empty
+\let\eqQzQuesList\@empty
+\def\eq@AddProbToQzQuesList{%
+ \edef\eq@tmpExp{\noexpand\g@addto@macro%
+ \noexpand\eqQzQuesList{%
+ \noexpand\@eqListExp{\@currentQues}{\thepage}}}%
+% \end{macrocode}
+% We add to the list only if we are not within a \texttt{mathGrp} environment.
+% \begin{macrocode}
+ \ifx\grpquestions\eq@Zero\eq@tmpExp\fi
+}
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+%<*sumrytbls>
+% \end{macrocode}
+% The command below is convenience command to concatenate the current quiz with
+% another string. The reason the parameter is enclosed in parenthesis is that
+% the command is (sometimes) executed in a limited verbatim environment were the
+% catcodes of our friendly braces have been changed.
+% \begin{macrocode}
+\def\ccatCurrQzWith(#1){\currQuiz#1}
+% \end{macrocode}
+% This is the JavaScript action for the push button \cs{pbPopulateSumTable}.
+% The code is activated when the page becomes visible. The code reads through
+% the Responses array and determines which questions were answered, and checks
+% the appropriate box. (Version 6 or greater)
+% \begin{macrocode}
+% \end{macrocode}
+% This zero width/height push button is hidden at the top of the table. When
+% the page that contains the button, the JS is executes.
+% \begin{macrocode}
+\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}}
+% \end{macrocode}
+% (2013/12/29) Here are some ideas to think about. Each change in the response to a question
+% can execute the following code. I've put the needed information in the tooltip
+% above, the code below extracts this information and calls \texttt{popVisitsTbl}
+% in this way, the summary need to be required to appear on separate page.
+%\begin{verbatim}
+%f=this.getField("\currQuiz activateSC");
+%v=f.userName
+%v=v.split(",")
+%popVisitsTbl.apply(null,v)
+%\end{verbatim}
+% \begin{macrocode}
+\def\pbDoNoCorrectSumryTbl{\makebox[0pt][l]{\pushButton[\F{\FHidden}]%
+ {\currQuiz NoCorrections}{0pt}{0pt}}}
+% \end{macrocode}
+% A scratch counter to count the number of row entries we have created.
+% \begin{macrocode}
+\newcount\eq@rowcnt
+% \end{macrocode}
+% \begin{macro}{\sumryTblQ}
+% \begin{macro}{\sumryTblR}
+% \begin{macro}{\sumryTblP}
+% Through these commands, the author can change the title headings of the summary table.
+% \begin{macrocode}
+\newcommand{\sumryTblQ}{Question}
+\newcommand{\sumryTblR}{Responded}
+\newcommand{\sumryTblP}{Page}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\displaySumryTbl}
+% Place this command between the end of the quiz \textbf{on a new page} (after the closing of the
+% last \texttt{questions} environment and before \verb!\end{quiz}!.
+%
+% The \cs{displaySumryTbl} takes two parameters, one optional and one required.
+%\begin{description}
+% \item[{[\texttt{\#1}]}] is optional and takes key-value pairs
+% \begin{itemize}
+% \item \texttt{ntables}\IndexKey{ntables} is a key that has a value of 1, 2, or 3, the default is determined by
+% \cs{smrytbl@ntables}, which is set to 2 in this package. If
+% \texttt{ntables=1} only one table is created, and if \texttt{ntables=2}
+% two tables are created, each containing half the information.
+% \item \texttt{showmarkup}\IndexKey{showmarkup}: If this switch is true, then markup fields are
+% created that will hold the number of points the student received for
+% each problem. The default is there is no markup. Entering
+% \texttt{showmarkup} in the option list will generate the markup fields.
+% \item \texttt{nocorrections}\IndexKey{nocorrections}: If this switch is true, corrections will not
+% be shown when the user presses the `End Quiz' button.
+% \item \texttt{showOutOf}\IndexKey{showOutOf}: if taken the point and total points for the problem are displayed.
+% For example, `2 of 5 pts'.
+% \item \texttt{setDimens}\IndexKey{setDimen} is a key to pass its value within group created by
+% the command \cs{displaySumryTbl}. Use it to use the conditional switches to set the
+% dimensions of the markup text fields, color declarations, font declarations, etc.
+% None of it should take up space of any kind.
+% \end{itemize}
+% \item[\texttt{\#2}] is the quiz this table represents, usually this is \cs{currQuiz}.
+%\end{description}
+% \begin{macrocode}
+\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]}
+% \end{macrocode}
+% Finally we come to the definition of \cs{displaySumryTbl}.
+% \begin{macrocode}
+\newcommand{\displaySumryTbl}[2][]{%
+ \begingroup\edef\currQuiz{#2}\edef\oField{#2}\edef\curr@quiz{#2}%
+ \setkeys{smrytbl}{#1}%
+ \count0=\smrytbl@ntables
+% \end{macrocode}
+% We accept only 1 or 2 as an argument, we put it in \cs{count0},
+% if not an integer, we'll stop the compile. If the argument is not 1,
+% we force a value of 2.
+% \begin{macrocode}
+% \ifnum\count0=1\relax\else\count0=2\relax\fi
+ \eq@rowcnt=0\relax\@tempcntb=\value{questionno}%
+% \end{macrocode}
+% We calculate the number of rows in the first column, in case
+% of a two column table. When the number of questions is odd,
+% the the left-hand table will have one more entry than the right-hand
+% column.
+% \begin{macrocode}
+ \ifnum\count\z@=2\relax
+ \divide\@tempcntb2\relax
+ \advance\@tempcntb\ifodd\value{questionno}2\else1\fi
+ \xdef\@beginSecCol{\the\@tempcntb}%
+ \advance\@tempcntb-1\relax
+ \fi
+% \end{macrocode}
+% Three table support
+% \begin{macrocode}
+ \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
+% \end{macrocode}
+% We \cs{let} \cs{@eqListExp} to \cs{@@eqListExp}, defined below.
+% \begin{macrocode}
+ \let\@eqListExp\@@eqListExp
+% \end{macrocode}
+% \dots and expand the token list \cs{eqQzQuesList}.
+% \begin{macrocode}
+ \eqQzQuesList
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \paragraph*{Construction of the table.} The construction is performed by \cs{@eqListExp}.
+% This is a definition of \cs{@eqListExp}. It appears in the
+% token list \cs{eqQzQuesList}. A typical entry in \cs{eqQzQuesList} is
+% of the form
+%\begin{verbatim}
+% \@eqListExp{<question_label>}{\thepage}
+%\end{verbatim}
+% We use the two arguments to construct a table of three columns: Question (consisting
+% of the question label); Responded (a checkbox that is checked if that question was answered);
+% and Page (a hypertext link to the page containing he question). The command may be redefined
+% to as needed.\medskip\par\noindent
+% \textbf{Column headings} are defined by \cmd{\eq@begintab}.
+% This can be redefined. We begin a \texttt{tabular} with
+% headings (may be redefined).
+% \begin{macrocode}
+\def\eq@begintab{%
+ \begin{tabular}[t]{lcc}\sumryTblQ&\sumryTblR&\sumryTblP\\\sthline
+ {\Large\strut}%
+}
+% \end{macrocode}
+% \DescribeMacro{\sthline}\cmd{\sthline}
+% is a user hook to change the appearance of the horizontal line, such
+% as adding color.
+% \begin{macrocode}
+\def\sthline{\hline}
+% \end{macrocode}
+% End of the \texttt{tabular}.
+% \begin{macrocode}
+\def\eq@endtab{\end{tabular}}
+% \end{macrocode}
+% \cs{@@eqListExp} is \cs{let} to \cs{@eqListExp} in \cs{displaySumryTbl}.
+% \begin{macrocode}
+\def\sumrytblCkMUsep{\kern3bp}
+\def\sumrytbllinkHook#1{#1}
+% \end{macrocode}
+% \textbf{First Column.} \DescribeMacro{\sumryTblProbFmt}\cmd{\sumryTblProbFmt}
+% sets the {\LaTeX} formatting for the problem numbers that appear in the
+% first column of the table.
+% \begin{macrocode}
+\newcommand{\sumryTblProbFmt}[1]{\textbf{\textcolor{blue}{#1}}}
+% \end{macrocode}
+% A macro to set the separation between the tables.
+% \begin{macrocode}
+\newcommand{\sumrytablesep}{\space}
+% \end{macrocode}
+% We supply basic controls for the text field, width (\DescribeMacro{\stmarkupWidth}\cmd{\stmarkupWidth}),
+% height (\DescribeMacro{\stmarkupHeight}\cmd{\stmarkupHeight}), and text size
+% (\DescribeMacro{\stmarkupTextSize}\cmd{\stmarkupTextSize})
+% \begin{macrocode}
+\def\stmarkupWidth{12bp}\def\stmarkupHeight{9bp}\def\stmarkupTextSize{0}
+% \end{macrocode}
+% \textbf{Second column.} The second column of the table consisting of a checkbox
+% and stMarkup text field.
+% \begin{macrocode}
+\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}%
+% \end{macrocode}
+% Key to being able to have duplicated summary fields with different \texttt{showOutOf}
+% options is the naming of the text field. If \texttt{showOutOf=false}, the default,
+% the field name is \cs{currQuizSanityCheckPts}, but if \texttt{showOutOf=true}, the
+% text field is named \cs{currQuizSanityCheckOOPts}. When the Correct button is pressed,
+% the JavaScript function \texttt{correctSumryTbl()} checks for the existence of each of
+% these two fields, and populates them properly formatted. The command \cs{stfmtType} is
+% either \cs{empty} or \cs{OO}.
+% \begin{macrocode}
+ ]{\ccatCurrQzWith(SanityCheck\stfmtType Pts).\the\eq@rowcnt}%
+ {\stmarkupWidth}{\stmarkupHeight}}\fi
+}
+% \end{macrocode}
+% \textbf{Third column.} The third column of the table consisting of a link to the
+% page that contains the question.
+% \begin{macrocode}
+\def\st@thrdclmn#1{%
+ \setLink[\linktxtcolor{\@linkcolor}
+ \A{\JS{this.pageNum=(#1-1)}}]{\sumrytbllinkHook{#1}}}
+% \end{macrocode}
+% Now for the definition of \cs{@@eqListExp} which does the work in the table.
+% \begin{macrocode}
+\def\@@eqListExp#1#2{\global\advance\eq@rowcnt1\relax
+% \end{macrocode}
+% If it is the first row, we insert the push button that will activate
+% when the page becomes visible, and we expand \cs{eq@begintab}, which
+% is a \texttt{tabular} environment.
+% \begin{macrocode}
+ \ifnum\eq@rowcnt=1\relax
+ \pbPopulateSumTable\ifsmrytbl@corrections\else
+ \pbDoNoCorrectSumryTbl\fi\expandafter\eq@begintab\fi
+% \end{macrocode}
+% If it is the two table solution, and the row number equals the calculated
+% value of the first row of the second table, we emit another
+% \cs{eq@begintab}.
+% \begin{macrocode}
+ \ifnum\count0>1 \ifnum\eq@rowcnt=\@beginSecCol\relax
+ \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
+% \end{macrocode}
+% We layout a row of the table, problem label, checkbox, and page.
+% \begin{macrocode}
+ \sumryTblProbFmt{#1}&\st@scndclmn&\st@thrdclmn{#2}\\[1bp]
+% \end{macrocode}
+% We set the \cs{eq@endtab} at the bottom of the first table,
+% and at the bottom of the second table.
+% \begin{macrocode}
+% \ifnum\count0=2 \ifnum\eq@rowcnt=\@tempcntb
+% \expandafter\eq@endtab\fi\fi
+ \ifnum\eq@rowcnt=\thequestionno\relax\expandafter\eq@endtab\fi
+}
+% \end{macrocode}
+%
+% \subsection{Duplicating the Summary Table elsewhere}
+%
+% \begin{macro}{\writeProListAux}
+% This command writes the information essential to the creation of
+% the quiz summary table (\cs{displaySumryTbl}), and should be
+% placed after the final question, and before the `End Quiz'. The purpose
+% is to write the info to the auxiliary file so the table can be
+% constructed elsewhere, for example, at the beginning of the quiz, or
+% wherever desired. The command writes two macros to the aux file,
+% \verb!\csname \currQuiz QzQuesList\endcsname! that contains the token
+% list of problems using by the table, and
+% \verb!\csname \currQuiz nQuestions\endcsname! that contains the
+% total number of questions.
+% \begin{macrocode}
+\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}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\def\setParamSumryTblAux{%
+ \edef\eqQzQuesList{\@nameuse{\currQuiz QzQuesList}}%
+ \@ifundefined{\currQuiz nQuestions}{}{%
+ \value{questionno}=\@nameuse{\currQuiz nQuestions}}%
+}
+% \end{macrocode}
+% \begin{environment}{sumryTblAux}
+% Normally, we use \cs{displaySumryTbl} right after the last question, and before
+% the `End Quiz.' It is possible to display a summary table elsewhere, perhaps at the beginning
+% of the quiz, on the first page, wherever. Assuming \cs{writeProListAux} jas beem
+% inserted after the last question and before `End Quiz', you can then use the
+% \texttt{sumryTblAux} environment to place the same table in another location. For example,
+%\begin{verbatim}
+% \begin{sumryTblAux}{demoQuiz}
+% \begin{center}
+% {\normalsize\sffamily\bfseries Quiz Summary Table}\\[3pt]
+% \displaySumryTbl[showmarkup]{\currQuiz}
+% \end{center}
+% \end{sumryTblAux}
+%\end{verbatim}
+% The environment takes one parameter, the quiz name that this table
+% represents. It uses \cs{setParamSumryTblAux} to set the appropriate
+% variables that \cs{displaySumryTbl} uses.
+%
+% This environment \emph{is required} if the table appears outside the scope of the
+% quiz.
+% \begin{macrocode}
+\newenvironment{sumryTblAux}[1]{%
+ \DeclareQuiz{#1}\setParamSumryTblAux}{}%
+% \end{macrocode}
+% \end{environment}
+% \begin{macrocode}
+%</sumrytbls>
+% \end{macrocde}
+% \subsection{Posing MC/math fill-in questions}
+% \begin{macrocode}
+%<*mcfi>
+\def\bMCFI{%
+ \withinMCFItrue
+ \ifx\qRadionActionsHook\@empty
+ \let\qRadionActionsHook@SAVE\@empty
+ \def\qRadionActionsHook{\jsR
+ qRadioButtonMCFI(\Ans@choice,"\currQuiz",\thequestionno);}\else
+ \let\qRadionActionsHook@SAVE\qRadionActionsHook
+ \def\qRadionActionsHook{\qRadionActionsHook@SAVE\jsR
+ qRadioButtonMCFI(\Ans@choice,"\currQuiz",\thequestionno);}\fi
+ \ifx\every@RespBoxMath\@empty
+ \let\every@RespBoxMath@SAVE\@empty
+ \def\every@RespBoxMath{%
+ \AddAAKeystroke{mcfiKeyStroke("\currQuiz",\thequestionno);}}%
+ \else
+ \let\every@RespBoxMath@SAVE\every@RespBoxMath
+ \expandafter\def\expandafter\every@RespBoxMath\expandafter{%
+ \every@RespBoxMath@SAVE
+ \AddAAKeystroke{mcfiKeyStroke("\currQuiz",\thequestionno);}}%
+ \fi
+}
+\def\eMCFI{%
+ \ifx\qRadionActionsHook@SAVE\@empty
+ \let\qRadionActionsHook\@empty\else
+ \let\qRadionActionsHook\qRadionActionsHook@SAVE\fi
+ \ifx\every@RespBoxMath@SAVE\@empty
+ \let\every@RespBoxMath\@empty\else
+ \let\every@RespBoxMath\every@RespBoxMath@SAVE\fi
+ \withinMCFIfalse
+}
+\def\eqNA{-43252452452}
+\@ifundefined{text}{\let\MCFIMarkup@BOX\mbox}{\let\MCFIMarkup@BOX\text}
+\newcommand\mcfiMarkupfmt{\cgBdry
+ ${}^{\MCFIMarkup@BOX{\aeb@creditmarkup}}$}
+\def\mcfiMarkup{\addtocounter{questionno}{-1}\mcfiMarkupfmt
+ \stepcounter{questionno}}
+%</mcfi>
+%<*package>
+% \end{macrocode}
+% \section{Input Language definitions and JS}
+% Here is were we make the redefinitions of the above commands if
+% a language option is specified.
+% \begin{macrocode}
+\LangRedefinitions
+% \end{macrocode}
+% We introduce the document-level JavaScript for exerquiz at this point.
+% \begin{macrocode}
+\input{aebjs.def}
+% \end{macrocode}
+% If the \texttt{usesumrytbls} option is taken, we input the code.
+% \begin{macrocode}
+\inputSumryTblCode
+% \end{macrocode}
+% If the \texttt{usemcfi} option is taken, we input the code.
+% \begin{macrocode}
+\inputMCFICode
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \section{eForms Support}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% \begin{macro}{\solutionColor}
+% This color is introduced at the pdfmark/rawPDF level. Define
+% the color without commas. For example |\solutionColor{0 .6 0}|
+% \begin{macrocode}
+\newcommand{\solutionColor}[1]{\def\eq@argi{#1}\ifx\eq@argi\@empty
+ \def\solution@Color{\solutionColorDef}\else
+ \def\solution@Color{#1}\fi}
+\newcommand{\solutionColorDef}{0 .6 0}
+\solutionColor{\solutionColorDef}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</package>
+%<*eqcolor>
+% \end{macrocode}
+%
+% \subsection{Color support}
+%
+% \begin{macrocode}
+\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}
+% \end{macrocode}
+% We test for raw JS color in two ways, look for \texttt{["} or look for \texttt{co}
+% as the first two tokens.
+% \begin{macrocode}
+\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
+}
+% \end{macrocode}
+% \DescribeMacro{\jsColor} General command for defining a JavaScript Color, and support commands for
+% \textsf{xcolor} and w/o \textsf{xcolor}. When \textsf{xcolor} is used, colors
+% can be specified using the usual {\LaTeX} color methods:
+%\begin{verbatim}
+% \jsColor{\rghtColorJS}{blue}
+% \jsColor{\rghtColorJS}{[cmyk]{0,1,0,0}}
+%\end{verbatim}
+% or the \emph{JavaScript format} can be used:
+%\begin{verbatim}
+% \jsColor{\rghtColorJS}{["RGB",0,0,1]}
+% \jsColor{\rghtColorJS}{["CMYK",0,1,0,0}
+%\end{verbatim}
+% When \textsf{xcolor} is not used, only the JavaScript format is allowed.
+% \begin{macrocode}
+\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}}%
+}
+% \end{macrocode}
+% \begin{macrocode}
+%</eqcolor>
+%<*package>
+% \end{macrocode}
+% Now input \texttt{eqcolor.def}.
+% \changes{v7.8f}{2017/02/29}{Separated the color stuff into its own segment
+% (\string\texttt{eqcolor})}
+% \begin{macrocode}
+\@ifundefined{jsColor}{%
+ \InputIfFileExists{eqcolor.def}{\PackageInfo{exerquiz}
+ {Inputting eqcolor.def}}
+ {\PackageError{exerquiz}{cannot find eqcolor.def}
+ {Refresh your file name database and try again.}}
+}{}
+% \end{macrocode}
+%
+% \subsection{Default Colors for Checks, Crosses, and Borders}
+%
+% These commands are used to define the colors for the checks,
+% crosses and correct symbols. These are controlled by JavaScript,
+% so use the correct syntax for defining colors here.
+%
+% The default colors for the above defined color declaration commands, the
+% the default definitions of the color commands. The commands appear in pairs
+% and are used in the second and third arguments of \cs{eq@jsColor}.
+% \begin{macrocode}
+\newcommand\rghtColorJSDef{["RGB", 0, .6, 0]}
+\newcommand\rghtColorJS{\rghtColorJSDef}
+\newcommand\wrngColorJSDef{color.red}
+\newcommand\wrngColorJS{\wrngColorJSDef}
+\newcommand\partialColorJSDef{color.blue}
+\newcommand\partialColorJS{\partialColorJSDef}
+\newcommand\defaultColorJSDef{color.black}
+\newcommand\defaultColorJS{\defaultColorJSDef}
+% \end{macrocode}
+% The next command is special, it is used in the quiz environments to allow a localization
+% of the color. Unlike the ones above, this can be specified within the body of the document.
+% \begin{macrocode}
+\let\defaultColorJSLoc\@empty
+\let\defaultColorJSLocDef\@empty
+\let\rghtColorJSLoc\@empty
+\let\rghtColorJSLocDef\@empty
+\let\wrngColorJSLoc\@empty
+\let\wrngColorJSLocDef\@empty
+\let\partialColorJSLoc\@empty
+\let\partialColorJSLocDef\@empty
+% \end{macrocode}
+% \paragraph*{Symbol choice.} This is in support for changing check styles for quizzes
+% These must be declared in the preamble.
+% \begin{macrocode}
+\def\chooseJSsymbol{\@ifstar{\let\eq@isstar\eq@YES\chooseJSsymboli}
+ {\let\eq@isstar\eq@NO\chooseJSsymboli}}
+\def\chooseJSsymboli#1{\lowercase{\edef\eq@arg{#1}}%
+ \def\eq@carg{check}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.ch}\else
+ \def\eq@carg{cross}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.cr}\else
+ \def\eq@carg{diamond}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.di}\else
+ \def\eq@carg{circle}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.ci}\else
+ \def\eq@carg{star}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.st}\else
+ \def\eq@carg{square}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.sq}\else
+ \let\eq@retnStyle\@empty
+ \ifx\eq@isstar\eq@NO\PackageWarning{exerquiz}
+ {Argument `#1' not recognized.\MessageBreak
+ Permissible values are check, cross, diamond,\MessageBreak
+ circle, star, square. Will use the default}\fi
+ \fi\fi\fi\fi\fi\fi
+}
+% \end{macrocode}
+% \begin{macro}{\setRightAnsSymb}
+% The check style when the user is correct. (def: \texttt{style.ch})
+% \begin{macro}{\setCorrAnsSymb}
+% The check style when the user is wrong but you are marking which response is correct.
+% (def: \texttt{style.ci})
+% \begin{macro}{\setWrongAnsSymb}
+% The check style when the use chooses the incorrect answer.
+% (def: \texttt{style.cr})
+% \begin{macrocode}
+%\def\defineAnsStyle#1#2{%
+% \eq@getCmdName{\cmdName}{#1}\let\is@Defined\eq@YES
+%}
+\newcommand\setRghtAnsSymb[1]{\chooseJSsymbol{#1}%
+ \ifx\eq@retnStyle\@empty\else
+ \edef\rghtAnsSymbJS{\eq@retnStyle}%
+ \edef\rghtAnsSymb{\eq@carg}\fi}
+\def\rghtAnsSymbJS{style.ch}
+\def\rghtAnsSymb{check}
+\newcommand\setCorrAnsSymb[1]{\chooseJSsymbol{#1}%
+ \ifx\eq@retnStyle\@empty\else
+ \edef\corrAnsSymbJS{\eq@retnStyle}%
+ \edef\corrAnsSymb{\eq@carg}\fi}
+\def\corrAnsSymbJS{style.ci}
+\def\corrAnsSymb{circle}
+\newcommand\setWrngAnsSymb[1]{\chooseJSsymbol{#1}%
+ \ifx\eq@retnStyle\@empty\else
+ \edef\wrngAnsSymbJS{\eq@retnStyle}%
+ \edef\wrngAnsSymb{\eq@carg}\fi}
+\def\wrngAnsSymbJS{style.cr}
+\def\wrngAnsSymb{cross}
+\def\setRghtAnsSymbLoc#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \let\rghtAnsSymbJSLoc\@empty\else
+ \edef\rghtAnsSymbJSLoc{\eq@retnStyle}\fi
+}
+\def\setCorrAnsSymbLoc#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \let\corrAnsSymbJSLoc\@empty\else
+ \edef\corrAnsSymbJSLoc{\eq@retnStyle}\fi
+}
+\def\setWrngAnsSymbLoc#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \let\wrngAnsSymbJSLoc\@empty\else
+ \edef\wrngAnsSymbJSLoc{\eq@retnStyle}\fi
+}
+\let\rghtAnsSymbJSLoc\@empty
+\let\rghtAnsSymbJSLocDef\@empty
+\let\corrAnsSymbJSLoc\@empty
+\let\corrAnsSymbJSLocDef\@empty
+\let\wrngAnsSymbJSLoc\@empty
+\let\wrngAnsSymbJSLocDef\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \subsection{``Every'' Definitions}
+% \begin{macrocode}
+\newcommand\everyeqTextField[1]{\def\every@eqTextField{#1}}
+\def\every@eqTextField{}
+\newcommand\everyRespBoxMath[1]{\def\every@RespBoxMath{#1}}
+\def\every@RespBoxMath{}
+\newcommand\everyRespBoxTxt[1]{\def\every@RespBoxTxt{#1}}
+\def\every@RespBoxTxt{}
+\newcommand\everyrbMarkup[1]{\def\every@rbMarkup{#1}}
+\def\every@rbMarkup{}
+\newcommand\everysqTallyBox[1]{\def\every@sqTallyBox{#1}}
+\def\every@sqTallyBox{}
+\newcommand\everysqTallyTotal[1]{\def\every@sqTallyTotal{#1}}
+\def\every@sqTallyTotal{}
+\newcommand\everyScoreField[1]{\def\every@ScoreField{#1}}
+\def\every@ScoreField{}
+\newcommand\everyAnswerField[1]{\def\every@AnswerField{#1}}
+\def\every@AnswerField{}
+\newcommand\everyPointsField[1]{\def\every@PointsField{#1}}
+\def\every@PointsField{}
+\newcommand\everyPercentField[1]{\def\every@PercentField{#1}}
+\def\every@PercentField{}
+\newcommand\everyGradeField[1]{\def\every@GradeField{#1}}
+\def\every@GradeField{}
+% \end{macrocode}
+% \begin{macro}{\AddAAFormat}
+% Here is the definition of \cs{AddAAFormat}. This macro can be used
+% in \cs{RespBoxMath} to add in formatting of the answer. This macro is
+% necessary because the \cs{AA} actions for the \textsf{exerquiz} quiz macros
+% are ``protected''; the document author cannot accidentally overwrite my
+% JavaScript for processing the user's answer.
+% \begin{flushleft}
+% Example: In the preamble
+%\begin{verbatim}
+%\begin{defineJS}{\formatAsSet}
+%if (event.value.replace(/\\s/g,"") != "")
+% event.value = "{ " + event.value + " }";
+%\end{defineJS}
+%\end{verbatim}
+% and in the body of a \texttt{quiz} environment,
+%\begin{verbatim}
+%$x^2 - 3x + 2 = 0$, $S = \RespBoxMath[\AddAAFormat{\formatAsSet}
+% \rectW{.75in}\textSize{0}]{1,2}{1}{.0001}{[0,1]}*{ProcRespSetNum}$
+%\end{verbatim}
+%\end{flushleft}
+% \begin{macrocode}
+\def\@eqAddAAFormat#1{\def\eqFormatArg{#1}}
+\def\eq@AddAAFormat{}
+\def\formatAsSet{try{formatAsSet()}catch(e){}}
+\def\formatAsVector{try{formatAsVector()}catch(e){}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AddAAKeystroke}
+% The value of this key is JS code that executes after the input box has been processed.
+% Created to use with AcroFleX for showing graphs after the user enters a response.
+%
+%\changes{v6.3b}{2008/06/29}
+%{
+% Added the \cs{AddAAKeystroke} to the recognizable set of keys. This will be obeyed
+% within the optional arguments of \cs{RespBoxMath}.
+%}
+% \begin{macrocode}
+\def\@eqAddAAKeystroke#1{\def\argi{#1}\ifx\argi\@empty
+ \def\eqAAKeystrokeArg{}\else\def\eqAAKeystrokeArg{\r #1}\fi}
+\def\eqAAKeystrokeArg{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\everysqRadioButton}
+% \begin{macro}{\everyqRadioButton}
+% Here, you can control the appearance of all the standard checkboxes, also
+% effects radio fields of \texttt{shortquiz} and \texttt{quiz}.
+% \begin{macro}{\everyqckCheckBox}
+% (2010/07/30) Added \cs{everyqckCheckBox} to control the appearance
+% of the underlying checkbox for \texttt{manswers} environments.
+% Previously \cs{everyqRadioButton} was used, but this is the same as used by
+% multiple choice. To get control over \texttt{manswers} when \cs{useMCCircles}
+% and \cs{useMCCRects} \texttt{manswers} needs it one ``every'' command.
+% \begin{macrocode}
+\newcommand{\everysqRadioButton}[1]{\def\every@sqRadioButton{#1}}
+\def\every@sqRadioButton{}
+\newcommand{\everyqRadioButton}[1]{\def\every@qRadioButton{#1}}
+\def\every@qRadioButton{}
+\newcommand{\everyqckCheckBox}[1]{\def\every@qckCheckbox{#1}}
+\def\every@qckCheckbox{}
+% \end{macrocode}
+% \begin{macro}{\everyqCheckBox}
+% (12/08/2008) Added \cs{everyqCheckBox}, this is used only for the check boxes
+% that hold the answer of a multiple choice question, not a multiple selection
+% problem. This change is needed to create a circle radio button, in this case
+% we need to make the boundary of the check box to 0 width.
+% \begin{macrocode}
+\newcommand{\everyqCheckBox}[1]{\def\every@qCheckBox{#1}}
+\def\every@qCheckBox{}
+\newcommand{\everysqCheckBox}[1]{\def\every@sqCheckBox{#1}}
+\def\every@sqCheckBox{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% Here, you can control the appearance of all the standard buttons.
+% \begin{macrocode}
+\let\everyeqButtonField\everyButtonField
+\newcommand\everyCorrAnsButton[1]{\def\every@CorrAnsButton{#1}}
+\def\every@CorrAnsButton{}
+\newcommand\everysqClearButton[1]{\def\every@sqClearButton{#1}}
+\def\every@sqClearButton{}
+\newcommand\everyeqButton[1]{\def\every@eqButton{#1}}
+\newcommand\everyCorrButton{\everyeqButton}
+\def\every@eqButton{}
+\newcommand\everyBeginQuizButton[1]{\def\every@BeginQuizButton{#1}}
+\def\every@BeginQuizButton{}
+\newcommand\everyEndQuizButton[1]{\def\every@EndQuizButton{#1}}
+\def\every@EndQuizButton{}
+% Replace everyeqGenButten with everyPushButton
+\let\everyeqGenButton\everyPushButton
+\let\every@eqGenButton\every@PushButton
+\newcommand\everyeqIcon[1]{\def\every@eqIcon{#1}}
+\def\every@eqIcon{}
+% dps new
+\let\eqGenButton\pushButton
+% \end{macrocode}
+% \begin{macro}{\eqIcon}
+% Create a push button for displaying an icon. I've set this on read only, this
+% can be removed by saying \verb+\Ff{-\FfReadOnly}+/
+%\begin{verbatim}
+% #1 = optional, used to enter any modification of the appearance/actions
+% #2 = the title of the button field
+% #3 = the width of the bounding rectangle
+% #4 = the height of the bounding rectangle
+%\end{verbatim}
+% \begin{macrocode}
+\def\eqIconDefaults
+{%
+ \rawPDF{}\S{}\mkIns{/TP 1}\W{}
+ \CA{}\RC{}\AC{}\BC{}\BG{}\H{N}
+ \textColor{0 g}\Ff{\FfReadOnly}
+}
+\newcommand\eqIcon[4][]
+{%
+ \mbox{\push@@Button{#1}{#2}{#3}{#4}{}{\eq@setButtonProps
+ \eq@Button@driver}{\eqIconDefaults\every@ButtonField
+ \every@eqIcon}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \section{Document Level JavaScripts}
+%
+% The \texttt{insDLJS} package is used to insert the JavaScript at
+% the document level. This package makes all necessary
+% driver-dependent conversions, we just write the JavaScript code,
+% which is hard enough.
+%
+% \begin{macrocode}
+%<*aebjs>
+% \end{macrocode}
+% \begin{macrocode}
+\def\aeb@array{new Array}
+% \end{macrocode}
+% The following definitions are associated with \texttt{requireForm()}, the JS function
+% defined below.
+% \begin{macrocode}
+%\newcommand{\defaultReqFormMsg}{%
+% "The expression is not in the expected form."}
+% \end{macrocode}
+% (07/16/11) Some definitions that may be used by \texttt{requireForm}, a \cs{RespMathBox} filter
+% \begin{macrocode}
+%\def\refac(#1){\\(#1\\)}\def\regrp(#1){(#1)}\def\rechrclass(#1){[#1]}
+\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$}
+% \end{macrocode}
+% \begin{macro}{\preDenyForm}
+% \begin{macro}{\preReqForm}
+% \begin{macro}{\postDenyForm}
+% (10/07/11) Some convenience commands to simplifying the use of the \texttt{priorParse}
+% and \texttt{postParse} filters.
+% \begin{macrocode}
+%\def\preDenyForm(#1){\Array(denyForm,#1)}
+%\def\preReqForm(#1){\Array(requireForm,#1)}
+%\def\postDenyForm(#1){\Array(requireFormNot,#1)}
+\def\preReqForm{\Array(requireForm,\@gobble}
+\def\preDenyForm{\Array(denyForm,\@gobble}
+\def\postDenyForm{\Array(requireFormNot,\@gobble}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \DescribeMacro{\noPeekArgs}\cmd{\noPeekArgs} is used to modify the arguments
+% of the no peeking alert box.
+% \begin{macrocode}
+\newcommand{\noPeekArgs}[1]{%
+ \def\NoPeekAlert{eqAppAlert(#1)}}\def\newNoPeekArgs{}
+\def\NoPeekAlert{eqAppAlert(\noPeekMsg,3)}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand{\dlLibSpecRespJS}{"none","undefined","empty"}
+\begin{insDLJS*}[exerquizLoaded]{exerquiz}
+% \end{macrocode}
+% \subsection{Global Data}
+% Global data and some miscellaneous definitions
+% \begin{macrocode}
+\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;
+% \end{macrocode}
+% The global variable \texttt{ProcessIt} is really used only once. In the
+% function \texttt{DisplayAnswer()}. The function is called by the correct
+% answer button. It sets \texttt{ProcessIt = false}, then it inserts the correct
+% answer into the text field. A \texttt{false} value of \texttt{ProcessIt}
+% prevents the \texttt{ProcResp} (and others) from from processing the answer.
+%
+% The arrays \texttt{RightWrong}, \texttt{ProbValue}, \texttt{ProbDist} and \texttt{ProbType} maintain quiz information
+% for a quiz. The following are typical values of these arrays. This is a quiz taken
+% from the manswer.tex demo file. Question 1 is a multiple selection question; Question 2
+% is a multiple choice question; Question 3 is a math fill-in question; and Question 4
+% is a grouped question. (The \texttt{undefined} entries indicate an empty or a not used entry.)
+%\begin{verbatim}
+%RightWrong.toSource()
+%[undefined, [0, 1, [undefined, undefined, 0, 1, 1, 0, 1]], 1, 1,
+% [undefined, 1, 1, 1, 0]]
+%
+%Responses.toSource()
+%[undefined, [undefined, undefined, "b", "c", "d", "e", "f"], "a", "cos(x)",
+% [undefined, "0", "4", "1", "9"]]
+%
+%ProbValue.toSource()
+%[undefined, [3, 5, [undefined, undefined, -2, 3, 3, -2, 3]], [0, 3, 0], 3,
+% [1, "groupEval", 4, 4, 1, 1, 1, 1]]
+%
+%ProbDist.toSource()
+%[undefined, 5, 3, 3, 3]
+%
+%ProbType.toSource()
+%[undefined, "na", "na", "na", "na"]
+%
+%aPointType.toSource()
+% [undefined, [2, "mc"], [4, "ms"], [2, "text"], [4, "math"], [4, "grp"]]
+%\end{verbatim}
+% \begin{macrocode}
+var ProcessIt = true;
+var retn;
+var Score=0;
+var ptScore=0;
+var pcScore=0;
+var quizGrade="C";
+var e = Math.E;
+var pi = Math.PI;
+var replaceExclaim = \replaceexclaim;
+var negPointsAllowed = \negpointsallowed;
+var negPointsMarkupAllowed = \negpointsmarkupallowed;
+var aQuizControl = new Array();
+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);
+% \end{macrocode}
+% JSf is an array of supported mathematical functions.
+%\changes{v6.06}{2007/02/23}
+%{
+% Separated the \texttt{JSf} array into \texttt{JSfBuiltIn} and \texttt{JSfCustom}. This
+% allows us to identify the built-in JavaScript functions. I concatenate these two
+% into \texttt{JSf}.
+%}
+% \begin{macrocode}
+var JSfBuiltIn = new Array
+ ( "abs","acos","asin","atan","ceil", "floor","cos","exp",
+ "log","max","min","pow","random","round","sin",
+ "sqrt","tan");
+% \end{macrocode}
+%\changes{v6.3c}{2008/07/03}
+%{
+% Added the hyperbolic functions and inverse hyperbolic functions
+%}
+% Additional function recognized by exerquiz. Note to self, when adding
+% functions, if one function is a substring of another, list the function
+% with the longer name first. Searching is done in the order the functions
+% are listed in this array.
+%\changes{v6.3o}{2010/05/24}
+%{
+% Modification of the array structure for supported JS functions, due to
+% Robert Marik. He writes, ``arcsin(x), arccos(x) and arctan(x) are not
+% recognized properly when implmulti from dljslib is active. I think that
+% the problem is caused by the fact that arcsin(x) follows sin(x) in the
+% field of known functions and converted into arc*sin(x) and then into
+% a*r*c*sin(x). I enclose the patch for the exerquiz.dtx file which in my
+% opinion solves the problem.''
+%}
+% \begin{macrocode}
+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")
+% \end{macrocode}
+% Additional functions that I've defined.
+% \begin{macrocode}
+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);}
+% \end{macrocode}
+% Additional functions that I've defined. (07/03/08)
+% \begin{macrocode}
+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)) };
+% \end{macrocode}
+% The aGroup array lists left and right grouping delimiters. This array is
+% used by ParseInput() to call CkBalP().
+% \begin{macrocode}
+var aGroup = new Array
+ ( ["\(","\)",\eqParens],
+ ["[","]",\eqBrackets],
+ ["{","}",\eqBraces]
+ );
+\end{newsegment}
+% \end{macrocode}
+% \subsection{Math Fill-in}
+% This section of the code is primarily dedicated to processing the math fill-in questions.
+% \begin{macrocode}
+\begin{newsegment}{Eq: Support for Math Fill-in}
+% \end{macrocode}
+% A custom alert box that uses \texttt{\_ModalNotOn} to alert when the modal alert
+% box is displayed. When \texttt{!\_ModalNotOn} is true, there is an alert box being
+% displayed.
+%\changes{v6.9}{2014/10/05}{Added eqAppAlert}
+% \begin{macrocode}
+var _mto;
+function eqAppAlert(args) {
+ _ModalNotOn = false;
+ var retn=app.alert(args);
+ _mto= app.setTimeOut("_ModalNotOn = true", 100);
+% \end{macrocode}
+% Add a return to eqAppAlert, needed for the prompt button
+% \changes{v7.8d}{2017/01/11}{Add a return to eqAppAlert}
+% \begin{macrocode}
+ return retn;
+}
+% \end{macrocode}
+% Description: Checks for balanced grouping delimiters.
+% Arguments:
+%\begin{enumerate}
+% \item \texttt{UserInput}: A string
+% \item \texttt{lDelimiter}: left delimiter
+% \item \texttt{rDelimiter}: right delimiter
+%\end{enumerate}
+% Returns: \texttt{true} (if balanced); \texttt{false} (if not)
+% \begin{macrocode}
+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);
+}
+% \end{macrocode}
+% Description: This function simply determines if there are an even number of
+% `\verb+|+' chars. Used for parsing absolute value.
+% \verb=| x+2 | --> abs(x+2)=.\\
+% Arguments:\\
+% \texttt{UserInput}: a string\\
+% Returns: \texttt{true} (if even); \texttt{false} (if odd)
+% \begin{macrocode}
+function CkBalVert(UserInput)
+{
+ var Lcount=0;
+ for (var k=0; k < UserInput.length; k++)
+ if (UserInput.charAt(k)=="|") Lcount++;
+ return (Lcount \% 2 == 0);
+}
+% \end{macrocode}
+% Description: This function searches for alpha words and matches them against supported
+% mathematical functions.\\
+% Arguments:\\
+% \texttt{UserInput}: a string\\
+% Returns: 1 (if there is a match); 0 (if no match)
+% also sets the global variable \texttt{ok2Continue} to \texttt{false}.
+% \changes{v6.4c}{2011/07/01}{Ckfunc now uses a global variable \texttt{\_mathVars} which
+% holds the variables of the current \cs{RespBoxMath} being processed. We search
+% all substrings containing 2 or more letters; if it consists only of the variables
+% that substring is OK.}
+% \begin{macrocode}
+function Ckfuncs(UserInput)
+{
+ var re, rei, reii;
+ re = /[a-zA-Z]{2,}/g;
+ reii=/r:|i:|,/g
+% \end{macrocode}
+% Get \texttt{\_mathVars}, and remove special formatting, new variable \texttt{\_v}.
+% \begin{macrocode}
+ var _v=_mathVars.replace(reii,"");
+% \end{macrocode}
+% Define a regular expression that will return null if the string
+% contains only letters from the variable list \texttt{\_v}.
+% \begin{macrocode}
+ rei=new RegExp("[^"+_v+"]", "g");
+ aF = UserInput.match(re);
+ if ( aF == null ) return true;
+ for (var i=0; i < aF.length; i++)
+ {
+% \end{macrocode}
+% If the current string contains only variables, move on to the next string
+% \begin{macrocode}
+ 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);
+% \end{macrocode}
+% 09/07/09 added the next line, this could change behavior. We try to signal
+% that an alert box has already been displayed, don't display another one.
+% \begin{macrocode}
+ ok2Continue=false;
+ return false;
+ }
+ }
+ return true;
+}
+% \end{macrocode}
+% This function displays the answer.
+% \begin{macrocode}
+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);
+% this.getField(fieldname).strokeColor = defaultColor;
+ } catch(e) {}
+ ProcessIt = true;
+}
+function EvalCorrAnsButton(fieldname,theanswer)
+{
+ theanswer = eval(theanswer);
+ DisplayAnswer(fieldname,theanswer);
+}
+% \end{macrocode}
+% Finds and returns the position of the matching parentheses.
+% \begin{macrocode}
+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;
+}
+% \end{macrocode}
+% Remove white spaces from \texttt{UserInput}.
+% \begin{macrocode}
+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;
+}
+% \end{macrocode}
+% This function takes its argument, and adds in the suffix of \texttt{Math.}
+% in front of every recognizable JS built-in functions.
+% \begin{macrocode}
+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;
+}
+% \end{macrocode}
+%
+% \paragraph{ParseInput.}
+%
+% This is the very heart of parsing the user's input. This function takes the
+% \texttt{UserInput} and works it over and places it in a proper JavaScript expression
+% for the JavaScript interpreter to evaluate.
+%
+% First get rid of all whitespace. Then
+% check for balanced parentheses followed by checking for known
+% or unknown math functions.
+%
+% The power function is \texttt{pow}; thus, |x^2| is \texttt{pow(x,2)}. Rather than
+% make students write \texttt{pow(x,2)} we try to code things so they can enter
+% |x^2| instead, much easier for them. Now we must scan through for different
+% patterns. The patterns are: |x^n|, |(expr)^n|, |x^(expr)| and |(expr1)^(expr1)|. We
+% search through looking for these patterns and replace them appropriately:
+% |pow(x,n)|, |pow(expr,n)|, |pow(x,expr)| and |pow (expr1,expr2)|. To do this, we
+% must find balanced parentheses.
+%
+% For those who have Acrobat 5.0, you can call this function from the console, something
+% I do quite a lot when developing new scripts. From the console, enter, for example,
+% \verb+ParseInput("xycos(xy^3)")+, and the return value of this function will be
+% displayed in the console. An author can check the syntax of his/her answer.
+%
+% \begin{macrocode}
+function ParseInput(UserInput)
+{
+ var re, repi;
+ UserInput = stripWhiteSpace (UserInput);
+ if (!ok2Continue) return null;
+% \end{macrocode}
+% See if there are matching `\texttt{[]}', `\texttt{\{\}}' and `\texttt{()}'.
+% \begin{macrocode}
+ for(var i=0; i< aGroup.length; i++)
+ {
+ if(!CkBalP(UserInput, aGroup[i][0], aGroup[i][1]))
+ {
+ eqAppAlert(\eqerrDelimNotBal,3);
+ ok2Continue = false;
+ return false;
+ }
+ }
+% \end{macrocode}
+% Replace `\texttt{[]}' and `\texttt{\{\}}' with `\texttt{()}'; only parentheses
+% are used in JavaScript for grouping.
+% \begin{macrocode}
+ UserInput = ChngAllGrpsToParens(UserInput);
+% UserInput = UserInput.replace(/\[|\{/g, "\(");
+% UserInput = UserInput.replace(/\]|\}/g, "\)");
+% \end{macrocode}
+% If the \texttt{fact} function is defined, we attempt to replace user's input of the form
+% \texttt{<number>!} with \texttt{fact(<number>)}.
+% \begin{macrocode}
+ if ( replaceExclaim &&(typeof fact == "function") )
+ UserInput = UserInput.replace(%
+/(?=\()?(\d+)(?=\))?!/g,"fact($1)");
+% \end{macrocode}
+% Check to see if there are an even number of absolute value symbols, `\verb+|+'.
+% \begin{macrocode}
+ if (!CkBalVert(UserInput))
+ {
+ eqAppAlert(\eqerrABS,3);
+ ok2Continue = false;
+ return false;
+ }
+% \end{macrocode}
+% 07/07/08 Before we go further, find all occurrences of the JavaScript function,
+% and enclose each in parentheses. This helps with some of the exponential parsing
+% later. Things of the form \verb!sin^2(x)! will not be enclosed, but will be
+% if the \texttt{ImplMulti} option is used.
+% \begin{macrocode}
+ UserInput=groupJSf(UserInput);
+% \end{macrocode}
+% (01/09/10) We try to identify an expression of the form \verb!e^!, when preceded by a
+% letter or number, in this case we assume multiplication. We also look for
+% the letter \texttt{e} when it is not in the middle of \texttt{sec}, this interpreted
+% as a numerical constant, it is converted to \verb!(e^1)!.
+% \begin{macrocode}
+ re=/(\w)(e)(\^)/g;
+ repi=/(\w)(pi)/g;
+% \end{macrocode}
+% If its a word followed by e, followed by the exponent symbol (\verb!^!), it is
+% multiplication.
+% \begin{macrocode}
+ UserInput=UserInput.replace(re, "$1*$2$3");
+ UserInput=UserInput.replace(repi, "$1*$2");
+% UserInput=UserInput.replace(repE, "$1*$2");
+% \end{macrocode}
+% We mark \texttt{sec} so we don't get a hit on the next search.
+% \begin{macrocode}
+ UserInput=UserInput.replace(/(sec)/g, "s@e@c");
+ re=/(\w)(e)([^\^])?/g;
+% \end{macrocode}
+% If its a word, followed by e, followed by something other than \verb!^!
+% then e must be used in the sense of a constant, so we replace it by
+% \verb!(e^1)!, so subsequence searches within this function will ultimately
+% convert it to \texttt{pow(e,1)}.
+% multiplication.
+% \begin{macrocode}
+ UserInput=UserInput.replace(re,"$1($2\^1)$3");
+ UserInput=UserInput.replace(/(s@e@c)/g, "sec");
+% \end{macrocode}
+% (07/16/11) In support of scientific notation. It is desirable to support E4, for example.
+% So we search for any occurrence of \texttt{E\cs{d}} and replace with \texttt{E+\cs{d}}.
+% Note: the letters \texttt{E} and \texttt{e} are used in JS to represent floating point numbers.
+% In this package \texttt{e} will be used for the natural number. Another problem,
+% JavaScript does not compute something like \texttt{1*E+2}, so we must remove any \texttt{*} between
+% the digit previous to \texttt{E} and \texttt{E}.
+% \begin{macrocode}
+ re=/E(\d)/g;
+ UserInput=UserInput.replace(re,"E+$1");
+ re=/(\d)\*E/g;
+ UserInput=UserInput.replace(re,"$1E");
+% \end{macrocode}
+% We make a rough check of the user input, if it has alpha-words of size two or greater
+% that do not match up against a recognizable function, it must be an error.
+%
+% (09/07/09) Comment this out so we check for function in both cases, get same alert message
+% \begin{macrocode}
+% if (typeof(Ck4Exponents) == "undefined")
+ if(!Ckfuncs(UserInput)) return false;
+% \end{macrocode}
+% Now try to insert the multiplication operator where applicable.
+% \begin{macrocode}
+ if (typeof(Ck4Exponents) != "undefined")
+ UserInput = Ck4Exponents(UserInput);
+ if (typeof(Ck4Products) != "undefined" )
+ UserInput = Ck4Products(UserInput);
+ ok2Continue = true;
+% \end{macrocode}
+% Convert any occurrence of log to log10 (known internally as logc). We are now (12/22/06) going to use log for
+% common log even though log in JS is natural log. This may break a few things.
+% \changes{v6.05f}{2006/12/22 }
+% {
+% Added support for common logarithms. log is now common logs, and ln is
+% natural logs.
+% }
+% \begin{macrocode}
+ re = /\b(log)\b/g;
+ UserInput = UserInput.replace(re, "logc");
+% \end{macrocode}
+% Search for occurrences of \verb!|<exp>|! and replace with \texttt{abs(<exp>)}.
+% \begin{macrocode}
+ 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)");
+ }
+ }
+% \end{macrocode}
+% Replace every instance of \texttt{pi} with \texttt{(pi)} so things like
+% \verb!pi^2! are parsed correctly.
+% \begin{macrocode}
+ re=/\b(pi)\b/g;
+ UserInput=UserInput.replace(re,"($1)")
+% \end{macrocode}
+% We now begin our search for exponents, we search the UserInput from left to right
+% for any of the four strings \texttt{"\string^"},\texttt{")\string^"}, \texttt{"\string^("}, and
+% \texttt{")\string^("}, using the regular expression \texttt{reTstExp}. (07/07/08) I've rewritten
+% this part of the parser to accommodate nested exponents of the form \verb!x^2^3!, which should
+% be interpreted as \verb!(x^2)^2!, something like \verb!2^sin(x)! and \verb!sin(x)^2! work, the latter
+% is interpreted as \verb!(sin(x))^2!. This is why earlier we executed \texttt{groupJSf} to enclose
+% all JS function and their arguments in parentheses; by the time \verb!sin(x)^2! reaches this parser
+% it has already been changed to \verb!(sin(x))^2!, which is correct syntax.
+%
+% These is another change to the parser here. We pass through \texttt{Ck4OddRoots}, which tries,
+% in a crude way, to determine if this exponent is of the form \texttt{a/b}, and if so, whether
+% \texttt{b}, the denominator, is an odd root. If so, we change the calculation of \texttt{Math.pow}
+% to avoid a calculation bug by that JavaScript function.
+% \begin{macrocode}
+ 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;
+ }
+% console.println("working.."+UserInput);
+ }
+ if (!ok2Continue)
+ {
+ eqAppAlert(\eqerrBadExp,3);
+ return false;
+ }
+ else {
+% \end{macrocode}
+%\changes{v6.06}{2007/02/23}
+%{
+% Now, just before we return the parsed expression, we append all built-in
+% JavaScript functions and constants with \texttt{Math.}, this is to avoid
+% having to use the \texttt{with(Math)} construct. These changes are in support
+% of using scientific notation.
+%}
+% \begin{macrocode}
+ UserInput=addMathObject(UserInput);
+ return UserInput;
+ }
+}
+% \end{macrocode}
+% \DescribeMacro{ChngAllGrpsToParens}(2011/10/04) Separated out the routine to replace `\texttt{[}' and `\verb!{!' with
+% `\texttt{(}'.
+% \begin{macrocode}
+function ChngAllGrpsToParens(UserInput)
+{
+ UserInput = UserInput.replace(/\[|\{/g, "\(");
+ UserInput = UserInput.replace(/\]|\}/g, "\)");
+ return UserInput;
+}
+% \end{macrocode}
+% \DescribeMacro{Ck4OddRoots}The \texttt{Ck4OddRoots} function looks for exponents of the form \texttt{a/b},
+% it checks whether \texttt{b} is an odd integer, if yes, instead of returning
+% the usual of \verb!"(pow($1,$2))"!, it returns something like
+% \verb!(sgn(<base>)^a*(abs(<base>)^a)^(1/b))!. This gives a base that evaluates
+% to a negative number a change of being evaluated, and avoid a bug in the \texttt{Math.pow}
+% function.
+% \begin{macrocode}
+function Ck4OddRoots(UserInput,re) {
+ var a=re.exec(UserInput);
+% \end{macrocode}
+% \texttt{a[2]} should be the exponent
+% try to remove extraneous parentheses
+% \begin{macrocode}
+ 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("/");
+% \end{macrocode}
+% We are looking for an exponent of the form a/b, if we can't find it
+% we process this power in the usual way. \texttt{b[0]} is our possible numerator
+% and \texttt{b[1]} is our possible denominator.
+% \begin{macrocode}
+ if ( b.length==2 ) {
+ try { _m=eval(b[1])
+% \end{macrocode}
+% We try to evaluate the denominator \texttt{b[1]}. If there are unbalanced
+% parentheses, JavaScript will throw an exception, if \texttt{\_m} is either
+% undefined or not a number, we throw an exception. The expression will be
+% processed in the usual way.
+% \begin{macrocode}
+ if ( _m == undefined || isNaN(_m) ) throw new Error();
+% \end{macrocode}
+% The denominator appears to be numerical, so we'll continue
+% \begin{macrocode}
+ var d = b[1];
+% \end{macrocode}
+% Check for the presence of enclosing parentheses
+% \begin{macrocode}
+ var isEnclosed=(d.charAt(0) == "\(" && d.charAt(d.length-1)=="\)");
+% \end{macrocode}
+% if not enclosed look for arithmetic operations
+% \begin{macrocode}
+ if (!isEnclosed)
+% \end{macrocode}
+% if arithmetic operations of add/sub found, exit. In this case, perhaps the user had an
+% exponent of the form \texttt{x/2 + 3}, and so \texttt{d = 2 + 3}, which is not the desired denominator.
+% We'll throw an exception, and process as usual.
+% \begin{macrocode}
+ if (/.+[\+\-].+/.test(d)) throw new Error();
+% \end{macrocode}
+% remove enclosing parentheses
+% \begin{macrocode}
+ if (isEnclosed) d = s.substring(1,d.length-1);
+% \end{macrocode}
+% now need to do the same thing for the numerator
+% \begin{macrocode}
+ var n = b[0];
+ isEnclosed=(n.charAt(0) == "\(" && n.charAt(d.length-1)=="\)");
+ if (!isEnclosed)
+% \end{macrocode}
+% if arithmetic operations of add/sub found, exit. If numerator was not enclosed
+% in parentheses, and there is either addition or subtraction, we are looking
+% at an exponent of the form \texttt{1 + x/d,} and \texttt{n = 1 + x}. The numerator is not \texttt{1+x}, we
+% process in the usual way.
+% \begin{macrocode}
+ if (/.+[\+\-].+/.test(n)) throw new Error();
+% \end{macrocode}
+% I don't think we need to remove the enclosing parentheses
+% as we did for the denominator.
+%
+% Now check if the denominator, \texttt{d}, is an integer, for that we'll use \texttt{parseInt},
+% If it is an integer, we see if it is odd or even using \verb!d % 2!, which yields
+% a nonzero remainder if d is odd. If \texttt{d} passes all tests, we write
+% \verb!<base>^(n/d)! as \verb!(sgn(<base>))^n! \verb!(abs(<base>)^(n/d))!.
+% \begin{macrocode}
+ if ( d == parseInt(d) && ( Boolean(d \% 2) ) ) {
+ UserInput=UserInput.replace(re,
+ "(pow(sgn($1),"+n+")*(pow(abs($1),$2)))");
+% \end{macrocode}
+% We we have an odd integer as a denominator, we return our result here
+% \begin{macrocode}
+ return UserInput;
+ }
+% \end{macrocode}
+% All exceptions come here, then continue on to the lines that follow.
+% \begin{macrocode}
+ } catch(e) {}
+ }
+% \end{macrocode}
+% If we don't have an odd integer as a denominator, we return here
+% \begin{macrocode}
+ UserInput=UserInput.replace(re,"(pow($1,$2))");
+ return UserInput;
+}
+% \end{macrocode}
+% \DescribeMacro{groupJSf}We enclose all recognizable functions in parentheses. This makes it easier for doing
+% exponents, and avoids parsing errors. We look for functions of the form \texttt{fname(..)},
+% replace that with \texttt{fname@(..)} to avoid an infinite loop, as we search for the function
+% name followed by a left parenthesis. Once finished, we remove the \texttt@ character.
+% \begin{macrocode}
+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;
+ }
+ }
+ }
+% \end{macrocode}
+% Remove the \texttt@ marker, and return.
+% \begin{macrocode}
+ UserInput=UserInput.replace(/@/g,"");
+ return UserInput;
+}
+% \end{macrocode}
+% Process the user's response. Here, we randomly choose, $n$,
+% points from the selected interval $[a,b]$. The correct answer (as
+% supplied by the author of the document and the answer provided by
+% the user are evaluated at each of the $n$ points. If any of the
+% evaluations differs by more than \texttt{epsilon}, the answer is
+% considered wrong.
+%
+% The idea for evaluating user input in this way comes from Drs.\
+% Wlodzimierz Bryc and Stephan Pelikan of The University of
+% Cincinnati. These two have developed an \texttt{html} based
+% \textbf{Online Exercise System} which can evaluate objective
+% type questions. This evaluation, however, takes place on the
+% \emph{server-side}. This implementation is on \emph{the client-side}.
+%
+% \begin{macro}{TypeParameters}
+% The argument \texttt{v} is either a comma delimited list of variables \texttt{"x,y,z"} or just a list \texttt{"xyz"}.
+% This function types each untyped variable that is not typed. Currently, there
+% are only two data types: \texttt{"r"} and \texttt{"i"}. \texttt{"r:x"} means \texttt{"x"} is a real variable,
+% \texttt{"i:x"} means \texttt{"x"} is an integer variable.
+% \begin{macrocode}
+function TypeParameters(v)
+{
+ var aV;
+% \end{macrocode}
+% If \texttt{v} has a colon in it, we take that as a signal that the variables are comma
+% delimited.
+% \begin{macrocode}
+ 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(",")
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{ProcResp}
+% This function handles numerical answers or function of a single variable, x,
+% that evaluate to a number.
+% \begin{macrocode}
+function ProcResp(flag,CorrAns,n,epsilon,domain,indepVar,oComp)
+{
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ var success = _ProcResp(flag,CorrAns,UserAns,%
+n,epsilon,domain,indepVar,oComp);
+% \end{macrocode}
+% 09/07/09 Added next line to avoid double alert boxes
+% \begin{macrocode}
+ if ( success == -1 || !ok2Continue ) return null;
+ if ( success == null ) { return syntaxError(), null; }
+ return notifyField(success, flag, fieldname);
+}
+// changed name of var comp -> oComp
+function _ProcResp(flag,CorrAns,UserAns,n,epsilon,domain,indepVar,oComp)
+{
+ ok2Continue = true;
+% \end{macrocode}
+% by preprocessing.
+% \begin{macrocode}
+ CorrAns = ParseInput(CorrAns);
+ if (!ok2Continue) {
+ eqAppAlert("Syntax error in author's answer! Check console.",3);
+ return null;
+ }
+% \end{macrocode}
+% If \texttt{oComp} is an object, then see if it has a \texttt{comp} property
+% \begin{macrocode}
+ var comp = ( typeof oComp == "object" ) ?
+ ((typeof oComp.comp == "undefined" ) ?
+ diffCompare : oComp.comp ) : oComp;
+% \end{macrocode}
+% \paragraph*{priorParse} The \texttt{comp} parameter, which has been changed to \texttt{oComp}, can now be
+% an object. One property of this object is \texttt{comp}, handled above. Another
+% property is \texttt{priorParse}, this is a function that returns \texttt{null}
+% or \texttt{true}. This \texttt{priorParse} function allows for additional
+% filtering of the \texttt{UserAns} before parsing. If it returns \texttt{true},
+% we are ok to continue, if \texttt{null}, we don't like something the user has entered,
+% and ask him/her to change it.
+% \begin{macrocode}
+ if ( (typeof(oComp)=="object") %
+&& (typeof(oComp.priorParse)!="undefined") ) {
+ var retn=processSpecialParse(oComp.priorParse,UserAns);
+ if (retn==null) return -1;
+ }
+% \end{macrocode}
+% (2014/01/22) Before we solve Bruce's problem with the commas, we need to allow for the use of
+% the combinatorics functions \texttt{C(x,y)} and \texttt{P(x,y)}.
+% \begin{macrocode}
+ var reCP=/((C|P)\(.+?)(,)(.+?\))/g
+% str="P(12,4)"
+% reCP.exec(str)
+ UserAns=UserAns.replace(reCP,"$1@c@$4");
+% \end{macrocode}
+% (2012/04/13) Bruce Wagner reports a problem with the user enters an answer containing
+% a comma \texttt{"3,2"}, if the correct answer is 2, exerquiz marks the response as correct
+% even though the user has also entered a 3. The comma operator in JS, evaluates its operands
+% one to the left, one to the right, and returns the value of the one on the right. To fix
+% this problem, we scan the \texttt{UserAns} for a comma (,) and set an alert if one is found.
+%
+% For vector- and list-valued answers, the \texttt{ProcResp<name>} procedure should parse
+% the comma-delimited answers and call \texttt{\_ProcResp} once for each answer in the list
+% so there should be no problem with commas in that regard.
+% \changes{v6.4r}{2012/04/13}{Added a warning about commas in an answer.}
+% \begin{macrocode}
+ var reComma=/,/;
+ if ( reComma.test(UserAns) ) {
+ eqAppAlert(\eqSyntaxErrorComma,3);
+ return -1;
+ }
+% \end{macrocode}
+% \begin{macrocode}
+ var reRlCommaSubst=/@c@/g;
+ UserAns=UserAns.replace(reRlCommaSubst,",");
+% \end{macrocode}
+% Parse the user's input.
+% \begin{macrocode}
+ UserAns = ParseInput(UserAns);
+% \end{macrocode}
+% Originally, the value of \texttt{indepVar} is a string of variables \texttt{"xyz"}. You can
+% now have variables of the form \texttt{"r:x,i:n,r:y"}. Where the identifier \texttt{"r:"} indicates a
+% real variable and \texttt{"i:"} indicates an integer variable. \texttt{indepVar} must be either
+% of the old style, or the new style, not a mixture of both, e.g. \texttt{"xyi:n"}.
+% \begin{macrocode}
+ indepVar = TypeParameters(indepVar);
+ if (!ok2Continue) return null;
+ var success=randomPointCompare(n,domain,indepVar,%
+epsilon,CorrAns,UserAns,comp);
+% \end{macrocode}
+% \paragraph*{postParse} (2011/10/05) The beginning of an idea, \texttt{postParse}. After it is determined
+% whether the answer is right or wrong, post-process it here. For example,
+% if the problem is to extract all roots of $\sqrt{72}$, the correct answer
+% is $6\sqrt{2}$, whereas $3\sqrt{8}$ is not correct though it is equal to
+% $\sqrt{72}$
+% \begin{macrocode}
+ if ( success && (typeof(oComp)=="object") %
+&& (typeof(oComp.postParse)!="undefined") )
+ success=processSpecialParse(oComp.postParse,UserAns);
+ return success;
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+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") {
+% \end{macrocode}
+% If \texttt{oParse} is an object (it should be an array), and the first entry is a function
+% then we have: \texttt{priorParse: [myfunction, optional arguments]}. The function is
+% evaluated with the args \texttt{(UserAns, optional args)}. In the code below, we remove
+% the name of the function at the beginning of the array, and insert the \texttt{UserAns}
+% in its place. Various syntax variations supported.
+%\begin{verbatim}
+% priorParse: nodec,
+% priorParse: [nodec,noBinFac],
+% priorParse: [nodec,noBinFac,[myFunc,arg1, arg2,..]],
+%\end{verbatim}
+% \begin{macrocode}
+% _o=oParse.shift();
+% oParse.unshift(UserAns);
+ retn=_o(UserAns);
+% retn = _o.apply(null,oParse);
+ if (retn==null) return retn;
+% \end{macrocode}
+% In this case, we break out of the loop, we don't expect any more properties
+% for \texttt{priorParse} or \texttt{postParse}.
+% \begin{macrocode}
+% break;
+ } else {
+% \end{macrocode}
+% If \texttt{oComp.priorParse[i]} is not a function, it is required to be an array. The first
+% element of the array is the function, the rest of the entries are the additional arguments
+% (in addition to \texttt{UserAns}).
+% \begin{macrocode}
+% f=_o.shift();
+% _o.unshift(UserAns);
+% retn=f.apply(null,_o);
+ retn=_o[0].apply(null, [ UserAns ].concat(_o.slice(1)));
+ if (retn==null) return null;
+ }
+ }
+ } else {
+% \end{macrocode}
+% The case where \texttt{preParse: myfunction} or \texttt{postParse: myfunction}.
+% Such a function is evaluated with the \texttt{UserAns} argument.
+% \begin{macrocode}
+ retn = oParse(UserAns);
+ }
+ return retn;
+}
+% \end{macrocode}
+% This function randomly selects points from the interval [a,b]
+% and calls the 'comp' function to compare results.
+% Returns: null if the expression is bad, no penalty.
+% true if the error of the random comparison is less than epsilon
+% false if the error of the random comparison is greater than epsilon
+% \begin{macrocode}
+function randomPointCompare (n,domain,indepVar,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,indepVar,CorrAns,userAns);
+ if (error == null) return null;
+ if ( (error == -1) || (error > epsilon) ) {j=-1; break;}
+ }
+ }
+ if (j!=n) return false;
+ }
+ return true;
+}
+% \end{macrocode}
+% \texttt{diffCompare}: A simple comparison function, we evaluate the two input function `\texttt{\_F}'
+% and `\texttt{\_G}' and the point `\texttt{\_c}' and return the absolute difference.
+%
+% Returns: Absolute difference between `\texttt{\_F}' and `\texttt{\_G}'
+% null if expression was not valid
+% -1 if expression is not a number
+% \begin{macrocode}
+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;
+% \end{macrocode}
+% For each of the independent variables, we set them equal to a randomly chosen value
+% from the specified interval.
+% \begin{macrocode}
+ 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])+";");
+ }
+% \end{macrocode}
+% The \texttt{\_F} is the author's answer, we assume this is well formed JavaScript
+% and do not test it for possible errors. The author can correct before s/he distributes
+% the document.
+% \begin{macrocode}
+ _F = eval(_F);
+% \end{macrocode}
+% Now we try to protect our code from bad input. We use \texttt{try/catch} to try and
+% thrown exceptions. However, \texttt{try/catch} is not valid in any version of the
+% Acrobat Reader prior to version 5.
+% \begin{macrocode}
+ if ( app.viewerVersion >= 5)
+ {
+% \end{macrocode}
+% This code, which uses \texttt{eval()} and \texttt{try/catch} is an attempt to write
+% code that both works for Acro5 (or higher) and Acro4.05/4.0. In Acro4.x, \texttt{try/catch}
+% are reserved words, so we can't use them even in a conditional. However, within a string
+% the JavaScript interpreter does not see them. The other complication is that Acro5 objects
+% to having a \texttt{return} within an \texttt{eval()}, so we work around that with a
+% \texttt{rtnCode}. The returns are executed outside the \texttt{eval()}.
+% \begin{macrocode}
+ 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
+% \end{macrocode}
+% For Acro4/4.05, all we can do is detect whether \texttt{\_G} is a number or not. If the user
+% enters an undefined symbol, for example, we cannot catch this as we can with Acro5. Oh, well.
+% \begin{macrocode}
+ if(isNaN(_G = eval(_G))) return -1;
+% \end{macrocode}
+%
+% The function \texttt{G} is the user's input expression. There may be syntax errors
+% that prevent the successful numerical evaluation of the expression. We try to
+% prevent problems.
+%
+% If the user enters a function such as \texttt{sqrt( 1 - x )}, and this function is
+% evaluated at a x = 2, for example, we are outside the domain of the function. The \texttt{isNaN}
+% function will catch this type of error. A return of \texttt{-1} signals an error
+% at this of this type. This is considered to be an error by the user, and will be scored as an
+% incorrect answer.
+%
+% The error described above does not throw an exception. What will throw an exception
+% is if the users function has some undefined variables in it. For example, suppose
+% we are expecting a response that is a function of \texttt{x} and the user enters a
+% function of \texttt{t} instead. This will throw an exception as \texttt{t} is undefined.
+% In this case, we do not treat this as an error, and expect the user to correct the
+% input. This kind of error is signaled by returning a \texttt{null}.
+%
+% \begin{macrocode}
+ return Math.abs ( _F - _G );
+}
+% \end{macrocode}
+% This function is the same as above, but returns the relative absolute error.
+% \begin{macrocode}
+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 );
+}
+% \end{macrocode}
+% \DescribeMacro{requireForm}(07/16/11) The JS function \texttt{requireForm} is an example of a filter function. It is
+% of such a general nature we put it in the \textsf{exerquiz} code, rather than the \textsf{dljslib} code.
+% The function takes two or three arguments, the second one is an regular expression or an array
+% of regular expressions to test \texttt{UserAns} against. The third, optional argument is a text message to
+% be displayed if the \texttt{UserAns} is not of the required form.
+%\changes{v6.4f}{2011/07/16}{Added \texttt{requireForm} filtering function}
+%\par\medskip\noindent Usage: Factor: $-36z^5 - 96z^4 - 64z^3.$
+%\begin{verbatim}
+%\RespBoxMath{-4z^3(3z+4)^2}(z)*{3}{.0001}{[0,1]}[ { priorParse:
+% \Array( \Array( requireForm, \Array(%
+% /.*(\refac\repow|\refac\refac)/,%
+% /.*\refac\refac\repow\redigit+/,%
+% /.*\refac\repow\redigit+\refac/,%
+% /.*\refac\refac\refac/%
+% ), \myCustomMsg ) ) }
+% ]\CorrAnsButton{-4z^3(3z+4)^2}
+%\end{verbatim}
+% where \cs{refac}, \cs{repow}, \cs{redigit}, and \cs{rediv} are convenience macros defined
+% earlier in \texttt{exerquiz.dtx}. The regular expression describe the form of the answer
+% acceptable.
+%
+% There seems to be a redundancy in the usage of \cs{Array}, but this is by design.
+% The first \cs{Array} is there so the function \texttt{\_ProcResp} does not misinterpret
+% the second \cs{Array}.
+% \begin{macrocode}
+function requireForm(UserAns, regexpr) {
+ var msg=\defaultReqFormMsg;
+ UserAns = stripWhiteSpace (UserAns);
+ if (!ok2Continue) return null;
+% UserAns = stripOutMuli(UserAns);
+ UserAns = ChngAllGrpsToParens(UserAns);
+ if (arguments.length>2) msg=arguments[2];
+ if (typeof(regexpr.length)=="undefined") {
+ if (regexpr.test(UserAns)) return true;
+ else { eqAppAlert(msg,3); return null; }
+% \end{macrocode}
+% \texttt{regexpr} is an array of regular expressions.
+% \begin{macrocode}
+ } 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; }
+ }
+}
+% \end{macrocode}
+% \DescribeMacro{denyForm}Same type of function as \texttt{requireForm}.
+% If the regular expression is found, we return \texttt{null}
+% and emit an alert.
+% \begin{macrocode}
+function denyForm(UserAns, regexpr) {
+ var msg=\defaultReqFormMsg;
+ UserAns = stripWhiteSpace (UserAns);
+ if (!ok2Continue) return null;
+% UserAns = stripOutMuli(UserAns);
+ UserAns = ChngAllGrpsToParens(UserAns);
+ if (arguments.length>2) msg=arguments[2];
+ if (typeof(regexpr.length)=="undefined") {
+ if (regexpr.test(UserAns)) { eqAppAlert(msg,3); return null; }
+ else return true;
+% \end{macrocode}
+% \texttt{regexpr} is an array of regular expressions.
+% \begin{macrocode}
+ } 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;
+ }
+}
+% \end{macrocode}
+% \DescribeMacro{requireFormNot} does the opposite of
+% \texttt{requireForm}. If the regular expression is found,
+% we return \texttt{false}. \texttt{postParse} does not emit any messages.
+% \begin{macrocode}
+function requireFormNot(UserAns, regexpr) {
+ UserAns = stripWhiteSpace (UserAns);
+ if (!ok2Continue) return null;
+ UserAns = stripOutMuli(UserAns);
+ UserAns = ChngAllGrpsToParens(UserAns);
+ if (typeof(regexpr.length)=="undefined") {
+% \end{macrocode}
+% If the regular expression is found, we return false
+% this is opposite to what \texttt{requireForm} returns
+% \begin{macrocode}
+ if (regexpr.test(UserAns)) return false;
+ else return true;
+% \end{macrocode}
+% \texttt{regexpr} is an array of regular expressions.
+% \begin{macrocode}
+ } 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}
+% \end{macrocode}
+% \subsection{Text Fill-in}
+% Now the JS functions that process text fill-in questions.
+% \begin{macrocode}
+\begin{newsegment}{Eq: Support Text Fill-in}
+% \end{macrocode}
+% This function processes fill-in problems that require only a text
+% response. It takes a variable number of arguments, which are retrieved
+% using the \texttt{arguments[]} array
+% \begin{macrocode}
+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);
+}
+% \end{macrocode}
+% This is for text fill-in problems with partial credit. It takes a variable
+% number of arguments. \texttt{arguments[i]=["<word>", part\_credit]}. This
+% function has a property attached to it \texttt{ProcRespTxtPC.txtPCpCr}
+% is the credit received for this problem. This function is called by
+% \cs{RespBoxTxtPC}.
+% \begin{macrocode}
+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;
+% \end{macrocode}
+% Unlike \texttt{ProcRespTxt}, we do not break at our first success. We go through
+% all \texttt{<words>}, each having partial credit associated with it. For each
+% success returned by \texttt{compareTxt}, we add in the credit to the total.
+% \begin{macrocode}
+ for (i=3;i<arguments.length;i++)
+ if(compareTxt(userAnswer,arguments[i][0],%
+filterMethod,compareMethod))
+ ProcRespTxtPC.txtPCpCr+=(arguments[i][1]);
+% \end{macrocode}
+% success if at least one of the words were used, partial credit awarded.
+% \begin{macrocode}
+ success=(ProcRespTxtPC.txtPCpCr>0);
+ return notifyField(success,flag,fieldname);
+}
+% \end{macrocode}
+%
+% \texttt{compareTxt} actually compares the \texttt{userAnswer} with the \texttt{authorAnswer}.
+% there are options for various types of comparisons.
+% Returns true or false.
+% \begin{macrocode}
+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);
+% \end{macrocode}
+% When using \cs{RespBoxTxtPC}, if the author wants to use the
+% character class . (period, meaning match anything newline or another unicode line terminator)
+% we define in \cs{RespBoxTxtPC} a local command \cs{any} which expands to \texttt{@any@}.
+% After we replace any occurrence of . (period) with \verb!\\.!, we then replace \texttt{@any@}
+% with \texttt{.}.
+% \begin{macrocode}
+ 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;
+ }
+}
+% \end{macrocode}
+% Various string prototypes. This function is called by compareTxt.
+% The function returns the 'filtered' string.
+% \begin{macrocode}
+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,"");
+% \end{macrocode}
+% If filter method 3 is used, a case-insensitive search is used in the
+% \texttt{compareTxt} method. Added 04/21/09.
+% \begin{macrocode}
+ case 3:
+ default:
+% \end{macrocode}
+%\changes{v6.4k}{2011/08/17}{Within the function eqFilter, changed \texttt{this} to
+% \texttt{this.toString()}. The comparisons were returning false when they shouldn't
+% this is because in this case, we were comparing objects to objects}
+% \begin{macrocode}
+ return this.toString();
+ }
+}
+\end{newsegment}
+% \end{macrocode}
+% \subsection{Multiple Choice Questions}
+% These are the routines for processing multiple choice questions.
+% \begin{macrocode}
+\begin{newsegment}{Eq: Quiz Management}
+function InitMsg(msg) { return (\eqInitQuizMsg) }
+function syntaxError() { eqAppAlert(\eqSyntaxErrorUndefVar,3); }
+% \end{macrocode}
+% \begin{macrocode}
+var lstOfQuizzes=new Array();
+% \end{macrocode}
+% There are four required parameters, if there is a fifth, that means
+% we have a grouped question, parameter 5 will be the group sub-problem number.
+% \begin{macrocode}
+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 {
+% \end{macrocode}
+% If key is an array, we are processing a multiple selection problem. The
+% actual key is the first entry. The second entry, not used here, is 1
+% if user has selected at least one correct answer, zero otherwise.
+% \begin{macrocode}
+ 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;
+ }
+ }
+% \end{macrocode}
+% \texttt{ProcUserResp()} is also called by a link, so we'll skip this code.
+% \texttt{fieldPopTbl()} is executed later in \texttt{ProcessQuestions()}
+% \begin{macrocode}
+ 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;
+% \end{macrocode}
+% We create a special parameter for Oa.Sys. Then the arguments.length is
+% 3 (or greater) we do not set the objective text fields to readonly=false.
+% Oa.Sys already creates a readonly field for the solutions, we don't want
+% to mess with that.
+% \begin{macrocode}
+ 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)
+ {
+% \end{macrocode}
+% The next few lines support local symbol and color assignment.
+% \begin{macrocode}
+ 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]);
+% \end{macrocode}
+% (2013/10/27) Removed legacy code for version prior to 4.0
+% \begin{macrocode}
+ 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 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;
+}
+% \end{macrocode}
+% The function RecordPointValue has two required parameters. For a grouped question,
+% there are three more parameters, they are, in order (2) grpquestionno (3) grpPointValue
+% (4) total weight (5) grpEvalFunction, a JS function that evaluates the group.
+% The elements of the ProbValue array are as follows:
+%\begin{enumerate}
+% \item If multiple choice, then the entry is \texttt{[0, point value, partial credit]}
+% \item If objective type question that is not part of a group, the entry is a number \texttt{point value}
+% \item total weight of the group, significant only if greater than point value
+% \item If objective grouped-type question, the entry is\\
+% \texttt{[1, EvalJS, grpPointValue, <list of points for each part>]}
+%\end{enumerate}
+% \begin{macrocode}
+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;
+ 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);
+% quizGrade = GetGrade(\eqGradeScale);
+ 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;
+% \end{macrocode}
+% MC or MS questions
+% \begin{macrocode}
+ 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);
+% \end{macrocode}
+% (2013/10/27) removed legacy code for versions prior to 4.0.
+% \begin{macrocode}
+ 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);
+}
+% \end{macrocode}
+% Dependencies: \texttt{RightWrong}, \texttt{ProbDist} (if \texttt{qMark} is present).
+% \begin{macrocode}
+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;
+% \end{macrocode}
+% MC or MS questions
+% \begin{macrocode}
+ var f = this.getField("mcq." + qtfield);
+ if ( f != null) f.display = display.visible;
+ 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;
+% f = this.getField("Ans." + qtfield);
+ % 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;
+% \end{macrocode}
+% dps (01/01/04) If there are qMark fields, then write marks for each question
+% to them.
+% \begin{macrocode}
+ f = this.getField("qMark."+qtfield);
+ if ( f != null )
+ {
+% console.println("ProbDist = " + ProbDist.toSource() );
+ for ( var i = 1; i <= nQuestions; i++)
+ {
+ if ( ProbValue[i] == undefined ) ProbValue[i]=0
+ f = this.getField("qMark."+qtfield+"."+(i-1));
+ if ( f != null )
+ {
+% \end{macrocode}
+% (3/22/04) This is code to account for grouping
+% \begin{macrocode}
+ // 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;
+ }
+}
+% \end{macrocode}
+% When pdftex is used, the total tally box does not work because pdftex does not support
+% the calculate key in AcroForms. We try to simulate this.
+% \begin{macrocode}
+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);
+ }
+% console.println("sqtotal="+sqtotal);
+ 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}
+% \end{macrocode}
+% \subsection{Support for Multiple Selection Questions}
+% This function
+% \begin{macrocode}
+\begin{newsegment}{Eq: Support for Multi-Selection}
+function ProcessMultiSelection(key,letterresp,probno,%
+quizno,qtfield,pts,ppts) {
+ var f = this.getField("mck."+qtfield+"."+probno);
+% \end{macrocode}
+% For the multiple selection problem, the formats for the \texttt{RightWrong} and \texttt{ProbValue}
+% arrays are as follows:
+%\begin{verbatim}
+% RightWrong[probno]
+% [0, 1, [undefined, undefined, 0, 1, 1, 0, 1]]
+%\end{verbatim}
+% The first entry records whether the user answered the question totally correctly,
+% the second entry is for awarding points, 1 if the user selected at least one correct
+% answer. The third entry is an array of right/wrong responses to the user's responses.
+%\begin{verbatim}
+% ProbValue[probno]
+% [3, 5, [undefined, undefined, -2, 3, 3, -2, 3]]
+%\end{verbatim}
+% First entry is the number of correct answers for this problem, the second entry is the
+% number of points the student has earned for this problem, the third entry is an array of points obtained
+% based on the user's responses.
+%\changes{v6.3h}{2008/10/17 }
+%{%
+% For the manswers environment, we were not determining if the user had answered the question
+% correctly.
+%}
+% \begin{macrocode}
+ if ( typeof ProbValue[probno] == "undefined" ) {
+ var g = f.getArray();
+% \end{macrocode}
+% We calculate the total number of correct alternatives in this MS field
+% \begin{macrocode}
+ 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" ) {
+% \end{macrocode}
+% As we go through the \texttt{ProbValue[probno][2]} array, we use the index
+% to make some tallies in the \texttt{RightWrong[probno][2]} array. We multiply
+% and add all entries together. The value of \texttt{areAllCorrect} will be 1 if the
+% student only chooses correct answers, while \texttt{numCorrect} totals the number of
+% correct responses.
+% \begin{macrocode}
+ areAllCorrect *= (1*RightWrong[probno][2][i]);
+ numCorrect +=(1*RightWrong[probno][2][i]);
+ }
+ }
+% \end{macrocode}
+% The value of \texttt{scoreThisProblem} will be 0 if the user selects any false
+% answers, and will be the number of correct answers selected otherwise.
+% \begin{macrocode}
+ scoreThisProblem = areAllCorrect*numCorrect;
+% \end{macrocode}
+% Now the value of \texttt{scoreThisProblem} is 0 if the user selects any false
+% answers, and~1 if the number of correct answer equals the total number of
+% correct answers for this problem.
+% \begin{macrocode}
+ var scoreThisProblem = Number( scoreThisProblem == nTotalCorrect );
+% \end{macrocode}
+% \texttt{(02/02/09)}: If we determine this problem is right, but \texttt{pointsThisProblem==0},
+% then there must be no partial credit specification of the points, so we'll award all points.
+% \begin{macrocode}
+ if (scoreThisProblem==1 && pointsThisProblem==0 )
+ pointsThisProblem=pts;
+ ProbValue[probno][1] =
+ ( (ProbValue[probno][1] == 0) && (scoreThisProblem == 1) )
+ ? pts : pointsThisProblem;
+% \end{macrocode}
+% \texttt{passKey} represents whether positive credit is assigned; \texttt{passKey} is only 1
+% when points are awarded. \texttt{scoreThisProblem} is 0 or 1 dependent
+% on whether the problem is wrong or right.
+% \begin{macrocode}
+ 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}
+% \end{macrocode}
+% \subsection{Miscellaneous JS}
+% \begin{macrocode}
+\begin{newsegment}{Eq: Miscellaneous JS}
+% \end{macrocode}
+% This function notifies the calling field of the results. If flag=0,
+% it changes the color of the field and updates the tally field.
+% \begin{macrocode}
+function chooseJSColor( b, c1, c2 ) {
+ return ( b ) ? c1 : c2;
+}
+function notifyField(success, flag, fieldname) {
+ if ( flag != 0 )
+ return (success)?true:false;
+% \end{macrocode}
+% if \texttt{flag == 0}, then we are working with a \texttt{shortquiz}, and immediate response
+% is needed.
+% \begin{macrocode}
+ var f = this.getField(fieldname);
+ var re=/^(obj|grpobj)\./;
+ var gname=fieldname.replace(re,"rbmarkup\.");
+ var g =this.getField(gname);
+ var isthereRBUP = ( g !=null );
+% \end{macrocode}
+% Extract the quiz name from the field name: \texttt{obj.QName.num} or \texttt{grpobj.QName.num}
+% \begin{macrocode}
+ 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 ?
+}
+% \end{macrocode}
+% \begin{macrocode}
+function updateTally(fieldname)
+{
+ var objre = /^obj\./;
+ var grpre = /^grpobj\./;
+% \end{macrocode}
+% If the question is part of a group of questions, then it has a root name of \texttt{grpobj}.
+% This root needs to be removed, as well as the sub-group number.
+% \begin{macrocode}
+ 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;
+
+}
+% \end{macrocode}
+% Below is the \texttt{noPeek} JS function that has been part of \textsf{exerquiz} from the
+% beginning.
+%\begin{verbatim}
+%function noPeek(qtfield,rtnPage)
+%{
+% if ( (typeof (aQuizControl[qtfield]) == "undefined") %
+%|| (aQuizControl[qtfield] != -1) ) {
+% this.pageNum = rtnPage-1;
+% eqAppAlert(\noPeekMsg,3);
+% }
+%}
+%\end{verbatim}
+% (2010/08/09 v6.3s) One user recently reported that Acrobat/Reader can crash when \texttt{noPeek} is in effect.
+% This occurs when the down arrow on the scroll bar is pressed and kept pressed by the mouse.
+% The pages can jump between the quiz and a solution page, and build up alert boxes each time.
+% Eventually, there is a crash (though I haven't experienced the crash, I have seen the effects
+% of using the down arrow on the scroll bar). Below is a proposed ``fix'' for using this
+% hellish button. We turn off the alert for 5 milliseconds but always return to the
+% starting page (\texttt{rtnPage}), it is not the best solution, but it fixes the crashing
+% problem.
+% \begin{macrocode}
+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;
+}
+% \end{macrocode}
+% When the user exits a fill-in shortquiz field, this function is called.
+% It immediately notifies user of whether their answer is right
+% or wrong, and changes the color of the boundary field.
+% \begin{macrocode}
+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);
+}
+% \end{macrocode}
+% Description: This is the default function for determining whether
+% the minimal requirements for finishing a quiz have been met. The
+% default is that there is no minimal requirement.
+% Arguments: qtfield = name of the field.
+% Returns: true if minimum threshold is met, false otherwise.
+% \begin{macrocode}
+function lowThreshold(nQuestions)
+{
+ return true;
+}
+% \end{macrocode}
+% Description: This is the default function for determining whether
+% the minimal requirements for finishing a quiz have been met. Here
+% the requirements are to answer all the questions.
+% Arguments: nQuestions = number of questions.
+% Returns: true if minimum threshold is met, false otherwise.
+%
+% \noindent You can define this function as the default threshold function by
+% typing\par
+%\begin{verbatim}
+%\renewcommand\minQuizResp{highThreshold}
+%\end{verbatim}
+% \begin{macrocode}
+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}
+% \end{macrocode}
+% \subsection{Support for Grouped Questions}
+% These function can be called by the \texttt{mathGrp} environment to score the user's
+% responses to the grouped questions.
+% \begin{macrocode}
+\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;
+}
+% \end{macrocode}
+% This function gives full credit if all parts are answer correctly,
+% otherwise, it gives no credit. This defeats the purpose of partial
+% credit. But someone asked for it.
+% \begin{macrocode}
+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*}
+%</aebjs>
+%<*sumrytbls>
+% \end{macrocode}
+% This function is called by the \cs{CorrButton}, it does nothing if the ``SanityCheck''
+% fields are not present; otherwise, it colors the boundaries red, green or blue
+% depending on whether the problem is wrong, right, or wrong with partial credit given.
+% \begin{macrocode}
+\begin{insDLJS}[correctSumryTbl]{sumtbljs}{Eq: Populate Summary Table}
+function correctSumryTbl(qtfield,nQuestions) {
+% \end{macrocode}
+% \paragraph*{Checkboxes.} We begin by correcting the second column of the summary table.
+% \begin{macrocode}
+ 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;
+ }
+ }
+% \end{macrocode}
+% \paragraph*{Markup text fields.} Now, we insert the points into the
+% markup text fields for the summary table. We look for two types of
+% fields, in the next two lines. Each type is formatted differently.
+% \begin{macrocode}
+ var f1=this.getField(qtfield+"SanityCheckPts");
+ var f2=this.getField(qtfield+"SanityCheckOOPts");
+ var h=this.getField(qtfield+"activateSC");
+% \end{macrocode}
+% If nonnull here, we format these text fields in the usual way, `2 pts', for example.
+% \begin{macrocode}
+ 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;
+ }
+ }
+% \end{macrocode}
+% \texttt{f2} is nonnull when \texttt{showOutOf=true} for any of the tables supporting \texttt{qtfield},
+% we repeat basically the same loop, but formatting the value differently.
+% \begin{macrocode}
+ 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"));
+ }
+ }
+}
+% \end{macrocode}
+% \DescribeMacro{fieldPopTbl} is called when there is a change in a response.
+% it gets info contained in a button embedded in the summary table (\texttt{nQuestions})
+% and then calls \texttt{popVisitsTbl()}.
+% \begin{macrocode}
+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}
+%</sumrytbls>
+%<*mcfi>
+\newcommand{\clickChkBxMCFI}{"Click the check box preceding this
+ math input field to enter text."}
+\begin{insDLJS}{mcf}{Eq: Supports MCFI-type questions}
+function mcfiKeyStroke(qname,n) {
+ if (event.change=="") return;
+ var qNumMC=--n;
+ var mcName="mc."+qname+"."+qNumMC;
+ var mc= this.getField(mcName);
+ var aExpVs=mc.exportValues;
+ var l=aExpVs.length-1;
+ if (!mc.isBoxChecked(l)) {
+ eqAppAlert(\clickChkBxMCFI,3);
+ event.rc=false;
+ }
+}
+function qRadioButtonMCFI(key,qname,n) {
+ var fname = "obj."+qname+"."+(n+1);
+ if ( key == 0) this.resetForm(fname);
+}
+\end{insDLJS}
+%</mcfi>
+% \end{macrocode}
+% \section{Language Definitions}
+% \StopEventually{Comment out \cs{OnlyDescription}
+% at the beginning of this file to see the language code.}
+% \subsection{French}
+% \begin{macrocode}
+%<*eqfr>
+% \end{macrocode}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%%%%% eqfr.def %%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Jean-Michel SARLAT %%
+%% Language: French %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Exercise label
+\renewcommand\exlabel{Exercice}
+% The value of this macro is written to \jobname.sol,
+% accented characters must be protected with a \protect
+\renewcommand\exlabelsol{\exlabel}
+
+% Solution label for solutionafter option for exercise
+\renewcommand{\eq@exsolafterDefault}{\textit{Solution} :}
+
+% Title of exercise solution section
+\renewcommand\exsectitle{Solutions des \exlabelsol s}
+\renewcommand\exsecrunhead{\exsectitle}
+
+% Title of quiz solution section
+\renewcommand\eq@sqslsectitle{Les r\'{e}ponses aux questionnaires}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+% Running header/section title for solutions to quizzes
+\renewcommand\eq@sqslsecrunhead{Les r\'{e}ponses aux questionnaires}
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+% Label for solutions to quizzes, appears in solutions sections
+\renewcommand\eq@sqsllabel{%
+ \protect\textbf{R\protect\'{e}ponse :}}
+\renewcommand\sqsllabel{\eq@sqsllabel}% User access
+
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{Solution} :}
+
+% Here is the default short quiz label.
+\renewcommand\eq@sqlabel{\textcolor{red}{Question.}}
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+
+% Here is the default short quiz return label
+% No formatting allowed
+\renewcommand\eq@sqslrtnlabel{Retour au questionnaire.}
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+% Short quiz feedback messages
+\renewcommand\eqsqrtmsg{"Exact !"}
+\renewcommand\eqsqwgmsg{"Faux !"}
+
+% Here is the default quiz label. No formatting allowed!
+\renewcommand\eq@bqlabel{D\'ebut}
+% User access to shortquiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+%==> modif JMS <==%
+% Les modifications du contenu de \eqlabel ne seront pas prises en
+% compte dans les messages de javascript (pb pour faire passer les
+% accents dans le code !). Ceci justifie pour moi l'introduction de
+% la variable \bqlabelISO ou le label de debut de questionnaire est
+% cod\'{e} ISO (octal). Cela parce que je veux utiliser le mot D\'ebut.
+% Use \protect\351, this helps out TeX4ht by Eitan Gurari
+\renewcommand\eq@bqlabelISO{D\string\351but}
+\renewcommand\bqlabelISO{\eq@bqlabelISO}
+
+% Here is the default quiz label.
+\renewcommand\eq@eqlabel{Fin}
+% User access to shortquiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+%
+% JavaScript Messages for Quiz Environments
+\renewcommand\eq@Score{Score :}\renewcommand\eq@OutOf{sur}
+\renewcommand\eqInitQuizMsg{%
+ "Vous devez initialiser le questionnaire ! Clicker sur "+msg+"."}
+\renewcommand\eqMadeChoice{
+ "Vous avez d\string\\351j\string\\340 fait un choix,"
+ + " ce choix est ("+Responses[probno]+")."
+ + " Souhaitez vous le modifier ?"}
+%
+% Valeur "Yes" d'Acrobat
+%
+% Default button labels for \eqButton
+%\renewcommand\eq@local@CA{R\string\351ponses}
+\renewcommand\eq@local@CA{%
+ R\texorpdfstring{\'}{\string\351}ponses}
+\renewcommand\eq@local@RC{Correctes}
+\renewcommand\eq@local@AC{SVP !}
+%</eqfr>
+% \end{macrocode}
+% \subsection{German}
+% \begin{macrocode}
+%<*eqde>
+% \end{macrocode}
+% \begin{macrocode}
+%%%%%%%%%%%%%%%%%%%% eqde.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Michael Wiedmann %%
+%% e-mail address: michael.wiedmann@detewe.de %%
+%% Language: German %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The exercise label
+\renewcommand\exlabel{\"Ubung}
+% The value of this macro is written to \jobname.sol,
+% accented characters must be protected with a \protect
+\renewcommand\exlabelsol{\protect\"Ubung}
+
+% Title of exercise solution section
+\renewcommand\exsectitle{L\"osungen der \exlabel en}
+\renewcommand\exsecrunhead{L\protect\"osungen der \exlabelsol en}
+
+% Solution label for solutionafter option
+\renewcommand{\eq@exsolafterDefault}{\textit{L\"osung}:}
+
+% Title of quiz solution section
+\renewcommand\eq@sqslsectitle{L\"osungen der Aufgaben}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+% Running header/section title for solutions to quizzes
+%\renewcommand\eq@sqslsecrunhead{L\"osungen der \"Ubungen}
+\renewcommand\eq@sqslsecrunhead{L\"osungen der Aufgaben}
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+% Label for solutions to quizzes, appears in solutions sections
+\renewcommand\eq@sqsllabel{%
+ \protect\textbf{L\protect\"osung zu Aufgabe:}}
+% User access
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{L\"osung}:}
+
+% Here is the default short quiz label.
+\renewcommand\eq@sqlabel{\textcolor{red}{Aufgabe}}
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+
+% Here is the default short quiz return label
+%\renewcommand\eq@sqslrtnlabel{Ende Aufgabe}
+%\renewcommand\eq@sqslrtnlabel{Test beenden}
+\renewcommand\eq@sqslrtnlabel{zur\"{u}ck zur Aufgabe}
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+% Short quiz feedback messages
+\renewcommand\eqsqrtmsg{"Richtig!"}
+\renewcommand\eqsqwgmsg{"Falsch!"}
+
+% Here is the default quiz label.
+%\renewcommand\eq@bqlabel{Beginn Aufgabe}
+\renewcommand\eq@bqlabel{Test starten}
+% User access to quiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+% Used for writing JavaScript Messages on screen. Use PDFDocEncoding
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabelISO}
+
+% Here is the default quiz label.
+%\renewcommand\eq@eqlabel{Ende Aufgabe}
+\renewcommand\eq@eqlabel{Test beenden}
+% User access to quiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+%
+% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+%
+\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."}
+%</eqde>
+% \end{macrocode}
+% \subsection{Norwegian}
+% \begin{macrocode}
+%<*eqno>
+%%%%%%%%%%%%%%%%%%%% eqno.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Hans Fredrik Nordhaug %%
+%% e-mail address: hansfn@mi.uib.no %%
+%% Language: Norwegian %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{{\O}velse}
+\renewcommand\exlabelsol{{\protect\O}velse}
+
+\renewcommand\exsectitle{L{\o}sning p{\aa} {\o}velsene}
+\renewcommand\exsecrunhead{L{\protect\o}sning p{\protect\aa}
+ {\protect\o}velsene}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{L{\o}sning}:}
+
+\renewcommand\eq@sqslsectitle{L{\o}sning p{\aa} oppgavene}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{L{\o}sning p{\aa} oppgavene}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \protect\textbf{L{\protect\o}sning p{\protect\aa} oppgave:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{L{\o}sning}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Oppgave}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Slutt}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Rett!"}
+\renewcommand\eqsqwgmsg{"Feil!"}
+
+\renewcommand\eq@bqlabel{Start oppgaver}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{Slutt}
+\renewcommand\eqlabel{\eq@eqlabel}
+
+\renewcommand\eqScore{Poeng:}\renewcommand\eqOutOf{av}
+\renewcommand\eqInitQuizMsg{"Du m\string\\345 initialisere testen!"
++" Klikk p\string\\345 "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "Du har allerede gjort et valg.
+ Valget var ("+Responses[probno]+").
+ Vil du endre det?"}
+\renewcommand\eq@local@CA{Rett}
+\renewcommand\eq@local@RC{mine svar!}
+%\renewcommand\eq@local@AC{V\string\346r s\string\345 snill!}}
+\renewcommand\eq@local@AC{%
+ V\texorpdfstring{\ae}{\string\346}r
+ s\texorpdfstring{\r}{\string\345}snill!}
+%</eqno>
+% \end{macrocode}
+% \subsection{Dutch}
+% \begin{macrocode}
+%<*eqnl>
+%%%%%%%%%%%%%%%%%%% eqnl.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Henny Wilbrink %%
+%% e-mail address: wsdwhw@win.tue.nl %%
+%% Language: Dutch %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% The exercise label
+\renewcommand\exlabel{Opgave}
+\renewcommand\exlabelsol{\exlabel}
+
+% Title of exercise solution section
+\renewcommand\exsectitle{Oplossingen van de Opgaven}
+\renewcommand\exsecrunhead{\exsectitle}
+
+% Solution label for solutionafter option for exercise
+\renewcommand{\eq@exsolafterDefault}{\textit{Oplossing}:}
+
+% Title of short quiz solution section
+\renewcommand\eq@sqslsectitle{Oplossingen van de Toetsen}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+% Running header/section title for solutions to short quizzes
+\renewcommand\eq@sqslsecrunhead{Oplossingen van de Toetsen}
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+% Solution label for solutionafter option
+\renewcommand{\eq@exsolafterDefault}{\textit{Oplossing}:}
+
+% Label for solutions to short quizzes, appears in solutions sections
+\renewcommand\eq@sqsllabel{\string\textbf{Oplossing van Toets:}}
+% User access
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{Oplossing}:}
+
+% Here is the default short quiz label.
+\renewcommand\eq@sqlabel{\textcolor{red}{Toets.}}
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+
+% Here is the default short quiz return label
+\renewcommand\eq@sqslrtnlabel{Terug naar Toets}
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+% Short quiz feedback messages
+\renewcommand\eqsqrtmsg{"Goed!"}
+\renewcommand\eqsqwgmsg{"Fout!"}
+
+% Here is the default quiz label.
+\renewcommand\eq@bqlabel{Begin Toets}
+% User access to shortquiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+% Used for writing JavaScript Messages on screen. Use PDFDocEncoding
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+% Here is the default quiz label.
+% No formatting allowed
+\renewcommand\eq@eqlabel{Einde Toets}
+% User access to shortquiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+
+%
+% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+%
+\renewcommand\eq@Score{Score:}\renewcommand\eq@OutOf{van de}
+
+\renewcommand\eqInitQuizMsg{%
+ "U moet de Toets initialiseren! Klik op "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "U hebt al een keuze gemaakt.
+ Uw keuze was ("+Responses[probno]+").
+ Wil u dit veranderen?"}
+%
+% Default button labels for \eqButton
+\renewcommand\eq@local@CA{Corrigeer}
+\renewcommand\eq@local@RC{Mijn Antwoorden!}
+\renewcommand\eq@local@AC{AUB!}
+%</eqnl>
+% \end{macrocode}
+% \subsection{Spanish}
+% \begin{macrocode}
+%<*eqes>
+%%%%%%%%%%%%%%%%%%% eqes.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Pedro Luis Luque %%
+%% e-mail address: calvo@cica.es %%
+%% Language: (spanish) %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The exercise label
+\renewcommand\exlabel{Ejercicio}
+% The value of this macro is written to \jobname.sol,
+\renewcommand\exlabelsol{\exlabel}
+
+% Title of exercise solution section
+\renewcommand\exsectitle{Soluciones a los \exlabel s}
+\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
+
+% Solution label for solutionafter option for exercise
+\renewcommand{\eq@exsolafterDefault}{\textit{Soluci\'{o}n}:}
+
+% Title of short quiz solution section
+\renewcommand\eq@sqslsectitle{Soluciones a los Tests}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+% Running header/section title for solutions to short quizzes
+\renewcommand\eq@sqslsecrunhead{Soluciones a los Tests}
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+% Label for solutions to short quizzes, appears in solutions sections
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Soluci\protect\'{o}n al Test:}}
+% User access
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{Soluci\'{o}n}:}
+
+% Here is the default short quiz label.
+\renewcommand\eq@sqlabel{\textcolor{red}{Test.}}
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+
+% Here is the default short quiz return label
+\renewcommand\eq@sqslrtnlabel{Final del Test}
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+% Short quiz feedback messages
+\renewcommand\eqsqrtmsg{"Correcto!"}
+\renewcommand\eqsqwgmsg{"Incorrecto!"}
+
+% Here is the default quiz label.
+\renewcommand\eq@bqlabel{Inicio del Test}
+% User access to shortquiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+% Used for writing JavaScript Messages on screen. Use PDFDocEncoding
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+% Here is the default quiz label.
+% No formatting allowed
+\renewcommand\eq@eqlabel{Final del Test}
+% User access to shortquiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+%
+% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+%
+\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?"}
+%
+% Default button labels for \eqButton
+\renewcommand\eq@local@CA{Correctas}
+\renewcommand\eq@local@RC{Mis Respuestas!}
+\renewcommand\eq@local@AC{Por Favor!}
+%</eqes>
+% \end{macrocode}
+% \subsection{Italian}
+% \begin{macrocode}
+%<*eqit>
+%%%%%%%%%%%%%%%%%%% eqit.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: PierLuigi Zezza %%
+%% e-mail address: pzezza@cce.unifi.it %%
+%% Language: Italian %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% The exercise label
+\renewcommand\exlabel{Esercizio}
+%
+% The value of this macro is written to \jobname.sol,
+\renewcommand\exlabelsol{\exlabel}
+%
+% Title of exercise solution section
+\renewcommand\exsectitle{Soluzioni degli Esercizi }
+\renewcommand\exsecrunhead{\exsectitle}
+%
+% Solution label for solutionafter option for exercise
+\renewcommand{\eq@exsolafterDefault}{\textit{Soluzione}:}
+%
+% Title of short quiz solution section
+\renewcommand\eq@sqslsectitle{Soluzioni dei Quiz}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+%
+% Running header/section title for solutions to short quizzes
+\renewcommand\eq@sqslsecrunhead{Soluzioni dei Quiz}
+%
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+%
+% Label for solutions to short quizzes, appears in solutions sections
+\renewcommand\eq@sqsllabel{\string\textbf{Soluzione del Quiz:}}
+%
+% User access
+\renewcommand\sqsllabel{\eq@sqsllabel}
+%
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{Soluzione}:}
+%
+% Here is the default short quiz label.
+\renewcommand\eq@sqlabel{\textcolor{red}{Quiz.}}
+%
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+%
+% Here is the default short quiz return label
+\renewcommand\eq@sqslrtnlabel{Fine Quiz}
+%
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+%
+% Short quiz feedback messages
+\renewcommand\eqsqrtmsg{"Giusto!"}
+\renewcommand\eqsqwgmsg{"Sbagliato!"}
+%
+% Here is the default quiz label.
+% No formatting allowed
+\renewcommand\eq@bqlabel{Inizio Test}
+%
+% User access to shortquiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+%
+% Here is the default quiz label.
+% No formatting allowed
+\renewcommand\eq@eqlabel{Fine Test}
+%
+% User access to shortquiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+%
+% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+%
+\renewcommand\eq@Score{Punteggio:}\renewcommand\eq@OutOf{su}
+\renewcommand\eqInitQuizMsg{"Dovete inizializzare il Quiz!
+ Click su "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "Avete gi\string\\340 fatto una scelta.
+ La vostra scelta era ("+Responses[probno]+").
+ Volete cambiarla ?"}
+%
+% Default button labels for \eqButton
+\renewcommand\eq@local@CA{Correggere}
+\renewcommand\eq@local@RC{Le mie risposte!}
+\renewcommand\eq@local@AC{Per favore!}
+%</eqit>
+% \end{macrocode}
+% \subsection{Russian}
+% \begin{macrocode}
+%<*eqru>
+%%%%%%%%%%%%%%%%%%% eqru.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Sergei V. Znamenskii %%
+%% e-mail address: znamensk@rustex.botik.ru %%
+%% Language: Russian %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\PassOptionsToPackage{unicode}{hyperref}
+\expandafter\ifx\csname inputencoding\endcsname\relax
+ \RequirePackage{inputenc}\fi
+\inputencoding{cp1251}\makeatletter
+\expandafter\ifx\csname Russian\endcsname\relax
+ \RequirePackage[russian]{babel}\fi
+% Language dependent definitions for Web.sty
+ \def\web@versionlabel{\^{A}{\aa}ð\~{n}\`{e}\"{y}}%
+ \def\web@toc{\~{N}\^{\i}\"{a}{\aa}ð{\ae}\`{a}\'{\i}\`{e}{\aa}}%
+ \def\web@continued{\"{\i}ð\^{\i}\"{a}\^{\i}\"{e}{\ae}.}%
+ \def\web@article{\'{I}\`{a}{\div}\`{a}\"{e}\^{\i}
+ \hyperlink{section.1}{}}%
+ \def\web@directory{\"{I}\`{a}\"{\i}\^{e}\`{a}}%
+ \def\web@revision{\"{A}\`{a}\`{o}\`{a} \"{\i}\^{\i}\~{n}\"{e}%
+ {\aa}\"{a}\'{\i}{\aa}\~{a}\^{\i} \`{e}\c{c}\`{\i}{\aa}%
+ \'{\i}{\aa}\'{\i}\`{e}\"{y}:}%
+ \def\web@copyright{\^{E}\^{\i}\"{\i}\`{e}ð\`{a}\'{e}\`{o}}%
+ \def\web@section{\textsection\ }%
+ % Label Navibar
+ \def\web@back{\'{I}\`{a}\c{c}\`{a}\"{a}}%
+ \def\web@doc{\"{A}\^{\i}\^{e}.}% restricted to three characters
+
+% The exercise label
+% Accents: \renewcommand\exlabel{\"Ubung} (German)
+\renewcommand\exlabel{\'{O}\"{\i}ð\`{a}{\ae}\'{\i}{\aa}\'{\i}\`{e}{\aa}}
+% The value of this macro is written to \jobname.sol,
+% accented characters must be protected with a \protect
+% E.g., \renewcommand\exlabelsol{\protect\"Ubung} (German)
+\renewcommand\exlabelsol{\^{E} \'{o}\"{\i}ð\`{a}{\ae}%
+ \'{\i}{\aa}\'{\i}\`{e}þ}
+
+% Title of exercise solution section
+% E.g.: \renewcommand\exsectitle
+% {L\"osungen der \exlabel en} (German)
+\renewcommand\exsectitle{Ð{\aa}{\o}{\aa}\'{\i}\`{e}\"{y}
+ \'{o}\"{\i}ð\`{a}{\ae}\'{\i}{\aa}\'{\i}\`{e}\'{e}}
+\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
+
+% Solution label for solutionafter option for exercise
+\renewcommand\exsolafter{\textit{Ð{\aa}{\o}{\aa}\'{\i}\`{e}{\aa}}:}
+
+% Title of short quiz solution section
+% Example: \renewcommand\eq@sqslsectitle
+% {L\"osungen der Aufgaben} (German)
+\renewcommand\eq@sqslsectitle{\^{I}\`{o}\^{a}{\aa}\`{o}\^{u}
+ \^{e} \`{o}{\aa}\~{n}\`{o}\`{a}\`{\i}}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+% Running header/section title for solutions to short quizzes
+\renewcommand\eq@sqslsecrunhead{\^{I}\`{o}\^{a}{\aa}\`{o}\^{u}
+ \^{e} \^{e}\^{\i}ð\^{\i}\`{o}\^{e}\`{e}\`{\i}
+ \`{o}{\aa}\~{n}\`{o}\`{a}\`{\i}}
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+% Label for solutions to short quizzes, appears
+% in solutions sections
+% Protect accents with \protect
+% E.g.: \renewcommand\eq@sqsllabel
+% {\string\textbf{L\protect\"osung zu Aufgabe:}} (German)
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{\^{I}\`{o}\^{a}{\aa}\`{o}\^{u}:}}
+% User access
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{Ð{\aa}{\o}{\aa}\'{\i}\`{e}{\aa}}:}
+
+% Here is the default short quiz label.
+\renewcommand\eq@sqlabel{%
+ \textcolor{red}{\c{C}\`{a}\"{a}\`{a}\'{\i}\`{e}{\aa}.}}
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+
+% Here is the default short quiz return label
+% No formatting allowed
+\renewcommand\eq@sqslrtnlabel{\^{a}{\aa}ð\'{\i}\'{o}\`{o}\"{u}\~{n}\"{y}}
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\cyrCommand\eqsqslrtnlabel{\^{E} \^{o}\^{\i}ð\`{\i}\'{o}\"{e}%
+ \`{e}ð\^{\i}\^{a}\^{e}{\aa} \c{c}\`{a}\"{a}\`{a}\'{\i}\`{e}\"{y}}
+\renewcommand\eq@sqslrtnlabel{\eqsqslrtnlabel}
+
+
+% Here is the default quiz label.
+% No formatting allowed
+% For Example: \renewcommand\eq@bqlabel{D\'ebut} (French)
+\renewcommand\eq@bqlabel{CTAPT}
+% User access to shortquiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+% Used for writing JavaScript Messages on screen.
+% Use PDFDocEncoding
+% For Example:
+% \renewcommand\eq@bqlabelISO{D\string\351but} (French)
+% Use \string not \protect, this helps out
+% TeX4ht by Eitan Gurari.
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+% Here is the default quiz label.
+% No formatting allowed
+\renewcommand\eq@eqlabel{\^{O}\`{E}\'{I}\`{E}{\O}}
+% User access to shortquiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+\def\ScoreFieldDefaults
+{%
+ \Ff{\FfReadOnly}\BC{1 0 0}\BG{}\S{S}
+ \DV{\^{A}{\aa}ð\'{\i}\^{\i}:}\W{1}
+}
+% Default button labels for \eqButton
+\renewcommand\eq@local@CA{\`{E}\~{n}\"{\i}ð\`{a}\^{a}\`{e}\`{o}\"{u}}
+\renewcommand\eq@local@RC{\`{\i}\^{\i}\`{e} \^{\i}\`{o}\^{a}{\aa}%
+ \`{o}\^{u}!}
+\renewcommand\eq@local@AC{\"{I}\^{\i}{\ae}\`{a}\"{e}\'{o}\'{e}\~{n}%
+ \`{o}\`{a}!}
+%
+% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+% In the Text Field showing the score, there is the default phrase in
+% English Score: 2 out of 3, the word "Score" and "out of" needs
+% translation.
+%% In Cyrillic, at least with pdflatex v.1.40.3 , the same \eq@Score
+%% unfortunately can not serve both \ScoreFieldDefaults and
+%% \eqQuizTotalMsg.
+
+\renewcommand\eq@Score{\u0412\u0435\u0440\u043D\u043E:}
+\renewcommand\eq@OutOf{\u0438\u0437}
+
+% Short quiz feedback messages
+%\def\eq@sqrtmsg{"\u0412\u0435\u0440\u043D\u043E!"}
+%\def\eq@sqwgmsg{"\u041E\u0448\u0438\u0431\u043A\u0430!"}
+\def\eqsqrtmsg{"\u0412\u0435\u0440\u043D\u043E!"}
+\def\eqsqwgmsg{"\u041E\u0448\u0438\u0431\u043A\u0430!"}
+
+% If you are taking a quiz and click on an alternative without
+% initializing the quiz first, this message appears.
+% Example: \renewcommand\eqInitQuizMsg{"Sie m\string\\374ssen die
+% Aufgaben initialisieren! Bitte klicken Sie auf "+msg+"."}%(German)
+\def\eqInitQuizMsg{"\u041A\u043B\u0438\u043A\u043D\u0438\u0442\u0435
+ \u043D\u0430 \u00AB"+msg+"\u00BB, \u0447\u0442\u043E\u0431\u044B
+ \u043D\u0430\u0447\u0430\u0442\u044C
+ \u043E\u0442\u0432\u0435\u0442."}
+
+% This macro doesn't usually need translation, it uses
+% \eqScore and \eqOutOf. However, if the sentence "Score: 2 out of 3"
+% does not translate conveniently into a particular language,
+% this macro may have to be modified. It's the one that puts the
+% message in the message box.
+% \renewcommand\eqQuizTotalMsg {"\eqScore\space"+Score+"
+% \eqOutOf\space"+nQuestions}
+% \renewcommand\eqQuizPointsMsg{"\eqptScore\space"+ptScore+"
+% \eqOutOf\space"+nPointTotal}
+% \renewcommand\eqQuizPercentMsg{pcScore+"\%"}
+% \renewcommand\eqQuizGradeMsg{quizGrade}
+% In the link form of a quiz, of you change your choice, this message
+% appears.
+% For Example: \renewcommand\eqMadeChoice{"Vous avez
+% d\string\\351j\string\\340 fait un choix, ce choix est
+% ("+Responses[probno]+"). Souhaitez vous le modifier ?"}%(French)
+\renewcommand\eqMadeChoice{"\u0412\u044B \u0443\u0436\u0435
+ \u0432\u044B\u0431\u0440\u0430\u043B\u0438
+ \u043E\u0442\u0432\u0435\u0442
+ ("+Responses[probno]+"). \u0418\u043B\u0438 \u0412\u044B
+ \u043F\u0435\u0440\u0435\u0434\u0443\u043C\u0430\u043B\u0438?"}
+% Default button label of \CorrAnsButton.
+\renewcommand\eq@local@CorrAnsButton{Ans}
+% These (error) messages are generated when the user enters an invalid
+% math expression into a math fill-in response box. The messages come in
+% the form of an eqAppAlert() so PDFDocEncoding needs to be used.
+\renewcommand\eqerrABS{"\u0417\u043D\u0430\u043A\u0438
+ \u0430\u0431\u0441\u043E\u043B\u044E\u0442\u043D\u043E\u0439
+ \u0432\u0435\u043B\u0438\u0447\u0438\u043D\u044B \u043D\u0435
+ \u0441\u0431\u0430\u043B\u0430\u043D\u0441\u0438\u0440\u043E\u0432%
+ \u0430\u043D\u044B.
+ \u0418\u0441\u043F\u0440\u0430\u0432\u044C\u0442\u0435,
+ \u043F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430."}
+\renewcommand\eqerrBadMathFunc{"\u0412\u044B\u0440\u0430\u0436\u0435%
+ \u043D\u0438\u0435 `"+aF[i]+"' \u043D\u0435 \u044F\u0432\u043B%
+ \u044F\u0435\u0442\u0441\u044F \u043D\u0438
+ \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0439 "
+ +"\u0444\u0443\u043D\u043A\u0446\u0438\u0435\u0439,
+ \u043D\u0438 \u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D%
+ \u044B\u043C\u043C\u0430\u0442\u0435\u043C\u0430\u0442\u0438\u0447%
+ \u0435\u0441\u043A\u0438\u043C \u0432\u044B\u0440\u0430\u0436\u0435%
+ \u043D\u0438\u0435\u043C."}
+\renewcommand\eqParens{"\u041A\u0440\u0443\u0433\u043B\u044B\u0435
+ \u0441\u043A\u043E\u0431\u043A\u0438"}
+\renewcommand\eqBrackets{"\u041A\u0432\u0430\u0434\u0440\u0430\u0442%
+ \u043D\u044B\u0435 \u0441\u043A\u043E\u0431\u043A\u0438"}
+\renewcommand\eqBraces{"\u0424\u0438\u0433\u0443\u0440\u043D\u044B\u0435
+ \u0441\u043A\u043E\u0431\u043A\u0438"}
+\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " \u043D\u0435
+ \u0441\u0431\u0430\u043B\u0430\u043D\u0441\u0438\u0440%
+ \u043E\u0432\u0430\u043D\u043E.
+ \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430,
+ \u0438\u0441\u043F\u0440\u0430\u0432\u044C\u0442\u0435."}
+\renewcommand\eqerrBadExp{"\u0418\u0441\u043F\u0440\u0430\u0432%
+ \u044C\u0442\u0435, \u043F\u043E\u0436\u0430\u043B\u0443\u0439%
+ \u0441\u0442\u0430, \u0432\u044B\u0440\u0430\u0436\u0435\u043D%
+ \u0438\u0435 \u0441\u043E \u0441\u0442\u0435\u043F\u0435\u043D%
+ \u044C\u044E."}
+\renewcommand\eqerrUnfinishQuiz{"\u041F\u043E\u0436\u0430\u043B\u0443%
+ \u0439\u0441\u0442\u0430, \u0437\u0430\u043A\u043E\u043D\u0447%
+ \u0438\u0442\u0435 \u043D\u0430\u0447\u0430\u0442\u043E\u0435
+ \u0440\u0430\u043D\u0435\u0435 \u0437\u0430\u0434\u0430\u043D%
+ \u0438\u0435."}
+\renewcommand\noPeekMsg{"\u0420\u0435\u0448\u0435\u043D\u0438\u044F
+ \u043D\u0435 \u043F\u043E\u043A\u0430\u0436\u0443\u0442\u0441\u044F,
+ \u043F\u043E\u043A\u0430 \u0437\u0430\u0434\u0430\u043D\u0438\u0435
+ \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043A
+ \u043E\u043D\u0447\u0435\u043D\u043E!"}
+\renewcommand\highThresholdMsg{"\u0412\u044B \u043D\u0435
+ \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u0435
+ \u043E\u0446\u0435\u043D\u043A\u0438, \u043F\u043E\u043A\u0430
+ \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u0442\u0435
+ \u043D\u0430 \u0412\u0421\u0415 \u0432\u043E\u043F\u0440\u043E%
+ \u0441\u044B."}
+\renewcommand\eqSyntaxErrorUndefVar{"\u0421\u0438\u043D\u0442\u0430%
+ \u043A\u0441\u0438\u0447\u0435\u0441\u043A\u0430\u044F
+ \u043E\u0448\u0438\u0431\u043A\u0430:
+ \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E,
+ \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F
+ \u043D\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435%
+ \u043D\u0430."}
+%</eqru>
+% \end{macrocode}
+% \subsection{Danish}
+% \begin{macrocode}
+%<*eqda>
+%%%%%%%%%%%%%%%%%%%% 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\string\346r s\string\345 god!}}
+\renewcommand\eq@local@AC{%
+ V\texorpdfstring{\ae}{\string\346}r
+ s\texorpdfstring{\r}{\string\345}god!}
+%</eqda>
+% \end{macrocode}
+% \subsection{Polish}
+% \begin{macrocode}
+%<*eqpo>
+%%%%%%%%%%%%%%%%%%%% eqpo.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Jerzy Mycielski %%
+%% e-mail address: jmyc@poczta.onet.pl %%
+%% Language: Polish %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% The polish accented characters included in pdfendconding is
+%% lslash and oacute, not included are zacute, zdot, cacute,
+%% nacute, sacute, aogonek, eogonek and corresponding capital
+%% characters.
+% Z \'{Z} \u0179
+% a \k{a} \u0105
+% c \'{c} \u0107
+% l \l \u0142
+% s \'{s} \u015B
+% z \.{z} \u017C
+% \'{o} \'{o} \u00F3
+\renewcommand\exlabel{Zadanie}
+\renewcommand\exlabelsol{\exlabel}
+
+\renewcommand\exsectitle{Rozwi\k{a}zania Zada\'{n}}
+\renewcommand\exsecrunhead{\protect\exsectitle}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Rozwi\k{a}znie}:}
+
+\renewcommand\eq@sqslsectitle{Rozwi\k{a}zania Test\'{o}w}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{Rozwi\protect\k{a}zania
+ Test\protect\'{o}w}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{\string\textbf{Rozwi\protect\k{a}zanie
+ Testu:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{Rozwi\k{a}zanie}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Test.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+%\renewcommand\eq@sqslrtnlabel{Zako\protect\'{n}cz Test}
+\renewcommand\eq@sqslrtnlabel{Zako\ifeq@solutionsafter\else
+ \expandafter\protect\fi\'{n}cz Test}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Dobrze!"}
+\renewcommand\eqsqwgmsg{"\string\\u0179le!"}
+%\renewcommand\eqsqwgmsg{"\'{Z}le!"}
+
+\renewcommand\eq@bqlabel{Rozpocznij Test}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{Zakoncz Test}
+% \renewcommand\eq@eqlabel{Zako\'{n}cz Test}
+\renewcommand\eqlabel{\eq@eqlabel}
+
+\renewcommand\eq@Score{Punkt\'{o}w:}
+\renewcommand\eq@OutOf{z mozliwych}
+\renewcommand\eqQuizTotalMsg{"\eqScore\space"+Score +
+ " \eqOutOf\space"+nQuestions}
+
+\renewcommand\eqInitQuizMsg{"Musisz rozpoczac Test! Kliknij
+ na "+msg+"."}
+
+\renewcommand\eqMadeChoice{%
+ "Juz dokonal\string\\233e\string\\u015B wyboru.
+ Twoim wyborem by\string\\233o ("+Responses[probno]+").
+ Czy chcesz go zmieni\string\\u0107?"}
+%\renewcommand\eqMadeChoice{%
+%"Ju\.{z} dokona\string\233e\'{s} wyboru. Twoim wyborem"
+%+" by\string\233o ("+Responses[probno]+")."+" Czy chcesz go
+%zmieni\'{c}?"}
+
+\renewcommand\eq@local@CA{Popraw}
+\renewcommand\eq@local@RC{Moje odpowiedzi!}
+\renewcommand\eq@local@AC{Prosze!}
+%\renewcommand\eq@local@AC{Prosz\k{e}!}
+%</eqpo>
+% \end{macrocode}
+% \subsection{Finnish}
+% \begin{macrocode}
+%<*eqfin>
+%%%%%%%%%%%%%%%%%%%% eqfin.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Paivi Porras %%
+%% e-mail address: paivi.porras@lut.fi %%
+%% Language: Finnish %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{Harjoitus}
+\renewcommand\exlabelsol{Harjoitus}
+
+\renewcommand\exsectitle{Ratkaisut}
+\renewcommand\exsecrunhead{Ratkaisu \exlabelsol }
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Ratkaisu}:}
+
+\renewcommand\eq@sqslsectitle{Vastaukset testikysymyksiin}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{Vastaukset testikysymyksiin}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Vastaus testikysymykseen:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{Ratkaisu}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Testikysymys}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Lopeta testi}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Oikein!"} %muokattu
+\renewcommand\eqsqwgmsg{"V\string\344\string\344rin!"} %m
+%\renewcommand\eqsqwgmsg{"V\"a\"arin!"} %m
+
+\renewcommand\eq@bqlabel{Aloita testi}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabelISO}
+
+\renewcommand\eq@eqlabel{Lopeta testi}
+\renewcommand\eqlabel{\eq@eqlabel}
+
+\renewcommand\eq@Score{Pisteet:}\renewcommand\eq@OutOf{/}
+\renewcommand\eqInitQuizMsg{%m
+ "Testi on aloitettava painamalla "+msg+"."}
+\renewcommand\eqMadeChoice{%m
+ "Olet jo kerran valinnut.
+ Valintasi oli ("+Responses[probno]+")."
++" Haluatko vaihtaa?"}
+\AtEndOfPackage{%
+\renewcommand\eq@local@CA{Oikein}
+\renewcommand\eq@local@RC{Omat vastaukset!}
+\renewcommand\eq@local@AC{Ole hyv\string\344!}}
+%</eqfin>
+% \end{macrocode}
+% \subsection{catalan}
+% \begin{macrocode}
+%<*eqcat>
+%%%%%%%%%%%%%%%%%%% eqcat.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Ramon Ballester %%
+%% e-mail address: ramon.ballester@udg.es %%
+%% Language: (catalan) %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The exercise label
+\renewcommand\exlabel{Exercici}
+% The value of this macro is written to \jobname.sol,
+\renewcommand\exlabelsol{\exlabel}
+
+% Title of exercise solution section
+\renewcommand\exsectitle{Solucions als \exlabel s}
+\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
+
+% Solution label for solutionafter option for exercise
+\renewcommand{\eq@exsolafterDefault}{\textit{Soluci\'o}:}
+
+% Title of short quiz solution section
+\renewcommand\eq@sqslsectitle{Solucions als Tests}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+% Running header/section title for solutions to short quizzes
+\renewcommand\eq@sqslsecrunhead{Solucions als Tests}
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+% Label for solutions to short quizzes, appears in solutions sections
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Soluci\protect\'{o} al Test:}}
+% User access
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{Soluci\'o}:}
+
+% Here is the default short quiz label.
+\renewcommand\eq@sqlabel{\textcolor{red}{Test.}}
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+
+% Here is the default short quiz return label
+\renewcommand\eq@sqslrtnlabel{Final del Test}
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+% Short quiz feedback messages
+\renewcommand\eqsqrtmsg{"Correcte!"}
+\renewcommand\eqsqwgmsg{"Incorrecte!"}
+
+% Here is the default quiz label.
+\renewcommand\eq@bqlabel{Inici del Test}
+% User access to shortquiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+% Used for writing JavaScript Messages on screen. Use PDFDocEncoding
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+% Here is the default quiz label.
+% No formatting allowed
+\renewcommand\eq@eqlabel{Final del Test}
+% User access to shortquiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+%
+% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+%
+\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?"}
+%
+% Default button labels for \eqButton
+\renewcommand\eq@local@CA{Correctes}
+\renewcommand\eq@local@RC{Les meves Respostes!}
+\renewcommand\eq@local@AC{Si us plau!}
+%</eqcat>
+% \end{macrocode}
+%
+% \subsection{Czech}
+% \begin{macrocode}
+%<*eqcz>
+%%%%%%%%%%%%%%%%%%% 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}
+
+% The exercise label
+\renewcommand\exlabel{Cvi\v{c}en\'{\i}}
+% The value of this macro is written to \jobname.sol,
+\renewcommand\exlabelsol{Cvi\protect\v{c}en\protect\'{\protect\i}}
+
+% Title of exercise solution section
+\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}
+
+% Solution label for solutionafter option for exercise
+\renewcommand{\eq@exsolafterDefault}{\textit{\v{R}e\v{s}en\'\i}:}
+
+% Title of short quiz solution section
+\renewcommand\eq@sqslsectitle{\texorpdfstring{\v{R}e\v{s}en\'{\i}
+ kv\'{\i}z\r{u}}{Resen\355{} kv\355zu}}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+% Running header/section title for solutions to short quizzes
+\renewcommand\eq@sqslsecrunhead{\v{R}e\v{s}en\'{\i} kv\'{\i}z\r{u}}
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+% Label for solutions to short quizzes, appears in solutions sections
+\renewcommand\eq@sqsllabel{\string\textbf{%
+ \string\v{R}e\string\v{s}en\string\'{\string\i}
+ kv\string\'{\string\i}zu:}}
+% User access
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{\v{R}e\v{s}en\'{\i}}:}
+
+% Here is the default short quiz label.
+\renewcommand\eq@sqlabel{\textcolor{red}{Kv\'{\i}z.}}
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+
+% Here is the default short quiz return label
+%\renewcommand\eq@sqslrtnlabel{Konec kv\string\'{\string\i}zu}
+\renewcommand\eq@sqslrtnlabel{Zp\string\v{e}t na ot\string\'{a}zky}
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+% Short quiz feedback messages
+\renewcommand\eqsqrtmsg{"Spravne !"}
+\renewcommand\eqsqwgmsg{"Spatne !"}
+
+% Here is the default quiz label.
+\renewcommand\eq@bqlabel{Zacatek kvizu}
+% User access to shortquiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+% Used for writing JavaScript Messages on screen. Use PDFDocEncoding
+\renewcommand\eq@bqlabelISO{Zacatek kvizu}
+\renewcommand\bqlabelISO{Zacatek kvizu}
+
+% Here is the default quiz label.
+% No formatting allowed
+\renewcommand\eq@eqlabel{Konec kvizu}
+% User access to shortquiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+%
+% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+%
+%\renewcommand\eq@Score{Hodnoceni:}
+\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?"}
+%
+% Default button labels for \eqButton
+\renewcommand\eq@local@CA{Opravit}
+\renewcommand\eq@local@RC{odpovedi!}
+\renewcommand\eq@local@AC{Prosim!}
+% Messages for math fill-in questions
+\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."
+}
+%</eqcz>
+% \end{macrocode}
+% \subsection{brazil}
+% \begin{macrocode}
+%<*eqbr>
+%%%%%%%%%%%%%%%%%%% eqbr.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Koichi Sameshima %%
+%% e-mail address: ksameshi@usp.br %%
+%% Language: (brazil) %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% The exercise label
+\renewcommand\exlabel{Exerc\texorpdfstring{\'{\i}}{\string\355}cio}
+% The value of this macro is written to \jobname.sol,
+\renewcommand\exlabelsol{Exerc\string\'{\string\i}cio}
+
+% Title of exercise solution section
+\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}
+
+% Solution label for solutionafter option for exercise
+\renewcommand{\eq@exsolafterDefault}{\textit{Solu\c{c}\~{a}o}:}
+
+% Title of short quiz solution section
+\renewcommand\eq@sqslsectitle{Solu\c{c}\~{o}es
+ dos Testes}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+% Running header/section title for solutions to short quizzes
+\renewcommand\eq@sqslsecrunhead{Solu\protect\c{c}\protect\~{o}es
+ dos Testes}
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+% Label for solutions to short quizzes, appears in solutions sections
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Solu\protect\c{c}\protect\~{a}o do Teste:}}
+% User access
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{Solu\protect\c{c}\protect\~{a}o}:}
+
+% Here is the default short quiz label.
+\renewcommand\eq@sqlabel{\textcolor{red}{Teste.}}
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+
+% Here is the default short quiz return label
+\renewcommand\eq@sqslrtnlabel{Finaliza Teste}
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+% Short quiz feedback messages
+\renewcommand\eqsqrtmsg{"Correto!"}
+\renewcommand\eqsqwgmsg{"Incorreto!"}
+
+% Here is the default quiz label.
+\renewcommand\eq@bqlabel{Inicia Teste}
+% User access to shortquiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+% Used for writing JavaScript Messages on screen. Use PDFDocEncoding
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+% Here is the default quiz label.
+% No formatting allowed
+\renewcommand\eq@eqlabel{Finaliza Teste}
+% User access to shortquiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+%
+% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+%
+\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?"}
+%
+% Default button labels for \eqButton
+\renewcommand\eq@local@CA{Corretas}
+\renewcommand\eq@local@RC{Minhas Respostas!}
+\renewcommand\eq@local@AC{Por Favor!}
+%</eqbr>
+% \end{macrocode}
+% \subsection{turkish}
+% \begin{macrocode}
+%<*eqtr>
+%%%%%%%%%%%%%%%%%%%% eqtr.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Mahmut Ko\c{c}ak %%
+%% e-mail address: mkocak@ogu.edu.tr %%
+%% Language: Turkish %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{Al\i \c st\i rma}
+\renewcommand\exlabelsol{\noexpand\c C\noexpand\"oz\noexpand\"um}
+\renewcommand\exsectitle{\exlabel lar{\i}n \c C\"oz\"umleri }
+\renewcommand\exsecrunhead{Al\noexpand\i \noexpand\c st\noexpand\i rma
+ \exlabelsol leri }
+\renewcommand\exsolafter{\textbf{\c C\"oz\"um}:}
+\renewcommand\eq@sqslsectitle{Kuizlerin \c C\"oz\"umleri }
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+\renewcommand\eq@sqslsecrunhead{Kuizlerin \c C\"oz\"umleri}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+\renewcommand\eq@sqsllabel{%
+ \protect\textbf{Kuiz \noexpand\c C\noexpand\"oz\noexpand\"um%
+ \noexpand\"u:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+\renewcommand\sqsolafter{\textit{\c C\"oz\"um}:}
+\renewcommand\eq@sqlabel{\textcolor{red}{Soru}}
+\renewcommand\sqlabel{\eq@sqlabel}
+\renewcommand\eq@sqslrtnlabel{Kuizi Bitir}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+% JavaScript alert box text
+\renewcommand\eqsqrtmsg{"Do\protect\u011Fru!"}
+\renewcommand\eqsqwgmsg{"Yanl\protect\u0131\protect\u015F!"}
+%
+\renewcommand\eq@bqlabel{Kuize Ba\c sla}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabelISO}
+\renewcommand\eq@eqlabel{Kuizi Bitir}
+\renewcommand\eqlabel{\eq@eqlabel}
+%
+% JavaScript messages
+%
+\renewcommand\eq@Score{Skor:}
+\renewcommand\eq@OutOf{\protect\374zerinden}
+\renewcommand\eqQuizTotalMsg{%
+ "\eqScore\space"+nQuestions+" \eqOutOf\space"+Score}
+ \renewcommand\eqQuizPointsMsg{%
+ "\eqptScore\space"+nPointTotal+" \eqOutOf\space"+ptScore}
+\renewcommand\eq@local@CorrAnsButton{Cevap}
+\renewcommand\eqInitQuizMsg{%
+ "Kuizi Bitirdiniz. Do\protect\u011Fru cevaplar\protect\u0131
+ g\protect\u00F6rmek i\protect\u00E7in 'cevap'
+ tu\protect\u015Flar\protect\u0131na
+ bas\protect\u0131n\protect\u0131z."}
+\renewcommand\eqMadeChoice{%
+ "Bir se\protect\u00E7im yapt\protect\u0131n\protect\u0131z.
+ Se\protect\u00E7iminiz ("+Responses[probno]+") idi."
+ +" Se\protect\u00E7iminizi de\protect\u011Fi\protect\u015Ftirmek
+ istermisiniz?"}
+\renewcommand\eqerrABS{"Mutlak de\protect\u011Fer do\protect\u011Fru
+ degil. L\protect\u00FCtfen d\protect\u00FCzeltiniz."}
+\renewcommand\eqerrBadMathFunc{" `"+aF[i]+"' ifadesi
+ tan\protect\u0131ml\protect\u0131 bir fonksiyon veya
+ ge\protect\u00E7erli bir matematiksel ifade de\protect\u011Fil."}
+\renewcommand\eqParens{"Parentezler"}
+\renewcommand\eqBrackets{"S\protect\u00FCsl\protect\u00FC Parentazle"}
+\renewcommand\eqBraces{"K\protect\u00F6\protect\u015Feli Parentezler"}
+\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " do\protect\u011Fru
+ de\protect\u011Fil. L\protect\u00FCtfen d\protect\u00FCzeltiniz."}
+\renewcommand\eqerrBadExp{"Ge\protect\u00E7ersiz matematiksel ifade.
+ \protect\u00FCstel ifadeli bir hata.
+ L\protect\u00FCtfen d\protect\u00FCzeltiniz."}
+\renewcommand\eqerrUnfinishQuiz{"Bitirilmemi\protect\u015F bir kuiz var,
+ di\protect\u011Fer kuize ge\protect\u00E7meden \protect\u00F6nce
+ bu kuizi tamamlay\protect\u0131n."}
+\renewcommand\noPeekMsg{"Kuizi bitirmeden yada kuizden
+ ba\protect\u015Far\protect\u0131l\protect\u0131 olana kadar
+ \protect\u00E7\protect\u00F6z\protect\u00FCmleri
+ g\protect\u00F6remezsiniz.!"}
+\renewcommand\highThresholdMsg{"Kuiz sonucu hesaplanmadan
+ \protect\u00F6nce b\protect\u00FCt\protect\u00FCn
+ sorular\protect\u0131 cevapland\protect\u0131rmal\protect
+ \u0131s\protect\u0131n\protect\u0131z."}
+\renewcommand\eqSyntaxErrorUndefVar{"Syntax Error: Tan\protect
+ \u0131mlanmam\protect\u0131\protect\u015F de\protect\u011Fi\protect
+ \u015Fken veya ifadeler istenilen formatta yaz\protect
+ \u0131lmam\protect\u0131\protect\u015Ft\protect\u0131r."}
+\renewcommand\eq@local@CA{Dogru}
+\renewcommand\eq@local@RC{Benim Cevaplar\protect\u0131m!}
+\renewcommand\eq@local@AC{L\protect\374tfen!}
+%</eqtr>
+% \end{macrocode}
+% \Finale
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/exerquiz.ins b/texmf-dist/source/latex/acrotex/exerquiz.ins
new file mode 100644
index 00000000..94d27db1
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/exerquiz.ins
@@ -0,0 +1,81 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1999-2014 D. P. Story
+%%
+%% This file is part of the `AcroTeX eDucation Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2014/08/19}
+\def\batchfile{exerquiz.ins}
+
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+
+\generate{%
+ \file{exerquiz.sty}{\from{exerquiz.dtx}{copyright,package}}
+ \file{aebjs.def}{\from{exerquiz.dtx}{copyright,aebjs}}
+ \file{eqexam.def}{\from{exerquiz.dtx}{eqexam}}
+ \file{aebrandom.def}{\from{exerquiz.dtx}{copyright,randomize}}
+ \file{aebsumrytbls.def}{\from{exerquiz.dtx}{copyright,sumrytbls}}
+ \file{usemcfi.def}{\from{exerquiz.dtx}{copyright,mcfi}}
+ \file{eqcolor.def}{\from{exerquiz.dtx}{copyright,eqcolor}}
+ \file{template.def}{\from{exerquiz.dtx}{copyright,template}}
+ \file{eqfr.def}{\from{exerquiz.dtx}{copyright,eqfr}}
+ \file{eqde.def}{\from{exerquiz.dtx}{copyright,eqde}}
+ \file{eqno.def}{\from{exerquiz.dtx}{copyright,eqno}}
+ \file{eqnl.def}{\from{exerquiz.dtx}{copyright,eqnl}}
+ \file{eqes.def}{\from{exerquiz.dtx}{copyright,eqes}}
+ \file{eqit.def}{\from{exerquiz.dtx}{copyright,eqit}}
+ \file{eqru.def}{\from{exerquiz.dtx}{copyright,eqru}}
+ \file{eqda.def}{\from{exerquiz.dtx}{copyright,eqda}}
+ \file{eqpo.def}{\from{exerquiz.dtx}{copyright,eqpo}}
+ \file{eqfin.def}{\from{exerquiz.dtx}{copyright,eqfin}}
+ \file{eqcat.def}{\from{exerquiz.dtx}{copyright,eqcat}}
+ \file{eqcz.def}{\from{exerquiz.dtx}{copyright,eqcz}}
+ \file{eqbr.def}{\from{exerquiz.dtx}{copyright,eqbr}}
+ \file{eqtr.def}{\from{exerquiz.dtx}{copyright,eqtr}}
+% \file{exerquiz.drv}{\from{exerquiz.dtx}{copyright,driver}}
+}
+
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/insdljs.dtx b/texmf-dist/source/latex/acrotex/insdljs.dtx
new file mode 100644
index 00000000..4194957b
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/insdljs.dtx
@@ -0,0 +1,2622 @@
+% \iffalse
+% makeindex -s gglo.ist -o insdljs.gls insdljs.glo
+% makeindex -s gind.ist -o insdljs.ind insdljs.idx
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% insdljs.sty package, %%
+%% Copyright (C) 2001-2017 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%</copyright>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{insdljs}
+%<package> [2017/03/02 v2.3f Insert Document Level JavaScripts (dps)]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[colorlinks,hyperindex=false]{hyperref}
+\usepackage{makeidx}
+\makeindex
+\def\EXPT{!}
+\pdfstringdefDisableCommands{\let\\\textbackslash}%
+% \OnlyDescription % comment out for implementation details
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\gdef\darg#1{\texttt{\char123\relax#1\char125\relax}}
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\let\pkg\textsf
+\def\visispace{\symbol{32}}
+\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
+\def\meta#1{\textsl{\texttt{#1}}}
+\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
+
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{insdljs}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{insdljs}{aebdocfmt.def cannot be found}}
+\begin{document}
+ \GetFileInfo{insdljs.sty}
+ \title{The \texttt{insDLJS} Package}
+ \author{D. P. Story\\
+ Email: \texttt{dpstory@uakron.edu}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \let\Email\texttt
+ \let\pkg\textsf
+ \DocInput{insdljs.dtx}
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\PrintIndex}{\paragraph*{Index} The index goes here.\\Execute
+ \texttt{makeindex -s gind.ist -o insdljs.ind insdljs.idx} on the command line and recompile
+ \texttt{insdljs.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.\\Execute
+ \texttt{makeindex -s gglo.ist -o insdljs.gls insdljs.glo} on the command line and recompile
+ \texttt{insdljs.dtx}.}
+\end{document}
+%</driver>
+% \fi
+%
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{insdljs}{Inputting aebdonotindex.def}}
+% {\PackageInfo{insdljs}{aebdonotindex.def cannot be found}}
+%
+% \section{Introduction}
+% This package defines a new environment, \texttt{insDLJS}, used
+% for inserting Acrobat JavaScript into a PDF file created from a
+% \LaTeX{} source. This package works correctly for users of
+% \textsf{pdftex} or \textsf{dvipdfm}. For those that use the
+% \textsf{Acrobat Distiller} (specifically, those that use either
+% \textsf{dvips} or \textsf{dvipsone} to produce a postscript file,
+% which is then distilled), you are required to have Acrobat~5.0 (or
+% later).
+%
+% \section{Features of the \textsf{insdljs} package}
+% We present a few of the several features of the package to get some feel for its
+% purpose.
+%
+% \subsection{The \texttt{insDLJS} Environment}
+%
+% The following is a quick illustration of the use of the new environment.
+% \begin{verbatim}
+% \documentclass{article}
+% \usepackage[pdftex]{hyperref}
+% \usepackage[pdftex]{insdljs}
+%
+% \newcommand\tugHello{Welcome to TUG 2001!}
+%
+% \begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
+% function HelloWorld()
+% {
+% app.alert("\tugHello", 3);
+% }
+% \end{insDLJS}
+% \begin{document}
+% \begin{Form} % needed for \PushButton
+%
+% \section{Test of the \texttt{insDLJS} Package}
+%
+% % use built in form button of hyperref
+% Push \PushButton[name=myButton,
+% onclick={HelloWorld();}]{Button}
+%
+% \end{Form}
+% \end{document}
+% \end{verbatim}
+% This environment takes three parameters, the first of which is required
+% for users of \texttt{dvips} and \texttt{dvipsone} and optional otherwise.
+% Within the environment, `|\|', is the escape character, and `|%|' is the comment
+% character, as they are in \TeX{} and \LaTeX.
+% See the documentation preceding the definition of the
+% \texttt{\hyperlink{insDLJS}{insDLJS}} environment.
+%
+% \subsection{Debugging}
+%
+% Another feature of this package is the ability to place debugging markers
+% within the JavaScript. When the \texttt{debug} option is used, the markers
+% show up in the document level JavaScript; otherwise, they are not written
+% to the PDF document. Here is a simple example,
+% \begin{verbatim}
+%\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
+%function HelloWorld()
+%{
+% app.alert("\tugHello", 3);
+% var x = "\\";
+%\db console.println("Entered HelloWorld function and x = " + x);\db%
+%}
+%\end{insDLJS}
+%\end{verbatim}
+% The last line of the function will appear in the DLJS if compiled under
+% the \texttt{debug} option; otherwise, it is removed. Additional discussion
+% of this debugging device is given below.
+%
+% \subsection{Open Action}
+%
+% This package also defines an \cs{OpenAction} command to introduce actions that are
+% executed when the PDF document is opened on page~1. The open action command only
+% applies to page~1.
+% \begin{flushleft}
+% \textbf{Usage}
+%\begin{verbatim}
+%\OpenAction{/S/JavaScript/JS(app.alert("Hello World!");)}
+%\end{verbatim}
+% \end{flushleft}
+% The package defines a |\JS| that takes one argument. The code |\JS{#1}| expands to
+% |/S/JavaScript/JS (#1)|, and so the above example may be written as
+% \begin{flushleft}
+%\begin{verbatim}
+%\OpenAction{\JS{app.alert("Hello World!");}}
+%\end{verbatim}%
+%\end{flushleft}
+% Multiple JavaScript commands can be entered. For nice formatting use \cs{r}
+% and \cs{t} for carriage return and tab, respectively.
+%\goodbreak
+%\begin{verbatim}
+%\OpenAction{\JS{%
+% app.alert("Hello World!");\r
+% app.alert("Good Day to You!");
+%}}
+%\end{verbatim}
+% The open actions are placed in a token list. Additional actions are added to the token list, so
+% you say
+%\begin{verbatim}
+%\OpenAction{\JS{app.alert("Hello World!");}}
+%\OpenAction{\JS{app.alert("Good Day to You!");}}
+%\end{verbatim}
+% the two messages will appear each time you open page~1 of the document.
+%
+% In the case of users of the distiller, \textsf{insdljs} uses this mechanism to
+% define an open action. To avoid overwriting this definition, the \cs{OpenAction}
+% command is necessary in insert additional actions.
+%
+% See \Nameref{openaction} for more details.
+%
+% \subsection{How \textsf{insdljs} Works}
+%
+% Let me describe in rough terms what goes on behind the scenes. In the discussion
+% below, the following example will be used:
+%\begin{verbatim}
+%\newcommand\tugHello{"Hello World!"}
+%\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
+%function HelloWorld()
+%{
+% app.alert("\tugHello", 3);
+%}
+%\end{insDLJS}
+%\end{verbatim}
+%
+% \subsubsection{For the \texttt{pdftex} and \texttt{dvipdfm} Options}
+%
+% Both \texttt{pdftex} and \texttt{dvipdfm} have primitives/macros for inserting
+% JavaScript at the document level into the PDF document. The work of the package,
+% in this case, is to take the JavaScript and place it into the correct form
+% for the application (\textsf{pdftex} or \textsf{dvipdfm}).
+%
+% Material within the \texttt{insDLJS} environment is written verbatim to a file.
+% The name of this file is \texttt{mydljs.djs}. The file base name comes from the
+% first required parameter of the \texttt{insDLJS} environment, see example above.
+% The file extension \texttt{.djs} stands for ``define javascript''.
+%
+% At begin document, the file \texttt{mydljs.djs} is input back into the document after
+% special definitions have already been read. These special definitions are the content
+% of the file \texttt{dljscc.def}. The script is placed in the appropriate construct
+% for insertion by the application at the document level.
+%
+% For more information about \texttt{dljscc.def}, see documentation given in the Section~\ref*{dljscc},
+% \Nameref{dljscc}.
+%
+% \subsubsection{For the \texttt{dvipsone} and \texttt{dvips} Options}
+%
+% When you use the \texttt{dvipsone} or \texttt{dvips}, this means you are going to convert
+% your document to postscript and distill it to create a PDF document. There is no \texttt{pdfmark}
+% construct for inserting document level JavaScripts; however, the recent release of Acrobat~5.0
+% gives postscript users an avenue for inserting DLJS.
+%
+% The material within the \texttt{insDLJS} environment is written verbatim to the file
+% \texttt{mydljs.djs}, as above. It is input back into the document where macros are allowed
+% to expand, then written back out to another file. The name of this new file is \texttt{mydljs.fdf}.
+% The file base name comes from the first required parameter of the \texttt{insDLJS} environment.
+% The file extension \texttt{.fdf} stands for ``forms data format''. This is an extension defined
+% and recognized by the Acrobat line of products.
+%
+% The file \texttt{mydljs.fdf} contains the document level JavaScript in a form that
+% the Acrobat application (version~5.0 or later) can import. Part of the work of the package
+% is to define an open page action. When the PDF document is opened for the first time in
+% Acrobat, the JavaScript is imported. Usually, you open the document following distillation.
+% After the \texttt{.fdf} file(s) have been imported, you need to save the document, usually using
+% the ``SaveAs'' file option, this saves the JavaScript code with the file. (There is no need for the
+% \texttt{.fdf} file(s) at this point.)
+%
+% \subsection{Comments on JavaScript}
+% A few words on JavaScript.
+%
+% \subsubsection{What is Document Level JavaScript?}
+% The document level is a location in the PDF document where script can be stored.
+% When the PDF document is opened, the document level functions are scanned, and any
+% ``exposed script'' is executed.
+%
+% Normally, the type of scripts you would place at the document level are
+% general purpose JavaScript functions, functions that are called repeatedly or large special
+% purpose functions. Functions at the document level
+% are known throughout the document, so they can be called by links, form buttons, page open
+% actions, etc.
+%
+% Variables declared within a JavaScript function have local scope, they are not known outside
+% that function. However, if you can declare variables and initialize them at the document level outside
+% of a function, these variables will have document wide scope. Throughout the document, the values of these
+% global variables are known. For example
+%\begin{verbatim}
+%\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
+%var myVar = 17; // defined outside a function, global scope
+%function HelloWorld()
+%{
+% var x = 3; // defined inside a function, local scope
+% app.alert("\tugHello", 3);
+%}
+% \end{insDLJS}
+%\end{verbatim}
+% Both the function \texttt{HelloWorld()} and the variable \texttt{myVar} are known throughout
+% the document. The function \texttt{HelloWorld()} can be called by a mouse up button action;
+% some form field, executing some JavaScript, may access the value of \texttt{myVar} and/or
+% change its value. The variable \texttt{x} is not known outside of the \texttt{HelloWorld()} function.
+%
+% \subsubsection{Access and Debugging}
+% For those who do not have \textsf{Acrobat}, the application,
+% unless you are writing very simple code, writing and debugging
+% JavaScript will be very difficult. From the Acrobat Reader,
+% there is not access to the document level JavaScript. You will be
+% pretty much writing blind. You can use the debug feature of
+% \textsf{insdljs} and insert some debugging code to try to give you
+% some insight into what is going wrong. Even so, debugging will be a problem.
+%
+% Normally, I develop the JavaScript from within Acrobat. The GUI editor does check for
+% syntax errors, giving you a chance to correct some simple errors as you go. After I am satisfied
+% with my code, I copy it from the editor and paste it into a \texttt{insDLJS} environemnt. This is
+% how the JavaScript code of \textsf{exerquiz} was developed.
+%
+% In my opinion, if you want to develop rather complicated code, having the full Acrobat product
+% is a must. (This implies that the Windows or Mac platform is needed!)
+%
+% \subsubsection{JavaScript References}
+% The JavaScript used by Acrobat consists of the core JavaScript plus Acrobat's JavaScript extensions.
+% Acrobat~5.0 uses core JavaScript~1.5, see
+%\begin{quote}
+% \footnotesize\url{https://developer.mozilla.org/en/JavaScript}
+%\end{quote}
+% and documentation of the Acrobat extensions can be found in the ``JavaScript for Acrobat API Reference,''
+% see
+%\begin{quote}
+%\href{http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat9_HTMLHelp&file=JS_API_AcroJSPreface.87.1.html}
+%{JavaScript for Acrobat API Reference}
+%\end{quote}
+%
+% \subsection{The \textsf{execJS} Environment}
+% This is an environment useful to PDF developers who want to tap into the power of JavaScript.
+% To use this environment, the developer needs Acrobat~5.0 or higher, or Acrobat Approval~5.0
+% or higher. \textsf{pdftex} or \textsf{dvipdfm} can be used to produce the PDF document, but one of the
+% applications (not the Reader) listed above is needed for this environment to do anything.
+%
+% The \texttt{execJS} is used primarily for post-distillation processing (post-creation processing, in the case of
+% \textsf{pdftex} and \textsf{dvipdfm}). The \texttt{execJS} environment can be used, for example, to automatically import
+% named icons into the document, which can, in turn, be used for an animation.
+%
+% The \textsf{execJS} is an environment in which you can write verbatim JavaScript code. This environment
+% is a variation on \textsf{insdljs}, it writes a couple of auxiliary files to disk; in particular, the
+% environment creates an \texttt{.fdf} file. When the newly produced PDF is loaded for the first time
+% into the viewer (Acrobat or Approval, not Reader), the \texttt{.fdf} file generated by the \textsf{execJS}
+% environment is imported, and the JavaScript executed. This JavaScript is \emph{not} saved with
+% the document.
+%
+% The environment takes one required argument, the base name of the auxiliary files to be generated.
+%
+%
+% For more details on this environment, see
+% \Nameref{execJS}. Also, see the demo file \texttt{execjstst.tex} and \texttt{execjstst.pdf} for
+% a short tutorial on the \texttt{execJS} environment, and an animation example, built entirely from
+% {\LaTeX} commands.
+%
+% \paragraph*{Security Note:} Executing arbitrary
+%JavaScript through a menu is potentially a security hole. If a
+%malicious hacker knows that you have a menu item with the name of
+%\texttt{MenuProc}, and that you use the variable
+%\texttt{\_MenuProc} in the way described above, the hacker could
+%distribute a PDF that executes (security restricted) JavaScript
+%through the menu in this way. Therefore, you should select
+%\texttt{private names} for \texttt{MenuProc} and \texttt{\_MenuProc}.
+%
+% \subsection{The \textsf{defineJS} Environment}
+%
+%When you create a form element (button, text field, etc.), you sometimes want to attach
+%JavaScript. The \textsf{defineJS} environment aids you in writing your Field level JavaScript.
+%It too is a verbatim environment, however, this environment does not write to this, but
+%saves the contents in a token register. The contents of the register are used in defining
+%a macro that expands to the verbatim listing.
+%
+% The \textsf{defineJS} environment takes two parameters, the first optional.
+% the required parameter is the cmd name of the command you want to define.
+% You can use the optional first parameter to modify the verbatim environment,
+% as illustrated. The \textsf{defineJS} is a complete verbatim environment: no escape,
+% and no comment characters are defined. You can use the optional parameter to create
+% an escape character. You can pretty much use any character you wish, \emph{except}
+% the usual one `\verb+\+', backslash.
+%
+% The following environment, defines a command \cs{myCmd} what expands to the verbatim
+% contents of the environment.
+%\begin{verbatim}
+%\begin{defineJS}{\myCmd}
+% ...
+% <JavaScript code>
+% ...
+%\end{defineJS}
+%\end{verbatim}
+%
+% There is also a \textsf{localJS} environment that makes any definitions within the
+% environment local.
+%
+%The following examples uses some macros from the \textsf{eforms} package:
+%\begin{verbatim}
+% % Define a text macro that will be expanded from within the
+% % defineJS environment
+%\def\HelloWorld{Hello World}
+% % Now define some JavaScript to execute with a button to be created.
+% % We enclose the defineJS and the \pushButton in the localJS environment
+% % That way, the macro definitions, \JSA, \JSAAE, \JSAAX will be local to
+% % this group
+%\begin{localJS}
+% % Make @ the escape so we can demonstrate the optional parameter.
+%\begin{defineJS}[\catcode`\@=0\relax]{\JSA}
+%var sum = 0;
+%for (var i = 0; i < 10; i++)
+%{
+% sum += i;
+% console.println("@HelloWorld i = " + i );
+%}
+%console.println("sum = "+sum);
+%\end{defineJS}
+%\begin{defineJS}{\JSAAE}
+%console.println("Enter the button area");
+%\end{defineJS}
+%\begin{defineJS}{\JSAAX}
+%console.println("Exiting the button area");
+%\end{defineJS}
+%\pushButton[%
+% \A{\JS{\JSA}}
+% \AA{\AAMouseEnter{\JS{\JSAAE}}
+% \AAMouseExit{\JS{\JSAAX}}}
+%]{myButton}{30bp}{15bp}
+%\end{localJS}
+%\end{verbatim}
+%
+% See the section \Nameref{defineJS} for details of these two environments.
+% \section{Package Options and Requirements}
+%
+% \subsection{Package Options}
+%
+% The options are \texttt{dvipsone}, \texttt{dvips}, \texttt{pdftex} and
+% \texttt{dvipdfm}. The default is \texttt{dvipsone}/\texttt{dvips}.
+% \begin{macrocode}
+%<*package>
+\usepackage{xkeyval}
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+% \end{macrocode}
+%
+% Standard driver options.\par\medskip\noindent
+% \textbf{Those using Distiller}
+% \IndexOpt{dvips}
+% \IndexOpt{dvipsone}
+% \IndexOpt{textures}
+% \begin{macrocode}
+\DeclareOptionX{dvipsone}{\def\dljs@drivernum{0}%
+ \AtBeginDocument{\dvips@marker}}
+\DeclareOptionX{dvips}{\def\dljs@drivernum{0}%
+ \AtBeginDocument{\dvips@marker}}
+\DeclareOptionX{textures}{\def\dljs@drivernum{0}%
+ \AtBeginDocument{\dvips@marker}}
+% \end{macrocode}
+%\textbf{Those not using Distiller}
+% \IndexOpt{pdftex}
+% \IndexOpt{dvipdfm}
+% \IndexOpt{dvipdfmx}
+% \IndexOpt{xetex}
+% \begin{macrocode}
+\DeclareOptionX{pdftex}{\def\dljs@drivernum{1}}
+\DeclareOptionX{dvipdfm}{\def\dljs@drivernum{2}}
+\DeclareOptionX{dvipdfmx}{\def\dljs@drivernum{2}}
+\DeclareOptionX{xetex}{\def\dljs@drivernum{2}}
+% \end{macrocode}
+% Set the default value of the driver: assume the distiller is used.
+% \begin{macrocode}
+%\def\dljs@drivernum{0}
+% \end{macrocode}
+% Some switch definitions
+% \begin{macrocode}
+\let\dl@YES=y \let\dl@NO=n
+\let\dl@One=1 \let\dl@Zero=0
+\let\dljs@YES=y \let\dljs@NO=n
+% \end{macrocode}
+% When using pdfmarks, the open action is initiated by the document JavaScript code,
+% when there was not document JavaScript, the open action did not get executed.
+% This was a bad idea, here is a work around. When the \texttt{insDLJS} environment is used,
+% we |\let\dljspresent=y|, and if at the beginning of the document, \cs{dljspresent} is still
+% \texttt{n}, we'll issue a special execution of \cs{@OAction}.
+% \begin{macrocode}
+\def\dvips@marker{\ifx\dljspresent\dl@NO\@OAction\fi}
+% \end{macrocode}
+% This command sequence will mark the passing of the first open event that is defined. The rest of the open events,
+% if any, will be in a \texttt{Next} dictionary.
+% \begin{macrocode}
+\let\isOpenAction\dl@NO
+% \end{macrocode}
+% \IndexOpt{nodljs}
+% Option to cancel the insertion of DLJS, useful for a document meant to be
+% printed only, or one that does not use the \texttt{shortquiz} or
+% \texttt{quiz} environments, for example.
+% \begin{macrocode}
+\DeclareOptionX{nodljs}{\let\importdljs\dl@NO}
+\let\importdljs\dl@YES
+% \end{macrocode}
+% Need to place certain code only once. This switch will make sure of that.
+% \begin{macrocode}
+\let\firstdljs\dl@YES
+\let\dljspresent\dl@NO
+% \end{macrocode}
+% \IndexOpt{debug}
+% Use this option to help debug DLJS.
+% \begin{macrocode}
+\DeclareOptionX{debug}{\let\dljs@debug\dl@YES}
+\let\dljs@debug\dl@NO
+% \end{macrocode}
+% \IndexOpt{execJS}
+% If the execution of JavaScript code is permitted following distillation. The default is no.
+% \begin{macrocode}
+\DeclareOptionX{execJS}{\let\execjs\dl@YES}
+\let\execjs\dl@NO
+\DeclareOptionX{nopro}{\let\dl@gopro\dl@NO}
+\let\dl@gopro\dl@YES
+% \end{macrocode}
+% \begin{macrocode}
+\@ifpackageloaded{web}{%
+ \ExecuteOptionsX{\eq@driver@name}%
+}{%
+ \@ifpackageloaded{eforms}{%
+ \ExecuteOptionsX{\ef@driver}%
+ }{%
+ \ifpdf\ExecuteOptionsX{pdftex}\else
+ \ifxetex\ExecuteOptionsX{xetex}\else
+ \@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
+ {\ExecuteOptionsX{dvipsone}}\fi\fi
+ }%
+}
+% \end{macrocode}
+% \IndexOpt{reqjs}
+% Beginning with PDF 1.7, a document can specify requirements, here we declare
+% the document uses JavaScripts. The option \texttt{reqjs} is taken by default,
+% that is, JavaScripts are required for this document
+%
+% \DescribeMacro{!reqjs}
+% The option \texttt{!reqis} turns off this feature; that is, there is no notification
+% via the \textsf{YMB} (\textsf{Yellow Message Bar}) that Javascripts are used in the document, and the
+% document may not function as designed.
+% \changes{v2.2d}{2016/04/06}{Added \texttt{reqjs} and \texttt{{\string\quotechar}reqjs}.}
+% \begin{macrocode}
+\DeclareOptionX{reqjs}{\let\dl@reqJS\dl@YES}
+\let\dljs@reqJS\dl@YES
+\DeclareOptionX{!reqjs}{\let\dl@reqJS\dl@NO}
+% \end{macrocode}
+% The \texttt{usealtadobe} option\IndexOpt{usealtadobe} defined alternate names
+% for some of Adobe's formatting functions. This is useful only if the document
+% author has the Adobe application and know how to use its form edit capabilities.
+% The name of each of the selected function begins with `\texttt{AF}', the name of the new
+% function is the same, but begins with `\texttt{EF}'. For example, the keystroke function
+% \texttt{AFNumber\_Keystroke} is also known under the name of \texttt{EFNumber\_Keystroke}.
+% See \hyperref[s:AltAdbFncs]{Section~\ref*{s:AltAdbFncs}} for the list of functions.
+% \begin{macrocode}
+\DeclareOptionX{usealtadobe}{\def\inputAltAdbFncs{%
+ \InputIfFileExists{altadbfncs.def}%
+ {\PackageInfo{insdljs}{Inputting code for usealtadobe option}}%
+ {\PackageWarning{insdljs}{Cannot find altadbfncs.def.\MessageBreak
+ Reinstall or refresh your file name database.}}}}
+\let\inputAltAdbFncs\relax
+% \paragraph*{Process the package options}
+% \begin{macrocode}
+\ProcessOptionsX
+% \end{macrocode}
+% This package uses the double quote as a double quote, other packages the make double quote
+% an active character.
+% \begin{macrocode}
+\edef\dl@dquoteCat{\the\catcode`\"}
+\catcode`\"=12\relax
+% \end{macrocode}
+% Issue a package error if there is no driver specified or implied.
+% \begin{macrocode}
+\@ifundefined{dljs@drivernum}{%
+ \PackageError{insdljs}%
+ {You have not specified dvips, dvipsone, pdftex,\MessageBreak
+ dvipdfm, dvipdfmx, or xetex in the option list
+ \MessageBreak of the insdljs package}
+ {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm,
+ dvipdfmx, or xetex
+ \MessageBreak in the option list of the insdljs package.}
+}{}
+% \end{macrocode}
+% \subsection{Required Packages}
+% We need \texttt{hyperref} to provide some fundamental code for the
+% various drivers and \texttt{verbatim} to help write verbatim code
+% to a file.
+% \changes{v2.2h}{2016/06/09}{Added \string\cs{ifpdfmarkup} to easily detect
+% use of pdfmarks}
+% \begin{macrocode}
+\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
+\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
+% \begin{macrocode}
+\RequirePackage{hyperref}
+% \end{macrocode}
+% LuaTeX v0.85 has made some changes to primitives, the definition below follows
+% the pattern of \texttt{hluatex.def} of \textsf{hyperref}.
+% \changes{v2.3}{2016/06/09}{Fixed \string\cs{pdfnames} corresponding to
+% changes in primitives of LuaTeX v0.85}
+% \changes{v2.3a}{2016/07/31}{Added luatex85 definition of \string\cs{pdfpageref}}
+% \begin{macrocode}
+\ifpdf\ifx\pdfextension\@undefined\else
+ \protected\def\pdfnames{\pdfextension names }
+ \def\pdfpageref{\pdffeedback pageref}\fi\fi
+\RequirePackage{verbatim}
+% \end{macrocode}
+% (2017/01/03) The \pkg{insdljs} package does not use \pkg{conv-xkv} but
+% is fundamental to other packages (\pkg{eforms}, \pkg{aeb\_pro}) that require
+% \pkg{insdljs} and \pkg{conv-xkv}.
+% \changes{v2.3c}{2017/01/03}{Require \string\pkg{conv-xkv}}
+% \begin{macrocode}
+\usepackage{conv-xkv}[2017/01/03]
+% \end{macrocode}
+% Last minute adjustments in the driver.
+% \begin{macrocode}
+\@ifundefined{dljs@drivernum}{%
+ \@ifundefined{eq@drivernum}{%
+ \PackageWarning{insdljs}
+ {No driver specified, will check for pdftex.}
+ \@ifundefined{pdfoutput}{%
+ \@ifundefined{@pdfm@mark}{\def\eq@drivernum{2}%
+ \def\dljs@drivernum{1}\let\isOpenAction\dl@NO
+ \PackageWarning{insdljs}{No pdftex, but detected dvipdfm}}%
+ {\PackageWarning{insdljs}{Neither pdftex nor dvipdfm,
+ assuming dvips/dvipsone.}%
+ \def\eq@drivernum{0}\def\dljs@drivernum{0}%
+ \let\isOpenAction\dl@YES}
+ }{%
+ \ifcase\pdfoutput
+ \def\eq@drivernum{1}\def\dljs@drivernum{1}%
+ \let\isOpenAction\dl@NO
+ \PackageInfo{insdljs}{Pdftex detected.}%
+ \else
+ \def\eq@drivernum{0}\def\dljs@drivernum{0}%
+ \let\isOpenAction\dl@YES
+ \PackageWarning{insdljs}{Pdftex engine detected,
+ but is outputting dvi. Assuming dvips as the driver.}%
+ \fi
+ }%
+ }{%
+ \begingroup
+ \count0=\eq@drivernum
+ \xdef\dljs@drivernum{\ifcase\count0 0\or1\or2\or0\else0\fi}
+ \ifnum\dljs@drivernum=0\global\let\isOpenAction\dl@YES
+ \else\global\let\isOpenAction\dl@NO\fi
+ \endgroup
+ }%
+}{}
+% \end{macrocode}
+% I've always had problems with the pdftex option and inserting open page actions.
+% The problem is that the open page action, which is defined using the token list
+% \cs{pdfpageattr} appears not only on the first page, but every page thereafter.
+% To solve this problem, I've used \textsf{everyshi}, a nice and useful package by
+% Martin Schr\"oder, to set the open page action with \cs{AtNextShipout}.
+% This approach seems to work.
+% \begin{macrocode}
+\ifnum\dljs@drivernum=1\relax
+ \RequirePackage{everyshi}
+\fi
+% \end{macrocode}
+% If \texttt{reqjs} is in effect, we execute the following code, otherwise, we
+% do not. The \textbf{\textsf{Requirements}} dictionary goes in the document \textbf{\textsf{Catalog}}.
+% \changes{v2.2d}{2016/04/06}{Code to support \texttt{reqjs} and \texttt{{\string\EXPT}reqjs} options.}
+% \begin{macrocode}
+\def\AEB@psMrk{[\space}
+\ifx\dl@reqJS\dl@YES
+ \def\dl@@reqJS{/Type/Requirement/S/EnableJavaScripts}
+ \ifpdf\pdfcatalog{\dl@@reqJS}\else
+ \ifxetex\immediate\@pdfm@mark{put @catalog <<\dl@@reqJS>>}\else
+ \literalps@out{\AEB@psMrk{Catalog} <<\dl@@reqJS>> /PUT pdfmark}\fi\fi
+\fi
+% \end{macrocode}
+% \section{Main Code}
+%
+% Before we begin, we need to document the problems that need to be addressed by this package.
+%
+% \subsection{Complications}
+%
+% There is a complication with writing JavaScript and \TeX{} together; they both use
+% the backslash character, `|\|', as the escape character. The following two tables
+% list escaped characters that have special meanings in different situations. These two tables
+% were taken from the book \textsl{JavaScript, The Definitive Guide}, by David Flanagan, 4th Edition,
+% O'Reilly publishers.
+%
+%\begin{flushleft}
+%\begin{minipage}{\linewidth}
+% \textbf{Escape Sequences in String Literals}
+%
+% \begin{tabular}{@{}ll@{}}
+% Sequence & Character represented \\
+% \cs{0} & the NULL character (\cs{u0000}) \\
+% \cs{b} & backspace (\cs{u0008}) \\
+% \cs{t} & horizontal tab (\cs{u0009}) \\
+% \cs{n} & newline (\cs{u000A}) \\
+% \cs{v} & vertical tab (\cs{u000B}) \\
+% \cs{f} & form feed (\cs{u000C}) \\
+% \cs{r} & carriage return (\cs{u000D}) \\
+% \cs{"} & double quote (\cs{u0022}) \\
+% \cs{'} & apostrophe or single quote (\cs{u0027}) \\
+% |\\| & backslash (\cs{u005C})\\
+% \cs{xXX} & the Latin-1 character specified by the two hexadecimal digits \texttt{XX} \\
+% \cs{uXXXX}& the unicode character specified by the four hexadecimal digits \texttt{XXXX} \\
+% \cs{XXX} & the Latin-1 character specified by the octal digits \texttt{XXX}, between \\
+% & $1$ and $377$. \\
+% \end{tabular}
+%\end{minipage}
+%\end{flushleft}
+%
+%\begin{flushleft}
+%\begin{minipage}{\linewidth}
+% \textbf{Regular Expression Literal characters}
+%
+% \begin{tabular}{ll}
+% Character & Matches \\
+% Alphanumeric & Itself \\
+% \cs{0} & the NULL character (\cs{u0000}) \\
+% \cs{t} & horizontal tab (\cs{u0009}) \\
+% \cs{n} & newline (\cs{u000A}) \\
+% \cs{v} & vertical tab (\cs{u000B}) \\
+% \cs{f} & form feed (\cs{u000C}) \\
+% \cs{r} & carriage return (\cs{u000D}) \\
+% \cs{xXX} & the Latin-1 character specified by the two hexadecimal\\
+% & digits \texttt{XX} \\
+% \cs{uXXXX}& the unicode character specified by the four hexadecimal\\
+% & digits \texttt{XXXX} \\
+% \cs{cXX} & the control character |^X|
+% \end{tabular}
+%\end{minipage}
+%\end{flushleft}
+%
+% Again, both JavaScript and \TeX, certain punctuation marks have special meaning; in the case of
+% JavaScript, punctuation has a special meaning within regular expressions:
+%\begin{flushleft}
+%\textbf{Special Punctuation in Regular Expressions}
+%\begin{verbatim}
+% ^ $ . * + ? = ! : | \ / ( ) [ ] { }
+%\end{verbatim}
+%\end{flushleft}
+%
+% Complications continued. The distiller method (the \texttt{dvipsone} or the
+% \texttt{dvips} option), and the \textsf{pdftex}/\textsf{dvipdfm} applications
+% handle the backslash differently. The following example illustrates the problem.
+% {\small
+%\begin{verbatim}
+%dvipsone/dvips
+%LaTeX Source As appears in PDF
+%var x = "\"; --> var x = "\"; (SyntaxError: Unterminated string literal)
+%var x = "\\"; --> var x = "\\"; (Correct)
+%\end{verbatim}}
+% When we type \texttt{"\string\"}, we are beginning a string (with the first
+% double quotes, but then we have a literal \texttt{\string\"}, so we have not
+% closed the opening string, hence the error message. We have to type
+% `\verb+\\+' to get the single backslash.
+% {\small
+%\begin{verbatim}
+%pdftex/dvipdfm
+%LaTeX Source As appears in PDF
+%var x = "\"; --> var x = ""; (\" is the literal ")
+%var x = "\\"; --> var x = "\"; (SyntaxError: Unterminated string literal)
+%var x = "\\\\"; --> var x = "\\"; (Correct)
+%\end{verbatim}}
+% These applications write raw PDF code to the \texttt{.pdf} file.
+% All special characters need to be escaped. You can see, that \textsf{pdftex}
+% and \textsf{dvipdfm} require extra backslashs.
+%
+% The solution to this problem---the problem of how distiller and the two applications
+% handle backslashes---is to define control sequences for all the sequences JavaScript uses
+% and to adjust their definitions depending on the driver option. As a result, of these
+% background definitions, the JavaScript writer does not worry too much about these details,
+% for example
+%\begin{verbatim}
+%\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
+%function HelloWorld()
+%{
+% app.alert("\tugHello", 3);
+% var x = "\\";
+% app.alert("x = " + x);
+%}
+%\end{insDLJS}
+%\end{verbatim}
+% So much for the complication.
+%
+%\subsection{Begin Code}
+%
+% Some control sequences that are useful for formatting JavaScript.
+% \begin{macro}{\JS}
+% \begin{macro}{\Named}
+% A convenience command for writing JavaScript.
+% \begin{macrocode}
+\providecommand\JS[1]{/S/JavaScript/JS(#1)}
+\providecommand\Named[1]{/S/Named/N/#1}
+\providecommand{\GoTo}{/S/GoTo/D}
+\providecommand{\GoToD}{/S/GoTo/D}
+\providecommand{\GoToR}{/S/GoToR}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+\def\previewMiKTeX{\def\jsR{\string\r}\def\jsT{\string\t}}
+{\obeylines %
+\gdef\js@@R{\noexpand
+}}
+% \end{macrocode}
+% \begin{macrocode}
+\let\dljstfor\@tfor
+% \end{macrocode}
+% 2012/06/20 Change the following code so there are no special cases.
+% \begin{macrocode}
+\def\jsR{\string\r\string\n}
+%\def\jsR{\string\r\eqbs\js@@R}
+\def\defineJSjsR{\string\r\eqbs^^J}
+% \end{macrocode}
+% \changes{v2.0l}{2012/11/10}{Added \cs{jsN}}
+% \cs{r} is recognized by hyperref when \cs{pdfstringdef} is used. Hyperref
+% then modifies the expansion of \cs{r}. So, we'll use \cs{n} is those situations.
+% \begin{macrocode}
+\def\jsN{\string\n}
+{\catcode`\^^I\active %
+\gdef^^I{\noexpand^^I}%
+\gdef\js@@T{\noexpand^^I}%
+}% end of \catcode`\^^I
+\let\jsT=\js@@T
+% \end{macrocode}
+% Need to write to files. This stream will be used for that purpose.
+% \begin{macrocode}
+\newwrite\js@verbatim@out
+\def\iwvo#1{\immediate\write\js@verbatim@out{#1}}
+% \end{macrocode}
+% \subsection{Some JavaScript Support}
+%
+% \begin{macro}{\flJSStr}
+% \begin{macro}{\dlJSStr}
+%
+% A simple command for creating JavaScript strings that recognize unicode escape
+% sequences \cs{uXXXX}. This command defines a macro with name contained in \texttt{\#1},
+% the first argument, the second argument \texttt{\#2} is the JavaScript string. Enclosing
+% the string with double quotes is not necessary, this is done automatically. Any expandable
+% commands within string are expanded at define time, unless they are protected with \cs{protect}.
+% The string can be formatted using \cs{r} and \cs{t}. Also, \verb!\\! expands to a backslash
+% should the need arise.
+%\changes{v2.0b}{2008/06/19}
+%{
+% A simple command for creating JS strings with unicode \cs{uXXXX}.
+%}
+% The following is the old definition, it is superseded by the ones below.
+%\begin{verbatim}
+%\newcommand{\defineJSStr}[2]{{%
+% \let\protect\noexpand
+% \let\jslit\string
+% \def\\{\eqbs\eqbs}\def\cs##1{\\\\##1}%
+% \def\r{\\r}\def\t{\\t}%
+% \def\n{\\n}\def\u{\\u}%
+% \xdef#1{"#2"}%
+%}}
+%\end{verbatim}
+% \changes{v2.0m}{2013/12/23}{Added \cs{jscsDflt} and \cs{jscsDLJS}, incorporated into \cs{dl@defJSStr}.}
+% Added \cs{jscsDflt} and \cs{jscsDLJS}, incorporated them into \cs{dl@defJSStr}.
+% \begin{macrocode}
+\def\dl@lparen{(}\def\dl@rparen{)}
+\def\jscsDflt{\let\protect\noexpand\let\jslit\string
+ \let\~\dl@tilda\let\^\dl@sup
+ \def\\{\eqbs\eqbs}\def\cs##1{\\\\##1}%
+ \def\r{\\r}\def\t{\\t}\def\n{\\n}%
+ \let\{\dl@lBrace\let\}\dl@rBrace
+ \ifx\jsstr@useUni\dl@One\def\Uni{\\u}\else\def\u{\\u}\fi
+ \ifx\jsstr@parens\dl@One\let\l@paren\dl@lparen
+ \let\r@paren\dl@rparen\else
+ \let\l@paren\@empty\let\r@paren\@empty\fi
+}
+\def\jscsDLJS{\let\protect\noexpand\let\jslit\string
+ \let\~\dl@tilda\let\^\dl@sup
+ \ifxetex\def\\{\eqbs\eqbs}\else\def\\{\eqbs}\fi\def\cs##1{\\\\##1}%
+ \def\r{\\r}\def\t{\\t}\def\n{\\n}%
+ \let\{\dl@lBrace\let\}\dl@rBrace
+ \ifx\jsstr@useUni\dl@One\def\Uni{\\u}\else\def\u{\\u}\fi
+ \ifx\jsstr@parens\dl@One\let\l@paren\dl@lparen
+ \let\r@paren\dl@rparen\else
+ \let\l@paren\@empty\let\r@paren\@empty\fi
+}
+\ifpdf\let\jscsDLJS\jscsDflt\fi
+\let\dl@JSCS\jscsDflt
+% \end{macrocode}
+% \DescribeMacro{\flJSStr} This form is designed for writing literal strings
+% at the field level.
+% When the \texttt{*}-form is used, \texttt{\#2} is passed through \cs{pdfstringdef},
+% needed if there are some latex to pdf strings to be converted.
+% \begin{macrocode}
+\newcommand{\flJSStr}{\bgroup
+ \let\dl@JSCS\jscsDflt
+ \@ifstar{\def\isStar{*}\dl@defJSStr}
+ {\let\isStar\relax\dl@defJSStr}}
+\let\fieldJSStr\flJSStr
+% \end{macrocode}
+% For backward compatibility, we \cs{let} \cs{defineJSStr} to \cs{flJSStr}.
+% \begin{macrocode}
+\let\defineJSStr\flJSStr
+% \end{macrocode}
+% \DescribeMacro{\dlJSStr} This form is designed for writing strings to the document
+% level JavaScript, as embedded using the \texttt{insDLJS} environment.
+% When the \texttt{*}-form is used, \texttt{\#2} is passed through \cs{pdfstringdef},
+% needed if there are some latex to pdf strings to be converted.
+% \begin{macrocode}
+\newcommand{\dlJSStr}{\bgroup
+ \@ifstar{\def\isStar{*}\let\dl@JSCS\jscsDLJS\dl@defJSStr}
+ {\let\isStar\relax\let\dl@JSCS\jscsDLJS\dl@defJSStr}}
+% \end{macrocode}
+% Some simple key-values for both commands above. Both commands, by default,
+% insert double quotations marks at the beginning and end of the string as a convenience.
+% \IndexKey{quotes}\texttt{quotes} option just affirms that default; it need not be specified.
+% The \IndexKey{noquotes}\texttt{noquotes} option signals \textsf{eforms} not to
+% insert said double quotation marks. The other option, \texttt{useUni} is implemented, but not
+% documented publicly, to change the command for unicode from \cs{u} to \cs{Uni} in case there
+% is a clash of definitions with some accents, \u{a} (\verb!\u{a}!), for example. Hyperref has a
+% \cs{u} command defined in the PU encoding, but \cmd{\flJSStr} and \cmd{\dlJSStr} through
+% \cmd{\dl@defJSStr} sets \cmd{\Hy@unicodefalse} to support PD1 encoding only. The user can
+% access the full range of unicode glyphs through \cs{u}.
+% \begin{macrocode}
+\define@key{jsstr}{quotes}[]{\let\jsstr@quotes\dl@One}
+\define@key{jsstr}{noquotes}[]{\let\jsstr@quotes\dl@Zero}
+\define@key{jsstr}{parens}[]{\let\jsstr@parens\dl@One}
+\define@key{jsstr}{noparens}[]{\let\jsstr@parens\dl@Zero}
+\let\jsstr@quotes\dl@One\let\jsstr@parens\dl@One
+\define@key{jsstr}{useUni}[]{\let\jsstr@useUni\dl@One}
+\let\jsstr@useUni\dl@Zero
+% \end{macrocode}
+% The common part to both \cs{flJSStr} and \cs{dlJSStr}.
+% \begin{macrocode}
+\newcommand{\dl@defJSStr}[3][quotes]{\def\dl@argi{#1}\ifx\dl@argi\@empty
+ \else\ifx\dl@JSCS\jscsDLJS\let\jsstr@parens\dl@Zero\fi
+ \setkeys{jsstr}{#1}\fi\dl@JSCS
+ \ifx\jsstr@quotes\dl@One
+ \xdef#2{\l@paren"#3"\r@paren}\else
+ \xdef#2{\l@paren#3\r@paren}\fi
+ \if\isStar*\gdef\dl@afterAction{{\Hy@unicodefalse\expandafter
+ \pdfstringdef\expandafter#2\expandafter{#2}}}\else
+ \global\let\dl@afterAction\relax\fi
+ \aftergroup\dl@afterAction\egroup}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\dlTC}\hspace{-\marginparsep}\thinspace
+% \darg{\ameta{code}} A convenience command to insert a \texttt{try/catch} pair around
+% \ameta{code} with no error report.
+% \changes{v2.3e}{2017/02/27}{Added convenience command \string\cs{dlTC}}
+% \begin{macrocode}
+\def\dlTC#1{try{#1}catch(e){}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{A Macro for Debugging JS}
+% \begin{macro}{\db...\db}
+% The \cs{db} macro can be used within the \texttt{insDLJS} to insert
+% addition JS commands to help debug the code. Usage:
+%\begin{verbatim}
+% \db console.println("myVal = " + myVal);\db%
+%\end{verbatim}
+% Any material (on one line) that is between the two \verb+\db+ will either be
+% written to the DLJS (if \cmd{\dljs@debug} expands to \texttt y), or be removed from
+% the final output (if \cmd{\dljs@debug} does not expand to \texttt y).
+%
+% Note that the comment character (|%|) following the terminating \verb+\db+.
+% This comment keeps a carriage return from being invoked; if \cmd{dljs@debug} is false
+% then this will not create an empty line in your JavaScript.
+% \begin{macrocode}
+\def\js@R{\ifcase\dljs@drivernum^^J\else\jsR\fi}
+% \end{macrocode}
+% The three spaces (\cs{space}) is meant to align the debug statement, since |\db| takes
+% up three spaces.
+% \begin{macrocode}
+\def\db#1\db{\ifx\dljs@debug\dl@YES\space\space\space#1\js@R\fi}
+% \end{macrocode}
+% \end{macro}
+% Acrobat (and Reader) expect the JavaScript code will be listed in the JavaScript
+% array in sorted form. \texttt{pdftex} and \texttt{dvipdfm} do not sort this array
+% and it would be difficult for \TeX{} to do the sorting; therefore a workaround.
+% Each set of DLJS will be numbered in the order in which they are defined. This puts
+% them naturally in proper sorted order. The following counter, numbers the JS.
+% \begin{macrocode}
+\newcounter{dljs@cnt}
+\newcounter{dljssegs}\setcounter{dljssegs}{2}
+% \end{macrocode}
+% \subsection{Some Verbatim Write Environments}
+% Here is a verbatim write environment, based on an example in the
+% \texttt{verbatim} package. One modification: The output stream is
+% not opened by this environment, this must be done prior. This is necessary
+% to write some other stuff prior to the verbatim write.
+%
+% This verbatim is used internally to write the \texttt{.djs} files, containing
+% the JavaScript.
+% \begin{macrocode}
+\newenvironment{js@verbatimwrite}% writes to current \js@verbatim@out
+ {%
+ \@bsphack
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ \def\verbatim@processline{%
+ \immediate\write\js@verbatim@out{\the\verbatim@line}}%
+ \verbatim@start}{\@esphack}
+% \end{macrocode}
+% Unlike the example of verbatimwrite in the \texttt{verbatim} package, we do not
+% automatically close the stream when we finish out \texttt{js@verbatimwrite} environment.
+% We need to write more to this file, so we have an explicit close.
+% \begin{macrocode}
+\def\closejs@verbatim@out{\immediate\closeout\js@verbatim@out}
+% \end{macrocode}
+% Same as above, except we expand the line with an \cmd{\edef}.
+%
+% For the case of \texttt{dvipsone/dvips}, which use the pdfmark operator, we have
+% a couple of definitions for escape (esc). It turns out, I find it convenient to have
+% two versions, a \cs{eqesc}, and a \cs{eqesci}, the latter one is only used once, the former
+% one is used numerous times, see the \texttt{\hyperref[dljscc]{dljscc.def}} file.
+% \begin{macrocode}
+\begingroup
+\catcode`\@=0 @catcode`@\=12
+@gdef@eqbs{\}
+@gdef@ccpdfmark{@gdef@eqesc{\}@gdef@eqesci{}}
+@endgroup
+% \end{macrocode}
+% Here's a definition of left and right braces that will be used in writing JavaScript code.
+% \begin{macrocode}
+\begingroup
+ \catcode`<=1 \catcode`\>=2 \@makeother\{ \@makeother\}
+\gdef\definebraces<\def\{<\eqesc{>\def\}<\eqesc}>>
+\endgroup
+% \end{macrocode}
+% My own special dos and don'ts. Preserve |\| and \texttt{\%}
+% \begin{macrocode}
+\def\eqdospecials{\do\ \do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\_\do\~}
+% \end{macrocode}
+% The \texttt{jsexpverbatimwrite} environment is used to write a quasi-verbatim
+% file. We keep original default definitions of |\| and |%| (they are not included in the
+% \cs{eqdospecials} above). The code for \texttt{jsexpverbatimwrite} is based on that found
+% in the \texttt{verbatim} package. The trouble is, this package assumes that |\| has been changed
+% to catcode 12, other. Consequently, I had a devil of a time trying to stop the verbatim write
+% with |\| as an escape rather than other. I finally decided it was necessary to rewrite some of
+% the main macros in \texttt{verbatim} so they would properly stop. Below are the modifications
+% designed to stop when \texttt{*end} encountered rather than \cs{end}. These changes seem to
+% work o.k.
+% \begin{macrocode}
+\begingroup
+\catcode`\~=\active \lccode`\~=`\^^M
+\lowercase{\endgroup
+ \def\eqverbatim@#1~{\verbatim@@#1*end\@nil}%
+ \def\eqverbatim@@#1*end{%
+ \verbatim@addtoline{#1}%
+ \futurelet\dl@next\eqverbatim@@@}%
+ \def\eqverbatim@@@#1\@nil{%
+ \ifx\dl@next\@nil
+ \verbatim@processline
+ \verbatim@startline
+ \let\dl@next\eqverbatim@
+ \else
+ \def\@tempa##1*end\@nil{##1}%
+ \@temptokena{*end}%
+ \def\dl@next{\expandafter\verbatim@test\@tempa#1\@nil~}%
+ \fi\dl@next}%
+}%
+\def\jsexpverbatimwrite
+{% writes to current \js@verbatim@out
+ \@bsphack
+% \escapechar=-1%
+ \ccpdfmark
+ \catcode`\<=12 \catcode`\>=12
+ \input{dljscc.def}%
+% Attempt to redefine some macros from the the verbatim package
+ \let\verbatim@=\eqverbatim@
+ \let\verbatim@@=\eqverbatim@@
+ \let\verbatim@@@=\eqverbatim@@@
+% end redefine of verbatim package
+ \let\do\@makeother\eqdospecials%
+ \catcode`\^^M=\active\catcode`\^^I=12%
+ \def\verbatim@processline{%
+ \edef\expVerb{\the\verbatim@line}%
+ \immediate\write\js@verbatim@out{\expVerb}}%
+ \verbatim@start%
+}
+\def\endjsexpverbatimwrite{\immediate\closeout\js@verbatim@out\@esphack}
+% \end{macrocode}
+% \begin{macro}{\insPath}
+% Set this macro in the \textbf{preamble} of your document to
+% direct (almost) all auxiliary files of insDLJS to the specified
+% path. The macro takes one parameter, a path on your local hard
+% disk. Usage:
+%\begin{verbatim}
+%\insPath{c:/temp/}
+%\end{verbatim}
+% Be sure to use only forward slashes, and don't forget to finish
+% the string with a final forward slash, as illustrated above.
+%
+% All \texttt{*.fdf} files are written to this folder. The
+% \texttt{.djs} files of any \texttt{insDLJS} environments created
+% after the \cmd{\insPath} will also be written to the path. Any
+% \texttt{.djs} created by packages loaded earlier (such as
+% \textsf{exerquiz}) will be written to the current directory.
+%
+% This macro may be useful for users of Distiller~5.0, and is of marginal
+% value to users of \textsf{pdftex/dvipdfm}.
+% \begin{macrocode}
+\let\js@Path\@empty
+\def\insPath#1{\def\js@Path{#1}}
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro{\makeJSspecials}
+% This command is typically executed at the beginning of each field
+% or link (see \cs{eq@setButtonProps} and \cs{eq@setWidgetProps}).
+% They are used for formatting JavaScript code. The command
+% \cs{makespecialJS} is defined in \textsf{insdljs}.
+% \changes{v2.1}{2015/06/15}{Moved \cs{makeJSspecials} from \textsf{eforms}
+% to here.}
+% \begin{macrocode}
+\begingroup
+\catcode`\{=12 \catcode`\}=12 \catcode`\<=1 \catcode`\>=2
+\gdef\dl@lBrace<\string\{> \gdef\dl@rBrace<\string\}>
+\gdef\dl@tilda<\string~> \gdef\dl@sup<\string^>
+\endgroup
+\def\makeJSspecials{%
+ \def\\{\eqbs\eqbs}% % define \\ to be \\
+ \let\jslit\string
+% \end{macrocode}
+% \changes{v2.0n}{2014/05/20}{Remake the definition of \cs{\char`\{} and \cs{\char`\}}}
+% In an attempt to avoid the use of \verb~\jslit\{~ and \verb~\jslit\}~, we remake
+% the definition of \verb~\{} and \verb~\}~.
+% \begin{macrocode}
+ \let\{\dl@lBrace\let\}\dl@rBrace
+% \end{macrocode}
+% \changes{v2.1}{2015/07/12}{\cs{let} \cs{u} to \cs{@empty}.}
+% \cs{let} \cs{u} to \cs{@empty}.
+% \begin{macrocode}
+ \let\u\@empty
+ \def\({\eqbs(}\def\){\eqbs)}%
+ \makespecialJS % make \r=\jsR and \t=\jsT
+}
+% \end{macrocode}
+% \subsection{Open Document Actions}\label{opendocactions}
+% Early in the process of opening a document, the `\texttt{/OpenAction}' event occurs, where
+% various action-types may be executed. These actions occur before the document JavaScripts
+% are read and before any pages are opened. We give support for this event, originally part
+% of the \textsf{aeb\_pro} package.
+%\changes{v2.1}{2015/06/15}{Moved definition of \cs{addToDocOpen} from
+% \textsf{aeb\_pro} to \textsf{insdljs}, added support for \texttt{pdftex} and \texttt{xetex}
+% options.}
+% \paragraph*{Page views}
+% The view can be set when the page key is used. Possible values are
+% \texttt{fitpage}, \texttt{actualsize}, \texttt{fitwidth},
+% \texttt{fitvisible}, and \texttt{inheritzoom}. These terms correspond
+% to Acrobat's UI. When jumping to a destination, the view is set by the
+% destination code.
+% \begin{macrocode}
+\def\dl@fitpage{/Fit}
+\def\dl@actualsize{/XYZ null null 1.0} %{/XYZ -32768 -32768 1.0}
+\def\dl@fitwidth{/FitH null} %{/FitH -32768}
+\def\dl@fitheight{/FitV null} %{/FitV -32768}
+\def\dl@fitvisible{/FitBH null} %{/FitBH -32768}
+\def\dl@inheritzoom{/XYZ 0 0 0}
+\def\dl@mag#1{/XYZ null null #1}
+\edef\dl@Page#1{\ifcase\dljs@drivernum
+ {Page#1}\or\noexpand\pdfpageref#1\space\space 0 R\or
+ @page#1\fi}
+\def\dl@preProcDefns{\let\Page\dl@Page\let\mag\dl@mag
+ \let\fitpage\dl@fitpage\let\actualsize\dl@actualsize
+ \let\fitwidth\dl@fitwidth\let\fitheight\dl@fitheight
+ \let\fitvisible\dl@fitvisible\let\inheritzoom\dl@inheritzoom
+}
+\let\aeb@additionalOpenAction\@empty
+\let\aeb@addActionCode\@empty
+\let\addActionObj\@empty
+\let\aebpopentoks\@empty
+\let\aebpFA\dl@NO
+\def\aebp@rightDelimiters{}
+% \end{macrocode}
+% The argument of \DescribeMacro\addToDocOpen\cmd{\addToDocOpen} is an action-type, usually
+% \textbf{JavaScript} or a \textbf{GoTo}. The command is accumulative, it can be invoked several types
+% with different action-types. Must be executed in the preamble or it has no effect.
+% It populates the value of the key \textbf{/OpenAction} in the \textbf{Catalog} of the
+% PDF file.
+%\begin{verbatim}
+% \addToDocOpen{\JS{console.println("Open the doc!");}}
+% \addToDocOpen{/S/GoTo/D[\Page{2}\fitpage]}
+%\end{verbatim}
+% \begin{macrocode}
+\newcommand{\addToDocOpen}[1]{%
+ \ifx\aebpFA\dl@NO
+ \g@addto@macro\aebpopentoks{#1}%
+ \def\aeb@additionalOpenAction{/Next {pubAddToDocOpen}}%
+\ifpdf
+ \def\aeb@addActionCode{\immediate\pdfobj{<<
+ \aebpopentoks\aebp@rightDelimiters >>}%
+ \edef\addActionObj{\the\pdflastobj\space 0 R}}%
+\else\ifxetex
+ \def\aeb@addActionCode{\immediate
+ \@pdfm@mark{obj @objAddActionObj
+ << \aebpopentoks\aebp@rightDelimiters >> }}%
+ \def\addActionObj{@objAddActionObj}%
+\else % postscript
+ \def\aeb@addActionCode{\literalps@out{%
+ \AEB@psMrk/_objdef {pubAddToDocOpen}
+ /type/dict /OBJ pdfmark^^J%
+ \AEB@psMrk{pubAddToDocOpen} <<
+ \aebpopentoks\aebp@rightDelimiters >> /PUT pdfmark}}%
+ \def\addActionObj{{pubAddToDocOpen}}%
+\fi\fi
+ \global\let\aebpFA\dl@YES
+ \let\@pdfstartview\@empty
+ \else
+ \edef\aebp@dljstmp{\aebp@rightDelimiters}%
+ \xdef\aebp@rightDelimiters{\aebp@dljstmp >> }%
+ \g@addto@macro\aebpopentoks{/Next << #1 }%
+ \fi
+}
+\def\dljs@OpenActions{/OpenAction \addActionObj}
+\def\dljs@setOpenActions{\bgroup\makeJSspecials\dl@preProcDefns
+ \aeb@addActionCode
+ \ifpdf\pdfcatalog{\dljs@OpenActions}\else
+ \ifxetex\immediate
+ \@pdfm@mark{put @catalog <<\dljs@OpenActions>>}\else
+ \literalps@out{\AEB@psMrk
+ {Catalog} <<\dljs@OpenActions>> /PUT pdfmark}\fi\fi\egroup}
+% \end{macrocode}
+% If \textsf{aeb\_pro} is not loaded, we set the open actions. If \textsf{aeb\_pro}
+% is loaded, we do nothing for \textsf{aeb\_pro} has its own contributions to the
+% PDF \textbf{Catalog}.
+% \changes{v2.3d}{2017/01/08}{Use \cs{aebpFA} to detect open actions}
+% \begin{macrocode}
+\@ifpackageloaded{aeb_pro}{}
+ {\AtBeginDocument{\ifx\aebpFA\dl@YES\expandafter
+ \dljs@setOpenActions\fi}}
+% \end{macrocode}
+%
+% \subsection{Open Page Actions}\label{openaction}
+%
+% In order to get automatic insertion of DLJS using Distiller~5.0 or greater, it is necessary
+% to use a ``Page Open Action'' for page 1 of the document. This section contains some commands
+% for defining an open page action. Originally, these macros were defined only for Distiller
+% users (\textsf{dvips} and \textsf{dvipsone} users), later, I extended their use to
+% \textsf{pdftex} and \textsf{dvipdfm}.
+%
+%\subsubsection{\texorpdfstring{\cs{OpenAction}}{\textbackslash{OpenAction}}}
+%
+% Here are the macros that actually place the open page action into the PDF document. One for
+% the \textsf{Distiller}, one for \textsf{pdftex}, and one for \textsf{dvipdfm}.
+% \begin{macrocode}
+\let\@CloseAction\@empty
+\def\@OAction@pdfmark{\literalps@out{%
+ \AEB@psMrk{ThisPage} << /AA << /O << \theFirstAction\space
+ \opentoks\@rightDelimiters >> \@CloseAction >> >> /PUT pdfmark}}
+\def\@POAction@pdfmark{\literalps@out{%
+ \AEB@psMrk{ThisPage} << /AA << \@thisOpenAction
+ \@thisCloseAction >> >> /PUT pdfmark}%
+}
+\def\@OAction@pdftex{%
+ \ifx\isOpenAction\dl@YES
+ \xdef\pdftexOAction{/AA << /O << \theFirstAction\space
+ \opentoks\@rightDelimiters >> \@CloseAction >>}%
+ \AtNextShipout{\pdfpageattr=\expandafter{\pdftexOAction}}%
+ \fi
+}
+\def\@POAction@pdftex{%
+ \xdef\thisPageActionpdftex{/AA << \@thisOpenAction
+ \@thisCloseAction >>}%
+ \AtNextShipout{\pdfpageattr=\expandafter{\thisPageActionpdftex}}%
+}
+% \end{macrocode}
+% For \textsf{dvipdfm}
+% \begin{macrocode}
+\def\@OAction@dvipdfm{\ifx\isOpenAction\dl@YES
+ \@pdfm@mark{put @thispage << /AA << /O << \theFirstAction\space
+ \opentoks\@rightDelimiters >> \@CloseAction >> >>}\fi
+}
+\def\@POAction@dvipdfm{%
+ \@pdfm@mark{put @thispage << /AA << \@thisOpenAction
+ \@thisCloseAction >> >>}%
+}
+% \end{macrocode}
+% Now we choose the one appropriate to the user's driver option.
+% \begin{macrocode}
+\ifcase\dljs@drivernum
+ \let\@OAction\@OAction@pdfmark
+ \let\@POAction\@POAction@pdfmark
+ \gdef\theFirstAction{/S/JavaScript/JS (\the\importfdftoks)}
+ \let\isOpenAction\dl@YES
+\or
+ \let\@OAction\@OAction@pdftex
+ \let\@POAction\@POAction@pdftex
+ \AtBeginDocument{\@OAction@pdftex}
+\or
+ \let\@OAction\@OAction@dvipdfm
+ \let\@POAction\@POAction@dvipdfm
+ \AtBeginDocument{\@OAction@dvipdfm}
+\fi
+% \end{macrocode}
+% \begin{macro}{\OpenAction}
+% In order for the DLJS to be inserted, \texttt{insdljs} places an open page action
+% on the first page. If the document author wants his/her own open page action, inserting
+% it with the pdfmark operator may lead to unpredictable results. For the uses of the
+% Distiller (dvipsone and dvips users of the distiller), if additional open page action
+% is needed on the first page, you can insert this action using the \cmd{\nextOAction} command.
+%
+%\medskip\noindent Usage
+%\begin{verbatim}
+% \OpenAction{\JS{app.beep(-1); app.alert("Welcome to my Page!",3);}}
+%\end{verbatim}
+% The macro takes two parameters, the \cmd{\Next} followed by the desired action, in this
+% case it is a JavaScript action.
+%
+% From the code below, you can see that \cmd{\nextOAction} ends calling itself. If the next token
+% is a \cmd{\Next}, additional code is entered into the open page action. Thus, for example, the
+% following code is effectively the same as the above example, but the individual lines are
+% listed separately in the GUI action dialog of Acrobat.
+%\begin{verbatim}
+% \OpenAction{\JS{app.beep(-1);}}
+% \Next{\JS{app.alert("Welcome to my Page!",3);}}
+%\end{verbatim}
+% In the above example, several open page actions are ``chained'' together.
+%
+% You are not restricted to JavaScript actions, for example, you can perform a \texttt{Named}
+% action:
+%\begin{verbatim}
+% \OpenAction{/S/Named/N/Open}
+%\end{verbatim}
+% There is a |\Named| command that expands to |/S /Named /N#1|, so the above
+% example can be written
+%\begin{verbatim}
+% \OpenAction{\Named{Open}}
+%\end{verbatim}
+%\cs{opentoks} accumulates the ``action''.
+% \begin{macrocode}
+%\newtoks\opentoks \opentoks={}
+\def\opentoks{}
+% \end{macrocode}
+% The open action is really not meant for anything too fancy, such as searching using regular
+% expressions. Of the special characters, we include only \cs{r} and \cs{t} for formatting
+% purposes. If you want to use a regular expression in the open page action (not likely),
+% put it at the document level as a JavaScript function, and call that function from the
+% open page action.
+% \begin{macrocode}
+\def\makespecialJS{%
+ \let\r\jsR\let\t\jsT\let\n\jsN}
+\def\@rightDelimiters{}
+% \end{macrocode}
+% If the next token is \cs{Next} then we gobble it up, and begin \cs{@OpenAction}
+% otherwise we begin \cs{@OpenAction}. This allows the ``chaining'' as illustrated above.
+% \begin{macrocode}
+\def\OpenAction{\@ifnextchar\Next
+ {\expandafter\@OpenAction\@gobble}{\@OpenAction}}
+% \end{macrocode}
+% \cs{@OpenAction}: This is the macro that actually does the work. We differentiate between whether the
+% current argument \texttt{\#1} is the first of all open actions, or not. If the former,
+% we define it as \cs{theFirstAction}, and reset \cs{isOpenAction}, which keeps track of
+% whether there has been a \textit{prior} open action defined. If the latter, we place it in
+% the \cs{opentoks} token register.
+% \begin{macrocode}
+\def\@OpenAction#1{%
+ \ifx\isOpenAction\dl@NO
+ {\makespecialJS\xdef\theFirstAction{#1}}%
+ \global\let\isOpenAction\dl@YES
+ \else
+ \edef\dljstmp{\@rightDelimiters}%
+ \xdef\@rightDelimiters{\dljstmp >> }%
+ {\makespecialJS\xdef\dljstmp{\opentoks /Next << #1 }}%
+ \xdef\opentoks{\dljstmp}%
+ \fi
+ \@nextOpenAction
+}
+% \end{macrocode}
+% As its last act, \cs{@OpenAction} calls \cs{@nextOpenAction}, which is nearly identical to
+% \cs{OpenAction}, except if there is no \cs{Next} token, the macro terminates.
+% \begin{macrocode}
+\def\@nextOpenAction{\@ifnextchar\Next{\expandafter
+ \@OpenAction\@gobble}{}}
+% \end{macrocode}
+% \end{macro}
+% Here is a last example that uses the \texttt{insDLJS} environment and the \cs{OpenAction} command. This code
+% will cause the following action: Ten seconds after the document is opened, an annoying
+% message is placed on the screen. The annoying message appears only \texttt{once}, otherwise,
+% it would really be annoying. Reader (Acrobat)~5.0 is required for this code.
+%\begin{verbatim}
+%\begin{insDLJS}[DoIt]{doit}{DoIt}
+%var timeout;
+%var didIt = false;
+%var myWelcome="Welcome to your PDF Page!\r\r You can remove this annoying"
+% +" message by sending \u00A3100 to my Swiss bank account!"
+%function startToDoIt()
+%{
+% if(!didIt) timeout = app.setInterval("DoIt();", 10000);
+%}
+%function DoIt()
+%{
+% app.beep(-1);
+% app.alert(myWelcome,1);
+% app.clearInterval(timeout);
+% didIt = true;
+%}
+%\end{insDLJS}
+%\OpenAction{/S /JavaScript /JS(startToDoIt();)}
+%\end{verbatim}
+% See the ``Acrobat JavaScript Object Specification'' for the definitions of some
+% of these JavaScript methods.
+%
+%\subsubsection{\texorpdfstring{\cs{thisPageAction}}{\textbackslash{thisPageAction}}}
+% \DescribeMacro{\thisPageAction} places page actions on the current page.
+% The first argument is on open page action, the second one is a closed page action.
+% \begin{macrocode}
+\def\protectJSCtrls{\def\r{\string\r\string\n}%
+ \def\t{\string\t}\def\n{\string\n}}
+\def\dljs@tstlp{\@ifnextchar\bgroup
+ {\let\dljs@multi\dl@YES\dljs@tstlpi}%
+ {\let\dljs@multi\dl@NO\dljs@tstlpi}}
+\def\dljs@tstlpi#1\@nil{}%
+% #1=arg, #2=O|C, #3=cmd
+\def\dljs@bldScript#1#2#3{{%
+ \dljs@tstlp#1\@nil
+ \ifx\dljs@multi\dl@NO{\protectJSCtrls\xdef#3{/#2<<#1>>}}\else
+ \toks0={}\let\dljs@rAngles\@empty\count0=0
+ \@tfor\dljs@arg:=#1\do{%
+ \ifnum\count0=0
+ \toks0=\expandafter{\dljs@arg}\else
+ \toks2=\expandafter{\dljs@arg}%
+ \edef\holdtokstmp{\the\toks0
+ /Next<<\the\toks2 }%
+ \edef\dljs@rAngles{\dljs@rAngles\space>>}%
+ \toks0=\expandafter{\holdtokstmp}%
+ \fi
+ \advance\count0by1
+ }%
+ {\protectJSCtrls\xdef#3{/#2<<\the\toks0 \dljs@rAngles>>}%
+ \xdef#3{#3}}%
+ \fi
+}}
+\newcommand{\thisPageAction}[2]{%
+ \let\@CloseAction\@empty
+ \let\@thisOpenAction\@empty
+ \let\@thisCloseAction\@empty
+ \def\dljs@argi{#1}\def\dljs@argii{#2}%
+% \end{macrocode}
+% On the first page, \cs{OpenAction} is used to process the open action
+% \begin{macrocode}
+ \ifnum\value{page}=1\relax
+ \ifx\dljs@argii\@empty\else
+ \dljs@bldScript{#2}{C}{\@CloseAction}\fi
+ \ifx\dljs@argi\@empty\else\dljs@tstlp#1\@nil
+ \ifx\dljs@multi\dl@NO\OpenAction{#1}\else
+ \@tfor\dljs@arg:=#1\do{\expandafter
+ \OpenAction\expandafter{\dljs@arg}%
+ }\fi
+ \fi
+ \else
+% \end{macrocode}
+% If this is not the first page, we just populate the \texttt{/O} dictionary
+% \begin{macrocode}
+ \ifx\dljs@argi\@empty\else
+ \dljs@bldScript{#1}{O}{\@thisOpenAction}\fi
+ \ifx\dljs@argii\@empty\else
+ \dljs@bldScript{#2}{C}{\@thisCloseAction}\fi
+ \@POAction
+ \fi
+}
+% \end{macrocode}
+% \subsection{The \texttt{insDLJS} Environments}
+%
+% \begin{macro}{insDLJS}\hypertarget{insDLJS}{}
+% \begin{macro}{insDLJS*}
+% This is the main environment defined by this package. These environments
+% first set some global variables, then set the program flow to driver-dependent
+% environments. There are two forms of this environment, the \texttt{insDLJS} and the
+% \texttt{insDLJS*}.
+%
+% The \texttt{insDLJS} is the simplest of the two environments. Any material
+% within the environment, eventually ends up in the DLJS section of the
+% PDF document
+%
+% The environment takes the \texttt{<base\_name>} and writes the
+% file \texttt{<base\_name>.djs}. This file contains a verbatim
+% listing of the JS within the environment, plus some changing of
+% catcodes. This file is then input back into the document at
+% \cmd{\AtBeginDocument} with the necessary code for
+% \textsf{pdftex} and \textsf{dvipdfm} properly place the JS.
+%
+% The case of \textsf{dvipsone} and \textsf{dvips} is a little different. A
+% \texttt{<base\_name>.djs} is written and input back, and a second file
+% \texttt{<base\_name>.fdf} is written. This second file is later input
+% into the PDF document after distillation.
+%
+% The syntax of usage for this environment, which takes three
+% arguments, is given next.
+%\begin{verbatim}
+% \begin{insDLJS}[<function>]{<base_name>}{<script_name>}
+% <JavaScript functions or exposed code>
+% ...
+% ...
+% \end{insDLJS}
+%\end{verbatim}
+% where,
+% \begin{description}
+% \item[\texttt{\#1:}] This optional parameter, \texttt{<function>},
+% is \emph{required} for the \texttt{dvipsone} and \texttt{dvips}
+% options; otherwise it is ignored. Its value must be the name of
+% one of the functions defined in the environment. This is used to
+% detect whether the DLJS has already be loaded by Acrobat.
+% \item[\texttt{\#2}:] This parameter, \texttt{<base\_name>}, is an
+% alphabetic word with no spaces and limited to eight characters. It
+% is used to build the names of auxiliary files and to build the
+% names of macros used by the environment.
+% \item[\texttt{\#3}:] The \texttt{<script\_name>} of your JavaScript.
+% This title will appear in the Documentlevel JavaScript dialog of
+% Acrobat.
+% \end{description}
+% Within the insDLJS environment, there are two types of comment characters:
+% (1) a \TeX{} comment (|%|) and (2) a JavaScript comment. The JavaScript
+% comments are `\texttt{//}', a line comment, and `\texttt{/*...*/}' for more
+% extensive commenting. These comments will survive and be placed into the
+% PDF file. In JavaScript the `|%|' is used as well, use |\%| when you want to use
+% the percent character in a JavaScript statement, for example
+% |app.alert("\%.2f", 3.14159);|, this statement will appear within your JavaScript
+% code as |app.alert("%.2f", 3.14159);|.
+% \changes{v2.2c}{2015/11/13}{Turned \cs{Hy@unicodefalse} so unicode is not written
+% in the name of the script.}
+% \begin{macrocode}
+\let\insdljsloadVar\@empty
+\newenvironment{insDLJS}[3][]
+{%
+ \gdef\detectdljs{#1}\gdef\dljsBase{#2}%
+ \ifxetex{\def\1{\string\1}\def\2{\string2}%
+ \def\3{\string\3}\xdef\dljsName{#3}}\else
+ \Hy@unicodefalse\pdfstringdef{\dljsName}{#3}\fi
+% \end{macrocode}
+% If the optional argument is not passed,
+% we generate one for the user.
+%\changes{v2.0k}{2012/06/21}{If the optional argument is not passed,
+% we generate one for the user.}
+% \begin{macrocode}
+\ifx\detectdljs\@empty
+ \stepcounter{dljs@cnt}%
+ \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}%
+ \edef\insdljsloadVar{var \detectdljs=true;}%
+ \addtocounter{dljs@cnt}{-1}%
+\fi
+ \global\let\multisegments\dl@NO\setcounter{dljssegs}{2}%
+ \global\dljsobjtoks={}%
+ \expandafter\ifx\csname dljs\dljsBase\endcsname\relax
+ \else\@insjserrDuplicate\fi
+ \ifcase\dljs@drivernum
+ \let\insert@DLJS=\insert@DLJS@pdfmark
+ \let\endinsDLJS=\endinsert@DLJS@pdfmark
+ \let\newsegment=\newsegment@pdfmark
+ \let\endnewsegment=\endnewsegment@pdfmark
+ \or
+ \let\insert@DLJS=\insert@DLJS@pdftex
+ \let\endinsDLJS=\endinsert@DLJS@pdftex
+ \let\newsegment=\newsegment@pdftex
+ \let\endnewsegment=\endnewsegment@pdftex
+ \or
+ \let\insert@DLJS=\insert@DLJS@dvipdfm
+ \let\endinsDLJS=\endinsert@DLJS@dvipdfm
+ \let\newsegment=\newsegment@dvipdfm
+ \let\endnewsegment=\endnewsegment@dvipdfm
+ \fi
+ \insert@DLJS
+}{}
+% \end{macrocode}
+%
+% The \texttt{insDLJS*} environment can be used to better organize,
+% edit and debug your JavaScript. If you have the full Acrobat
+% product, you can open the DLJS edit dialog. There you will see a
+% listing of all DLJS contained in the document. When you double
+% click on one of the \textsl{script names}, you enter the edit
+% window, where you can edit all JavaScript contained under that
+% name. Each \texttt{insDLJS} environment creates a new listing
+% within this DLJS dialog; and, each environment creates a
+% `\texttt{.djs}' file and possibly a \texttt{.fdf}' file. Each
+% \texttt{insDLJS*} environment also creates a `\texttt{.djs}' file
+% and possibly a `\texttt{.fdf}' file too, but within the
+% \texttt{insDLJS*} environment you can create JavaScript under
+% different \textsl{script names}.
+%
+% The syntax is
+%\begin{verbatim}
+% \begin{insDLJS*}[<function>]{<base_name>}
+% \begin{newsegment}{<script_name>}
+% <JavaScript functions or exposed code>
+% \end{newsegment}
+% \begin{newsegment}{<script_name>}
+% <JavaScript functions or exposed code>
+% \end{newsegment}
+% ...
+% ...
+% <JavaScript functions or exposed code>
+% \end{newsegment}
+% \begin{newsegment}{<name_name>}
+% <JavaScript functions or exposed code>
+% \end{newsegment}
+% \end{insDLJS*}
+%\end{verbatim}
+% where,
+% \begin{description}
+% \item[\texttt{\#1:}] This optional parameter, \texttt{<function>},
+% is \emph{required} for the \texttt{dvipsone} and \texttt{dvips}
+% options; otherwise it is ignored. Its value must be the name of
+% one of the functions defined in the environment. This is used to
+% detect whether the DLJS has already be loaded by Acrobat.
+% \item[\texttt{\#2}:] This parameter, \texttt{<base\_name>}, is an
+% alphabetic word with no spaces and limited to eight characters. It
+% is used to build the names of auxiliary files and to build the
+% names of macros used by the environment.
+% \item[\texttt{\#3}:] The \texttt{<script\_name>} of your JavaScript.
+% This title will appear in the Document level JavaScript dialog of
+% Acrobat.
+% \end{description}
+% \begin{macrocode}
+\newenvironment{insDLJS*}[2][]
+{%
+ \gdef\detectdljs{#1}\gdef\dljsBase{#2}%
+% \end{macrocode}
+% If the optional argument is not passed,
+% we generate one for the user.
+%\changes{v2.0k}{2012/06/21}{If the optional argument is not passed,
+% we generate one for the user.}
+% \begin{macrocode}
+\ifx\detectdljs\@empty
+ \stepcounter{dljs@cnt}%
+ \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}%
+ \edef\insdljsloadVar{var \detectdljs=true;}%
+ \addtocounter{dljs@cnt}{-1}%
+\fi
+ \global\let\multisegments\dl@YES\setcounter{dljssegs}{2}%
+ \global\dljsobjtoks={}%
+ \expandafter\ifx\csname dljs\dljsBase\endcsname\relax
+ \else\@insjserrDuplicate\fi
+ \ifcase\dljs@drivernum
+ \let\insert@DLJS=\insert@DLJS@pdfmark
+ \expandafter
+ \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdfmark
+ \let\newsegment=\newsegment@pdfmark
+ \let\endnewsegment=\endnewsegment@pdfmark
+ \or
+ \let\insert@DLJS=\insert@DLJS@pdftex
+ \expandafter
+ \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdftex
+ \let\newsegment=\newsegment@pdftex
+ \let\endnewsegment=\endnewsegment@pdftex
+ \or
+ \let\insert@DLJS=\insert@DLJS@dvipdfm
+ \expandafter
+ \let\csname endinsDLJS*\endcsname\endinsert@DLJS@dvipdfm
+ \let\newsegment=\newsegment@dvipdfm
+ \let\endnewsegment=\endnewsegment@dvipdfm
+ \fi
+ \insert@DLJS
+}{}
+\def\@insjserrDuplicate{%
+ \typeout{^^J! insdljs Package error.}
+ \typeout{! insDLJS environment: On line number \the\inputlineno,}
+ \typeout{! the base name `\dljsBase' has already been chosen.}
+ \typeout{! A DLJS earlier defined has been overwritten!}
+ \typeout{! Choose another name for the first required argument}
+ \typeout{! of the insDLJS environment.^^J}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \subsection{The \texttt{execJS} Environment}\label{execJS}
+% This environment works only for those document authors using Acrobat 5.0 or
+% Acrobat Approval. The \texttt{execJS} environment writes a verbatim \texttt{.djs} and
+% \texttt{.fdf} files using the same scheme as \texttt{insDLJS} environment.
+% The \texttt{.fdf} file is imported into the newly created PDF document and the JavaScript contained
+% within the environments are executed.
+%
+% In order for the JavaScript to be imported and executed, the \texttt{execJS} must be used. The
+% JavaScript is executed once, when the document is first opened in Acrobat.
+%
+% This feature is potentially useful for developmental purposes.
+% \begin{macrocode}
+\newif\ifisdljs \isdljsfalse
+\begingroup
+\catcode`\~=12 \catcode`\#=12
+\gdef\efdlspecials{\catcode`\~=12 \catcode`\#=12}
+\endgroup
+\def\ckivspace#1{\if\noexpand#1\space\else\expandafter#1\fi}
+% \end{macrocode}
+% \changes{v2.2b}{2015/08/03}{Added a hook \cs{DLspecialDefs} into the DJS file}
+% (2015/08/03) Added the \cs{DLspecialDefs} hook into the DJS file, used in
+% \textsf{aeb\_pro}.
+% \begin{macrocode}
+\let\DLspecialDefs\@empty
+\def\fdfAfterheader
+{%
+ \iwvo{\string\begingroup\string\efdlspecials}
+ \iwvo{\string\DLspecialDefs}
+ \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 /After 3 0 R >> >> >> }
+ \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}
+}
+% \end{macrocode}
+% \begin{environment}{execJS}
+% The parameter \texttt{\#1} is the base name for this environment.
+% The base name will be used to create
+% a filename to save the \texttt{.fdf} file under.
+% \begin{macrocode}
+\newenvironment{execJS}[1]
+{%
+ \gdef\detectdljs{\string_#1}\gdef\dljsBase{#1}%
+ \global\dljsobjtoks={}%
+ \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
+ \ifx\importdljs\dl@YES\ifx\execjs\dl@YES
+ \ifx\dl@gopro\dl@YES
+ \ifnum\dljs@drivernum=0\relax
+ \addImportAnFDF\importAnFDFTemplate
+ \else
+ \OpenAction{/S/JavaScript/JS (\importAnFDFTemplate)}%
+ \fi\fi
+ \fi\fi
+ \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
+ \fdfAfterheader
+ \js@verbatimwrite
+}{%
+ \fdfendstreamobj
+ \endjs@verbatimwrite
+ \fdftrailer
+ \closejs@verbatim@out
+ \expandafter\xdef\csname\dljsBase OBJ\endcsname{\the\dljsobjtoks}%
+ \edef\@dljstmp{\noexpand\AtBeginDocument{%
+ \noexpand\input{\js@Path\dljsBase.djs}}}\@dljstmp
+% \end{macrocode}
+%\changes{v2.2g}{2016/05/11}{Removed \string\cs{AtBeginDocument} code
+%from the \string\texttt{execJS} environment. This causes problems with
+%the order of \string\texttt{execJS} and \string\texttt{insDLJS}.}
+%(2016/05/11) Remove the following code, seens to cause problems with
+%the order of \texttt{execJS} and \texttt{insDLJS}.
+%\begin{verbatim}
+% \ifx\firstdljs\dl@YES
+% \AtBeginDocument{\importAnFDF}%
+% \global\let\firstdljs\dl@NO
+% \fi
+%\end{verbatim}
+% \begin{macrocode}
+}
+% \end{macrocode}
+% \end{environment}
+% \subsection{The \texttt{defineJS} Environment}\label{defineJS}
+% When we create a form field that has a JavaScript action attached, it would be nice
+% to be able to write verbatim JavaScript code into the action. Due to the limitations
+% of \TeX, this is not possible. The other possibility is to create an environment for
+% writing JavaScript. This section introduced a couple of environments, the
+% \texttt{defineJS} and \texttt{localJS} environments.
+% \begin{environment}{defineJS}
+% The \texttt{defineJS} environment takes two parameters, the first one optional.
+%\begin{description}
+%\item[\ttfamily\#1 = ] This optional parameter can be used to change catcodes
+% before the verbatim read begins.
+%\item[\ttfamily\#2 = ] The command to be defined.
+%\end{description}
+% The material within the environment is read verbatim and a new command by the name of \#2
+% is defined.
+% \begin{macrocode}
+\newtoks\JStoks
+\newenvironment{defineJS}[2][]
+{%
+ \expandafter\@ifundefined\expandafter{%
+ \expandafter\@gobble\string#2}{}{%
+ \PackageWarning{insdljs}{The command
+ \string#2 already defined}}%
+ \gdef\defineJSArg{#2}\JStoks={}%
+ \def\verbatim@processline
+ {%
+ \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}%
+ \global\JStoks=\expandafter{\JS@temp}%
+ }%
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ #1%
+ \verbatim@start
+}{\gdef\eq@JStemp{\expandafter\edef\defineJSArg{\the\JStoks}}%
+ \aftergroup\eq@JStemp}
+% \end{macrocode}
+% Silent version of \texttt{defineJS}, can repeatedly be used to redefine the same
+% macro.
+% \begin{macrocode}
+\newenvironment{@defineJS}[2][]
+{%
+ \gdef\defineJSArg{#2}\JStoks={}%
+ \def\verbatim@processline
+ {%
+ \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}%
+ \global\JStoks=\expandafter{\JS@temp}%
+ }%
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ #1%
+ \verbatim@start
+}{\gdef\eq@JStemp{\expandafter\edef\defineJSArg{\the\JStoks}}%
+ \aftergroup\eq@JStemp}
+% \end{macrocode}
+% \end{environment}
+% An author might want these definitions to be local in definition, so the
+% \texttt{localJS} environment is supplied.
+% \begin{environment}{localJS}
+% This environment does nothing more than to enclose the material
+% in \cs{begingroup} and \cs{endgroup}.
+% \begin{macrocode}
+\newenvironment{localJS}[1][]{}{\ifvmode\else\unskip\fi}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Set Document Actions}
+% We provide simple environments for writing document actions.
+% \begin{environment}{willClose}
+% Execute a script just before closing the document.
+% \begin{environment}{willSave}
+% Execute script just before a save.
+% \begin{environment}{didSave}
+% Execute a script just after a save
+% \begin{environment}{willPrint}
+% Execute a script just before a print job
+% \begin{environment}{didPrint}
+% Execute a script just after a print job
+% \begin{macrocode}
+\newenvironment{willClose}[1][]
+{\@defineJS[#1]{\will@Close}}
+{\end@defineJS}
+\let\will@Close\@empty
+\newenvironment{willSave}[1][]
+{\@defineJS[#1]{\will@Save}}
+{\end@defineJS}
+\let\will@Save\@empty
+\newenvironment{didSave}[1][]
+{\@defineJS[#1]{\did@Save}}
+{\end@defineJS}
+\let\did@Save\@empty
+\newenvironment{willPrint}[1][]
+{\@defineJS[#1]{\will@Print}}
+{\end@defineJS}
+\let\will@Print\@empty
+\newenvironment{didPrint}[1][]
+{\@defineJS[#1]{\did@Print}}
+{\end@defineJS}
+\let\did@Print\@empty
+\def\dljs@willDidActions{/AA <<
+ \ifx\test@will@Close\@empty\else/WC <<
+ \JS{\will@Close} >>\fi
+ \ifx\test@will@Save\@empty\else/WS <<
+ \JS{\will@Save} >>\fi
+ \ifx\test@did@Save\@empty\else/DS <<
+ \JS{\did@Save} >>\fi
+ \ifx\test@will@Print\@empty\else/WP <<
+ \JS{\will@Print} >>\fi
+ \ifx\test@did@Print\@empty\else/DP <<
+ \JS{\did@Print} >>\fi
+ >>
+}
+\newcommand\dljs@setDocActions{%
+ \edef\test@will@Close{\will@Close}%
+ \edef\test@will@Save{\will@Save}%
+ \edef\test@did@Save{\did@Save}%
+ \edef\test@will@Print{\will@Print}%
+ \edef\test@did@Print{\did@Print}%
+% \end{macrocode}
+% Driver dependent code to put any document actions into the additional actions
+% dictionary of the document catalog.
+% \begin{macrocode}
+ \ifpdf\pdfcatalog{\dljs@willDidActions}\else
+ \ifxetex\immediate
+ \@pdfm@mark{put @catalog <<\dljs@willDidActions>>}\else
+ \literalps@out{\AEB@psMrk
+ {Catalog} <<\dljs@willDidActions>> /PUT pdfmark}\fi\fi
+}
+\@ifpackageloaded{aeb_pro}{}
+ {\AtBeginDocument{\dljs@setDocActions}}
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+%
+% \subsection{For \texttt{dvipsone}/\texttt{dvips}}
+% The method of automatic insertion of document level JavaScript is to
+% write an FDF file (Forms Data Format), then import this FDF into the
+% document using the JavaScript method \texttt{Doc.importAnFDF()}.
+%
+% We break the FDF file into three parts: the \cmd{\fdfheader} (the stuff prior
+% to the JavaScript code); the JavaScript code itself; and the
+% \cmd{\fdftrailer}, the stuff that follows the code.
+% \begin{macrocode}
+\begingroup
+\catcode`\%=12
+\gdef\firstFDFline{%FDF-1.2}
+\gdef\lastFDFline{%%EOF}
+\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}
+}
+\def\fdfbeginstreamobj
+{%
+ \iwvo{\thedljssegs\space 0 obj}
+ \iwvo{<<>>}
+ \iwvo{stream}
+% \end{macrocode}
+% If the user has not passed the optional
+% name, we generated one for him, now we insert it into the \texttt{stream}.
+%\changes{v2.0k}{2012/06/21}{If the user has not passed the optional
+% name, we generated one for him, now we insert it into the \texttt{stream}.}
+% \begin{macrocode}
+ \ifx\insdljsloadVar\@empty\else
+ \iwvo{\insdljsloadVar}
+ \global\let\insdljsloadVar\@empty
+ \fi
+}
+\def\fdfendstreamobj{%
+ \iwvo{endstream}
+ \iwvo{endobj}
+}
+ \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}
+}
+% \end{macrocode}
+% There may be more than one use of the \texttt{insDLJS}
+% environment and we need to be able to import each of the resultant
+% FDF files. The \cmd{\importfdftoks} accumulates material to be
+% used after all chance for the user to insert JS code has been
+% exhausted.
+% \begin{macrocode}
+\newtoks\importfdftoks \importfdftoks={}
+\newtoks\dljsobjtoks \dljsobjtoks={}
+% \end{macrocode}
+% This is a template for detecting whether the DLJS has been imported into
+% the document.
+% \begin{macrocode}
+\def\importAnFDFTemplate{%
+if(typeof \detectdljs\space == "undefined")\jsR\jsT
+% \end{macrocode}
+% Beginning with Acrobat 8.1, the \texttt{Doc.importAnFDF} has additional security. We must call
+% it through a trusted function which is in the file aeb.js, which resides in the user JavaScript folder.
+%\changes{v2.0h}{2006/10/03}
+%{
+% Created aeb.js, which must be installed for users of distiller. The importAnFDF method is now called
+% through a trusted function.
+%}
+% \begin{macrocode}
+ ( app.viewerVersion > 8 ) ? %
+ aebTrustedFunctions( this, aebImportAnFDF, %
+ "\js@Path\dljsBase.fdf") : %
+ this.importAnFDF("\js@Path\dljsBase.fdf");\jsR
+}
+% \end{macrocode}
+% Add in another template into \cmd{\importfdftoks}.
+% \begin{macrocode}
+\def\addImportAnFDF#1{%
+ \ifx\importdljs\dl@YES
+% \let\jsR\relax\let\jsT\relax
+ \edef\importAnFDFtmp{\the\importfdftoks#1}%
+ \global\importfdftoks=\expandafter{\importAnFDFtmp}%
+ \fi
+}
+% \end{macrocode}
+% This is used by \texttt{insert@DLJS@pdfmark} and is placed
+% \cmd{\AtBeginDocument}.
+% \begin{macrocode}
+\def\importAnFDF{\ifx\importdljs\dl@YES\@OAction\fi}
+% \end{macrocode}
+% The \texttt{insert@DLJS@pdfmark} environment writes the \cmd{\dljsBase.djs} file
+% which is in turn input back in, and rewritten as \cmd{\dljsBase.fdf}. This is
+% necessary to give the user a chance to modify the JavaScript code in an
+% authorized way.
+% \begin{macrocode}
+\newenvironment{newsegment@pdfmark}[1]{%
+ \addtocounter{dljssegs}{1}%
+ \addtocounter{dljs@cnt}{1}%
+ \Hy@unicodefalse\pdfstringdef{\dljsName}{#1}%
+ \edef\@dljstmp{\the\dljsobjtoks(\dljsName)
+ \thedljssegs\space 0 R\space}
+ \global\dljsobjtoks=\expandafter{\@dljstmp}
+ \fdfbeginstreamobj
+ \js@verbatimwrite
+}{%
+ \fdfendstreamobj
+ \endjs@verbatimwrite
+}
+\def\insert@DLJS@pdfmark{%
+ \global\let\dljspresent\dl@YES
+ \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
+ \ifx\importdljs\dl@YES\ifx\dl@gopro\dl@YES
+ \addImportAnFDF\importAnFDFTemplate
+ \fi\fi
+ \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
+ \fdfheader
+ \ifx\multisegments\dl@NO\expandafter
+ \newsegment\expandafter{\expandafter\dljsName\expandafter}\fi
+}
+\def\endinsert@DLJS@pdfmark{%
+ \ifx\importdljs\dl@YES
+ \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi
+ \fdftrailer
+ \closejs@verbatim@out
+ \expandafter\xdef\csname\dljsBase%
+ OBJ\endcsname{\the\dljsobjtoks}%
+ \edef\@dljstmp{\noexpand\AtBeginDocument{%
+ \noexpand\input{\js@Path\dljsBase.djs}}}%
+ \@dljstmp
+ \ifx\firstdljs\dl@YES
+ \AtBeginDocument{\edef\@dljstmp{\importAnFDF}%
+ \@dljstmp}\global\let\firstdljs\dl@NO
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \subsection{For \texttt{pdftex}/\texttt{dvipdfm}}
+% Again, we break the problem of creating DLJS into four parts: \cmd{\begindljs},
+% \cmd{\enddljs}, the code itself, driver dependent material, \cmd{\write@pdftex@obj}
+% and \cmd{\write@dvipdfm@obj}.
+%
+% The following is used by both \texttt{pdftex} and \texttt{dvipdfm}.
+% \begin{macrocode}
+\begingroup
+\catcode`\@=0 @catcode`@\=12
+@gdef@ccpdftex{@gdef@eqesc{\\}@gdef@eqesci{\}}
+@endgroup
+\def\begindljs
+{%
+ \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}}}
+% \end{macrocode}
+% (2014/08/09) For pdftex and xetex, this global let messages up
+% the \texttt{Verbatim} environment. Not sure why this is global anyway
+%\begin{verbatim}
+% \iwvo{\string\obeyspaces\string\obeylines\string
+% \global\string\let\string^\string^M=\string\jsR c}}}
+%\end{verbatim}
+% \begin{macrocode}
+ {\escapechar=-1 \lccode`C=`\%\lowercase{%
+ \iwvo{\string\\catcode`\string\\"=12C}}}
+}
+\def\beginseg
+{%
+ {\lccode`P=`\{\lccode`C=`\%\lowercase{%
+ \iwvo{\string\gdef\string\dljs\dljsBase\roman{dljssegs}PC}}}%
+}
+% \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}%
+}
+% \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}
+}
+% \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
+}{%
+ \endjs@verbatimwrite
+ \endseg
+}
+% \end{macrocode}
+% The main branch of the \texttt{insDLJS} for \texttt{pdftex}. This
+% environment writes to the file \cmd{\dljsBase.djs} all the necessary code, then
+% 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
+}{%
+ \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
+% of the PDF document. This code is inserted into the document in \texttt{insert@DLJS@pdftex}
+% using \cmd{\AtEndDocument}.
+% \begin{macrocode}
+\def\setDLJSRef@pdftex
+{%
+ \noexpand\immediate\noexpand\pdfobj {%
+ << /Names [\the\importfdftoks] >> }%
+ \edef\noexpand\objNames{\noexpand\the\noexpand\pdflastobj\space 0 R}%
+ \pdfnames {/JavaScript \noexpand\objNames}%
+}
+% \end{macrocode}
+% \subsubsection{\texttt{dvipdfm} Specific Code}
+% Begin by writing driver-specific code to \cmd{\dljsBase.djs}.
+% \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
+}{%
+ \endjs@verbatimwrite
+ \endseg
+}
+% \end{macrocode}
+% This code places the \texttt{/JavaScript} key-value in the \texttt{/Names} dictionary
+% of the PDF document. This code is inserted into the document in \texttt{insert@DLJS@dvipdfm}
+% using \cmd{\AtEndDocument}.
+% \begin{macrocode}
+\def\setDLJSRef@dvipdfm
+{%
+ \immediate\@pdfm@mark{obj @objnames %
+ << /Names [\the\importfdftoks] >> }%
+ \@pdfm@mark{put @names %
+ << /JavaScript @objnames >> }%
+}
+% \end{macrocode}
+% The main branch of the \texttt{insDLJS} for \texttt{dvipdfm}. This
+% environment writes to the file \cmd{dljsBase.djs} all the necessary code, then
+% is input back into the file using \cmd{\AtBeginDocument}.
+% \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
+}{%
+ \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
+ \fi
+}
+\catcode`\"=\dl@dquoteCat
+%</package>
+% \end{macrocode}
+% \begin{macrocode}
+%<*cc4js>
+% \end{macrocode}
+%\section{Command Changes for JavaScript}\label{dljscc}
+% Regular expressions are a very important part of JavaScript, but they do present
+% some problems for \LaTeX. Ideally, we would like to type JavaScript code into the
+% \texttt{insDLJS} environment using standard JavaScript syntax.
+% (Whether I am successful remains to be seen.) As a result, some new definitions
+% and changes in old definitions are necessary. All definitions take place within a
+% group, so they are unknown outside the \texttt{insDLJS} environment.
+%
+%\subsection{Regular Expressions}
+% Regular expressions can be constructed in two ways, by using (1) a literal text format; or (2)
+% using the \texttt{RegExp} constructor function. The literal text format:
+%\begin{flushleft}
+%\texttt/\textsl{pattern}\texttt/\textsl{flags}
+%\end{flushleft}
+% The \texttt{RegExp} constructor method:
+%\begin{flushleft}\ttfamily
+%new RegExp("\textsl{pattern}" [, "\textsl{flags}"])
+%\end{flushleft}
+% For additional details on regular expressions, see
+%\begin{flushleft}\small
+%\url{http://developer.netscape.com/docs/manuals/js/core/jsref15/regexp.html}
+%\end{flushleft}
+% There is a further complication when dealing with regular expressions. To quote from the above
+% document:\par\medskip\noindent
+% \textbf{Description }
+% When using the constructor function, the normal string escape rules (preceding special characters with `|\|' when included in a string) are necessary.
+% For example, the following are equivalent:
+% \begin{flushleft}
+% \ttfamily\obeylines
+% re = new RegExp("\string\\w+")
+% re = /\string\w+/
+%\end{flushleft}
+%\subsection{Begin Definitions}
+% \subsubsection{Handling of Formatting Sequences}
+% The macro \cmd{\eqesc} expands to `|\|' in the case of the distiller and to `|\\|' in the
+% case of \textsf{pdftex} or \textsf{dvipdfm}. This group of special characters formats the
+% output and they require a different definition than most of the others.
+%
+% The \cs{ckivspace} (``check for space'') macro sees whether the next token is a space,
+% if yes, it absorbs it, if not, it replaces it. I implemented this in order to get
+% final output identical to the JavaScript. For example, the following is legal JavaScript
+%\begin{verbatim}
+% var str = "First line.\r\rSkip a line. // (1)
+%\end{verbatim}
+% This is a problem for \TeX. In order to delimit the macro, \TeX{} users need to write the
+% above line as
+%\begin{verbatim}
+% var str = "First line.\r\r Skip a line. // (2)
+%\end{verbatim}
+% which then introduces a spurious space into the JavaScript code. The \cs{ckivspace} solves this
+% problem, I hope. With the definition of \cs{r} given below, after expansion of the line (2)
+% occurs, we have line (1), the space following the second \cs{r} gets absorbed. Note: (2014/05/20)
+% I moved this to the main code thread of \textsf{insdljs}.
+% \changes{v2.0n}{2014/05/20}{Moved code for \cs{ckivspace} to main code thread of \textsf{insdljs}.}
+% \begin{macrocode}
+%\def\ckivspace#1{\if\noexpand#1\space\else\expandafter#1\fi}
+% \end{macrocode}
+% \begin{macro}{\r}
+% Matches a carriage return.
+% \begin{macrocode}
+\def\r{\eqesc r\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\t}
+% Matches a tab.
+% \begin{macrocode}
+\def\t{\eqesc t\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\n}
+% Matches a linefeed.
+% \begin{macrocode}
+\def\n{\eqesc n\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\f}
+% Matches a form-feed.
+% \begin{macrocode}
+\def\f{\eqesc f\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\v}
+% Matches a form-feed.
+% \begin{macrocode}
+\def\v{\eqesc v\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Matching a Word Boundary or Not}
+% \begin{macro}{\b}
+% Matches a word boundary, such as a space. (Not to be confused with |[\b]|, which
+% matches a backspace.)
+% \begin{macrocode}
+\def\b{\eqesc b\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% The next group are all defined in the same way, pretty much. The macro \cmd{\eqesc} expands to `|\|'
+% in the case of the distiller options, and to `|\\\|' otherwise.
+% \begin{macro}{\B}
+% Matches a non-word boundary.
+% \begin{macrocode}
+\def\B{\eqesc B\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\cX}
+% Where X is a letter from A - Z. Matches a control character in a string. Doesn't seem to have
+% much use in Acrobat JavaScript, will comment this one out. Usage: \cs{cM}
+% \begin{macrocode}
+% \def\doAlpha{\do A\do B\do C\do D\do E\do F%
+% \do G\do H\do I\do J\do K\do K\do M\do N%
+% \do O\do P\do Q\do R\do S\do T\do U\do V\do W\do X\do Y\do Z}
+% \def\mkDefns#1{\expandafter\def\csname c#1\endcsname{\eqesc c#1}}
+% \let\do=\mkDefns\doAlpha
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Matching Digits or Not}
+% \begin{macro}{\d}
+% Matches a digit character. Equivalent to \texttt{[0-9]}.
+% \begin{macrocode}
+\def\d{\eqesc d\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\D}
+% Matches any non-digit character. Equivalent to |[^0-9]|.
+% \begin{macrocode}
+\def\D{\eqesc D\ckivspace}
+% \end{macrocode}
+% \end{macro}
+%\subsubsection{Matching Whitespaces or Not}
+% \begin{macro}{\s}
+% Matches a single white space character, including space, tab, form feed, line feed.
+% Equivalent to |[\f\n\r\t\u00A0\u2028\u2029]|.
+% \begin{macrocode}
+\def\s{\eqesc s\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\S}
+% Matches a single character other than white space.\newline
+% Equivalent to |[^ \f\n\r\t\u00A0\u2028\u2029]|.
+% \begin{macrocode}
+\def\S{\eqesc S\ckivspace}
+% \end{macrocode}
+% \end{macro}
+%\subsubsection{Matching Alphanumeric Characters or Not}
+% \begin{macro}{\w}
+% Matches any alphanumeric character including the underscore. Equivalent to |[A-Za-z0-9\_]|.
+% \begin{macrocode}
+\def\w{\eqesc w\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\W}
+% Matches any non-word character. Equivalent to |[^A-Za-z0-9_]|.
+% \begin{macrocode}
+\def\W{\eqesc W\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{Handling of Character Codes}
+% \begin{macro}{\xXX}
+% Matches the character with the code \texttt{XX} (two hexadecimal digits).
+% The character with the Latin-1 encoding specified by the two hexadecimal digits \texttt{XX}
+% between 00 and FF. For example, \cs{xA9} is the hexadecimal sequence for the copyright
+% symbol.
+%\begin{flushleft}
+%\textbf{Usage}
+%\begin{verbatim}
+%\x9A
+%\end{verbatim}
+%if the most significant digit is a number \texttt{[0-9]},
+%\begin{verbatim}
+%\x A9
+%\end{verbatim}
+%if the most significant digit is a letter \texttt{[a-fA-F]}
+%\end{flushleft}
+%\changes{v2.3b}{2016/10/13}{JPC reported bug with French-Babel, traced it to this code.}
+%To avoid a French-Babel clash (reported by JPC), we change \cs{catcode} of colon (:) to other, enclose in a group
+%and do \cs{xdef} instead of \cs{edef}.
+% \begin{macrocode}
+\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
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\uXXXX}
+% In a regular expression search, \cs{uXXXX} matches the character
+% with unicode character code \texttt{XXXX} (four hexadecimal
+% digits). For example, \cs{u00A9} is the Unicode sequence for the
+% copyright symbol. See Unicode Escape Sequences. http://www.unicode.org
+%\begin{flushleft}
+%\textbf{Usage}
+%\begin{verbatim}
+%\u00A9
+%\end{verbatim}
+%if the most significant digit is a number \texttt{[0-9]},
+%\begin{verbatim}
+%\u F0A9
+%\end{verbatim}
+%if the most significant digit is a letter \texttt{[a-fA-F]}
+%\end{flushleft}
+% \begin{macrocode}
+\def\u{\eqesc u\ckivspace}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\XXX}
+% The character with the Latin-1 encoding specified by up to three octal digits \texttt{XXX} between
+% 0 and 377. For example, \cs{251} is the octal sequence for the copyright symbol.
+%
+% Since this goes only up to octal 377, it suffices to make only the following four definitions.
+% \begin{macrocode}
+\def\0{\eqesc0}
+\def\1{\eqesc1}
+\def\2{\eqesc2}
+\def\3{\eqesc3}
+% \end{macrocode}
+% \end{macro}
+%\subsubsection{Other Special Characters}
+% \begin{macro}{braces}
+% Braces are a problem when they are unbalanced. In a regular expression, |\{| works properly, but |\\{| works
+% for the distiller options but not otherwise. For example, if I wanted to replace every instance
+% of \texttt{\{} with \texttt{(}, we can do this by
+%\begin{verbatim}
+% myString = myString.replace( /\{/, "\(");
+%\end{verbatim}
+% This works for all options, even though the braces are not balanced. However, when the constructor
+% function is used, we must double-escape:
+%\begin{verbatim}
+% var re = new RegExp("\\{", "g");
+% myString = myString.replace( re, "\(");
+%\end{verbatim}
+% This works for the distiller options, but not for \texttt{pdftex/dvipdfm}. The reason |\{| works is that
+% it is a control sequence, defined by the \cmd{\definebraces} command below. Where as |\\{| consists
+% of the control sequence |\\|, which is defined below, followed by a left brace.
+% \TeX{} still requires the braces to be balanced.
+%
+% If you are searching for balanced braces, there should't be a problem, for example,
+% the code
+%\begin{verbatim}
+% var re = new RegExp("\\{|\\}", "g");
+% myString = myString.replace( re, "\(");
+%\end{verbatim}
+% works correctly.
+%
+% To continue the discussion of the problem with searching for
+% unbalanced braces, one workaround is to balance out the left
+% brace with a right brace in the form of a JavaScript comment.
+% This ``fools'' \TeX! For example,
+%\begin{verbatim}
+% var re = new RegExp("\\{", "g"); // }
+% myString = myString.replace( re, "\(");
+%\end{verbatim}
+% Finally, we have\par\medskip
+% \noindent\textbf{The Recommended Workaround:} Use |\\\{| and |\\\}|, e.g.,
+%\begin{verbatim}
+% var re = new RegExp("\\\{", "g");
+% myString = myString.replace( re, "\(");
+%\end{verbatim}
+% This is more verbose than needed, but it works for all options! These comments are only for regular expression
+% strings within the constructor function. Note the replacement text, |\(|, is only escaped.
+%
+% Here we make the definitions for left and right braces. See the definition of \cs{definebraces}
+% given earlier.
+% \begin{macrocode}
+\definebraces
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{parentheses}
+% Just as braces can give us problems with \TeX, so too, parentheses can give us problems with
+% Acrobat JavaScript interpreter. There seems to be a requirement that parentheses be balanced
+% unless they are properly escaped. Generally, we have no problems in the case of distiller options,
+% once again \textsf{pdftex} and \textsf{dvipdfm} are causing (me) problems.
+%
+% No problems when the regular expression uses the literal string format
+%\begin{verbatim}
+% myString = myString.replace(/\(/g, "\[");
+%\end{verbatim}
+% The above code works for all options. However, for the constructor function we have some problems
+% in non-distiller options. If we type instead
+%\begin{verbatim}
+% var re = new RegExp("\\(", "g");
+% myString = myString.replace(re, "\[");
+%\end{verbatim}
+% The above code works for the distiller folks, but not for the
+% others. In the case of \textsf{pdftex}, I cannot access the UI to
+% the document level JavaScripts, and the script is undefined. I suspect
+% the lack of balanced parentheses is the curprit. For example,
+% consider the code
+%\begin{verbatim}
+% var re = new RegExp("\\(|\\)", "g");
+% myString = myString.replace(re, "\[");
+%\end{verbatim}
+% works. I can access the UI to the DLJS from Acrobat, and the script is defined. Another
+% example, we can fool the JavaScript interpreter as we did the \TeX{} compiler:
+%\begin{verbatim}
+% var re = new RegExp("\\(", "g"); // )
+% myString = myString.replace(re, "\[");
+%\end{verbatim}
+% Here I have placed a balancing right parenthesis as a JavaScript comment. Both sets of code
+% work correctly.
+%\par\medskip
+%\noindent\texttt{Recommended Workaround:} As in the case of parentheses, a more verbose version
+% of the script works of all options.
+%\begin{verbatim}
+% var re = new RegExp("\\\(", "g");
+% myString = myString.replace(re, "\[");
+%\end{verbatim}
+% This is only for the case of the constructor function.
+% \begin{macrocode}
+\def\({\eqesc\eqesci(}
+\def\){\eqesc\eqesci)}
+% \end{macrocode}
+% \end{macro}
+% The rest of these definitions are for characters that have a
+% special meaning when they appear in a regular expression. See
+%\begin{flushleft}\small
+%\url{http://developer.netscape.com/docs/manuals/js/core/jsref15/regexp.html}
+%\end{flushleft}
+% for a description of the meaning for the special characters given below (and above).
+% To ``escape'' the special meaning of any character, ``escape'' them.
+% \begin{macrocode}
+\def\.{\eqesc.}
+\def\/{\eqesc/}
+\def\[{\eqesc[}
+\def\]{\eqesc]}
+% \end{macrocode}
+% \begin{macrocode}
+\def\|{\eqesc|}
+\def\+{\eqesc+}
+\def\*{\eqesc*}
+\def\-{\eqesc-}
+\def\?{\eqesc?}
+\def\${\eqesc$}
+\def\^{\eqesc^}
+\def\\{\eqesc\eqesc}
+% \end{macrocode}
+% The next group of characters have no special meaning in a regular expression, but are using elsewhere
+% in JavaScript. These definitions may come in handy.
+% \begin{macrocode}
+\def\'{\eqesc'}
+% \end{macrocode}
+% The \texttt{german} package makes doublequotes, |"|, active, so within the \texttt{insDLJS}
+% environment, we change its catcode to 12.
+% \begin{macrocode}
+\catcode`\"=12
+\def\"{\eqesc"}
+% \end{macrocode}
+% We de-activate angle brackets.
+% \begin{macrocode}
+\catcode`\<=12
+\def\<{\eqesc<}
+\catcode`\>=12
+\def\>{\eqesc>}
+% \end{macrocode}
+% Here, we define `\texttt{\%}' differently. The percent has no special meaning in regular expressions,
+% but is used by the \texttt{util.printf()} method.
+% \begin{macrocode}
+\catcode`\%=12
+\def\%{%}
+\catcode`\%=14
+% \end{macrocode}
+% The `and' symbol has not special meaning for regular expressions, but is used as a logical `and'.
+% Probably don't need this escape.
+% \begin{macrocode}
+\catcode`\& = 12
+\def\&{\eqesc&}
+% \end{macrocode}
+% \begin{macrocode}
+%</cc4js>
+% \end{macrocode}
+% \begin{macrocode}
+%<*altadbfncs>
+% \end{macrocode}
+% \section{Alternate names for some Adobe functions}\label{s:AltAdbFncs}
+% (2017/03/02) Added alternate names for some common Adobe functions. Used for
+% creating custom keystroke and formatting events.
+% \changes{v2.3f}{2017/03/02}{Alternate names for Adobe functions added}
+% \begin{macrocode}
+\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 EFRange_Validate=AFRange_Validate;
+var EFSimple_Calculate=AFSimple_Calculate;
+var EFMergeChange=AFMergeChange;
+\end{insDLJS}
+%</altadbfncs>
+% \end{macrocode}
+% \begin{macrocode}
+%<*package>
+\inputAltAdbFncs
+%</package>
+% \end{macrocode}
+% \Finale
+%\endinput
diff --git a/texmf-dist/source/latex/acrotex/insdljs.ins b/texmf-dist/source/latex/acrotex/insdljs.ins
new file mode 100644
index 00000000..5f044b2a
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/insdljs.ins
@@ -0,0 +1,61 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1999-2006 D. P. Story
+%%
+%% This file is part of the `AcroTeX eDucation Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2001/05/26}
+\def\batchfile{insdljs.ins}
+%
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+\generate
+{%
+ \file{insdljs.sty}{\from{insdljs.dtx}{copyright,package}}
+ \file{dljscc.def}{\from{insdljs.dtx}{copyright,cc4js}}
+ \file{altadbfncs.def}{\from{insdljs.dtx}{copyright,altadbfncs}}
+}
+
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/taborder.dtx b/texmf-dist/source/latex/acrotex/taborder.dtx
new file mode 100644
index 00000000..109c381d
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/taborder.dtx
@@ -0,0 +1,240 @@
+%\iffalse
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% taborder.sty package, %%
+%% Copyright (C) 2009--2016 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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%</copyright>
+%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+%<package>\ProvidesPackage{taborder}
+%<package> [2009/09/04 v0.1 taborder: Sets the tab order, Acrobat Distiller only (dps)]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[colorlinks,hyperindex]{hyperref}
+%\pdfstringdefDisableCommands{\let\\\textbackslash}
+%\EnableCrossrefs \CodelineIndex
+\begin{document}
+\def\CMD#1{\textbackslash#1}
+ \GetFileInfo{taborder.sty}
+ \title{\textsf{taborder}: Package for setting the tab order}
+ \author{D. P. Story\\
+ Email: \texttt{dpstory@uakron.edu}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \let\Email\texttt
+ \DocInput{taborder.dtx}
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+% \MakeShortVerb{|}
+% \StopEventually{}
+%
+% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let}
+% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi}
+% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup}
+% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
+% \DoNotIndex{\space,\@empty,\special}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% \begin{macro}{structure}
+% If the driver is based on the \textbf{pdfmark}, we read the full package,
+% otherwise, we end early.
+% \begin{macrocode}
+\DeclareOption{structure}{\let\to@earlyendinput\relax}
+% \end{macrocode}
+% \end{macro}
+% If option passed is not \texttt{structure}, we will end input early,
+% we also \cs{let} other commands defined in this package to \cs{relax}.
+% \begin{macrocode}
+\let\to@earlyendinput\endinput
+\let\setTabOrderByList\relax\let\setTabOrderByNumber\relax
+\ProcessOptions
+% \end{macrocode}
+% \section{Introduction}
+%
+% This is a short package that provides support for setting tab order
+% for Acrobat form fields and other PDF objects, such as links and
+% comments. The basic portion of the package, provides support for
+% setting tab order based on rows, column, and widgets. If the author
+% uses \textsf{Adobe Distiller} to create a PDF file, support for
+% setting tab order from structure is also provided.
+%
+% The code for this package was originally placed in the
+% \textsf{eforms} package, but I've decided to move it to its own
+% package so \textsf{eforms} can share the code with the
+% \textsf{annot\_pro} package. This package is input by
+% \textsf{eforms} and \texttt{annot\_pro}, and is not meant as a
+% standalone package.
+%
+% \section{Setting Tab Order}
+%
+% \begin{macro}{\setTabOrder}
+% The tab order is determined by the \texttt{Tabs} key of the page object.
+% The value of Tabs are \texttt{R}, \texttt{C}, \texttt{S}, \texttt{W}, and \texttt{A}. (\texttt{W} is implemented in Version 9.0,
+% \texttt{A} was documented for v9.0, but not implemented.) The command is page oriented, it sets
+% the tab order on the current page.
+%
+% \begin{macrocode}
+\newif\ifto@structOrder\to@structOrderfalse
+\newcommand{\setTabOrder}[1]{\begingroup
+ \global\to@structOrderfalse
+ \def\to@to@C{C}\def\to@to@R{R}\def\to@to@S{S}%
+ \def\to@to@W{W}\def\to@to@A{A}\def\to@to@us{UNSPECIFIED}%
+ \uppercase{\def\ef@taborder{#1}}%
+ \ifx\ef@taborder\@empty
+ \else\ifx\ef@taborder\to@to@us
+ \let\ef@taborder\@empty
+ \else\ifx\to@to@C\ef@taborder
+ \else\ifx\to@to@R\ef@taborder
+ \else\ifx\to@to@S\ef@taborder
+ \ifx\to@earlyendinput\endinput
+ \PackageWarning{taborder}{%
+ The structure (S) option is supported only\MessageBreak
+ with Acrobat Distiller. Using the default\MessageBreak
+ value of 'unspecified'}\let\ef@taborder\@empty
+ \else\global\to@structOrdertrue\fi
+ \else\ifx\to@to@W\ef@taborder
+ \else\ifx\to@to@A\ef@taborder
+ \else\PackageWarning{taborder}{%
+ Invalid value for \string\setTabOrder. Permissible \MessageBreak
+ values are R, C, S, W, A, and unspecified. Using \MessageBreak
+ the default value of 'unspecified'}\let\ef@taborder\@empty
+ \fi\fi\fi\fi\fi\fi\fi\ef@setTabOrder
+}
+% \end{macrocode}
+% If the driver is not based on \textbf{pdfmark}, we end here; otherwise, we allow
+% tex compiler to continue, and we define code for setting tab order based on structure.
+% \begin{macrocode}
+\to@earlyendinput
+% \end{macrocode}
+% We place this definition here because it is need for the \textsf{eforms} package and the
+% \textsf{annot\_pro} package.
+% \begin{macrocode}
+\def\ef@setTabOrder{%
+ \ifx\ef@taborder\@empty\else\literalps@out{%
+ [ {ThisPage} <</Tabs/\ef@taborder>> /PUT pdfmark}\fi
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% When the tab order is by structure, there are two ways of specifying the order,
+% by List (the default) or by Number.
+% \begin{macro}{\setTabOrderByList}
+% Declare that you are using the list method of specifying order. Valid only for structure ordering.
+% This is the default, but if the method is switched to Number, this command can switch it back to
+% the list format. When using structure order, with the list method, tab order
+% is set with \cs{setStrucTabOrder}, defined below.
+% \begin{macrocode}
+\newcommand{\setTabOrderByList}{%
+ \global\to@settabsbylisttrue
+ \global\let\setStructTabOrder\to@setStructTabOrder
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setTabOrderByNumber}
+% Declare that you are using the number method of specifying order.
+% Valid only for structure ordering. Here's an example of the syntax used
+% for specifying tab order by number.
+%\begin{verbatim}
+%\setTabOrder{s}
+%\setTabOrderByNumber
+%....
+% \textField[\V{text1}\objdef{text1-\thepage}
+% \taborder{1}]{text1-\thepage}{1.25in}{11bp}
+% \textField[\V{text2}\objdef{text2-\thepage}
+% \taborder{0}]{text2-\thepage}{1.25in}{11bp}
+%\end{verbatim}
+% It seems that a value of 0 is required when setting the tab order. The tabs are
+% ordered 0, 1, 2, 3, .... If you order them as 1,2,3,4,5..., then the order you
+% specify is ignored, and they are listed in the order they were created. So it appears
+% we need a 0 included. If you specify 0,0,1,2,3..., then the two PDF objects with tab order
+% of 0 are visited in the order they were created. Similarly, for the other tab values.
+% A tab order of 0, 2, 3, 4 ... seems to work as well. (The object labeled 2 will be visited
+% after the object labeled 0.)
+% \begin{macrocode}
+\newcommand{\setTabOrderByNumber}{%
+ \global\to@settabsbylistfalse
+ \global\let\setStructTabOrder\@gobble
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setStrucTabOrder}
+%
+% Added 07/08/09. Set the tab order on a page where tab order is set to structure,
+% and \cs{setTabOrderByList} is executed prior to \cs{setStrucTabOrder}. Setting
+% tab order by a list is the default on startup.
+%
+% The command \cs{setStrucTabOrder} takes one argument, a list of
+% references to fields with a \texttt{objdef} definition. The first
+% optional argument will be the title of the tag, the second is
+% an indirect reference to the field.
+%\begin{verbatim}
+% \setStrucTabOrder{%
+% [text3]{text3-\thepage}
+% [text4]{text4-\thepage}
+% [text2]{text2-\thepage}
+% [text1]{text1-\thepage}}
+%\end{verbatim}
+% Setting the structure order is only supported under PS drivers (\textsf{dvips} or \textsf{dvipsone}).
+%
+% The command itself just starts calls the command \cs{@setStructTabOrder}.
+% \begin{macrocode}
+\newcommand{\to@setStructTabOrder}[1]{%
+ \@setStructTabOrder#1\end
+}
+\newif\ifto@settabsbylist\to@settabsbylisttrue
+\let\setStructTabOrder\to@setStructTabOrder
+% \end{macrocode}
+% Added 07/08/09. This is the command that sets to code using postscript specials.
+% This commands reads its key-value pairs, creates some logical structure, then
+% loops back on itself to get another argument. The argument is of the form
+% \verb![key-values]{objdefName}!. The first bracket argument is optional. The default
+% is \texttt{title=} (no title) and \texttt{type=Field}.
+% \begin{macrocode}
+\define@key{structOpts}{title}[]{\def\structOpts@title{#1}}
+\define@key{structOpts}{type}[Form]{\def\structOpts@type{#1}}
+\newcommand{\@setStructTabOrder}[2][]{%
+ \setkeys{structOpts}{title,type,#1}
+ \ifx#2\end\else\literalps@out{%
+ [/Subtype/\structOpts@type\ifx\structOpts@title\@empty
+ \else/Title (\structOpts@title)\fi/StPNE pdfmark
+ [/Obj {#2} /StOBJ pdfmark
+ [/StPop pdfmark}\expandafter\@setStructTabOrder
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% This command is used to insert structure tab order. For this code
+% to be inserted, we must have structure order declared, a nonempty
+% \texttt{objdef} key and a nonempty \texttt{settab} key.
+%
+% This command assumes \cs{eq@objdef}, \cs{eq@taborder}, and \cs{eq@objdefName}
+% have already been defined. Many thanks to Genevieve of Adobe for setting my
+% thinking straight on tab order using the \textbf{At} key.
+% \begin{macrocode}
+\def\to@insertStrucTabOrder#1{%
+ \ifto@structOrder\ifx\eq@objdef\@empty\else
+ \ifx\eq@taborder\@empty\else\literalps@out{%
+ [/Subtype/#1/At \eq@taborder/StPNE pdfmark
+ [/Obj {\eq@objdefName} /StOBJ pdfmark [/StPop pdfmark}%
+ \fi\fi\fi
+}
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \Finale
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/taborder.ins b/texmf-dist/source/latex/acrotex/taborder.ins
new file mode 100644
index 00000000..b02b76ea
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/taborder.ins
@@ -0,0 +1,60 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1999-2006 D. P. Story
+%%
+%% This file is part of the `AcroTeX eDucation Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2001/05/26}
+\def\batchfile{taborder.ins}
+
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+
+\generate
+{%
+ \file{taborder.sty}{\from{taborder.dtx}{copyright,package}}
+}
+
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/web.cfg b/texmf-dist/source/latex/acrotex/web.cfg
new file mode 100644
index 00000000..8afdc114
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/web.cfg
@@ -0,0 +1,10 @@
+%
+% AeB Web Configuration file
+%
+% This is the web configuration file. Replace dvips with
+% dvipsone, pdftex or dvipdfm, in this case, when the driver
+% is not specified in the option list of the web package,
+% the driver specified here will be used.
+%
+\ExecuteOptions{dvips}
+
diff --git a/texmf-dist/source/latex/acrotex/web.dtx b/texmf-dist/source/latex/acrotex/web.dtx
new file mode 100644
index 00000000..d3ae26b8
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/web.dtx
@@ -0,0 +1,5473 @@
+%\iffalse
+% makeindex -s gglo.ist -o web.gls web.glo
+% makeindex -s gind.ist -o web.ind web.idx
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Web package, %%
+%% Copyright (C) 1999-2017 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.
+%%---------------------------------------------------------
+%</copyright>
+%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+%<package>\ProvidesPackage{web}
+%<package> [2017/03/20 v6.0o web: A Screen Design Package (dps)]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[colorlinks,hyperindex=false]{hyperref}
+%\def\texorpdfstring#1#2{#1}
+%\pdfstringdefDisableCommands{\let\\\textbackslash}
+\OnlyDescription % comment out for implementation details
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{web}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{web}{aebdocfmt.def cannot be found}}
+\begin{document}
+\def\CMD#1{\textbackslash#1}
+\let\pkg\textsf
+\let\opt\texttt
+\addtolength{\marginparwidth}{3pt}
+ \GetFileInfo{web.sty}
+ \title{Web: A Screen Design Package}
+ \author{D. P. Story\\
+ Email: \texttt{dpstory@uakron.edu}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \DocInput{web.dtx}
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\par\PrintIndex}{\paragraph*{Index} The index goes here.\\Execute
+ \texttt{makeindex -s gind.ist -o web.ind web.idx} on the command line and recompile
+ \texttt{web.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.\\Execute
+ \texttt{makeindex -s gglo.ist -o web.gls web.glo} on the command line and recompile
+ \texttt{web.dtx}.}
+\end{document}
+%</driver>
+% \fi
+% \MakeShortVerb{|}
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{web}{Inputting aebdonotindex.def}}
+% {\PackageInfo{web}{cannot find aebdonotindex.def}}
+%
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Begin by requiring the \pkg{xkeyval} package (2016/08/17).
+%\changes{v6.0i}{2016/04/28}{Added segments \string\texttt{docdefs} and
+% \string\texttt{dnidefs} to format changes and index. Compile \string\texttt{web.ins}
+% to obtain the files \string\texttt{aebdocfmt.def} and \string\texttt{aebdonotindex.def}.}
+% \changes{v6.0l}{2016/08/17}{Switched over to \string\texttt{xkeyval} package}
+% \begin{macrocode}
+\RequirePackage{xkeyval}
+% \end{macrocode}
+% \section{Declare Options}
+% Options for \texttt{dvipsone}, \texttt{dvips}, \texttt{dviwindo}, \texttt{pdftex},
+% \texttt{dvipdfm}, \texttt{dvipdfmx}, \texttt{xetex}, and \texttt{textures}.
+%\par\medskip\noindent
+% We introduce these two packages early. We use them to automatically
+% detect pdftex and xetex.
+%\changes{v4.2k}{2012/06/18}{New requirement \string\textsf{ifpdf}}%
+% \begin{macrocode}
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+% \end{macrocode}
+%
+% \subsection{Drivers Supported}
+% \begin{macrocode}
+\IfFileExists{xcolor.sty}{%
+ \def\eq@ColorPackage{xcolor}%
+ \PassOptionsToPackage{xcolor}{table,hyperref}%
+}{\def\eq@ColorPackage{color}}
+% \end{macrocode}
+% Force package to use \textsf{color}.\IndexOpt{noxcolor}
+% \begin{macrocode}
+\DeclareOptionX{noxcolor}{\def\eq@ColorPackage{color}}
+% \end{macrocode}
+%\changes{v4.2d}{2009/11/22}{%
+% Added \cs{i@web@ddtoHyOpts},
+% in the dvips option, we use it to set \texttt{setpagesize} to \texttt{false}.
+%}
+% Added \DescribeMacro{\i@web@ddtoHyOpts}\cs{i@web@ddtoHyOpts}. In recent versions of \textsf{hyperref}, \textsf{hyperref}
+% sets the page size first, shutting out a custom page size later
+% by the web package. By putting \texttt{setpagesize=false}, web
+% can set the page size. This is done through the \cs{i@web@ddtoHyOpts}
+% mechanism. This is strictly an internal command. The option \texttt{addtoHyOpts} is for users.
+% \begin{macrocode}
+\let\i@web@ddtoHyOpts\@empty
+\let\eq@driver@name\@empty
+\let\web@YES=y \let\web@NO=n
+% \end{macrocode}
+% \textsf{dvipsone}\IndexOpt{dvipsone}\space is the dvi-to-ps driver of the YandY system that I still
+% use, I hate to give it up. Even I have not used the \IndexOpt{dviwindo}\texttt{dviwindo} option
+% for many years, and is obsolete.
+% \begin{macrocode}
+\DeclareOptionX{dvipsone}{%
+ \def\eq@drivernum{0}\def\eq@driver@name{dvipsone}%
+% \end{macrocode}
+% Below is the original definition of \cs{web@set@paper}, this has now
+% changed with \texttt{v4.2j} to accommodate \cs{addtoWebHeight} and
+% \cs{addtoWebWidth}.
+%\begin{verbatim}
+% \def\web@set@paper{%
+% \special{papersize=\the\paperwidth,\the\paperheight}}%
+%\end{verbatim}
+% \changes{v4.2j}{2012/05/11}{In support of \string\cs{addtoWebHeight}, we introduce
+% the pagesize special at the beginning of the document. Changes are in the
+% \string\texttt{dvipsone} and \string\texttt{dvips} options only.}
+% The revised definition of \cs{web@set@paper}, we now set the papersize
+% at the beginning of the document.
+% \begin{macrocode}
+ \let\web@set@paper\@empty
+ \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}%
+}
+\DeclareOptionX{dviwindo}{%
+ \def\eq@drivernum{4}\def\eq@driver@name{dviwindo}%
+ \@namedef{papersize@for@\eq@driver@name}{\def\web@set@paper{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}%
+}
+% \end{macrocode}
+% Various extensions of \textsf{dvipdfm}, the dvi-to-pdf driver.\IndexOpt{dvipdfm}\IndexOpt{dvipdfmx}\IndexOpt{xetex}
+% \begin{macrocode}
+\DeclareOptionX{dvipdfm}{%
+ \def\eq@drivernum{2}\def\eq@driver@name{dvipdfm}%
+ \web@opts@xdvipdfmx
+}
+% \end{macrocode}
+%\changes{v4.3}{2012/06/20}{Added \string\texttt{dvipdfmx} and \string\texttt{xetex} options}
+% \begin{macrocode}
+\DeclareOptionX{dvipdfmx}{%
+ \def\eq@drivernum{2}\def\eq@driver@name{dvipdfmx}%
+ \web@opts@xdvipdfmx
+}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareOptionX{xetex}{%
+ \def\eq@drivernum{2}\def\eq@driver@name{xetex}%
+ \web@opts@xdvipdfmx
+}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand{\web@opts@xdvipdfmx}{%
+ \@namedef{papersize@for@\eq@driver@name}%
+ {\def\web@set@paper{\AtBeginDvi{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}}%
+}
+% \end{macrocode}
+% \texttt{dvips}\IndexOpt{dvips} is the dvi-to-ps driver.
+% \begin{macrocode}
+\DeclareOptionX{dvips}{%
+ \def\eq@drivernum{0}\def\eq@driver@name{dvips}%
+ \def\i@web@ddtoHyOpts{setpagesize=false}%
+% \end{macrocode}
+% The old definition of \cs{web@set@paper}
+%\begin{verbatim}
+% \def\web@set@paper{%
+% \special{papersize=\the\paperwidth,\the\paperheight}}
+%\end{verbatim}
+% New definitions (\texttt{v4.2j}). See comments for the \texttt{dvipsone} option.
+% \begin{macrocode}
+ \let\web@set@paper\@empty
+ \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}%
+}
+% \end{macrocode}
+% \texttt{pdftex}\IndexOpt{pdftex} is for users of \textsf{pdflatex}.
+% \begin{macrocode}
+\DeclareOptionX{pdftex}{\ifx\eq@driver@name\@empty
+ \def\eq@drivernum{1}\def\eq@driver@name{pdftex}%
+ \def\i@web@ddtoHyOpts{setpagesize}\def\web@set@paper{}\fi
+}
+% \end{macrocode}
+% Added \texttt{luatex}\IndexOpt{luatex} option. We use automatic detection anyway so
+% there is no reason to specify this option. We do not pass it on to \pkg{hyperref}.
+% \changes{v6.0n}{2016/12/15}{added luatex option for completeness}
+% \begin{macrocode}
+\DeclareOptionX{luatex}{\ifx\eq@driver@name\@empty
+ \def\eq@drivernum{1}\def\eq@driver@name{luatex}%
+ \def\i@web@ddtoHyOpts{setpagesize}\def\web@set@paper{}\fi
+}
+% \end{macrocode}
+% The `\texttt{textures}\IndexOpt{textures}' option was contributed by Ross Moore. {(2003/3/6)}
+% \begin{macrocode}
+\DeclareOptionX{textures}{%
+ \def\eq@drivernum{3}\def\eq@driver@name{textures}%
+ \@namedef{papersize@for@\eq@driver@name}%
+ {\def\web@set@paper{\bgroup
+ \dimen2=\origpaperheight \advance\dimen2 by -\topmargin
+ \dimen0\dimen2 \advance\dimen0-\paperheight
+ \xdef\@pdfpagescrop{0 \strip@pt\dimen0 \space
+ \strip@pt\paperwidth\space \strip@pt\dimen2}%
+ \egroup}%
+ \AtEndOfPackage{%
+ \edef\origpaperwidth{\the\paperwidth}%
+ \edef\origpaperheight{\the\paperheight}%
+ }%
+ }%
+}
+% \end{macrocode}
+%\subsection{Paper Option}
+% These two options\IndexOpt{forpaper}\IndexOpt{forcolorpaper}
+% cause \textsf{web} to ignore the \cs{screensize} and \cs{margins} commands, though
+% the same \cs{textwidth} is used in both paper options and screen options.
+% \changes{v6.0j}{2016/06/04}{Added \string\cs{ifequsecolor} to easily distinguish between
+% \string\texttt{forpaper} and \string\texttt{forcolorpaper} options.}
+% \begin{macrocode}
+\@ifundefined{ifequsecolor}{\newif\ifequsecolor \equsecolorfalse}{}
+\DeclareOptionX{forpaper}{\equsecolorfalse\eqforpapertrue
+ \PassOptionsToPackage{forpaper}{eqexam}
+ \PassOptionsToPackage{monochrome}{\eq@ColorPackage}%
+ \PassOptionsToPackage{forpaper}{exerquiz}}
+\DeclareOptionX{forcolorpaper}{\equsecolortrue\eqforpapertrue
+ \PassOptionsToPackage{forcolorpaper}{eqexam}
+ \PassOptionsToPackage{forcolorpaper}{exerquiz}}
+% \end{macrocode}
+% \subsection{First Page Options}
+% Various options for setting the look of the document.\IndexOpt{latexlayout}^^A
+% \IndexOpt{nodirectory}^^A
+% \IndexOpt{usedirectory}^^A
+% \IndexOpt{latextoc}^^A
+% \IndexOpt{nobullets}^^A
+% \begin{macrocode}
+\DeclareOptionX{latexlayout}{%
+ \let\web@layout\web@NO\ExecuteOptionsX{forcolorpaper}}
+\DeclareOptionX{uselatexsectioning}{%
+ \web@sectioningfalse
+}
+\newif\ifweb@sectioning \web@sectioningtrue
+\DeclareOptionX{weblikeclass}{%
+ \ExecuteOptionsX{latexlayout}%
+ \ExecuteOptionsX{nobullets}%
+ \ExecuteOptionsX{uselatexsectioning}%
+}
+\DeclareOptionX{nodirectory}{\let\web@directory@option\web@NO}
+\DeclareOptionX{usedirectory}{\let\web@directory@option\web@YES}
+\DeclareOptionX{latextoc}{\let\web@latextoc\web@YES}
+\DeclareOptionX{nobullets}{\let\web@bullets\web@NO
+ \let\web@latextoc\web@YES\forceSubSubNumbers}
+% \end{macrocode}
+%
+% \subsection{Standard Screen Designs}
+% Some ``standard screen designs''. The first one, \texttt{designi}, roughly corresponds to
+% the original \texttt{web} page size.
+%
+% \cs{web@MargScrDimOpts} is an internal macro for setting the margins and the
+% screen size; this command can only be used once per document (no overwriting
+% of parameters).
+% \begin{macrocode}
+\def\web@MargScrDimOpts#1#2#3#4#5#6{%
+ \margins{#1}{#2}{#3}{#4} % left,right,top, bottom
+ \screensize{#5}{#6} % height, width
+% \end{macrocode}
+% We save the current settings, then change \cs{margins} and \cs{screensize}
+% to gobble their arguments up if used again.
+% \begin{macrocode}
+% \let\margins@web@save\margins
+% \let\screensize@web@save\screensize
+ \let\margins\@@margins\let\screensize\@gobbletwo
+}
+% \end{macrocode}
+% The original design concept for various dimensions.\IndexOpt{designi...designvix}
+% \begin{macrocode}
+\DeclareOptionX{designi}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{3.736in}{4.67in}}}
+\DeclareOptionX{designii}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{5in}}}
+\DeclareOptionX{designiii}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{5in}{6in}}}
+\DeclareOptionX{designiv}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4in}{5in}}}
+\DeclareOptionX{designv}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{6in}}}
+\DeclareOptionX{designvi}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.17in}{4.67in}}}
+\DeclareOptionX{designvii}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{7.5in}{10in}}}
+\DeclareOptionX{designviii}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6.67in}}}
+\DeclareOptionX{designix}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6in}}}
+% \end{macrocode}
+% The \texttt{usesf}\IndexOpt{usesf} option makes the default font sans serif.
+% Popular for presentations.
+% \begin{macrocode}
+\DeclareOptionX{usesf}{%
+ \def\aeb@defaultfamily{\sffamily}
+ \def\itdefault{sl}
+ \renewcommand{\familydefault}{\sfdefault}
+ \selectfont
+ \renewcommand\labelitemi{\textrm{\textbullet}}
+ \AtEndOfPackage{\def\web@copyright@symbol{\textrm{\copyright}}}
+}
+\def\aeb@defaultfamily{\rmfamily}
+% \end{macrocode}
+% Passes the \texttt{unicode}\IndexOpt{unicode} option to \textsf{hyperref}.
+% \changes{v4.1}{2008/03/21}
+% {%
+% Added the \string\texttt{unicode} option, which is passed to \string\textsf{hyperref}.
+% }
+% \begin{macrocode}
+\DeclareOptionX{unicode}{\def\aeb@useunicode{unicode}}
+\let\aeb@useunicode\@gobble
+% \end{macrocode}
+% If the option \IndexOpt{xhyperref}\opt{xhyperref} is taken, \textsf{hyperref} is not input by this
+% package. The document author must do it prior to the \textsf{web} package.
+%\changes{v4.3}{2012/06/20}{Added \string\texttt{xhyperref} option that bypasses
+% the inclusion of \string\textsf{hyperref}.}
+% \begin{macrocode}
+\newif\if@web@hyperref \@web@hyperreftrue
+\DeclareOptionX{xhyperref}{\@web@hyperreffalse}
+% \end{macrocode}
+% \begin{macro}{addtoHyOpts}
+% Due to the ongoing development of \pkg{hyperref}, we make it easier to pass options to that package with
+% the \texttt{addtoHyOpts} option. This may cause clashes with other \pkg{hyperref} options, author may need
+% to back off as needed.
+% \changes{v6.0l}{2016/08/17}{Added \string\texttt{addtoHyOpts} option}
+% \begin{macro}{addtoHyOpts*}
+% The \opt{addtoHyOpts} passes its value to a \cs{hypersetup} command that is emitted after
+% the options have been processed.
+% \changes{v6.0m}{2016/08/19}{Added \string\texttt{addtoHyOpts*} option}
+% \begin{macrocode}
+\define@choicekey+{webHyOpts}{pdfencoding}[\val\nr]%
+ {auto,pdfdoc,unicode}[pdfdoc]{\edef\web@Hypdfencoding{\val}}
+ {\PackageWarning{web}{Bad choice for pdfencoding,
+ permissible values\MessageBreak
+ are auto, pdfdoc, and unicode.\MessageBreak Try again}}
+\let\web@Hypdfencoding\@empty
+\let\u@web@ddtoHyOpts\@empty
+\let\u@web@ddtoHySetup\@empty
+\def\web@addtoHyOpts#1{\g@addto@macro\u@web@ddtoHyOpts{#1}}
+\def\web@addtoHySetup#1{\g@addto@macro\u@web@ddtoHySetup{#1}}
+\define@key{web.sty}{addtoHyOpts}[]{%
+ \setkeys*{webHyOpts}{#1}\web@addtoHyOpts{#1}}
+\define@key{web.sty}{addtoHyOpts*}[]{%
+ \setkeys*{webHyOpts}{#1}\web@addtoHySetup{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% Passes the \texttt{useui}\IndexOpt{useui} option to \textsf{eforms}. With this option,
+% the key-value pairs \textsl{\'{a} la \textsf{xkeyval}} can be used.
+% \changes{v4.1}{2008/03/21}
+% {%
+% Added the \string\texttt{useui} option, which is passed to \string\textsf{eforms}.
+% }
+% \begin{macrocode}
+\DeclareOptionX{useui}{\PassOptionsToPackage{useui}{eforms}}
+% \end{macrocode}
+% Force the use of subsubsection numbers\IndexOpt{forceSubSubNumbers}
+% \begin{macrocode}
+\DeclareOptionX{forceSubSubNumbers}{\ExecuteOptionsX{nobullets}}
+% \end{macrocode}
+% This options\IndexOpt{centertitlepage}\IndexOpt{centertitlepagefull} attempt to center the title page. The first one centers the content
+% on the title page without changing the \cs{textwidth}, the second one centers the
+% content on the page with \texttt{\cs{textwidth}=\cs{paperwidth}-2in}.
+% \begin{macrocode}
+\DeclareOptionX{centertitlepage}{\@centertitlepagetrue}
+\newif\if@centertitlepage \@centertitlepagefalse
+\DeclareOptionX{centertitlepagefull}{\@centertitlepagefulltrue}
+\newif\if@centertitlepagefull \@centertitlepagefullfalse
+% \end{macrocode}
+% The \texttt{pro}\IndexOpt{pro} option introduces many enhanced features,
+% these are cataloged in the \texttt{webpro} section of this file. An alias
+% of \texttt{extended}\IndexOpt{extended} was introduced to avoid confusion with
+% the `pro' naming convention of AeB to indicate \textsf{Distiller} is required as
+% a PDF creator.
+% \begin{macrocode}
+\DeclareOptionX{pro}{\let\webpro@loaded\web@YES}
+\DeclareOptionX{extended}{\let\webpro@loaded\web@YES}
+\let\webpro@loaded\web@NO
+\def\loadwebpro{\InputIfFileExists{webpro.def}{}{}}
+% \end{macrocode}
+%
+% When you take the \texttt{draft}\IndexOpt{draft} option, graphic overlays are not allowed. This is useful
+% when you rely heavily on graphic overlays, but during the development phase,
+% don't need to read and re-read your overlays. The defined background colors
+% will be used instead. Remove this option to build the
+% final version of your document.
+% \begin{macrocode}
+\newif\ifweb@allowtemplates \web@allowtemplatestrue
+\DeclareOptionX{draft}{\web@allowtemplatesfalse}
+% \end{macrocode}
+%
+% \subsection{Panel Related Options}
+% The \IndexOpt{usetemplates}\texttt{usetemplates} option allows the use of templates;
+% \IndexOpt{leftpanel} \texttt{leftpanel} declares the use of a left (navigational)
+% panel; \IndexOpt{rightpanel} \texttt{rightpanel} declares the use of a left (navigational)
+% panel.
+% \begin{macrocode}
+\DeclareOptionX{usetemplates}{\def\@usetemplates{1}}
+\DeclareOptionX{leftpanel}%
+ {\def\@panelconfig{1}\def\@usetemplates{1}}
+\DeclareOptionX{rightpanel}%
+ {\def\@panelconfig{2}\def\@usetemplates{1}}
+% \end{macrocode}
+% Normally, the templates feature is removed
+% when the \texttt{forpaper} or \texttt{forcolorpaper} open is used. There may be
+% situation when templates are a good thing for paper. We offer \texttt{templatesforpaper}\IndexOpt{templatesforpaper}
+% as an option.
+% \begin{macrocode}
+\newif\iftemplatesforpaper \templatesforpaperfalse
+\DeclareOptionX{templatesforpaper}{\templatesforpapertrue
+ \ExecuteOptionsX{forcolorpaper}}
+% \end{macrocode}
+% Here we come to a couple of options, \IndexOpt{rightpanelprt}\IndexOpt{leftpanelprt}
+% \texttt{rightpanelprt} and \texttt{leftpanelprt}, I remember nothing about.
+% apparently, these are \texttt{rightpanel} and \texttt{leftpanel} options for screen mode only.
+% \begin{macrocode}
+\DeclareOptionX{rightpanelprt}{%
+ \ifeqforpaper\else\ExecuteOptionsX{rightpanel}\fi
+}
+\DeclareOptionX{leftpanelprt}{%
+ \ifeqforpaper\else\ExecuteOptionsX{leftpanel}\fi
+}
+% \end{macrocode}
+% \DescribeMacro{\templatedefaults} sets the defaults for the template code.
+% \begin{macrocode}
+\def\templatedefaults{\def\@panelsep{0pt}\def\@usetemplates{0}%
+ \def\@panelconfig{0}\def\@textX{0}\def\@panelX{0}%
+}
+\templatedefaults
+% \end{macrocode}
+% \subsection{Miscellaneous Options}
+%
+% The \texttt{navibar}\IndexOpt{navibar} option places
+% a set of navigation buttons on footer.
+% \begin{macrocode}
+\DeclareOptionX{navibar}{\web@navibartrue}
+% \end{macrocode}
+% The \texttt{tight}\IndexOpt{tight} option reduces
+% the vertical spaces around equations and verbatim environments. The \texttt{tight*}\IndexOpt{tight*}
+% is the same as \texttt{tight} but is operational only for the screen.
+% \begin{macrocode}
+\DeclareOptionX{tight}{\AtEndOfPackage{\tightsettings}}
+\DeclareOptionX{tight*}{\AtEndOfPackage{\tightsettings*}}
+% \end{macrocode}
+% The \cs{web@tight} flag signals that tight settings are in effect. Currently, the flag is not
+% used.
+% \begin{macrocode}
+\let\web@tight\web@NO
+% \end{macrocode}
+% If either of these options is used\IndexOpt{uselatexparts}\IndexOpt{uselatexchapters},
+% the re-definitions that \textsf{web} makes are bypassed, and the original {\LaTeX}
+% definitions are used.
+% \begin{macrocode}
+\DeclareOptionX{uselatexparts}{%
+ \AtEndOfPackage{\@ifundefined{part}{}{\let\part\web@save@part}}}
+\DeclareOptionX{uselatexchapters}{%
+ \AtEndOfPackage{\@ifundefined{chapter}{}
+ {\let\chapter\web@save@chapter}}}
+% \end{macrocode}
+% \subsection{Language Options}
+% The \texttt{french}\IndexOpt{french} option
+% \begin{macrocode}
+\DeclareOptionX{french}{%
+ \AtEndOfPackage{%
+%======> Modification : JMS
+ % Recouvrement de \today
+ \def\today{\the\day\ \ifcase\month\or janvier
+ \or f\'evrier \or mars \or avril
+ \or mai \or juin \or juillet \or ao\^ut
+ \or septembre \or octobre \or novembre
+ \or d\'ecembre \fi \the\year}
+%======> Modification : JMS
+ \def\web@toc{Table des mati\`{e}res}
+ \def\web@continued{suite}
+ \def\web@article{D\'{e}but \hyperlink{\web@Start.1}{Document}}
+ \def\web@directory{R\'{e}pertoire}
+ \def\web@revision{Mise \`{a} jour :}
+ \def\web@copyright{Copyright}
+ \def\web@versionlabel{Version}
+ \def\web@back{Retour}}
+ \PassOptionsToPackage{french}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{german}\IndexOpt{german} option
+% \begin{macrocode}
+\DeclareOptionX{german}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day. \ifcase\month\or Januar
+ \or Februar \or M\"{a}rz \or April
+ \or Mai \or Juni \or Juli \or August
+ \or September \or Oktober \or November
+ \or Dezember \fi \the\year}
+ \def\web@versionlabel{Version}
+ \def\web@toc{Inhaltsverzeichnis}
+ \def\web@continued{Forts.}
+ \def\web@article{Anfang \hyperlink{\web@Start.1}{Artikel}}
+ \def\web@directory{\"Ubersicht}
+ \def\web@revision{Letzte \"Anderung:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Abschnitt}
+ \def\web@back{Zur\"uck}
+ \def\web@doc{Dok}}
+ \PassOptionsToPackage{german}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{norsk}\IndexOpt{norsk} option
+% \begin{macrocode}
+\DeclareOptionX{norsk}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or Januar
+ \or Februar \or Mars \or April
+ \or Mai \or Juni \or Juli \or August
+ \or September \or Oktober \or November
+ \or Desember \fi \the\day, \the\year}
+ \def\web@versionlabel{Versjon}
+ \def\web@toc{Innholdsfortegnelse}
+ \def\web@continued{forts.}
+ \def\web@article{Start \hyperlink{\web@Start.1}{artikkel}}
+ \def\web@directory{Katalog}
+ \def\web@revision{Sist endret:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Avsnitt}
+ \def\web@back{Tilbake}
+ \def\web@doc{Dok}}
+ \PassOptionsToPackage{norsk}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{dutch}\IndexOpt{dutch} option
+% \begin{macrocode}
+\DeclareOptionX{dutch}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day~\ifcase\month\or januari
+ \or februari \or maart \or april
+ \or mei \or juni \or juli \or augustus
+ \or september \or oktober \or november
+ \or december \fi \space \the\year}
+ \def\web@versionlabel{Versie}
+ \def\web@toc{Inhoudsopgave}
+ \def\web@continued{vervolg}
+ \def\web@article{Begin \hyperlink{\web@Start.1}{Artikel}}
+ \def\web@directory{Overzicht}
+ \def\web@revision{Laatste wijziging:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Sectie}
+ \def\web@back{Terug}
+ \def\web@doc{Doc}}
+ \PassOptionsToPackage{dutch}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{spanish}\IndexOpt{spanish} option
+% \begin{macrocode}
+\DeclareOptionX{spanish}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day\ de \ifcase\month\or Enero
+ \or Febrero \or Marzo \or Abril
+ \or Mayo \or Junio \or Julio \or Agosto
+ \or Septiembre \or Octubre \or Noviembre
+ \or Deciembre \fi de \the\year}
+ \renewcommand\web@versionlabel{Versi\noexpand\'{o}n}
+ \renewcommand\web@toc{Tabla de Contenido}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inicio
+ \hyperlink{\web@Start.1}{Art\'{\i}culo}}
+ \renewcommand\web@directory{Directorio}
+ \renewcommand\web@revision{Actualizado el:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Secci\'on}
+ \renewcommand\web@back{Volver}
+ \renewcommand\web@doc{Doc}}
+ \PassOptionsToPackage{spanish}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{italian}\IndexOpt{italian} option
+% \begin{macrocode}
+\DeclareOptionX{italian}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or Gennaio
+ \or Febbraio \or Marzo \or Aprile
+ \or Maggio \or Giugno \or Luglio \or Agosto
+ \or Settembre \or Ottobre \or Novembre
+ \or Dicembre \fi \the\day, \the\year}
+ \renewcommand\web@versionlabel{Versione}
+ \renewcommand\web@toc{Indice}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inizio \hyperlink{\web@Start.1}{Articolo}}
+ \renewcommand\web@directory{Directory}
+ \renewcommand\web@revision{Data Ultima Revisione:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Sezione}
+ \renewcommand\web@back{Back}
+ \renewcommand\web@doc{Doc}}
+ \PassOptionsToPackage{italian}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{russian}\IndexOpt{russian} option
+% \DoNotIndex{\cyrCommand,\cyra,\cyrn,\cyrv,\cyra,\cyrr,\cyrya,
+% \cyrf,\cyre,\cyrv,\cyrr,\cyra,\cyrl,\cyrya,\cyrm,\cyra,\cyrr,\cyrt,\cyra,
+% \cyrm,\cyra,\cyrya,\cyri,\cyryu,\cyrn,\cyryacyri,\cyryu,\cyrl,\cyrya,
+% \cyra,\cyrv,\cyrg,\cyru,\cyrs,\cyrt,\cyra,\cyrs,\cyre,\cyrn,\cyrt,\cyrya,\cyrb,\cyrr,\cyrya,
+% \cyro\cyrk\cyrt\cyrya\cyrb\cyrr\cyrya\cyrn\cyro\cyrya\cyrb\cyrr\cyrya,
+% \cyrd,\cyre,\cyrk,\cyrya,\cyrb,\cyrr,\cyrya,\CYRO,\cyrg,\cyrl,\cyra,\cyrv,\cyrl,\cyre,\cyrn,
+% \cyri,\cyre,\cyrd,\cyro,\cyrk,\cyru,\cyrm,\cyre,\cyrn,\cyrt,\cyra,
+% \CYRN,\cyra,\cyrch,\cyra,\cyrl,\cyro,\CYRS,\CYRP,\CYRV,\CYRN,\CYRCH,
+% \cyrp,\cyrz,\cyrz,\cyrzh,\CYRK,\cyrishrt,\cyrsftsn}
+% \begin{macrocode}
+\DeclareOptionX{russian}{%
+ \ExecuteOptionsX{unicode}%
+ \AtEndOfPackage{%
+ \def\today{\the\day\ \ifcase\month
+ \or \cyrya\cyrn\cyrv\cyra\cyrr\cyrya
+ \or \cyrf\cyre\cyrv\cyrr\cyra\cyrl\cyrya
+ \or \cyrm\cyra\cyrr\cyrt\cyra
+ \or \cyra\cyrp\cyrr\cyre\cyrl\cyrya
+ \or \cyrm\cyra\cyrya
+ \or \cyri\cyryu\cyrn\cyrya
+ \or \cyri\cyryu\cyrl\cyrya
+ \or \cyra\cyrv\cyrg\cyru\cyrs\cyrt\cyra
+ \or \cyrs\cyre\cyrn\cyrt\cyrya\cyrb\cyrr\cyrya
+ \or \cyro\cyrk\cyrt\cyrya\cyrb\cyrr\cyrya
+ \or \cyrn\cyro\cyrya\cyrb\cyrr\cyrya
+ \or \cyrd\cyre\cyrk\cyrya\cyrb\cyrr\cyrya \fi{ }%
+ \the\year\ \cyrg.}
+ \gdef\eq@protected##1##2{{\ifhmode ##2\else
+ \ifvmode ##2\else\ifinner##2\else\noexpand ##1\fi\fi\fi}}%
+ \def\cyrCommand##1##2{\def##1{\eq@protected##1{##2}}}%
+ \cyrCommand\web@toc{\CYRO\cyrg\cyrl\cyra\cyrv\cyrl\cyre\cyrn%
+ \cyri\cyre}
+ \cyrCommand\web@continued{\cyrp\cyrr\cyro\cyrd\cyro\cyrl%
+ \cyrzh\cyre\cyrn\cyri\cyre}
+ \cyrCommand\web@article{\CYRN\cyra\cyrch\cyra\cyrl\cyro{ }%
+ \hyperlink{\web@Start.1}{\cyrd\cyro\cyrk\cyru\cyrm\cyre%
+ \cyrn\cyrt\cyra}}
+ \cyrCommand\web@directory{\CYRS\cyro\cyrd\cyre\cyrr\cyrzh%
+ \cyra\cyrn\cyri\cyre}
+ \cyrCommand\web@revision{\CYRP\cyro\cyrs\cyrl\cyre\cyrd\cyrn%
+ \cyrya\cyrya{ }\cyrr\cyre\cyrv\cyri\cyrz\cyri\cyrya:}
+ \let\web@copyright\@gobble
+% \cyrCommand\web@copyright{%\CYRK\cyro\cyrp\cyri\cyrr\cyra%
+% \cyrishrt\cyrt}%In Russian publications only the symbol presents
+ \cyrCommand\web@versionlabel{\CYRV\cyre\cyrr\cyrs\cyri\cyrya}
+ \cyrCommand\web@back{\CYRN\cyra\cyrz\cyra\cyrd}
+ \cyrCommand\web@section{\CYRCH\cyra\cyrs\cyrt\cyrsftsn}}
+ \PassOptionsToPackage{russian}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{dansk}\IndexOpt{dansk} option
+% \begin{macrocode}
+\DeclareOptionX{dansk}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or Januar
+ \or Februar \or Marts \or April
+ \or Maj \or Juni \or Juli \or August
+ \or September \or Oktober \or November
+ \or December \fi \the\day, \the\year}
+ \renewcommand\web@versionlabel{Version}
+ \renewcommand\web@toc{Indholdsfortegnelse}
+ \renewcommand\web@continued{forts.}
+ \renewcommand\web@article{Begin \hyperlink{\web@Start.1}{Artikel}}
+ \renewcommand\web@directory{Katalog}
+ \renewcommand\web@revision{Sidst revideret:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Afsnit}
+ % Label Navibar
+ \renewcommand\web@back{Tilbage}
+ \renewcommand\web@doc{Dok}} % restricted to three characters
+ \PassOptionsToPackage{dansk}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{polish}\IndexOpt{polish} option
+% \begin{macrocode}
+\DeclareOptionX{polish}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or {Stycze\'{n}}
+ \or Luty \or Marzec \or {Kwiecie\'{n}}
+ \or Maj \or Czerwiec \or Lipiec \or {\'{S}ierpie\'{n}}
+ \or {Wrzesie\'{n}} \or {Pa\'{z}dziernik} \or Listopad
+ \or {Grudzie\'{n}} \fi \the\day, \the\year}
+ \renewcommand\web@versionlabel{Wersja}
+ \renewcommand\web@toc{Spis Tre\'{s}ci}
+ \renewcommand\web@continued{verte}
+ \renewcommand\web@article{Pocz\k{a}tek do
+ \hyperlink{\web@Start.1}{Tekstu}}
+ \renewcommand\web@directory{Zawarto\'{s}\'{c}}
+ \renewcommand\web@revision{Ostatnia zmiana:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Cze\'{s}\'{c}}
+ % Label Navibar
+ \renewcommand\web@back{Wstecz}
+ \renewcommand\web@doc{Dok}} % restricted to three characters
+ \PassOptionsToPackage{polish}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{finnish}\IndexOpt{finnish} option
+% \begin{macrocode}
+\DeclareOptionX{finnish}{%
+ \AtEndOfPackage{%
+ % Recouvrement de \today
+ \def\today{\the\day\ \ifcase\month\or Tammikuu
+ \or Helmikuu \or Maaliskuu \or Huhtikuu
+ \or Toukokuu \or Kes\"{a}kuu \or Hein\"{a}kuu \or Elokuu
+ \or Syyskuu \or Lokakuu \or Marraskuu
+ \or Joulukuu \fi \the\year}
+ \def\web@toc{Sis\"{a}llys}
+ \def\web@continued{jatka}
+ \def\web@article{Aloita \hyperlink{section.1}{Artikkeli}}
+ \def\web@directory{Hakemisto}
+ \def\web@revision{Muutettu viimeeksi:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Kappale}
+ \def\web@versionlabel{Versio}
+ \def\web@back{Takaisin}}
+ \PassOptionsToPackage{finnish}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{catalan}\IndexOpt{catalan} option
+% \begin{macrocode}
+\DeclareOptionX{catalan}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day\ de \ifcase\month\or Gener
+ \or Febrer \or Mar\c{c} \or Abril
+ \or Maig \or Juny \or Juliol \or Agost
+ \or Setembre \or Octubre \or Novembre
+ \or Desembre \fi de \the\year}
+ \renewcommand\web@versionlabel{Versi\noexpand\'{o}}
+ \renewcommand\web@toc{Taula de Contingut}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inici \hyperlink{\web@Start.1}{Article}}
+ \renewcommand\web@directory{Directori}
+ \renewcommand\web@revision{Actualizat el:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Secci\'o}
+ \renewcommand\web@back{Tornar}
+ \renewcommand\web@doc{Doc}}
+ \PassOptionsToPackage{catalan}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{czech}\IndexOpt{czech} option
+% \begin{macrocode}
+\DeclareOptionX{czech}{%
+ \AtEndOfPackage{%
+ \def\today{\number\day. \ifcase\month\or ledna\or \'unora\or
+ b\v{r}ezna\or dubna\or kv\v{e}tna\or \v{c}ervna\or \v{c}ervence\or
+ srpna\or z\'a\v{r}\'\i\or \v{r}\'{\i}jna\or listopadu\or prosince\fi
+ \space\number\year}
+ \def\web@versionlabel{Verze}
+ \def\web@toc{Obsah}
+ \def\web@continued{pokr.}
+ \def\web@article{Za\v{c}\'{a}tek \hyperlink{\web@Start.1}{textu}}
+ \def\web@directory{Rozcestn\'{\i}k}
+ \def\web@revision{Posledn\'{\i} zm\v{e}na}
+ \def\web@copyright{Copyright}
+ \def\web@section{Kapitola}
+ \def\web@back{Zp\v{e}t}
+ \def\web@doc{Dok}}
+ \PassOptionsToPackage{czech}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{brazil}\IndexOpt{brazil} option
+% \begin{macrocode}
+\DeclareOptionX{brazil}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day\ de \ifcase\month\or janeiro
+ \or fevereiro \or mar\c{c}o \or abril
+ \or maio \or junho \or julho \or agosto
+ \or setembro \or outubro \or novembro
+ \or dezembro \fi de \the\year}
+ \renewcommand\web@versionlabel{Vers\~{a}o}
+ \renewcommand\web@toc{Tabela de Conte\'{u}do}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inicie o
+ \hyperlink{\web@Start.1}{Artigo}}
+ \renewcommand\web@directory{Diret\'{o}rio}
+ \renewcommand\web@revision{Atualizado em:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Se\c{c}\noexpand\~{a}o}
+ \renewcommand\web@back{Voltar}
+ \renewcommand\web@doc{Doc}}
+ \PassOptionsToPackage{brazil}{exerquiz}
+}
+% \end{macrocode}
+% The \texttt{turkish}\IndexOpt{turkish} option
+% \begin{macrocode}
+\DeclareOptionX{turkish}{%
+ \ExecuteOptionsX{unicode}%
+ \AtEndOfPackage{%
+%======> Modification : Mahmut Ko\c{c}ak
+ \def\today{\the\day\ \ifcase\month\or Ocak
+ \or \c{S}ubat \or Mart \or Nisan
+ \or May{\i}s \or Haziran \or Temmuz \or A\u{g}ustos
+ \or Eyl\"ul \or Ekim \or Kas{\i}m
+ \or Aral{\i}k \fi \the\year}
+%======> Modification : MK
+ \def\web@toc{{\.I}\c{c}indekiler}
+ \def\web@continued{suite}
+ \def\web@article{\hyperlink{\web@Start.1}{D\"ok\"umanta} ba{\c s}la}
+ \def\web@directory{Dosya}
+ \def\web@revision{Son versiyon tarihi :}
+ \def\web@copyright{Copyright}
+ \def\web@versionlabel{Versiyon}
+ \def\web@section{K{\i}s{\i}m}
+ \def\web@back{Geri}
+ \def\web@doc{D\"ok}}
+ \PassOptionsToPackage{turkish}{exerquiz}
+}
+% \end{macrocode}
+% Unknown options are passed to the color package
+% \begin{macrocode}
+\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}
+ {\eq@ColorPackage}}
+% \end{macrocode}
+% We use \textsf{xcolor} if available.
+% \begin{macrocode}
+\@ifpackageloaded{xcolor}%
+{%
+ \@ifpackagelater{xcolor}{2004/07/04}{}
+ {%
+ \PackageError{web}{%
+ *************************************************\MessageBreak
+ * Your Version of `xcolor.sty' is too old!\MessageBreak
+ * You need the version from 2004/07/04 or newer\MessageBreak
+ * or use: \string\usepackage[noxcolor]{web}\MessageBreak
+ * or \string\documentclass[noxcolor]{article}\MessageBreak
+ *************************************************}{}%
+ }%
+}{}
+% \end{macrocode}
+% \section{Main Code}
+% \subsection{Switches}
+% Switch to turn the navibar on and off
+% \begin{macrocode}
+\newif\ifweb@navibar\web@navibarfalse
+% \end{macrocode}
+% \begin{macro}{\NaviBarOn}
+% \begin{macro}{\NaviBarOff}
+% User access to turning on and off the navigation bar.
+% \begin{macrocode}
+\def\NaviBarOn{\global\web@navibartrue}
+\def\NaviBarOff{\global\web@navibarfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ifeqforpaper}
+% Switch to turn on and off the for paper option.
+% \begin{macrocode}
+\newif\ifeqforpaper \eqforpaperfalse % for those who insist on paper
+\newif\ifweb@papersize@set \web@papersize@setfalse
+\newif\ifweb@margins@set \web@margins@setfalse
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\forceSubSubNumbers}
+% Force the use of subsubsection numbers, the default for the web style is to use
+% a bullet. This is only obeyed when the \texttt{pro} option is in effect.
+% \begin{macrocode}
+\newif\if@defaultsubsubding \@defaultsubsubdingtrue
+\def\forceSubSubNumbers{%
+ \ifx\web@latextoc\web@YES\else
+ \PackageWarning{webpro}{\string\forSubSubNumbers\space
+ requested,\MessageBreak I'm adding the option of latextoc}\fi
+ \let\web@latextoc\web@YES\@defaultsubsubdingfalse
+}
+% \end{macrocode}
+% \end{macro}
+% A hack so that the redefinition of \cs{chapter} will work for
+% \texttt{report} class as well as \texttt{book} class.
+% \begin{macrocode}
+\@ifclassloaded{report}{\newif\if@mainmatter\@mainmattertrue}{}
+% \end{macrocode}
+% \begin{macro}{\NewPage}
+% A convenient definition for people using the forpaper option
+% \begin{macrocode}
+\newcommand\NewPage{\ifeqforpaper\else\newpage\fi}
+% \end{macrocode}
+% \end{macro}
+% (03/14/09) Changed \cs{web@directory@option} from a default value of \texttt{y}
+% to a default value of \texttt{n}. Added a new option \texttt{usedirectory}
+% to get the directory to appear.
+% \begin{macrocode}
+\let\web@directory@option\web@NO
+\let\web@latextoc\web@NO
+\let\web@layout\web@YES
+\let\web@bullets\web@YES
+\def\web@finalDot{.}
+\def\noFinalDot{\let\web@finalDot\@empty}
+\@onlypreamble\noFinalDot
+% \end{macrocode}
+% \subsection{Load Configuration File: web.cfg}
+% Look for configuration file, \texttt{web.cfg}, for example
+%\begin{verbatim}
+% \ExecuteOptionsX{dvips}
+%\end{verbatim}
+% sets \texttt{dvips} as the default driver.
+% \begin{macro}{\minPanelWidth}
+% This definition is moved here so a user can set the minimal
+% default width of the panel in the .cfg file.
+% \begin{macrocode}
+\def\minPanelWidth#1{\def\web@minpanelwidth{#1}}
+\minPanelWidth{1in}
+% \end{macrocode}
+% \end{macro}
+% If we are running \textsf{pdflatex} or \textsf{xelatex}, execute either the \texttt{pdftex}
+% or \texttt{xetex} option, else input \texttt{web.cfg} and process options.
+%\changes{v4.2k}{2012/06/18}{Check for \string\texttt{pdftex}}
+%\changes{v6.0h}{2016/04/16}{An attempt to butter guess the driver if
+%there is no \string\texttt{web.cfg} file.}%
+% \begin{macrocode}
+\ifpdf\ExecuteOptionsX{pdftex}\else
+ \ifxetex\ExecuteOptionsX{xetex}\else
+% \end{macrocode}
+% For backward compatibility, we \cs{let} \cs{ExecuteOptions} to
+% \cs{ExecutedOptionsX}, saving and restoring as we go.
+% \changes{v6.0l}{2016/08/17}{For backward compatibility, we \string\cs{let} \string\cs{ExecuteOptions} to
+% \string\cs{ExecutedOptionsX}}
+% \begin{macrocode}
+ \let\ExecuteOptions@SAVE\ExecuteOptions
+ \let\ExecuteOptions\ExecuteOptionsX
+ \InputIfFileExists{web.cfg}{}
+ {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
+ {\ExecuteOptionsX{dvipsone}}}%
+ \let\ExecuteOptions\ExecuteOptions@SAVE
+ \fi\fi
+% \end{macrocode}
+% \subsection{Process Options}
+% \begin{macrocode}
+\ProcessOptionsX
+% \end{macrocode}
+% If the user specified a value for the \texttt{pdfencoding} key of \textsf{hyperref},
+% then ignore the \texttt{unicode} option.
+% \begin{macrocode}
+\ifx\web@Hypdfencoding\@empty\else
+ \let\aeb@useunicode\@gobble\fi
+% \end{macrocode}
+% We use a utility command, taken and renamed from the \texttt{comment} package.
+% \begin{macrocode}
+\def\w@csarg#1#2{\expandafter#1\csname#2\endcsname}
+% \end{macrocode}
+% Based on the selected driver, we set the page size.
+% \begin{macrocode}
+\@nameuse{papersize@for@\eq@driver@name}
+\ifx\web@layout\web@YES\else\templatedefaults\fi
+% \end{macrocode}
+% \begin{macrocode}
+\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}
+\pdfmarkupfalse\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
+% \end{macrocode}
+% If the \texttt{templatesforpaper} option is taken, we need to declare
+% \cs{@usetemplates=1}, changed in the previous line.
+% \begin{macrocode}
+\iftemplatesforpaper\def\@usetemplates{1}\fi
+% \end{macrocode}
+% \changes{v4.4}{2012/08/26}{Using \string\texttt{centertitlepagefull} implies
+%\string\texttt{centertitlepage}}
+% \begin{macrocode}
+\if@centertitlepagefull\@centertitlepagetrue\fi
+% \end{macrocode}
+% \subsection{Required Packages}
+% \begin{macrocode}
+\RequirePackage{\eq@ColorPackage}
+\RequirePackage{calc}
+\RequirePackage{amssymb}% used for navibar
+% \end{macrocode}
+%\changes{v4.2g}{2011/01/15}
+%{%
+% Remove the \string\cs{PassOptionsToPackage} mechanism to pass the driver
+% option to \string\textsf{hyperref}. Instead, we pass the driver option directly
+% in the key-value pairs of \string\textsf{hyperref} as \string\cs{eq@driver@name}.
+%}
+%\changes{v6.0j}{2016/07/22}{Using \string\cs{edef}, do not pass driver in case of
+% pdftex, luatex, or xetex.}
+% We declare options to be passed to \pkg{hyperref}.
+% \begin{macrocode}
+\edef\web@RequireHyperref{\noexpand\RequirePackage[%
+% \end{macrocode}
+% (2016/07/22) We do not pass the driver to \pkg{hyperref} in the cases the driver
+% is \texttt{pdftex} or \texttt{xetex}.
+% \begin{macrocode}
+ \ifpdf\else\ifxetex\else\eq@driver@name,\fi\fi
+ bookmarks,bookmarksnumbered,bookmarksopen,%
+ colorlinks,\aeb@useunicode,linkcolor=webgreen,%
+ filecolor=webbrown,citecolor=webgreen,%
+ urlcolor=webbrown,pagebackref,pdfpagemode=UseNone,%
+ pdfstartview=Fit,pdfpagelayout=SinglePage%
+% \end{macrocode}
+% (2016/08/19) Moved the following code to the end of the option list so these options can override
+% earlier options in the list.
+% \changes{v6.0m}{2016/08/19}{Moved user and internal options for \string\pkg{hyperref} to end of option list so they
+% can override earlier options.}
+% \begin{macrocode}
+ \ifx\u@web@ddtoHyOpts\@empty\else,\u@web@ddtoHyOpts\fi
+ \ifx\i@web@ddtoHyOpts\@empty\else,\i@web@ddtoHyOpts\fi]{hyperref}%
+}
+% \end{macrocode}
+% If the option \texttt{xhyperref} is taken, \textsf{hyperref} is not input by this
+% package. The document \emph{\textbf{author must do it prior}} to the \textsf{web} package.
+% \changes{v6.0n}{2016/08/30}{Fixed a problem with \string\cs{web@RequireHyperref}
+% and its placement in \string\cs{w@isHyLoaded}.}
+% \begin{macrocode}
+\def\w@isHyLoaded{\@ifpackageloaded{hyperref}{}{\PackageError{web}
+ {The xhyperref option used, but hyperref is not\MessageBreak
+ already loaded. Will load hyperref with the options\MessageBreak
+ chosen by web}{Remove xhyperref or load hyperref prior to the web
+ package.}\web@RequireHyperref}%
+}
+% \end{macrocode}
+% Now if the \opt{xhyperref} option \emph{is not taken}, we load \pkg{hyperref}; otherwise, if \pkg{hyperref}
+% is not already loaded, we issue a warning and load \pkg{hyperref} with the standard \pkg{web}
+% options.
+% \begin{macrocode}
+\if@web@hyperref\expandafter\web@RequireHyperref\else
+ \expandafter\w@isHyLoaded\fi
+\ifx\u@web@ddtoHySetup\@empty\else\edef\x{\noexpand\hypersetup
+ {\u@web@ddtoHySetup}}\expandafter\x\fi
+% \end{macrocode}
+% We declare that `The AcroTeX eDucation Bundle' is the pdf creator.
+% \begin{macrocode}
+\def\@pdfcreator{The AcroTeX eDucation Bundle}
+% \end{macrocode}
+% The \pkg{comment} package is required to this package's success.
+% \begin{macrocode}
+\RequirePackage{comment}
+% \end{macrocode}
+% If the user specifies the use of templates, we assume they are going
+% to do some graphical work, so we include \textsf{graphicx}.
+% \begin{macrocode}
+\ifnum\@usetemplates=1\relax
+ \def\x{\RequirePackage{graphicx}}\expandafter\x\fi
+% \end{macrocode}
+% If the user specifies an option requiring templates, then we better
+% load \textsf{eso-pic}, which itself requires \textsf{everyshi} or \textsf{atbegshi}.
+% \begin{macrocode}
+\ifnum\@usetemplates=1\relax
+ \RequirePackage{eso-pic}
+% \end{macrocode}
+% Here is a fix for \textsf{dvipdfm}. If using templates, then we need to
+% redefine the way we set the page size using \textsf{eso-pic}. We also need
+% to redefine the \textsf{eso-pic} macro \cs{@ShipoutPicture} so the order of
+% execution of \cs{ESO@HookI} \cs{ESO@HookII} are reversed. The paper
+% size special will be in the \cs{ESO@HookII} macro, it needs to
+% execute (once) before \cs{ESO@HookI} is executed.
+% \begin{macrocode}
+ \ifnum\eq@drivernum=2\relax
+ \def\web@set@paper{\AddToShipoutPicture*{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}%
+% \end{macrocode}
+% We use some code from \textsf{hyperref} to set the page size.
+% \begin{macrocode}
+ \AtBeginShipoutFirst{%
+ \begingroup
+ \@ifundefined{stockwidth}{%
+ \ifx\special@paper\@empty
+ \special{papersize=\the\paperwidth,\the\paperheight}%
+ \else
+ \special{papersize=\special@paper}%
+ \fi
+ }{%
+ \ifdim\stockwidth=\z@
+ \else
+ \special{papersize=\the\stockwidth,\the\stockheight}%
+ \fi
+ }%
+ \endgroup
+ }%
+% \end{macrocode}
+% \changes{v4.2d}{2009/11/22}{Modifications to use
+% new \string\textsf{eso-pic}}
+% \begin{macrocode}
+ \@ifundefined{@ShipoutPicture}{}{%
+% \end{macrocode}
+% The new version of \textsf{eso-pic} does not define \cs{@ShipoutPicture}.
+% If \cs{@Ship\-out\-Pic\-ture} defined, so we use some of the old code.
+% \begin{macrocode}
+ \renewcommand{\@ShipoutPicture}{%
+ \bgroup
+ \@tempswafalse%
+ \ifx\ESO@HookI\@empty\else\@tempswatrue\fi%
+ \ifx\ESO@HookII\@empty\else\@tempswatrue\fi%
+ \if@tempswa%
+ \@tempdima=1in\@tempdimb=-\@tempdima%
+ \advance\@tempdimb\paperheight
+ \@ifundefined{stockwidth}{}{%
+ \advance\@tempdima+\trimedge%
+ \advance\@tempdima+\paperwidth%
+ \advance\@tempdima-\stockwidth%
+ \if@twoside\ifodd\c@page\else%
+ \advance\@tempdima-2\trimedge%
+ \advance\@tempdima-\paperwidth%
+ \advance\@tempdima+\stockwidth%
+ \fi\fi%
+ \advance\@tempdimb+\trimtop}%
+ \unitlength=1pt%
+ \global\setbox\@cclv\vbox{%
+ \vbox{\let\protect\relax
+ \pictur@(0,0)%
+ (\strip@pt\@tempdima,\strip@pt\@tempdimb)%
+ \ESO@HookII\ESO@HookI\global\let\ESO@HookII\@empty%
+ \endpicture}%
+ \box\@cclv%
+ }%
+ \fi
+ \egroup
+ }%
+ }%
+ \fi
+\fi
+% \end{macrocode}
+% A useful command for separating two arguments. Use in \texttt{webpro} section, and by \texttt{aeb\_pro} as well.
+% \begin{macrocode}
+\def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
+\let\getargsii\getargs
+% \end{macrocode}
+%
+% \subsection{Compute Page Layout}
+%
+% We require two new lengths for the template support. Set the default
+% to be \cs{paperwidth}.
+% \begin{macrocode}
+\newlength{\textscreenwidth}
+\setlength{\textscreenwidth}{\paperwidth}
+% \end{macrocode}
+% \cs{textscreenwidth} is the width of the text screen.
+% \cs{textscreenwidth} is calculated by the \cs{InitLayout}, defined above.
+% \begin{macrocode}
+\newlength{\@panelwidth}
+\def\panelscreenwidth{\@panelwidth}
+% \end{macrocode}
+% This is the width of the (navigation) panel. The navigation can be set three ways: (1)
+% as an optional parameter in the \cs{margins} command; (2) by the \cs{panelwidth} command;
+% or as the default value of $1$\,in, if no panel width is specified by (1) or (2).
+%
+% This code by Radhakrishnan C V, modifications by D. P. Story. The two macros
+% \cs{marginsize} and \cs{margins} have the same names as the ones in \textsf{pdfscreen};
+% this might give some consistency of design between the two packages.
+% \begin{macrocode}
+\newdimen\@Leftmargin \@Leftmargin=0pt
+\newdimen\@Rightmargin \@Rightmargin=0pt
+\newdimen\@Bottommargin \@Bottommargin=0pt
+% \end{macrocode}
+% In \texttt{web.sty}, \cs{@Topmargin} is the distance from the
+% top of the paper to the top of the text region
+% \begin{macrocode}
+\newdimen\@Topmargin \@Topmargin=0pt
+% \end{macrocode}
+% In web.sty, \cs{web@Topmargin} is the distance from
+% the top of the page to the top of the running header
+% \begin{macrocode}
+\newdimen\web@Topmargin \web@Topmargin=8pt
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand{\websetheadheight}{8pt}
+\newcommand{\web@footskip}{4pt}
+\def\web@additionalheadsep{0pt}
+% \end{macrocode}
+% Empty page style, will define our own.
+% \begin{macrocode}
+\pagestyle{empty}
+% \end{macrocode}
+% Modified version of the \cs{InitLayout} macro from pdfscreen.
+% \begin{macrocode}
+\def\InitLayout
+{%
+ \ifeqforpaper\else
+ \setlength\headheight{\websetheadheight}
+ \hoffset=0pt \voffset=0pt
+ \fi
+ \ifeqforpaper\else
+ {\@tempdima=\paperwidth
+ \addtolength{\@tempdima}{-\@Leftmargin}%
+ \addtolength{\@tempdima}{-\@Rightmargin}%
+ \xdef\fullscreenwidth{\the\@tempdima}}%
+ \fi
+ \ifx\web@layout\web@YES\else\templatedefaults\fi
+ \ifeqforpaper\else
+ \setlength{\textwidth}{\paperwidth}
+ \setlength{\textheight}{\paperheight}
+ \addtolength{\textheight}{-\@Topmargin}
+ \addtolength{\textheight}{-\@Bottommargin}
+% \end{macrocode}
+%\begin{verbatim}
+%\topmargin = \web@Topmargin - 1in
+%\@Topmargin = \web@Topmargin + \headheight + \headsep
+% so \headsep = \@Topmargin - \headheight - \web@Topmargin (\topmargin)
+%\end{verbatim}
+% \begin{macrocode}
+ \setlength{\headsep}{\@Topmargin}
+ \addtolength\headsep{-\headheight}
+ \setlength{\topmargin}{\web@Topmargin}
+ \addtolength\headsep{-\topmargin}
+ \addtolength\headsep{\web@additionalheadsep}
+ \addtolength{\topmargin}{-1in}
+ \setlength\footskip{\@Bottommargin}
+ \addtolength{\footskip}{-\web@footskip} % depth of navibar
+ \ifcase\@panelconfig
+ \setlength{\oddsidemargin}{\@Leftmargin}
+ \setlength{\evensidemargin}{\@Leftmargin}
+ \or
+ \setlength{\oddsidemargin}{\@panelwidth}
+ \setlength{\evensidemargin}{\@panelwidth}
+ \or
+ \setlength{\oddsidemargin}{\@Leftmargin}
+ \setlength{\evensidemargin}{\@Leftmargin}
+ \fi
+ \addtolength{\evensidemargin}{-1in}
+ \addtolength{\oddsidemargin}{-1in}
+ \fi
+ \ifx\web@layout\web@YES
+ \ifcase\@panelconfig
+ \addtolength{\textwidth}{-\@Leftmargin}
+ \addtolength{\textwidth}{-\@Rightmargin}
+ \or % leftpanel
+ \addtolength{\textwidth}{-\@panelwidth}
+ \addtolength{\textwidth}{-\@Rightmargin}
+ \or % rightpanel
+ \addtolength{\textwidth}{-\@panelwidth}
+ \addtolength{\textwidth}{-\@Leftmargin}
+ \fi
+ \ifnum\@usetemplates=1\relax
+ \setlength{\textscreenwidth}{\paperwidth}
+ \def\@textX{0}
+ \ifnum\@panelconfig=1 % leftpanel
+ \addtolength{\textwidth}{-\@panelsep}
+ \addtolength{\oddsidemargin}{\@panelsep}
+ \addtolength{\evensidemargin}{\@panelsep}
+ \addtolength{\textscreenwidth}{-\@panelwidth}
+ \def\@textX{\strip@pt\@panelwidth}
+ \def\@panelX{0}
+ \fi
+ \ifnum\@panelconfig=2 % rightpanel
+ \addtolength{\textwidth}{-\@panelsep}
+ \addtolength{\textscreenwidth}{-\@panelwidth}
+ \def\@textX{0}
+ \def\@panelX{\strip@pt\textscreenwidth}
+ \fi
+ \calculatefullwidth
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \subsection{Distiller related commands}
+% When distilling with large paper sizes, for example \texttt{designvii}, the standard distiller
+% page is too small to cover the large page. One option is to use a custom joboptions such as
+% \texttt{Oversized Pages\_20x20.joboptions}. However, the page size the distiller uses can be set
+% through the {\LaTeX} source file. For this purpose, we introduce the command
+% \DescribeMacro\setPageDevice\cmd\setPageDevice. The optional first argument is the resolution
+% in dots per inch. The standard joboptions file has 600 as this value; the high quality and
+% press quality have this parameter at 2400. The second and third parameters are the
+% width and height, respectively, of the \textbf{/PageSize}. For greatest accuracy, the values of
+% width and height should be entered in printers points (without dimensions). For example,
+%\begin{verbatim}
+%\setPageDevice{1400}{1400}
+%\end{verbatim}
+% is preferred to
+%\begin{verbatim}
+%\setPageDevice{20in}{20in}
+%\end{verbatim}
+% \texttt{20in} gets converted to \texttt{1439.9965}. The conversion, if necessary, is done
+% by \cs{@convLtoP}
+%
+% The command \cs{@convLtoP} is taken from the \textsf{graphics} package and is based on
+% \cs{Gin@defaultbp}.
+%
+% The commands seems only effect with the \textsf{dvipsone} driver.
+% \begin{macrocode}
+\def\@convLtoP#1#2{%
+ \afterassignment\@convLtoP@i\dimen@#2bp\relax{#1}{#2}}
+\def\@convLtoP@i#1\relax#2#3{%
+ \if!#1!%
+ \def#2{#3}%
+ \else
+ \dimen@.99626\dimen@
+ \edef#2{\strip@pt\dimen@}%
+ \fi}
+\providecommand\setPageDevice[3][600]{\bgroup
+ \@convLtoP{\width}{#2}\@convLtoP{\height}{#3}
+ \ifpdfmarkup\headerps@out{<< /HWResolution [#1 #1] %
+ /PageSize [\width\space\height] >> setpagedevice}\else
+ \PackageWarning{web}{This is a distiller only command,\MessageBreak
+ ignoring \string\setPageDevice}\fi\egroup}
+% \end{macrocode}
+%\DescribeMacro\allowTransparency sets the \textbf{AllowTransparency} key of
+% the distiller to \textbf{true}. We do this with \texttt{setdistillerparams}.
+% \begin{macrocode}
+\providecommand\allowTransparency{\bgroup
+ \ifpdfmarkup\headerps@out{<< %
+ /AllowTransparency true >> setdistillerparams}\else
+ \PackageWarning{web}{This is a distiller only command,\MessageBreak
+ ignoring \string\allowTransparency}\fi\egroup}
+\@onlypreamble\setPageDevice
+\@onlypreamble\allowTransparency
+% \end{macrocode}
+% \subsection{Preamble Content}
+% \subsubsection{\texorpdfstring{\protect\cs{screensize}}{\CMD{screensize}}}
+% \begin{macro}{\screensize}
+% Size of screen. The first parameter is the desired \cs{paperheight} and the second
+% is the desired \cs{paperwidth}. If the forpaper option has been called, then the \cs{paperwidth}
+% and \cs{paperheight} will be the default values set by the class, but take \cs{textwidth} to be
+% the value of \#2. The second and third parameters are the width and height, respectively, as measured
+% in printer points ($72\,\mbox{points} = 1\,\mbox{inch}$, or measures in the \texttt{bp} points of \TeX.)
+%\begin{verbatim}
+%Parameters:
+% #1 = \paperheight (height of the display screen to be created)
+% #2 = \paperwidth (width of the display screen to be created)
+%\end{verbatim}
+% \begin{macrocode}
+\def\screensize#1#2{%
+ \def\webSaveSSDim{{#1}{#2}}%
+ \begingroup
+ \ifeqforpaper
+ \ifx\web@layout\web@YES
+ \setlength{\@tempdima}{#2}%
+ \global\textwidth\@tempdima
+ \addtolength{\@tempdima}{-\@Leftmargin}%
+ \addtolength{\@tempdima}{-\@Rightmargin}%
+ \xdef\fullscreenwidth{\the\@tempdima}%
+ \else
+ \xdef\fullscreenwidth{\the\textwidth}%
+ \fi
+ \else
+ \setlength{\@tempdima}{#1}%
+ \global\paperheight\@tempdima
+ \setlength{\@tempdima}{#2}%
+ \global\paperwidth\@tempdima
+ \fi
+ \endgroup
+ \web@papersize@settrue
+ \web@set@paper % dps modified
+ \let\screensize\@gobbletwo
+ \InitLayout
+}
+% \end{macrocode}
+% Save a secret copy of screensize for use by APB
+% \begin{macrocode}
+\let\screensize@web@save\screensize
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\setScreensizeFromGraphic}
+% If a design is not specified in the option list of web, you can use a graphic
+% to set the screen size. The two parameters of this command correspond to
+% the parameters of \cs{includegraphics}, and they are just passed to that
+% command. This is useful if you have a graphic to be used for a template but
+% cannot be deformed to fit one of the standard designs. The solution is to
+% create a screen size matching the graphic, then using that graphic as a template.
+% Example usage,
+%\begin{verbatim}
+% \margins{1in}{1in}{24pt}{.25in}
+% \setScreensizeFromGraphic{acro_30}
+% \template{acro_30}
+%\end{verbatim}
+% This command takes two arguments, the first is optional and is passed
+% to the \cs{includegraphics} command, the second it the path to the file.
+%
+% It may become necessary with some graphics to use the
+% \texttt{hiresbb} option for \cs{includegraphics}, both in
+% \cs{setScreensizeFromGraphic} and \cs{template} like so,
+%\begin{verbatim}
+% \margins{1in}{1in}{24pt}{.25in}
+% \setScreensizeFromGraphic[hiresbb]{acro_30}
+% \template[hiresbb]{acro_30}
+%\end{verbatim}
+% \changes{v4.0f}{2007/06/11}
+% {
+% This command measures the dimensions of an EPS file, and sets the
+% screen dimensions to these dimensions.
+% }
+% \begin{macrocode}
+\newcommand{\setScreensizeFromGraphic}[2][]{%
+ \getDimsFromGraphic[#1]{#2}%
+ {\web@graphicScreenWidth}{\web@graphicScreenHeight}%
+ \screensize{\web@graphicScreenHeight}{\web@graphicScreenWidth}%
+}
+\@onlypreamble\setScreensizeFromGraphic
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\getDimsFromGraphic}
+% This command uses the graphicx package. It loads a graphic
+% into a box and measures its dimensions.
+% \changes{v4.1a}{2008/07/06}
+% {
+% Added the command \string\cs{getDimsFromGraphic} as a helper command for
+% \string\cs{setScreensizeFromGraphic}, but also useful as
+% stand alone as well.
+% }
+%
+%\medskip\noindent The parameters are:
+%\begin{enumerate}
+% \item[]\texttt{[\#1]}: Optional argument that is passed to \cs{graphicx} package
+% \item[]\texttt{\#2}: The path to the graph to be read
+% \item[]\texttt{\#3}: A control sequence to be used to hold the width
+% \item[]\texttt{\#4}: A control sequence to be used to hold the height
+%\end{enumerate}
+% \begin{macrocode}
+\newcommand{\getDimsFromGraphic}[4][]{{%
+ \setbox0=\hbox{\includegraphics[draft,#1]{#2}}%
+ \dimen@=\dp0 \advance\dimen@\ht0
+ \xdef#3{\the\wd0 }\xdef#4{\the\dimen@}%
+}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\addtoWebHeight}
+% \begin{macro}{\addtoWebWidth}
+% Convenience macros to adjusting the height or width of the page
+% relative to dimensions already declared by a design option or
+% the \cs{screensize} command.
+%\changes{v4.2i}{2012/05/08}{Added \string\cs{addtoWebHeight} and
+% \string\cs{addtoWebWidth} to adjust height and width relative to
+% already declared dimensions.}
+% \begin{macrocode}
+\def\web@getSSDims#1#2{\edef\web@@height{#1}\edef\web@@width{#2}}
+\def\addToWebHWError{\PackageError{web}{%
+ You must declare screen size first by using\MessageBreak
+ the \string\screensize\space command, or by declaring \MessageBreak
+ a design in the web option list}%
+ {Do as is suggested in error message!}}
+\newcommand{\addtoWebHeight}[1]{%
+% \end{macrocode}
+% If the \cmd{\screensize} has already been set, it has been
+% \cmd{\let} to \cmd{\@gobbletwo}. We use this to detect the error
+% of not already declaring page dimensions.
+% \begin{macrocode}
+ \ifx\screensize\@gobbletwo
+ \expandafter\web@getSSDims\webSaveSSDim
+% \end{macrocode}
+% Even though \cmd{\screensize} has already been expanded and is now
+% \cs{let} to \cs{@gobbletwo}, we can use our saved version of
+% \cs{screensize} that no one knows about.
+% \begin{macrocode}
+ \screensize@web@save{\web@@height+#1}{\web@@width}%
+ \else\addToWebHWError\fi
+}
+% \end{macrocode}
+% \cs{addtoWebWidth} works the same way as \cmd{\addtoWebHeight}.
+% \begin{macrocode}
+\newcommand{\addtoWebWidth}[1]{%
+ \ifx\screensize\@gobbletwo
+ \expandafter\web@getSSDims\webSaveSSDim
+ \screensize@web@save{\web@@height}{\web@@width+#1}%
+ \else\addToWebHWError\fi
+}
+% \end{macrocode}
+% Expand in preamble only.
+% \begin{macrocode}
+\@onlypreamble\addtoWebHeight
+\@onlypreamble\addtoWebWidth
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \subsubsection{\texorpdfstring{\protect\cs{margins}}{\CMD{margins}}}
+% \begin{macro}{\margins}
+% Sets the left, right, top and bottom margins.
+%\begin{verbatim}
+%Parameters:
+% [#1] = width of panel to be used if a panel option
+% is specified (default is 1in)
+% #2 = left margin
+% #3 = right margin
+% #4 = top margin
+% #5 = bottom margin
+%\end{verbatim}
+% \begin{macrocode}
+\newcommand{\@margins}[5][\web@minpanelwidth]
+{%
+ \def\webSaveMargDim{[#1]{#2}{#3}{#4}{#5}}%
+ \setlength{\@panelwidth}{#1}%
+ \ifdim\@panelwidth<\web@minpanelwidth
+ \setlength{\@panelwidth}{\web@minpanelwidth}\fi
+ \setlength{\@Leftmargin}{#2}%
+ \setlength{\@Rightmargin}{#3}%
+ \setlength{\@Topmargin}{#4}%
+ \setlength{\@Bottommargin}{#5}%
+ \web@margins@settrue
+ \InitLayout
+}
+\let\margins\@margins
+\let\margins@web@save\margins
+\newcommand{\@@margins}[5][]{}
+% \end{macrocode}
+% \cs{marginsize} was the original name for \cs{margins}, its usage is deprecated.
+% \begin{macrocode}
+\let\marginsize\margins
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro{\resetmargins} a companion command to
+% |\addtoWebWidth| and |\addtoWebHeight|, this command readjusts
+% the margins. Within the arguments \cs{incby}
+% refer to the current dimension.
+%\begin{verbatim}
+%\resetsmargins{\incby+.25in}{\incby+.25in}{}{}
+%\end{verbatim}
+% This line adds .25in to each of the side margins.
+% \begin{macrocode}
+\newcommand\get@MargDim[5][]{%
+ \def\currPanelWidth{#1}%
+ \def\currLeftMarg{#2}\def\currRightMarg{#3}%
+ \def\currTopMarg{#4}\def\currBottomMarg{#5}}
+\newcommand{\resetmargins}[5][\web@minpanelwidth]{%
+ \expandafter\get@MargDim\webSaveMargDim
+ \begingroup
+ \let\incby\currPanelWidth
+ \def\web@arg{#1}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currPanelWidth}\else
+ \setlength{\@tempdima}{#1}\fi
+ \xdef\newPanelWidth{\the\@tempdima}%
+ \let\incby\currLeftMarg
+ \def\web@arg{#2}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currLeftMarg}\else
+ \setlength{\@tempdima}{#2}\fi
+ \xdef\newLeftMarg{\the\@tempdima}%
+ \let\incby\currRightMarg
+ \def\web@arg{#3}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currRightMarg}\else
+ \setlength{\@tempdima}{#3}\fi
+ \xdef\newRightMarg{\the\@tempdima}%
+ \let\incby\currTopMarg
+ \def\web@arg{#4}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currTopMarg}\else
+ \setlength{\@tempdima}{#4}\fi
+ \xdef\newTopMarg{\the\@tempdima}%
+ \let\incby\currBottomMarg
+ \def\web@arg{#4}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currBottomMarg}\else
+ \setlength{\@tempdima}{#5}\fi
+ \xdef\newBottomMarg{\the\@tempdima}%
+ \endgroup
+ \margins@web@save[\newPanelWidth]{\newLeftMarg}{\newRightMarg}
+ {\newTopMarg}{\newBottomMarg}
+}
+\@onlypreamble\resetscreensize
+% \end{macrocode}
+% \subsubsection{Title, Author, Etc. Definitions}
+% We define some text macros that can be used to design the first page layout. These are
+% used in the \cs{maketitle} command. Some of them are transmitted to the PDF document, ending up
+% in the doc info section.
+% \begin{macro}{\title}
+% There is an optional first argument, that is used for a `short title'. Used in
+% \cs{maketitle} and ends up in the doc info section of the PDF file.
+% \begin{macrocode}
+\let\web@save@title\title
+%\def\title{\@ifnextchar[{\@title}{\@title[]}}
+\def\title{\@ifnextchar[{\@web@title}{\@web@title[]}}
+% \end{macrocode}
+% \begin{macro}{\webtitle}
+% \begin{macro}{\shortwebtitle}
+% These two text macros are defined. \cs{shortwebtitle} is the same as \cs{webtitle}, when
+% the optional parameter in \cs{title} is not specified.
+% \begin{macrocode}
+%\def\@title[#1]#2{\gdef\webtitle{#2}\hypersetup{pdftitle={#2}}%
+\def\@web@title[#1]#2{\gdef\webtitle{#2}\hypersetup{pdftitle={#2}}%
+ \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebtitle{#2}\else
+ \gdef\shortwebtitle{#1}\fi\web@save@title{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\author}
+% Takes one argument, the author name. Used in \cs{maketitle} and ends up in the
+% doc info of the PDF file.
+% \begin{macrocode}
+\let\web@saved@author\author
+%\def\author#1{\gdef\webauthor{#1}\hypersetup{pdfauthor={#1}}}
+\def\author#1{\gdef\webauthor{#1}\hypersetup{pdfauthor={#1}}%
+ \web@saved@author{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\subject}
+% Takes one argument, the subject. Used in \cs{maketitle} and ends up in the
+% doc info of the PDF file.
+% \begin{macrocode}
+\def\subject{\@ifnextchar[{\@subject}{\@subject[]}}
+\def\@subject[#1]#2{%
+ \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebsubject{#2}\else
+ \gdef\shortwebsubject{#1}\fi\gdef\websubject{#2}%
+ \hypersetup{pdfsubject={#2}}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\email}
+% E-mail address
+% \begin{macrocode}
+\def\email#1{\gdef\webemail{#1}}
+\def\thewebemail{\href{mailto:\webemail}{\webemail}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\keywords}
+% Keywords are passed on to the PDF file through hyperref.
+% \begin{macrocode}
+\def\keywords#1{\gdef\webkeywords{#1}\hypersetup{pdfkeywords={#1}}}
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro{\pdfLang} Primary language for this PDF document
+% \begin{macrocode}
+\def\pdfLang#1{\def\web@pdfLang{#1}\hypersetup{pdflang={#1}}}
+\let\web@pdfLang\@empty
+% \end{macrocode}
+% \begin{macro}{\university}
+% University name of author
+% \begin{macrocode}
+\def\university#1{\gdef\webuniversity{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\version}
+% A version or revision number.
+% \begin{macrocode}
+\def\version#1{\gdef\web@version@value{#1}%
+ \edef\webversion{\ifx\web@version@value\@empty\else
+ \noexpand\web@versionlabel\noexpand\
+ \noexpand\web@version@value\fi}%
+}
+\let\web@version@value\@empty
+\def\versionLabel#1{\def\web@versionlabel{#1}}
+\versionLabel{Version}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\copyrightyears}
+% Copyright notice
+% \begin{macrocode}
+\def\copyrightyears#1{\gdef\webcopyrightyears{#1}}
+% \end{macrocode}
+% \end{macro}
+% \paragraph*{Language dependent definitions.} Definitions and defaults.\par\medskip\noindent
+% \textbf{Table of Contents related strings.} \DescribeMacro{\tocName}\cs{tocName} is the name of the table of contents. \DescribeMacro{\tocNameCont}
+% \cs{tocNameCont} is a continuation annotation for the table of contents.
+% \begin{macrocode}
+\newcommand{\tocName}[1]{\def\web@toc{#1}}
+\tocName{Table of Contents}
+\newcommand{\tocNameCont}[1]{\def\web@continued{#1}}
+\tocNameCont{cont.}
+% \end{macrocode}
+% \textbf{Directory related strings.} \DescribeMacro{\dirContentLink}
+% \cs{dirContentLink} is the line in the directory that gives the link to
+% that start of the article. \DescribeMacro{\directoryName}\cs{directoryName}
+% is the text string used to label the directory.
+% \begin{macrocode}
+\newcommand{\dirContentLink}[1]{\def\web@article{#1}}
+\dirContentLink{Begin \hyperlink{\web@Start.1}{Article}}
+\newcommand{\directoryName}[1]{\def\web@directory{#1}}
+\directoryName{Directory}
+% \end{macrocode}
+%\textbf{Page trailer strings.}
+% \DescribeMacro{\revisionLabel} \cs{revisionLabel} is the revision label,
+% \DescribeMacro{\norevisionLabel} \cs{norevisionLabel} cancels out the label and the
+% hard space that follows.
+% \begin{macrocode}
+\newcommand{\revisionLabel}[1]{\def\web@revision{#1}}
+\revisionLabel{Last Revision Date:}
+\def\norevisionLabel{\let\web@revision\@gobble}
+% \end{macrocode}
+% Copyright labels of various types. \DescribeMacro{\copyrightLabel}
+% \DescribeMacro{\nocopyright}\DescribeMacro{\nocopyrightNotice}.
+% \cs{copyrightLabel} sets the text for the copyright, the default is
+% `Copyright'; the others cancel out the copyright part.
+% \begin{macrocode}
+\newcommand{\copyrightLabel}[1]{\def\web@copyright{#1}}
+\copyrightLabel{Copyright}
+\def\nocopyright{\let\web@copyright\@gobble}
+\def\nocopyrightNotice{\let\web@copyright\@gobblethree}
+% \end{macrocode}
+% \begin{macrocode}
+\def\web@section{Section}
+% \end{macrocode}
+% Labels used by the Navibar.
+% \begin{macrocode}
+\def\web@back{Back}
+\def\web@doc{Doc} % restricted to three characters
+% \end{macrocode}
+% We set the default definitions for these document information
+% commands.
+% \begin{macrocode}
+\title{}\author{}\email{}\subject{}\keywords{}\version{}
+\university{}\copyrightyears{\the\year}
+% \end{macrocode}
+% \begin{macro}{\prtscr}
+% This simple command can be use for specifying a setting for print (prt)
+% and a setting for screen (scr).
+% \begin{macrocode}
+\let\IF@AorBswitch\ifeqforpaper
+\def\prtscr{\@ifstar{\prtscrV}{\prtscrA}}
+\def\prtscrA#1#2{\ifeqforpaper#1\else#2\fi}
+% \end{macrocode}
+%\DescribeMacro{\prtscrV} is the version of \cs{prtscr} that allows
+% verbatim text in its arguments.
+%\changes{v4.4b}{2013/01/01}{Added \string\texttt{*} version of \string\cs{prtscr}. This version
+% can take verbatim text as an argument.}
+%\changes{v6.0n}{2016/11/03}{Generalized support commands for \string\cs{prtscr}.}
+% \begin{macrocode}
+\newtoks\webtoksi
+\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\prtscrV{\let\IF@AorBswitch\ifeqforpaper
+ \ifeqforpaper
+ \def\web@next{\afterassignment\TRUEACTIONi\SETTEMPBOXi}\else
+ \def\web@next{\afterassignment\FALSEACTIONii\SETTEMPBOXii}\fi
+ \web@next}
+% \end{macrocode}
+% \end{macro}
+%\subsubsection{\texorpdfstring{\protect\cs{optionalPageMatter}}{\CMD{optionalPageMatter}}}
+% \begin{macro}{\optionalPageMatter}
+% \begin{macro}{\optionalpagematter}
+% \begin{macro}{\aboveOPMvspace}
+% The \cs{optionalpagematter} can be used to put a small abstract on the title page,
+% or any thing for that matter. The default placement is given in the \cs{maketitle}
+% definition. It can be moved around by redefining \cs{maketitle}.
+%\changes{v4.4}{2012/08/26}{Added optional parameter to \string\cs{optionalPageMatter},
+% added a skip command}
+% \begin{macrocode}
+\newcommand{\web@aboveOptPgMatDef}{\minimumskip\vspace{\stretch{1}}}
+\newcommand{\aboveOPMvspace}{\web@aboveOptPgMatDef}
+\newcommand{\optionalPageMatter}[2][\web@aboveOptPgMatDef]{%
+ \def\aboveOPMvspace{#1}\def\optionalpagematter{#2}%
+}
+\def\optionalpagematter{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% Check whether user is using \texttt{book} or \texttt{article} class. We need
+% to adjust the hyperlink target appropriately.
+% \begin{macrocode}
+\@ifundefined{thechapter}
+ {\def\web@Start{section}}{\def\web@Start{chapter}}
+% \end{macrocode}
+% \subsubsection{\texorpdfstring{\protect\cs{maketitle}}{\CMD{maketitle}} and the Directory}
+% In this section we define \cs{maketitle}. You can \cs{renewcommand} this
+% definition at will.
+% \begin{macro}{\titleauthorproportion}
+% This is the vertical proportion of \cs{textheight} that the title and author
+% portion of the title page is to take up. The default is 33\% of the title page.
+% \begin{macrocode}
+\newcommand{\titleauthorproportion}{.33}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\hproportionwebtitle}
+% Proportion of the \cs{linewidth} that the title can take up. The default is 70\%.
+% \begin{macrocode}
+\newcommand{\hproportionwebuniversity}{.7}
+\newcommand{\hproportionwebtitle}{.7}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\hproportionwebauthor}
+% Proportion of the \cs{linewidth} that the author can take up. The default is 40\%.
+% \begin{macrocode}
+\newcommand{\hproportionwebauthor}{.4}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\minimumskip}
+% Minimum skip between the major elements of the title page, see the definition of
+% \cs{maketitle} below.
+% \begin{macrocode}
+\newcommand{\minimumskip}{\medskip}
+% \end{macrocode}
+% \end{macro}
+\def\web@copyright@symbol{\copyright}
+\newcommand{\copyrightSymbol}[1]{\def\web@copyright@symbol{#1}}
+\def\nocopyrightsymbol{\let\web@copyright@symbol\@gobble}
+% \begin{macro}{\titlepageTrailer}
+% \begin{macro}{\trailerFontSize}
+% This command controls how the material at the bottom of the title page is constructed.
+% \begin{macrocode}
+\newcommand{\trailerFontSize}{\footnotesize}
+\def\maketitle@trailer@ul{\web@copyright\ \web@copyright@symbol\
+ \webcopyrightyears}
+\def\maketitle@trailer@ll{\web@revision\ \@date}
+\def\maketitle@trailer@ur{\thewebemail}
+\def\maketitle@trailer@lr{\webversion}
+\newcommand{\titlepageTrailer}
+{%
+ \makebox[\linewidth]{\parbox{\linewidth}{%
+ \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
+ \maketitle@trailer@ll\hfill\maketitle@trailer@lr}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\webdirectory}
+% \begin{macro}{\removeDirTOC}
+% \begin{macro}{\removeDirArticle}
+% \begin{macro}{\formatWordDirectory}
+% \begin{macro}{\formatDirectoryItems}
+% \begin{macro}{\addtoDirList}
+% \begin{macro}{\vspaceAfterDirName}
+% \begin{macro}{\priorDirList}
+% \begin{macro}{\afterDirList}
+% \begin{macro}{\priorDirMatter}
+% \begin{macro}{\afterDirMatter}
+% The code that places the directory on the title page.
+% \begin{macrocode}
+\newcommand{\webdirectory}{%
+ \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}%
+ \web@priorDirMatter
+ \begin{flushleft}{\web@formatWordDirectory\web@directory}%
+ \web@priorDirList
+ \vspace{\vspaceAfterDirName}%
+ \begin{itemize}\setlength{\itemsep}{-3pt}\web@formatDirectoryItems
+ \ifx\web@removeDirTOC\web@YES\else\item\relax\dirTOCItem\fi
+ \ifx\web@removeDirArticle\web@YES\else
+ \item\relax\dirArticleItem\fi
+ \web@addtoDirList
+ \end{itemize}
+ \web@afterDirList
+ \end{flushleft}
+ \web@afterDirMatter
+}
+% \end{macrocode}
+% (02/10/2009) We include some additional commands to give control over the
+% directory listing, without having to redefine \cs{webdirectory}
+% \begin{macrocode}
+\newcommand{\directoryhook}[1]{\def\web@directory@hook##1{#1}}
+\let\web@directory@hook\@empty
+\newcommand{\vspaceAfterDirName}{-3pt}
+\newcommand{\dirTOCItem}{\hyperlink{webtoc}{\web@toc}}
+\newcommand{\dirArticleItem}{\web@article}
+\newcommand{\removeDirTOC}{\let\web@removeDirTOC\web@YES}
+\let\web@removeDirTOC\web@NO
+\newcommand{\removeDirArticle}{\let\web@removeDirArticle\web@YES}
+\let\web@removeDirArticle\web@NO
+\let\web@addtoDirList\@empty
+\newcommand{\formatWordDirectory}[1]{\def\web@formatWordDirectory{#1}}
+\formatWordDirectory{\bfseries\large}
+\newcommand{\formatDirectoryItems}[1]{\def\web@formatDirectoryItems{#1}}
+\formatDirectoryItems{\bfseries}
+\newcommand{\addtoDirList}[1]{\g@addto@macro\web@addtoDirList{\item #1}}
+\newcommand{\priorDirList}[1]{\def\web@priorDirList{#1}}
+\let\web@priorDirList\@empty
+\newcommand{\afterDirList}[1]{\def\web@afterDirList{#1}}
+\let\web@afterDirList\@empty
+\newcommand{\priorDirMatter}[1]{\def\web@priorDirMatter{#1}}
+\let\web@priorDirMatter\@empty
+\newcommand{\afterDirMatter}[1]{\def\web@afterDirMatter{#1}}
+\let\web@afterDirMatter\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\universityColor}
+% \begin{macro}{\titleColor}
+% \begin{macro}{\authorColor}
+% \begin{macro}{\subjectColor}
+% Let's add some colors to spice up the look of the page. Colors for the university, title
+% and author. The \cs{subjectColor} is used in the \textsf{eqExam} package.
+% \begin{macrocode}
+\newcommand{\universityColor}[1]{\def\webuniversity@color{#1}}
+\universityColor{blue}
+\newcommand{\titleColor}[1]{\def\webtitle@color{#1}}
+\titleColor{black}
+\newcommand{\authorColor}[1]{\def\webauthor@color{#1}}
+\authorColor{black}
+\newcommand{\subjectColor}[1]{\def\websubject@color{#1}}
+\subjectColor{black}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\aboveTopTitleSkip}
+% Added some glue above the \cs{webuniversity} so whole title can be moved downward.
+% \changes{v4.0c}{2007/03/15}
+% {
+% Added this command to be able to move whole title downward.
+% }
+% \begin{macrocode}
+\def\aboveTopTitleSkip#1{\def\web@aboveTopTitleSkip{#1}}
+\aboveTopTitleSkip{0pt}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\topTitlePage}
+% The top of the title page. This command lays out the university, the title and the author.
+% \begin{macrocode}
+\newcommand{\topTitlePage}
+{%
+% \end{macrocode}
+% Have \cs{webuniversity} centered across the top of the title page.
+% \begin{macrocode}
+ \vglue\web@aboveTopTitleSkip
+ \noindent\makebox[\linewidth]{%
+ \parbox{\hproportionwebuniversity\linewidth}%
+ {\bfseries\color{\webuniversity@color}\ifeqforpaper\large\fi
+ \centering\webuniversity}}\par\ifeqforpaper\else\minimumskip\fi
+ \vspace{\stretch{1}}%
+% \end{macrocode}
+% Now place the title (\cs{webtitle})
+% \begin{macrocode}
+ \noindent\makebox[\linewidth]{%
+ \parbox{\hproportionwebtitle\linewidth}%
+ {\bfseries\color{\webtitle@color}\ifeqforpaper\Large\else
+ \large\fi\centering\webtitle}}\par\ifeqforpaper
+ \vspace{2\baselineskip}\else\minimumskip\vspace{\stretch{1}}\fi
+% \end{macrocode}
+% Now place the author (\cs{webauthor})
+% \begin{macrocode}
+ \noindent\makebox[\linewidth]{%
+ \parbox{\hproportionwebauthor\linewidth}%
+ {\bfseries\color{\webauthor@color}\ifeqforpaper
+ \large\fi\centering\webauthor}}
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\maketitlepreamble}
+% \begin{macro}{\maketitlepostamble}
+% The space and width commands that appear just before the top of the title page, and just
+% after the trailer of the title page.
+% \begin{macrocode}
+\newcommand{\allowHeadingsTitlePage}{\let\web@titlepagestyle\@gobble}
+\def\web@titlepagestyle#1{#1}
+\newcommand{\coverpagemargin}{1in}
+\newcommand{\maketitlepreamble}
+{%
+ \web@titlepagestyle{\thispagestyle{empty}}%
+ \ifeqforpaper\if@centertitlepage
+ \begingroup
+% \end{macrocode}
+% We center the content on the title page, much better than before.
+% \changes{v4.4}{2012/08/26}{No code to center the cover page content.}
+% \begin{macrocode}
+ \if@centertitlepagefull
+ \@tempdima=\coverpagemargin
+ \else
+ \@tempdima\paperwidth
+ \advance\@tempdima-\textwidth
+ \@tempdima=.5\@tempdima
+ \edef\coverpagemargin{\the\@tempdima}%
+ \fi
+ \@tempdimb\paperwidth
+ \addtolength{\@tempdimb}{-2\@tempdima}%
+ \edef\fullscreenwidth{\the\@tempdimb}%
+ \linewidth\fullscreenwidth
+ \textwidth\fullscreenwidth
+ \hfuzz\linewidth
+ \setlength{\oddsidemargin}{\coverpagemargin-1in}%
+ \setlength{\evensidemargin}{\oddsidemargin}%
+ \marginparsep=0pt
+ \marginparwidth=0pt
+ \parindent0pt
+ \fi\fi
+}
+\newcommand{\maketitlepostamble}
+{%
+ \newpage
+ \ifeqforpaper\if@centertitlepage\endgroup\fi\fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\maketitle}
+% Redefining \LaTeX's \cs{maketitle}. Looks a little complicated, but this is only because
+% we have the forpaper design as well as the screen design defined here.
+% \begin{macrocode}
+\newcommand{\web@maketitle}
+{%
+ \maketitlepreamble
+ \ifeqforpaper\vspace*{2\baselineskip}\else
+% \end{macrocode}
+% If not for paper, restrict title and author to \cs{titleauthorproportion} of the page
+% \begin{macrocode}
+ \vbox to\titleauthorproportion\textheight\bgroup\fi
+% \end{macrocode}
+% \begin{macrocode}
+ \topTitlePage
+% \end{macrocode}
+% \begin{macrocode}
+ \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
+% \end{macrocode}
+% Now place the \cs{optionalpagematter}
+% \begin{macrocode}
+ \ifx\optionalpagematter\@empty\par\else
+ \begingroup\par
+ \aboveOPMvspace
+ \noindent\parbox{\linewidth}{\optionalpagematter}%
+ \par\endgroup\fi
+ \vspace{\stretch{1}}
+% \end{macrocode}
+% Insert the directory, as desired.
+% \begin{macrocode}
+ \ifx\web@directory@option\web@YES\web@directory@hook\webdirectory\fi
+ \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}
+% \end{macrocode}
+% Insert the ``bottom matter''.
+% \begin{macrocode}
+ \vfill\noindent\begingroup
+ \trailerFontSize\titlepageTrailer\par\endgroup
+ \maketitlepostamble
+}
+\let\web@save@maketitle\maketitle
+\let\maketitle\web@maketitle
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\makeinlinetitle}
+% A simple ``inline'' make title command for simple documents. May be redefined.
+%\changes{v4.0d}{2007/04/16}
+%{
+% A convenience command for making a simple in line title.
+%}
+% \begin{macrocode}
+\newcommand{\makeinlinetitle}
+{%
+ \noindent\makebox[\linewidth][c]{%
+ \bfseries\color{\webtitle@color}\webtitle}
+ \makebox[\linewidth]{%
+ \shortstack[l]{\strut\\
+ \makebox[0pt][l]{\webuniversity}\\
+ \makebox[0pt][l]{%
+ \@ifundefined{aeb@prepared}
+ {\@date}{\aeb@prepared}%
+ }%
+ }\hfill
+ \shortstack[c]{\strut\webauthor\\\strut}\hfill
+ \shortstack[r]{\strut\makebox[0pt][r]{\thewebemail}\\
+ \makebox[0pt][r]{%
+ \@ifundefined{aeb@talksite}{\webversion}
+ {\ifx\aeb@talksite\@empty\webversion
+ \else\aeb@talksite\fi}%
+ }%
+ }%
+ }%
+ \bigskip
+}
+% \end{macrocode}
+% \end{macro}
+% \subsection{Section and TOC depth}
+% \begin{macrocode}
+\setcounter{secnumdepth}{3}
+\setcounter{tocdepth}{3}
+% \end{macrocode}
+% Try to squeeze a little more in per page.
+% \begin{macrocode}
+\ifeqforpaper\else
+ \clubpenalty=50
+ \widowpenalty=50
+\fi
+% \end{macrocode}
+% \subsection{Tight Settings}
+%
+% We squeeze display vertical spaces a little to fit more content on the screen page.
+% \changes{v6.0m}{2016/10/22}{Extend the tight option to 11pt and 12pt}
+% (2016/10/22) Extended the \texttt{tight} option to \texttt{11pt} and \texttt{12pt}.
+% \par\medskip\noindent
+% Begin by saving all {\LaTeX} commands that are to be changed, so we can restore them later.
+% \begin{macrocode}
+\let\web@save@listi\@listi
+\let\web@save@listii\@listii
+\let\web@save@listiii\@listiii
+\let\web@save@normalsize\normalsize
+\let\web@save@partopsep\partopsep
+\let\web@normalsize\normalsize
+% \end{macrocode}
+% \paragraph*{Tight settings for \texttt{10pt}}
+% \begin{macrocode}
+\def\w@ppp#1#2#3{#1\p@ \@plus#2\p@ \@minus#3\p@}
+\def\w@zpp#1#2{\z@ \@plus#1\p@ \@minus#2\p@}
+\def\tightsettings@z{%
+ \setlength\partopsep{\w@ppp{2}{}{}} % unchanged
+ \def\web@listi{\leftmargin\leftmargini
+ \parsep \w@ppp{2}{2}{}% 4+2-1
+ \topsep \w@ppp{2}{1}{}% 8+2-4
+ \itemsep\w@ppp{2}{1}{}}% 4+2-1
+ \let\@listi\web@listi
+ \let\@listI\@listi
+ \@listi
+ \def\web@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \w@zpp{}{}% 4+2-1
+ \parsep \w@zpp{}{}% 2+1-1
+ \itemsep \parsep}% unchanged
+ \def\web@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \w@zpp{}{}% 2+1-1
+% \end{macrocode}
+% Uncommented text now commented out.
+% \changes{v6.0o}{2017/01/20}{Uncommented text, now commented out}
+% \begin{macrocode}
+ \parsep \z@ % unchanged
+ \partopsep \w@ppp{}{}{}% unchanged
+ \itemsep \topsep}% unchanged
+ \let\@listii\web@listii
+ \let\@listiii\web@listiii
+ \renewcommand\web@normalsize{%
+ \@setfontsize\normalsize\@xpt\@xiipt
+ \abovedisplayskip \w@ppp{5}{3}{}% 10+2-5
+ \abovedisplayshortskip \w@zpp{3}{0}% unchanged
+ \belowdisplayshortskip \w@ppp{3}{2}{2}% 6+3-3
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}%
+ \let\normalsize\web@normalsize
+ \normalsize
+}
+% \end{macrocode}
+% \paragraph*{Tight settings for \texttt{11pt}}
+% \begin{macrocode}
+\def\tightsettings@i{%
+ \setlength\partopsep{\w@ppp{2}{}{}}% 3+1-1
+ \def\web@listi{\leftmargin\leftmargini
+ \parsep \w@ppp{2.5}{2}{}% 4.5+2-1
+ \topsep \w@ppp{4.5}{1.5}{2.5}% 9+3-5
+ \itemsep \w@ppp{2.5}{}{}}% 4.5+2-1
+ \let\@listi\web@listi
+ \let\@listI\@listi
+ \@listi
+ \def\web@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{}{}{}% 4.5+2-1
+ \parsep \w@ppp{}{}{}% 2+1-1
+ \itemsep \parsep}% unchanged
+ \def\web@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{}{}{}% 2+1-1
+ \parsep \z@ % unchanged
+ \partopsep \w@ppp{}{}{}% unchanged
+ \itemsep \topsep}% unchanged
+ \let\@listii\web@listii
+ \let\@listiii\web@listiii
+ \renewcommand\web@normalsize{%
+ \@setfontsize\normalsize\@xipt{13.6}%
+ \abovedisplayskip \w@ppp{5.5}{3}{3}% 11+3-6
+ \abovedisplayshortskip \w@zpp{}{0}% unchanged
+ \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}%
+ \let\normalsize\web@normalsize
+ \normalsize
+}
+% \end{macrocode}
+% \paragraph*{Tight settings for \texttt{12pt}}
+% \begin{macrocode}
+\def\tightsettings@ii{%
+ \setlength\partopsep{\w@ppp{3}{2}{2}}% unchanged
+ \def\web@listi{\leftmargin\leftmargini
+ \parsep \w@ppp{3}{2}{}% 5+2.5-1
+ \topsep \w@ppp{5}{2}{3}% 10+4-6
+ \itemsep\w@ppp{2.5}{}{}}% 5+2.5-1
+ \let\@listi\web@listi
+ \let\@listI\@listi
+ \@listi
+ \def\web@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{2.5}{}{}% 5+2.5-1
+ \parsep \w@ppp{2}{}{}% 2.5+1-1
+ \itemsep \parsep}% unchanged
+ \def\web@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{1.5}{}{}% 2.5+1-1
+ \parsep \z@ % unchanged
+ \partopsep \w@ppp{}{}{}% unchanged
+ \itemsep \topsep}% unchanged
+ \let\@listii\web@listii
+ \let\@listiii\web@listiii
+ \renewcommand\web@normalsize{%
+ \@setfontsize\normalsize\@xiipt{14.5}%
+ \abovedisplayskip \w@ppp{6}{1.5}{3.5}% 12+3-7
+ \abovedisplayshortskip \w@zpp{3}{0}% unchanged
+ \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}%
+ \let\normalsize\web@normalsize
+ \normalsize
+}
+% \end{macrocode}
+% Select \DescribeMacro{\tightsettings}\cs{tightsettings} according to point size
+% \begin{macrocode}
+\def\tightsettings{\@ifstar{\ifeqforpaper\else\tightsettings@cont\fi}
+ {\tightsettings@cont}}
+\def\tightsettings@cont{\let\web@tight\web@YES
+ \ifcase\@ptsize
+ \tightsettings@z\or
+ \tightsettings@i\or
+ \tightsettings@ii
+ \fi
+}
+% \end{macrocode}
+% Restore to normal document class settings using
+% \DescribeMacro{\restorenormalsettings}\cs{restorenormalsettings}.
+% \begin{macrocode}
+\def\restorenormalsettings{\let\web@tight\web@NO
+ \let\@listi\web@save@listi
+ \let\@listii\web@save@listii
+ \let\@listiii\web@save@listiii
+ \let\normalsize\web@save@normalsize
+ \let\partopsep\web@save@partopsep
+ \let\@listI\@listi
+ \@listi
+ \normalsize
+}
+% \end{macrocode}
+% \subsection{Navgation Aids}
+% \subsubsection{Navigation Bar}
+% Navigation Bar, appears in response to the option \texttt{navibar}.
+% \begin{macro}{\navibarTextColor}
+% Color for text in the navigation bar
+% \begin{macrocode}
+\def\navibarTextColor#1{\def\@menucolor{#1}}
+\def\@menucolor{webblue}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\navibarBgColor}
+% Color for background in the navigation bar
+% \begin{macrocode}
+\def\navibarBgColor#1{\def\@menuBgColor{#1}}
+\def\@menuBgColor{webgray}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\newcommand{\newNaviIcon}[1][\@empty]
+{%
+ \ifx#1m\let\web@next\@newNaviIconMenu
+ \else\ifx#1j\let\web@next\@newNaviIconJS
+ \else\ifx#1l\let\web@next\@newNaviIconLink
+ \else\ifx#1\@empty\let\web@next\@newNaviIconLink
+ \else\let\web@next\relax
+ \PackageWarning{web}{\string\newNaviIcon: unknown first parameter}
+ \fi\fi\fi\fi\web@next
+}
+% \end{macrocode}
+% \begin{macro}{\@newNaviIconMenu}
+% This command uses the hyperref command \cs{Acrobatmenu} to create navigation link button. The
+% action for this type is restricted to named menu actions.
+%\begin{verbatim}
+%Parameters
+% [#1] = optional parameter for setting the highlight, N (none),
+% I (invert, the default), O (outline), P (push, also called Inset)
+% #2 = command name of the new navigation icon
+% #3 = width of icon
+% #4 = height of icon
+% #5 = text to appear in the center of the icon.
+% #6 = named menu action, e.g., NextPage, PrevPage, etc.
+%\end{verbatim}
+% The color of the text is controlled by \cs{navibarTextColor}, and the background color
+% is determined by \cs{@menuBgColor}.
+% \begin{macrocode}
+\def\web@colorbox@w@transparency#1{%
+ \ifx#1\@empty\setlength{\fboxrule}{0pt}\let\aeb@next\fbox\else
+ \def\aeb@next{\colorbox{#1}}\fi\aeb@next}
+\newcommand{\@newNaviIconMenu}[6][I]
+{%
+ \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
+ \Acrobatmenu{#6}{\web@colorbox@w@transparency{\@menuBgColor}{%
+ \parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}}%
+ }}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@newNaviIconJS}
+% Another navigation icon/button, but this one allows for arbitrary JavaScript actions.
+%\begin{verbatim}
+%Parameters
+% [#1] = optional parameter for setting the highlight, N (none),
+% I (invert, the default) O (outline), P (push, also called Inset)
+% #2 = command name of the new navigation icon
+% #3 = width of icon
+% #4 = height of icon
+% #5 = text to appear in the center of the icon.
+% #6 = JavaScript commands to be executed when the button is clicked.
+%\end{verbatim}
+% The color of the text is controlled by \cs{navibarTextColor}, and the background color
+% is determined by \cs{@menuBgColor}.
+% \begin{macrocode}
+\newcommand{\@newNaviIconJS}[6][I]
+{%
+ \ifcase\eq@drivernum
+ \def#2{{\setlength{\fboxsep}{0pt}%
+ \pdf@rect{\web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}}%
+ \literalps@out{%
+ [ /Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ /Border [ 0 0 0 ]/H/#1\space
+ /Action <</S/JavaScript/JS (#6) >>
+ /Subtype/Link
+ /ANN pdfmark}%
+ }}%
+ \or
+ \def#2{{\setlength{\fboxsep}{0pt}%
+ \leavevmode\pdfstartlink
+ attr {/Border [0 0 0 ] /H/#1}%
+ user{ /Subtype /Link
+ /A << /S/JavaScript/JS (#6) >>}%
+ \web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}%
+ \pdfendlink
+ }}%
+ \or
+ \def#2{{\setlength{\fboxsep}{0pt}%
+ \@pdfm@mark{bann
+ <<
+ /Border [0 0 0 ] /H/#1\space
+ /Subtype /Link
+ /A << /S/JavaScript/JS (#6) >>
+ >>}\web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}%
+ \@pdfm@mark{eann}%
+ }}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Another navigation icon/button, this one allows jumping to a named destination.
+%\begin{verbatim}
+%Parameters
+% [#1] = optional parameter for setting the highlight, N (none),
+% I (invert, the default), O (outline), P (push, also called Inset)
+% #2 = command name of the new navigation icon
+% #3 = width of icon
+% #4 = height of icon
+% #5 = text to appear in the center of the icon.
+% #6 = \hyperlink or \href with its first argument
+%\end{verbatim}
+% For example,
+%\begin{verbatim}
+%\newNaviIcon[l]{\Home}{40pt}{15pt}{\footnotesize Home}
+% {\href{http://www.math.uakron.edu/}}
+%\end{verbatim}
+% The color of the text is controlled by \cs{navibarTextColor}, and the background color
+% is determined by \cs{@menuBgColor}.
+% \begin{macrocode}
+\newcommand{\@newNaviIconLink}[6][I]
+{%
+ \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
+ #6{\web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}}%
+ }}%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\let\insertwebtoc\relax
+\def\insert@webtoc{\web@TOC\ }
+\def\web@TocText{Toc}
+\newNaviIcon[l]{\web@TOC}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@TocText}{\hyperlink{webtoc}}
+% \end{macrocode}
+% Some icon definitions that are used in the navigation bar that appears at the bottom of the page.
+% \begin{macrocode}
+\newcommand\navibariconWidth[1]{\def\web@nb@width{#1}}
+\newcommand\navibariconHeight[1]{\def\web@nb@height{#1}}
+\navibariconWidth{34pt}\navibariconHeight{10pt}
+\@newNaviIconMenu{\web@FirstPage}{\web@nb@width}{\web@nb@height}
+ {\web@FirstPageText}{FirstPage}
+\def\web@FirstPageText{$\blacktriangleleft\blacktriangleleft$}
+\@newNaviIconMenu{\web@LastPage}{\web@nb@width}{\web@nb@height}
+ {\web@LastPageText}{LastPage}
+\def\web@LastPageText{$\blacktriangleright\blacktriangleright$}
+\@newNaviIconMenu{\web@PrevPage}{\web@nb@width}{\web@nb@height}
+ {\web@PrevPageText}{PrevPage}
+\def\web@PrevPageText{$\blacktriangleleft$}
+\@newNaviIconMenu{\web@NextPage}{\web@nb@width}{\web@nb@height}
+ {\web@NextPageText}{NextPage}
+\def\web@NextPageText{$\blacktriangleright$}
+\@newNaviIconMenu{\web@GoBack}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@back}{GoBack}
+\@newNaviIconMenu{\web@GoBackDoc}{\web@nb@width}{\web@nb@height}
+ {$\blacktriangleleft$\ \footnotesize\web@doc}{GoBackDoc}
+\@newNaviIconMenu{\web@GoForwardDoc}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@doc\ \normalsize$\blacktriangleright$}
+ {GoForwardDoc}
+\@newNaviIconMenu{\web@FS}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@FSText}{FullScreen}
+\def\web@FSText{FS}
+\@newNaviIconMenu{\web@GoToPage}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@GoToPageText}{GoToPage}
+\def\web@GoToPageText{Page...}
+% \end{macrocode}
+% \begin{macro}{\web@navigationbar}
+% The navigation bar, this can be redefined.
+% \begin{macrocode}
+\newcommand\web@navigationbar{%
+\hfil\bfseries\footnotesize
+\insertwebtoc
+\web@FirstPage\
+\web@LastPage\
+\web@PrevPage\
+\web@NextPage\
+\web@GoBack
+%\web@GoBackDoc\
+%\web@GoForwardDoc
+\hfil}
+% \end{macrocode}
+% \end{macro}
+% Here are some icon buttons for the panel, if a panel is desired.
+% \begin{macrocode}
+\newcommand{\panelgroupWidth}[1]{%
+ \global\let\chkpanelgroup\web@chkpanelgroup
+ \def\web@pg@width{#1}}
+\newcommand{\panelgroupHeight}[1]{%
+ \global\let\chkpanelgroup\web@chkpanelgroup
+ \def\web@pg@height{#1}}
+\newcommand{\panelgroupSep}[1]{%
+ \global\let\chkpanelgroup\web@chkpanelgroup
+ \def\web@pg@sep{#1}}
+\@newNaviIconMenu{\panel@FirstPage}{\web@pg@width}{\web@pg@height}
+ {\web@FirstPageText}{FirstPage}
+\@newNaviIconMenu{\panel@LastPage}{\web@pg@width}{\web@pg@height}
+ {\web@LastPageText}{LastPage}
+\@newNaviIconMenu{\panel@PrevPage}{\web@pg@width}{\web@pg@height}
+ {\web@PrevPageText}{PrevPage}
+\@newNaviIconMenu{\panel@NextPage}{\web@pg@width}{\web@pg@height}
+ {\web@NextPageText}{NextPage}
+\@newNaviIconMenu{\panel@GoBack}{\web@pg@width}{\web@pg@height}
+ {\footnotesize\web@back}{GoBack}
+\@newNaviIconMenu{\panel@GoBackDoc}{\web@pg@width}{\web@pg@height}
+ {$\blacktriangleleft$\,\footnotesize\web@doc}{GoBackDoc}
+\@newNaviIconMenu{\panel@GoForwardDoc}{\web@pg@width}{\web@pg@height}
+ {\footnotesize\web@doc\,\normalsize$\blacktriangleright$}
+ {GoForwardDoc}
+\@newNaviIconMenu{\panel@Close}{\web@pg@width}{\web@pg@height}
+ {\footnotesize Close}{Close}
+\def\web@CloseText{Close}
+\@newNaviIconMenu{\panel@FS}{\web@pg@width}{\web@pg@height}
+ {\footnotesize\web@FSText}{FullScreen}
+\@newNaviIconMenu{\panel@GoToPage}{\web@pg@width}{\web@pg@height}
+ {\footnotesize\web@GoToPageText}{GoToPage}
+% \end{macrocode}
+% A check to see if the panel group is too wide.
+% \begin{macrocode}
+\newcommand{\web@chkpanelgroup}{\bgroup
+ \setlength{\@tempdima}{\web@pg@width+\web@pg@width+\web@pg@sep}%
+ \ifdim\@tempdima>\@panelwidth\PackageError{web}{Width of
+ \string\panelNaviGroup\space is wider than the panel}{}\else
+ \xdef\panelNavigroupWidth{\the\@tempdima}\fi
+ \egroup\global\let\chkpanelgroup\@empty
+}
+\panelgroupWidth{28pt}\panelgroupHeight{15pt}
+\panelgroupSep{2pt}
+\newcommand{\panelrowsep}{1pt}
+% \end{macrocode}
+% Standard navigation group for a panel.
+% \begin{macrocode}
+\newcommand\panelNaviGroup{\chkpanelgroup
+ \parbox[c]{\panelNavigroupWidth}{%
+ \offinterlineskip
+ \panelIconGroup
+ }%
+}
+\newcommand{\panelIconGroup}{%
+ \panel@FirstPage\hfill\panel@LastPage\\[\panelrowsep]
+ \panel@PrevPage\hfill\panel@NextPage\\[\panelrowsep]
+ \panel@GoBack\hfill\panel@Close
+}
+% \end{macrocode}
+% \begin{macro}{\insNaviBar}
+% Now, if the navibar option is not on, we can insert arbitrarily defined navigation objects
+% through the use of \cs{insNaviBar}. There are two forms for this macro: star and no star. The star
+% version makes a global definition, whereas the nostar does not. The command \cs{insNaviBar}
+% just defines one of two macros, \cs{@gdefInsNaviBar} and \cs{@defInsNaviBar}, depending on the
+% `star'.
+% \begin{macrocode}
+\let\ins@NaviBar\@empty
+\newcommand\insNaviBar{\@ifstar{\@gdefInsNaviBar}{\@defInsNaviBar}}
+\def\@gdefInsNaviBar#1{\gdef\ins@NaviBar{#1}}
+\def\@defInsNaviBar#1{\def\ins@NaviBar{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\insNaviBarOff}
+% Turn the \cs{insNaviBar} off with this macro.
+% \begin{macrocode}
+\newcommand\insNaviBarOff{\global\let\ins@NaviBar\@empty}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{More Navigation Things}
+% Navigation Aids
+% \begin{macro}{\insertnaviiconhere}
+% Inserts a direction icon on the page on which the command appears.
+% \begin{macrocode}
+\def\web@ifOnThisPage#1#2{\ifnum\c@page=\@thispage\relax
+ #1\else#2\fi}
+\newcommand{\insertnaviiconhere}[1]
+{%
+ \xdef\@thispage{\the\c@page}%
+ \def\web@insToRight{%
+ \ifeqforpaper\makebox[0pt][l]{\ifdim\marginparsep>0pt\relax
+ \hspace{\marginparsep}\else\ \fi#1}\else
+ \makebox[0pt][l]{%
+ \ifnum\@panelconfig=2\relax
+ \hspace{\@panelsep}\else
+ \hspace{\@Rightmargin}\fi
+ \makebox[0pt][r]{#1}}\fi
+ }\expandafter\rheader\expandafter
+ {\expandafter\web@ifOnThisPage
+ \expandafter{\web@rightheader\web@insToRight}%
+ {\web@defaultrightheader}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\insertnaviiconhereafter}
+% Inserts a direction icon on the current page, and every page thereafter.
+% \begin{macrocode}
+%\def\insertnaviiconhereafter#1{\lheader{#1}}
+\def\insertnaviiconhereafter#1{\def\web@insToLeft{%
+ \ifeqforpaper\makebox[0pt][r]{#1\ifdim\marginparsep>0pt\relax
+ \hspace{\marginparsep}\else\ \fi}\else
+ \makebox[0pt][r]{\makebox[0pt][l]{#1}%
+ \ifnum\@panelconfig=1\relax
+ \hspace{\@panelsep}\else
+ \hspace{\@Leftmargin}\fi}\fi
+ }\expandafter\lheader\expandafter
+ {\expandafter\web@insToLeft\web@lhead}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\removehereaftericon}
+% Removes the running icon from the header.
+% \begin{macrocode}
+\def\removehereaftericon{\lheader{\aeb@setmarks}}
+\let\defaultpageheader\removehereaftericon
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ArrowUp}
+% \begin{macro}{\ArrowDown}
+% Pre-Fab Rule Icons \cs{Uparrow} and \cs{Downarrow}, for example,
+%\begin{verbatim}
+%\insertnaviiconhere{\ArrowUp{\href{http://www.adobe.com/}}}
+%\end{verbatim}
+% \begin{macrocode}
+\newcommand\ArrowUp[1]
+{%
+ \normalsize\ifeqforpaper
+ \setlength{\fboxsep}{6pt}\else
+ \setlength{\fboxsep}{4pt}\fi
+ \raisebox{\depth-\fboxsep}[0pt][0pt]{%
+ #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
+ {\textcolor{\web@directionIconTextColor}{$\bigl\Uparrow$}}}}%
+}
+\newcommand\ArrowDown[1]
+{%
+ \normalsize\ifeqforpaper
+ \setlength{\fboxsep}{6pt}\else
+ \setlength{\fboxsep}{4pt}\fi
+ \raisebox{\depth-\fboxsep}[0pt][0pt]{%
+ #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
+ {\textcolor{\web@directionIconTextColor}{$\bigl\Downarrow$}}}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\directionIconTextColor}
+% \begin{macro}{\directionIconBgColor}
+% Text and background color can be changed through these two commands.
+% \begin{macrocode}
+\def\directionIconTextColor#1{\def\web@directionIconTextColor{#1}}
+\def\web@directionIconTextColor{webblue}
+\def\directionIconBgColor#1{\def\web@directionIconBgColor{#1}}
+\def\web@directionIconBgColor{webgray}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \subsection{Web Headings}
+%
+% |\pagestyle{webheadings}|
+%
+% \begin{macro}{\lheader}
+% \begin{macro}{\cheader}
+% \begin{macro}{\rheader}
+% The standard running headers for \textsf{Web}
+% \begin{macrocode}
+\def\web@defaultrightheader{\ifnum\value{page}=1\relax\else\thepage\fi}
+\let\web@headerhook\@empty
+\let\web@headerprivate\@empty
+\let\web@footerhook\@empty
+\let\web@footerprivate\@empty
+\def\lheader#1{\gdef\web@lhead{#1}}
+\def\cheader#1{\gdef\web@chead{#1}}
+\def\rheader#1{\gdef\web@rightheader{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% Set default headers
+% \begin{macrocode}
+\lheader{\rightmark}
+\cheader{}
+\rheader{\web@defaultrightheader}
+% \end{macrocode}
+% \begin{macro}{\lfooter}
+% \begin{macro}{\cfooter}
+% \begin{macro}{\rfooter}
+% The standard running footers for \textsf{Web}
+% \begin{macrocode}
+\def\lfooter#1{\gdef\web@lfoot{#1}}
+\def\cfooter#1{\gdef\web@cfoot{#1}}
+\def\rfooter#1{\gdef\web@rfoot{#1}}
+% \end{macrocode}
+% Set default headers
+% \begin{macrocode}
+\lfooter{}\rfooter{}
+\newcommand{\placeScreenNavibar}{%
+ \ifweb@navibar\web@navigationbar\else
+ \ins@NaviBar\global\let\ins@NaviBar\@empty\fi}
+\cfooter{\placeScreenNavibar}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\clearHeaders}
+% \begin{macro}{\restoreHeaders}
+% \begin{macro}{\clearFooters}
+% \begin{macro}{\restoreFooters}
+% Here we offer a simple mechanism for saving and restoring running headers.
+% \begin{macrocode}
+\newcommand{\clearHeaders}{%
+ \let\web@lhead@save\web@lhead
+ \let\web@chead@save\web@chead
+ \let\web@rightheader@save\web@rightheader
+ \let\web@lhead\@empty\let\web@chead\@empty
+ \let\web@rightheader\@empty}
+\newcommand{\restoreHeaders}{%
+ \let\web@lhead\web@lhead@save
+ \let\web@chead\web@chead@save
+ \let\web@rightheader\web@rightheader@save}
+\newcommand{\clearFooters}{%
+ \let\web@lfoot@save\web@lfoot
+ \let\web@cfoot@save\web@cfoot
+ \let\web@rfoot@save\web@lfoot
+ \let\web@lfoot\@empty\let\web@cfoot\@empty
+ \let\web@rfoot\@empty}
+\newcommand{\restoreFooters}{%
+ \let\web@lfoot\web@lfoot@save
+ \let\web@cfoot\web@cfoot@save
+ \let\web@rfoot\web@rfoot@save}
+% \end{macrocode}
+% You can use this command to insert additional formatting into the running header.
+% For example, \verb!\headerformat{\bfseries\color{red}}!.
+% \begin{macro}{\headerformat}
+% \begin{macro}{\footerformat}
+% \begin{macrocode}
+\def\headerformat#1{\def\web@headerhook{#1}}
+\headerformat{}
+\def\footerformat#1{\def\web@footerhook{#1}}
+\footerformat{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ps@webheadings}
+% Standard headings for Web
+% \begin{macrocode}
+\let\webheadwrapper\@empty
+\let\webfootwrapper\@empty
+\newcommand{\headWrapper}[1]{\def\webheadwrapper##1{#1}}
+\newcommand{\footWrapper}[1]{\def\webfootwrapper##1{#1}}
+\newcommand{\ps@webheadings}
+{%
+ \renewcommand{\@oddhead}{\webheadwrapper{%
+ \normalfont\ifeqforpaper\else\footnotesize\fi
+ \web@headerprivate\web@headerhook\web@lhead\hfil\web@chead\hfil
+ \web@rightheader}}
+ \renewcommand{\@evenhead}{\@oddhead}
+ \renewcommand{\@oddfoot}{\webfootwrapper{%
+ \normalfont\ifeqforpaper\else\footnotesize\fi
+ \web@footerprivate\web@footerhook\web@lfoot\hfil
+ \web@cfoot\hfil\web@rfoot}}
+ \renewcommand{\@evenfoot}{\@oddfoot}
+}
+% \end{macrocode}
+% \end{macro}
+% Make the sections in the format we want in the left side of the running
+% header
+% \begin{macrocode}
+\renewcommand{\sectionmark}[1]{%
+ \markboth{}{\web@section\ \thesection: #1}}
+% \end{macrocode}
+% \begin{macro}{\noHeadersOnSectionPage}
+% \begin{macro}{\headersOnSectionPage}
+%\changes{v4.1b}{2008/08/21}
+%{
+% Added additional control over the \string\cs{lheader}, with
+% \string\cs{noHeadersOnSectionPage} (default) and
+% \string\cs{headersOnSectionPage}
+%}
+% We try to create a running header where the section title does
+% not appear in the header on the same page as the section is
+% inserted, on subsequent pages, the section head appears, I hope.
+%
+% The two commands control this behavior, the default is to not
+% show the section heading (\cs{lheader}) on the page where the
+% section begins. Use the command \cs{headersOnSectionPage} to place headers
+% on the same page as the beginning of a section.
+% \begin{macrocode}
+\newcommand{\noHeadersOnSectionPage}{%
+ \gdef\web@headerpolicy{%
+ \expandafter\aeb@gettopmark\topmark{}{}%
+ \expandafter\aeb@getbotmark\botmark{}{}%
+ \ifx\aeb@topmark\aeb@botmark\rightmark\fi
+ }%
+}
+% \end{macrocode}
+% The default is to show no headers on a page with a section in it.
+% \begin{macrocode}
+\noHeadersOnSectionPage
+\newcommand{\headersOnSectionPage}{%
+ \gdef\web@headerpolicy{\rightmark}%
+}
+\def\aeb@gettopmark#1#2{\def\aeb@topmark{#2}}
+\def\aeb@getbotmark#1#2{\def\aeb@botmark{#2}}
+\def\aeb@setmarks{\web@headerpolicy}
+\lheader{\aeb@setmarks}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+\AtEndOfPackage{\pagestyle{webheadings}}
+% \end{macrocode}
+% \subsection{Sectioning}
+% We redefine the sectioning commands by default; if \texttt{uselatexsection} option
+% is taken, we bypass these definitions.
+% \changes{v4.4a}{2012/08/31}{Introduce \string\cs{ifweb@sectioning} switch}
+% \begin{macrocode}
+\newcommand{\sectionColor}[1]{\def\web@sectionsColorOld{#1}
+ \def\aeb@sectioncolor{#1}}
+\sectionColor{blue}
+\def\web@inputsectiondefs{\InputIfFileExists{websec.def}{}
+ {\PackageError{web}{Cannot find the file websec.def}{}}
+}
+\ifweb@sectioning\expandafter\web@inputsectiondefs\fi
+%</package>
+%<*websectioning>
+\renewcommand*\thesection{\arabic{section}}
+\renewcommand*\thesubsection{\thesection.\arabic{subsection}}
+\renewcommand*{\thesubsubsection}{\textbullet}
+\renewcommand{\section}{\renewcommand{\@seccntformat}[1]{%
+ \@nameuse{the##1}\web@finalDot\enspace}%
+ \@startsection{section}{1}{\z@}%
+ {-3ex\@plus -1ex \@minus-.2ex}%
+ {1ex\@plus .2ex}% 6pt
+ {\noindent\normalfont\normalsize\bfseries
+ \color{\web@sectionsColorOld}}}%
+\renewcommand{\subsection}{\renewcommand{\@seccntformat}[1]{%
+ \@nameuse{the##1}\web@finalDot\enspace}%
+ \@startsection{subsection}{2}{\z@}%
+ {-2.5ex\@plus -1ex \@minus -.2ex}%
+ {1ex\@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries
+ \color{\web@sectionsColorOld}}}
+\renewcommand{\subsubsection}{%
+ \renewcommand{\@seccntformat}[1]{\color{\web@sectionsColorOld}\large
+ $\bullet$\enspace}%
+ \@startsection{subsubsection}{3}{\z@}%
+ {-2ex\@plus -1ex \@minus -.2ex}%
+ {.5ex\@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries}}
+% \end{macrocode}
+% We define our own \cs{part} command, and reserve it as \cs{@webpart}.
+% Commands for handing the \cs{part} format. The formatting of
+% the part text can be accessed through \cs{web@makeparthead}.
+% \begin{macrocode}
+\def\tocPartTitle#1{\def\web@tocPartTitle##1{#1}}
+\tocPartTitle{\thepart\hspace{1em}#1}
+\newcommand\@webpart{\secdef\web@@part\web@@spart}
+\def\web@@part[#1]#2{%
+ \newpage
+ \def\@currentlabelname{#1}%
+ \ifnum\Hy@secnum@part>\c@secnumdepth
+ \phantomsection
+ \fi
+ \ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\web@tocPartTitle{#1}}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+ {\web@makeparthead{#2}}%
+ \nobreak
+ \vskip 1ex
+ \@afterheading
+}
+\def\web@@spart#1{%
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{part*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }{\web@makesparthead{#1}}%
+ \nobreak
+ \vskip 1ex
+ \@afterheading
+}
+\let\web@save@part\part
+\let\part\@webpart
+% \end{macrocode}
+% \begin{macro}{\web@makeparthead}
+% \begin{macro}{\web@makesparthead}
+% \begin{macro}{\formatPartTitle}
+% \begin{macro}{\noPartNumbers}
+% These commands can be redefined to format who the part text
+% looks in the document.
+% \begin{macrocode}
+\newcommand{\formatPartTitle}[1]{%
+ \def\web@formatPartTitle##1{#1}}
+\def\web@defaultFormatPartTitle#1{%
+ \large\bfseries
+ \ifnum \c@secnumdepth >\m@ne
+ \partname~\thepart:\space
+ \fi#1}
+\let\web@formatPartTitle\web@defaultFormatPartTitle
+\newcommand{\restorePartTitleFormat}{%
+ \let\web@formatPartTitle\web@defaultFormatPartTitle}
+\def\noPartNumbers{\formatPartTitle{\large\bfseries##1}%
+ \tocPartTitle{##1}}
+\def\web@makeparthead#1{%
+ \parindent\z@\raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \web@formatPartTitle{#1}%
+ \markboth{}{}\par
+}
+\def\web@makesparthead#1{%
+ \parindent\z@\raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \large\bfseries #1\par
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% Here's the same thing for \cs{chapter}.
+% \begin{macrocode}
+\@ifundefined{chapter}{}{%
+ \newcommand\@webchapter{%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\web@@chapter\web@@schapter
+ }
+ \let\web@save@chapter\chapter
+ \let\chapter\@webchapter
+ \def\web@@chapter[#1]#2{%
+ \def\@currentlabelname{#1}%
+ \def\Hy@next{%
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ }%
+ \ifnum\c@secnumdepth>\m@ne
+ \@ifundefined{if@mainmatter}%
+ \iftrue{\@nameuse{if@mainmatter}}%
+ \let\Hy@next\relax
+ \fi
+ \fi
+ \Hy@next
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}%
+ {\protect\numberline{\thechapter}#1}%
+ \else
+ \addcontentsline{toc}{chapter}{{}{}#1}%
+ \fi
+ \else
+ \addcontentsline{toc}{chapter}{{}{}#1}%
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \if@twocolumn
+ \@topnewpage[\web@makechapterhead{#2}]%
+ \else
+ \web@makechapterhead{#2}%
+ \@afterheading
+ \fi
+ }
+ \def\web@@schapter#1{%
+ \if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \web@makeschapterhead{#1}%
+ \@afterheading
+ \fi
+ }
+% \end{macrocode}
+% \begin{macro}{\web@makechapterhead}
+% \begin{macro}{\web@makeschapterhead}
+% These commands can be redefined to format who the part text
+% looks in the document.
+% \begin{macrocode}
+ \long\def\formatChapterNumber#1{\def\web@formatChapterNumber{#1}}
+ \formatChapterNumber{\large\bfseries
+ \@chapapp\space\thechapter\par\nobreak}
+ \long\def\formatChapterTitle#1{\def\web@formatChapterTitle##1{#1}}
+ \formatChapterTitle{%
+ \interlinepenalty\@M
+ \noindent\hspace{1em}\large\bfseries#1\par\nobreak
+ }
+ \def\web@makechapterhead#1{%
+ \vspace{3\p@}{%
+ \parindent\z@ \raggedright \normalfont
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \web@formatChapterNumber
+ \fi
+ \fi
+ \web@formatChapterTitle{#1}%
+ \vskip 12\p@
+ }%
+ }
+ \def\web@makeschapterhead#1{%
+ \vspace{3\p@}{%
+ \parindent\z@\raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \large\bfseries #1\par\nobreak
+ \vskip 12\p@
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macrocode}
+} % end \@ifundefined{chapter}
+%</websectioning>
+%<*package>
+% \end{macrocode}
+% \begin{macrocode}
+\def\aebwritelastpage{%
+ \immediate\write\@auxout{\string\expandafter\string\gdef
+ \string\csname\space aebLastPage\string\endcsname{\arabic{page}}}%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\AtEndDocument{%
+ \clearpage\addtocounter{page}{-1}\aebwritelastpage
+ \addtocounter{page}{1}}
+% \end{macrocode}
+% \subsection{\texorpdfstring{\protect\cs{useFullWidthForPaper}}{\CMD{useFullWidthForPaper}}}
+%
+% We introduce a command of resetting the page layout paper. The primary
+% use is to create standard documents for academics, such as homeworks
+% and other handouts.
+%
+% \begin{macro}{\useFullWidthForPaper}
+% This command is used to set the page layout to its maximum width, given
+% a 1 inch margin. The height is maximized after taking into account
+% other page parameters that effect it. The parameters \cs{marginparwidth}
+% and \cs{marginparsep} are set to zero; for this layout, there are no
+% marginal comments. The command may be redefined as desired.
+%
+% The command should be used in the preamble, otherwise, it has no effect.
+%\changes{v4.0g}{2007/10/21}
+%{
+% Added the command \cs{useFullWidthForPaper} to reset the page layout for paper.
+% Useful for using web in writing homework assignments and other routine
+% ordinary documents.
+%}
+% \begin{macrocode}
+\def\useFullWidthForPaper{\ifeqforpaper
+ \setlength{\textwidth}{\paperwidth-2in}
+ \setlength{\textheight}
+ {\paperheight-2in-\footskip-\topmargin-\headheight-\headsep}
+ \oddsidemargin=0pt
+ \evensidemargin=0pt
+ \marginparsep=0pt
+ \marginparwidth=0pt
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \DescribeMacro{\maxtextscreentext} tries to maximize the \cs{textwidth} for
+% the text screen. Works for one-sided paper. Has not effect unless a paper
+% option is used, and the \texttt{templatesforpaper} option is not taken.
+% \begin{macrocode}
+\def\maxtextscreentext{%
+ \iftemplatesforpaper\else\ifeqforpaper
+ \ifnum\@usetemplates=1
+ \ifnum\@panelconfig=1 % left panel
+ \setlength{\oddsidemargin}%
+ {\@panelwidth+\@panelsep-1in}%
+ \setlength{\textwidth}%
+ {\paperwidth-\@panelwidth-\@panelsep-%
+ \marginparwidth-\marginparsep}%
+ \else\ifnum\@panelconfig=2 % right panel
+ \setlength{\oddsidemargin}{0in}%
+ \setlength{\textwidth}%
+ {\paperwidth-\@panelwidth-\@panelsep-%
+ \oddsidemargin-\marginparwidth-\marginparsep}%
+ \else
+ \useFullWidthForPaper
+ \fi\fi\fi
+ \fi\fi
+}
+% \end{macrocode}
+%
+% \subsection{\texorpdfstring{\protect\cs{centertextonpage}}{\CMD{centertextonpage}}}
+%
+% \begin{macro}{\centertextonpage}
+% This is a companion command to the options \texttt{centertitlepage} and \texttt{center\-title\-page\-full}.
+% The command centers the body of the text on the page when the \texttt{forpaper} option is in effect.
+% \changes{v4.4}{2012/08/26}{Added the command \string\cs{centertextonpage}}
+% \begin{macrocode}
+\newcommand{\centertextonpage}{%
+ \ifeqforpaper\AtBeginDocument{\web@centertextonpage}\fi}
+\def\web@centertextonpage{%
+ \setlength{\oddsidemargin}{\paperwidth-\textwidth-2in}%
+ \oddsidemargin=.5\oddsidemargin
+ \evensidemargin=\oddsidemargin
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Web Colors}
+% The original colors of web style back in the 1990s.
+% \begin{macrocode}
+\definecolor{webgreen}{rgb}{0,.5,0}
+\definecolor{webbrown}{rgb}{.6,0,0}
+\definecolor{webyellow}{rgb}{0.98,0.92,0.73}
+\definecolor{webgray}{rgb}{.753,.753,.753}
+\definecolor{webgrey}{rgb}{.753,.753,.753}
+\definecolor{webblue}{rgb}{0,0,.8}
+% \end{macrocode}
+% These definitions are taken from pdfscreen.sty, by Radhakrishnan C. V. These are
+% part of the 216 Web friendly colors.
+% \begin{macrocode}
+\definecolor{wheat}{rgb}{.96, .87, .70}
+\definecolor{oldlace}{rgb}{.992, .96187, .902}
+\definecolor{snow}{rgb}{1, .98, .98}
+\definecolor{ghostwhite}{rgb}{.973, .973, 1}
+\definecolor{cornsilk}{rgb}{1, .973, .863}
+\definecolor{honeydew}{rgb}{.941, 1, .941}
+\definecolor{lavenderdark}{rgb}{.8, .8, .9529411}
+\definecolor{lavender}{rgb}{.902, .902, .980}
+\definecolor{lightblue}{rgb}{.8, .8, .95}
+\definecolor{lightgray}{rgb}{.827, .827, .827}
+\definecolor{lightsteelblue}{rgb}{.690, .769, .871}
+\definecolor{lightturquoise}{rgb}{.686, .933, .933}
+\definecolor{darkgreen}{rgb}{.0, .392, .0}
+\definecolor{yellowgreen}{rgb}{.604, .804, .196}
+\definecolor{vlightblue}{rgb}{.88, .85, .95}
+\definecolor{khaki}{rgb}{.741, .718, .42}
+% \end{macrocode}
+% \subsection{Redefine Table of Contents}
+% Redefine the table of contents.
+%
+% If the user asks for the \texttt{latextoc} option, but wants bullets, we
+% adjust things so the bullets look good.
+% \begin{macrocode}
+\ifx\web@latextoc\web@YES\ifx\web@bullets\web@YES%
+ \@ifundefined{chapter} {%
+ \renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{1.2em}}
+ }{%
+ \renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{1.2em}}
+ }%
+\fi\fi
+% \end{macrocode}
+% \begin{macrocode}
+\def\tocColor#1{\def\web@tocColor{#1}\def\aeb@toccolor{#1}}
+\tocColor{blue}
+% \end{macrocode}
+% Before we begin to redefined the table of contents, let's save the old
+% definition:
+%\changes{v3.3a}{2006/06/25}
+%{
+% Added the command \cs{tocColor} to define the color of the table of
+% contents heading. The argument of \cs{tocColor} is a named color.
+%}
+% \begin{macrocode}
+\newcommand{\allowHeadingsTocPage}{\let\web@Tocpagestyle\@gobble}
+\def\web@Tocpagestyle#1{#1}
+\let\web@latextoc@save\tableofcontents
+\ifx\web@bullets\web@YES
+\def\tableofcontents
+{%
+ \global\let\insertwebtoc\insert@webtoc
+ \def\contentsname{\web@toc}%
+ \pdfbookmark[1]{\web@toc}{toc}%
+ \web@Tocpagestyle{\thispagestyle{empty}}%
+ \markright{{\normalfont\small \web@toc\ (\web@continued)}}%
+ \@ifundefined{sectionToc}{%
+ \begin{center}\hypertarget{webtoc}{}%
+ \normalfont\bfseries\Large\color{\web@tocColor}%
+ \contentsname
+ \end{center}
+ }{\sectionToc{\web@toc}}\par
+ \ifx\web@latextoc\web@YES
+ \@starttoc{toc}% LaTeX toc listing with page numbers
+ \else
+ \noindent\webtableofcontents
+ \fi
+ \newpage
+}
+\else
+ \PackageInfo{web}{No Bullets Requested}
+ \def\tableofcontents{%
+ \begingroup
+ \def\contentsname{\web@toc}%
+ \let\web@save@mkboth\@mkboth
+ \def\@mkboth{\protect\hypertarget{webtoc}{}\web@save@mkboth}%
+ \ifx\web@finalDot\@empty\else
+ \def\numberline##1{\hb@xt@\@tempdima{##1.\hfil}}\fi
+ \web@latextoc@save
+ \endgroup\newpage
+ }
+ \renewcommand\subsubsection{\renewcommand{\@seccntformat}[1]{%
+ \@nameuse{the##1}\web@finalDot\enspace}
+ \@startsection{subsubsection}{3}{\z@}%
+ {-2ex\@plus -1ex \@minus -.2ex}{.5ex \@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries}}
+ \renewcommand*{\thesubsubsection}
+ {\thesubsection.\arabic{subsubsection}}
+\fi
+% \end{macrocode}
+% \DescribeMacro{\widestNumber}\DescribeMacro{\tocIndent}
+% \DescribeMacro{\tocIndentByNumber} These are used for
+% setting the amount of indentation for the \cs{webtableofcontents}
+% \begin{macrocode}
+\def\widestNumber#1{%
+ \def\widest@Number{#1\ }}
+\widestNumber{0.0.}
+\newcommand{\tocIndent}[1]{\def\toc@indent{#1}}
+\tocIndent{20pt}
+\def\tocIndentByNumber#1{{%
+ \settowidth{\@tempdima}{\normalfont\textbf{#1\ }}%
+ \xdef\toc@indent{\the\@tempdima}%
+}}
+\tocIndentByNumber{00.}
+% \end{macrocode}
+% The following are legacy definitions.
+% \begin{macrocode}
+\let\tocindent\tocIndent
+\let\tocindentByNumber\tocIndentByNumber
+% \end{macrocode}
+% \DescribeMacro{\webtableofcontents} is the table of contents for
+% the \texttt{web} package.
+% \begin{macrocode}
+\def\webtableofcontents
+{%
+ \begingroup
+% \end{macrocode}
+% Sample line from .aux
+%\begin{verbatim}
+% \contentsline {section}{\numberline {1}Introduction}{4}{section.1}
+% \contentsline {section}{\numberline {}References}{56}{section*.1}
+% #1 #2 #3
+%\end{verbatim}
+% \begin{macrocode}
+ \global\let\isChapter\web@NO
+ \parskip0pt\parindent\toc@indent\relax
+ \settowidth{\@tempdima}{\normalfont
+ \textbf{\widest@Number}}%
+ \@tempdimb\@tempdima
+ \advance\@tempdimb by\parindent
+ \edef\web@subsubSecIndent{\the\@tempdimb}%
+ \def\par{\endgraf\leftskip=0pt}%
+ \let\numberline\web@numberline
+ \let\contentsline\web@contentsline
+ \def\web@section##1##2##3{\web@parse##1\\%
+ \web@toc@section{##1}{##2}{##3}}%
+ \def\web@subsection##1##2##3{\web@parse##1\\%
+ \web@toc@subsection{##1}{##2}{##3}}%
+ \def\web@subsubsection##1##2##3{\web@parse##1\\%
+ \web@toc@subsubsection{##1}{##2}{##3}}%
+ \def\web@part##1##2##3{\web@toc@part{##1}{##2}{##3}}%
+ \def\web@chapter##1##2##3{\web@parse##1\\%
+ \web@toc@chapter{##1}{##2}{##3}}%
+ \@starttoc{toc}%
+ \setlength{\@tempdimb}{\ifx\isChapter\web@YES
+ \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
+ \leftskip\@tempdimb
+ \par\endgroup
+}
+% \end{macrocode}
+% \begin{macro}{\web@toc@part}
+% \begin{macro}{\web@toc@chapter}
+% \begin{macro}{\web@toc@section}
+% \begin{macro}{\web@toc@subsection}
+% \begin{macro}{\web@toc@subsubsection}
+% The following determine the formatting commands of the various sections,
+% including parts and chapter.
+% \begin{macrocode}
+\def\web@numberline#1{\makebox[0pt]{#1\enspace}}%
+\def\web@contentsline#1#2#3#4{%
+ \@nameuse{web@#1}{#2}{#3}{#4}}%
+\def\web@parse#1#2#3\\{%
+ \def\web@title{#3}\def\numberline{#2}}%
+\def\web@toc@part#1#2#3{\par\noindent
+ {\bfseries\hyperlink{#3}{#1}}\par\smallskip}
+\def\web@toc@chapter#1#2#3{\global\let\isChapter\web@YES
+ \par\mbox{}{\bfseries\makebox[0pt][r]{\hyperlink{#3}%
+ {\numberline\web@finalDot}\space}\web@title}\par\smallskip
+}
+\def\web@toc@section#1#2#3{\penalty-500\par
+ \hspace*{\if\isChapter y\parindent\else0pt\fi}\mbox{}{\bfseries
+ \ifx\numberline\@empty
+ \@ifundefined{d@DingToc}{\hyperlink{#3}{\web@title}}
+ {%
+ \ifx\d@DingToc\@empty
+ \hyperlink{#3}{\web@title}%
+ \else
+ \if\aeb@use@section@numbers0\relax
+ \makebox[0pt][r]{\color{\d@DingTocColor}%
+ \d@DingToc\space}\hyperlink{#3}{\web@title}%
+ \else
+ \hyperlink{#3}{\web@title}%
+ \fi
+ \fi
+ }%
+ \else
+ \makebox[0pt][r]{\hyperlink{#3}{%
+ \numberline\web@finalDot}\space}\web@title
+ \fi}\endgraf
+}%
+\def\web@toc@subsection#1#2#3{\par
+ \setlength{\@tempdimb}{\ifx\isChapter\web@YES
+ \parindent+\@tempdima\else\@tempdima\fi}%
+ \penalty-50 \hspace*{\@tempdimb}\mbox{}{\bfseries
+ \ifx\numberline\@empty
+ \@ifundefined{dd@DingToc}{\hyperlink{#3}{\web@title}}
+ {%
+ \ifx\dd@DingToc\@empty
+ \hyperlink{#3}{\web@title}%
+ \else
+ \makebox[0pt][r]{\color{\dd@DingTocColor}%
+ \dd@DingToc\space}\hyperlink{#3}{\web@title}%
+ \fi
+ }%
+ \else
+ \makebox[0pt][r]{\makebox[\@tempdima][l]%
+ {\hyperlink{#3}{\numberline\web@finalDot}}}\web@title
+ \fi}\endgraf
+}%
+\def\web@toc@subsubsection#1#2#3{%
+ \def\numberline{\strut$\bullet$}%
+ \setlength{\@tempdimb}{\ifx\isChapter\web@YES
+ \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
+ \leftskip\@tempdimb\noindent\unskip\mbox{}\penalty-50
+ \@ifundefined{ddd@DingToc}{}{%
+ \if\aeb@use@section@numbers0\relax\ifx\ddd@DingToc\@empty\else
+ \def\numberline{\color{\ddd@DingTocColor}\strut\ddd@DingToc}%
+\fi\fi}\hyperlink{#3}{\numberline}~\web@title\
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%\subsection{Template Building and Management}
+% The Template, or overlay, capability of the Web Package depends on the \LaTeX{} Packages
+% \textsf{everyshi.dtx}, by Martin Schr\"oder, and \textsf{eso-pic.dtx}, by Rolf Niepraschk.
+%
+% As with pdfscreen, by Radhakrishnan C. V., we shall have two options, \texttt{leftpanel}
+% and \texttt{rightpanel}. Below we define two commands \cs{template} and \cs{paneltemplate}:
+% \cs{template} overlays a background onto the text portion of the screen and
+% \cs{paneltemplate} overlays onto the panel portion of the screen.
+% If a panel option has not been taken, and \cs{template} has been specified, it will overlay the entire
+% screen.
+%
+% Templates, or overlays, are available only for the
+% \texttt{dvipsone}, \texttt{dvips}, and \texttt{pdftex} options.
+%
+% \subsubsection{The Text Screen Template}
+% These commands define and manage the text screen templates.
+%\par\medskip\noindent
+% \cs{web@textTemplate} will be a macro that holds all commands for building the text template.
+% Initially it is set to \cs{@empty}. Text template commands are added using
+% \cs{AddToTextTemplate}. Since we are using \textsf{eso-pic}, template objects are placed in the
+% background using the \cs{put} command of the picture environment. The \cs{AddToTemplate}, defined below,
+% does exactly that.
+% \begin{macrocode}
+\let\web@textTemplate\@empty
+\newcommand{\@AddToTextTemplate}{\g@addto@macro\web@textTemplate}
+% \end{macrocode}
+% \begin{macro}{\template}
+% Define a graphic file here that will be inserted into the
+% background. The command has two parameters, the first of which
+% is optional. Use any of the \emph{boolean keys} of the
+% \cs{includegraphics} command. Do not use the \texttt{width} or
+% \texttt{height} keys in this optional argument. For example,
+%\begin{verbatim}
+% \template[hiresbb]{myBG}
+%\end{verbatim}
+% Causes the driver to import the graphic using the high resolution bounding
+% box.
+% It is assumed that a graphic defined by \cs{template} is intended to fill the entire
+% background. The command \cs{template} defines \cs{web@template}, which is a text macro
+% that actually holds the name of the current graphic.
+% \begin{macrocode}
+\newcommand{\template}[2][]
+{%
+ \ifweb@allowtemplates
+ \def\web@argi{#1}\ifx\web@argi\@empty
+ \xdef\web@template@opt@args{\web@addtotemplateArgs}%
+ \else\xdef\web@template@opt@args{\web@addtotemplateArgs,#1}%
+ \fi\gdef\web@template{#2}%
+ \fi
+}
+% \end{macrocode}
+% The text macro \cs{web@template} holds the name of the current graphic. It starts off as
+% \cs{@empty}.
+% \begin{macrocode}
+\let\web@template\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\addtotemplateArgs}
+% \begin{macro}{\cleartemplateArgs}
+% These commands can be used to globally effect the argument list
+% of the \cs{template} command. To always use the hires bounding
+% box for all templates, use \verb!\addtotemplateArgs{hiresbb}!.
+% The other command clears the current argument list.
+% \begin{macrocode}
+\def\addtotemplateArgs#1{\gdef\web@addtotemplateArgs{#1}}
+\def\cleartemplateArgs{\global\let\web@addtotemplateArgs=\@empty}
+\let\web@addtotemplateArgs\@empty
+\let\text@scaletype\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\textBgColor}
+% Use this command to define a background color for the text screen; for example,
+% |\textBgColor{webyellow}|. The argument of \cs{textBgColor} is a named color defined
+% by the \cs{definecolor} command of the \textsf{color} package.
+% \begin{macrocode}
+\newcommand{\textBgColor}[1]{\gdef\web@textBgColor{#1}}
+\let\web@textBgColor\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AddToTemplate}
+% General purpose command for adding objects to the background of the text screen region; it is
+% this command that a document author should use, rather than \cs{@AddToTextTemplate}. The one
+% parameter is one or more text/graphics commands, for those who want to create their own unique
+% background.
+% \begin{macrocode}
+\let\listAddToTemplates\@empty
+\newcommand{\AddToTemplate}[1]
+{%
+ \global\w@csarg\let{eqTmpl#1}\web@YES
+ {\toks@=\expandafter{\listAddToTemplates}%
+ \xdef\listAddToTemplates{\the\toks@\noexpand\\{#1}}}%
+ \ifweb@allowtemplates
+ \@AddToTextTemplate{%
+ \w@csarg\ifx{eqTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@textX,0){\@nameuse{#1}}%
+ \fi
+ }%
+ \else
+ \w@csarg\ifx{#1}\BGColorAndGraphic
+ \@AddToTextTemplate{%
+ \w@csarg\ifx{eqTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@textX,0){\@nameuse{#1}}%
+ \fi
+ }%
+ \fi
+ \w@csarg\ifx{#1}\BGColorAndGraphicFullWidth
+ \@AddToTextTemplate{%
+ \w@csarg\ifx{eqTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@textX,0){\@nameuse{#1}}%
+ \fi
+ }%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\BGColorAndGraphic}
+% Insert a background color or a page filling graphic. Fills the page with either the value of
+% \cs{web@textBgColor}, which is access by the user through \cs{textBgColor}, or by the value of
+% \cs{web@template}, which is defined by the author using \cs{template}
+%\changes{v6.0e}{2015/08/16}{Added the command \cs{placeTemplateInLayer}}
+% \DescribeMacro\placeTemplateInLayer is a command that inserts \cs{xBld} and
+% \cs{eBld} command pairs of \textsf{aeb\_pro}. The latter package requires
+% the \texttt{uselayers} option.
+% The parameters are \texttt{[\#1]} the name of the layer to be used as the background
+% (the default is \texttt{webTextBG}); \texttt{\#2} are the optional options of \cs{xBld},
+% passing the empty argument (\verb~{}~) yields the default for \cs{xBld}.
+% \begin{macrocode}
+\newcommand\placeTemplateInLayer[2][webTextBG]{%
+ \@ifpackageloaded{aeb_pro}
+ {\@ifundefined{xBld}{\PackageWarning{web}
+ {The uselayers option
+ of aeb_pro is\MessageBreak required with
+ \string\placeTemplateInLayer}}
+ {\def\b@webTextLayer{\xBld[#2]{#1}}%
+ \def\e@webTextLayer{\eBld}}}%
+ {\PackageWarning{web}{\string\placeTemplateInLayer\space
+ requires the\MessageBreak aeb_pro package}}%
+}
+\let\b@webTextLayer\@empty \let\e@webTextLayer\@empty
+\newcommand{\BGColorAndGraphic}{%
+% \end{macrocode}
+% If \cs{web@textBgColor} is empty, we replace \cs{colorbox} with an \cs{mbox}, and gobble
+% up the first argument of the \cs{colorbox}, which is the color. This is what \cs{gobblembox}
+% does, it gobbles up the next token, and inserts a \cs{mbox}.
+% \begin{macrocode}
+ \b@webTextLayer\web@colorbox@w@transparency{\web@textBgColor}%
+ {%
+ \parbox[b][\paperheight]{\textscreenwidth}%
+ {%
+ \ifx\web@template\@empty
+ \hfill\vfill
+ \else
+ \hfuzz=1pt\vfuzz=1pt\expandafter
+ \includegraphics\expandafter[\web@template@opt@args,%
+ width=\textscreenwidth,height=\paperheight]%
+ {\web@template}
+ \fi
+ }%
+ }\e@webTextLayer
+}
+% \end{macrocode}
+% \end{macro}
+% Now use \cs{AddToTemplate} to add in the background color and graphic.
+% \begin{macrocode}
+\AddToTemplate{BGColorAndGraphic}
+% \end{macrocode}
+% \subsubsection{Panel Template}
+% These are the commands that help build the (navigation) panel. We separate the task of building
+% the panel into two separate operations: (1) build the background color/graphic; (2) build the
+% material that lays on top of this background, such as a logo and navigation buttons, etc. The former
+% is created by the \cs{panelBgColor} and \cs{paneltemplate} commands, respectively. The later is
+% build by the \cs{buildpanel}.
+% \begin{macrocode}
+\let\web@panelTemplate\@empty
+\newcommand{\@AddToPanelTemplate}{\g@addto@macro\web@panelTemplate}
+% \end{macrocode}
+% \begin{macro}{\AddToPanelTemplate}
+% General purpose command for adding objects to the background of the text screen region; it is
+% this command that a document author should use, rather than \cs{@AddToPanelTemplate}. The one
+% parameter is one or more text/graphics commands, for those who want to create their own unique
+% background.
+% \begin{macrocode}
+\let\listAddToPanelTemplates=\@empty
+\newcommand{\AddToPanelTemplate}[1]
+{%
+ \global\w@csarg\let{eqPanTmpl#1}\web@YES
+ {\toks@=\expandafter{\listAddToPanelTemplates}%
+ \xdef\listAddToPanelTemplates{\the\toks@\noexpand\\{#1}}}%
+ \ifweb@allowtemplates
+ \@AddToPanelTemplate{%
+ \w@csarg\ifx{eqPanTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@panelX,0){\@nameuse{#1}}\fi
+ }%
+ \else
+ \w@csarg\ifx{#1}\stdPanelBG
+ \@AddToPanelTemplate{%
+ \w@csarg\ifx{eqPanTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@panelX,0){\@nameuse{#1}}\fi
+ }%
+ \fi
+ \w@csarg\ifx{#1}\stdbldpanel
+ \@AddToPanelTemplate{%
+ \w@csarg\ifx{eqPanTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@panelX,0){\@nameuse{#1}}\fi
+ }%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\paneltemplate}
+% This is the command a document author uses to define a graphic for the background of the
+% panel. As with \cs{template}, there is an optional argument that takes an `n'; in this,
+% case, we use \texttt{natwidth} and \texttt{natheight} as the width and height parameters
+% in \cs{includegraphics}.
+% \begin{macrocode}
+\newcommand{\paneltemplate}[2][]
+{%
+ \ifweb@allowtemplates\def\web@argi{#1}%
+ \ifx\web@argi\@empty
+ \edef\web@paneltemplate@opt@args{%
+ \web@addtopaneltemplateArgs}%
+ \else
+ \edef\web@paneltemplate@opt@args{%
+ \web@addtopaneltemplateArgs,#1}%
+ \fi\gdef\web@paneltemplate{#2}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \cs{web@paneltemplate} is the text macro that holds the name of the current graphic to be used
+% as the background for the panel.
+% \begin{macrocode}
+\let\web@paneltemplate\@empty
+% \end{macrocode}
+% \begin{macro}{\addtopaneltemplateArgs}
+% \begin{macro}{\clearpaneltemplateArgs}
+% Same as \cs{addtopaneltemplateArgs} and \cs{cleartemplateArgs}, but for the panel.
+% \begin{macrocode}
+\def\addtopaneltemplateArgs#1{\gdef\web@addtopaneltemplateArgs{#1}}
+\def\clearpaneltemplateArgs{%
+ \global\let\web@addtopaneltemplateArgs=\@empty}
+\let\web@addtopaneltemplateArgs=\@empty
+\let\panel@scaletype\@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\panelsep}
+% Amount of separation between the text screen and the panel screen. The default is $10\,\mbox{bp}$.
+% Use this command to override the default.
+% \begin{macrocode}
+\newcommand\panelsep[1]{\bgroup
+ \setlength\@tempdima{#1}%
+ \xdef\@panelsep{\the\@tempdima}\egroup}
+%\def\@panelsep{10bp}
+\panelsep{10bp}
+\def\panelSep{\@panelsep}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\panelwidth}
+% Use this command to set the width of the (navigation) panel. The navigation can be set three ways: (1)
+% as an optional parameter in the \cs{margins} command; (2) by the \cs{panelwidth} command;
+% or as the default value of $1$\,in, if no panel width is specified by (1) or (2). Example,
+% |\panelwidth{1in}|
+% \begin{macrocode}
+\newcommand{\panelwidth}[1]{%
+ \let\web@next\relax
+ \iftemplatesforpaper\else\ifnum\@panelconfig>0
+% \end{macrocode}
+% (2013/09/13) This command only has effect if there is a panel option and if the \cs{templates\-for\-paper}
+% option is not in effect.
+% \begin{macrocode}
+ \ifnum\@panelconfig=1 % left panel
+% \end{macrocode}
+% (2013/09/13) One of the problems that I've just overcome it with the \cs{panelwidth} command.
+% there was always problems about changing the widths of the panel. The solutions is to
+% reverse the current effects of the last \cs{InitLayout} before calling \cs{InitLayout}
+% with the new panel width. Seems to work. We do this for the left panel and the right panel.
+% \begin{macrocode}
+ \ifx\web@layout\web@YES
+ \addtolength{\textwidth}{\@panelwidth}%
+ \addtolength{\textwidth}{\@Rightmargin}%
+ \fi
+ \addtolength{\textwidth}{\@panelsep}%
+ \addtolength{\oddsidemargin}{-\@panelsep}%
+ \addtolength{\evensidemargin}{-\@panelsep}%
+ \addtolength{\textscreenwidth}{\@panelwidth}%
+ \fi
+ \ifnum\@panelconfig=2 % panel right
+ \ifx\web@layout\web@YES
+ \addtolength{\textwidth}{\@panelwidth}%
+ \addtolength{\textwidth}{\@Leftmargin}%
+ \fi
+ \addtolength{\textwidth}{\@panelsep}%
+ \addtolength{\textscreenwidth}{\@panelwidth}%
+ \fi
+% \end{macrocode}
+% Now record the new panel width and call \cs{InitLayout}
+% \begin{macrocode}
+ \setlength{\@panelwidth}{#1}%
+ \ifdim\@panelwidth<\web@minpanelwidth
+ \setlength{\@panelwidth}{\web@minpanelwidth}\fi
+ \def\web@next{\InitLayout}%
+ \fi\fi\web@next
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\newcommand{\panelBgColor}[1]{\gdef\web@panelBgColor{#1}}
+\let\web@panelBgColor\@empty
+% \end{macrocode}
+% This command builds the panel background: either a background
+% with color if \cs{panelBgColor} has been specified or a
+% background graphic, if \cs{paneltemplate} has been specified. It
+% is assumed that if the graphic is specified, then there is no
+% need for a background color.
+% \begin{macrocode}
+\newcommand\placePanelTemplateInLayer[2][webPanelBG]{%
+ \@ifpackageloaded{aeb_pro}
+ {\@ifundefined{xBld}{\PackageWarning{web}
+ {The uselayers option
+ of aeb_pro is\MessageBreak required with
+ \string\placePanelTemplateInLayer}}
+ {\def\b@webPanelLayer{\xBld[#2]{#1}}%
+ \def\e@webPanelLayer{\eBld}}}%
+ {\PackageWarning{web}{\string\placePanelTemplateInLayer\space
+ requires the\MessageBreak aeb_pro package}}%
+}
+\let\b@webPanelLayer\@empty \let\e@webPanelLayer\@empty
+\newcommand\stdPanelBG
+{%
+ \b@webPanelLayer\web@colorbox@w@transparency{\web@panelBgColor}%
+ {\parbox[b][\paperheight]{\@panelwidth}%
+ {\ifx\web@paneltemplate\@empty\hfill\vfill\else
+ \hfuzz=1pt\vfuzz=1pt\expandafter
+ \includegraphics\expandafter[\web@paneltemplate@opt@args,%
+ width=\@panelwidth,height=\paperheight]%
+ {\web@paneltemplate}\fi}}\e@webPanelLayer
+}
+% \end{macrocode}
+% Enter \cs{stdPanelBG} into the panel template stack. Any
+% other panel commands whether text or graphics, will be laid on
+% top of these. If you want to design your own background scheme,
+% you can always say define your own command, \cs{myBG}, similar to
+% \cs{stdPanelBG}, then say \verb+\let\stdPanelBG=\myBG+
+% \begin{macrocode}
+\AddToPanelTemplate{stdPanelBG}
+% \end{macrocode}
+% \begin{macro}{\buildpanel}
+% This is the user interface to building a panel, at least the material that is above
+% the background. We just feed the argument as the expansion text for \cs{stdbldpanel}.
+% The \cs{stdbldpanel} is the macro that actually builds the objects on top of the
+% background.
+% \begin{macrocode}
+\newcommand{\buildpanel}[1]
+{%
+ \gdef\stdbldpanel
+ {%
+ \parbox[b][\paperheight]{\@panelwidth}%
+ {%
+ \normalsfcodes\normalfont\normalsize
+ \spaceskip=0pt\xspaceskip=0pt
+ \par\medskip\vfil
+ \centering#1%
+ \par\medskip\vfil
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% Set default value for \cs{stdbldpanel}
+% \begin{macrocode}
+\let\stdbldpanel\@empty
+% \end{macrocode}
+% Now add this to the panel template.
+% \begin{macrocode}
+\AddToPanelTemplate{stdbldpanel}
+% \end{macrocode}
+% (2013/01/05)\DescribeMacro{\useStandPanel} is a panel design in three sections:
+% top (for logo); middle (for other content); bottom (for navigation panel)
+% \begin{macrocode}
+\newcommand{\useStandardPanel}{%
+ \buildpanel{%
+ \web@panel@top
+ \par\vspace{\stretch{1}}%
+ \web@panel@middle
+ \par\vspace{\stretch{1}}%
+ \web@panel@bottom
+ }%
+}
+\newcommand{\panelTop}[1]{\def\web@panel@top{#1}}
+\panelTop{}
+\newcommand{\panelMiddle}[1]{\def\web@panel@middle{#1}}
+\panelMiddle{}
+\newcommand{\panelBottom}[1]{\def\web@panel@bottom{#1}}
+\panelBottom{\panelNaviGroup}
+% \end{macrocode}
+% \subsubsection{Clearing Templates}
+% \begin{macro}{\ClearTextTemplate}
+% Clear the text template
+% \begin{macrocode}
+\newcommand{\ClearTextTemplate}
+{%
+ \global\let\web@textBgColor\@empty
+ \global\let\web@template\@empty
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ClearPanelTemplate}
+% Clear the panel template
+% \begin{macrocode}
+\newcommand{\ClearPanelTemplate}
+{%
+ \global\let\web@panelBgColor\@empty
+ \global\let\web@paneltemplate\@empty
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ClearBuildPanel}
+% Clear the panel template
+% \begin{macrocode}
+\newcommand{\ClearBuildPanel}
+ {\global\let\stdbldpanel\@empty}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\ClearAllTemplates}
+% Clear both text and panel templates
+% \begin{macrocode}
+\newcommand{\ClearAllTemplates}
+{%
+ \ClearTextTemplate
+ \ClearPanelTemplate
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\newcommand{\ClearTextTemplateBuffer}
+ {\global\let\web@textTemplate\@empty}
+\newcommand{\ClearPanelTemplateBuffer}
+ {\global\let\web@panelTemplate\@empty}
+% \end{macrocode}
+% (06/15/05) The following two commands save and clears all design elements, and enables
+% the restoring of the design state.
+% \begin{macro}{\saveElements}
+% \begin{macro}{\saveClearElements}
+% This command saves the various basic elements (\cs{web@textBgColor}, \cs{web@\-template}, \cs{stdbldpanel},
+% \cs{web@panelBgColor} and \cs{web@paneltemplate}) which frees them up to be redefined by
+% \cs{textBgColor}, \cs{template}, \cs{buildpanel}, \cs{panelBgColor}, and \cs{paneltemplate},
+% respectively. The twist here is that even though these basic elements have been redefined,
+% there original ones can be restored using \cs{restoreElements}.
+% \begin{macrocode}
+\newcommand{\saveElements}[1]
+{%
+ \begingroup
+ \global\w@csarg\let{web@SaveTmpls#1}\@empty
+ \toks@={}%
+ \def\web@addtoSaveToks##1{%
+ \edef\web@let{\global\expandafter
+ \let\expandafter\noexpand\csname#1##1\endcsname=%
+ \expandafter\noexpand\csname##1\endcsname}%
+ \web@let
+ \edef\web@SaveTmpls{\the\toks@\noexpand\\{##1}%
+ \expandafter\noexpand\csname#1##1\endcsname}%
+ \toks@=\expandafter{\web@SaveTmpls}%
+ }%
+ \web@addtoSaveToks{web@textBgColor}%
+ \web@addtoSaveToks{web@template}%
+ \web@addtoSaveToks{stdbldpanel}%
+ \web@addtoSaveToks{web@panelBgColor}%
+ \web@addtoSaveToks{web@paneltemplate}%
+ \w@csarg\xdef{web@SaveTmpls#1}{\the\toks@}%
+ \endgroup
+}
+\newcommand{\saveClearElements}[1]{%
+ \saveElements{#1}\ClearAllTemplates\ClearBuildPanel
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\restoreElements}
+% Restore the templates and background colors earlier saved by the command \cs{saveClearTemplates}, under
+% a name.
+% \begin{macrocode}
+\newcommand{\restoreElements}[1]{%
+ \ClearAllTemplates\ClearBuildPanel
+ \begingroup
+ \toks@=\expandafter{\csname web@SaveTmpls#1\endcsname}%
+ \def\\##1##2{\global\w@csarg\let{##1}=##2}\the\toks@
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\disableScreens}
+% This command disables all templates that are enabled and
+% saves the list under a name, the required argument. Includes
+% only those templates added in by \cs{AddToTemplate}.
+% \changes{v6.0k}{2016/06/14}{Fixed error in def of \string\cs{\string\cs{}}}
+% \begin{macrocode}
+\newcommand{\disableScreens}[1]
+{%
+ \begingroup
+ \toks@=\expandafter{\listAddToTemplates}%
+ \toks2={}%
+ \def\\##1{\w@csarg\ifx{eqTmpl##1}\web@YES
+ \disableTemplate{##1}%
+ \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
+ \toks2=\expandafter{\web@saveAddTo}\fi}%
+ \the\toks@
+ \endgroup
+ \w@csarg\let{web@DisabledTmpls#1}\web@saveAddTo
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\restoreScreens}
+% This command re-enables all templates that are disabled earlier
+% under a name, the required argument. Includes
+% only those templates added in by \cs{AddToTemplate}.
+% \begin{macrocode}
+\newcommand{\restoreScreens}[1]
+{%
+ \begingroup
+ \toks@=\expandafter{\csname web@DisabledTmpls#1\endcsname}%
+ \def\\##1{\enableTemplate{##1}}\the\toks@
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\disablePanels}
+% This command disables all panel templates that are enabled and
+% saves the list under a name, the required argument. Includes
+% only those templates added in by \cs{AddToPanelTemplate}.
+% \begin{macrocode}
+\newcommand{\disablePanels}[1]
+{%
+ \begingroup
+ \toks@ = \expandafter{\listAddToPanelTemplates}%
+ \toks2 = {}%
+ \def\\##1{\w@csarg\ifx{eqPanTmpl##1}\web@YES
+ \disablePanelTemplate{##1}%
+ \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
+ \toks2 =\expandafter{\web@saveAddTo}\fi}%
+ \the\toks@
+ \endgroup
+ \global\w@csarg\let{web@DisabledPanelTmpls#1}\web@saveAddTo
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\restorePanels}
+% This command re-enables all panel templates that are disabled earlier
+% under a name, the required argument. Includes
+% only those templates added in by \cs{AddToPanelTemplate}.
+% \begin{macrocode}
+\newcommand{\restorePanels}[1]
+{%
+ \begingroup
+ \toks@=\expandafter{\csname web@DisabledPanelTmpls#1\endcsname}%
+ \def\\##1{\enablePanelTemplate{##1}}\the\toks@
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\newcommand{\disableTemplate}[1]{{%
+ \global\w@csarg\let{eqTmpl#1}\web@NO}}
+\newcommand{\enableTemplate}[1]{{%
+ \global\w@csarg\let{eqTmpl#1}\web@YES}}
+\newcommand{\disablePanelTemplate}[1]{{%
+ \global\w@csarg\let{eqPanTmpl#1}\web@NO}}
+\newcommand{\enablePanelTemplate}[1]{{%
+ \global\w@csarg\let{eqPanTmpl#1}\web@YES}}
+% \end{macrocode}
+% \subsubsection{Support for full-width pages}
+% (2013/01/10) When one of the panel options is taken the with of the text screen is reduced.
+% Here we provide simple support for creating a full-width page.
+% \begin{macrocode}
+\let\fullscreenwidthadj\@empty
+\def\web@leftMargAdj{0pt}
+\def\web@rightMargAdj{0pt}
+% \end{macrocode}
+% We calculate some adjustment values that depend on whether we are left or right panel.
+% \begin{macrocode}
+\def\calculatefullwidth{%
+ \ifeqforpaper
+ \let\fullscreenwidthadj\@empty
+ \else
+ \ifnum\@panelconfig=1\relax % leftpanel
+ \bgroup
+ \setlength{\@tempdima}{-\@panelwidth-\@panelsep+\@Leftmargin}%
+ \xdef\web@leftMargAdj{\the\@tempdima}%
+ \setlength{\@tempdima}{-\@panelwidth-\@panelsep+\@Rightmargin}%
+ \xdef\web@rightMargAdj{\the\@tempdima}%
+ \egroup
+ \def\fullscreenwidthadj{\hspace{\web@leftMargAdj}}%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \DescribeMacro{\makeFullwidthhead}
+% Extend the running header all the way across the full width page;
+% positioning depends on left or right panel and value of
+% \cs{fullscreenwidthadj}.
+% \begin{macrocode}
+\newcommand{\makeFullwidthhead}{%
+ \global\let\web@save@oddhead\@oddhead
+ \renewcommand{\@oddhead}{\fullscreenwidthadj
+ \hbox to\fullscreenwidth{\normalfont\footnotesize
+ \web@headerhook\web@lhead\hfil\web@chead\hfil
+ \web@rightheader}\hss}%
+}
+% \end{macrocode}
+% \DescribeMacro{\restoreSavedHead} restores previously saved header
+% (saved by \cs{makeFullwidthhead}.
+% \begin{macrocode}
+\newcommand{\restoreSavedHead}{%
+ \global\let\@oddhead\web@save@oddhead
+ \let\web@save@oddhead\@empty
+}
+% \end{macrocode}
+% \begin{environment}{Fullwidthtext}
+% This is a list environment with parameters set to extend each line
+% to the full-width of the page. Note the environment name is initially
+% capitalized; this is to avoid clash with a similarly named environment
+% in the \textsf{eqexam} package.
+% \begin{macrocode}
+\def\webNotPaneledWarning{%
+ The Fullwidthtext environment is valid only\MessageBreak
+ for a paneled document, ignoring this\MessageBreak
+ environment}
+\newenvironment{Fullwidthtext}{%
+ \ifnum\@panelconfig=0\relax
+ \PackageWarning{web}{\webNotPaneledWarning}%
+ \let\web@next\relax
+ \else
+ \def\web@next{%
+ \enableTemplate{BGColorAndGraphicFullWidth}%
+ \list{}{%
+ \setlength{\textwidth}{\fullscreenwidth}%
+ \setlength{\linewidth}{\fullscreenwidth}%
+ \setlength{\itemindent}{0pt}\setlength{\itemsep}{0pt}%
+ \setlength{\topsep}{0pt}\setlength{\parsep}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+ \setlength{\leftmargin}{\web@leftMargAdj}%
+ \setlength{\rightmargin}{-\web@rightMargAdj}%
+ }\item\relax}%
+ \fi\web@next
+}{%
+ \ifnum\@panelconfig=0\relax\let\web@next\relax\else
+ \def\web@next{\endlist\newpage
+ \disableTemplate{BGColorAndGraphicFullWidth}}%
+ \fi\web@next
+}
+% \end{macrocode}
+% \end{environment}
+% \DescribeMacro{\pushToFullWidthPage} sends a paneled document into
+% ``full page mode.''
+% \begin{macrocode}
+\newcommand{\pushToFullWidthPage}{%
+ \ifnum\@panelconfig>0\relax
+ \disableScreens{gofullwidth}%
+ \disablePanels{gofullwidth}%
+ \makeFullwidthhead
+ \let\web@save@footwrapper\webfootwrapper
+ \def\webfootwrapper{\fullscreenwidthadj
+ \makebox[\fullscreenwidth]}%
+ \fi
+ \begin{Fullwidthtext}
+}
+\newcommand{\popFromFullWidthPage}{%
+ \end{Fullwidthtext}
+ \ifnum\@panelconfig>0\relax
+ \restoreScreens{gofullwidth}%
+ \restorePanels{gofullwidth}%
+ \restoreSavedHead
+ \let\webfootwrapper\web@save@footwrapper
+ \fi
+}
+% \end{macrocode}
+% \DescribeMacro{\addtofullwidthtemplateArgs}\DescribeMacro{\clearfullwidthtemplateArgs}
+% are similar to their template and panel template counterparts.
+% \begin{macrocode}
+\def\addtofullwidthtemplateArgs#1{%
+ \gdef\web@addtofullwidthtemplateArgs{#1}}
+\def\clearfullwidthtemplateArgs{%
+ \global\let\web@addtofullwidthtemplateArgs\@empty}
+\let\web@addtofullwidthtemplateArgs\@empty
+% \end{macrocode}
+% \DescribeMacro{\fullwidthBgColor} sets to background color for
+% the full-width page.
+% \begin{macrocode}
+\newcommand{\fullwidthBgColor}[1]{\gdef\web@fullwidthBgColor{#1}}
+\let\web@fullwidthBgColor\@empty
+% \end{macrocode}
+% \begin{macrocode}
+\let\web@fullwidthtemplate\@empty
+\newcommand{\fullwidthtemplate}[2][]
+{%
+ \ifweb@allowtemplates
+ \def\web@arg{#1}\ifx\web@argi\@empty
+ \xdef\web@fullwidthtemplate@opt@args
+ {\web@addtofullwidthtemplateArgs}%
+ \else
+ \xdef\web@fullwidthtemplate@opt@args
+ {\web@addtofullwidthtemplateArgs,#1}%
+ \fi\gdef\web@fullwidthtemplate{#2}%
+ \fi
+}
+% \end{macrocode}
+% \DescribeMacro{\B{GColorAndGraphicFullWidth}} handles the full-width page
+% when left or right panels are in effect.
+% \begin{macrocode}
+\newcommand\BGColorAndGraphicFullWidth
+{%
+ \put(-\@textX,0){%
+ \web@colorbox@w@transparency{\web@fullwidthBgColor}%
+ {%
+ \parbox[b][\paperheight]{\paperwidth}%
+ {%
+ \ifx\web@fullwidthtemplate\@empty
+ \hfill\vfill
+ \else
+ \hfuzz=1pt\vfuzz=1pt
+ \expandafter\includegraphics\expandafter
+ [\web@fullwidthtemplate@opt@args,%
+ width=\paperwidth,height=\paperheight]%
+ {\web@fullwidthtemplate}%
+ \fi
+ }%
+ }%
+ }%
+}
+% \end{macrocode}
+% Here we ``register'' this template with the ``template handler'', and then
+% disable it. It's now ready for use: It will be used when a page goes into
+% full-width from a left or right panel option.
+% \begin{macrocode}
+\AddToTemplate{BGColorAndGraphicFullWidth}
+\disableTemplate{BGColorAndGraphicFullWidth}
+% \end{macrocode}
+% \subsubsection{\texorpdfstring{\protect\cs{AddToShipoutPicture}}{\CMD{AddToShipoutPicture}}}
+% \begin{macrocode}
+\ifnum\@usetemplates>0
+ \ifnum\@panelconfig>0
+% \end{macrocode}
+% If the user calls for a left or right panel, then we issue separate templates.
+% \begin{macrocode}
+ \AtBeginDocument{%
+ \AddToShipoutPicture{\web@textTemplate\web@panelTemplate}}
+ \else
+% \end{macrocode}
+% otherwise, we use only the \cs{web@textTemplate}
+% \begin{macrocode}
+ \AtBeginDocument{\AddToShipoutPicture{\web@textTemplate}}
+ \fi
+\fi
+% \end{macrocode}
+% \begin{macrocode}
+\raggedbottom
+% \end{macrocode}
+% If the \texttt{pro} or \texttt{extended} option is called, we load this code here.
+% \begin{macrocode}
+\ifx\webpro@loaded\web@YES\expandafter\loadwebpro\fi
+%</package>
+%<*webpro>
+% \end{macrocode}
+% \section{The \texttt{pro} or \texttt{extended} option}
+% We introduce some commands to make life easier for the user.
+% \begin{macrocode}
+\RequirePackage{pifont}
+% \end{macrocode}
+% \subsection{\texorpdfstring{\protect\cs{DeclareDocInfo}}{\CMD{DeclareDocInfo}}}
+% \begin{macro}{\DeclareDocInfo}
+% Here is a \texttt{xkeyval} interface to may of the text macros that are defined
+% in the \texttt{web} package. This command should appear in the preamble.
+%
+%\medskip\noindent Example usage:
+%\begin{verbatim}
+%\DeclareDocInfo{%
+% title=My First Presentation,
+% author=D. P. Speaker,
+% university=My University,
+% email=dpspeaker@myu.edu,
+% talkdate={Dec.\ 17, \the\year},
+% talksite=The Talking University,
+% subject=The Art of Talking
+%}
+%\end{verbatim}
+% \begin{macrocode}
+\newcommand{\DeclareDocInfo}[1]{\setkeys{aebDocInfo}{#1}%
+ \ifx\web@talkdate@value\@empty\else\let\webversion\webtalkdate\fi}
+\@onlypreamble\DeclareDocInfo
+% \end{macrocode}
+% \end{macro}
+%\paragraph*{Definition of keys for \cs{DeclareDocInfo}.}
+% The following keys are recognized by \cs{DeclareDocInfo}:
+% \IndexKey{title}^^A
+% \IndexKey{author}^^A
+% \IndexKey{university}^^A
+% \IndexKey{email}^^A
+% \IndexKey{talksite}^^A
+% \IndexKey{talkdate}\par
+% \IndexKey{talkdateLabel}
+% \IndexKey{version}
+% \IndexKey{versionLabel}
+% \IndexKey{subject}\par
+% \IndexKey{keywords}
+% \IndexKey{copyrightyears}
+% \IndexKey{prepared}
+% \IndexKey{preparedLabel}
+% \begin{macrocode}
+\define@key{aebDocInfo}{title}[]{\title{#1}}
+\define@key{aebDocInfo}{author}[]{\author{#1}}
+\define@key{aebDocInfo}{university}[]{\university{#1}}
+\define@key{aebDocInfo}{email}[]{\email{#1}}
+\define@key{aebDocInfo}{talksite}[]{\talksite{#1}}
+\define@key{aebDocInfo}{talkdate}[]{\talkdate{#1}}
+\define@key{aebDocInfo}{talkdateLabel}[Presented:]{\talkdateLabel{#1}}
+\define@key{aebDocInfo}{version}[]{\version{#1}}
+\define@key{aebDocInfo}{versionLabel}[Version]{\versionLabel{#1}}
+\define@key{aebDocInfo}{subject}[]{\subject{#1}}
+\define@key{aebDocInfo}{keywords}[]{\keywords{#1}}
+\define@key{aebDocInfo}{copyrightyears}[]{\copyrightyears{#1}}
+\define@key{aebDocInfo}{prepared}[]{\prepared{#1}}
+\define@key{aebDocInfo}{preparedLabel}[]{\preparedLabel{#1}}
+% \end{macrocode}
+% \subparagraph*{Keys that use \textsf{aebxmp}}
+% These keys are supported if the \textsf{aebxmp} package is loaded; otherwise,
+% the keys are ignored.
+% \IndexKey{Title}
+% \IndexKey{Authors}
+% \IndexKey{Subject}
+% \IndexKey{Keywords}
+% \IndexKey{lang}\par
+% \IndexKey{copyrightStatus}
+% \IndexKey{copyrightNotice}
+% \IndexKey{copyrightInfoURL}
+% \IndexKey{authortitle}
+% \IndexKey{descriptionwriter}
+% \IndexKey{customProperties}
+% \changes{v4.2h}{2012/01/13}{Added new keys for this set}
+% \begin{macrocode}
+\define@key{aebDocInfo}{Title}[]%
+ {\@ifpackageloaded{aebxmp}{\Title{#1}}{}}
+\define@key{aebDocInfo}{authors}[]%
+ {\@ifpackageloaded{aebxmp}{\Authors{#1}}{}}
+\define@key{aebDocInfo}{Subject}[]%
+ {\@ifpackageloaded{aebxmp}{\Subject{#1}}{\subject{#1}}}
+\define@key{aebDocInfo}{Keywords}[]%
+ {\@ifpackageloaded{aebxmp}{\Keywords{#1}}{\keywords{#1}}}
+\define@key{aebDocInfo}{lang}[]%
+ {\@ifpackageloaded{aebxmp}{\metaLang{#1}}{}}
+\define@key{aebDocInfo}{copyrightStatus}[]%
+ {\@ifpackageloaded{aebxmp}{\copyrightStatus{#1}}{}}
+\define@key{aebDocInfo}{copyrightNotice}[]%
+ {\@ifpackageloaded{aebxmp}{\copyrightNotice{#1}}{}}
+\define@key{aebDocInfo}{copyrightInfoURL}[]%
+ {\@ifpackageloaded{aebxmp}{\copyrightInfoURL{#1}}{}}
+\define@key{aebDocInfo}{authortitle}[]%
+ {\@ifpackageloaded{aebxmp}{\authortitle{#1}}{}}
+\define@key{aebDocInfo}{descriptionwriter}[]%
+ {\@ifpackageloaded{aebxmp}{\descriptionwriter{#1}}{}}
+\define@key{aebDocInfo}{customProperties}[]%
+ {\@ifpackageloaded{aebxmp}{\customProperties{#1}}{}}
+% \end{macrocode}
+%
+% \subsection{\texorpdfstring{\protect\cs{DeclarePageLayout}}{\CMD{DeclarePageLayout}}}
+%
+% We develop a command that takes key-value pairs for setting the
+% basic page layout parameters
+%
+% \begin{macro}{\DeclarePageLayout}
+% The \cs{DeclarePageLayout} is used to set the margins, screensize,
+% and many other facets of the web page layout. Some settings are
+% ignored when the \texttt{forpaper} option is in effect.
+%
+%\medskip\noindent Example usage:
+%\begin{verbatim}
+%\DeclarePageLayout
+%{%
+% screensizeOf=designv,
+% margins={.75in}{.75in}{.75in}{.75in},
+% topmargin=40pt,
+% webfootskip=30pt
+%}
+%\end{verbatim}
+% This sets the \texttt{\texttt{screensize}} to the same as the
+% \texttt{screensize} of \texttt{designv}. We then adjust the
+% margins, the \texttt{topmargin} key is used to position the running
+% header, and the \texttt{webfootskip} key positions the running
+% footer.
+% \begin{macrocode}
+\newcommand{\DeclarePageLayout}[1]{\save@prtscr
+ \setkeys{web@pl}{topmargin,headheight,marginparsep,%
+ marginparwidth,marginparpush,webfootskip}%
+% \setkeys{web@pl}{#1}%
+ \protected@edef\web@temp{\noexpand\setkeys{web@pl}{#1}}%
+ \web@temp\save@prtscr
+% \setkeys{web@pl}{#1}%
+ \ifx\web@pl@screensize\@empty\else
+ \expandafter\screensize\web@pl@screensize\fi
+ \ifx\web@pl@margins\@empty\else
+ \expandafter\margins\web@pl@margins\fi
+ \ifeqforpaper\else
+ \ifdim\@Leftmargin<\@Rightmargin
+ \ifdim\marginparwidth>\@Leftmargin
+ \setlength{\marginparwidth}
+ {\@Leftmargin-2\marginparsep}%
+ \fi
+ \else
+ \ifdim\marginparwidth>\@Rightmargin
+ \setlength{\marginparwidth}
+ {\@Rightmargin-2\marginparsep}%
+ \fi
+ \fi
+ \fi
+ \ifeqforpaper\else
+ \ifdim\@Bottommargin<\web@footskip\relax\PackageError{web}{%
+ Error in the value of the webfootskip key\MessageBreak
+ of the \string\DeclarePageLayout\space command.\MessageBreak
+ The bottom margin must be larger then\MessageBreak
+ the value of webfootskip}{%
+ Increase the size of the bottom margin,\MessageBreak
+ or decrease the value of webfootskip.}\else
+ \fi
+ \fi
+}
+\@onlypreamble\DeclarePageLayout
+% \end{macrocode}
+%
+%\paragraph*{Definition of keys for \cs{DeclarePageLayout}}
+%The \cs{DeclarePageLayout} command takes a number of key-values.
+%\IndexKey{screensize}^^A
+%\IndexKey{margins}^^A
+%\IndexKey{design}^^A
+%\IndexKey{headheight}^^A
+% \begin{macrocode}
+\define@key{web@pl}{screensize}[]{\def\web@pl@screensize{#1}}
+\let\web@pl@screensize\@empty
+\define@key{web@pl}{margins}[]{\def\web@pl@margins{#1}}
+\let\web@pl@margins\@empty
+\define@choicekey+{web@pl}{design}[\val\nr]{designi,designii,%
+ designiii,designiv,designv,designvi,designvii,designviii,designix}{%
+ \ifcase\nr\relax
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{3.736in}{4.67in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{5in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{5in}{6in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4in}{5in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{6in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.17in}{4.67in}\or
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{7.5in}{10in}\or
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6.67in}\or
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6in}\fi
+ }{\PackageWarning{webpro}{%
+ Bad choice for design, use designi--designvix. Try again}}
+\define@choicekey+{web@pl}{screensizeOf}[\val\nr]{designi,designii,%
+ designiii,designiv,designv,designvi,designvii,designviii,designix}{%
+ \ifcase\nr\relax
+ \screensize{3.736in}{4.67in}\or
+ \screensize{4.5in}{5in}\or
+ \screensize{5in}{6in}\or
+ \screensize{4in}{5in}\or
+ \screensize{4.5in}{6in}\or
+ \screensize{4.17in}{4.67in}\or
+ \screensize{7.5in}{10in}\or
+ \screensize{3.75in}{6.67in}\or
+ \screensize{3.75in}{6in}\fi
+ }{\PackageWarning{webpro}{%
+ Bad choice for screensizeOf, use designi--designvix. Try again}}
+\define@key{web@pl}{headheight}[8pt]{\def\websetheadheight{#1}}
+% \end{macrocode}
+%Key-values of \cs{DeclarePageLayout} continues.
+%\IndexKey{topmargin}
+%\IndexKey{textwidth}
+%\IndexKey{textheight}
+%\IndexKey{oddsidemargin}
+%\IndexKey{evensidemargin}
+% \begin{macrocode}
+\define@key{web@pl}{topmargin}[\prtscr{\the\topmargin}{8pt}]{%
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \edef\web@argi{\prtscr{\the\topmargin}{8pt}}\fi
+ \ifeqforpaper
+ \setlength{\topmargin}{\web@argi}%
+ \else
+ \setlength{\web@Topmargin}{\web@argi}%
+ \fi}
+\define@key{web@pl}{textwidth}[345pt]{\setlength{\textwidth}{#1}}
+\define@key{web@pl}{textheight}[43\baselineskip]%
+ {\setlength{\textheight}{#1}}
+\define@key{web@pl}{oddsidemargin}[63pt]%
+ {\setlength{\oddsidemargin}{#1}}
+\define@key{web@pl}{evensidemargin}[63pt]%
+ {\setlength{\evensidemargin}{#1}}
+% \end{macrocode}
+% More key-values of \cs{DeclarePageLayout}.
+%\IndexKey{marginparsep}
+%\IndexKey{marginparwidth}
+%\IndexKey{marginparpush}
+%\IndexKey{webfootskip}
+%\IndexKey{footskip}
+%\IndexKey{panelwidth}
+%\IndexKey{panelsep}
+%\IndexKey{additionalheadsep}
+% \begin{macrocode}
+\define@key{web@pl}{marginparsep}[\prtscr{\the\marginparsep}{11pt}]{%
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \edef\web@argi{\prtscr{\the\marginparsep}{11pt}}\fi
+ \setlength{\marginparsep}{\web@argi}}
+\define@key{web@pl}{marginparwidth}%
+ [\prtscr{\the\marginparwidth}{.25in}]{%
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \edef\web@argi{\prtscr{\the\marginparwidth}{.25in}}\fi
+ \setlength{\marginparwidth}{\web@argi}}
+\define@key{web@pl}{marginparpush}[5pt]{%
+ \setlength{\marginparpush}{#1}}
+\define@key{web@pl}{webfootskip}[4pt]{%
+ \def\web@footskip{#1}}
+\define@key{web@pl}{footskip}[30pt]{\setlength{\footskip}{#1}}
+\define@key{web@pl}{panelwidth}[1in]{\panelwidth{#1}}
+\define@key{web@pl}{panelsep}[10pt]{\panelsep{#1}}
+\define@key{web@pl}{additionalheadsep}[0pt]%
+ {\def\web@additionalheadsep{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{\texorpdfstring{\protect\cs{maketitle}}{\CMD{maketitle}}}
+%
+% The title page consists of three parts, the top, the middle. and the bottom.
+% Each of these three has distinct content. Above the top is the preamble
+% and below the bottom is the postamble.
+% \begin{macro}{\topTitlePage}
+% \begin{macro}{\topTitlePageProportion}
+% The following command represents the top of the title page.
+% \begin{macrocode}
+\renewcommand{\topTitlePage}
+{%
+% \end{macrocode}
+% Have \cs{webuniversity} centered across the top of the title page, by
+% default. The alignment is set by \cs{halignuniversity}. The UI for this
+% value is the \texttt{xhalign} key of \cs{universityLayout}.
+% \begin{macrocode}
+ \vglue\web@aboveTopTitleSkip
+ \noindent\makebox[\linewidth][\halignuniversity]{\parbox{%
+ \hproportionwebuniversity\linewidth}%
+ {\sectionUniversity{\webuniversity}}}%
+ \par\ifeqforpaper\else\minimumskip\fi
+ \vspace{\stretch{1}}%
+% \end{macrocode}
+% Have \cs{webtitle} centered across the top of the title page, by
+% default. The alignment is set by \cs{haligntitle}. The UI for this
+% value is the \texttt{xhalign} key of \cs{titleLayout}.
+% \begin{macrocode}
+ \noindent\makebox[\linewidth][\haligntitle]%
+ {\parbox{\hproportionwebtitle\linewidth}%
+ {\sectionTitle{\webtitle}}}%
+ \par\ifeqforpaper\vspace{2\baselineskip}\else
+ \minimumskip\vspace{\stretch{1}}\fi
+% \end{macrocode}
+% Have \cs{webauthor} centered across the top of the title page, by
+% default. The alignment is set by \cs{halignauthor}. The UI for this
+% value is the \texttt{xhalign} key of \cs{authorLayout}.
+% \begin{macrocode}
+ \noindent\makebox[\linewidth][\halignauthor]%
+ {\parbox{\hproportionwebauthor\linewidth}%
+ {\sectionAuthor{\webauthor}}}
+ \par\ifeqforpaper\vspace{2\baselineskip}\else
+ \minimumskip\vspace{\stretch{1}}\fi
+}
+\newcommand{\topTitlePageProportion}[1]{\def\titleauthorproportion{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\titlepageTrailer}
+% The bottom of the title page consisting of the contents of the macros
+% \cs{web@\-copy\-right}, \cs{webcopyrightyears}, \cs{webmail},
+% \cs{aeb@talksite}, \cs{aeb@Prepared} and \cs{webversion}. These are all
+% populated through the \cs{DelcareDocInfo} command.
+% \begin{macrocode}
+\renewcommand{\titlepageTrailer}
+{%
+ \webtpTrailerWrapper{\makebox[\web@tp@linewidth]{%
+ \parbox{\web@tp@linewidth}{%
+ \ifx\tpTrailer@textcolor\@empty\else
+ \color{\tpTrailer@textcolor}\fi\web@tpTrailer@formatting
+ \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
+ \maketitle@trailer@ll\hfill\maketitle@trailer@lr
+ }}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\DesignTitlePageTrailer}
+% A user interface to entering info in the title page trailer, other than
+% the default.
+% \begin{macrocode}
+\def\maketitle@trailer@ul{\web@copyright\ \web@copyright@symbol\
+ \webcopyrightyears\ \thewebemail}
+\def\maketitle@trailer@ll{\aeb@Prepared}
+\def\maketitle@trailer@ur{\aeb@talksite}
+\def\maketitle@trailer@lr{\webversion}
+\let\webtpTrailerWrapper\relax
+\let\web@tpTrailerBgColor\@empty
+\let\web@tpTrailerBorderColor\@empty
+\let\tpTrailer@textcolor\@empty
+\let\web@tpTrailer@graphic\@empty
+\let\web@tpTrailer@namedgraphic\@empty
+\let\web@tpTrailer@formatting\@empty
+\def\web@tpTrailer@raise{0pt}
+\def\web@tp@linewidth{\linewidth}
+% \end{macrocode}
+% Key-values of \cmd{\DesignTitlePageTrailer}
+% \IndexKey{ul}
+% \IndexKey{ll}
+% \IndexKey{ur}
+% \IndexKey{lr}
+% \IndexKey{textColor}
+% \IndexKey{bgColor}
+% \begin{macrocode}
+\define@key{tpTrailer}{ul}{\def\maketitle@trailer@ul{#1}}
+\define@key{tpTrailer}{ll}{\def\maketitle@trailer@ll{#1}}
+\define@key{tpTrailer}{ur}{\def\maketitle@trailer@ur{#1}}
+\define@key{tpTrailer}{lr}{\def\maketitle@trailer@lr{#1}}
+\define@key{tpTrailer}{textColor}{\def\tpTrailer@textcolor{#1}}
+\define@key{tpTrailer}{bgColor}{\def\web@tpTrailerBgColor{#1}}
+% \end{macrocode}
+% Key-values of \cmd{\DesignTitlePageTrailer}
+% \IndexKey{borderColor}
+% \IndexKey{fboxsep}
+% \IndexKey{fboxrule}
+% \IndexKey{graphic}
+% \IndexKey{namedgraphic}
+% \begin{macrocode}
+\define@key{tpTrailer}{borderColor}{\def\web@tpTrailerBorderColor{#1}}
+\define@key{tpTrailer}{fboxsep}{\def\web@tpTrailerfboxsep{#1}}
+\define@key{tpTrailer}{fboxrule}{\def\web@tpTrailerfboxrule{#1}}
+\define@key{tpTrailer}{graphic}{\def\web@tpTrailer@graphic{#1}}
+\define@key{tpTrailer}{namedgraphic}{%
+ \def\web@tpTrailer@namedgraphic{#1}}
+% \end{macrocode}
+% Key-values of \cmd{\DesignTitlePageTrailer}
+% \IndexKey{fontSize}
+% \IndexKey{formatting}
+% \IndexKey{raise}
+% \begin{macrocode}
+\define@key{tpTrailer}{fontSize}{\renewcommand{\trailerFontSize}{#1}}
+\define@key{tpTrailer}{formatting}{\def\web@tpTrailer@formatting{#1}}
+\define@key{tpTrailer}{raise}{\def\web@tpTrailer@raise{#1}}
+\newcommand{\DesignTitlePageTrailer}[1]
+{%
+ \setkeys{tpTrailer}{fboxsep=3pt,fboxrule=.4pt}%
+ \setkeys{tpTrailer}{#1}%
+ \setlength{\fboxsep}{\web@tpTrailerfboxsep}%
+ \setlength{\fboxrule}{\web@tpTrailerfboxrule}%
+ \let\web@tp@graphic\web@NO
+ \ifx\web@tpTrailer@graphic\@empty
+ \ifx\web@tpTrailer@namedgraphic\@empty\else
+ \let\web@tp@graphic\web@YES\fi
+ \else\let\web@tp@graphic\web@YES\fi
+ \ifx\web@tp@graphic\web@NO\relax
+ \ifx\web@tpTrailerBgColor\@empty
+ \def\grfbox@spec##1{##1}%
+ \else
+ \ifx\web@tpTrailerBorderColor\@empty
+ \def\web@tp@linewidth{\linewidth-2\fboxsep}%
+ \def\grfbox@spec{\colorbox{\web@tpTrailerBgColor}}%
+ \else
+ \def\web@tp@linewidth{%
+ \linewidth-2\fboxsep-2\fboxrule}%
+ \def\grfbox@spec{\fcolorbox{\web@tpTrailerBorderColor}%
+ {\web@tpTrailerBgColor}}%
+ \fi
+ \fi
+ \def\webtpTrailerWrapper##1{\smash{\raisebox
+ {\web@tpTrailer@raise}{\grfbox@spec{##1}}}}%
+ \else
+ \@ifundefined{graphicxbox}{\begingroup
+ \gdef\webtpTrailerWrapper##1{%
+ \edef\web@tmp@opt{\ifx\web@tpTrailer@namedgraphic\@empty\else
+ name=\web@tpTrailer@namedgraphic,\fi}%
+ \def\web@tp@linewidth{\linewidth-2\fboxsep}%
+ \setbox0=\hbox{##1}%
+ \noindent\makebox[0pt][l]{%
+ \smash{\raisebox{-\dp0-\fboxsep+\web@tpTrailer@raise}{%
+ \expandafter\includegraphics\expandafter[\web@tmp@opt
+ width=\wd0+2\fboxsep,%
+ height=\dp0+\ht0+2\fboxsep]{\web@tpTrailer@graphic}}%
+ }}\kern\fboxsep\smash{%
+ \raisebox{\web@tpTrailer@raise}{\unhbox0\relax}}%
+ }%
+ \endgroup}{%
+ \xdef\grfbox@spec{%
+ \ifx\web@tpTrailerBorderColor\@empty
+ \noexpand\graphicxbox\else
+ \noexpand\fgraphicxbox{\web@tpTrailerBorderColor}\fi
+ \ifx\web@tpTrailer@namedgraphic\@empty\else
+ [name=\web@tpTrailer@namedgraphic]\fi}%
+ \gdef\webtpTrailerWrapper##1{%
+ \edef\web@tp@linewidth{%
+ \linewidth-2\fboxsep\ifx\web@tpTrailerBorderColor\@empty
+ \else-2\fboxrule\fi}%
+ \smash{\raisebox{\web@tpTrailer@raise}{%
+ \grfbox@spec{\web@tpTrailer@graphic}{##1}}}}%
+ }%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\maketitle}
+% This is a revision of the \textsf{web} \cs{maketitle} defined above.
+% This \cs{maketitle} incorporates into it the new commands defined
+% in the \texttt{pro} option section: \cs{sectionUniversity}, \cs{sectionTitle}
+% and \cs{sectionAuthor}.
+% \begin{macrocode}
+\renewcommand{\web@maketitle}
+{%
+% \end{macrocode}
+% If not for paper, restrict title and author to \cs{titleauthorproportion} of the page,
+% This value can be set by direct definition, or through the helper command
+% \cs{topTitlePageProportion}.
+% \begin{macrocode}
+ \maketitlepreamble
+% \end{macrocode}
+% \begin{macrocode}
+ \ifeqforpaper\vspace*{2\baselineskip}\else
+ \vbox to\titleauthorproportion\textheight\bgroup\fi
+% \end{macrocode}
+% \begin{macrocode}
+ \topTitlePage
+% \end{macrocode}
+% \begin{macrocode}
+ \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
+% \end{macrocode}
+% Now place the \cs{optionalpagematter}
+% \begin{macrocode}
+ \begingroup\par
+ \aboveOPMvspace
+ \noindent\parbox{\linewidth}{\optionalpagematter}%
+ \par\endgroup
+ \par\vspace{\stretch{1}}
+% \end{macrocode}
+% Insert the directory, as desired.
+% \begin{macrocode}
+ \ifx\web@directory@option\web@YES\web@directory@hook\webdirectory\fi
+ \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}
+% \end{macrocode}
+% Insert the ``bottom matter''.
+% \begin{macrocode}
+ \vfill\noindent\begingroup\trailerFontSize\titlepageTrailer
+ \par\endgroup
+ \maketitlepostamble
+}
+\let\web@maketitle@save\maketitle
+\let\maketitle\web@maketitle
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\preparedLabel}
+% Some text labeling for the first page, may be redefined. The revision label
+% is defined in the \textsf{Web} package.
+% \begin{macrocode}
+\def\preparedLabel#1{\def\web@revision{#1}}
+\preparedLabel{Prepared:}
+\def\prepared#1{\def\argi{#1}\ifx\argi\@empty
+ \else\def\aeb@prepared{#1}\fi}
+\def\aeb@prepared{\@date}
+\def\aeb@Prepared{\web@revision\ \aeb@prepared}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\talkdate}
+% \begin{macro}{\talksite}
+% Here we redefine the \cs{version} from the \textsf{web} package
+% to use it as the date of the talk. We also define \cs{talksite}
+% to describe where this talk occurred.
+% \begin{macrocode}
+\def\talkdate#1{\gdef\web@talkdate@value{#1}%
+ \edef\webtalkdate{\ifx\web@talkdate@value\@empty
+ \else\noexpand\web@talkdatelabel\ #1\fi}}
+\let\web@talkdate@value\@empty
+%\def\talkdateLabel#1{\def\web@versionlabel{#1}}
+\def\talkdateLabel#1{\def\web@talkdatelabel{#1}}
+\talkdateLabel{Presented:}
+\def\talksite#1{\def\aeb@talksite{#1}}
+\talksite{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Options for section headings}
+% We define the options (key-values) for the section headings
+% \IndexKey{reset}
+% \begin{macrocode}
+\define@choicekey+{aebsection}{reset}[\val\nr]{font,all}{%
+ \ifcase\nr\relax
+ \aeb@reset@section@fonts\or
+ \aeb@reset@section@all\fi
+}{\PackageWarning{webpro}{Bad choice for reset, permissible values
+ are font and all. Try again}}
+% \end{macrocode}
+% Section headings
+% \IndexKey{type}
+% \IndexKey{special}
+% \begin{macrocode}
+\define@choicekey+{aebsection}{type}[\val\nr]{section,subsection,%
+ subsubsection,university,title,author,toc}%
+{%
+ \edef\aeb@section@type{#1}%
+ \edef\aeb@section@typeIndex{\nr}%
+}{}{}
+\define@key{aebsection}{special}{%
+ \edef\aeb@temp@expand{%
+ \noexpand\XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
+ \aeb@temp@expand{shadow,framebox,colorbox,fcolorbox,frameboxfit,%
+ colorboxfit,fcolorboxfit,colorboxfitrule,custom,default}%
+{%
+ \ifcase\nr\relax
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@shadowHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@fcolorboxHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxfitHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxfitHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}
+ \aeb@fcolorboxfitHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}
+ \aeb@colorboxfitruleHead\or
+ \edef\aeb@temp{\noexpand\def\expandafter\noexpand
+ \csname aeb@\aeb@section@type @special\endcsname{\expandafter
+ \noexpand\csname aeb@\aeb@section@type @customHead\endcsname}}%
+ \aeb@temp\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\@empty\fi
+}{%
+ \PackageWarning{webpro}{Bad choice for special, permissible values
+ are shadow, framebox, colorbox, fcolorbox, custom and default.
+ Try again}}%
+}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}%
+{university}{title}{author}{toc}\do{%
+ \w@csarg\let{aeb@\@@tmp @special}\@empty}
+% \end{macrocode}
+% \begin{macro}{\customSecHead}
+% \begin{macro}{\customSubsecHead}
+% \begin{macro}{\customSubsubsecHead}
+% \begin{macro}{\customUniversity}
+% \begin{macro}{\customTitle}
+% \begin{macro}{\customAuthor}
+% \begin{macro}{\customToc}
+% Here is a user friendly interface to redefining custom heads.
+% \begin{macrocode}
+\newcommand{\customSecHead}[1]{\def\aeb@section@customHead##1{#1}}
+\newcommand{\customSubsecHead}[1]{\def\aeb@subsection@customHead##1{#1}}
+\newcommand{\customSubsubsecHead}[1]
+ {\def\aeb@subsubsection@customHead##1{#1}}
+\newcommand{\customUniversity}[1]{\def\aeb@university@customHead##1{#1}}
+\newcommand{\customTitle}[1]{\def\aeb@title@customHead##1{#1}}
+\newcommand{\customAuthor}[1]{\def\aeb@author@customHead##1{#1}}
+\newcommand{\customToc}[1]{\def\aeb@toc@customHead##1{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% The command\DescribeMacro{\aeb@frameboxHead} for \texttt{special=framebox}.
+% \begin{macrocode}
+\def\aeb@frameboxHead#1{%
+ \begingroup
+ \@tempdima=\linewidth
+ \advance\@tempdima-2\fboxsep
+ \advance\@tempdima-2\fboxrule
+ \edef\@@aeb@sectionframecolor
+ {\@nameuse{aeb@\aeb@section@type framecolor}}%
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \setbox0\vbox{\hsize=\@tempdima#1}\color{\@@aeb@sectionframecolor}%
+ \framebox{\color{\@@aeb@sectioncolor}\copy0}%
+ \endgroup
+}
+% \end{macrocode}
+% The command\DescribeMacro{\aeb@colorboxHead} for \texttt{special=colorbox}.
+% \begin{macrocode}
+\def\aeb@colorboxHead#1{%
+ \begingroup
+ \@tempdima=\linewidth
+ \advance\@tempdima-2\fboxsep
+ \setbox0\vbox{\hsize=\@tempdima#1}%
+ \edef\@@aeb@sectionbgcolor
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ \colorbox{\@@aeb@sectionbgcolor}{\copy0}%
+ \endgroup
+}
+% \end{macrocode}
+% The command\DescribeMacro{\aeb@fcolorboxHead} for \texttt{special=fcolorbox}.
+% \begin{macrocode}
+\def\aeb@fcolorboxHead#1{%
+ \begingroup
+ \@tempdima=\linewidth
+ \advance\@tempdima-2\fboxsep
+ \advance\@tempdima-2\fboxrule
+ \setbox0\vbox{\hsize=\@tempdima#1}%
+ \edef\@@aeb@sectionbgcolor
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ \fcolorbox{\aeb@sectionframecolor}%
+ {\@@aeb@sectionbgcolor}{\copy0}
+ \endgroup
+}
+% \end{macrocode}
+% The command\DescribeMacro{\aeb@frameboxfitHead} for \texttt{special=frameboxfit}.
+% \begin{macrocode}
+\def\aeb@frameboxfitHead#1{%
+ \begingroup
+ \edef\@@aeb@sectionframecolor
+ {\@nameuse{aeb@\aeb@section@type framecolor}}%
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \vbox{\color{\@@aeb@sectionframecolor}%
+ \framebox{\color{\@@aeb@sectioncolor}#1}}%
+ \endgroup
+}
+% \end{macrocode}
+% The command\DescribeMacro{\aeb@colorboxfitHead} for \texttt{special=colorboxfit}.
+% \begin{macrocode}
+\def\aeb@colorboxfitHead#1{%
+ \begingroup
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \edef\@@aeb@sectionbgcolor
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ \vbox{\colorbox{\@@aeb@sectionbgcolor}%
+ {\color{\@@aeb@sectioncolor}#1}}%
+ \endgroup
+}
+% \end{macrocode}
+% The command\DescribeMacro{\aeb@fcolorboxfitHead} for \texttt{special=fcolorboxfit}.
+% \begin{macrocode}
+\def\aeb@fcolorboxfitHead#1{%
+ \begingroup
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \edef\@@aeb@sectionbgcolor
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ \edef\@@aeb@sectionframecolor
+ {\@nameuse{aeb@\aeb@section@type framecolor}}%
+ \vbox{\fcolorbox{\@@aeb@sectionframecolor}{\@@aeb@sectionbgcolor}%
+ {\color{\@@aeb@sectioncolor}#1}}%
+ \endgroup
+}
+% \end{macrocode}
+% Here we define \DescribeMacro{\shadowhoffset}\cs{shadowhoffset} and
+% \DescribeMacro{\shadowvoffset}\cs{shadowvoffset} and give their defaults.
+% These are the offsets (horizontal and vertical) for creating a shadow effect.
+% \begin{macrocode}
+\def\shadowhoffset#1{\def\aeb@shadowhoffset{#1}}
+\shadowhoffset{.2ex}
+\def\shadowvoffset#1{\def\aeb@shadowvoffset{#1}}
+\shadowvoffset{-.2ex}
+% \end{macrocode}
+% The command\DescribeMacro{\aeb@shadowHead} for \texttt{special=shadow}.
+% \begin{macrocode}
+\def\aeb@shadowHead#1{% dps1
+ \begingroup
+ \edef\@@aeb@sectionshadowcolor
+ {\@nameuse{aeb@\aeb@section@type shadowcolor}}%
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \setbox0\vbox{\Shadowtrue\hsize=\linewidth #1}%
+ \wd0\z@\dp0\z@\relax\raisebox{\aeb@shadowvoffset}%
+ {\hbox to\z@{\kern\aeb@shadowhoffset%
+ \Shadowtrue\color{\@@aeb@sectionshadowcolor}
+ \box0\hss}}%
+ \setbox0\vbox{\Shadowfalse\hsize=\linewidth #1}\box0
+ \endgroup
+}
+% \end{macrocode}
+% \texttt{usefont}\IndexKey{usefont} allows for a custom shift in font for the title.
+% it takes four argument, each of which are enclosed in braces:
+%\begin{verbatim}
+% {<fontencoding>}{<fontfamily>}{<fontseries>}{<fontshape>}
+% {{<fontsize>}{<skip>}}
+%\end{verbatim}
+% \begin{macrocode}
+\define@key{aebsection}{usefont}{%
+ \w@csarg\def{aeb@\aeb@section@type @usefont}{\aeb@usefont#1}}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}
+{university}{title}{author}{toc}\do{%
+ \w@csarg\let{aeb@\@@tmp @usefont}\@empty}
+\def\aeb@usefont#1#2#3#4#5{\def\aeb@usefontargv{#5}%
+ \ifx\aeb@usefontargv\@empty
+% \end{macrocode}
+% If the fifth parameter is empty, no font size is specified, we'll
+% use the default sizes. We gobble up the next three tokens in the
+% definition of \cs{section}, excluding the token that sets size.
+% \begin{macrocode}
+ \def\aeb@next{\expandafter\@gobble\@gobbletwo}%
+ \else
+% \end{macrocode}
+% If the fifth parameter is not empty, font size is specified,
+% we'll gobble up the next four tokens in the
+% definition of \cs{section}, including the token that sets size.
+% \begin{macrocode}
+ \def\aeb@next{\expandafter\@gobbletwo\@gobbletwo}%
+ \fi
+ \fontencoding{#1}\fontfamily{#2}%
+ \fontseries{#3}\fontshape{#4}\ifx\aeb@usefontargv\@empty\else
+ \fontsize#5\fi\selectfont\aeb@next
+}
+% \end{macrocode}
+% Font related keys.\IndexKey{fontfamily}\IndexKey{fontseries}\IndexKey{fontshape}
+% \begin{macrocode}
+\define@key{aebsection}{fontfamily}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{rmfamily,sffamily,ttfamily}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontfamily}{\@nameuse{#1}}%
+}{\PackageWarning{webpro}{Bad choice for fontfamily, permissible values
+ are rmfamily, sffamily and ttfamily. Try again}}%
+}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
+{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontfamily}\aeb@defaultfamily}
+\define@key{aebsection}{fontseries}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{bfseries,mdseries}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontseries}{\@nameuse{#1}}%
+}{\PackageWarning{webpro}{Bad choice for fontseries, permissible values
+ are bfseries and mdseries. Try again}}%
+}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
+{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontseries}\bfseries}
+\define@key{aebsection}{fontshape}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{upshape,itshape,scshape,slshape}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontshape}{\@nameuse{#1}}%
+}{\PackageWarning{webpro}{Bad choice for fontshape, permissible values
+ are upshape, itshape, scshape and slshape. Try again}}%
+}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
+{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontshape}\upshape}
+\define@key{aebsection}{fontsize}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{tiny,scriptsize,footnotesize,%
+ small,normalsize,large,Large,LARGE,huge,Huge}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontsize}{\@nameuse{#1}}%
+}{\PackageWarning{webpro}{Bad choice for fontsize, permissible values
+ are tiny, scriptsize, footnotesize, small, normalsize,
+ large, Large, LARGE, huge and Huge. Try again}}%
+}
+\@tfor\@@tmp:={{section}{\normalsize}}{{subsection}{\normalsize}}%
+{{subsubsection}{\normalsize}}{{university}{\normalsize}}%
+{{title}{\large}}{{author}{\normalsize}}{{toc}{\small}}\do{%
+ \expandafter\getargs\@@tmp
+ \edef\aeb@temp{\global\noexpand
+ \let\expandafter\noexpand\csname aeb@\aeb@argi @fontsize\endcsname
+ \expandafter\noexpand\aeb@argii}\aeb@temp
+}
+% \end{macrocode}
+% Alignment related keys\IndexKey{halign}
+% \begin{macrocode}
+\define@key{aebsection}{halign}{%
+ \edef\aeb@temp@expand{%
+ \noexpand\XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
+ \aeb@temp@expand{l,c,r}{%
+ \ifcase\nr\relax
+ \w@csarg\let{aeb@\aeb@section@type @halign}\raggedright\or
+ \w@csarg\let{aeb@\aeb@section@type @halign}\centering\or
+ \w@csarg\let{aeb@\aeb@section@type @halign}\raggedleft\fi
+}{\PackageWarning{webpro}{Bad choice for halign, permissible values
+ are l, c and r. Try again}}%
+}
+\@tfor\@@tmp:={\aeb@section@halign\raggedright}
+{\aeb@subsection@halign\raggedright}
+{\aeb@subsubsection@halign\raggedright}
+{\aeb@university@halign\centering}
+{\aeb@title@halign\centering}{\aeb@author@halign\centering}%
+{\aeb@toc@halign\centering}\do
+{%
+ \expandafter\getargs\@@tmp
+ \edef\aeb@temp{\noexpand\let\expandafter\noexpand\aeb@argi
+ \expandafter\noexpand\aeb@argii}\aeb@temp
+}
+% \end{macrocode}
+% Color, rule, and ding related keys\IndexKey{ding}\IndexKey{color}\IndexKey{ruleheight}%
+% \IndexKey{ruleheigtht}\IndexKey{numdingcolor}
+% \begin{macrocode}
+\define@key{aebsection}{ding}{\if\aeb@use@section@numbers0
+ \webtoksi=\expandafter{\expandafter\protect
+ \expandafter\web@sel@sec@col\expandafter{\aeb@section@type}#1\ }%
+ \w@csarg\edef{aeb@\aeb@section@type Num}##1{\the\webtoksi}%
+ \else\PackageWarning{webpro}{The ding key is not available with a
+ section numbering system,\MessageBreak
+ ignoring request for a ding.}\fi
+}
+\define@key{aebsection}{color}{%
+ \w@csarg\def{aeb@\aeb@section@type color}{#1}}
+\define@key{aebsection}{ruleheight}{%
+ \w@csarg\def{aeb@\aeb@section@type ruleheight}{#1}}
+\define@key{aebsection}{numdingcolor}{%
+ \w@csarg\def{aeb@\aeb@section@type numdingcolor}{#1}}
+% \end{macrocode}
+% Section color defaults
+% \begin{macrocode}
+\def\aeb@sectioncolor{blue}
+\def\aeb@subsectioncolor{\aeb@sectioncolor}
+\def\aeb@subsubsectioncolor{\aeb@sectioncolor}
+% \end{macrocode}
+% Section color for numbers and dings
+% \begin{macrocode}
+\def\aeb@sectionnumdingcolor{\aeb@sectioncolor}
+\def\aeb@subsectionnumdingcolor{\aeb@sectioncolor}
+\def\aeb@subsubsectionnumdingcolor{\aeb@sectioncolor}
+% \end{macrocode}
+% Title page default colors
+% \begin{macrocode}
+\def\aeb@universitycolor{black}
+\def\aeb@universitynumdingcolor{\aeb@universitycolor}
+\def\aeb@titlecolor{blue}
+% \end{macrocode}
+% Title page default numbers and dings (not used, but need to be defined)
+% \begin{macrocode}
+\def\aeb@titlenumdingcolor{\aeb@titlecolor}
+\def\aeb@authorcolor{black}
+\def\aeb@authornumdingcolor{\aeb@authorcolor}
+% \end{macrocode}
+% Table of contents page defaults for colors and numbers
+% \begin{macrocode}
+\def\aeb@toccolor{blue}
+\def\aeb@tocnumdingcolor{\aeb@toccolor}
+% \end{macrocode}
+%Frame and shadow related keys\IndexKey{framecolor}%
+% \IndexKey{bgcolor}\IndexKey{shadowcolor}
+% \begin{macrocode}
+\define@key{aebsection}{framecolor}{%
+ \w@csarg\def{aeb@\aeb@section@type framecolor}{#1}}
+\def\aeb@sectionframecolor{blue}
+\def\aeb@subsectionframecolor{blue}
+\def\aeb@subsubsectionframecolor{blue}
+\def\aeb@universityframecolor{blue}
+\def\aeb@titleframecolor{blue}
+\def\aeb@authorframecolor{blue}
+\def\aeb@tocframecolor{blue}
+\define@key{aebsection}{bgcolor}{%
+ \w@csarg\def{aeb@\aeb@section@type bgcolor}{#1}}
+\def\aeb@sectionbgcolor{cornsilk}
+\def\aeb@subsectionbgcolor{cornsilk}
+\def\aeb@subsubsectionbgcolor{cornsilk}
+\def\aeb@authorbgcolor{cornsilk}
+\def\aeb@titlebgcolor{cornsilk}
+\def\aeb@authorbgcolor{cornsilk}
+\def\aeb@tocbgcolor{cornsilk}
+\define@key{aebsection}{shadowcolor}{%
+ \w@csarg\def{aeb@\aeb@section@type shadowcolor}{#1}}
+\def\aeb@sectionshadowcolor{black}
+\def\aeb@subsectionshadowcolor{black}
+\def\aeb@subsubsectionshadowcolor{black}
+\def\aeb@universityshadowcolor{black}
+\def\aeb@titleshadowcolor{black}
+\def\aeb@authorshadowcolor{black}
+\def\aeb@tocshadowcolor{black}
+% \end{macrocode}
+% Indent\IndexKey{indent}
+% \begin{macrocode}
+\define@key{aebsection}{indent}[0pt]{%
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \def\web@argi{0pt}\fi
+ \w@csarg\edef{aeb@\aeb@section@type @indent}{\web@argi}}
+\def\aeb@section@indent{\z@}
+\def\aeb@subsection@indent{\z@}
+\def\aeb@subsubsection@indent{\z@}
+\def\aeb@university@indent{\z@}
+\def\aeb@title@indent{\z@}
+\def\aeb@author@indent{\z@}
+\def\aeb@toc@indent{\z@}
+% \end{macrocode}
+%Other keys\IndexKey{beforeskip}\IndexKey{afterskip}
+% \begin{macrocode}
+\define@key{aebsection}{beforeskip}{%
+ \w@csarg\def{aeb@\aeb@section@type @beforeskip}{#1}}
+\def\aeb@section@beforeskip{-3ex\@plus -1ex \@minus-.2ex}
+\def\aeb@subsection@beforeskip{-2.5ex\@plus -1ex \@minus -.2ex}
+\def\aeb@subsubsection@beforeskip{-2ex\@plus -1ex \@minus -.2ex}
+\def\aeb@university@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
+\def\aeb@title@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
+\def\aeb@author@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
+\def\aeb@toc@beforeskip{-3ex\@plus -1ex \@minus-.2ex}
+\define@key{aebsection}{afterskip}{%
+ \w@csarg\def{aeb@\aeb@section@type @afterskip}{#1}}
+\def\aeb@section@afterskip{1ex\@plus .2ex}
+\def\aeb@subsection@afterskip{1ex\@plus .2ex}
+\def\aeb@subsubsection@afterskip{.5ex\@plus .2ex}
+\def\aeb@university@afterskip{1ex\@plus .2ex}
+\def\aeb@title@afterskip{1ex\@plus .2ex}
+\def\aeb@author@afterskip{1ex \@plus1fill} %{1ex\@plus .2ex}
+\def\aeb@toc@afterskip{1ex\@plus .2ex}
+% \end{macrocode}
+% Some special keys for \cs{titleLayout}, \cs{universityLayout} and \cs{authorLayout}.
+% The \IndexKey{hproportion}\texttt{hproportion} is the proportion of \cs{linewidth} the title, university
+% author elements are restricted to. Useful for setting natural line breaks for a wide
+% title, for example. The value of the key should be a number between 0 and 1, exclusive of 0.
+% \begin{macrocode}
+\define@key{aebsection}{hproportion}{%
+ \w@csarg\def{hproportionweb\aeb@section@type}{#1}}
+% \end{macrocode}
+% Some special keys for \cs{titleLayout}, \cs{universityLayout} and \cs{authorLayout}.
+% The \IndexKey{xhaligh}\texttt{xhalign} is the alignment of the \cs{makebox} that encloses the university,
+% the title or author. This alignment will be across the width of the text region.
+% \begin{macrocode}
+\define@key{aebsection}{xhalign}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{l,c,r}{%
+ \w@csarg\def{halign\aeb@section@type}{#1}%
+}{\PackageWarning{webpro}{Bad choice for xhalign, permissible values
+ are l, c and r. Try again}}%
+}
+\def\halignuniversity{c}
+\def\haligntitle{c}
+\def\halignauthor{c}
+\let\halignsection\relax
+\let\halignsubsection\relax
+\let\halignsubsubsection\relax
+\let\haligntoc\relax
+% \end{macrocode}
+%Special keys for TOC\IndexKey{tocName}\IndexKey{tocNameCont}
+% \begin{macrocode}
+\define@key{aebToc}{tocName}{\tocName{#1}}
+\define@key{aebToc}{tocNameCont}{\tocNameCont{#1}}
+% \end{macrocode}
+% Commands that hold the reset values.
+% \begin{macrocode}
+\def\aeb@reset@section@fonts{%
+ \normalfont\normalsize
+ \ifcase\aeb@section@typeIndex\relax
+ \let\aeb@section@usefont\@empty
+ \let\aeb@section@fontfamily\aeb@defaultfamily
+ \let\aeb@section@fontseries\bfseries
+ \let\aeb@section@fontshape\upshape
+ \let\aeb@section@fontsize\Large
+ \or
+ \let\aeb@subsection@usefont\@empty
+ \let\aeb@subsection@fontfamily\aeb@defaultfamily
+ \let\aeb@subsection@fontseries\bfseries
+ \let\aeb@subsection@fontshape\upshape
+ \let\aeb@subsection@fontsize\large
+ \or
+ \let\aeb@subsubsection@usefont\@empty
+ \let\aeb@subsubsection@fontfamily\aeb@defaultfamily
+ \let\aeb@subsubsection@fontseries\bfseries
+ \let\aeb@subsubsection@fontshape\upshape
+ \let\aeb@subsubsection@fontsize\normalsize
+ \fi
+}
+\def\aeb@reset@section@all{%
+ \aeb@reset@section@fonts
+ \ifcase\aeb@section@typeIndex\relax
+ \let\aeb@section@halign\raggedright
+ \def\aeb@sectioncolor{blue}%
+ \def\aeb@sectionshadowcolor{black}%
+ \let\aeb@section@special=\@empty
+ \def\aeb@section@beforeskip{-3ex\@plus -1ex \@minus-.2ex}%
+ \def\aeb@section@afterskip{1ex\@plus .2ex}%
+ \def\aeb@sectionframecolor{blue}%
+ \def\aeb@sectionframecolor{cornsilk}%
+ \or
+ \let\aeb@subsection@halign\raggedright
+ \def\aeb@subsectioncolor{blue}%
+ \def\aeb@subsectionshadowcolor{black}%
+ \let\aeb@subsection@special=\@empty
+ \def\aeb@subsection@beforeskip{-2.5ex\@plus-1ex \@minus-.2ex}%
+ \def\aeb@subsection@afterskip{1ex\@plus .2ex}%
+ \def\aeb@subsectionframecolor{blue}%
+ \def\aeb@subsectionframecolor{cornsilk}%
+ \or
+ \let\aeb@subsubsection@halign\raggedright
+ \def\aeb@subsubsectioncolor{blue}%
+ \def\aeb@subsubsectionshadowcolor{black}%
+ \let\aeb@subsubsection@special=\@empty
+ \def\aeb@subsubsection@beforeskip{-2ex\@plus-1ex \@minus-.2ex}%
+ \def\aeb@subsubsection@afterskip{1ex\@plus .2ex}%
+ \def\aeb@subsubsectionframecolor{blue}%
+ \def\aeb@subsubsectionframecolor{cornsilk}%
+ \fi
+}
+% \end{macrocode}
+% Here I've taken the \cs{section} command, as defined in \textsf{web},
+% and modified it, inserting \verb!\xdef\aeb@sectionpage{\the\c@page}!.
+% This helps to keep track of the page of the current section; used
+% with the panel table of contents.
+% \begin{macrocode}
+\renewcommand{\section}{% dps1
+ \renewcommand{\@seccntformat}[1]{\aeb@sectionNum{##1}}%
+ \@startsection{section}{1}{\aeb@section@indent}%
+ {\aeb@section@beforeskip}{\aeb@section@afterskip}%
+ {\noindent\xdef\aeb@sectionpage{\the\c@page}%
+ \def\aeb@section@type{section}%
+ \aeb@section@usefont\aeb@section@fontfamily\aeb@section@fontseries
+ \aeb@section@fontshape\aeb@section@fontsize\aeb@section@halign
+ \color{\aeb@sectioncolor}\aeb@section@special}}
+\renewcommand\subsection{% dps1
+ \renewcommand{\@seccntformat}[1]{\aeb@subsectionNum{##1}}%
+ \@startsection{subsection}{2}{\aeb@subsection@indent}%
+ {\aeb@subsection@beforeskip}{\aeb@subsection@afterskip}%
+ {\noindent\def\aeb@section@type{subsection}%
+ \aeb@subsection@usefont\aeb@subsection@fontfamily
+ \aeb@subsection@fontseries\aeb@subsection@fontshape
+ \aeb@subsection@fontsize\aeb@subsection@halign
+ \color{\aeb@subsectioncolor}\aeb@subsection@special}}
+\def\subsubDefaultDing#1{\def\web@subsubDefaultDing{{#1}}}
+\subsubDefaultDing{\textrm\textbullet}
+\renewcommand\subsubsection{% dps1
+ \renewcommand{\@seccntformat}[1]{\aeb@subsubsectionNum{##1}}%
+ \@startsection{subsubsection}{3}{\aeb@subsubsection@indent}%
+ {\aeb@subsubsection@beforeskip}{\aeb@subsubsection@afterskip}%
+ {\noindent\def\aeb@section@type{subsubsection}%
+ \aeb@subsubsection@usefont\aeb@subsubsection@fontfamily
+ \aeb@subsubsection@fontseries\aeb@subsubsection@fontshape
+ \aeb@subsubsection@fontsize\aeb@subsubsection@halign
+ \color{\aeb@subsubsectioncolor}\aeb@subsubsection@special}}
+\renewcommand*\thesection{%
+ \if\aeb@use@section@numbers1\arabic{section}\fi}
+\renewcommand*\thesubsection{%
+ \if\aeb@use@section@numbers1\thesection.\arabic{subsection}\fi}
+\renewcommand*{\thesubsubsection}{%
+ \if\aeb@use@section@numbers1%
+ \if@defaultsubsubding\web@subsubDefaultDing
+ \else\thesubsection.\arabic{subsubsection}\fi
+ \fi}
+% \end{macrocode}
+% We attempt to format the university, title and author in the same way as
+% we do the sections
+% \begin{macrocode}
+\newcommand{\sectionTitle}{\aeb@sectionTitle*}
+\newcommand{\aeb@sectionTitle}{%
+ \renewcommand{\@seccntformat}[1]{\aeb@titleNum{##1}}%
+ \@startsection{section}{1}{\aeb@title@indent}%
+ {\aeb@title@beforeskip}{\aeb@title@afterskip}%
+ {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{title}%
+ \aeb@title@usefont\aeb@title@fontfamily\aeb@title@fontseries
+ \aeb@title@fontshape\aeb@title@fontsize\aeb@title@halign
+ \ifx\webtitle@color\@empty\else\color{\aeb@titlecolor}\fi
+ \aeb@title@special}}
+\newcommand{\sectionAuthor}{\aeb@sectionAuthor*}
+\newcommand{\aeb@sectionAuthor}{%
+ \renewcommand{\@seccntformat}[1]{\aeb@authorNum{##1}}%
+ \@startsection{section}{1}{\aeb@author@indent}%
+ {\aeb@author@beforeskip}{\aeb@author@afterskip}%
+ {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{author}%
+ \aeb@author@usefont\aeb@author@fontfamily\aeb@author@fontseries
+ \aeb@author@fontshape\aeb@author@fontsize\aeb@author@halign
+ \ifx\webauthor@color\@empty\else\color{\aeb@authorcolor}\fi
+ \aeb@author@special}}
+\newcommand{\sectionUniversity}{\aeb@sectionUniversity*}
+\newcommand{\aeb@sectionUniversity}{%
+ \renewcommand{\@seccntformat}[1]{\aeb@universityNum{##1}}%
+ \@startsection{section}{1}{\aeb@university@indent}%
+ {\aeb@university@beforeskip}{\aeb@university@afterskip}%
+ {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{university}%
+ \aeb@university@usefont\aeb@university@fontfamily
+ \aeb@university@fontseries\aeb@university@fontshape
+ \aeb@university@fontsize\aeb@university@halign
+ \ifx\webuniversity@color\@empty\else
+ \color{\aeb@universitycolor}\fi\aeb@university@special}}
+\newcommand{\sectionToc}{\aeb@sectionToc*}
+\newcommand{\aeb@sectionToc}{%
+ \renewcommand{\@seccntformat}[1]{\aeb@tocNum{##1}}%
+ \@startsection{section}{1}{\aeb@toc@indent}%
+ {\aeb@toc@beforeskip}{\aeb@toc@afterskip}%
+ {\hypertarget{webtoc}{}%
+ \xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{toc}%
+ \aeb@toc@usefont\aeb@toc@fontfamily
+ \aeb@toc@fontseries\aeb@toc@fontshape
+ \aeb@toc@fontsize\aeb@toc@halign
+ \ifx\aeb@toccolor\@empty\else
+ \color{\aeb@toccolor}\fi\aeb@toc@special}}
+% \end{macrocode}
+%
+% \subsection{Layout Commands}\label{sectionLayout}
+%
+% The command \cs{sectionLayout} defines the style for your section headings.
+% To set these properties globally, it is recommended you place this command
+% in the preamble.
+% \subsubsection{\texorpdfstring{\cs{sectionLayout}}{\textbackslash sectionLayout} and Friends}
+% \begin{macro}{\sectionLayout}
+% \begin{macro}{\subsectionLayout}
+% \begin{macro}{\subsubsectionLayout}
+% If placed in preamble or \textsl{between} pages, these changes are global, if placed
+% \textsl{within} an environment, they are local. Note that the reset key will
+% globally reset the values. Here we process the keys devoted to the section layout.
+% \begin{macrocode}
+\def\save@prtscr{\global\let\prtscr@save\prtscr
+ \global\let\prtscr\prtscrA}
+\def\restore@prtscr{\global\let\prtscr\prtscr@save}
+\newcommand{\sectionLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=section,color=blue,ruleheight=1pt}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\newcommand{\subsectionLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=subsection,color=blue,ruleheight=1pt}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\newcommand{\subsubsectionLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=subsubsection,color=blue,ruleheight=1pt}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \subsubsection{\texorpdfstring{\cs{titleLayout}}{\textbackslash titleLayout} and Friends}
+% \begin{macro}{\universityLayout}
+% \begin{macro}{\titleLayout}
+% \begin{macro}{\authorLayout}
+% These three commands are used to create layouts for the university,
+% title and author on the title page of the presentation.
+% \begin{macrocode}
+\newcommand{\universityLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=university}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\universityLayout{fontsize={\prtscrA{large}{normalsize}}}
+\newcommand{\titleLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=title}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\titleLayout{fontsize={\prtscrA{Large}{normalsize}}}
+\newcommand{\authorLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=author}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\authorLayout{fontsize={\prtscrA{large}{normalsize}}}
+\newcommand{\tocLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=toc,color=\web@tocColor}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection,aebToc}{#1}}%
+ \aeb@temp\restore@prtscr}
+\tocLayout{fontsize=Large}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \subsection{\texorpdfstring{\cs{useSectionNumbers}}{\textbackslash useSectionNumbers}}
+% The switch \DescribeMacro{\ifShadow} is use to control the color to be displayed
+% for section titles. The normal state of \cs{ifShadow} is false, and is only turned true
+% when in the command \cs{aeb@shadowHead}
+% \begin{macrocode}
+\newif\ifShadow \Shadowfalse % dps1
+% \end{macrocode}
+% The \cs{web@sel@sec@col} command is used to select the proper color for
+% the section labels. It is used in the definition of \cs{useSectionNumbers}
+% below, and also in the \texttt{ding} key from the \texttt{aebsection} family.
+% \begin{macrocode}
+\def\web@sel@sec@col#1{\ifShadow
+ \color{\@nameuse{aeb@#1shadowcolor}}\else
+ \color{\@nameuse{aeb@#1numdingcolor}}\fi}
+% \end{macrocode}
+% \begin{macro}{\useSectionNumbers}
+% \begin{macro}{\noSectionNumbers}
+% When developing talks, we must decide whether to number the
+% parts of our slides in the usual latexy way. This decision should
+% remain in effect throughout the who document. I've set the default
+% value at no, i.e., I've executed \cs{noSectionNumbers}.
+% \begin{macrocode}
+\newcommand{\useSectionNumbers}
+{% dps1
+ \let\aeb@use@section@numbers1\relax
+ \def\aeb@sectionNum##1{\protect\web@sel@sec@col{section}%
+ \@nameuse{the##1}\web@finalDot\ }%
+ \def\aeb@subsectionNum##1{\protect\web@sel@sec@col{subsection}%
+ \@nameuse{the##1}\web@finalDot\ }%
+ \def\aeb@subsubsectionNum##1{%
+ \protect\web@sel@sec@col{subsubsection}%
+ \@nameuse{the##1}\if@defaultsubsubding\else\web@finalDot\fi\ }%
+ \def\sectionmark##1{\markright{##1}}%
+}
+\newcommand{\noSectionNumbers}
+{%
+ \ifx\web@latextoc\web@YES
+ \PackageInfo{web}{The nobullets or latextoc option
+ taken,\MessageBreak
+ ignoring \string\noSectionNumbers}%
+ \else
+ \let\aeb@use@section@numbers0\relax
+ \let\aeb@sectionNum\@gobble
+ \let\aeb@subsectionNum\@gobble
+ \let\aeb@subsubsectionNum\@gobble
+ \fi
+}
+\useSectionNumbers
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \subsection{Select Commands}
+%
+% \subsubsection{\texorpdfstring{\cs{selectColors}}{\textbackslash selectColors}}
+%
+% Use \cs{selectColors} to set the color scheme of your document. All the following
+% keys take a defined color as its value. All of them have defaults define
+% elsewhere in this document, or in the \textsf{web} and \textsf{hyperref}.
+% \IndexKey{universityColor}
+% \IndexKey{titleColor}
+% \IndexKey{authorColor}
+% \IndexKey{textBgColor}
+% \IndexKey{panelBgColor}
+% \IndexKey{linkColor}
+% \IndexKey{fileColor}
+% \IndexKey{citeColor}
+% \IndexKey{urlColor}
+% \begin{macrocode}
+\define@key{aebcolordesign}{universityColor}{\universityColor{#1}}
+ \def\aeb@universitycolor{\webuniversity@color}
+\define@key{aebcolordesign}{titleColor}{\titleColor{#1}}
+ \def\aeb@titlecolor{\webtitle@color}
+\define@key{aebcolordesign}{authorColor}{\authorColor{#1}}
+ \def\aeb@authorcolor{\webauthor@color}
+\define@key{aebcolordesign}{textBgColor}{\textBgColor{#1}}
+\define@key{aebcolordesign}{panelBgColor}{\panelBgColor{#1}}
+\define@key{aebcolordesign}{linkColor}{\def\@linkcolor{#1}}
+\define@key{aebcolordesign}{fileColor}{\def\@filecolor{#1}}
+\define@key{aebcolordesign}{citeColor}{\def\@citecolor{#1}}
+\define@key{aebcolordesign}{urlColor}{\def\@urlcolor{#1}}
+% \end{macrocode}
+% \begin{macro}{\selectColors}
+% The \cs{selectColors} is a convenience command for setting
+% many of the colors involved in the design of an \textsf{APB} document.
+% The default colors are \dots
+%\begin{verbatim}
+%\selectColors
+%{
+% universityColor = blue,
+% titleColor = black,
+% authorColor = black,
+% textBgColor = white,
+% panelBgColor = white,
+% fullwidthBgColor = white,
+% urlColor = webbrown,
+% linkColor = webgreen,
+% fileColor = webbrown
+%}
+%\end{verbatim}
+% \begin{macrocode}
+\newcommand{\selectColors}[1]{\setkeys{aebcolordesign}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \subsubsection{\texorpdfstring{\cs{selectTocDings}}{\textbackslash selectTocDings}}
+% We define necessary keys to create a simple interface to set the dings of
+% an \textsf{AeB} document.
+% \IndexKey{dDing}
+% \IndexKey{ddDing}
+% \IndexKey{dddDing}
+% \IndexKey{dDingColor}
+% \IndexKey{ddDingColor}
+% \IndexKey{dddDingColor}
+% \begin{macrocode}
+\define@key{aebDings}{dDing}{\dDingToc{#1}}
+\define@key{aebDings}{ddDing}{\ddDingToc{#1}}
+\define@key{aebDings}{dddDing}{\dddDingToc{#1}}
+\define@key{aebDings}{dDingColor}{\dDingTocColor{#1}}
+\define@key{aebDings}{ddDingColor}{\ddDingTocColor{#1}}
+\define@key{aebDings}{dddDingColor}{\dddDingTocColor{#1}}
+\def\dDingToc#1{\def\d@DingToc{#1}}
+\def\ddDingToc#1{\def\dd@DingToc{#1}}
+\def\dddDingToc#1{\def\ddd@DingToc{#1}}
+\def\dDingTocColor#1{\def\d@DingTocColor{#1}}
+\def\ddDingTocColor#1{\def\dd@DingTocColor{#1}}
+\def\dddDingTocColor#1{\def\ddd@DingTocColor{#1}}
+\dDingTocColor{red}
+\ddDingTocColor{blue}
+\dddDingTocColor{webgreen}
+\@tfor\@@tmp:={d@DingToc}{dd@DingToc}{ddd@DingToc}\do
+ {\w@csarg\let{\@@tmp}\@empty}
+% \end{macrocode}
+% \begin{macro}{\selectTocDings}
+% This is an \textsf{xkeyval} interface to setting the dings used by
+% the structured lists and the table of contents. Usage:
+%\begin{verbatim}
+%\selectTocDings
+%{
+% dDing=\ding{082},
+% ddDing=\ding{079},
+% dddDing=\ding{254}
+%}
+%\end{verbatim}
+% \begin{macrocode}
+\newcommand{\selectTocDings}[1]{\setkeys{aebDings}{#1}}
+% \end{macrocode}
+% The following command is used in \cs{tableofcontents} for setting
+% the dings there.
+% \begin{macrocode}
+\def\@setTocDings{%
+ \ifx\d@DingToc\@empty\else\dDing{\d@DingToc}\fi
+ \ifx\dd@DingToc\@empty\else\ddDing{\dd@DingToc}\fi
+ \ifx\ddd@DingToc\@empty\else\dddDing{\ddd@DingToc}\fi
+}
+% \end{macrocode}
+% \end{macro}% Now, if for paper\dots
+% \begin{macrocode}
+\ifeqforpaper
+% \end{macrocode}
+% \begin{environment}{forpaper}
+% \begin{environment}{forscreen}
+% Using the required \texttt{comment} package, we define two
+% comment environments one \texttt{forpaper} and another for
+% \texttt{forscreen}.
+% \begin{macrocode}
+ \includecomment{forpaper}\excludecomment{forscreen}
+\else
+ \includecomment{forscreen}\excludecomment{forpaper}
+\fi
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+% \begin{macrocode}
+%</webpro>
+% \end{macrocode}
+%\StopEventually{}
+% \begin{macrocode}
+%<*docdefs>
+%
+% Custom doc formatting developed for the AeB packages
+% D. P. Story
+%
+\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}
+\makeatother
+\def\IndexOpt#1{\SpecialMainOptIndex{#1}%
+ \marginpar{\raggedleft\PrintDescribeMacro{#1}}}
+\def\IndexKey#1{\SpecialMainKeyIndex{#1}%
+ \marginpar{\raggedleft\PrintDescribeMacro{#1}}}
+%</docdefs>
+%<dnidefs>% \DoNotIndex{\",\-,\#,\%,\&,\',\),\(,\*,\+,\-,\.,\,,\/,\<,\>,\@}
+%<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{\newenvironment,\renewenvironment,\newcommand,\renewcommand}
+%<dnidefs>% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
+%<dnidefs>% \DoNotIndex{\space,\@empty,\special,\arabic,\meaning,\message,\MessageBreak,\medskip,\makebox,\parbox,\noexpand,\expandafter,\noindent,\indent}
+%<dnidefs>% \DoNotIndex{\par,\@@par,\@@temp,\@@tmp,\@M,\@esphack,\@for,\@firstoffive,\@firstoftwo,\@fleqnfalse,\@fleqntrue}
+%<dnidefs>% \DoNotIndex{\@gobble,\@gobbletwo,\@gobblethree,\@ifnextchar, \@ifpackagelater,\@ifpackageloaded,\@ifstar,\@ifundefined}
+%<dnidefs>% \DoNotIndex{\@namedef,\@nameuse,\@ne,\@par,\@temp,\@tempa,\@tempcnta,\@tempcntb,\@tempdima,\@tempdimb,\@tfor}
+%<dnidefs>% \DoNotIndex{\@tfor,\@temptokena,\@toodeep,\@whilenum,\@xarraycr,\@xtabularcr,\toks@}
+%<dnidefs>% \DoNotIndex{\alph,\bfseries,\count,\count@,\count@ii,\cs,\closein,\closeout,\define@key,\protect}
+%<dnidefs>% \DoNotIndex{\if,\i,\ifcase,\ifdimen,\ifnum,\ifinner,\ifnum,\ifodd,\ignorespaces,\immediate,\jobname}
+%<dnidefs>% \DoNotIndex{\jsR,\jsT,\leavevmode,\linewidth,\newif,\newlength,\newcounter,\newcount,\newread,\newtoks,\newpage}
+%<dnidefs>% \DoNotIndex{\setkeys,\setlength,\settowidth,\typeout,\tw@,\c@page,\z@,\z@skip,\@nil,\@makeatletter,\@makeatother}
+%<dnidefs>% \DoNotIndex{\[,\],\{,\},\^,\|}
+%<dnidefs>% \DoNotIndex{\\,\0,\1,\2,\3,\8}
+%<dnidefs>% \DoNotIndex{\do,\dp,\ht,\wd,\hfill,\hfil,\hoffset,\hfuzz,\hss,\hsize,\hskip,\hspace,\hbox,
+%<dnidefs>% \vfill,\vfuzz,\vglue,\voffset,\vskip,\vspace,\vbox,\vtop}
+%<dnidefs>% \DoNotIndex{\ifcase,\or,\value,\addtolength,\settowidth,\val,\nr}
+%<dnidefs>% \DoNotIndex{\unskip,\marginpar,\mbox,\quad,\qquad}
+% \end{macrocode}
+\endinput
diff --git a/texmf-dist/source/latex/acrotex/web.ins b/texmf-dist/source/latex/acrotex/web.ins
new file mode 100644
index 00000000..3de43e1a
--- /dev/null
+++ b/texmf-dist/source/latex/acrotex/web.ins
@@ -0,0 +1,72 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1999-2006 D. P. Story
+%%
+%% This file is part of the `AcroTeX eDucation Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2001/05/26}
+\def\batchfile{web.ins}
+
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+
+\generate
+{%
+ \file{web.sty}{\from{web.dtx}{copyright,package}}
+ \file{websec.def}{\from{web.dtx}{copyright,websectioning}}
+ \file{webpro.def}{\from{web.dtx}{copyright,webpro}}
+}
+
+% Additional files for compiling DTX files with changes and index
+% 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}}
+%}
+
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/texmf-dist/tex/latex/acrotex/aebjs.def b/texmf-dist/tex/latex/acrotex/aebjs.def
new file mode 100644
index 00000000..f3acd920
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/aebjs.def
@@ -0,0 +1,1378 @@
+%%
+%% 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-2017 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}
+ [2017/03/16 v7.8g %
+ Exerquiz document level JavaScript (dps)]
+\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"}
+\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 e = Math.E;
+var pi = Math.PI;
+var replaceExclaim = \replaceexclaim;
+var negPointsAllowed = \negpointsallowed;
+var negPointsMarkupAllowed = \negpointsmarkupallowed;
+var aQuizControl = new Array();
+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;
+ 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,indepVar,oComp)
+{
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ var success = _ProcResp(flag,CorrAns,UserAns,%
+n,epsilon,domain,indepVar,oComp);
+ if ( success == -1 || !ok2Continue ) return null;
+ if ( success == null ) { return syntaxError(), null; }
+ return notifyField(success, flag, fieldname);
+}
+// changed name of var comp -> oComp
+function _ProcResp(flag,CorrAns,UserAns,n,epsilon,domain,indepVar,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);
+ indepVar = TypeParameters(indepVar);
+ if (!ok2Continue) return null;
+ var success=randomPointCompare(n,domain,indepVar,%
+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,indepVar,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,indepVar,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 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 Array();
+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 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;
+ 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 f = this.getField("mcq." + qtfield);
+ if ( f != null) f.display = display.visible;
+ 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
new file mode 100644
index 00000000..f5554385
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/aebrandom.def
@@ -0,0 +1,168 @@
+%%
+%% 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-2017 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}
+ [2017/03/16 v7.8g %
+ Exerquiz support for randomization (dps)]
+\@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\@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
new file mode 100644
index 00000000..8c74db2b
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/aebsumrytbls.def
@@ -0,0 +1,255 @@
+%%
+%% 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-2017 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}
+ [2017/03/16 v7.8g %
+ Exerquiz support for summary tables (dps)]
+\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
new file mode 100644
index 00000000..6b7f2389
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/altadbfncs.def
@@ -0,0 +1,42 @@
+%%
+%% 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-2017 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 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/contsolns.def b/texmf-dist/tex/latex/acrotex/contsolns.def
new file mode 100644
index 00000000..84759e04
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/contsolns.def
@@ -0,0 +1,87 @@
+%%
+%% This is file `contsolns.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% contsolns.dtx (with options: `package')
+%%
+\@ifpackageloaded{web}{}{\PackageError{exerquiz}
+ {The consolns option of exerquiz requires\MessageBreak
+ the web package}{Use the web package.}}
+
+\def\setQNum{\Qlabel\ifcase\@eqquestiondepth\or\arabic{eqquestionnoi}%
+ \or\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ \or\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ (\roman{eqquestionnoiii})\fi}
+\def\setENum{\Elabel\if\exerstar*\theeqexno(\alph{partno})\else
+ \theeqexno\fi}
+\def\Qlabel{Q}\def\Elabel{E}
+\def\SolContMrk#1#2{\gdef\solContMarks{{#1}{#2}}}
+\def\solContMarks{{}{}}
+\def\eq@sqPostHeaderHook{%
+ \string\SolContMrk{Q\@shortquizCnt}{\setQNum}\relax}
+\def\eq@qPostHeaderHook{%
+ \string\SolContMrk{Q\@quizCnt}{\setQNum}\relax}
+\def\exer@solnheadhook{%
+ \string\SolContMrk{Ex}{\setENum}}
+\newlength{\promoteNPHskip}
+\setlength{\promoteNPHskip}{.1\textheight}
+\ifeqforpaper
+\def\redefForContSolns{%
+ \def\prior@quizSolnHeaderHook{\promoteNewPageHere{\promoteNPHskip}}
+ \def\prior@exerSolnHeaderHook{\promoteNewPageHere{\promoteNPHskip}}
+ \eq@scratchtoks=\expandafter{\fpAfterSolutionsSkip\SolContMrk{}{}}
+ \edef\@tempExp{\noexpand\promoteNewPageHere{%
+ \noexpand\promoteNPHskip}\the\eq@scratchtoks}
+ \eq@scratchtoks=\expandafter{\@tempExp}
+ \edef\fpAfterSolutionsSkip{\the\eq@scratchtoks}
+ \eq@scratchtoks=\expandafter{%
+ \belowexsolnskip\protect\SolContMrk{}{}}
+ \edef\belowexsolnskip{\noexpand\noexpand
+ \string\promoteNewPageHere{%
+ \noexpand\noexpand\string\promoteNPHskip}\the\eq@scratchtoks}
+}
+\else
+\def\redefForContSolns{%
+ \let\endeqSQtSAVE\endeqSQt
+ \def\endeqSQt{\endeqSQtSAVE\par\SolContMrk{}{}}
+ \let\endeqQtSAVE\endeqSQt
+ \def\endeqQt{\endeqQtSAVE\par\SolContMrk{}{}}
+ \let\endeqEXtSAVE\endeqEXt
+ \def\endeqEXt{\endeqEXtSAVE\par\SolContMrk{}{}}
+}
+\fi % \ifeqforpaper
+\AtBeginDocument{\redefForContSolns}
+\newcommand{\getSolContMarks}[2]{\ifcontSoln
+ \rfootContStr{#1}{#2}\fi}
+\newcommand{\rfootContStr}[2]{Solution to {#2} continues next page}
+\newif\ifcontSoln \contSolnfalse
+\newcommand{\bSolContMarks}[2]{%
+ \def\eq@argi{#1}\def\eq@argii{#2}%
+ \ifx\eq@argi\@empty\global\contSolnfalse\else
+ \global\contSolntrue\fi}
+\def\lFootbCont{\expandafter\bSolContMarks\solContMarks}
+\def\rFootCont{\makebox[0pt][r]{%
+ \expandafter\getSolContMarks\solContMarks}}
+\@ifundefined{web@footerprivate}{%
+ \def\addtolfooter{\expandafter
+ \lfooter\expandafter{\expandafter\lFootbCont\web@lfoot}}%
+}{%
+ \def\addtolfooter{\def\web@footerprivate{\lFootbCont}}%
+}
+\def\addtorfooter{\expandafter
+ \rfooter\expandafter{\web@rfoot\rFootCont}}
+\def\cs@testWH#1#2{\ifx\webfootwrapper#1
+ \def\cs@next{\AtBeginDocument{\addtolfooter\addtorfooter}}\else
+ \def\cs@next{\PackageError{contsoln.def}{%
+ webheadings of the web package are NOT\MessageBreak
+ in effect. The contsoln.def file requires\MessageBreak
+ webheadings}{Use the default webheadings pagestyle
+ from the web package.}}\fi
+ \cs@next
+}
+\AtBeginDocument{\expandafter\cs@testWH\@oddfoot}
+\endinput
+%%
+%% End of file `contsolns.def'.
diff --git a/texmf-dist/tex/latex/acrotex/dljscc.def b/texmf-dist/tex/latex/acrotex/dljscc.def
new file mode 100644
index 00000000..c452b683
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/dljscc.def
@@ -0,0 +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-2017 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
new file mode 100644
index 00000000..871720d7
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/dljslib.sty
@@ -0,0 +1,1725 @@
+%%
+%% 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-2016 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}
+ [2014/10/05 v2.0 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{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,indepVar,oComp)
+{
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var success;
+ var fieldname = event.target.name;
+ var UserAns = 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;
+ indepVar = TypeParameters(indepVar);
+ var lambda = getNonZeroRatio (domain, indepVar, zCorrAns, zUserAns);
+ if ( lambda == null ) {
+ eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; };
+ if ( !ok2Continue ) return notifyField(false, flag, fieldname);
+ zCorrAns = lambda + "*(" + zCorrAns + ")";
+ success=randomPointCompare (n,domain,indepVar,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,indepVar,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
+ indepVar = TypeParameters(indepVar);
+ 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,indepVar,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,indepVar,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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,indepVar,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,indepVar,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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 = indepVar.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,%
+indepVar,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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(/^,/, "");
+ event.value = UserAns;
+ 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,indepVar,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,indepVar,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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(/^,/, "");
+ event.value = UserAns;
+ 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,indepVar,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,indepVar,oComp)
+{
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var i, success;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ CorrAns = stripWhiteSpace (CorrAns);
+ UserAns = stripWhiteSpace (UserAns); // sets ok2Continue
+ if ( !ok2Continue ) return null;
+ indepVar+="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);
+ indepVar = TypeParameters(indepVar);
+ if (!ok2Continue) return null;
+ success=randomPointCompare(
+ n,domain,indepVar,epsilon,CorrAns,UserAns,comp);
+ if ( success == null ) { eqAppAlert(%
+\eqSyntaxErrorUndefVar,3); return null; }
+ return notifyField(success, flag, fieldname);
+}
+function ProcRespListComplex(flag,CorrAns,n,epsilon,%
+domain,indepVar,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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;
+ 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;
+ event.value = aUserAns[i];
+ var retn = ProcRespComplex(
+ flag,aCorrAns[i],n,epsilon,domain,indepVar,oComp);
+ event.value = UserAns;
+ 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,indepVar,oComp) {
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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++) {
+ event.value = aUserAns[j];
+ var retn = ProcRespComplex(%
+flag,aCorrAns[i],n,epsilon,domain,indepVar,oComp);
+ event.value = UserAns;
+ 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,indepVar,oComp){
+ var retn=_ProcRespEvalEq(true,flag,CorrAns,n,epsilon,indepVar);
+ return retn;
+}
+function ProcRespEvalEqNonZero(flag,CorrAns,n,epsilon,%
+domain,indepVar,oComp) {
+ var retn=_ProcRespEvalEq(false,flag,CorrAns,n,epsilon,indepVar);
+ return retn;
+}
+function _ProcRespEvalEq(allowzero,flag,CorrAns,n,epsilon,indepVar)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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(indepVar);
+ 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,%
+indepVar,oComp) {
+ var retn=_ProcRespEvalEqList(true,flag,CorrAns,n,epsilon,indepVar);
+ return retn;
+}
+function ProcRespEvalEqListNonZero(flag,CorrAns,n,epsilon,domain,%
+indepVar,oComp){
+ var retn=_ProcRespEvalEqList(false,flag,CorrAns,n,epsilon,indepVar);
+ return retn;
+}
+function _ProcRespEvalEqList(allowzero,flag,CorrAns,n,epsilon,indepVar)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = 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(indepVar);
+ 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,indepVar,oComp) {
+ if (!ProcessIt) return null;
+ ok2Continue = true;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ var success = _ProcRespNumsDe(flag,CorrAns,UserAns,n,%
+epsilon,domain,indepVar,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,indepVar,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);
+ indepVar = TypeParameters(indepVar);
+ if (!ok2Continue) return null;
+ var success=randomPointCompare(n,domain,indepVar,%
+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,indepVar,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ if (!ok2Continue) return null;
+ var retn = _ProcResp(flag,CorrAns,UserAns,n,epsilon,%
+domain,indepVar,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,indepVar,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,indepVar,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,indepVar,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)) {
+ 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;
+ }
+ indepVar = TypeParameters(indepVar);
+ 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,indepVar,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,indepVar,oComp)
+{
+ ok2Continue = true;
+ if (!ProcessIt) return null;
+ var fieldname = event.target.name;
+ var UserAns = event.value;
+ UserAns = stripWhiteSpace(UserAns);
+ CorrAns = stripWhiteSpace(CorrAns);
+ if (!ok2Continue) return null;
+ UserAns = UserAns.replace(/inf/g, "x");
+ CorrAns = CorrAns.replace(/inf/g, "x");
+ indepVar = "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,indepVar,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,indepVar,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
new file mode 100644
index 00000000..994af3d0
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/edvipdfm.def
@@ -0,0 +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-2017 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
new file mode 100644
index 00000000..2b2a2bb2
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eforms.sty
@@ -0,0 +1,1314 @@
+%%
+%% 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-2017 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}
+ [2017/02/27 v2.9l Provides general eforms support (dps)]
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+\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{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}%
+ }{%
+ \ifpdf\ExecuteOptions{pdftex}\else
+ \ifxetex\ExecuteOptions{xetex}\else
+ \@ifundefined{l@tex@@@@driver}{\ExecuteOptions{dvips}}
+ {\ExecuteOptions{dvipsone}}\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
+\newif\ifmakeXasPD \makeXasPDtrue % 12/22
+\newif\ifmakePDasX \makePDasXfalse
+\def\makeXasPDOn{\makeXasPDtrue\makePDasXfalse}
+\def\makeXasPDOff{\makeXasPDfalse}
+\def\makePDasXOn{\makePDasXtrue\makeXasPDfalse}
+\def\makePDasXOff{\makePDasXfalse}
+\providecommand\previewColor{black}
+\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\color{\previewColor}%
+ \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=0\else
+ \ifx\ef@argii\ef@true\let\ef@mlLink=1\else\let\ef@mlLink=0\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=1\else\let\ef@mlLink=0\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
+}
+\def\eq@protect#1{\let#1\@empty}
+\begingroup\catcode`\#=12 \catcode`*=6
+\gdef\HEXNAME{efHex}
+\ifpdfmarkup\gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\else
+\gdef\ef@Hx*1*2{#*1*2}\fi
+\endgroup
+\ifpdfmarkup
+\def\HexGlyph#1#2{\global\@namedef{efHex#1}{#2}}
+\def\ef@inputPDFHEX{\InputIfFileExists{pdfdochex.def}
+ {\typeout{Inputtingpdfdochex.def}}{}}
+\expandafter\ef@inputPDFHEX\fi
+\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\volBdry{\bgroup\parskip0pt\relax\@@par\nointerlineskip
+ \olBdry\noindent\egroup}
+\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]\noindent
+ \egroup\ignorespaces}
+\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
+}
+\newcommand{\mlsetLink}{\mlhypertext}
+\let\setLinkText\setLink
+\newcommand{\ef@setlinktext}[1][]{%
+ \endgroup\ef@searchmlLink#1\mlLink\end\@nil
+ \ifx\ef@mlLink0\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{}
+\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
new file mode 100644
index 00000000..10e7a3ce
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/epdfmark.def
@@ -0,0 +1,125 @@
+%%
+%% 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-2017 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\setLinkPbox@driver
+{%
+ \ifx\eq@A\@empty\else\expandafter\convertAToAction\eq@A\@nil\fi
+ \@eqBS{}%
+ \literalps@out{%
+ [ \eq@objdef/Rect [\par@@Rect]
+ \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
new file mode 100644
index 00000000..923db2b2
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/epdftex.def
@@ -0,0 +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-2017 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
new file mode 100644
index 00000000..4cb03b52
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqbr.def
@@ -0,0 +1,83 @@
+%%
+%% 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-2017 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}
+%%%%%%%%%%%%%%%%%%% 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
new file mode 100644
index 00000000..d3d89c64
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqcat.def
@@ -0,0 +1,77 @@
+%%
+%% 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-2017 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}
+%%%%%%%%%%%%%%%%%%% 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
new file mode 100644
index 00000000..d68dff1e
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqcolor.def
@@ -0,0 +1,85 @@
+%%
+%% 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-2017 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\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
new file mode 100644
index 00000000..a6efb75e
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqcz.def
@@ -0,0 +1,113 @@
+%%
+%% 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-2017 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}
+%%%%%%%%%%%%%%%%%%% 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
new file mode 100644
index 00000000..461c4774
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqda.def
@@ -0,0 +1,82 @@
+%%
+%% 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-2017 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}
+%%%%%%%%%%%%%%%%%%%% 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
new file mode 100644
index 00000000..960cf0b2
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqde.def
@@ -0,0 +1,113 @@
+%%
+%% 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-2017 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}
+%%%%%%%%%%%%%%%%%%%% 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
new file mode 100644
index 00000000..966690d0
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqes.def
@@ -0,0 +1,77 @@
+%%
+%% 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-2017 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}
+%%%%%%%%%%%%%%%%%%% 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
new file mode 100644
index 00000000..13b7664f
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqexam.def
@@ -0,0 +1,1651 @@
+%%
+%% This is file `eqexam.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `eqexam')
+%%
+\ProvidesFile{eqexam.def}
+ [2017/03/16 v7.8g %
+ 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 % dps new
+\newif\ifnocorrections \nocorrectionsfalse
+\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}
+\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}}
+\def\recoverDisplayBelow{\vskip\belowdisplayskip}
+\newcommand{\adjDisplayBelow}{\vskip-\lastskip\vskip-\baselineskip}
+\newcommand{\adjDisplayBelowPlus}{\adjDisplayBelow\recoverDisplayBelow}
+\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}
+\def\eqExerSolnHeaderSngl{%
+ \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{%
+ \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
+\def\solnexer@woparts{\def\bLeaveVspace{x}% = no vertical space added
+ \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
+}
+\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
+ \eqPriorVspace{#1}{\nobreak\noindent
+ \ifx\soln@keys@nLines\@empty
+ \if@eqlinedfiller
+ \def\eq@lines@next{\vspaceFiller{#1}}\else
+ \def\eq@lines@next{\parbox[b][#1][t]{\linewidth}
+ {\vspaceFiller{#1}}}\fi
+ \else
+ \def\eq@lines@next{\eq@linesXPgs}%
+ \fi\eq@lines@next
+ }%
+ \fi
+ }%
+ \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}}%
+ \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi
+ \ifvspacewithsolns\vspaceFmt{\sameVspace}\fi
+ \ifeq@nosolutions\ifeq@solutionsafter\else
+ \vspaceFmt{\sameVspace}\fi\fi
+ \fi\fi
+ \solnexer@@@woparts
+}
+\def\solnsafterSkip#1{\setlength{\@tempdima}{#1}%
+ \def\solnsafterSkipAmt{\the\@tempdima}%
+ \def\solutionsafterSkip{\vskip#1\relax}}
+\solnsafterSkip{\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\solnexer@@@woparts{%
+ \global\thereissolutiontrue
+ \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
+ \ifx\bLeaveVspace\@empty\leavevspace\fi
+ \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%\par
+ \removelastskip\removelastparskip
+ \cqSAtrue\eqCQDeclarations
+ \declCopyQues{\input{\cq@CutName}}%
+ \ifx\exsolafter\@empty
+ \ifdim\sameVspace=0pt\eqe@setStartSolns
+ \else
+ \solutionsafterSkip
+ \eqe@setStartSolns
+ \fi
+ \else\par\kern0pt
+ \solutionsafterSkip
+ \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@next}
+\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%
+}
+\def\endsolnexer@woparts{%
+ \if\currhideopt H%
+ \ifkeepdeclaredvspacing\vskip\sameVspace\fi
+ \csname endprocsoln\endcsname
+ \else
+ \ifeq@solutionsafter
+ \if\exerstar*%
+ \eq@fititin{\mbox{\exrtnlabelformatwp}}\else
+ \eq@fititin{\mbox{\exrtnlabelformat}}\fi
+ \ifx\istabularexer\eq@YES\kern0pt\else\par\fi
+\ifx\minVspacet@bs\@empty
+ \ifkeepdeclaredvspacing
+ \@tempdima\pagetotal
+ \advance\@tempdima-\eq@startSoln
+ \@tempdimb\sameVspace\relax
+ \ifdim\@tempdimb>1sp\relax
+ \advance\@tempdimb-\@tempdima
+ \ifdim\@tempdimb>0pt\vglue\@tempdimb\kern0pt
+ \let\eqe@showEndHere\@gobble
+ \edef\tmp@exp{\noexpand\marginpar{%
+ \noexpand\smash{e: adj \the\@tempdimb}}}%
+ \eqe@debugVertSkip{\tmp@exp}%
+ \fi
+ \fi
+ \fi
+ \eqe@showEndHere{\eqe@debugVertSkip{\marginpar{\smash{e}}}}%
+\fi
+ \else
+ \endprocsoln
+ \eq@ckglobalhide
+ \ifeq@hidesolution\else
+ \endsolnexerhookaux
+ \set@display@protect
+ \immediate\write\verbatim@out{\eqExerSolnTrailer}%
+ \set@typeset@protect
+ \fi
+ \fi
+ \fi
+\pkg@endsolnexerhook\endsolnexerhook}
+\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 % dps 2016/12/16
+\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}% dps88
+ \vskip\eqparts@itemsep\relax\fi % dps88
+ \topofpartshook
+ \let\itsExerParts\eq@YES % dps17
+ \global\let\@listiiredefined\eq@NO
+ \def\exerwparts@cols{0}\@ifnextchar[%
+ {%
+ \if@tableadinitem\else\removelastparskip\fi % dps11
+ \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]{{% dps88
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@itemsep{\the\@tempdima}}}
+\let\eqpartsitemsep\partsitemsep
+\def\eqparts@itemsep{0pt}
+\newcommand\partsparsep[1]{{% dps88
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@parsep{\the\@tempdima}}}
+\def\eqparts@parsep{0pt}
+\newcommand\partstopsep[1]{{% dps88
+ \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 % dps7
+ \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
+ \xdef\prtsIndntSep{\the\eq@tmplength}% dps7
+ \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 % dps cq
+ \ifx\eq@tabMarkChk\@gobble
+ \def\eq@atnext{\expandafter
+ \tabularnewline\expandafter[#1]}\else
+ \def\eq@atnext{\resettabMark\tabularnewline
+ \noalign{\expandafter\kern#1}}\fi % dps7
+ \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 % dps7
+ \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
+ \advance\eq@tmpdima\prtsIndntSep\relax
+ \if@tableadinitem\else\vskip\eq@partstabtopsep\relax\fi % dps11
+ \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}%
+ \advance\linewidth-\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{\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
+\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
+\def\@@shortquiz[#1]{%\begingroup
+ \gdef\oField{#1}\gdef\curr@quiz{#1}\gdef\currQuiz{#1}%
+ \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}
+\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{%
+ \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%
+}
+\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 % dps17
+ \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 % dps17
+ \ifx\itsExerParts\eq@YES\par\removelastskip
+ \removelastparskip\vskip\aboveanswersSkip\fi
+ \else\par\removelastskip\removelastparskip
+ \vskip\aboveanswersSkip\fi
+ \noindent\ifnum\exerwparts@cols>1\relax\parshape=0\fi
+ \tabcolsep=0pt
+ \eq@tmpdima=\linewidth
+ \@tempcnta#1\relax
+ \advance\@tempcnta-1\relax
+ \multiply\@tempcnta by2
+ \@tempdima\sq@tabsep\relax
+ \multiply\@tempdima\@tempcnta
+ \advance\eq@tmpdima-\@tempdima
+ \divide\eq@tmpdima by#1
+ \def\Ans{\Ans@tabular}%
+ \tabcolsep\sq@tabsep\relax
+ \expandafter\tabular\sq@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}}%
+\let\eq@save@doendpe\@doendpe
+\def\reset@doendpe#1{\global\eq@scratchtoks=\expandafter{#1}%
+ \gdef\@doendpe{\par\@endpetrue\global\let\@doendpe\eq@save@doendpe
+ \def\par{\@restorepar
+ \expandafter\everypar
+ \expandafter{\the\eq@scratchtoks}\par\@endpefalse}%
+ \everypar{{\setbox\z@\lastbox}%
+ \everypar{}\@endpefalse}\the\eq@scratchtoks
+ }%
+}
+\newcommand\answersEndHook[1]{\def\eq@answersEndHook{#1}}
+\let\eq@answersEndHook\@empty
+\def\endanswers@sq{\endtabular\setcounter{quizno}{0}%
+ \eq@answersEndHook\reset@doendpe{\the\everypar}%
+ \ifinner\else%\par
+ \removelastskip
+ \vspace{\aboveanswersSkip}\@endpetrue\fi
+}
+\def\endmanswers@sq{\endtabular\setcounter{quizno}{0}%
+ \eq@answersEndHook\reset@doendpe{\the\everypar}%
+ \ifinner\else%\par
+ \removelastskip
+ \vspace{\aboveanswersSkip}\@endpetrue\fi
+}
+\def\popiiictm{\special{CTM: pop pop pop}}
+\def\aebChoiceAltFmt{\noexpand\ifaebshowgrayletters
+ \Alph{quizno}\noexpand\else\linkContentFormat\noexpand\fi}
+\def\linkContentFormat{%
+ \if\probstar*\Alph{quizno}\else\alph{quizno}\fi}
+\def\linkContentWrapper{(\hfil\linkContentFormat\hfil)}%
+\def\Ans@sq@l{%
+ \leavevmode\if\eq@listType\eq@One\stepcounter{quizno}\else
+ \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
+ {\ifwithsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi\PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
+ \eq@tmpdima=\wd\eq@tmpbox
+ \def\link@@Content{\linkContentWrapper}%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \Ans@sq@l@driver
+\eq@hspanner\ignorespaces}
+\let\Ans@ck@sq@l\Ans@sq@l
+\let\rbf@Opts\@empty
+\def\Ans@sq@f{%
+ \if\eq@listType\eq@One\stepcounter{quizno}\else
+ \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
+ {\ifwithsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi\PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \eq@tmpdima=\wd\eq@tmpbox%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \insertGrayLetters % 6.3d
+ \Ans@sq@f@driver
+\eq@hspanner\ignorespaces}
+\let\Ans@ck@sq@f\Ans@sq@f
+\newskip\aboveanswersSkip
+\setlength\aboveanswersSkip{3pt}
+\providecommand\graylettersColor{gray}
+\def\insertGrayLetters{\ifaebshowgrayletters
+ \rlap{\makebox[\RadioFieldSize]%
+ {\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi}
+\newcount\eq@tabColCnt
+\define@key{bchoice}{nCols}{\def\bChoiceNumCols{#1}}
+\@for\eqi:=1,2,3,4,5,6,7,8,9,10 \do{\edef\temp@expand@def{%
+ \noexpand\define@key{bchoice}{\eqi}[\eqi]{%
+ \noexpand\def\noexpand\bChoiceNumCols{\eqi}}%
+ }\temp@expand@def
+}
+\def\bChoiceNumCols{\aeb@numCols}
+\define@key{bchoice}{random}[true]{%
+ \csname if#1\endcsname\eq@randomizeChoicestrue
+ \else\eq@randomizeChoicesfalse\fi
+}
+\define@key{bchoice}{label}[]{\xdef\bChoiceLabel{#1}}
+\def\bChoices{\@ifnextchar[{\@ansChoices}{\@ansChoices[\aeb@numCols]}}
+\def\@ansChoices[#1]%
+{%
+ \global\let\@tempholdSaveAns\@empty %4/5
+ \global\let\@tempholdSaveChoice\@empty %4/5
+ \global\let\bChoiceLabel\@empty %4/5
+ \setkeys{bchoice}{#1}%
+ \global\eq@tabColCnt=0
+ \ifnum\aeb@numCols=1 % list mode
+ \def\eq@next{\@layoutListAns}\else % tabular mode
+ \def\eq@next{\@layoutTabularAns{\bChoiceNumCols}}\fi
+ \eq@next
+}
+\let\eChoices\relax
+\def\@layoutListAns{\@ifnextchar\Ans{\@getListAns}%
+ {\@lookforendansChoices{\@layoutListAns}}%
+}
+\newcommand{\eq@saveAns}[2][]{%
+ \let\eq@next\@@@SaveAnsGobbleAns
+ \ifx\bChoiceLabel\@empty\else
+ \def\eq@savedAnsOpt{#1}\def\eq@savedAnsZO{#2}%
+ \if\eq@savedAnsZO1 \let\eq@next\@@@SaveAns\fi
+ \fi\eq@next
+}
+\long\def\@@@SaveAns#1\eAns{% 4/5
+ \g@addto@macro\@tempholdSaveAns{\\{\ignorespaces#1}}%
+ \addtocounter{quizno}{1}%
+ \edef\temp@expand{\noexpand\g@addto@macro\noexpand
+ \@tempholdSaveChoice{%
+ \noexpand\\{\ifx\sqstar\@empty\aebChoiceAltFmt\else
+ \ifaebshowgrayletters\Alph{quizno}\else
+ \linkContentFormat\fi\fi}}}\temp@expand
+ \addtocounter{quizno}{-1}%
+}
+\newif\ifoxfordcomma \oxfordcommatrue
+\def\oxfordCommaOn{\oxfordcommatrue}
+\def\oxfordCommaOff{\oxfordcommafalse}
+\def\eq@insertComma{%
+ \ifx\eq@comma\@empty
+ \ifnum\@nameuse{NumAns\eq@namearg}>2\relax
+ \def\eq@comma{,}\fi
+ \else\ifx\eq@insertAnd\@empty\eq@comma\space
+ \else\ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}%
+ \ifoxfordcomma\eq@comma\fi\else\eq@comma\fi\space
+ \fi
+ \fi
+}
+\newcommand\eqAnd{and}\def\eq@insertAnd{%
+ \ifnum\@nameuse{NumAns\eq@namearg}<2\relax\else
+ \ifnum\@nameuse{NumAns\eq@namearg}>2\relax
+ \else\leavevmode\space\fi\eqAnd\space\fi}
+\long\def\eq@displayAns#1{\advance\@tempcnta1\relax
+ \eq@insertComma
+ \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
+\def\eq@displayAlts#1{\advance\@tempcnta1
+ \eq@insertComma
+ \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi
+ \savedAltFmt{#1}}
+\def\eq@displayAltsAns#1{\advance\@tempcnta1\relax
+ \eq@insertComma
+ \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
+\newcommand{\savedAltFmt}[1]{(#1)}
+\newcommand{\useSavedAns}{\bgroup\@ifstar{\useSavedAns@i}
+ {\let\eq@insertAnd\@empty\useSavedAns@i}}
+\newcommand{\useSavedAns@i}[2][]{\@tempcnta=0\relax
+ \def\eq@namearg{#2}\let\label\@gobble
+ \def\eq@argi{#1}\ifx\eq@argi\@empty
+ \let\eq@comma\@empty
+ \let\\\eq@displayAns\@nameuse{SavedAns#2}\else
+ \@nameuse{SavedAns#2-Idx#1}\fi
+ \egroup
+}
+\newcommand{\useSavedAlts}{\bgroup\@ifstar{\useSavedAlts@i}
+ {\let\eq@insertAnd\@empty\useSavedAlts@i}}
+\newcommand{\useSavedAlts@i}[2][]{\@tempcnta=0\relax
+ \def\eq@namearg{#2}\@nameuse{caseFor#2}%
+ \def\eq@argi{#1}\ifx\eq@argi\@empty
+ \let\eq@comma\@empty
+ \let\\\eq@displayAlts\@nameuse{SavedAlts#2}\else
+ \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}\fi
+ \egroup
+}
+\newcommand{\useSavedAltsAns}{\bgroup\@ifstar{\useSavedAltsAns@i}
+ {\let\eq@insertAnd\@empty\useSavedAltsAns@i}}
+\newcommand{\useSavedAltsAns@i}[2][]{\@tempcnta=0\relax
+ \def\eq@namearg{#2}\@nameuse{caseFor#2}\let\label\@gobble
+ \def\eq@argi{#1}\ifx\eq@argi\@empty
+ \let\eq@comma\@empty
+ \let\\\eq@displayAltsAns\@nameuse{SavedAltsAns#2}\else
+ \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}
+ \@nameuse{SavedAns#2-Idx#1}\fi
+ \egroup
+}
+\newcommand{\useSavedNumAns}[1]{\@nameuse{NumAns#1}}
+\long\def\@@@SaveAnsGobbleAns#1\eAns{} % 4/5
+\long\def\@getListAns\Ans#1\eAns{%\@@par %start new paragraph
+ \eq@saveAns#1\eAns % 4/5
+ \Ans#1\vspace{\@rowskip}%
+ \@layoutListAns
+}
+\long\def\@lookforendansChoices#1{%
+ \@ifnextchar\eChoices{\rowsep{\rowsep@default}%
+ \expandafter\@findendans\@gobble}{\expandafter#1\@gobble}%
+}
+\def\@layoutTabularAns#1{%
+ \let\eq@tabSep\@empty
+ \xdef\numShortCols{#1}%
+ \ifnum#1>\aeb@numCols \xdef\numShortCols{\aeb@numCols}\fi
+ \@@layoutTabularAns
+}
+\def\@@layoutTabularAns{%
+ \@ifnextchar\Ans{\@getTabAns}%
+ {\@lookforendansChoices{\@@layoutTabularAns}}%
+}
+\def\rowsep#1{\gdef\@rowsep{[#1]}\gdef\@rowskip{#1}}%
+\rowsep{\rowsep@default}
+\def\rowsepDefault#1{\def\rowsep@default{#1}}
+\def\rowsep@default{0pt}
+\long\def\@getTabAns\Ans#1\eAns{%
+ \eq@saveAns#1\eAns
+ \global\advance\eq@tabColCnt1
+ \let\@save@tabSep=\eq@tabSep
+ \ifnum\eq@tabColCnt=\numShortCols
+ \global\eq@tabColCnt=0
+ \xdef\eq@tabSep{\noexpand\\\noalign{\kern\@rowskip\relax}}%
+ \else
+ \gdef\eq@tabSep{&}%
+ \fi
+ \@ifnextchar\eChoices{\@save@tabSep\Ans#1\rowsep{\rowsep@default}
+ \expandafter\@findendans\@gobble}%
+ {\@save@tabSep\Ans#1\@@layoutTabularAns}%
+}
+\def\@findendans{\@ifnextchar\end{% 4/5
+ \ifx\bChoiceLabel\@empty\else
+ \processLabeledAns\fi
+ }{\expandafter\@findendans\@gobble}}%
+\def\defineEachAns#1{\advance\count0by1\relax
+ \@temptokena={#1}\csarg\xdef
+ {SavedAns\bChoiceLabel-Idx\the\count0}{\the\@temptokena}%
+ \ifsolutionsonly\else
+ {\let\\\relax\eq@IWDefs{\string
+ \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\count0}%
+ {\the\@temptokena}}}\fi
+}
+\def\defineEachChoice#1{\advance\count0by1\relax
+ \@temptokena={#1}\csarg\xdef
+ {SavedAlts\bChoiceLabel-Idx\the\count0}%
+ {\the\@temptokena}\ifsolutionsonly\else
+ {\let\\\relax\eq@IWDefs{\string
+ \csarg\string\gdef{SavedAlts\bChoiceLabel-Idx\the\count0}%
+ {\the\@temptokena}}}\fi
+}
+\def\processLabeledAns{%
+ \bgroup
+ \let\label\@gobble
+\if\aeb@FLOverride\eq@l
+ \global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\else
+ \ifaebshowgrayletters
+ \global\@namedef{caseFor\bChoiceLabel}{\graylettersOn}\else
+ \global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\fi
+\fi
+ \toks@=\expandafter{\@tempholdSaveAns}\csarg
+ \xdef{SavedAns\bChoiceLabel}{\the\toks@}%
+ \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
+ \csarg\string\gdef{SavedAns\bChoiceLabel}{\the\toks@}}}\fi
+ \count0=0\relax\let\\\defineEachAns\the\toks@
+ \xdef\@currNCntAns{\the\count0 }\csarg
+ \xdef{NumAns\bChoiceLabel}{\@currNCntAns}%
+ \ifsolutionsonly\else{\eq@IWDefs{\string
+ \csarg\string\gdef{NumAns\bChoiceLabel}{\the\count0 }}}\fi
+ \toks@=\expandafter{\@tempholdSaveChoice}\csarg
+ \xdef{SavedAlts\bChoiceLabel}{\the\toks@}%
+ \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
+ \csarg\string\gdef{SavedAlts\bChoiceLabel}{\the\toks@}}}\fi
+ \count0=0\relax\let\\\defineEachChoice\the\toks@
+ \count0=1\relax\toks@={}%{\ignorespaces\@gobble}%
+ \loop
+ \edef\temp@exp{\the\toks@\noexpand\\{%
+ \noexpand\useSavedAlts[\the\count0]{\bChoiceLabel}
+ \noexpand\useSavedAns[\the\count0]{\bChoiceLabel}}}%
+ \toks@=\expandafter{\temp@exp}%
+ \ifnum\count0<\@currNCntAns
+ \advance\count0by1
+ \repeat
+ \csarg\xdef{SavedAltsAns\bChoiceLabel}{\the\toks@}%
+ \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
+ \csarg\string\gdef{SavedAltsAns\bChoiceLabel}{\the\toks@}}}\fi
+ \egroup
+}
+\def\graylettersOn{\aebshowgrayletterstrue}
+\def\graylettersOff{\aebshowgraylettersfalse}
+\def\aeb@exiii{\expandafter\expandafter\expandafter}
+\def\REF{\@ifstar{\let\isREFstar\eq@One\aeb@REFstar}
+ {\let\isREFstar\eq@Zero\aeb@REF}}
+\def\aeb@REFstar#1{\@ifundefined{r@#1}{\hbox{\reset@font\bfseries ??}}
+ {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}%
+ \else\ref*{#1}\fi}%
+}
+\def\aeb@REF#1{\@ifundefined{r@#1}{\hbox{\reset@font\bfseries ??}}
+ {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}%
+ \else\ref{#1}\fi}%
+}
+\def\aeb@buildUpperCaseRef#1{%
+ \xdef\tmp@expand{\aeb@exiii\@firstoftwo\csname r@#1\endcsname}%
+ \xdef\tmp@expand{\uppercase{\tmp@expand}}\tmp@expand
+}
+\endinput
+%%
+%% End of file `eqexam.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqfin.def b/texmf-dist/tex/latex/acrotex/eqfin.def
new file mode 100644
index 00000000..052d634b
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqfin.def
@@ -0,0 +1,78 @@
+%%
+%% This is file `eqfin.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqfin')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{eqfin.def}
+%%%%%%%%%%%%%%%%%%%% eqfin.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Paivi Porras %%
+%% e-mail address: paivi.porras@lut.fi %%
+%% Language: Finnish %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{Harjoitus}
+\renewcommand\exlabelsol{Harjoitus}
+
+\renewcommand\exsectitle{Ratkaisut}
+\renewcommand\exsecrunhead{Ratkaisu \exlabelsol }
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Ratkaisu}:}
+
+\renewcommand\eq@sqslsectitle{Vastaukset testikysymyksiin}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{Vastaukset testikysymyksiin}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{Vastaus testikysymykseen:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{Ratkaisu}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Testikysymys}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Lopeta testi}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Oikein!"} %muokattu
+\renewcommand\eqsqwgmsg{"V\string\344\string\344rin!"} %m
+
+\renewcommand\eq@bqlabel{Aloita testi}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabelISO}
+
+\renewcommand\eq@eqlabel{Lopeta testi}
+\renewcommand\eqlabel{\eq@eqlabel}
+
+\renewcommand\eq@Score{Pisteet:}\renewcommand\eq@OutOf{/}
+\renewcommand\eqInitQuizMsg{%m
+ "Testi on aloitettava painamalla "+msg+"."}
+\renewcommand\eqMadeChoice{%m
+ "Olet jo kerran valinnut.
+ Valintasi oli ("+Responses[probno]+")."
++" Haluatko vaihtaa?"}
+\AtEndOfPackage{%
+\renewcommand\eq@local@CA{Oikein}
+\renewcommand\eq@local@RC{Omat vastaukset!}
+\renewcommand\eq@local@AC{Ole hyv\string\344!}}
+\endinput
+%%
+%% End of file `eqfin.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqfr.def b/texmf-dist/tex/latex/acrotex/eqfr.def
new file mode 100644
index 00000000..75d5978a
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqfr.def
@@ -0,0 +1,75 @@
+%%
+%% This is file `eqfr.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqfr')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{eqfr.def}
+%%%%%%%%%%%%%%%%%%%%%%% eqfr.def %%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Jean-Michel SARLAT %%
+%% Language: French %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{Exercice}
+\renewcommand\exlabelsol{\exlabel}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Solution} :}
+
+\renewcommand\exsectitle{Solutions des \exlabelsol s}
+\renewcommand\exsecrunhead{\exsectitle}
+
+\renewcommand\eq@sqslsectitle{Les r\'{e}ponses aux questionnaires}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{Les r\'{e}ponses aux questionnaires}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \protect\textbf{R\protect\'{e}ponse :}}
+\renewcommand\sqsllabel{\eq@sqsllabel}% User access
+
+\renewcommand\sqsolafter{\textit{Solution} :}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Question.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Retour au questionnaire.}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Exact !"}
+\renewcommand\eqsqwgmsg{"Faux !"}
+
+\renewcommand\eq@bqlabel{D\'ebut}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{D\string\351but}
+\renewcommand\bqlabelISO{\eq@bqlabelISO}
+
+\renewcommand\eq@eqlabel{Fin}
+\renewcommand\eqlabel{\eq@eqlabel}
+\renewcommand\eq@Score{Score :}\renewcommand\eq@OutOf{sur}
+\renewcommand\eqInitQuizMsg{%
+ "Vous devez initialiser le questionnaire ! Clicker sur "+msg+"."}
+\renewcommand\eqMadeChoice{
+ "Vous avez d\string\\351j\string\\340 fait un choix,"
+ + " ce choix est ("+Responses[probno]+")."
+ + " Souhaitez vous le modifier ?"}
+\renewcommand\eq@local@CA{%
+ R\texorpdfstring{\'}{\string\351}ponses}
+\renewcommand\eq@local@RC{Correctes}
+\renewcommand\eq@local@AC{SVP !}
+\endinput
+%%
+%% End of file `eqfr.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqit.def b/texmf-dist/tex/latex/acrotex/eqit.def
new file mode 100644
index 00000000..025cf02a
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqit.def
@@ -0,0 +1,63 @@
+%%
+%% This is file `eqit.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqit')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{eqit.def}
+%%%%%%%%%%%%%%%%%%% eqit.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: PierLuigi Zezza %%
+%% e-mail address: pzezza@cce.unifi.it %%
+%% Language: Italian %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{Esercizio}
+\renewcommand\exlabelsol{\exlabel}
+\renewcommand\exsectitle{Soluzioni degli Esercizi }
+\renewcommand\exsecrunhead{\exsectitle}
+\renewcommand{\eq@exsolafterDefault}{\textit{Soluzione}:}
+\renewcommand\eq@sqslsectitle{Soluzioni dei Quiz}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+\renewcommand\eq@sqslsecrunhead{Soluzioni dei Quiz}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+\renewcommand\eq@sqsllabel{\string\textbf{Soluzione del Quiz:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+\renewcommand\sqsolafter{\textit{Soluzione}:}
+\renewcommand\eq@sqlabel{\textcolor{red}{Quiz.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+\renewcommand\eq@sqslrtnlabel{Fine Quiz}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+\renewcommand\eqsqrtmsg{"Giusto!"}
+\renewcommand\eqsqwgmsg{"Sbagliato!"}
+\renewcommand\eq@bqlabel{Inizio Test}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+\renewcommand\eq@eqlabel{Fine Test}
+\renewcommand\eqlabel{\eq@eqlabel}
+\renewcommand\eq@Score{Punteggio:}\renewcommand\eq@OutOf{su}
+\renewcommand\eqInitQuizMsg{"Dovete inizializzare il Quiz!
+ Click su "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "Avete gi\string\\340 fatto una scelta.
+ La vostra scelta era ("+Responses[probno]+").
+ Volete cambiarla ?"}
+\renewcommand\eq@local@CA{Correggere}
+\renewcommand\eq@local@RC{Le mie risposte!}
+\renewcommand\eq@local@AC{Per favore!}
+\endinput
+%%
+%% End of file `eqit.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqnl.def b/texmf-dist/tex/latex/acrotex/eqnl.def
new file mode 100644
index 00000000..c5670fe9
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqnl.def
@@ -0,0 +1,79 @@
+%%
+%% This is file `eqnl.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqnl')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{eqnl.def}
+%%%%%%%%%%%%%%%%%%% eqnl.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Henny Wilbrink %%
+%% e-mail address: wsdwhw@win.tue.nl %%
+%% Language: Dutch %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{Opgave}
+\renewcommand\exlabelsol{\exlabel}
+
+\renewcommand\exsectitle{Oplossingen van de Opgaven}
+\renewcommand\exsecrunhead{\exsectitle}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Oplossing}:}
+
+\renewcommand\eq@sqslsectitle{Oplossingen van de Toetsen}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{Oplossingen van de Toetsen}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Oplossing}:}
+
+\renewcommand\eq@sqsllabel{\string\textbf{Oplossing van Toets:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{Oplossing}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Toets.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Terug naar Toets}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Goed!"}
+\renewcommand\eqsqwgmsg{"Fout!"}
+
+\renewcommand\eq@bqlabel{Begin Toets}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{Einde Toets}
+\renewcommand\eqlabel{\eq@eqlabel}
+
+\renewcommand\eq@Score{Score:}\renewcommand\eq@OutOf{van de}
+
+\renewcommand\eqInitQuizMsg{%
+ "U moet de Toets initialiseren! Klik op "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "U hebt al een keuze gemaakt.
+ Uw keuze was ("+Responses[probno]+").
+ Wil u dit veranderen?"}
+\renewcommand\eq@local@CA{Corrigeer}
+\renewcommand\eq@local@RC{Mijn Antwoorden!}
+\renewcommand\eq@local@AC{AUB!}
+\endinput
+%%
+%% End of file `eqnl.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqno.def b/texmf-dist/tex/latex/acrotex/eqno.def
new file mode 100644
index 00000000..ffaea3d8
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqno.def
@@ -0,0 +1,80 @@
+%%
+%% This is file `eqno.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqno')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{eqno.def}
+%%%%%%%%%%%%%%%%%%%% eqno.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Hans Fredrik Nordhaug %%
+%% e-mail address: hansfn@mi.uib.no %%
+%% Language: Norwegian %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{{\O}velse}
+\renewcommand\exlabelsol{{\protect\O}velse}
+
+\renewcommand\exsectitle{L{\o}sning p{\aa} {\o}velsene}
+\renewcommand\exsecrunhead{L{\protect\o}sning p{\protect\aa}
+ {\protect\o}velsene}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{L{\o}sning}:}
+
+\renewcommand\eq@sqslsectitle{L{\o}sning p{\aa} oppgavene}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{L{\o}sning p{\aa} oppgavene}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \protect\textbf{L{\protect\o}sning p{\protect\aa} oppgave:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{L{\o}sning}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Oppgave}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Slutt}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Rett!"}
+\renewcommand\eqsqwgmsg{"Feil!"}
+
+\renewcommand\eq@bqlabel{Start oppgaver}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{Slutt}
+\renewcommand\eqlabel{\eq@eqlabel}
+
+\renewcommand\eqScore{Poeng:}\renewcommand\eqOutOf{av}
+\renewcommand\eqInitQuizMsg{"Du m\string\\345 initialisere testen!"
++" Klikk p\string\\345 "+msg+"."}
+\renewcommand\eqMadeChoice{%
+ "Du har allerede gjort et valg.
+ Valget var ("+Responses[probno]+").
+ Vil du endre det?"}
+\renewcommand\eq@local@CA{Rett}
+\renewcommand\eq@local@RC{mine svar!}
+\renewcommand\eq@local@AC{%
+ V\texorpdfstring{\ae}{\string\346}r
+ s\texorpdfstring{\r}{\string\345}snill!}
+\endinput
+%%
+%% End of file `eqno.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqpo.def b/texmf-dist/tex/latex/acrotex/eqpo.def
new file mode 100644
index 00000000..ce866ed1
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqpo.def
@@ -0,0 +1,89 @@
+%%
+%% This is file `eqpo.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqpo')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{eqpo.def}
+%%%%%%%%%%%%%%%%%%%% eqpo.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Jerzy Mycielski %%
+%% e-mail address: jmyc@poczta.onet.pl %%
+%% Language: Polish %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% The polish accented characters included in pdfendconding is
+%% lslash and oacute, not included are zacute, zdot, cacute,
+%% nacute, sacute, aogonek, eogonek and corresponding capital
+%% characters.
+\renewcommand\exlabel{Zadanie}
+\renewcommand\exlabelsol{\exlabel}
+
+\renewcommand\exsectitle{Rozwi\k{a}zania Zada\'{n}}
+\renewcommand\exsecrunhead{\protect\exsectitle}
+
+\renewcommand{\eq@exsolafterDefault}{\textit{Rozwi\k{a}znie}:}
+
+\renewcommand\eq@sqslsectitle{Rozwi\k{a}zania Test\'{o}w}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{Rozwi\protect\k{a}zania
+ Test\protect\'{o}w}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{\string\textbf{Rozwi\protect\k{a}zanie
+ Testu:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{Rozwi\k{a}zanie}:}
+
+\renewcommand\eq@sqlabel{\textcolor{red}{Test.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{Zako\ifeq@solutionsafter\else
+ \expandafter\protect\fi\'{n}cz Test}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\renewcommand\eqsqrtmsg{"Dobrze!"}
+\renewcommand\eqsqwgmsg{"\string\\u0179le!"}
+
+\renewcommand\eq@bqlabel{Rozpocznij Test}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{Zakoncz Test}
+\renewcommand\eqlabel{\eq@eqlabel}
+
+\renewcommand\eq@Score{Punkt\'{o}w:}
+\renewcommand\eq@OutOf{z mozliwych}
+\renewcommand\eqQuizTotalMsg{"\eqScore\space"+Score +
+ " \eqOutOf\space"+nQuestions}
+
+\renewcommand\eqInitQuizMsg{"Musisz rozpoczac Test! Kliknij
+ na "+msg+"."}
+
+\renewcommand\eqMadeChoice{%
+ "Juz dokonal\string\\233e\string\\u015B wyboru.
+ Twoim wyborem by\string\\233o ("+Responses[probno]+").
+ Czy chcesz go zmieni\string\\u0107?"}
+
+\renewcommand\eq@local@CA{Popraw}
+\renewcommand\eq@local@RC{Moje odpowiedzi!}
+\renewcommand\eq@local@AC{Prosze!}
+\endinput
+%%
+%% End of file `eqpo.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqru.def b/texmf-dist/tex/latex/acrotex/eqru.def
new file mode 100644
index 00000000..d1ccae6c
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqru.def
@@ -0,0 +1,178 @@
+%%
+%% This is file `eqru.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqru')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{eqru.def}
+%%%%%%%%%%%%%%%%%%% eqru.def %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Sergei V. Znamenskii %%
+%% e-mail address: znamensk@rustex.botik.ru %%
+%% Language: Russian %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\expandafter\ifx\csname inputencoding\endcsname\relax
+\RequirePackage{inputenc}\fi
+\inputencoding{cp1251}\makeatletter
+\expandafter\ifx\csname Russian\endcsname\relax
+\RequirePackage[russian]{babel}\fi
+ \def\web@versionlabel{\^{A}{\aa}ð\~{n}\`{e}\"{y}}%
+ \def\web@toc{\~{N}\^{\i}\"{a}{\aa}ð{\ae}\`{a}\'{\i}\`{e}{\aa}}%
+ \def\web@continued{\"{\i}ð\^{\i}\"{a}\^{\i}\"{e}{\ae}.}%
+ \def\web@article{\'{I}\`{a}{\div}\`{a}\"{e}\^{\i}
+ \hyperlink{section.1}{}}%
+ \def\web@directory{\"{I}\`{a}\"{\i}\^{e}\`{a}}%
+ \def\web@revision{\"{A}\`{a}\`{o}\`{a} \"{\i}\^{\i}\~{n}\"{e}%
+ {\aa}\"{a}\'{\i}{\aa}\~{a}\^{\i} \`{e}\c{c}\`{\i}{\aa}%
+ \'{\i}{\aa}\'{\i}\`{e}\"{y}:}%
+ \def\web@copyright{\^{E}\^{\i}\"{\i}\`{e}ð\`{a}\'{e}\`{o}}%
+ \def\web@section{\textsection\ }%
+ % Label Navibar
+ \def\web@back{\'{I}\`{a}\c{c}\`{a}\"{a}}%
+ \def\web@doc{\"{A}\^{\i}\^{e}.}% restricted to three characters
+
+\renewcommand\exlabel{\'{O}\"{\i}ð\`{a}{\ae}\'{\i}{\aa}\'{\i}\`{e}{\aa}}
+\renewcommand\exlabelsol{\^{E} \'{o}\"{\i}ð\`{a}{\ae}%
+ \'{\i}{\aa}\'{\i}\`{e}þ}
+
+\renewcommand\exsectitle{Ð{\aa}{\o}{\aa}\'{\i}\`{e}\"{y}
+ \'{o}\"{\i}ð\`{a}{\ae}\'{\i}{\aa}\'{\i}\`{e}\'{e}}
+\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
+
+\renewcommand\exsolafter{\textit{Ð{\aa}{\o}{\aa}\'{\i}\`{e}{\aa}}:}
+
+\renewcommand\eq@sqslsectitle{\^{I}\`{o}\^{a}{\aa}\`{o}\^{u}
+ \^{e} \`{o}{\aa}\~{n}\`{o}\`{a}\`{\i}}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+\renewcommand\eq@sqslsecrunhead{\^{I}\`{o}\^{a}{\aa}\`{o}\^{u}
+ \^{e} \^{e}\^{\i}ð\^{\i}\`{o}\^{e}\`{e}\`{\i}
+ \`{o}{\aa}\~{n}\`{o}\`{a}\`{\i}}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+\renewcommand\eq@sqsllabel{%
+ \string\textbf{\^{I}\`{o}\^{a}{\aa}\`{o}\^{u}:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+\renewcommand\sqsolafter{\textit{Ð{\aa}{\o}{\aa}\'{\i}\`{e}{\aa}}:}
+
+\renewcommand\eq@sqlabel{%
+ \textcolor{red}{\c{C}\`{a}\"{a}\`{a}\'{\i}\`{e}{\aa}.}}
+\renewcommand\sqlabel{\eq@sqlabel}
+
+\renewcommand\eq@sqslrtnlabel{\^{a}{\aa}ð\'{\i}\'{o}\`{o}\"{u}\~{n}\"{y}}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+\cyrCommand\eqsqslrtnlabel{\^{E} \^{o}\^{\i}ð\`{\i}\'{o}\"{e}%
+ \`{e}ð\^{\i}\^{a}\^{e}{\aa} \c{c}\`{a}\"{a}\`{a}\'{\i}\`{e}\"{y}}
+\renewcommand\eq@sqslrtnlabel{\eqsqslrtnlabel}
+
+\renewcommand\eq@bqlabel{CTAPT}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+
+\renewcommand\eq@eqlabel{\^{O}\`{E}\'{I}\`{E}{\O}}
+\renewcommand\eqlabel{\eq@eqlabel}
+\def\ScoreFieldDefaults
+{%
+ \Ff{\FfReadOnly}\BC{1 0 0}\BG{}\S{S}
+ \DV{\^{A}{\aa}ð\'{\i}\^{\i}:}\W{1}
+}
+\renewcommand\eq@local@CA{\`{E}\~{n}\"{\i}ð\`{a}\^{a}\`{e}\`{o}\"{u}}
+\renewcommand\eq@local@RC{\`{\i}\^{\i}\`{e} \^{\i}\`{o}\^{a}{\aa}%
+ \`{o}\^{u}!}
+\renewcommand\eq@local@AC{\"{I}\^{\i}{\ae}\`{a}\"{e}\'{o}\'{e}\~{n}%
+ \`{o}\`{a}!}
+%% In Cyrillic, at least with pdflatex v.1.40.3 , the same \eq@Score
+%% unfortunately can not serve both \ScoreFieldDefaults and
+%% \eqQuizTotalMsg.
+
+\renewcommand\eq@Score{\u0412\u0435\u0440\u043D\u043E:}
+\renewcommand\eq@OutOf{\u0438\u0437}
+
+\def\eqsqrtmsg{"\u0412\u0435\u0440\u043D\u043E!"}
+\def\eqsqwgmsg{"\u041E\u0448\u0438\u0431\u043A\u0430!"}
+
+\def\eqInitQuizMsg{"\u041A\u043B\u0438\u043A\u043D\u0438\u0442\u0435
+ \u043D\u0430 \u00AB"+msg+"\u00BB, \u0447\u0442\u043E\u0431\u044B
+ \u043D\u0430\u0447\u0430\u0442\u044C
+ \u043E\u0442\u0432\u0435\u0442."}
+
+\renewcommand\eqMadeChoice{"\u0412\u044B \u0443\u0436\u0435
+ \u0432\u044B\u0431\u0440\u0430\u043B\u0438
+ \u043E\u0442\u0432\u0435\u0442
+ ("+Responses[probno]+"). \u0418\u043B\u0438 \u0412\u044B
+ \u043F\u0435\u0440\u0435\u0434\u0443\u043C\u0430\u043B\u0438?"}
+\renewcommand\eq@local@CorrAnsButton{Ans}
+\renewcommand\eqerrABS{"\u0417\u043D\u0430\u043A\u0438
+ \u0430\u0431\u0441\u043E\u043B\u044E\u0442\u043D\u043E\u0439
+ \u0432\u0435\u043B\u0438\u0447\u0438\u043D\u044B \u043D\u0435
+ \u0441\u0431\u0430\u043B\u0430\u043D\u0441\u0438\u0440\u043E\u0432%
+ \u0430\u043D\u044B.
+ \u0418\u0441\u043F\u0440\u0430\u0432\u044C\u0442\u0435,
+ \u043F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430."}
+\renewcommand\eqerrBadMathFunc{"\u0412\u044B\u0440\u0430\u0436\u0435%
+ \u043D\u0438\u0435 `"+aF[i]+"' \u043D\u0435 \u044F\u0432\u043B%
+ \u044F\u0435\u0442\u0441\u044F \u043D\u0438
+ \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0439 "
+ +"\u0444\u0443\u043D\u043A\u0446\u0438\u0435\u0439,
+ \u043D\u0438 \u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D%
+ \u044B\u043C\u043C\u0430\u0442\u0435\u043C\u0430\u0442\u0438\u0447%
+ \u0435\u0441\u043A\u0438\u043C \u0432\u044B\u0440\u0430\u0436\u0435%
+ \u043D\u0438\u0435\u043C."}
+\renewcommand\eqParens{"\u041A\u0440\u0443\u0433\u043B\u044B\u0435
+ \u0441\u043A\u043E\u0431\u043A\u0438"}
+\renewcommand\eqBrackets{"\u041A\u0432\u0430\u0434\u0440\u0430\u0442%
+ \u043D\u044B\u0435 \u0441\u043A\u043E\u0431\u043A\u0438"}
+\renewcommand\eqBraces{"\u0424\u0438\u0433\u0443\u0440\u043D\u044B\u0435
+ \u0441\u043A\u043E\u0431\u043A\u0438"}
+\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " \u043D\u0435
+ \u0441\u0431\u0430\u043B\u0430\u043D\u0441\u0438\u0440%
+ \u043E\u0432\u0430\u043D\u043E.
+ \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430,
+ \u0438\u0441\u043F\u0440\u0430\u0432\u044C\u0442\u0435."}
+\renewcommand\eqerrBadExp{"\u0418\u0441\u043F\u0440\u0430\u0432%
+ \u044C\u0442\u0435, \u043F\u043E\u0436\u0430\u043B\u0443\u0439%
+ \u0441\u0442\u0430, \u0432\u044B\u0440\u0430\u0436\u0435\u043D%
+ \u0438\u0435 \u0441\u043E \u0441\u0442\u0435\u043F\u0435\u043D%
+ \u044C\u044E."}
+\renewcommand\eqerrUnfinishQuiz{"\u041F\u043E\u0436\u0430\u043B\u0443%
+ \u0439\u0441\u0442\u0430, \u0437\u0430\u043A\u043E\u043D\u0447%
+ \u0438\u0442\u0435 \u043D\u0430\u0447\u0430\u0442\u043E\u0435
+ \u0440\u0430\u043D\u0435\u0435 \u0437\u0430\u0434\u0430\u043D%
+ \u0438\u0435."}
+\renewcommand\noPeekMsg{"\u0420\u0435\u0448\u0435\u043D\u0438\u044F
+ \u043D\u0435 \u043F\u043E\u043A\u0430\u0436\u0443\u0442\u0441\u044F,
+ \u043F\u043E\u043A\u0430 \u0437\u0430\u0434\u0430\u043D\u0438\u0435
+ \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043A
+ \u043E\u043D\u0447\u0435\u043D\u043E!"}
+\renewcommand\highThresholdMsg{"\u0412\u044B \u043D\u0435
+ \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u0435
+ \u043E\u0446\u0435\u043D\u043A\u0438, \u043F\u043E\u043A\u0430
+ \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u0442\u0435
+ \u043D\u0430 \u0412\u0421\u0415 \u0432\u043E\u043F\u0440\u043E%
+ \u0441\u044B."}
+\renewcommand\eqSyntaxErrorUndefVar{"\u0421\u0438\u043D\u0442\u0430%
+ \u043A\u0441\u0438\u0447\u0435\u0441\u043A\u0430\u044F
+ \u043E\u0448\u0438\u0431\u043A\u0430:
+ \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E,
+ \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F
+ \u043D\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435%
+ \u043D\u0430."}
+\endinput
+%%
+%% End of file `eqru.def'.
diff --git a/texmf-dist/tex/latex/acrotex/eqtr.def b/texmf-dist/tex/latex/acrotex/eqtr.def
new file mode 100644
index 00000000..19984136
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/eqtr.def
@@ -0,0 +1,105 @@
+%%
+%% This is file `eqtr.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,eqtr')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{eqtr.def}
+%%%%%%%%%%%%%%%%%%%% eqtr.def %%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Foreign language support for the exerquiz package. %%
+%% Name of translator: Mahmut Ko\c{c}ak %%
+%% e-mail address: mkocak@ogu.edu.tr %%
+%% Language: Turkish %%
+%% %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand\exlabel{Al\i \c st\i rma}
+\renewcommand\exlabelsol{\noexpand\c C\noexpand\"oz\noexpand\"um}
+\renewcommand\exsectitle{\exlabel lar{\i}n \c C\"oz\"umleri }
+\renewcommand\exsecrunhead{Al\noexpand\i \noexpand\c st\noexpand\i rma
+ \exlabelsol leri }
+\renewcommand\exsolafter{\textbf{\c C\"oz\"um}:}
+\renewcommand\eq@sqslsectitle{Kuizlerin \c C\"oz\"umleri }
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+\renewcommand\eq@sqslsecrunhead{Kuizlerin \c C\"oz\"umleri}
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+\renewcommand\eq@sqsllabel{%
+ \protect\textbf{Kuiz \noexpand\c C\noexpand\"oz\noexpand\"um%
+ \noexpand\"u:}}
+\renewcommand\sqsllabel{\eq@sqsllabel}
+\renewcommand\sqsolafter{\textit{\c C\"oz\"um}:}
+\renewcommand\eq@sqlabel{\textcolor{red}{Soru}}
+\renewcommand\sqlabel{\eq@sqlabel}
+\renewcommand\eq@sqslrtnlabel{Kuizi Bitir}
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+\renewcommand\eqsqrtmsg{"Do\protect\u011Fru!"}
+\renewcommand\eqsqwgmsg{"Yanl\protect\u0131\protect\u015F!"}
+\renewcommand\eq@bqlabel{Kuize Ba\c sla}
+\renewcommand\bqlabel{\eq@bqlabel}
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabelISO}
+\renewcommand\eq@eqlabel{Kuizi Bitir}
+\renewcommand\eqlabel{\eq@eqlabel}
+\renewcommand\eq@Score{Skor:}
+\renewcommand\eq@OutOf{\protect\374zerinden}
+\renewcommand\eqQuizTotalMsg{%
+ "\eqScore\space"+nQuestions+" \eqOutOf\space"+Score}
+ \renewcommand\eqQuizPointsMsg{%
+ "\eqptScore\space"+nPointTotal+" \eqOutOf\space"+ptScore}
+\renewcommand\eq@local@CorrAnsButton{Cevap}
+\renewcommand\eqInitQuizMsg{%
+ "Kuizi Bitirdiniz. Do\protect\u011Fru cevaplar\protect\u0131
+ g\protect\u00F6rmek i\protect\u00E7in 'cevap'
+ tu\protect\u015Flar\protect\u0131na
+ bas\protect\u0131n\protect\u0131z."}
+\renewcommand\eqMadeChoice{%
+ "Bir se\protect\u00E7im yapt\protect\u0131n\protect\u0131z.
+ Se\protect\u00E7iminiz ("+Responses[probno]+") idi."
+ +" Se\protect\u00E7iminizi de\protect\u011Fi\protect\u015Ftirmek
+ istermisiniz?"}
+\renewcommand\eqerrABS{"Mutlak de\protect\u011Fer do\protect\u011Fru
+ degil. L\protect\u00FCtfen d\protect\u00FCzeltiniz."}
+\renewcommand\eqerrBadMathFunc{" `"+aF[i]+"' ifadesi
+ tan\protect\u0131ml\protect\u0131 bir fonksiyon veya
+ ge\protect\u00E7erli bir matematiksel ifade de\protect\u011Fil."}
+\renewcommand\eqParens{"Parentezler"}
+\renewcommand\eqBrackets{"S\protect\u00FCsl\protect\u00FC Parentazle"}
+\renewcommand\eqBraces{"K\protect\u00F6\protect\u015Feli Parentezler"}
+\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " do\protect\u011Fru
+ de\protect\u011Fil. L\protect\u00FCtfen d\protect\u00FCzeltiniz."}
+\renewcommand\eqerrBadExp{"Ge\protect\u00E7ersiz matematiksel ifade.
+ \protect\u00FCstel ifadeli bir hata.
+ L\protect\u00FCtfen d\protect\u00FCzeltiniz."}
+\renewcommand\eqerrUnfinishQuiz{"Bitirilmemi\protect\u015F bir kuiz var,
+ di\protect\u011Fer kuize ge\protect\u00E7meden \protect\u00F6nce
+ bu kuizi tamamlay\protect\u0131n."}
+\renewcommand\noPeekMsg{"Kuizi bitirmeden yada kuizden
+ ba\protect\u015Far\protect\u0131l\protect\u0131 olana kadar
+ \protect\u00E7\protect\u00F6z\protect\u00FCmleri
+ g\protect\u00F6remezsiniz.!"}
+\renewcommand\highThresholdMsg{"Kuiz sonucu hesaplanmadan
+ \protect\u00F6nce b\protect\u00FCt\protect\u00FCn
+ sorular\protect\u0131 cevapland\protect\u0131rmal\protect
+ \u0131s\protect\u0131n\protect\u0131z."}
+\renewcommand\eqSyntaxErrorUndefVar{"Syntax Error: Tan\protect
+ \u0131mlanmam\protect\u0131\protect\u015F de\protect\u011Fi\protect
+ \u015Fken veya ifadeler istenilen formatta yaz\protect
+ \u0131lmam\protect\u0131\protect\u015Ft\protect\u0131r."}
+\renewcommand\eq@local@CA{Dogru}
+\renewcommand\eq@local@RC{Benim Cevaplar\protect\u0131m!}
+\renewcommand\eq@local@AC{L\protect\374tfen!}
+\endinput
+%%
+%% End of file `eqtr.def'.
diff --git a/texmf-dist/tex/latex/acrotex/exerquiz.sty b/texmf-dist/tex/latex/acrotex/exerquiz.sty
new file mode 100644
index 00000000..52977314
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/exerquiz.sty
@@ -0,0 +1,4355 @@
+%%
+%% This is file `exerquiz.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{exerquiz}
+ [2017/03/16 v7.8g %
+ Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
+\usepackage{keyval}
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+\@ifundefined{exqtable}{\def\exqtable{table}}{}
+\IfFileExists{xcolor.sty}{%
+ \def\eq@ColorPackage{xcolor}%
+ \PassOptionsToPackage{\exqtable,hyperref}{xcolor}}
+ {\def\eq@ColorPackage{color}}
+\DeclareOption{noxcolor}{\def\eq@ColorPackage{color}}
+\DeclareOption{forpaper}{%
+ \eqforpapertrue\PassOptionsToPackage{monochrome}{\eq@ColorPackage}
+ \AtBeginDocument{\ifnum\eq@drivernum=4 \else\AllowPeeking\fi}
+}
+\DeclareOption{forcolorpaper}{\eqforpapertrue % for print
+ \AtBeginDocument{\ifnum\eq@drivernum=4 \else\AllowPeeking\fi}
+}
+\DeclareOption{preview}{\PassOptionsToPackage{preview}{eforms}}
+\DeclareOption{nosolutions}{\eq@nosolutionstrue\eq@nolinktrue}
+\DeclareOption{noquizsolutions}{\eq@noquizsolutionstrue\eq@nolinktrue}
+\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
+\DeclareOption{online}{\let\eq@online\eq@YES}
+\let\eq@online\eq@NO
+\DeclareOption{nohiddensolutions}{\eq@globalshowsolutionstrue}
+\DeclareOption{noHiddensolutions}%
+ {\eq@globalshowsolutionstrue\AtBeginDocument{\def\Hidesymbol{h}}}
+\DeclareOption{solutionsafter}{\eq@solutionsaftertrue\eq@nolinktrue}
+\DeclareOption{solutionsonly}{\solutionsonlytrue\answerkeytrue
+ \therearesolutionstrue\AtEndOfPackage{\let\exerSolnsHeadnToc\relax}}
+\newif\ifsolutionsonly\solutionsonlyfalse
+\DeclareOption{contsolns}{\AtEndOfPackage{\InputIfFileExists
+ {contsolns.def}{\contsolnsInputMsg}{\contsolnsErrorMsg}}}
+\def\contsolnsInputMsg{\PackageInfo{exerquiz}{contsolns option,
+ inputting file contsolns.def}}
+\def\contsolnsErrorMsg{\PackageWarning{exerquiz}{contsolns option,
+ cannot find file contsolns.def}}
+\DeclareOption{nocorrections}{\nocorrectionstrue}
+\DeclareOption{proofing}{\eq@proofingtrue}
+\newif\ifaebshowgrayletters\aebshowgraylettersfalse
+\DeclareOption{showgrayletters}{\aebshowgrayletterstrue}
+\@ifundefined{ifvspacewithsolns}{%
+ \DeclareOption{vspacewithsolns}{\vspacewithsolnstrue}
+ \newif\ifvspacewithsolns\vspacewithsolnsfalse
+}{}
+\DeclareOption{nodljs}{\PassOptionsToPackage{nodljs}{insdljs}%
+ \AtEndOfPackage{\let\importdljs\eq@YES}}
+\DeclareOption{execJS}{\PassOptionsToPackage{execJS}{insdljs}}
+\DeclareOption{exercisesonly}{\PassOptionsToPackage{nodljs}{insdljs}}
+\DeclareOption{debug}{\PassOptionsToPackage{debug}{insdljs}}
+\DeclareOption{allowrandomize}{\AtEndOfPackage{\inputRandomizeChoices}}
+\def\inputRandomizeChoices{\InputIfFileExists{aebrandom.def}
+ {\PackageInfo{exerquiz}{inputting aebrandom.def}}
+ {cannot find aebrandom.def}}
+\newif \ifusesumrytbls \usesumrytblsfalse
+\DeclareOption{usesumrytbls}{\usesumrytblstrue
+ \def\inputSumryTblCode{\InputIfFileExists{aebsumrytbls.def}
+ {\PackageInfo{exerquiz}{inputting aebsumrytbls.def}}%
+ {cannot find aebsumrytbls.def}}}
+\let\inputSumryTblCode\relax
+\DeclareOption{usemcfi}{%
+ \def\inputMCFICode{\InputIfFileExists{usemcfi.def}
+ {\PackageInfo{exerquiz}{inputting usemcfi.def}}%
+ {cannot find usemcfi.def}}}
+\let\inputMCFICode\relax
+\newif\ifwithinMCFI\withinMCFIfalse
+\DeclareOption{dvipsone}{%
+ \def\eq@drivernum{0}\def\eq@driver{dvipsone}%
+ \PassOptionsToPackage{dvipsone}{eforms}
+}
+\DeclareOption{dvips}{%
+ \def\eq@drivernum{0}\def\eq@driver{dvips}%
+ \PassOptionsToPackage{dvips}{eforms}
+}
+\DeclareOption{pdftex}{%
+ \def\eq@drivernum{1}\def\eq@driver{pdftex}%
+ \PassOptionsToPackage{pdftex}{\eq@ColorPackage}
+ \PassOptionsToPackage{pdftex}{eforms}
+}
+\DeclareOption{dvipdfm}{%
+ \def\eq@drivernum{2}\def\eq@driver{dvipdfm}%
+ \PassOptionsToPackage{dvipdfm}{\eq@ColorPackage}%
+ \PassOptionsToPackage{dvipdfm}{eforms}%
+}
+\DeclareOption{dvipdfmx}{%
+ \def\eq@drivernum{2}\def\eq@driver{dvipdfmx}%
+ \PassOptionsToPackage{dvipdfmx}{\eq@ColorPackage}%
+ \PassOptionsToPackage{dvipdfmx}{eforms}%
+}
+\DeclareOption{xetex}{%
+ \def\eq@drivernum{2}\def\eq@driver{xetex}%
+ \PassOptionsToPackage{xetex}{\eq@ColorPackage}
+ \PassOptionsToPackage{xetex}{eforms}%
+}
+\DeclareOption{textures}{\def\eq@drivernum{3}%
+ \def\eq@driver{textures}%
+ \PassOptionsToPackage{textures}{\eq@ColorPackage}%
+ \PassOptionsToPackage{textures}{eforms}%
+}
+\DeclareOption{dviwindo}{\def\eq@drivernum{4}\def\eq@driver{dviwindo}%
+ \eq@noformstrue\PassOptionsToPackage{nodljs}{insdljs}}
+\DeclareOption{unicode}{\PassOptionsToPackage{unicode}{hyperref}}
+\DeclareOption{useui}{\PassOptionsToPackage{useui}{eforms}}
+\let\LangRedefinitions\relax
+\DeclareOption{french}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqfr.def}%
+ {\PackageInfo{exerquiz}{Inputting French Option}}%
+ {\PackageInfo{exerquiz}{French Option: Cannot find the file
+ eqfr.def, using the default, English.}}}}
+\DeclareOption{german}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqde.def}%
+ {\PackageInfo{exerquiz}{Inputting German Option}}%
+ {\PackageInfo{exerquiz}{German Option: Kann die Datei eqde.def
+ nicht finden, benutze Default, Englisch.}}}}
+\DeclareOption{norsk}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqno.def}%
+ {\PackageInfo{exerquiz}{Inputting Norsk Option}}%
+ {\PackageInfo{exerquiz}{Norsk Option: Cannot find the file eqno.def,
+ using the default, English.}}}}
+\DeclareOption{dutch}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqnl.def}%
+ {\PackageInfo{exerquiz}{Inputting Dutch Option}}%
+ {\PackageInfo{exerquiz}{Dutch Option: Kan bestand eqnl.def niet
+ vinden, gebruik default, Engels.}}}}
+\DeclareOption{spanish}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqes.def}%
+ {\PackageInfo{exerquiz}{Inputting Spanish Option}}%
+ {\PackageInfo{exerquiz}{Spanish Option: Opci\'on Espa\~nola: no puede
+ encontrar el fichero eqes.def, usar\'a por defecto, English.}}}}
+\DeclareOption{italian}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqit.def}%
+ {\PackageInfo{exerquiz}{Opzione Lingua Italiana}}%
+ {\PackageInfo{exerquiz}{pzione Italiano: Non trovo il file eqit.def,
+ utilizzo quello di default, English.}}}}
+\DeclareOption{russian}{%
+ \@ifpackageloaded{hyperref}{%
+ \ifHy@unicode\else\PackageWarning{exerquiz}{%
+ The unicode option recommended for hyperref\MessageBreak}\fi
+ }{\PassOptionsToPackage{unicode}{hyperref}}
+ \def\LangRedefinitions{\InputIfFileExists{eqru.def}%
+ {\PackageInfo{exerquiz}{Inputting Russian Option}}%
+ {\PackageInfo{exerquiz}{Russian Option: Cannot find the file
+ eqru.def, using the default, English.}}}}
+\DeclareOption{dansk}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqda.def}%
+ {\PackageInfo{exerquiz}{Inputting Dansk Option}}%
+ {\PackageInfo{exerquiz}{Dansk Option: Cannot find the file eqda.def,
+ using the default, English.}}}}
+\DeclareOption{polish}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqpo.def}%
+ {\PackageInfo{exerquiz}{Inputting Polish Option}}%
+ {\PackageInfo{exerquiz}{Polish Option: Cannot find the file
+ eqpo.def, using the default, English.}}}}
+\DeclareOption{finnish}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqfin.def}%
+ {\PackageInfo{exerquiz}{Inputting Finnish Option}}%
+ {\PackageInfo{exerquiz}{Finnish Option: Cannot find the file
+ eqfin.def, using the default, English.}}}}
+\DeclareOption{catalan}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqcat.def}%
+ {\PackageInfo{exerquiz}{Inputting Catalan Option}}%
+ {\PackageInfo{exerquiz}{Catalan Option: Cannot find the file
+ eqcat.def, using the default, English.}}}}
+\DeclareOption{czech}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqcz.def}%
+ {\PackageInfo{exerquiz}{Inputting Czech Option}}%
+ {\PackageInfo{exerquiz}{Czech Option: Cannot find the file eqcz.def,
+ using the default, English.}}}}
+\DeclareOption{brazil}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqbr.def}%
+ {\PackageInfo{exerquiz}{Inputting Brazilian Portuguese Option}}%
+ {\PackageInfo{exerquiz}{Portuguese Option: Opc\~ao Portugu\^es:
+ n\~ao foi poss\'ivel encontrar o arquivo eqbr.def, usaremos
+ o padr\~ao, English.}}}}
+\DeclareOption{turkish}{%
+ \@ifpackageloaded{hyperref}{%
+ \ifHy@unicode\else\PackageWarning{exerquiz}{%
+ The unicode option recommended for hyperref\MessageBreak}\fi
+ }{\PassOptionsToPackage{unicode}{hyperref}}
+ \def\LangRedefinitions{\InputIfFileExists{eqtr.def}%
+ {\PackageInfo{exerquiz}{Inputting Turkish Option}}%
+ {\PackageInfo{exerquiz}{Cannot find the file eqtk.def,
+ using the default, English.}}}}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{\eq@ColorPackage}}
+\@ifpackageloaded{xcolor}%
+{%
+ \@ifpackagelater{xcolor}{2004/07/04}{}
+ {%
+ \PackageError{exerquiz}{%
+ *************************************************\MessageBreak
+ * Your Version of `xcolor.sty' is too old!\MessageBreak
+ * You need the version from 2004/07/04 or newer\MessageBreak
+ * or use: \string\usepackage[noxcolor]{exerquiz}\MessageBreak
+ *************************************************}{}%
+ }%
+}{}
+\let\iterate\relax
+\newif\ifeq@solutionsafter \eq@solutionsafterfalse
+\newif\ifeq@hidesolution \eq@hidesolutionfalse
+\newif\ifeq@globalshowsolutions \eq@globalshowsolutionsfalse
+\newif\ifeq@nosolutions \eq@nosolutionsfalse
+\newif\ifeq@proofing \eq@proofingfalse
+\providecommand\turnProofingOn{\eq@proofingtrue}
+\providecommand\turnProofingOff{\eq@proofingfalse}
+\newif\ifeqforpaper \eqforpaperfalse
+\newif\ifeq@noforms \eq@noformsfalse
+\newif\ifeq@noquizsolutions \eq@noquizsolutionsfalse % dps new
+\newif\ifnocorrections \nocorrectionsfalse
+\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}
+\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
+\def\CorrectionsOn{\global\nocorrectionsfalse}
+\def\CorrectionsOff{\global\nocorrectionstrue}
+\AtBeginDocument{\ifeq@noforms\else\Form\fi}
+\AtEndDocument{%
+ \include@solutions
+ \ifeq@noforms\else\include@quizsolutions\fi
+ \clearpage
+ \csname endForm\endcsname
+ \if\eq@drivernum2\else\clearpage\fi
+}
+\InputIfFileExists{exerquiz.cfg}{}{}
+\@ifpackageloaded{web}{%
+ \ExecuteOptions{\eq@driver@name}%
+}{%
+ \ifpdf\ExecuteOptions{pdftex}\else
+ \ifxetex\ExecuteOptions{xetex}\else
+ \InputIfFileExists{web.cfg}{}
+ {\@ifundefined{l@tex@@@@driver}{\ExecuteOptions{dvips}}
+ {\ExecuteOptions{dvipsone}}}\fi\fi
+}
+\ProcessOptions
+\RequirePackage{array}
+\RequirePackage{\eq@ColorPackage}
+\RequirePackage{verbatim}
+\RequirePackage{comment}
+\RequirePackage{hyperref}
+\RequirePackage{amssymb}% used for return symbols
+\RequirePackage{eforms}[2012/06/20]
+\@ifundefined{eq@drivernum}{%
+ \PackageError{exerquiz}%
+ {You have not specified dvips, dvipsone, pdftex, dvipdfm,
+ dvipdfmx, or xetex
+ \MessageBreak in the option list of the exerquiz package}
+ {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm,
+ dvipdfmx, or xetex
+ \MessageBreak in the option list of the exerquiz package.}
+}{}
+\@ifundefined{ifsolutionsAtEnd}
+ {\newif\ifsolutionsAtEnd\solutionsAtEndtrue}{}
+\ifeq@nosolutions\solutionsAtEndfalse\fi
+\ifeq@solutionsafter\solutionsAtEndfalse\fi
+\@ifundefined{if@fleqn}{\let\fleqnOn\relax\let\fleqnOff\relax}
+ {\def\fleqnOn{\@fleqntrue}\def\fleqnOff{\@fleqnfalse}}
+\@ifundefined{if@inclkey}{\newif\if@inclkey\@inclkeytrue}{}
+\def\eqretnSymb{$\blacksquare$}%{\rule{6bp}{6.8bp}}
+\newcommand\exlabel{Exercise}
+\newcommand\exlabelsol{\exlabel}
+\newcommand\exsectitle{Solutions to \exlabel s}
+\newcommand\exsecrunhead{\exsectitle} %% change to @ form
+\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}}
+\def\recoverDisplayBelow{\vskip\belowdisplayskip}
+\newcommand{\adjDisplayBelow}{\vskip-\lastskip\vskip-\baselineskip}
+\newcommand{\adjDisplayBelowPlus}{\adjDisplayBelow\recoverDisplayBelow}
+\newcommand\eq@sqslsectitle{Solutions to Quizzes}
+\newcommand\sqslsectitle{\eq@sqslsectitle}
+\newcommand\eq@sqslsecrunhead{Solutions to Quizzes}
+\newcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+\newcommand\eq@sqsllabel{\protect\textbf{Solution to Quiz:}}
+\newcommand\sqsllabel{\eq@sqsllabel}
+\newcommand\sqsolafter{\textit{Solution}:}
+\newcommand{\sqDefaultFmtTitle}[1]%
+ {\def\eq@sqlabel{#1}\def\sqlabel{#1}}
+\newcommand\sqlabel{\eq@sqlabel}
+\sqDefaultFmtTitle{\textcolor{red}{Quiz}}
+\newcommand\eq@sqslrtnlabel{\protect\eqretnSymb}
+\newcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+\newcommand\eqsqrtmsg{"Right!"}
+\newcommand\eqsqwgmsg{"Wrong!"}
+\newcommand\doNotShowAgainMsg{Do not show this message again}
+\newcommand\eq@bqlabel{Begin Quiz}
+\newcommand\bqlabel{\eq@bqlabel}
+\newcommand\eq@bqlabelISO{\eq@bqlabel}
+\newcommand\bqlabelISO{\eq@bqlabelISO}
+\newcommand\setDefShortQuizLabelName[1]%
+ {\def\eq@defaultShortQuizLabelName{#1}}
+\setDefShortQuizLabelName{Quiz}
+\newcommand\setDefQuizLabelName[1]
+ {\def\eq@defaultQuizLabelName{#1}}
+\setDefQuizLabelName{Quiz}
+\newcommand\eq@eqlabel{End Quiz}
+\newcommand\eqlabel{\eq@eqlabel}
+\newcommand\eq@Score{Score:}\newcommand\eq@OutOf{out of}
+\newcommand\eq@ptScore{Score:}
+\newcommand\stOutOf{of}
+\newcommand\eqScore{\eq@Score}\newcommand\eqOutOf{\eq@OutOf}
+\newcommand\eqptScore{\eq@ptScore}
+\newcommand\eqInitQuizMsg{%
+ "You must initialize the Quiz! Click on "+msg+"."}
+\newcommand\eqQuizTotalMsg{%
+ "\eqScore\space"+Score+" \eqOutOf\space"+nQuestions}
+\newcommand\eqQuizPointsMsg{%
+ "\eqptScore\space"+ptScore+" \eqOutOf\space"+nPointTotal}
+\newcommand\eqQuizPercentMsg{pcScore+"\%"}
+\newcommand\eqQuizGradeMsg{quizGrade}
+\newcommand\eqMadeChoice{%
+ "You have already made a choice."
+ + " Your choice was ("+Responses[probno]+")."
+ + " Do you want to change it?"}
+\newcommand\eq@local@CA{Correct}
+\newcommand\eq@local@RC{My Answers!}
+\newcommand\eq@local@AC{Please!}
+\newcommand\eq@local@CorrAnsButton{Ans}
+\newcommand{\eq@local@sqClearButton}{Clear}
+\newcommand\eqerrABS{"Absolute values not balanced. Please correct."}
+\dlJSStr[noquotes]\eqerrBadMathFunc{"The expression \""+aF[i]
+ +"\" is neither a defined function nor a valid math expression."}
+\newcommand\eqParens{"Parentheses"}
+\newcommand\eqBrackets{"Brackets"}
+\newcommand\eqBraces{"Braces"}
+\newcommand\eqerrDelimNotBal{aGroup[i][2] + " not balanced.
+ Please correct."}
+\newcommand\eqerrBadExp{"Invalid mathematical expression.
+ A problem with one of the exponents. Please correct."}
+\newcommand\eqerrUnfinishQuiz{"There is an unfinished quiz,
+ please finish before moving on to another."}
+\newcommand\noPeekMsg{"Viewing Solutions to quizzes is not allowed
+ until you take or finish this quiz!"}
+\newcommand\highThresholdMsg{"You are required to respond to all
+ questions before the quiz is evaluated."}
+\newcommand\eqSyntaxErrorUndefVar{"Syntax Error: Possibly an undefined
+ variable present, or an expression is not written in an expected
+ format."}
+\dlJSStr[noquotes]{\eqSyntaxErrorComma}{%
+ "Syntax Error: A comma was found"
+ + " in your response \""
+ + UserAns + "\". Please remove the comma, or this answer"
+ + " will be marked as wrong."}
+\newcommand{\limSelWarningMsg}{"For this question, you are allowed to
+ make at most " + n + " selections."}
+\newcommand{\defaultReqFormMsg}{%
+ "The expression is not in the expected form."}
+\typeout{^^Jexerquiz: * Using \eq@driver\space option *^^J}
+\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}}
+\def\theHquizno{\curr@quiz.\theeqquestionnoi.%
+ \ifcase\@eqquestiondepth\or\or\arabic{eqquestionnoii}.%
+ \or\arabic{eqquestionnoii}.\roman{eqquestionnoiii}.%
+ \else\fi\alph{quizno}}
+\newlength\eqemargin \eqemargin=0pt
+\newcounter{eqpointvalue} \setcounter{eqpointvalue}{0}
+\newlength\eq@tmplength
+\newlength\eqtmplength
+\newcounter{questionno}
+\newcounter{eqquestionnoi}
+\newcounter{eqquestionnoii}
+\newcounter{eqquestionnoiii}
+\newcount\@eqquestiondepth \@eqquestiondepth=0
+\newcounter{grpquestionno}
+\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\theHpartno{partno\the@exno\thepartno}
+\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\exlabelformat{{\scshape\exlabel\ \theeqexno.}}
+\newcommand\exlabelformatwp{\exlabelformat}
+\newcommand\exsllabelformat{\protect\textbf{\exlabelsol\ \theeqexno.}}
+\newcommand\exsllabelformatwp
+ {\protect\textbf{\exlabelsol\ \theeqexno(\thepartno)}}
+\newcommand\exrtnlabelformat{$\square$}
+\newcommand\exrtnlabelformatwp{$\square$}
+\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}
+\newcommand{\nolinkcolor}[1]{\def\@nolinkcolor{#1}}
+\nolinkcolor{blue}
+\newcommand{\exerSolnsInExtFile}[2][]
+ {\let\exerSolns@ExtFile\eq@YES\gdef\eq@exerSolns@fileName{#2}%
+ \gdef\exerSolns@ReturnPath{#1}}
+\let\exerSolns@ExtFile\eq@NO
+\def\exerSolns@ReturnPath{}
+\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}
+{%
+ \ifeq@nolink % no link to solution
+ \mbox{\color{\@nolinkcolor}\if\exerstar*\exlabelformatwp\else
+ \exlabelformat\fi}%
+ \else
+ \if\exerSolns@ExtFile\eq@YES
+ \mbox{\href{\eq@exerSolns@fileName\#ex.\the@exno}%
+ {\exlabelformat}}%
+ \else
+ \mbox{\hyperlink{ex.\the@exno}{\exlabelformat}}%
+ \fi
+ \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
+ \ifeq@nolink
+ \color{\@nolinkcolor}\eq@partsformat
+ \else
+ \if\exerSolns@ExtFile\eq@YES
+ \href{\eq@exerSolns@fileName\#ex.\the@exno\thepartno}%
+ {\eq@partsformat}%
+ \else
+ \hyperlink{ex.\the@exno\thepartno}{\eq@partsformat}%
+ \fi
+ \fi
+}
+\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
+\def\writecqQSfalse{\writeToExSolns{\protect\eqTopOfSolnPage}}
+\AtBeginDocument{\writecqQSfalse}
+\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%
+ \noindent\hypertarget{#2}{#3}\relax
+ \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}
+\def\eqExerSolnHeaderSngl{%
+ \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{%
+ \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
+\def\solnexer@woparts{\def\bLeaveVspace{x}% = no vertical space added
+ \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
+}
+\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
+ \eqPriorVspace{#1}{\nobreak\noindent
+ \ifx\soln@keys@nLines\@empty
+ \if@eqlinedfiller
+ \def\eq@lines@next{\vspaceFiller{#1}}\else
+ \def\eq@lines@next{\parbox[b][#1][t]{\linewidth}
+ {\vspaceFiller{#1}}}\fi
+ \else
+ \def\eq@lines@next{\eq@linesXPgs}%
+ \fi\eq@lines@next
+ }%
+ \fi
+ }%
+ \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}}%
+ \ifx\sameVspace\@empty\gdef\sameVspace{0pt}\fi
+ \ifvspacewithsolns\vspaceFmt{\sameVspace}\fi
+ \ifeq@nosolutions\ifeq@solutionsafter\else
+ \vspaceFmt{\sameVspace}\fi\fi
+ \fi\fi
+ \solnexer@@@woparts
+}
+\def\solnsafterSkip#1{\setlength{\@tempdima}{#1}%
+ \def\solnsafterSkipAmt{\the\@tempdima}%
+ \def\solutionsafterSkip{\vskip#1\relax}}
+\solnsafterSkip{\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\solnexer@@@woparts{%
+ \global\thereissolutiontrue
+ \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
+ \ifx\bLeaveVspace\@empty\leavevspace\fi
+ \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%\par
+ \removelastskip\removelastparskip
+ \cqSAtrue\eqCQDeclarations
+ \declCopyQues{\input{\cq@CutName}}%
+ \ifx\exsolafter\@empty
+ \ifdim\sameVspace=0pt\eqe@setStartSolns
+ \else
+ \solutionsafterSkip
+ \eqe@setStartSolns
+ \fi
+ \else\par\kern0pt
+ \solutionsafterSkip
+ \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@next}
+\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
+\def\ReturnTo#1#2{\eq@fititin{\hyperlink{#1}{#2}}}
+\def\xReturnTo#1#2{\eq@fititin{\href{#1}{#2}}}
+\newcommand\eqExerSolnTrailer{%
+ \if\exerSolns@ExtFile\eq@YES\protect\xReturnTo
+ {\exerSolns@ReturnPath\jobname\#qex.\the@exno}%
+ \else\protect\ReturnTo{qex.\the@exno}\fi
+ {\protect\mbox{\if\exerstar*\exrtnlabelformatwp\else
+ \exrtnlabelformat\fi}}%
+ \protect\endeqEXt\ifeqforpaper\protect\par{\belowexsolnskip}\fi^^J%
+}
+\def\endsolnexer@woparts{%
+ \if\currhideopt H%
+ \ifkeepdeclaredvspacing\vskip\sameVspace\fi
+ \csname endprocsoln\endcsname
+ \else
+ \ifeq@solutionsafter
+ \if\exerstar*%
+ \eq@fititin{\mbox{\exrtnlabelformatwp}}\else
+ \eq@fititin{\mbox{\exrtnlabelformat}}\fi
+ \ifx\istabularexer\eq@YES\kern0pt\else\par\fi
+\ifx\minVspacet@bs\@empty
+ \ifkeepdeclaredvspacing
+ \@tempdima\pagetotal
+ \advance\@tempdima-\eq@startSoln
+ \@tempdimb\sameVspace\relax
+ \ifdim\@tempdimb>1sp\relax
+ \advance\@tempdimb-\@tempdima
+ \ifdim\@tempdimb>0pt\vglue\@tempdimb\kern0pt
+ \let\eqe@showEndHere\@gobble
+ \edef\tmp@exp{\noexpand\marginpar{%
+ \noexpand\smash{e: adj \the\@tempdimb}}}%
+ \eqe@debugVertSkip{\tmp@exp}%
+ \fi
+ \fi
+ \fi
+ \eqe@showEndHere{\eqe@debugVertSkip{\marginpar{\smash{e}}}}%
+\fi
+ \else
+ \endprocsoln
+ \eq@ckglobalhide
+ \ifeq@hidesolution\else
+ \endsolnexerhookaux
+ \set@display@protect
+ \immediate\write\verbatim@out{\eqExerSolnTrailer}%
+ \set@typeset@protect
+ \fi
+ \fi
+ \fi
+\pkg@endsolnexerhook\endsolnexerhook}
+\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 % dps 2016/12/16
+\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}% dps88
+ \vskip\eqparts@itemsep\relax\fi % dps88
+ \topofpartshook
+ \let\itsExerParts\eq@YES % dps17
+ \global\let\@listiiredefined\eq@NO
+ \def\exerwparts@cols{0}\@ifnextchar[%
+ {%
+ \if@tableadinitem\else\removelastparskip\fi % dps11
+ \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]{{% dps88
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@itemsep{\the\@tempdima}}}
+\let\eqpartsitemsep\partsitemsep
+\def\eqparts@itemsep{0pt}
+\newcommand\partsparsep[1]{{% dps88
+ \setlength{\@tempdima}{#1}%
+ \xdef\eqparts@parsep{\the\@tempdima}}}
+\def\eqparts@parsep{0pt}
+\newcommand\partstopsep[1]{{% dps88
+ \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 % dps7
+ \settowidth{\eq@tmplength}{\parts@indent\eqe@prtsepPrb}%
+ \xdef\prtsIndntSep{\the\eq@tmplength}% dps7
+ \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 % dps cq
+ \ifx\eq@tabMarkChk\@gobble
+ \def\eq@atnext{\expandafter
+ \tabularnewline\expandafter[#1]}\else
+ \def\eq@atnext{\resettabMark\tabularnewline
+ \noalign{\expandafter\kern#1}}\fi % dps7
+ \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 % dps7
+ \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
+ \advance\eq@tmpdima\prtsIndntSep\relax
+ \if@tableadinitem\else\vskip\eq@partstabtopsep\relax\fi % dps11
+ \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}%
+ \advance\linewidth-\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}}%
+\define@key{exEnum}{labelwidthTo}[\normalsize\normalfont\bfseries00.\ ]%
+ {\def\exE@labelwidthTo{#1}}
+\define@key{exEnum}{labelwidth}[\@empty]{\def\exE@labelwidth{#1}}
+\let\exE@labelwidth\@empty
+\define@key{exEnum}{topsep}[3pt]{\def\exE@topsep{#1}}
+\define@key{exEnum}{parsep}[3pt]{\def\exE@parsep{#1}}
+\define@key{exEnum}{itemsep}[0pt]{\def\exE@itemsep{#1}}
+\define@key{exEnum}{labelsep}[\normalsize\normalfont\ ]%
+ {\settowidth{\@tempdima}{#1}\edef\exE@labelsep{\the\@tempdima}}
+\define@key{exEnum}{continue}[]{\let\eq@ExEnumResetCnt\@empty}
+\def\eq@ExEnumResetCnt{\setcounter{questionno}{0}}
+\setkeys{exEnum}{labelwidthTo,topsep,parsep,itemsep,labelsep}%
+\newenvironment{exEnumerate}[1][]{\everypar{}%
+ \toks@=\expandafter{#1}%
+ \edef\tempexp{\noexpand\setkeys{exEnum}{\the\toks@}}\tempexp
+ \eq@ExEnumResetCnt
+ \let\afterlabelhskip\@empty
+ \let\solnhspace\@empty
+ \aboveexskip{0pt}\belowexskip{\exE@parsep}%\belowexskip{0pt}%
+ \def\eqexheader@wrapper{\makebox[0pt][r]{%
+ \hypertarget{qex.\the@exno}{\eqexheader}\hspace{\labelsep}}}%
+ \def\exbookmarkfmt{\thequestionno.\space}
+ \def\partbookmarkfmt{(\thepartno)\space}
+ \def\setENum{\Elabel\if\exerstar*\thequestionno(\thepartno)\else
+ \thequestionno\fi}%
+ \ifExSolutionsSet\else
+ \writeToExSolns{\protect\begin{exEnumerate}}\fi
+ \list{}{%
+ \ifx\exE@labelwidth\@empty
+ \settowidth{\labelwidth}{\exE@labelwidthTo}\else
+ \setlength{\labelwidth}{\exE@labelwidth}\fi
+ \setlength{\topsep}{\exE@topsep}%
+ \ifdim\parskip>\z@\addtolength{\topsep}{-\parskip}\fi
+ \setlength{\parsep}{\exE@parsep}%
+ \setlength{\itemsep}{\exE@itemsep}%
+ \setlength{\itemindent}{0pt}%
+ \setlength{\listparindent}{0pt}%
+ \setlength{\itemindent}{0pt}%
+ \settowidth{\labelsep}{\normalfont\ }%
+ \setlength{\leftmargin}{\labelwidth}%
+ }\item\relax}{\ifExSolutionsSet\else
+ \writeToExSolns{\protect\end{exEnumerate}}\fi
+\endlist}
+\newenvironment{enumex}{%
+ \renewcommand\exlabelformat{\textbf{\thequestionno.}}%
+ \renewcommand\exsllabelformat
+ {\protect\makebox[0pt][r]{\protect\textbf{\thequestionno.\ }}}%
+\begin{exercise}[questionno]}{\end{exercise}}
+\newenvironment{enumex*}{%
+ \renewcommand\exlabelformatwp{\textbf{\thequestionno.}}%
+ \renewcommand\exsllabelformatwp
+ {\protect\makebox[0pt][r]{\protect\textbf{\thequestionno.}\ }%
+ \protect\textbf{(\thepartno)}\ }%
+\begin{exercise*}[questionno]}{\end{exercise*}}
+\def\includeexersolutions{\@ifstar
+ {\let\resetEXsolns\relax\includeexersolutionsi}
+ {\def\resetEXsolns{\global\let\include@solutions\relax}%
+ \includeexersolutionsi}%
+}
+\newcommand{\includeexersolutionsi}[1][]{%
+ \filterFor{#1}\includeexersolutionsii
+}
+\def\includeexersolutionsii{%
+ \if\exerSolns@ExtFile\eq@NO
+ \include@solutions
+ \resetEXsolns
+ \let\eqFilterArg\@empty
+ \fi
+}
+\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{\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{%
+ \if\exerSolns@ExtFile\eq@NO
+ \exerSolnInput
+ \fi
+}
+\let\eqexpdfentry=0
+\let\eq@postexerciseHook\relax
+\def\eq@postexerciseHook@BM{%
+ \xdef\Hy@currentbookmarklevel{\eq@currentbookmarklevel}}
+{\count0=\value{tocdepth}
+\advance\count0by2 \xdef\eqbmkmrkdepth{\the\count0}}
+\@ifundefined{Hy@bookmarksdepth}
+ {\setcounter{tocdepth}{\eqbmkmrkdepth}}
+ {\hypersetup{bookmarksdepth=\eqbmkmrkdepth}}
+\newcommand{\exbookmarkfmt}{\exlabel\space\theeqexno.\space}
+\newcommand{\partbookmarkfmt}{(\thepartno)\space}
+\newcommand{\expdfbookmark}[1]{\relax
+ \def\expdfbookmarktitle{#1}%
+ \ifx\eq@postexerciseHook\relax
+ \let\eq@postexerciseHook\eq@postexerciseHook@BM
+ \else
+ \let\eq@postexerciseHook@save\eq@postexerciseHook
+ \def\eq@postexerciseHook@BM@plus{\eq@postexerciseHook@save
+ \eq@postexerciseHook@BM}%
+ \let\eq@postexerciseHook\eq@postexerciseHook@BM@plus
+ \fi
+ \if\exerstar*%
+ \if\eqexpdfentry0\let\eqexpdfentry=1
+ \xdef\eq@currentbookmarklevel{\Hy@currentbookmarklevel}%
+ \def\eqex@next{\subpdfbookmark{\exbookmarkfmt#1}%
+ {qex.\the@exno}}%
+ \else
+ \def\eqex@next{\belowpdfbookmark{\partbookmarkfmt#1}%
+ {qex.\the@exno.\thepartno}}%
+ \fi
+ \else
+ \xdef\eq@currentbookmarklevel{\Hy@currentbookmarklevel}%
+ \def\eqex@next{\subpdfbookmark{\exbookmarkfmt#1}%
+ {qex.\the@exno}}%
+ \fi
+ \eqex@next\ignorespaces
+}
+\ifeq@noforms\endinput\fi
+\definecolor{webgreen}{rgb}{0,.6,0}
+\newcommand{\proofingsymbolColor}[1]{\def\@proofingsymbolColor{#1}}
+\proofingsymbolColor{red}
+\let\@proofsymbolredefined=0
+\newcommand{\proofingsymbol}[1]{\let\@proofsymbolredefined=1%
+ \def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{#1}}}
+\def\@proofingsymbol{\textcolor{\@proofingsymbolColor}{\ding{52}}}
+\def\setproofingsymbol{%
+ \if\@proofsymbolredefined1\else
+ \@ifpackageloaded{pifont}{\proofingsymbol{\ding{52}}}
+ {\proofingsymbol{$\bullet$}}\fi
+}
+\AtBeginDocument{\setproofingsymbol}
+\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
+\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
+\def\sq@IDTxtField{\makebox[0pt][l]{\textField[\autoCenter{n}\BC{}\BG{}
+ \S{S}\textSize{0}\Ff{\FfReadOnly}
+ \AA{\AAFormat{%
+ var \oField=new Object;\r
+ \oField.Grp={};
+ \ifx\defaultColorJSLoc\@empty\else\r
+ \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
+ \ifx\rghtColorJSLoc\@empty\else\r
+ \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
+ \ifx\wrngColorJSLoc\@empty\else\r
+ \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
+ \ifx\rghtAnsSymbJSLoc\@empty\else\r
+ \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
+ \ifx\wrngAnsSymbJSLoc\@empty\else\r
+ \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
+ }}]{sqID\oField}{0bp}{0bp}}%
+}
+\def\@@shortquiz[#1]{%\begingroup
+ \gdef\oField{#1}\gdef\curr@quiz{#1}\gdef\currQuiz{#1}%
+ \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
+ \let\ifstaroption\eq@ifstaroption
+ \if\eq@tq@star*%
+ \def\sqlabel{\aebtitleQuiz\@gobbletwo}%
+ \fi
+ \sq@aboveskip\sq@priorhook
+ \@ifundefined{PointsOnLeft}%
+ {\sq@setCLN{\eq@defaultShortQuizLabelName}%
+ \ifx\sqlabel\@empty\else\noindent\fi
+ \hypertarget{sqH\@currentHref}{}\sq@IDTxtField
+ \ifx\sqlabel\@empty\else\expandafter
+ \sqlabel\expandafter\sqhspace\fi
+ {\set@typeset@protect\aebtitleQuiz}}{}\ignorespaces
+}
+\newcommand\belowsqskip[1]{\def\aftershortquizskip{#1}}
+\belowsqskip{\medskip}
+\def\aeb@endshortquiz{\setcounter{quizno}{0}%
+ \sq@afterhook
+ \global\let\aebtitleQuiz\@empty
+ \global\let\aebTitleQuiz\@empty
+ \global\let\eq@tq@star\relax
+ \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}
+\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{%
+ \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
+}
+\newcommand\pnphDflt{.1\textheight}
+\newcommand{\promoteNewPageHere}[1][\pnphDflt]{%
+ \@ifnextchar\bgroup{\eq@promoteNewPageHere}
+ {\eq@promoteNewPageHere{#1}}%
+}
+\def\eq@promoteNewPageHere#1{\par
+ \bgroup\@nobreakfalse\addpenalty{-500}%
+ \setlength{\@tempdimb}{#1}%
+ \@tempdima \pagegoal \advance \@tempdima -\pagetotal
+ \ifdim \@tempdima<\@tempdimb\ifnum\col@number>\@ne\columnbreak
+ \else\newpage\penalty1\fi\fi\egroup
+}
+\newcommand{\saveDest}[1][]{%
+ \def\sd@arg{#1}\ifx\sd@arg\@empty
+ \xdef\holdDest{\@qzsolndest}\else
+ \xdef\@qzsolndest{#1}\xdef\holdDest{#1}\fi}
+\def\useDest{\def\@qzsolndest{\holdDest}}
+\let\holdDest\@empty
+\def\fpAfterSolutionsSkip{\par\medskip}
+\let\eqSqSolnTrailerHook\@empty
+\let\eqQzSolnTrailerHook\@empty
+\newcommand\eqSqSolnTrailer{%
+ \if\eqQuizType\isQZ
+ \eqQzSolnTrailerHook
+ \protect\ReturnTo{page.\eq@pageThisQ}%
+ {\protect\mbox{\sqslrtnlabel}}\string\endeqQt
+ \else
+ \eqSqSolnTrailerHook
+ \protect\ReturnTo{page.\eq@pageThisQ}%
+ {\protect\mbox{\sqslrtnlabel}}\string\endeqSQt%
+ \fi
+ \ifeqforpaper\protect\fpAfterSolutionsSkip\fi^^J%
+}
+\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
+ \def\eq@argi{#1}%
+ \ifx\eq@argi\@empty\else\noPeek#1\fi
+ \hypertarget{#2}{#3}\relax
+ \solnspace
+}
+\def\AllowPeeking{\global\let\allow@peek\eq@YES}\AllowPeeking
+\def\NoPeeking{\global\let\allow@peek\eq@NO}
+\def\noPeekAction#1#2{%
+ /AA <</O<</S/JavaScript/JS(noPeek("#1",#2))>> >>
+}
+\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
+}
+\let\eqqzsolutionshook\@empty
+\let\priorsqslsectitle\@empty
+\let\priorsqslinput\@empty
+\def\quizSolnsHeadnToc{\section*{\sqslsectitle}%
+ \addcontentsline{toc}{section}{%
+ \@ifundefined{web@latextoc}{}{%
+ \ifx\web@latextoc\eq@YES\else
+ \protect\numberline{}\fi}\sqslsectitle}}
+\newcommand{\quizSolnInput}
+{%
+ \let\webnewpage\relax
+ \immediate\closeout\quiz@solns
+ \ifeq@noquizsolutions\else
+ \iftherearequizsolutions\newpage\markright{}%
+ \eq@normallheader\markright{\sqslsecrunhead}%
+ \ifx\webnewpage\relax
+ \def\webnewpage{\let\webnewpage\newpage}\fi
+ \priorsqslsectitle\quizSolnsHeadnToc\priorsqslinput
+ \InputIfFileExists{\jobname.qsl}{}%
+ {!!! Solutions to quizzes not found}
+ \eqqzsolutionshook
+ \newpage\eq@defaultlheader
+ \fi
+ \fi
+}
+\def\include@quizsolutions{\quizSolnInput}
+\newcommand{\priorqhook}[1]{\def\q@priorhook{#1}}
+\priorqhook{}
+\newcommand{\aboveqskip}[1]{\def\q@aboveskip{#1}}
+\aboveqskip{\par\medskip}
+\newcommand{\qhspace}{\space}
+\def\endqhook#1{\def\eq@prior@endQuiz{#1}}
+\endqhook{}
+\newcommand{\belowqHooknSkip}[1]{\def\eq@belowqskip{#1}}
+\belowqHooknSkip{\medskip}
+\def\belowqskip{\belowqHooknSkip}
+\let\eq@initializeServerSubmit\@empty
+\newcommand{\quiztype}[1]{%
+ \def\@quiztype{#1}\def\aeb@FLOverride{#1}}
+\let\@quiztype\@empty
+\newcommand{\defaultquiztype}{\let\@quiztype\@empty
+ \let\aeb@FLOverride\relax}
+\let\aeb@FLOverride\relax
+\def\@setFormLinkType{%
+ \if\qstar*%
+ \ifx\aeb@FLOverride\relax%
+ \def\@@quiztype{f}%
+ \else
+ \if\aeb@FLOverride l\def\@@quiztype{l}\else
+ \def\@@quiztype{f}\fi
+ \fi
+ \else
+ \ifx\aeb@FLOverride\relax
+ \def\@@quiztype{l}%
+ \else
+ \if\aeb@FLOverride f\def\@@quiztype{f}\else
+ \def\@@quiztype{l}\fi
+ \fi
+ \fi
+}
+\def\setdefault@Ans{\@setFormLinkType
+ \expandafter\global\expandafter
+ \let\expandafter\@Ans\expandafter=\csname Ans@\@@quiztype\endcsname
+}
+\newcommand\useForms{\def\aeb@FLOverride{f}}
+\newcommand\useLinks{\def\aeb@FLOverride{l}}
+\newcommand\restoreFLTypeDefault{\global\let\aeb@FLOverride\relax}
+\let\aeb@FLOverride\relax
+\newenvironment{quiz}
+{\goodbreak\@ifstar{\gdef\qstar{*}\@quiz*f}{\gdef\qstar{x}\@quiz*l}}
+ {\aeb@endquiz}
+\def\@quizCnt{0}
+\def\@quiz*#1#2{%
+ \xdef\eq@pageThisQ{\the\c@page}%
+ \let\@currentQues\@empty
+ \global\let\eqQzQuesList\@empty
+ \global\let\pointValuesArray\@empty
+ \global\let\ptypeArray\@empty
+ \global\let\corrAnsArray\@empty
+ {\count0=\@quizCnt\advance\count0by1\relax
+ \xdef\@quizCnt{\the\count0 }}%
+ \edef\@currentlabel{\@quizCnt}%
+ \edef\@currentHref{quiz.\@quizCnt}%
+ \sq@setCLN{\eq@defaultQuizLabelName}%
+ \setcounter{eqpointvalue}{0}\setcounter{questionno}{0}%
+ \eq@initializeServerSubmit
+ \global\let\eqQuizType\isQZ %\tabcolsep=0pt
+ \gdef\eqPTs{1}\global\let\eqQT\eq@na
+ \gdef\quiz@total{#2}\xdef\curr@quiz{#2}\xdef\oField{#2}%
+ \xdef\currQuiz{#2}\xdef\currQuizStartPage{\thepage}%
+ \xdef\aPointType{0}%
+ \def\fieldJSStr@CMD{\fieldJSStr*[noquotes]\bqlabelISO}%
+ \expandafter\fieldJSStr@CMD\expandafter{\bqlabelISO}%
+ \ifx\@quiztype\@empty\gdef\@@quiztype{#1}\else
+ \xdef\@@quiztype{\@quiztype}\fi
+ \let\@qzsolndest\@empty
+ \let\answers\answers@q\let\endanswers\endanswers@q
+ \let\manswers\manswers@q\let\endmanswers\endanswers@q
+ \let\solution\solution@sq\let\endsolution\endsolution@sq
+ \expandafter%
+ \xdef\csname titleOf\currQuiz\endcsname{\aebTitleQuiz}%
+ \q@aboveskip\q@priorhook\noindent\hypertarget{qzH\@currentHref}{}%
+ \eq@beginQuiz\qhspace{\set@typeset@protect\aebtitleQuiz}%
+ \ignorespaces
+}
+\def\aeb@endquiz
+{%
+ \eq@prior@endQuiz\noindent\eq@endQuiz
+ \global\let\eqQuizType\relax
+ \global\let\aebtitleQuiz\@empty
+ \global\let\aebTitleQuiz\@empty
+ \global\let\bqlabel\eq@bqlabel % reset beginning label to default
+ \global\let\eqlabel\eq@eqlabel % reset ending label to default
+ \global\let\sqsllabel\eq@sqsllabel
+ \global\let\sqslrtnlabel\eq@sqslrtnlabel
+ \global\let\bqlabelISO\eq@bqlabelISO
+ \eq@belowqskip
+}
+\newenvironment{quiz*}{\goodbreak\gdef\qstar{*}\@quiz*f}{\aeb@endquiz}
+\newcommand\eq@beginQuiz{\eq@BeginQuizLink}
+\newcommand\eq@endQuiz{\eq@EndQuizLink}
+\newcommand\useBeginQuizButton[1][]
+ {\renewcommand\eq@beginQuiz{\eq@BeginQuizButton[#1]}}
+\newcommand\useEndQuizButton[1][]
+ {\renewcommand\eq@endQuiz{\eq@EndQuizButton[#1]}}
+\newcommand\useBeginQuizLink
+ {\renewcommand\eq@beginQuiz{\eq@BeginQuizLink}}
+\newcommand\useEndQuizLink
+ {\renewcommand\eq@endQuiz{\eq@EndQuizLink}}
+\def\listOfQuizzes{}
+\def\listOfSubmitQuizzes{}
+\def\initializeAllSubmitQuizzes{}
+\newcommand\@initQuiz{%
+ var \curr@quiz=new Object();\jsR
+ lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR
+ \curr@quiz.oAlertCheck={bAfterValue:false};\jsR
+ \curr@quiz.Grp={};
+ \ifx\defaultColorJSLoc\@empty\else\jsR
+ \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
+ \ifx\rghtColorJSLoc\@empty\else\jsR
+ \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
+ \ifx\wrngColorJSLoc\@empty\else\jsR
+ \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
+ \ifx\partialColorJSLoc\@empty\else\r
+ \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
+ \ifx\rghtAnsSymbJSLoc\@empty\else\jsR
+ \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
+ \ifx\wrngAnsSymbJSLoc\@empty\else\jsR
+ \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
+ \ifx\corrAnsSymbJSLoc\@empty\else\jsR
+ \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
+ \ifx\eqGradeScaleLoc\@empty\else\jsR
+ \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
+ \ifx\priorInitQuiz\@empty\else\jsR\priorInitQuiz\fi\jsR
+ InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);
+ \ifx\eq@CGI\@empty\jsR\curr@quiz.isSubmitted=false;\else
+ \jsR\curr@quiz.isSubmitted=true;\fi
+ \jsR\curr@quiz.initializeWith=%
+'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);'
+ \ifx\postInitQuiz\@empty\else\jsR\postInitQuiz\fi
+}
+\newcommand{\priorInitQuiz}{}
+\newcommand{\postInitQuiz}{}
+\let\eq@submitURL\@empty
+\let\eq@insertHiddenFields\@empty
+\def\eq@@BeginQuizLinkActions
+{%
+ \A{\JS{%
+ \@initQuiz
+ }}%
+}
+\def\eq@BeginQuizLinkDefaults{\Border{0 0 0}}
+\let\bqlabelFmt\@empty
+\def\eq@BeginQuizLink
+{%
+ \set@@Link{}{}{}{\color{\@linkcolor}\bqlabelFmt\bqlabel}{}%
+ {\eq@setWidgetProps\setLink@driver}%
+ {\eq@BeginQuizLinkDefaults\eq@@BeginQuizLinkActions\every@Link}%
+ \space\ignorespaces
+}
+\newcommand\priorSubmitQuiz{}
+\newcommand\postSubmitQuiz{}
+\def\eq@@EndQuizLinkActions
+{%
+ \A{\JS{%
+ if (!isQuizInitialized("\curr@quiz"))\jsR\jsT
+ eqAppAlert(InitMsg("\bqlabelISO"),3);\jsR
+ else {\jsR\jsT
+ if (\minQuizResp(\thequestionno)) {\jsR\jsT\jsT
+ \curr@quiz.PtValues=new %
+Array(\pointValuesArray);\jsR\jsT\jsT
+ ProbType = [\ptypeArray];\jsR\jsT\jsT
+\if@inclkey
+ \curr@quiz.CorrAns=(new %
+Array(\corrAnsArray));\jsR\jsT\jsT
+\fi
+ DisplayQuizResults("\curr@quiz",\theeqpointvalue,%
+\thequestionno);\jsR\jsT\jsT
+ \eq@submitURL
+ \postSubmitQuiz
+ resetQuiz("\curr@quiz");\jsR\jsT
+ }\jsR
+ }}}%
+}
+\def\eq@EndQuizLinkDefaults{\Border{0 0 0}}
+\let\eqlabelFmt\@empty
+\def\eq@EndQuizLink
+{%
+ \ifx\eq@CGI\@empty
+ \let\eq@submitURL\@empty
+ \let\eq@insertHiddenFields\@empty
+ \fi
+ \set@@Link{}{}{}{\color{\@linkcolor}\eqlabelFmt\eqlabel}{}%
+ {\eq@setWidgetProps\setLink@driver}%
+ {\eq@EndQuizLinkDefaults\eq@@EndQuizLinkActions\every@Link}%
+ \makebox[0pt][r]{\textField[\BC{}\autoCenter{n}]%
+ {htxtfld.\curr@quiz}{0bp}{0bp}}%
+ \makebox[0pt][r]{\eq@insertHiddenFields}\global\let\eq@CGI\@empty
+ \ignorespaces
+}
+\def\BeginQuizButtonDefaults
+{%
+ \CA{\bqlabel}\H{P}\F{\FPrint}
+ \BC{1 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}
+}
+\def\eq@@BeginQuizButtonActions
+{%
+ \A{\JS{%
+ \@initQuiz
+ }}%
+}
+\newcommand\eq@BeginQuizButton[1][]
+{%
+ \mbox{\push@@Button{#1}{beginQuiz.\curr@quiz}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\BeginQuizButtonDefaults\eq@@BeginQuizButtonActions
+ \every@ButtonField\every@BeginQuizButton}}%
+}
+\def\EndQuizButtonDefaults
+{%
+ \CA{\eqlabel}\F{\FPrint}\BC{1 0 0}
+ \BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}
+}
+\def\eq@@EndQuizButtonActions
+{%
+ \A{\JS
+ {if (!isQuizInitialized("\curr@quiz"))\jsR\jsT
+ eqAppAlert(InitMsg("\bqlabelISO"),3);\jsR
+ else {\jsR\jsT
+ if (\minQuizResp(\thequestionno)&&_ModalNotOn){\jsR\jsT\jsT
+ \curr@quiz.PtValues=(new %
+Array(\pointValuesArray));\jsR\jsT\jsT
+ ProbType=[\ptypeArray];\jsR\jsT\jsT
+\if@inclkey
+ \curr@quiz.CorrAns=(new %
+Array(\corrAnsArray));\jsR\jsT\jsT
+\fi
+ DisplayQuizResults("\curr@quiz",\theeqpointvalue,%
+\thequestionno);\jsR\jsT\jsT
+ \eq@submitURL
+ \postSubmitQuiz
+ resetQuiz("\curr@quiz");\jsR\jsT
+ }\jsR
+ }}%
+ }
+}
+\newcommand\eq@EndQuizButton[1][]
+{%
+ \ifx\eq@CGI\@empty
+ \let\eq@submitURL\@empty
+ \let\eq@insertHiddenFields\@empty
+ \fi
+ \mbox{\push@@Button{#1}{endQuiz.\curr@quiz}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\EndQuizButtonDefaults\eq@@EndQuizButtonActions
+ \every@ButtonField\every@EndQuizButton}}%
+ \makebox[0pt][r]{\eq@insertHiddenFields}\global\let\eq@CGI\@empty
+}
+\newcommand\databaseName[1]{\gdef\db@Name{#1}}\def\db@Name{}
+\newcommand\tableName[1]{\gdef\db@Table{#1}}\def\db@Table{}
+\newcommand\eqCGI{\definePath{\eq@CGI}}\def\eq@CGI{}
+\newcommand\eqSubmit{\hyper@normalise\eqSubmiti}
+\def\eqSubmiti#1{\xdef\eq@CGI{"#1"}\eqSubmitii}
+\def\eqSubmitii#1#2{\databaseName{#1}\tableName{#2}}
+\providecommand{\rtnURL}{\definePath{\thisRtnURL}}
+\let\thisRtnURL\@empty
+\newcommand\addHiddenTextField[3][]{}
+\newcommand\populateHiddenField[2]{}
+\def\eqButtonDefaults
+{%
+ \CA{\eq@local@CA}\AC{}\H{P}\W{1}\S{B}
+ \BC{1 0 0}\BG{.7529 .7529 .7529}
+}
+\def\@@eqButtonActions
+{%
+ \A{\JS{if (isEndQuizPushed("\eqBaseName")){\jsR\jsT%
+ correctQuiz("\eqBaseName",\thequestionno);%
+ \ifusesumrytbls\jsR\jsT\else\jsR\fi
+ if (typeof correctSumryTbl == "function")\jsR\jsT\jsT
+ correctSumryTbl("\eqBaseName",\thequestionno);\jsR
+ }
+ }}%
+}
+\newcommand\eqButton[2][]
+{%
+ \ifnocorrections\else
+ \def\eqBaseName{#2}%
+ \mbox{\push@@Button{#1}{correct.#2}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\eqButtonDefaults\@@eqButtonActions\every@ButtonField
+ \every@eqButton}}%
+ \fi
+}
+\def\CorrButton{\eqButton}
+\def\rbMarkup@Defaults
+{%
+ \BC{}\F{\FHidden}\Ff{\FfReadOnly}\textSize{12}
+ \textColor{0 g}\symbolchoice{check}\W{}
+}
+\newcommand\rbMarkup[1][]{%
+ \ifx\grpquestions\eq@One
+ \def\Fld@name{%
+ \oField.\thequestionno.\thegrpquestionno}\else
+ \def\Fld@name{\oField.\thequestionno}\fi
+ \mbox{\check@@Box{#1\V{Yes}\DV{Yes}}%
+ {rbmarkup.\Fld@name}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\rbMarkup@Defaults\every@CheckBox\every@rbMarkup}}}%
+\newcommand\minQuizResp{lowThreshold}
+\newcommand\PTs{\@ifstar{\def\eq@star{*}\@PTs}{\def\eq@star{x}\@PTs}}
+\def\@PTs#1{\gdef\eq@PTs{#1}\ifx\eq@PTs\@empty\gdef\eq@PTs{1}\fi
+ \global\let\eqPTs\eq@PTs\global\let\eq@PTs\@empty
+ \if\eq@star*\else\PTs@Hook\fi}
+\def\eq@PTs{0} % initialize this variable
+\newcommand\QT[1]
+{%
+ \gdef\eq@qT{#1}\ifx\eq@qT\@empty\global\let\eq@qT\eq@na\fi
+ \global\let\eqQT\eq@qT\global\let\eq@qT\eq@na
+}
+\def\eq@na{na} % not applicable
+\let\eq@qT\eq@na
+\newcommand\PTsHook[1]{\def\PTs@Hook{#1}}
+\let\PTs@Hook\@empty
+\let\eq@PTs\@empty
+\newcommand\eqGradeScale{%
+ "A",[90, 100],"B",[80,90],"C",[70,80],"D",[60,70],"F",[0,60]}
+\let\eqGradeScaleLoc\@empty
+\newcommand{\resetGradeScaleLoc}{\global\let\eqGradeScaleLoc\@empty}
+\def\tallywidth#1{\def\TBW{#1}}
+\def\TBW{15bp}
+\def\DefaultHeightOfWidget{11bp}
+\def\RadioFieldSize{11bp}
+\def\RBW{2in} % Response Box width (math,txt, txtpc, answer field)
+\def\SFW{1.5in} % Score Field Width
+\def\GFW{20pt} % Grade Field Width
+\def\PtFW{1.5in} % Point Field Width
+\def\PcFW{1.5in} % Percent Field Width
+\def\ScoreFieldDefaults
+{%
+ \Ff{\FfReadOnly}\BC{1 0 0}\BG{}\S{S}
+ \DV{\eqScore}\V{\eqScore}\W{1}
+}
+\newcommand\ScoreField[2][]
+{%
+ \mbox{\text@@Field{#1}{ScoreField.#2}{\SFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\ScoreFieldDefaults\every@eqTextField\every@ScoreField}}%
+}
+\def\GradeFieldDefaults
+{%
+ \textColor{0 0 1 rg}\BC{1 0 0}\BG{1 1 1}\S{S}
+ \Ff{\FfReadOnly}\Q{1}\W{1}
+}
+\newcommand\GradeField[2][]
+{%
+ \mbox{\text@@Field{#1}{GradeField.#2}{\GFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\GradeFieldDefaults\every@eqTextField\every@GradeField}}%
+}
+\def\AnswerFieldDefaults
+{%
+ \BC{0 0 0}\S{S}\Ff{\FfReadOnly}\W{1}%
+ \presets{\eq@resetAnsFieldOnClose}%
+}
+\let\eq@resetAnsFieldOnClose\@empty
+\newcommand{\noResetAnsFieldOnClose}{%
+ \global\let\eq@resetAnsFieldOnClose\@empty}
+\newcommand{\resetAnsFieldOnClose}{%
+ \gdef\eq@resetAnsFieldOnClose{%
+ \AApageclose{this.resetForm(["\Fld@name"]);}}}
+\newcommand\AnswerField[2][]
+{%
+ \mbox{\text@@Field{#1}{Ans.#2}{\RBW}{\DefaultHeightOfWidget}%
+ {}{\eq@setWidgetProps\eq@TextField}%
+ {\AnswerFieldDefaults\every@eqTextField\every@AnswerField}}%
+}
+\newcommand\autoAnswerField{%
+ \@ifundefined{lfooter}{\def\eq@next{\eq@autoAnswerFieldgobble}%
+ \PackageError{exerquiz}{The \string\autoAnswerField\space
+ command\MessageBreak requires the web package}{Use web package}
+ }{%
+ \PackageInfo{exerquiz}{%
+ For this auto answer field feature to run\MessageBreak
+ the webheadings pagestyle of the web package\MessageBreak
+ is required}\def\eq@next{\eq@autoAnswerField}%
+ \ifx\web@lfoot\@empty\else
+ \PackageWarning{exerquiz}{The left running footer already in
+ use\MessageBreak Will overwrite what is there now.
+ Better fix it.}\fi
+ }%
+ \eq@next
+}
+\newcommand\eq@autoAnswerFieldgobble[1][]{\relax}
+\newcommand\autoAnsFldRaiseBox[1]{\def\ef@aAFRB{#1}}
+\autoAnsFldRaiseBox{0pt}
+\let\autoAFOpts\@empty
+\newcommand\eq@autoAnswerField[1][]{\gdef\autoAFOpts{#1}%
+ \def\eq@insertAnswerField{\AnswerField[#1]{\currQuiz}}%
+ \eq@@autoAnswerField
+}
+\newcommand\eq@@autoAnswerField{\lfooter{\ifIsRespBox
+ \raisebox{\ef@aAFRB}{\eq@insertAnswerField}%
+ \global\IsRespBoxfalse\fi}%
+}
+\newcommand\manualAnswerField[1][\autoAFOpts]{%
+ \expandafter\AnswerField\expandafter[#1]{\currQuiz}}
+\def\PointsFieldDefaults
+{%
+ \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}
+ }
+\newcommand\PointsField[2][]
+{%
+ \mbox{\text@@Field{#1}{PointsField.#2}{\PtFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\PointsFieldDefaults\every@eqTextField\every@PointsField}}%
+}
+\def\PercentFieldDefaults
+{%
+ \rawPDF{}\BC{1 0 0}\BG{}\W{1}\S{S}\Ff{\FfReadOnly}%
+}
+\newcommand\PercentField[2][]
+{%
+ \mbox{\text@@Field{#1}{PercentField.#2}{\PcFW}%
+ {\DefaultHeightOfWidget}{}{\eq@setWidgetProps\eq@TextField}%
+ {\PercentFieldDefaults\every@eqTextField\every@PercentField}}%
+}
+\newcommand\RestoreScoreField
+{%
+ \global\let\eqScore\eq@Score
+ \global\let\eqOutOf\eq@OutOf
+}
+\def\DeclareQuiz#1{%
+ \edef\thisQuiz{#1}%
+ \edef\curr@quiz{#1}%
+ \edef\currQuiz{#1}%
+ \edef\curr@quiz{#1}%
+}
+\let\Quiz\DeclareQuiz
+\def\aeb@noindgobble{\noindent\@gobbletwo}
+\let\startQuizHere\relax
+\let\endQuizHere\relax
+\let\dockQuiz\relax
+\newcommand\floatQuiz{%
+ \global\let\eq@beginQuiz@saved\eq@beginQuiz
+ \global\let\eq@endQuiz@saved\eq@endQuiz
+ \global\let\startQuizHere\eq@beginQuiz
+ \global\let\endQuizHere\eq@endQuiz
+ \global\let\eq@beginQuiz\aeb@noindgobble
+ \global\let\eq@endQuiz\@empty
+ \global\let\dockQuiz\eq@dockQuiz
+}
+\newcommand\eq@dockQuiz{%
+ \global\let\eq@beginQuiz\eq@beginQuiz@saved
+ \global\let\eq@endQuiz\eq@endQuiz@saved
+ \global\let\startQuizHere\relax
+ \global\let\endQuizHere\relax
+ \global\let\eq@beginQuiz@saved\relax
+ \global\let\eq@endQuiz@saved
+ \global\let\dockQuiz\relax
+}
+\def\fancyQuizHeaders{%
+ \global\let\eq@sqsllabel@fancy@save\eq@sqsllabel
+ \gdef\eq@sqsllabel{\eq@fancyQuizHeaders}}
+\def\eq@fancyQuizHeaders{%
+ \if\eqQuizType\isQZ\expandafter\eq@fancyQuizHeadersfmt\else
+ \expandafter\eq@fancyShrtQuizHeadersfmt\fi
+}
+\let\eq@sqsllabel@fancy@save\@empty
+\def\restoreDefaultQuizHeaders{%
+ \global\let\eq@sqsllabel\eq@sqsllabel@fancy@save}
+\newcommand\fncyQHdrsColor{blue}
+\newcommand\FncyHdrsFmtNoTitleQuiz{Solution to Quiz:}
+\newcommand\FncyHdrsFmtQuestion{Question}
+\newcommand\dfltFncyQHdrsFmt{%
+ \protect\bfseries\protect\color{\fncyQHdrsColor}%
+ \ifx\aebTitleQuiz\@empty
+ \ifnum\@eqquestiondepth>0\relax\FncyHdrsFmtNoTitleQuiz\fi
+ \else\aebTitleQuiz:\ifnum\@eqquestiondepth=0\else\protect\ %
+ \FncyHdrsFmtQuestion\fi\fi\ifcase\@eqquestiondepth
+ \ifx\aebTitleQuiz\@empty\FncyHdrsFmtNoTitleQuiz\fi
+ \or\space\arabic{eqquestionnoi}.%
+ \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ \or\space\arabic{eqquestionnoi}(\alph{eqquestionnoii})%
+ (\roman{eqquestionnoiii})\fi
+}
+\newcommand\dclrFncyQzHdrsFmt[1]{%
+ \def\eq@fancyQuizHeadersfmt{{#1}}%
+}
+\dclrFncyQzHdrsFmt{\dfltFncyQHdrsFmt}
+\newcommand\dclrFncySqHdrsFmt[1]{%
+ \def\eq@fancyShrtQuizHeadersfmt{{#1}}%
+}
+\dclrFncySqHdrsFmt{\dfltFncyQHdrsFmt}
+\let\tqhspace\space
+\newcommand\titleQuiz[1][]{#1\@titleQuizi}
+\def\@titleQuizi{\makeatletter
+ \@ifstar{\def\eq@tq@star{*}\eq@titleQuiz}%
+{\def\eq@tq@star{x}\eq@titleQuiz}}
+\def\eq@titleQuiz#1{%
+ \gdef\aebTitleQuiz{#1}\def\@currentlabelname{#1}%
+ \gdef\aeb@@titleQuiz{#1}%
+ \gdef\aebtitleQuiz{\mbox{\titleQuizfmt{#1}}\tqhspace}%
+\makeatother}
+\let\aebtitleQuiz\@empty
+\let\aebTitleQuiz\@empty
+\newcommand\titleQuizfmt{\bfseries}
+\def\ifQuizType#1#2{\if\eqQuizType\isQZ\def\qt@next{#1}%
+ \else\def\qt@next{#2}\fi\qt@next}
+\def\eq@ifstaroption#1#2{\if\eq@tq@star*\def\sq@next{#1}%
+ \else\def\sq@next{#2}\fi\sq@next}
+\let\eq@tq@star\relax
+\def\ifstaroption{\PackageWarning{exerquiz}
+ {\protect\ifstaroption\space is only defined within the\MessageBreak
+ shortquiz environment. Gobbling up its two\MessageBreak
+ arguments, sorry. This occurred}%
+ \@gobbletwo
+}
+\newcounter{qMarkCnt}
+\def\multipartquestion{\global\let\aeb@multipart\eq@One}
+\providecommand{\ptsLabel}[1]{\def\eqptsLabel{#1}}\ptsLabel{pts}
+\providecommand{\ptLabel}[1]{\def\eqptLabel{#1}}\ptLabel{pt}
+\let\aeb@multipart\eq@Zero
+\newcommand\pcMarkupColor{red}
+\def\markupWidth{12bp}\def\markupHeight{8bp}\def\markupTextSize{0}
+\newcommand{\aeb@creditmarkup}{%
+ \textField[\Ff\FfReadOnly\BC{}\F\FHidden
+ \textColor{\pcMarkupColor}\textSize{\markupTextSize}\autoCenter{n}%
+ \DV{0 \eqptsLabel}\V{0 \eqptsLabel}]%
+ {qMark.\currQuiz.\thequestionno.\arabic{qMarkCnt}}%
+ {\markupWidth}{\markupHeight}%
+}
+\def\showCreditMarkup{%
+ \def\qMark{\if\aeb@multipart\eq@Zero\aeb@creditmarkup
+ \stepcounter{qMarkCnt}\else\global\let\aeb@multipart\eq@Zero\fi}%
+ \def\qMark@Hook{\aeb@creditmarkupfmt}%
+}
+\def\hideCreditMarkup{\global\let\qMark@Hook\@empty}
+\newcommand{\aeb@creditmarkupfmt}{\makebox[0pt][r]{\qMark\hspace{-2bp}}}
+\long\def\gobbleToEndQt#1\endeqQt{\ifeqforpaper\expandafter\@gobble\fi}
+\long\def\gobbleToEndSQt#1\endeqSQt{%
+ \ifeqforpaper\expandafter\@gobble\fi}
+\newcommand\inclQtFilter[1]{\def\eqarg{#1}\ifx\eqarg\eqFilterArg
+ \else\expandafter\gobbleToEndQt\fi}
+\newcommand{\exclQt}[1]{\gobbleToEndQt}
+\newcommand{\useQtFilter}{%
+ \let\eqQt\inclQtFilter\let\eqSQt\exclSQt
+}
+\newcommand\inclSQtFilter[1]{\def\eqarg{#1}\ifx\eqarg\eqFilterArg
+ \else\expandafter\gobbleToEndSQt\fi}
+\newcommand{\exclSQt}[1]{\gobbleToEndSQt}
+\newcommand{\useSQtFilter}{\let\eqSQt\inclSQtFilter\let\eqQt\exclQt}
+\newcommand{\sqbookmarkfmt}{Short Quiz \@shortquizCnt.\space}
+\newcommand{\qzbookmarkfmt}{Quiz \@quizCnt.\space}
+\newcommand{\quizpdfbookmark}[1]{\relax\def\argi{#1}%
+ \if\eqQuizType\isSQZ\edef\aeb@bmmrkdest{sqbm.\@shortquizCnt}%
+ \def\aeb@thisbkmrkfmt{\sqbookmarkfmt}\else
+ \edef\aeb@bmmrkdest{qzbm.\@quizCnt}%
+ \def\aeb@thisbkmrkfmt{\qzbookmarkfmt}\fi
+ \def\quizpdfbookmarktitle{#1}%
+ \def\eqex@next{\belowpdfbookmark{\aeb@thisbkmrkfmt#1}%
+ {\aeb@bmmrkdest}}%
+ \ifx\aebTitleQuiz\@empty\else\ifx\argi\@empty
+ \def\quizpdfbookmarktitle{\aebTitleQuiz}%
+ \def\eqex@next{\belowpdfbookmark{\aebTitleQuiz}%
+ {\aeb@bmmrkdest}}\fi\fi
+ \eqex@next\ignorespaces
+}
+\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 % dps17
+ \setlength{\leftmargin}{\labelwidth}\else
+ \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi
+ \else
+ \ifx\solutionparshape\@empty
+ \setlength{\leftmargin}{\labelwidth}\else
+ \setlength{\leftmargin}{\labelwidth+\eqemargin}\fi\fi
+ \setlength{\labelsep}{0pt}%
+% \settowidth{\labelsep}{\eq@hspanner}%
+ \def\Ans{\Ans@list}%
+ }%
+}%
+{\endlist\setcounter{quizno}{0}\eq@answersEndHook}
+\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 % dps17
+ \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\sqWrongRespJS{OnBlurRespBox( false, "\oField" );}
+\def\sqRightRespJS{OnBlurRespBox( true, "\oField" );}
+\def\Ans@sq@l@Actions
+{%
+ \A{\if\Ans@choice1
+ \JS{\sqRightRespJS}
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@solutionsafter\else
+ /Next <</S/GoTo/D(\@qzsolndest)>>
+ \fi
+ \fi
+ \else
+ \JS{\sqWrongRespJS\jsR
+ \ifx\oField\@empty\else
+ updateTally("\oField.\thequestionno");
+ \fi}%
+ \fi
+ }%
+}
+\def\linkContentFormat{\alph{quizno}}
+\def\aebChoiceAltFmt{\noexpand\ifaebshowgrayletters
+ \Alph{quizno}\noexpand\else\linkContentFormat\noexpand\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
+ \set@@Link{}{}{}%
+ {\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}}
+ {\eq@protect\A}{\eq@setWidgetProps\setLink@driver}%
+ {\set@LinkTextDefaults\Ans@sq@l@Actions\every@Link}%
+ \Ans@proofing{\eq@tmpdima}%
+\eq@hspanner\ignorespaces}
+\def\Ans@ck@sq@l{\Ans@ck@sq@f}
+\def\@@Ans@sq@f@Defaults
+{%
+ \BC{0 0 0}\Ff{\FfNoToggleToOff}\W{1}
+ \F{\FPrint}\textSize{12}\textColor{0 g}
+}
+\def\sqTurnOffAlerts{\let\@sqTurnOffAlerts\eq@Zero}
+\def\sqTurnOnAlerts{\let\@sqTurnOffAlerts\eq@One}
+\sqTurnOnAlerts
+\def\sqNoCorrections{\let\@sqAlertsOnly\eq@One}
+\def\sqCorrections{\let\@sqAlertsOnly\eq@Zero}
+\sqNoCorrections
+\def\Ans@sq@f@Actions
+{%
+ \A{\if\Ans@choice\eq@One
+ \JS{%
+ \if\@sqTurnOffAlerts1OnBlurRespBox(true,"\oField");\jsR\fi
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@solutionsafter\else
+ jmpToNamedDest("\oField","\@qzsolndest",%
+\if\@sqTurnOffAlerts00\else1\fi);\fi
+ \fi}%
+ \else
+ \JS{%
+ \if\@sqTurnOffAlerts1OnBlurRespBox( false, %
+"\oField" );\jsR\fi
+ \ifx\oField\@empty\else
+ updateTally("\oField.\thequestionno");
+ \fi}%
+ \fi%
+ }%
+ \AA{\AAMouseDown{\JS{%
+ updateTally.downState=!!event.target.isBoxChecked%
+(\arabic{quizno}-1);}}}%
+}
+\def\Ans@proofing
+#1{%
+ \ifeq@proofing\if\Ans@choice1\relax
+ \llap{\@proofingsymbol\,\hskip#1\relax}%
+ \fi\fi
+}
+\def\sqRghtSymbChoice#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \edef\sq@corrsymch{\sqRghtSymbChoiceDef}\else
+ \edef\sq@corrsymch{#1}\fi}
+\def\sqRghtSymbColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
+ \edef\sq@corrsymcol{\sqRghtSymbColorDef}\else
+ \edef\sq@corrsymcol{#1}\fi}
+\def\sqWrngSymbChoice#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \edef\sq@wrgsymch{\sqWrngSymbChoiceDef}\else
+ \edef\sq@wrgsymch{#1}\fi}
+\def\sqWrngSymbColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
+ \edef\sq@wrgsymcol{\sqWrngSymbColorDef}\else
+ \edef\sq@wrgsymcol{#1}\fi}
+\def\sqRghtSymbChoiceDef{check}
+\def\sqRghtSymbColorDef{0 .6 0 rg}
+\def\sqWrngSymbChoiceDef{cross}
+\def\sqWrngSymbColorDef{1 0 0 rg}
+\edef\sq@corrsymch{\sqRghtSymbChoiceDef}
+\edef\sq@corrsymcol{\sqRghtSymbColorDef}
+\edef\sq@wrgsymch{\sqWrngSymbChoiceDef}
+\edef\sq@wrgsymcol{\sqWrngSymbColorDef}
+\def\sqResetSymbToDef{%
+ \sqRghtSymbChoice{}\sqRghtSymbColor{}%
+ \sqWrngSymbChoice{}\sqWrngSymbColor{}%
+}
+\def\qChoiceSymb#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \edef\qz@chksymb{\qChoiceSymbDef}\else
+ \edef\qz@chksymb{#1}\fi}
+\def\qChoiceColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
+ \edef\qz@chksymbcol{\qChoiceColorDef}\else
+ \edef\qz@chksymbcol{#1}\fi}
+\def\qChoiceSymbDef{check}
+\def\qChoiceColorDef{0 0 0 rg}
+\edef\qz@chksymb{\qChoiceSymbDef}
+\edef\qz@chksymbcol{\qChoiceColorDef}
+\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
+ \if\Ans@choice\eq@One
+ \def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
+ \textColor{\sq@corrsymcol}}\else
+ \def\rbf@Opts{\symbolchoice{\sq@wrgsymch}%
+ \textColor{\sq@wrgsymcol}}\fi
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \eq@tmpdima=\wd\eq@tmpbox%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \insertGrayLetters % 6.3d
+ \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}%
+ {mc.\oField.\thequestionno}%
+ {\RadioFieldSize}% 11/16/05 changed from \oField to mc.\oField
+ {\RadioFieldSize}{\Ans@choice\alph{quizno}}{\eq@protect\A}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\@@Ans@sq@f@Defaults\Ans@sq@f@Actions\every@RadioButton
+ \every@sqRadioButton}}%
+ \Ans@proofing{\RadioFieldSize}%
+\eq@hspanner\ignorespaces}
+\def\@@Ans@ck@sq@f@Defaults
+{%
+ \BC{0 0 0}\Ff{\FfNoToggleToOff}
+ \F{\FPrint}\textSize{12}\textColor{0 g}\W{1}
+}
+\begingroup
+\catcode`\&=12
+\gdef\eq@AND{&&}
+\endgroup
+\def\Ans@ck@sq@f@Actions
+{%
+ \A{\if\Ans@choice1%
+ \JS{%
+var fName=event.target.name;\jsR
+var g=this.getField("mc.\oField.\thequestionno");\jsR
+var a=g.getArray();\jsR
+for (var i=0; i<a.length; i++)\jsR\jsT
+if ( a[i].isBoxChecked(0) \eq@AND\space
+a[i].value.charAt(0)==0)\jsR\jsT\jsT
+a[i].checkThisBox(0,false);\jsR
+ \if\@sqTurnOffAlerts1OnBlurRespBox( %
+ true, "\oField" );\jsR\fi
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@solutionsafter\else
+for (var i=0; i<a.length; i++){\jsR\jsT
+ if ( a[i].exportValues[0].charAt(0)==1 \eq@AND\space
+!a[i].isBoxChecked(0) )\jsR\jsT\jsT
+ break;\jsR
+}\jsR
+ if (i>=a.length) jmpToNamedDest("\oField","\@qzsolndest",%
+ \if\@sqTurnOffAlerts00\else1\fi);
+ \fi
+ \fi}%
+ \else%
+ \JS{%
+var fName=event.target.name;\jsR
+var g=this.getField("mc.\oField.\thequestionno");\jsR
+var a=g.getArray();\jsR
+for (var i=0; i<a.length; i++)\jsR
+{\jsR\jsT
+if (a[i].value.charAt(0)==0) {\jsR\jsT\jsT
+if ( fName != a[i].name )\jsR\jsT\jsT\jsT
+a[i].checkThisBox(0,false);\jsR\jsT
+}\jsR
+}\jsR
+ \if\@sqTurnOffAlerts1OnBlurRespBox( false, "\oField" );\fi%
+ \ifx\oField\@empty\else%
+ updateTally("\oField.\thequestionno");
+ \fi}%
+ \fi%
+ }%
+ \AA{\AAMouseDown{%
+\JS{updateTally.downState=!!event.target.isBoxChecked(0);}}}
+}
+\def\Ans@ck@sq@f{%
+ \if\eq@listType\eq@One\stepcounter{quizno}\else
+ \@ifundefined{ifwithsoldoc}{\refstepcounter{quizno}}
+ {\ifwithsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi\PBS\raggedright
+ \if\Ans@choice1%
+ \def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
+ \textColor{\sq@corrsymcol}}\else
+ \def\rbf@Opts{\symbolchoice{\sq@wrgsymch}%
+ \textColor{\sq@wrgsymcol}}\fi
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \eq@tmpdima=\wd\eq@tmpbox%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \insertGrayLetters % 6.3d
+ \mbox{\expandafter\check@@Box\expandafter{\rbf@Opts}%
+ {mc.\oField.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}
+ {\Ans@choice\alph{quizno}}{\eq@protect\A}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\@@Ans@ck@sq@f@Defaults\Ans@ck@sq@f@Actions\every@CheckBox
+ \every@sqCheckBox}}%
+ \Ans@proofing{\RadioFieldSize}%
+\eq@hspanner\ignorespaces}
+\newskip\aboveanswersSkip
+\setlength\aboveanswersSkip{3pt}
+\let\q@hwdest\@empty % hard-wired destination
+\let\pointValuesArray\@empty
+\newif\ifeqshowmarkup\eqshowmarkupfalse
+\newif\ifeqshowOutOf \eqshowOutOffalse
+\def\showOutOfinSmryTbl{false}
+\def\eq@recordThesePTs{%
+ \ifx\pointValuesArray\@empty
+ \edef\ptsValue{\showOutOfinSmryTbl,\eqPTs}\else
+ \edef\ptsValue{,\eqPTs}\fi
+ \expandafter\g@addto@macro\expandafter\pointValuesArray
+ \expandafter{\ptsValue}}
+\let\ptypeArray\@empty
+\def\eq@recordProbType{%
+ \ifx\ptypeArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\ptypeArray{null,"\eqQT"}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\ptypeArray{,"\eqQT"}}\fi
+ \tmp@exp
+}
+\let\corrAnsArray\@empty
+\def\eq@recordCorrAns#1{%
+ \ifx\corrAnsArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\corrAnsArray{null,#1}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\corrAnsArray{,#1}}\fi
+ \tmp@exp
+}
+\def\aeb@answerType@r{r}
+\def\aeb@answerType@c{c}
+\newcommand\answers@q{%
+ \eq@AddProbToQzQuesList
+ \def\aeb@answerType{r}\setdefault@Ans\eq@recordThesePTs
+ \eq@recordProbType
+ \addtocounter{eqpointvalue}{\eqPTs}\stepcounter{questionno}%
+ \def\aeb@thisType{"mc"}\@ifnextchar[{\answers@@q}%
+ {\@ifstar{\answers@@q[\curr@quiz.\thequestionno]}{\answers@@q[]}}%
+}
+\def\answers@@q[#1]#2{\global\let\eq@ansChoiceArray\@empty
+ \xdef\aeb@numCols{#2}\edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,\aeb@thisType]}%
+ \ifx\q@hwdest\@empty
+ \xdef\@qzsolndest{#1}\else
+ \gdef\@qzsolndest{\q@hwdest}\fi
+ \ifnum\aeb@numCols=1
+ \gdef\eq@listType{1}\expandafter\answers@q@list\else
+ \gdef\eq@listType{0}\expandafter\answers@q@tabular\fi{\aeb@numCols}%
+}
+\newcommand\manswers@q
+{%
+ \eq@AddProbToQzQuesList
+ \def\aeb@answerType{c}\@setFormLinkType
+ \global\expandafter\let\expandafter\@Ans
+ \expandafter=\csname Ans@ck@\@@quiztype\endcsname
+ \eq@recordThesePTs\eq@recordProbType
+ \addtocounter{eqpointvalue}{\eqPTs}\stepcounter{questionno}%
+ \def\aeb@thisType{"ms"}\@ifnextchar[{\answers@@q}%
+ {\@ifstar{\answers@@q[\curr@quiz.\thequestionno]}{\answers@@q[]}}%
+}
+\newenvironment{answers@q@list}[1]{%
+ \ifx\aeb@answerType\eq@r
+ \let\endanswers\endanswers@q@list\else
+ \let\endmanswers\endanswers@q@list\fi
+ \list{\strut\@Ans}{%
+ \if\qstar*\relax
+ \if\aeb@FLOverride\eq@l
+ \settowidth{\labelwidth}{\eq@lw@l}\else
+ \settowidth{\labelwidth}{\eq@lw@f}\fi
+ \else
+ \if\aeb@FLOverride\eq@f
+ \settowidth{\labelwidth}{\eq@lw@f}\else
+ \settowidth{\labelwidth}{\eq@lw@l}\fi
+ \fi
+ \setlength{\topsep}{-\parskip+\aboveanswersSkip}%
+ \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{0pt}%
+ \def\Ans{\Ans@list}%
+ }%
+}{\endlist\setcounter{quizno}{0}%
+ \eq@answersEndHook
+ \setdefault@Ans
+ \ifx\aeb@answerType\aeb@answerType@r
+ \eq@recordCorrAns{\eq@ansChoiceArray}\ifwithinMCFI
+ \eq@recordCorrAns{\s@veCorrAnsMCFI}\fi\else
+ \eq@recordCorrAns{[\eq@ansChoiceArray]}\fi
+ \global\let\eqlimselTo\@empty
+}
+\newcommand\qztabsep[1]{\def\eq@argi{#1}\ifx\eq@argi\@empty
+ \def\qz@tabsep{1.5pt}\else\def\qz@tabsep{#1}\fi}
+\qztabsep{1.5pt}
+\def\qzTabPos#1{\def\qz@TabPos{[#1]}}\qzTabPos{}
+\def\answers@q@tabular#1{%
+ \ifinner\else\par\removelastparskip\vspace{\aboveanswersSkip}\fi
+ \eq@tmpdima=\linewidth
+ \@tempcnta#1\relax
+ \advance\@tempcnta-1\relax
+ \multiply\@tempcnta by2
+ \@tempdima\qz@tabsep\relax
+ \multiply\@tempdima\@tempcnta
+ \advance\eq@tmpdima-\@tempdima
+ \divide\eq@tmpdima by#1
+ \tabcolsep\qz@tabsep\relax
+ \def\Ans{\Ans@tabular}%
+ \ifx\aeb@answerType\eq@r
+ \let\endanswers\endanswers@q@tabular\else
+ \let\endmanswers\endanswers@q@tabular\fi
+ \noindent\expandafter
+ \tabular\qz@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}%
+}
+\def\endanswers@q@tabular
+{%
+ \endtabular\setcounter{quizno}{0}%
+ \eq@answersEndHook
+ \setdefault@Ans
+ \ifx\aeb@answerType\aeb@answerType@r
+ \eq@recordCorrAns{\eq@ansChoiceArray}\ifwithinMCFI
+ \eq@recordCorrAns{\s@veCorrAnsMCFI}\fi\else
+ \eq@recordCorrAns{[\eq@ansChoiceArray]}\fi
+ \global\let\eqlimselTo\@empty
+}
+\let\qRadionActionsHook\@empty
+\def\Ans@@l@Actions{\A{\JS{%
+ this.getField("mc.\curr@quiz.\thequestionno").value
+ = "\Ans@choice\alph{quizno}";\jsR
+ RecordPointValue([0,\eqPTs,\eq@pPTs],\thequestionno);\jsR
+ RecordProblemType("\eqQT",\thequestionno);\jsR
+ ProcessQuestion(\Ans@choice,"\alph{quizno}",\thequestionno,%
+\arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+"\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+\ifeq@noquizsolutions\else,1\fi\fi\fi);\qRadionActionsHook}}%
+}
+\def\Ans@r@l@Defaults
+{%
+ \BC{}\S{S}\W{1}\Ff{\FfNoToggleToOff}\F{\FPrint}
+ \textSize{12}\textColor{0 g}\Ff{\FfReadOnly}
+}
+\def\Ans@l{\leavevmode\if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi\PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \eq@tmpdima=\wd\eq@tmpbox
+ \def\link@@Content{(\hfil\linkContentFormat\hfil)}%
+ \def\late@options{\BC{}}%
+\if\Ans@choice1\relax\eq@recordAnsChoice\fi
+ \makebox[0pt][l]{\radio@@Button{}{mc.\curr@quiz.\thequestionno}%
+ {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@r@l@Defaults\every@RadioButton
+ \every@qRadioButton\late@options}}%
+ \set@@Link{}{}{}%
+ {\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}}%
+ {\eq@protect\A}{\eq@setWidgetProps\setLink@driver}%
+ {\set@LinkTextDefaults\Ans@@l@Actions\every@Link}%
+ \ifnocorrections\else
+ \if\Ans@choice1\relax
+ \edef\Ans@c@l@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty
+ \noexpand\Ff{\FfReadOnly}%
+ \else % there is a solution
+ \ifeq@noquizsolutions
+ \noexpand\Ff{\FfReadOnly}%
+ \else
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}%
+ \fi
+ \fi
+ }%
+ \else
+ \def\Ans@c@l@Choice{\Ff{\FfReadOnly}\BC{}}%
+ \fi
+ \def\late@options{\BC{}}%
+ \if\Ans@choice1\relax
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@noquizsolutions\else
+ \edef\late@options{\noexpand\BC{\solution@Color}}%
+ \fi
+ \fi
+ \fi
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\eq@tmpdima}{0pt}{Yes}{}% \@tempdimb
+ {\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@c@f@Defaults\Ans@c@l@Choice\every@RadioButton
+ \every@qRadioButton\late@options}}%
+ \fi
+ \Ans@proofing{\eq@tmpdima}%
+\eq@hspanner\ignorespaces}
+\def\Ans@ck@@l@Actions{\A{\JS{%
+ var ckfName="mck.\curr@quiz.\thequestionno.\arabic{quizno}";\jsR
+ var ckf = this.getField(ckfName);\jsR
+ ckf.checkThisBox(0,!ckf.isBoxChecked(0));\jsR
+ var _bOK=true;\jsR
+\ifx\eqlimselTo\@empty\else _bOK = LimitSelection(\eqlimselTo,%
+"mck.\curr@quiz.\thequestionno","\arabic{quizno}");\jsR\fi
+if (_bOK) {\jsR\jsT
+ var aPMSretn=ProcessMultiSelection(\Ans@choice,"\alph{quizno}",%
+\thequestionno,\arabic{quizno},"\curr@quiz",\eqPTs,\eq@pPTs);\jsR\jsT
+ RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
+ ProcessQuestion(aPMSretn[0],aPMSretn[1],\thequestionno,%
+\arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+"\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+\ifeq@noquizsolutions\else,1\fi\fi\fi);\jsR
+}
+ }}
+}
+\def\Ans@ck@l@Defaults
+{%
+ \BC{}\S{S}\W{1}\H{N}\Ff{\FfNoToggleToOff}
+ \textSize{12}\textColor{0 g}\Ff{\FfReadOnly}
+}
+\def\Ans@ck@l{%
+ \leavevmode\if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi
+ \if\Ans@choice1\eq@recordAnsChoice\fi\PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \eq@tmpdima=\wd\eq@tmpbox
+ \def\link@@Content{(\hfil\linkContentFormat\hfil)}%
+ \makebox[0pt][l]{%
+ \check@@Box{}{mck.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@ck@l@Defaults\every@RadioButton
+ \every@qckCheckbox}}%
+ \set@@Link{}{}{}%
+ {\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}}%
+ {\eq@protect\A}{\eq@setWidgetProps\setLink@driver}%
+ {\set@LinkTextDefaults\Ans@ck@@l@Actions\every@Link}%
+ \ifnocorrections\else
+ \if\Ans@choice1\relax
+ \edef\Ans@c@l@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty\noexpand\BC{}%
+ \noexpand\Ff{\FfReadOnly}%
+ \else % there is a solution
+ \ifeq@noquizsolutions
+ \noexpand\BC{}\noexpand\Ff{\FfReadOnly}%
+ \else
+ \noexpand\BC{\solution@Color}%
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}%
+ \fi
+ \fi
+ }%
+ \else
+ \def\Ans@c@l@Choice{\Ff{\FfReadOnly}\BC{}}%
+ \fi
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\eq@tmpdima}{0pt}{Yes}{}%
+ {\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@c@f@Defaults\Ans@c@l@Choice\every@RadioButton
+ \every@qRadioButton}}%
+ \fi
+ \Ans@proofing{\eq@tmpdima}%
+\eq@hspanner\ignorespaces}
+\def\Ans@f{\leavevmode\if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi
+ \PBS\raggedright\Ans@@f}
+\def\Ans@r@f@Defaults
+{%
+ \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff}
+ \F{\FPrint}\textSize{12}\textColor{0 g}
+}
+\def\Ans@r@f@Actions{\A{\JS{%
+ RecordPointValue([0,\eqPTs,\eq@pPTs],\thequestionno);\jsR
+ RecordProblemType("\eqQT",\thequestionno);\jsR
+ ProcessQuestion(\Ans@choice,"\alph{quizno}",\thequestionno,%
+ \arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+ "\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions\else,1\fi\fi\fi);\qRadionActionsHook}}
+}
+\def\quiz@SolutionActionHook{%
+ /S/GoTo/D(\@qzsolndest)/Next<<\JS{this.resetForm(%
+ ["mcq.\curr@quiz.\thequestionno.\arabic{quizno}"]);}>>
+}
+\def\Ans@c@f@Defaults
+{%
+ \BC{0 0 0}\S{S}\W{1}\F{\FHidden}\textSize{12}
+ \textColor{0 g}\symbolchoice{circle}
+}
+\let\bottomOfAnsfStack\relax
+\providecommand\graylettersColor{gray}
+\def\insertGrayLetters{\ifaebshowgrayletters
+ \rlap{\makebox[\RadioFieldSize]%
+ {\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi}
+\def\Ans@@f
+{%
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \hangindent=\eq@tmplength\hangafter=1
+ \bottomOfAnsfStack\insertGrayLetters
+ \edef\rbf@Opts{\ifaeb@usecircles\else
+ \noexpand\symbolchoice{\qz@chksymb}\fi
+ \noexpand\textColor{\qz@chksymbcol}}%
+ \if\Ans@choice1\eq@recordAnsChoice\fi
+ \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}%
+ {mc.\curr@quiz.\thequestionno}%
+ {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\Ans@r@f@Defaults\Ans@r@f@Actions\every@RadioButton
+ \every@qRadioButton\insert@circlesymbol}}%
+ \let\late@options\@empty
+ \ifnocorrections\else
+ \if\Ans@choice1\relax
+ \edef\Ans@c@f@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty\noexpand\Ff{\FfReadOnly}%
+ \else
+ \ifeq@noquizsolutions
+ \noexpand\Ff{\FfReadOnly}%
+ \else
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}%
+ \fi
+ \fi
+ }%
+ \else
+ \def\Ans@c@f@Choice{\Ff{\FfReadOnly}}%
+ \fi
+ \ifaeb@usecircles\def\late@options{\BC{}}\fi
+ \if\Ans@choice1\relax
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@noquizsolutions\else
+ \edef\late@options{\noexpand\BC{\solution@Color}}%
+ \fi
+ \fi
+ \fi
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\Ans@c@f@Defaults\Ans@c@f@Choice\every@CheckBox
+ \every@qCheckBox\late@options}}%
+ \fi
+ \Ans@proofing{\RadioFieldSize}%
+\eq@hspanner\ignorespaces}
+\def\limitSelectionTo#1{\def\eqlimselTo{#1}}
+\let\eqlimselTo\@empty
+\def\Ans@ck@f{\leavevmode\if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi
+ \if\Ans@choice1\eq@recordAnsChoice\fi
+ \PBS\raggedright\Ans@@ck@f}
+\def\Ans@ck@f@Defaults
+{%
+ \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff}
+ \textSize{12}\textColor{0 g}
+}
+\def\Ans@ck@f@Actions
+{%
+ \A{\JS{%
+ var _bOK=true;\jsR
+\ifx\eqlimselTo\@empty\else _bOK = LimitSelection(\eqlimselTo,%
+"mck.\curr@quiz.\thequestionno","\arabic{quizno}");\jsR\fi
+if (_bOK) {\jsR\jsT
+ var aPMSretn=ProcessMultiSelection(\Ans@choice,"\alph{quizno}",%
+\thequestionno,\arabic{quizno},"\curr@quiz",\eqPTs,\eq@pPTs);\jsR\jsT
+ RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
+ ProcessQuestion(aPMSretn[0],aPMSretn[1],\thequestionno,%
+\arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+"\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+\ifeq@noquizsolutions\else,1\fi\fi\fi);\jsR
+}}}%
+}
+\def\quiz@SolutionActionHook{%
+ /S/GoTo/D(\@qzsolndest)/Next<<\JS{this.resetForm(%
+["mcq.\curr@quiz.\thequestionno.\arabic{quizno}"]);}>>
+}
+\def\Ans@@ck@f
+{%
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \hangindent=\eq@tmplength\hangafter=1
+ \bottomOfAnsfStack\insertGrayLetters
+ \bottomOfAnsfStack\insertGrayLetters
+\def\cbf@Opts{\symbolchoice{\qz@chksymb}%
+ \textColor{\qz@chksymbcol}}%
+ \mbox{\expandafter\check@@Box\expandafter{\cbf@Opts}%
+ {mck.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\Ans@ck@f@Defaults\Ans@ck@f@Actions\every@RadioButton
+ \every@qckCheckbox}}%
+ \ifnocorrections\else
+ \if\Ans@choice1\relax
+ \edef\Ans@c@f@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty\noexpand\Ff{\FfReadOnly}%
+ \else
+ \ifeq@noquizsolutions
+ \noexpand\Ff{\FfReadOnly}%
+ \else
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}%
+ \fi
+ \fi
+ }%
+ \else
+ \def\Ans@c@f@Choice{\Ff{\FfReadOnly}}%
+ \fi
+ \let\late@options\@empty
+ \if\Ans@choice1\relax
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@noquizsolutions\else
+ \edef\late@options{\noexpand\BC{\solution@Color}}%
+ \fi
+ \fi
+ \fi
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@RadioCheck@driver}%
+ {\Ans@c@f@Defaults\Ans@c@f@Choice\every@CheckBox
+ \every@qCheckBox\late@options}}%
+ \fi
+ \Ans@proofing{\RadioFieldSize}%
+\eq@hspanner\ignorespaces}
+\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\@firstoffive\csname r@#1\endcsname}%
+ \xdef\tmp@expand{\uppercase{\tmp@expand}}%
+ \if\isREFstar\eq@One\tmp@expand\else\hyperref[#1]{\tmp@expand}\fi
+}
+\newif\ifaeb@usecircles\aeb@usecirclesfalse
+\let\insert@circlesymbol\@empty
+\def\useMCCircles{\useForms
+ \ifaeb@usecircles\else
+ \global\aeb@usecirclestrue
+ \gdef\insert@circlesymbol{\symbolchoice{circle}}%
+ \fi
+}
+\def\useMCRects{\useForms
+ \ifaeb@usecircles\global\aeb@usecirclesfalse
+ \global\let\insert@circlesymbol\@empty
+ \fi
+}
+\let\useMCCRects\useMCRects
+\let\oqpriorhook\@empty
+\newenvironment{oQuestion}[1]{%
+ \let\@currentQues\@empty
+ \xdef\eq@pageThisQ{\the\c@page}%
+ \global\let\eqQzQuesList\@empty
+ \xdef\oField{#1}\xdef\curr@quiz{#1}\xdef\currQuiz{#1}%
+ \let\@qzsolndest\@empty
+ \stepcounter{questionno}%
+ \let\eqQuizType\isSQZ\gdef\eqPTs{1}\global\let\eqQT\eq@na
+ \let\answers\answers@sq
+ \let\endanswers\endanswers@sq
+ \let\manswers\manswers@sq
+ \let\endmanswers\endmanswers@sq
+ \let\solution\solution@sq
+ \let\endsolution\endsolution@sq
+ \noindent\oqpriorhook\sq@IDTxtField\ifx\aebTitleQuiz\@empty
+ \else\aebtitleQuiz\fi\ignorespaces
+}{%
+ \global\let\aebtitleQuiz\@empty
+ \global\let\aebTitleQuiz\@empty
+ \global\let\eq@tq@star\relax
+}
+\def\oSolution#1{\edef\@qzsolndest{#1}}
+\def\replaceExclPt#1{\def\replaceexclaim{#1}}
+\replaceExclPt{false}
+\def\negPointsAllowed{\def\negpointsallowed{true}}
+\@onlypreamble{\negPointsAllowed}
+\def\negpointsallowed{false}
+\def\negPointsMarkupAllowed{\def\negpointsmarkupallowed{true}}
+\def\negpointsmarkupallowed{false}
+\@onlypreamble{\negPointsMarkupAllowed}
+\def\requireAlertBox{\def\bcheckboxused{false}}
+\def\allowNoAlertBox{\def\bcheckboxused{true}}
+\allowNoAlertBox
+\newcommand\RespBoxNT{\def\rbFlag{0}\@RespBox}
+\newcommand\RespBox{\def\rbFlag{0}\@RespBox}
+\newcommand\RespBoxMath{\def\rbFlag{0}\@RespBox}
+\begin{defineJS}[%
+ \catcode`\%=14\relax\catcode`\@=0\relax]{\AAKqRespBoxMath}
+if(event.willCommit){
+ RecordPointValue(@eqPTs,@thequestionno@ifx@grpquestions1,%
+@thegrpquestionno,@grpPointValue,@grpTotalWeight,%
+"@grpEvalFunction"@fi);
+ RecordProblemType("@eqQT",@thequestionno);
+ _mathVars=@indepVar;
+ var retn = @processJSfunc(@rbArgs,@compareJSfunc);
+ ProcUserResp(retn,event.value,@thequestionno,%
+0@ifx@grpquestions1,@thegrpquestionno@fi);
+}
+if (!isQuizInitialized("@currQuiz")) {
+ @eqObjAlert@space eqAppAlert(InitMsg("@bqlabelISO"),3);
+ event.rc = false;
+}
+\end{defineJS}
+\def\RespBoxMathDefaults
+{%
+ \BC{0 0 0}\S{S}\textColor{0 g}\F{\FPrint}\W{1}
+}
+\def\moreRespBoxMathDefaults
+{%
+ \edef\@moreRespBoxMathDefaults{%
+ \if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions
+ \else\noexpand\Ff{\FfReadOnly}\fi\fi\fi
+ }%
+}
+\let\eqFormatArg\@empty
+\def\@@RespBoxMathActions
+{%
+ \AA{\if\eqQuizType\isQZ
+ \AAKeystroke{\AAKqRespBoxMath\eqAAKeystrokeArg}
+ \AAFormat{\eqFormatArg}
+ \else
+ \AAKeystroke{if(event.willCommit) {\r\t
+ _mathVars=\indepVar;\r\t
+ retn=\processJSfunc(\rbArgs,\compareJSfunc);\r
+\if\@sqTurnOffAlerts1
+ \t OnBlurRespBox(%
+ \if\@sqTurnOffAlerts1retn\else null\fi,"\curr@quiz");
+ \eqAAKeystrokeArg\r
+\fi
+ }%
+ }
+ \AAFormat{\eqFormatArg}%
+ \AAOnFocus{\JS{var retn = null;}}%
+ \AAOnBlur{\JS{OnBlurRespBox(null,"\curr@quiz");}}%
+ \fi
+ }
+}
+\newcommand\@RespBox[1][]
+{%
+ \eq@AddProbToQzQuesList
+ \smallskip\ifx\grpquestions\eq@Zero
+ \addtocounter{eqpointvalue}{\eqPTs}\fi
+ \if\eqQuizType\isQZ
+ \def\rbFlag{1}\global\IsRespBoxtrue
+ \ifx\grpquestions\eq@One
+ \stepcounter{grpquestionno}%
+ \def\Fld@name{%
+ grpobj.\curr@quiz.\thequestionno.\thegrpquestionno}%
+ \else
+ \eq@recordThesePTs\eq@recordProbType
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"math"]}%
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\curr@quiz.\thequestionno}%
+ \fi
+ \else % shortquiz
+ \ifx\grpquestions\eq@One
+ \stepcounter{grpquestionno}%
+ \def\Fld@name{%
+ grpobj.\oField.\thequestionno.\thegrpquestionno}%
+ \else
+ \stepcounter{questionno}%
+ \def\Fld@name{%
+ obj.\oField.\thequestionno}%
+ \fi
+ \fi
+ \let\Array\aeb@array
+ \moreRespBoxMathDefaults
+ \leavevmode\hbox\bgroup\text@@Field{#1}{\Fld@name}%
+ {\RBW}{\DefaultHeightOfWidget}%
+ {\eq@protect\AA}{\eq@setWidgetProps\eq@RespBox}%
+ {\RespBoxMathDefaults\@moreRespBoxMathDefaults
+ \@@RespBoxMathActions\every@eqTextField\every@RespBoxMath}%
+}
+\def\eq@RespBox#1{\gdef\eqCorrectAns{#1}\if\grpquestions\eq@Zero
+ \ifwithinMCFI\gdef\s@veCorrAnsMCFI{"#1"}\else
+\fi\else\eq@recordGrpAnsArray{"#1"}\fi
+ \@ifnextchar({\@eq@RespBox{#1}}{\@eq@RespBox{#1}(x)}}
+\def\@eq@RespBox#1(#2){\@ifnextchar[{\@eq@RespB@x{#1}(#2)}%
+ {\@ifstar{\@eq@RespB@x{#1}(#2)[\curr@quiz.\thequestionno]}%
+ {\@eq@RespB@x{#1}(#2)[]}}}
+\def\eq@ZERO{0}
+\def\defaultRDPrecision#1{\def\eq@defaultRDPrecision{#1}}
+\defaultRDPrecision{1E-14}
+\def\@eq@RespB@x#1(#2)[#3]#4#5#6{\xdef\@qzsolndest{#3}%
+ \def\indepVar{"#2"}\def\eq@precision{#5}%
+ \ifx\eq@precision\eq@ZERO
+ \def\eq@defaultCompare{reldiffCompare}%
+ \def\rbArgstmp{%
+ \rbFlag,"\eqCorrectAns",#4,\eq@defaultRDPrecision}\else
+ \def\eq@defaultCompare{diffCompare}%
+ \def\rbArgstmp{\rbFlag,"\eqCorrectAns",#4,#5}\fi
+ \edef\eq@ixparam{#6}%
+ \expandafter\@checkforInterval\eq@ixparam\\%
+}
+\def\viidna{[]}
+\def\@checkforInterval{%
+ \@ifnextchar[{\@checkforIntervali}{\@checkforIntervalii}}
+\def\@checkforIntervali#1\\{%
+ \def\rbArgs{\rbArgstmp,"#1",\indepVar}%
+ \@ifnextchar[{\@eq@@RespBox[ \expandafter\@gobble}%
+ {\@eq@@RespBox[\eq@defaultCompare]}%
+}
+\def\@checkforIntervalii#1\\#2{%
+ \def\rbArgs{\rbArgstmp,"[#1,#2]",\indepVar}%
+ \@ifnextchar[{\@eq@@RespBox}{\@eq@@RespBox[\eq@defaultCompare]}%
+}
+\def\@eq@@RespBox{\@eq@@@RespBox}
+\def\@eq@@@RespBox[#1]{\@ifstar{\jsRespBox[#1]}%
+ {\jsRespBox[#1]{ProcResp}}}
+\def\eq@ProcRespIntervals{ProcRespIntervals}
+\def\jsRespBox[#1]#2{\def\compareJSfunc{#1}%
+ \def\processJSfunc{#2}\gdef\g@processJSfunc{#2}% 01/11
+ \ifx\eq@ProcRespIntervals\g@processJSfunc
+ \let\@inmathwarn@SAVE\@inmathwarn\let\@inmathwarn\@gobble
+ \pdfstringdef{\eqCorrectAns}{\eqCorrectAns}%
+ \let\@inmathwarn\@inmathwarn@SAVE\fi
+ \eq@recordCorrAns{"\eqCorrectAns"}% 01/11
+ \ifeq@proofing\makebox[0pt][l]{\space\math@correctAnswer}\fi
+ \eq@TextField % send to the driver-dependent macro
+ \egroup
+}
+\def\gobbleMacro#1>{}
+\gdef\math@correctAnswer{%
+ \ttfamily\color{\@proofingsymbolColor}\spaceskip=2pt\xspaceskip=2pt%
+ \expandafter\gobbleMacro\meaning\eqCorrectAns
+}
+\newcommand\RespBoxTxtNT{\def\rbFlag{0}\@RespBoxTxt}
+\newcommand\RespBoxTxt{\def\rbFlag{0}\@RespBoxTxt}
+\def\RespBoxTxtOnBlur{OnBlurRespBox(%
+ \if\@sqTurnOffAlerts1retn\else null\fi,"\curr@quiz");}
+\def\eqObjAlert{%
+ \ifx\eqQuizType\isQZ\ifx\eq@online\eq@YES\ifeq@noquizsolutions
+ \else if (false)\fi\fi\fi}
+\begin{defineJS}[%
+ \catcode`\@=0\relax\catcode`\%=14\relax]{\AAKqRespBoxTxt}
+if(event.willCommit){
+ RecordPointValue(@eqPTs,@thequestionno@ifx@grpquestions1,%
+@thegrpquestionno,@grpPointValue,@grpTotalWeight,%
+"@grpEvalFunction"@fi);
+ RecordProblemType("@eqQT",@thequestionno);
+ var retn = ProcRespTxt(@rbTxtAlt);
+ ProcUserResp(retn,event.value,@thequestionno,%
+0@ifx@grpquestions1,@thegrpquestionno@fi);
+}
+if (!isQuizInitialized("@currQuiz")) {
+ @eqObjAlert@space eqAppAlert(InitMsg("@bqlabelISO"),3);
+ event.rc = false;
+}
+\end{defineJS}
+\def\RespBoxTxtDefaults
+{%
+ \BC{0 0 0}\W{1}\S{S}\textColor{0 g}\F{\FPrint}%
+}
+\def\moreRespBoxTxtDefaults
+{%
+ \edef\@moreRespBoxTxtDefaults{%
+ \if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions\else
+ \noexpand\Ff{\FfReadOnly}\fi\fi\fi
+ }%
+}
+\def\@@RespBoxTxtActions
+{%
+ \AA{\if\eqQuizType\isQZ
+ \AAKeystroke{\AAKqRespBoxTxt}
+ \else
+ \AAKeystroke{%
+ if(event.willCommit) {\r\t
+ retn = ProcRespTxt(\rbTxtAlt);\r
+\if\@sqTurnOffAlerts1
+ \t\RespBoxTxtOnBlur\r
+\fi
+ }%
+ }
+ \AAOnFocus{\JS{var retn = null;}}
+\if\@sqTurnOffAlerts0
+ \AAOnBlur{\JS{\RespBoxTxtOnBlur}}%
+\fi
+ \fi
+ }
+}
+\newcommand\@RespBoxTxt[1][]
+{%
+ \eq@AddProbToQzQuesList
+ \ifx\grpquestions\eq@Zero\addtocounter{eqpointvalue}{\eqPTs}\fi
+ \if\eqQuizType\isQZ
+ \def\rbFlag{1}\global\IsRespBoxtrue
+ \ifx\grpquestions\eq@One
+ \stepcounter{grpquestionno}%
+ \def\Fld@name{%
+ grpobj.\curr@quiz.\thequestionno.\thegrpquestionno}%
+ \else
+ \eq@recordThesePTs\eq@recordProbType
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"text"]}%
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\curr@quiz.\thequestionno}%
+ \fi
+ \else
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\oField.\thequestionno}%
+ \fi
+ \moreRespBoxTxtDefaults
+ \leavevmode\hbox\bgroup\text@@Field{#1}{\Fld@name}%
+ {\RBW}{\DefaultHeightOfWidget}%
+ {\eq@protect\AA}{\eq@setWidgetProps\@@RespBoxTxt}%
+ {\RespBoxTxtDefaults\@moreRespBoxTxtDefaults
+ \@@RespBoxTxtActions\every@eqTextField\every@RespBoxTxt}%
+}
+\def\@@RespBoxTxt#1#2{%
+ \@ifnextchar[{\@@@RespBoxTxt{#1}{#2}}
+ {\@ifstar{\@@@RespBoxTxt{#1}{#2}[\curr@quiz.\thequestionno]}%
+ {\@@@RespBoxTxt{#1}{#2}[]}}}
+\def\eq@ZERO{0}\def\eq@ONE{1}\def\eq@TWO{2}
+\def\@@@RespBoxTxt#1#2[#3]#4{%
+ \xdef\@qzsolndest{#3}%
+ \def\eq@argi{#1}\ifx\eq@argi\eq@ZERO\else
+ \ifx\eq@argi\eq@ONE\else\ifx\eq@argi\eq@TWO\else
+ \def\eq@argi{-1}\fi\fi\fi
+ \def\eq@argii{#2}\ifx\eq@argii\eq@ONE\else\def\eq@argii{0}\fi
+ \begingroup
+ \ifnum\eq@argii=1\relax
+ \def\rexpStr##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\\##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\word##1{\\b##1\\b}\def\any{@any@}\fi
+ \xdef\rbTxtAlt{\rbFlag,\eq@argi,\eq@argii}%
+ \global\let\txtAltList\@empty
+ \count0=#4 \ifnum\count0 > 0 \expandafter\@argRead\else
+ \PackageError{exerquiz}{%
+ The fourth required parameter of \string\RespBoxTxt\MessageBreak
+ is required to be a positive integer. You entered\MessageBreak
+ #4\space instead}{Enter a positive integer.}\fi
+}
+\def\@argRead#1{\xdef\jsTempArgs{\txtAltList}%
+ \ifx\txtAltList\@empty\xdef\txtAltList{"#1"}\else
+ \xdef\txtAltList{\jsTempArgs,"#1"}\fi\@@argRead}
+\def\@@argRead{\advance\count0 by-1\relax
+ \ifnum\count0=0\relax
+ \def\eq@next{\endgroup
+ \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}%
+ \if\grpquestions\eq@Zero
+ \ifwithinMCFI
+ \xdef\s@veCorrAnsMCFI{[\txtAltList]}\else
+ \eq@recordCorrAns{[\txtAltList]}\fi
+ \else
+ \eq@recordGrpAnsArray{[\txtAltList]}%
+ \fi
+ \eq@@RespBoxTxt
+ }%
+ \else
+ \def\eq@next{\@argRead}%
+ \fi\eq@next
+}
+\def\eq@@RespBoxTxt{%
+ \ifeq@proofing\makebox[0pt][l]{\space\txt@correctAnswer}\fi
+ \eq@TextField
+ \egroup
+}
+\def\gobbleTxt#1>#2,#3,#4,{}
+\gdef\txt@correctAnswer{\ttfamily\color{\@proofingsymbolColor}%
+ \spaceskip=2pt\xspaceskip=2pt
+ \expandafter\gobbleTxt\meaning\rbTxtAlt
+}
+\begin{defineJS}[%
+ \catcode`\@=0\relax\catcode`\%=14\relax]{\AAKqRespBoxTxtPC}
+if(event.willCommit){
+ RecordPointValue(@eqPTs,@thequestionno@ifx@grpquestions1,%
+@thegrpquestionno,@grpPointValue,@grpTotalWeight,%
+"@grpEvalFunction"@fi);
+ RecordProblemType("@eqQT",@thequestionno);
+ var retn = ProcRespTxtPC(@rbTxtAlt);
+@ifx@grpquestions1%
+ ProbValue[@thequestionno][3+@thegrpquestionno]%
+=ProcRespTxtPC.txtPCpCr;@else%
+ ProbValue[@thequestionno]=ProcRespTxtPC.txtPCpCr;@fi
+ ProcUserResp(retn,event.value,@thequestionno,0%
+@ifx@grpquestions1,@thegrpquestionno@fi);
+}
+if (!isQuizInitialized("@currQuiz")) {
+ @eqObjAlert@space eqAppAlert(InitMsg("@bqlabelISO"),3);
+ event.rc = false;
+}
+\end{defineJS}
+\def\@@RespBoxTxtPCActions
+{%
+ \AA{\if\eqQuizType\isQZ
+ \AAKeystroke{\AAKqRespBoxTxtPC}
+ \else
+ \AAKeystroke{%
+ if(event.willCommit) {\r\t
+ retn = ProcRespTxtPC(\rbTxtAlt);\r
+\if\@sqTurnOffAlerts1%
+ \t\RespBoxTxtOnBlur\r
+\fi
+ }%
+ }
+ \AAOnFocus{\JS{var retn = null;}}
+\if\@sqTurnOffAlerts0%
+ \AAOnBlur{\JS{\RespBoxTxtOnBlur}}%
+\fi
+ \fi
+ }
+}
+\newcommand{\RespBoxTxtPC}{\def\rbFlag{0}\@RespBoxTxtPC}
+\newcommand\@RespBoxTxtPC[1][]
+{%
+ \eq@AddProbToQzQuesList
+ \smallskip\ifx\grpquestions\eq@Zero
+ \addtocounter{eqpointvalue}{\eqPTs}\fi
+ \if\eqQuizType\isQZ\def\rbFlag{1}\global\IsRespBoxtrue
+ \ifx\grpquestions\eq@One
+ \stepcounter{grpquestionno}%
+ \def\Fld@name{%
+ grpobj.\curr@quiz.\thequestionno.\thegrpquestionno}%
+ \else
+ \eq@recordThesePTs\eq@recordProbType
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"text"]}%
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\curr@quiz.\thequestionno}%
+ \fi
+ \else
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\oField.\thequestionno}%
+ \fi
+ \moreRespBoxTxtDefaults
+ \leavevmode\hbox\bgroup\text@@Field{#1}{\Fld@name}%
+ {\RBW}{\DefaultHeightOfWidget}%
+ {\eq@protect\AA}{\eq@setWidgetProps\@@RespBoxTxtPC}%
+ {\RespBoxTxtDefaults\@moreRespBoxTxtDefaults
+ \@@RespBoxTxtPCActions\every@eqTextField\every@RespBoxTxt}%
+}
+\def\@@RespBoxTxtPC#1{\@ifnextchar[{\@@@RespBoxTxtPC{#1}}
+ {\@ifstar{\@@@RespBoxTxtPC{#1}[\curr@quiz.\thequestionno]}%
+ {\@@@RespBoxTxtPC{#1}[]}}}
+\def\@@@RespBoxTxtPC#1[#2]#3{\xdef\@qzsolndest{#2}%
+ \begingroup
+ \def\rexpStr##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\\##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\word##1{\\b##1\\b}\def\any{@any@}
+ \gdef\rbTxtAlt{\rbFlag,#1,1}% force sub-string match
+ \global\let\txtAltList\@empty
+ \count0=#3 \ifnum\count0>0 \expandafter\@argReadPC\else
+ \PackageError{exerquiz}{%
+ The third required parameter of
+ \string\RespBoxTxtPC\MessageBreak
+ is required to be a positive integer.
+ You entered\MessageBreak #3\space instead}
+ {Enter a positive integer.}\fi
+}
+\newcommand\@argReadPC[2][0]{\xdef\jsTempArgs{\txtAltList}%
+ \ifx\txtAltList\@empty\xdef\txtAltList{["#2",#1]}\else
+ \xdef\txtAltList{\jsTempArgs,["#2",#1]}\fi\@@argReadPC}
+\def\@@argReadPC{\advance\count0 by-1\relax
+ \ifnum\count0=0\relax
+ \def\eq@next{\endgroup
+ \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}%
+ \if\grpquestions\eq@Zero
+ \ifwithinMCFI
+ \xdef\s@veCorrAnsFCFI{[\txtAltList]}\else
+ \eq@recordCorrAns{[\txtAltList]}\fi
+ \else
+ \eq@recordGrpAnsArray{[\txtAltList]}%
+ \fi
+ \eq@@RespBoxTxtPC
+ }%
+ \else
+ \def\eq@next{\@argReadPC}%
+ \fi\eq@next
+}
+\def\eq@@RespBoxTxtPC{%
+ \ifeq@proofing\makebox[0pt][l]{\space\txt@correctAnswer}\fi
+ \eq@TextField
+ \egroup
+}
+\def\RespBoxEssayDefaults
+{%
+ \BC{0 0 0}\W{1}\S{S}\Ff{\FfMultiline}\rawPDF{}%
+}
+\def\@@RespBoxEssayActions
+{%
+ \AA{\if\eqQuizType\isQZ
+ \AAKeystroke{%
+ if(event.willCommit){\jsR\jsT
+ RecordPointValue(\eqPTs,\thequestionno);\jsR\jsT
+ RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
+ }\jsR
+ if (!isQuizInitialized("\curr@quiz")) {\jsR\jsT
+ @eqObjAlert\space eqAppAlert(%
+ InitMsg("\bqlabelISO"),3);\jsR\jsT
+ event.rc = false;\jsR
+ }%
+ }%
+ \fi
+ }
+}
+\newcommand\RespBoxEssay[3][]
+{%
+ \smallskip\addtocounter{eqpointvalue}{\eqPTs}%
+ \stepcounter{questionno}%
+ \mbox{\text@@Field{#1}{essay.\curr@quiz.\thequestionno}{#2}{#3}%
+ \edef\eqtmp{\aPointType}\xdef\aPointType{\eqtmp,[\eqPTs,"essay"]}%
+ {\eq@protect\AA}{\eq@setWidgetProps\@@RespBoxEssayActions
+ \eq@TextField}{\RespBoxEssayDefaults\every@eqTextField}}%
+}
+\let\@@sqTallyBoxActions\@empty
+\@ifundefined{calcOrder}{%
+\ifpdf\def\@@sqTallyBoxActions{%
+ \AA{\AAValidate{getTotalTally("\oField");}}}\fi}{}
+\def\sqTallyBoxDefaults
+{%
+ \BC{0 0 0}\W{1}\textColor{1 0 0 rg}\S{I}\Q{2}\Ff{\FfReadOnly}
+}
+\ifpdf\def\@@sqTallyBoxActions{%
+ \AA{\AAValidate{getTotalTally("\oField");}}}\else
+ \let\@@sqTallyBoxActions\@empty
+\fi
+\newcommand\sqTallyBox[1][]
+{%
+ \mbox{\text@@Field{#1}{tally.\oField.\thequestionno}%
+ {\TBW}{\DefaultHeightOfWidget}%
+ {}{\eq@setWidgetProps\eq@TextField}%
+ {\sqTallyBoxDefaults\@@sqTallyBoxActions\every@eqTextField
+ \every@sqTallyBox}}%
+}
+\def\sqTallyTotalDefaults
+{%
+ \rawPDF{}\W{1}\BC{0 0 0}\S{I}\textColor{1 0 0 rg}%
+ \Q{2}\Ff{\FfReadOnly}%
+}
+\def\@@sqTallyTotalActions
+{%
+ \AA{%
+ \AAKeystroke{AFNumber_Keystroke(0,0,0,0,"",true);}
+ \AAFormat{AFNumber_Format(0,0,0,0,"",true);}
+ \AACalculate{%
+ AFSimple_Calculate("SUM",new Array("tally.\oField"));
+ }}
+}
+\newcommand\sqTallyTotal[1][]
+{%
+ \mbox{\text@@Field{#1}{tallytotal.\oField}{\TBW}%
+ {\DefaultHeightOfWidget}{\eq@protect\AA}%
+ {\eq@setWidgetProps\eq@TextField}%
+ {\sqTallyTotalDefaults\@@sqTallyTotalActions\every@eqTextField
+ \every@sqTallyTotal}}%
+}
+\def\CorrAnsButtonDefaults
+{%
+ \CA{\eq@local@CorrAnsButton}\W{1}\S{S}
+ \BC{0 0 0}\BG{.7529 .7529 .7529}\H{P}
+}
+\def\normalCABtnBC{0 0 0}
+ \def\qCorrAnsButtonActionHook
+ {%
+ \JS{%
+ \ifx\@qzsolndest\@empty\else
+ if (event.shift)\jsR\jsT
+ this.gotoNamedDest("\@qzsolndest");\jsR
+ else\jsR\jsT
+ \fi
+ \processJSfunc("Ans.\curr@quiz","\CorrectAns",\currQuiz);
+ }%
+ }
+ \def\sqCorrAnsButtonActionHook
+ {%
+ \JS{%
+ \ifx\@qzsolndest\@empty\else
+ if (event.shift)\jsR\jsT
+ this.gotoNamedDest("\@qzsolndest");\jsR
+ else\jsR\jsT
+ \fi
+ \processJSfunc("obj.\oField.\thequestionno","\CorrectAns",%
+\currQuiz);
+ }%
+ }
+\newcommand\CorrAnsButton[1][]{\eq@@CorrAnsButton{#1}}
+\def\eq@@CorrAnsButton#1#2{\bgroup\makeJSspecials % 1/12
+ \@ifstar{\eq@@@CorrAnsButton{#1}{#2}}{%
+ \eq@@@CorrAnsButton{#1}{#2}{DisplayAnswer}}%
+}
+\def\eq@@@CorrAnsButton#1#2#3{\gdef\CorrectAns{#2}%
+ \def\processJSfunc{#3}%
+ \ifx\eq@ProcRespIntervals\g@processJSfunc % 01/11
+ \let\@inmathwarn@SAVE\@inmathwarn\let\@inmathwarn\@gobble
+ \pdfstringdef{\CorrectAns}{\CorrectAns}%
+ \let\@inmathwarn\@inmathwarn@SAVE\fi
+ \if\eqQuizType\isQZ\def\Fld@name{corr.\curr@quiz.\thequestionno}%
+ \else\def\Fld@name{corr.\oField.\thequestionno}\fi
+ \if\eqQuizType\isQZ
+ \edef\@@CorrAnsButtonActions{\noexpand\F{\FHidden}%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}%
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\qCorrAnsButtonActionHook}}%
+ \ifeq@noquizsolutions\else
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonDefaults\@@CorrAnsButtonActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
+ \else
+ \edef\@@CorrAnsButtonActions{%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\sqCorrAnsButtonActionHook}}%
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonDefaults\@@CorrAnsButtonActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
+ \egroup
+}
+\def\sqClearButtonDefaults
+{%
+ \CA{\eq@local@sqClearButton}\textColor{0 g}\F{\FPrint}
+ \BC{0 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}\Ff{\FfNoExport}
+}
+\def\@@sqClearButtonActions
+{%
+ \A{\JS{ProcessIt = false;\jsR
+ if ( typeof \oField\space== "undefined" )\jsR\jsT
+ \oField\space= new Object;\jsR
+ if (typeof appAlerts["\oField"] == "undefined")\jsR\jsT
+ appAlerts["\oField"] = new Object;\jsR
+ this.resetForm(new Array("mc.\oField","obj.\oField",%
+ "tally.\oField","grpobj.\oField"));\jsR
+ var f = this.getField("obj.\oField");\jsR
+ if ( f != null ) f.strokeColor=\ifx\defaultColorJSLoc\@empty
+\defaultColorJS\else\defaultColorJSLoc\fi;\jsR
+ f = this.getField("grpobj.\oField");\jsR
+ if ( f != null ) f.strokeColor=\ifx\defaultColorJSLoc\@empty
+\defaultColorJS\else\defaultColorJSLoc\fi;\jsR
+ f = this.getField("rbmarkup.\oField");\jsR
+ if ( f != null ) f.display=display.hidden;\jsR
+ \oField.Grp = {};\jsR
+ appAlerts["\oField"].bAfterValue=false;\jsR
+ ProcessIt=true;}%
+ }
+}
+\newcommand\sqClearButton[1][]
+{%
+ \mbox{\push@@Button{#1}{clear.\oField}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\sqClearButtonDefaults\@@sqClearButtonActions\every@ButtonField
+ \every@sqClearButton}}%
+}
+\def\PromptButtonDefaults
+{%
+ \CA{\eq@local@CorrAnsButton}\W{1}\S{S}\BC{0 0 0}
+ \BG{.7529 .7529 .7529}\H{P}
+}
+\newcommand{\promptButtonMsg}{%
+ "Would you like to see the correct answer at this time? "\r\t\t
+ + "Your current answer will be the one that will be scored. "\r\t\t
+ + "If you click on \\"Yes\\",
+ you will not be able to change your answer."
+}
+\newcommand{\AnsPromptBtnStr}{Answer:\space}
+\def\PromptButtonActionHook
+{%
+ \JS{%
+ if (!isQuizInitialized("\currQuiz")) {\r\t
+ eqAppAlert(InitMsg("\bqlabelISO"),3);\r\t
+ event.rc=false;\r
+ } else {\r\t
+ if ( !\currQuiz.oAlertCheck.bAfterValue ) {\r\t
+ var resp=eqAppAlert({\r\t\t
+ cMsg:\promptButtonMsg,\r\t\t
+ nIcon: 2, nType: 2,\r\t\t
+ cTitle: ("AcroTeX Prompt Message"),\r\t\t
+ oCheckbox: \currQuiz.oAlertCheck\r\t
+ });\r\t
+ }\r
+ if ( promptQuiz.oAlertCheck.bAfterValue || resp==4 )\r\t
+ {\r\t\t
+ var field=this.getField(%
+ "obj.\currQuiz.\thequestionno");\r\t\t
+ field.readonly=true;\r\t\t
+ field=this.getField("Ans.\currQuiz");\r\t\t
+ if (field!=null)
+ field.value = "\AnsPromptBtnStr\PromptAns";\r\t
+ }\r
+ }
+ }%
+}
+\newcommand\@PromptButton[2][]
+{%
+ \def\PromptAns{#2}\if\eqQuizType\isQZ
+ \def\Fld@name{promptButton.\curr@quiz.\thequestionno}%
+ \else\def\Fld@name{promptButton.\oField.\thequestionno}\fi
+ \if\eqQuizType\isQZ
+ \def\@@PromptButtonActions{%
+ \A{\PromptButtonActionHook}}%
+ \mbox{\push@@Button{#1}{\Fld@name}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\PromptButtonDefaults\@@PromptButtonActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \else\PackageWarning{exerquiz}{The \string\PromptButton
+ is for quiz questions only.}
+ \fi
+}
+\newcommand{\PromptButton}{\makebox[0pt][r] % assumes xcolor
+ {\@PromptButton[\textColor{1 0 0 rg}]{\CorrectAns}}}
+\let\eq@ansGrpArray\@empty
+\def\eq@recordGrpAnsArray#1{%
+ \ifx\eq@ansGrpArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\eq@ansGrpArray{#1}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\eq@ansGrpArray{,#1}}\fi
+ \tmp@exp
+}
+\let\grpquestions\eq@Zero
+\def\mathGrp{\global\let\eq@ansGrpArray\@empty
+ \@ifnextchar[{\@imathGrp}{\@imathGrp[groupEval]}}
+\def\@imathGrp[#1]{\def\argi{#1}%
+ \@ifnextchar[{\@iimathGrp}{\@iimathGrp[]}}
+\def\@iimathGrp[#1]{\def\argii{#1}%
+ \eq@AddProbToQzQuesList
+ \global\let\grpquestions\eq@One
+ \setcounter{grpquestionno}{0}%
+ \stepcounter{questionno}%
+ \xdef\beginGrp{\thequestionno}%
+ \xdef\grpPointValue{\eqPTs}%
+ \eq@recordThesePTs\eq@recordProbType
+ \if\eqQuizType\isQZ
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"grp"]}\fi
+ \addtocounter{eqpointvalue}{\eqPTs}%
+ \ifx\argii\@empty
+ \xdef\grpTotalWeight{\eqPTs}%
+ \xdef\grpEvalFunction{\argi}%
+ \else
+ \xdef\grpTotalWeight{\argi}%
+ \xdef\grpEvalFunction{\argii}%
+ \fi
+}
+\def\endmathGrp{\global\let\grpquestions\eq@Zero
+ \eq@recordCorrAns{[\eq@ansGrpArray]}%
+ \xdef\endGrp{\thequestionno}}
+\def\CorrAnsButtonGrpDefaults
+{%
+ \CA{\eq@local@CorrAnsButton}\W{1}\S{S}\BC{0 0 0}
+ \BG{.7529 .7529 .7529}\H{P}
+}
+\def\CorrAnsButtonGrpActionHook{\JS{%
+\ifx\@qzsolndest\@empty\else
+ if (event.shift)\jsR\jsT
+ this.gotoNamedDest("\@qzsolndest");\jsR
+ else\jsR
+\fi
+ {\jsR\jsT
+ var aCorrectAns=\CorrectAns;\jsR\jsT
+ var beginGrp = 1;\jsR\jsT
+ grpOffset = beginGrp;\jsR\jsT
+ if ( \currQuiz.Grp==null ) \currQuiz.Grp = {};\jsR\jsT
+ if (typeof \currQuiz.Grp["\thequestionno"]=="undefined")\jsR\jsT
+ {\jsR\jsT\jsT
+ \currQuiz.Grp["\thequestionno"] = {offset: 0};\jsR\jsT\jsT
+ var f = this.getField(%
+ "grpobj.\curr@quiz.\thequestionno."
+ + grpOffset)\jsR\jsT\jsT
+ if ( f.readonly ) {\jsR\jsT\jsT
+ f.readonly = false;\jsR\jsT\jsT
+ f.setFocus();\jsR\jsT\jsT
+ eqDelay = app.setTimeOut(%
+ "f.readonly = true;
+ app.clearTimeOut(eqDelay);",10);\jsR\jsT
+ } else f.setFocus();\jsR\jsT
+ }\jsR\jsT
+ else \jsR\jsT
+ {\jsR\jsT\jsT
+ \currQuiz.Grp["\thequestionno"].offset =
+ ++\currQuiz.Grp["\thequestionno"].offset
+ \% aCorrectAns.length;\jsR\jsT\jsT
+ grpOffset = beginGrp
+ + \currQuiz.Grp["\thequestionno"].offset;\jsR\jsT\jsT
+ var f = this.getField("grpobj.\curr@quiz.\thequestionno."
+ + grpOffset);\jsR\jsT\jsT
+ if ( f.readonly ) {\jsR\jsT\jsT
+ f.readonly = false;\jsR\jsT\jsT
+ f.setFocus();\jsR\jsT\jsT
+ eqDelay = app.setTimeOut("f.readonly = true;
+ app.clearTimeOut(eqDelay);",10);\jsR\jsT
+ } else f.setFocus();\jsR\jsT
+ }\jsR\jsT
+\if\eqQuizType\isQZ
+ DisplayAnswer("Ans.\curr@quiz",
+ aCorrectAns[\currQuiz.Grp["\thequestionno"].offset],%
+\currQuiz);
+\else
+ DisplayAnswer("grpobj.\oField.\thequestionno."+ grpOffset,
+ aCorrectAns[\currQuiz.Grp["\thequestionno"].offset],%
+\oField);\jsR
+\fi
+ }
+}}
+\newcommand\CorrAnsButtonGrp[2][]
+{%
+ \makeStringArray{#2}%
+ \edef\CorrectAns{\stringArray}%
+ \if\eqQuizType\isQZ\def\Fld@name{corr.\curr@quiz.\thequestionno}%
+ \else\edef\currQuiz{\oField}%
+ \def\Fld@name{corr.\oField.\thequestionno}\fi
+ \if\eqQuizType\isQZ
+ \edef\@@CorrAnsButtonGrpActions{\noexpand\F{\FHidden}%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\CorrAnsButtonGrpActionHook}}%
+ \ifeq@noquizsolutions\else
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonGrpDefaults\@@CorrAnsButtonGrpActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
+ \else
+ \edef\@@CorrAnsButtonGrpActions{%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\CorrAnsButtonGrpActionHook}}%
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonGrpDefaults\@@CorrAnsButtonGrpActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
+}
+\def\makeStringArray#1{\def\stringArray{[}\@makeStringArray#1,\@nil}
+\def\@makeStringArray#1,#2\@nil{%
+ \edef\eq@temp{\stringArray}\def\argii{#2}%
+ \ifx\argii\@empty
+ \edef\stringArray{\eq@temp"#1"]}%
+ \def\eq@next{}%
+ \else
+ \edef\stringArray{\eq@temp"#1",}%
+ \def\eq@next{\@makeStringArray#2\@nil}%
+ \fi
+ \eq@next
+}
+\let\@eqListExp\relax
+\let\@currentQues\@empty
+\let\eqQzQuesList\@empty
+\def\eq@AddProbToQzQuesList{%
+ \edef\eq@tmpExp{\noexpand\g@addto@macro%
+ \noexpand\eqQzQuesList{%
+ \noexpand\@eqListExp{\@currentQues}{\thepage}}}%
+ \ifx\grpquestions\eq@Zero\eq@tmpExp\fi
+}
+\LangRedefinitions
+\input{aebjs.def}
+\inputSumryTblCode
+\inputMCFICode
+\newcommand{\solutionColor}[1]{\def\eq@argi{#1}\ifx\eq@argi\@empty
+ \def\solution@Color{\solutionColorDef}\else
+ \def\solution@Color{#1}\fi}
+\newcommand{\solutionColorDef}{0 .6 0}
+\solutionColor{\solutionColorDef}
+\@ifundefined{jsColor}{%
+ \InputIfFileExists{eqcolor.def}{\PackageInfo{exerquiz}
+ {Inputting eqcolor.def}}
+ {\PackageError{exerquiz}{cannot find eqcolor.def}
+ {Refresh your file name database and try again.}}
+}{}
+\newcommand\rghtColorJSDef{["RGB", 0, .6, 0]}
+\newcommand\rghtColorJS{\rghtColorJSDef}
+\newcommand\wrngColorJSDef{color.red}
+\newcommand\wrngColorJS{\wrngColorJSDef}
+\newcommand\partialColorJSDef{color.blue}
+\newcommand\partialColorJS{\partialColorJSDef}
+\newcommand\defaultColorJSDef{color.black}
+\newcommand\defaultColorJS{\defaultColorJSDef}
+\let\defaultColorJSLoc\@empty
+\let\defaultColorJSLocDef\@empty
+\let\rghtColorJSLoc\@empty
+\let\rghtColorJSLocDef\@empty
+\let\wrngColorJSLoc\@empty
+\let\wrngColorJSLocDef\@empty
+\let\partialColorJSLoc\@empty
+\let\partialColorJSLocDef\@empty
+\def\chooseJSsymbol{\@ifstar{\let\eq@isstar\eq@YES\chooseJSsymboli}
+ {\let\eq@isstar\eq@NO\chooseJSsymboli}}
+\def\chooseJSsymboli#1{\lowercase{\edef\eq@arg{#1}}%
+ \def\eq@carg{check}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.ch}\else
+ \def\eq@carg{cross}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.cr}\else
+ \def\eq@carg{diamond}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.di}\else
+ \def\eq@carg{circle}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.ci}\else
+ \def\eq@carg{star}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.st}\else
+ \def\eq@carg{square}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.sq}\else
+ \let\eq@retnStyle\@empty
+ \ifx\eq@isstar\eq@NO\PackageWarning{exerquiz}
+ {Argument `#1' not recognized.\MessageBreak
+ Permissible values are check, cross, diamond,\MessageBreak
+ circle, star, square. Will use the default}\fi
+ \fi\fi\fi\fi\fi\fi
+}
+\newcommand\setRghtAnsSymb[1]{\chooseJSsymbol{#1}%
+ \ifx\eq@retnStyle\@empty\else
+ \edef\rghtAnsSymbJS{\eq@retnStyle}%
+ \edef\rghtAnsSymb{\eq@carg}\fi}
+\def\rghtAnsSymbJS{style.ch}
+\def\rghtAnsSymb{check}
+\newcommand\setCorrAnsSymb[1]{\chooseJSsymbol{#1}%
+ \ifx\eq@retnStyle\@empty\else
+ \edef\corrAnsSymbJS{\eq@retnStyle}%
+ \edef\corrAnsSymb{\eq@carg}\fi}
+\def\corrAnsSymbJS{style.ci}
+\def\corrAnsSymb{circle}
+\newcommand\setWrngAnsSymb[1]{\chooseJSsymbol{#1}%
+ \ifx\eq@retnStyle\@empty\else
+ \edef\wrngAnsSymbJS{\eq@retnStyle}%
+ \edef\wrngAnsSymb{\eq@carg}\fi}
+\def\wrngAnsSymbJS{style.cr}
+\def\wrngAnsSymb{cross}
+\def\setRghtAnsSymbLoc#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \let\rghtAnsSymbJSLoc\@empty\else
+ \edef\rghtAnsSymbJSLoc{\eq@retnStyle}\fi
+}
+\def\setCorrAnsSymbLoc#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \let\corrAnsSymbJSLoc\@empty\else
+ \edef\corrAnsSymbJSLoc{\eq@retnStyle}\fi
+}
+\def\setWrngAnsSymbLoc#1{\chooseJSsymbol*{#1}%
+ \ifx\eq@retnStyle\@empty
+ \let\wrngAnsSymbJSLoc\@empty\else
+ \edef\wrngAnsSymbJSLoc{\eq@retnStyle}\fi
+}
+\let\rghtAnsSymbJSLoc\@empty
+\let\rghtAnsSymbJSLocDef\@empty
+\let\corrAnsSymbJSLoc\@empty
+\let\corrAnsSymbJSLocDef\@empty
+\let\wrngAnsSymbJSLoc\@empty
+\let\wrngAnsSymbJSLocDef\@empty
+\newcommand\everyeqTextField[1]{\def\every@eqTextField{#1}}
+\def\every@eqTextField{}
+\newcommand\everyRespBoxMath[1]{\def\every@RespBoxMath{#1}}
+\def\every@RespBoxMath{}
+\newcommand\everyRespBoxTxt[1]{\def\every@RespBoxTxt{#1}}
+\def\every@RespBoxTxt{}
+\newcommand\everyrbMarkup[1]{\def\every@rbMarkup{#1}}
+\def\every@rbMarkup{}
+\newcommand\everysqTallyBox[1]{\def\every@sqTallyBox{#1}}
+\def\every@sqTallyBox{}
+\newcommand\everysqTallyTotal[1]{\def\every@sqTallyTotal{#1}}
+\def\every@sqTallyTotal{}
+\newcommand\everyScoreField[1]{\def\every@ScoreField{#1}}
+\def\every@ScoreField{}
+\newcommand\everyAnswerField[1]{\def\every@AnswerField{#1}}
+\def\every@AnswerField{}
+\newcommand\everyPointsField[1]{\def\every@PointsField{#1}}
+\def\every@PointsField{}
+\newcommand\everyPercentField[1]{\def\every@PercentField{#1}}
+\def\every@PercentField{}
+\newcommand\everyGradeField[1]{\def\every@GradeField{#1}}
+\def\every@GradeField{}
+\def\@eqAddAAFormat#1{\def\eqFormatArg{#1}}
+\def\eq@AddAAFormat{}
+\def\formatAsSet{try{formatAsSet()}catch(e){}}
+\def\formatAsVector{try{formatAsVector()}catch(e){}}
+\def\@eqAddAAKeystroke#1{\def\argi{#1}\ifx\argi\@empty
+ \def\eqAAKeystrokeArg{}\else\def\eqAAKeystrokeArg{\r #1}\fi}
+\def\eqAAKeystrokeArg{}
+\newcommand{\everysqRadioButton}[1]{\def\every@sqRadioButton{#1}}
+\def\every@sqRadioButton{}
+\newcommand{\everyqRadioButton}[1]{\def\every@qRadioButton{#1}}
+\def\every@qRadioButton{}
+\newcommand{\everyqckCheckBox}[1]{\def\every@qckCheckbox{#1}}
+\def\every@qckCheckbox{}
+\newcommand{\everyqCheckBox}[1]{\def\every@qCheckBox{#1}}
+\def\every@qCheckBox{}
+\newcommand{\everysqCheckBox}[1]{\def\every@sqCheckBox{#1}}
+\def\every@sqCheckBox{}
+\let\everyeqButtonField\everyButtonField
+\newcommand\everyCorrAnsButton[1]{\def\every@CorrAnsButton{#1}}
+\def\every@CorrAnsButton{}
+\newcommand\everysqClearButton[1]{\def\every@sqClearButton{#1}}
+\def\every@sqClearButton{}
+\newcommand\everyeqButton[1]{\def\every@eqButton{#1}}
+\newcommand\everyCorrButton{\everyeqButton}
+\def\every@eqButton{}
+\newcommand\everyBeginQuizButton[1]{\def\every@BeginQuizButton{#1}}
+\def\every@BeginQuizButton{}
+\newcommand\everyEndQuizButton[1]{\def\every@EndQuizButton{#1}}
+\def\every@EndQuizButton{}
+\let\everyeqGenButton\everyPushButton
+\let\every@eqGenButton\every@PushButton
+\newcommand\everyeqIcon[1]{\def\every@eqIcon{#1}}
+\def\every@eqIcon{}
+\let\eqGenButton\pushButton
+\def\eqIconDefaults
+{%
+ \rawPDF{}\S{}\mkIns{/TP 1}\W{}
+ \CA{}\RC{}\AC{}\BC{}\BG{}\H{N}
+ \textColor{0 g}\Ff{\FfReadOnly}
+}
+\newcommand\eqIcon[4][]
+{%
+ \mbox{\push@@Button{#1}{#2}{#3}{#4}{}{\eq@setButtonProps
+ \eq@Button@driver}{\eqIconDefaults\every@ButtonField
+ \every@eqIcon}}%
+}
+\endinput
+%%
+%% End of file `exerquiz.sty'.
diff --git a/texmf-dist/tex/latex/acrotex/insdljs.sty b/texmf-dist/tex/latex/acrotex/insdljs.sty
new file mode 100644
index 00000000..37b18777
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/insdljs.sty
@@ -0,0 +1,906 @@
+%%
+%% This is file `insdljs.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% insdljs.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% insdljs.sty package, %%
+%% Copyright (C) 2001-2017 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{insdljs}
+ [2017/03/02 v2.3f Insert Document Level JavaScripts (dps)]
+\usepackage{xkeyval}
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+\DeclareOptionX{dvipsone}{\def\dljs@drivernum{0}%
+ \AtBeginDocument{\dvips@marker}}
+\DeclareOptionX{dvips}{\def\dljs@drivernum{0}%
+ \AtBeginDocument{\dvips@marker}}
+\DeclareOptionX{textures}{\def\dljs@drivernum{0}%
+ \AtBeginDocument{\dvips@marker}}
+\DeclareOptionX{pdftex}{\def\dljs@drivernum{1}}
+\DeclareOptionX{dvipdfm}{\def\dljs@drivernum{2}}
+\DeclareOptionX{dvipdfmx}{\def\dljs@drivernum{2}}
+\DeclareOptionX{xetex}{\def\dljs@drivernum{2}}
+\let\dl@YES=y \let\dl@NO=n
+\let\dl@One=1 \let\dl@Zero=0
+\let\dljs@YES=y \let\dljs@NO=n
+\def\dvips@marker{\ifx\dljspresent\dl@NO\@OAction\fi}
+\let\isOpenAction\dl@NO
+\DeclareOptionX{nodljs}{\let\importdljs\dl@NO}
+\let\importdljs\dl@YES
+\let\firstdljs\dl@YES
+\let\dljspresent\dl@NO
+\DeclareOptionX{debug}{\let\dljs@debug\dl@YES}
+\let\dljs@debug\dl@NO
+\DeclareOptionX{execJS}{\let\execjs\dl@YES}
+\let\execjs\dl@NO
+\DeclareOptionX{nopro}{\let\dl@gopro\dl@NO}
+\let\dl@gopro\dl@YES
+\@ifpackageloaded{web}{%
+ \ExecuteOptionsX{\eq@driver@name}%
+}{%
+ \@ifpackageloaded{eforms}{%
+ \ExecuteOptionsX{\ef@driver}%
+ }{%
+ \ifpdf\ExecuteOptionsX{pdftex}\else
+ \ifxetex\ExecuteOptionsX{xetex}\else
+ \@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
+ {\ExecuteOptionsX{dvipsone}}\fi\fi
+ }%
+}
+\DeclareOptionX{reqjs}{\let\dl@reqJS\dl@YES}
+\let\dljs@reqJS\dl@YES
+\DeclareOptionX{!reqjs}{\let\dl@reqJS\dl@NO}
+\DeclareOptionX{usealtadobe}{\def\inputAltAdbFncs{%
+ \InputIfFileExists{altadbfncs.def}%
+ {\PackageInfo{insdljs}{Inputting code for usealtadobe option}}%
+ {\PackageWarning{insdljs}{Cannot find altadbfncs.def.\MessageBreak
+ Reinstall or refresh your file name database.}}}}
+\let\inputAltAdbFncs\relax
+\ProcessOptionsX
+\edef\dl@dquoteCat{\the\catcode`\"}
+\catcode`\"=12\relax
+\@ifundefined{dljs@drivernum}{%
+ \PackageError{insdljs}%
+ {You have not specified dvips, dvipsone, pdftex,\MessageBreak
+ dvipdfm, dvipdfmx, or xetex in the option list
+ \MessageBreak of the insdljs package}
+ {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm,
+ dvipdfmx, or xetex
+ \MessageBreak in the option list of the insdljs package.}
+}{}
+\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
+\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
+\RequirePackage{hyperref}
+\ifpdf\ifx\pdfextension\@undefined\else
+ \protected\def\pdfnames{\pdfextension names }
+ \def\pdfpageref{\pdffeedback pageref}\fi\fi
+\RequirePackage{verbatim}
+\usepackage{conv-xkv}[2017/01/03]
+\@ifundefined{dljs@drivernum}{%
+ \@ifundefined{eq@drivernum}{%
+ \PackageWarning{insdljs}
+ {No driver specified, will check for pdftex.}
+ \@ifundefined{pdfoutput}{%
+ \@ifundefined{@pdfm@mark}{\def\eq@drivernum{2}%
+ \def\dljs@drivernum{1}\let\isOpenAction\dl@NO
+ \PackageWarning{insdljs}{No pdftex, but detected dvipdfm}}%
+ {\PackageWarning{insdljs}{Neither pdftex nor dvipdfm,
+ assuming dvips/dvipsone.}%
+ \def\eq@drivernum{0}\def\dljs@drivernum{0}%
+ \let\isOpenAction\dl@YES}
+ }{%
+ \ifcase\pdfoutput
+ \def\eq@drivernum{1}\def\dljs@drivernum{1}%
+ \let\isOpenAction\dl@NO
+ \PackageInfo{insdljs}{Pdftex detected.}%
+ \else
+ \def\eq@drivernum{0}\def\dljs@drivernum{0}%
+ \let\isOpenAction\dl@YES
+ \PackageWarning{insdljs}{Pdftex engine detected,
+ but is outputting dvi. Assuming dvips as the driver.}%
+ \fi
+ }%
+ }{%
+ \begingroup
+ \count0=\eq@drivernum
+ \xdef\dljs@drivernum{\ifcase\count0 0\or1\or2\or0\else0\fi}
+ \ifnum\dljs@drivernum=0\global\let\isOpenAction\dl@YES
+ \else\global\let\isOpenAction\dl@NO\fi
+ \endgroup
+ }%
+}{}
+\ifnum\dljs@drivernum=1\relax
+ \RequirePackage{everyshi}
+\fi
+\def\AEB@psMrk{[\space}
+\ifx\dl@reqJS\dl@YES
+ \def\dl@@reqJS{/Type/Requirement/S/EnableJavaScripts}
+ \ifpdf\pdfcatalog{\dl@@reqJS}\else
+ \ifxetex\immediate\@pdfm@mark{put @catalog <<\dl@@reqJS>>}\else
+ \literalps@out{\AEB@psMrk{Catalog} <<\dl@@reqJS>> /PUT pdfmark}\fi\fi
+\fi
+\providecommand\JS[1]{/S/JavaScript/JS(#1)}
+\providecommand\Named[1]{/S/Named/N/#1}
+\providecommand{\GoTo}{/S/GoTo/D}
+\providecommand{\GoToD}{/S/GoTo/D}
+\providecommand{\GoToR}{/S/GoToR}
+\def\previewMiKTeX{\def\jsR{\string\r}\def\jsT{\string\t}}
+{\obeylines %
+\gdef\js@@R{\noexpand
+}}
+\let\dljstfor\@tfor
+\def\jsR{\string\r\string\n}
+\def\defineJSjsR{\string\r\eqbs^^J}
+\def\jsN{\string\n}
+{\catcode`\^^I\active %
+\gdef^^I{\noexpand^^I}%
+\gdef\js@@T{\noexpand^^I}%
+}% end of \catcode`\^^I
+\let\jsT=\js@@T
+\newwrite\js@verbatim@out
+\def\iwvo#1{\immediate\write\js@verbatim@out{#1}}
+\def\dl@lparen{(}\def\dl@rparen{)}
+\def\jscsDflt{\let\protect\noexpand\let\jslit\string
+ \let\~\dl@tilda\let\^\dl@sup
+ \def\\{\eqbs\eqbs}\def\cs##1{\\\\##1}%
+ \def\r{\\r}\def\t{\\t}\def\n{\\n}%
+ \let\{\dl@lBrace\let\}\dl@rBrace
+ \ifx\jsstr@useUni\dl@One\def\Uni{\\u}\else\def\u{\\u}\fi
+ \ifx\jsstr@parens\dl@One\let\l@paren\dl@lparen
+ \let\r@paren\dl@rparen\else
+ \let\l@paren\@empty\let\r@paren\@empty\fi
+}
+\def\jscsDLJS{\let\protect\noexpand\let\jslit\string
+ \let\~\dl@tilda\let\^\dl@sup
+ \ifxetex\def\\{\eqbs\eqbs}\else\def\\{\eqbs}\fi\def\cs##1{\\\\##1}%
+ \def\r{\\r}\def\t{\\t}\def\n{\\n}%
+ \let\{\dl@lBrace\let\}\dl@rBrace
+ \ifx\jsstr@useUni\dl@One\def\Uni{\\u}\else\def\u{\\u}\fi
+ \ifx\jsstr@parens\dl@One\let\l@paren\dl@lparen
+ \let\r@paren\dl@rparen\else
+ \let\l@paren\@empty\let\r@paren\@empty\fi
+}
+\ifpdf\let\jscsDLJS\jscsDflt\fi
+\let\dl@JSCS\jscsDflt
+\newcommand{\flJSStr}{\bgroup
+ \let\dl@JSCS\jscsDflt
+ \@ifstar{\def\isStar{*}\dl@defJSStr}
+ {\let\isStar\relax\dl@defJSStr}}
+\let\fieldJSStr\flJSStr
+\let\defineJSStr\flJSStr
+\newcommand{\dlJSStr}{\bgroup
+ \@ifstar{\def\isStar{*}\let\dl@JSCS\jscsDLJS\dl@defJSStr}
+ {\let\isStar\relax\let\dl@JSCS\jscsDLJS\dl@defJSStr}}
+\define@key{jsstr}{quotes}[]{\let\jsstr@quotes\dl@One}
+\define@key{jsstr}{noquotes}[]{\let\jsstr@quotes\dl@Zero}
+\define@key{jsstr}{parens}[]{\let\jsstr@parens\dl@One}
+\define@key{jsstr}{noparens}[]{\let\jsstr@parens\dl@Zero}
+\let\jsstr@quotes\dl@One\let\jsstr@parens\dl@One
+\define@key{jsstr}{useUni}[]{\let\jsstr@useUni\dl@One}
+\let\jsstr@useUni\dl@Zero
+\newcommand{\dl@defJSStr}[3][quotes]{\def\dl@argi{#1}\ifx\dl@argi\@empty
+ \else\ifx\dl@JSCS\jscsDLJS\let\jsstr@parens\dl@Zero\fi
+ \setkeys{jsstr}{#1}\fi\dl@JSCS
+ \ifx\jsstr@quotes\dl@One
+ \xdef#2{\l@paren"#3"\r@paren}\else
+ \xdef#2{\l@paren#3\r@paren}\fi
+ \if\isStar*\gdef\dl@afterAction{{\Hy@unicodefalse\expandafter
+ \pdfstringdef\expandafter#2\expandafter{#2}}}\else
+ \global\let\dl@afterAction\relax\fi
+ \aftergroup\dl@afterAction\egroup}
+\def\dlTC#1{try{#1}catch(e){}}
+\def\js@R{\ifcase\dljs@drivernum^^J\else\jsR\fi}
+\def\db#1\db{\ifx\dljs@debug\dl@YES\space\space\space#1\js@R\fi}
+\newcounter{dljs@cnt}
+\newcounter{dljssegs}\setcounter{dljssegs}{2}
+\newenvironment{js@verbatimwrite}% writes to current \js@verbatim@out
+ {%
+ \@bsphack
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ \def\verbatim@processline{%
+ \immediate\write\js@verbatim@out{\the\verbatim@line}}%
+ \verbatim@start}{\@esphack}
+\def\closejs@verbatim@out{\immediate\closeout\js@verbatim@out}
+\begingroup
+\catcode`\@=0 @catcode`@\=12
+@gdef@eqbs{\}
+@gdef@ccpdfmark{@gdef@eqesc{\}@gdef@eqesci{}}
+@endgroup
+\begingroup
+ \catcode`<=1 \catcode`\>=2 \@makeother\{ \@makeother\}
+\gdef\definebraces<\def\{<\eqesc{>\def\}<\eqesc}>>
+\endgroup
+\def\eqdospecials{\do\ \do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\_\do\~}
+\begingroup
+\catcode`\~=\active \lccode`\~=`\^^M
+\lowercase{\endgroup
+ \def\eqverbatim@#1~{\verbatim@@#1*end\@nil}%
+ \def\eqverbatim@@#1*end{%
+ \verbatim@addtoline{#1}%
+ \futurelet\dl@next\eqverbatim@@@}%
+ \def\eqverbatim@@@#1\@nil{%
+ \ifx\dl@next\@nil
+ \verbatim@processline
+ \verbatim@startline
+ \let\dl@next\eqverbatim@
+ \else
+ \def\@tempa##1*end\@nil{##1}%
+ \@temptokena{*end}%
+ \def\dl@next{\expandafter\verbatim@test\@tempa#1\@nil~}%
+ \fi\dl@next}%
+}%
+\def\jsexpverbatimwrite
+{% writes to current \js@verbatim@out
+ \@bsphack
+ \ccpdfmark
+ \catcode`\<=12 \catcode`\>=12
+ \input{dljscc.def}%
+ \let\verbatim@=\eqverbatim@
+ \let\verbatim@@=\eqverbatim@@
+ \let\verbatim@@@=\eqverbatim@@@
+ \let\do\@makeother\eqdospecials%
+ \catcode`\^^M=\active\catcode`\^^I=12%
+ \def\verbatim@processline{%
+ \edef\expVerb{\the\verbatim@line}%
+ \immediate\write\js@verbatim@out{\expVerb}}%
+ \verbatim@start%
+}
+\def\endjsexpverbatimwrite{\immediate\closeout\js@verbatim@out\@esphack}
+\let\js@Path\@empty
+\def\insPath#1{\def\js@Path{#1}}
+\begingroup
+\catcode`\{=12 \catcode`\}=12 \catcode`\<=1 \catcode`\>=2
+\gdef\dl@lBrace<\string\{> \gdef\dl@rBrace<\string\}>
+\gdef\dl@tilda<\string~> \gdef\dl@sup<\string^>
+\endgroup
+\def\makeJSspecials{%
+ \def\\{\eqbs\eqbs}% % define \\ to be \\
+ \let\jslit\string
+ \let\{\dl@lBrace\let\}\dl@rBrace
+ \let\u\@empty
+ \def\({\eqbs(}\def\){\eqbs)}%
+ \makespecialJS % make \r=\jsR and \t=\jsT
+}
+\def\dl@fitpage{/Fit}
+\def\dl@actualsize{/XYZ null null 1.0} %{/XYZ -32768 -32768 1.0}
+\def\dl@fitwidth{/FitH null} %{/FitH -32768}
+\def\dl@fitheight{/FitV null} %{/FitV -32768}
+\def\dl@fitvisible{/FitBH null} %{/FitBH -32768}
+\def\dl@inheritzoom{/XYZ 0 0 0}
+\def\dl@mag#1{/XYZ null null #1}
+\edef\dl@Page#1{\ifcase\dljs@drivernum
+ {Page#1}\or\noexpand\pdfpageref#1\space\space 0 R\or
+ @page#1\fi}
+\def\dl@preProcDefns{\let\Page\dl@Page\let\mag\dl@mag
+ \let\fitpage\dl@fitpage\let\actualsize\dl@actualsize
+ \let\fitwidth\dl@fitwidth\let\fitheight\dl@fitheight
+ \let\fitvisible\dl@fitvisible\let\inheritzoom\dl@inheritzoom
+}
+\let\aeb@additionalOpenAction\@empty
+\let\aeb@addActionCode\@empty
+\let\addActionObj\@empty
+\let\aebpopentoks\@empty
+\let\aebpFA\dl@NO
+\def\aebp@rightDelimiters{}
+\newcommand{\addToDocOpen}[1]{%
+ \ifx\aebpFA\dl@NO
+ \g@addto@macro\aebpopentoks{#1}%
+ \def\aeb@additionalOpenAction{/Next {pubAddToDocOpen}}%
+\ifpdf
+ \def\aeb@addActionCode{\immediate\pdfobj{<<
+ \aebpopentoks\aebp@rightDelimiters >>}%
+ \edef\addActionObj{\the\pdflastobj\space 0 R}}%
+\else\ifxetex
+ \def\aeb@addActionCode{\immediate
+ \@pdfm@mark{obj @objAddActionObj
+ << \aebpopentoks\aebp@rightDelimiters >> }}%
+ \def\addActionObj{@objAddActionObj}%
+\else % postscript
+ \def\aeb@addActionCode{\literalps@out{%
+ \AEB@psMrk/_objdef {pubAddToDocOpen}
+ /type/dict /OBJ pdfmark^^J%
+ \AEB@psMrk{pubAddToDocOpen} <<
+ \aebpopentoks\aebp@rightDelimiters >> /PUT pdfmark}}%
+ \def\addActionObj{{pubAddToDocOpen}}%
+\fi\fi
+ \global\let\aebpFA\dl@YES
+ \let\@pdfstartview\@empty
+ \else
+ \edef\aebp@dljstmp{\aebp@rightDelimiters}%
+ \xdef\aebp@rightDelimiters{\aebp@dljstmp >> }%
+ \g@addto@macro\aebpopentoks{/Next << #1 }%
+ \fi
+}
+\def\dljs@OpenActions{/OpenAction \addActionObj}
+\def\dljs@setOpenActions{\bgroup\makeJSspecials\dl@preProcDefns
+ \aeb@addActionCode
+ \ifpdf\pdfcatalog{\dljs@OpenActions}\else
+ \ifxetex\immediate
+ \@pdfm@mark{put @catalog <<\dljs@OpenActions>>}\else
+ \literalps@out{\AEB@psMrk
+ {Catalog} <<\dljs@OpenActions>> /PUT pdfmark}\fi\fi\egroup}
+\@ifpackageloaded{aeb_pro}{}
+ {\AtBeginDocument{\ifx\aebpFA\dl@YES\expandafter
+ \dljs@setOpenActions\fi}}
+\let\@CloseAction\@empty
+\def\@OAction@pdfmark{\literalps@out{%
+ \AEB@psMrk{ThisPage} << /AA << /O << \theFirstAction\space
+ \opentoks\@rightDelimiters >> \@CloseAction >> >> /PUT pdfmark}}
+\def\@POAction@pdfmark{\literalps@out{%
+ \AEB@psMrk{ThisPage} << /AA << \@thisOpenAction
+ \@thisCloseAction >> >> /PUT pdfmark}%
+}
+\def\@OAction@pdftex{%
+ \ifx\isOpenAction\dl@YES
+ \xdef\pdftexOAction{/AA << /O << \theFirstAction\space
+ \opentoks\@rightDelimiters >> \@CloseAction >>}%
+ \AtNextShipout{\pdfpageattr=\expandafter{\pdftexOAction}}%
+ \fi
+}
+\def\@POAction@pdftex{%
+ \xdef\thisPageActionpdftex{/AA << \@thisOpenAction
+ \@thisCloseAction >>}%
+ \AtNextShipout{\pdfpageattr=\expandafter{\thisPageActionpdftex}}%
+}
+\def\@OAction@dvipdfm{\ifx\isOpenAction\dl@YES
+ \@pdfm@mark{put @thispage << /AA << /O << \theFirstAction\space
+ \opentoks\@rightDelimiters >> \@CloseAction >> >>}\fi
+}
+\def\@POAction@dvipdfm{%
+ \@pdfm@mark{put @thispage << /AA << \@thisOpenAction
+ \@thisCloseAction >> >>}%
+}
+\ifcase\dljs@drivernum
+ \let\@OAction\@OAction@pdfmark
+ \let\@POAction\@POAction@pdfmark
+ \gdef\theFirstAction{/S/JavaScript/JS (\the\importfdftoks)}
+ \let\isOpenAction\dl@YES
+\or
+ \let\@OAction\@OAction@pdftex
+ \let\@POAction\@POAction@pdftex
+ \AtBeginDocument{\@OAction@pdftex}
+\or
+ \let\@OAction\@OAction@dvipdfm
+ \let\@POAction\@POAction@dvipdfm
+ \AtBeginDocument{\@OAction@dvipdfm}
+\fi
+\def\opentoks{}
+\def\makespecialJS{%
+ \let\r\jsR\let\t\jsT\let\n\jsN}
+\def\@rightDelimiters{}
+\def\OpenAction{\@ifnextchar\Next
+ {\expandafter\@OpenAction\@gobble}{\@OpenAction}}
+\def\@OpenAction#1{%
+ \ifx\isOpenAction\dl@NO
+ {\makespecialJS\xdef\theFirstAction{#1}}%
+ \global\let\isOpenAction\dl@YES
+ \else
+ \edef\dljstmp{\@rightDelimiters}%
+ \xdef\@rightDelimiters{\dljstmp >> }%
+ {\makespecialJS\xdef\dljstmp{\opentoks /Next << #1 }}%
+ \xdef\opentoks{\dljstmp}%
+ \fi
+ \@nextOpenAction
+}
+\def\@nextOpenAction{\@ifnextchar\Next{\expandafter
+ \@OpenAction\@gobble}{}}
+\def\protectJSCtrls{\def\r{\string\r\string\n}%
+ \def\t{\string\t}\def\n{\string\n}}
+\def\dljs@tstlp{\@ifnextchar\bgroup
+ {\let\dljs@multi\dl@YES\dljs@tstlpi}%
+ {\let\dljs@multi\dl@NO\dljs@tstlpi}}
+\def\dljs@tstlpi#1\@nil{}%
+\def\dljs@bldScript#1#2#3{{%
+ \dljs@tstlp#1\@nil
+ \ifx\dljs@multi\dl@NO{\protectJSCtrls\xdef#3{/#2<<#1>>}}\else
+ \toks0={}\let\dljs@rAngles\@empty\count0=0
+ \@tfor\dljs@arg:=#1\do{%
+ \ifnum\count0=0
+ \toks0=\expandafter{\dljs@arg}\else
+ \toks2=\expandafter{\dljs@arg}%
+ \edef\holdtokstmp{\the\toks0
+ /Next<<\the\toks2 }%
+ \edef\dljs@rAngles{\dljs@rAngles\space>>}%
+ \toks0=\expandafter{\holdtokstmp}%
+ \fi
+ \advance\count0by1
+ }%
+ {\protectJSCtrls\xdef#3{/#2<<\the\toks0 \dljs@rAngles>>}%
+ \xdef#3{#3}}%
+ \fi
+}}
+\newcommand{\thisPageAction}[2]{%
+ \let\@CloseAction\@empty
+ \let\@thisOpenAction\@empty
+ \let\@thisCloseAction\@empty
+ \def\dljs@argi{#1}\def\dljs@argii{#2}%
+ \ifnum\value{page}=1\relax
+ \ifx\dljs@argii\@empty\else
+ \dljs@bldScript{#2}{C}{\@CloseAction}\fi
+ \ifx\dljs@argi\@empty\else\dljs@tstlp#1\@nil
+ \ifx\dljs@multi\dl@NO\OpenAction{#1}\else
+ \@tfor\dljs@arg:=#1\do{\expandafter
+ \OpenAction\expandafter{\dljs@arg}%
+ }\fi
+ \fi
+ \else
+ \ifx\dljs@argi\@empty\else
+ \dljs@bldScript{#1}{O}{\@thisOpenAction}\fi
+ \ifx\dljs@argii\@empty\else
+ \dljs@bldScript{#2}{C}{\@thisCloseAction}\fi
+ \@POAction
+ \fi
+}
+\let\insdljsloadVar\@empty
+\newenvironment{insDLJS}[3][]
+{%
+ \gdef\detectdljs{#1}\gdef\dljsBase{#2}%
+ \ifxetex{\def\1{\string\1}\def\2{\string2}%
+ \def\3{\string\3}\xdef\dljsName{#3}}\else
+ \Hy@unicodefalse\pdfstringdef{\dljsName}{#3}\fi
+\ifx\detectdljs\@empty
+ \stepcounter{dljs@cnt}%
+ \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}%
+ \edef\insdljsloadVar{var \detectdljs=true;}%
+ \addtocounter{dljs@cnt}{-1}%
+\fi
+ \global\let\multisegments\dl@NO\setcounter{dljssegs}{2}%
+ \global\dljsobjtoks={}%
+ \expandafter\ifx\csname dljs\dljsBase\endcsname\relax
+ \else\@insjserrDuplicate\fi
+ \ifcase\dljs@drivernum
+ \let\insert@DLJS=\insert@DLJS@pdfmark
+ \let\endinsDLJS=\endinsert@DLJS@pdfmark
+ \let\newsegment=\newsegment@pdfmark
+ \let\endnewsegment=\endnewsegment@pdfmark
+ \or
+ \let\insert@DLJS=\insert@DLJS@pdftex
+ \let\endinsDLJS=\endinsert@DLJS@pdftex
+ \let\newsegment=\newsegment@pdftex
+ \let\endnewsegment=\endnewsegment@pdftex
+ \or
+ \let\insert@DLJS=\insert@DLJS@dvipdfm
+ \let\endinsDLJS=\endinsert@DLJS@dvipdfm
+ \let\newsegment=\newsegment@dvipdfm
+ \let\endnewsegment=\endnewsegment@dvipdfm
+ \fi
+ \insert@DLJS
+}{}
+\newenvironment{insDLJS*}[2][]
+{%
+ \gdef\detectdljs{#1}\gdef\dljsBase{#2}%
+\ifx\detectdljs\@empty
+ \stepcounter{dljs@cnt}%
+ \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}%
+ \edef\insdljsloadVar{var \detectdljs=true;}%
+ \addtocounter{dljs@cnt}{-1}%
+\fi
+ \global\let\multisegments\dl@YES\setcounter{dljssegs}{2}%
+ \global\dljsobjtoks={}%
+ \expandafter\ifx\csname dljs\dljsBase\endcsname\relax
+ \else\@insjserrDuplicate\fi
+ \ifcase\dljs@drivernum
+ \let\insert@DLJS=\insert@DLJS@pdfmark
+ \expandafter
+ \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdfmark
+ \let\newsegment=\newsegment@pdfmark
+ \let\endnewsegment=\endnewsegment@pdfmark
+ \or
+ \let\insert@DLJS=\insert@DLJS@pdftex
+ \expandafter
+ \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdftex
+ \let\newsegment=\newsegment@pdftex
+ \let\endnewsegment=\endnewsegment@pdftex
+ \or
+ \let\insert@DLJS=\insert@DLJS@dvipdfm
+ \expandafter
+ \let\csname endinsDLJS*\endcsname\endinsert@DLJS@dvipdfm
+ \let\newsegment=\newsegment@dvipdfm
+ \let\endnewsegment=\endnewsegment@dvipdfm
+ \fi
+ \insert@DLJS
+}{}
+\def\@insjserrDuplicate{%
+ \typeout{^^J! insdljs Package error.}
+ \typeout{! insDLJS environment: On line number \the\inputlineno,}
+ \typeout{! the base name `\dljsBase' has already been chosen.}
+ \typeout{! A DLJS earlier defined has been overwritten!}
+ \typeout{! Choose another name for the first required argument}
+ \typeout{! of the insDLJS environment.^^J}
+}
+\newif\ifisdljs \isdljsfalse
+\begingroup
+\catcode`\~=12 \catcode`\#=12
+\gdef\efdlspecials{\catcode`\~=12 \catcode`\#=12}
+\endgroup
+\def\ckivspace#1{\if\noexpand#1\space\else\expandafter#1\fi}
+\let\DLspecialDefs\@empty
+\def\fdfAfterheader
+{%
+ \iwvo{\string\begingroup\string\efdlspecials}
+ \iwvo{\string\DLspecialDefs}
+ \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 /After 3 0 R >> >> >> }
+ \iwvo{endobj}
+ \iwvo{2 0 obj}
+\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}
+}
+\newenvironment{execJS}[1]
+{%
+ \gdef\detectdljs{\string_#1}\gdef\dljsBase{#1}%
+ \global\dljsobjtoks={}%
+ \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
+ \ifx\importdljs\dl@YES\ifx\execjs\dl@YES
+ \ifx\dl@gopro\dl@YES
+ \ifnum\dljs@drivernum=0\relax
+ \addImportAnFDF\importAnFDFTemplate
+ \else
+ \OpenAction{/S/JavaScript/JS (\importAnFDFTemplate)}%
+ \fi\fi
+ \fi\fi
+ \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
+ \fdfAfterheader
+ \js@verbatimwrite
+}{%
+ \fdfendstreamobj
+ \endjs@verbatimwrite
+ \fdftrailer
+ \closejs@verbatim@out
+ \expandafter\xdef\csname\dljsBase OBJ\endcsname{\the\dljsobjtoks}%
+ \edef\@dljstmp{\noexpand\AtBeginDocument{%
+ \noexpand\input{\js@Path\dljsBase.djs}}}\@dljstmp
+}
+\newtoks\JStoks
+\newenvironment{defineJS}[2][]
+{%
+ \expandafter\@ifundefined\expandafter{%
+ \expandafter\@gobble\string#2}{}{%
+ \PackageWarning{insdljs}{The command
+ \string#2 already defined}}%
+ \gdef\defineJSArg{#2}\JStoks={}%
+ \def\verbatim@processline
+ {%
+ \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}%
+ \global\JStoks=\expandafter{\JS@temp}%
+ }%
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ #1%
+ \verbatim@start
+}{\gdef\eq@JStemp{\expandafter\edef\defineJSArg{\the\JStoks}}%
+ \aftergroup\eq@JStemp}
+\newenvironment{@defineJS}[2][]
+{%
+ \gdef\defineJSArg{#2}\JStoks={}%
+ \def\verbatim@processline
+ {%
+ \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}%
+ \global\JStoks=\expandafter{\JS@temp}%
+ }%
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ #1%
+ \verbatim@start
+}{\gdef\eq@JStemp{\expandafter\edef\defineJSArg{\the\JStoks}}%
+ \aftergroup\eq@JStemp}
+\newenvironment{localJS}[1][]{}{\ifvmode\else\unskip\fi}
+\newenvironment{willClose}[1][]
+{\@defineJS[#1]{\will@Close}}
+{\end@defineJS}
+\let\will@Close\@empty
+\newenvironment{willSave}[1][]
+{\@defineJS[#1]{\will@Save}}
+{\end@defineJS}
+\let\will@Save\@empty
+\newenvironment{didSave}[1][]
+{\@defineJS[#1]{\did@Save}}
+{\end@defineJS}
+\let\did@Save\@empty
+\newenvironment{willPrint}[1][]
+{\@defineJS[#1]{\will@Print}}
+{\end@defineJS}
+\let\will@Print\@empty
+\newenvironment{didPrint}[1][]
+{\@defineJS[#1]{\did@Print}}
+{\end@defineJS}
+\let\did@Print\@empty
+\def\dljs@willDidActions{/AA <<
+ \ifx\test@will@Close\@empty\else/WC <<
+ \JS{\will@Close} >>\fi
+ \ifx\test@will@Save\@empty\else/WS <<
+ \JS{\will@Save} >>\fi
+ \ifx\test@did@Save\@empty\else/DS <<
+ \JS{\did@Save} >>\fi
+ \ifx\test@will@Print\@empty\else/WP <<
+ \JS{\will@Print} >>\fi
+ \ifx\test@did@Print\@empty\else/DP <<
+ \JS{\did@Print} >>\fi
+ >>
+}
+\newcommand\dljs@setDocActions{%
+ \edef\test@will@Close{\will@Close}%
+ \edef\test@will@Save{\will@Save}%
+ \edef\test@did@Save{\did@Save}%
+ \edef\test@will@Print{\will@Print}%
+ \edef\test@did@Print{\did@Print}%
+ \ifpdf\pdfcatalog{\dljs@willDidActions}\else
+ \ifxetex\immediate
+ \@pdfm@mark{put @catalog <<\dljs@willDidActions>>}\else
+ \literalps@out{\AEB@psMrk
+ {Catalog} <<\dljs@willDidActions>> /PUT pdfmark}\fi\fi
+}
+\@ifpackageloaded{aeb_pro}{}
+ {\AtBeginDocument{\dljs@setDocActions}}
+\begingroup
+\catcode`\%=12
+\gdef\firstFDFline{%FDF-1.2}
+\gdef\lastFDFline{%%EOF}
+\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}
+}
+\def\fdfbeginstreamobj
+{%
+ \iwvo{\thedljssegs\space 0 obj}
+ \iwvo{<<>>}
+ \iwvo{stream}
+ \ifx\insdljsloadVar\@empty\else
+ \iwvo{\insdljsloadVar}
+ \global\let\insdljsloadVar\@empty
+ \fi
+}
+\def\fdfendstreamobj{%
+ \iwvo{endstream}
+ \iwvo{endobj}
+}
+ \def\fdftrailer{%
+ \iwvo{trailer}
+ \iwvo{<< /Root 1 0 R >>}
+ \iwvo{\string\lastFDFline}
+ \iwvo{*end{jsexpverbatimwrite}}
+ \iwvo{\string\endgroup}
+}
+\newtoks\importfdftoks \importfdftoks={}
+\newtoks\dljsobjtoks \dljsobjtoks={}
+\def\importAnFDFTemplate{%
+if(typeof \detectdljs\space == "undefined")\jsR\jsT
+ ( app.viewerVersion > 8 ) ? %
+ aebTrustedFunctions( this, aebImportAnFDF, %
+ "\js@Path\dljsBase.fdf") : %
+ this.importAnFDF("\js@Path\dljsBase.fdf");\jsR
+}
+\def\addImportAnFDF#1{%
+ \ifx\importdljs\dl@YES
+ \edef\importAnFDFtmp{\the\importfdftoks#1}%
+ \global\importfdftoks=\expandafter{\importAnFDFtmp}%
+ \fi
+}
+\def\importAnFDF{\ifx\importdljs\dl@YES\@OAction\fi}
+\newenvironment{newsegment@pdfmark}[1]{%
+ \addtocounter{dljssegs}{1}%
+ \addtocounter{dljs@cnt}{1}%
+ \Hy@unicodefalse\pdfstringdef{\dljsName}{#1}%
+ \edef\@dljstmp{\the\dljsobjtoks(\dljsName)
+ \thedljssegs\space 0 R\space}
+ \global\dljsobjtoks=\expandafter{\@dljstmp}
+ \fdfbeginstreamobj
+ \js@verbatimwrite
+}{%
+ \fdfendstreamobj
+ \endjs@verbatimwrite
+}
+\def\insert@DLJS@pdfmark{%
+ \global\let\dljspresent\dl@YES
+ \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
+ \ifx\importdljs\dl@YES\ifx\dl@gopro\dl@YES
+ \addImportAnFDF\importAnFDFTemplate
+ \fi\fi
+ \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
+ \fdfheader
+ \ifx\multisegments\dl@NO\expandafter
+ \newsegment\expandafter{\expandafter\dljsName\expandafter}\fi
+}
+\def\endinsert@DLJS@pdfmark{%
+ \ifx\importdljs\dl@YES
+ \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi
+ \fdftrailer
+ \closejs@verbatim@out
+ \expandafter\xdef\csname\dljsBase%
+ OBJ\endcsname{\the\dljsobjtoks}%
+ \edef\@dljstmp{\noexpand\AtBeginDocument{%
+ \noexpand\input{\js@Path\dljsBase.djs}}}%
+ \@dljstmp
+ \ifx\firstdljs\dl@YES
+ \AtBeginDocument{\edef\@dljstmp{\importAnFDF}%
+ \@dljstmp}\global\let\firstdljs\dl@NO
+ \fi
+ \fi
+}
+\begingroup
+\catcode`\@=0 @catcode`@\=12
+@gdef@ccpdftex{@gdef@eqesc{\\}@gdef@eqesci{\}}
+@endgroup
+\def\begindljs
+{%
+ \iwvo{\string\begingroup\string\efdlspecials}
+ \iwvo{\string\isdljstrue}
+ \iwvo{\string\makeatletter}
+ {\uccode`c=`\%\uppercase{%
+ \iwvo{\string\obeyspaces\string\obeylines
+ \string\let\string^\string^M=\string\jsR c}}}
+ {\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\endseg
+{%
+ {\uccode`c=`\%\uccode`p=`\}\uppercase{\iwvo{pc}}}%
+}
+\def\enddljs
+{%
+ \iwvo{\string\endgroup}%
+}
+\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}
+}
+\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
+}{%
+ \endjs@verbatimwrite
+ \endseg
+}
+\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
+}{%
+ \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
+}
+\def\setDLJSRef@pdftex
+{%
+ \noexpand\immediate\noexpand\pdfobj {%
+ << /Names [\the\importfdftoks] >> }%
+ \edef\noexpand\objNames{\noexpand\the\noexpand\pdflastobj\space 0 R}%
+ \pdfnames {/JavaScript \noexpand\objNames}%
+}
+\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
+}{%
+ \endjs@verbatimwrite
+ \endseg
+}
+\def\setDLJSRef@dvipdfm
+{%
+ \immediate\@pdfm@mark{obj @objnames %
+ << /Names [\the\importfdftoks] >> }%
+ \@pdfm@mark{put @names %
+ << /JavaScript @objnames >> }%
+}
+\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
+}{%
+ \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
+ \AtBeginDocument{\setDLJSRef@dvipdfm}%
+ \global\let\firstdljs\dl@NO
+ \fi
+ \fi
+}
+\catcode`\"=\dl@dquoteCat
+\inputAltAdbFncs
+\endinput
+%%
+%% End of file `insdljs.sty'.
diff --git a/texmf-dist/tex/latex/acrotex/setcorder.def b/texmf-dist/tex/latex/acrotex/setcorder.def
new file mode 100644
index 00000000..3a76b74e
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/setcorder.def
@@ -0,0 +1,66 @@
+%%
+%% This is file `setcorder.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% eforms.dtx (with options: `copyright,setcorder')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% eForms package, %%
+%% Copyright (C) 2002-2017 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}{cojs}{eforms: JavaScript to set calculation order}
+var debugCalc=false;
+ef_setCalcOrder.lastIndex=0;
+function ef_setCalcOrder (a) {
+ var o1, o2, f;
+ while ( a.length > 0) {
+ if (a.length > 1) {
+ f=a.shift();
+ o1=this.getField(f);
+ if ( o1 == null ) {
+ ef_CalcOrderErr(f);
+ continue;
+ }
+ f = a[0];
+ o2=this.getField(f);
+ if ( o2 == null ) {
+ ef_CalcOrderErr(f);
+ a.shift();
+ continue;
+ }
+ if ( o2.calcOrderIndex < o1.calcOrderIndex ) {
+ o2.calcOrderIndex=o1.calcOrderIndex+1;
+ef_setCalcOrder.lastIndex=o2.calcOrderIndex;
+}
+ } else {
+ f=a.shift();
+o1=this.getField(f);
+ if ( o1 == null ) {
+ ef_CalcOrderErr(f);
+ continue;
+ }
+o1.calcOrderIndex=ef_setCalcOrder.lastIndex;
+}
+ }
+}
+function ef_CalcOrderErr(f) {
+ console.show(); app.beep(0);
+ console.println("calcOrder: the field \""+ f
+ + "\" does not exist in this document, skipping it.\n\n"
+ + "calcOrder: Check the case sensitive spelling of the field.");
+}
+var _EfCalcOrder=\efCalcOrder;
+ef_setCalcOrder(_EfCalcOrder);
+\end{insDLJS}
+\endinput
+%%
+%% End of file `setcorder.def'.
diff --git a/texmf-dist/tex/latex/acrotex/taborder.sty b/texmf-dist/tex/latex/acrotex/taborder.sty
new file mode 100644
index 00000000..1a633f74
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/taborder.sty
@@ -0,0 +1,92 @@
+%%
+%% This is file `taborder.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% taborder.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% taborder.sty package, %%
+%% Copyright (C) 2009--2016 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}[1997/12/01]
+\ProvidesPackage{taborder}
+ [2009/09/04 v0.1 taborder: Sets the tab order, Acrobat Distiller only (dps)]
+\DeclareOption{structure}{\let\to@earlyendinput\relax}
+\let\to@earlyendinput\endinput
+\let\setTabOrderByList\relax\let\setTabOrderByNumber\relax
+\ProcessOptions
+\newif\ifto@structOrder\to@structOrderfalse
+\newcommand{\setTabOrder}[1]{\begingroup
+ \global\to@structOrderfalse
+ \def\to@to@C{C}\def\to@to@R{R}\def\to@to@S{S}%
+ \def\to@to@W{W}\def\to@to@A{A}\def\to@to@us{UNSPECIFIED}%
+ \uppercase{\def\ef@taborder{#1}}%
+ \ifx\ef@taborder\@empty
+ \else\ifx\ef@taborder\to@to@us
+ \let\ef@taborder\@empty
+ \else\ifx\to@to@C\ef@taborder
+ \else\ifx\to@to@R\ef@taborder
+ \else\ifx\to@to@S\ef@taborder
+ \ifx\to@earlyendinput\endinput
+ \PackageWarning{taborder}{%
+ The structure (S) option is supported only\MessageBreak
+ with Acrobat Distiller. Using the default\MessageBreak
+ value of 'unspecified'}\let\ef@taborder\@empty
+ \else\global\to@structOrdertrue\fi
+ \else\ifx\to@to@W\ef@taborder
+ \else\ifx\to@to@A\ef@taborder
+ \else\PackageWarning{taborder}{%
+ Invalid value for \string\setTabOrder. Permissible \MessageBreak
+ values are R, C, S, W, A, and unspecified. Using \MessageBreak
+ the default value of 'unspecified'}\let\ef@taborder\@empty
+ \fi\fi\fi\fi\fi\fi\fi\ef@setTabOrder
+}
+\to@earlyendinput
+\def\ef@setTabOrder{%
+ \ifx\ef@taborder\@empty\else\literalps@out{%
+ [ {ThisPage} <</Tabs/\ef@taborder>> /PUT pdfmark}\fi
+ \endgroup
+}
+\newcommand{\setTabOrderByList}{%
+ \global\to@settabsbylisttrue
+ \global\let\setStructTabOrder\to@setStructTabOrder
+}
+\newcommand{\setTabOrderByNumber}{%
+ \global\to@settabsbylistfalse
+ \global\let\setStructTabOrder\@gobble
+}
+\newcommand{\to@setStructTabOrder}[1]{%
+ \@setStructTabOrder#1\end
+}
+\newif\ifto@settabsbylist\to@settabsbylisttrue
+\let\setStructTabOrder\to@setStructTabOrder
+\define@key{structOpts}{title}[]{\def\structOpts@title{#1}}
+\define@key{structOpts}{type}[Form]{\def\structOpts@type{#1}}
+\newcommand{\@setStructTabOrder}[2][]{%
+ \setkeys{structOpts}{title,type,#1}
+ \ifx#2\end\else\literalps@out{%
+ [/Subtype/\structOpts@type\ifx\structOpts@title\@empty
+ \else/Title (\structOpts@title)\fi/StPNE pdfmark
+ [/Obj {#2} /StOBJ pdfmark
+ [/StPop pdfmark}\expandafter\@setStructTabOrder
+ \fi
+}
+\def\to@insertStrucTabOrder#1{%
+ \ifto@structOrder\ifx\eq@objdef\@empty\else
+ \ifx\eq@taborder\@empty\else\literalps@out{%
+ [/Subtype/#1/At \eq@taborder/StPNE pdfmark
+ [/Obj {\eq@objdefName} /StOBJ pdfmark [/StPop pdfmark}%
+ \fi\fi\fi
+}
+\endinput
+%%
+%% End of file `taborder.sty'.
diff --git a/texmf-dist/tex/latex/acrotex/template.def b/texmf-dist/tex/latex/acrotex/template.def
new file mode 100644
index 00000000..f0e90700
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/template.def
@@ -0,0 +1,256 @@
+%%
+%% This is file `template.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,template')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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{template.def}
+ [2017/03/16 v7.8g %
+ Exerquiz template for language support (dps)]
+%%------------- Instructions ------------------------------------
+%% Make your language localizations to this file and rename it to
+%% something like \texttt{eq<mylang>.def}, where \texttt{<mylang>}
+%% is a short 2-letter designator of the language. Test the tile
+%% by inputting it in the preamble of your document
+%% \input{eq<mylang>.def}. When satisfied, send it to me at
+%% dpstory@uakron.edu or dpstory@acrotex.net.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Web.sty %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Language dependent definitions for Web.sty
+\DeclareOption{newlanguage}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or January
+ \or February \or March \or April
+ \or May \or June \or July \or August
+ \or September \or October \or November
+ \or December \fi \the\day, \the\year}
+ \def\web@versionlabel{Version}
+ \def\web@toc{Table of Contents}
+ \def\web@continued{cont.}
+ \def\web@article{Begin \hyperlink{section.1}{Article}}
+ \def\web@directory{Directory}
+ \def\web@revision{Last Revision Date:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Section}
+ % Label Navibar
+ \def\web@back{Back}
+ \def\web@doc{Doc}} % restricted to three characters
+ \PassOptionsToPackage{newlanguage}{exerquiz}
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\DeclareOption{newlanguage}{%
+ \def\LangRedefinitions{\InputIfFileExists{eqlang.def}%
+ {\PackageInfo{exerquiz}{Inputting a New Language Option}}%
+ {\PackageInfo{exerquiz}{Language Option: Cannot find the file
+ eqpo.def, using the default, English.}}}}
+
+% The exercise label
+% Accents: \renewcommand\exlabel{\"Ubung} (German)
+\renewcommand\exlabel{Exercise}
+% The value of this macro is written to \jobname.sol,
+% accented characters must be protected with a \protect
+% E.g., \renewcommand\exlabelsol{\protect\"Ubung} (German)
+\renewcommand\exlabelsol{\exlabel}
+
+% Title of exercise solution section
+% E.g.: \renewcommand\exsectitle
+% {L\"osungen der \exlabel en} (German)
+\renewcommand\exsectitle{Solutions to \exlabel s}
+\renewcommand\exsecrunhead{\exsectitle} %% change to @ form
+
+% Solution label for solutionafter option for exercise
+\renewcommand\exsolafter{\textit{Solution}:}
+
+% Title of short quiz solution section
+% Example: \renewcommand\eq@sqslsectitle
+% {L\"osungen der Aufgaben} (German)
+\renewcommand\eq@sqslsectitle{Solutions to Quizzes}
+\renewcommand\sqslsectitle{\eq@sqslsectitle}
+
+% Running header/section title for solutions to short quizzes
+\renewcommand\eq@sqslsecrunhead{Solutions to Quizzes}
+% User access
+\renewcommand\sqslsecrunhead{\eq@sqslsecrunhead}
+
+% Label for solutions to short quizzes, appears
+% in solutions sections
+% Protect accents with \protect
+% E.g.: \renewcommand\eq@sqsllabel
+% {\string\textbf{L\protect\"osung zu Aufgabe:}} (German)
+\renewcommand\eq@sqsllabel{\string\textbf{Solution to Quiz:}}
+% User access
+\renewcommand\sqsllabel{\eq@sqsllabel}
+
+% Solution label for solutionafter option for shortquiz
+\renewcommand\sqsolafter{\textit{Solution}:}
+
+% User access to shortquiz label
+\renewcommand\sqlabel{\eq@sqlabel}
+% Here is the default short quiz label.
+\sqDefaultFmtTitle{\textcolor{red}{Quiz.}}
+
+% Here is the default short quiz return label
+% No formatting allowed
+\renewcommand\eq@sqslrtnlabel{End Quiz}
+% User access to shortquiz label
+\renewcommand\sqslrtnlabel{\eq@sqslrtnlabel}
+
+% Short quiz feedback messages
+\renewcommand\eqsqrtmsg{"Right!"}
+\renewcommand\eqsqwgmsg{"Wrong!"}
+\renewcommand\doNotShowAgainMsg{Do not show this message again}
+
+% Here is the default quiz label.
+% No formatting allowed
+% For Example: \renewcommand\eq@bqlabel{D\'ebut} (French)
+\renewcommand\eq@bqlabel{Begin Quiz}
+% User access to shortquiz label
+\renewcommand\bqlabel{\eq@bqlabel}
+% Used for writing JavaScript Messages on screen.
+% Use PDFDocEncoding
+% For Example:
+% \renewcommand\eq@bqlabelISO{D\string\351but} (French)
+% Use \string not \protect, this helps out
+% TeX4ht by Eitan Gurari.
+\renewcommand\eq@bqlabelISO{\eq@bqlabel}
+\renewcommand\bqlabelISO{\eq@bqlabel}
+% Default title for a quiz used for \verb!\@currentlablename!
+\setDefShortQuizLabelName{Quiz}
+\setDefQuizLabelName{Quiz}
+
+% Here is the default quiz label.
+% No formatting allowed
+\renewcommand\eq@eqlabel{End Quiz}
+% User access to shortquiz label
+\renewcommand\eqlabel{\eq@eqlabel}
+
+% JavaScript Messages for Quiz Environments. Use PDFDocEncoding
+% Note: Use \string rather than \protect for escape codes,
+% i.e. \string\374
+%
+% In the Text Field showing the score, there is the default
+% phrase in English
+% Score: 2 out of 3, the word "Score" and "out of" needs
+% translation.
+\renewcommand\eq@Score{Score:}\renewcommand\eq@OutOf{out of}
+\renewcommand\eq@ptScore{Score:}
+% used in summary tables
+\renewcommand\stOutOf{of}
+% If you are taking a quiz and click on an alternative without
+% initializing the quiz
+% first, this message appears.
+% This string is placed in the DLJS, so the escape sequences
+% need to be protected more. Instead of \string\340 we need
+% \string\\340.
+% Example: \renewcommand\eqInitQuizMsg{% (German)
+% "Sie m\string\\374ssen die Aufgaben initialisieren!
+% Bitte klicken Sie auf "+msg+"."}
+\renewcommand\eqInitQuizMsg{%
+ "You must initialize the Quiz! Click on "+msg+"."}
+
+% This macro doesn't usually need translation, it uses \eqScore
+% and \eqOutOf. However, if the sentence "Score: 2 out of 3"
+% does not translate conveniently into a particular language,
+% this macro may have to be modified. It's the one that puts
+% the message in the message box.
+\renewcommand\eqQuizTotalMsg
+ {"\eqScore\space"+Score+" \eqOutOf\space"+nQuestions}
+\renewcommand\eqQuizPointsMsg{%
+ "\eqptScore\space"+ptScore+" \eqOutOf\space"+nPointTotal}
+\renewcommand\eqQuizPercentMsg{pcScore+"\%"}
+\renewcommand\eqQuizGradeMsg{quizGrade}
+
+% In the link form of a quiz, of you change your choice,
+% this message appears. This string is placed in the
+% DLJS, so the escape sequences need to be protected more.
+% Instead of \string\340 we need \string\\340.
+% For Example: \renewcommand\eqMadeChoice{%
+% "Vous avez d\string\\351j\string\\340 fait un choix,
+% ce choix est ("+Responses[probno]+").
+% Souhaitez vous le modifier ?"} (French)
+\renewcommand\eqMadeChoice{%
+ "You have already made a choice.
+ Your choice was ("+Responses[probno]+").
+ Do you want to change it?"}
+% Default button labels for \eqButton
+% Accents are handled as above:
+% A French Language Example
+% \renewcommand\eq@local@CA{R\string\351ponses}
+% \renewcommand\eq@local@RC{Correctes}
+% \renewcommand\eq@local@AC{SVP !}
+\renewcommand\eq@local@CA{Correct}
+\renewcommand\eq@local@RC{My Answers!}
+\renewcommand\eq@local@AC{Please!}
+
+% Default button label of \CorrAnsButton.
+\renewcommand\eq@local@CorrAnsButton{Ans}
+% Default button label of \sqClearButton
+\renewcommand{\eq@local@sqClearButton}{Clear}
+% Short string used by the \PromptButton
+\renewcommand{\AnsPromptBtnStr}{Answer:\space}
+
+% These (error) messages are generated when the user enters an
+% invalid math expression into a math fill-in response box.
+% The messages come in the form of an eqAppAlert() so
+% PDFDocEncoding needs to be used.
+\renewcommand\eqerrABS{"Absolute values not balanced. Please correct."}
+\renewcommand\eqerrBadMathFunc{"The expression \""+aF[i]+"\" is neither
+ a defined " +"function, nor a valid math expression."}
+\renewcommand\eqParens{"Parentheses"}
+\renewcommand\eqBrackets{"Brackets"}
+\renewcommand\eqBraces{"Braces"}
+\renewcommand\eqerrDelimNotBal{aGroup[i][2] + " not balanced.
+ Please correct."}
+\renewcommand\eqerrBadExp{"Invalid mathematical expression.
+ A problem with one of the exponents. Please correct."}
+\renewcommand\eqerrUnfinishQuiz{"There is an unfinished quiz,
+ please finish before moving on to another."}
+\renewcommand\noPeekMsg{"Viewing Solutions to quizzes is not allowed
+ until you take or finish this quiz!"}
+\renewcommand\highThresholdMsg{"You are required to respond to all
+ questions before the quiz is evaluated."}
+\renewcommand\eqSyntaxErrorUndefVar{"Syntax Error: Possibly an
+ undefined variable present."}
+\newcommand{\eqSyntaxErrorComma}{"Syntax Error: A comma was found"
+ + " in your response \\""
+ + UserAns + "\\". Please remove the comma, or this answer"
+ + " will be marked as wrong."}
+\renewcommand{\limSelWarningMsg}{"For this questions, you are allowed to
+ make at most " + n + " selections."}
+\renewcommand{\promptButtonMsg}{%
+ "Would you like to see the correct answer at this time? "
+ + "Your current answer will be the one that will be scored. "
+ + "If you click on \\"Yes\\",
+ you will not be able to change your answer."
+}
+\renewcommand{\defaultReqFormMsg}{%
+ "The expression is not in the expected form."}
+\renewcommand\eqAnd{and}
+%%%%%%%%%%%%%%%%%%%%%% End Message Section %%%%%%%%%%%%%
+%% Some typeout messages %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\typeout{Inputting French Option}
+\typeout{French Option: Cannot find the file eqfr.def, using the
+ default, English.}
+\typeout{Solutions not allowed with this option}
+\typeout{Check: `#1' is not an acceptable option, inserting
+ default, `check'.}
+\endinput
+%%
+%% End of file `template.def'.
diff --git a/texmf-dist/tex/latex/acrotex/uieforms.def b/texmf-dist/tex/latex/acrotex/uieforms.def
new file mode 100644
index 00000000..0fe265be
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/uieforms.def
@@ -0,0 +1,376 @@
+%%
+%% This is file `uieforms.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% eforms.dtx (with options: `copyright,userinterface')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% eForms package, %%
+%% Copyright (C) 2002-2017 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\@equi#1{}
+\ifHy@colorlinks\def\eq@bordervisibledefault{0}\@eqW{}\else
+\def\eq@bordervisibledefault{1}\@eqW{1}\fi
+\def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
+\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start}
+ {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}}
+\def\aeb@exiii{\expandafter\expandafter\expandafter}
+\newtoks\ef@flagtoks
+\newtoks\ef@jstoks
+\def\noexpandiii{\noexpand\noexpand\noexpand}
+\define@choicekey{eforms}{border}[\val\nr]{visible,invisible}
+{%
+ \ifcase\nr
+ \def\eq@visibleborder{1}%
+ \ifx\eq@W\@empty
+ \ifx\eq@W@buffered\@empty\@eqW{1}\else
+ \@eqW{\eq@W@buffered}\fi
+ \else
+ \ifnum\eq@W@value=0 \@eqW{1}\fi
+ \ifx\eq@W@buffered\@empty\else
+ \@eqW{\eq@W@buffered}\fi
+ \fi
+ \@eqBorder{0 0 \eq@W@value}%
+ \or
+ % author has chosen invisible border
+ \def\eq@visibleborder{0}\@eqW{}%
+ \@eqBorder{0 0 0}\@eqBC{}%
+ \fi
+}
+\define@choicekey{eforms}{linewidth}[\val\nr]{thin,medium,thick}
+{%
+ \ifx\annot@type\annot@type@link
+ \ifx\eq@visibleborder\@empty
+ \ifnum\eq@bordervisibledefault=0
+ \edef\eq@W@buffered{\ifcase\nr 1\or2\or3\fi}%
+ \@eqW{}%
+ \else
+ \ifcase\nr \@eqW{1}\or\@eqW{2}\or
+ \@eqW{3}\else\@eqW{1}\fi\@eqBorder{0 0 \eq@W@value}%
+ \fi
+ \else
+ \ifnum\eq@visibleborder=1 % visible border
+ \ifcase\nr \@eqW{1}\or\@eqW{2}\or
+ \@eqW{3}\else\@eqW{1}\fi\@eqBorder{0 0 \eq@W@value}%
+ \fi
+ \fi
+ \else
+ \ifx\eq@visibleborder\@empty
+ \ifcase\nr \@eqW{1}\or\@eqW{2}\or
+ \@eqW{3}\else\@eqW{1}\fi\@eqBorder{0 0 \eq@W@value}%
+ \edef\eq@W@buffered{\ifcase\nr 1\or2\or3\fi}%
+ \else
+ \ifnum\eq@visibleborder>0
+ \ifcase\nr \@eqW{1}\or\@eqW{2}\or
+ \@eqW{3}\else\@eqW{1}\fi\@eqBorder{0 0 \eq@W@value}%
+ \fi
+ \fi
+ \fi
+}
+\let\eq@visibleborder\@empty
+\let\eq@W@buffered\@empty
+\define@choicekey{eforms}{highlight}[\val\nr]{none,invert,outline,%
+ inset,push}
+{%
+ \ifcase\nr
+ \@eqH{}\or\@eqH{I}\or\@eqH{O}\or\@eqH{P}\or\@eqH{P}\fi
+}{}
+\define@key{eforms}{bordercolor}[]{%
+ \ifx\annot@type\annot@type@link\@eqColor{#1}\else
+ \ifx\eq@visibleborder\@empty\@eqBC{#1}\else
+ \ifnum\eq@visibleborder>0\relax\@eqBC{#1}\fi\fi\fi
+}
+\define@choicekey{eforms}{linestyle}[\val\nr]{solid,dashed,underlined,%
+ beveled,inset}
+{%
+ \ifcase\nr\relax
+ \@eqS{S}\or\@eqS{D}\or\@eqS{U}%
+ \or\@eqS{B}\or\@eqS{I}\else\@eqS{S}%
+ \fi
+}
+\define@key{eforms}{dasharray}[3]{\@eqD{#1}}
+\define@key{eforms}{linktxtcolor}[]{%
+ \let\ef@linktxtcolor@set=1\@eqlinktxtcolor{#1}}
+\let\ef@linktxtcolor@set=0
+\define@key{eforms}{annotflags}[]{\ef@flagtoks={}%
+ \setkeys{annotflags}{#1}}
+\@tfor\ef@flagopts:={{hidden}{FHidden}}{{print}{FPrint}}{{noprint}%
+ {FNoPrint}}{{-print}{FNoPrint}}{{noview}{FNoView}}{{lock}{FLock}}%
+ \do{\expandafter\getargs\ef@flagopts
+ \edef\temp@expand@def{%
+ \noexpand\define@key{annotflags}{\aeb@argi}[true]{%
+ \noexpand\ef@flagtoks=%
+ \noexpand\expandafter{\noexpand\ef@passedArgs}%
+ \noexpand\edef\noexpand\ef@passedArgs{\noexpandiii%
+ \F{\noexpandiii\csname\aeb@argii\noexpandiii\endcsname}%
+ \noexpand\the\noexpand\ef@flagtoks}%
+ }%
+ }\temp@expand@def
+}
+\define@key{eforms}{fieldflags}[]{\ef@flagtoks={}%
+ \setkeys{fieldflags}{#1}}
+\@tfor\ef@flagopts:={{readonly}{FfReadOnly}}{{required}{FfRequired}}%
+ {{noexport}{FfNoExport}}{{multiline}{FfMultiline}}%
+ {{password}{FfPassword}}{{notoggleoff}{FfNoToggleToOff}}%
+ {{radio}{FfRadio}}{{pushbutton}{FfPushButton}}{{combo}{FfCombo}}%
+ {{edit}{FfEdit}}{{sort}{FfSort}}{{fileselect}{FfFileSelect}}%
+ {{multiselect}{FfMultiSelect}}{{nospellcheck}{FfDoNotSpellCheck}}%
+ {{noscrolling}{FfDoNotScroll}}{{comb}{FfComb}}%
+ {{radiosinunison}{FfRadiosInUnison}}%
+ {{commitonchange}{FfCommitOnSelChange}}{{richtext}{FfRichText}}\do{%
+ \expandafter\getargs\ef@flagopts
+ \edef\temp@expand@def{%
+ \noexpand\define@key{fieldflags}{\aeb@argi}[true]%
+ {%
+ \noexpand\ef@flagtoks=\noexpand\expandafter{%
+ \noexpand\ef@passedArgs}%
+ \noexpand\edef\noexpand\ef@passedArgs{\noexpandiii%
+ \Ff{\noexpandiii\csname\aeb@argii\noexpandiii\endcsname}%
+ \noexpand\the\noexpand\ef@flagtoks}%
+ }%
+ }\temp@expand@def
+}
+\define@key{eforms}{tooltip}{\@eqTU{#1}}
+\define@key{eforms}{default}{\@eqDV{#1}}
+\define@key{eforms}{defaultstyle}{\@eqDS{#1}}
+\define@key{eforms}{value}{\@eqV{#1}}
+\define@key{eforms}{richvalue}{\@eqRV{#1}}
+\define@key{eforms}{apprD}{\@eqAP{#1}}
+\define@choicekey{eforms}{rotate}[\val\nr]{0,90,180,270}
+ {\expandafter\@eqR\expandafter{\val}}{}
+\define@key{eforms}{bgcolor}[]{\@eqBG{#1}}
+\define@key{eforms}{uptxt}{\@eqCA{#1}}
+\define@key{eforms}{downtxt}{\@eqAC{#1}}
+\define@key{eforms}{rollovertxt}{\@eqRC{#1}}
+\define@choicekey{eforms}{align}[\val\nr]{left,centered,right}{%
+ \ifx\annot@type\annot@type@text
+ \expandafter\@eqQ\expandafter{\nr}\fi}{}
+\define@key{eforms}{textfont}{\@eqtextFont{#1}}
+\define@key{eforms}{textsize}{\@eqtextSize{#1}}
+\define@key{eforms}{textcolor}{%
+ \@eqtextColor{#1}%
+}
+\define@key{eforms}{maxlength}{\@eqMaxLen{#1}}
+\define@key{eforms}{normappr}{\@eqI{#1}}
+\define@key{eforms}{rollappr}{\@eqRI{#1}}
+\define@key{eforms}{downappr}{\@eqIX{#1}}
+\define@choicekey{eforms}{layout}[\val\nr]{labelonly,icononly,%
+ icontop,iconbottom,iconleft,iconright,labelover}{%
+ \ifx\annot@type\annot@type@button
+ \expandafter\@eqTP\expandafter{\nr}\fi}{}
+\define@choicekey{eforms}{scalewhen}[\val\nr]{always,never,%
+ iconbig,iconsmall}{%
+ \ifx\annot@type\annot@type@button
+ \ifcase\nr\relax
+ \def\eq@@SW{A}\or
+ \def\eq@@SW{N}\or
+ \def\eq@@SW{B}\or
+ \def\eq@@SW{S}\else
+ \def\eq@@SW{A}\fi
+ \expandafter\@eqSW\expandafter{\eq@@SW}\fi}{}
+\define@choicekey{eforms}{scale}[\val\nr]{proportional,%
+ nonproportional}{%
+ \ifx\annot@type\annot@type@button
+ \ifcase\nr\relax
+ \def\eq@@ST{P}\or
+ \def\eq@@ST{A}\else
+ \def\eq@@ST{P}\fi
+ \expandafter\@eqST\expandafter{\eq@@ST}\fi}{}
+\define@key{eforms}{position}{\@eqPA{#1}}
+\define@choicekey{eforms}{fitbounds}[\val\nr]{true,false}[true]{%
+ \ifx\annot@type\annot@type@button
+ \ifcase\nr\relax
+ \def\eq@@FB{true}\or
+ \def\eq@@FB{false}\else
+ \def\eq@@FB{false}\fi
+ \expandafter\@eqFB\expandafter{\eq@@FB}\fi}{}
+\define@key{efappr}{norm}[]{\def\efappr@norm{#1}}
+\define@key{efappr}{roll}[]{\def\efappr@roll{#1}}
+\define@key{efappr}{down}[]{\def\efappr@down{#1}}
+\setkeys{efappr}{norm,roll,down}
+\define@key{efappr@state}{on}[]{%
+ \expandafter\def\csname \ef@state @on\endcsname{#1}}
+\define@key{efappr@state}{off}[]{%
+ \expandafter\def\csname \ef@state @off\endcsname{#1}}
+\let\norm@on\@empty\let\norm@off\@empty
+\let\roll@on\@empty\let\roll@off\@empty
+\let\down@on\@empty\let\down@off\@empty
+\define@key{eforms}{appr}{\setkeys{efappr}{#1}%
+ \def\ef@state{norm}%
+ \edef\ef@edef@tmp{\noexpand\setkeys{efappr@state}{\efappr@norm}}%
+ \ef@edef@tmp\def\ef@state{roll}%
+ \edef\ef@edef@tmp{\noexpand\setkeys{efappr@state}{\efappr@roll}}%
+ \ef@edef@tmp\def\ef@state{down}%
+ \edef\ef@edef@tmp{\noexpand\setkeys{efappr@state}{\efappr@down}}%
+ \ef@edef@tmp\def\eq@AP{%
+ /AP<<
+ \ifx\efappr@norm\@empty\else/N <<
+ \eq@On\space{\norm@on}/Off {\norm@off}>>\fi
+ \ifx\efappr@roll\@empty\else/R <<
+ \eq@On\space{\roll@on}/Off {\roll@off}>>\fi
+ \ifx\efappr@down\@empty\else/D <<
+ \eq@On\space{\down@on}/Off {\down@off}>>\fi
+ \space>>
+ }%
+}
+\define@choicekey{eforms}{autocenter}[\val\nr]{yes,no}
+{%
+ \ifcase\nr\relax\@eqautoCenter{y}\or
+ \@eqautoCenter{n}\fi
+}{}
+\define@choicekey{eforms}{inline}[\val\nr]{yes,no}
+{%
+ \ifcase\nr\relax\@eqinline{y}\or
+ \@eqinline{n}\fi
+}{}
+\define@key{eforms}{presets}{%
+ \ef@jstoks=\expandafter{#1}%
+ \edef\ef@temp@expand{\noexpand\setkeys{eforms}{\the\ef@jstoks}}%
+ \ef@temp@expand
+}
+\define@choicekey{eforms}{symbolchoice}[\val\nr]%
+ {check,circle,cross,diamond,square,star}
+ {\expandafter\@eqsymbolchoice\expandafter{\val}}{}
+\define@key{eforms}{lock}{\@eqLock{#1}}
+\define@key{eforms}{goto}[]{%
+ \cxkvsetkeys{efgoto}{#1}%
+ \ifx\ef@goto@url\@empty
+ \ifx\ef@goto@file\@empty
+ % Jump within the file
+ \def\ef@subtype{/S/GoTo }%
+ \ifcase\eq@drivernum
+ \def\ef@formatpage{{Page\ef@page}}%
+ \or
+ \def\ef@formatpage{\pdfpageref\ef@page\space\space 0 R}%
+ \or
+ \def\ef@formatpage{@page\ef@page}%
+ \fi
+ \let\ef@open\@empty
+ \let\ef@formatfile\@empty
+ \else
+ % Jump to another PDF
+ \def\ef@subtype{/S/GoToR }%
+ \count0=\ef@page\advance\count0by-1
+ \edef\ef@formatpage{\the\count0 }%
+ \def\ef@formatfile{/F (\ef@goto@file)}%
+ \fi
+ \ifx\ef@goto@targetdest\@empty
+ \ifx\ef@labeldest\@empty
+ % we will jump to a page, it might be the default page
+ \expandafter\@eqA\expandafter{\ef@subtype
+ /D[\ef@formatpage\ef@view]%
+ \ef@formatfile\ef@open}%
+ \else
+ % jump to a label
+ \expandafter\@eqA\expandafter{\ef@subtype%
+ /D (\labelRef{\ef@labeldest})%
+ \ef@formatfile\ef@open}%
+ \fi
+ \else
+ % jump to a target
+ \expandafter\@eqA\expandafter{\ef@subtype%
+ /D (\ef@goto@targetdest)%
+ \ef@formatfile\ef@open}%
+ \fi
+ \else % go to url
+ \ifx\ef@goto@openparams\@empty
+ \@eqA{/S/URI/URI(\ef@goto@url)}\else
+ \@eqA{/S/URI/URI(\ef@goto@url\#\ef@goto@openparams)}%
+ \fi
+ \fi
+}
+\define@key{efgoto}{file}[]{\def\ef@goto@file{#1}}
+\let\ef@goto@file\@empty
+\define@key{efgoto}{url}[]{%
+ \if\ef@linktxtcolor@set0\@eqlinktxtcolor{\@urlcolor}\fi
+ \def\ef@goto@url{#1}%
+}
+\let\ef@goto@url\@empty
+\define@key{efgoto}{openparams}[]{\def\ef@goto@openparams{#1}}
+\let\ef@goto@openparams\@empty
+\define@key{efgoto}{targetdest}[]{\def\ef@goto@targetdest{#1}}
+\let\ef@goto@targetdest\@empty
+\define@key{efgoto}{labeldest}[]{\def\ef@labeldest{#1}}
+\let\ef@labeldest\@empty
+\define@key{efgoto}{page}[1]{\def\ef@page{#1}}
+\def\ef@page{1}
+\def\ef@view{/Fit}%
+\define@choicekey{efgoto}{view}[\val\nr]{fitpage,actualsize,fitwidth,%
+ fitheight,fitvisible,inheritzoom}
+{%
+ \edef\ef@view{\csname dl@\val\endcsname}%
+}{}
+\define@choicekey{efgoto}{open}[\val\nr]{userpref,new,existing}
+{%
+ \ifcase\nr\relax
+ \let\ef@open\@empty\or
+ \def\ef@open{/NewWindow true }\or
+ \def\ef@open{/NewWindow false }\fi
+}{}
+\let\ef@open\@empty
+\define@key{eforms}{launch}[]{%
+ \cxkvsetkeys{eflaunch}{#1}%
+ \@eqA{/S/Launch\ifx\ef@launch@file\@empty\else
+ /F(\ef@launch@file)\fi\ef@launch@open
+ \ifx\ef@launch@win\@empty\else
+ /Win<<\ifx\ef@launchwin@file\@empty
+ /F(\ef@launch@file)\else/F(\ef@launchwin@file)\fi
+ \ifx\ef@launchwin@params\@empty\else
+ /P(\ef@launchwin@params)\fi
+ \ifx\ef@launchwin@open\@empty\else
+ /O(\ef@launchwin@open)\fi
+ \ifx\ef@launchwin@dir\@empty\else
+ /D(\ef@launchwin@dir)\fi>>
+ \fi
+ }%
+}
+\define@key{eflaunch}{file}[]{\def\ef@launch@file{#1}}
+\let\ef@launch@file\@empty
+\define@choicekey{eflaunch}{open}[\val\nr]{userpref,new,existing}
+{%
+ \ifcase\nr\relax
+ \let\ef@launch@open\@empty\or
+ \def\ef@launch@open{/NewWindow true }\or
+ \def\ef@launch@open{/NewWindow false }\fi
+}{}
+\let\ef@launch@open\@empty
+\define@key{eflaunch}{winParams}[]{\def\ef@launch@win{#1}%
+ \setkeys{eflaunchwin}{#1}%
+}\let\ef@launch@win\@empty
+\define@key{eflaunchwin}{file}[]{\def\ef@launchwin@file{#1}}
+\let\ef@launchwin@file\@empty
+\define@key{eflaunchwin}{directory}[]{\def\ef@launchwin@dir{#1}}
+\let\ef@launchwin@dir\@empty
+\define@key{eflaunchwin}{open}[]{\def\ef@launchwin@open{#1}}
+\let\ef@launchwin@open\@empty
+\define@key{eflaunchwin}{params}[]{\def\ef@launchwin@params{#1}}
+\let\ef@launchwin@params\@empty
+\define@key{eforms}{js}[]{\@eqA{\JS{#1}}}
+\@tfor\ef@AActions:={{mouseup}{AAmouseup}}{{mousedown}{AAmousedown}}%
+ {{onenter}{AAmouseenter}}{{onexit}{AAmouseexit}}%
+ {{onfocus}{AAonfocus}}{{onblur}{AAonblur}}%
+ {{format}{AAformat}}{{keystroke}{AAkeystroke}}%
+ {{validate}{AAvalidate}}{{calculate}{AAcalculate}}%
+ {{pageopen}{AApageopen}}{{pageclose}{AApageclose}}%
+ {{pagevisible}{AApagevisible}}%
+ {{pageinvisible}{AApageinvisible}}\do{%
+ \expandafter\getargs\ef@AActions\ef@jstoks={#1}%
+ \edef\temp@expand@def{\noexpand\define@key{eforms}{\aeb@argi}[]%
+ {\noexpand\csname @eq\aeb@argii\noexpand\endcsname%
+ {\the\ef@jstoks}}}%
+ \temp@expand@def
+}
+\define@key{eforms}{objdef}{\@eqobjdef{#1}}
+\define@key{eforms}{taborder}{\@eqtaborder{#1}}
+\endinput
+%%
+%% End of file `uieforms.def'.
diff --git a/texmf-dist/tex/latex/acrotex/usemcfi.def b/texmf-dist/tex/latex/acrotex/usemcfi.def
new file mode 100644
index 00000000..edf05da7
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/usemcfi.def
@@ -0,0 +1,77 @@
+%%
+%% This is file `usemcfi.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% exerquiz.dtx (with options: `copyright,mcfi')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Exerquiz.sty package, %%
+%% Copyright (C) 1999-2017 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\bMCFI{%
+ \withinMCFItrue
+ \ifx\qRadionActionsHook\@empty
+ \let\qRadionActionsHook@SAVE\@empty
+ \def\qRadionActionsHook{\jsR
+ qRadioButtonMCFI(\Ans@choice,"\currQuiz",\thequestionno);}\else
+ \let\qRadionActionsHook@SAVE\qRadionActionsHook
+ \def\qRadionActionsHook{\qRadionActionsHook@SAVE\jsR
+ qRadioButtonMCFI(\Ans@choice,"\currQuiz",\thequestionno);}\fi
+ \ifx\every@RespBoxMath\@empty
+ \let\every@RespBoxMath@SAVE\@empty
+ \def\every@RespBoxMath{%
+ \AddAAKeystroke{mcfiKeyStroke("\currQuiz",\thequestionno);}}%
+ \else
+ \let\every@RespBoxMath@SAVE\every@RespBoxMath
+ \expandafter\def\expandafter\every@RespBoxMath\expandafter{%
+ \every@RespBoxMath@SAVE
+ \AddAAKeystroke{mcfiKeyStroke("\currQuiz",\thequestionno);}}%
+ \fi
+}
+\def\eMCFI{%
+ \ifx\qRadionActionsHook@SAVE\@empty
+ \let\qRadionActionsHook\@empty\else
+ \let\qRadionActionsHook\qRadionActionsHook@SAVE\fi
+ \ifx\every@RespBoxMath@SAVE\@empty
+ \let\every@RespBoxMath\@empty\else
+ \let\every@RespBoxMath\every@RespBoxMath@SAVE\fi
+ \withinMCFIfalse
+}
+\def\eqNA{-43252452452}
+\@ifundefined{text}{\let\MCFIMarkup@BOX\mbox}{\let\MCFIMarkup@BOX\text}
+\newcommand\mcfiMarkupfmt{\cgBdry
+ ${}^{\MCFIMarkup@BOX{\aeb@creditmarkup}}$}
+\def\mcfiMarkup{\addtocounter{questionno}{-1}\mcfiMarkupfmt
+ \stepcounter{questionno}}
+\newcommand{\clickChkBxMCFI}{"Click the check box preceding this
+ math input field to enter text."}
+\begin{insDLJS}{mcf}{Eq: Supports MCFI-type questions}
+function mcfiKeyStroke(qname,n) {
+ if (event.change=="") return;
+ var qNumMC=--n;
+ var mcName="mc."+qname+"."+qNumMC;
+ var mc= this.getField(mcName);
+ var aExpVs=mc.exportValues;
+ var l=aExpVs.length-1;
+ if (!mc.isBoxChecked(l)) {
+ eqAppAlert(\clickChkBxMCFI,3);
+ event.rc=false;
+ }
+}
+function qRadioButtonMCFI(key,qname,n) {
+ var fname = "obj."+qname+"."+(n+1);
+ if ( key == 0) this.resetForm(fname);
+}
+\end{insDLJS}
+\endinput
+%%
+%% End of file `usemcfi.def'.
diff --git a/texmf-dist/tex/latex/acrotex/web.sty b/texmf-dist/tex/latex/acrotex/web.sty
new file mode 100644
index 00000000..42b5ea55
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/web.sty
@@ -0,0 +1,2209 @@
+%%
+%% This is file `web.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% web.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Web package, %%
+%% Copyright (C) 1999-2017 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.
+%%---------------------------------------------------------
+\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+\ProvidesPackage{web}
+ [2017/03/20 v6.0o web: A Screen Design Package (dps)]
+\RequirePackage{xkeyval}
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+\IfFileExists{xcolor.sty}{%
+ \def\eq@ColorPackage{xcolor}%
+ \PassOptionsToPackage{xcolor}{table,hyperref}%
+}{\def\eq@ColorPackage{color}}
+\DeclareOptionX{noxcolor}{\def\eq@ColorPackage{color}}
+\let\i@web@ddtoHyOpts\@empty
+\let\eq@driver@name\@empty
+\let\web@YES=y \let\web@NO=n
+\DeclareOptionX{dvipsone}{%
+ \def\eq@drivernum{0}\def\eq@driver@name{dvipsone}%
+ \let\web@set@paper\@empty
+ \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}%
+}
+\DeclareOptionX{dviwindo}{%
+ \def\eq@drivernum{4}\def\eq@driver@name{dviwindo}%
+ \@namedef{papersize@for@\eq@driver@name}{\def\web@set@paper{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}%
+}
+\DeclareOptionX{dvipdfm}{%
+ \def\eq@drivernum{2}\def\eq@driver@name{dvipdfm}%
+ \web@opts@xdvipdfmx
+}
+\DeclareOptionX{dvipdfmx}{%
+ \def\eq@drivernum{2}\def\eq@driver@name{dvipdfmx}%
+ \web@opts@xdvipdfmx
+}
+\DeclareOptionX{xetex}{%
+ \def\eq@drivernum{2}\def\eq@driver@name{xetex}%
+ \web@opts@xdvipdfmx
+}
+\newcommand{\web@opts@xdvipdfmx}{%
+ \@namedef{papersize@for@\eq@driver@name}%
+ {\def\web@set@paper{\AtBeginDvi{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}}%
+}
+\DeclareOptionX{dvips}{%
+ \def\eq@drivernum{0}\def\eq@driver@name{dvips}%
+ \def\i@web@ddtoHyOpts{setpagesize=false}%
+ \let\web@set@paper\@empty
+ \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}%
+}
+\DeclareOptionX{pdftex}{\ifx\eq@driver@name\@empty
+ \def\eq@drivernum{1}\def\eq@driver@name{pdftex}%
+ \def\i@web@ddtoHyOpts{setpagesize}\def\web@set@paper{}\fi
+}
+\DeclareOptionX{luatex}{\ifx\eq@driver@name\@empty
+ \def\eq@drivernum{1}\def\eq@driver@name{luatex}%
+ \def\i@web@ddtoHyOpts{setpagesize}\def\web@set@paper{}\fi
+}
+\DeclareOptionX{textures}{%
+ \def\eq@drivernum{3}\def\eq@driver@name{textures}%
+ \@namedef{papersize@for@\eq@driver@name}%
+ {\def\web@set@paper{\bgroup
+ \dimen2=\origpaperheight \advance\dimen2 by -\topmargin
+ \dimen0\dimen2 \advance\dimen0-\paperheight
+ \xdef\@pdfpagescrop{0 \strip@pt\dimen0 \space
+ \strip@pt\paperwidth\space \strip@pt\dimen2}%
+ \egroup}%
+ \AtEndOfPackage{%
+ \edef\origpaperwidth{\the\paperwidth}%
+ \edef\origpaperheight{\the\paperheight}%
+ }%
+ }%
+}
+\@ifundefined{ifequsecolor}{\newif\ifequsecolor \equsecolorfalse}{}
+\DeclareOptionX{forpaper}{\equsecolorfalse\eqforpapertrue
+ \PassOptionsToPackage{forpaper}{eqexam}
+ \PassOptionsToPackage{monochrome}{\eq@ColorPackage}%
+ \PassOptionsToPackage{forpaper}{exerquiz}}
+\DeclareOptionX{forcolorpaper}{\equsecolortrue\eqforpapertrue
+ \PassOptionsToPackage{forcolorpaper}{eqexam}
+ \PassOptionsToPackage{forcolorpaper}{exerquiz}}
+\DeclareOptionX{latexlayout}{%
+ \let\web@layout\web@NO\ExecuteOptionsX{forcolorpaper}}
+\DeclareOptionX{uselatexsectioning}{%
+ \web@sectioningfalse
+}
+\newif\ifweb@sectioning \web@sectioningtrue
+\DeclareOptionX{weblikeclass}{%
+ \ExecuteOptionsX{latexlayout}%
+ \ExecuteOptionsX{nobullets}%
+ \ExecuteOptionsX{uselatexsectioning}%
+}
+\DeclareOptionX{nodirectory}{\let\web@directory@option\web@NO}
+\DeclareOptionX{usedirectory}{\let\web@directory@option\web@YES}
+\DeclareOptionX{latextoc}{\let\web@latextoc\web@YES}
+\DeclareOptionX{nobullets}{\let\web@bullets\web@NO
+ \let\web@latextoc\web@YES\forceSubSubNumbers}
+\def\web@MargScrDimOpts#1#2#3#4#5#6{%
+ \margins{#1}{#2}{#3}{#4} % left,right,top, bottom
+ \screensize{#5}{#6} % height, width
+ \let\margins\@@margins\let\screensize\@gobbletwo
+}
+\DeclareOptionX{designi}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{3.736in}{4.67in}}}
+\DeclareOptionX{designii}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{5in}}}
+\DeclareOptionX{designiii}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{5in}{6in}}}
+\DeclareOptionX{designiv}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4in}{5in}}}
+\DeclareOptionX{designv}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{6in}}}
+\DeclareOptionX{designvi}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.17in}{4.67in}}}
+\DeclareOptionX{designvii}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{7.5in}{10in}}}
+\DeclareOptionX{designviii}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6.67in}}}
+\DeclareOptionX{designix}{\AtEndOfPackage{%
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6in}}}
+\DeclareOptionX{usesf}{%
+ \def\aeb@defaultfamily{\sffamily}
+ \def\itdefault{sl}
+ \renewcommand{\familydefault}{\sfdefault}
+ \selectfont
+ \renewcommand\labelitemi{\textrm{\textbullet}}
+ \AtEndOfPackage{\def\web@copyright@symbol{\textrm{\copyright}}}
+}
+\def\aeb@defaultfamily{\rmfamily}
+\DeclareOptionX{unicode}{\def\aeb@useunicode{unicode}}
+\let\aeb@useunicode\@gobble
+\newif\if@web@hyperref \@web@hyperreftrue
+\DeclareOptionX{xhyperref}{\@web@hyperreffalse}
+\define@choicekey+{webHyOpts}{pdfencoding}[\val\nr]%
+ {auto,pdfdoc,unicode}[pdfdoc]{\edef\web@Hypdfencoding{\val}}
+ {\PackageWarning{web}{Bad choice for pdfencoding,
+ permissible values\MessageBreak
+ are auto, pdfdoc, and unicode.\MessageBreak Try again}}
+\let\web@Hypdfencoding\@empty
+\let\u@web@ddtoHyOpts\@empty
+\let\u@web@ddtoHySetup\@empty
+\def\web@addtoHyOpts#1{\g@addto@macro\u@web@ddtoHyOpts{#1}}
+\def\web@addtoHySetup#1{\g@addto@macro\u@web@ddtoHySetup{#1}}
+\define@key{web.sty}{addtoHyOpts}[]{%
+ \setkeys*{webHyOpts}{#1}\web@addtoHyOpts{#1}}
+\define@key{web.sty}{addtoHyOpts*}[]{%
+ \setkeys*{webHyOpts}{#1}\web@addtoHySetup{#1}}
+\DeclareOptionX{useui}{\PassOptionsToPackage{useui}{eforms}}
+\DeclareOptionX{forceSubSubNumbers}{\ExecuteOptionsX{nobullets}}
+\DeclareOptionX{centertitlepage}{\@centertitlepagetrue}
+\newif\if@centertitlepage \@centertitlepagefalse
+\DeclareOptionX{centertitlepagefull}{\@centertitlepagefulltrue}
+\newif\if@centertitlepagefull \@centertitlepagefullfalse
+\DeclareOptionX{pro}{\let\webpro@loaded\web@YES}
+\DeclareOptionX{extended}{\let\webpro@loaded\web@YES}
+\let\webpro@loaded\web@NO
+\def\loadwebpro{\InputIfFileExists{webpro.def}{}{}}
+\newif\ifweb@allowtemplates \web@allowtemplatestrue
+\DeclareOptionX{draft}{\web@allowtemplatesfalse}
+\DeclareOptionX{usetemplates}{\def\@usetemplates{1}}
+\DeclareOptionX{leftpanel}%
+ {\def\@panelconfig{1}\def\@usetemplates{1}}
+\DeclareOptionX{rightpanel}%
+ {\def\@panelconfig{2}\def\@usetemplates{1}}
+\newif\iftemplatesforpaper \templatesforpaperfalse
+\DeclareOptionX{templatesforpaper}{\templatesforpapertrue
+ \ExecuteOptionsX{forcolorpaper}}
+\DeclareOptionX{rightpanelprt}{%
+ \ifeqforpaper\else\ExecuteOptionsX{rightpanel}\fi
+}
+\DeclareOptionX{leftpanelprt}{%
+ \ifeqforpaper\else\ExecuteOptionsX{leftpanel}\fi
+}
+\def\templatedefaults{\def\@panelsep{0pt}\def\@usetemplates{0}%
+ \def\@panelconfig{0}\def\@textX{0}\def\@panelX{0}%
+}
+\templatedefaults
+\DeclareOptionX{navibar}{\web@navibartrue}
+\DeclareOptionX{tight}{\AtEndOfPackage{\tightsettings}}
+\DeclareOptionX{tight*}{\AtEndOfPackage{\tightsettings*}}
+\let\web@tight\web@NO
+\DeclareOptionX{uselatexparts}{%
+ \AtEndOfPackage{\@ifundefined{part}{}{\let\part\web@save@part}}}
+\DeclareOptionX{uselatexchapters}{%
+ \AtEndOfPackage{\@ifundefined{chapter}{}
+ {\let\chapter\web@save@chapter}}}
+\DeclareOptionX{french}{%
+ \AtEndOfPackage{%
+ % Recouvrement de \today
+ \def\today{\the\day\ \ifcase\month\or janvier
+ \or f\'evrier \or mars \or avril
+ \or mai \or juin \or juillet \or ao\^ut
+ \or septembre \or octobre \or novembre
+ \or d\'ecembre \fi \the\year}
+ \def\web@toc{Table des mati\`{e}res}
+ \def\web@continued{suite}
+ \def\web@article{D\'{e}but \hyperlink{\web@Start.1}{Document}}
+ \def\web@directory{R\'{e}pertoire}
+ \def\web@revision{Mise \`{a} jour :}
+ \def\web@copyright{Copyright}
+ \def\web@versionlabel{Version}
+ \def\web@back{Retour}}
+ \PassOptionsToPackage{french}{exerquiz}
+}
+\DeclareOptionX{german}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day. \ifcase\month\or Januar
+ \or Februar \or M\"{a}rz \or April
+ \or Mai \or Juni \or Juli \or August
+ \or September \or Oktober \or November
+ \or Dezember \fi \the\year}
+ \def\web@versionlabel{Version}
+ \def\web@toc{Inhaltsverzeichnis}
+ \def\web@continued{Forts.}
+ \def\web@article{Anfang \hyperlink{\web@Start.1}{Artikel}}
+ \def\web@directory{\"Ubersicht}
+ \def\web@revision{Letzte \"Anderung:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Abschnitt}
+ \def\web@back{Zur\"uck}
+ \def\web@doc{Dok}}
+ \PassOptionsToPackage{german}{exerquiz}
+}
+\DeclareOptionX{norsk}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or Januar
+ \or Februar \or Mars \or April
+ \or Mai \or Juni \or Juli \or August
+ \or September \or Oktober \or November
+ \or Desember \fi \the\day, \the\year}
+ \def\web@versionlabel{Versjon}
+ \def\web@toc{Innholdsfortegnelse}
+ \def\web@continued{forts.}
+ \def\web@article{Start \hyperlink{\web@Start.1}{artikkel}}
+ \def\web@directory{Katalog}
+ \def\web@revision{Sist endret:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Avsnitt}
+ \def\web@back{Tilbake}
+ \def\web@doc{Dok}}
+ \PassOptionsToPackage{norsk}{exerquiz}
+}
+\DeclareOptionX{dutch}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day~\ifcase\month\or januari
+ \or februari \or maart \or april
+ \or mei \or juni \or juli \or augustus
+ \or september \or oktober \or november
+ \or december \fi \space \the\year}
+ \def\web@versionlabel{Versie}
+ \def\web@toc{Inhoudsopgave}
+ \def\web@continued{vervolg}
+ \def\web@article{Begin \hyperlink{\web@Start.1}{Artikel}}
+ \def\web@directory{Overzicht}
+ \def\web@revision{Laatste wijziging:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Sectie}
+ \def\web@back{Terug}
+ \def\web@doc{Doc}}
+ \PassOptionsToPackage{dutch}{exerquiz}
+}
+\DeclareOptionX{spanish}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day\ de \ifcase\month\or Enero
+ \or Febrero \or Marzo \or Abril
+ \or Mayo \or Junio \or Julio \or Agosto
+ \or Septiembre \or Octubre \or Noviembre
+ \or Deciembre \fi de \the\year}
+ \renewcommand\web@versionlabel{Versi\noexpand\'{o}n}
+ \renewcommand\web@toc{Tabla de Contenido}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inicio
+ \hyperlink{\web@Start.1}{Art\'{\i}culo}}
+ \renewcommand\web@directory{Directorio}
+ \renewcommand\web@revision{Actualizado el:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Secci\'on}
+ \renewcommand\web@back{Volver}
+ \renewcommand\web@doc{Doc}}
+ \PassOptionsToPackage{spanish}{exerquiz}
+}
+\DeclareOptionX{italian}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or Gennaio
+ \or Febbraio \or Marzo \or Aprile
+ \or Maggio \or Giugno \or Luglio \or Agosto
+ \or Settembre \or Ottobre \or Novembre
+ \or Dicembre \fi \the\day, \the\year}
+ \renewcommand\web@versionlabel{Versione}
+ \renewcommand\web@toc{Indice}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inizio \hyperlink{\web@Start.1}{Articolo}}
+ \renewcommand\web@directory{Directory}
+ \renewcommand\web@revision{Data Ultima Revisione:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Sezione}
+ \renewcommand\web@back{Back}
+ \renewcommand\web@doc{Doc}}
+ \PassOptionsToPackage{italian}{exerquiz}
+}
+\DeclareOptionX{russian}{%
+ \ExecuteOptionsX{unicode}%
+ \AtEndOfPackage{%
+ \def\today{\the\day\ \ifcase\month
+ \or \cyrya\cyrn\cyrv\cyra\cyrr\cyrya
+ \or \cyrf\cyre\cyrv\cyrr\cyra\cyrl\cyrya
+ \or \cyrm\cyra\cyrr\cyrt\cyra
+ \or \cyra\cyrp\cyrr\cyre\cyrl\cyrya
+ \or \cyrm\cyra\cyrya
+ \or \cyri\cyryu\cyrn\cyrya
+ \or \cyri\cyryu\cyrl\cyrya
+ \or \cyra\cyrv\cyrg\cyru\cyrs\cyrt\cyra
+ \or \cyrs\cyre\cyrn\cyrt\cyrya\cyrb\cyrr\cyrya
+ \or \cyro\cyrk\cyrt\cyrya\cyrb\cyrr\cyrya
+ \or \cyrn\cyro\cyrya\cyrb\cyrr\cyrya
+ \or \cyrd\cyre\cyrk\cyrya\cyrb\cyrr\cyrya \fi{ }%
+ \the\year\ \cyrg.}
+ \gdef\eq@protected##1##2{{\ifhmode ##2\else
+ \ifvmode ##2\else\ifinner##2\else\noexpand ##1\fi\fi\fi}}%
+ \def\cyrCommand##1##2{\def##1{\eq@protected##1{##2}}}%
+ \cyrCommand\web@toc{\CYRO\cyrg\cyrl\cyra\cyrv\cyrl\cyre\cyrn%
+ \cyri\cyre}
+ \cyrCommand\web@continued{\cyrp\cyrr\cyro\cyrd\cyro\cyrl%
+ \cyrzh\cyre\cyrn\cyri\cyre}
+ \cyrCommand\web@article{\CYRN\cyra\cyrch\cyra\cyrl\cyro{ }%
+ \hyperlink{\web@Start.1}{\cyrd\cyro\cyrk\cyru\cyrm\cyre%
+ \cyrn\cyrt\cyra}}
+ \cyrCommand\web@directory{\CYRS\cyro\cyrd\cyre\cyrr\cyrzh%
+ \cyra\cyrn\cyri\cyre}
+ \cyrCommand\web@revision{\CYRP\cyro\cyrs\cyrl\cyre\cyrd\cyrn%
+ \cyrya\cyrya{ }\cyrr\cyre\cyrv\cyri\cyrz\cyri\cyrya:}
+ \let\web@copyright\@gobble
+ \cyrCommand\web@versionlabel{\CYRV\cyre\cyrr\cyrs\cyri\cyrya}
+ \cyrCommand\web@back{\CYRN\cyra\cyrz\cyra\cyrd}
+ \cyrCommand\web@section{\CYRCH\cyra\cyrs\cyrt\cyrsftsn}}
+ \PassOptionsToPackage{russian}{exerquiz}
+}
+\DeclareOptionX{dansk}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or Januar
+ \or Februar \or Marts \or April
+ \or Maj \or Juni \or Juli \or August
+ \or September \or Oktober \or November
+ \or December \fi \the\day, \the\year}
+ \renewcommand\web@versionlabel{Version}
+ \renewcommand\web@toc{Indholdsfortegnelse}
+ \renewcommand\web@continued{forts.}
+ \renewcommand\web@article{Begin \hyperlink{\web@Start.1}{Artikel}}
+ \renewcommand\web@directory{Katalog}
+ \renewcommand\web@revision{Sidst revideret:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Afsnit}
+ % Label Navibar
+ \renewcommand\web@back{Tilbage}
+ \renewcommand\web@doc{Dok}} % restricted to three characters
+ \PassOptionsToPackage{dansk}{exerquiz}
+}
+\DeclareOptionX{polish}{%
+ \AtEndOfPackage{%
+ \def\today{\ifcase\month\or {Stycze\'{n}}
+ \or Luty \or Marzec \or {Kwiecie\'{n}}
+ \or Maj \or Czerwiec \or Lipiec \or {\'{S}ierpie\'{n}}
+ \or {Wrzesie\'{n}} \or {Pa\'{z}dziernik} \or Listopad
+ \or {Grudzie\'{n}} \fi \the\day, \the\year}
+ \renewcommand\web@versionlabel{Wersja}
+ \renewcommand\web@toc{Spis Tre\'{s}ci}
+ \renewcommand\web@continued{verte}
+ \renewcommand\web@article{Pocz\k{a}tek do
+ \hyperlink{\web@Start.1}{Tekstu}}
+ \renewcommand\web@directory{Zawarto\'{s}\'{c}}
+ \renewcommand\web@revision{Ostatnia zmiana:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Cze\'{s}\'{c}}
+ % Label Navibar
+ \renewcommand\web@back{Wstecz}
+ \renewcommand\web@doc{Dok}} % restricted to three characters
+ \PassOptionsToPackage{polish}{exerquiz}
+}
+\DeclareOptionX{finnish}{%
+ \AtEndOfPackage{%
+ % Recouvrement de \today
+ \def\today{\the\day\ \ifcase\month\or Tammikuu
+ \or Helmikuu \or Maaliskuu \or Huhtikuu
+ \or Toukokuu \or Kes\"{a}kuu \or Hein\"{a}kuu \or Elokuu
+ \or Syyskuu \or Lokakuu \or Marraskuu
+ \or Joulukuu \fi \the\year}
+ \def\web@toc{Sis\"{a}llys}
+ \def\web@continued{jatka}
+ \def\web@article{Aloita \hyperlink{section.1}{Artikkeli}}
+ \def\web@directory{Hakemisto}
+ \def\web@revision{Muutettu viimeeksi:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Kappale}
+ \def\web@versionlabel{Versio}
+ \def\web@back{Takaisin}}
+ \PassOptionsToPackage{finnish}{exerquiz}
+}
+\DeclareOptionX{catalan}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day\ de \ifcase\month\or Gener
+ \or Febrer \or Mar\c{c} \or Abril
+ \or Maig \or Juny \or Juliol \or Agost
+ \or Setembre \or Octubre \or Novembre
+ \or Desembre \fi de \the\year}
+ \renewcommand\web@versionlabel{Versi\noexpand\'{o}}
+ \renewcommand\web@toc{Taula de Contingut}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inici \hyperlink{\web@Start.1}{Article}}
+ \renewcommand\web@directory{Directori}
+ \renewcommand\web@revision{Actualizat el:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Secci\'o}
+ \renewcommand\web@back{Tornar}
+ \renewcommand\web@doc{Doc}}
+ \PassOptionsToPackage{catalan}{exerquiz}
+}
+\DeclareOptionX{czech}{%
+ \AtEndOfPackage{%
+ \def\today{\number\day. \ifcase\month\or ledna\or \'unora\or
+ b\v{r}ezna\or dubna\or kv\v{e}tna\or \v{c}ervna\or \v{c}ervence\or
+ srpna\or z\'a\v{r}\'\i\or \v{r}\'{\i}jna\or listopadu\or prosince\fi
+ \space\number\year}
+ \def\web@versionlabel{Verze}
+ \def\web@toc{Obsah}
+ \def\web@continued{pokr.}
+ \def\web@article{Za\v{c}\'{a}tek \hyperlink{\web@Start.1}{textu}}
+ \def\web@directory{Rozcestn\'{\i}k}
+ \def\web@revision{Posledn\'{\i} zm\v{e}na}
+ \def\web@copyright{Copyright}
+ \def\web@section{Kapitola}
+ \def\web@back{Zp\v{e}t}
+ \def\web@doc{Dok}}
+ \PassOptionsToPackage{czech}{exerquiz}
+}
+\DeclareOptionX{brazil}{%
+ \AtEndOfPackage{%
+ \def\today{\the\day\ de \ifcase\month\or janeiro
+ \or fevereiro \or mar\c{c}o \or abril
+ \or maio \or junho \or julho \or agosto
+ \or setembro \or outubro \or novembro
+ \or dezembro \fi de \the\year}
+ \renewcommand\web@versionlabel{Vers\~{a}o}
+ \renewcommand\web@toc{Tabela de Conte\'{u}do}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inicie o
+ \hyperlink{\web@Start.1}{Artigo}}
+ \renewcommand\web@directory{Diret\'{o}rio}
+ \renewcommand\web@revision{Atualizado em:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Se\c{c}\noexpand\~{a}o}
+ \renewcommand\web@back{Voltar}
+ \renewcommand\web@doc{Doc}}
+ \PassOptionsToPackage{brazil}{exerquiz}
+}
+\DeclareOptionX{turkish}{%
+ \ExecuteOptionsX{unicode}%
+ \AtEndOfPackage{%
+ \def\today{\the\day\ \ifcase\month\or Ocak
+ \or \c{S}ubat \or Mart \or Nisan
+ \or May{\i}s \or Haziran \or Temmuz \or A\u{g}ustos
+ \or Eyl\"ul \or Ekim \or Kas{\i}m
+ \or Aral{\i}k \fi \the\year}
+ \def\web@toc{{\.I}\c{c}indekiler}
+ \def\web@continued{suite}
+ \def\web@article{\hyperlink{\web@Start.1}{D\"ok\"umanta} ba{\c s}la}
+ \def\web@directory{Dosya}
+ \def\web@revision{Son versiyon tarihi :}
+ \def\web@copyright{Copyright}
+ \def\web@versionlabel{Versiyon}
+ \def\web@section{K{\i}s{\i}m}
+ \def\web@back{Geri}
+ \def\web@doc{D\"ok}}
+ \PassOptionsToPackage{turkish}{exerquiz}
+}
+\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}
+ {\eq@ColorPackage}}
+\@ifpackageloaded{xcolor}%
+{%
+ \@ifpackagelater{xcolor}{2004/07/04}{}
+ {%
+ \PackageError{web}{%
+ *************************************************\MessageBreak
+ * Your Version of `xcolor.sty' is too old!\MessageBreak
+ * You need the version from 2004/07/04 or newer\MessageBreak
+ * or use: \string\usepackage[noxcolor]{web}\MessageBreak
+ * or \string\documentclass[noxcolor]{article}\MessageBreak
+ *************************************************}{}%
+ }%
+}{}
+\newif\ifweb@navibar\web@navibarfalse
+\def\NaviBarOn{\global\web@navibartrue}
+\def\NaviBarOff{\global\web@navibarfalse}
+\newif\ifeqforpaper \eqforpaperfalse % for those who insist on paper
+\newif\ifweb@papersize@set \web@papersize@setfalse
+\newif\ifweb@margins@set \web@margins@setfalse
+\newif\if@defaultsubsubding \@defaultsubsubdingtrue
+\def\forceSubSubNumbers{%
+ \ifx\web@latextoc\web@YES\else
+ \PackageWarning{webpro}{\string\forSubSubNumbers\space
+ requested,\MessageBreak I'm adding the option of latextoc}\fi
+ \let\web@latextoc\web@YES\@defaultsubsubdingfalse
+}
+\@ifclassloaded{report}{\newif\if@mainmatter\@mainmattertrue}{}
+\newcommand\NewPage{\ifeqforpaper\else\newpage\fi}
+\let\web@directory@option\web@NO
+\let\web@latextoc\web@NO
+\let\web@layout\web@YES
+\let\web@bullets\web@YES
+\def\web@finalDot{.}
+\def\noFinalDot{\let\web@finalDot\@empty}
+\@onlypreamble\noFinalDot
+\def\minPanelWidth#1{\def\web@minpanelwidth{#1}}
+\minPanelWidth{1in}
+\ifpdf\ExecuteOptionsX{pdftex}\else
+ \ifxetex\ExecuteOptionsX{xetex}\else
+ \let\ExecuteOptions@SAVE\ExecuteOptions
+ \let\ExecuteOptions\ExecuteOptionsX
+ \InputIfFileExists{web.cfg}{}
+ {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
+ {\ExecuteOptionsX{dvipsone}}}%
+ \let\ExecuteOptions\ExecuteOptions@SAVE
+ \fi\fi
+\ProcessOptionsX
+\ifx\web@Hypdfencoding\@empty\else
+ \let\aeb@useunicode\@gobble\fi
+\def\w@csarg#1#2{\expandafter#1\csname#2\endcsname}
+\@nameuse{papersize@for@\eq@driver@name}
+\ifx\web@layout\web@YES\else\templatedefaults\fi
+\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}
+\pdfmarkupfalse\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
+\iftemplatesforpaper\def\@usetemplates{1}\fi
+\if@centertitlepagefull\@centertitlepagetrue\fi
+\RequirePackage{\eq@ColorPackage}
+\RequirePackage{calc}
+\RequirePackage{amssymb}% used for navibar
+\edef\web@RequireHyperref{\noexpand\RequirePackage[%
+ \ifpdf\else\ifxetex\else\eq@driver@name,\fi\fi
+ bookmarks,bookmarksnumbered,bookmarksopen,%
+ colorlinks,\aeb@useunicode,linkcolor=webgreen,%
+ filecolor=webbrown,citecolor=webgreen,%
+ urlcolor=webbrown,pagebackref,pdfpagemode=UseNone,%
+ pdfstartview=Fit,pdfpagelayout=SinglePage%
+ \ifx\u@web@ddtoHyOpts\@empty\else,\u@web@ddtoHyOpts\fi
+ \ifx\i@web@ddtoHyOpts\@empty\else,\i@web@ddtoHyOpts\fi]{hyperref}%
+}
+\def\w@isHyLoaded{\@ifpackageloaded{hyperref}{}{\PackageError{web}
+ {The xhyperref option used, but hyperref is not\MessageBreak
+ already loaded. Will load hyperref with the options\MessageBreak
+ chosen by web}{Remove xhyperref or load hyperref prior to the web
+ package.}\web@RequireHyperref}%
+}
+\if@web@hyperref\expandafter\web@RequireHyperref\else
+ \expandafter\w@isHyLoaded\fi
+\ifx\u@web@ddtoHySetup\@empty\else\edef\x{\noexpand\hypersetup
+ {\u@web@ddtoHySetup}}\expandafter\x\fi
+\def\@pdfcreator{The AcroTeX eDucation Bundle}
+\RequirePackage{comment}
+\ifnum\@usetemplates=1\relax
+ \def\x{\RequirePackage{graphicx}}\expandafter\x\fi
+\ifnum\@usetemplates=1\relax
+ \RequirePackage{eso-pic}
+ \ifnum\eq@drivernum=2\relax
+ \def\web@set@paper{\AddToShipoutPicture*{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}%
+ \AtBeginShipoutFirst{%
+ \begingroup
+ \@ifundefined{stockwidth}{%
+ \ifx\special@paper\@empty
+ \special{papersize=\the\paperwidth,\the\paperheight}%
+ \else
+ \special{papersize=\special@paper}%
+ \fi
+ }{%
+ \ifdim\stockwidth=\z@
+ \else
+ \special{papersize=\the\stockwidth,\the\stockheight}%
+ \fi
+ }%
+ \endgroup
+ }%
+ \@ifundefined{@ShipoutPicture}{}{%
+ \renewcommand{\@ShipoutPicture}{%
+ \bgroup
+ \@tempswafalse%
+ \ifx\ESO@HookI\@empty\else\@tempswatrue\fi%
+ \ifx\ESO@HookII\@empty\else\@tempswatrue\fi%
+ \if@tempswa%
+ \@tempdima=1in\@tempdimb=-\@tempdima%
+ \advance\@tempdimb\paperheight
+ \@ifundefined{stockwidth}{}{%
+ \advance\@tempdima+\trimedge%
+ \advance\@tempdima+\paperwidth%
+ \advance\@tempdima-\stockwidth%
+ \if@twoside\ifodd\c@page\else%
+ \advance\@tempdima-2\trimedge%
+ \advance\@tempdima-\paperwidth%
+ \advance\@tempdima+\stockwidth%
+ \fi\fi%
+ \advance\@tempdimb+\trimtop}%
+ \unitlength=1pt%
+ \global\setbox\@cclv\vbox{%
+ \vbox{\let\protect\relax
+ \pictur@(0,0)%
+ (\strip@pt\@tempdima,\strip@pt\@tempdimb)%
+ \ESO@HookII\ESO@HookI\global\let\ESO@HookII\@empty%
+ \endpicture}%
+ \box\@cclv%
+ }%
+ \fi
+ \egroup
+ }%
+ }%
+ \fi
+\fi
+\def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}}
+\let\getargsii\getargs
+\newlength{\textscreenwidth}
+\setlength{\textscreenwidth}{\paperwidth}
+\newlength{\@panelwidth}
+\def\panelscreenwidth{\@panelwidth}
+\newdimen\@Leftmargin \@Leftmargin=0pt
+\newdimen\@Rightmargin \@Rightmargin=0pt
+\newdimen\@Bottommargin \@Bottommargin=0pt
+\newdimen\@Topmargin \@Topmargin=0pt
+\newdimen\web@Topmargin \web@Topmargin=8pt
+\newcommand{\websetheadheight}{8pt}
+\newcommand{\web@footskip}{4pt}
+\def\web@additionalheadsep{0pt}
+\pagestyle{empty}
+\def\InitLayout
+{%
+ \ifeqforpaper\else
+ \setlength\headheight{\websetheadheight}
+ \hoffset=0pt \voffset=0pt
+ \fi
+ \ifeqforpaper\else
+ {\@tempdima=\paperwidth
+ \addtolength{\@tempdima}{-\@Leftmargin}%
+ \addtolength{\@tempdima}{-\@Rightmargin}%
+ \xdef\fullscreenwidth{\the\@tempdima}}%
+ \fi
+ \ifx\web@layout\web@YES\else\templatedefaults\fi
+ \ifeqforpaper\else
+ \setlength{\textwidth}{\paperwidth}
+ \setlength{\textheight}{\paperheight}
+ \addtolength{\textheight}{-\@Topmargin}
+ \addtolength{\textheight}{-\@Bottommargin}
+ \setlength{\headsep}{\@Topmargin}
+ \addtolength\headsep{-\headheight}
+ \setlength{\topmargin}{\web@Topmargin}
+ \addtolength\headsep{-\topmargin}
+ \addtolength\headsep{\web@additionalheadsep}
+ \addtolength{\topmargin}{-1in}
+ \setlength\footskip{\@Bottommargin}
+ \addtolength{\footskip}{-\web@footskip} % depth of navibar
+ \ifcase\@panelconfig
+ \setlength{\oddsidemargin}{\@Leftmargin}
+ \setlength{\evensidemargin}{\@Leftmargin}
+ \or
+ \setlength{\oddsidemargin}{\@panelwidth}
+ \setlength{\evensidemargin}{\@panelwidth}
+ \or
+ \setlength{\oddsidemargin}{\@Leftmargin}
+ \setlength{\evensidemargin}{\@Leftmargin}
+ \fi
+ \addtolength{\evensidemargin}{-1in}
+ \addtolength{\oddsidemargin}{-1in}
+ \fi
+ \ifx\web@layout\web@YES
+ \ifcase\@panelconfig
+ \addtolength{\textwidth}{-\@Leftmargin}
+ \addtolength{\textwidth}{-\@Rightmargin}
+ \or % leftpanel
+ \addtolength{\textwidth}{-\@panelwidth}
+ \addtolength{\textwidth}{-\@Rightmargin}
+ \or % rightpanel
+ \addtolength{\textwidth}{-\@panelwidth}
+ \addtolength{\textwidth}{-\@Leftmargin}
+ \fi
+ \ifnum\@usetemplates=1\relax
+ \setlength{\textscreenwidth}{\paperwidth}
+ \def\@textX{0}
+ \ifnum\@panelconfig=1 % leftpanel
+ \addtolength{\textwidth}{-\@panelsep}
+ \addtolength{\oddsidemargin}{\@panelsep}
+ \addtolength{\evensidemargin}{\@panelsep}
+ \addtolength{\textscreenwidth}{-\@panelwidth}
+ \def\@textX{\strip@pt\@panelwidth}
+ \def\@panelX{0}
+ \fi
+ \ifnum\@panelconfig=2 % rightpanel
+ \addtolength{\textwidth}{-\@panelsep}
+ \addtolength{\textscreenwidth}{-\@panelwidth}
+ \def\@textX{0}
+ \def\@panelX{\strip@pt\textscreenwidth}
+ \fi
+ \calculatefullwidth
+ \fi
+ \fi
+}
+\def\@convLtoP#1#2{%
+ \afterassignment\@convLtoP@i\dimen@#2bp\relax{#1}{#2}}
+\def\@convLtoP@i#1\relax#2#3{%
+ \if!#1!%
+ \def#2{#3}%
+ \else
+ \dimen@.99626\dimen@
+ \edef#2{\strip@pt\dimen@}%
+ \fi}
+\providecommand\setPageDevice[3][600]{\bgroup
+ \@convLtoP{\width}{#2}\@convLtoP{\height}{#3}
+ \ifpdfmarkup\headerps@out{<< /HWResolution [#1 #1] %
+ /PageSize [\width\space\height] >> setpagedevice}\else
+ \PackageWarning{web}{This is a distiller only command,\MessageBreak
+ ignoring \string\setPageDevice}\fi\egroup}
+\providecommand\allowTransparency{\bgroup
+ \ifpdfmarkup\headerps@out{<< %
+ /AllowTransparency true >> setdistillerparams}\else
+ \PackageWarning{web}{This is a distiller only command,\MessageBreak
+ ignoring \string\allowTransparency}\fi\egroup}
+\@onlypreamble\setPageDevice
+\@onlypreamble\allowTransparency
+\def\screensize#1#2{%
+ \def\webSaveSSDim{{#1}{#2}}%
+ \begingroup
+ \ifeqforpaper
+ \ifx\web@layout\web@YES
+ \setlength{\@tempdima}{#2}%
+ \global\textwidth\@tempdima
+ \addtolength{\@tempdima}{-\@Leftmargin}%
+ \addtolength{\@tempdima}{-\@Rightmargin}%
+ \xdef\fullscreenwidth{\the\@tempdima}%
+ \else
+ \xdef\fullscreenwidth{\the\textwidth}%
+ \fi
+ \else
+ \setlength{\@tempdima}{#1}%
+ \global\paperheight\@tempdima
+ \setlength{\@tempdima}{#2}%
+ \global\paperwidth\@tempdima
+ \fi
+ \endgroup
+ \web@papersize@settrue
+ \web@set@paper % dps modified
+ \let\screensize\@gobbletwo
+ \InitLayout
+}
+\let\screensize@web@save\screensize
+\newcommand{\setScreensizeFromGraphic}[2][]{%
+ \getDimsFromGraphic[#1]{#2}%
+ {\web@graphicScreenWidth}{\web@graphicScreenHeight}%
+ \screensize{\web@graphicScreenHeight}{\web@graphicScreenWidth}%
+}
+\@onlypreamble\setScreensizeFromGraphic
+\newcommand{\getDimsFromGraphic}[4][]{{%
+ \setbox0=\hbox{\includegraphics[draft,#1]{#2}}%
+ \dimen@=\dp0 \advance\dimen@\ht0
+ \xdef#3{\the\wd0 }\xdef#4{\the\dimen@}%
+}}
+\def\web@getSSDims#1#2{\edef\web@@height{#1}\edef\web@@width{#2}}
+\def\addToWebHWError{\PackageError{web}{%
+ You must declare screen size first by using\MessageBreak
+ the \string\screensize\space command, or by declaring \MessageBreak
+ a design in the web option list}%
+ {Do as is suggested in error message!}}
+\newcommand{\addtoWebHeight}[1]{%
+ \ifx\screensize\@gobbletwo
+ \expandafter\web@getSSDims\webSaveSSDim
+ \screensize@web@save{\web@@height+#1}{\web@@width}%
+ \else\addToWebHWError\fi
+}
+\newcommand{\addtoWebWidth}[1]{%
+ \ifx\screensize\@gobbletwo
+ \expandafter\web@getSSDims\webSaveSSDim
+ \screensize@web@save{\web@@height}{\web@@width+#1}%
+ \else\addToWebHWError\fi
+}
+\@onlypreamble\addtoWebHeight
+\@onlypreamble\addtoWebWidth
+\newcommand{\@margins}[5][\web@minpanelwidth]
+{%
+ \def\webSaveMargDim{[#1]{#2}{#3}{#4}{#5}}%
+ \setlength{\@panelwidth}{#1}%
+ \ifdim\@panelwidth<\web@minpanelwidth
+ \setlength{\@panelwidth}{\web@minpanelwidth}\fi
+ \setlength{\@Leftmargin}{#2}%
+ \setlength{\@Rightmargin}{#3}%
+ \setlength{\@Topmargin}{#4}%
+ \setlength{\@Bottommargin}{#5}%
+ \web@margins@settrue
+ \InitLayout
+}
+\let\margins\@margins
+\let\margins@web@save\margins
+\newcommand{\@@margins}[5][]{}
+\let\marginsize\margins
+\newcommand\get@MargDim[5][]{%
+ \def\currPanelWidth{#1}%
+ \def\currLeftMarg{#2}\def\currRightMarg{#3}%
+ \def\currTopMarg{#4}\def\currBottomMarg{#5}}
+\newcommand{\resetmargins}[5][\web@minpanelwidth]{%
+ \expandafter\get@MargDim\webSaveMargDim
+ \begingroup
+ \let\incby\currPanelWidth
+ \def\web@arg{#1}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currPanelWidth}\else
+ \setlength{\@tempdima}{#1}\fi
+ \xdef\newPanelWidth{\the\@tempdima}%
+ \let\incby\currLeftMarg
+ \def\web@arg{#2}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currLeftMarg}\else
+ \setlength{\@tempdima}{#2}\fi
+ \xdef\newLeftMarg{\the\@tempdima}%
+ \let\incby\currRightMarg
+ \def\web@arg{#3}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currRightMarg}\else
+ \setlength{\@tempdima}{#3}\fi
+ \xdef\newRightMarg{\the\@tempdima}%
+ \let\incby\currTopMarg
+ \def\web@arg{#4}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currTopMarg}\else
+ \setlength{\@tempdima}{#4}\fi
+ \xdef\newTopMarg{\the\@tempdima}%
+ \let\incby\currBottomMarg
+ \def\web@arg{#4}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currBottomMarg}\else
+ \setlength{\@tempdima}{#5}\fi
+ \xdef\newBottomMarg{\the\@tempdima}%
+ \endgroup
+ \margins@web@save[\newPanelWidth]{\newLeftMarg}{\newRightMarg}
+ {\newTopMarg}{\newBottomMarg}
+}
+\@onlypreamble\resetscreensize
+\let\web@save@title\title
+\def\title{\@ifnextchar[{\@web@title}{\@web@title[]}}
+\def\@web@title[#1]#2{\gdef\webtitle{#2}\hypersetup{pdftitle={#2}}%
+ \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebtitle{#2}\else
+ \gdef\shortwebtitle{#1}\fi\web@save@title{#2}}
+\let\web@saved@author\author
+\def\author#1{\gdef\webauthor{#1}\hypersetup{pdfauthor={#1}}%
+ \web@saved@author{#1}}
+\def\subject{\@ifnextchar[{\@subject}{\@subject[]}}
+\def\@subject[#1]#2{%
+ \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebsubject{#2}\else
+ \gdef\shortwebsubject{#1}\fi\gdef\websubject{#2}%
+ \hypersetup{pdfsubject={#2}}}
+\def\email#1{\gdef\webemail{#1}}
+\def\thewebemail{\href{mailto:\webemail}{\webemail}}
+\def\keywords#1{\gdef\webkeywords{#1}\hypersetup{pdfkeywords={#1}}}
+\def\pdfLang#1{\def\web@pdfLang{#1}\hypersetup{pdflang={#1}}}
+\let\web@pdfLang\@empty
+\def\university#1{\gdef\webuniversity{#1}}
+\def\version#1{\gdef\web@version@value{#1}%
+ \edef\webversion{\ifx\web@version@value\@empty\else
+ \noexpand\web@versionlabel\noexpand\
+ \noexpand\web@version@value\fi}%
+}
+\let\web@version@value\@empty
+\def\versionLabel#1{\def\web@versionlabel{#1}}
+\versionLabel{Version}
+\def\copyrightyears#1{\gdef\webcopyrightyears{#1}}
+\newcommand{\tocName}[1]{\def\web@toc{#1}}
+\tocName{Table of Contents}
+\newcommand{\tocNameCont}[1]{\def\web@continued{#1}}
+\tocNameCont{cont.}
+\newcommand{\dirContentLink}[1]{\def\web@article{#1}}
+\dirContentLink{Begin \hyperlink{\web@Start.1}{Article}}
+\newcommand{\directoryName}[1]{\def\web@directory{#1}}
+\directoryName{Directory}
+\newcommand{\revisionLabel}[1]{\def\web@revision{#1}}
+\revisionLabel{Last Revision Date:}
+\def\norevisionLabel{\let\web@revision\@gobble}
+\newcommand{\copyrightLabel}[1]{\def\web@copyright{#1}}
+\copyrightLabel{Copyright}
+\def\nocopyright{\let\web@copyright\@gobble}
+\def\nocopyrightNotice{\let\web@copyright\@gobblethree}
+\def\web@section{Section}
+\def\web@back{Back}
+\def\web@doc{Doc} % restricted to three characters
+\title{}\author{}\email{}\subject{}\keywords{}\version{}
+\university{}\copyrightyears{\the\year}
+\let\IF@AorBswitch\ifeqforpaper
+\def\prtscr{\@ifstar{\prtscrV}{\prtscrA}}
+\def\prtscrA#1#2{\ifeqforpaper#1\else#2\fi}
+\newtoks\webtoksi
+\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\prtscrV{\let\IF@AorBswitch\ifeqforpaper
+ \ifeqforpaper
+ \def\web@next{\afterassignment\TRUEACTIONi\SETTEMPBOXi}\else
+ \def\web@next{\afterassignment\FALSEACTIONii\SETTEMPBOXii}\fi
+ \web@next}
+\newcommand{\web@aboveOptPgMatDef}{\minimumskip\vspace{\stretch{1}}}
+\newcommand{\aboveOPMvspace}{\web@aboveOptPgMatDef}
+\newcommand{\optionalPageMatter}[2][\web@aboveOptPgMatDef]{%
+ \def\aboveOPMvspace{#1}\def\optionalpagematter{#2}%
+}
+\def\optionalpagematter{}
+\@ifundefined{thechapter}
+ {\def\web@Start{section}}{\def\web@Start{chapter}}
+\newcommand{\titleauthorproportion}{.33}
+\newcommand{\hproportionwebuniversity}{.7}
+\newcommand{\hproportionwebtitle}{.7}
+\newcommand{\hproportionwebauthor}{.4}
+\newcommand{\minimumskip}{\medskip}
+\def\web@copyright@symbol{\copyright}
+\newcommand{\copyrightSymbol}[1]{\def\web@copyright@symbol{#1}}
+\def\nocopyrightsymbol{\let\web@copyright@symbol\@gobble}
+\newcommand{\trailerFontSize}{\footnotesize}
+\def\maketitle@trailer@ul{\web@copyright\ \web@copyright@symbol\
+ \webcopyrightyears}
+\def\maketitle@trailer@ll{\web@revision\ \@date}
+\def\maketitle@trailer@ur{\thewebemail}
+\def\maketitle@trailer@lr{\webversion}
+\newcommand{\titlepageTrailer}
+{%
+ \makebox[\linewidth]{\parbox{\linewidth}{%
+ \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
+ \maketitle@trailer@ll\hfill\maketitle@trailer@lr}}%
+}
+\newcommand{\webdirectory}{%
+ \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}%
+ \web@priorDirMatter
+ \begin{flushleft}{\web@formatWordDirectory\web@directory}%
+ \web@priorDirList
+ \vspace{\vspaceAfterDirName}%
+ \begin{itemize}\setlength{\itemsep}{-3pt}\web@formatDirectoryItems
+ \ifx\web@removeDirTOC\web@YES\else\item\relax\dirTOCItem\fi
+ \ifx\web@removeDirArticle\web@YES\else
+ \item\relax\dirArticleItem\fi
+ \web@addtoDirList
+ \end{itemize}
+ \web@afterDirList
+ \end{flushleft}
+ \web@afterDirMatter
+}
+\newcommand{\directoryhook}[1]{\def\web@directory@hook##1{#1}}
+\let\web@directory@hook\@empty
+\newcommand{\vspaceAfterDirName}{-3pt}
+\newcommand{\dirTOCItem}{\hyperlink{webtoc}{\web@toc}}
+\newcommand{\dirArticleItem}{\web@article}
+\newcommand{\removeDirTOC}{\let\web@removeDirTOC\web@YES}
+\let\web@removeDirTOC\web@NO
+\newcommand{\removeDirArticle}{\let\web@removeDirArticle\web@YES}
+\let\web@removeDirArticle\web@NO
+\let\web@addtoDirList\@empty
+\newcommand{\formatWordDirectory}[1]{\def\web@formatWordDirectory{#1}}
+\formatWordDirectory{\bfseries\large}
+\newcommand{\formatDirectoryItems}[1]{\def\web@formatDirectoryItems{#1}}
+\formatDirectoryItems{\bfseries}
+\newcommand{\addtoDirList}[1]{\g@addto@macro\web@addtoDirList{\item #1}}
+\newcommand{\priorDirList}[1]{\def\web@priorDirList{#1}}
+\let\web@priorDirList\@empty
+\newcommand{\afterDirList}[1]{\def\web@afterDirList{#1}}
+\let\web@afterDirList\@empty
+\newcommand{\priorDirMatter}[1]{\def\web@priorDirMatter{#1}}
+\let\web@priorDirMatter\@empty
+\newcommand{\afterDirMatter}[1]{\def\web@afterDirMatter{#1}}
+\let\web@afterDirMatter\@empty
+\newcommand{\universityColor}[1]{\def\webuniversity@color{#1}}
+\universityColor{blue}
+\newcommand{\titleColor}[1]{\def\webtitle@color{#1}}
+\titleColor{black}
+\newcommand{\authorColor}[1]{\def\webauthor@color{#1}}
+\authorColor{black}
+\newcommand{\subjectColor}[1]{\def\websubject@color{#1}}
+\subjectColor{black}
+\def\aboveTopTitleSkip#1{\def\web@aboveTopTitleSkip{#1}}
+\aboveTopTitleSkip{0pt}
+\newcommand{\topTitlePage}
+{%
+ \vglue\web@aboveTopTitleSkip
+ \noindent\makebox[\linewidth]{%
+ \parbox{\hproportionwebuniversity\linewidth}%
+ {\bfseries\color{\webuniversity@color}\ifeqforpaper\large\fi
+ \centering\webuniversity}}\par\ifeqforpaper\else\minimumskip\fi
+ \vspace{\stretch{1}}%
+ \noindent\makebox[\linewidth]{%
+ \parbox{\hproportionwebtitle\linewidth}%
+ {\bfseries\color{\webtitle@color}\ifeqforpaper\Large\else
+ \large\fi\centering\webtitle}}\par\ifeqforpaper
+ \vspace{2\baselineskip}\else\minimumskip\vspace{\stretch{1}}\fi
+ \noindent\makebox[\linewidth]{%
+ \parbox{\hproportionwebauthor\linewidth}%
+ {\bfseries\color{\webauthor@color}\ifeqforpaper
+ \large\fi\centering\webauthor}}
+}
+\newcommand{\allowHeadingsTitlePage}{\let\web@titlepagestyle\@gobble}
+\def\web@titlepagestyle#1{#1}
+\newcommand{\coverpagemargin}{1in}
+\newcommand{\maketitlepreamble}
+{%
+ \web@titlepagestyle{\thispagestyle{empty}}%
+ \ifeqforpaper\if@centertitlepage
+ \begingroup
+ \if@centertitlepagefull
+ \@tempdima=\coverpagemargin
+ \else
+ \@tempdima\paperwidth
+ \advance\@tempdima-\textwidth
+ \@tempdima=.5\@tempdima
+ \edef\coverpagemargin{\the\@tempdima}%
+ \fi
+ \@tempdimb\paperwidth
+ \addtolength{\@tempdimb}{-2\@tempdima}%
+ \edef\fullscreenwidth{\the\@tempdimb}%
+ \linewidth\fullscreenwidth
+ \textwidth\fullscreenwidth
+ \hfuzz\linewidth
+ \setlength{\oddsidemargin}{\coverpagemargin-1in}%
+ \setlength{\evensidemargin}{\oddsidemargin}%
+ \marginparsep=0pt
+ \marginparwidth=0pt
+ \parindent0pt
+ \fi\fi
+}
+\newcommand{\maketitlepostamble}
+{%
+ \newpage
+ \ifeqforpaper\if@centertitlepage\endgroup\fi\fi
+}
+\newcommand{\web@maketitle}
+{%
+ \maketitlepreamble
+ \ifeqforpaper\vspace*{2\baselineskip}\else
+ \vbox to\titleauthorproportion\textheight\bgroup\fi
+ \topTitlePage
+ \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
+ \ifx\optionalpagematter\@empty\par\else
+ \begingroup\par
+ \aboveOPMvspace
+ \noindent\parbox{\linewidth}{\optionalpagematter}%
+ \par\endgroup\fi
+ \vspace{\stretch{1}}
+ \ifx\web@directory@option\web@YES\web@directory@hook\webdirectory\fi
+ \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}
+ \vfill\noindent\begingroup
+ \trailerFontSize\titlepageTrailer\par\endgroup
+ \maketitlepostamble
+}
+\let\web@save@maketitle\maketitle
+\let\maketitle\web@maketitle
+\newcommand{\makeinlinetitle}
+{%
+ \noindent\makebox[\linewidth][c]{%
+ \bfseries\color{\webtitle@color}\webtitle}
+ \makebox[\linewidth]{%
+ \shortstack[l]{\strut\\
+ \makebox[0pt][l]{\webuniversity}\\
+ \makebox[0pt][l]{%
+ \@ifundefined{aeb@prepared}
+ {\@date}{\aeb@prepared}%
+ }%
+ }\hfill
+ \shortstack[c]{\strut\webauthor\\\strut}\hfill
+ \shortstack[r]{\strut\makebox[0pt][r]{\thewebemail}\\
+ \makebox[0pt][r]{%
+ \@ifundefined{aeb@talksite}{\webversion}
+ {\ifx\aeb@talksite\@empty\webversion
+ \else\aeb@talksite\fi}%
+ }%
+ }%
+ }%
+ \bigskip
+}
+\setcounter{secnumdepth}{3}
+\setcounter{tocdepth}{3}
+\ifeqforpaper\else
+ \clubpenalty=50
+ \widowpenalty=50
+\fi
+\let\web@save@listi\@listi
+\let\web@save@listii\@listii
+\let\web@save@listiii\@listiii
+\let\web@save@normalsize\normalsize
+\let\web@save@partopsep\partopsep
+\let\web@normalsize\normalsize
+\def\w@ppp#1#2#3{#1\p@ \@plus#2\p@ \@minus#3\p@}
+\def\w@zpp#1#2{\z@ \@plus#1\p@ \@minus#2\p@}
+\def\tightsettings@z{%
+ \setlength\partopsep{\w@ppp{2}{}{}} % unchanged
+ \def\web@listi{\leftmargin\leftmargini
+ \parsep \w@ppp{2}{2}{}% 4+2-1
+ \topsep \w@ppp{2}{1}{}% 8+2-4
+ \itemsep\w@ppp{2}{1}{}}% 4+2-1
+ \let\@listi\web@listi
+ \let\@listI\@listi
+ \@listi
+ \def\web@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \w@zpp{}{}% 4+2-1
+ \parsep \w@zpp{}{}% 2+1-1
+ \itemsep \parsep}% unchanged
+ \def\web@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \w@zpp{}{}% 2+1-1
+ \parsep \z@ % unchanged
+ \partopsep \w@ppp{}{}{}% unchanged
+ \itemsep \topsep}% unchanged
+ \let\@listii\web@listii
+ \let\@listiii\web@listiii
+ \renewcommand\web@normalsize{%
+ \@setfontsize\normalsize\@xpt\@xiipt
+ \abovedisplayskip \w@ppp{5}{3}{}% 10+2-5
+ \abovedisplayshortskip \w@zpp{3}{0}% unchanged
+ \belowdisplayshortskip \w@ppp{3}{2}{2}% 6+3-3
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}%
+ \let\normalsize\web@normalsize
+ \normalsize
+}
+\def\tightsettings@i{%
+ \setlength\partopsep{\w@ppp{2}{}{}}% 3+1-1
+ \def\web@listi{\leftmargin\leftmargini
+ \parsep \w@ppp{2.5}{2}{}% 4.5+2-1
+ \topsep \w@ppp{4.5}{1.5}{2.5}% 9+3-5
+ \itemsep \w@ppp{2.5}{}{}}% 4.5+2-1
+ \let\@listi\web@listi
+ \let\@listI\@listi
+ \@listi
+ \def\web@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{}{}{}% 4.5+2-1
+ \parsep \w@ppp{}{}{}% 2+1-1
+ \itemsep \parsep}% unchanged
+ \def\web@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{}{}{}% 2+1-1
+ \parsep \z@ % unchanged
+ \partopsep \w@ppp{}{}{}% unchanged
+ \itemsep \topsep}% unchanged
+ \let\@listii\web@listii
+ \let\@listiii\web@listiii
+ \renewcommand\web@normalsize{%
+ \@setfontsize\normalsize\@xipt{13.6}%
+ \abovedisplayskip \w@ppp{5.5}{3}{3}% 11+3-6
+ \abovedisplayshortskip \w@zpp{}{0}% unchanged
+ \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}%
+ \let\normalsize\web@normalsize
+ \normalsize
+}
+\def\tightsettings@ii{%
+ \setlength\partopsep{\w@ppp{3}{2}{2}}% unchanged
+ \def\web@listi{\leftmargin\leftmargini
+ \parsep \w@ppp{3}{2}{}% 5+2.5-1
+ \topsep \w@ppp{5}{2}{3}% 10+4-6
+ \itemsep\w@ppp{2.5}{}{}}% 5+2.5-1
+ \let\@listi\web@listi
+ \let\@listI\@listi
+ \@listi
+ \def\web@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{2.5}{}{}% 5+2.5-1
+ \parsep \w@ppp{2}{}{}% 2.5+1-1
+ \itemsep \parsep}% unchanged
+ \def\web@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{1.5}{}{}% 2.5+1-1
+ \parsep \z@ % unchanged
+ \partopsep \w@ppp{}{}{}% unchanged
+ \itemsep \topsep}% unchanged
+ \let\@listii\web@listii
+ \let\@listiii\web@listiii
+ \renewcommand\web@normalsize{%
+ \@setfontsize\normalsize\@xiipt{14.5}%
+ \abovedisplayskip \w@ppp{6}{1.5}{3.5}% 12+3-7
+ \abovedisplayshortskip \w@zpp{3}{0}% unchanged
+ \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}%
+ \let\normalsize\web@normalsize
+ \normalsize
+}
+\def\tightsettings{\@ifstar{\ifeqforpaper\else\tightsettings@cont\fi}
+ {\tightsettings@cont}}
+\def\tightsettings@cont{\let\web@tight\web@YES
+ \ifcase\@ptsize
+ \tightsettings@z\or
+ \tightsettings@i\or
+ \tightsettings@ii
+ \fi
+}
+\def\restorenormalsettings{\let\web@tight\web@NO
+ \let\@listi\web@save@listi
+ \let\@listii\web@save@listii
+ \let\@listiii\web@save@listiii
+ \let\normalsize\web@save@normalsize
+ \let\partopsep\web@save@partopsep
+ \let\@listI\@listi
+ \@listi
+ \normalsize
+}
+\def\navibarTextColor#1{\def\@menucolor{#1}}
+\def\@menucolor{webblue}
+\def\navibarBgColor#1{\def\@menuBgColor{#1}}
+\def\@menuBgColor{webgray}
+\newcommand{\newNaviIcon}[1][\@empty]
+{%
+ \ifx#1m\let\web@next\@newNaviIconMenu
+ \else\ifx#1j\let\web@next\@newNaviIconJS
+ \else\ifx#1l\let\web@next\@newNaviIconLink
+ \else\ifx#1\@empty\let\web@next\@newNaviIconLink
+ \else\let\web@next\relax
+ \PackageWarning{web}{\string\newNaviIcon: unknown first parameter}
+ \fi\fi\fi\fi\web@next
+}
+\def\web@colorbox@w@transparency#1{%
+ \ifx#1\@empty\setlength{\fboxrule}{0pt}\let\aeb@next\fbox\else
+ \def\aeb@next{\colorbox{#1}}\fi\aeb@next}
+\newcommand{\@newNaviIconMenu}[6][I]
+{%
+ \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
+ \Acrobatmenu{#6}{\web@colorbox@w@transparency{\@menuBgColor}{%
+ \parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}}%
+ }}%
+}
+\newcommand{\@newNaviIconJS}[6][I]
+{%
+ \ifcase\eq@drivernum
+ \def#2{{\setlength{\fboxsep}{0pt}%
+ \pdf@rect{\web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}}%
+ \literalps@out{%
+ [ /Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ /Border [ 0 0 0 ]/H/#1\space
+ /Action <</S/JavaScript/JS (#6) >>
+ /Subtype/Link
+ /ANN pdfmark}%
+ }}%
+ \or
+ \def#2{{\setlength{\fboxsep}{0pt}%
+ \leavevmode\pdfstartlink
+ attr {/Border [0 0 0 ] /H/#1}%
+ user{ /Subtype /Link
+ /A << /S/JavaScript/JS (#6) >>}%
+ \web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}%
+ \pdfendlink
+ }}%
+ \or
+ \def#2{{\setlength{\fboxsep}{0pt}%
+ \@pdfm@mark{bann
+ <<
+ /Border [0 0 0 ] /H/#1\space
+ /Subtype /Link
+ /A << /S/JavaScript/JS (#6) >>
+ >>}\web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}%
+ \@pdfm@mark{eann}%
+ }}%
+ \fi
+}
+\newcommand{\@newNaviIconLink}[6][I]
+{%
+ \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
+ #6{\web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}}%
+ }}%
+}
+\let\insertwebtoc\relax
+\def\insert@webtoc{\web@TOC\ }
+\def\web@TocText{Toc}
+\newNaviIcon[l]{\web@TOC}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@TocText}{\hyperlink{webtoc}}
+\newcommand\navibariconWidth[1]{\def\web@nb@width{#1}}
+\newcommand\navibariconHeight[1]{\def\web@nb@height{#1}}
+\navibariconWidth{34pt}\navibariconHeight{10pt}
+\@newNaviIconMenu{\web@FirstPage}{\web@nb@width}{\web@nb@height}
+ {\web@FirstPageText}{FirstPage}
+\def\web@FirstPageText{$\blacktriangleleft\blacktriangleleft$}
+\@newNaviIconMenu{\web@LastPage}{\web@nb@width}{\web@nb@height}
+ {\web@LastPageText}{LastPage}
+\def\web@LastPageText{$\blacktriangleright\blacktriangleright$}
+\@newNaviIconMenu{\web@PrevPage}{\web@nb@width}{\web@nb@height}
+ {\web@PrevPageText}{PrevPage}
+\def\web@PrevPageText{$\blacktriangleleft$}
+\@newNaviIconMenu{\web@NextPage}{\web@nb@width}{\web@nb@height}
+ {\web@NextPageText}{NextPage}
+\def\web@NextPageText{$\blacktriangleright$}
+\@newNaviIconMenu{\web@GoBack}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@back}{GoBack}
+\@newNaviIconMenu{\web@GoBackDoc}{\web@nb@width}{\web@nb@height}
+ {$\blacktriangleleft$\ \footnotesize\web@doc}{GoBackDoc}
+\@newNaviIconMenu{\web@GoForwardDoc}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@doc\ \normalsize$\blacktriangleright$}
+ {GoForwardDoc}
+\@newNaviIconMenu{\web@FS}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@FSText}{FullScreen}
+\def\web@FSText{FS}
+\@newNaviIconMenu{\web@GoToPage}{\web@nb@width}{\web@nb@height}
+ {\footnotesize\web@GoToPageText}{GoToPage}
+\def\web@GoToPageText{Page...}
+\newcommand\web@navigationbar{%
+\hfil\bfseries\footnotesize
+\insertwebtoc
+\web@FirstPage\
+\web@LastPage\
+\web@PrevPage\
+\web@NextPage\
+\web@GoBack
+\hfil}
+\newcommand{\panelgroupWidth}[1]{%
+ \global\let\chkpanelgroup\web@chkpanelgroup
+ \def\web@pg@width{#1}}
+\newcommand{\panelgroupHeight}[1]{%
+ \global\let\chkpanelgroup\web@chkpanelgroup
+ \def\web@pg@height{#1}}
+\newcommand{\panelgroupSep}[1]{%
+ \global\let\chkpanelgroup\web@chkpanelgroup
+ \def\web@pg@sep{#1}}
+\@newNaviIconMenu{\panel@FirstPage}{\web@pg@width}{\web@pg@height}
+ {\web@FirstPageText}{FirstPage}
+\@newNaviIconMenu{\panel@LastPage}{\web@pg@width}{\web@pg@height}
+ {\web@LastPageText}{LastPage}
+\@newNaviIconMenu{\panel@PrevPage}{\web@pg@width}{\web@pg@height}
+ {\web@PrevPageText}{PrevPage}
+\@newNaviIconMenu{\panel@NextPage}{\web@pg@width}{\web@pg@height}
+ {\web@NextPageText}{NextPage}
+\@newNaviIconMenu{\panel@GoBack}{\web@pg@width}{\web@pg@height}
+ {\footnotesize\web@back}{GoBack}
+\@newNaviIconMenu{\panel@GoBackDoc}{\web@pg@width}{\web@pg@height}
+ {$\blacktriangleleft$\,\footnotesize\web@doc}{GoBackDoc}
+\@newNaviIconMenu{\panel@GoForwardDoc}{\web@pg@width}{\web@pg@height}
+ {\footnotesize\web@doc\,\normalsize$\blacktriangleright$}
+ {GoForwardDoc}
+\@newNaviIconMenu{\panel@Close}{\web@pg@width}{\web@pg@height}
+ {\footnotesize Close}{Close}
+\def\web@CloseText{Close}
+\@newNaviIconMenu{\panel@FS}{\web@pg@width}{\web@pg@height}
+ {\footnotesize\web@FSText}{FullScreen}
+\@newNaviIconMenu{\panel@GoToPage}{\web@pg@width}{\web@pg@height}
+ {\footnotesize\web@GoToPageText}{GoToPage}
+\newcommand{\web@chkpanelgroup}{\bgroup
+ \setlength{\@tempdima}{\web@pg@width+\web@pg@width+\web@pg@sep}%
+ \ifdim\@tempdima>\@panelwidth\PackageError{web}{Width of
+ \string\panelNaviGroup\space is wider than the panel}{}\else
+ \xdef\panelNavigroupWidth{\the\@tempdima}\fi
+ \egroup\global\let\chkpanelgroup\@empty
+}
+\panelgroupWidth{28pt}\panelgroupHeight{15pt}
+\panelgroupSep{2pt}
+\newcommand{\panelrowsep}{1pt}
+\newcommand\panelNaviGroup{\chkpanelgroup
+ \parbox[c]{\panelNavigroupWidth}{%
+ \offinterlineskip
+ \panelIconGroup
+ }%
+}
+\newcommand{\panelIconGroup}{%
+ \panel@FirstPage\hfill\panel@LastPage\\[\panelrowsep]
+ \panel@PrevPage\hfill\panel@NextPage\\[\panelrowsep]
+ \panel@GoBack\hfill\panel@Close
+}
+\let\ins@NaviBar\@empty
+\newcommand\insNaviBar{\@ifstar{\@gdefInsNaviBar}{\@defInsNaviBar}}
+\def\@gdefInsNaviBar#1{\gdef\ins@NaviBar{#1}}
+\def\@defInsNaviBar#1{\def\ins@NaviBar{#1}}
+\newcommand\insNaviBarOff{\global\let\ins@NaviBar\@empty}
+\def\web@ifOnThisPage#1#2{\ifnum\c@page=\@thispage\relax
+ #1\else#2\fi}
+\newcommand{\insertnaviiconhere}[1]
+{%
+ \xdef\@thispage{\the\c@page}%
+ \def\web@insToRight{%
+ \ifeqforpaper\makebox[0pt][l]{\ifdim\marginparsep>0pt\relax
+ \hspace{\marginparsep}\else\ \fi#1}\else
+ \makebox[0pt][l]{%
+ \ifnum\@panelconfig=2\relax
+ \hspace{\@panelsep}\else
+ \hspace{\@Rightmargin}\fi
+ \makebox[0pt][r]{#1}}\fi
+ }\expandafter\rheader\expandafter
+ {\expandafter\web@ifOnThisPage
+ \expandafter{\web@rightheader\web@insToRight}%
+ {\web@defaultrightheader}}%
+}
+\def\insertnaviiconhereafter#1{\def\web@insToLeft{%
+ \ifeqforpaper\makebox[0pt][r]{#1\ifdim\marginparsep>0pt\relax
+ \hspace{\marginparsep}\else\ \fi}\else
+ \makebox[0pt][r]{\makebox[0pt][l]{#1}%
+ \ifnum\@panelconfig=1\relax
+ \hspace{\@panelsep}\else
+ \hspace{\@Leftmargin}\fi}\fi
+ }\expandafter\lheader\expandafter
+ {\expandafter\web@insToLeft\web@lhead}}
+\def\removehereaftericon{\lheader{\aeb@setmarks}}
+\let\defaultpageheader\removehereaftericon
+\newcommand\ArrowUp[1]
+{%
+ \normalsize\ifeqforpaper
+ \setlength{\fboxsep}{6pt}\else
+ \setlength{\fboxsep}{4pt}\fi
+ \raisebox{\depth-\fboxsep}[0pt][0pt]{%
+ #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
+ {\textcolor{\web@directionIconTextColor}{$\bigl\Uparrow$}}}}%
+}
+\newcommand\ArrowDown[1]
+{%
+ \normalsize\ifeqforpaper
+ \setlength{\fboxsep}{6pt}\else
+ \setlength{\fboxsep}{4pt}\fi
+ \raisebox{\depth-\fboxsep}[0pt][0pt]{%
+ #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
+ {\textcolor{\web@directionIconTextColor}{$\bigl\Downarrow$}}}}%
+}
+\def\directionIconTextColor#1{\def\web@directionIconTextColor{#1}}
+\def\web@directionIconTextColor{webblue}
+\def\directionIconBgColor#1{\def\web@directionIconBgColor{#1}}
+\def\web@directionIconBgColor{webgray}
+\def\web@defaultrightheader{\ifnum\value{page}=1\relax\else\thepage\fi}
+\let\web@headerhook\@empty
+\let\web@headerprivate\@empty
+\let\web@footerhook\@empty
+\let\web@footerprivate\@empty
+\def\lheader#1{\gdef\web@lhead{#1}}
+\def\cheader#1{\gdef\web@chead{#1}}
+\def\rheader#1{\gdef\web@rightheader{#1}}
+\lheader{\rightmark}
+\cheader{}
+\rheader{\web@defaultrightheader}
+\def\lfooter#1{\gdef\web@lfoot{#1}}
+\def\cfooter#1{\gdef\web@cfoot{#1}}
+\def\rfooter#1{\gdef\web@rfoot{#1}}
+\lfooter{}\rfooter{}
+\newcommand{\placeScreenNavibar}{%
+ \ifweb@navibar\web@navigationbar\else
+ \ins@NaviBar\global\let\ins@NaviBar\@empty\fi}
+\cfooter{\placeScreenNavibar}
+\newcommand{\clearHeaders}{%
+ \let\web@lhead@save\web@lhead
+ \let\web@chead@save\web@chead
+ \let\web@rightheader@save\web@rightheader
+ \let\web@lhead\@empty\let\web@chead\@empty
+ \let\web@rightheader\@empty}
+\newcommand{\restoreHeaders}{%
+ \let\web@lhead\web@lhead@save
+ \let\web@chead\web@chead@save
+ \let\web@rightheader\web@rightheader@save}
+\newcommand{\clearFooters}{%
+ \let\web@lfoot@save\web@lfoot
+ \let\web@cfoot@save\web@cfoot
+ \let\web@rfoot@save\web@lfoot
+ \let\web@lfoot\@empty\let\web@cfoot\@empty
+ \let\web@rfoot\@empty}
+\newcommand{\restoreFooters}{%
+ \let\web@lfoot\web@lfoot@save
+ \let\web@cfoot\web@cfoot@save
+ \let\web@rfoot\web@rfoot@save}
+\def\headerformat#1{\def\web@headerhook{#1}}
+\headerformat{}
+\def\footerformat#1{\def\web@footerhook{#1}}
+\footerformat{}
+\let\webheadwrapper\@empty
+\let\webfootwrapper\@empty
+\newcommand{\headWrapper}[1]{\def\webheadwrapper##1{#1}}
+\newcommand{\footWrapper}[1]{\def\webfootwrapper##1{#1}}
+\newcommand{\ps@webheadings}
+{%
+ \renewcommand{\@oddhead}{\webheadwrapper{%
+ \normalfont\ifeqforpaper\else\footnotesize\fi
+ \web@headerprivate\web@headerhook\web@lhead\hfil\web@chead\hfil
+ \web@rightheader}}
+ \renewcommand{\@evenhead}{\@oddhead}
+ \renewcommand{\@oddfoot}{\webfootwrapper{%
+ \normalfont\ifeqforpaper\else\footnotesize\fi
+ \web@footerprivate\web@footerhook\web@lfoot\hfil
+ \web@cfoot\hfil\web@rfoot}}
+ \renewcommand{\@evenfoot}{\@oddfoot}
+}
+\renewcommand{\sectionmark}[1]{%
+ \markboth{}{\web@section\ \thesection: #1}}
+\newcommand{\noHeadersOnSectionPage}{%
+ \gdef\web@headerpolicy{%
+ \expandafter\aeb@gettopmark\topmark{}{}%
+ \expandafter\aeb@getbotmark\botmark{}{}%
+ \ifx\aeb@topmark\aeb@botmark\rightmark\fi
+ }%
+}
+\noHeadersOnSectionPage
+\newcommand{\headersOnSectionPage}{%
+ \gdef\web@headerpolicy{\rightmark}%
+}
+\def\aeb@gettopmark#1#2{\def\aeb@topmark{#2}}
+\def\aeb@getbotmark#1#2{\def\aeb@botmark{#2}}
+\def\aeb@setmarks{\web@headerpolicy}
+\lheader{\aeb@setmarks}
+\AtEndOfPackage{\pagestyle{webheadings}}
+\newcommand{\sectionColor}[1]{\def\web@sectionsColorOld{#1}
+ \def\aeb@sectioncolor{#1}}
+\sectionColor{blue}
+\def\web@inputsectiondefs{\InputIfFileExists{websec.def}{}
+ {\PackageError{web}{Cannot find the file websec.def}{}}
+}
+\ifweb@sectioning\expandafter\web@inputsectiondefs\fi
+\def\aebwritelastpage{%
+ \immediate\write\@auxout{\string\expandafter\string\gdef
+ \string\csname\space aebLastPage\string\endcsname{\arabic{page}}}%
+}
+\AtEndDocument{%
+ \clearpage\addtocounter{page}{-1}\aebwritelastpage
+ \addtocounter{page}{1}}
+\def\useFullWidthForPaper{\ifeqforpaper
+ \setlength{\textwidth}{\paperwidth-2in}
+ \setlength{\textheight}
+ {\paperheight-2in-\footskip-\topmargin-\headheight-\headsep}
+ \oddsidemargin=0pt
+ \evensidemargin=0pt
+ \marginparsep=0pt
+ \marginparwidth=0pt
+ \fi
+}
+\def\maxtextscreentext{%
+ \iftemplatesforpaper\else\ifeqforpaper
+ \ifnum\@usetemplates=1
+ \ifnum\@panelconfig=1 % left panel
+ \setlength{\oddsidemargin}%
+ {\@panelwidth+\@panelsep-1in}%
+ \setlength{\textwidth}%
+ {\paperwidth-\@panelwidth-\@panelsep-%
+ \marginparwidth-\marginparsep}%
+ \else\ifnum\@panelconfig=2 % right panel
+ \setlength{\oddsidemargin}{0in}%
+ \setlength{\textwidth}%
+ {\paperwidth-\@panelwidth-\@panelsep-%
+ \oddsidemargin-\marginparwidth-\marginparsep}%
+ \else
+ \useFullWidthForPaper
+ \fi\fi\fi
+ \fi\fi
+}
+\newcommand{\centertextonpage}{%
+ \ifeqforpaper\AtBeginDocument{\web@centertextonpage}\fi}
+\def\web@centertextonpage{%
+ \setlength{\oddsidemargin}{\paperwidth-\textwidth-2in}%
+ \oddsidemargin=.5\oddsidemargin
+ \evensidemargin=\oddsidemargin
+}
+\definecolor{webgreen}{rgb}{0,.5,0}
+\definecolor{webbrown}{rgb}{.6,0,0}
+\definecolor{webyellow}{rgb}{0.98,0.92,0.73}
+\definecolor{webgray}{rgb}{.753,.753,.753}
+\definecolor{webgrey}{rgb}{.753,.753,.753}
+\definecolor{webblue}{rgb}{0,0,.8}
+\definecolor{wheat}{rgb}{.96, .87, .70}
+\definecolor{oldlace}{rgb}{.992, .96187, .902}
+\definecolor{snow}{rgb}{1, .98, .98}
+\definecolor{ghostwhite}{rgb}{.973, .973, 1}
+\definecolor{cornsilk}{rgb}{1, .973, .863}
+\definecolor{honeydew}{rgb}{.941, 1, .941}
+\definecolor{lavenderdark}{rgb}{.8, .8, .9529411}
+\definecolor{lavender}{rgb}{.902, .902, .980}
+\definecolor{lightblue}{rgb}{.8, .8, .95}
+\definecolor{lightgray}{rgb}{.827, .827, .827}
+\definecolor{lightsteelblue}{rgb}{.690, .769, .871}
+\definecolor{lightturquoise}{rgb}{.686, .933, .933}
+\definecolor{darkgreen}{rgb}{.0, .392, .0}
+\definecolor{yellowgreen}{rgb}{.604, .804, .196}
+\definecolor{vlightblue}{rgb}{.88, .85, .95}
+\definecolor{khaki}{rgb}{.741, .718, .42}
+\ifx\web@latextoc\web@YES\ifx\web@bullets\web@YES%
+ \@ifundefined{chapter} {%
+ \renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{1.2em}}
+ }{%
+ \renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{1.2em}}
+ }%
+\fi\fi
+\def\tocColor#1{\def\web@tocColor{#1}\def\aeb@toccolor{#1}}
+\tocColor{blue}
+\newcommand{\allowHeadingsTocPage}{\let\web@Tocpagestyle\@gobble}
+\def\web@Tocpagestyle#1{#1}
+\let\web@latextoc@save\tableofcontents
+\ifx\web@bullets\web@YES
+\def\tableofcontents
+{%
+ \global\let\insertwebtoc\insert@webtoc
+ \def\contentsname{\web@toc}%
+ \pdfbookmark[1]{\web@toc}{toc}%
+ \web@Tocpagestyle{\thispagestyle{empty}}%
+ \markright{{\normalfont\small \web@toc\ (\web@continued)}}%
+ \@ifundefined{sectionToc}{%
+ \begin{center}\hypertarget{webtoc}{}%
+ \normalfont\bfseries\Large\color{\web@tocColor}%
+ \contentsname
+ \end{center}
+ }{\sectionToc{\web@toc}}\par
+ \ifx\web@latextoc\web@YES
+ \@starttoc{toc}% LaTeX toc listing with page numbers
+ \else
+ \noindent\webtableofcontents
+ \fi
+ \newpage
+}
+\else
+ \PackageInfo{web}{No Bullets Requested}
+ \def\tableofcontents{%
+ \begingroup
+ \def\contentsname{\web@toc}%
+ \let\web@save@mkboth\@mkboth
+ \def\@mkboth{\protect\hypertarget{webtoc}{}\web@save@mkboth}%
+ \ifx\web@finalDot\@empty\else
+ \def\numberline##1{\hb@xt@\@tempdima{##1.\hfil}}\fi
+ \web@latextoc@save
+ \endgroup\newpage
+ }
+ \renewcommand\subsubsection{\renewcommand{\@seccntformat}[1]{%
+ \@nameuse{the##1}\web@finalDot\enspace}
+ \@startsection{subsubsection}{3}{\z@}%
+ {-2ex\@plus -1ex \@minus -.2ex}{.5ex \@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries}}
+ \renewcommand*{\thesubsubsection}
+ {\thesubsection.\arabic{subsubsection}}
+\fi
+\def\widestNumber#1{%
+ \def\widest@Number{#1\ }}
+\widestNumber{0.0.}
+\newcommand{\tocIndent}[1]{\def\toc@indent{#1}}
+\tocIndent{20pt}
+\def\tocIndentByNumber#1{{%
+ \settowidth{\@tempdima}{\normalfont\textbf{#1\ }}%
+ \xdef\toc@indent{\the\@tempdima}%
+}}
+\tocIndentByNumber{00.}
+\let\tocindent\tocIndent
+\let\tocindentByNumber\tocIndentByNumber
+\def\webtableofcontents
+{%
+ \begingroup
+ \global\let\isChapter\web@NO
+ \parskip0pt\parindent\toc@indent\relax
+ \settowidth{\@tempdima}{\normalfont
+ \textbf{\widest@Number}}%
+ \@tempdimb\@tempdima
+ \advance\@tempdimb by\parindent
+ \edef\web@subsubSecIndent{\the\@tempdimb}%
+ \def\par{\endgraf\leftskip=0pt}%
+ \let\numberline\web@numberline
+ \let\contentsline\web@contentsline
+ \def\web@section##1##2##3{\web@parse##1\\%
+ \web@toc@section{##1}{##2}{##3}}%
+ \def\web@subsection##1##2##3{\web@parse##1\\%
+ \web@toc@subsection{##1}{##2}{##3}}%
+ \def\web@subsubsection##1##2##3{\web@parse##1\\%
+ \web@toc@subsubsection{##1}{##2}{##3}}%
+ \def\web@part##1##2##3{\web@toc@part{##1}{##2}{##3}}%
+ \def\web@chapter##1##2##3{\web@parse##1\\%
+ \web@toc@chapter{##1}{##2}{##3}}%
+ \@starttoc{toc}%
+ \setlength{\@tempdimb}{\ifx\isChapter\web@YES
+ \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
+ \leftskip\@tempdimb
+ \par\endgroup
+}
+\def\web@numberline#1{\makebox[0pt]{#1\enspace}}%
+\def\web@contentsline#1#2#3#4{%
+ \@nameuse{web@#1}{#2}{#3}{#4}}%
+\def\web@parse#1#2#3\\{%
+ \def\web@title{#3}\def\numberline{#2}}%
+\def\web@toc@part#1#2#3{\par\noindent
+ {\bfseries\hyperlink{#3}{#1}}\par\smallskip}
+\def\web@toc@chapter#1#2#3{\global\let\isChapter\web@YES
+ \par\mbox{}{\bfseries\makebox[0pt][r]{\hyperlink{#3}%
+ {\numberline\web@finalDot}\space}\web@title}\par\smallskip
+}
+\def\web@toc@section#1#2#3{\penalty-500\par
+ \hspace*{\if\isChapter y\parindent\else0pt\fi}\mbox{}{\bfseries
+ \ifx\numberline\@empty
+ \@ifundefined{d@DingToc}{\hyperlink{#3}{\web@title}}
+ {%
+ \ifx\d@DingToc\@empty
+ \hyperlink{#3}{\web@title}%
+ \else
+ \if\aeb@use@section@numbers0\relax
+ \makebox[0pt][r]{\color{\d@DingTocColor}%
+ \d@DingToc\space}\hyperlink{#3}{\web@title}%
+ \else
+ \hyperlink{#3}{\web@title}%
+ \fi
+ \fi
+ }%
+ \else
+ \makebox[0pt][r]{\hyperlink{#3}{%
+ \numberline\web@finalDot}\space}\web@title
+ \fi}\endgraf
+}%
+\def\web@toc@subsection#1#2#3{\par
+ \setlength{\@tempdimb}{\ifx\isChapter\web@YES
+ \parindent+\@tempdima\else\@tempdima\fi}%
+ \penalty-50 \hspace*{\@tempdimb}\mbox{}{\bfseries
+ \ifx\numberline\@empty
+ \@ifundefined{dd@DingToc}{\hyperlink{#3}{\web@title}}
+ {%
+ \ifx\dd@DingToc\@empty
+ \hyperlink{#3}{\web@title}%
+ \else
+ \makebox[0pt][r]{\color{\dd@DingTocColor}%
+ \dd@DingToc\space}\hyperlink{#3}{\web@title}%
+ \fi
+ }%
+ \else
+ \makebox[0pt][r]{\makebox[\@tempdima][l]%
+ {\hyperlink{#3}{\numberline\web@finalDot}}}\web@title
+ \fi}\endgraf
+}%
+\def\web@toc@subsubsection#1#2#3{%
+ \def\numberline{\strut$\bullet$}%
+ \setlength{\@tempdimb}{\ifx\isChapter\web@YES
+ \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
+ \leftskip\@tempdimb\noindent\unskip\mbox{}\penalty-50
+ \@ifundefined{ddd@DingToc}{}{%
+ \if\aeb@use@section@numbers0\relax\ifx\ddd@DingToc\@empty\else
+ \def\numberline{\color{\ddd@DingTocColor}\strut\ddd@DingToc}%
+\fi\fi}\hyperlink{#3}{\numberline}~\web@title\
+}%
+\let\web@textTemplate\@empty
+\newcommand{\@AddToTextTemplate}{\g@addto@macro\web@textTemplate}
+\newcommand{\template}[2][]
+{%
+ \ifweb@allowtemplates
+ \def\web@argi{#1}\ifx\web@argi\@empty
+ \xdef\web@template@opt@args{\web@addtotemplateArgs}%
+ \else\xdef\web@template@opt@args{\web@addtotemplateArgs,#1}%
+ \fi\gdef\web@template{#2}%
+ \fi
+}
+\let\web@template\@empty
+\def\addtotemplateArgs#1{\gdef\web@addtotemplateArgs{#1}}
+\def\cleartemplateArgs{\global\let\web@addtotemplateArgs=\@empty}
+\let\web@addtotemplateArgs\@empty
+\let\text@scaletype\@empty
+\newcommand{\textBgColor}[1]{\gdef\web@textBgColor{#1}}
+\let\web@textBgColor\@empty
+\let\listAddToTemplates\@empty
+\newcommand{\AddToTemplate}[1]
+{%
+ \global\w@csarg\let{eqTmpl#1}\web@YES
+ {\toks@=\expandafter{\listAddToTemplates}%
+ \xdef\listAddToTemplates{\the\toks@\noexpand\\{#1}}}%
+ \ifweb@allowtemplates
+ \@AddToTextTemplate{%
+ \w@csarg\ifx{eqTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@textX,0){\@nameuse{#1}}%
+ \fi
+ }%
+ \else
+ \w@csarg\ifx{#1}\BGColorAndGraphic
+ \@AddToTextTemplate{%
+ \w@csarg\ifx{eqTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@textX,0){\@nameuse{#1}}%
+ \fi
+ }%
+ \fi
+ \w@csarg\ifx{#1}\BGColorAndGraphicFullWidth
+ \@AddToTextTemplate{%
+ \w@csarg\ifx{eqTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@textX,0){\@nameuse{#1}}%
+ \fi
+ }%
+ \fi
+ \fi
+}
+\newcommand\placeTemplateInLayer[2][webTextBG]{%
+ \@ifpackageloaded{aeb_pro}
+ {\@ifundefined{xBld}{\PackageWarning{web}
+ {The uselayers option
+ of aeb_pro is\MessageBreak required with
+ \string\placeTemplateInLayer}}
+ {\def\b@webTextLayer{\xBld[#2]{#1}}%
+ \def\e@webTextLayer{\eBld}}}%
+ {\PackageWarning{web}{\string\placeTemplateInLayer\space
+ requires the\MessageBreak aeb_pro package}}%
+}
+\let\b@webTextLayer\@empty \let\e@webTextLayer\@empty
+\newcommand{\BGColorAndGraphic}{%
+ \b@webTextLayer\web@colorbox@w@transparency{\web@textBgColor}%
+ {%
+ \parbox[b][\paperheight]{\textscreenwidth}%
+ {%
+ \ifx\web@template\@empty
+ \hfill\vfill
+ \else
+ \hfuzz=1pt\vfuzz=1pt\expandafter
+ \includegraphics\expandafter[\web@template@opt@args,%
+ width=\textscreenwidth,height=\paperheight]%
+ {\web@template}
+ \fi
+ }%
+ }\e@webTextLayer
+}
+\AddToTemplate{BGColorAndGraphic}
+\let\web@panelTemplate\@empty
+\newcommand{\@AddToPanelTemplate}{\g@addto@macro\web@panelTemplate}
+\let\listAddToPanelTemplates=\@empty
+\newcommand{\AddToPanelTemplate}[1]
+{%
+ \global\w@csarg\let{eqPanTmpl#1}\web@YES
+ {\toks@=\expandafter{\listAddToPanelTemplates}%
+ \xdef\listAddToPanelTemplates{\the\toks@\noexpand\\{#1}}}%
+ \ifweb@allowtemplates
+ \@AddToPanelTemplate{%
+ \w@csarg\ifx{eqPanTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@panelX,0){\@nameuse{#1}}\fi
+ }%
+ \else
+ \w@csarg\ifx{#1}\stdPanelBG
+ \@AddToPanelTemplate{%
+ \w@csarg\ifx{eqPanTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@panelX,0){\@nameuse{#1}}\fi
+ }%
+ \fi
+ \w@csarg\ifx{#1}\stdbldpanel
+ \@AddToPanelTemplate{%
+ \w@csarg\ifx{eqPanTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@panelX,0){\@nameuse{#1}}\fi
+ }%
+ \fi
+ \fi
+}
+\newcommand{\paneltemplate}[2][]
+{%
+ \ifweb@allowtemplates\def\web@argi{#1}%
+ \ifx\web@argi\@empty
+ \edef\web@paneltemplate@opt@args{%
+ \web@addtopaneltemplateArgs}%
+ \else
+ \edef\web@paneltemplate@opt@args{%
+ \web@addtopaneltemplateArgs,#1}%
+ \fi\gdef\web@paneltemplate{#2}%
+ \fi
+}
+\let\web@paneltemplate\@empty
+\def\addtopaneltemplateArgs#1{\gdef\web@addtopaneltemplateArgs{#1}}
+\def\clearpaneltemplateArgs{%
+ \global\let\web@addtopaneltemplateArgs=\@empty}
+\let\web@addtopaneltemplateArgs=\@empty
+\let\panel@scaletype\@empty
+\newcommand\panelsep[1]{\bgroup
+ \setlength\@tempdima{#1}%
+ \xdef\@panelsep{\the\@tempdima}\egroup}
+\panelsep{10bp}
+\def\panelSep{\@panelsep}
+\newcommand{\panelwidth}[1]{%
+ \let\web@next\relax
+ \iftemplatesforpaper\else\ifnum\@panelconfig>0
+ \ifnum\@panelconfig=1 % left panel
+ \ifx\web@layout\web@YES
+ \addtolength{\textwidth}{\@panelwidth}%
+ \addtolength{\textwidth}{\@Rightmargin}%
+ \fi
+ \addtolength{\textwidth}{\@panelsep}%
+ \addtolength{\oddsidemargin}{-\@panelsep}%
+ \addtolength{\evensidemargin}{-\@panelsep}%
+ \addtolength{\textscreenwidth}{\@panelwidth}%
+ \fi
+ \ifnum\@panelconfig=2 % panel right
+ \ifx\web@layout\web@YES
+ \addtolength{\textwidth}{\@panelwidth}%
+ \addtolength{\textwidth}{\@Leftmargin}%
+ \fi
+ \addtolength{\textwidth}{\@panelsep}%
+ \addtolength{\textscreenwidth}{\@panelwidth}%
+ \fi
+ \setlength{\@panelwidth}{#1}%
+ \ifdim\@panelwidth<\web@minpanelwidth
+ \setlength{\@panelwidth}{\web@minpanelwidth}\fi
+ \def\web@next{\InitLayout}%
+ \fi\fi\web@next
+}
+\newcommand{\panelBgColor}[1]{\gdef\web@panelBgColor{#1}}
+\let\web@panelBgColor\@empty
+\newcommand\placePanelTemplateInLayer[2][webPanelBG]{%
+ \@ifpackageloaded{aeb_pro}
+ {\@ifundefined{xBld}{\PackageWarning{web}
+ {The uselayers option
+ of aeb_pro is\MessageBreak required with
+ \string\placePanelTemplateInLayer}}
+ {\def\b@webPanelLayer{\xBld[#2]{#1}}%
+ \def\e@webPanelLayer{\eBld}}}%
+ {\PackageWarning{web}{\string\placePanelTemplateInLayer\space
+ requires the\MessageBreak aeb_pro package}}%
+}
+\let\b@webPanelLayer\@empty \let\e@webPanelLayer\@empty
+\newcommand\stdPanelBG
+{%
+ \b@webPanelLayer\web@colorbox@w@transparency{\web@panelBgColor}%
+ {\parbox[b][\paperheight]{\@panelwidth}%
+ {\ifx\web@paneltemplate\@empty\hfill\vfill\else
+ \hfuzz=1pt\vfuzz=1pt\expandafter
+ \includegraphics\expandafter[\web@paneltemplate@opt@args,%
+ width=\@panelwidth,height=\paperheight]%
+ {\web@paneltemplate}\fi}}\e@webPanelLayer
+}
+\AddToPanelTemplate{stdPanelBG}
+\newcommand{\buildpanel}[1]
+{%
+ \gdef\stdbldpanel
+ {%
+ \parbox[b][\paperheight]{\@panelwidth}%
+ {%
+ \normalsfcodes\normalfont\normalsize
+ \spaceskip=0pt\xspaceskip=0pt
+ \par\medskip\vfil
+ \centering#1%
+ \par\medskip\vfil
+ }%
+ }%
+}
+\let\stdbldpanel\@empty
+\AddToPanelTemplate{stdbldpanel}
+\newcommand{\useStandardPanel}{%
+ \buildpanel{%
+ \web@panel@top
+ \par\vspace{\stretch{1}}%
+ \web@panel@middle
+ \par\vspace{\stretch{1}}%
+ \web@panel@bottom
+ }%
+}
+\newcommand{\panelTop}[1]{\def\web@panel@top{#1}}
+\panelTop{}
+\newcommand{\panelMiddle}[1]{\def\web@panel@middle{#1}}
+\panelMiddle{}
+\newcommand{\panelBottom}[1]{\def\web@panel@bottom{#1}}
+\panelBottom{\panelNaviGroup}
+\newcommand{\ClearTextTemplate}
+{%
+ \global\let\web@textBgColor\@empty
+ \global\let\web@template\@empty
+}
+\newcommand{\ClearPanelTemplate}
+{%
+ \global\let\web@panelBgColor\@empty
+ \global\let\web@paneltemplate\@empty
+}
+\newcommand{\ClearBuildPanel}
+ {\global\let\stdbldpanel\@empty}
+
+\newcommand{\ClearAllTemplates}
+{%
+ \ClearTextTemplate
+ \ClearPanelTemplate
+}
+\newcommand{\ClearTextTemplateBuffer}
+ {\global\let\web@textTemplate\@empty}
+\newcommand{\ClearPanelTemplateBuffer}
+ {\global\let\web@panelTemplate\@empty}
+\newcommand{\saveElements}[1]
+{%
+ \begingroup
+ \global\w@csarg\let{web@SaveTmpls#1}\@empty
+ \toks@={}%
+ \def\web@addtoSaveToks##1{%
+ \edef\web@let{\global\expandafter
+ \let\expandafter\noexpand\csname#1##1\endcsname=%
+ \expandafter\noexpand\csname##1\endcsname}%
+ \web@let
+ \edef\web@SaveTmpls{\the\toks@\noexpand\\{##1}%
+ \expandafter\noexpand\csname#1##1\endcsname}%
+ \toks@=\expandafter{\web@SaveTmpls}%
+ }%
+ \web@addtoSaveToks{web@textBgColor}%
+ \web@addtoSaveToks{web@template}%
+ \web@addtoSaveToks{stdbldpanel}%
+ \web@addtoSaveToks{web@panelBgColor}%
+ \web@addtoSaveToks{web@paneltemplate}%
+ \w@csarg\xdef{web@SaveTmpls#1}{\the\toks@}%
+ \endgroup
+}
+\newcommand{\saveClearElements}[1]{%
+ \saveElements{#1}\ClearAllTemplates\ClearBuildPanel
+}
+\newcommand{\restoreElements}[1]{%
+ \ClearAllTemplates\ClearBuildPanel
+ \begingroup
+ \toks@=\expandafter{\csname web@SaveTmpls#1\endcsname}%
+ \def\\##1##2{\global\w@csarg\let{##1}=##2}\the\toks@
+ \endgroup
+}
+\newcommand{\disableScreens}[1]
+{%
+ \begingroup
+ \toks@=\expandafter{\listAddToTemplates}%
+ \toks2={}%
+ \def\\##1{\w@csarg\ifx{eqTmpl##1}\web@YES
+ \disableTemplate{##1}%
+ \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
+ \toks2=\expandafter{\web@saveAddTo}\fi}%
+ \the\toks@
+ \endgroup
+ \w@csarg\let{web@DisabledTmpls#1}\web@saveAddTo
+}
+\newcommand{\restoreScreens}[1]
+{%
+ \begingroup
+ \toks@=\expandafter{\csname web@DisabledTmpls#1\endcsname}%
+ \def\\##1{\enableTemplate{##1}}\the\toks@
+ \endgroup
+}
+\newcommand{\disablePanels}[1]
+{%
+ \begingroup
+ \toks@ = \expandafter{\listAddToPanelTemplates}%
+ \toks2 = {}%
+ \def\\##1{\w@csarg\ifx{eqPanTmpl##1}\web@YES
+ \disablePanelTemplate{##1}%
+ \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
+ \toks2 =\expandafter{\web@saveAddTo}\fi}%
+ \the\toks@
+ \endgroup
+ \global\w@csarg\let{web@DisabledPanelTmpls#1}\web@saveAddTo
+}
+\newcommand{\restorePanels}[1]
+{%
+ \begingroup
+ \toks@=\expandafter{\csname web@DisabledPanelTmpls#1\endcsname}%
+ \def\\##1{\enablePanelTemplate{##1}}\the\toks@
+ \endgroup
+}
+\newcommand{\disableTemplate}[1]{{%
+ \global\w@csarg\let{eqTmpl#1}\web@NO}}
+\newcommand{\enableTemplate}[1]{{%
+ \global\w@csarg\let{eqTmpl#1}\web@YES}}
+\newcommand{\disablePanelTemplate}[1]{{%
+ \global\w@csarg\let{eqPanTmpl#1}\web@NO}}
+\newcommand{\enablePanelTemplate}[1]{{%
+ \global\w@csarg\let{eqPanTmpl#1}\web@YES}}
+\let\fullscreenwidthadj\@empty
+\def\web@leftMargAdj{0pt}
+\def\web@rightMargAdj{0pt}
+\def\calculatefullwidth{%
+ \ifeqforpaper
+ \let\fullscreenwidthadj\@empty
+ \else
+ \ifnum\@panelconfig=1\relax % leftpanel
+ \bgroup
+ \setlength{\@tempdima}{-\@panelwidth-\@panelsep+\@Leftmargin}%
+ \xdef\web@leftMargAdj{\the\@tempdima}%
+ \setlength{\@tempdima}{-\@panelwidth-\@panelsep+\@Rightmargin}%
+ \xdef\web@rightMargAdj{\the\@tempdima}%
+ \egroup
+ \def\fullscreenwidthadj{\hspace{\web@leftMargAdj}}%
+ \fi
+ \fi
+}
+\newcommand{\makeFullwidthhead}{%
+ \global\let\web@save@oddhead\@oddhead
+ \renewcommand{\@oddhead}{\fullscreenwidthadj
+ \hbox to\fullscreenwidth{\normalfont\footnotesize
+ \web@headerhook\web@lhead\hfil\web@chead\hfil
+ \web@rightheader}\hss}%
+}
+\newcommand{\restoreSavedHead}{%
+ \global\let\@oddhead\web@save@oddhead
+ \let\web@save@oddhead\@empty
+}
+\def\webNotPaneledWarning{%
+ The Fullwidthtext environment is valid only\MessageBreak
+ for a paneled document, ignoring this\MessageBreak
+ environment}
+\newenvironment{Fullwidthtext}{%
+ \ifnum\@panelconfig=0\relax
+ \PackageWarning{web}{\webNotPaneledWarning}%
+ \let\web@next\relax
+ \else
+ \def\web@next{%
+ \enableTemplate{BGColorAndGraphicFullWidth}%
+ \list{}{%
+ \setlength{\textwidth}{\fullscreenwidth}%
+ \setlength{\linewidth}{\fullscreenwidth}%
+ \setlength{\itemindent}{0pt}\setlength{\itemsep}{0pt}%
+ \setlength{\topsep}{0pt}\setlength{\parsep}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+ \setlength{\leftmargin}{\web@leftMargAdj}%
+ \setlength{\rightmargin}{-\web@rightMargAdj}%
+ }\item\relax}%
+ \fi\web@next
+}{%
+ \ifnum\@panelconfig=0\relax\let\web@next\relax\else
+ \def\web@next{\endlist\newpage
+ \disableTemplate{BGColorAndGraphicFullWidth}}%
+ \fi\web@next
+}
+\newcommand{\pushToFullWidthPage}{%
+ \ifnum\@panelconfig>0\relax
+ \disableScreens{gofullwidth}%
+ \disablePanels{gofullwidth}%
+ \makeFullwidthhead
+ \let\web@save@footwrapper\webfootwrapper
+ \def\webfootwrapper{\fullscreenwidthadj
+ \makebox[\fullscreenwidth]}%
+ \fi
+ \begin{Fullwidthtext}
+}
+\newcommand{\popFromFullWidthPage}{%
+ \end{Fullwidthtext}
+ \ifnum\@panelconfig>0\relax
+ \restoreScreens{gofullwidth}%
+ \restorePanels{gofullwidth}%
+ \restoreSavedHead
+ \let\webfootwrapper\web@save@footwrapper
+ \fi
+}
+\def\addtofullwidthtemplateArgs#1{%
+ \gdef\web@addtofullwidthtemplateArgs{#1}}
+\def\clearfullwidthtemplateArgs{%
+ \global\let\web@addtofullwidthtemplateArgs\@empty}
+\let\web@addtofullwidthtemplateArgs\@empty
+\newcommand{\fullwidthBgColor}[1]{\gdef\web@fullwidthBgColor{#1}}
+\let\web@fullwidthBgColor\@empty
+\let\web@fullwidthtemplate\@empty
+\newcommand{\fullwidthtemplate}[2][]
+{%
+ \ifweb@allowtemplates
+ \def\web@arg{#1}\ifx\web@argi\@empty
+ \xdef\web@fullwidthtemplate@opt@args
+ {\web@addtofullwidthtemplateArgs}%
+ \else
+ \xdef\web@fullwidthtemplate@opt@args
+ {\web@addtofullwidthtemplateArgs,#1}%
+ \fi\gdef\web@fullwidthtemplate{#2}%
+ \fi
+}
+\newcommand\BGColorAndGraphicFullWidth
+{%
+ \put(-\@textX,0){%
+ \web@colorbox@w@transparency{\web@fullwidthBgColor}%
+ {%
+ \parbox[b][\paperheight]{\paperwidth}%
+ {%
+ \ifx\web@fullwidthtemplate\@empty
+ \hfill\vfill
+ \else
+ \hfuzz=1pt\vfuzz=1pt
+ \expandafter\includegraphics\expandafter
+ [\web@fullwidthtemplate@opt@args,%
+ width=\paperwidth,height=\paperheight]%
+ {\web@fullwidthtemplate}%
+ \fi
+ }%
+ }%
+ }%
+}
+\AddToTemplate{BGColorAndGraphicFullWidth}
+\disableTemplate{BGColorAndGraphicFullWidth}
+\ifnum\@usetemplates>0
+ \ifnum\@panelconfig>0
+ \AtBeginDocument{%
+ \AddToShipoutPicture{\web@textTemplate\web@panelTemplate}}
+ \else
+ \AtBeginDocument{\AddToShipoutPicture{\web@textTemplate}}
+ \fi
+\fi
+\raggedbottom
+\ifx\webpro@loaded\web@YES\expandafter\loadwebpro\fi
+\endinput
+%%
+%% End of file `web.sty'.
diff --git a/texmf-dist/tex/latex/acrotex/webpro.def b/texmf-dist/tex/latex/acrotex/webpro.def
new file mode 100644
index 00000000..b32eaa7e
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/webpro.def
@@ -0,0 +1,876 @@
+%%
+%% This is file `webpro.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% web.dtx (with options: `copyright,webpro')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Web package, %%
+%% Copyright (C) 1999-2017 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.
+%%---------------------------------------------------------
+\RequirePackage{pifont}
+\newcommand{\DeclareDocInfo}[1]{\setkeys{aebDocInfo}{#1}%
+ \ifx\web@talkdate@value\@empty\else\let\webversion\webtalkdate\fi}
+\@onlypreamble\DeclareDocInfo
+\define@key{aebDocInfo}{title}[]{\title{#1}}
+\define@key{aebDocInfo}{author}[]{\author{#1}}
+\define@key{aebDocInfo}{university}[]{\university{#1}}
+\define@key{aebDocInfo}{email}[]{\email{#1}}
+\define@key{aebDocInfo}{talksite}[]{\talksite{#1}}
+\define@key{aebDocInfo}{talkdate}[]{\talkdate{#1}}
+\define@key{aebDocInfo}{talkdateLabel}[Presented:]{\talkdateLabel{#1}}
+\define@key{aebDocInfo}{version}[]{\version{#1}}
+\define@key{aebDocInfo}{versionLabel}[Version]{\versionLabel{#1}}
+\define@key{aebDocInfo}{subject}[]{\subject{#1}}
+\define@key{aebDocInfo}{keywords}[]{\keywords{#1}}
+\define@key{aebDocInfo}{copyrightyears}[]{\copyrightyears{#1}}
+\define@key{aebDocInfo}{prepared}[]{\prepared{#1}}
+\define@key{aebDocInfo}{preparedLabel}[]{\preparedLabel{#1}}
+\define@key{aebDocInfo}{Title}[]%
+ {\@ifpackageloaded{aebxmp}{\Title{#1}}{}}
+\define@key{aebDocInfo}{authors}[]%
+ {\@ifpackageloaded{aebxmp}{\Authors{#1}}{}}
+\define@key{aebDocInfo}{Subject}[]%
+ {\@ifpackageloaded{aebxmp}{\Subject{#1}}{\subject{#1}}}
+\define@key{aebDocInfo}{Keywords}[]%
+ {\@ifpackageloaded{aebxmp}{\Keywords{#1}}{\keywords{#1}}}
+\define@key{aebDocInfo}{lang}[]%
+ {\@ifpackageloaded{aebxmp}{\metaLang{#1}}{}}
+\define@key{aebDocInfo}{copyrightStatus}[]%
+ {\@ifpackageloaded{aebxmp}{\copyrightStatus{#1}}{}}
+\define@key{aebDocInfo}{copyrightNotice}[]%
+ {\@ifpackageloaded{aebxmp}{\copyrightNotice{#1}}{}}
+\define@key{aebDocInfo}{copyrightInfoURL}[]%
+ {\@ifpackageloaded{aebxmp}{\copyrightInfoURL{#1}}{}}
+\define@key{aebDocInfo}{authortitle}[]%
+ {\@ifpackageloaded{aebxmp}{\authortitle{#1}}{}}
+\define@key{aebDocInfo}{descriptionwriter}[]%
+ {\@ifpackageloaded{aebxmp}{\descriptionwriter{#1}}{}}
+\define@key{aebDocInfo}{customProperties}[]%
+ {\@ifpackageloaded{aebxmp}{\customProperties{#1}}{}}
+\newcommand{\DeclarePageLayout}[1]{\save@prtscr
+ \setkeys{web@pl}{topmargin,headheight,marginparsep,%
+ marginparwidth,marginparpush,webfootskip}%
+ \protected@edef\web@temp{\noexpand\setkeys{web@pl}{#1}}%
+ \web@temp\save@prtscr
+ \ifx\web@pl@screensize\@empty\else
+ \expandafter\screensize\web@pl@screensize\fi
+ \ifx\web@pl@margins\@empty\else
+ \expandafter\margins\web@pl@margins\fi
+ \ifeqforpaper\else
+ \ifdim\@Leftmargin<\@Rightmargin
+ \ifdim\marginparwidth>\@Leftmargin
+ \setlength{\marginparwidth}
+ {\@Leftmargin-2\marginparsep}%
+ \fi
+ \else
+ \ifdim\marginparwidth>\@Rightmargin
+ \setlength{\marginparwidth}
+ {\@Rightmargin-2\marginparsep}%
+ \fi
+ \fi
+ \fi
+ \ifeqforpaper\else
+ \ifdim\@Bottommargin<\web@footskip\relax\PackageError{web}{%
+ Error in the value of the webfootskip key\MessageBreak
+ of the \string\DeclarePageLayout\space command.\MessageBreak
+ The bottom margin must be larger then\MessageBreak
+ the value of webfootskip}{%
+ Increase the size of the bottom margin,\MessageBreak
+ or decrease the value of webfootskip.}\else
+ \fi
+ \fi
+}
+\@onlypreamble\DeclarePageLayout
+\define@key{web@pl}{screensize}[]{\def\web@pl@screensize{#1}}
+\let\web@pl@screensize\@empty
+\define@key{web@pl}{margins}[]{\def\web@pl@margins{#1}}
+\let\web@pl@margins\@empty
+\define@choicekey+{web@pl}{design}[\val\nr]{designi,designii,%
+ designiii,designiv,designv,designvi,designvii,designviii,designix}{%
+ \ifcase\nr\relax
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{3.736in}{4.67in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{5in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{5in}{6in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4in}{5in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{6in}\or
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.17in}{4.67in}\or
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{7.5in}{10in}\or
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6.67in}\or
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6in}\fi
+ }{\PackageWarning{webpro}{%
+ Bad choice for design, use designi--designvix. Try again}}
+\define@choicekey+{web@pl}{screensizeOf}[\val\nr]{designi,designii,%
+ designiii,designiv,designv,designvi,designvii,designviii,designix}{%
+ \ifcase\nr\relax
+ \screensize{3.736in}{4.67in}\or
+ \screensize{4.5in}{5in}\or
+ \screensize{5in}{6in}\or
+ \screensize{4in}{5in}\or
+ \screensize{4.5in}{6in}\or
+ \screensize{4.17in}{4.67in}\or
+ \screensize{7.5in}{10in}\or
+ \screensize{3.75in}{6.67in}\or
+ \screensize{3.75in}{6in}\fi
+ }{\PackageWarning{webpro}{%
+ Bad choice for screensizeOf, use designi--designvix. Try again}}
+\define@key{web@pl}{headheight}[8pt]{\def\websetheadheight{#1}}
+\define@key{web@pl}{topmargin}[\prtscr{\the\topmargin}{8pt}]{%
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \edef\web@argi{\prtscr{\the\topmargin}{8pt}}\fi
+ \ifeqforpaper
+ \setlength{\topmargin}{\web@argi}%
+ \else
+ \setlength{\web@Topmargin}{\web@argi}%
+ \fi}
+\define@key{web@pl}{textwidth}[345pt]{\setlength{\textwidth}{#1}}
+\define@key{web@pl}{textheight}[43\baselineskip]%
+ {\setlength{\textheight}{#1}}
+\define@key{web@pl}{oddsidemargin}[63pt]%
+ {\setlength{\oddsidemargin}{#1}}
+\define@key{web@pl}{evensidemargin}[63pt]%
+ {\setlength{\evensidemargin}{#1}}
+\define@key{web@pl}{marginparsep}[\prtscr{\the\marginparsep}{11pt}]{%
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \edef\web@argi{\prtscr{\the\marginparsep}{11pt}}\fi
+ \setlength{\marginparsep}{\web@argi}}
+\define@key{web@pl}{marginparwidth}%
+ [\prtscr{\the\marginparwidth}{.25in}]{%
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \edef\web@argi{\prtscr{\the\marginparwidth}{.25in}}\fi
+ \setlength{\marginparwidth}{\web@argi}}
+\define@key{web@pl}{marginparpush}[5pt]{%
+ \setlength{\marginparpush}{#1}}
+\define@key{web@pl}{webfootskip}[4pt]{%
+ \def\web@footskip{#1}}
+\define@key{web@pl}{footskip}[30pt]{\setlength{\footskip}{#1}}
+\define@key{web@pl}{panelwidth}[1in]{\panelwidth{#1}}
+\define@key{web@pl}{panelsep}[10pt]{\panelsep{#1}}
+\define@key{web@pl}{additionalheadsep}[0pt]%
+ {\def\web@additionalheadsep{#1}}
+\renewcommand{\topTitlePage}
+{%
+ \vglue\web@aboveTopTitleSkip
+ \noindent\makebox[\linewidth][\halignuniversity]{\parbox{%
+ \hproportionwebuniversity\linewidth}%
+ {\sectionUniversity{\webuniversity}}}%
+ \par\ifeqforpaper\else\minimumskip\fi
+ \vspace{\stretch{1}}%
+ \noindent\makebox[\linewidth][\haligntitle]%
+ {\parbox{\hproportionwebtitle\linewidth}%
+ {\sectionTitle{\webtitle}}}%
+ \par\ifeqforpaper\vspace{2\baselineskip}\else
+ \minimumskip\vspace{\stretch{1}}\fi
+ \noindent\makebox[\linewidth][\halignauthor]%
+ {\parbox{\hproportionwebauthor\linewidth}%
+ {\sectionAuthor{\webauthor}}}
+ \par\ifeqforpaper\vspace{2\baselineskip}\else
+ \minimumskip\vspace{\stretch{1}}\fi
+}
+\newcommand{\topTitlePageProportion}[1]{\def\titleauthorproportion{#1}}
+\renewcommand{\titlepageTrailer}
+{%
+ \webtpTrailerWrapper{\makebox[\web@tp@linewidth]{%
+ \parbox{\web@tp@linewidth}{%
+ \ifx\tpTrailer@textcolor\@empty\else
+ \color{\tpTrailer@textcolor}\fi\web@tpTrailer@formatting
+ \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
+ \maketitle@trailer@ll\hfill\maketitle@trailer@lr
+ }}}%
+}
+\def\maketitle@trailer@ul{\web@copyright\ \web@copyright@symbol\
+ \webcopyrightyears\ \thewebemail}
+\def\maketitle@trailer@ll{\aeb@Prepared}
+\def\maketitle@trailer@ur{\aeb@talksite}
+\def\maketitle@trailer@lr{\webversion}
+\let\webtpTrailerWrapper\relax
+\let\web@tpTrailerBgColor\@empty
+\let\web@tpTrailerBorderColor\@empty
+\let\tpTrailer@textcolor\@empty
+\let\web@tpTrailer@graphic\@empty
+\let\web@tpTrailer@namedgraphic\@empty
+\let\web@tpTrailer@formatting\@empty
+\def\web@tpTrailer@raise{0pt}
+\def\web@tp@linewidth{\linewidth}
+\define@key{tpTrailer}{ul}{\def\maketitle@trailer@ul{#1}}
+\define@key{tpTrailer}{ll}{\def\maketitle@trailer@ll{#1}}
+\define@key{tpTrailer}{ur}{\def\maketitle@trailer@ur{#1}}
+\define@key{tpTrailer}{lr}{\def\maketitle@trailer@lr{#1}}
+\define@key{tpTrailer}{textColor}{\def\tpTrailer@textcolor{#1}}
+\define@key{tpTrailer}{bgColor}{\def\web@tpTrailerBgColor{#1}}
+\define@key{tpTrailer}{borderColor}{\def\web@tpTrailerBorderColor{#1}}
+\define@key{tpTrailer}{fboxsep}{\def\web@tpTrailerfboxsep{#1}}
+\define@key{tpTrailer}{fboxrule}{\def\web@tpTrailerfboxrule{#1}}
+\define@key{tpTrailer}{graphic}{\def\web@tpTrailer@graphic{#1}}
+\define@key{tpTrailer}{namedgraphic}{%
+ \def\web@tpTrailer@namedgraphic{#1}}
+\define@key{tpTrailer}{fontSize}{\renewcommand{\trailerFontSize}{#1}}
+\define@key{tpTrailer}{formatting}{\def\web@tpTrailer@formatting{#1}}
+\define@key{tpTrailer}{raise}{\def\web@tpTrailer@raise{#1}}
+\newcommand{\DesignTitlePageTrailer}[1]
+{%
+ \setkeys{tpTrailer}{fboxsep=3pt,fboxrule=.4pt}%
+ \setkeys{tpTrailer}{#1}%
+ \setlength{\fboxsep}{\web@tpTrailerfboxsep}%
+ \setlength{\fboxrule}{\web@tpTrailerfboxrule}%
+ \let\web@tp@graphic\web@NO
+ \ifx\web@tpTrailer@graphic\@empty
+ \ifx\web@tpTrailer@namedgraphic\@empty\else
+ \let\web@tp@graphic\web@YES\fi
+ \else\let\web@tp@graphic\web@YES\fi
+ \ifx\web@tp@graphic\web@NO\relax
+ \ifx\web@tpTrailerBgColor\@empty
+ \def\grfbox@spec##1{##1}%
+ \else
+ \ifx\web@tpTrailerBorderColor\@empty
+ \def\web@tp@linewidth{\linewidth-2\fboxsep}%
+ \def\grfbox@spec{\colorbox{\web@tpTrailerBgColor}}%
+ \else
+ \def\web@tp@linewidth{%
+ \linewidth-2\fboxsep-2\fboxrule}%
+ \def\grfbox@spec{\fcolorbox{\web@tpTrailerBorderColor}%
+ {\web@tpTrailerBgColor}}%
+ \fi
+ \fi
+ \def\webtpTrailerWrapper##1{\smash{\raisebox
+ {\web@tpTrailer@raise}{\grfbox@spec{##1}}}}%
+ \else
+ \@ifundefined{graphicxbox}{\begingroup
+ \gdef\webtpTrailerWrapper##1{%
+ \edef\web@tmp@opt{\ifx\web@tpTrailer@namedgraphic\@empty\else
+ name=\web@tpTrailer@namedgraphic,\fi}%
+ \def\web@tp@linewidth{\linewidth-2\fboxsep}%
+ \setbox0=\hbox{##1}%
+ \noindent\makebox[0pt][l]{%
+ \smash{\raisebox{-\dp0-\fboxsep+\web@tpTrailer@raise}{%
+ \expandafter\includegraphics\expandafter[\web@tmp@opt
+ width=\wd0+2\fboxsep,%
+ height=\dp0+\ht0+2\fboxsep]{\web@tpTrailer@graphic}}%
+ }}\kern\fboxsep\smash{%
+ \raisebox{\web@tpTrailer@raise}{\unhbox0\relax}}%
+ }%
+ \endgroup}{%
+ \xdef\grfbox@spec{%
+ \ifx\web@tpTrailerBorderColor\@empty
+ \noexpand\graphicxbox\else
+ \noexpand\fgraphicxbox{\web@tpTrailerBorderColor}\fi
+ \ifx\web@tpTrailer@namedgraphic\@empty\else
+ [name=\web@tpTrailer@namedgraphic]\fi}%
+ \gdef\webtpTrailerWrapper##1{%
+ \edef\web@tp@linewidth{%
+ \linewidth-2\fboxsep\ifx\web@tpTrailerBorderColor\@empty
+ \else-2\fboxrule\fi}%
+ \smash{\raisebox{\web@tpTrailer@raise}{%
+ \grfbox@spec{\web@tpTrailer@graphic}{##1}}}}%
+ }%
+ \fi
+}
+\renewcommand{\web@maketitle}
+{%
+ \maketitlepreamble
+ \ifeqforpaper\vspace*{2\baselineskip}\else
+ \vbox to\titleauthorproportion\textheight\bgroup\fi
+ \topTitlePage
+ \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
+ \begingroup\par
+ \aboveOPMvspace
+ \noindent\parbox{\linewidth}{\optionalpagematter}%
+ \par\endgroup
+ \par\vspace{\stretch{1}}
+ \ifx\web@directory@option\web@YES\web@directory@hook\webdirectory\fi
+ \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}
+ \vfill\noindent\begingroup\trailerFontSize\titlepageTrailer
+ \par\endgroup
+ \maketitlepostamble
+}
+\let\web@maketitle@save\maketitle
+\let\maketitle\web@maketitle
+\def\preparedLabel#1{\def\web@revision{#1}}
+\preparedLabel{Prepared:}
+\def\prepared#1{\def\argi{#1}\ifx\argi\@empty
+ \else\def\aeb@prepared{#1}\fi}
+\def\aeb@prepared{\@date}
+\def\aeb@Prepared{\web@revision\ \aeb@prepared}
+\def\talkdate#1{\gdef\web@talkdate@value{#1}%
+ \edef\webtalkdate{\ifx\web@talkdate@value\@empty
+ \else\noexpand\web@talkdatelabel\ #1\fi}}
+\let\web@talkdate@value\@empty
+\def\talkdateLabel#1{\def\web@talkdatelabel{#1}}
+\talkdateLabel{Presented:}
+\def\talksite#1{\def\aeb@talksite{#1}}
+\talksite{}
+\define@choicekey+{aebsection}{reset}[\val\nr]{font,all}{%
+ \ifcase\nr\relax
+ \aeb@reset@section@fonts\or
+ \aeb@reset@section@all\fi
+}{\PackageWarning{webpro}{Bad choice for reset, permissible values
+ are font and all. Try again}}
+\define@choicekey+{aebsection}{type}[\val\nr]{section,subsection,%
+ subsubsection,university,title,author,toc}%
+{%
+ \edef\aeb@section@type{#1}%
+ \edef\aeb@section@typeIndex{\nr}%
+}{}{}
+\define@key{aebsection}{special}{%
+ \edef\aeb@temp@expand{%
+ \noexpand\XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
+ \aeb@temp@expand{shadow,framebox,colorbox,fcolorbox,frameboxfit,%
+ colorboxfit,fcolorboxfit,colorboxfitrule,custom,default}%
+{%
+ \ifcase\nr\relax
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@shadowHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@fcolorboxHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxfitHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxfitHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}
+ \aeb@fcolorboxfitHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}
+ \aeb@colorboxfitruleHead\or
+ \edef\aeb@temp{\noexpand\def\expandafter\noexpand
+ \csname aeb@\aeb@section@type @special\endcsname{\expandafter
+ \noexpand\csname aeb@\aeb@section@type @customHead\endcsname}}%
+ \aeb@temp\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\@empty\fi
+}{%
+ \PackageWarning{webpro}{Bad choice for special, permissible values
+ are shadow, framebox, colorbox, fcolorbox, custom and default.
+ Try again}}%
+}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}%
+{university}{title}{author}{toc}\do{%
+ \w@csarg\let{aeb@\@@tmp @special}\@empty}
+\newcommand{\customSecHead}[1]{\def\aeb@section@customHead##1{#1}}
+\newcommand{\customSubsecHead}[1]{\def\aeb@subsection@customHead##1{#1}}
+\newcommand{\customSubsubsecHead}[1]
+ {\def\aeb@subsubsection@customHead##1{#1}}
+\newcommand{\customUniversity}[1]{\def\aeb@university@customHead##1{#1}}
+\newcommand{\customTitle}[1]{\def\aeb@title@customHead##1{#1}}
+\newcommand{\customAuthor}[1]{\def\aeb@author@customHead##1{#1}}
+\newcommand{\customToc}[1]{\def\aeb@toc@customHead##1{#1}}
+\def\aeb@frameboxHead#1{%
+ \begingroup
+ \@tempdima=\linewidth
+ \advance\@tempdima-2\fboxsep
+ \advance\@tempdima-2\fboxrule
+ \edef\@@aeb@sectionframecolor
+ {\@nameuse{aeb@\aeb@section@type framecolor}}%
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \setbox0\vbox{\hsize=\@tempdima#1}\color{\@@aeb@sectionframecolor}%
+ \framebox{\color{\@@aeb@sectioncolor}\copy0}%
+ \endgroup
+}
+\def\aeb@colorboxHead#1{%
+ \begingroup
+ \@tempdima=\linewidth
+ \advance\@tempdima-2\fboxsep
+ \setbox0\vbox{\hsize=\@tempdima#1}%
+ \edef\@@aeb@sectionbgcolor
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ \colorbox{\@@aeb@sectionbgcolor}{\copy0}%
+ \endgroup
+}
+\def\aeb@fcolorboxHead#1{%
+ \begingroup
+ \@tempdima=\linewidth
+ \advance\@tempdima-2\fboxsep
+ \advance\@tempdima-2\fboxrule
+ \setbox0\vbox{\hsize=\@tempdima#1}%
+ \edef\@@aeb@sectionbgcolor
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ \fcolorbox{\aeb@sectionframecolor}%
+ {\@@aeb@sectionbgcolor}{\copy0}
+ \endgroup
+}
+\def\aeb@frameboxfitHead#1{%
+ \begingroup
+ \edef\@@aeb@sectionframecolor
+ {\@nameuse{aeb@\aeb@section@type framecolor}}%
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \vbox{\color{\@@aeb@sectionframecolor}%
+ \framebox{\color{\@@aeb@sectioncolor}#1}}%
+ \endgroup
+}
+\def\aeb@colorboxfitHead#1{%
+ \begingroup
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \edef\@@aeb@sectionbgcolor
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ \vbox{\colorbox{\@@aeb@sectionbgcolor}%
+ {\color{\@@aeb@sectioncolor}#1}}%
+ \endgroup
+}
+\def\aeb@fcolorboxfitHead#1{%
+ \begingroup
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \edef\@@aeb@sectionbgcolor
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ \edef\@@aeb@sectionframecolor
+ {\@nameuse{aeb@\aeb@section@type framecolor}}%
+ \vbox{\fcolorbox{\@@aeb@sectionframecolor}{\@@aeb@sectionbgcolor}%
+ {\color{\@@aeb@sectioncolor}#1}}%
+ \endgroup
+}
+\def\shadowhoffset#1{\def\aeb@shadowhoffset{#1}}
+\shadowhoffset{.2ex}
+\def\shadowvoffset#1{\def\aeb@shadowvoffset{#1}}
+\shadowvoffset{-.2ex}
+\def\aeb@shadowHead#1{% dps1
+ \begingroup
+ \edef\@@aeb@sectionshadowcolor
+ {\@nameuse{aeb@\aeb@section@type shadowcolor}}%
+ \edef\@@aeb@sectioncolor
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \setbox0\vbox{\Shadowtrue\hsize=\linewidth #1}%
+ \wd0\z@\dp0\z@\relax\raisebox{\aeb@shadowvoffset}%
+ {\hbox to\z@{\kern\aeb@shadowhoffset%
+ \Shadowtrue\color{\@@aeb@sectionshadowcolor}
+ \box0\hss}}%
+ \setbox0\vbox{\Shadowfalse\hsize=\linewidth #1}\box0
+ \endgroup
+}
+\define@key{aebsection}{usefont}{%
+ \w@csarg\def{aeb@\aeb@section@type @usefont}{\aeb@usefont#1}}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}
+{university}{title}{author}{toc}\do{%
+ \w@csarg\let{aeb@\@@tmp @usefont}\@empty}
+\def\aeb@usefont#1#2#3#4#5{\def\aeb@usefontargv{#5}%
+ \ifx\aeb@usefontargv\@empty
+ \def\aeb@next{\expandafter\@gobble\@gobbletwo}%
+ \else
+ \def\aeb@next{\expandafter\@gobbletwo\@gobbletwo}%
+ \fi
+ \fontencoding{#1}\fontfamily{#2}%
+ \fontseries{#3}\fontshape{#4}\ifx\aeb@usefontargv\@empty\else
+ \fontsize#5\fi\selectfont\aeb@next
+}
+\define@key{aebsection}{fontfamily}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{rmfamily,sffamily,ttfamily}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontfamily}{\@nameuse{#1}}%
+}{\PackageWarning{webpro}{Bad choice for fontfamily, permissible values
+ are rmfamily, sffamily and ttfamily. Try again}}%
+}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
+{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontfamily}\aeb@defaultfamily}
+\define@key{aebsection}{fontseries}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{bfseries,mdseries}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontseries}{\@nameuse{#1}}%
+}{\PackageWarning{webpro}{Bad choice for fontseries, permissible values
+ are bfseries and mdseries. Try again}}%
+}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
+{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontseries}\bfseries}
+\define@key{aebsection}{fontshape}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{upshape,itshape,scshape,slshape}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontshape}{\@nameuse{#1}}%
+}{\PackageWarning{webpro}{Bad choice for fontshape, permissible values
+ are upshape, itshape, scshape and slshape. Try again}}%
+}
+\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
+{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontshape}\upshape}
+\define@key{aebsection}{fontsize}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{tiny,scriptsize,footnotesize,%
+ small,normalsize,large,Large,LARGE,huge,Huge}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontsize}{\@nameuse{#1}}%
+}{\PackageWarning{webpro}{Bad choice for fontsize, permissible values
+ are tiny, scriptsize, footnotesize, small, normalsize,
+ large, Large, LARGE, huge and Huge. Try again}}%
+}
+\@tfor\@@tmp:={{section}{\normalsize}}{{subsection}{\normalsize}}%
+{{subsubsection}{\normalsize}}{{university}{\normalsize}}%
+{{title}{\large}}{{author}{\normalsize}}{{toc}{\small}}\do{%
+ \expandafter\getargs\@@tmp
+ \edef\aeb@temp{\global\noexpand
+ \let\expandafter\noexpand\csname aeb@\aeb@argi @fontsize\endcsname
+ \expandafter\noexpand\aeb@argii}\aeb@temp
+}
+\define@key{aebsection}{halign}{%
+ \edef\aeb@temp@expand{%
+ \noexpand\XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
+ \aeb@temp@expand{l,c,r}{%
+ \ifcase\nr\relax
+ \w@csarg\let{aeb@\aeb@section@type @halign}\raggedright\or
+ \w@csarg\let{aeb@\aeb@section@type @halign}\centering\or
+ \w@csarg\let{aeb@\aeb@section@type @halign}\raggedleft\fi
+}{\PackageWarning{webpro}{Bad choice for halign, permissible values
+ are l, c and r. Try again}}%
+}
+\@tfor\@@tmp:={\aeb@section@halign\raggedright}
+{\aeb@subsection@halign\raggedright}
+{\aeb@subsubsection@halign\raggedright}
+{\aeb@university@halign\centering}
+{\aeb@title@halign\centering}{\aeb@author@halign\centering}%
+{\aeb@toc@halign\centering}\do
+{%
+ \expandafter\getargs\@@tmp
+ \edef\aeb@temp{\noexpand\let\expandafter\noexpand\aeb@argi
+ \expandafter\noexpand\aeb@argii}\aeb@temp
+}
+\define@key{aebsection}{ding}{\if\aeb@use@section@numbers0
+ \webtoksi=\expandafter{\expandafter\protect
+ \expandafter\web@sel@sec@col\expandafter{\aeb@section@type}#1\ }%
+ \w@csarg\edef{aeb@\aeb@section@type Num}##1{\the\webtoksi}%
+ \else\PackageWarning{webpro}{The ding key is not available with a
+ section numbering system,\MessageBreak
+ ignoring request for a ding.}\fi
+}
+\define@key{aebsection}{color}{%
+ \w@csarg\def{aeb@\aeb@section@type color}{#1}}
+\define@key{aebsection}{ruleheight}{%
+ \w@csarg\def{aeb@\aeb@section@type ruleheight}{#1}}
+\define@key{aebsection}{numdingcolor}{%
+ \w@csarg\def{aeb@\aeb@section@type numdingcolor}{#1}}
+\def\aeb@sectioncolor{blue}
+\def\aeb@subsectioncolor{\aeb@sectioncolor}
+\def\aeb@subsubsectioncolor{\aeb@sectioncolor}
+\def\aeb@sectionnumdingcolor{\aeb@sectioncolor}
+\def\aeb@subsectionnumdingcolor{\aeb@sectioncolor}
+\def\aeb@subsubsectionnumdingcolor{\aeb@sectioncolor}
+\def\aeb@universitycolor{black}
+\def\aeb@universitynumdingcolor{\aeb@universitycolor}
+\def\aeb@titlecolor{blue}
+\def\aeb@titlenumdingcolor{\aeb@titlecolor}
+\def\aeb@authorcolor{black}
+\def\aeb@authornumdingcolor{\aeb@authorcolor}
+\def\aeb@toccolor{blue}
+\def\aeb@tocnumdingcolor{\aeb@toccolor}
+\define@key{aebsection}{framecolor}{%
+ \w@csarg\def{aeb@\aeb@section@type framecolor}{#1}}
+\def\aeb@sectionframecolor{blue}
+\def\aeb@subsectionframecolor{blue}
+\def\aeb@subsubsectionframecolor{blue}
+\def\aeb@universityframecolor{blue}
+\def\aeb@titleframecolor{blue}
+\def\aeb@authorframecolor{blue}
+\def\aeb@tocframecolor{blue}
+\define@key{aebsection}{bgcolor}{%
+ \w@csarg\def{aeb@\aeb@section@type bgcolor}{#1}}
+\def\aeb@sectionbgcolor{cornsilk}
+\def\aeb@subsectionbgcolor{cornsilk}
+\def\aeb@subsubsectionbgcolor{cornsilk}
+\def\aeb@authorbgcolor{cornsilk}
+\def\aeb@titlebgcolor{cornsilk}
+\def\aeb@authorbgcolor{cornsilk}
+\def\aeb@tocbgcolor{cornsilk}
+\define@key{aebsection}{shadowcolor}{%
+ \w@csarg\def{aeb@\aeb@section@type shadowcolor}{#1}}
+\def\aeb@sectionshadowcolor{black}
+\def\aeb@subsectionshadowcolor{black}
+\def\aeb@subsubsectionshadowcolor{black}
+\def\aeb@universityshadowcolor{black}
+\def\aeb@titleshadowcolor{black}
+\def\aeb@authorshadowcolor{black}
+\def\aeb@tocshadowcolor{black}
+\define@key{aebsection}{indent}[0pt]{%
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \def\web@argi{0pt}\fi
+ \w@csarg\edef{aeb@\aeb@section@type @indent}{\web@argi}}
+\def\aeb@section@indent{\z@}
+\def\aeb@subsection@indent{\z@}
+\def\aeb@subsubsection@indent{\z@}
+\def\aeb@university@indent{\z@}
+\def\aeb@title@indent{\z@}
+\def\aeb@author@indent{\z@}
+\def\aeb@toc@indent{\z@}
+\define@key{aebsection}{beforeskip}{%
+ \w@csarg\def{aeb@\aeb@section@type @beforeskip}{#1}}
+\def\aeb@section@beforeskip{-3ex\@plus -1ex \@minus-.2ex}
+\def\aeb@subsection@beforeskip{-2.5ex\@plus -1ex \@minus -.2ex}
+\def\aeb@subsubsection@beforeskip{-2ex\@plus -1ex \@minus -.2ex}
+\def\aeb@university@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
+\def\aeb@title@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
+\def\aeb@author@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
+\def\aeb@toc@beforeskip{-3ex\@plus -1ex \@minus-.2ex}
+\define@key{aebsection}{afterskip}{%
+ \w@csarg\def{aeb@\aeb@section@type @afterskip}{#1}}
+\def\aeb@section@afterskip{1ex\@plus .2ex}
+\def\aeb@subsection@afterskip{1ex\@plus .2ex}
+\def\aeb@subsubsection@afterskip{.5ex\@plus .2ex}
+\def\aeb@university@afterskip{1ex\@plus .2ex}
+\def\aeb@title@afterskip{1ex\@plus .2ex}
+\def\aeb@author@afterskip{1ex \@plus1fill} %{1ex\@plus .2ex}
+\def\aeb@toc@afterskip{1ex\@plus .2ex}
+\define@key{aebsection}{hproportion}{%
+ \w@csarg\def{hproportionweb\aeb@section@type}{#1}}
+\define@key{aebsection}{xhalign}{%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{l,c,r}{%
+ \w@csarg\def{halign\aeb@section@type}{#1}%
+}{\PackageWarning{webpro}{Bad choice for xhalign, permissible values
+ are l, c and r. Try again}}%
+}
+\def\halignuniversity{c}
+\def\haligntitle{c}
+\def\halignauthor{c}
+\let\halignsection\relax
+\let\halignsubsection\relax
+\let\halignsubsubsection\relax
+\let\haligntoc\relax
+\define@key{aebToc}{tocName}{\tocName{#1}}
+\define@key{aebToc}{tocNameCont}{\tocNameCont{#1}}
+\def\aeb@reset@section@fonts{%
+ \normalfont\normalsize
+ \ifcase\aeb@section@typeIndex\relax
+ \let\aeb@section@usefont\@empty
+ \let\aeb@section@fontfamily\aeb@defaultfamily
+ \let\aeb@section@fontseries\bfseries
+ \let\aeb@section@fontshape\upshape
+ \let\aeb@section@fontsize\Large
+ \or
+ \let\aeb@subsection@usefont\@empty
+ \let\aeb@subsection@fontfamily\aeb@defaultfamily
+ \let\aeb@subsection@fontseries\bfseries
+ \let\aeb@subsection@fontshape\upshape
+ \let\aeb@subsection@fontsize\large
+ \or
+ \let\aeb@subsubsection@usefont\@empty
+ \let\aeb@subsubsection@fontfamily\aeb@defaultfamily
+ \let\aeb@subsubsection@fontseries\bfseries
+ \let\aeb@subsubsection@fontshape\upshape
+ \let\aeb@subsubsection@fontsize\normalsize
+ \fi
+}
+\def\aeb@reset@section@all{%
+ \aeb@reset@section@fonts
+ \ifcase\aeb@section@typeIndex\relax
+ \let\aeb@section@halign\raggedright
+ \def\aeb@sectioncolor{blue}%
+ \def\aeb@sectionshadowcolor{black}%
+ \let\aeb@section@special=\@empty
+ \def\aeb@section@beforeskip{-3ex\@plus -1ex \@minus-.2ex}%
+ \def\aeb@section@afterskip{1ex\@plus .2ex}%
+ \def\aeb@sectionframecolor{blue}%
+ \def\aeb@sectionframecolor{cornsilk}%
+ \or
+ \let\aeb@subsection@halign\raggedright
+ \def\aeb@subsectioncolor{blue}%
+ \def\aeb@subsectionshadowcolor{black}%
+ \let\aeb@subsection@special=\@empty
+ \def\aeb@subsection@beforeskip{-2.5ex\@plus-1ex \@minus-.2ex}%
+ \def\aeb@subsection@afterskip{1ex\@plus .2ex}%
+ \def\aeb@subsectionframecolor{blue}%
+ \def\aeb@subsectionframecolor{cornsilk}%
+ \or
+ \let\aeb@subsubsection@halign\raggedright
+ \def\aeb@subsubsectioncolor{blue}%
+ \def\aeb@subsubsectionshadowcolor{black}%
+ \let\aeb@subsubsection@special=\@empty
+ \def\aeb@subsubsection@beforeskip{-2ex\@plus-1ex \@minus-.2ex}%
+ \def\aeb@subsubsection@afterskip{1ex\@plus .2ex}%
+ \def\aeb@subsubsectionframecolor{blue}%
+ \def\aeb@subsubsectionframecolor{cornsilk}%
+ \fi
+}
+\renewcommand{\section}{% dps1
+ \renewcommand{\@seccntformat}[1]{\aeb@sectionNum{##1}}%
+ \@startsection{section}{1}{\aeb@section@indent}%
+ {\aeb@section@beforeskip}{\aeb@section@afterskip}%
+ {\noindent\xdef\aeb@sectionpage{\the\c@page}%
+ \def\aeb@section@type{section}%
+ \aeb@section@usefont\aeb@section@fontfamily\aeb@section@fontseries
+ \aeb@section@fontshape\aeb@section@fontsize\aeb@section@halign
+ \color{\aeb@sectioncolor}\aeb@section@special}}
+\renewcommand\subsection{% dps1
+ \renewcommand{\@seccntformat}[1]{\aeb@subsectionNum{##1}}%
+ \@startsection{subsection}{2}{\aeb@subsection@indent}%
+ {\aeb@subsection@beforeskip}{\aeb@subsection@afterskip}%
+ {\noindent\def\aeb@section@type{subsection}%
+ \aeb@subsection@usefont\aeb@subsection@fontfamily
+ \aeb@subsection@fontseries\aeb@subsection@fontshape
+ \aeb@subsection@fontsize\aeb@subsection@halign
+ \color{\aeb@subsectioncolor}\aeb@subsection@special}}
+\def\subsubDefaultDing#1{\def\web@subsubDefaultDing{{#1}}}
+\subsubDefaultDing{\textrm\textbullet}
+\renewcommand\subsubsection{% dps1
+ \renewcommand{\@seccntformat}[1]{\aeb@subsubsectionNum{##1}}%
+ \@startsection{subsubsection}{3}{\aeb@subsubsection@indent}%
+ {\aeb@subsubsection@beforeskip}{\aeb@subsubsection@afterskip}%
+ {\noindent\def\aeb@section@type{subsubsection}%
+ \aeb@subsubsection@usefont\aeb@subsubsection@fontfamily
+ \aeb@subsubsection@fontseries\aeb@subsubsection@fontshape
+ \aeb@subsubsection@fontsize\aeb@subsubsection@halign
+ \color{\aeb@subsubsectioncolor}\aeb@subsubsection@special}}
+\renewcommand*\thesection{%
+ \if\aeb@use@section@numbers1\arabic{section}\fi}
+\renewcommand*\thesubsection{%
+ \if\aeb@use@section@numbers1\thesection.\arabic{subsection}\fi}
+\renewcommand*{\thesubsubsection}{%
+ \if\aeb@use@section@numbers1%
+ \if@defaultsubsubding\web@subsubDefaultDing
+ \else\thesubsection.\arabic{subsubsection}\fi
+ \fi}
+\newcommand{\sectionTitle}{\aeb@sectionTitle*}
+\newcommand{\aeb@sectionTitle}{%
+ \renewcommand{\@seccntformat}[1]{\aeb@titleNum{##1}}%
+ \@startsection{section}{1}{\aeb@title@indent}%
+ {\aeb@title@beforeskip}{\aeb@title@afterskip}%
+ {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{title}%
+ \aeb@title@usefont\aeb@title@fontfamily\aeb@title@fontseries
+ \aeb@title@fontshape\aeb@title@fontsize\aeb@title@halign
+ \ifx\webtitle@color\@empty\else\color{\aeb@titlecolor}\fi
+ \aeb@title@special}}
+\newcommand{\sectionAuthor}{\aeb@sectionAuthor*}
+\newcommand{\aeb@sectionAuthor}{%
+ \renewcommand{\@seccntformat}[1]{\aeb@authorNum{##1}}%
+ \@startsection{section}{1}{\aeb@author@indent}%
+ {\aeb@author@beforeskip}{\aeb@author@afterskip}%
+ {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{author}%
+ \aeb@author@usefont\aeb@author@fontfamily\aeb@author@fontseries
+ \aeb@author@fontshape\aeb@author@fontsize\aeb@author@halign
+ \ifx\webauthor@color\@empty\else\color{\aeb@authorcolor}\fi
+ \aeb@author@special}}
+\newcommand{\sectionUniversity}{\aeb@sectionUniversity*}
+\newcommand{\aeb@sectionUniversity}{%
+ \renewcommand{\@seccntformat}[1]{\aeb@universityNum{##1}}%
+ \@startsection{section}{1}{\aeb@university@indent}%
+ {\aeb@university@beforeskip}{\aeb@university@afterskip}%
+ {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{university}%
+ \aeb@university@usefont\aeb@university@fontfamily
+ \aeb@university@fontseries\aeb@university@fontshape
+ \aeb@university@fontsize\aeb@university@halign
+ \ifx\webuniversity@color\@empty\else
+ \color{\aeb@universitycolor}\fi\aeb@university@special}}
+\newcommand{\sectionToc}{\aeb@sectionToc*}
+\newcommand{\aeb@sectionToc}{%
+ \renewcommand{\@seccntformat}[1]{\aeb@tocNum{##1}}%
+ \@startsection{section}{1}{\aeb@toc@indent}%
+ {\aeb@toc@beforeskip}{\aeb@toc@afterskip}%
+ {\hypertarget{webtoc}{}%
+ \xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{toc}%
+ \aeb@toc@usefont\aeb@toc@fontfamily
+ \aeb@toc@fontseries\aeb@toc@fontshape
+ \aeb@toc@fontsize\aeb@toc@halign
+ \ifx\aeb@toccolor\@empty\else
+ \color{\aeb@toccolor}\fi\aeb@toc@special}}
+\def\save@prtscr{\global\let\prtscr@save\prtscr
+ \global\let\prtscr\prtscrA}
+\def\restore@prtscr{\global\let\prtscr\prtscr@save}
+\newcommand{\sectionLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=section,color=blue,ruleheight=1pt}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\newcommand{\subsectionLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=subsection,color=blue,ruleheight=1pt}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\newcommand{\subsubsectionLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=subsubsection,color=blue,ruleheight=1pt}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\newcommand{\universityLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=university}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\universityLayout{fontsize={\prtscrA{large}{normalsize}}}
+\newcommand{\titleLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=title}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\titleLayout{fontsize={\prtscrA{Large}{normalsize}}}
+\newcommand{\authorLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=author}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
+ \aeb@temp\restore@prtscr}
+\authorLayout{fontsize={\prtscrA{large}{normalsize}}}
+\newcommand{\tocLayout}[1]{\save@prtscr
+ \setkeys{aebsection}{type=toc,color=\web@tocColor}%
+ \protected@edef\aeb@temp{\noexpand\setkeys{aebsection,aebToc}{#1}}%
+ \aeb@temp\restore@prtscr}
+\tocLayout{fontsize=Large}
+\newif\ifShadow \Shadowfalse % dps1
+\def\web@sel@sec@col#1{\ifShadow
+ \color{\@nameuse{aeb@#1shadowcolor}}\else
+ \color{\@nameuse{aeb@#1numdingcolor}}\fi}
+\newcommand{\useSectionNumbers}
+{% dps1
+ \let\aeb@use@section@numbers1\relax
+ \def\aeb@sectionNum##1{\protect\web@sel@sec@col{section}%
+ \@nameuse{the##1}\web@finalDot\ }%
+ \def\aeb@subsectionNum##1{\protect\web@sel@sec@col{subsection}%
+ \@nameuse{the##1}\web@finalDot\ }%
+ \def\aeb@subsubsectionNum##1{%
+ \protect\web@sel@sec@col{subsubsection}%
+ \@nameuse{the##1}\if@defaultsubsubding\else\web@finalDot\fi\ }%
+ \def\sectionmark##1{\markright{##1}}%
+}
+\newcommand{\noSectionNumbers}
+{%
+ \ifx\web@latextoc\web@YES
+ \PackageInfo{web}{The nobullets or latextoc option
+ taken,\MessageBreak
+ ignoring \string\noSectionNumbers}%
+ \else
+ \let\aeb@use@section@numbers0\relax
+ \let\aeb@sectionNum\@gobble
+ \let\aeb@subsectionNum\@gobble
+ \let\aeb@subsubsectionNum\@gobble
+ \fi
+}
+\useSectionNumbers
+\define@key{aebcolordesign}{universityColor}{\universityColor{#1}}
+ \def\aeb@universitycolor{\webuniversity@color}
+\define@key{aebcolordesign}{titleColor}{\titleColor{#1}}
+ \def\aeb@titlecolor{\webtitle@color}
+\define@key{aebcolordesign}{authorColor}{\authorColor{#1}}
+ \def\aeb@authorcolor{\webauthor@color}
+\define@key{aebcolordesign}{textBgColor}{\textBgColor{#1}}
+\define@key{aebcolordesign}{panelBgColor}{\panelBgColor{#1}}
+\define@key{aebcolordesign}{linkColor}{\def\@linkcolor{#1}}
+\define@key{aebcolordesign}{fileColor}{\def\@filecolor{#1}}
+\define@key{aebcolordesign}{citeColor}{\def\@citecolor{#1}}
+\define@key{aebcolordesign}{urlColor}{\def\@urlcolor{#1}}
+\newcommand{\selectColors}[1]{\setkeys{aebcolordesign}{#1}}
+\define@key{aebDings}{dDing}{\dDingToc{#1}}
+\define@key{aebDings}{ddDing}{\ddDingToc{#1}}
+\define@key{aebDings}{dddDing}{\dddDingToc{#1}}
+\define@key{aebDings}{dDingColor}{\dDingTocColor{#1}}
+\define@key{aebDings}{ddDingColor}{\ddDingTocColor{#1}}
+\define@key{aebDings}{dddDingColor}{\dddDingTocColor{#1}}
+\def\dDingToc#1{\def\d@DingToc{#1}}
+\def\ddDingToc#1{\def\dd@DingToc{#1}}
+\def\dddDingToc#1{\def\ddd@DingToc{#1}}
+\def\dDingTocColor#1{\def\d@DingTocColor{#1}}
+\def\ddDingTocColor#1{\def\dd@DingTocColor{#1}}
+\def\dddDingTocColor#1{\def\ddd@DingTocColor{#1}}
+\dDingTocColor{red}
+\ddDingTocColor{blue}
+\dddDingTocColor{webgreen}
+\@tfor\@@tmp:={d@DingToc}{dd@DingToc}{ddd@DingToc}\do
+ {\w@csarg\let{\@@tmp}\@empty}
+\newcommand{\selectTocDings}[1]{\setkeys{aebDings}{#1}}
+\def\@setTocDings{%
+ \ifx\d@DingToc\@empty\else\dDing{\d@DingToc}\fi
+ \ifx\dd@DingToc\@empty\else\ddDing{\dd@DingToc}\fi
+ \ifx\ddd@DingToc\@empty\else\dddDing{\ddd@DingToc}\fi
+}
+\ifeqforpaper
+ \includecomment{forpaper}\excludecomment{forscreen}
+\else
+ \includecomment{forscreen}\excludecomment{forpaper}
+\fi
+\endinput
+%%
+%% End of file `webpro.def'.
diff --git a/texmf-dist/tex/latex/acrotex/websec.def b/texmf-dist/tex/latex/acrotex/websec.def
new file mode 100644
index 00000000..34fed26d
--- /dev/null
+++ b/texmf-dist/tex/latex/acrotex/websec.def
@@ -0,0 +1,192 @@
+%%
+%% This is file `websec.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% web.dtx (with options: `copyright,websectioning')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Web package, %%
+%% Copyright (C) 1999-2017 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.
+%%---------------------------------------------------------
+\renewcommand*\thesection{\arabic{section}}
+\renewcommand*\thesubsection{\thesection.\arabic{subsection}}
+\renewcommand*{\thesubsubsection}{\textbullet}
+\renewcommand{\section}{\renewcommand{\@seccntformat}[1]{%
+ \@nameuse{the##1}\web@finalDot\enspace}%
+ \@startsection{section}{1}{\z@}%
+ {-3ex\@plus -1ex \@minus-.2ex}%
+ {1ex\@plus .2ex}% 6pt
+ {\noindent\normalfont\normalsize\bfseries
+ \color{\web@sectionsColorOld}}}%
+\renewcommand{\subsection}{\renewcommand{\@seccntformat}[1]{%
+ \@nameuse{the##1}\web@finalDot\enspace}%
+ \@startsection{subsection}{2}{\z@}%
+ {-2.5ex\@plus -1ex \@minus -.2ex}%
+ {1ex\@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries
+ \color{\web@sectionsColorOld}}}
+\renewcommand{\subsubsection}{%
+ \renewcommand{\@seccntformat}[1]{\color{\web@sectionsColorOld}\large
+ $\bullet$\enspace}%
+ \@startsection{subsubsection}{3}{\z@}%
+ {-2ex\@plus -1ex \@minus -.2ex}%
+ {.5ex\@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries}}
+\def\tocPartTitle#1{\def\web@tocPartTitle##1{#1}}
+\tocPartTitle{\thepart\hspace{1em}#1}
+\newcommand\@webpart{\secdef\web@@part\web@@spart}
+\def\web@@part[#1]#2{%
+ \newpage
+ \def\@currentlabelname{#1}%
+ \ifnum\Hy@secnum@part>\c@secnumdepth
+ \phantomsection
+ \fi
+ \ifnum \c@secnumdepth >\m@ne
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\web@tocPartTitle{#1}}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
+ \fi
+ {\web@makeparthead{#2}}%
+ \nobreak
+ \vskip 1ex
+ \@afterheading
+}
+\def\web@@spart#1{%
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{part*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }{\web@makesparthead{#1}}%
+ \nobreak
+ \vskip 1ex
+ \@afterheading
+}
+\let\web@save@part\part
+\let\part\@webpart
+\newcommand{\formatPartTitle}[1]{%
+ \def\web@formatPartTitle##1{#1}}
+\def\web@defaultFormatPartTitle#1{%
+ \large\bfseries
+ \ifnum \c@secnumdepth >\m@ne
+ \partname~\thepart:\space
+ \fi#1}
+\let\web@formatPartTitle\web@defaultFormatPartTitle
+\newcommand{\restorePartTitleFormat}{%
+ \let\web@formatPartTitle\web@defaultFormatPartTitle}
+\def\noPartNumbers{\formatPartTitle{\large\bfseries##1}%
+ \tocPartTitle{##1}}
+\def\web@makeparthead#1{%
+ \parindent\z@\raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \web@formatPartTitle{#1}%
+ \markboth{}{}\par
+}
+\def\web@makesparthead#1{%
+ \parindent\z@\raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \large\bfseries #1\par
+}
+\@ifundefined{chapter}{}{%
+ \newcommand\@webchapter{%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\web@@chapter\web@@schapter
+ }
+ \let\web@save@chapter\chapter
+ \let\chapter\@webchapter
+ \def\web@@chapter[#1]#2{%
+ \def\@currentlabelname{#1}%
+ \def\Hy@next{%
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ }%
+ \ifnum\c@secnumdepth>\m@ne
+ \@ifundefined{if@mainmatter}%
+ \iftrue{\@nameuse{if@mainmatter}}%
+ \let\Hy@next\relax
+ \fi
+ \fi
+ \Hy@next
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}%
+ {\protect\numberline{\thechapter}#1}%
+ \else
+ \addcontentsline{toc}{chapter}{{}{}#1}%
+ \fi
+ \else
+ \addcontentsline{toc}{chapter}{{}{}#1}%
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \if@twocolumn
+ \@topnewpage[\web@makechapterhead{#2}]%
+ \else
+ \web@makechapterhead{#2}%
+ \@afterheading
+ \fi
+ }
+ \def\web@@schapter#1{%
+ \if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \web@makeschapterhead{#1}%
+ \@afterheading
+ \fi
+ }
+ \long\def\formatChapterNumber#1{\def\web@formatChapterNumber{#1}}
+ \formatChapterNumber{\large\bfseries
+ \@chapapp\space\thechapter\par\nobreak}
+ \long\def\formatChapterTitle#1{\def\web@formatChapterTitle##1{#1}}
+ \formatChapterTitle{%
+ \interlinepenalty\@M
+ \noindent\hspace{1em}\large\bfseries#1\par\nobreak
+ }
+ \def\web@makechapterhead#1{%
+ \vspace{3\p@}{%
+ \parindent\z@ \raggedright \normalfont
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \web@formatChapterNumber
+ \fi
+ \fi
+ \web@formatChapterTitle{#1}%
+ \vskip 12\p@
+ }%
+ }
+ \def\web@makeschapterhead#1{%
+ \vspace{3\p@}{%
+ \parindent\z@\raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \large\bfseries #1\par\nobreak
+ \vskip 12\p@
+ }%
+ }
+} % end \@ifundefined{chapter}
+\endinput
+%%
+%% End of file `websec.def'.
diff --git a/tlpkg/tlpsrc/acrotex.tlpsrc b/tlpkg/tlpsrc/acrotex.tlpsrc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tlpkg/tlpsrc/acrotex.tlpsrc