summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/forms16be/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.pdfbin742092 -> 744530 bytes
-rw-r--r--Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.tex34
-rw-r--r--Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdfbin572468 -> 593930 bytes
-rw-r--r--Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex11
-rw-r--r--Master/texmf-dist/source/latex/forms16be/forms16be.dtx56
-rw-r--r--Master/texmf-dist/tex/latex/forms16be/forms16be.sty23
7 files changed, 94 insertions, 32 deletions
diff --git a/Master/texmf-dist/doc/latex/forms16be/README.md b/Master/texmf-dist/doc/latex/forms16be/README.md
index c1431866eec..f28fb2d8c3b 100644
--- a/Master/texmf-dist/doc/latex/forms16be/README.md
+++ b/Master/texmf-dist/doc/latex/forms16be/README.md
@@ -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
diff --git a/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.pdf b/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.pdf
index 67b1af67869..ab9dc57544b 100644
--- a/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.pdf
+++ b/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.tex b/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.tex
index ec3e3057aab..67fbad2ae61 100644
--- a/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.tex
+++ b/Master/texmf-dist/doc/latex/forms16be/doc/forms16be-man.tex
@@ -40,7 +40,7 @@
email={dpstory@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 @@ document information, and so forth'' (to partially quote page~158). The
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 @@ First define the unicode string to be used.
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 @@ Notice the first four hex digits, `\texttt{FEFF}', these are `marker digits'.
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 @@ The result is \textField[\textSize{8}\TU{\unicodeStr(TU)}
\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
diff --git a/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdf b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdf
index 8c558630f37..c06d4e7bfdf 100644
--- a/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdf
+++ b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex
index c7bf9e92f57..0faece2fb5b 100644
--- a/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex
+++ b/Master/texmf-dist/doc/latex/forms16be/examples/forms16b3-ef.tex
@@ -1,5 +1,5 @@
\documentclass{article}
-\usepackage[designv,forcolorpaper,tight*]{web}
+\usepackage[designi,tight*]{web}
\usepackage{eforms}
\usepackage{forms16be}
@@ -19,6 +19,7 @@ Initialize a text field using unicode character strings,
\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 @@ Initialize a combo box using unicode character strings.
\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)>]}
}
diff --git a/Master/texmf-dist/source/latex/forms16be/forms16be.dtx b/Master/texmf-dist/source/latex/forms16be/forms16be.dtx
index 0b7fc4c9280..99c3cc20ff3 100644
--- a/Master/texmf-dist/source/latex/forms16be/forms16be.dtx
+++ b/Master/texmf-dist/source/latex/forms16be/forms16be.dtx
@@ -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@csarg#1#2{\expandafter#1\csname#2\endcsname}
-\let\U@Zero=0 \let\U@One=1
\providecommand\aeb@exiii{\expandafter\expandafter\expandafter}
% \end{macrocode}
+% Sanitize selected characters
+% \changes{v1.2}{2017/08/28}{Sanitize selected characters}
+% \begin{macrocode}
+\def\fbe@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@exiii\getRawUnicode\else
+ \ifx#1\u\aeb@exiii\getRawUnicode@tp\else
\displayUnicode{#1}\aeb@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@tp}\cs{getRawUnicode@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@tp#1{\ifx#1(\aeb@exiii\getRawUnicode@p\else
+ \aeb@exiii\@getRawUnicode\fi#1}
+% \end{macrocode}
+% We come into \DescribeMacro{\getRawUnicode@p}\cs{getRawUnicode@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@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@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@uniStrName{#1}\@ifnextchar\bgroup{\defUniStr@i}{}}
-\def\defUniStr@i{\obeyspaces\getUniDescript}%
-\def\U@NameUniStr{\global\U@csarg\let
- {aeb@aDescript@\U@uniStrName}\U@description\egroup}
+%\@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}}
-% \end{macrocode}
-% \begin{macrocode}
+\def\U@NameUniStr{\global\U@csarg\let
+ {aeb@aDescript@\U@uniStrName}\U@description\egroup}
%</package>
%<*encoding>
+% \end{macrocode}
+% \subsection{Unicode for Basic Latin definitions}
+% \begin{macrocode}
\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>
diff --git a/Master/texmf-dist/tex/latex/forms16be/forms16be.sty b/Master/texmf-dist/tex/latex/forms16be/forms16be.sty
index ca569bc7da1..11ac2e0d3b3 100644
--- a/Master/texmf-dist/tex/latex/forms16be/forms16be.sty
+++ b/Master/texmf-dist/tex/latex/forms16be/forms16be.sty
@@ -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@csarg#1#2{\expandafter#1\csname#2\endcsname}
-\let\U@Zero=0 \let\U@One=1
\providecommand\aeb@exiii{\expandafter\expandafter\expandafter}
+\def\fbe@sanitize{\@makeother\"\@makeother\#\@makeother\$%
+ \@makeother\%\@makeother~%
+ \@for\x:=ABCDEFabcdef()\do{\@makeother\x}}
\providecommand\convertChriiUnicode[2]{\U@csarg\gdef{uni@#1}{#2}}%
\def\aref(#1){\csname aeb@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@exiii\getRawUnicode\else
+ \ifx#1\u\aeb@exiii\getRawUnicode@tp\else
\displayUnicode{#1}\aeb@exiii\@stringiiUnicode\fi\fi}
-\providecommand{\getRawUnicode}{\expandafter\@getRawUnicode}
+\def\getRawUnicode@tp#1{\ifx#1(\aeb@exiii\getRawUnicode@p\else
+ \aeb@exiii\@getRawUnicode\fi#1}
+\def\getRawUnicode@p(#1){\expandafter\@getRawUnicode#1}
\providecommand{\@getRawUnicode}[4]{#1#2#3#4\@stringiiUnicode}
\def\unicodeStr(#1){\expandafter
\ifx\csname aeb@aDescript@#1\endcsname\relax
FEFF#1\else\aeb@exiii\stringiiUnicode\aref(#1)\relax\fi}
-\def\defUniStr#1{\bgroup\@for\x:=ABCDEFabcdef\do{\@makeother\x}%
- \def\U@uniStrName{#1}\@ifnextchar\bgroup{\defUniStr@i}{}}
-\def\defUniStr@i{\obeyspaces\getUniDescript}%
-\def\U@NameUniStr{\global\U@csarg\let
- {aeb@aDescript@\U@uniStrName}\U@description\egroup}
+\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}
\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