texlive[45178] Master/texmf-dist: forms16be (30aug17)

commits+karl at tug.org commits+karl at tug.org
Thu Aug 31 01:01:12 CEST 2017


Revision: 45178
          http://tug.org/svn/texlive?view=revision&revision=45178
Author:   karl
Date:     2017-08-31 01:01:11 +0200 (Thu, 31 Aug 2017)
Log Message:
-----------
forms16be (30aug17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/forms16be/README.md
    trunk/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.pdf
    trunk/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.tex
    trunk/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdf
    trunk/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex
    trunk/Master/texmf-dist/source/latex/forms16be/forms16be.dtx
    trunk/Master/texmf-dist/tex/latex/forms16be/forms16be.sty

Modified: trunk/Master/texmf-dist/doc/latex/forms16be/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/forms16be/README.md	2017-08-30 23:00:58 UTC (rev 45177)
+++ trunk/Master/texmf-dist/doc/latex/forms16be/README.md	2017-08-30 23:01:11 UTC (rev 45178)
@@ -1,6 +1,6 @@
 The forms16b3 Package
 Author: D. P. Story
-Dated: 2017-08-11
+Dated: 2017/08/28
 
 The forms16be package provides support for UTF-16BE Unicode character 
 encoding (called a big-endian character string) for the text string 

Modified: trunk/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.tex	2017-08-30 23:00:58 UTC (rev 45177)
+++ trunk/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.tex	2017-08-30 23:01:11 UTC (rev 45178)
@@ -40,7 +40,7 @@
     email={dpstory at acrotex.net},
     subject=Documentation for the forms16be package,
     talksite={\url{www.acrotex.net}},
-    version={1.0, 2017/08/11},
+    version={1.2, 2017/08/28},
     Keywords={LaTeX, form fields, UTF-16BE, AcroTeX},
     copyrightStatus=True,
     copyrightNotice={Copyright (C) \the\year, D. P. Story},
@@ -116,7 +116,7 @@
 particular application is to set property values of form fields, at least
 those properties that take the text strings as its value. The package
 contains support for Basic Latin plus the ability to enter any unicode
-character using the notation \cs{uXXXX}, where `\texttt{XXXX}' are four hex
+character using the notation \cs{uXXXX} or \cs{u(XXXX)}, where `\texttt{XXXX}' are four hex
 digits.
 
 The code was originally designed to be used with the \pkg{eforms} package,
@@ -138,7 +138,7 @@
 name of the unicode string you are defining, it is used later to refer to
 this string. The \ameta{string} argument is a combination of Basic Latin
 characters and unicode characters (more specifically, expressions of the form
-\cs{uXXXX}, where `\texttt{XXXX}' are hex digits). In the example below, we
+\cs{uXXXX} or \cs{u(XXXX)}, where `\texttt{XXXX}' are hex digits). In the example below, we
 declare,
 \begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
 \defUniStr{VDV}{\u03B1 cos(\u03B8)}
@@ -168,7 +168,6 @@
 As the PDF Specification describes, the markers are used to signal the
 beginning of a big-endian hex string.
 
-
 For \pkg{eforms}, incorporating these ideas into field creation is easy:
 \begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
 \textField[\TU{\unicodeStr(TU)}
@@ -178,6 +177,33 @@
   \DV{\unicodeStr(VDV)}\V{\unicodeStr(VDV)}]{tst16be}{1.5in}{11bp}\!\cgBdry. Pass your mouse over
   the field to see the tool tip as well.
 
+Within the argument of \ameta{string}, backslash, left and right braces are
+not defined in the \texttt{uni4basic-latin.def} file. They, therefore,
+cannot appear as literals within \ameta{string}. Should you need these
+characters, use the following:
+\begin{itemize}
+  \item \cs{u005C} or \cs{u\cs{BSLASH}} for backslash (\verb~\~).
+  \item \cs{u007B} or \cs{u\cs{LBRACE}} for left brace (\texttt{\{});
+  \item \cs{u007D} or \cs{u\cs{RBRACE}} for right brace (\texttt{\}});
+\end{itemize}
+(Other definitions within the \texttt{uni4basic-latin.def} file are
+\cs{EURO} and \cs{DQUOTE}.) The introduction of the command versions of
+unicode brings up another problem, that of obeying spaces.
+
+Suppose you wanted to initialize a field property with `\cs{LaTeX}'. To obtain
+this value we would type `\cs{u\string\BSLASH\space LaTeX}'. But, because \ameta{string} is under the
+influence of \cs{obeyspaces}, the specified initialization appears as `\texttt{\string\ LaTeX}', that is,
+there is a space that follows the backslash; of course, we cannot specify \cs{u\string\BSLASHLaTeX} as that would
+get an undefined command error. The solution is to enclose \cs{BSLASH} in parentheses; if we type
+\cs{u(\string\BSLASH)LaTeX} we obtain the desired result:
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+\defUniStr{LaTeX}{\u(\BSLASH)LaTeX}
+\textField[\V{\unicodeStr(LaTeX)}
+  \DV{\unicodeStr(LaTeX)}]{tstLaTeX}{1in}{11bp}
+\end{Verbatim}
+The above code results in
+\defUniStr{LaTeX}{\u(\BSLASH)LaTeX}\textField[\V{\unicodeStr(LaTeX)}\DV{\unicodeStr(LaTeX)}]{tstLaTeX}{1in}{11bp}\cgBdry\!.
+
 \section{List of field properties that take a text string}
 
 The property entries in a form field that support the text string type are

Modified: trunk/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex	2017-08-30 23:00:58 UTC (rev 45177)
+++ trunk/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex	2017-08-30 23:01:11 UTC (rev 45178)
@@ -1,5 +1,5 @@
 \documentclass{article}
-\usepackage[designv,forcolorpaper,tight*]{web}
+\usepackage[designi,tight*]{web}
 \usepackage{eforms}
 \usepackage{forms16be}
 
@@ -19,6 +19,7 @@
 \defUniStr{TU}{Don \u\EURO Story "\u03B1 cos(\u03B8)"}
 
 \textField[\TU{\unicodeStr(TU)}\DV{\unicodeStr(VDV)}\V{\unicodeStr(VDV)}]{tst}{1.5in}{11bp}\olBdry
+
 \pushButton[\CA{\unicodeStr(VDV)}\AAmouseup{app.alert("Initialized to \\"\\u03B1 cos(\\u03B8)\\"");}]{btn}{1in}{11bp}\cgBdry[1em]
 \pushButton[\CA{Reset}\AAmouseup{this.resetForm();}]{reset}{}{11bp}
 
@@ -36,10 +37,10 @@
 
 \comboBox[\Ff\FfEdit\DV{Euro}\V{Euro}\textFont{Arial}
 \BG{0.98 0.92 0.73}\BC{0 .6 0}]{myCombo}{1in}{11bp}
-{*{[(Euro)<\unicodeStr(myEuro)>]%
-    [(Yen)<\unicodeStr(myYen)>]%
-    [(Sheqel)<\unicodeStr(mySheqel)>]%
-    [(Pound)<\unicodeStr(myPound)>]%
+{*{[(Euro)<\unicodeStr(myEuro)>]
+    [(Yen)<\unicodeStr(myYen)>]
+    [(Sheqel)<\unicodeStr(mySheqel)>]
+    [(Pound)<\unicodeStr(myPound)>]
     [(Franc)<\unicodeStr(myFranc)>]}
 }
 

Modified: trunk/Master/texmf-dist/source/latex/forms16be/forms16be.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/forms16be/forms16be.dtx	2017-08-30 23:00:58 UTC (rev 45177)
+++ trunk/Master/texmf-dist/source/latex/forms16be/forms16be.dtx	2017-08-30 23:01:11 UTC (rev 45178)
@@ -15,7 +15,7 @@
 %</copyright>
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{forms16be}
-%<package> [2017/08/11 v1.0 Provides UTF-16BE encoding for text strings (dps)]
+%<package> [2017/08/28 v1.2 Provides UTF-16BE encoding for text strings (dps)]
 %<*driver>
 \documentclass{ltxdoc}
 \usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -75,11 +75,23 @@
 %    The code was originally designed to be used with the \pkg{eforms} package, but can be used with
 %    the form fields generated by \pkg{hyperref}, but requires some custom modification of the form field
 %    commands of \pkg{hyperref}.
+%    \section{Code for the \textsf{forms16be} package}
+%    We begin the definitions for this package with some utility commands, followed by some of
+%    the main support command, then followed by the two major commands of this package \cs{unicodeStr}
+%    and \cs{defUniStr}. The unicode lookup tables are listed last.
+%    \subsection{Utility commands}
 %    \begin{macrocode}
 \def\U at csarg#1#2{\expandafter#1\csname#2\endcsname}
-\let\U at Zero=0 \let\U at One=1
 \providecommand\aeb at exiii{\expandafter\expandafter\expandafter}
 %    \end{macrocode}
+%    Sanitize selected characters
+%    \changes{v1.2}{2017/08/28}{Sanitize selected characters}
+%    \begin{macrocode}
+\def\fbe at sanitize{\@makeother\"\@makeother\#\@makeother\$%
+  \@makeother\%\@makeother~%
+  \@for\x:=ABCDEFabcdef()\do{\@makeother\x}}
+%    \end{macrocode}
+%    \subsection{Main supporting commands}
 %    \begin{macro}{\convertChriiUnicode}\hskip-\marginparsep\darg{\ameta{char}}\darg{\ameta{unicode}}
 % A simple command for mapping a character to its unicode. This command is used in the character-unicode tables
 % below.
@@ -113,17 +125,34 @@
 % processing.
 %   \begin{macrocode}
 \providecommand{\@stringiiUnicode}[1]{\ifx#1\relax\else
-  \ifx#1\u\aeb at exiii\getRawUnicode\else
+  \ifx#1\u\aeb at exiii\getRawUnicode at tp\else
   \displayUnicode{#1}\aeb at exiii\@stringiiUnicode\fi\fi}
 %    \end{macrocode}
+%    Allow parentheses around the value \cs{u}, this allows us to abut neighboring
+%    characters without creating an unwanted space; eg., |\u(\BSLASH)LaTeX|. This is needed
+%    in the case of when the hex digits are expanded from a command, such as \cs{EURO},
+%    \cs{BSLASH}, \cs{LBRACE}, \cs{RBRACE}, and \cs{DQUOTE}.
+%    The \DescribeMacro{\getRawUnicode at tp}\cs{getRawUnicode at tp} tests whether there is
+%    a left parenthesis following \cs{u}.
+%    \changes{v1.1}{2017/08/28}{Allow parentheses around the value of \string\cs{u}}
+%    \begin{macrocode}
+\def\getRawUnicode at tp#1{\ifx#1(\aeb at exiii\getRawUnicode at p\else
+  \aeb at exiii\@getRawUnicode\fi#1}
+%    \end{macrocode}
+%     We come into \DescribeMacro{\getRawUnicode at p}\cs{getRawUnicode at p} if there is a left
+%     parenthesis following \cs{u}. We extract the left and right parentheses and continue
+%     on to \cs{@getRawUnicode}.
+%    \begin{macrocode}
+\def\getRawUnicode at p(#1){\expandafter\@getRawUnicode#1}
+%    \end{macrocode}
 %    When the \cs{u} is encountered by \cs{@stringiiUnicode} it is followed four hex digits
 %    or by macro (such as \cs{EURO}) that expands to four hex digits. \DescribeMacro{\getRawUnicode}\cs{getRawUnicode}
 %    grabs these four hex digits (adding them to the string built by \cs{@stringiiUnicode}). Flow continues
 %    to \cs{@stringiiUnicode}.
 %   \begin{macrocode}
-\providecommand{\getRawUnicode}{\expandafter\@getRawUnicode}
 \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
@@ -138,6 +167,7 @@
 %    \begin{macrocode}
   FEFF#1\else\aeb at 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
 % ASCII character string (used to retrieve the \ameta{string} later); \ameta{string} is a combination
@@ -145,18 +175,20 @@
 % with the \opt{linktoattachments} option, \cs{labelName} expanded outside the
 % \env{attachmentNames} environment expands \cs{defUniStr}, this is so to support legacy document that
 % 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}
-\def\defUniStr#1{\bgroup\@for\x:=ABCDEFabcdef\do{\@makeother\x}%
-  \def\U at uniStrName{#1}\@ifnextchar\bgroup{\defUniStr at i}{}}
-\def\defUniStr at i{\obeyspaces\getUniDescript}%
+%\@for\x:=ABCDEFabcdef()\do{\@makeother\x}
+\def\defUniStr#1{\def\U at uniStrName{#1}\bgroup\fbe at sanitize
+  \obeyspaces\getUniDescript}
+{\obeyspaces\gdef\getUniDescript#1{\gdef\U at description{#1}%
+\U at NameUniStr}}
 \def\U at NameUniStr{\global\U at csarg\let
   {aeb at aDescript@\U at uniStrName}\U at description\egroup}
-{\obeyspaces\gdef\getUniDescript#1{\gdef\U at description{#1}%
-\U at NameUniStr}}
+%</package>
+%<*encoding>
 %    \end{macrocode}
+%    \subsection{Unicode for Basic Latin definitions}
 %    \begin{macrocode}
-%</package>
-%<*encoding>
 \convertChriiUnicode\space{0020}
 \convertChriiUnicode{!}{0021}
 {\@makeother\"
@@ -261,7 +293,7 @@
 %</encoding>
 %<*package>
 \InputIfFileExists{uni4basic-latin.def}{\PackageInfo{forms16be}
-  {inputting uni4basic-latin.def\MessageBreak definitions}}
+  {Inputting uni4basic-latin.def\MessageBreak definitions}}
   {\PackageError{forms16be}
     {Cannot find the file uni4basic-latin.def}{}}
 %</package>

Modified: trunk/Master/texmf-dist/tex/latex/forms16be/forms16be.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/forms16be/forms16be.sty	2017-08-30 23:00:58 UTC (rev 45177)
+++ trunk/Master/texmf-dist/tex/latex/forms16be/forms16be.sty	2017-08-30 23:01:11 UTC (rev 45178)
@@ -20,31 +20,34 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{forms16be}
- [2017/08/11 v1.0 Provides UTF-16BE encoding for text strings (dps)]
+ [2017/08/28 v1.2 Provides UTF-16BE encoding for text strings (dps)]
 \def\U at csarg#1#2{\expandafter#1\csname#2\endcsname}
-\let\U at Zero=0 \let\U at One=1
 \providecommand\aeb at exiii{\expandafter\expandafter\expandafter}
+\def\fbe at sanitize{\@makeother\"\@makeother\#\@makeother\$%
+  \@makeother\%\@makeother~%
+  \@for\x:=ABCDEFabcdef()\do{\@makeother\x}}
 \providecommand\convertChriiUnicode[2]{\U at csarg\gdef{uni@#1}{#2}}%
 \def\aref(#1){\csname aeb at aDescript@#1\endcsname}
 \providecommand{\displayUnicode}[1]{\csname uni@#1\endcsname}
 \providecommand{\stringiiUnicode}{FEFF\expandafter\@stringiiUnicode}
 \providecommand{\@stringiiUnicode}[1]{\ifx#1\relax\else
-  \ifx#1\u\aeb at exiii\getRawUnicode\else
+  \ifx#1\u\aeb at exiii\getRawUnicode at tp\else
   \displayUnicode{#1}\aeb at exiii\@stringiiUnicode\fi\fi}
-\providecommand{\getRawUnicode}{\expandafter\@getRawUnicode}
+\def\getRawUnicode at tp#1{\ifx#1(\aeb at exiii\getRawUnicode at p\else
+  \aeb at exiii\@getRawUnicode\fi#1}
+\def\getRawUnicode at p(#1){\expandafter\@getRawUnicode#1}
 \providecommand{\@getRawUnicode}[4]{#1#2#3#4\@stringiiUnicode}
 \def\unicodeStr(#1){\expandafter
     \ifx\csname aeb at aDescript@#1\endcsname\relax
   FEFF#1\else\aeb at exiii\stringiiUnicode\aref(#1)\relax\fi}
-\def\defUniStr#1{\bgroup\@for\x:=ABCDEFabcdef\do{\@makeother\x}%
-  \def\U at uniStrName{#1}\@ifnextchar\bgroup{\defUniStr at i}{}}
-\def\defUniStr at i{\obeyspaces\getUniDescript}%
+\def\defUniStr#1{\def\U at uniStrName{#1}\bgroup\fbe at sanitize
+  \obeyspaces\getUniDescript}
+{\obeyspaces\gdef\getUniDescript#1{\gdef\U at description{#1}%
+\U at NameUniStr}}
 \def\U at NameUniStr{\global\U at csarg\let
   {aeb at aDescript@\U at uniStrName}\U at description\egroup}
-{\obeyspaces\gdef\getUniDescript#1{\gdef\U at description{#1}%
-\U at NameUniStr}}
 \InputIfFileExists{uni4basic-latin.def}{\PackageInfo{forms16be}
-  {inputting uni4basic-latin.def\MessageBreak definitions}}
+  {Inputting uni4basic-latin.def\MessageBreak definitions}}
   {\PackageError{forms16be}
     {Cannot find the file uni4basic-latin.def}{}}
 \endinput



More information about the tex-live-commits mailing list