summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/acrotex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-11-19 03:02:56 +0000
committerNorbert Preining <norbert@preining.info>2020-11-19 03:02:56 +0000
commit760d89b8378840fd2799ef792b5300b760723bff (patch)
treed1e2cd4d09121d1307151aff10f36720c03f37f1 /macros/latex/contrib/acrotex
parenta1f21689acf2d63ab8b813a55c5bf4374a06d964 (diff)
CTAN sync 202011190302
Diffstat (limited to 'macros/latex/contrib/acrotex')
-rw-r--r--macros/latex/contrib/acrotex/README.md19
-rw-r--r--macros/latex/contrib/acrotex/doc/aeb_man.pdfbin1362825 -> 1364576 bytes
-rw-r--r--macros/latex/contrib/acrotex/doc/aeb_man.tex128
-rw-r--r--macros/latex/contrib/acrotex/doc/eformman.pdfbin995393 -> 991820 bytes
-rw-r--r--macros/latex/contrib/acrotex/doc/eformman.tex329
-rw-r--r--macros/latex/contrib/acrotex/eforms.dtx1355
-rw-r--r--macros/latex/contrib/acrotex/examples/jquiztst.pdfbin349331 -> 126558 bytes
-rw-r--r--macros/latex/contrib/acrotex/examples/jtxttst.tex83
-rw-r--r--macros/latex/contrib/acrotex/examples/webeqtst.pdfbin491490 -> 484582 bytes
-rw-r--r--macros/latex/contrib/acrotex/exerquiz.dtx167
-rw-r--r--macros/latex/contrib/acrotex/insdljs.dtx7
-rw-r--r--macros/latex/contrib/acrotex/web.dtx3
12 files changed, 1239 insertions, 852 deletions
diff --git a/macros/latex/contrib/acrotex/README.md b/macros/latex/contrib/acrotex/README.md
index 1037f3a7a1..d84905f9c7 100644
--- a/macros/latex/contrib/acrotex/README.md
+++ b/macros/latex/contrib/acrotex/README.md
@@ -1,6 +1,6 @@
The AcroTeX eDucation Bundle
Author: D. P. Story
-Dated: 2020-03-14
+Dated: 2020-11-11
AeB contains the following:
@@ -19,6 +19,10 @@ AeB contains the following:
6) Documentation for AeB (AcroTeX eDucatation Bundle) and eForms
(including insdljs and dljslib).
+What's New (2020-11-11) Added new command \SpellCheck, to check the spelling
+of a fill-in question (exerquiz). Added width, height, scalefactor keys to
+form fields to rescale fields (eforms).
+
What's New (2020-03-14) Minor changes that support new features of eqexam.
What's New (2020-01-01) Replace use of \count0 with new counter \eqtmpcnta,
@@ -31,13 +35,14 @@ make it easy to change the section-type for the solution pages.
What's New (2019-08-13) Use \protect when formatting a enhanced preview value.
Other minor changes and bug fixes.
-What's New (2019-05-24) Added the enhanced preview feature. When in effect along with
-ordinary preview, captions of buttons and initial values of other fields are viewable
-in non-conforming PDF readers.
+What's New (2019-05-24) Added the enhanced preview feature. When in effect
+along with ordinary preview, captions of buttons and initial values of other
+fields are viewable in non-conforming PDF readers.
-What's New (2019/03/16) minor bug fixes; added \bParams/\eParams command pair to pass
-arguments to JS code snippets declared within the defineJS environment. Fixed the spacing
-problem when dvips is used to compile a doc containing the defineJS environment.
+What's New (2019/03/16) minor bug fixes; added \bParams/\eParams command pair
+to pass arguments to JS code snippets declared within the defineJS
+environment. Fixed the spacing problem when dvips is used to compile a doc
+containing the defineJS environment.
What's New (2018/12/13) More changes in exerquiz to support mi-solns; misc. bug fixes.
diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.pdf b/macros/latex/contrib/acrotex/doc/aeb_man.pdf
index 2bfc7a8364..1e6d223e3c 100644
--- a/macros/latex/contrib/acrotex/doc/aeb_man.pdf
+++ b/macros/latex/contrib/acrotex/doc/aeb_man.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.tex b/macros/latex/contrib/acrotex/doc/aeb_man.tex
index 8060c03977..dd5cead2f7 100644
--- a/macros/latex/contrib/acrotex/doc/aeb_man.tex
+++ b/macros/latex/contrib/acrotex/doc/aeb_man.tex
@@ -29,6 +29,7 @@
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
+\let\uif\textsf
\def\AcroBlog{{Acro\!\TeX} Blog}
@@ -232,10 +233,10 @@
\university{{\AcroT} Software Development Team}
\email{dpstory@acrotex.net}
\versionLabel{Dated:}
-\version{2020/03/14}
+\version{2020/11/11}
\copyrightyears{1999-\the\year}
\nocopyright
-\prepared{2020/03/14}
+\prepared{2020/11/11}
\revisionLabel{Distribution Dated:}
\copyrightStatus{True}
@@ -1695,7 +1696,7 @@ The syntax \cs{optionalPageMatter} is\dots
\begin{dCmd}[commandchars=!()]{\bxSize}
\optionalPageMatter[!ameta(vspace)]{!ameta(content)}
\end{dCmd}
-\smallskip\eVerb where \ameta{content} content to be displayed in middle title region, and
+\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]
@@ -3585,7 +3586,7 @@ The {\Web} package has several commands for customizing the \cs{part} and
The appearance of the part title can be controlled by \cs{formatPartTitle}.
-\settowidth{\aebdimen}{\ttfamily\cs{customSubsubsecHead\darg{\anglemeta{tex\_code}}}}
+\settowidth{\aebdimen}{\cs{customSubsubsecHead\darg{\anglemeta{tex\_code}}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\formatPartTitle{!anglemeta(tex_code)}
\noPartNumbers
@@ -4704,7 +4705,7 @@ the questions when the questions are in tabular form.\endredpoint
website for examples.
-\subsubsection{Inputting the Solution Set}
+\subsubsection{Moving the Solution Set}
The solution set, by default, comes last in the file. You can
move its positioning by including the command
@@ -4713,20 +4714,6 @@ 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.
-By default, the exercise solutions are brought into the document as a
-\cs{section*} titled \cs{exsectitle}. The default settings can be changed
-with the \cs{InputExrSolnsLevel} command :
-\settowidth{\aebdimen}{\ttfamily\string\InputExrSolnsLevel*[\ameta{label}]\darg{\ameta{level}}}%
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
-\InputExrSolnsLevel*[!ameta(label)]{!ameta(level)}
-\end{dCmd}
-\smallskip\noindent
-where, \ameta{level} is the section-level (usually \texttt{section} or
-\texttt{chapter}); if the \texttt*-option is specified, then the solutions
-are placed in a starred-section (\cs{section*} or \cs{chapter*}). If
-\ameta{label} is specified, then \cs{label\darg{\ameta{label}}} is placed
-just after the section title. The default is \cs{InputExrSolnsLevel*\darg{section}}.
-
\subsubsection{Grouping the solutions at end}\label{ss:grpEx}
Historically, solutions to exercises appearing at the end of the file
@@ -4737,6 +4724,7 @@ You can now declare \cs{makeExSolnsLocalOn} or \cs{makeExSolnsLocalOff}
anywhere in the document to turn on grouping for all exercises that follow,
or to turn off this feature again. The default is \cs{makeExSolnsLocalOff}.
+
\subsection{Redesigning the
\texorpdfstring{\protect\texttt{exercise}}{exercise}
Environment}\label{sss:redesignex}
@@ -5701,29 +5689,15 @@ transparent, keep it that way.
this command can be redefined as desired. See the source file \texttt{exerquiz.dtx}.
Also see the definition of \Com{bottomOfAnsfStack}.
-\subsubsection{Inputting 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.
-
-By default, the quiz solutions are brought into the document as a
-\cs{section*} titled \cs{sqslsectitle}. The default settings can be changed
-with the \cs{InputQzSolnsLevel} command:
-\settowidth{\aebdimen}{\ttfamily\string\InputQzSolnsLevel*[\ameta{label}]\darg{\ameta{level}}}%
-\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
-\InputQzSolnsLevel*[!ameta(label)]{!ameta(level)}
-\end{dCmd}
-\smallskip\noindent
-where, \ameta{level} is the section-level (usually \texttt{section} or
-\texttt{chapter}); if the \texttt*-option is specified, then the solutions
-are placed in a starred-section (\cs{section*} or \cs{chapter*}). If
-\ameta{label} is specified, then \cs{label\darg{\ameta{label}}} is placed
-just after the section title. The default is \cs{InputQzSolnsLevel*\darg{section}}.
+\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.
\subsubsection{Grouping the solutions at end}\label{ss:grpQzs}
@@ -8114,25 +8088,7 @@ credit of zero, and may as well not be included in the list of words.
extensive examples, and discusses techniques of searching using regular
expressions.
-\subsubsection{\texorpdfstring{\protect\cs{RespBoxEssay}}%
- {\textbackslash RespBoxEssay}: Extended Responses}\label{ss:respboxessay}
-The \cs{RespBoxEssay} command is used to provide space for the student to
-type in an extended response to a question. The student's response is not
-evaluated, it must be reviewed by the instructor, who can assign additional
-credit.
-\aebdimen0pt\bVerb\takeMeasure{\string\RespBoxEssay[\ameta{options}]\ameta{dest}\darg{\ameta{wd}}\darg{\ameta{ht}}}%
-\begin{dCmd}[commandchars=!()]{\bxSize}
-\RespBoxEssay[!ameta(options)]!ameta(dest){!ameta(wd)}{!ameta(ht)}
-\end{dCmd}
-\medskip\eVerb The first (optional) parameter (\ameta{options}) is used to pass key-value
-pairs to the form field. The second (optional) argument (\ameta{dest}) takes
-on one of two forms: (1) a named destination \texttt{[\meta{dest}]} to the
-solution (if provided), were \meta{dest} is a string the document author
-specifies; or (2) an asterisk (\texttt*), where the named destination is
-automatically generated by \pkg{exerquiz}. The third and fourth parameters
-are the width and height of the field. The field is, by default, a
-multi-line text field.
\subsection{Some Enhancements}\label{enhancements}
@@ -8155,7 +8111,7 @@ 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}\olBdry\CorrAnsButton{2*sin(t)*cos(t)}
+\RespBoxMath{2*sin(t)*cos(t)}(t){4}{.0001}{0}{1}\cgBdry\CorrAnsButton{2*sin(t)*cos(t)}
\end{oQuestion}
\medskip\noindent
@@ -8163,14 +8119,14 @@ 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}\olBdry
+\RespBoxMath{2*sin(t)*cos(t)}(t){4}{.0001}{0}{1}\cgBdry
\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}r
+argument (the optional argument is the first) in the \cs{RespBoxMath}
command.
\redpoint The \cs{CorrAnsButton} also controls access to the (optional) solution, see
@@ -8241,7 +8197,7 @@ An example of this optional parameter is
\redpoint Perform the indicated operation, and enter
result into the box.\\[1ex]
$ \text{9} + \text{8} =$
-\RespBoxMath{9 + 8}{1}{.0001}{[0,1]}\olBdry\CorrAnsButton{9 + 8}*{EvalCorrAnsButton}\olBdry
+\RespBoxMath{9 + 8}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{9 + 8}*{EvalCorrAnsButton}\cgBdry
\sqTallyBox
\end{oQuestion}
@@ -8252,8 +8208,8 @@ The listing follows:
\redpoint Perform the indicated operation, and enter
result into the box.\\[1ex]
$ 9 + 8 = $
-\RespBoxMath{9 + 8}{1}{.0001}{[0,1]}\olBdry
- \CorrAnsButton{9 + 8}*{EvalCorrAnsButton}\olBdry
+\RespBoxMath{9 + 8}{1}{.0001}{[0,1]}\cgBdry
+ \CorrAnsButton{9 + 8}*{EvalCorrAnsButton}\cgBdry
\sqTallyBox
\end{oQuestion}
\end{Verbatim}
@@ -8269,7 +8225,7 @@ 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}\olBdry\CorrAnsButton{2*sin(x)*cos(x)}\olBdry
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}\cgBdry\CorrAnsButton{2*sin(x)*cos(x)}\cgBdry
\sqTallyBox
\end{oQuestion}
@@ -8279,8 +8235,8 @@ The listing follows:
\begin{oQuestion}{sine4}
\redpoint Differentiate\\[1ex]
$\dfrac d{dx} \sin^2(x) =$
-\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}\olBdry
-\CorrAnsButton{2*sin(x)*cos(x)}\olBdry
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}\cgBdry
+\CorrAnsButton{2*sin(x)*cos(x)}\cgBdry
\sqTallyBox
\end{oQuestion}
\end{Verbatim}
@@ -8299,8 +8255,8 @@ 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}\olBdry\CorrAnsButton{2*sin(x)*cos(x)}\olBdry
-\sqTallyBox\olBdry\sqClearButton
+\RespBoxMath{2*sin(x)*cos(x)}{4}{.0001}{0}{1}\kern1bp\CorrAnsButton{2*sin(x)*cos(x)}\cgBdry
+\sqTallyBox\cgBdry\sqClearButton
\end{oQuestion}
@@ -8311,8 +8267,8 @@ The listing follows:
\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)}\olBdry
-\sqTallyBox\olBdry\sqClearButton
+\CorrAnsButton{2*sin(x)*cos(x)}\cgBdry
+\sqTallyBox\cgBdry\sqClearButton
\end{oQuestion}
\end{Verbatim}
@@ -8421,6 +8377,34 @@ 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{More on Text Fill-in Questions}\label{s:moretxt}
+
+In this section, additional features or enhancements of text fill-in question are presented.
+
+\subsubsection{Spell checking text fill-in questions}
+
+To properly evaluate text fill-in questions (questions posed by commands
+\cs{RespBoxTxt} and \cs{RespBoxTxtPC}), spelling in critical. The student may
+know the correct response but may flub the answer with bad spelling. When
+such a problem is marked by a human teacher, he/she may give full credit or
+may dock the credit slightly.
+
+Beginning with \pkg{exerquiz} dated 2020/11/11, the \cs{SpellCheck} command
+and the JavaScript function \texttt{checkTheSpelling()} are
+defined.\footnote{This feature was suggested to me by Thorsten G.} This a
+feature allows the student to use the spell checking of \app{Adobe Reader} to
+inspect each word and to optionally change the word to one of the words
+offered by the spell checker. Words that are spelled correctly, but are
+incorrect, are \emph{not flagged} by the spell checker. For example, if the
+correct response is \uif{John Adams} and the student enters \uif{John
+Addams}, the spell checker returns the message \uif{<No Misspellings>}; thus
+the student will lose credit for his/her response unless the answer is
+serendipitously changed manually.
+
+\exAeBBlogPDF{p=1437} The demo file for this feature is
+\texttt{\href{\urlAcroTeXBlog/?p=1437}{spell-check.pdf}}. The file contains
+extensive examples of how to use \cs{SpellCheck} command.
+
\subsection{The \texttt{shortquiz} Environment}\label{s:oQsq}
The objective question (with or without the presence of a
diff --git a/macros/latex/contrib/acrotex/doc/eformman.pdf b/macros/latex/contrib/acrotex/doc/eformman.pdf
index 7cddaa6778..788d0683c5 100644
--- a/macros/latex/contrib/acrotex/doc/eformman.pdf
+++ b/macros/latex/contrib/acrotex/doc/eformman.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/doc/eformman.tex b/macros/latex/contrib/acrotex/doc/eformman.tex
index a07ff1dac0..ef8d90a37c 100644
--- a/macros/latex/contrib/acrotex/doc/eformman.tex
+++ b/macros/latex/contrib/acrotex/doc/eformman.tex
@@ -6,10 +6,8 @@
forcolorpaper,latextoc,pro,useui},
exerquiz,aebxmp
]{aeb_pro}
-\usepackage{forms16be}
\usepackage[dblevel=0]{aeb_mlink}
\usepackage[altbullet]{lucidbry}
-\usepackage{pifont}
%\usepackage{myriadpro}
\setlength{\marginparpush}{3pt}
@@ -80,8 +78,8 @@
email={dpstory@acrotex.net},
subject={Documentation for the eforms and insdljs packages},
talksite={\url{www.acrotex.net}},
- version={2020/03/14},
- prepared={2020/03/14},
+ version={2.0},
+ prepared={2020/11/11},
preparedLabel={Distribution Dated:},
keywords={LaTeX, hyperref, PDF, exercises, quizzes},
copyrightStatus=True,
@@ -163,7 +161,6 @@
\def\AcroTeX{Acro\!\TeX}
\def\HTML{HTML}\def\FDF{FDF}
\def\PDF{PDF}\def\URL{URL}
-\def\DVI{DVI}
%\let\amtIndent\leftmargini
\edef\amtIndent{\the\parindent}
\def\bNH{\begin{NoHyper}}\def\eNH{\end{NoHyper}}
@@ -193,7 +190,6 @@
\def\endredpoint{\FitItIn{{\large\ifusebw\color{black}\else\color{red}\fi$\blacktriangleleft$}}}
\def\pb{pushbutton}
-\def\pbs{pushbuttons}
%\advance\marginparwidth16pt
@@ -368,10 +364,10 @@ The field can be signed, either by using \app{Acrobat}, or programmatically
from a {\LaTeX} source, but you need to use \textsf{aeb\_pro} and to
create the PDF using \app{Acrobat} Distiller.
-The \pkg{hyperref} Package (Rahtz, Oberdiek \textit{et al})
+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
-\pkg{hyperref} commands. I was determined to write my own set
+\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
@@ -406,7 +402,7 @@ an integral part of \textsf{Exerquiz}. I've now separated the two, making
\subsection{Package Requirements}
-The \textsf{eforms} package requires \pkg{hyperref} (a newer version)
+The \textsf{eforms} package requires \textsf{hyperref} (a newer version)
and \textsf{insdljs}, a package that is part of the {\cAcroB}.
\subsection{Package Options}
@@ -437,31 +433,30 @@ defined in these earlier included packages.
I fall down easily.
\end{document}
\end{Verbatim}
-\noindent The \textsf{eforms} package brings in the \pkg{hyperref} package
+\noindent The \textsf{eforms} package brings in the \textsf{hyperref} package
and passes it the driver, so there is no need to specify
-\pkg{hyperref}, usually. If you wish to introduce \pkg{hyperref}
+\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 the driver to it.
-\subsection{The \texttt{preview} option}\label{s:preview}
+\subsection{The \texttt{preview} option}
%Use the \texttt{preview} option if you use a \texttt{dvi} previewer
%to view your document.
When the \opt{preview} option is taken, a frame box is drawn around any form
field created by \pkg{eforms}, making the position of the field visible in
-the {\DVI} previewer or {\PDF} reader. Being able to view the position of a
-form element is important to determine whether any additional adjustments in
-position is. \emph{Turn off this option} when you build the final version of
-the document.
-
-This option was originally developed for those using a {\DVI} previewer, it
-is also useful for those using PDF creators \app{pdflatex}, \app{xelatex}, or
-\app{lualatex}. Modern {\LaTeX} users employ quicker {\PDF} readers such as
-\app{sumatraPDF} or \app{PDF-Exchange}; these non-conforming {\PDF} readers
-may not create form field appearances as \app{Adobe Reader} and \app{Acrobat}
+the DVI previewer or {\PDF} viewer. Being see to view the position on a form
+element enables you to determine whether any additional adjustments are
+needed to the position of the field. \emph{Turn off this option} when you build the
+final version of your {\PDF} file.
+
+This option was originally developed for those using a DVI previewer, it is
+also useful for those using PDF creators \app{pdflatex}, \app{xelatex}, or
+\app{lualatex}. Modern {\LaTeX} users employ quicker {\PDF} viewers such as \app{sumatraPDF} or
+\app{PDF-Exchange}; these PDF viewers do not create form appearances as \app{Adobe Reader} and \app{Acrobat}
do; consequently, an outline of the positions of the fields is most welcome.
The \texttt{preview} option just sets a switch (\cs{ifpreview}\FmtMP{\cs{ifpreview}}), which can conveniently be
@@ -469,9 +464,10 @@ turned off and on using the commands \cs{previewOn}\FmtMP{\cs{previewOn}} and \c
within the document itself. Related to \cs{previewOn} and \cs{previewOff}\FmtMP{\cs{previewOff}} is
the command \cs{pmpvOn} (poor man's preview), covered in the next paragraph.
-\paragraph*{Enhanced preview (Poor man's preview).}\label{para:pmpv}
+\paragraph*{Poor man's preview.}\label{para:pmpv}
-The \cs{pushButton} command of \pkg{eforms} produces a \pb;\footnote{Pushbuttons are covered in Section~\ref{s:BtnFlds}, beginning on
+The \cs{pushButton} command of \pkg{eforms} produces a push
+button;\footnote{Push buttons are covered in Section~\ref{s:BtnFlds}, beginning on
page~\pageref{ss:Pbs}.} a common key to use is the \cs{CA} key, the
value of which captions the button. As a companion to \cs{previewOn},
\pkg{eforms} defines \cs{pmpvOn}\FmtMP{\cs{pmpvOn}} and
@@ -483,21 +479,19 @@ the {\pb} preview; for example,\bgroup\makeatletter
{\previewOff\pmpvOff\pushButton[\autoCenter{n}\CA{Push Me}]{pbDemoL}{}{13bp}\quad
\previewOn\pmpvOn\pushButton[\autoCenter{n}\CA{Push Me}]{pbDemoR}{}{13bp}\hspace{40pt}}}}%\ef@Bbox{\x}{13bp}
\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()]
-\previewOn\pmpvOn % <--!textsf(enhanced preview activated)
-...
!1\pushButton[\CA{Push Me}]{pbDemo}{}{13bp}
\end{Verbatim}
-The button on the left is the normal appearance of the {\pb} after
+The button on the left is the normal appearance of the push button after
\app{Reader/Acrobat} has supplied its appearance, the ``button'' on the right
is how the button would appear in \app{sumatraPDF}, for example, just after
{\PDF} creation using \app{pdflatex}, \app{xelatex}, or \app{lualatex}, or in
a DVI previewer after latexing.\egroup
-There are enhanced previews for other fields that support a \cs{V} or \cs{CA}
-key (\pbs, text fields, list boxes, combo boxes, check boxes and
-radio button fields). In each case, the argument of the key is \emph{typeset
-into the document} beneath the field when \cs{pmpvOn} is expanded prior. The
-arguments of \cs{V} and \cs{CA} recognize a local command
+There are `poor man's previews' for other fields that support a \cs{V} or
+\cs{CA} key (push buttons, text fields, list boxes, combo boxes, check boxes
+and radio button fields). In each case, the argument of the key is
+\emph{typeset into the document} beneath the field when \cs{pmpvOn} is
+expanded prior. The arguments of \cs{V} and \cs{CA} recognize a local command
\cs{tops}\FmtMP{\cs{tops}} (\cs{textorpdfstring}) to offer an alternate
string that is typeset:
\begin{quote}
@@ -519,31 +513,12 @@ declarative command \cs{pmpvMrk\darg{\ameta{mrk}}} that takes one argument \amet
to be used. The package declares \verb|\pmpvMrk{X}|, another good choice is
\verb|\pmpvMrk{$\checkmark$}|.
-\newtopic\indent\textbf{Finer control over enhanced preview.} When enhanced
-preview is on (\cs{previewOn}\allowbreak \cs{pmpvOn}), the caption for {\pbs}
-may be turned off with \cs{pmpvCAOff}\FmtMP{\cs{pmpvCAOff}} (and may be
-turned back on again with \cs{pmpvCAOn}). Enhanced preview for all other
-field types is controlled with \cs{pmpvVOff}\FmtMP{\cs{pmpvVOff}} (and
-\cs{pmpvVOn}). Turning off enhanced preview may be become an issue when the
-preview text is too wide for the preview rectangle
-{\previewOn\pmpvOn\textField[\autoCenter{y}\BC{}\Ff{\FfReadOnly}\V{We initialize this field}\DV{We
-initialize this field}]{V2Big}{1in}{11bp}}. We can turn off enhanced preview
-for this field only by passing \cs{cmd\darg{\cs{pmpvVOff}}} in the optional
-argument of the field, or turn it off globally by expanding \cs{pmpvVOff}
-prior to expanding the \cs{textField} command.
-
-\newtopic\textbf{\textcolor{red}{Final Preparation.}}
In the modern era of {\LaTeX}, it is customary by some to use
-\app{sumatraPDF} or some other non-conforming {\PDF} reader during
-development; however, you should always open your final {\PDF} (which was
-built with \cs{previewOff}\cs{pmpvOff}) in \app{Adobe Reader DC} (or in
-\app{Acrobat}), save it to obtain the correct appearances of the fields
-placed in the document. Other suggestions can be found in the
-\href{\urlAcroTeXBlog}{\AcroBlog} article cited below.
-
-%http://www.acrotex.net/blog/?p=1404
-\exAeBBlogPDF{p=1404} Refer to the article titled \textit{\href{\urlAcroTeXBlog/?p=1404}{eforms: Enhanced Previews}} for more technical
-details and examples; the article is found on the \href{\urlAcroTeXBlog}{\AcroBlog} website.
+\app{sumatraPDF} or some other {\PDF} viewer during development; however, you
+should always open your final {\PDF} (which was built with
+\cs{previewOff}\cs{pmpvOff}) in \app{Adobe Reader DC} (or in \app{Acrobat}),
+save it to obtain the correct appearances of the fields placed in the
+document.
\subsection{The \texttt{useui} option}
@@ -555,10 +530,10 @@ 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 \texorpdfstring{\protect\pkg}{}{hyperref}}
+\subsection{The \texttt{unicode} option of \textsf{hyperref}}
The \textsf{eforms} package will obey the \texttt{unicode} option of
-\pkg{hyperref}. Whenever this option is taken in hyperref, for
+\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
@@ -568,15 +543,13 @@ value of ``J\"{u}rgen'' in that text field.
\section{Form Fields}
-The \pkg{eforms} support for {\PDF} forms defines seven basic (and internal)
+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. Note, viewing these form fields outside of
-\app{Adobe Reader} or \app{Acrobat} itself may be a problem, please review the paragraphs
-on titled \Nameref{s:preview}.
+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,
@@ -646,14 +619,14 @@ Within the first parameter, these three character can be used freely, without es
\subsection{Button Fields}\label{s:BtnFlds}
Buttons are form elements that the user interacts with using only a
-mouse. There are three types of buttons: {\pbs}, check boxes
+mouse. There are three types of buttons: push buttons, check boxes
and radio buttons.
-\subsubsection{Pushbutton fields}\label{ss:Pbs}
+\subsubsection{Push Buttons}\label{ss:Pbs}
-The {\pb} is a button field that has no value, it is neither on nor off.
-Generally, {\pbs} are used to initiate some action, such as JavaScript
-action.
+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}
@@ -663,13 +636,13 @@ action.
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
-\item[\texttt{\#2}:] the title of the button field (also called the field name)
+\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 {\pb} is determined by the following:
+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}
@@ -705,7 +678,7 @@ width based on the width of the text given by \Cs{CA}, \Cs{RC} and
\pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]
{myButton}{}{12bp}
\end{Verbatim}
-Refer to the \pkg{icon-appr} package to supply icon appearances to {\pbs} created by
+Refer to the \pkg{icon-appr} package to supply icon appearances to push buttons created by
the \pkg{eforms} package.
\subsubsection{Check Boxes}\label{CheckBoxes}
@@ -1261,7 +1234,7 @@ 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
-\pkg{hyperref}) then the border is invisible by default;
+\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
@@ -1271,7 +1244,7 @@ is a named color. \cs{defaultlinkcolor} has a definition of
\newcommand{\defaultlinkcolor}{\@linkcolor}
\end{Verbatim}
\noindent where \cs{@linkcolor} is a command defined in
-\pkg{hyperref}, and is defined to be \texttt{red}. This can be
+\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.}
@@ -1292,7 +1265,7 @@ 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
-\pkg{hyperref}, as explained above.) The second parameter is the
+\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}.
@@ -2100,7 +2073,7 @@ For example,
uptxt={Push Me}
}
\end{Verbatim}
-Later, a {\pb} can use this preset, like so,
+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}
@@ -2131,7 +2104,7 @@ border line width to zero \verb!\W{0}!. For forms, this key has no
counterpart in the user interface.
If this key is not specified, the \textsf{eforms}
-follows the rule: If \texttt{colorlinks} option of \pkg{hyperref} is used, the border is invisible;
+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.
@@ -2228,7 +2201,7 @@ 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 {\pb} and a combo
+\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}}%
@@ -2311,7 +2284,7 @@ If the \opt{unicode} option of \pkg{hyperref} is in effect, then setting
% \texttt{eqforms\_pro.tex}
-\newtopic \textbf{Pushbuttons only.} The following list of keys are used for
+\newtopic \textbf{Push buttons only.} The following list of keys are used for
creating custom appearances on button faces. \app{Acrobat} Distiller required for
this set. The example files
\marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr
@@ -2513,6 +2486,51 @@ 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}.
+\settowidth{\aebdimen}{\ttfamily rectW=\ameta{length}}%
+\def\1{\llap{\Cs{rectW}\hspace{\marginparsep}}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+!1rectW=!ameta(length)
+\end{dCmd}
+\CmdDescription Resets the width of the field to \ameta{length}.
+
+\settowidth{\aebdimen}{\ttfamily rectH=\ameta{length}}%
+\def\1{\llap{\Cs{rectH}\hspace{\marginparsep}}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+!1rectH=!ameta(length)
+\end{dCmd}
+\CmdDescription Resets the height of the field to \ameta{length}.
+
+\settowidth{\aebdimen}{\ttfamily width=\ameta{length}}%
+\def\1{\llap{\Cs{width}\hspace{\marginparsep}}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+!1width=!ameta(length)
+\end{dCmd}
+\CmdDescription Sets the width of the field to \ameta{length} and
+resets the height to maintain the same aspect ratio of the field. For example,
+\begin{Verbatim}[fontsize=\small,commandchars=!()]
+\pushButton{pb}{.5in}{1in} %!sffamily( width of .5in and height of 1in)
+\pushButton[\width{1in}]{pb}{.5in}{1in} %!sffamily( width of 1in and height of 2in)
+\pushButton[\ui{width=1in}]{pb}{.5in}{1in} %!sffamily( same as above)
+\end{Verbatim}
+
+\settowidth{\aebdimen}{\ttfamily height=\ameta{length}}%
+\def\1{\llap{\Cs{height}\hspace{\marginparsep}}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+!1height=!ameta(length)
+\end{dCmd}
+\CmdDescription Sets the height of the field to \ameta{length} and
+resets the width to maintain the same aspect ration of the field.
+
+\settowidth{\aebdimen}{\ttfamily scalefactor=\ameta{pos-num}}%
+\def\1{\llap{\Cs{scalefactor}\hspace{\marginparsep}}}%
+\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
+!1scalefactor=!ameta(pos-num)
+\end{dCmd}
+\CmdDescription Multiplies the width and height of the field by a scale
+factor of \ameta{pos-num}. For example, setting \texttt{scalefactor=2} doubles
+the length of the width and height of the field.
+
+
\subsection{The Action Tab}
@@ -2857,7 +2875,7 @@ The \hypertarget{\pkg{insdljs}}{insdljsPkg} package provides support to {\LaTeX}
for inserting \app{Acrobat} JavaScript into a PDF file created from a
\LaTeX{} source. This package works correctly for users of \textsf{pdftex}
(and \app{luatex}), \textsf{dvipdfm}, \textsf{dvipdfmx}, and \texttt{xetex}.
-For\FmtMP{\app{Acrobat} required for
+For\marginpar{\small\raggedleft\app{Acrobat} required for
\app{dvips}} those who use either \app{dvips} or
\app{dvipsone} to produce a postscript file, which is then distilled, you are
required to have \app{Acrobat}~5.0 (or later).
@@ -2878,20 +2896,12 @@ of the JavaScripts.
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 \app{Acrobat},
- then discarded. AeB uses this for post-creation document processing.
- The default is that the JavaScript in an \texttt{execJS} environment is
- not executed; using this option turns on this feature. Two convenience
- commands are also defined: \FmtMP{\cs{execJSOn}} \cs{execJSOn} (the
- equivalent of passing the \opt{execJS} option to the \pkg{insdljs}
- package) and \FmtMP{\cs{execJSOff}}\cs{execJSOff} (for turning off
- JavaScript execution within an \env{execJS} environment). Both have no
- effect outside the preamble of the document.
-
- For information on the \env{execJS} environment, read
- Section~\ref{s:execJS} on page~\pageref{s:execJS}.
+\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 \app{Acrobat}, then
+ discarded. AeB uses this for post-distillation document processing. The
+ default is that the JavaScript in an \texttt{execJS} environment is not
+ executed; using this option turns on this feature.
\end{description}
\section{The \texttt{insDLJS} and \texttt{insDLJS*} Environments}
@@ -3039,7 +3049,7 @@ 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 \pkg{hyperref} package
+\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]
@@ -3259,20 +3269,8 @@ 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}\label{s:execJS}
-
-\textbf{Purpose.} The\FmtMP{`\texttt{\eqbs}' and `\texttt{\%}' characters available} \env{execJS} takes JavaScript as content. This
-JavaScript is executed the first time the newly created PDF is opened in
-\app{Acrobat}. This environment is a variation on \env{insDLJS};
-consequently,
-the escape character is `\texttt{\eqbs}' and the comment character is
-`\texttt{\%}'.
+\section{The \textsf{execJS} Environment}
-\newtopic
-\textbf{Requirements.} For the script to be executed, the document must be compiled under
-the \opt{execJS} option of \pkg{eforms}.
-
-\newtopic
This is an environment useful to PDF developers who want to tap into
the power of JavaScript. To use this environment, the developer
needs \app{Acrobat}~5.0 or higher. \textsf{pdftex} or \textsf{dvipdfm} can
@@ -3280,8 +3278,8 @@ be used to produce the PDF document, but the developer needs
the \app{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{pdflatex}
-and \textsf{xelatex}). The \texttt{execJS} environment can be used,
+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.
@@ -3295,22 +3293,18 @@ 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}[\ameta{\cs{cmd}}]\darg{\meta{name}}}
+\settowidth{\aebdimen}{\ttfamily\string\begin\darg{execJS}\darg{\meta{name}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
-\begin{execJS}[!ameta(\cmd)]{!meta(name)}
+\begin{execJS}{!meta(name)}
....
-!ameta(JavaScript code)
+!anglemeta(JavaScript code)
....
\end{execJS}
\end{dCmd}
-\PD The environment takes one required argument (\meta{name}), the base name
-of the auxiliary files to be generated. The \env{execJS} environment now has
-an optional argument, the optional argument must be a command
-\ameta{\cs{cmd}}. The purpose of \ameta{\cs{cmd}} is to make special
-definitions at the time the script is expanded.
+\PD The environment takes one required argument, the base name of the
+auxiliary files to be generated.
-\newtopic\indent
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.
@@ -3371,31 +3365,6 @@ app.endPriv();
\end{Verbatim}
\newtopic AeB Pro, the {Acro\!\TeX} Presentation Bundle and @EASE use these execJS techniques.
-\Example In this example, we give a simple example of the use of the optional argument (\ameta{\cs{cmd}}).
-We define a command \cs{myDefns} which gives a special meaning to \cs{oct}. This definition
-are made within a group so it has no effect outside the environment.
-\begin{Verbatim}[xleftmargin=\amtIndent,commandchars={!~@}]
-...
-\execJSOn
-!textbf~\def\myDefns{\let\oct\eqbs}@
-\begin{execJS}[!textbf~\myDefns@]{tst}
-var str="Hello J!textbf~\oct@374rgen! \u263A"; // \u already defined
-console.show();
-console.println(str);
-\end{execJS}
-\begin{document}
-...
-\end{document}
-\end{Verbatim}
-\defUniStr{myInitValue}{Hello J\u00FCrgen! \u263A}%
-%\previewOn\pmpvOn
-When the document is first opened, the console window appears and the message, \ding{172}
-\begin{quote}
-\textField[\cmd{\let\pmpvFmt\footnotesize}\Ff\FfReadOnly\BC{}\V{\tops{Hello J\"{u}rgen! \protect\ding{172}}{\unicodeStr(myInitValue)}}
-\DV{\unicodeStr(myInitValue)}]{HJSmiley}{67.68bp}{11bp}
-\end{quote}
-is written to the console window.
-
\section{The \textsf{defineJS} Environment}\label{defineJS}
When you create a form element (button, text field, etc.), you
@@ -3585,7 +3554,7 @@ 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 & Pushbutton\\
+FfPushButton? & Push Button Flag & Push button\\
FfCombo? & Combo Flag & choice\\
FfEdit? & Edit/NoEdit & combo\\
FfSort? & Sort List & choice\\
@@ -3697,53 +3666,53 @@ BC?& The boundary color, a list of 0 (transparent), 1 (gray), 3 (RGB) or 4 (CMYK
&\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 {\pb}. For check boxes and radio, the value of
+ 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?& Pushbutton fields only. The roll over text caption. Obeys \texttt{unicode} option.&\verb+\RC{}+\\
-AC?& Pushbutton fields only. The down button caption. Obeys \texttt{unicode} option.&\verb+\AC{}+\\
+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? & ({\pbs} only) an indirect reference to a form XObject defining the buttons's
+I? & (push buttons only) an indirect reference to a form XObject defining the buttons's
\emph{normal icon}&\verb+\I{nIcon}+\newline(example)\\
-RI? & ({\pbs} only) an indirect reference to a form XObject
+RI? & (push buttons only) an indirect reference to a form XObject
defining the buttons's \emph{rollover icon}&\verb+\RI{rIcon}+\newline(example)\\
-IX? & ({\pbs} only) an indirect reference to a form XObject
+IX? & (push buttons only) an indirect reference to a form XObject
defining the buttons's \emph{down icon}&\verb+\I{dIcon}+\newline(example)\\
-importIcons? & ({\pbs} only) a special key to signal that this button is the target
+importIcons? & (push buttons only) a special key to signal that this button is the target
of JavaScript that will supply the icons faces. Syntax: \cs{importIcons\darg{y|n}}&\verb|\importIcons{n}|\\
-TP? & \texttt{\darg{\ameta{\upshape{0|1|2|3|4|5|6}}}} ({\pbs} only; optional)
+TP? &\hskip-2\tabcolsep \texttt{\darg{\ameta{\upshape{0|1|2|3|4|5|6}}}} (push buttons only; optional)
A code indicating the \texttt{layout} of the text and icon; these codes are
0~(label only); 1~(icon only); 2~(label below icon); 3~(label above icon); 4~(label to the right of icon);
5~(label to the left of icon); 6~(label overlaid on the icon). The default is 0.&\verb+\TP{0}+\\
-SW? & \texttt{\darg{\ameta{\upshape{A|B|S|N}}}} ({\pbs} only; optional) The \emph{scale when key}. Permissible values are \texttt{A} (always scale),
+SW? & \hskip-2\tabcolsep\texttt{\darg{\ameta{\upshape{A|B|S|N}}}} (push buttons only; optional) The \emph{scale when key}. Permissible values are \texttt{A} (always scale),
\texttt{B} (scale when icon is too big), \texttt{S} (scale when icon is too small), \texttt{N}
(never scale). The default is \texttt{A}. &\verb+\SW{A}+\\
-ST? & \texttt{\darg{\ameta{\upshape{A|P}}}} ({\pbs} only; optional) The \emph{scaling type.} Permissible values are \texttt{A}
+ST? &\hskip-2\tabcolsep \texttt{\darg{\ameta{\upshape{A|P}}}} (push buttons only; optional) The \emph{scaling type.} Permissible values are \texttt{A}
(anamorphic scaling); \texttt{P} (proportional scaling). The default is \texttt{P}.
&\verb+\ST{P}+\\
-PA? & \texttt{\darg{\ameta{num\SUB1\space num\SUB2}}} ({\pbs} only; optional) The \textit{position array.} An array of two numbers, each
+PA? &\hskip-2\tabcolsep \texttt{\darg{\ameta{num\SUB1\space num\SUB2}}} (push buttons only; optional) The \textit{position array.} An array of two numbers, each
between 0 and 1 indicating the fraction of left-over space to allocate at the left and bottom
of the annotation rectangle. The two numbers should be separated by a space. The default value, \verb!\PA{.5 .5}!,
centers the icon in the rectangle. & \verb!\PA{.5 .5}!\\
-FB? & \texttt{\darg{true|false}} ({\pbs} only; optional) The \emph{fit bounds} Boolean. If \texttt{true}, the button appearance
+FB? & \hskip-2\tabcolsep\texttt{\darg{true|false}} (push buttons only; optional) The \emph{fit bounds} Boolean. If \texttt{true}, the button appearance
is scaled to fit fully within the bounds of the annotation without taking into consideration
the line width of the border. &\verb+\FB{false}+\\\hline
%--------------------------------------------------------------
%\pagebreak
\multicolumn{3}{l}{\color{blue}Entries common to fields containing variable text:}\\
-Q? & \texttt{\darg{0|1|2|empty}} Quadding for text fields. Values are \texttt{0} (left-justified),
+Q? & \hskip-2\tabcolsep\texttt{\darg{0|1|2|empty}} Quadding for text fields. Values are \texttt{0} (left-justified),
\texttt{1} (centered), \texttt{2} (right-justified); e.g., \verb+\Q{1}+.
&\verb+Q{}+\newline(left justified)\\
\pagebreak
\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? & \texttt{\darg{\ameta{font-spec}}} Font to be used to display the text &\verb+\textFont{Helv}+\\
-textSize? & \texttt{\darg{\ameta{num}}} The size in points of the text &\verb+\textSize{9}+\\
-textColor?& \texttt{\darg{\ameta{color-spec}}} The color of the text.
+textFont? &\hskip-2\tabcolsep \texttt{\darg{\ameta{font-spec}}} Font to be used to display the text &\verb+\textFont{Helv}+\\
+textSize? &\hskip-2\tabcolsep \texttt{\darg{\ameta{num}}} The size in points of the text &\verb+\textSize{9}+\\
+textColor?&\hskip-2\tabcolsep \texttt{\darg{\ameta{color-spec}}} The color of the text.
There are several color spaces, including
grayscale and RGB; for example, \verb+\textColor{1 0 0 rg}+,
gives a red font. Recent advances in parsing this command have eliminated the
@@ -3753,9 +3722,9 @@ textColor?& \texttt{\darg{\ameta{color-spec}}} The color of the text.
%------------------------------------------------------------------
%\pagebreak
\multicolumn{3}{l}{\color{blue}Entries specific to text fields:}\\
-MaxLen? & \texttt{\darg{\ameta{num{\upshape|empty}}}} The maximum length of the text string input into a text field.
+MaxLen? &\hskip-2\tabcolsep \texttt{\darg{\ameta{num{\upshape|empty}}}} The maximum length of the text string input into a text field.
Used also with comb fields to set the number of combs.
- Example, \verb+\MaxLeng{15}+.&\verb+\MaxLen{}+\\\hline
+ Example, \verb+\MaxLen{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
@@ -3764,46 +3733,60 @@ Lock? & This key is used to lock fields after the signature field is
&\verb+\Lock{}+\\\hline
%-------------------------------------------------------------------
%\pagebreak
+\multicolumn{3}{l}{\color{blue}Entries that change the width and height of a field:}\\
+rectW? & \hskip-2\tabcolsep \texttt{\darg{\ameta{length}}} Set the width of a field to \ameta{length},
+ the height is not changed&\cs{rectW\darg{}}\\
+rectH? & \hskip-2\tabcolsep\texttt{\darg{\ameta{length}}} Set the height of a field to \ameta{length},
+ the width is not changed&\cs{rectH\darg{}}\\
+width? & \hskip-2\tabcolsep\texttt{\darg{\ameta{length}}} Set the width to \ameta{length} and re-scale the height to keep the same
+ aspect ratio & \cs{width\darg{}}\\
+height? \hskip-2\tabcolsep& \texttt{\darg{\ameta{length}}} Set the height to \ameta{length} and re-scale the width to keep the same
+ aspect ratio & \cs{height\darg{}}\\
+scalefactor? & \hskip-2\tabcolsep\texttt{\darg{pos-num}} Re-scales both the width and height by a scale factor of
+ \ameta{pos-num} & \cs{scalefactor\darg{}}\\
+
+%-------------------------------------------------------------------
+%\pagebreak
\multicolumn{3}{l}{\color{blue}Specialized, non-PDF Spec commands:}\\
-rawPDF? & \texttt{\darg{\ameta{PDF-KVPs}}} If all else fails, you can always introduce key-value pairs
+rawPDF? &\hskip-2\tabcolsep \texttt{\darg{\ameta{PDF-KVPs}}} If all else fails, you can always introduce key-value pairs
through this variable. &\verb+\rawPDF{}+\\
-autoCenter? &\texttt{\darg{y|n}} There is a centering code that attempts to give a pleasant
+autoCenter? &\hskip-2\tabcolsep\texttt{\darg{y|n}} There is a centering code that attempts to give a pleasant
placement of the field. \verb+\autoCenter{n}+
turn auto centering off.&\\
-inline? & \texttt{\darg{y|n}} If \mlcs{inline\darg{y}}, an alternate method is used
+inline? &\hskip-2\tabcolsep \texttt{\darg{y|n}} If \mlcs{inline\darg{y}}, an alternate method is used
get a better vertical positioning. Designed for inline form fields.
The default is \mlcs{inline\darg{n}}.\\
-presets? & \texttt{\darg{\ameta{\cs{cmd}}}} This commands takes a macro as its argument, the text of the macro
+presets? & \hskip-2\tabcolsep\texttt{\darg{\ameta{\cs{cmd}}}} This commands takes a macro as its argument, the text of the macro
are key-value pairs. This is useful for setting up a series of
presets for fields. Example, \verb|\presets{\myFavFive}|\\
-symbolchoice? & \texttt{\darg{\ameta{symbol-choice}}} Use this variable to specify what symbol is to be used
+symbolchoice? & \hskip-2\tabcolsep\texttt{\darg{\ameta{symbol-choice}}} Use this variable to specify what symbol is to be used
with a check box or radio button. Possible values are
\texttt{check}, \texttt{circle}, \texttt{cross},
\texttt{diamond}, \texttt{square} and \texttt{star}. Can
be used to globally change the symbol choice as well; for
example, \verb+\symbolchoice{check}+, which is the
default value.\\
-cmd? &\texttt{\darg{\ameta{cmd-args}}} Passes its argument into the key-value parsing stream, refer
+cmd? &\hskip-2\tabcolsep\texttt{\darg{\ameta{cmd-args}}} Passes its argument into the key-value parsing stream, refer
to page~\pageref{para:defineJSwArgs} for an example.\\
-linktxtcolor? & \texttt{\darg{\ameta{named-color{\upshape|empty}}}} The value of this variable is a named color and is the
+linktxtcolor? & \hskip-2\tabcolsep\texttt{\darg{\ameta{named-color{\upshape|empty}}}} The value of this variable is a named color and is the
color of the link text. Only recognized
in link annotations. A value of
\verb!\linktxtcolor{}! paints the text the \cs{normalcolor}.&\cs{linktxtcolor}\newline\verb+ {\@linkcolor}+\\\hline
\multicolumn{3}{l}{\color{blue}Special link key-values used by \pkg{aeb\_mlink} and \pkg{annot\_pro}}\\
-mlstrut? & \texttt{\darg{\ameta{strut}}} Adjusts the height of a multi-line link, e.g., \verb!\mlstrut{\large\strut}!
+mlstrut? & \hskip-2\tabcolsep\texttt{\darg{\ameta{strut}}} Adjusts the height of a multi-line link, e.g., \verb!\mlstrut{\large\strut}!
&\verb~\mlstrut{\strut}~\\
-mlcrackat?& \texttt{\darg{\ameta{num{\upshape|empty}}}} Used to break a multi-line link across a page boundary;
+mlcrackat?& \hskip-2\tabcolsep\texttt{\darg{\ameta{num{\upshape|empty}}}} Used to break a multi-line link across a page boundary;
specifying \verb~\mlcrackat{3}~ breaks the link after the 3rd syllable. The \pkg{aeb\_mlink}
package then creates two links consisting of the text up to and including the crack-at value and
the second link consisting of the rest of the hypertext link (or url) string.
&\verb~\mlcrackat{}~\\
-mlhyph? & \texttt{\darg{y|n}} A key that takes `y' or `n' as its value. If `y' is passed, then a hyphen is inserted after
+mlhyph? & \hskip-2\tabcolsep\texttt{\darg{y|n}} A key that takes `y' or `n' as its value. If `y' is passed, then a hyphen is inserted after
the break in a multi-line link that crosses a page boundary.
& \cs{mlhyph\darg{n}}\\
-mlignore? &\texttt{\darg{\upshape0|1}} An internal switch used in building multi-line links and text markup annotations
+mlignore? & \hskip-2\tabcolsep\texttt{\darg{\upshape0|1}} An internal switch used in building multi-line links and text markup annotations
that cross page boundaries. \emph{Do not use}.
&\cs{mlignore\darg{0}}\\
-mlcrackinsat? &\texttt{\cs{mlcrackinsat\darg{\ameta{latex-content}}}} This key inserts
+mlcrackinsat? &\hskip-2\tabcolsep\texttt{\darg{\ameta{latex-content}}} This key inserts
its argument after the hyphen (if there is one) at the point declared by the \cs{crackat} value.
& \cs{mlcrackinsat\darg{}}
\end{longtable}
diff --git a/macros/latex/contrib/acrotex/eforms.dtx b/macros/latex/contrib/acrotex/eforms.dtx
index 7133e60f79..70e2ab5381 100644
--- a/macros/latex/contrib/acrotex/eforms.dtx
+++ b/macros/latex/contrib/acrotex/eforms.dtx
@@ -4,7 +4,7 @@
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% eForms package, %%
-%% Copyright (C) 2002-2019 D. P. Story %%
+%% Copyright (C) 2002-2020 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -16,10 +16,11 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{eforms}
-%<package> [2019/10/23 v2.3.2 Provides general eforms support (dps)]
+%<package> [2020/10/10 v2.3.6 Provides general eforms support (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12]
+\usepackage{fancyvrb}
\pdfstringdefDisableCommands{\let\\\textbackslash}
\OnlyDescription
\EnableCrossrefs
@@ -31,14 +32,19 @@
\let\env\texttt
\let\opt\texttt
\let\app\textsf
+\let\key\texttt
\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}}}}
\def\ltag{<}\def\rtag{>}
\let\app\textsf\let\pkg\textsf
+\let\tops\texorpdfstring
+\makeatletter
+\let\@latex@warning\@gobble
+\makeatother
\InputIfFileExists{aebdocfmt.def}{\PackageInfo{eforms}{Inputting aebdocfmt.def}}
- {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro} \let\setupFullwidth\relax
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
\PackageInfo{eforms}{aebdocfmt.def cannot be found}}
\begin{document}
\GetFileInfo{eforms.sty}
@@ -70,13 +76,12 @@
%
% \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 \pkg{exerquiz} into a separate package. The
-% \pkg{eforms} package is now a part of the \textsf{{Acro\TeX} eDucation
-% Bundle} and is called by \pkg{exerquiz}, but it is now a stand alone
-% package for others who may want to use PDF form fields and JavaScript
-% interactivity.
+% \textbf{Form Response Files.}
+% The \pkg{eforms} package supports the creation of \app{Acrobat} \hyperref[formsSupport]{form fields},
+% as well as the creation of \hyperref[linkSupport]{link annotations}. Most all features of fields and links are supported, though
+% for some features, such as signatures and tabbing, the \app{Acrobat/\allowbreak Distiller} pair is needed.
+% Inserting PDF form fields into your document creates a \emph{Form Response File}, to use the latest
+% nomenclature of \app{Adobe}.
%
% \section{Package Options}
%
@@ -161,7 +166,7 @@
\def\eq@drivercode{edvipdfm.def}\def\ef@driver{xetex}%
}
% \end{macrocode}
-% \IndexOpt{textures}
+% \leavevmode\IndexOpt{textures}^^A%
% This option, and testing are due to Ross Moore 3/6/02
% \begin{macrocode}
\DeclareOption{textures}{%
@@ -243,7 +248,7 @@
}%
}
% \end{macrocode}
-% \begin{macrocode}
+% \begin{macrocode}`
\ProcessOptions
\ifx\ef@driver\@empty
\PackageError{eforms}%
@@ -258,18 +263,31 @@
\edef\ef@CatChngs{\the\catcode`\$}
\@makeother\$\relax
\newlength\eflength
+% \end{macrocode}
+% To support a variations of \app{dvipdfm}, we change the logic from
+% \cs{ifxetex} to |\ifnum\eq@drivernum=2\relax|, a driver number of 2
+% includes \app{dvipdfm} and all its variants.
+% \changes{v2.3.4}{2020/07/05}{Change logic from \string\cs{ifxetex} to
+% \string\cs{ifnum}\string\cs{eq@drivernum=2\string\relax}}
+% \begin{macrocode}
\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
-\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
+\ifpdf\else\ifnum\eq@drivernum=2\relax\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}
+% \changes{v2.3.4}{2020/07/05}{Change logic from \string\cs{ifxetex} to
+% \string\cs{ifnum}\string\cs{eq@drivernum=2\string\relax}}
% \begin{macrocode}
-\ifxetex\else\ifpdf\pdflinkmargin1bp\relax\else
+\ifnum\eq@drivernum=2\relax
+\else
+ \ifpdf\pdflinkmargin1bp\relax
+ \else
\g@addto@macro\Hy@FirstPageHook{%
\headerps@out{/HyperBorder {1.00375 PDFToDvips} def}}
-\fi\fi
+ \fi
+\fi
% \end{macrocode}
% Changed the requirement for \textsf{insdljs}
% \changes{v2.9a}{2016/06/09}{Change in \string\textsf{insdljs} package}
@@ -279,17 +297,17 @@
% \end{macrocode}
% \changes{v1.0a}{2006/10/03}
% {
-% If \string\textsf{exerquiz} is not loaded, we do an automatic begin and end of Form.
+% If \string\pkg{exerquiz} is not loaded, we do an automatic begin and end of Form.
% Also, if \string\textsf{exerquiz} is loaded, then we use the driver declared in
-% \string\textsf{exerquiz}; otherwise, we set the default to 0
+% \string\pkg{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}|,
+% If \pkg{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}
+ \AtBeginDocument{\Form}%
+ \AtEndDocument{\@nameuse{endForm}}
}
\@ifpackageloaded{aeb_pro}{}{%
\newcommand{\taggedPDF}{%
@@ -312,12 +330,19 @@
% \end{macrocode}
% When the \texttt{preview} option is used, draw a frame box
% around the \textit{inner} bounding rectangle.
+%
+% \paragraph*{Utility commands, boxes, dimension and token registers}
% \begin{macrocode}
%<*package>
\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
\@ifundefined{eq@tmpbox}{\newsavebox{\eq@tmpbox}}{}
\@ifundefined{eq@tmpdima}{\newdimen\eq@tmpdima}{}
\@ifundefined{eq@tmpdimb}{\newdimen\eq@tmpdimb}{}
+% \end{macrocode}
+% Define new dimension of \cs{b@} which is assigned a value of 1bp.
+% \changes{v2.3.6}{2020/10/10}{Defined new dimension \string\cs{b@} (1bp)}
+% \begin{macrocode}
+\newdimen\b@ \b@=1bp
\newlength\ef@dimena
\newtoks\ef@scratchtoks
% \end{macrocode}
@@ -391,31 +416,7 @@
% The public version of \cs{ef@Bbox} is simply \DescribeMacro\Bbox\cs{Bbox}.
% \begin{macrocode}
\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{Some utility commands}
% The following two commands were created as a convenience to changing the definition of certain
% JavaScript actions. Use \cs{efsave} to save the original definition of the action, then redefine the action,
% the later, restore the JS action to its original definition.\par\medskip\noindent
@@ -438,6 +439,37 @@
% has the same definition as |\x| does. Now |\x| is free to be redefined. Later in the document,
% we can say |\efrestore\x\from\y| (eg, |\let\x\y|). Now the
% definition of |\x| has its original definition (at the time when it was saved).
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \section{\tops{\app}{}{Adobe} Forms Support}\label{formsSupport}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Listed below are the various types of form objects available in PDF.
+%\par\medskip\noindent
+%\begin{minipage}{.67\linewidth}\raggedcolumns
+%\begin{multicols}{2}
+%\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}
+%\end{multicols}
+%\end{minipage}
+%
+%\bigskip
+%
%
% \subsection{Process Key-Value Pairs: Main Macro}\label{procArgs}
%
@@ -455,10 +487,10 @@
% \cs{@eq\ameta{name}\darg{\ameta{arg}}}. Each of the macros \cs{@eq\ameta{name}} must be
% defined. Such a macro defines another macro as follows
% \cs{def\string\eq@\ameta{name}\darg{\ameta{arg}}}. For example if the user enters the token
-% pair |\RC{Users}|, \cmd{\processAppArgs} will construct
-% |\@eqRC|, with argument |{Users}|, this macro will be
-% executed, which expands to |\def\eq@RC{Users}|. The macro
-% \cmd{\eq@RC} may then be used within the construction of the
+% pair |\TU{|\ameta{text}|}|, \cmd{\processAppArgs} will construct
+% |\@eqTU|, with argument |{|\ameta{text}|}|, this macro will be
+% executed, which expands to |\def\eq@TU{/TU(|\ameta{text}|)}| (a simplified definition). The macro
+% \cmd{\eq@TU} is then be used within the construction of the
% widget object.\medskip
%
% \noindent
@@ -478,11 +510,7 @@
% 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
-% \@getCmdName{#1}\PackageWarning{eforms}
-% {Redefining the \eqbs\@CmdName\space key is not allowed}%
- \def\ef@next{\processAppArgs}%
- \else
+ \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
@@ -563,7 +591,7 @@
% the argument of \cs{presets} is a macro of the form \cs{csname}/\cs{endcsname}.
% An ordinary \cs{presets} does not work, we must use \cs{epresets}:
%\begin{verbatim}
-% \expandafter\def\csname fld1\endcsname#1{\protect\BG{#1}}
+% \csarg\def{fld1}#1{\protect\BG{#1}}
% \textField[\epresets{\nameuse{fld1}{yellow}}]{mytxt}{2in}{13bp}
%\end{verbatim}
%In the above example we use \cs{nameuse} rather than \cs{@nameuse}, since in a recent
@@ -572,7 +600,7 @@
%\begin{verbatim}
% \protectedKeys{pKeys}{\BG{red}\BC{blue}}
%% \nameuse is expanded within the argument below, where it is defined
-% \expandafter\def\csname fld2\endcsname{\nameuse{pKeys}}
+% \csarg\def{fld2}{\nameuse{pKeys}}
% \pushButton[\CA{Push Me}\epresets{\nameuse{fld2}}]{pb1}{}{13bp}
%\end{verbatim}
%where \cs{protectedKeys} is used to protected each of the keys in its argument.
@@ -582,7 +610,7 @@
\ifx\arg@epresets\@CmdName
\def\ef@next{\let\protect\noexpand
\edef\x{#2}\set@typeset@protect\expandafter
- \processAppArgs\x}% dps27
+ \processAppArgs\x}%
\else
% \end{macrocode}
% This is the last, and the most frequent case. We process an ordinary key, one
@@ -604,16 +632,13 @@
% 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
+\def\@processEvery{\edef\eqtemp{}\toks@={}\@@processEvery}
+\def\@@processEvery#1{\ifx#1\end
+ \def\ef@next{\the\toks@}\else
+ \edef\eqtemp{\the\toks@}%
+ \toks@=\expandafter{\eqtemp\expandafter
+ \processAppArgs#1\end\@nil}%
+ \def\ef@next{\@@processEvery}\fi\ef@next
}
% \end{macrocode}
% \begin{macrocode}
@@ -625,36 +650,79 @@
% inline form fields.}
% \begin{macrocode}
\def\centerWidget#1{%
- \ifeq@inlineCenter
+ \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@
+ \eqcenterWidget=#1\relax
+ \eqcenterWidget=.5\eqcenterWidget
+ \ifnum\eq@textSize=0\relax
+ \dimen@=-\eq@textSizeDefault\b@\else
+ \dimen@=-\eq@textSize\b@\fi
+ \dimen@=0.9167\dimen@ % 11/12
+ \dimen@=.5\dimen@
+ \advance\dimen@\eq@W@value\b@
+ \ifx\eq@S\@empty\else
+ \def\eq@S@cmp{B}%
+ \ifx\eq@S@value\eq@S@cmp
+ \advance\dimen@ by \eq@W@value\b@
+ \else
+ \def\eq@S@cmp{I}%
+ \ifx\eq@S@value\eq@S@cmp
+ \advance\dimen@ by \eq@W@value\b@
+ \else\advance\dimen@\b@
+ \fi\fi\fi
+ \advance\eqcenterWidget\dimen@
+ \else
+ \eqcenterWidget=#1\relax
+ \eqcenterWidget=.5\eqcenterWidget
+ \advance\eqcenterWidget-4\b@
+ \fi
+}
+% \end{macrocode}
+% \begin{macro}{\ef@optscale}
+% This macro supports the \texttt{width}, \texttt{height}, and \texttt{scale} option keys for forms.
+% We obey these three keys in the order listed above.
+% \changes{v2.3.5}{2020/09/15}{Added \string\cs{ef@optscale}}
+% \begin{macrocode}
+\def\ef@optscale{%
+ \ifx\eq@width\@empty
+ \ifx\eq@height\@empty
+ \ifx\eq@scalefactor\@empty
+ \else
+% \end{macrocode}
+% Re-scale using scale factor of \cs{eq@scale}.
+% \begin{macrocode}
+ \@tempdima\eq@scalefactor\p@
+ \ifdim\@tempdima<\z@\edef\eq@scalefactor{-\eq@scalefactor}\fi
+ \setlength{\eflength}{\eq@rectH*\real{\eq@scalefactor}}%
+ \edef\eq@rectH{\the\eflength}%
+ \setlength{\eflength}{\eq@rectW*\real{\eq@scalefactor}}%
+ \xdef\eq@rectW{\the\eflength}%
+ \fi
\else
- \eqcenterWidget=#1\relax
- \eqcenterWidget=.5\eqcenterWidget
- \advance\eqcenterWidget by -4bp
+% \end{macrocode}
+% Re-scale according to height.
+% \begin{macrocode}
+ \setlength{\eflength}{\eq@rectH}%
+ \ifdim\eflength>\z@
+ \setlength{\eflength}{\eq@height*\ratio{\eq@rectW}{\eq@rectH}}%
+ \edef\eq@rectW{\the\eflength}\edef\eq@rectH{\eq@height}%
+ \fi
\fi
+ \else
+% \end{macrocode}
+% Re-scale according to width.
+% \begin{macrocode}
+ \setlength{\eflength}{\eq@rectW}%
+ \ifdim\eflength>\z@
+ \setlength{\eflength}{\eq@width*\ratio{\eq@rectH}{\eq@rectW}}%
+ \edef\eq@rectH{\the\eflength}\edef\eq@rectW{\eq@width}%
+ \fi
+ \fi
}
% \end{macrocode}
+% \end{macro}
%
% \subsection{\textsf{eforms} key-values}\label{eformvariables}
%
@@ -694,17 +762,23 @@
\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}\hskip-\marginparsep\texttt{\darg{\meta{\cs{cmd}}}}
+% We define the \cs{presets} key. The argument of \key{presets} is a macro (\meta{\cs{cmd}}) consisting of key-value pairs.
+% The macro \meta{\cs{cmd}} expanded by \cs{expandafter}
+% and put back into the parsing stream.\par\medskip
+% \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 \cs{presets} key. The argument of presets is a macro, that is
-% expanded and put back into the parsing stream. The \DescribeMacro{\epresets}\cs{epresets} keys is used
-% when the properties are to be expanded early. (properties need to be protected \cs{protect}\cs{BG})
-% \changes{v2.9.23}{2019/01/22}{Added \string\cs{epresets} key}
+% \noindent \DescribeMacro{\epresets}\hskip-\marginparsep\texttt{\darg{\meta{\cs{cmd}}}} The \cs{epresets} key is used
+% when the properties are to be expanded early. The command argument \meta{\cs{cmd}} is fully expanded within
+% an \cs{edef}; as a result, the keys need to be protected, for example, |\epresets{\protect\BC{red}}|.
+% The command \cs{protectedKeys} can be used to protect the keys to all the key-value pairs.
+% \changes{v2.9.23}{2019/01/22}{Added \string\cs{epresets} key}\par\medskip
+%
+% \noindent Both \cs{presets} and \cs{epresets} are handled within the \cs{proccessAppArgs} macro;
+% the definitions below actually do nothing and are never expanded.
% \begin{macrocode}
-\def\@eqpresets#1{#1}%
+\def\@eqpresets#1{#1}
\def\@eqepresets#1{#1}
% \end{macrocode}
% \DescribeMacro{\W} The width of the boundary line.
@@ -716,9 +790,9 @@
% (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}}
+ \xdef\g@eq@W@value@bp{\eq@W@value\b@}}
\def\eq@W{}\def\eq@W@value{0}
-\def\g@eq@W@valu@bp{0bp} % dps 12/22
+\def\g@eq@W@valu@bp{0bp}
% \end{macrocode}
% \DescribeMacro{\S} Line style, values are \texttt{S} (solid), \texttt{D} (dashed),
% \texttt{B} (beveled), \texttt{I} (inset), \texttt{U} (underlined)
@@ -897,24 +971,81 @@
\def\@eqmlLink#1{\def\eq@arg{#1}\ifx\eq@arg\ef@true
\let\ef@mlLink\ef@One\else\let\ef@mlLink\ef@Zero\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}
+% \DescribeMacro{\Lock} The \cs{Lock} key is used with signature fields.
+% We allow the document author to either use raw PDF markup, or the simplified
+% \pkg{eforms} key-value or UF key-values. To do this, we determine if
+% \texttt{/Action} appears somewhere in the argument, if yes, then it is raw;
+% otherwise, it is key-value markup.
+% \begin{macrocode}
+\def\ef@searchAction#1/Action#2\@nil{\def
+ \ef@argii{#2}\ifx\ef@argii\ef@end\let\ef@Action\ef@One\else
+ \let\ef@Action\ef@Zero\fi}
+% \end{macrocode}
+% The definition of \cs{@eqLock}, we determine if raw or KV-Pairs.
% \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{}
+ \let\eq@Lock\@empty\else\def\lckArgs{#1}%
+ \ef@searchAction#1/Action\end\@nil
+ \ifx\ef@Action\ef@One\def\ef@next{\let\Action\lckAction#1}\else
+ \let\ef@next\relax\fi\ef@next
+ \def\eq@Lock{/Lock <<\lckArgs>>}\fi}
+\let\eq@Lock\@empty
+% \end{macrocode}
+%Various examples using \emph{raw PDF markup} follow:
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!~@},codes={\catcode`\%=9}]
+%\Lock{/Action/All} !% !textsf~all fields in the doc@
+%\Lock{/Action/Include !% !textsf~include all fields listed in Fields@
+% /Fields [(field1)(field2)...]}
+%\Lock{/Action/Exclude !% !textsf~exclude all fields listed in Fields@
+% /Fields [(field1)(field2)...]}
+%\end{Verbatim}
+% A simplified syntax for the arguments of \cs{Lock}; sample
+% syntax for the same three examples above are,
+%\changes{v2.3.6}{2020/10/10}{Addition support for the \string\cs{Lock} key}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!~@},codes={\catcode`\%=9}]
+%\Lock{\Action\All}
+%\Lock{\Action\IncludeFields{field1,field2,...}}
+%\Lock{\Action\ExcludeFields{field1,field2,...}}
+%\end{Verbatim}
+%The code for the simplified markup for the \cs{Lock} key.
+% \begin{macrocode}
+\def\lckAll{\All}
+\def\lckIncludeFields{\IncludeFields}
+\def\lckExcludeFields{\ExcludeFields}
+\def\lckActionTst#1{\let\X\ef@Yes#1}%
+\def\lckAction#1{\def\@rgi{#1}\ifx\@rgi\lckAll
+ \def\lckArgs{/Action/All}\let\ef@next\relax\else
+ \ifx\@rgi\lckIncludeFields
+ \def\ef@next{\lckGetFieldsFor{Include}}\else
+ \ifx\@rgi\lckExcludeFields
+ \def\ef@next{\lckGetFieldsFor{Exclude}}\else
+ \PackageWarning{eforms}%
+ {The argument of the \string\Lock key\MessageBreak
+ is not correctly expressed. Review the documentation}%
+ \fi
+ \fi
+\fi\ef@next
+}
+\def\lckGetFieldsFor#1#2{\@temptokena={}\@for\@fld:={#2}\do
+ {\edef\@etmp{\the\@temptokena(\@fld)}%
+ \@temptokena=\expandafter{\@etmp}%
+ }\edef\lckArgs{/Action/#1/Fields[\the\@temptokena]}%
+}
% \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.
+% For example,
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\catcode`\%=9}]
+%\AAformat={app.alert("Thank you for signing this field.");}
+%\end{Verbatim}
%\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,
+% \cs{ef@searchCalc} searches for the \cs{AACalculate} token. If, for some reason,
+% \cs{AACalculate} 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}.
@@ -1248,7 +1379,9 @@
\let\eq@Ff\@empty\else\def\eq@Ff{/Ff #1}\fi}
\def\eq@Ff{}
% \end{macrocode}
-% \paragraph*{keys specific to text fields:} \texttt{MaxLen}
+% \goodbreak
+% \paragraph*{Keys specific to text fields:} The following keys are specific to
+% text fields.
% \begin{macrocode}
% \end{macrocode}
% \DescribeMacro{\MaxLen} text fields only. Restricts number of characters
@@ -1259,15 +1392,16 @@
\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).
+% are None, Push, Outline, Invert (respectively, |\H{N}|, |\H{P}|,
+% |\H{O}|, |\H{I}|)
+% The default highlighting is invert (\texttt{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}
+% \texttt{MK\,=\,R,\,BC,\,BG,\,CA,\,RC,\,AC,\,I,\,RI,\allowbreak\,IX,\,IF,^^A
+% \,TP}
% \begin{macrocode}
% \end{macrocode}
% \DescribeMacro{\MK} A dictionary containing other keys
@@ -1596,7 +1730,8 @@
% \end{macrocode}
% \begin{macro}{\rectH}
% \begin{macro}{\rectW}
-% Use to set the height and width of a widget.
+% Used to set the height and width of a widget, useful when the width and height arguments
+% of the widget is not accessible.
% \begin{macrocode}
\def\@eqrectH#1{\def\eq@rectH{#1}\ifx\eq@rectH\@empty\else
\setlength\eflength\eq@rectH\edef\eq@rectH{\the\eflength}\fi}
@@ -1605,6 +1740,29 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \begin{macro}{\width}
+% Re-scale the widget to have a specified width, keeping the height in proportion
+% \changes{v2.3.5}{2020/09/15}{Added \string\pkg{eforms} keys \string\texttt{width}, \string\texttt{height},
+% and \string\texttt{scale}}
+% \begin{macrocode}
+\def\@eqwidth#1{\def\eq@width{#1}}
+\let\eq@width\@empty
+% \end{macrocode}
+% \begin{macro}{\height}
+% Re-scale the widget to have a specified height, keeping the height in proportion
+% \begin{macrocode}
+\def\@eqheight#1{\def\eq@height{#1}}
+\let\eq@height\@empty
+% \end{macrocode}
+% \begin{macro}{\scale}
+% Re-scale the widget by a scale factor.
+% \begin{macrocode}
+\def\@eqscalefactor#1{\def\eq@scalefactor{#1}}
+\let\eq@scalefactor\@empty
+% \end{macrocode}
+% \end{macro}
+% \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,
@@ -1766,33 +1924,37 @@
\def\eq@protect#1{\let#1\@empty}
% \end{macrocode}
% \leavevmode
-% \DescribeMacro{\protectedKeys}\hskip-\marginparsep\texttt{\darg{\ameta{cmd-name}}\darg{\ameta{KV-pairs}}}
-% is a key that protects each key in a \pkg{eforms} key-value list; eg, it replaces
-% \cs{BG\darg{red}} with \cs{protect\cs{BG\darg{red}}}. The results are saved under the command
+% \DescribeMacro{\protectedKeys}\hskip-\marginparsep\texttt{*\darg{\ameta{cmd-name}}\darg{\ameta{KV-pairs}}}
+% is a command that protects each key in a \pkg{eforms} key-value list; eg, it replaces
+% \cs{BC\darg{red}} with \cs{protect\cs{BC\darg{red}}}. The results are saved under the command
% name \cs{\ameta{cmd-name}}. Designed to be used with the \cs{epresets} key, which expands its arguments
% early; the keys are not defined so we prevent them from expanding prior to being passed to
-% the parsing mechanism. \cs{protectedKeys} is used in the \pkg{bargraph-js} package.
+% the parsing mechanism. \cs{protectedKeys} is used in the \pkg{bargraph-js} package. If \cs{\ameta{cmd-name}}
+% is already defined, a warning message is written to the TEX LOG, unless the \texttt*-option is taken.
% \changes{v2.10}{2019/03/16}{Added \string\cs{protectedKeys}}
% \begin{macrocode}
-% \end{macrocode}
-% \DescribeMacro{\multigroupradios} Declares whether there are multiple sets of radio button groups
-% with the same names and values,
-% \begin{macrocode}
-\def\@eqmultigroupradios#1{\let\ef@multigroupradios\ef@YES}
-\let\ef@multigroupradios\ef@NO
-% \end{macrocode}
-% \begin{macrocode}
-\def\ef@stop{\relax} %\def\ef@relax{\relax}
-\def\protectedKeys#1#2{\ef@scratchtoks={}%
- \@ifundefined{#1}{}{\PackageWarning{eforms}
+\def\ef@stop{\relax}
+\let\isst@r\ef@NO
+\def\protectedKeys{\@ifstar
+ {\let\isst@r\ef@YES\protectedKeys@i}
+ {\let\isst@r\ef@NO\protectedKeys@i}%
+}
+\def\protectedKeys@i#1#2{\ef@scratchtoks={}%
+ \@ifundefined{#1}{}{\ifx\isst@r\ef@NO\PackageWarning{eforms}
{Be aware command name #1 is already\MessageBreak
- in use}}\protectedKeys@gettwo#2\ef@stop\relax
- \expandafter\edef\csname #1\endcsname{\the\ef@scratchtoks}}
+ in use}\fi}\protectedKeys@gettwo#2\ef@stop\relax
+ \csarg\edef{#1}{\the\ef@scratchtoks}}
\def\protectedKeys@gettwo#1#2{%
\ifx#1\ef@stop\else\ef@scratchtoks=\expandafter
{\the\ef@scratchtoks\protect#1{#2}}\expandafter
\protectedKeys@gettwo\fi}
% \end{macrocode}
+% \DescribeMacro{\multigroupradios} Declares whether there are multiple sets of
+% radio button groups with the same names and values,
+% \begin{macrocode}
+\def\@eqmultigroupradios#1{\let\ef@multigroupradios\ef@YES}
+\let\ef@multigroupradios\ef@NO
+% \end{macrocode}
%
% \subsubsection{Support for Hex escapes in PDF names}
% \changes{v2.9p}{2017/10/10}{rework the support for Hex escapes in PDF names}
@@ -2382,7 +2544,7 @@
%Hidden (and does not print) &|\F\FHidden|
%\end{tabular}
%
-%\subsubsection{Field Flags /Ff Definitions}\label{Ff}
+%\subsubsection{Field Flags \texttt{/Ff} Definitions}\label{Ff}
% \begin{macrocode}
\def\FfReadOnly{1} % all
\def\FfRequired{2} % all
@@ -2485,8 +2647,8 @@
\edef\eq@rectH{\the\eflength}%
\fi
}
-\def\ef@djXPD{\ifxetex\ifmakeXasPD\ef@adjrectWH{2bp}\fi
- \else\ifmakePDasX\ef@adjrectWH{-2bp}\fi\fi}
+\def\ef@djXPD{\ifxetex\ifmakeXasPD\ef@adjrectWH{2\b@}\fi
+ \else\ifmakePDasX\ef@adjrectWH{-2\b@}\fi\fi}
% \end{macrocode}
% \begin{macro}{\eq@setButtonProps}
% This macro measure the width of the largest text on defined for the
@@ -2496,10 +2658,14 @@
% #1 is the driver specific macro to build the button widget
% #2 are the button properties
%\end{verbatim}
+%\DescribeMacro\btnSpcr\hskip-\marginparsep\texttt{\darg{\ameta{content}}} Adds space on either
+%side of a pushbutton caption; the amount of the spacing is the width of \ameta{content} in the current
+%current font, the fontsize is the one determined by the \cs{textSize} key.
%\changes{v2.5m}{2012/01/27}{Added \string\cs{ef@btnspcr} to give user
% ability to adjust the spacing around text for a button.}
+% \changes{v2.3.5}{2020/09/15}{Added \string\cs{tbnSpcr} to populate \string\cs{eq@btnspcr}}
% \begin{macrocode}
-%\def\ef@btnspcr{\ }
+\def\btnSpcr#1{\def\ef@btnspcr{#1}}
\def\ef@btnspcr{}
% \end{macrocode}
% \subsubsection{Enhanced preview}\label{pmpv}
@@ -2562,10 +2728,35 @@
% \changes{v2.11}{2019/05/24}{Enhanced preview introduced}
%
% \subsubsection{Set push button properties}
-% \begin{macrocode}
+% \leavevmode\DescribeMacro\ef@adjcapfont^^A
+% When \cs{pmpvOn} is expanded, the caption text is previewed, we try to adjust
+% the typeset caption font size to match the font size used by the push button.
+% \changes{v2.3.5}{2020/09/15}{Added \string\cs{ef@adjcapfont}}
+% \begin{macrocode}
+\def\ef@adjcapfont{%
+ \dimen@=\eq@textSize\b@
+ \dimen@1.00375\dimen@
+ \edef\eq@textSize@pt{\strip@pt\dimen@}%
+ \fontsize{\eq@textSize@pt}{0}\selectfont
+}
\def\eq@setButtonProps#1#2{\makeJSspecials
\processAppArgs#2\end\@nil % set widget properties
% \end{macrocode}
+% If \cs{eq@rectW} is not a positive dimension, mark it as empty.
+% \changes{v2.3.5}{2020/09/15}{If \string\cs{rectW} is not a positive dimension,
+% make it empty for push buttons.}
+% \begin{macrocode}
+ \ifx\eq@rectW\@empty\else
+ \ifdim\eq@rectW>0pt \else\let\eq@rectW\@empty\fi\fi
+% \end{macrocode}
+% Re-scale dimensions as requested. If \cs{eq@rectW} is empty, then the width is calculated
+% from the \cs{CA} key; re-scaling is ignored in this case.
+% \changes{v2.3.5}{2020/09/15}{Added \string\cs{ef@optscale}}
+% \changes{v2.3.5}{2020/09/15}{If \string\cs{rectW} is not a positive dimension,
+% make it empty for push buttons.}
+% \begin{macrocode}
+ \ifx\eq@rectW\@empty\else\expandafter\ef@optscale\fi
+% \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}
@@ -2576,22 +2767,19 @@
\ifx\eq@rectW\@empty
\ifnum\eq@textSize=0 \else
% \end{macrocode}
-% If \cs{rectW} is nonempty, and \cs{textSize} is not zero, we calculate with
+% If \cs{rectW} is empty and \cs{textSize} is not zero, we calculate with
% width of the caption on the button by first adjusting the font 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
+ \ef@adjcapfont
\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
+ \dimen@\eq@W@value\b@
\def\eq@S@B{B}\ifx\eq@S@value\eq@S@B
\def\eq@btn@sp{\hbox to2\dimen@{\hfill}}%
\else
@@ -2612,7 +2800,7 @@
% (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
+ \ifmakePDasX\advance\eq@tmpdima2\b@\fi
\wd\eq@tmpbox=\eq@tmpdima
\else % if \eq@rectW is not \@empty
\wd\eq@tmpbox=\eq@rectW
@@ -2629,7 +2817,10 @@
% \begin{macrocode}
\ifx\ef@isBGtransparent\ef@YES
\let\ef@kvCA\@empty\fi
- \ifx\ef@CApv\ef@YES\PMPV{\eq@CA}\fi\fi
+% \end{macrocode}
+% Adjust the font size for the preview text.
+% \begin{macrocode}
+ \ifx\ef@CApv\ef@YES\ef@adjcapfont\PMPV{\eq@CA}\fi\fi
\ef@djXPD#1%
}
% \end{macrocode}
@@ -2652,6 +2843,11 @@
% \changes{v2.9f}{2017/01/01}{BC=empty iff W=0 or empty}
% \begin{macrocode}
\ifx\annot@type@link\annot@type\else
+% \end{macrocode}
+% Re-scale dimensions as requested
+% \changes{v2.3.5}{2020/09/15}{Added \string\cs{ef@optscale}}
+% \begin{macrocode}
+ \ef@optscale
\ifx\eq@BC\@empty\@eqW{}\else
\if\eq@W@value0\let\eq@BC\@empty\fi\fi
\fi
@@ -2701,13 +2897,14 @@
% \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
+% \item \texttt{\#1} is the spacing for non-\app{xelatex} apps
+% \item \texttt{\#2} is the spacing for \app{xelatex}
%\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
+% The \app{xelatex} application includes the border width as part of the bounding rectangle
+%dimensions; all other PDF creators do not include the border as part of the dimensions
+%of the bounding rectangle. As a result, this wider boundary is known to {\TeX} as it lays out the line. For
+% non-\app{xelatex} applications, the boundary width is \emph{invisible} to {\TeX}. The command \cs{ef@adjHWxetex} tries to
+% adjust the dimensions for \app{xelatex} so the form field dimensions are the same over all platforms. The boundary
% is still ``visible'' in {\TeX} space.
%
%\paragraph*{Sample uses:}
@@ -2721,6 +2918,7 @@
\newcommand\efKern[2]{\ifxetex\kern#2\else\kern#1\fi}
% \end{macrocode}
% \end{macro}
+% The use of \cs{efKern} has been largely subsumed by \cs{olBdry} and \cs{cgBdry}, however.
% \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
@@ -2729,19 +2927,23 @@
% \changes{v2.9d}{2016/12/22}{Added \string\cs{olBdry} and\string\cs{cgBdry}}
% \begin{macrocode}
\newcommand\olBdry{\bgroup\ifxetex
- \@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
+ \@tempdima-\g@eq@W@value@bp
+ \edef\@mtkern{\the\@tempdima}\else
+ \@tempdima2\b@\advance\@tempdima-\g@eq@W@value@bp
+ \edef\@mtkern{\the\@tempdima}\fi\kern\@mtkern\egroup
}
% \end{macrocode}
-% (2017/01/15) Add optional argument to \cs{cgBdry}
+% \DescribeMacro\cgBdry\hskip-\marginparsep\texttt{[\ameta{length}]}
+% This command inserts spacing between to fields so they are
+% contiguous (boundary-to-boundary); it insert additional space based in the
+% optional argument \ameta{length}. Normally, when the boundaries are the same
+% color, \cs{olBdry} is used; otherwise, \cs{cgBdry} looks best.
% \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}
+\newcommand\cgBdry[1][0\b@]{\bgroup\def\ef@rgi{#1}\ifx\ef@rgi\@empty
+ \def\ef@rgi{0\b@}\fi\setlength{\@tempdima}{\ef@rgi}%
+ \ifxetex\else\addtolength{\@tempdima}{2\b@}\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.
@@ -2749,11 +2951,13 @@
% (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}}
-% \changes{v2.9n}{2017/09/04}{Added \string\cs{efSupprIndent}}.
+% \changes{v2.9n}{2017/09/04}{Added \string\cs{efSupprIndent}}
+% \changes{v2.3.3}{2020/04/15}{Use \string\cs{toks@} in \string\cs{efSupprIndent};
+% use of \string\cs{ef@scratchtoks} proved to be a problem.}
% \begin{macrocode}
-\newcommand{\efSupprIndent}{\ef@scratchtoks=\expandafter{\the\everypar}%
+\newcommand{\efSupprIndent}{\toks@=\expandafter{\the\everypar}%
\everypar{{\setbox\z@\lastbox}\clubpenalty\@M
- \everypar=\expandafter{\the\ef@scratchtoks}}}
+ \everypar=\expandafter{\the\toks@}}}
\newcommand\volBdry{\bgroup\parskip0pt\relax\@@par\nointerlineskip
\olBdry\egroup\efSupprIndent}
\newcommand\vcgBdry{\@ifstar{\edef\ef@offset{\the\parskip}\vcgBdry@i}
@@ -2912,6 +3116,17 @@
% \cs{listBox}, defined below. Within
% the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse}
% and \cs{tops} for \cs{texorpdfstring}.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the button field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(list of key-values for list/combo box)
+%#6 = !textsf(not used)
+%#7 = !textsf(set props and driver macros)
+%#8 = !textsf(every macros)
+%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@listbox{listbox}
\newcommand\list@@Box[8]{\begingroup
@@ -2926,22 +3141,20 @@
\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}
-% \DescribeMacro restores the obey spaces space to its default,
-% saved earlier. This command is placed at the end of each of the form field
-% commands to reverse the earlier change to \cs{pdfSP}.
-% \begin{macrocode}
\bgroup\obeyspaces
\gdef\listBox{\global\let =\dl@sp@ce}\egroup
% \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{macro}{\listBox}\hskip-\marginparsep
+% \texttt{[\ameta{options}]\darg{\ameta{fld-name}}\darg{\ameta{wd}}^^A
+% \darg{\ameta{ht}}\darg{\ameta{face-export-list}}} The user interface to creating a list box field.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the list box field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(the face values/export values of list)
+%\end{Verbatim}
%\noindent Below are the default settings for the list box
% \begin{macrocode}
\def\listBoxDefaults{\W{1}\S{I}\F{\FPrint}\BC{0 0 0}}
@@ -2964,6 +3177,17 @@
% \subsubsection{Combo Box}\label{combobox}
% Within the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse}
% and \cs{tops} for \cs{texorpdfstring}.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the button field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(list of key-values for list/combo box)
+%#6 = !textsf(not used)
+%#7 = !textsf(set props and driver macros)
+%#8 = !textsf(every macros)
+%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@combobox{combobox}
\newcommand\combo@@Box[8]{\begingroup
@@ -2979,15 +3203,18 @@
\def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
\@processEvery#8\end\noindent#6#7{#1}}
% \end{macrocode}
-% \begin{macro}{\comboBox}
+% \begin{macro}{\comboBox}\hskip-\marginparsep
+% \texttt{[\ameta{options}]\darg{\ameta{fld-name}}\darg{\ameta{wd}}^^A
+% \darg{\ameta{ht}}\darg{\ameta{face-export-list}}}\\
% 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{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the radio field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(the face values/export values of combo box)
+%\end{Verbatim}
%\noindent The default settings for the \cs{comboBox}
% \begin{macrocode}
\def\comboBoxDefaults{\W{1}\S{I}\F{\FPrint}\BC{0 0 0}}
@@ -3124,6 +3351,16 @@
% when setting the dimensions of this widget. Made the same
% changes for all AcroForm elements and for linking.
%}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the button field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(not used)
+%#6 = !textsf(set props and driver macros)
+%#7 = !textsf(every macros)
+%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@button{pushbtn}
\newcommand\push@@Button[7]{\begingroup
@@ -3137,13 +3374,16 @@
\@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}
-%\noindent The default for \cs{pushButton}
+% \hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{fld-name}}\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% The user command for creating a push button form field.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the button field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%\end{Verbatim}
+%The defaults for \cs{pushButton}
% \begin{macrocode}
\def\pushButtonDefaults{%
\W{1}\S{B}\F{\FPrint}\BC{0 0 0}
@@ -3171,6 +3411,19 @@
% \begin{macrocode}
\def\pmpvMrk#1{\def\pmpv@mrk{#1}}
\pmpvMrk{X}
+% \end{macrocode}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the button field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(the `on' value, usually Yes)
+%#6 = !textsf(not used)
+%#7 = !textsf(set props and driver macros)
+%#8 = !textsf(every macros)
+%\end{Verbatim}
+% \begin{macrocode}
\def\annot@type@checkbox{checkbox}
\newcommand\check@@Box[8]{\begingroup
\let\nameuse\@nameuse\let\tops\texorpdfstring
@@ -3195,13 +3448,17 @@
\@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}
+% \hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{fld-name}}\darg{\ameta{wd}}^^A
+% \darg{\ameta{ht}}\darg{\ameta{on-value}}}
+% The user interface for creating a check box.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the check box field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(the `on value' or export value, the default is "Yes")
+%\end{Verbatim}
%\noindent The default for \cs{checkBox}
% \begin{macrocode}
\def\checkBoxDefaults{\F{\FPrint}\W{1}\S{S}\BC{0 0 0}}
@@ -3226,7 +3483,7 @@
% is available when \DescribeMacro\useNewRadiosOff\cmd{\useNewRadiosOff} is expanded. This is the default.
%
% When \DescribeMacro\useNewRadiosOn\cmd{\useNewRadiosOn} is expanded, the new code for radio buttons is used.
-% As a result, you need t\emph{hree compiles} to bring the AUX files up to date. The AUX files now
+% As a result, you need \emph{three compiles} to bring the AUX files up to date. The AUX files now
% contain PDF object references to radio buttons. Because this new scheme degrades the experience
% of creating radio buttons (heavy I/O usage), use this option if you and the consumers of your PDF\emph{ do not use}
% Adobe PDF viewers (on a desktop/laptop).
@@ -3287,38 +3544,33 @@
% \begin{macrocode}
\def\ef@NewRadiosLateOpts{%
% \end{macrocode}
-% We do nothing if the new scheme is not being used.
-% \begin{macrocode}
- \ifuseNewRadios
-% \end{macrocode}
% If this is a multi-group radio button field that work independently, we adjust the `on' value, as in this case,
% the `on' value is referenced by an index, 0, 1, 2,...
% \begin{macrocode}
- \@nameuse{multigroup@\Fld@name}%
- \ifx\ef@multigroupradios\ef@YES
- \ifpdfmarkup
- \def\eq@On{(\@nameuse{radioindex@\Fld@name}) cvn }\else
- \def\eq@On{/\@nameuse{radioindex@\Fld@name}}\fi
- \expandafter\ifx\csname OnVal@\Fld@name\endcsname\relax
- \@eqAS{Off}\else % today
- \ifnum\@nameuse{OnVal@\Fld@name}=%
- \@nameuse{radioindex@\Fld@name}\relax
- \@eqAS{\@nameuse{radioindex@\Fld@name}}\else\@eqAS{Off}\fi\fi
- \else
- \edef\x{\@nameuse{OnVal@\Fld@name}}%
- \ifx\x\ef@thisChoice\@eqAS{\@nameuse{OnVal@\Fld@name}}\else
- \@eqAS{Off}\fi
- \fi
+ \@nameuse{multigroup@\Fld@name}%
+ \ifx\ef@multigroupradios\ef@YES
+ \ifpdfmarkup
+ \def\eq@On{(\@nameuse{radioindex@\Fld@name}) cvn }\else
+ \def\eq@On{/\@nameuse{radioindex@\Fld@name}}\fi
+ \expandafter\ifx\csname OnVal@\Fld@name\endcsname\relax
+ \@eqAS{Off}\else % today
+ \ifnum\@nameuse{OnVal@\Fld@name}=%
+ \@nameuse{radioindex@\Fld@name}\relax
+ \@eqAS{\@nameuse{radioindex@\Fld@name}}\else\@eqAS{Off}\fi\fi
+ \else
+ \edef\x{\@nameuse{OnVal@\Fld@name}}%
+ \ifx\x\ef@thisChoice\@eqAS{\@nameuse{OnVal@\Fld@name}}\else
+ \@eqAS{Off}\fi
+ \fi
% \end{macrocode}
% If these are groups of radio button fields that light up in unison, we
% take to get the \cs{/AS} entry right.
% \begin{macrocode}
- \@nameuse{uniradios@\Fld@name}%
- \ifx\isRadiosInUnison\ef@YES
- \edef\x{\@nameuse{value@\Fld@name}}%
- \ifx\x\ef@thisChoice\expandafter\@eqAS
- \expandafter{\ef@thisChoice}\else\@eqAS{Off}\fi
- \fi
+ \@nameuse{uniradios@\Fld@name}%
+ \ifx\isRadiosInUnison\ef@YES
+ \edef\x{\@nameuse{value@\Fld@name}}%
+ \ifx\x\ef@thisChoice\expandafter\@eqAS
+ \expandafter{\ef@thisChoice}\else\@eqAS{Off}\fi
\fi
}
% \end{macrocode}
@@ -3359,6 +3611,18 @@
% \end{macrocode}
% Finally, we arrive at the low-level radio button command, where
% changes for the 2019/06/14 version have been made.
+%The arguments for this command are,
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the button field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(the `on' value, usually Yes)
+%#6 = !textsf(not used)
+%#7 = !textsf(set props and driver macros)
+%#8 = !textsf(every macros)
+%\end{Verbatim}
% \begin{macrocode}
\newcommand\radio@@Button[8]{\begingroup\let\#\ef@Hx
\let\nameuse\@nameuse\let\tops\texorpdfstring
@@ -3419,15 +3683,18 @@
\@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}
-%\noindent The default for \cs{radioButton}
+% \begin{macro}{\radioButton}\hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{fld-name}}\darg{\ameta{wd}}^^A
+% \darg{\ameta{ht}}\darg{\ameta{on-value}}}
+% User interface to creating a radio button.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the radio button field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(the `on value' or export value, the default is "Yes")
+%\end{Verbatim}
+%The default for \cs{radioButton}
% \begin{macrocode}
\def\radioButtonDefaults{\W{1}\S{S}\BC{0 0 0}\F{\FPrint}}
% \end{macrocode}
@@ -3472,6 +3739,17 @@
}
% \end{macrocode}
% The basic text field macro for constructing all other text fields.
+%The arguments for this command are,
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the button field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(not used)
+%#6 = !textsf(set props and driver macros)
+%#7 = !textsf(every macros)
+%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@text{textfld}
\newcommand\text@@Field[7]{\begingroup
@@ -3482,14 +3760,17 @@
\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}
-%\noindent The default for \cs{textField}
+% \begin{macro}{\textField}\hskip-\marginparsep
+% \texttt{[\ameta{options}]\darg{\ameta{fld-name}}\darg{\ameta{wd}}^^A
+% \darg{\ameta{ht}}} The user interface to creating a text field.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the text field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%\end{Verbatim}
+%\noindent The defaults for \cs{textField}
% \begin{macrocode}
\def\textFieldDefaults{\F{\FPrint}\BC{0 0 0}\W{1}\S{S}}
% \end{macrocode}
@@ -3536,6 +3817,17 @@
}
% \end{macrocode}
% The basic text field macro for constructing all other text fields.
+%The arguments for this command are,
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the button field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%#5 = !textsf(not used)
+%#6 = !textsf(set props and driver macros)
+%#7 = !textsf(every macros)
+%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@sig{sigfld}
\newcommand\sig@@Field[7]{\begingroup
@@ -3546,14 +3838,17 @@
\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}
-%\noindent Defaults for \cs{sigField}
+% \begin{macro}{\sigField}\hskip-\marginparsep
+% \texttt{[\ameta{options}]\darg{\ameta{fld-name}}\darg{\ameta{wd}}^^A
+% \darg{\ameta{ht}}} The user interface to creating a signature field.
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars=!(),codes={\catcode`\%=9}]
+%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
+%#2 = !textsf(the title of the text field)
+%#3 = !textsf(the width of the bounding rectangle)
+%#4 = !textsf(the height of the bounding rectangle)
+%\end{Verbatim}
+%Defaults for \cs{sigField}
% \begin{macrocode}
\def\sigFieldDefaults{\F{\FPrint}\BC{}\BG{}\W{1}\S{S}}
% \end{macrocode}
@@ -3568,7 +3863,7 @@
% \end{macrocode}
% \end{macro}
%
-% \section{Additional Link Support}
+% \section{Additional Link Support}\label{linkSupport}
%
% The links in \textsf{hyperref} are not sufficiently general to
% allow actions other than jumping. I've included a general link
@@ -3588,7 +3883,7 @@
% \end{macrocode}
% \cs{set@@Link} is the low-level link command and is the building block of all the
% other, more user-friendly link commands. Takes seven parameters:
-%\begin{enumerate}
+%\begin{enumerate}\sffamily
%\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.
@@ -3628,18 +3923,19 @@
\let\ef@colorthislink\relax\fi}
\AtBeginDocument{\setDef@ultLinkColor}
% \end{macrocode}
-% \begin{macro}{\setLink}
+% \begin{macro}{\setLink}\hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{text}}}
% \cs{setLink} is the basic high-level link command, it is used to surround text
% with a link annotation.
-% \begin{macro}{\setLinkText}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!~@},codes={\catcode`\%=9}]
+%\setLink[\A{\JS{this.pageNum=6;}}\Color{1 0 0}]{Go There!}
+%\end{Verbatim}
+% \begin{macro}{\setLinkText}\hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{text}}}
% \cs{setLinkText} is a synonym for \cs{setLink}.
-% \begin{macro}{\mlhypertext}
+% \begin{macro}{\mlhypertext}\hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{text}}}
% A command defined in the \pkg{aeb\_mlink} package.
-% \begin{macro}{\mlsetLink}
+% \begin{macro}{\mlsetLink}\hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{text}}}
% \cs{mlsetLink} expands to \cs{mlhypertext}
-%\begin{verbatim}
-% \setLink[\A{\JS{this.pageNum=6;}}\Color{1 0 0}]{Go There!}
-%\end{verbatim}
% \paragraph{Link Parameters.} These high-level links takes two parameters, one of which
% is optional.
%\begin{enumerate}
@@ -3723,12 +4019,13 @@
% \end{macro}
% \begin{macro}{\setLinkBbox}
% Set a link around a |\parbox|.
-%\begin{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%codes={\catcode`\%=9}]
%\setLinkBbox [\Color{1 0 0}}]{50bp}{30bp}[b]{\centering Press Me!}
-%\end{verbatim}
+%\end{Verbatim}
% \paragraph{Link Parameters.} There are four parameters, two of which
% are optional.
-%\begin{enumerate}
+%\begin{enumerate}\sffamily
%\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}.
@@ -3806,10 +4103,6 @@
% \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}
@@ -3829,7 +4122,7 @@
% \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}}
+ {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}}
\def\aeb@exiii{\expandafter\expandafter\expandafter}
\newtoks\ef@flagtoks
\newtoks\ef@jstoks
@@ -3847,25 +4140,25 @@
% \begin{macrocode}
\define@choicekey{eforms}{border}[\val\nr]{visible,invisible}
{%
- \ifcase\nr
+ \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{}%
+ \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
@@ -3874,62 +4167,66 @@
% \begin{macrocode}
\define@choicekey{eforms}{linewidth}[\val\nr]{thin,medium,thick}
{%
- \ifx\annot@type\annot@type@link
+ \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
+ \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
+ \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
+ \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
+ \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
+ \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
+ \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
+ \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\nr1\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
+ \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
@@ -3995,7 +4292,7 @@
% of the field can be set, such visibility, printability, readonly,
% orientation, captions (for button), values, default values, etc.
% can be set.
-%
+%\par\medskip\noindent
% 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
@@ -4004,19 +4301,19 @@
% locked, so the field cannot be moved through the UI.
% \begin{macrocode}
\define@key{eforms}{annotflags}[]{\ef@flagtoks={}%
- \setkeys{annotflags}{#1}}
+ \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
+ {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\@nameuse{\aeb@argii\noexpandiii}}%
+ \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
@@ -4024,40 +4321,39 @@
% 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.
+% by \pkg{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}}
+ \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
+ {{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\@nameuse{\aeb@argii\noexpandiii}}%
+ \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
+% \texttt{tooltip={\darg{\textsf{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
+% The default value\IndexKey{default}\IndexKey{defaultstyle} of a field (text, list, combo box) what is used
% when the field is reset. Example: \texttt{default=Name}
% \begin{macrocode}
\define@key{eforms}{default}{\@eqDV{#1}}
@@ -4111,14 +4407,7 @@
% 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
-}
+\define@key{eforms}{textcolor}{\@eqtextColor{#1}}
% \end{macrocode}
% Use \texttt{maxlength}\IndexKey{maxlength} to limit the number of characters input into a text field.
% Example: \texttt{maxlength=12}.
@@ -4133,43 +4422,44 @@
\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}{}
+ 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}{}
+ 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}{}
+ 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
+ \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}{}
+ \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
+% 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={}}}}
@@ -4180,10 +4470,10 @@
\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}}
+\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
@@ -4192,22 +4482,22 @@
% 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>>
- }%
+ \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}%
% \subsection{Miscellaneous keys}
@@ -4216,31 +4506,31 @@
% \begin{macrocode}
\define@choicekey{eforms}{autocenter}[\val\nr]{yes,no}
{%
- \ifcase\nr\relax\@eqautoCenter{y}\or
- \@eqautoCenter{n}\fi
+ \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
+ \ifcase\nr\relax\@eqinline{y}\or
+ \@eqinline{n}\fi
}{}
\define@choicekey{eforms}{mlfix}[\val\nr]{yes,no}
{%
- \ifcase\nr\relax\@eqmlfix{y}\or
- \@eqmlfix{n}\fi
+ \ifcase\nr\relax\@eqmlfix{y}\or
+ \@eqmlfix{n}\fi
}{}
\define@choicekey{eforms}{importicons}[\val\nr]{yes,no}
{%
- \ifcase\nr\relax\@eqimportIcons{y}\or
- \@eqimportIcons{n}\fi
+ \ifcase\nr\relax\@eqimportIcons{y}\or
+ \@eqimportIcons{n}\fi
}{}
\define@key{eforms}{mlstrut}[\strut]{\@eqmlstrut{#1}}
\define@key{eforms}{mlcrackat}[]{\@eqmlcrackat{#1}}
\define@key{eforms}{mlcrackinat}[]{\@eqmlcrackinsat{#1}}
\define@choicekey{eforms}{mlhyph}[\val\nr]{yes,no}
{%
- \ifcase\nr\relax\@eqmlhyph{y}\or
- \@eqmlhyph{n}\fi
+ \ifcase\nr\relax\@eqmlhyph{y}\or
+ \@eqmlhyph{n}\fi
}{}
% \end{macrocode}
% \changes{v2.10}{2019/03/16}{Added \string\cs{cmd} to optional args of forms}
@@ -4279,33 +4569,77 @@
\ef@temp@expand
}
% \end{macrocode}
-% \texttt{symbolchoice}\IndexKey{symbolchoice}is used with a checkbox or radio button field. This sets the symbol
+% \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}}{}
+ {check,circle,cross,diamond,square,star}
+ {\expandafter\@eqsymbolchoice\expandafter{\val}}{}
+% \end{macrocode}
+%\paragraph*{Set rectangle keys}
+%The dimensions of the bounding rectangle is generally passed to the widget
+%using required arguments; however, for \pkg{exerquiz}, those arguments are
+%not directly accessible. The \IndexKey{rectW}\key{rectW} and \IndexKey{rectH}\key{rectH}
+%may be used to pass the dimensions of the rectangle through the optional
+%optional argument of the field.
+% \begin{macrocode}
+\define@key{eforms}{rectW}{\@eqrectW{#1}}
+\define@key{eforms}{rectH}{\@eqrectH{#1}}
+% \end{macrocode}
+%\paragraph*{Resizing keys}
+%These keys resize the field while preserving the aspect ratio; these are
+%\IndexKey{width}\key{width}, \IndexKey{height}\key{height}, and \IndexKey{scalefactor}\key{scalefactor}
+% \begin{macrocode}
+\define@key{eforms}{width}{\@eqwidth{#1}}
+\define@key{eforms}{height}{\@eqheight{#1}}
+\define@key{eforms}{scalefactor}{\@eqscalefactor{#1}}
% \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.
+% as readonly (locked). The locked key controls that option.\medskip
%
-% 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}
+% {\noindent}The \texttt{lock}\IndexKey{lock} key is used with signature fields.
+% Typical entries, using \emph{raw PDF markup}, are,
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!~@},codes={\catcode`\%=9}]
+%lock={/Action/All} !% !textsf~lock all fields in the doc@
+%lock={/Action/Include !% !textsf~lock all fields listed in Fields@
+% /Fields [(field1)(field2)...]}
+%lock={/Action/Exclude !% !textsf~lock all fields not listed in Fields@
+% /Fields [(field1)(field2)...]}
+%\end{Verbatim}
+%Simplified syntax for UF key-values:
+%\changes{v2.3.6}{2020/10/10}{Addition support for the \string\texttt{lock} key}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!~@},codes={\catcode`\%=9}]
+%lock={action=all} !% !textsf~lock all fields in the doc@
+%lock={action=include,
+% fields={field1,field2,...}}!% !textsf~lock all fields listed in Fields@
+%lock={action=exclude,
+% fields{field1,field2,...}} !% !textsf~lock all fields not listed in Fields@
+%\end{Verbatim}
%
% \begin{macrocode}
-\define@key{eforms}{lock}{\@eqLock{#1}}
+\define@key{eforms}{lock}{\setkeys{lckflds}{#1}%
+ \ifx\lckFlds\@empty
+ \edef\ActnArgs{\noexpand\Action\noexpand\All}\else
+ \edef\ActnArgs{\noexpand\Action\expandafter
+ \noexpand\lckActnArg{\lckFlds}}\fi
+ \expandafter\@eqLock\expandafter{\ActnArgs}%
+}
+\define@choicekey{lckflds}{action}[\val\nr]{all,include,exclude}
+{%
+ \ifcase\nr\relax
+ \def\lckActnArg{\All}\or
+ \def\lckActnArg{\IncludeFields}\or
+ \def\lckActnArg{\ExcludeFields}\fi
+}{}
+\define@key{lckflds}{fields}{\def\lckFlds{#1}}
+\let\lckFlds\@empty
% \end{macrocode}
%
% Another option that is included in the Signed tab is titled ``This script executes
@@ -4344,18 +4678,13 @@
% 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
+ \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 }%
@@ -4364,25 +4693,21 @@
\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
+ \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
+ \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}%
+ \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)}%
+ \@eqA{/S/URI/URI(\ef@goto@url)}\else
+ \@eqA{/S/URI/URI(\ef@goto@url\#\ef@goto@openparams)}%
\fi
\fi
}
@@ -4458,7 +4783,7 @@
% \begin{macrocode}
\define@choicekey{efgoto}{open}[\val\nr]{userpref,new,existing}
{%
- \ifcase\nr\relax
+ \ifcase\nr\relax
\let\ef@open\@empty\or
\def\ef@open{/NewWindow true }\or
\def\ef@open{/NewWindow false }\fi
@@ -4479,20 +4804,20 @@
% (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
- }%
+ \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
@@ -4510,7 +4835,7 @@
% \begin{macrocode}
\define@choicekey{eflaunch}{open}[\val\nr]{userpref,new,existing}
{%
- \ifcase\nr\relax
+ \ifcase\nr\relax
\let\ef@launch@open\@empty\or
\def\ef@launch@open{/NewWindow true }\or
\def\ef@launch@open{/NewWindow false }\fi
@@ -4586,18 +4911,18 @@
% \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
+ {{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.
@@ -4612,13 +4937,9 @@
% \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}
+% Now bring in driver dependent macros that support form fields.
+% \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}
@@ -4746,7 +5067,7 @@
\fi
\fi
\fi
- \ef@NewRadiosLateOpts
+ \ifuseNewRadios\expandafter\ef@NewRadiosLateOpts\fi
\ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
\pdf@rect{\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}}%
\literalps@out{\AEB@psMrk
@@ -4988,7 +5309,7 @@
\fi
\fi
\fi
- \ef@NewRadiosLateOpts
+ \ifuseNewRadios\expandafter\ef@NewRadiosLateOpts\fi
\ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
\hbox{\pdfstartlink user{\common@RadioCode}%
\lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
@@ -5159,7 +5480,7 @@
\fi
\fi
\fi
- \ef@NewRadiosLateOpts
+ \ifuseNewRadios\expandafter\ef@NewRadiosLateOpts\fi
\ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi
\HyField@AdvanceAnnotCount
\setbox\pdfm@box=%
@@ -5262,42 +5583,42 @@
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;
- }
+ 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.");
+ 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);
diff --git a/macros/latex/contrib/acrotex/examples/jquiztst.pdf b/macros/latex/contrib/acrotex/examples/jquiztst.pdf
index 8bd66e99d1..d5ec97c6f8 100644
--- a/macros/latex/contrib/acrotex/examples/jquiztst.pdf
+++ b/macros/latex/contrib/acrotex/examples/jquiztst.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/examples/jtxttst.tex b/macros/latex/contrib/acrotex/examples/jtxttst.tex
index ed7b937fa7..4d78e08625 100644
--- a/macros/latex/contrib/acrotex/examples/jtxttst.tex
+++ b/macros/latex/contrib/acrotex/examples/jtxttst.tex
@@ -5,8 +5,6 @@
\usepackage{exerquiz}
\usepackage[indefIntegral]{dljslib}
-% \previewOn \pmpvOn
-
\title{Extending the Exerquiz Package Text Fill-in Questions}
\author{D. P. Story}
\subject{Sample file}
@@ -37,11 +35,11 @@ Department of Mathematics}
\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
+\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}%
@@ -51,59 +49,52 @@ Who was the first President\footnote{of the United States}?\
\end{oQuestion}
\medskip\noindent
-The command \cs{RespBoxTxt} is the one that creates a text
-fill-in question. Its syntax is
+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
+\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.
+ \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.
+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
+\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.
+ \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.)
+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
diff --git a/macros/latex/contrib/acrotex/examples/webeqtst.pdf b/macros/latex/contrib/acrotex/examples/webeqtst.pdf
index 98a1033a7d..7044adc54b 100644
--- a/macros/latex/contrib/acrotex/examples/webeqtst.pdf
+++ b/macros/latex/contrib/acrotex/examples/webeqtst.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/exerquiz.dtx b/macros/latex/contrib/acrotex/exerquiz.dtx
index d75879e090..a5c4c18451 100644
--- a/macros/latex/contrib/acrotex/exerquiz.dtx
+++ b/macros/latex/contrib/acrotex/exerquiz.dtx
@@ -22,7 +22,7 @@
%<randomize>\ProvidesFile{aebrandom.def}
%<sumrytbls>\ProvidesFile{aebsumrytbls.def}
%<template>\ProvidesFile{template.def}
-%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2020/03/14 v8.5.10 %
+%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2020/11/11 v8.5.11 %
%<package> Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
%<driver> Exerquiz documentation driver file (dps)]
%<aebjs> Exerquiz document level JavaScript (dps)]
@@ -4670,7 +4670,7 @@
% \end{macrocode}
% (2013/12/20) Pass \cs{bqlabelISO} through \cs{pdfstringdef}.
% \begin{macrocode}
- \def\fieldJSStr@CMD{\fieldJSStr*[noquotes]\bqlabelISO}%
+ \def\fieldJSStr@CMD{\flJSStr*[noquotes]\bqlabelISO}%
\expandafter\fieldJSStr@CMD\expandafter{\bqlabelISO}%
\ifx\@quiztype\@empty\gdef\@@quiztype{#1}\else
\xdef\@@quiztype{\@quiztype}\fi
@@ -8709,32 +8709,61 @@ if (!isQuizInitialized("@currQuiz")) {
\ifx\txtAltList\@empty\xdef\txtAltList{["#2",#1]}\else
\xdef\txtAltList{\jsTempArgs,["#2",#1]}\fi\@@argReadPC}
\def\@@argReadPC{\advance\eqtmpcnta\m@ne
- \ifnum\eqtmpcnta=\z@
- \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
+ \ifnum\eqtmpcnta=\z@
+ \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
+\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
+ \egroup
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\SpellCheck}\hskip-\marginparsep\texttt{[\ameta{options}]}
+% This command is designed to be used with text fill-in questions; the action of this button
+% allows the user to correct spelling, but it does record the number of initially misspelled words.
+% The placement of this field is after the text field (\cs{RespBoxTxt} or \cs{RespBoxTxtPC}) so
+% it can pick up on the field name. The root name of this field is \texttt{spl}. Two helper commands
+% are defined: \DescribeMacro{\splChkCA}\cmd{\splChkCA} and \DescribeMacro{\splChkTU}\cmd{\splChkTU}.
+% \changes{v8.5.11}{2020/11/11}{Added \string\cs{SpellCheck}}
+% \begin{macrocode}
+\def\afterSplChkActn#1{\def\@fterSplChkActn{\r #1}}
+\let\@fterSplChkActn\@empty
+\newcommand{\splChkCA}{Check}
+\newcommand{\splChkTU}{Check spelling}
+\newcommand\SpellCheck[1][]{%
+ \pushButton[\CA{\splChkCA}\TU{\splChkTU}\S{S}
+ #1\A{\JS{%
+ \ifx\grpquestions\eq@One
+ var targetFldName=%
+ "grpobj.\curr@quiz.\thequestionno.\thegrpquestionno";
+ \else
+ \ifx\annot@subtype\annot@subtype@rbe
+ var targetFldName="essay.\curr@quiz.\thequestionno";
+ \else
+ var targetFldName="obj.\curr@quiz.\thequestionno";
+ \fi
+ \fi\r
+ var splErrors=checkTheSpelling(targetFldName);\@fterSplChkActn
+ }}]{spl.\curr@quiz.\thequestionno}{}{11bp}}
+% \end{macrocode}
+% \end{macro}
%\subsection{Essay Fill-In}
% \begin{macro}{\RespBoxEssay}
% Here is a simple text field with a multi-line attribute for entering
@@ -8747,7 +8776,7 @@ if (!isQuizInitialized("@currQuiz")) {
% \string\RespBoxEssay[\ameta{opts}]*\darg{\ameta{wd}}\darg{\ameta{ht}}
% \end{quote}
% The second argument declares the problem has a \env{solution} file; we define the target
-% of the solution twh ways: an explicite \ameta{dest} string, or an star (\texttt*), where
+% of the solution twh ways: an explicit \ameta{dest} string, or an star (\texttt*), where
% the destination is automatically named. If you use \ameta{dest}, you must have
% a frist optional, even if its only \texttt{[]}, to correctly parse this construction.
% \changes{v8.3}{2019/08/13}{\string\env{solution} environment now defined for
@@ -8775,7 +8804,9 @@ if (!isQuizInitialized("@currQuiz")) {
}
}
% \RespBoxEssay[opt][dest]|*{wd}{ht}
-\newcommand\RespBoxEssay[1][]{\def\rbe@rgi{#1}\RespBoxEssay@i}
+\def\annot@subtype@rbe{rbe}
+\newcommand\RespBoxEssay[1][]{\edef\annot@subtype{\annot@subtype@rbe}%
+ \def\rbe@rgi{#1}\RespBoxEssay@i}
\def\RespBoxEssay@i{\@ifnextchar[%]
{\RespBoxEssay@ii}
{\@ifstar{\RespBoxEssay@ii[\curr@quiz.\thequestionno]}}%
@@ -10354,7 +10385,6 @@ var pi = Math.PI;
var replaceExclaim = \replaceexclaim;
var negPointsAllowed = \negpointsallowed;
var negPointsMarkupAllowed = \negpointsmarkupallowed;
-%var aQuizControl = new Array();
var aQuizControl = new Object;
var RightWrong=new Array();
var ProbValue = new Array();
@@ -11745,6 +11775,38 @@ function eqFilter(filterMethod) {
return this.toString();
}
}
+% \end{macrocode}
+% JavaScript support of spell checking command |\SpellCheck|
+% \changes{v8.5.11}{2020/11/11}{JavaScript support of spell checking command \string\cs{SpellCheck}}.
+% Returns the number of misspelled words, but allows user to to correct.
+% \begin{macrocode}
+function checkTheSpelling(targetFieldName) {
+ var spellChkCnt=0;
+% var thisName=event.target.name;
+% \end{macrocode}
+% The root name of the \cs{SpellCheck} field is \texttt{spl}. Here we replace
+% the root name with \texttt{obj} to get the field name of the previous \cs{RespBoxTxt(PC)}
+% field. For the \texttt{spell.checkWord()} method, \app{PDF-XChange Editor} returns \texttt{undefined}.
+% This (spell checking) is a AR/AA feature only.
+% \begin{macrocode}
+% var fName = "obj"+thisName.substring(3);
+% var f=this.getField(fName);
+% if (f==null) fName="grpobj"+thisName.substring(3);
+ var f=this.getField(targetFieldName);
+ var value=f.value;
+ var valueStrip = value.replace(/\s+/g,"");
+ if ( valueStrip != "" ) {
+ aBrk=value.split(/\s+/);
+ for (var i=0; i<aBrk.length; i++){
+ var word=aBrk[i];
+ var aRetnSC=spell.checkWord(word);
+ if (aRetnSC!=null) spellChkCnt++;
+ }
+ var corrdStr=spell.checkText(value);
+ f.value=corrdStr;
+ }
+ return spellChkCnt;
+}
\end{newsegment}
% \end{macrocode}
% \subsection{Multiple Choice Questions}
@@ -11836,12 +11898,12 @@ function InitializeQuiz(qtfield,mark) {
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]);
+ "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;
@@ -12439,6 +12501,12 @@ quizno,qtfield,pts,ppts) {
var retn = [ [ scoreThisProblem, passKey ], letterResponses ] ;
return retn;
}
+% \end{macrocode}
+% \leavevmode\IndexJS{LimitSelection}\hskip-\marginparsep\texttt{(\ameta{n},\ameta{fname},\ameta{index}}
+% This function supports the \cs{limitSelectionTo\darg{\ameta{n}}} command. The function determines
+% whether the user has chosen more than \ameta{n} in a MS choice field. The widget that activated this
+% function is \texttt{\ameta{fname}.\ameta{index}}.
+% \begin{macrocode}
function LimitSelection(n,fname,k) {
var f = this.getField(fname);
var g = f.getArray();
@@ -12941,6 +13009,9 @@ function qRadioButtonMCFI(key,qname,n) {
R\texorpdfstring{\'}{\string\351}ponses}
\renewcommand\eq@local@RC{Correctes}
\renewcommand\eq@local@AC{SVP !}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Pour cette question,
+ vous \u00EAtes autoris\'{e} \`{a} faire au plus "
+ + n + " s\'{e}lections."}
%</eqfr>
% \end{macrocode}
% \subsection{German}
@@ -13060,7 +13131,7 @@ function qRadioButtonMCFI(key,qname,n) {
+ " 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}{%
+\flJSStr*[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
@@ -13131,6 +13202,9 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@AC{%
V\texorpdfstring{\ae}{\string\346}r
s\texorpdfstring{\r}{\string\345}snill!}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"For dette sp\string\370rsm\string\345let
+ har du lov til \string\345 gj\string\370re p\string\345 det meste "
+ + n + " valg."}
%</eqno>
% \end{macrocode}
% \subsection{Dutch}
@@ -13219,6 +13293,8 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@CA{Corrigeer}
\renewcommand\eq@local@RC{Mijn Antwoorden!}
\renewcommand\eq@local@AC{AUB!}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Voor deze vraag mag je maximaal "
+ + n + " selecties maken."}
%</eqnl>
% \end{macrocode}
% \subsection{Spanish}
@@ -13304,6 +13380,9 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@CA{Correctas}
\renewcommand\eq@local@RC{Mis Respuestas!}
\renewcommand\eq@local@AC{Por Favor!}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Para esta pregunta,
+ se le permite hacer como m\'{a}ximo "
+ + n + " selecciones."}
%</eqes>
% \end{macrocode}
% \subsection{Italian}
@@ -13393,6 +13472,9 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@CA{Correggere}
\renewcommand\eq@local@RC{Le mie risposte!}
\renewcommand\eq@local@AC{Per favore!}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Per questa domanda,
+ \`{e} possibile effettuare al massimo "
+ + n + " selezioni."}
%</eqit>
% \end{macrocode}
% \subsection{Russian}
@@ -13483,12 +13565,9 @@ function qRadioButtonMCFI(key,qname,n) {
\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)
@@ -13693,6 +13772,9 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@AC{%
V\texorpdfstring{\ae}{\string\346}r
s\texorpdfstring{\r}{\string\345}god!}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Til dette sp\string\370rgsm\string\345l,
+ er du lov til at g\string\370re h\string\370jst "
+ + n + " valg."}
%</eqda>
% \end{macrocode}
% \subsection{Polish}
@@ -13779,6 +13861,9 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@RC{Moje odpowiedzi!}
\renewcommand\eq@local@AC{Prosze!}
%\renewcommand\eq@local@AC{Prosz\k{e}!}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Na to pytanie,
+ mo\u017Cesz dokona\u0107 co najwy\u017Cej "
+ + n + " wybor\string\363w."}
%</eqpo>
% \end{macrocode}
% \subsection{Finnish}
@@ -13840,6 +13925,9 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@CA{Oikein}
\renewcommand\eq@local@RC{Omat vastaukset!}
\renewcommand\eq@local@AC{Ole hyv\string\344!}}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"T\string\344h\string\344n
+ kysymykseen, voit tehd\string\344 enint\string\344\string\344n "
+ + n + " valintoja."}
%</eqfin>
% \end{macrocode}
% \subsection{catalan}
@@ -13925,6 +14013,9 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@CA{Correctes}
\renewcommand\eq@local@RC{Les meves Respostes!}
\renewcommand\eq@local@AC{Si us plau!}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Per a aquesta pregunta,
+ se li permet fer com a m\`{a}xim "
+ + n + " seleccions."}
%</eqcat>
% \end{macrocode}
%
@@ -14050,6 +14141,9 @@ function qRadioButtonMCFI(key,qname,n) {
+ "Kliknete-li na \\"Yes\\", uvidite spravnou odpoved, ale svou
stavajici odpoved na tuto otazku uz nebudete moct zmenit."
}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Pro tuto ot\string\341zku
+ m\u016F\u017Eete prov\'{e}st maxim\'{a}ln\u011B "
+ + n + " v\u00FDb\u0115ry."}
%</eqcz>
% \end{macrocode}
% \subsection{brazil}
@@ -14141,6 +14235,9 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@CA{Corretas}
\renewcommand\eq@local@RC{Minhas Respostas!}
\renewcommand\eq@local@AC{Por Favor!}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Pro tuto ot\string\341zku
+ m\u016F\u017Eete prov\'{e}st maxim\'{a}ln\u011B "
+ + n + " v\u00FDb\u0115ry."}
%</eqbr>
% \end{macrocode}
% \subsection{turkish}
@@ -14233,6 +14330,8 @@ function qRadioButtonMCFI(key,qname,n) {
\renewcommand\eq@local@CA{Dogru}
\renewcommand\eq@local@RC{Benim Cevaplar\protect\u0131m!}
\renewcommand\eq@local@AC{L\protect\374tfen!}
+\dlJSStr*[noquotes]{\limSelWarningMsg}{"Bu soru i\u00E7in, en fazla "
+ + n + " se\u00E7im yapmak i\u00E7in izin verilir."}
%</eqtr>
% \end{macrocode}
% \Finale
diff --git a/macros/latex/contrib/acrotex/insdljs.dtx b/macros/latex/contrib/acrotex/insdljs.dtx
index 12b507ce25..c94ec374a0 100644
--- a/macros/latex/contrib/acrotex/insdljs.dtx
+++ b/macros/latex/contrib/acrotex/insdljs.dtx
@@ -16,7 +16,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{insdljs}
-%<package> [2019/10/30 v2.4.8 Insert Document Level JavaScripts (dps)]
+%<package> [2020/07/09 v2.4.9 Insert Document Level JavaScripts (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -793,12 +793,15 @@
% \begin{macro}{\JS}
% \begin{macro}{\Named}
% A convenience command for writing JavaScript.
+% \changes{v2.4.9}{2020/07/09}{Added \string\Thread}
% \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}
+\providecommand{\Thread}[1]{/S/Thread/D(#1)}
+\providecommand{\URI}[1]{/S/URI/URI(#1)}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1884,7 +1887,7 @@
% \end{macrocode}
% Beginning with \pkg{insdljs} dated 2019/03/16, we solve an age-old problem with \app{dvips}: This problem
% is that is wraps code around to the next line, according to some unknown algorithm. Normally this is not
-% a problem, but occassionally it will wrap some JavaScript code that breaks the code. Solve this problem,
+% a problem, but occasionally it will wrap some JavaScript code that breaks the code. Solve this problem,
% we make the space character active, and replace it with \cs{pdfSP} (\cs{040}), which is octal for the space
% character. Now there are no free spaces for \app{dvips} to break the line at in the PS file. The feature
% is turned on by default, and may be turned off with \DescribeMacro\pdfSpacesOff\cs{pdfSpacesOff}
diff --git a/macros/latex/contrib/acrotex/web.dtx b/macros/latex/contrib/acrotex/web.dtx
index 473c39cc0e..b414e32cdc 100644
--- a/macros/latex/contrib/acrotex/web.dtx
+++ b/macros/latex/contrib/acrotex/web.dtx
@@ -1422,7 +1422,7 @@
%
%\medskip\noindent The parameters are:
%\begin{enumerate}
-% \item[]\texttt{[\#1]}: Optional argument that is passed to \cs{graphicx} package
+% \item[]\texttt{[\#1]}: Optional argument that is passed to \cs{includegraphics} command
% \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
@@ -4254,6 +4254,7 @@
or decrease the value of webfootskip.}\else
\fi
\fi
+ \InitLayout
}
\@onlypreamble\DeclarePageLayout
% \end{macrocode}