summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/forms16be
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-03 21:34:17 +0000
committerKarl Berry <karl@freefriends.org>2019-06-03 21:34:17 +0000
commit8888c1b5ec24e017169e9a33ee949297e3e40e29 (patch)
tree7dc3fc9fbe4fd9cf3f4fb0a7826b36a46162179a /Master/texmf-dist/source/latex/forms16be
parentfc8f29d934152a1aafa862d142c7bf8c84e48e43 (diff)
forms16be (3jun19)
git-svn-id: svn://tug.org/texlive/trunk@51305 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/forms16be')
-rw-r--r--Master/texmf-dist/source/latex/forms16be/forms16be.dtx82
1 files changed, 53 insertions, 29 deletions
diff --git a/Master/texmf-dist/source/latex/forms16be/forms16be.dtx b/Master/texmf-dist/source/latex/forms16be/forms16be.dtx
index 99c3cc20ff3..eae105a5b7e 100644
--- a/Master/texmf-dist/source/latex/forms16be/forms16be.dtx
+++ b/Master/texmf-dist/source/latex/forms16be/forms16be.dtx
@@ -2,9 +2,8 @@
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% forms16be.sty package, %%
-%% Copyright (C) 2017 D. P. Story %%
+%% Copyright (C) 2017--2019 %%
%% dpstory@acrotex.net %%
-%% storyd@nwfsc.edu %%
%% %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License %%
@@ -15,7 +14,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{forms16be}
-%<package> [2017/08/28 v1.2 Provides UTF-16BE encoding for text strings (dps)]
+%<package> [2019/03/20 v1.3 Provides UTF-16BE encoding for text strings (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -24,8 +23,8 @@
\CodelineIndex
\RecordChanges
\InputIfFileExists{aebdocfmt.def}{\PackageInfo{forms16be}{Inputting aebdocfmt.def}}
- {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
- \PackageInfo{forms16be}{aebdocfmt.def cannot be found}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{forms16be}{aebdocfmt.def cannot be found}}
\begin{document}
\def\CMD#1{\textbackslash#1}
\let\pkg\textsf
@@ -44,11 +43,18 @@
\tableofcontents
\let\Email\texttt
\DocInput{forms16be.dtx}
-\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\par\PrintIndex}{\paragraph*{Index} The index goes here.\\Execute
- \texttt{makeindex -s gind.ist -o forms16be.ind forms16be.idx} on the command line and recompile
- \texttt{forms16be.dtx}.}
-\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.\\Execute
- \texttt{makeindex -s gglo.ist -o forms16be.gls forms16be.glo} on the command line and recompile
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\par\PrintIndex}{\paragraph*{Index} The index goes here.
+Execute
+\begin{quote}
+ \texttt{makeindex -s gind.ist -o forms16be.ind forms16be.idx}
+\end{quote}
+on the command line and recompile \texttt{forms16be.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of changes goes here.
+Execute
+\begin{quote}
+ \texttt{makeindex -s gglo.ist -o forms16be.gls forms16be.glo}
+\end{quote}
+on the command line and recompile
\texttt{forms16be.dtx}.}
\end{document}
%</driver>
@@ -56,6 +62,8 @@
% \MakeShortVerb{|}
% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{forms16be}{Inputting aebdonotindex.def}}
% {\PackageInfo{forms16be}{cannot find aebdonotindex.def}}
+%\changes{v1.3}{2019/03/20}{Changed when macros are expanded; changes in response to new features
+% of \string\pkg{insdljs} and \string\pkg{eforms}}
% \begin{macrocode}
%<*package>
% \end{macrocode}
@@ -99,7 +107,8 @@
\providecommand\convertChriiUnicode[2]{\U@csarg\gdef{uni@#1}{#2}}%
% \end{macrocode}
% \end{macro}
-%\leavevmode\DescribeMacro{\aref}\hskip-\marginparsep\darg{\ameta{name}} Display the defined character string in UTF-16BE.
+%\leavevmode\DescribeMacro{\aref}\hskip-\marginparsep\darg{\ameta{name}}
+% Display the defined character string in UTF-16BE.
% \begin{macrocode}
\def\aref(#1){\csname aeb@aDescript@#1\endcsname}
% \end{macrocode}
@@ -119,7 +128,7 @@
% should be XXXX, place them in the stream, followed by \cs{@stringiiUnicode} so as to
% continue the processing of the next character in the description string. I've placed
% an \cs{expandafter} in the definition of \cs{getRawUnicode} to allow the commands below
-% to be used. Thus instead of using \cs{u20AC}, which might necessitate the user to
+% to be used. Thus, instead of using \cs{u20AC}, which might necessitate the user to
% look up the code, \verb!\u\EURO! can be used instead. Additional shortcut commands
% like these can be created. Except for \cs{EURO}, these are the ones \TeX{} has trouble
% processing.
@@ -152,21 +161,6 @@
% \begin{macrocode}
\providecommand{\@getRawUnicode}[4]{#1#2#3#4\@stringiiUnicode}
% \end{macrocode}
-% \subsection{The \texorpdfstring{\protect\cs{unicodeStr}}{\CMD{unicodeStr}} command}
-%\leavevmode\DescribeMacro{\unicodeStr}\hskip-\marginparsep\texttt{(\ameta{name})}
-% This command expands \ameta{name} to its big-endian character string. Its argument
-% is delimited with \emph{parentheses}. Do not redefine this command as it is used by
-% \pkg{eforms} for automatic detection of a unicode string.
-% \begin{macrocode}
-\def\unicodeStr(#1){\expandafter
- \ifx\csname aeb@aDescript@#1\endcsname\relax
-% \end{macrocode}
-% If \ameta{name} is not defined, we assume that \ameta{name} is raw hex digits and
-% we insert them being the marker \texttt{FEFF}; otherwise, we use the string defined by
-% \ameta{name}. We use \cs{stringIIUnicode} to get things going.
-% \begin{macrocode}
- FEFF#1\else\aeb@exiii\stringiiUnicode\aref(#1)\relax\fi}
-% \end{macrocode}
% \subsection{The \texorpdfstring{\protect\cs{defUniStr}}{\CMD{defUniStr}} command}
% \leavevmode\DescribeMacro{\defUniStr}\hskip-\marginparsep\darg{\ameta{name}}\darg{\ameta{string}}
% The \cs{defUniStr} command is used to define a unicode string. The \ameta{name} should be an
@@ -177,13 +171,43 @@
% use \cs{labelName} for the purpose of initializing form fields with unicode.
% \changes{v1.2}{2017/08/28}{Added parentheses to the \string\@for\space loop}
% \begin{macrocode}
-%\@for\x:=ABCDEFabcdef()\do{\@makeother\x}
\def\defUniStr#1{\def\U@uniStrName{#1}\bgroup\fbe@sanitize
\obeyspaces\getUniDescript}
{\obeyspaces\gdef\getUniDescript#1{\gdef\U@description{#1}%
\U@NameUniStr}}
\def\U@NameUniStr{\global\U@csarg\let
- {aeb@aDescript@\U@uniStrName}\U@description\egroup}
+ {aeb@aDescript@\U@uniStrName}\U@description\egroup
+% \end{macrocode}
+% Within \cs{U@NameUniStr}, we add the line below, which is an expanded
+% version of the unicode string, built earlier by \cs{buildUnicodeStr}.
+% \begin{macrocode}
+ \U@csarg\xdef{expanded@\U@uniStrName}%
+ {\U@buildUnicodeStr(\U@uniStrName)}}
+% \end{macrocode}
+% \leavevmode\DescribeMacro{\U@buildUnicodeStr}\hskip-\marginparsep\texttt{(\ameta{name})}
+% If \ameta{name} has been used in a \cs{defUniStr} macro, we prepare to be expanded by
+% \cs{U@NameUniStr}.
+% \changes{v1.3}{2019/03/20}{Added \string\cs{buildUnicodeStr} to do some of the work
+% \string\cs{unicodeStr} used to do}
+% \begin{macrocode}
+\def\U@buildUnicodeStr(#1){\expandafter
+ \ifx\csname aeb@aDescript@#1\endcsname\relax
+ \else\aeb@exiii\stringiiUnicode\aref(#1)\relax\fi}
+% \end{macrocode}
+%
+% \subsection{The \texorpdfstring{\protect\cs{unicodeStr}}{\CMD{unicodeStr}} command}
+%\leavevmode\DescribeMacro{\unicodeStr}\hskip-\marginparsep\texttt{(\ameta{name})}
+% This command expands \ameta{name} to its big-endian character string. Its argument
+% is delimited with \emph{parentheses}. Do not redefine this command as it is used by
+% \pkg{eforms} for automatic detection of a unicode string.
+% The new \cs{unicodeStr} command: if the argument is not already registered
+% by \cs{defUniStr}, we pass it through; otherwise we expand the macro defined
+% by \cs{U@NameUniStr}.
+% \changes{v1.2}{2017/08/28}{Define a new \string\cs{unicodeStr} command}
+% \begin{macrocode}
+\def\unicodeStr(#1){\expandafter
+ \ifx\csname aeb@aDescript@#1\endcsname\relax
+ FEFF#1\else\csname expanded@#1\endcsname\fi}
%</package>
%<*encoding>
% \end{macrocode}