From 4ac795a4cbc17927bd3bc444849a5144d23ba43f Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 14 May 2021 06:36:17 +0900 Subject: acrotex (May14) --- texmf-dist/source/latex/acrotex/acrotex.ins | 1 + texmf-dist/source/latex/acrotex/dljslib.dtx | 321 +++++-- texmf-dist/source/latex/acrotex/eforms.dtx | 78 +- texmf-dist/source/latex/acrotex/exerquiz.dtx | 1273 ++++++++++++++++---------- texmf-dist/source/latex/acrotex/exerquiz.ins | 3 +- texmf-dist/source/latex/acrotex/insdljs.dtx | 551 +++++------ texmf-dist/source/latex/acrotex/web.dtx | 259 +++--- 7 files changed, 1457 insertions(+), 1029 deletions(-) (limited to 'texmf-dist/source') diff --git a/texmf-dist/source/latex/acrotex/acrotex.ins b/texmf-dist/source/latex/acrotex/acrotex.ins index 3afd02ab..63c2cf08 100644 --- a/texmf-dist/source/latex/acrotex/acrotex.ins +++ b/texmf-dist/source/latex/acrotex/acrotex.ins @@ -61,6 +61,7 @@ \file{aebrandom.def}{\from{exerquiz.dtx}{copyright,randomize}} \file{aebsumrytbls.def}{\from{exerquiz.dtx}{copyright,sumrytbls}} \file{usemcfi.def}{\from{exerquiz.dtx}{copyright,mcfi}} + \file{rbmintrvl.def}{\from{exerquiz.dtx}{copyright,rbmIntrvl}} \file{eqcolor.def}{\from{exerquiz.dtx}{copyright,eqcolor}} \file{template.def}{\from{exerquiz.dtx}{copyright,template}} \file{eqfr.def}{\from{exerquiz.dtx}{copyright,eqfr}} diff --git a/texmf-dist/source/latex/acrotex/dljslib.dtx b/texmf-dist/source/latex/acrotex/dljslib.dtx index 9d1d1dfe..53f7f5d6 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-2018 D. P. Story %% +%% Copyright (C) 2001-2021 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -14,7 +14,7 @@ % %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{dljslib} -% [2017/08/11 v2.1 Manage a Library of Document Level JavaScripts (dps)] +% [2021/04/04 v2.2 Manage a Library of Document Level JavaScripts (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref} @@ -23,6 +23,23 @@ \EnableCrossrefs \CodelineIndex \RecordChanges +\makeatletter +\let\@latex@warning@no@line\@gobble +\makeatother +\def\darg#1{\texttt{\char123\relax#1\char125\relax}} +\def\CMD#1{\textbackslash#1} +\let\pkg\textsf +\let\opt\texttt +\let\env\texttt +\let\app\textsf +\let\uif\textsf +\def\STRUT{\rule{0pt}{14pt}} +\def\negSTRUT{\rule[-8pt]{0pt}{0pt}} +\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}} +\def\visispace{\symbol{32}} +\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}} +\def\meta#1{\textsl{\texttt{#1}}} +\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}} \InputIfFileExists{aebdocfmt.def}{\PackageInfo{dljslib}{Inputting aebdocfmt.def}} {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax \PackageInfo{dljslib}{aebdocfmt.def cannot be found}} @@ -88,12 +105,17 @@ % \begin{macrocode} \dljsRegister[y]{dljslib} % \end{macrocode} -% \subsection{Library Card Catalog} -% \IndexOpt{equations} -% \IndexOpt{vectors} -% \IndexOpt{indefIntegral} -% \IndexOpt{ImplMulti} -% \IndexOpt{nodec} +% \subsection{Library Card Catalog}\leavevmode +% \IndexOpt{equations}^^A% +% \IndexOpt{vectors}^^A% +% \IndexOpt{indefIntegral}^^A% +% \IndexOpt{ImplMulti}^^A% +% \IndexOpt{nodec}^^A% +% \IndexOpt{noBinFac}^^A% +% \IndexOpt{limitArith}^^A% +% \IndexOpt{combinatorics}^^A% +% \IndexOpt{setSupport}^^A% +% \noindent % The arguments of the \cs{DeclareAndRegister} command are the options of this package, and % their names represent JavaScript functions in the library. % \begin{macrocode} @@ -102,41 +124,38 @@ \DeclareAndRegister{indefIntegral} \DeclareAndRegister{ImplMulti} \DeclareAndRegister{nodec} -% \end{macrocode} -% \IndexOpt{noBinFac} -% \IndexOpt{limitArith} -% \IndexOpt{combinatorics} -% \IndexOpt{setSupport} -% More options. -% \begin{macrocode} \DeclareAndRegister{noBinFac} \DeclareAndRegister{limitArith} \DeclareAndRegister{combinatorics} \DeclareAndRegister{setSupport} % \end{macrocode} -% \IndexOpt{unordered} -% \IndexOpt{complex} -% \IndexOpt{satisfyEq} -% \IndexOpt{useGermanNums} -% \IndexOpt{factors} -% More options still. +% \leavevmode +% Additional registered names. +% \IndexOpt{unordered}^^A% +% \IndexOpt{complex}^^A% +% \IndexOpt{satisfyEq}^^A% +% \IndexOpt{useGermanNums}^^A% +% \IndexOpt{useDeNums}^^A% +% \IndexOpt{useEnNums}^^A +% \IndexOpt{factors}^^A% +% \IndexOpt{point}^^A% +% \IndexOpt{intervals}^^A% % \begin{macrocode} \DeclareOption{unordered}{\PackageWarning{dljslib} - {The `unordered' option is now combined with the\MessageBreak - `setSupport' option, will use the `setSupport' option\MessageBreak - instead}\ExecuteOptions{setSupport}} + {The `unordered' option is now combined with the\MessageBreak + `setSupport' option, will use the `setSupport' option\MessageBreak + instead}\ExecuteOptions{setSupport}} %\DeclareAndRegister{unordered} \DeclareAndRegister{complex} \DeclareAndRegister{satisfyEq} \DeclareAndRegister{useGermanNums} +\DeclareOption{useDeNums}{\ExecuteOptions{useGermanNums}} +\DeclareAndRegister{useEnNums} \DeclareAndRegister{factors} -% \end{macrocode} -% \IndexOpt{point} -% \IndexOpt{intervals} -% The final set of options. -% \begin{macrocode} \DeclareAndRegister{point} \DeclareAndRegister{intervals} +% \end{macrocode} +% \begin{macrocode} \def\includeOptions#1{\@for\@option:=#1\do{\dljsRegister[y]{\@option}}} \InputIfFileExists{libcusopt.opt}{}{} % \end{macrocode} @@ -238,6 +257,8 @@ % this of this as the ``front wrapper'' or ``front cover'' of your library selections. It contains the % ``name'' of the library from which you checked out your selections. % \begin{macrocode} +\newcommand{\SyntaxErrorAuthor}{"Syntax error in author's answer! + Check console."} \begin{library@holding}{dljslib} \begin{insDLJS*}[dljslib]{dljslib} \begin{newsegment}{dljslib: AcroTeX DLJS Library} @@ -333,7 +354,7 @@ function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp) } zCorrAns = ParseInput(zCorrAns); if (!ok2Continue) { - eqAppAlert("Syntax error in author's answer! Check console.", 3); + eqAppAlert(\SyntaxErrorAuthor,3); console.println("Syntax Error: " + CorrAns); return null; } @@ -341,10 +362,10 @@ function ProcRespEq(flag,CorrAns,n,epsilon,domain,indepVars,oComp) if (!ok2Continue) return null; % convert vars to new format, if needed indepVars = TypeParameters(indepVars); - var lambda = getNonZeroRatio (domain, indepVars, zCorrAns, zUserAns); + var lambda = getNonZeroRatio(domain,indepVars,zCorrAns,zUserAns); if ( lambda == null ) { eqAppAlert(\eqSyntaxErrorUndefVar,3); return null; }; - if ( !ok2Continue ) return notifyField(false, flag, fieldname); + if ( !ok2Continue ) return notifyField(false,flag,fieldname); zCorrAns = lambda + "*(" + zCorrAns + ")"; success=randomPointCompare (n,domain,indepVars,epsilon, zCorrAns,zUserAns,comp) @@ -508,7 +529,7 @@ typeof oComp.priorParse != "undefined" ) { for (i=0; i7)?arguments[7]:event.value; var retn=_ProcRespEvalEq(false,flag,CorrAns,n,epsilon, indepVars,UserAns); @@ -1273,7 +1293,6 @@ 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); @@ -1446,15 +1465,74 @@ return syntaxError(), null; \end{newsegment} \end{library@holding} % \end{macrocode} -% \subsubsection{\texttt{useGermanNums}} +% \subsubsection{\texttt{useGermanNums} (\texttt{useDeNums})} +% \leavevmode % \IndexOpt{useGermanNums}A simple \texttt{ProcResp()} for processing numbers entered in a German format: 1234,56. % The Germans have a block delimiter of period or space (1.234,56 or 1 234,56). % The period is not supported and causes an alert box. %\changes{v1.9g}{2014/01/14}{Added a proc to accept the comma for the decimal mark} +%\changes{v2.2}{2021/04/04}{Modified useGermanNums, created alias useDeNums} +%\changes{v2.2}{2021/04/04}{Modified proc to warn about English decimal point only} % \begin{macrocode} \@ifcheckedout{useGermanNums} -\newcommand{\noDecPtGerMsg}{"A period (.) is not allowed in answer, - use German notation for numbers"} +% \end{macrocode} +%\leavevmode\DescribeMacro{\noDecPtDeMsg} A general alert message for responses that +% contain a point (.). +% \begin{macrocode} + \dlJSStr[noquotes]{\noDecPtDeMsg}{% + "German Notation Syntax Error: A point (.) was found + in your response \"" + UserAns + "\". + Please remove the point, or this answer will be marked as wrong."} +% \end{macrocode} +% \DescribeMacro{\MsgDei} An alert message when German decimal notation +% is expected. +% \begin{macrocode} + \flJSStr*[noquotes]{\MsgDei}{"German decimal notation is expected, +for example: 12,3456."} + \flJSStr*[noquotes]{\MsgDeiAlt}{"German decimal notation is expected, +for example: 12,3456." +((warnDecDeOnly)?"\n\n +The English decimal notation (12.2345) is also accepted, +however.":"")} +% \end{macrocode} +% \DescribeMacro{\MsgDeii} An alert message when two decimal places are expected. +% \begin{macrocode} + \flJSStr*[noquotes]{\MsgDeii}{"A decimal number is required, +rounded to two decimal places, for example: 12,34"} +% \end{macrocode} +% When \DescribeMacro{\warnDecDeOnlyOn}\cs{warnDefDeOnlyOn} is declared in the preamble, the use of +% the decimal point (.) is accepted but a warning message appears. On the downside, +% the student can enter \texttt{1.00,10}, which will, no doubt, lead to an +% incorrect answer. +% \begin{macrocode} + \def\warnDecDeOnlyOn{\def\warnDecDeOnly{true}} + \def\warnDefDeOnlyOff{\def\warnDecDeOnly{false}} + \warnDefDeOnlyOff +% \end{macrocode} +% \DescribeMacro{\numDe}\nmpsep{\darg{\ameta{Msg}}} is a command that supports +% the German decimal notation point (,). For this command, the decimal point (,) +% is optional; that is, an integer response is accepted. \ameta{Msg} is a message +% that appears on error of syntax. +% \begin{macrocode} + \def\numDe#1{{priorParse:\Array(% + \preReqForm(/\rebstr\rechrclass{+-}?\redigit*,?% + \redigit*\reestr/,(#1)))}} +% \end{macrocode} +% \DescribeMacro{\rndNumDeReq}\nmpsep{\darg{\ameta{nDec-pl}}\darg{\ameta{Msg}}} +% For numbers that are required to be rounded to \emph{exactly} \ameta{nDec-pl} decimal places. +% \ameta{Msg} is an error message. Decimal point (,) is required. +% \begin{macrocode} + \def\rndNumDeReq#1#2{{priorParse:\Array(% + \preReqForm(/\rebstr\rechrclass{+-}?\redigit*,% + \redigit{#1}\reestr/,(#2)))}} +% \end{macrocode} +% \DescribeMacro{\rndNumDeOpt}\nmpsep{\darg{\ameta{nDec-pl}}\darg{\ameta{Msg}}} +% For numbers that are required to be rounded to \emph{at most} \ameta{nDec-pl} decimal places. +% \ameta{Msg} is an error message. Decimal point (,) optional (integer respose +% accepted). +% \begin{macrocode} + \def\rndNumDeOpt#1#2{{priorParse:\Array(% at most two decimal places + \preReqForm(/\rebstr\rechrclass{+-}?% + \redigit*,?\redigit{0,#1}\reestr/,(#2)))}} \fi \begin{library@holding}{useGermanNums} \begin{newsegment} @@ -1463,6 +1541,7 @@ return syntaxError(), null; % \DescribeMacro{ProcRespNumsDe} This segment only has one ProcResp function in it, % this is named \texttt{ProcRespNumsDe}. % \begin{macrocode} +var warnDecDeOnly=\warnDecDeOnly; function ProcRespNumsDe (flag,CorrAns,n,epsilon,% domain,indepVars,oComp) { if (!ProcessIt) return null; @@ -1471,8 +1550,7 @@ domain,indepVars,oComp) { % \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 bSubstVars=(arguments.length>7); var UserAns=(bSubstVars)?arguments[7]:event.value; % \end{macrocode} % This is the only change over the \texttt{ProcResp}, we call @@ -1489,7 +1567,7 @@ domain,indepVars,oComp) { ok2Continue = true; CorrAns = ParseInput(CorrAns); if (!ok2Continue) { - eqAppAlert("Syntax error in author's answer! Check console.", 3); + eqAppAlert(\SyntaxErrorAuthor,3); return null; } % \end{macrocode} @@ -1502,8 +1580,8 @@ domain,indepVars,oComp) { % \end{macrocode} % Deny use of the traditional decimal point (.) % \begin{macrocode} - if ( reDec.test(UserAns) ) { - eqAppAlert(\noDecPtGerMsg,3); + if ( (!warnDecDeOnly) && (reDec.test(UserAns)) ) { + eqAppAlert(\noDecPtDeMsg,3); return -1; } % \end{macrocode} @@ -1519,13 +1597,13 @@ domain,indepVars,oComp) { % We pass \texttt{UserAnsSave} in case author uses \texttt{priorParse} etc. % \begin{macrocode} var retn=processSpecialParse(oComp.priorParse,UserAnsSave); - if (retn==null) return -1; - } - var reComma=/,/; - if ( reComma.test(UserAns) ) { - eqAppAlert(\eqSyntaxErrorComma,3); - return -1; + if ( (!warnDecDeOnly) && (retn==null) ) return -1; } +% var reComma=/,/; +% if ( reComma.test(UserAns) ) { +% eqAppAlert(\eqSyntaxErrorComma,3); +% return -1; +% } UserAns = ParseInput(UserAns); indepVars = TypeParameters(indepVars); if (!ok2Continue) return null; @@ -1542,6 +1620,59 @@ epsilon,CorrAns,UserAns,comp); % The following functions, which are \texttt{ProcResp}-types, were written for an online % grading system being developed by Drs.\ Bruce Wagner and David Arnold, and Mr. % Jacob Miles-Prystowsky. The descriptions given below were provided by the authors. +% +% \subsubsection{\texttt{useEnNums}} +% \leavevmode +% \IndexOpt{useEnNums}A simple \texttt{ProcResp()} for processing numbers entered in a EN-U format: 1234.56. +% \begin{macrocode} +\@ifcheckedout{useEnNums} +% \end{macrocode} +%\leavevmode\DescribeMacro{\noDecPtEnMsg} A general alert message for responses that +% contain a comma (,). +% \begin{macrocode} + \dlJSStr[noquotes]{\noDecPtEnMsg}{% + "Syntax Error: A comma (,) was found + in your response \"" + UserAns + "\". + Please remove the comma, or this answer will be marked as wrong."} +% \end{macrocode} +% \DescribeMacro{\MsgEni} An alert message when German decimal notation +% is expected. +% \begin{macrocode} + \flJSStr*[noquotes]{\MsgEni}{"English decimal notation is expected, +for example: 12.3456."} +% \end{macrocode} +% \DescribeMacro{\MsgEnii} An alert message when two decimal places are expected. +% \begin{macrocode} + \flJSStr*[noquotes]{\MsgEnii}{"A decimal number is required, +rounded to two decimal places, for example: 12.34"} +% \end{macrocode} +% \DescribeMacro{\numEn}\nmpsep{\darg{\ameta{Msg}}} is a command that supports +% the En decimal notation point (.). For this command, the decimal point (.) +% is optional; that is, an integer response is accepted. \ameta{Msg} is a message +% that appears on error of syntax. +% \begin{macrocode} + \def\numEn#1{{priorParse:\Array(% + \preReqForm(/\rebstr\rechrclass{+-}?\redigit*\\.?% + \redigit*\reestr/,(#1)))}} +% \end{macrocode} +% \DescribeMacro{\rndNumEnReq}\nmpsep{\darg{\ameta{nDec-pl}}\darg{\ameta{Msg}}} +% For numbers that are required to be rounded to \emph{exactly} \ameta{nDec-pl} decimal places. +% \ameta{Msg} is an error message. Decimal point (.) is required. +% \begin{macrocode} + \def\rndNumEnReq#1#2{{priorParse:\Array(% + \preReqForm(/\rebstr\rechrclass{+-}?\redigit*\\.% + \redigit{#1}\reestr/,(#2)))}} +% \end{macrocode} +% \DescribeMacro{\rndNumEnOpt}\nmpsep{\darg{\ameta{nDec-pl}}\darg{\ameta{Msg}}} +% For numbers that are required to be rounded to \emph{at most} \ameta{nDec-pl} decimal places. +% \ameta{Msg} is an error message. Decimal point (.) optional (integer response +% accepted). +% \begin{macrocode} + \def\rndNumEnOpt#1#2{{priorParse:\Array(% at most two decimal places + \preReqForm(/\rebstr\rechrclass{+-}?% + \redigit*\\.?\redigit{0,#1}\reestr/,(#2)))}} +\fi +% \end{macrocode} % \begin{macrocode} \begin{library@holding}{unordered} % \end{macrocode} @@ -1895,7 +2026,7 @@ function ProcPoint(flag,CorrAns,n,epsilon,domain,indepVars,oComp) for (i=0; i %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% eForms package, %% -%% Copyright (C) 2002-2020 D. P. Story %% +%% Copyright (C) 2002-2021 D. P. Story %% %% dpstory@uakron.edu %% %% %% %% This program can redistributed and/or modified under %% @@ -16,7 +16,7 @@ % %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{eforms} -% [2020/12/14 v2.4.1 Provides general eforms support (dps)] +% [2021/05/10 v2.4.3 Provides general eforms support (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12] @@ -95,18 +95,19 @@ % \textsf{web}; in this case, the options below must explicitly included. % Set the driver dependent code for the |quiz| environments. % -% \changes{v2.2v2.2}{2019/06/12}{Added fields to fields dict, conforming to hyperref} +% \changes{v2.4.3}{2021/05/10}{Changed date for sync with \string\pkg{insdljs}} +% \changes{v2.2v2.2}{2019/06/12}{Added fields to fields dict, conforming to \string\pkg{hyperref}} % \changes{v2.13}{2019/06/10}{Added various fields to the fields dictionary so they % can get appearances in non-conforming PDF viewers.} -% \changes{v2.5o}{2012/06/18}{Added required package \string\textsf{ifpdf}} -% \changes{v2.9m}{2017/09/03}{Added the ifluatex package} +% \changes{v2.5o}{2012/06/18}{Added required package \string\pkg{ifpdf}} +% \changes{v2.9m}{2017/09/03}{Added the \string\pkg{ifluatex} package} % \begin{macrocode} \RequirePackage{ifpdf}[2006/02/20] \RequirePackage{ifxetex}[2006/08/21] \RequirePackage{ifluatex} % \end{macrocode} % The \pkg{calc} package is now required (2014/02/18). -% \changes{v2.6c}{2014/02/18}{Added the \string\textsf{calc} package as required package.} +% \changes{v2.6c}{2014/02/18}{Added the \string\pkg{calc} package as required package.} % \begin{macrocode} \RequirePackage{calc} % \end{macrocode} @@ -131,7 +132,7 @@ } % \end{macrocode} % Set the driver for \texttt{pdftex}\IndexOpt{pdftex} -% \changes{v2.9b}{2016/07/22}{Do not pass pdftex driver to insdljs or hyperref} +% \changes{v2.9b}{2016/07/22}{Do not pass pdftex driver to \string\pkg{insdljs} or \string\pkg{hyperref}} % \begin{macrocode} \DeclareOption{pdftex}{% \def\eq@drivernum{1}\def\eq@driver{pdftex}% @@ -139,7 +140,7 @@ } % \end{macrocode} % Added \textsf{luatex} option -% \changes{v2.9m}{2017/09/03}{Add luatex option} +% \changes{v2.9m}{2017/09/03}{Add \string\opt{luatex} option} % \begin{macrocode} \DeclareOption{luatex}{% \def\eq@drivernum{1}\def\eq@driver{luatex}% @@ -190,7 +191,7 @@ % The \texttt{preview}\IndexOpt{preview} option displays the bounding box of each form field with a frame box. % Useful for laying out field with a dvi previewer. % \changes{v2.5n}{2012/04/30}{Changed \string\cs{ifpreview} to a conditional -% definition; this allows the \string\textsf{spdef} package to control the state +% definition; this allows the \string\pkg{spdef} package to control the state % of \cs{ifpreview}.} % \begin{macrocode} \DeclareOption{preview}{\previewtrue} @@ -211,7 +212,7 @@ % Use\IndexOpt{useui} the \textsf{xkeyval} package to specify the options for the links and % forms, key-values are enclosed in the \cs{ui} command inside the option list. % \changes{v2.0}{2008/03/14} -% { +% {% % Added the \string\texttt{useui} option, which inputs \string\textsf{xkeyval} package, % and defines a user-friendly interface to the option arguments. % } @@ -268,18 +269,15 @@ % To support a variations of \app{dvipdfm}, we change the logic from % \cs{ifxetex} to |\ifnum\eq@drivernum=2\relax|, a driver number of 2 % includes \app{dvipdfm} and all its variants. -% \changes{v2.3.4}{2020/07/05}{Change logic from \string\cs{ifxetex} to -% \string\cs{ifnum}\string\cs{eq@drivernum=2\string\relax}} +% \changes{v2.3.4}{2020/07/05}{Change logic for \string\cs{ifxetex}} % \begin{macrocode} \@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse -\ifpdf\else\ifnum\eq@drivernum=2\relax\else\pdfmarkuptrue\fi\fi +\ifpdf\else\ifnum\eq@drivernum=\tw@\else\pdfmarkuptrue\fi\fi \RequirePackage{hyperref} % \end{macrocode} -% Changed \textsf{hyperref} definitions/parameters to add \texttt{1bp} rather than \texttt{1pt} around a form field -% or link. +% Changed \textsf{hyperref} definitions/parameters to add \texttt{1bp} +% rather than \texttt{1pt} around a form field or link. % \changes{v2.9e}{2016/12/22}{Changed hyperref to add 1bp rather than 1pt} -% \changes{v2.3.4}{2020/07/05}{Change logic from \string\cs{ifxetex} to -% \string\cs{ifnum}\string\cs{eq@drivernum=2\string\relax}} % \begin{macrocode} \ifnum\eq@drivernum=2\relax \else @@ -297,7 +295,7 @@ \RequirePackage{insdljs}[2019/02/11] % incl conv-xkv % \end{macrocode} % \changes{v1.0a}{2006/10/03} -% { +% {% % If \string\pkg{exerquiz} is not loaded, we do an automatic begin and end of Form. % Also, if \string\textsf{exerquiz} is loaded, then we use the driver declared in % \string\pkg{exerquiz}; otherwise, we set the default to 0 @@ -320,11 +318,11 @@ \let\ef@YES=y \let\ef@NO=n \let\ef@One=1 \let\ef@Zero=0 \ifnum\eq@drivername<2\relax -\let\to@usepdfmark\ef@One -\RequirePackage[structure]{taborder}\else -\let\to@usepdfmark\ef@Zero -\RequirePackage{taborder} -\fi + \let\to@usepdfmark\ef@One + \def\reqPkg{\RequirePackage[structure]{taborder}}\else + \let\to@usepdfmark\ef@Zero + \def\reqPkg{\RequirePackage{taborder}}\fi +\reqPkg % \end{macrocode} % \begin{macrocode} % @@ -439,11 +437,25 @@ % For example, expanding |\efsave\x\as\y| (eg, |\let\y\x|), the definition of the macro |\y| % has the same definition as |\x| does. Now |\x| is free to be redefined. Later in the document, % we can say |\efrestore\x\from\y| (eg, |\let\x\y|). Now the -% definition of |\x| has its original definition (at the time when it was saved). +% definition of |\x| has its original definition (at the time when it was saved).\medskip +% +% \noindent The two commands \DescribeMacro\txtRef\cs{txtRef} and \DescribeMacro\labelRef\cs{labelRef} +% return pure text: The first returns the value of \cs{ref} as plain text; similarly, \cs{labelRef} returns +% the true destination name of a reference. +% \changes{v2.4.2}{2021/03/11}{Defined \string\cs{txtRef}, also defined in \string\pkg{exerquiz}; +% moved \string\cs{labelRef} from the \string\textsf{userinterface} section of this DTX.} +% \begin{macrocode} +\def\txtRef#1{\@ifundefined{r@#1} + {??}{\aeb@exiii\@firstoffive\csname r@#1\endcsname}} +\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start} + {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}} +\def\aeb@exiii{\expandafter\expandafter\expandafter} +\def\noexpandiii{\noexpand\noexpand\noexpand} +% \end{macrocode} % \begin{macrocode} % % \end{macrocode} -% \section{\tops{\app}{}{Adobe} Forms Support}\label{formsSupport} +% \section{\tops{\protect\app}{}{Adobe} Forms Support}\label{formsSupport} % \begin{macrocode} %<*package> % \end{macrocode} @@ -1213,7 +1225,7 @@ % \end{macrocode} % \DescribeMacro{\RV} Rich text value %\changes{v2.5l}{2011/01/28}{% -% Wrap the \cs{RV} key in an XHTML \string\texttt{{\string\ltag}body\string\rtag} element, part of adding +% Wrap the \string\cs{RV} key in an XHTML \string\texttt{{\string\ltag}body\string\rtag} element, part of adding % better support for rich text strings for form fields. %} % \begin{macrocode} @@ -1255,7 +1267,7 @@ % we pass the argument through \cs{pdfstringdef} to get the octal encoding, % which is the method hyperref uses. % \changes{v2.7}{2014/07/08}{Removed the use of \string\cs{ifHy@unicode}, now pass all PDF text strings -% through \cs{pdfstringdef}.} +% through \string\cs{pdfstringdef}.} % \changes{v2.8a}{2015/07/12}{Added \string\cs{ef@isunicode} to automatically detect % unicode} % (2015/07/12) Added \cs{ef@isunicode} to automatically detect @@ -1850,7 +1862,7 @@ %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.16}{2018/03/08}{Added \string\cs{mlfix} for multi-line links} %\changes{v2.9.19}{2018/03/22}{Added \string\cs{relax} following width dimension % in \string\cs{@eqmlstrut}} % \begin{macrocode} @@ -3028,7 +3040,7 @@ \long\def\g@addto@macrogobble#1#2{\g@addto@macro{#1}{#2}\@gobbleto@@nil} % \end{macrocode} % \changes{v2.8a}{2015/07/15}{New def for \string\cs{passthruCLOpts}, and modified -% \cs{ef@pdfstrCLOpts} and its spawn.} +% \string\cs{ef@pdfstrCLOpts} and its spawn.} % (2015/07/15) New def for \cs{passthruCLOpts}, and modified \cs{ef@pdfstrCLOpts} and its spawn. % \begin{macrocode} \def\passthruCLOpts{*} @@ -3122,7 +3134,7 @@ % \end{macrocode} % \subsubsection{List Box}\label{listbox} % -%\changes{v2.4}{2020/11/28}{Allow \cs{list@@Box} to obey \string\cs{pdfStringsOn}} +%\changes{v2.4}{2020/11/28}{Allow \string\cs{list@@Box} to obey \string\cs{pdfStringsOn}} % % The main list box code that can be used to build list box commands, such as % \cs{listBox}, defined below. Within @@ -3191,7 +3203,7 @@ % \end{macro} % \subsubsection{Combo Box}\label{combobox} % -%\changes{v2.4}{2020/11/28}{Allow \cs{combo@@Box} to obey \string\cs{pdfStringsOn}} +%\changes{v2.4}{2020/11/28}{Allow \string\cs{combo@@Box} to obey \string\cs{pdfStringsOn}} % % Within the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse} % and \cs{tops} for \cs{texorpdfstring}. @@ -4167,12 +4179,8 @@ % we'll define them here as well. % \begin{macrocode} \def\getargs#1#2{\def\aeb@argi{#1}\def\aeb@argii{#2}} -\def\labelRef#1{\@ifundefined{r@#1}{Doc-Start} - {\aeb@exiii\@fourthoffive\csname r@#1\endcsname}} -\def\aeb@exiii{\expandafter\expandafter\expandafter} \newtoks\ef@flagtoks \newtoks\ef@jstoks -\def\noexpandiii{\noexpand\noexpand\noexpand} % \end{macrocode} % % \subsection{The Appearance Tab} diff --git a/texmf-dist/source/latex/acrotex/exerquiz.dtx b/texmf-dist/source/latex/acrotex/exerquiz.dtx index e1adc713..d73c3efd 100644 --- a/texmf-dist/source/latex/acrotex/exerquiz.dtx +++ b/texmf-dist/source/latex/acrotex/exerquiz.dtx @@ -22,7 +22,7 @@ %\ProvidesFile{aebrandom.def} %\ProvidesFile{aebsumrytbls.def} %