diff options
author | Norbert Preining <norbert@preining.info> | 2019-12-23 03:00:28 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-12-23 03:00:28 +0000 |
commit | a1dedaefa2becaafcd09daa0489ec89a84908e34 (patch) | |
tree | 0ea567121e62ae07380883d54d5c2c295ecce47f /macros/latex/contrib/acrotex/insdljs.dtx | |
parent | 00707dfd6ac16ef1f4dc0cf9512c42f2fd20ad35 (diff) |
CTAN sync 201912230300
Diffstat (limited to 'macros/latex/contrib/acrotex/insdljs.dtx')
-rw-r--r-- | macros/latex/contrib/acrotex/insdljs.dtx | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/macros/latex/contrib/acrotex/insdljs.dtx b/macros/latex/contrib/acrotex/insdljs.dtx index d6bc80b523..12b507ce25 100644 --- a/macros/latex/contrib/acrotex/insdljs.dtx +++ b/macros/latex/contrib/acrotex/insdljs.dtx @@ -16,7 +16,7 @@ %</copyright> %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{insdljs} -%<package> [2019/08/06 v2.4.6 Insert Document Level JavaScripts (dps)] +%<package> [2019/10/30 v2.4.8 Insert Document Level JavaScripts (dps)] %<*driver> \documentclass{ltxdoc} \usepackage[colorlinks,hyperindex=false]{hyperref} @@ -443,6 +443,20 @@ \let\dl@One=1 \let\dl@Zero=0 \let\dljs@YES=y \let\dljs@NO=n % \end{macrocode} +% \leavevmode\DescribeMacro{\dlpkgInfo} A command to identify package date +% from within document level Javascript +%\changes{v2.4.7}{2019/10/23}{Added \string\cs{dlkgInfo} to identify version} +% \begin{macrocode} +\def\dlpkgInfo{\@nameuse{ver@\@currname.\@currext}} +\def\dlSetPkgInfo{% + \edef\dlpkgInfoExpd{\dlpkgInfo}% + \expandafter\dlparsePkgInfo\dlpkgInfoExpd\@nil} +\def\dlparsePkgInfo#1 #2 #3:#4\@nil{% + \def\dlPkgInfoDate{#1}% + \def\dlPkgInfoVer{#2}% + \def\dlPkgInfoPkg{#3}% + \def\dlPkgInfoDesc{#4}} +% \end{macrocode} % When using pdfmarks, the open action is initiated by the document JavaScript code, % when there was not document JavaScript, the open action did not get executed. % This was a bad idea, here is a work around. When the \texttt{insDLJS} environment is used, @@ -1913,6 +1927,35 @@ % \begin{macrocode} \def\dl@makeesc#1{\catcode`#1=0\relax} % \end{macrocode} +% \leavevmode\DescribeMacro\dlgobToFi Used to format \env{defineJS} content +% when a conditional leaves an empty space; for example, +%\begin{verbatim} +%\begin{defineJS}[% +% \makeesc\*\catcode`\%=14\relax]{\X} +%var w=1; +%*ifx*Y*@empty*dlgobToFi*else% +%var x=1; +%var y=1;*fi +%var z=1; +%\end{defineJS} +%\end{verbatim} +%When \cs{Y} is empty, the content expands to +%\begin{verbatim} +%var w=1; +%var z=1; +%\end{verbatim} +%and when \cs{Y} is nonempty, it expands to, +%\begin{verbatim} +%var w=1; +%var x=1; +%var y=1; +%var z=1; +%\end{verbatim} +% \changes{v2.4.8}{2019/10/30}{Added \string\cs{dlgobToFi} to help format +% \string\env{defineJS} code} +% \begin{macrocode} +\def\dlgobToFi#1\fi{\defjsLB} +% \end{macrocode} % Finally, we get to the definition of \env{defineJS}, and its compatriates. % \begin{macrocode} \newenvironment{defineJS}[2][]{% |