texlive[63423] Master/texmf-dist: pxjahyper (28may22)

commits+karl at tug.org commits+karl at tug.org
Sat May 28 22:17:50 CEST 2022


Revision: 63423
          http://tug.org/svn/texlive?view=revision&revision=63423
Author:   karl
Date:     2022-05-28 22:17:50 +0200 (Sat, 28 May 2022)
Log Message:
-----------
pxjahyper (28may22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
    trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md
    trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf
    trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex
    trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def
    trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty
    trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def
    trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty

Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md	2022-05-28 20:17:35 UTC (rev 63422)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md	2022-05-28 20:17:50 UTC (rev 63423)
@@ -73,6 +73,14 @@
 更新履歴
 --------
 
+  * Version 1.2  〈2022/05/27〉
+      - LaTeX カーネル 2022/06/01 版への対応。
+      - `\pxjahypersetup` を追加。
+      - 設定キー `fallback` を追加。
+      - `\pxDeclarePdfTextCommand/Composite` の不具合を修正。
+      - (試験的) 設定キー `extjis` を追加。
+      - (試験的) 設定キー `ajhankaku-chars` を追加。
+
   * Version 1.1  〈2022/05/10〉
       - オプション `fallback-geta`/`fallback-delete` を追加。
       - `\Uchar` を利用したUnicode文字出力をサポート。

Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md	2022-05-28 20:17:35 UTC (rev 63422)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md	2022-05-28 20:17:50 UTC (rev 63423)
@@ -52,6 +52,7 @@
 Revision History
 ----------------
 
+  * Version 1.2  〈2022/05/27〉
   * Version 1.1  〈2022/05/10〉
   * Version 1.0a 〈2022/04/15〉
   * Version 1.0  〈2022/04/01〉

Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex	2022-05-28 20:17:35 UTC (rev 63422)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex	2022-05-28 20:17:50 UTC (rev 63423)
@@ -16,8 +16,8 @@
 \bxtexlogoimport{*}
 \usepackage{shortvrb}
 \MakeShortVerb{\|}
-\newcommand{\PkgVersion}{1.1}
-\newcommand{\PkgDate}{2022/05/10}
+\newcommand{\PkgVersion}{1.2}
+\newcommand{\PkgDate}{2022/05/27}
 \newcommand{\Pkg}[1]{\textsf{#1}}
 \newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$}
 \newcommand{\Note}{\par\noindent ※}
@@ -66,6 +66,12 @@
 
 \paragraph{使用可能なオプション}\mbox{}
 \begin{itemize}
+\item \Strong{設定キー記述}\Means
+  |\pxjahypersetup| 命令の引数に書く設定記述をパッケージオプションに
+  書くことができる。
+  例えば\\
+  |\usepackage[fallback=delete]{pxjahyper}|\\
+  と指定すると、表現不能文字を代替するゲタ文字が出力されなくなる。
 \item \Strong{ドライバオプション}\Means
   |dvipdfmx|、|dvips|、および |nodvidriver|%
   (ドライバ依存動作の無効化を明示的に指示、
@@ -96,10 +102,10 @@
   これにより元の既定値 |tounicode| は
   (1は効果がなく2は上書きされるため)
   実質的に無効化される。
-\item |fallback-geta|(既定)\Means
-  PDF文字列中で表現不可能な文字をゲタ記号(〓)に置き換える。
-\item |fallback-delete|\Means
-  PDF文字列中で表現不可能な文字を削除する。
+%\item |fallback-geta|(既定)\Means
+%  PDF文字列中で表現不可能な文字をゲタ記号(〓)に置き換える。
+%\item |fallback-delete|\Means
+%  PDF文字列中で表現不可能な文字を削除する。
 \item |otfmacros|(既定)\Means
   \Pkg{japanese-otf}付属の\Pkg{ajmacros}パッケージが提供する
   文字入力命令(|\ajMaru|、|\ajLig| 等)をPDF文字列中で
@@ -156,6 +162,29 @@
 自動的に実施される。
 
 %-------------------
+\subsection{設定}
+\label{ssec:setup}
+
+パッケージの動作の設定を |\pxjahypersetup| 命令で行える。
+
+\begin{quote}\small
+|\pxjahypersetup{|\Meta{キー}|=|\Meta{値}|,...}|
+\end{quote}
+
+有効な設定キーは以下の通り。
+
+\begin{itemize}
+\item |fallback=|\Meta{値}\Means
+  PDF文字列中で表現不可能な文字についての代替出力の方法を指定する。
+  \begin{itemize}
+  \item |geta|(既定)\Means
+    表現不可能な文字をゲタ記号(〓)に置き換える。
+  \item |delete|\Means
+    表現不可能な文字を削除する。
+  \end{itemize}
+\end{itemize}
+
+%-------------------
 \subsection{Unicode符号値による入力}
 \label{ssec:ux-command}
 
@@ -172,7 +201,7 @@
 こちらを使う方が無難かもしれない。}
 
 \begin{itemize}
-\item |\Ux{|Unicode符号値16進|}|\Means
+\item |\Ux{|\Meta{Unicode符号値16進}|}|\Means
   その符号値の文字を出力する。
   具体的な動作は以下の通り:
   \begin{itemize}
@@ -187,7 +216,7 @@
   は、当該のUnicode文字に対応するJIS符号系の文字を書いたのと同等になる。
   JIS符号系にない文字の場合は出力できないので警告を出しだ上で
   ゲタ記号(〓)を出力%
-  \footnote{|fallback-delete| オプションが有効の場合は何も出力しない。
+  \footnote{設定キー |fallback| の値が |delete| の場合は何も出力しない。
     以降で「ゲタ記号を出力」とある場合についても同様。}%
   する。
   \end{itemize}
@@ -207,7 +236,10 @@
 
 \begin{itemize}
 \item |\Ux| 命令(\ref{ssec:ux-command}節参照)が有効の場合は、
-  |\Ux| と同じ動作になる。
+  |\Ux| と同じ動作
+  \footnote{もし |\Ux| の出力がゲタ記号になる場合は、
+    |\UTF| もゲタ記号になる。}%
+  になる。
 \item それ以外の場合は、
   常に(警告を出した上で)ゲタ記号を出力する。
   %\Note {\pLaTeX}ではtounicodeの機能でUnicode文字を出力できないため。
@@ -294,11 +326,17 @@
 \end{itemize}
 
 これらの命令において、符号値は16進数で指定する。
-「JIS符号値」は {\upLaTeX} では使われないので省略して
+Unicode文字の出力が可能な状況
+(エンジンが{\upLaTeX}の場合は常に該当する)
+では「JIS符号値」は使われないので省略して
 (空にして)もよい
+\footnote{一応、「JIS符号値」が使われることが確実な状況では
+「Unicode符号値」も省略可能であるが、
+そのような状況であるかの判断は困難であるため、
+「Unicode符号値」の省略は推奨されない。}%
 (或いはそもそも JIS~X~0208 にない文字の場合は省略する)。
-逆に「Unicode符号値」は {\pLaTeX} の動作でかつ「JIS符号値」が
-指定されている場合は省略してよい。
+%逆に「Unicode符号値」は {\pLaTeX} の動作でかつ「JIS符号値」が
+%指定されている場合は省略してよい。
 
 例えば、以下のように定義しておくと、
 PDF文字列中で |\textschwa|(schwa記号)や |\d{t}|(\d{t})が
@@ -320,8 +358,8 @@
 \Pkg{hyperref}では基本的なテキスト装飾命令
 (多くは{\LaTeX}カーネルが提供するもの)
 について、「PDF文字列として扱う場合は自動的に無力化
-%\footnote{例えば、“|\textit{text}|”や“|{\large text}|”は
-%  単に“|text|”と書いたものと見なされる。}
+\footnote{例えば、“|\textit{text}|”や“|{\large text}|”は
+  単に“|text|”と書いたものと見なされる。}
 する」機構を実装している。
 これにより、例えば節見出しのテキストに“|\textit{text}|”が
 含まれていたとすると、

Modified: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def	2022-05-28 20:17:35 UTC (rev 63422)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def	2022-05-28 20:17:50 UTC (rev 63423)
@@ -11,7 +11,7 @@
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesFile{pxjahyper-ajm.def}[2022/05/10 v1.1]
+\ProvidesFile{pxjahyper-ajm.def}[2022/05/27 v1.2]
 
 %% avoid multiple loading
 \csname pxjahyperajmLoaded\endcsname
@@ -576,7 +576,33 @@
 
 %%<!> \aj半角{<string>}
 % Simply expands to the string.
-\pxhy at DeclareMacro{半角}#1{#1}{}
+\pxhy at DeclareMacro{半角}#1{%
+  `\ifpxhy at ajhankaku@chars
+    `\pxhy at ajHankaku{#1}%
+  `\else #1%
+  `\fi
+}
+\gdef\pxhy at ajHankaku#1{%
+  \pxhy at ajHankaku@a#1\pxhy at end
+}
+\gdef\pxhy at ajHankaku@a#1{%
+  \pxhy at cond\ifx#1\pxhy at end\fi{}{%else
+    \ifcsdef{pxhy at ucs@hw/#1}{\csuse{pxhy at ucs@hw/#1}}{#1}%
+    \pxhy at ajHankaku@a}%
+}
+\def\pxhy at next#1{%
+  \pxhy at cond\ifx#1\pxhy at end\fi{}{%else
+    \csxdef{pxhy at ucs@hw/#1}{\UTF{\expandafter\pxhy at FFhex\meaning\x;}}%
+    \chardef\y=\numexpr\x+1\relax \let\x\y
+    \pxhy at next}%
+}
+\def\pxhy at FFhex#1"#2;{FF#2}
+\chardef\x="61
+\pxhy at next
+  。「」、・ヲァィゥェォャュョッーアイウエオカキクケ%
+  コサシスセソタチツテトナニヌネノハヒフヘホマミムメ%
+  モヤユヨラリルレロワン゛゜\pxhy at end
+\csgdef{pxhy at ucs@hw/ }{\space}
 
 %%<OK> \○ / \● / \□ / \■ / \◇ / \◆
 % Expands to \ajLig{} or \@ajNumber.

Modified: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty	2022-05-28 20:17:35 UTC (rev 63422)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty	2022-05-28 20:17:50 UTC (rev 63423)
@@ -10,7 +10,7 @@
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxjahyper-enc}[2022/05/10 v1.1]
+\ProvidesPackage{pxjahyper-enc}[2022/05/27 v1.2]
 \def\pxhe at pkgname{pxjahyper-enc}
 \providecommand{\bxDebug}[1]{}
 

Modified: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def	2022-05-28 20:17:35 UTC (rev 63422)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def	2022-05-28 20:17:50 UTC (rev 63423)
@@ -10,7 +10,7 @@
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesFile{pxjahyper-uni.def}[2022/05/10 v1.1]
+\ProvidesFile{pxjahyper-uni.def}[2022/05/27 v1.2]
 \providecommand{\bxDebug}[1]{}
 
 %--------------------------------------- environment check

Modified: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty	2022-05-28 20:17:35 UTC (rev 63422)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty	2022-05-28 20:17:50 UTC (rev 63423)
@@ -10,7 +10,7 @@
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxjahyper}[2022/05/10 v1.1]
+\ProvidesPackage{pxjahyper}[2022/05/27 v1.2]
 \def\pxhy at pkgname{pxjahyper}
 \providecommand{\bxDebug}[1]{}
 
@@ -24,6 +24,7 @@
 }
 
 %% packages
+\RequirePackage{keyval}\relax
 \RequirePackage{ltxcmds}[2011/08/22]% v1.21
 
 %% variables
@@ -53,7 +54,25 @@
 \let\pxhy at jsclasses@name\relax
 \newif\ifpxhy at jlreq@cls
 \newif\ifpxhy at fallback@geta
+\newif\ifpxhy at extjis@map
+\newif\ifpxhy at extjis@use
+\newif\ifpxhy at ajhankaku@chars
 
+%%<*> \pxjahypersetup{<key>=<value>,...}
+\newcommand*\pxjahypersetup{%
+  \setkeys{\pxhy at pkgname}%
+}
+%% \pxhy at handle@key{<key>}{<value>}{<name>}
+\def\pxhy at handle@key#1#2#3{%
+  \expandafter\let\expandafter\pxhy at tmpa\csname pxhy@#3\endcsname
+  \ifx\pxhy at tmpa\relax
+    \PackageError\pxhy at pkgname
+     {Invalid value for key '#1':\MessageBreak\@spaces#2}%
+     {\@eha}%
+  \else \pxhy at tmpa
+  \fi
+}
+
 %--------------------------------------- Package options
 
 %% DVI drivers
@@ -153,10 +172,10 @@
   \pxhy at otfmacrosfalse
 }
 \DeclareOption{fallback-geta}{%
-  \pxhy at fallback@getatrue
+  \pxjahypersetup{fallback=geta}%
 }
 \DeclareOption{fallback-delete}{%
-  \pxhy at fallback@getafalse
+  \pxjahypersetup{fallback=delete}%
 }
 \DeclareOption{force-unicode}{%
   \let\pxhy at force@unicode=t
@@ -164,10 +183,30 @@
 \DeclareOption{disable-Ux}{% for debug
   \let\pxhy at disable@Ux=t
 }
+%% key-value options
+\DeclareOption*{%
+  \expandafter\pxjahypersetup\expandafter{\CurrentOption}%
+}
+% 'fallback=geta|delete'
+\pxhy at fallback@getatrue
+\define at key{\pxhy at pkgname}{fallback}{%
+  \pxhy at handle@key{fallback}{#1}{kv at fallback@@#1}%
+}
+\let\pxhy at kv@fallback@@geta\pxhy at fallback@getatrue
+\let\pxhy at kv@fallback@@delete\pxhy at fallback@getafalse
+% 'extjis=<bool>'
+\pxhy at extjis@usetrue
+\define at key{\pxhy at pkgname}{extjis}[true]{%
+  \pxhy at handle@key{extjis}{#1}{extjis at use#1}%
+}
+% 'ajhankaku-chars=<bool>'
+\define at key{\pxhy at pkgname}{ajhankaku-chars}[true]{%
+  \pxhy at handle@key{ajhankaku-chars}{#1}{ajhankaku at chars#1}%
+}
 %% dispatch
 \ExecuteOptions{%
   resetdvidriver,tounicode,papersize,charcmds,jacommentline,%
-  disablecmds,otfutf,otfcid,fallback-geta%
+  disablecmds,otfutf,otfcid%
 }
 \ProcessOptions*
 
@@ -251,6 +290,12 @@
 %% pxhy at ucs@avail switch
 \pxhy at check\ucs{\pxhy at ucs@availtrue}
 
+%% pxhy at extjis@map switch
+% Note that 'tounicode' is necessary.
+\ifpxhy at etex \ifpxhy at uptex\else \ifpxhy at tounicode
+  \pxhy at extjis@maptrue
+\fi\fi\fi
+
 %% Check the document class.
 % jlreq
 \ifpxhy at etex
@@ -388,11 +433,9 @@
 \let\pxhy at geta\pxhy at jchar
 
 %% \pxhy at print@geta
-\ifpxhy at fallback@geta
-  \def\pxhy at print@geta{\pxhy at geta}
-\else
-  \let\pxhy at print@geta\@empty
-\fi
+\def\pxhy at print@geta{%
+  \ifpxhy at fallback@geta \pxhy at geta \fi
+}
 
 %% \pxhy at hook@after at package{<package-name>}{<code>}
 \@onlypreamble\pxhy at hook@after at package
@@ -417,6 +460,11 @@
   \expandafter\expandafter\expandafter
 }
 
+%% \pxhy at csletcs{<csname1>}{<csname2>}
+\def\pxhy at csletcs#1#2{%
+  \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname
+}
+
 %% \pxhy at cond\ifXXX<arg>\fi{<true>}{<false>}
 % Does the test "\ifXXX<arg>", with immediate exit from the
 % induced if-level.
@@ -730,11 +778,25 @@
     \def\pxhy at uchex@out#1{%
       \expandafter\pxhy at uchex@out at a\ucs"#1\pxhy at mk{#1}%
     }
+    \chardef\pxhy at max@asc="7F
     \def\pxhy at uchex@out at a#1\pxhy at mk#2{%
       \ifnum#1<\z@
+        \ifnum"#2>\pxhy at max@asc
+          \ifpxhy at extjis@use
+            \expandafter\pxhy at uchex@out at b\csname
+                pxhy at uc/\number"#2\endcsname{#2}%
+          \else \pxhy at uchex@out at b\relax{#2}%
+          \fi
+        \else \Uchar"#2
+        \fi
+      \else \Uchar#1
+      \fi
+    }
+    \def\pxhy at uchex@out at b#1#2{%
+      \ifx#1\relax
         \@nameuse{U+#2}%
         \pxhy at print@geta
-      \else \Uchar#1
+      \else #1%
       \fi
     }
 
@@ -845,6 +907,45 @@
   }
 \fi
 
+%--------------------------------------- Fix for high-byte protection
+\ifpxhy at etex
+\begingroup
+% Check for high-byte protection.
+\catcode"EF=\active \catcode`\^=7
+\global\let\pxhy at std@EF=^^ef
+\def\pxhy at next#1 #2\pxhy at end{%
+  \@tempswafalse
+  \def\pxhy at tmpa{#1}\edef\pxhy at tmpb{\string\protected}%
+  \ifx\pxhy at tmpa\pxhy at tmpb \@tempswatrue \fi
+}\expandafter\pxhy at next\meaning\pxhy at std@EF. \pxhy at end
+% Add a hook if protected.
+\if at tempswa
+
+  %% \pxhy at unprotect@high at bytes
+  \let\pxhy at unprotect@high at bytes\@empty
+  \def\pxhy at next#1#2{%
+    \expandafter\gdef\expandafter#1\expandafter{#2}%
+    \edef\pxhy at unprotect@high at bytes{%
+      \unexpanded\expandafter{\pxhy at unprotect@high at bytes}%
+      \unexpanded{\let#2#1}}%
+    \advance\@tempcnta\@ne
+  }
+  \@tempcnta="C2
+  \@whilenum{\@tempcnta<"F5}\do{%
+    \lccode"EF=\@tempcnta
+    \lowercase{\expandafter\pxhy at next\csname
+        pxhy at uhb/\string^^ef\endcsname^^ef}%
+  }
+  \xdef\pxhy at unprotect@high at bytes{%
+    \unexpanded{\ifx^^ef\pxhy at std@EF}%
+      \unexpanded\expandafter{\pxhy at unprotect@high at bytes}%
+    \unexpanded{\fi}%
+  }
+  \ltx at GlobalPrependToMacro\pdfstringdefPreHook{\pxhy at unprotect@high at bytes}
+
+\fi
+\endgroup
+\fi
 %--------------------------------------- Support for 'otfutf'
 \ifpxhy at otfutf
 
@@ -961,15 +1062,98 @@
 \fi
 
 \fi
+%--------------------------------------- Extended JIS mapping
+\ifpxhy at extjis@map             %<*extjis-map>
+\begingroup
+
+\def\pxhy at next#1#2#3#4{%
+  \@tempcnta"#1\relax\@tempcntb#3\relax
+  \chardef\pxhy at tmpa\numexpr#4+1\relax
+  \@whilenum{\@tempcntb<\pxhy at tmpa}\do{%
+    \expandafter\xdef\csname pxhy at uc/\the\@tempcnta\endcsname{%
+      \unexpanded{#2}\the\@tempcntb}%
+    \advance\@tempcnta\@ne \advance\@tempcntb\@ne}%
+}
+
+%% add special mapping
+\ifnum \jis"2121="8140 % sjis
+  \pxhy at next{2460}{\207\10}{0}{7}
+  \pxhy at next{2468}{\207\11}{0}{7}
+  \pxhy at next{2470}{\207\12}{0}{3}
+  \pxhy at next{2160}{\207\12}{4}{7}
+  \pxhy at next{2164}{\207\13}{0}{5}
+  \pxhy at next{3349}{\207\13}{7}{7}
+  \pxhy at next{3314}{\207\14}{0}{0}
+  \pxhy at next{3322}{\207\14}{1}{1}
+  \pxhy at next{334D}{\207\14}{2}{2}
+  \pxhy at next{3318}{\207\14}{3}{3}
+  \pxhy at next{3327}{\207\14}{4}{4}
+  \pxhy at next{3303}{\207\14}{5}{5}
+  \pxhy at next{3336}{\207\14}{6}{6}
+  \pxhy at next{3351}{\207\14}{7}{7}
+  \pxhy at next{3357}{\207\15}{0}{0}
+  \pxhy at next{330D}{\207\15}{1}{1}
+  \pxhy at next{3326}{\207\15}{2}{2}
+  \pxhy at next{3323}{\207\15}{3}{3}
+  \pxhy at next{332B}{\207\15}{4}{4}
+  \pxhy at next{334A}{\207\15}{5}{5}
+  \pxhy at next{333B}{\207\15}{6}{6}
+  \pxhy at next{339C}{\207\15}{7}{7}
+  \pxhy at next{339D}{\207\16}{0}{1}
+  \pxhy at next{338E}{\207\16}{2}{3}
+  \pxhy at next{33C4}{\207\16}{4}{4}
+  \pxhy at next{33A1}{\207\16}{5}{5}
+  \pxhy at next{337B}{\207\17}{6}{6}
+  \pxhy at next{301D}{\207\20}{0}{0}
+  \pxhy at next{301F}{\207\20}{1}{1}
+  \pxhy at next{2116}{\207\20}{2}{2}
+  \pxhy at next{33CD}{\207\20}{3}{3}
+  \pxhy at next{2121}{\207\20}{4}{4}
+  \pxhy at next{32A4}{\207\20}{5}{7}
+  \pxhy at next{32A7}{\207\21}{0}{1}
+  \pxhy at next{3231}{\207\21}{2}{3}
+  \pxhy at next{3239}{\207\21}{4}{4}
+  \pxhy at next{337E}{\207\21}{5}{5}
+  \pxhy at next{337D}{\207\21}{6}{6}
+  \pxhy at next{337C}{\207\21}{7}{7}
+  \pxhy at next{222E}{\207\22}{3}{3}
+  \pxhy at next{2211}{\207\22}{4}{4}
+  \pxhy at next{221F}{\207\23}{0}{0}
+  \pxhy at next{22BF}{\207\23}{1}{1}
+  \pxhy at next{FF61}{\24}{1}{7}
+  \pxhy at next{FF68}{\25}{0}{7}
+  \pxhy at next{FF70}{\26}{0}{7}
+  \pxhy at next{FF78}{\27}{0}{7}
+  \pxhy at next{FF80}{\30}{0}{7}
+  \pxhy at next{FF88}{\31}{0}{7}
+  \pxhy at next{FF90}{\32}{0}{7}
+  \pxhy at next{FF98}{\33}{0}{7}
+\else\ifnum\jis"2121="A1A1 % euc
+  \pxhy at next{FF61}{\216\24}{1}{7}
+  \pxhy at next{FF68}{\216\25}{0}{7}
+  \pxhy at next{FF70}{\216\26}{0}{7}
+  \pxhy at next{FF78}{\216\27}{0}{7}
+  \pxhy at next{FF80}{\216\30}{0}{7}
+  \pxhy at next{FF88}{\216\31}{0}{7}
+  \pxhy at next{FF90}{\216\32}{0}{7}
+  \pxhy at next{FF98}{\216\33}{0}{7}
+\fi\fi
+
+%% \pxhy at hkcdot
+\global\pxhy at csletcs{pxhy at hkcdot}{pxhy at uc/\number"FF65}
+
+\endgroup
+\fi                             %</extjis-map>
 %--------------------------------------- Redefine text commands for PD1
+\ifpxhy at charcmds                %<*charcmds>
 
+%% \pxhy at cc@jis at only
+\chardef\pxhy at cc@jis at only=0
 %% \pxhy at pdfenc
 \edef\pxhy at pdfenc{%
   \ifpxhy at hy@unicode PU\else PD1\fi
 }
 
-\ifpxhy at charcmds                %<*charcmds>
-
 %%<+> \pxDeclarePdfTextCommand{\CS}{<jis>}{<ucs>}
 \@onlypreamble\pxDeclarePdfTextCommand
 \newcommand*\pxDeclarePdfTextCommand[3]{%
@@ -986,15 +1170,6 @@
    {\pxhy at revoke@pdf at tcc{#1}{#2}}%
 }
 
-\else                           %<*!textcmd>
-
-\@onlypreamble\pxDeclarePdfTextCommand
-\newcommand*\pxDeclarePdfTextCommand[3]{}
-\@onlypreamble\pxDeclarePdfTextComposite
-\newcommand*\pxDeclarePdfTextComposite[4]{}
-
-\fi                             %</textcmd>
-
 %% \pxhy at revoke@pdf at tc
 \@onlypreamble\pxhy at revoke@pdf at tc
 \def\pxhy at revoke@pdf at tc#1{%
@@ -1022,7 +1197,8 @@
 %% \pxhy at decl@pdf at tc
 \@onlypreamble\pxhy at decl@pdf at tc
 \def\pxhy at decl@pdf at tc#1#2{%
-  \pxhy at get@body{#1}{#2}%
+  \edef\pxhy at next{{#1}{\ifx\pxhy at mt#2\pxhy at mt FFFD\else#2\fi}}%
+  \expandafter\pxhy at get@body\pxhy at next
   \ifx\pxhy at body\@undefined
     \let\pxhy at next\@secondoftwo
   \else
@@ -1043,10 +1219,13 @@
     \pxhy at get@jchar{\ucs"#2}%
     \let\pxhy at body\pxhy at jchar
   }%
-\else                           %<*!upTeX>
-  \ifpxhy at uniescape
+\else\ifpxhy at hy@unicode         %<*unicode>
+  \def\pxhy at get@body#1#2{%
+    \def\pxhy at body{\unichar{"#2}}%
+  }%
+\else\ifpxhy at uniescape          %<*uniescape>
     \def\pxhy at get@body#1#2{%
-      \ifx\pxhy at end#1\pxhy at end
+      \ifx\pxhy at mt#1\pxhy at mt
         \def\pxhy at body{\0x#2}%
       \else
         \pxhy at get@jchar{\jis"#1}%
@@ -1053,9 +1232,10 @@
         \let\pxhy at body\pxhy at jchar
       \fi
     }%
-  \else
+\else                           %<*!>
+  \chardef\pxhy at cc@jis at only=1
     \def\pxhy at get@body#1#2{%
-      \ifx\pxhy at end#1\pxhy at end
+      \ifx\pxhy at mt#1\pxhy at mt
         \let\pxhy at body\@undefined
       \else
         \pxhy at get@jchar{\jis"#1}%
@@ -1062,12 +1242,25 @@
         \let\pxhy at body\pxhy at jchar
       \fi
     }%
-  \fi
-\fi                             %</upTeX>
+\fi\fi\fi                       %</>
 
 %%%%%%%%%%%%%%%%%%%% the definitions
-\ifpxhy at hy@unicode\else         %<!*unicode>
+\ifpxhy at hy@unicode              %<*unicode>
 
+% The PU encoding has already done the job.
+% I supplement some definitions.
+\def\pxhy at next#1#2{%
+  \expandafter\ifx\csname PU\string#1\endcsname\relax
+    \DeclareTextCommand{#1}{PU}{#2}\fi}
+\pxhy at next{\guillemetleft}{\80\253}%00AB
+\pxhy at next{\guillemetright}{\80\273}%00BB
+\pxhy at next{\textborn}{\9046\005}%2605
+\pxhy at next{\textfinalsigma}{\83\302}%03C2
+\pxhy at next{\textxgeq}{\9042\145}%2265
+\pxhy at next{\textxleq}{\9042\144}%2264
+
+\else                           %<!*unicode>
+
 % JIS X 0213 does not distinguish the following pairs:
 %  - circumflex(U+02C6) and asciicircum(U+005E)
 %  - tilde(U+02DC) and asciitilde(U+007E)
@@ -1084,6 +1277,9 @@
 \DeclareTextCommand{\ij}{PD1}{ij}% needed?
 \DeclareTextCommand{\textspace}{PD1}{\040}
 \DeclareTextCommand{\textquotesingle}{PD1}{\047}
+\DeclareTextCommand{\textasteriskcentered}{PD1}{*}
+\DeclareTextCommand{\textanoteleia}{PD1}{\textperiodcentered}
+\DeclareTextCommand{\texterotimatiko}{PD1}{;}
 
 %% Some adjustments on accents.
 \DeclareTextAccent{\H}{PD1}{\texthungarumlaut}
@@ -1092,6 +1288,9 @@
 \DeclareTextAccent{\u}{PD1}{\textasciibreve}
 \DeclareTextCompositeCommand{\u}{PD1}{\@empty}{\textasciibreve}
 \DeclareTextCompositeCommand{\u}{PD1}{\ }{\textasciibreve}
+\DeclareTextAccent{\U}{PD1}{\textasciibreve}
+\DeclareTextCompositeCommand{\U}{PD1}{\@empty}{\textasciibreve}
+\DeclareTextCompositeCommand{\U}{PD1}{\ }{\textasciibreve}
 \DeclareTextAccent{\k}{PD1}{\textogonek}
 \DeclareTextCompositeCommand{\k}{PD1}{\@empty}{\textogonek}
 \DeclareTextCompositeCommand{\k}{PD1}{\ }{\textogonek}
@@ -1335,10 +1534,12 @@
 \pxDeclarePdfTextCommand{\CYRD}{2725}{0414}
 \pxDeclarePdfTextCommand{\CYRE}{2726}{0415}
 \pxDeclarePdfTextCommand{\CYRYO}{2727}{0401}
+\pxDeclarePdfTextComposite{\"}{\CYRE}{2727}{0401}
 \pxDeclarePdfTextCommand{\CYRZH}{2728}{0416}
 \pxDeclarePdfTextCommand{\CYRZ}{2729}{0417}
 \pxDeclarePdfTextCommand{\CYRI}{272A}{0418}
 \pxDeclarePdfTextCommand{\CYRISHRT}{272B}{0419}
+\pxDeclarePdfTextComposite{\U}{\CYRI}{272B}{0419}
 \pxDeclarePdfTextCommand{\CYRK}{272C}{041A}
 \pxDeclarePdfTextCommand{\CYRL}{272D}{041B}
 \pxDeclarePdfTextCommand{\CYRM}{272E}{041C}
@@ -1368,10 +1569,12 @@
 \pxDeclarePdfTextCommand{\cyrd}{2755}{0434}
 \pxDeclarePdfTextCommand{\cyre}{2756}{0435}
 \pxDeclarePdfTextCommand{\cyryo}{2757}{0451}
+\pxDeclarePdfTextComposite{\"}{\cyre}{2757}{0451}
 \pxDeclarePdfTextCommand{\cyrzh}{2758}{0436}
 \pxDeclarePdfTextCommand{\cyrz}{2759}{0437}
 \pxDeclarePdfTextCommand{\cyri}{275A}{0438}
 \pxDeclarePdfTextCommand{\cyrishrt}{275B}{0439}
+\pxDeclarePdfTextComposite{\U}{\cyri}{275B}{0439}
 \pxDeclarePdfTextCommand{\cyrk}{275C}{043A}
 \pxDeclarePdfTextCommand{\cyrl}{275D}{043B}
 \pxDeclarePdfTextCommand{\cyrm}{275E}{043C}
@@ -1458,11 +1661,14 @@
 % Give a substitute definition to characters that appear as
 % ligatures, since otherwise hyperref leaves some garbage in
 % output pdf-strings when such ligatures appear.
-\ifpxhy at uptex\else
-  \ifpxhy at uniescape\else
+\ifnum\pxhy at cc@jis at only>\z@
     \DeclareTextCommand{\textendash}{PD1}{--}
     \DeclareTextCommand{\textquestiondown}{PD1}{}% empty
     \DeclareTextCommand{\textexclamdown}{PD1}{}% empty
+\fi
+\ifnum\pxhy at cc@jis at only>\z@
+  \ifx\pxhy at hkcdot\@undefined\else
+    \DeclareTextCommand{\textperiodcentered}{PD1}{\pxhy at hkcdot}
   \fi
 \fi
 
@@ -1469,8 +1675,6 @@
 \fi                             %</unicode>
 %%%%%%%%%%%%%%%%%%%% done
 
-\ifpxhy at charcmds                %<*charcmds>
-
   %% \pxhy at disable@tc at commands
   \def\pxhy at disable@tc at commands{%
     \let\yen\textyen
@@ -1486,22 +1690,14 @@
   %% register to 'disable' list
   \ltx at GlobalPrependToMacro\pdfstringdefPreHook{\pxhy at disable@tc at commands}
 
-  \ifpxhy at hy@unicode            %<*unicode>
+\else                           %<*!textcmd>
 
-    %% supplementary definitions
-    \def\pxhy at next#1#2{%
-      \expandafter\ifx\csname PU\string#1\endcsname\relax
-        \DeclareTextCommand{#1}{PU}{#2}\fi}
-    \pxhy at next{\guillemetleft}{\80\253}%00AB
-    \pxhy at next{\guillemetright}{\80\273}%00BB
-    \pxhy at next{\textborn}{\9046\005}%2605
-    \pxhy at next{\textfinalsigma}{\83\302}%03C2
-    \pxhy at next{\textxgeq}{\9042\145}%2265
-    \pxhy at next{\textxleq}{\9042\144}%2264
+\@onlypreamble\pxDeclarePdfTextCommand
+\newcommand*\pxDeclarePdfTextCommand[3]{}
+\@onlypreamble\pxDeclarePdfTextComposite
+\newcommand*\pxDeclarePdfTextComposite[4]{}
 
-  \fi                           %</unicode>
 \fi                             %</textcmd>
-
 %--------------------------------------- Enable hyperref unicode
 \ifpxhy at hy@unicode
 



More information about the tex-live-commits mailing list.