diff options
Diffstat (limited to 'macros/latex/contrib/acrotex/eforms.dtx')
-rw-r--r-- | macros/latex/contrib/acrotex/eforms.dtx | 88 |
1 files changed, 66 insertions, 22 deletions
diff --git a/macros/latex/contrib/acrotex/eforms.dtx b/macros/latex/contrib/acrotex/eforms.dtx index 1d51969496..bc21d96c72 100644 --- a/macros/latex/contrib/acrotex/eforms.dtx +++ b/macros/latex/contrib/acrotex/eforms.dtx @@ -16,7 +16,7 @@ %</copyright> %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{eforms} -%<package> [2020/11/20 v2.3.5 Provides general eforms support (dps)] +%<package> [2020/12/14 v2.4.1 Provides general eforms support (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12] @@ -33,6 +33,7 @@ \let\opt\texttt \let\app\textsf \let\key\texttt +\let\uif\textsf \def\visispace{\symbol{32}} \def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}} \def\meta#1{\textsl{\texttt{#1}}} @@ -1189,16 +1190,26 @@ \def\@eqDA#1{\def\eq@DA{#1}} \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% % \end{macrocode} -% \DescribeMacro{\textFont} PDF form font +% \DescribeMacro{\textFont} PDF form font. This is a simple assignment; we define +% \DescribeMacro{\textFontDefault}\cs{textFontDefault} to conveniently change the default font over +% all form fields, with the exception of checkboxes and radio button fields. The default +% is \uif{Helv}. +% \changes{v2.4.1}{2020/12/14}{Defined \string\cs{eqtextFontDefault}} % \begin{macrocode} \def\@eqtextFont#1{\def\eq@textFont{/#1}} -\def\eq@textFont{/Helv} +\def\textFontDefault#1{\def\eq@textFontDefault{#1} + \def\eq@textFont{/#1}} +\textFontDefault{Helv} % \end{macrocode} -% \DescribeMacro{\textSize} PDF form text size +% \DescribeMacro{\textSize} PDF form text size. This is a simple assignment; we define +% \DescribeMacro{\textSizeDefault}\cs{textSizeDefault} to conveniently change the default font size for all +% form fields, including checkboxes and radio buttons. The default is 9 (points). +% \changes{v2.4.1}{2020/12/14}{Defined \string\cs{eqtextSizeDefault}} % \begin{macrocode} \def\@eqtextSize#1{\def\eq@textSize{#1}} -\def\eq@textSizeDefault{9} -\edef\eq@textSize{\eq@textSizeDefault} +\def\textSizeDefault#1{\def\eq@textSizeDefault{#1} + \def\eq@textSize{#1}} +\textSizeDefault{9} % \end{macrocode} % \DescribeMacro{\RV} Rich text value %\changes{v2.5l}{2011/01/28}{% @@ -1266,8 +1277,6 @@ % of the combo box (only), the code below \cs{let}s \cs{eq@DV} to \cs{@empty} in enhanced % preview mode, for combo boxes only. % \begin{macrocode} -% \ifx\annot@type\annot@type@combobox -% \ifefpmpv\let\eq@DV\@empty\fi\fi \makespecialJS\fi\fi}\def\eq@DV{} % \end{macrocode} % \DescribeMacro{\nuDV} \cs{@eqnuDV} is the old definition of DV. This version does not @@ -2420,7 +2429,6 @@ % % \begin{macro}{\JS} % \begin{macro}{\Named} -% \begin{macro}{\URI} % \begin{macro}{\Next} % \begin{macro}{\toggleAttachmentsPanel} % Convenience commands for writing JavaScript and for executing named events. @@ -2439,7 +2447,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % When entering triggers into the AA dictionary, use these commands (all the ones of % the form \cs{AA<Name>}. These all have one argument, the action to take, usually % a JavaScript action. There is now a routine in the parsing of the AA dictionary @@ -3114,6 +3121,9 @@ \ef@pdfstrCLOpti} % \end{macrocode} % \subsubsection{List Box}\label{listbox} +% +%\changes{v2.4}{2020/11/28}{Allow \cs{list@@Box} to obey \string\cs{pdfStringsOn}} +% % The main list box code that can be used to build list box commands, such as % \cs{listBox}, defined below. Within % the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse} @@ -3131,7 +3141,10 @@ %\end{Verbatim} % \begin{macrocode} \def\annot@type@listbox{listbox} -\newcommand\list@@Box[8]{\begingroup +\bgroup\obeyspaces +\gdef\list@@Box{\begingroup\global\let =\pdfSP +\ef@sanitize@toks\list@@@Box}\egroup +\newcommand\list@@@Box[8]{\endgroup\begingroup \let\nameuse\@nameuse\let\tops\texorpdfstring \edef\annot@type{\annot@type@listbox}% \pdfstringdef\Fld@name{#2}\dl@paramlocal @@ -3177,6 +3190,9 @@ % \end{macrocode} % \end{macro} % \subsubsection{Combo Box}\label{combobox} +% +%\changes{v2.4}{2020/11/28}{Allow \cs{combo@@Box} to obey \string\cs{pdfStringsOn}} +% % Within the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse} % and \cs{tops} for \cs{texorpdfstring}. %\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small, @@ -3192,7 +3208,10 @@ %\end{Verbatim} % \begin{macrocode} \def\annot@type@combobox{combobox} -\newcommand\combo@@Box[8]{\begingroup +\bgroup\obeyspaces +\gdef\combo@@Box{\begingroup\global\let =\pdfSP +\ef@sanitize@toks\combo@@@Box}\egroup +\newcommand\combo@@@Box[8]{\endgroup\begingroup \let\nameuse\@nameuse\let\tops\texorpdfstring \edef\annot@type{\annot@type@combobox}% \@eqFf{\FfCombo}\pdfstringdef\Fld@name{#2}\dl@paramlocal @@ -3353,6 +3372,7 @@ % when setting the dimensions of this widget. Made the same % changes for all AcroForm elements and for linking. %} +%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{push@@Button} to support \string\cs{pdfSpacesOn}} %\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small, %commandchars=!(),codes={\catcode`\%=9}] %#1 = !textsf(optional, used to enter any modification of the appearance/actions) @@ -3365,15 +3385,19 @@ %\end{Verbatim} % \begin{macrocode} \def\annot@type@button{pushbtn} -\newcommand\push@@Button[7]{\begingroup - \let\nameuse\@nameuse\let\tops\texorpdfstring +\bgroup\obeyspaces +\gdef\push@@Button{\begingroup\global\let =\pdfSP +\ef@sanitize@toks\push@@@Button}\egroup +\newcommand\push@@@Button[7]{\endgroup\begingroup + \let\nameuse\@nameuse\let\tops\texorpdfstring% \edef\annot@type{\annot@type@button}% - \pdfstringdef\Fld@name{#2}\dl@paramlocal - \makeJSspecials\ef@preProcDefns + \pdfstringdef\Fld@name{#2}\dl@paramlocal% + \makeJSspecials\ef@preProcDefns% \def\eq@Ff{/Ff \FfPushButton}% \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% \eqf@setDimens{#3}{#4}% \@processEvery#7\end\noindent#5#6{#1}} + % \end{macrocode} % \begin{macro}{\pushButton} % \hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{fld-name}}\darg{\ameta{wd}}\darg{\ameta{ht}}} @@ -3410,6 +3434,7 @@ % The basic command for creating check boxes. For \emph{enhanced preview} we define % \DescribeMacro\pmpvMrk\cs{pmpvMrk\darg{mrk}}, which defines \cs{pmpv@mrk} that is eventually % used in the core of \cs{ef@Bbox}. +%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{check@@Box} to support \string\cs{pdfSpacesOn}} % \begin{macrocode} \def\pmpvMrk#1{\def\pmpv@mrk{#1}} \pmpvMrk{X} @@ -3427,7 +3452,10 @@ %\end{Verbatim} % \begin{macrocode} \def\annot@type@checkbox{checkbox} -\newcommand\check@@Box[8]{\begingroup +\bgroup\obeyspaces +\gdef\check@@Box{\begingroup\global\let =\pdfSP +\ef@sanitize@toks\check@@@Box}\egroup +\newcommand\check@@@Box[8]{\endgroup\begingroup \let\nameuse\@nameuse\let\tops\texorpdfstring \let\#\ef@Hx\edef\annot@type{\annot@type@checkbox}% \pdfstringdef\Fld@name{#2}\@eqAS{Off}\dl@paramlocal @@ -3493,6 +3521,7 @@ % Use the default setting (\cmd{\useNewRadiosOff}) when you will view the PDF in AA/AR and save it; otherwise, if the PDF is to be viewed in non-conforming % PDF readers, never having been saved using AA/AR, use the \cmd{\useNewRadiosOn} setting. % \changes{v2.3}{2019/06/14}{Rewrote radio buttons so they work in non-conforming PDF readers} +% \changes{v2.4}{2020/11/28}{Rewrite of \string\cs{radio@@Button} to support \string\cs{pdfSpacesOn}} % % \medskip\noindent\textbf{Discussion.} The default scheme is to create the radio buttons \begin{quote}\footnotesize % \cs{radioButton\darg{\ameta{name}}\darg{\ameta{width}}\darg{\ameta{height}}} ...\\ @@ -3626,7 +3655,10 @@ %#8 = !textsf(every macros) %\end{Verbatim} % \begin{macrocode} -\newcommand\radio@@Button[8]{\begingroup\let\#\ef@Hx +\bgroup\obeyspaces +\gdef\radio@@Button{\begingroup\global\let =\pdfSP +\ef@sanitize@toks\radio@@@Button}\egroup +\newcommand\radio@@@Button[8]{\endgroup\begingroup\let\#\ef@Hx \let\nameuse\@nameuse\let\tops\texorpdfstring \edef\annot@type{\annot@type@radio}% \pdfstringdef\Fld@name{#2}% @@ -3720,6 +3752,7 @@ % The template for a text field. Within % the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse} % and \cs{tops} for \cs{texorpdfstring}. +%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{text@@Field} to support \string\cs{pdfSpacesOn}} % \begin{macrocode} \def\common@TextFieldCode {% @@ -3754,7 +3787,10 @@ %\end{Verbatim} % \begin{macrocode} \def\annot@type@text{textfld} -\newcommand\text@@Field[7]{\begingroup +\bgroup\obeyspaces +\gdef\text@@Field{\begingroup\global\let =\pdfSP +\ef@sanitize@toks\text@@@Field}\egroup +\newcommand\text@@@Field[7]{\endgroup\begingroup \let\nameuse\@nameuse\let\tops\texorpdfstring \edef\annot@type{\annot@type@text}% \pdfstringdef\Fld@name{#2}\dl@paramlocal @@ -3802,6 +3838,7 @@ % The template for a signature field. Within % the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse} % and \cs{tops} for \cs{texorpdfstring}. +%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{sig@@Field} to support \string\cs{pdfSpacesOn}} % \begin{macrocode} \def\common@SigFieldCode {% @@ -3832,7 +3869,10 @@ %\end{Verbatim} % \begin{macrocode} \def\annot@type@sig{sigfld} -\newcommand\sig@@Field[7]{\begingroup +\bgroup\obeyspaces +\gdef\sig@@Field{\begingroup\global\let =\pdfSP +\ef@sanitize@toks\sig@@@Field}\egroup +\newcommand\sig@@@Field[7]{\endgroup\begingroup \let\nameuse\@nameuse\let\tops\texorpdfstring \edef\annot@type{\annot@type@sig}% \pdfstringdef\Fld@name{#2}\dl@paramlocal @@ -3871,6 +3911,7 @@ % allow actions other than jumping. I've included a general link % that increases the usage of the links provided by % \textsf{hyperref}. +%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{set@@Link} to support \string\cs{pdfSpacesOn}} % \paragraph{Common Link Code.} All the link commands eventually come back % to this template for constructing a link annotation. % \begin{macrocode} @@ -3896,7 +3937,10 @@ %\end{enumerate} % \begin{macrocode} \def\annot@type@link{link} -\newcommand\set@@Link[7]{\begingroup +\bgroup\obeyspaces +\gdef\set@@Link{\begingroup\global\let =\pdfSP +\ef@sanitize@toks\set@@@Link}\egroup +\newcommand\set@@@Link[7]{\endgroup\begingroup \let\nameuse\@nameuse\let\tops\texorpdfstring \dl@paramlocal \makeJSspecials @@ -4885,7 +4929,7 @@ % The \texttt{js}\IndexKey{js} key is used to execute JavaScript actions on a mouse up trigger. % The argument is a JavaScript text string: |js={app.alert("Hello World!"}|. % The value of \texttt{js} may be a macro containing JavaScript, which would include -% a macro created by the \texttt{defineJS} environment of \textsf{insdljs}. +% a macro created by the \env{defineJS} environment of \textsf{insdljs}. % \begin{macrocode} \define@key{eforms}{js}[]{\@eqA{\JS{#1}}} % \end{macrocode} |