From 2333de7fb01569c26536b61ac965337582f22343 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 30 Nov 2018 10:16:32 +0900 Subject: acrotex (30Nov) --- texmf-dist/doc/latex/acrotex/README.md | 5 +- texmf-dist/doc/latex/acrotex/aeb_man.pdf | Bin 1347884 -> 1339986 bytes texmf-dist/doc/latex/acrotex/eformman.pdf | Bin 1169604 -> 1099178 bytes texmf-dist/doc/latex/acrotex/eformman.tex | 19 +++- texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf | Bin 126992 -> 307087 bytes texmf-dist/doc/latex/acrotex/examples/jquiztst.tex | 2 + texmf-dist/source/latex/acrotex/eforms.dtx | 126 +++++++++++++++------ texmf-dist/source/latex/acrotex/exerquiz.dtx | 112 +++++++++++++----- texmf-dist/source/latex/acrotex/web.dtx | 4 +- texmf-dist/tex/latex/acrotex/aebdocfmt.def | 4 +- texmf-dist/tex/latex/acrotex/aebjs.def | 26 +---- texmf-dist/tex/latex/acrotex/aebrandom.def | 3 +- texmf-dist/tex/latex/acrotex/aebsumrytbls.def | 3 +- texmf-dist/tex/latex/acrotex/contsolns.def | 87 -------------- texmf-dist/tex/latex/acrotex/eforms.sty | 94 ++++++++++----- texmf-dist/tex/latex/acrotex/eqbr.def | 1 - texmf-dist/tex/latex/acrotex/eqcat.def | 1 - texmf-dist/tex/latex/acrotex/eqcolor.def | 1 - texmf-dist/tex/latex/acrotex/eqcz.def | 1 - texmf-dist/tex/latex/acrotex/eqda.def | 1 - texmf-dist/tex/latex/acrotex/eqde.def | 1 - texmf-dist/tex/latex/acrotex/eqes.def | 1 - texmf-dist/tex/latex/acrotex/eqexam.def | 2 +- texmf-dist/tex/latex/acrotex/eqfin.def | 1 - texmf-dist/tex/latex/acrotex/eqfr.def | 1 - texmf-dist/tex/latex/acrotex/eqit.def | 1 - texmf-dist/tex/latex/acrotex/eqnl.def | 1 - texmf-dist/tex/latex/acrotex/eqno.def | 1 - texmf-dist/tex/latex/acrotex/eqpo.def | 1 - texmf-dist/tex/latex/acrotex/eqru.def | 1 - texmf-dist/tex/latex/acrotex/eqtr.def | 1 - texmf-dist/tex/latex/acrotex/exerquiz.sty | 11 +- texmf-dist/tex/latex/acrotex/template.def | 3 +- texmf-dist/tex/latex/acrotex/uieforms.def | 5 + texmf-dist/tex/latex/acrotex/usemcfi.def | 1 - 35 files changed, 286 insertions(+), 236 deletions(-) delete mode 100644 texmf-dist/tex/latex/acrotex/contsolns.def (limited to 'texmf-dist') diff --git a/texmf-dist/doc/latex/acrotex/README.md b/texmf-dist/doc/latex/acrotex/README.md index b05e63eb..162d9c24 100644 --- a/texmf-dist/doc/latex/acrotex/README.md +++ b/texmf-dist/doc/latex/acrotex/README.md @@ -1,6 +1,6 @@ The AcroTeX eDucation Bundle Author: D. P. Story -Dated: 2018/08/16 +Dated: 2018-11-27 AeB contains the following: @@ -19,6 +19,9 @@ AeB contains the following: 6) Documentation for AeB (AcroTeX eDucatation Bundle) and eForms (including insdljs and dljslib). +What's New (2018/11/27) Some changes to eforms package to support the new icon-appr +package. + What's New (2018/08/16) Changes to eforms and insdljs: several keys (eforms) added to support aeb_mlink and annot_pro; switch add to insdljs to detect whether document JS has been included. diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.pdf b/texmf-dist/doc/latex/acrotex/aeb_man.pdf index a16c0c3b..36e63fe8 100644 Binary files a/texmf-dist/doc/latex/acrotex/aeb_man.pdf and b/texmf-dist/doc/latex/acrotex/aeb_man.pdf differ diff --git a/texmf-dist/doc/latex/acrotex/eformman.pdf b/texmf-dist/doc/latex/acrotex/eformman.pdf index 17818148..25815958 100644 Binary files a/texmf-dist/doc/latex/acrotex/eformman.pdf and b/texmf-dist/doc/latex/acrotex/eformman.pdf differ diff --git a/texmf-dist/doc/latex/acrotex/eformman.tex b/texmf-dist/doc/latex/acrotex/eformman.tex index 84b8b8ab..61d1606a 100644 --- a/texmf-dist/doc/latex/acrotex/eformman.tex +++ b/texmf-dist/doc/latex/acrotex/eformman.tex @@ -70,7 +70,7 @@ subject={Documentation for the eforms and insdljs packages}, talksite={\url{www.acrotex.net}}, version={2.0}, - prepared={2018/08/16}, + prepared={2018/11/27}, preparedLabel={Distribution Dated:}, keywords={LaTeX, hyperref, PDF, exercises, quizzes}, copyrightStatus=True, @@ -591,6 +591,8 @@ 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 push buttons created by +the \pkg{eforms} package. \subsubsection{Check Boxes}\label{CheckBoxes} @@ -645,6 +647,9 @@ command appears in the preamble of this document: \textColor{1 0 0} % text color } \end{Verbatim} +Refer to the \pkg{icon-appr} package to supply icon appearances to checkbox buttons created by +the \pkg{eforms} package. + \subsubsection{Radio Buttons}\label{RadioButtons} @@ -715,6 +720,8 @@ command appears in the preamble of this document: \symbolchoice{star} % check symbol } \end{Verbatim} +Refer to the \pkg{icon-appr} package to supply icon appearances to radio button fields created by +the \pkg{eforms} package. \subsection{Choice Fields} @@ -2201,18 +2208,21 @@ creation of icons as button appearances. In the latter PDF, PDF creator. \begin{itemize} \item[] -\settowidth{\aebdimen}{\ttfamily normappr=\anglemeta{string}} +\settowidth{\aebdimen}{\ttfamily importicons=\anglemeta{yes|no}} \def\1{\llap{\Cs{I}\hspace{\marginparsep}}}% \def\2{\llap{\Cs{RI}\hspace{\marginparsep}}}% \def\3{\llap{\Cs{IX}\hspace{\marginparsep}}}% +\def\4{\llap{\Cs{importIcons}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} !1normappr=!anglemeta(string) !2rollappr=!anglemeta(string) !3downappr=!anglemeta(string) +!4importicons=!anglemeta(!upshape(yes|no)) \end{dCmd} \item[]\CmdDescription The normal, rollover, and down appearances of the button face icon. The value of each key is an indirect reference to a form XObject. Normally, you can use the \texttt{graphicxsp} package -to embed graphics and give a symbolic name which is used as the value of these keys. +to embed graphics and give a symbolic name which is used as the value of these keys. \texttt{importIcons} +is a special key used in conjunction with importing icons using JavaScript methods. \item[] \settowidth{\aebdimen}{\ttfamily layout=labelonly|icononly|icontop|iconbottom|} @@ -3477,6 +3487,8 @@ RI? & (push buttons only) an indirect reference to a form XObject defining the buttons's \emph{rollover icon}&\verb+\RI{rIcon}+\newline(example)\\ IX? & (push buttons only) an indirect reference to a form XObject defining the buttons's \emph{down icon}&\verb+\I{dIcon}+\newline(example)\\ +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}}}} (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); @@ -3500,6 +3512,7 @@ FB? & \texttt{\darg{true|false}} (push buttons only; optional) The \emph{fit b Q? & \texttt{\darg{0|1|2|empty}} Quadding for text fields. Values are \texttt{0} (left-justified), \texttt{1} (centered), \texttt{2} (right-justified); e.g., \verb+\Q{1}+. &\verb+Q{}+\newline(left justified)\\ +\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.&\\ diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf index 1d9b17ab..7a3dff6c 100644 Binary files a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf and b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf differ diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex index 097882db..b3185c1c 100644 --- a/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex +++ b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex @@ -28,6 +28,7 @@ Department of Mathematics} \useEndQuizButton[\textColor{blue}] + % Uncomment this line to require the student % to answer all questions in the quiz before % the quiz is evaluated. @@ -160,6 +161,7 @@ Practice by typing in the answer: \edef\STRUT{\noexpand\rule[\ifxetex-1bp\else-5bp\fi]{0pt}{0pt}} \noindent$\dfrac{\text{d}}{\text{d}x} {(x^4 + 1)^{1/2}} = +\eqsanitize \underset{\text{\rotatebox{-45}{\rlap{The Response Box}}}} {\underbrace{\STRUT\efKern{1bp}{0bp}\RespBoxMath{2*x^3*(x^4+1)^(-1/2)}{4}{.0001}{[1,2]}\relax\efKern{1bp}{0bp}}}\kern-1bp \underset{\text{\rotatebox{-45}{\rlap{Answer Button}}}} diff --git a/texmf-dist/source/latex/acrotex/eforms.dtx b/texmf-dist/source/latex/acrotex/eforms.dtx index 8f5768ea..b7fecae8 100644 --- a/texmf-dist/source/latex/acrotex/eforms.dtx +++ b/texmf-dist/source/latex/acrotex/eforms.dtx @@ -16,7 +16,7 @@ % %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{eforms} -% [2018/08/16 v2.9.20 Provides general eforms support (dps)] +% [2018/11/27 v2.9.22 Provides general eforms support (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12] @@ -626,10 +626,24 @@ % \end{macrocode} % \DescribeMacro{\AP} Appearance dictionary, used mostly with check boxes % to define the `On' value. +% \changes{v2.9.21}{2018/11/10}{Modified \string\cs{@eqAP}, added two internal +% commands \string\cs{eq@@On} and \string\cs{eq@@Off}} +% Within \cs{@eqAP}, \DescribeMacro\Off\cs{Off} and \DescribeMacro\On\cs{On} are +% \cs{let} to \cs{eq@@Off} and \cs{eq@On} to make +% it `easy' to assign on and off values in the case of icon appearances. % \begin{macrocode} \def\@eqAP#1{\def\eq@arg{#1}\ifx\eq@arg\@empty - \let\eq@AP\@empty\else\def\eq@AP{/AP<<#1>>}\fi}% - \let\eq@AP\@empty + \let\eq@AP\@empty\else\let\Off\eq@@Off\let\On\eq@@On + \ifx\annot@type\annot@type@button + \let\N\eq@pb@N\else\let\N\eq@cbrb@N\fi + \edef\eq@AP{/AP<<#1>>}\fi}\let\eq@AP\@empty +\def\eq@pb@N#1{/N \ifpdf #1 \space 0 R\else + \ifxetex #1\else{#1}\fi\fi} +\def\eq@cbrb@N#1{/N <<#1>>} +\def\eq@@On#1#2{/#1 \ifpdf #2 \space 0 R\else + \ifxetex #2\else{#2}\fi\fi} +\def\eq@@Off#1{/Off \ifpdf #1 \space 0 R\else + \ifxetex #1\else{#1}\fi\fi} % \end{macrocode} % In the \texttt{AP} dictionary for checkboxes is the `On' value. % It is introduced into \texttt{AP} by passing a TeX parameter @@ -1192,49 +1206,74 @@ % \cs{eq@IconMK} is empty. % \begin{macrocode} \def\eq@define@IconMK{\def\eq@IconMK{\eq@I\eq@RI\eq@IX\eq@TP - /IF<<\eq@SW\eq@ST\eq@PA\eq@FB>>}} + /IF<<\eq@SW\eq@ST\eq@PA\eq@FB>>}} \let\eq@IconMK\@empty % \end{macrocode} % \DescribeMacro{\I} an indirect reference to a form XObject defining the % buttons's \emph{normal icon} % \changes{v2.9}{2016/05/09}{Modified \string\cs{I}, \string\cs{RI}, and % \string\cs{IX} to accommodate pdftex for null argument.} +% \changes{v2.9.21}{2018/11/10}{Modified \string\cs{@eqI}, \string\cs{@eqRI}, +% and \string\cs{@eqIX} in the case of pdftex} % \begin{macrocode} -\ifpdf\def\eq@relRef#1{0 0 R}\else %{#1\space 0 R} +\def\eq@relRef@null#1{0 0 R} +\ifluatex\def\eq@relRef#1{#1 \space 0 R}\else + \ifpdf\def\eq@relRef#1{#1\space 0 R}\else \ifxetex\def\eq@relRef#1{#1}\else - \def\eq@relRef#1{{#1}}\fi\fi + \def\eq@relRef#1{{#1}}\fi\fi\fi +\def\@eqimportIcons#1{\ifpdfmarkup\ifx\annot@type\annot@type@button + \def\ef@arg{#1}\ifx\ef@arg\ef@y + \ifx\eq@I\@empty\@eqI{null}\fi\fi\fi\fi} \def\ef@null{null} -\def\@eqI#1{\ifx\annot@type\annot@type@button - \def\eq@arg{#1}\ifx\eq@arg\@empty - \let\eq@I\@empty\else - \def\eq@I{/I \eq@relRef{#1}}% - \ifpdf\ifx\eq@arg\ef@null - \def\eq@I{/I 0 0 R}\fi\fi - \eq@define@IconMK\fi\fi} +\def\@eqI#1{% + \ifx\annot@type\annot@type@button + \def\eq@arg{#1}% + \ifx\eq@arg\@empty + \let\eq@I\@empty\else + \ifx\eq@arg\ef@null + \def\eq@I{/I \ef@null}\else + \def\eq@I{/I \eq@relRef{#1}}% + \fi + \fi + \eq@define@IconMK + \fi +} \def\eq@I{} % \end{macrocode} % \DescribeMacro{\RI} an indirect reference to a form XObject defining % the buttons's \emph{rollover icon} % \begin{macrocode} -\def\@eqRI#1{\ifx\annot@type\annot@type@button - \def\eq@arg{#1}\ifx\eq@arg\@empty - \let\eq@RI\@empty\else - \def\eq@RI{/RI \eq@relRef{#1}}% - \ifpdf\ifx\eq@arg\ef@null - \def\eq@RI{/RI 0 0 R}\fi\fi - \eq@define@IconMK\fi\fi} +\def\@eqRI#1{% + \ifx\annot@type\annot@type@button + \def\eq@arg{#1}% + \ifx\eq@arg\@empty + \let\eq@RI\@empty\else + \ifx\eq@arg\ef@null + \def\eq@RI{/RI \ef@null}\else + \def\eq@RI{/RI \eq@relRef{#1}}% + \fi + \fi + \eq@define@IconMK + \fi +} \def\eq@RI{} % \end{macrocode} % \DescribeMacro{\IX} an indirect reference to a form XObject defining % the buttons's \emph{down icon} % \begin{macrocode} -\def\@eqIX#1{\ifx\annot@type\annot@type@button - \def\eq@arg{#1}\ifx\eq@arg\@empty - \let\eq@IX\@empty\else - \def\eq@IX{/IX \eq@relRef{#1}}% - \ifpdf\ifx\eq@arg\ef@null - \def\eq@IX{/IX 0 0 R}\fi\fi - \eq@define@IconMK\fi\fi} +\def\@eqIX#1{% + \ifx\annot@type\annot@type@button + \def\eq@arg{#1}% + \ifx\eq@arg\@empty + \let\eq@IX\@empty\else + \ifx\eq@arg\ef@null + \def\eq@IX{/IX \ef@null}\else + \def\eq@IX{/IX \eq@relRef{#1}}% + \fi + \fi + \eq@define@IconMK + \fi +} \def\eq@IX{} % \end{macrocode} % \DescribeMacro{\TP} A code indicating the \texttt{layout} of the text and icon; these codes are @@ -1280,13 +1319,15 @@ % \begin{macrocode} \def\@eqmkIns#1{\def\eq@mkIns{#1}}\def\eq@mkIns{} % \end{macrocode} -% \paragraph*{Additional entries specific to choice fields:} \texttt{Opt, TI, I} +% \paragraph*{Additional entries specific to choice fields:} \texttt{Opt, TI, I}\par\medskip\noindent +% An array of options in the list % \begin{macrocode} -% an array of options in the list \def\@eqOpt#1{\def\eq@arg{#1}\ifx\eq@arg\@empty \let\eq@Opt\@empty\else\def\eq@Opt{/Opt [#1]}\fi} \def\eq@Opt{} -% for scrollable list boxes, the top index. +% \end{macrocode} +% For scrollable list boxes, the top index. +% \begin{macrocode} \def\@eqTI#1{\def\eq@arg{#1}\ifx\eq@arg\@empty \let\eq@TI\@empty\else\def\eq@TI{/TI #1}\fi} \def\eq@TI{} @@ -2607,8 +2648,15 @@ % \end{macrocode} % \end{macro} % \subsection{Button Fields}\label{button} -% Here is the field template for push button fields. +% Here is the field template for push button fields.\par\medskip\noindent +% +% (2018/11/10) \cs{eq@APX} determines if \cs{eq@I} is empty, if not we supply the normal appearance +% for the button to be the same appearance as set by \cs{eq@I}. +% \changes{v2.9.21}{2018/11/10}{Introduce \string\cs{eq@APX} an `intelligent' AP key} % \begin{macrocode} +\def\eq@APX{\ifx\eq@I\@empty\eq@AP\else + /AP<< \expandafter\get@NIR\eq@I\@nil\space>>\fi} +\def\get@NIR/#1 #2\@nil{/N #2} \def\common@pushButtonCode{% /Subtype/Widget /T (\Fld@name) @@ -2618,12 +2666,15 @@ \eq@H \eq@F /BS <<\eq@W\eq@S >> -\ifx\eq@AP\@empty +% \end{macrocode} +% (2018/11/10) Remove conditional \string\cs{eq@AP}, some PDF viewers +% use AP to build the normal appearance for buttons. +% \changes{v2.9.21}{2018/11/10}{Remove conditional \string\cs{eq@AP} +% in \string\cs{common@pushButtonCode}}. +% \begin{macrocode} /MK <<\eq@R\eq@BC\eq@BG% \ef@kvCA\ef@kvRC\ef@kvAC\eq@IconMK\eq@mkIns>> -\else - \eq@AP -\fi + \eq@APX /DA (\eq@DA) \eq@A\eq@AA \eq@rawPDF @@ -3617,6 +3668,11 @@ \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 +}{} \define@key{eforms}{mlstrut}[\strut]{\@eqmlstrut{#1}} \define@key{eforms}{mlcrackat}[]{\@eqmlcrackat{#1}} \define@key{eforms}{mlcrackinat}[]{\@eqmlcrackinsat{#1}} diff --git a/texmf-dist/source/latex/acrotex/exerquiz.dtx b/texmf-dist/source/latex/acrotex/exerquiz.dtx index 8ba26138..71fa5bb6 100644 --- a/texmf-dist/source/latex/acrotex/exerquiz.dtx +++ b/texmf-dist/source/latex/acrotex/exerquiz.dtx @@ -22,7 +22,7 @@ %\ProvidesFile{aebrandom.def} %\ProvidesFile{aebsumrytbls.def} %