From 17e285e7733468f00b6e8d096fdd7ffe818f09c8 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 11 Jun 2018 12:19:19 +0900 Subject: acrotex update --- texmf-dist/doc/latex/acrotex/README.md | 15 +- texmf-dist/doc/latex/acrotex/aeb_man.pdf | Bin 1312812 -> 1347425 bytes texmf-dist/doc/latex/acrotex/eformman.pdf | Bin 1118027 -> 1113952 bytes texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf | Bin 108684 -> 126992 bytes texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf | Bin 99808 -> 113792 bytes texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf | Bin 204281 -> 215958 bytes texmf-dist/source/latex/acrotex/dljslib.dtx | 251 ++- texmf-dist/source/latex/acrotex/doc/aeb_man.tex | 368 +++- texmf-dist/source/latex/acrotex/doc/eformman.tex | 395 ++-- texmf-dist/source/latex/acrotex/eforms.dtx | 501 ++++- texmf-dist/source/latex/acrotex/eforms.ins | 1 + texmf-dist/source/latex/acrotex/exerquiz.dtx | 2025 +++++++++++++------- texmf-dist/source/latex/acrotex/insdljs.dtx | 10 +- texmf-dist/source/latex/acrotex/web.dtx | 12 +- texmf-dist/tex/latex/acrotex/aebjs.def | 260 ++- texmf-dist/tex/latex/acrotex/aebrandom.def | 6 +- texmf-dist/tex/latex/acrotex/aebsumrytbls.def | 5 +- texmf-dist/tex/latex/acrotex/altadbfncs.def | 3 +- texmf-dist/tex/latex/acrotex/dljscc.def | 2 +- texmf-dist/tex/latex/acrotex/dljslib.sty | 170 +- texmf-dist/tex/latex/acrotex/edvipdfm.def | 2 +- texmf-dist/tex/latex/acrotex/eforms.sty | 102 +- texmf-dist/tex/latex/acrotex/epdfmark.def | 10 +- texmf-dist/tex/latex/acrotex/epdftex.def | 2 +- texmf-dist/tex/latex/acrotex/eqbr.def | 3 +- texmf-dist/tex/latex/acrotex/eqcat.def | 3 +- texmf-dist/tex/latex/acrotex/eqcolor.def | 3 +- texmf-dist/tex/latex/acrotex/eqcz.def | 3 +- texmf-dist/tex/latex/acrotex/eqda.def | 3 +- texmf-dist/tex/latex/acrotex/eqde.def | 3 +- texmf-dist/tex/latex/acrotex/eqes.def | 3 +- texmf-dist/tex/latex/acrotex/eqexam.def | 364 ++-- texmf-dist/tex/latex/acrotex/eqfin.def | 3 +- texmf-dist/tex/latex/acrotex/eqfr.def | 3 +- texmf-dist/tex/latex/acrotex/eqit.def | 3 +- texmf-dist/tex/latex/acrotex/eqnl.def | 3 +- texmf-dist/tex/latex/acrotex/eqno.def | 3 +- texmf-dist/tex/latex/acrotex/eqpo.def | 3 +- texmf-dist/tex/latex/acrotex/eqru.def | 3 +- texmf-dist/tex/latex/acrotex/eqtr.def | 3 +- texmf-dist/tex/latex/acrotex/exerquiz.sty | 1164 +++++++---- texmf-dist/tex/latex/acrotex/insdljs.sty | 6 +- texmf-dist/tex/latex/acrotex/pdfdochex.def | 278 +++ texmf-dist/tex/latex/acrotex/setcorder.def | 2 +- texmf-dist/tex/latex/acrotex/template.def | 5 +- texmf-dist/tex/latex/acrotex/uieforms.def | 15 +- texmf-dist/tex/latex/acrotex/usemcfi.def | 3 +- texmf-dist/tex/latex/acrotex/web.sty | 2 +- texmf-dist/tex/latex/acrotex/webpro.def | 2 +- texmf-dist/tex/latex/acrotex/websec.def | 2 +- 50 files changed, 4296 insertions(+), 1732 deletions(-) create mode 100644 texmf-dist/tex/latex/acrotex/pdfdochex.def (limited to 'texmf-dist') diff --git a/texmf-dist/doc/latex/acrotex/README.md b/texmf-dist/doc/latex/acrotex/README.md index 2ccde140..d071003e 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: 2017-03-20 +Dated: 2018/03/22 AeB contains the following: @@ -19,6 +19,19 @@ AeB contains the following: 6) Documentation for AeB (AcroTeX eDucatation Bundle) and eForms (including insdljs and dljslib). +What's New (2018/03/22) Changes in eforms to support features of aeb_mlink. Minor bug fixes + +What's New (2018/02/13) Added commands to optionally group each solution when the appear +at the end of the file; this applies both exercises and quizzes. + +What's New (2017/09/06) Suggested new problem type: "Correcting a math problem", see +http://www.acrotex.net/blog/?p=1335 for a demo. Better compatibility with luatex. Minor +bug fixes. + +What's New (2017-08-08) Support for multi-letter variables, alternate appearances, +and interval repetition. The demo file for these features is +http://www.acrotex.net/blog/?p=1330 + I maintain a web site featuring TeX/LaTeX/PDF stuff called AcroTeX (www.math.uakron.edu/~dpstory/acrotex.html). There you will find the home web page of the AcroTeX eDucation Bundle. diff --git a/texmf-dist/doc/latex/acrotex/aeb_man.pdf b/texmf-dist/doc/latex/acrotex/aeb_man.pdf index 239d1abb..6d28abb5 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 07744799..ae903f9b 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/examples/jquiztst.pdf b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf index 71cc9934..1d9b17ab 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/jtxttst.pdf b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf index 3fea2a8c..2d034bfd 100644 Binary files a/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf and b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf differ diff --git a/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf index a82dca64..b86521f4 100644 Binary files a/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf and b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf differ diff --git a/texmf-dist/source/latex/acrotex/dljslib.dtx b/texmf-dist/source/latex/acrotex/dljslib.dtx index cb974275..9d1d1dfe 100644 --- a/texmf-dist/source/latex/acrotex/dljslib.dtx +++ b/texmf-dist/source/latex/acrotex/dljslib.dtx @@ -2,7 +2,7 @@ %<*copyright> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% dljsLib.sty package, %% -%% Copyright (C) 2001-2016 D. P. Story %% +%% Copyright (C) 2001-2018 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -14,7 +14,7 @@ % %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{dljslib} -% [2014/10/05 v2.0 Manage a Library of Document Level JavaScripts (dps)] +% [2017/08/11 v2.1 Manage a Library of Document Level JavaScripts (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref} @@ -49,6 +49,8 @@ % \InputIfFileExists{aebdonotindex.def}{\PackageInfo{dljslib}{Inputting aebdonotindex.def}} % {\PackageInfo{dljslib}{aebdonotindex.def cannot be found}} % +% \changes{v2.1}{2017/08/11}{Corresponding to exerquiz v8.0, dljslib is modified to +% conform to multi-letter variables.} % \changes{v1.3}{2005/08/27}{Added new user contributed routines for unordered, % interval, point and factored responses. Added a feature whereby you % can create a file called libcusopt.opt to declare your own options @@ -151,6 +153,7 @@ % \textsf{dvipdfm}. % % \begin{macrocode} +\RequirePackage{exerquiz}[2017/08/04] \RequirePackage{insdljs} % \end{macrocode} % After inputting \textsf{insdljs}, we define |\setdecimalpoint|, which populates @@ -265,15 +268,18 @@ var dljslib = true; \fi \begin{library@holding}{equations} \begin{newsegment}{dljslib: Equation Handling} -function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVar,oComp) +function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp) { if (!ProcessIt) return null; ok2Continue = true; var success; var fieldname = event.target.name; - var UserAns = event.value; % \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) % \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; var CorrExpressions = CorrAns.split("="); var zCorrAns = "("+CorrExpressions[0]+")-("+CorrExpressions[1] +")"; UserAns = stripWhiteSpace (UserAns); @@ -334,13 +340,13 @@ function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVar,oComp) zUserAns = ParseInput(zUserAns); if (!ok2Continue) return null; % convert vars to new format, if needed - indepVar = TypeParameters(indepVar); - var lambda = getNonZeroRatio (domain, indepVar, zCorrAns, zUserAns); + indepVars = TypeParameters(indepVars); + var lambda = getNonZeroRatio (domain, indepVars, zCorrAns, zUserAns); if ( lambda == null ) { eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; }; if ( !ok2Continue ) return notifyField(false, flag, fieldname); zCorrAns = lambda + "*(" + zCorrAns + ")"; - success=randomPointCompare (n,domain,indepVar,epsilon, + success=randomPointCompare (n,domain,indepVars,epsilon, zCorrAns,zUserAns,comp) if ( success == null ) { eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; } @@ -419,7 +425,7 @@ function getNonZeroRatio (_a, _v, _F, _G) \fi \begin{library@holding}{vectors} \begin{newsegment}{dljslib: Vector Handling} -function ProcVec (flag,CorrAns,n,epsilon,domain,indepVar,oComp) +function ProcVec (flag,CorrAns,n,epsilon,domain,indepVars,oComp) { % \end{macrocode} % This function attempts to process questions that have vectors @@ -498,7 +504,7 @@ typeof oComp.priorParse != "undefined" ) { return null; } // convert to new format, if needed - indepVar = TypeParameters(indepVar); + indepVars = TypeParameters(indepVars); for (i=0; i7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; UserAns = stripWhiteSpace(UserAns); CorrAns = stripWhiteSpace(CorrAns); if (!ok2Continue) return null; @@ -594,7 +605,7 @@ function ProcRespSetNum(flag,CorrAns,n,epsilon,domain,indepVar,oComp) return notifyField(false, flag, fieldname); for ( var i=0; i< aCorrAns.length; i++) { var retn = _ProcResp(% -flag,aCorrAns[i],aUserAns[i],n,epsilon,domain,indepVar,oComp); +flag,aCorrAns[i],aUserAns[i],n,epsilon,domain,indepVars,oComp); if ( retn == -1 ) return null; if ( retn == null ) return syntaxError(), null; numCorrect += (retn) ? 1 : 0; @@ -649,12 +660,17 @@ function formatAsVector() { %\end{verbatim} % \end{flushleft} % \begin{macrocode} -function ProcRespSetSym(flag,CorrAns,n,epsilon,domain,indepVar,oComp) +function ProcRespSetSym(flag,CorrAns,n,epsilon,domain,indepVars,oComp) { ok2Continue = true; if (!ProcessIt) return null; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; UserAns = stripWhiteSpace(UserAns); CorrAns = stripWhiteSpace(CorrAns); if (!ok2Continue) return null; @@ -674,7 +690,7 @@ function ProcRespSetSym(flag,CorrAns,n,epsilon,domain,indepVar,oComp) var retn=ck4Braces(UserAns); if (retn==null) return null; var aUserAns = UserAns.split(","); - var _V = indepVar.split(","); + var _V = indepVars.split(","); for ( var _i=0; _i < _V.length; _i++) { eval ( "var "+ _V[_i] + " = \"" + _i + "\";"); } @@ -691,8 +707,8 @@ function ProcRespSetSym(flag,CorrAns,n,epsilon,domain,indepVar,oComp) for ( var _i=0; _i < aCorrAns.length; _i++) { try { if (isNaN(eval(aCorrAns[_i]))) - return eqAppAlert( - "Author error, recheck your code",3), null; + return eqAppAlert(% +"Author error, recheck your code",3), null; aCorrAns[_i] = eval(aCorrAns[_i]); } catch(e) { return eqAppAlert( "Author error, recheck your code",3), null; } @@ -722,11 +738,16 @@ flag,aCorrAns[_i],aUserAns[_i],n,epsilon,"[0,1]","i:_x",oComp); % \emph{ordered} list of expressions. % \begin{macrocode} function ProcRespListFormula(flag,CorrAns,n,epsilon,domain,% -indepVar,oComp) { +indepVars,oComp) { ok2Continue = true; if (!ProcessIt) return null; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; UserAns = stripWhiteSpace(UserAns); CorrAns = stripWhiteSpace(CorrAns); if (!ok2Continue) return null; @@ -748,7 +769,7 @@ indepVar,oComp) { UserAns = UserAns.replace(/,+/g, ","); UserAns = UserAns.replace(/,$/, ""); UserAns = UserAns.replace(/^,/, ""); - event.value = UserAns; +% event.value = UserAns; % dps17 CorrAns = stripWhiteSpace(CorrAns); if (!ok2Continue) return null; var aUserAns = UserAns.split(","); @@ -758,7 +779,7 @@ indepVar,oComp) { return notifyField(false, flag, fieldname); for ( var i=0; i< aCorrAns.length; i++) { var retn =_ProcResp(flag,aCorrAns[i],aUserAns[i],% -n,epsilon,domain,indepVar,oComp); +n,epsilon,domain,indepVars,oComp); if ( retn == -1 ) return null; if ( retn == null ) return syntaxError(), null; numCorrect += (retn) ? 1 : 0; @@ -785,11 +806,16 @@ n,epsilon,domain,indepVar,oComp); %\end{flushleft} % \begin{macrocode} function ProcRespSetFormula(flag,CorrAns,n,epsilon,% -domain,indepVar,oComp) { +domain,indepVars,oComp) { ok2Continue = true; if (!ProcessIt) return null; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; UserAns = stripWhiteSpace(UserAns); CorrAns = stripWhiteSpace(CorrAns); if (!ok2Continue) return null; @@ -811,7 +837,7 @@ domain,indepVar,oComp) { UserAns = UserAns.replace(/,+/g, ","); UserAns = UserAns.replace(/,$/, ""); UserAns = UserAns.replace(/^,/, ""); - event.value = UserAns; +% event.value = UserAns; % dps17 CorrAns = stripWhiteSpace(CorrAns); if (!ok2Continue) return null; var aUserAns = UserAns.split(","); @@ -823,7 +849,7 @@ domain,indepVar,oComp) { match = 0; for ( var j=i; j< aUserAns.length; j++) { var retn = _ProcResp(% -flag,aCorrAns[i],aUserAns[j],n,epsilon,domain,indepVar,oComp); +flag,aCorrAns[i],aUserAns[j],n,epsilon,domain,indepVars,oComp); if ( retn == -1 ) return null; if ( retn == null ) return syntaxError(), null; if (retn==1) { @@ -883,17 +909,22 @@ flag,aCorrAns[i],aUserAns[j],n,epsilon,domain,indepVar,oComp); function cis(x,i) { return Math.cos(x) + i*Math.sin(x); } JSfCustom.push("cis"); JSf = JSf.concat(JSfBuiltIn, JSfCustom); -function ProcRespComplex(flag,CorrAns,n,epsilon,domain,indepVar,oComp) +function ProcRespComplex(flag,CorrAns,n,epsilon,domain,indepVars,oComp) { if (!ProcessIt) return null; ok2Continue = true; var i, success; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; CorrAns = stripWhiteSpace (CorrAns); UserAns = stripWhiteSpace (UserAns); // sets ok2Continue if ( !ok2Continue ) return null; - indepVar+="i"; + indepVars+="i"; domain+="x[0,1]"; % \end{macrocode} % We don't support powers of i @@ -957,10 +988,10 @@ function ProcRespComplex(flag,CorrAns,n,epsilon,domain,indepVar,oComp) % \begin{macrocode} UserAns = ParseInput(UserAns); CorrAns = ParseInput(CorrAns); - indepVar = TypeParameters(indepVar); + indepVars = TypeParameters(indepVars); if (!ok2Continue) return null; success=randomPointCompare( - n,domain,indepVar,epsilon,CorrAns,UserAns,comp); + n,domain,indepVars,epsilon,CorrAns,UserAns,comp); if ( success == null ) { eqAppAlert(% \eqSyntaxErrorUndefVar,3); return null; } return notifyField(success, flag, fieldname); @@ -975,11 +1006,16 @@ function ProcRespComplex(flag,CorrAns,n,epsilon,domain,indepVar,oComp) %\end{verbatim} % \begin{macrocode} function ProcRespListComplex(flag,CorrAns,n,epsilon,% -domain,indepVar,oComp) { +domain,indepVars,oComp) { ok2Continue = true; if (!ProcessIt) return null; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; UserAns = stripWhiteSpace(UserAns); CorrAns = stripWhiteSpace(CorrAns); // sets ok2Continue if ( !ok2Continue ) return null; @@ -999,7 +1035,7 @@ domain,indepVar,oComp) { UserAns = UserAns.replace(/,+/g, ","); UserAns = UserAns.replace(/,$/, ""); UserAns = UserAns.replace(/^,/, ""); - event.value = UserAns; +% event.value = UserAns; % dps17 var aUserAns = UserAns.split(","); var aCorrAns = CorrAns.split(","); if ( aUserAns.length != aCorrAns.length ) @@ -1008,10 +1044,10 @@ domain,indepVar,oComp) { var match = 0; for ( var i=0; i< aCorrAns.length; i++) { match = 0; - event.value = aUserAns[i]; - var retn = ProcRespComplex( - flag,aCorrAns[i],n,epsilon,domain,indepVar,oComp); - event.value = UserAns; +% event.value = aUserAns[i]; % dps17 + var retn = ProcRespComplex(% +flag,aCorrAns[i],n,epsilon,domain,indepVars,oComp,aUserAns[i]); +% event.value = UserAns; dps17 if ( retn == null ) return null; numCorrect += (retn) ? 1 : 0; } @@ -1028,11 +1064,16 @@ domain,indepVar,oComp) { %\end{verbatim} % \begin{macrocode} function ProcRespSetComplex(flag,CorrAns,n,epsilon,% -domain,indepVar,oComp) { +domain,indepVars,oComp) { ok2Continue = true; if (!ProcessIt) return null; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; UserAns = stripWhiteSpace(UserAns); CorrAns = stripWhiteSpace(CorrAns); // sets ok2Continue if ( !ok2Continue ) return null; @@ -1064,10 +1105,10 @@ domain,indepVar,oComp) { for ( var i=0; i< aCorrAns.length; i++) { match = 0; for ( var j=i; j< aUserAns.length; j++) { - event.value = aUserAns[j]; +% event.value = aUserAns[j]; dps17 var retn = ProcRespComplex(% -flag,aCorrAns[i],n,epsilon,domain,indepVar,oComp); - event.value = UserAns; +flag,aCorrAns[i],n,epsilon,domain,indepVars,oComp,aUserAns[j]); +% event.value = UserAns; dps17 if ( retn == null ) return null; if (retn==1) { var temp=aUserAns[j]; @@ -1144,8 +1185,14 @@ function changeArgs4Cis(str) { % a problem posed by David Arnold.} % \begin{macrocode} var bNotifyWrngNumEntries=\satisfyEqNotify; -function ProcRespEvalEq(flag,CorrAns,n,epsilon,domain,indepVar,oComp){ - var retn=_ProcRespEvalEq(true,flag,CorrAns,n,epsilon,indepVar); +function ProcRespEvalEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp){ +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% dps17 + var UserAns=(arguments.length>7)?arguments[7]:event.value; + var retn=_ProcRespEvalEq(true,flag,CorrAns,n,epsilon,% +indepVars,UserAns); return retn; } % \end{macrocode} @@ -1153,18 +1200,29 @@ function ProcRespEvalEq(flag,CorrAns,n,epsilon,domain,indepVar,oComp){ % all entries to be nonzero. % \begin{macrocode} function ProcRespEvalEqNonZero(flag,CorrAns,n,epsilon,% -domain,indepVar,oComp) { - var retn=_ProcRespEvalEq(false,flag,CorrAns,n,epsilon,indepVar); +domain,indepVars,oComp) { +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% dps17 + var UserAns=(arguments.length>7)?arguments[7]:event.value; + var retn=_ProcRespEvalEq(false,flag,CorrAns,n,epsilon, +indepVars,UserAns); return retn; } % \end{macrocode} % \begin{macrocode} -function _ProcRespEvalEq(allowzero,flag,CorrAns,n,epsilon,indepVar) +function _ProcRespEvalEq(allowzero,flag,CorrAns,n,epsilon,indepVars) { ok2Continue = true; if (!ProcessIt) return null; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>6); // dps17 + var UserAns=(bSubstVars)?arguments[6]:event.value; UserAns = stripWhiteSpace(UserAns); if (!ok2Continue) return null; if ( (UserAns.charAt(0) != "\(") || % @@ -1182,7 +1240,7 @@ function _ProcRespEvalEq(allowzero,flag,CorrAns,n,epsilon,indepVar) return eqAppAlert(\eqNonzeroEntries,3), null; } catch(e) { return syntaxError(), null; } } - var _v = TypeParameters(indepVar); + var _v = TypeParameters(indepVars); var _V = _v.split(","); // e.g. _V[0] = "i:x" var _n = _V.length; if ( aUserAns.length != _n) { @@ -1211,21 +1269,38 @@ function _ProcRespEvalEq(allowzero,flag,CorrAns,n,epsilon,indepVar) % The \texttt{CorrAns} parameter is of the form \texttt{n\_pairs; F-G} % \begin{macrocode} function ProcRespEvalEqList(flag,CorrAns,n,epsilon,domain,% -indepVar,oComp) { - var retn=_ProcRespEvalEqList(true,flag,CorrAns,n,epsilon,indepVar); +indepVars,oComp) { +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% dps17 + var UserAns=(arguments.length>7)?arguments[7]:event.value; + var retn=_ProcRespEvalEqList(true,flag,CorrAns,n,epsilon,% +indepVars,UserAns); return retn; } function ProcRespEvalEqListNonZero(flag,CorrAns,n,epsilon,domain,% -indepVar,oComp){ - var retn=_ProcRespEvalEqList(false,flag,CorrAns,n,epsilon,indepVar); +indepVars,oComp){ +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% dps17 + var UserAns=(arguments.length>7)?arguments[7]:event.value; + var retn=_ProcRespEvalEqList(false,flag,CorrAns,n,epsilon,% +indepVars,UserAns); return retn; } -function _ProcRespEvalEqList(allowzero,flag,CorrAns,n,epsilon,indepVar) +function _ProcRespEvalEqList(allowzero,flag,CorrAns,n,epsilon,indepVars) { ok2Continue = true; if (!ProcessIt) return null; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>6); // dps17 + var UserAns=(bSubstVars)?arguments[6]:event.value; UserAns = stripWhiteSpace(UserAns); if (!ok2Continue) return null; var success; @@ -1255,7 +1330,7 @@ function _ProcRespEvalEqList(allowzero,flag,CorrAns,n,epsilon,indepVar) % \begin{macrocode} if (l > aUserAns.length ) return eqAppAlert(\eqTooFewEntries,3), null; - var _v = TypeParameters(indepVar); + var _v = TypeParameters(indepVars); var _V = _v.split(","); // e.g. _V[0] = "i:x" % \end{macrocode} % \texttt{\_n} is the number of variables @@ -1389,23 +1464,28 @@ return syntaxError(), null; % this is named \texttt{ProcRespNumsDe}. % \begin{macrocode} function ProcRespNumsDe (flag,CorrAns,n,epsilon,% -domain,indepVar,oComp) { +domain,indepVars,oComp) { if (!ProcessIt) return null; ok2Continue = true; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; % \end{macrocode} % This is the only change over the \texttt{ProcResp}, we call % \texttt{\_ProcRespNumsDe}. % \begin{macrocode} var success = _ProcRespNumsDe(flag,CorrAns,UserAns,n,% -epsilon,domain,indepVar,oComp); +epsilon,domain,indepVars,oComp); if ( success == -1 || !ok2Continue ) return null; if ( success == null ) { return syntaxError(), null; } return notifyField(success, flag, fieldname); } function _ProcRespNumsDe(flag,CorrAns,UserAns,n,epsilon,% -domain,indepVar,oComp) { +domain,indepVars,oComp) { ok2Continue = true; CorrAns = ParseInput(CorrAns); if (!ok2Continue) { @@ -1447,9 +1527,9 @@ domain,indepVar,oComp) { return -1; } UserAns = ParseInput(UserAns); - indepVar = TypeParameters(indepVar); + indepVars = TypeParameters(indepVars); if (!ok2Continue) return null; - var success=randomPointCompare(n,domain,indepVar,% + var success=randomPointCompare(n,domain,indepVars,% epsilon,CorrAns,UserAns,comp); if ( success && (typeof(oComp)=="object") % && (typeof(oComp.postParse)!="undefined") ) @@ -1514,16 +1594,21 @@ epsilon,CorrAns,UserAns,comp); % parsing and error feedback.} % \begin{macrocode} \begin{newsegment}{dljslib: Contrib - Processing Factors as Responses} -function ProcRespFactors(flag,CorrAns,n,epsilon,domain,indepVar,oComp) +function ProcRespFactors(flag,CorrAns,n,epsilon,domain,indepVars,oComp) { ok2Continue = true; if (!ProcessIt) return null; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; UserAns = stripWhiteSpace(UserAns); if (!ok2Continue) return null; var retn = _ProcResp(flag,CorrAns,UserAns,n,epsilon,% -domain,indepVar,oComp); +domain,indepVars,oComp); if ( retn == -1 ) return null; if ( retn == null ) return syntaxError(), null; if ( retn == 0 ) { @@ -1555,7 +1640,7 @@ the proper form"); match = 0; for ( var j=i; j< aUserAns.length; j++) { var retn = _ProcResp(flag,aCorrAns[i],aUserAns[j],% -n,epsilon,domain,indepVar,oComp); +n,epsilon,domain,indepVars,oComp); if ( retn == -1 ) return null; if ( retn == null ) return syntaxError(), null; if (retn==1) { @@ -1566,7 +1651,7 @@ n,epsilon,domain,indepVar,oComp); } else { var retn = _ProcResp(flag,aNegCorrAns[i],aUserAns[j],% -n,epsilon,domain,indepVar,oComp); +n,epsilon,domain,indepVars,oComp); if ( retn == -1 ) return null; if ( retn == null ) return syntaxError(), null; if (retn==1) { @@ -1729,14 +1814,19 @@ function getFactorArray(str) { %\end{flushleft} % \begin{macrocode} \begin{newsegment}{dljslib: Contrib - Processing a Point Response} -function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVar,oComp) +function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVars,oComp) { if (!ProcessIt) return null; ok2Continue = true; var i, success, truthCnt=1; var aScalar, scalar = 1; var fieldname = event.target.name; - var UserAns = event.value; +% \end{macrocode} +% Modified for multi-letter variables: remove one line, insert two. (2017/08/09) +% \begin{macrocode} +% var UserAns = event.value; + var bSubstVars=(arguments.length>7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; UserAns = stripWhiteSpace (UserAns); // sets ok2Continue CorrAns = stripWhiteSpace(CorrAns); if ( !ok2Continue ) return null; @@ -1801,7 +1891,7 @@ function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVar,oComp) eqAppAlert(\pointErrorMsgiii,3); return null; } - indepVar = TypeParameters(indepVar); + indepVars = TypeParameters(indepVars); for (i=0; i7); // dps17 + var UserAns=(bSubstVars)?arguments[7]:event.value; UserAns = stripWhiteSpace(UserAns); CorrAns = stripWhiteSpace(CorrAns); if (!ok2Continue) return null; UserAns = UserAns.replace(/inf/g, "x"); CorrAns = CorrAns.replace(/inf/g, "x"); - indepVar = "x"; + indepVars = "x"; domain="[0,1]"; var aUserAns = UserAns.split("U"); var aCorrAns = CorrAns.split("U"); @@ -1912,12 +2007,12 @@ function ProcRespIntervals(flag,CorrAns,n,epsilon,domain,indepVar,oComp) if (aCorrInt[0] == aUserInt[0]) matchparts+=1; if (aCorrInt[3] == aUserInt[3]) matchparts+=1; var retn1 = _ProcResp(flag,aCorrInt[1],aUserInt[1],% -n,epsilon,domain,indepVar,oComp); +n,epsilon,domain,indepVars,oComp); if (retn1 == -1 ) return null; if (retn1 == null) return syntaxError(), null; if (retn1 == 1) matchparts+=1; var retn2 = _ProcResp(flag,aCorrInt[2],aUserInt[2],% -n,epsilon,domain,indepVar,oComp); +n,epsilon,domain,indepVars,oComp); if (retn2 == -1 ) return null; if (retn2 == null) return syntaxError(), null; if (retn2 == 1) matchparts+=1; diff --git a/texmf-dist/source/latex/acrotex/doc/aeb_man.tex b/texmf-dist/source/latex/acrotex/doc/aeb_man.tex index 55eef8df..d379907c 100644 --- a/texmf-dist/source/latex/acrotex/doc/aeb_man.tex +++ b/texmf-dist/source/latex/acrotex/doc/aeb_man.tex @@ -14,10 +14,17 @@ \usepackage{longtable,colortbl} \usepackage{graphicx} \usepackage{multicol} +\usepackage{collectbox} + +\newbox\aebbox \usepackage{acroman} \usepackage[active]{srcltx} +\setcounter{secnumdepth}{4} +\setcounter{tocdepth}{4} + + \def\AcroBlog{{Acro\!\TeX} Blog} \makeatletter @@ -219,10 +226,10 @@ \university{{\AcroT} Software Development Team} \email{dpstory@acrotex.net} \versionLabel{Dated:} -\version{2017/03/16} +\version{2018/03/01} \copyrightyears{1999-\the\year} \nocopyright -\prepared{2017/03/20} +\prepared{2018/03/22} \revisionLabel{Distribution Dated:} \copyrightStatus{True} @@ -305,7 +312,7 @@ function indefCompare(a,b,c,F,G) { \part{Forward} -\newtopic For the past several years (this year is 2016), I've been writing a book +\newtopic For the past several years (this year is \the\year), I've been writing a book titled, \begin{quote} \AEBBook. @@ -323,10 +330,10 @@ the features by studying the DTX documentation of the program files. Sorry, it took me three years to write the book, I don't want to spend another year on this documentation. \verb!:-{)! -As noted in the part of this manual titled \textbf{\nhnameref{eq2db}} on -page~\pageref{eq2db}, I've set up two websites that highlight the server-side -scripts developed for the book (and available on the accompanying CD-ROM). -You are invited to visit them and comment on them, if the spirit moves. +As noted in \textbf{\nhnameref{eq2db}} on page~\pageref{eq2db}, I've set up a +website that highlights the server-side scripts developed for the book (and +available on the accompanying CD-ROM). You are invited to visit them and +comment on them, if the spirit moves. \begin{flushright} Dr. D. P. Story\\[3pt] @@ -4690,6 +4697,16 @@ 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. +\subsubsection{Grouping the solutions at end}\label{ss:grpEx} + +Historically, solutions to exercises appearing at the end of the file +\emph{are not grouped}. This means that a color change or a definition made +in one solution, for example, may affect all subsequent solutions. + +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} @@ -5668,6 +5685,17 @@ 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} + +Historically, solutions to quizzes (created by the \env{shortquiz} and +\env{quiz} environments) appearing at the end of the file \emph{are not +grouped}. This means that a color change or a definition made in one solution +may affect all subsequent solutions. + +You can now declare \cs{makeQzSolnsLocalOn} or \cs{makeQzSolnsLocalOff} +anywhere in the document to turn on grouping for all quizzes that follow, or +to turn off this feature again. The default is \cs{makeQzSolnsLocalOff}. + \subsection{Redesigning the \texorpdfstring{\protect\texttt{shortquiz}}{shortquiz} Environment}\label{sss:redefinesq} @@ -7630,8 +7658,9 @@ The code for the above example is \noindent The \cs{RespBoxMath} need not appear in math mode. The definition of the \cs{redpoint} command, a command written for this document follows. \begin{Verbatim}[xleftmargin=\amtIndent] -\newcommand\redpoint{\par\removelastskip\vskip\medskipamount\noindent - \makebox[\parindent][l]{\large\color{red}$\blacktriangleright$}} +\newcommand\redpoint{\par\removelastskip\vskip\medskipamount + \noindent\makebox[\parindent][l]{\large + \color{red}$\blacktriangleright$}} \end{Verbatim} \newtopic You can also pose multivariate questions as well, for example @@ -7693,14 +7722,60 @@ of the section below and see the demo file \texttt{integer\_test.tex} to demonstrate the new method for specifying variables, found in the \texttt{dljslib\_examples} folder. -%\item[\ttfamily\#3 :] An optional parameter, \textit{delimited by parentheses}, -%that defines the independent variable; \texttt{x}, is the default value. Note -%that this parameter is set of by parentheses. +\textbf{Multi-letter variables.} Beginning with v8.0 (2017/08/08) support for +multi-letter variables and appearance replacement is added. Within the +\texttt{\#3}, use the following notation: +\begin{Verbatim}[xleftmargin=\amtIndent] +(x\rpl{alpha}{y}z) +\end{Verbatim} +This declares three variables, \texttt{x}, \texttt{alpha}, and \texttt{z}. +What in fact is taking place is that \texttt{alpha} is replaced by \texttt{y} +and processing continues from there. + +\textbf{Alternate appearances.} Additionally, there is now a scheme for +replacing the variables with alternate appearances. +\begin{Verbatim}[xleftmargin=\amtIndent] +(x\rpl{alpha->\\u03B1}{y}z) +\end{Verbatim} +The arrow notation (\texttt{->}) tells \pkg{exerquiz} to replace +\texttt{alpha} with the unicode character \verb~\u03B1~ (note the double +backslash above), which is the Greek letter alpha ($\alpha$). You can +separate the variables with commas and use the type specification as well. +But as noted above, use either the old style (no commas) or the new style +(with commas), \emph{never mix the two together in one argument.} + +Below is a simple example of multi-letter variables with appearance replacement. Enter +\texttt{alpha} for $\alpha$ and \texttt{theta} for $\theta$. +\begin{oQuestion}{oQ2} +\begin{equation*} + \dfrac{\partial}{\partial\theta}\alpha \sin(\theta)= + \RespBoxMath[\rectW{1.5in}]{alpha cos(theta)}(\rpl{alpha->\\u03B1}{x}\rpl{theta->\\u03B8}{y}) + {3}{0.0001}{[0,3.14]x[0,3.14]} +\end{equation*} +\end{oQuestion} +The verbatim listing for this question follows: +\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small] +\begin{oQuestion}{oQ2} +\begin{equation*} + \dfrac{\partial}{\partial\theta}\alpha \sin(\theta)= + \RespBoxMath[\rectW{1.5in}] + {alpha cos(theta)} + (\rpl{alpha->\\u03B1}{x}\rpl{theta->\\u03B8}{y}) + {3}{0.0001}{[0,3.14]*2} +\end{equation*} +\end{oQuestion} +\end{Verbatim} + +\exAeBBlogPDF{p=1330} See the file +\texttt{\href{\urlAcroTeXBlog/?p=1330}{ml-vars.pdf}} for a demonstration of +multi-letter variables and alternate appearances. + \item[\ttfamily\#4 :] Optional, a named destination to the solution to the -question. There are two forms: the \texttt{[mydest]} an explicit destination for the solution to the problem, or -a `\texttt*', in which case, the name is -\texttt{[\string\curr@quiz.\string\thequestionno]} is automatically assigned. + question. There are two forms: the \texttt{[mydest]} an explicit + destination for the solution to the problem, or a `\texttt*', in which + case, the name is \texttt{[\string\curr@quiz.\string\thequestionno]} is + automatically assigned. If this parameter appears, a solution must follow the question, enclosed in a \texttt{solution} environment. @@ -7708,20 +7783,46 @@ question, enclosed in a \texttt{solution} environment. \item[\ttfamily\#5 :] The number of samples points to be used, usually 3 or 4 is sufficient. -\item[\ttfamily\#6 :] Precision required, a \emph{non-negative} ``$\epsilon$'' value, if you will. If the precision -is set to zero, \texttt{reldiffCompare} is used as the default compare, and the precision -is set to a small positive value, \text{1E-14}, by default. The small value is may reset with -\cs{defaultRDPrecision}. The default definition, \verb!\defaultRDPrecision{1E-14}!. - -\item[\ttfamily\#7 :] Parameters \#7 and \#8 are used to define the interval from -which to draw the sample points. There are two forms: (1) \#7 is the left-hand endpoint -of the interval and \#8 is the right-hand endpoint (the use of \#7 and \#8 in this form -is deprecated); (2) the interval is defined by standard interval notation, \texttt{[a,b]}. -For a multivariate question---one where parameter \#2 lists more than one variable, -separate the intervals for each variable by a `\texttt{x}', \texttt{[0,2]x[1,2]x[3,4]}. -\item[\ttfamily\#8 :] (1) \#8 is the right-hand endpoint of the interval (the use of this -parameter is deprecated); (2) in the second -case, \#8 is not used. +\item[\ttfamily\#6 :] Precision required, a \emph{non-negative} + ``$\epsilon$'' value, if you will. If the precision is set to zero, + \texttt{reldiffCompare} is used as the default compare, and the precision + is set to a small positive value, \text{1E-14}, by default. The small + value is may reset with \cs{defaultRDPrecision}. The default definition, + \verb!\defaultRDPrecision{1E-14}!. + +\item[\ttfamily\#7 :] Parameters \#7 and \#8 are used to define the interval + from which to draw the sample points. There are two forms: (1) \#7 is the + left-hand endpoint of the interval and \#8 is the right-hand endpoint + (the use of \#7 and \#8 in this form is deprecated); (2) the interval is + defined by standard interval notation, \texttt{[a,b]}. For a multivariate + question---one where parameter \#2 lists more than one variable---separate + the intervals for each variable by a `\texttt{x}', + \texttt{[0,2]x[1,2]x[3,4]}. + + +\textbf{Interval repetition.} Beginning with v8.0 (2017/08/08), +\pkg{exerquiz} allows \emph{interval repetition}. It is not unusual that the +cartesian product of the same interval is needed, eg, +\texttt{[0,1]x[0,1]x[0,1]}; rather than typing those repetitive interval +specifications, you can simple use the notation \texttt{[0,1]*3}. The general +syntax for an interval is now \texttt{\ameta{interval}*\ameta{num}}; the +`\texttt{*\ameta{num}}' portion is optional, \ameta{num} is an positive +integer. Note that `\texttt{*\ameta{num}}' follows the interval +specification, this is \emph{vitally important} for the correct parsing of +the expression. + +The notation may be mixed in with additional interval + specifications; thus, for example, `\texttt{[0,1]*3x[1,2]x[2,3]*2}' expands to + `\texttt{[0,1]x[0,1]x[0,1]x[1,2]\penalty0x\penalty0[2,3]x[2,3]}'. + +\exAeBBlogPDF{p=1330} See the file +\texttt{\href{\urlAcroTeXBlog/?p=1330}{ml-vars.pdf}} for a demonstration of +interval repetition. + + +\item[\ttfamily\#8 :] (1) \#8 is the right-hand endpoint of the interval (the + use of this parameter is deprecated); (2) in the second case, \#8 is not + used. \item[\ttfamily\#9 :]\label{paraRespBoxNine} This optional parameter is the name of a customized comparison function. @@ -8580,7 +8681,7 @@ code of this example, as well as more technical details of the All form elements have a first optional parameter for modifying their appearance, and they have an associated ``every'' command for global modifications as well. -\begingroup +\begin{center} \setlength{\extrarowheight}{1mm} \setlength{\tabcolsep}{2mm} \begin{longtable}{|>{\ttfamily}l|>{\PBS\raggedright}p{.5\linewidth}|} @@ -8615,9 +8716,8 @@ and they have an associated ``every'' command for global modifications as well. \cs{RespBoxTxt}&\cs{everyRespBoxTxt}\\ \cs{CorrAnsButton}&\cs{everyCorrAnsButton} \end{longtable} -\par\endgroup +\end{center} -\bigskip \handpoint In additional to these, there are other ``every'' commands that effect the appearance of the various buttons and text fields. The two commands \cs{everyCorrButtonField} and \cs{every\-eqText\-Field} are executed before every @@ -8631,6 +8731,169 @@ in appearance. modify a field using the optional first argument, and how to use the ``every'' mechanism. +\subsection{Inserting additional action and format scripts}\label{ss:AddActScripts} + +Global changes in \emph{appearance}, as just discussed, is accomplished using +any of the \cs{every\ameta{cmdname}} family of commands; however, that device +cannot, by design, change any of the actions \pkg{exerquiz} has defined. +S everal key-value pairs are used to insert JavaScript code into response +boxes, multiple choice, and multiple selection fields. +\settowidth{\aebdimen}{\cs{addToAction*\darg{\ameta{key}}\darg{\ameta{code}}}}% +\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} +\AddAAFormat{!ameta(code)} +\AddAAKeystroke{!ameta(code)} +\AddAAMouseUpMC{!ameta(code)} +\AddAAMouseUpMS{!ameta(code)} +\setActionKeys{!ameta(KV-pairs)} +\addToAction*{!ameta(key)}{!ameta(code)} +\end{dCmd} +\newtopic +The command \cs{setActionKeys} is a special command used to process the +KV-pairs of the \pkg{eforms} package. It only accepts these four keys: +\cs{AddAAFormat}, \cs{AddAAKeystroke}, \cs{AddAAMouseUpMC}, and +\cs{AddAAMouseUpMC}. + + +\begin{description} + \item[\cs{AddAAFormat\darg{\ameta{code}}}] This is an \pkg{eforms} KV, + discussed an some detail on page~\pageref{para:ProcRespSetNum} that can be + specified in the optional argument of any response boxes to affect the + field locally, or globally through the \cs{setActionKeys} command. + \item[\cs{AddAAKeystroke\darg{\ameta{code}}}] Text fields have a keystroke + event (or trigger) that executes JavaScript each time a keystroke is + made into the field. The \pkg{exerquiz} key \cs{AddAAKeystroke} adds + its argument (\ameta{code}) to the keystroke event of all response boxes + (\cs{RespBoxMath}, \cs{RespBoxTxt}, and \cs{RespBoxTxtPC}). + + To distinguish between \env{shortquiz} (and \env{oQuestions}) and + \env{quiz} environments, use the methods explained below in the + description of the \cs{AddAAMouseUpMC} key. + + Should you want code that is specialized to these individual types, you can use + some internal macros to distinguish these three cases. +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!(),fontsize=\small] +\setActionKeys{\AddAAKeystroke{% + \ifx\annot@subtype\annot@subtype@rbm!ameta(rbm-code)\else + \ifx\annot@subtype\annot@subtype@rbt!ameta(rbt-code)\else + \ifx\annot@subtype\annot@subtype@rbtpc!ameta(rbtpc-code)\fi + \fi\fi}} +\end{Verbatim} + Within the argument of \cs{setActionKeys} the character `\texttt{@}' is an ordinary letter, + so it can be used freely. + + Within this keystroke event, script executed prior this additional + \ameta{code} defines a JavaScript variable \texttt{retn}, which has a value + of \texttt{true} (if the response is judged correct), \texttt{false} (if + the response is judged incorrect), or \texttt{null} (if there is a syntax + error). The \ameta{code} may use this variable. + + \item[\cs{AddAAMouseUpMC\darg{\ameta{code}}}] This key adds its + \ameta{code} to the mouse up event of items (\cs{Ans}) of a multiple + choice (MC) question. Both \env{shortquiz} and \env{quiz} environments + are affected. + + You can distinguish between the \env{shortquiz} and \env{quiz} + environments by comparing \cs{eqQuizType} with \cs{isSQZ} or \cs{isQZ}. + For example, +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\setActionKeys{\AddAAMouseUpMC{% + \if\eqQuizType\isQZ!ameta(qz-code)\else!ameta(sqz-code)\fi}} +\end{Verbatim} + + \item[\cs{AddAAMouseUpMS\darg{\ameta{code}}}] This key adds its + \ameta{code} to the mouse up event of items (\cs{Ans}) of a multiple + selection (MS) question. Both \env{shortquiz} and \env{quiz} + environments are affected. As with \cs{AddAAMouseUpMC}, distinguish + between the environments \env{shortquiz} and \env{quiz} by comparing + \cs{eqQuizType} with \cs{isSQZ} or \cs{isQZ}, as shown above. +\end{description} + In the case of both \cs{AddAAMouseUpMC} and \cs{AddAAMouseUpMS}, you + can distinguish between a correct response and an incorrect response + using the command \cs{Ans@choice}, which expands to 1 when correct + alternative (radio button or check box) is pressed, and expands to 0 + otherwise. For example, +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\setActionKeys{\AddAAMouseUpMC{% + \if\Ans@choice1!ameta(true-code)\else!ameta(false-code)\fi}} +\end{Verbatim} +\cs{AddAAKeystroke}, \cs{AddAAMouseUpMC}, and \cs{AddAAMouseUpMC} don't work +as local arguments of \cs{RespBoxMath}, \cs{RespBoxTxt}, and +\cs{RespBoxTxtPC}; however, \cs{AddAAFormat} can be passed within the option +list of these response box commands, the local option command over rights the +global command. + +Remove any of the actions earlier declared by passing the empty argument, +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\setActionKeys{\AddAAMouseUpMC{}} +\end{Verbatim} +Now, there is no added code to the mouse up action of the multiple choice +fields that appear afterwards. + +The only command yet to be discussed is \cs{addToAction*}. Suppose we earlier +declared, +\begin{quote}\ttfamily +\cs{setActionKeys\darg{\string\AddAAFormat}\darg{\ameta{code\SUB1}}} +\end{quote} +and later in the document we want to \emph{append} +additional script (\ameta{code\SUB2}). To accomplish this, expand the command, +\begin{quote}\ttfamily +\cs{addToAction\darg{\string\AddAAFormat}\darg{\ameta{code\SUB2}}} +\end{quote} +Now the code executed for each response box +is \ameta{code\SUB1}\ameta{code\SUB2}. However, if you wish to \emph{prepend} the \ameta{code\SUB2}, then +expand \cs{addToAction} using the star-option, +\begin{quote}\ttfamily +\cs{addToAction*\darg{\string\AddAAFormat}\darg{\ameta{code\SUB2}}} +\end{quote} +The code executed for any response box is \ameta{code\SUB2}\ameta{code\SUB1}. + +It should ever be kept in mind that changing the value of a key with +\cs{setActionKeys} is \cs{addToAction} affects all response boxes thereafter, +\emph{unless these changes occur in a group}. Thus, the following change, +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\begin{oQuestion}{oQ1} +\addToAction{\AddAAFormat}{\r!ameta(code)}% +It is well known that + $ 1 + 16 = \RespBoxMath{17}{1}{.0001}{[0,1]}$ +\end{oQuestion} +\end{Verbatim} +only affects that problem, and none other. + +\newtopic +\textbf{Important/A little beg.} Any changes to the action script passed to +the component elements of the \env{oQuestion}, \env{shortquiz}, and +\env{quiz} environments \emph{should not impact} the basic functionality of the +environments. + +\subsection{The correct-type math problem} + +The traditional way of posing a mathematical objective-style question is to use +the \cs{RespBoxMath} command, which presents an empty text field for the student to enter +the answer. However, an alternate approach is to pre-populate the field and ask the student +to edit the expression provided to obtain a correct answer. +\collectboxto{\aebbox}{}\bgroup +\begin{minipage}{\linewidth-\mathindent} +\begin{Verbatim}[fontsize=\small,commandchars={!@$}] +\RespBoxMath[!textbf@\DV{cos(4x)}\V{cos(4x)}$] + {4xcos(2x^2)}{2}{.001}{[0,1]} +\end{Verbatim} +\end{minipage}\egroup + +\medskip\noindent\begin{oQuestion}{} +Edit the expression to obtain the correct answer: +\begin{align*} + &\dfrac{d}{dx}\sin(2x^2)=\RespBoxMath[\DV{cos(4x)}\V{cos(4x)}]{4xcos(2x\string^2)}{2}{.001}{[0,1]}\\[3pt] + &\usebox{\aebbox} +\end{align*} +\end{oQuestion} +The field is initially populated by an incorrect answer (a very common mistake), the student needs to +correct the answer. + +\exAeBBlogPDF{p=1335} Refer to the {\AcroTeX} Blog article +\href{\urlAcroTeXBlog/?p=1335}{Correcting a math problem} for additional +examples. The article also discusses the use of multi-letter variables in +this context of a correct-type question. + \subsection{Evaluating Equivalent Expressions} The \hypertarget{EquivExpr}{\cs{RespBoxMath}} macro, and its underlying JavaScript code, is designed to @@ -9828,21 +10091,34 @@ an ASP (Active Server Page) that I have written. This ASP, named naturally, \texttt{eqRecord.asp}, takes the data and stores it to a database, such as Microsoft Access. -You can also submit your form data as HTML, as the the two websites -demonstrate.\footnote{These websites were prepared as a script demonstration -site that is referenced in my yet-to-be submitted book \AEBBook~\cite{book:AEBB}.} -\begin{quote} -\url{http://faculty.nwfsc.edu/web/math/storyd/dps/} -\end{quote} -The above Web page is on a \app{Windows} server hosted by Northwest Florida State -College (NWFSC). The server-side -script is written as ASP pages using VBScript. +%You can also submit your form data as HTML, as the two websites +%demonstrate.\footnote{These websites were prepared as a script demonstration +%site that is referenced in my yet-to-be submitted book \AEBBook~\cite{book:AEBB}.} +%\begin{quote} +%\url{http://faculty.nwfsc.edu/web/math/storyd/dps/} +%\end{quote} +%The above web page is on a \app{Windows} server hosted by Northwest Florida State +%College (NWFSC). The server-side +%script is written as ASP pages using VBScript. + +There is a website that you can experience submitting form data from a +PDF.\footnote{This website was prepared as a script demonstration site that +is referenced in my yet-to-be submitted book \AEBBook~\cite{book:AEBB}.} \begin{quote} \url{http://www.acrotex.net/dps/} \end{quote} -This Web page is on a \app{Linux} server hosted by {\AcroTeX.Net}. The +This web page is on a \app{Linux} server hosted by {\AcroTeX.Net}. The server-side script is written with PHP. +\redpoint In recent years, the browser technology has evolved in an unwelcome +direction. Most web browsers do not support the Adobe Reader plug-in, hence, +Reader no longer appears in the browser window, so essential for a good user +experience. Most browsers use their own `native' PDF viewer, which does +respond to links, but knows nothing about JavaScript. The only browser, as of +this writing, that still supports the Adobe Reader plug-in (or ActiveX) is +Microsoft Internet Explorer~11. For online, interactive work with PDF, the +document consumer must use Microsoft Internet Explorer~11. + \redpoint For more details, see the package documentation, \texttt{eq2dbman.pdf}.\footnote{The absolute URL is \url{\bUrl/acrotex/eq2dbman.pdf}} The \textsf{eq2db} package is available @@ -10156,7 +10432,7 @@ handle (math fill-in) questions whose answers are a \textit{set of numbers (symbols)} or a comma delimited \emph{list of numbers (symbols)}. -\paragraph*{ProcRespSetNum:} The function can handle (math fill-in) +\paragraph*{ProcRespSetNum:}\label{para:ProcRespSetNum} The function can handle (math fill-in) questions whose answers are a \textit{set of numbers} or a comma delimited \textit{list of numbers}. @@ -10168,7 +10444,7 @@ JavaScript does after the comma-delimited list is entered and committed. \begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small] $(x+1)^2 (x+3) = 0$, $S = \RespBoxMath[\AddAAFormat{\formatAsSet} - \rectW{.75in}\textSize{0}]{-1,-3}{1}{.0001}{[0,1]}*{ProcRespSetNum}$ + \rectW{.75in}\textSize{0}]{-1,-3}{1}{.0001}{[0,1]}*{ProcRespSetNum}$ \end{Verbatim} \noindent The formatting of answer is accomplished by passing \verb!\AddAAFormat{\formatAsSet}! as an optional argument of @@ -10197,7 +10473,7 @@ be the ``universal set'' of the problem. \begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small] \def\U{a,b,c,d,e,f,g} % define a universal set $A \cap B = \RespBoxMath[\AddAAFormat{\formatAsSet} - \rectW{.75in}\textSize{0}]{c,d}(\U){1}{.0001}{[0,1]}*{ProcRespSetSym}$ + \rectW{.75in}\textSize{0}]{c,d}(\U){1}{.0001}{[0,1]}*{ProcRespSetSym}$ \end{Verbatim} \paragraph*{ProcRespListFormula:} This function can handle a (math fill-in) @@ -10323,7 +10599,7 @@ are recognized by this procedure. \begin{Verbatim}[xleftmargin=\amtIndent] \RespBoxMath{(-inf,4]U[5,inf)}{10} - {.0001}{[0,1]x[0,1]x[0,1]x[0,1]}*{ProcRespIntervals} + {.0001}{\viidna}*{ProcRespIntervals} \end{Verbatim} \Important Problems with unbalanced parentheses while authoring and building the PDF file. The code below diff --git a/texmf-dist/source/latex/acrotex/doc/eformman.tex b/texmf-dist/source/latex/acrotex/doc/eformman.tex index 51d9f00f..ccc6476c 100644 --- a/texmf-dist/source/latex/acrotex/doc/eformman.tex +++ b/texmf-dist/source/latex/acrotex/doc/eformman.tex @@ -6,7 +6,7 @@ forcolorpaper,latextoc,pro,useui}, exerquiz,aebxmp ]{aeb_pro} -\usepackage{aeb_mlink} +\usepackage[dblevel=1]{aeb_mlink} \usepackage[altbullet]{lucidbry} %\usepackage{myriadpro} @@ -63,14 +63,17 @@ subject={Documentation for the eforms and insdljs packages}, talksite={\url{www.acrotex.net}}, version={2.0}, + prepared={2018/03/22}, + preparedLabel={Distribution Dated:}, keywords={LaTeX, hyperref, PDF, exercises, quizzes}, copyrightStatus=True, copyrightNotice={Copyright (C) \the\year, D. P. Story}, copyrightInfoURL={http://www.acrotex.net} } - +%\revisionLabel{Distribution Dated:} \def\AEBBook{\textsl{{Acro\!\TeX} eDucation System Tools: {\LaTeX} for interactive PDF documents}} +\setlength{\marginparwidth}{31.25pt} \renewcommand\hproportionwebtitle{.75} \universityLayout{fontsize=Large,fontfamily=sffamily} @@ -167,6 +170,7 @@ \def\FitItIn{\eq@fititin} \def\endredpoint{\FitItIn{{\large\ifusebw\color{black}\else\color{red}\fi$\blacktriangleleft$}}} +\advance\marginparwidth16pt \makeatother @@ -201,7 +205,7 @@ \makeatletter \let\web@copyright\@gobble -\let\web@revision\@gobble +%\let\web@revision\@gobble \renewcommand\webdirectory {% \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}% @@ -217,12 +221,21 @@ \end{itemize} \end{flushleft} } -\renewcommand\titlepageTrailer +%\renewcommand\titlepageTrailer +%{% +% \web@copyright\ \copyright\ \webcopyrightyears\ \webversion +% \hfill\url{http://www.acrotex.net}\\ +% \web@revision\ \@date \hfill\href{mailto:\webemail}{\webemail} +%} +\DesignTitlePageTrailer {% - \web@copyright\ \copyright\ \webcopyrightyears\ \webversion - \hfill\url{http://www.acrotex.net}\\ - \web@revision\ \@date \hfill\href{mailto:\webemail}{\webemail} + ul=Copyright \copyright\ \webcopyrightyears, + ur=\thewebemail, + lr=\url{http://www.acrotex.net}, + ll={\web@revision\ \aeb@prepared}, + raise=-25pt } + \makeatother \newcounter{exampleno} @@ -237,6 +250,9 @@ \everyCheckBox{\BC{.690 .769 .871}\BG{.941 1 .941}\textColor{1 0 0}} \everyRadioButton{\BC{.690 .769 .871}\BG{.941 1 .941}\textColor{0 0 1}\symbolchoice{star}} +\reversemarginpar +\mlMarksOff + \chngDocObjectTo{\newDO}{doc} \begin{docassembly} var titleOfManual="The AeB eforms MANUAL"; @@ -286,7 +302,7 @@ _path=_path.substring(0,pos)+"/"+manualfilename; %\section{Introduction} -In \hypertarget{eformsPkg}{this} document we describe the support for Acrobat form elements +In \hypertarget{eformsPkg}{this} document we describe the support for \app{Acrobat} form elements in an {\cAcroT} document. The \textit{PDF Reference} indicates there are four different categories of fields for a total of seven types of fields. @@ -312,9 +328,9 @@ of fields. \end{questions} The {\cAcroB} now supports \textit{signature fields}. Using the command \cs{sigField}, an unsigned signature field is created. -The field can be signed, either by using Acrobat, or programmatically +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 Acrobat Distiller. +create the PDF using \app{Acrobat} Distiller. The \textsf{hyperref} Package (Rahtz, Oberdiek \textit{et al}) provides support for the same set of form fields; however, not all @@ -327,7 +343,7 @@ commands, in this way, there is a uniform treatment of all form fields in the \cAcroB. \redpoint The demo files for {\eForm} support are -\texttt{eqform.tex}, for those using the \textsf{Acrobat +\texttt{eqform.tex}, for those using the \textsf{\app{Acrobat} Distiller} to create a PDF document, and \texttt{eqform\_pd.tex}, for those who use \textsf{pdftex} or \textsf{dvipdfm}. @@ -337,7 +353,7 @@ resources are recommended: \item \href{https://developer.mozilla.org/en/JavaScript}{Core JavaScript Reference} at Mozilla Developer Center. \item \href{http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?&accessible=true} - {\emph{JavaScript for Acrobat API Reference}} at the Acrobat Developer Center. In the navigation panel + {\emph{JavaScript for \app{Acrobat} API Reference}} at the \app{Acrobat} Developer Center. In the navigation panel on the left, select JavaScript. \item \href{\urlAcroTeXBlog/?cat=5}{PDF Blog}, by D. P. Story. @@ -745,11 +761,11 @@ variables. \redpoint \cs{Ff} \textbf{Field flags.} Values appropriate to a list box are \Cs{FfCommitOnSelChange} (commits immediately after selection, PDF 1.5); \Cs{FfSort} (sorts\footnote -{This flag really is not useful unless you have the full Acrobat application, the +{This flag really is not useful unless you have the full \app{Acrobat} application, the \texttt{Sort} \texttt{items} check box is checked in the Options tab of the Fields Properties dialog for the field. Initially, the items are listed in the same order as listed in the -\texttt{\#5} argument; the Acrobat application will sort the list +\texttt{\#5} argument; the \app{Acrobat} application will sort the list if you view the \textit{Fields Properties} for the field and click \texttt{OK}. Be sure to save the changes.\label{FfSortfoot}}the items); \Cs{FfMultiSelect} (allows more than one value to be @@ -1022,7 +1038,7 @@ descriptions and notes on each of these variables. \verb! {mySig}{2in}{4\baselineskip}! \end{minipage} -\newtopic To sign this field, use the Acrobat user interface, or use the +\newtopic To sign this field, use the \app{Acrobat} user interface, or use the package \textsf{aeb\_pro}, and the following \texttt{docassembly} code: \begin{Verbatim}[xleftmargin=\amtIndent] @@ -1059,13 +1075,13 @@ The \texttt{appearance} is important, through it, you can choose a particular ap for the digital signature, including a custom signature that you've created. In the example above, we have \texttt{appearance: "My Signature"}. \texttt{My Signature} is the name I've given a particular digital ID of mine. If the \texttt{appearance} property is not -included in \texttt{oInfo}, Acrobat will use the one named \texttt{"Standard Text"}. +included in \texttt{oInfo}, \app{Acrobat} will use the one named \texttt{"Standard Text"}. \end{itemize} \Important Additional information on signatures can be found -at the \mlhref{http://www.adobe.com/go/acrobat_developer}{Acrobat Developer Center}; +at the \mlhref{http://www.adobe.com/go/acrobat_developer}{\mbox{\app{Acrobat}} Developer Center}; or go to the \href{http://www.adobe.com/go/acrobat_security}{Security page}; -in particular, see the document \textit{Digital Signature User Guide for Acrobat 9.0 +in particular, see the document \textit{Digital Signature User Guide for \app{Acrobat} 9.0 and Adobe Reader 9.0}. Other comments on the topic of signature fields: \begin{itemize} \item The open key \cs{textSize} is recognized, but is change to 0. @@ -1129,9 +1145,9 @@ package to create multiple-line links. \settowidth{\aebdimen}{\cs{setLinkText[\meta{options}]\darg{\meta{link\_text}}}} \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \setLink[!meta(options)]{!meta(link_text)} -\setLinkText[!meta(options)]{!meta(link_text)} +!grayV(\setLinkText[!meta(options)]{!meta(link_text)}) \end{dCmd} -\newtopic Both link commands are the same, the use of the second one, \cs{setLink}, is +\newtopic Both link commands are the same, the use of the second one, \cs{setLinkText} (grayed out), is discouraged in favor of the use of \cs{setLink}. \PD The command has two arguments, the first is optional. The first @@ -1195,7 +1211,7 @@ A form field may simply gather data from the user; additionally, it may perform one or more \textit{actions}. Actions include execute JavaScript code, going to a particular page in a document, open a file, execute a menu item, reset a form, play media or a -sound, and so on. Beginning with Acrobat~5.0, most actions can be +sound, and so on. Beginning with \app{Acrobat}~5.0, most actions can be performed using JavaScript methods. An action is initiated by a \textit{trigger}, a field may have @@ -1479,7 +1495,7 @@ for details of the syntax. \noindent See section~8.5.3, `URI Actions', of the \textit{PDF Reference}~\cite{tech:PDFRef} for details of the syntax. -Acrobat (Adobe Reader) also support open parameters, using these key-value pairs, +\app{Acrobat} (Adobe Reader) also support open parameters, using these key-value pairs, we can go to a specific page in a PDF on the web, and even search for words, for example \pushButton[\CA{Go & Search}\A{/S/URI/URI(http://www.math.uakron.edu/~dpstory/acrotex/aeb_man.pdf#page=8&search=AcroTeX web exerquiz)}]{myButton4a}{}{10bp} opens the AeB Manual on the Internet, goes to page 8, and searches for the words @@ -1497,7 +1513,7 @@ item). Named actions listed in the \textit{PDF Reference} are \texttt{NextPage}, \texttt{PrevPage}, \texttt{FirstPage} and \texttt{LastPage}. A complete list of named actions can be obtained by executing the code \texttt{app.listMenuItems()} in -the JavaScript console of Acrobat (Pro). +the JavaScript console of \app{Acrobat} (Pro). \pushButton[\CA{Go}\AC{Previous!}\RC{To}\A{/S/Named/N/PrevPage}]{myButton5}{}{10bp} \begin{Verbatim}[xleftmargin=\amtIndent] \pushButton[\CA{Go}\AC{Previous!}\RC{To} @@ -1510,7 +1526,7 @@ actions listed in the PDF Reference are \texttt{NextPage}, In theory, any menu item can be executed as a named actions; there are several factors to be taken into consideration: (1) Not all menu -items available to Acrobat are listed on the menu bar of Adobe +items available to \app{Acrobat} are listed on the menu bar of Adobe Reader, when choosing a name event to use, you should decide if the application executing the named action supports that action; (2) In recent versions, starting with version 7, there have been security @@ -1563,7 +1579,7 @@ CollectionHome & GoBackDoc & rolReadPage\\ CollectionPreview & GoForwardDoc & ZoomDragMenuItem\\ \end{longtable} \end{small} -\newtopic As mentioned before, some of these are for Acrobat only, others are available for Adobe Reader. I'll +\newtopic As mentioned before, some of these are for \app{Acrobat} only, others are available for Adobe Reader. I'll let you sort them out. If you try to execute a named action that is not on the white list, the action will silently fail. @@ -1636,24 +1652,24 @@ command \cs{JS}, defined in the \textsf{insldjs} package, it expands to the corr of \cs{JS}. Most all actions can be performed using JavaScript, the reader is -referred to the \textit{JavaScript for Acrobat API +referred to the \textit{JavaScript for \app{Acrobat} API Reference}~\cite{tech:AcroJSRef}. \section{JavaScript} -Acrobat JavaScript is the cross-platform scripting language of the -Acrobat suite of products. For Acrobat 5.0 or later, Acrobat +\app{Acrobat} JavaScript is the cross-platform scripting language of the +\app{Acrobat} suite of products. For \app{Acrobat} 5.0 or later, \app{Acrobat} JavaScript based on JavaScript version 1.5 of ISO-16262 (formerly known as ECMAScript), and adds extensions to the core language to -manipulate Acrobat forms, pages, documents, and even the viewer +manipulate \app{Acrobat} forms, pages, documents, and even the viewer application. Web-based references to core JavaScript are the \textit{Core JavaScript Guide}~\cite{tech:NetscapeJSGuide} and the \textit{Core -JavaScript Reference}~\cite{tech:NetscapeJSReference}. For Acrobat -JavaScript, we refer you to the \textit{Developing Acrobat +JavaScript Reference}~\cite{tech:NetscapeJSReference}. For \app{Acrobat} +JavaScript, we refer you to the \textit{Developing \app{Acrobat} Applications using JavaScript}~\cite{tech:AcroJSGuide} and the -\textit{JavaScript for Acrobat API Reference}~\cite{tech:AcroJSRef}. +\textit{JavaScript for \app{Acrobat} API Reference}~\cite{tech:AcroJSRef}. \verygoodbreak @@ -1736,9 +1752,9 @@ literal double quotes \texttt{"}, to avoid \texttt{"} being interpreted as the end of the string (or the beginning of a string) we have to double escape the double quotes, as in \verb+\\"+. (This is not necessary when entering code in the JavaScript editor if you -have the Acrobat application.) I try to write JavaScript that I can easily +have the \app{Acrobat} application.) I try to write JavaScript that I can easily read, edit, and debug in the JavaScript editor (available in -the full Acrobat application); for this reason, I've added in new +the full \app{Acrobat} application); for this reason, I've added in new lines and tabbing (\cs{r} and \cs{t}). Many people, however, have only the Adobe Reader and cannot see their code to debug it; in this case, the formatting is really not needed. @@ -1828,7 +1844,7 @@ The syntax for this command is \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} \defineJSStr{\!anglemeta(CMD)}{!anglemeta(JS_string)} \end{dCmd} -\PD The parameter \cs{\anglemeta{CMD}} is a command to be define by +\PD Where \cs{\anglemeta{CMD}} is a command to be defined by \cs{defineJSStr}, for example, \cs{myMessage}, and \anglemeta{JS\_string} is the JavaScript string to be defined as the expansion of the \cs{\anglemeta{CMD}}. @@ -1957,61 +1973,72 @@ Later, a push button can use this preset, like so, \newtopic You can mix your \cs{myFavFive} with different key-value pairs, such as a JavaScript action. +\handpoint In each of the subsequent subsections, the \pkg{eforms} key to its user-friendly counterpart is +displayed in the margin. Some of the user-friendly are a combination of +\pkg{eforms} KVs and are not represented in the margin in this case. + \subsection{The Appearance Tab} -We set these key-value pairs to model the user interface of Acrobat. +We present these key-value pairs to model the user-interface of \app{Acrobat}. -The key is \texttt{border}. In the case of a link, this is the Link Type: \textsf{Visible Rectangle} -or \textsf{Invisible Rectangle}. For forms, this key has no counterpart -in the user interface. If you set border equal to \texttt{invisible}, that -will set border line width to zero \verb!\W{0}!. \settowidth{\aebdimen}{\ttfamily border=visible|invisible} \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} border=visible|invisible \end{dCmd} -\CmdDescription Used with link annotations and determines whether the border surrounding the bounding -box of the link is visible. If this key is not specified, the \textsf{eforms} +\CmdDescription Used with link annotations and determines whether the border +surrounding the bounding box of the link is visible. In the case of a link, +this is the Link Type: \textsf{Visible Rectangle} or \textsf{Invisible +Rectangle}. If you set border equal to \texttt{invisible}, that will set +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 \textsf{hyperref} is used, the border is invisible; otherwise, it is visible (and the default \texttt{linewidth} is 1). Use the border key to override this behavior. -\settowidth{\aebdimen}{\ttfamily linewidth=thin|medium|thick} +\settowidth{\aebdimen}{\ttfamily linewidth=thin|medium|thick}% +\def\1{\llap{\Cs{W}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -linewidth=thin|medium|thick +!1linewidth=thin|medium|thick \end{dCmd} \CmdDescription The \texttt{linewidth} of the border around a link or a form. The user interface choices are \texttt{thin}, \texttt{medium}, and \texttt{thick}. This key-value is ignored if the document author has set the border to \texttt{invisible}. -\settowidth{\aebdimen}{\ttfamily highlight=none|invert|outline|inset|push} +\settowidth{\aebdimen}{\ttfamily highlight=none|invert|outline|inset|push}% +\def\1{\llap{\Cs{H}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -highlight=none|invert|outline|inset|push +!1highlight=none|invert|outline|inset|push \end{dCmd} \CmdDescription The highlight type for links and forms, choices are \texttt{none}, \texttt{invert}, \texttt{outline}, \texttt{inset} and \texttt{push}. The term \texttt{inset} is used with links, and \texttt{push} is used with forms. They each have the same key value pair. -\settowidth{\aebdimen}{\ttfamily bordercolor=\anglemeta{num}\hardspace\anglemeta{num}\hardspace\anglemeta{num}} +\settowidth{\aebdimen}{\ttfamily bordercolor=\anglemeta{num}\hardspace\anglemeta{num}\hardspace\anglemeta{num}}% +\def\1{\llap{\smash{\parbox[c]{\marginparwidth}{\raggedright\shortstack[l]{\Cs{BC}\,(forms) or\\\Cs{Color}\,(links)}}}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -bordercolor=!anglemeta(num)!hardspace!anglemeta(num)!hardspace!anglemeta(num) +!1bordercolor=!anglemeta(num)!hardspace!anglemeta(num)!hardspace!anglemeta(num) \end{dCmd} \CmdDescription The color of the border, when visible, in RGB color space. For example, \texttt{bordercolor=1 0 0}, is the color red. -\settowidth{\aebdimen}{\ttfamily linestyle=solid|dashed|underlined|beveled|inset} +\settowidth{\aebdimen}{\ttfamily linestyle=solid|dashed|underlined|beveled|inset}% +\def\1{\llap{\Cs{S}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -linestyle=solid|dashed|underlined|beveled|inset +!1linestyle=solid|dashed|underlined|beveled|inset \end{dCmd} \CmdDescription The line style of the border, possible values are \texttt{solid},\texttt{dashed}, \texttt{underlined}, \texttt{beveled},and \texttt{inset}. Links do not support the \texttt{beveled} option. -\settowidth{\aebdimen}{\ttfamily dasharray=\anglemeta{num}[\hardspace\anglemeta{num}]} +\settowidth{\aebdimen}{\ttfamily dasharray=\anglemeta{num}[\hardspace\anglemeta{num}]}% +\def\1{\llap{\Cs{D}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -dasharray=!anglemeta(num)[!hardspace!anglemeta(num)] +!1dasharray=!anglemeta(num)[!hardspace!anglemeta(num)] \end{dCmd} \CmdDescription When a line style of \texttt{dashed} is chosen, you can specify a dash array. The default is 3.0, which means a repeating pattern of 3 points of line, followed by 3 points of space. @@ -2019,9 +2046,12 @@ A value of \texttt{dasharray=3~2} means three points of line, followed by two points of space. When this key is used without a value, the value is 3.0. When the \texttt{dashed} key is not present, 3.0 is used. -\settowidth{\aebdimen}{\ttfamily linktxtcolor=\anglemeta{named\_color}} +linktxtcolor + +\settowidth{\aebdimen}{\ttfamily linktxtcolor=\anglemeta{named\_color}}% +\def\1{\llap{\Cs{linktxtcolor}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -linktxtcolor=!anglemeta(named_color) +!1linktxtcolor=!anglemeta(named_color) \end{dCmd} \CmdDescription Set the color of the link text. Ignored if the \texttt{colorlinks} option of hyperref has not been taken. The @@ -2032,9 +2062,10 @@ redefining \cs{defaultlinkcolor}. If \verb!linktxtcolor={}! (an empty argument), or simply \texttt{linktxtcolor}, no color is applied to the text, the color of the text will be whatever the current color is. -\settowidth{\aebdimen}{\ttfamily annotflags=hidden|print|-print|noview|lock} +\settowidth{\aebdimen}{\ttfamily annotflags=hidden|print|-print|noview|lock}% +\def\1{\llap{\Cs{F}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -annotflags=hidden|print|-print|noview|lock +!1annotflags=hidden|print|-print|noview|lock \end{dCmd} \CmdDescription This is a bit field, possible values are \texttt{hidden}, \texttt{print}, @@ -2045,9 +2076,10 @@ For example, \verb|annotflags={-print,lock}| makes the field not printable and i locked, so the field cannot be moved through the UI. -\settowidth{\aebdimen}{\ttfamily fieldflags=readonly|required|noexport|multiline|password|} +\settowidth{\aebdimen}{\ttfamily fieldflags=readonly|required|noexport|multiline|password|}% +\def\1{\llap{\Cs{Ff}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -fieldflags=readonly|required|noexport|multiline|password| +!1fieldflags=readonly|required|noexport|multiline|password| notoggleoff|radio|pushbutton|combo|edit| sort|fileselect|multiselect|nospellcheck| noscrolling|comb|radiosinunison|commitonchange| @@ -2057,20 +2089,25 @@ fieldflags=readonly|required|noexport|multiline|password| number of properties of a field. This is a multiple-selection key as well. The values are ``or-ed'' together. -Normally, a document author would not specify \texttt{radio}, \texttt{pushbutton} or \texttt{combo}. These properties are used by \textsf{eforms} to construct a radio button field, a push button and a combo box. The others can be used as appropriate. +Normally, a document author would not specify \texttt{radio}, +\texttt{pushbutton} or \texttt{combo}. These properties are used by +\textsf{eforms} to construct a radio button field, a push button and a combo +box. The others can be used as appropriate. -\settowidth{\aebdimen}{\ttfamily maxlength=\anglemeta{num}} +\settowidth{\aebdimen}{\ttfamily maxlength=\anglemeta{num}}% +\def\1{\llap{\Cs{MaxLen}\hspace{\marginparsep}}}%% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -maxlength=!anglemeta(num) +!1maxlength=!anglemeta(num) \end{dCmd} \CmdDescription Use \texttt{maxlength} to limit the number of characters input into a text field. Example: \texttt{maxlength=12}. When the \texttt{fieldflags} is set to \texttt{comb}, the value of \texttt{maxlength} determines the number of combs in the field. -\settowidth{\aebdimen}{\ttfamily tooltip=\anglemeta{string}} +\settowidth{\aebdimen}{\ttfamily tooltip=\anglemeta{string}}% +\def\1{\llap{\Cs{TU}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -tooltip=!anglemeta(string) +!1tooltip=!anglemeta(string) \end{dCmd} \CmdDescription Enter a text value to appear as a tool tip. A tool tip is text that appears in a frame when the user hovers the mouse @@ -2084,10 +2121,12 @@ tooltip = {J\"{u}rgen, press me and see what happens!} \end{Verbatim} \noindent yields a tool tip of ``J\"{u}rgen, press me and see what happens!'' -\settowidth{\aebdimen}{\ttfamily default=\anglemeta{string}} +\settowidth{\aebdimen}{\ttfamily default=\anglemeta{string}}% +\def\1{\llap{\Cs{DV}\hspace{\marginparsep}}}% +\def\2{\llap{\Cs{V}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -default=!anglemeta(string) -value=!anglemeta(string) +!1default=!anglemeta(string) +!2value=!anglemeta(string) \end{dCmd} \CmdDescription Set default value of a field (text, list, combobox) using the \texttt{default} key. The default value is the value used @@ -2103,24 +2142,29 @@ If the unicode option of hyperref is in effect, then setting ``\char1 \ 1 000 000''. \settowidth{\aebdimen}{\ttfamily rotate=0|90|180|270} +\def\1{\llap{\Cs{R}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -rotate=0|90|180|270 +!1rotate=0|90|180|270 \end{dCmd} \CmdDescription Set the orientation of the field, values are 0, 90, 180 and 270. If 90 or 270 are chosen, the height and width of the field need to be reversed. This is not done automatically by \textsf{eforms} \settowidth{\aebdimen}{\ttfamily bgcolor=\anglemeta{num}\hardspace\anglemeta{num}\hardspace\anglemeta{num}} +\def\1{\llap{\Cs{BG}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -bgcolor=!anglemeta(num)!hardspace!anglemeta(num)!hardspace!anglemeta(num) +!1bgcolor=!anglemeta(num)!hardspace!anglemeta(num)!hardspace!anglemeta(num) \end{dCmd} \CmdDescription The background color of a form field. This is a RGB color value. \settowidth{\aebdimen}{\ttfamily rollovertxt=\anglemeta{string}} +\def\1{\llap{\Cs{CA}\hspace{\marginparsep}}}% +\def\2{\llap{\Cs{AC}\hspace{\marginparsep}}}% +\def\3{\llap{\Cs{RC}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -uptxt=!anglemeta(string) -downtxt=!anglemeta(string) -rollovertxt=!anglemeta(string) +!1uptxt=!anglemeta(string) +!2downtxt=!anglemeta(string) +!3rollovertxt=!anglemeta(string) \end{dCmd} \CmdDescription The normal (mouse up), mouse down and rollover text for a button field. All three of these keys obey the \texttt{unicode} option. @@ -2131,21 +2175,24 @@ If the \opt{unicode} option of \pkg{hyperref} is in effect, then setting \newtopic \textbf{Push buttons only.} The following list of keys are used for -creating custom appearances on button faces. Acrobat Distiller required 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 b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=879}{eqforms.pdf}} and \texttt{\href{\urlAcroTeXBlog/?p=1291}{eqforms\_pro.pdf}} illustrate the creation of icons as button appearances. In the latter PDF, -\texttt{eqforms\_pro.pdf}, \textsf{Acrobat Distiller} is required to be the +\texttt{eqforms\_pro.pdf}, \textsf{\app{Acrobat} Distiller} is required to be the PDF creator. \begin{itemize} \item[] \settowidth{\aebdimen}{\ttfamily normappr=\anglemeta{string}} +\def\1{\llap{\Cs{I}\hspace{\marginparsep}}}% +\def\2{\llap{\Cs{RI}\hspace{\marginparsep}}}% +\def\3{\llap{\Cs{IX}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -normappr=!anglemeta(string) -rollappr=!anglemeta(string) -downappr=!anglemeta(string) +!1normappr=!anglemeta(string) +!2rollappr=!anglemeta(string) +!3downappr=!anglemeta(string) \end{dCmd} \item[]\CmdDescription The normal, rollover, and down appearances of the button face icon. The value of each key is an indirect reference to a form XObject. Normally, you can use the \texttt{graphicxsp} package @@ -2153,8 +2200,9 @@ to embed graphics and give a symbolic name which is used as the value of these k \item[] \settowidth{\aebdimen}{\ttfamily layout=labelonly|icononly|icontop|iconbottom|} +\def\1{\llap{\Cs{TP}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -layout=labelonly|icononly|icontop|iconbottom| +!1layout=labelonly|icononly|icontop|iconbottom| iconleft|iconright|labelover \end{dCmd} \item[]\CmdDescription The value of this key determines the layout of the icon relative to the label (or caption). @@ -2163,8 +2211,9 @@ layout=labelonly|icononly|icontop|iconbottom| \item[] \settowidth{\aebdimen}{\ttfamily scalewhen=always|never|iconbig|iconsmall} +\def\1{\llap{\Cs{SW}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -scalewhen=always|never|iconbig|iconsmall +!1scalewhen=always|never|iconbig|iconsmall \end{dCmd} \item[]\CmdDescription The value of this key tells when to scale the icon. The \texttt{iconbig} scales the icon when it is too big for the bounding rectangle; while @@ -2173,8 +2222,9 @@ scalewhen=always|never|iconbig|iconsmall \item[] \settowidth{\aebdimen}{\ttfamily scale=proportional|nonproportional} +\def\1{\llap{\Cs{ST}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -scale=proportional|nonproportional +!1scale=proportional|nonproportional \end{dCmd} \item[]\CmdDescription This parameter sets the scale type, either \texttt{proportional} scaling, where the aspect ratio of the icon is preserved; or \texttt{nonproportional} scaling is used. The @@ -2182,8 +2232,9 @@ default is \texttt{proportional}. \item[] \settowidth{\aebdimen}{\ttfamily position=\anglemeta{x}\hardspace\anglemeta{y})} +\def\1{\llap{\Cs{PA}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -position=!anglemeta(x)!hardspace!anglemeta(y) +!1position=!anglemeta(x)!hardspace!anglemeta(y) \end{dCmd} \item[]\CmdDescription Both \anglemeta{x} and \anglemeta{y} are numbers between 0 and 1, inclusive, and separated by a space (not a comma). They @@ -2195,8 +2246,9 @@ position=!anglemeta(x)!hardspace!anglemeta(y) \item[] \settowidth{\aebdimen}{\ttfamily fitbounds=true|false} +\def\1{\llap{\Cs{FB}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -fitbounds=true|false +!1fitbounds=true|false \end{dCmd} \item[]\CmdDescription A Boolean value, if \texttt{true}, indicates that the button appearance should be scaled to fit fully @@ -2208,19 +2260,20 @@ fitbounds=true|false \newtopic \textbf{Check boxes and Radio Buttons Only.} The following list of keys are used for creating custom appearances on check boxes and -radio buttons. Acrobat Distiller required for this set. The example files +radio buttons. \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 b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=879}{eqforms.pdf}} and \texttt{\href{\urlAcroTeXBlog/?p=1291}{eqforms\_pro.pdf}} illustrate the -creation of these appearances.. In the latter PDF, \texttt{eqforms\_pro.pdf}, -\textsf{Acrobat Distiller} is required to be the PDF creator. +creation of these appearances. In the latter PDF, \texttt{eqforms\_pro.pdf}, +\textsf{\app{Acrobat} Distiller} is required to be the PDF creator. \begin{itemize} \item[] \settowidth{\aebdimen}{\ttfamily appr=\darg{ norm=\darg{on=\darg\anglemeta{normOnAppr}},off=\darg{\anglemeta{normOffAppr}}},} +\def\1{\llap{\Cs{AP}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -appr={ norm={on={!anglemeta(normOnAppr)},off={!anglemeta(normOffAppr)}}, +!1appr={ norm={on={!anglemeta(normOnAppr)},off={!anglemeta(normOffAppr)}}, down={on={!anglemeta(downOnAppr)},off={!anglemeta(downOffAppr)}}, roll={on={!anglemeta(rollOnAppr)},off={!anglemeta(rollOffAppr)}}} \end{dCmd} @@ -2231,26 +2284,30 @@ appr={ norm={on={!anglemeta(normOnAppr)},off={!anglemeta(normOffAppr)}}, have the same structure as \texttt{norm} does. \item[] If \texttt{appr} is not specified, then, by default, the usual appearances of the - buttons are used, as provided by Acrobat/AR. + buttons are used, as provided by \app{Acrobat}/AR. \item[] The \texttt{down} and \texttt{roll} are optional, if you use \texttt{appr} at all, you should specify the norm appearance, both \texttt{on} and \texttt{off} appearances. \end{itemize} -\settowidth{\aebdimen}{\ttfamily align=left|centered|right} +\settowidth{\aebdimen}{\ttfamily align=left|centered|right}% +\def\1{\llap{\Cs{Q}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -align=left|centered|right +!1align=left|centered|right \end{dCmd} \CmdDescription The type of alignment of a text field. Permitted values are \texttt{left}, \texttt{centered}, and \texttt{right}. -\settowidth{\aebdimen}{\ttfamily textcolor=\anglemeta{num}[\hardspace\anglemeta{num}\hardspace\anglemeta{num}[\hardspace\anglemeta{num}]]} +\settowidth{\aebdimen}{\ttfamily textcolor=\anglemeta{num}[\hardspace\anglemeta{num}\hardspace\anglemeta{num}[\hardspace\anglemeta{num}]]}% +\def\1{\llap{\Cs{textFont}\hspace{\marginparsep}}}% +\def\2{\llap{\Cs{textSize}\hspace{\marginparsep}}}% +\def\3{\llap{\Cs{textColor}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -textfont=!anglemeta(font_name) -textsize=!anglemeta(num) -textcolor=!anglemeta(num)[!hardspace!anglemeta(num)!hardspace!anglemeta(num)[!hardspace!anglemeta(num)]] +!1textfont=!anglemeta(font_name) +!2textsize=!anglemeta(num) +!3textcolor=!anglemeta(num)[!hardspace!anglemeta(num)!hardspace!anglemeta(num)[!hardspace!anglemeta(num)]] \end{dCmd} \CmdDescription The key \texttt{textfont} is the text font to be used with the text of the field, @@ -2258,17 +2315,34 @@ while \texttt{textsize} is the text size to be used. A value of 0 means auto siz The color of the text in the field. This can be in \textsf{G}, \textsf{RGB} or \textsf{CMYK} color space by specifying 1, 3 or 4 numbers between 0 and 1. -\settowidth{\aebdimen}{\ttfamily autocenter=yes|no} +\settowidth{\aebdimen}{\ttfamily autocenter=yes|no}% +\def\1{\llap{\Cs{autoCenter}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -autocenter=yes|no +!1autocenter=yes|no \end{dCmd} \CmdDescription This is a feature of \textsf{eforms}. Use \texttt{autocenter=yes} (the default) to moderately center the bounding box, and use \texttt{autocenter=no} otherwise. +\settowidth{\aebdimen}{\ttfamily inline=yes|no}% +\def\1{\llap{\Cs{inline}\hspace{\marginparsep}}}% +\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} +!1inline=yes|no +\end{dCmd} +\CmdDescription Same as \cs{autoCenter} (\texttt{autocenter}), but the algorithm +for positioning the field is more sophisticated. The default is \verb|autocenter=no| + +To compare the last two (\texttt{autocenter} and \texttt{inline}), we present the following example: +\begin{quote}\settowidth{\dimen0}{Enter your first name:\ }% +\underbar{Enter your name:\ \textField[\V{D. P. Story}\DV{D. P. Story}\inline{y}]{ILtxt}{1.25in}{14bp}}\cgBdry[3bp](\texttt{inline=yes})\\[6bp] +\underbar{Enter your name:\ \textField[\V{D. P. Story}\DV{D. P. Story}]{ACtxt}{1.25in}{14bp}}\cgBdry[3bp](\texttt{autoCenter=yes}) +\end{quote} + + \settowidth{\aebdimen}{\ttfamily presets=\meta{\string\CMD}} +\def\1{\llap{\Cs{presets}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -presets=!meta(\CMD) +!1presets=!meta(\CMD) \end{dCmd} \CmdDescription Set presets from inside a \cs{ui} argument. The value of \cs{ui} must be a user defined command, which expands to a comma-delimited list of ui-key-value pairs. @@ -2289,9 +2363,10 @@ Later, we can type, \setLink[\ui{presets={\myUIOpts}}]{Press Me Again!!} \end{dCmd*} -\settowidth{\aebdimen}{\ttfamily symbolchoice=check|circle|cross|diamond|square|star} +\settowidth{\aebdimen}{\ttfamily symbolchoice=check|circle|cross|diamond|square|star}% +\def\1{\llap{\Cs{symbolchoice}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -symbolchoice=check|circle|cross|diamond|square|star +!1symbolchoice=check|circle|cross|diamond|square|star \end{dCmd} \CmdDescription Used with a checkbox or radio button field. This sets the symbol that appears in the field when the box is checked. Choices are @@ -2339,7 +2414,7 @@ and to pages and destinations to another PDF file. these are \item \texttt{view}: The view can be set when the \texttt{page} key is used. Possible values are \texttt{fitpage}, \texttt{actualsize}, \texttt{fitwidth}, \texttt{fitvisible}, and \texttt{inheritzoom}. - These terms correspond to Acrobat's UI. When jumping to a + These terms correspond to \app{Acrobat}'s UI. When jumping to a destination, the view is set by the destination code. \item \texttt{open}: This key is used when you specify the \texttt{file} key. The @@ -2376,9 +2451,10 @@ these are handled by the \textsf{eforms} package. \end{itemize} -\settowidth{\aebdimen}{\ttfamily js=\darg{\anglemeta{script}}} +\settowidth{\aebdimen}{\ttfamily js=\darg{\anglemeta{script}}}% +\def\1{\llap{\ttfamily\Cs{A}\darg{\Cs{JS}\darg{\anglemeta{script}}}\hspace{\marginparsep}}}% \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -js={!anglemeta(script)} +!1js={!anglemeta(script)} \end{dCmd} \CmdDescription A general purpose key to execute JavaScript actions on a mouse up trigger. The argument is a JavaScript text string, for example, @@ -2436,8 +2512,9 @@ JavaScript code (\anglemeta{script}). as readonly (locked). The locked key controls that option. \settowidth{\aebdimen}{\ttfamily lock=\darg{\anglemeta{PDF KV-pairs}}} +\def\1{\llap{\Cs{Lock}\hspace{\marginparsep}}}%Lock \begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule} -lock={!anglemeta(PDF KV-pairs)} +!1lock={!anglemeta(PDF KV-pairs)} \end{dCmd} \CmdDescription The \texttt{lock} key is used with signature fields, currently, there is @@ -2577,7 +2654,7 @@ The syntax for \cs{setStructTabOrder} is of a previously defined PDF object, such as a form field (widget), a link, or an annotation. The optional argument takes two optional key-value pairs: (1) The type is a declaration of the type the PDF object is, the default is \texttt{Form} (you can use \texttt{Link} if its a link, and \texttt{Annot} if its a comment); -(2) \texttt{title} is the title of the structure, the value of title appears in the Tags panel of the Acrobat +(2) \texttt{title} is the title of the structure, the value of title appears in the Tags panel of the \app{Acrobat} user interface. The default title is to have no title. \newtopic The demo file is \marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr @@ -2624,32 +2701,33 @@ b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=334}{settaborder1.pdf}} for The \hypertarget{\pkg{insdljs}}{insdljsPkg} package provides support to {\LaTeX} in four areas: \begin{enumerate} - \item for embedding document level JavaScript into the PDF file created from a {\LaTeX} source, - the \texttt{insDLJS} environment. - \item for creating open page actions that are executed when the document is first opened to the first - page, the \cs{OpenAction} command. - \item for writing JavaScript code in an environment that preserves the formatting of the code, - this is the \texttt{defineJS} environment. - \item for executing JavaScript code once to perform post - distill tasks, this is the \texttt{execJS} environment. This environment works only for document - authors that use Acrobat/Acrobat Distiller to create PDF files. + \item for embedding document level JavaScript into the PDF file created + from a {\LaTeX} source, the \texttt{insDLJS} environment. + \item for creating open page actions that are executed when the document + is first opened to the first page, the \cs{OpenAction} command. + \item for writing JavaScript code in an environment that preserves the + formatting of the code, this is the \texttt{defineJS} environment. + \item for executing JavaScript code once to perform post-distillation + tasks, this is the \texttt{execJS} environment. This environment + works only for document authors that use \app{Acrobat}/\app{Acrobat} + Distiller to create PDF files. \end{enumerate} \newtopic This package defines a new environment, \texttt{insDLJS}, used -for inserting Acrobat JavaScript into a PDF file created from a \LaTeX{} -source. This package works correctly for users of \textsf{pdftex} (and -luatex), \textsf{dvipdfm}, \textsf{dvipdfmx}, and \texttt{xetex}. For -those that use the \textsf{Acrobat Distiller} (specifically, those that -use either \textsf{dvips} or \textsf{dvipsone} to produce a postscript -file, which is then distilled), you are required to have Acrobat~5.0 (or -later). +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\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). \section{Package Options} The \textsf{insdljs} supports five common ``drivers'': \texttt{dvipsone}, \texttt{dvips}, \texttt{pdftex} (including the executable \textsf{lu(la)tex}), \texttt{dvipdfm}, \texttt{dvipdfmx}, \texttt{xetex}, and \texttt{tex\-tures}. When using -\texttt{dvipsone} or \texttt{dvips}, Acrobat Distiller and Acrobat +\texttt{dvipsone} or \texttt{dvips}, \app{Acrobat} Distiller and \app{Acrobat} (version 5.0 or later) are required to embed the JavaScripts at the document level. The other drivers have primitives that allow the embedding of the JavaScripts. @@ -2662,7 +2740,7 @@ of the JavaScripts. \item\NH\texttt{execJS} is a very useful option/feature if you know how to use it. Any JavaScript that is written in an \env{execJS} environment is - executed once when the document is first opened in Acrobat, then + 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. @@ -2745,14 +2823,14 @@ braces are set to normal characters, so the commands can't have any argument, they should be just text macros. \PD The environment takes three parameters, the first is optional, but required -when using the Acrobat Distiller. +when using the \app{Acrobat} Distiller. \begin{description}\def\NH{\hspace{-\labelsep}}% \item\NH\texttt{[\meta{js\_var}]} is an optional parameter \emph{was required} for the \texttt{dvipsone} and \texttt{dvips} options; otherwise it is ignored. Its value must be the name of one of the functions or JavaScript variables defined in the environment. This is used to detect whether the - \textsf{DLJS} has already been loaded by Acrobat. + \textsf{DLJS} has already been loaded by \app{Acrobat}. \handpoint The \texttt{[\meta{js\_var}]} is now optional even for users of \textsf{dvipsone} and \textsf{dvips}. If one is not @@ -2767,7 +2845,7 @@ when using the Acrobat Distiller. \item\NH\meta{script\_name} is the name of the JavaScript that you are embedding in the document. This title will appear in the document - JavaScript dialog in Acrobat; unless you use Acrobat, you can't + JavaScript dialog in \app{Acrobat}; unless you use \app{Acrobat}, you can't see this name in the user interface anyway. The \meta{script\_name} should be a string that is descriptive of the functionality of the code. @@ -2835,7 +2913,7 @@ The \texttt{insDLJS*} environment can be used to better organize, edit and debug your JavaScript. It is suitable for package developers who write a large amount of code package application. -If you have the full Acrobat product, you can open the DLJS edit +If you have the full \app{Acrobat} product, you can open the DLJS edit dialog. There you will see a listing of all DLJS contained in the document. When you double click on one of the \textit{script names}, you enter the edit window, where you can edit all JavaScript @@ -2860,7 +2938,7 @@ contained under that name. \end{dCmd} \egroup \PD The environment takes two parameters, the first is optional, but required -when using the Acrobat Distiller. The nested environment \texttt{newsegment} takes +when using the \app{Acrobat} Distiller. The nested environment \texttt{newsegment} takes one required parameter. \begin{description}\def\NH{\hspace{-\labelsep}} \item\NH\texttt{[\meta{js\_var}]} is an optional parameter, its use is discouraged. @@ -2869,7 +2947,7 @@ one required parameter. limited to eight characters. It is used to build the names of auxiliary files and to build the names of macros used by the environment. \item\NH\meta{script\_name\_i} is the script name (title) that appears in - the Document level JavaScript dialog of Acrobat. + the Document level JavaScript dialog of \app{Acrobat}. \end{description} \subsection{Escaping} @@ -2935,29 +3013,31 @@ and returns \texttt{true} if such a pattern is found, \texttt{false} otherwise. If \verb!str="(x+1)^(3)"!, the search returns \texttt{true}. \subsection{Access and Debugging} -For those who do not have \textsf{Acrobat}, the application, +For those who do not have \textsf{\app{Acrobat}}, the application, unless you are writing very simple code, writing and debugging -JavaScript will be very difficult. From the Acrobat Reader, +JavaScript will be very difficult. From the \app{Acrobat} Reader, there is no access to the document JavaScript. You will be pretty much writing blind. -Normally, I develop the JavaScript from within Acrobat. The GUI editor +Normally, I develop the JavaScript from within \app{Acrobat}. The GUI editor does check for syntax errors, giving you a chance to correct some simple errors as you go. After I am satisfied with my code, I copy it from the editor and paste it into a \texttt{insDLJS} environment. This is how the JavaScript code of \textsf{exerquiz} was developed. In my opinion, if you want to develop rather complicated code, having the -full Acrobat product is a must. (This implies that the Windows or Mac +full \app{Acrobat} product is a must. (This implies that the Windows or Mac platform is needed!) \subsection{JavaScript References} -The JavaScript used by Acrobat consists of the core JavaScript plus Acrobat's JavaScript extensions. -The \textit{Core JavaScript Reference}~\cite{tech:NetscapeJSReference} may be found at \mlhref{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}. -The documentation for the Acrobat extensions may be found in the guides \textit{JavaScript for Acrobat API Reference}~\cite{tech:AcroJSRef} -and \textit{Developing Acrobat Applications using JavaScript}~\cite{tech:AcroJSGuide}, both of which I've had a hand in writing. These -are found at \href{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center}. (Click on \textbf{JavaScript for Acrobat} in the right-hand navigation panel.) +The JavaScript used by \app{Acrobat} consists of the core JavaScript plus \app{Acrobat}'s JavaScript extensions. +The \textit{Core JavaScript Reference}~\cite{tech:NetscapeJSReference} may be found at +\mlhref{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}. +The documentation for the \app{Acrobat} extensions may be found in the guides +\textit{JavaScript for \app{Acrobat} API Reference}~\cite{tech:AcroJSRef} +and \textit{Developing \app{Acrobat} Applications using JavaScript}~\cite{tech:AcroJSGuide}, both of which I've had a hand in writing. These +are found at \href{http://www.adobe.com/devnet/acrobat/}{\app{Acrobat} Developer Center}. (Click on \textbf{JavaScript for \app{Acrobat}} in the right-hand navigation panel.) \section{Open Action} @@ -3035,9 +3115,9 @@ the \cs{OpenAction} command. This is an environment useful to PDF developers who want to tap into the power of JavaScript. To use this environment, the developer -needs Acrobat~5.0 or higher. \textsf{pdftex} or \textsf{dvipdfm} can +needs \app{Acrobat}~5.0 or higher. \textsf{pdftex} or \textsf{dvipdfm} can be used to produce the PDF document, but the developer needs -the Acrobat product for this environment to do anything. +the \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{pdftex} @@ -3050,7 +3130,7 @@ verbatim JavaScript code. This environment is a variation on \textsf{insdljs}, it writes a couple of auxiliary files to disk; in particular, the environment creates an \texttt{.fdf} file. When the newly produced PDF is loaded for the first time into the viewer -(Acrobat, not Reader), the \texttt{.fdf} file generated +(\app{Acrobat}, not Reader), the \texttt{.fdf} file generated by the \textsf{execJS} environment is imported, and the JavaScript executed. This JavaScript is \emph{not} saved with the document. The syntax of this environment is\dots @@ -3101,7 +3181,7 @@ aebAddWatermarkFromFile = app.trustPropagatorFunction ( }); \end{Verbatim} -Once this code is installed in the user JavaScript folder, and Acrobat is re-started, the code +Once this code is installed in the user JavaScript folder, and \app{Acrobat} is re-started, the code is ready to be used. The way the code is used is with the \texttt{execJS} environment. \begin{Verbatim}[xleftmargin=\amtIndent] @@ -3114,7 +3194,7 @@ is ready to be used. The way the code is used is with the \texttt{execJS} enviro \newtopic This is the code used to prepare this manual. It places a background graphic on each page of the document. When the newly -distilled document is first opened in Acrobat, (version 7.0 or +distilled document is first opened in \app{Acrobat}, (version 7.0 or higher, is when the privilege bit started to appear), the trusted function \texttt{aebTrustedFunctions} is executed with its arguments. Looking at the definition of @@ -3211,7 +3291,7 @@ FLock & locked field (PDF 1.4)\\ \end{center} \medskip\noindent -In the user interface for Acrobat, there are four visibility +In the user interface for \app{Acrobat}, there are four visibility attributes for a form field. The table below is a list of these, and an indication of how each visibility attribute can be attained through the \textsf{F}. @@ -3276,7 +3356,7 @@ FfRichText? & rich text (PDF 1.5) & text\\ Below is a list of the keys supported for modifying the appearance or for creating an action of a field. If the default value of a key is empty, e.g., \verb+\Ff{}+, then that key does not appear in -the widget. The Acrobat viewer may have a default when any +the widget. The \app{Acrobat} viewer may have a default when any particular key does not appear, e.g. \verb+\W{}+ will be interpreted as \verb+\W{1}+ by the viewer. @@ -3333,6 +3413,10 @@ A? & Action dictionary, use this to define JavaScript actions, as well as o & \verb+\A{}+\newline(no action)\\ Border? & Used with link annotations, an array of three numbers and an optional dash array. If all three numbers are 0, no border is drawn &\verb+\Border{0 0 0}+\newline (no border)\\ +D? & (link annotations) An array of two numbers that set the dash pattern of a link annotation. + The default is 3, which means 3 points of line, 3 points gap. + A value of \cs{D\darg{3 2}} means three points of line, followed + by two points of space.\\ AP? & Appearance dictionary, used mostly in {\AcroT} with check boxes to define the `On' value. &\verb+\AP{}+\\ AS? & Appearance state, normally used with check boxes and radio buttons when there are @@ -3425,8 +3509,11 @@ Lock? & This key is used to lock fields after the signature field is rawPDF? & If all else fails, you can always introduce key-value pairs through this variable. &\verb+\rawPDF{}+\\ autoCenter? & There is a centering code that attempts to give a pleasant - placement of the field. Say \verb+\autoCenter{n}+ to - turn this off.&\\ + placement of the field. \verb+\autoCenter{n}+ + turn auto centering off.&\\ +inline? & If \mlcs{inline\darg{y}}, an alternate method is used + get a better vertical positioning. Designed for inline form fields. + The default is \mlcs{inline\darg{n}}.\\ presets? & This commands takes a macro as its argument, the text of the macro are key-value pairs. This is useful for setting up a series of presets for fields. Example, \verb|\presets{\myFavFive}|\\ @@ -3444,13 +3531,13 @@ linktxtcolor? & The value of this variable is a named color and is the \end{longtable} \endgroup -%The JavaScript used by Acrobat consists of the core JavaScript plus Acrobat's JavaScript extensions. +%The JavaScript used by \app{Acrobat} consists of the core JavaScript plus \app{Acrobat}'s JavaScript extensions. %Core JavaScript can be found at \href{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}.\footnote %{\url{http://developer.mozilla.org/en/docs/JavaScript}} -%and documentation of the Acrobat extensions can be found in the guides \texttt{JavaScript for Acrobat API Reference} -%and \emph{Developing Acrobat Applications using JavaScript}, both of which I've had a hand in writing. These -%can be found at the \href{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center},\footnote -%{\url{http://www.adobe.com/devnet/acrobat/}}. Click on \textbf{JavaScript for Acrobat} in the right-hand navigation panel. +%and documentation of the \app{Acrobat} extensions can be found in the guides \texttt{JavaScript for \app{Acrobat} API Reference} +%and \emph{Developing \app{Acrobat} Applications using JavaScript}, both of which I've had a hand in writing. These +%can be found at the \href{http://www.adobe.com/devnet/acrobat/}{\app{Acrobat} Developer Center},\footnote +%{\url{http://www.adobe.com/devnet/acrobat/}}. Click on \textbf{JavaScript for \app{Acrobat}} in the right-hand navigation panel. \newpage @@ -3466,17 +3553,17 @@ linktxtcolor? & The value of this variable is a named color and is the \textit{Core JavaScript Reference} available from \href{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}. \bibitem{tech:AcroJSGuide} - \textit{Developing Acrobat Applications using JavaScript}, available from - \mlhref{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center} + \textit{Developing \app{Acrobat} Applications using JavaScript}, available from + \mlhref{http://www.adobe.com/devnet/acrobat/}{\mbox{\app{Acrobat}} Developer Center}. \bibitem{tech:AcroJSRef}\hypertarget{references}{}% - \textit{JavaScript for Acrobat API Reference},available from - \href{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center} + \textit{JavaScript for \app{Acrobat} API Reference},available from + \href{http://www.adobe.com/devnet/acrobat/}{\app{Acrobat} Developer Center}. \bibitem{tech:PDFRef} \textit{PDF Reference, sixth edition, PDF 1.7}, available from - \href{http://www.adobe.com/devnet/acrobat/}{Acrobat Developer Center} + \href{http://www.adobe.com/devnet/acrobat/}{\app{Acrobat} Developer Center}. \end{thebibliography} diff --git a/texmf-dist/source/latex/acrotex/eforms.dtx b/texmf-dist/source/latex/acrotex/eforms.dtx index 7f949e23..0c5a49da 100644 --- a/texmf-dist/source/latex/acrotex/eforms.dtx +++ b/texmf-dist/source/latex/acrotex/eforms.dtx @@ -4,7 +4,7 @@ %<*copyright> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% eForms package, %% -%% Copyright (C) 2002-2017 D. P. Story %% +%% Copyright (C) 2002-2018 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -16,15 +16,25 @@ % %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{eforms} -% [2017/02/27 v2.9l Provides general eforms support (dps)] +% [2018/03/22 v2.9.19 Provides general eforms support (dps)] %<*driver> \documentclass{ltxdoc} -\usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12] % to support calculate for pdfyrc +\usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12] \pdfstringdefDisableCommands{\let\\\textbackslash} \OnlyDescription \EnableCrossrefs \CodelineIndex \RecordChanges +\bgroup\ttfamily +\gdef\brpr#1{\char123\relax#1\char125\relax}\egroup +\let\darg\brpr +\let\env\texttt +\let\opt\texttt +\let\app\textsf +\def\visispace{\symbol{32}} +\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}} +\def\meta#1{\textsl{\texttt{#1}}} +\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}} \def\ltag{<}\def\rtag{>} \let\app\textsf\let\pkg\textsf \InputIfFileExists{aebdocfmt.def}{\PackageInfo{eforms}{Inputting aebdocfmt.def}} @@ -80,9 +90,11 @@ % Set the driver dependent code for the |quiz| environments. % % \changes{v2.5o}{2012/06/18}{Added required package \string\textsf{ifpdf}} +% \changes{v2.9m}{2017/09/03}{Added the ifluatex package} % \begin{macrocode} \RequirePackage{ifpdf}[2006/02/20] \RequirePackage{ifxetex}[2006/08/21] +\RequirePackage{ifluatex} % \end{macrocode} % \changes{v2.6c}{2014/02/18}{Added the \string\textsf{calc} package as required package.} % \begin{macrocode} @@ -117,6 +129,14 @@ % \PassOptionsToPackage{pdftex}{insdljs} % \PassOptionsToPackage{pdftex}{hyperref} } +% \end{macrocode} +% Added \textsf{luatex} option +% \changes{v2.9m}{2017/09/03}{Add luatex option} +% \begin{macrocode} +\DeclareOption{luatex}{% + \def\eq@drivernum{1}\def\eq@driver{luatex}% + \def\eq@drivercode{epdftex.def}\def\ef@driver{luatex}% +} % \end{macrocode}% % Set the drivers for \texttt{dvipdfm}\IndexOpt{dvipdfm}. \texttt{dvipdfmx}\IndexOpt{dvipdfmx}, % and \texttt{xetex}\IndexOpt{xetex}. @@ -205,6 +225,7 @@ \let\inputCalcOrderJS\relax % \end{macrocode} % \changes{v2.5o}{2012/06/18}{Added automatic test for \string\textsf{pdftex}.} +% \changes{v2.9m}{2017/09/03}{Added a check for \string\textsf{lualtex}} % \begin{macrocode} \@ifpackageloaded{web}{% \ExecuteOptions{\eq@driver@name}% @@ -212,10 +233,11 @@ \@ifpackageloaded{exerquiz}{% \ExecuteOptions{\eq@driver}% }{% + \ifluatex\ExecuteOptions{luatex}\else \ifpdf\ExecuteOptions{pdftex}\else \ifxetex\ExecuteOptions{xetex}\else \@ifundefined{l@tex@@@@driver}{\ExecuteOptions{dvips}} - {\ExecuteOptions{dvipsone}}\fi\fi + {\ExecuteOptions{dvipsone}}\fi\fi\fi }% } % \end{macrocode} @@ -292,6 +314,7 @@ \@ifundefined{eq@tmpdima}{\newdimen\eq@tmpdima}{} \@ifundefined{eq@tmpdimb}{\newdimen\eq@tmpdimb}{} \newlength\ef@dimena +\newtoks\ef@scratchtoks % \end{macrocode} % (2016/12/22) Added switches \cs{ifmakeXasPD} and \cs{ifmakePDasX}, if true, the form fields created % by \app{xetex} (\app{pdflatex/Distiller}) @@ -312,12 +335,16 @@ % \DescribeMacro\previewColor sets the color of the preview bounding rectangle. The % default is black. Used mostly by the \textsf{eqexam} package with the \texttt{online} % option. -% \begin{macrocode} -\providecommand\previewColor{black} -\def\ef@Bbox#1#2{% - \hbox{\ifpreview\setlength\fboxrule{0.4pt}\setlength\fboxsep{0pt}% +% \changes{v2.9o}{2017/10/10}{Removed \string\cs{previewColor} in favor of +% \string\cs{ckboxColor}} +% \begin{macrocode} +\providecommand\ckboxColor[1]{\def\@rgi{#1}\ifx\@rgi\@empty + \let\ckbox@Color\relax\else + \def\ckbox@Color{\color{#1}}\fi}\let\ckbox@Color\relax +\def\ef@Bbox#1#2{\hbox{\ifpreview + \setlength\fboxrule{0.4pt}\setlength\fboxsep{0pt}% \@tempdima=#1\advance\@tempdima by-\fboxrule - \@tempdimb=#2\advance\@tempdimb by-\fboxrule\color{\previewColor}% + \@tempdimb=#2\advance\@tempdimb by-\fboxrule \ckbox@Color \fbox{\parbox[b][\@tempdimb][c]{\@tempdima}{\hfill\vfill}}\else \parbox[b][#2][c]{#1}{\hfill\vfill}\fi}% } @@ -663,8 +690,9 @@ % \cs{mlhypertext}. % \begin{macrocode} \def\ef@searchmlLink#1\mlLink#2#3\@nil{\def\ef@argii{#2}% - \ifx\ef@argii\ef@end\let\ef@mlLink=0\else - \ifx\ef@argii\ef@true\let\ef@mlLink=1\else\let\ef@mlLink=0\fi\fi} + \ifx\ef@argii\ef@end\let\ef@mlLink\ef@Zero\else + \ifx\ef@argii\ef@true\let\ef@mlLink\ef@One\else + \let\ef@mlLink\ef@Zero\fi\fi} % \end{macrocode} % Search for \texttt{/GoToR}, if found, change the link color to |\@filecolor| % \begin{macrocode} @@ -732,7 +760,7 @@ % \cs{mlhypertext} from \texttt{aeb\_mlink}, if that package is loaded. % \begin{macrocode} \def\@eqmlLink#1{\def\eq@arg{#1}\ifx\eq@arg\ef@true - \let\ef@mlLink=1\else\let\ef@mlLink=0\fi} + \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 @@ -1341,7 +1369,7 @@ \fi\fi} \let\autoCenter\ef@y % \end{macrocode} -% \DescribeMacro{\inline} The if |\inline{y}|, then we attempt to +% \DescribeMacro{\inline} If |\inline{y}|, then we attempt to % get a better vertical positioning. Designed for inline form fields. % \changes{v2.5h}{2012/11/17}{Introduce the \string\cs{inline} key designed for % inline form fields.} @@ -1381,24 +1409,367 @@ \edef\symbol@choice{\csname eq@#1\endcsname}\fi } % \end{macrocode} +%\DescribeMacro{\mlfix} When set to \texttt{y}, contiguous boxes are combined. This is for +%multi-line hyperlinks. Recognizable values are \texttt{y} and \texttt{n}. contiguous boxes +%are combined by default. There are command versions of \cs{mlfix}, these are +%\DescribeMacro{\mlfixOn} and \DescribeMacro{\mlfixOff} +%\changes{v2.9.16}{2018/03/08}{Added \string\cs{mlfix} for multiline links} +%\changes{v2.9.19}{2018/03/22}{Added \string\cs{relax} following width dimension +% in \string\cs{@eqmlstrut}} +% \begin{macrocode} +\newif\iffixmlinks \fixmlinkstrue +\def\mlfixOn{\fixmlinkstrue} +\def\mlfixOff{\fixmlinksfalse} +\def\@eqmlfix#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y + \mlfixOn\else\ifx\ef@arg\ef@n + \mlfixOff\else\mlfixOn + \PackageWarning{eforms}{The value of '#1' is not a + supported value\MessageBreak for \string\mlfix.\MessageBreak + Using the default of 'y'}% + \fi\fi} +\newbox\mlstrutbox +% \end{macrocode} +% \DescribeMacro{\mlstrut}\hskip-\marginparsep\texttt{\darg{\ameta{strut-amt}}} +% (2018/03/22) \cs{mlstrut} is used to adjust the height of a multi-line link, +% e.g., \verb!\mlstrut{\large\strut}! +% \changes{v2.9.19}{2018/03/22}{Added \string\cs{mlstrut} used +% to adjust the height of a multi-line link} +% \begin{macrocode} +\def\@eqmlstrut#1{\setbox\mlstrutbox\hbox{#1}% + \def\ml@strut{\vrule \@height\ht\mlstrutbox + \@depth\dp\mlstrutbox + \@width\z@\relax}} +\def\ml@strut{\relax\ifmmode\copy\mlstrutbox\else + \unhbox\mlstrutbox\fi} +\@eqmlstrut{\strut} +% \end{macrocode} +% \DescribeMacro{\mlcrackat}\hskip-\marginparsep\texttt{\darg{\ameta{num}}} +% (2018/03/22) \cs{mlcrackat} is a link used to break a multi-line link across a page boundary; +% 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. +% \changes{v2.9.19}{2018/03/22}{Added \string\cs{mlcrackat}} +% \begin{macrocode} +\def\@eqmlcrackat#1{\def\eq@mlcrackat{#1}} +\let\eq@mlcrackat\@empty +% \end{macrocode} +% \DescribeMacro{\mlhyph}\hskip-\marginparsep\texttt{\darg{}} +% (2018/03/22) \cs{mlhyph} is used to add a hyphen when a multi-line link is cracked +% using \cs{mlcrackat}. The default is that no hyphen is produced. +% \changes{v2.9.19}{2018/03/22}{Added \string\cs{mlhyph}} +% \begin{macrocode} +\def\@eqmlhyph#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y + \def\eq@mlhyph{-}\else\ifx\ef@arg\ef@n + \let\eq@mlhyph\@empty\else\let\eq@mlhyph\@empty + \PackageWarning{eforms}{The value of '#1' is not a + supported value\MessageBreak for \string\mlhyph.\MessageBreak + Using the default of 'n'}\fi\fi} +\let\eq@mlhyph\@empty +% \end{macrocode} +% \DescribeMacro{\mlignore}\hskip-\marginparsep\texttt{\darg{}} +% (2018/03/22) \cs{mlignore} is an internal option used when breaking apart +% two multi-line links; not used with urls. +% \changes{v2.9.19}{2018/03/22}{Added \string\cs{mlignore}} +% \begin{macrocode} +\def\@eqmlignore#1{\let\eq@mlignore\ef@YES} +\let\eq@mlignore\ef@NO +% \end{macrocode} +% \begin{macrocode} +\def\@eqmlcrackinsat#1{\def\eq@mlcrackinsat{#1}} +\let\eq@mlcrackinsat\@empty +% \end{macrocode} % \DescribeMacro{\protect} A protect feature for protecting a key from begin changed % by the user through the optional arguments. % \begin{macrocode} \def\eq@protect#1{\let#1\@empty} % \end{macrocode} -% % \subsubsection{Support for Hex escapes in PDF names} +% \changes{v2.9p}{2017/10/10}{rework the support for Hex escapes in PDF names} % \begin{macrocode} \begingroup\catcode`\#=12 \catcode`*=6 -\gdef\HEXNAME{efHex} -\ifpdfmarkup\gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\else -\gdef\ef@Hx*1*2{#*1*2}\fi + \ifpdfmarkup + \gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\else + \gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\fi \endgroup +\def\efHxError{\PackageError{eforms}{The glyph is not supported}{}} +\def\HGERROR{efHxError} \ifpdfmarkup -\def\HexGlyph#1#2{\global\@namedef{efHex#1}{#2}} + \def\HexGlyph#1#2{\def\arg@ii{#2}\ifx\arg@ii\HGERROR + \global\@namedef{efHex#1}{\csname#2\endcsname}\else + \global\@namedef{efHex#1}{\expandafter + \string\csname#2\endcsname}\fi} +\else + \begingroup\catcode`\#=12 \catcode`*=6 + \gdef\HexGlyph*1*2{\def\arg@ii{*2}\ifx\arg@ii\HGERROR + \global\@namedef{efHex*1}{\csname*2\endcsname}\else + \global\@namedef{efHex*1}{#*1}\fi} + \endgroup +\fi \def\ef@inputPDFHEX{\InputIfFileExists{pdfdochex.def} - {\typeout{Inputtingpdfdochex.def}}{}} -\expandafter\ef@inputPDFHEX\fi + {\PackageInfo{eforms}{Inputting pdfdochex.def}}{}} +\AtEndOfPackage{\ef@inputPDFHEX} +% +%<*hexoctcodes> +% begin C0 Controls (U000.pdf) http://www.unicode.org/charts/PDF/ +\HexGlyph{00}{efHxError}%{000} +\HexGlyph{01}{efHxError}%{001} +\HexGlyph{02}{efHxError}%{002} +\HexGlyph{03}{efHxError}%{003} +\HexGlyph{04}{efHxError}%{004} +\HexGlyph{05}{efHxError}%{005} +\HexGlyph{06}{efHxError}%{006} +\HexGlyph{07}{efHxError}%{006} +\HexGlyph{08}{efHxError}%{008} +\HexGlyph{09}{efHxError}%{009} +\HexGlyph{0A}{efHxError}%{012} +\HexGlyph{0B}{efHxError}%{013} +\HexGlyph{0C}{efHxError}%{014} +\HexGlyph{0D}{efHxError}%{015} +\HexGlyph{0E}{efHxError}%{016} +\HexGlyph{0F}{efHxError}%{017} +\HexGlyph{10}{efHxError}%{020} +\HexGlyph{11}{efHxError}%{021} +\HexGlyph{12}{efHxError}%{022} +\HexGlyph{13}{efHxError}%{023} +\HexGlyph{14}{efHxError}%{024} +\HexGlyph{15}{efHxError}%{025} +\HexGlyph{16}{efHxError}%{026} +\HexGlyph{17}{efHxError}%{027} +% end C0 Controls (U000.pdf) +\HexGlyph{18}{030}% U+02D8 BREVE +\HexGlyph{19}{031}% U+02c7 CARON +\HexGlyph{1A}{032}% U+02c6 MODIFIER LETTER CIRCUMFLEX ACCENT +\HexGlyph{1B}{033}% U+02D9 DOT ABOVE +\HexGlyph{1C}{034}% U+02DD DOUBLE ACUTE ACCENT +\HexGlyph{1D}{035}% U+02DB OGONEK +\HexGlyph{1E}{036}% U+02DA RING ABOVEZ +\HexGlyph{1F}{037}% U+02DC SMALL TILDE +\HexGlyph{20}{040}% U+0020 SPACE +\HexGlyph{21}{041}% U+0021 EXCLAMATION MARK +\HexGlyph{22}{042}% U+0022 QUOTATION MARK +\HexGlyph{23}{043}% U+0022 NUMBER SIGN +\HexGlyph{24}{044}% U+0023 DOLLAR SIGN +\HexGlyph{25}{045}% U+002 PERCENT SIGN +\HexGlyph{26}{046}% U+0026 AMPERSAND +\HexGlyph{27}{047}% U+0027 APOSTROPHE +\HexGlyph{28}{050}% U+0028 LEFT PARENTHESIS +\HexGlyph{29}{051}% U+0029 RIGHT PAENTHESIS +\HexGlyph{2A}{052}% U+002A ASTERISK +\HexGlyph{2B}{053}% U+002B PLUS SIGN +\HexGlyph{2C}{054}% U+002C COMMA +\HexGlyph{2D}{055}% U+002D HYPHEN-MINUS +\HexGlyph{2E}{056}% U+002E FULL STOP +\HexGlyph{2F}{057}% U+002F SOLIDUS +\HexGlyph{30}{060}% U+0030 ZERO +\HexGlyph{31}{061}% U+0031 ONE +\HexGlyph{32}{062}% U+0032 TWO +\HexGlyph{33}{063}% U+0033 THREE +\HexGlyph{34}{064}% U+0034 FOUR +\HexGlyph{35}{065}% U+0035 FIVE +\HexGlyph{36}{066}% U+0036 SIX +\HexGlyph{37}{067}% U+0037 SEVEN +\HexGlyph{38}{070}% U+0038 EIGHT +\HexGlyph{39}{071}% U+0039 NINE +\HexGlyph{3A}{072}% U+003A COLON +\HexGlyph{3B}{073}% U+003B SEMICOLON +\HexGlyph{3C}{074}% U+003C LESS-THAN SIGN +\HexGlyph{3D}{075}% U+003D EQUALS SIGN +\HexGlyph{3E}{076}% U+003E GREATER-THAN SIGN +\HexGlyph{3F}{077}% U+003F QUESTION MARK +\HexGlyph{40}{100}% U+0040 COMMERCIAL AT +\HexGlyph{41}{101}% U+0041 CAPITAL LETTER A +\HexGlyph{42}{102}% U+0042 B +\HexGlyph{43}{103}% U+0043 C +\HexGlyph{44}{104}% U+0044 D +\HexGlyph{45}{105}% U+0045 E +\HexGlyph{46}{106}% U+0046 F +\HexGlyph{47}{107}% U+0047 G +\HexGlyph{48}{110}% U+0048 H +\HexGlyph{49}{111}% U+0049 I +\HexGlyph{4A}{112}% U+004A J +\HexGlyph{4B}{113}% U+004B K +\HexGlyph{4C}{114}% U+004C L +\HexGlyph{4D}{115}% U+004D M +\HexGlyph{4E}{116}% U+004E N +\HexGlyph{4F}{117}% U+004F O +\HexGlyph{50}{120}% U+0050 P +\HexGlyph{51}{121}% U+0051 Q +\HexGlyph{52}{122}% U+0052 R +\HexGlyph{53}{123}% U+0053 S +\HexGlyph{54}{124}% U+0054 T +\HexGlyph{55}{125}% U+0055 U +\HexGlyph{56}{126}% U+0056 V +\HexGlyph{57}{127}% U+0057 W +\HexGlyph{58}{130}% U+0058 X +\HexGlyph{59}{131}% U+0059 Y +\HexGlyph{5A}{132}% U+005A Z +\HexGlyph{5B}{133}% U+005B LEFT SQUARE BRACKET +\HexGlyph{5C}{134}% U+005C REVERSE SOLIDUS (BACKSLASH) +\HexGlyph{5D}{135}% U+005D RIGHT SQUARE BRACKET +\HexGlyph{5E}{136}% U+005E CIRCUMFLEX ACCENT +\HexGlyph{5F}{137}% U+005F LOW LINE +\HexGlyph{60}{140}% U+0060 GRAVE ACCENT +\HexGlyph{61}{141}% U+0061 LATIN SMALL LETTER a +\HexGlyph{62}{142}% U+0062 b +\HexGlyph{63}{143}% U+0063 c +\HexGlyph{64}{144}% U+0064 d +\HexGlyph{65}{145}% U+0065 e +\HexGlyph{66}{146}% U+0066 f +\HexGlyph{67}{147}% U+0067 g +\HexGlyph{68}{150}% U+0068 h +\HexGlyph{69}{151}% U+0069 i +\HexGlyph{6A}{152}% U+006A j +\HexGlyph{6B}{153}% U+006B k +\HexGlyph{6C}{154}% U+006C l +\HexGlyph{6D}{155}% U+006D m +\HexGlyph{6E}{156}% U+006E n +\HexGlyph{6F}{157}% U+006F o +\HexGlyph{70}{160}% U+0070 p +\HexGlyph{71}{161}% U+0071 q +\HexGlyph{72}{162}% U+0072 r +\HexGlyph{73}{163}% U+0073 s +\HexGlyph{74}{164}% U+0074 t +\HexGlyph{75}{165}% U+0075 u +\HexGlyph{76}{166}% U+0076 v +\HexGlyph{77}{167}% U+0077 w +\HexGlyph{78}{170}% U+0078 x +\HexGlyph{79}{171}% U+0079 y +\HexGlyph{7A}{172}% U+007A z +\HexGlyph{7B}{173}% U+007B LEFT CURLY BRACKET +\HexGlyph{7C}{174}% U+007C VERTICAL LINE +\HexGlyph{7D}{175}% U+007D RIGHT CURLY BRACKET +\HexGlyph{7E}{176}% U+007E TILDE +\HexGlyph{7F}{efHxError}% 177 UNDEFINED IN PDFDOCENC +\HexGlyph{80}{200}% U+2022 BULLET +\HexGlyph{81}{201}% U+2020 DAGGER +\HexGlyph{82}{202}% U+2021 DOUBLE DAGGER +\HexGlyph{83}{203}% U+2026 HORIZONTAL ELLIPSIS +\HexGlyph{84}{204}% U+2014 EM DASH +\HexGlyph{85}{205}% U+2013 EN DASH +\HexGlyph{86}{206}% U+0192 LATIN SMALL LETTER F WITH HOOK +\HexGlyph{87}{207}% U+2044 FRACTION SLASH +\HexGlyph{88}{210}% U+2039 SINGLE LEFT-POINTING ANGLE QUOTE MARK +\HexGlyph{89}{211}% U+203A SINGLE RIGHT-POINTING ANGLE QUOTE MARK +\HexGlyph{8A}{212}% U+2212 MINUS-SIGN +\HexGlyph{8B}{213}% U+2030 PER MILL SIGN +\HexGlyph{8C}{214}% U+201E DOUBLE LOW-9 QUOTE MARK +\HexGlyph{8D}{215}% U+201C LEFT DOUBLE QUOTE MARK +\HexGlyph{8E}{216}% U+201C RIGHT DOUBLE QUOTE MARK +\HexGlyph{8F}{217}% U+2018 LEFT SINGLE QUOTE MARK +\HexGlyph{90}{220}% U+2019 RIGHT SINGLE QUOTE MARK +\HexGlyph{91}{221}% U+201A SINGLE LOW-9 QUOTE MARK +\HexGlyph{92}{222}% U+2122 TRADE MARK SIGN +\HexGlyph{93}{223}% U+FB01 LATIN SMALL LIGATURE FI +\HexGlyph{94}{224}% U+FB02 LATIN SMALL LIGATURE FL +\HexGlyph{95}{225}% U+0141 LATIN CAPITAL LETTER L WITH STROKE +\HexGlyph{96}{226}% U+0152 LATIN CAPITAL LIGATURE OE +\HexGlyph{97}{227}% U+0160 LATIN CAPITAL LETTER S WITH CARON +\HexGlyph{98}{230}% U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS +\HexGlyph{99}{231}% U+017D LATIN CAPITAL LETTER Z WITH CARON +\HexGlyph{9A}{232}% U+0131 LATIN SMALL LETTER DOTLESS I +\HexGlyph{9B}{233}% U+0142 LATIN SMALL LETTER L WITH STROKE +\HexGlyph{9C}{234}% U+0153 LATIN SMALL LIGATURE OE +\HexGlyph{9D}{235}% U+0161 LATIN SMALL LETTER S WITH CARON +\HexGlyph{9E}{236}% U+017E LATIN SMALL LETTER Z WITH CARON +\HexGlyph{9F}{efHxError}% 237 UNDEF IN PDFDOCENC +\HexGlyph{A0}{240}% U+20AC EURO SIGN +\HexGlyph{A1}{241}% U+00A1 INVERTED EXCLAMATION MARK +\HexGlyph{A2}{242}% U+00A2 CENT SIGN +\HexGlyph{A3}{243}% U+00A3 POUND SIGN +\HexGlyph{A4}{244}% U+00A4 CURRENCY SIGN +\HexGlyph{A5}{245}% U+00A5 YEN SIGN +\HexGlyph{A6}{246}% U+00A6 BROKEN BAR +\HexGlyph{A7}{247}% U+00A7 SECTION SIGN +\HexGlyph{A8}{250}% U+00A8 DIAERESIS +\HexGlyph{A9}{251}% U+00A9 COPYRIGHT SIGN +\HexGlyph{AA}{252}% U+00AA FEMININE ORDINAL INDICATOR +\HexGlyph{AB}{253}% U+00AB LEFT-POINTING DOUBLE ANGLE QUOTE MARK +\HexGlyph{AC}{254}% U+00AC NOT SIGN +\HexGlyph{AD}{efHxError}% 255 UNDEFINED IN PDFDOCENC +\HexGlyph{AE}{256}% U+00AE REGISTERED SIGN +\HexGlyph{AF}{257}% U+00AF MACRON +\HexGlyph{B0}{260}% U+00B0 DEGREE SIGN +\HexGlyph{B1}{261}% U+00B1 PLUS-MINUS SIGN +\HexGlyph{B2}{262}% U+00B2 SUPERSCRIPT 2 +\HexGlyph{B3}{263}% U+00B3 SUPERSCRIPT 3 +\HexGlyph{B4}{264}% U+00B4 ACUTE ACCENT +\HexGlyph{B5}{265}% U+00B5 MICRO SIGN +\HexGlyph{B6}{266}% U+00B6 PILCROW SIGN (PARAGRAPH SIGN) +\HexGlyph{B7}{267}% U+00B7 MIDDLE DOT +\HexGlyph{B8}{270}% U+00B8 CEDILLA +\HexGlyph{B9}{271}% U+00B9 SUPERSCRIPT ONE +\HexGlyph{BA}{272}% U+00BA MASCULINE ORDINAL INDICATOR +\HexGlyph{BB}{273}% U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTE MARK +\HexGlyph{BC}{274}% U+00BC VULGAR FRACTION ONE QUARTER +\HexGlyph{BD}{275}% U+00BD VULGAR FRACTION ONE HALF +\HexGlyph{BE}{276}% U+00BE VULGAR FRACTION THREE QUARTERS +\HexGlyph{BF}{277}% U+00BF INVERTED QUESTION MARK +\HexGlyph{C0}{300}% U+00C0 LATIN CAPITAL LETTER A WITH GRAVE +\HexGlyph{C1}{301}% U+00C1 LATIN CAPITAL LETTER A WITH ACUTE +\HexGlyph{C2}{302}% U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX +\HexGlyph{C3}{303}% U+00C3 LATIN CAPITAL LETTER A WITH TILDE +\HexGlyph{C4}{304}% U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS +\HexGlyph{C5}{305}% U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE +\HexGlyph{C6}{306}% U+00C6 LATIN CAPITAL LETTER AE +\HexGlyph{C7}{307}% U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA +\HexGlyph{C8}{310}% U+00C8 LATIN CAPITAL LETTER E WITH GRAVE +\HexGlyph{C9}{311}% U+00C9 LATIN CAPITAL LETTER E WITH ACUTE +\HexGlyph{CA}{312}% U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX +\HexGlyph{CB}{313}% U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS +\HexGlyph{CC}{314}% U+00CC LATIN CAPITAL LETTER I WITH GRAVE +\HexGlyph{CD}{315}% U+00CD LATIN CAPITAL LETTER I WITH ACUTE +\HexGlyph{CE}{316}% U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX +\HexGlyph{CF}{317}% U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS +\HexGlyph{D0}{320}% U+00D0 LATIN CAPITAL LETTER ETH +\HexGlyph{D1}{321}% U+00D1 LATIN CAPITAL LETTER D WITH TILDE +\HexGlyph{D2}{322}% U+00D2 LATIN CAPITAL LETTER O WITH GRAVE +\HexGlyph{D3}{323}% U+00D3 LATIN CAPITAL LETTER O WITH ACUTE +\HexGlyph{D4}{324}% U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX +\HexGlyph{D5}{325}% U+00D5 LATIN CAPITAL LETTER O WITH TILDE +\HexGlyph{D6}{326}% U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS +\HexGlyph{D7}{327}% U+00D7 MULTIPLICATION SIGN +\HexGlyph{D8}{330}% U+00D8 LATIN CAPITAL LETTER O WITH STROKE +\HexGlyph{D9}{331}% U+00D9 LATIN CAPITAL LETTER U WITH GRAVE +\HexGlyph{DA}{332}% U+00DA LATIN CAPITAL LETTER U WITH ACUTE +\HexGlyph{DB}{333}% U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX +\HexGlyph{DC}{334}% U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS +\HexGlyph{DD}{335}% U+00DD LATIN CAPITAL LETTER Y WITH ACUTE +\HexGlyph{DE}{336}% U+00DE LATIN CAPITAL LETTER THORN +\HexGlyph{DF}{337}% U+00DF LATIN CAPITAL LETTER SHARP S (Eszett) +\HexGlyph{E0}{340}% U+00E0 LATIN SMALL LETTER A WITH GRAVE +\HexGlyph{E1}{341}% U+00E1 LATIN SMALL LETTER A WITH ACUTE +\HexGlyph{E2}{342}% U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX +\HexGlyph{E3}{343}% U+00E3 LATIN SMALL LETTER A WITH TILDE +\HexGlyph{E4}{344}% U+00E4 LATIN SMALL LETTER A WITH DIAERESIS +\HexGlyph{E5}{345}% U+00E5 LATIN SMALL LETTER A WITH RING ABOVE +\HexGlyph{E6}{346}% U+00E6 LATIN SMALL LETTER AE +\HexGlyph{E7}{347}% U+00E7 LATIN SMALL LETTER C WITH CEDILLA +\HexGlyph{E8}{350}% U+00E8 LATIN SMALL LETTER E WITH GRAVE +\HexGlyph{E9}{351}% U+00E9 LATIN SMALL LETTER E WITH ACUTE +\HexGlyph{EA}{352}% U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX +\HexGlyph{EB}{353}% U+00EB LATIN SMALL LETTER E WITH DIAERESIS +\HexGlyph{EC}{354}% U+00EC LATIN SMALL LETTER I WITH GRAVE +\HexGlyph{ED}{355}% U+00ED LATIN SMALL LETTER I WITH ACUTE +\HexGlyph{EE}{356}% U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX +\HexGlyph{EF}{357}% U+00EF LATIN SMALL LETTER I WITH DIAERESIS +\HexGlyph{F0}{360}% U+00F0 LATIN SMALL LETTER ETH +\HexGlyph{F1}{361}% U+00F1 LATIN SMALL LETTER N WITH TILDE +\HexGlyph{F2}{362}% U+00F2 LATIN SMALL LETTER O WITH GRAVE +\HexGlyph{F3}{363}% U+00F3 LATIN SMALL LETTER O WITH ACUTE +\HexGlyph{F4}{364}% U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX +\HexGlyph{F5}{365}% U+00F5 LATIN SMALL LETTER O WITH DIAERESIS +\HexGlyph{F6}{366}% U+00F6 LATIN SMALL LETTER C WITH ETH +\HexGlyph{F7}{367}% U+00F7 DIVISION SIGN +\HexGlyph{F8}{270}% U+00F8 LATIN SMALL LETTER O WITH STROKE +\HexGlyph{F9}{271}% U+00F9 LATIN SMALL LETTER U WITH GRAVE +\HexGlyph{FA}{272}% U+00FA LATIN SMALL LETTER U WITH ACUTE +\HexGlyph{FB}{273}% U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX +\HexGlyph{FC}{374}% U+00FC LATIN SMALL LETTER U WITH DIAERESIS +\HexGlyph{FD}{375}% U+00FD LATIN SMALL LETTER Y WITH ACUTE +\HexGlyph{FE}{376}% U+00FE LATIN SMALL LETTER C THORN +\HexGlyph{FF}{377}% U+00FF LATIN SMALL LETTER Y WITH DIAERESIS +% +%<*package> % \end{macrocode} % \subsubsection{Parsing PDF Color} % @@ -1979,15 +2350,19 @@ % (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}}. % \begin{macrocode} +\newcommand{\efSupprIndent}{\ef@scratchtoks=\expandafter{\the\everypar}% + \everypar{{\setbox\z@\lastbox}\clubpenalty\@M + \everypar=\expandafter{\the\ef@scratchtoks}}} \newcommand\volBdry{\bgroup\parskip0pt\relax\@@par\nointerlineskip - \olBdry\noindent\egroup} + \olBdry\egroup\efSupprIndent} \newcommand\vcgBdry{\@ifstar{\edef\ef@offset{\the\parskip}\vcgBdry@i} {\def\ef@offset{0pt}\vcgBdry@i}} \newcommand\vcgBdry@i[1][0bp]{\bgroup \setlength{\ef@dimena}{#1-\ef@offset}\parskip0pt\relax - \par\nointerlineskip\cgBdry[\ef@dimena]\noindent - \egroup\ignorespaces} + \par\nointerlineskip\cgBdry[\ef@dimena]% + \egroup\ignorespaces\efSupprIndent} % \end{macrocode} % % \subsection{Choice Fields}\label{choice} @@ -2577,7 +2952,7 @@ \eq@rawPDF % everything else } % \end{macrocode} -% The low-level link command and is the building block of all the +% \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} %\item[\texttt{\#1}:] Optional arguments to modify the appearance and actions of the link. @@ -2623,13 +2998,18 @@ \AtBeginDocument{\setDef@ultLinkColor} % \end{macrocode} % \begin{macro}{\setLink} -% \begin{macro}{\mlsetLink} +% \cs{setLink} is the basic high-level link command, it is used to surround text +% with a link annotation. % \begin{macro}{\setLinkText} -% This is the basic high-level link command, it is used to surround text. +% \cs{setLinkText} is a synonym for \cs{setLink}. +% \begin{macro}{\mlhypertext} +% A command defined in the \pkg{aeb\_mlink} package. +% \begin{macro}{\mlsetLink} +% \cs{mlsetLink} expands to \cs{mlhypertext} %\begin{verbatim} -% \setLinkText[\A{\JS{this.pageNum=6;}}\Color{1 0 0}]{Go There!} +% \setLink[\A{\JS{this.pageNum=6;}}\Color{1 0 0}]{Go There!} %\end{verbatim} -% \paragraph{Link Parameters.} This link takes two parameters, one of which +% \paragraph{Link Parameters.} These high-level links takes two parameters, one of which % is optional. %\begin{enumerate} %\item[\texttt{[\#1]}:] Optional key-value pairs to change the appearance or action @@ -2647,17 +3027,28 @@ \newcommand\setLink{\begingroup \ef@sanitize@toks\ef@setlinktext } -\newcommand{\mlsetLink}{\mlhypertext} -\let\setLinkText\setLink -\newcommand{\ef@setlinktext}[1][]{% % \end{macrocode} % \changes{v2.5b}{2009/12/24}{added path to \string\cs{mlhypertext}} % Added a path to \cs{mlhypertext} of the \textsf{aeb\_mlink} package. When the % user specifies \verb!\mlLink{true}! in the option list, we branch off to -% \cs{mlhypertext}. +% \cs{mlhypertext}. For example, if we say, +%\begin{verbatim} +%\setLink[\mlLink{true}\A{\JS{app.alert("Hello World!");}}]{Hello World!} +%\end{verbatim} +% then we branch off to \cs{mlhypertext}. The above, then, is equivalent to, +%\begin{verbatim} +%\mlhypertext[\A{\JS{app.alert("Hello World!");}}]{Hello World!} +%\end{verbatim} +%If you've created a link using \cs{setLink} and the text does not wrap around to the next +%link, simply insert \verb!\mlLink{true}! as an option to declare this link is a multi-line +%link. Of course, you can also change the name from \cs{setLink} to \cs{mlsetLink} (or to \cs{mlhypertext}). +% +%In the next line, we \cs{let} \cs{setLinkText} to \cs{setLink} % \begin{macrocode} +\let\setLinkText\setLink +\newcommand{\ef@setlinktext}[1][]{% \endgroup\ef@searchmlLink#1\mlLink\end\@nil - \ifx\ef@mlLink0\def\ef@next{\set@LinkText[#1]}\else + \ifx\ef@mlLink\ef@Zero\def\ef@next{\set@LinkText[#1]}\else \def\ef@next{\mlhypertext[#1]}\fi\ef@next } \newcommand\set@LinkText[2][]{% @@ -2688,6 +3079,16 @@ % \begin{macrocode} \def\ef@postProcLinkProps{} % \end{macrocode} +% \cs{mlhypertext} is not defined unless \pkg{aeb\_mlink} is loaded; however, +% we define \cs{mlsetLink} to expand to \cs{mlhypertext}. +% \begin{macrocode} +\newcommand{\mlsetLink}{\mlhypertext} +\newcommand{\mlhypertext}[2][]{\@ifundefined{mlhypertext@i} + {\PackageWarning{eforms}{The \string\mlhypertext\space command + does nothing unless\MessageBreak the aeb_mlink package is loaded}}{}% + #2} +% \end{macrocode} +% \end{macro} % \end{macro} % \end{macro} % \end{macro} @@ -3043,7 +3444,8 @@ \define@key{eforms}{default}{\@eqDV{#1}} \define@key{eforms}{defaultstyle}{\@eqDS{#1}} % \end{macrocode} -% The \texttt{value}\IndexKey{value}\IndexKey{richvalue}\IndexKey{apprD} of the field (text, list, combobox). Example: \texttt{value=AcroTeX}. +% The \texttt{value}\IndexKey{value}\IndexKey{richvalue}\IndexKey{apprD} of the field +% (text, list, combobox). Example: \texttt{value=AcroTeX}. % \begin{macrocode} \define@key{eforms}{value}{\@eqV{#1}} \define@key{eforms}{richvalue}{\@eqRV{#1}} @@ -3202,6 +3604,19 @@ \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 +}{} +\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 +}{} % \end{macrocode} % Set presets\IndexKey{presets} from inside a \cs{ui} argument. For example, %\begin{verbatim} @@ -3705,17 +4120,29 @@ /ANN pdfmark}% \to@insertStrucTabOrder{Link}\endgroup } +% \end{macrocode} +% (2018/03/22) Defined \cs{pboxRect} to support +% \cs{setLinkPbox}. +% \changes{v2.9.19}{2018/03/22}{Defined \string\cs{pboxRect} to support +% \string\cs{setLinkPbox}} +% \begin{macrocode} +\def\pboxRect{/Rect [\par@@Rect]} +% \end{macrocode} +% Added \cs{mllnkcontainer} to support textsf{aeb\_mlink} package. +% \changes{v2.9.17}{2018/03/14}{Added \string\cs{mllnkcontainer}.} +% \begin{macrocode} +\def\mllnkcontainer#1{#1} \def\setLinkPbox@driver {% \ifx\eq@A\@empty\else\expandafter\convertAToAction\eq@A\@nil\fi \@eqBS{}% - \literalps@out{% - [ \eq@objdef/Rect [\par@@Rect] + \literalps@out{\mllnkcontainer{% + [ \eq@objdef\pboxRect \eq@Border \eq@QuadPoints % QuadPoints \common@LinkCode /Subtype /Link - /ANN pdfmark}% + /ANN pdfmark}}% \to@insertStrucTabOrder{Link}\endgroup } % \end{macrocode} diff --git a/texmf-dist/source/latex/acrotex/eforms.ins b/texmf-dist/source/latex/acrotex/eforms.ins index b474df85..182345c3 100644 --- a/texmf-dist/source/latex/acrotex/eforms.ins +++ b/texmf-dist/source/latex/acrotex/eforms.ins @@ -54,6 +54,7 @@ \file{edvipdfm.def}{\from{eforms.dtx}{copyright,edvipdfm}} \file{uieforms.def}{\from{eforms.dtx}{copyright,userinterface}} \file{setcorder.def}{\from{eforms.dtx}{copyright,setcorder}} + \file{pdfdochex.def}{\from{eforms.dtx}{copyright,hexoctcodes}} } \Msg{***************************************************************} diff --git a/texmf-dist/source/latex/acrotex/exerquiz.dtx b/texmf-dist/source/latex/acrotex/exerquiz.dtx index 0cae45ef..e9412205 100644 --- a/texmf-dist/source/latex/acrotex/exerquiz.dtx +++ b/texmf-dist/source/latex/acrotex/exerquiz.dtx @@ -4,7 +4,7 @@ %<*copyright> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Exerquiz.sty package, %% -%% Copyright (C) 1999-2017 D. P. Story %% +%% Copyright (C) 1999-2018 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -22,7 +22,7 @@ %\ProvidesFile{aebrandom.def} %\ProvidesFile{aebsumrytbls.def} %