diff options
author | Karl Berry <karl@freefriends.org> | 2017-08-27 23:54:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-08-27 23:54:58 +0000 |
commit | 08429b2ebce33f39aef9d2efa79a08bd4e1b495f (patch) | |
tree | 7eb30895b78ecee7c5e9bc697705b1ad873edb60 /Master/texmf-dist/source/latex | |
parent | 61504dfcae20a500f64c498a1c4671381e3336ec (diff) |
forms16be (27aug17)
git-svn-id: svn://tug.org/texlive/trunk@45143 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/forms16be/forms16be.dtx | 270 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/forms16be/forms16be.ins | 60 |
2 files changed, 330 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/forms16be/forms16be.dtx b/Master/texmf-dist/source/latex/forms16be/forms16be.dtx new file mode 100644 index 00000000000..0b7fc4c9280 --- /dev/null +++ b/Master/texmf-dist/source/latex/forms16be/forms16be.dtx @@ -0,0 +1,270 @@ +% \iffalse +%<*copyright> +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% forms16be.sty package, %% +%% Copyright (C) 2017 D. P. Story %% +%% dpstory@acrotex.net %% +%% storyd@nwfsc.edu %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1.2 of the%% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%</copyright> +%<package>\NeedsTeXFormat{LaTeX2e} +%<package>\ProvidesPackage{forms16be} +%<package> [2017/08/11 v1.0 Provides UTF-16BE encoding for text strings (dps)] +%<*driver> +\documentclass{ltxdoc} +\usepackage[colorlinks,hyperindex=false]{hyperref} +\OnlyDescription % comment out for implementation details +\EnableCrossrefs +\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}} +\begin{document} +\def\CMD#1{\textbackslash#1} +\let\pkg\textsf +\let\opt\texttt +\let\env\texttt +\let\app\textsf +\def\darg#1{\texttt{\char123\relax#1\char125\relax}} +\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}} +\def\meta#1{\textsl{\texttt{#1}}} +\GetFileInfo{forms16be.sty} +\title{The \textsf{forms16be} Package} +\author{D. P. Story\\ + Email: \texttt{dpstory@acrotex.net}} +\date{processed \today} +\maketitle +\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 + \texttt{forms16be.dtx}.} +\end{document} +%</driver> +% \fi +% \MakeShortVerb{|} +% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{forms16be}{Inputting aebdonotindex.def}} +% {\PackageInfo{forms16be}{cannot find aebdonotindex.def}} +% \begin{macrocode} +%<*package> +% \end{macrocode} +% \section{Introduction} +% +% The code in this package was extracted from \pkg{aeb\_pro}. The code itself did not depend on +% PostScript, it is useful, therefore, to remove it from \pkg{aeb\_pro} code base and make it available +% to {\LaTeX} users with different workflows (\app{pdflatex}, \app{lualatex}, and \app{xelatex}). +% +% This package provides support for UTF-16BE Unicode character encoding for the \emph{text string type} +% (PDF Reference, version 1.7, beginning on page 158). Text strings are used in ``text annotations, bookmark names, +% article threads, document information, and so forth'' (to partially quote page~158). The particular application +% is in setting the 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}. +% +% 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}. +% \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} +% \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. +% \begin{macrocode} +\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. +% \begin{macrocode} +\def\aref(#1){\csname aeb@aDescript@#1\endcsname} +% \end{macrocode} +%\leavevmode\DescribeMacro{\displayUnicode}\hskip-\marginparsep\darg{\ameta{char}} +% Display the Unicode encoding of a character. +% \begin{macrocode} +\providecommand{\displayUnicode}[1]{\csname uni@#1\endcsname} +% \end{macrocode} +%\leavevmode\DescribeMacro{\stringiiUnicode} is the command that begins building +% of a big-endian string (UTF-16BE). It sets the unicode marker (\texttt{FEFF}) and passes the flow +% to \cs{@stringiiUnicode}. +% \begin{macrocode} +\providecommand{\stringiiUnicode}{FEFF\expandafter\@stringiiUnicode} +% \end{macrocode} +% When \cs{u} is detected \cs{@stringiiUnicode}, the command that converts the string +% to all unicode hex, it calls \cs{getRawUnicode} to get the next four characters, which +% 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 +% 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. +% \begin{macrocode} +\providecommand{\@stringiiUnicode}[1]{\ifx#1\relax\else + \ifx#1\u\aeb@exiii\getRawUnicode\else + \displayUnicode{#1}\aeb@exiii\@stringiiUnicode\fi\fi} +% \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} +%\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} +% \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 +% of Basic Latin characters and unicode literals (\cs{uXXXX}). When the \pkg{aeb\_pro} package is loaded +% 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. +% \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} +{\obeyspaces\gdef\getUniDescript#1{\gdef\U@description{#1}% +\U@NameUniStr}} +% \end{macrocode} +% \begin{macrocode} +%</package> +%<*encoding> +\convertChriiUnicode\space{0020} +\convertChriiUnicode{!}{0021} +{\@makeother\" +\convertChriiUnicode{"}{0022}} +\convertChriiUnicode{#}{0023} +\convertChriiUnicode{$}{0024} +{\@makeother\% +\convertChriiUnicode{%}{0025}} +\convertChriiUnicode{&}{0026} +\convertChriiUnicode{'}{0027} +\convertChriiUnicode{(}{0028} +\convertChriiUnicode{)}{0029} +\convertChriiUnicode{*}{002A} +\convertChriiUnicode{+}{002B} +\convertChriiUnicode{,}{002C} +\convertChriiUnicode{-}{002D} +\convertChriiUnicode{.}{002E} +\convertChriiUnicode{/}{002F} +\convertChriiUnicode{0}{0030} +\convertChriiUnicode{1}{0031} +\convertChriiUnicode{2}{0032} +\convertChriiUnicode{3}{0033} +\convertChriiUnicode{4}{0034} +\convertChriiUnicode{5}{0035} +\convertChriiUnicode{6}{0036} +\convertChriiUnicode{7}{0037} +\convertChriiUnicode{8}{0038} +\convertChriiUnicode{9}{0039} +\convertChriiUnicode{:}{003A} +\convertChriiUnicode{;}{003B} +\convertChriiUnicode{<}{003C} +\convertChriiUnicode{=}{003D} +\convertChriiUnicode{>}{003E} +\convertChriiUnicode{?}{003F} +\convertChriiUnicode{@}{0040} +\convertChriiUnicode{A}{0041} +\convertChriiUnicode{B}{0042} +\convertChriiUnicode{C}{0043} +\convertChriiUnicode{D}{0044} +\convertChriiUnicode{E}{0045} +\convertChriiUnicode{F}{0046} +\convertChriiUnicode{G}{0047} +\convertChriiUnicode{H}{0048} +\convertChriiUnicode{I}{0049} +\convertChriiUnicode{J}{004A} +\convertChriiUnicode{K}{004B} +\convertChriiUnicode{L}{004C} +\convertChriiUnicode{M}{004D} +\convertChriiUnicode{N}{004E} +\convertChriiUnicode{O}{004F} +\convertChriiUnicode{P}{0050} +\convertChriiUnicode{Q}{0051} +\convertChriiUnicode{R}{0052} +\convertChriiUnicode{S}{0053} +\convertChriiUnicode{T}{0054} +\convertChriiUnicode{U}{0055} +\convertChriiUnicode{V}{0056} +\convertChriiUnicode{W}{0057} +\convertChriiUnicode{X}{0058} +\convertChriiUnicode{Y}{0059} +\convertChriiUnicode{Z}{005A} +\convertChriiUnicode{[}{005B} +\convertChriiUnicode{]}{005D} +\convertChriiUnicode{^}{005E} +\convertChriiUnicode{_}{005F} +\convertChriiUnicode{`}{0060} +\convertChriiUnicode{a}{0061} +\convertChriiUnicode{b}{0062} +\convertChriiUnicode{c}{0063} +\convertChriiUnicode{d}{0064} +\convertChriiUnicode{e}{0065} +\convertChriiUnicode{f}{0066} +\convertChriiUnicode{g}{0067} +\convertChriiUnicode{h}{0068} +\convertChriiUnicode{i}{0069} +\convertChriiUnicode{j}{006A} +\convertChriiUnicode{k}{006B} +\convertChriiUnicode{l}{006C} +\convertChriiUnicode{m}{006D} +\convertChriiUnicode{n}{006E} +\convertChriiUnicode{o}{006F} +\convertChriiUnicode{p}{0070} +\convertChriiUnicode{q}{0071} +\convertChriiUnicode{r}{0072} +\convertChriiUnicode{s}{0073} +\convertChriiUnicode{t}{0074} +\convertChriiUnicode{u}{0075} +\convertChriiUnicode{v}{0076} +\convertChriiUnicode{w}{0077} +\convertChriiUnicode{x}{0078} +\convertChriiUnicode{y}{0079} +\convertChriiUnicode{z}{007A} +\convertChriiUnicode{|}{007C} +{\@makeother~ +\convertChriiUnicode{~}{007E}} +\def\EURO{20AC} +\def\BSLASH{005C} +\def\LBRACE{007B} +\def\RBRACE{007D} +\def\DQUOTE{0022} +\def\ucspace{\u0020} +%</encoding> +%<*package> +\InputIfFileExists{uni4basic-latin.def}{\PackageInfo{forms16be} + {inputting uni4basic-latin.def\MessageBreak definitions}} + {\PackageError{forms16be} + {Cannot find the file uni4basic-latin.def}{}} +%</package> +% \end{macrocode} +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/forms16be/forms16be.ins b/Master/texmf-dist/source/latex/forms16be/forms16be.ins new file mode 100644 index 00000000000..22f49932dcb --- /dev/null +++ b/Master/texmf-dist/source/latex/forms16be/forms16be.ins @@ -0,0 +1,60 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1999-2006 D. P. Story +%% +%% This file is part of the `AcroTeX eDucation Bundle'. +%% ------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{2017/08/23} +\def\batchfile{forms16be.ins} +% +\input docstrip +\ifx\generate\undefined + \Msg{**********************************************} + \Msg{*} + \Msg{* This installation requires docstrip} + \Msg{* version 2.4 or later.} + \Msg{*} + \Msg{* An older version of docstrip has been input} + \Msg{*} + \Msg{**********************************************} + \errhelp{Move or rename old docstrip.tex and get a newer one.} + \errmessage{Old docstrip in input path} + \batchmode + \csname @@end\endcsname\end +\fi + +\keepsilent +\askforoverwritefalse +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\preamble +\endpreamble +\generate +{% + \file{forms16be.sty}{\from{forms16be.dtx}{copyright,package}} + \file{uni4basic-latin.def}{\from{forms16be.dtx}{copyright,encoding}} +} + +\Msg{***************************************************************} +\Msg{*} +\Msg{* \space To finish the installation you have to copy the files } +\Msg{*} +\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX} +\Msg{*} +\Msg{***************************************************************} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput |