texlive[63290] Master/texmf-dist: pxjahyper (13may22)

commits+karl at tug.org commits+karl at tug.org
Fri May 13 23:35:59 CEST 2022


Revision: 63290
          http://tug.org/svn/texlive?view=revision&revision=63290
Author:   karl
Date:     2022-05-13 23:35:58 +0200 (Fri, 13 May 2022)
Log Message:
-----------
pxjahyper (13may22)

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.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-13 21:35:45 UTC (rev 63289)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md	2022-05-13 21:35:58 UTC (rev 63290)
@@ -73,6 +73,14 @@
 更新履歴
 --------
 
+  * Version 1.1  〈2022/05/10〉
+      - オプション `fallback-geta`/`fallback-delete` を追加。
+      - `\Uchar` を利用したUnicode文字出力をサポート。
+      - オプション `(no)charcmds` を追加。
+      - hyperref のドライバ指定が非サポートの場合に警告する。
+      - `otfmacros` オプション指定の条件を撤廃する。
+      - `autodvidriver` を `resetdvidriver` に変える。
+
   * Version 1.0a 〈2022/04/15〉
       - バグ修正。
 

Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md	2022-05-13 21:35:45 UTC (rev 63289)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md	2022-05-13 21:35:58 UTC (rev 63290)
@@ -52,6 +52,7 @@
 Revision History
 ----------------
 
+  * Version 1.1  〈2022/05/10〉
   * Version 1.0a 〈2022/04/15〉
   * Version 1.0  〈2022/04/01〉
   * Version 0.9d 〈2022/03/15〉

Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex	2022-05-13 21:35:45 UTC (rev 63289)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex	2022-05-13 21:35:58 UTC (rev 63290)
@@ -16,8 +16,8 @@
 \bxtexlogoimport{*}
 \usepackage{shortvrb}
 \MakeShortVerb{\|}
-\newcommand{\PkgVersion}{1.0a}
-\newcommand{\PkgDate}{2022/04/15}
+\newcommand{\PkgVersion}{1.1}
+\newcommand{\PkgDate}{2022/05/10}
 \newcommand{\Pkg}[1]{\textsf{#1}}
 \newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$}
 \newcommand{\Note}{\par\noindent ※}
@@ -64,7 +64,7 @@
 \usepackage[オプション,...]{pxjahyper}
 \end{verbatim}\end{quote}
 
-使用可能なオプションは以下の通り。
+\paragraph{使用可能なオプション}\mbox{}
 \begin{itemize}
 \item \Strong{ドライバオプション}\Means
   |dvipdfmx|、|dvips|、および |nodvidriver|%
@@ -74,14 +74,14 @@
   \Note 1.0版において |nodvidriver| の別名の |none| は
     \Strong{廃止}された。
     (0.5版から非推奨だった。)
-\item |autodvidriver|(既定)\Means
+\item |resetdvidriver|(既定)\Means
   ドライバオプションを\Pkg{hyperref}のドライバ指定から自動的に判定する。
-  \Note 1.0版において名前を |auto| から |autodvidriver| に変更した。
+  \Note 1.1版において名前を |auto| から |resetdvidriver| に変更した。
     旧名の |auto| は\Strong{非推奨}とする。
 \item |tounicode|(既定)\Means
   以下の2つの設定を行う。
   \begin{enumerate}
-  \item ドライバがdvipdfmxである場合は「tounicode special」を発行する。
+  \item ドライバが |dvipdfmx| である場合は「tounicode special」を発行する。
     \Note この設定は |notounicode| オプションにより打ち消される。
   \item 「tounicode special」を前提にした出力を行う。
     \Note この設定は |out2uni|・|convbkmk| オプションと排他である。
@@ -92,10 +92,31 @@
   out2uniフィルタを使うことを前提にした出力を行う。
 \item |convbkmk|\Means
   convbkmkフィルタを使うことを前提にした出力を行う。
-  \Note ドライバがdvipsの場合は既定で |convbkmk| が有効になる。
+  \Note ドライバが |dvips| の場合は既定で |convbkmk| が有効になる。
   これにより元の既定値 |tounicode| は
   (1は効果がなく2は上書きされるため)
   実質的に無効化される。
+\item |fallback-geta|(既定)\Means
+  PDF文字列中で表現不可能な文字をゲタ記号(〓)に置き換える。
+\item |fallback-delete|\Means
+  PDF文字列中で表現不可能な文字を削除する。
+\item |otfmacros|(既定)\Means
+  \Pkg{japanese-otf}付属の\Pkg{ajmacros}パッケージが提供する
+  文字入力命令(|\ajMaru|、|\ajLig| 等)をPDF文字列中で
+  “可能な限り”使えるようにする。
+  \Note 詳細は\ref{ssec:otf-package}節を参照。
+  \Note |otfmacros| を有効にする場合は |otfcid| も有効にする必要がある。
+\item |nootfmacros|\Means
+  |otfmacros| の否定。
+  \Note 0.6版より既定を |otfmacros| に変更した。
+\item |papersize|(既定)\Means
+  papersize specialの補正を有効にする。
+\item |nopapersize|\Means
+  |papersize| の否定。
+\end{itemize}
+
+\paragraph{上級者向けオプション}\mbox{}
+\begin{itemize}
 \item |otfutf|(既定)\Means
   \Pkg{japanese-otf}パッケージの |\UTF| 命令をPDF文字列中で
   使えるようにする。
@@ -115,15 +136,6 @@
   \Note 詳細は\ref{ssec:disablecmds}節を参照。
 \item |nodisablecmds|\Means
   |disablecmds| の否定。
-\item |otfmacros|(既定)\Means
-  \Pkg{japanese-otf}付属の\Pkg{ajmacros}パッケージが提供する
-  文字入力命令(|\ajMaru|、|\ajLig| 等)をPDF文字列中で
-  “可能な限り”使えるようにする。
-  \Note 詳細は\ref{ssec:otf-package}節を参照。
-  \Note |otfmacros| を有効にする場合は |otfcid| も有効にする必要がある。
-\item |nootfmacros|\Means
-  |otfmacros| の否定。
-  \Note 0.6版より既定を |otfmacros| に変更した。
 \item |bigcode|(既定)\Means
   {\upTeX}でのToUnicode CMapとしてUTF8-UTF16を用いる。
   %(当該のファイルが存在する必要がある。)
@@ -130,11 +142,7 @@
 \item |nobigcode|\Means
   |bigcode| の否定。
   {\upTeX}でのToUnicode CMapとしてUTF8-UCS2を用いる。
-  %\Note 0.3a版より既定を |bigcode| に変更した。
-\item |papersize|(既定)\Means
-  papersize specialの補正を有効にする。
-\item |nopapersize|\Means
-  |papersize| の否定。
+  \Note 0.3a版より既定を |bigcode| に変更した。
 \item |force-unicode|\Means
   \Pkg{hyperref}の |unicode| オプションが有効でかつエンジンが{\pTeX}で
   ある状況(0.9版よりサポートが追加されたが\Strong{試験的}である)
@@ -151,7 +159,7 @@
 \subsection{Unicode符号値による入力}
 \label{ssec:ux-command}
 
-PDF文字列入力中で、|\Ux| が以下の意味になる。
+PDF文字列入力中で、命令 |\Ux| が以下の意味に変更される。
 PDF文字列以外では |\Ux| は以前の定義(または未定義)に戻る。
 \footnote{|\Ux| という命令名は\Pkg{bxbase}パッケージの
 Unicode符号値入力用の命令が使っているものである。
@@ -168,12 +176,23 @@
   その符号値の文字を出力する。
   具体的な動作は以下の通り:
   \begin{itemize}
-  \item エンジンが{\upLaTeX}のときは、当該の文字自体を書いたのと
-  同等になる。
-  \item エンジンが{\pLaTeX}で |out2uni| または |convbkmk| が有効の
+  \item |out2uni| または |convbkmk| が有効の
   場合は、エスケープ表記(|\0xUUUU|)を出力する。
+  \item エンジンが{\upLaTeX}の場合、あるいは“unicodeモード”
+  (\ref{sec:Unicode-mode}節)が有効の場合は、
+  当該のUnicode文字自体を書いたのと同等になる。
+  \item 上記以外で、{\TeX} Live 2022以降の{\pLaTeX}の場合
+  \footnote{正確にいうと、|\Uchar| と |\ucs| プリミティブをもつ
+    {\epTeX}エンジンである場合。}%
+  は、当該のUnicode文字に対応するJIS符号系の文字を書いたのと同等になる。
+  JIS符号系にない文字の場合は出力できないので警告を出しだ上で
+  ゲタ記号(〓)を出力%
+  \footnote{|fallback-delete| オプションが有効の場合は何も出力しない。
+    以降で「ゲタ記号を出力」とある場合についても同様。}%
+  する。
   \end{itemize}
-  \item それ以外の場合は、|\Ux| は定義されない。
+  \item どの条件にも当てはまらない場合は、|\Ux| は無効
+  (定義されない)になる。
 \end{itemize}
 
 %-------------------
@@ -181,8 +200,8 @@
 \label{ssec:otf-package}
 
 \paragraph{\textbackslash UTF命令}
-|\UTF| 命令は、PDF文字列中では
-out2uni用の出力を行うように設計されている。
+\Pkg{japanese-otf}パッケージの |\UTF| 命令は、PDF文字列中では
+out2uni用の出力を行う。
 本パッケージで |otfutf| オプションを有効にした場合は、
 PDF文字列中の動作が以下のように変更される。
 
@@ -189,10 +208,9 @@
 \begin{itemize}
 \item |\Ux| 命令(\ref{ssec:ux-command}節参照)が有効の場合は、
   |\Ux| と同じ動作になる。
-\item それ以外の場合
-  (エンジンが{\pLaTeX}でtounicodeを前提にする場合)は、
-  警告を出した上でゲタ記号を出力する。
-  \Note {\pLaTeX}ではtounicodeの機能でUnicode文字を出力できないため。
+\item それ以外の場合は、
+  常に(警告を出した上で)ゲタ記号を出力する。
+  %\Note {\pLaTeX}ではtounicodeの機能でUnicode文字を出力できないため。
 \end{itemize}
 
 \Note |\UTF| 命令の多言語版、
@@ -212,6 +230,10 @@
   (警告を出した上で)ゲタ記号を出力する。
   \footnote{旧版では削除していたが、他の同様の場合と合わせるため
     1.0版よりゲタ記号を出力する仕様を変更した。}
+  \Note 例えば、|\CID{8226}|(ローマ数字12)はUnicode文字の
+  U+217Bに“対応”するので |\Ux{217B}| と同等になるが、
+  |\CID{8297}|(ローマ数字15)については“対応”する
+  単独のUnicode文字がないので、ゲタ記号に置き換えられる。
 \item ただし |\Ux| 命令(\ref{ssec:ux-command}節参照)が
   無効になる場合は、そもそもUnicode文字も出力できないため、
   常に(警告を出した上で)ゲタ記号を出力する。
@@ -231,12 +253,13 @@
 具体的な仕様は以下の通り。
 
 \begin{itemize}
-\item 現状では、|\Ux| 命令が有効になる場合のみが
-  サポートされる。
-  \Note それ以外の場合は |otfmacros| オプションは無効になる。
+%\item 現状では、|\Ux| 命令が有効になる場合のみが
+%  サポートされる。
+%  \Note それ以外の場合は |otfmacros| オプションは無効になる。
 \item Unicode文字で表現可能であればそれを出力し、
   なければ代替表現を出力する。
 \item Unicode文字を出力する場合の仕様は |\CID| と同じ。
+  (|\Ux| が無効の場合はゲタ記号になる。)
   代替表現の場合は「普通の文字の出力に置き換えられる」
   可能性がある。
   \Note 例えば、|\ajLig{ドル}|(“ドル”の組文字)はUnicode文字の
@@ -333,7 +356,7 @@
 
 %===========================================================
 \section{hyperrefの“unicodeモード”での動作}
-\newcommand*{\cXAdj}{\mbox{}\vspace*{-2pt}}% WOW!
+\label{sec:Unicode-mode}
 
 \Pkg{hyperref}パッケージの |unicode| オプションが有効である場合
 (これを“unicodeモード”と呼ぶことにする
@@ -347,7 +370,7 @@
 \Pkg{hyperref}が“unicodeモード”である場合には、\Pkg{pxjahyper}は
 それを自動的に検知してそれに適応した動作に切り替える。
 \begin{itemize}
-\item \cXAdj|\Ux| 命令は\Pkg{hyperref}の |\unichar| 命令を利用して出力する。
+\item |\Ux| 命令は\Pkg{hyperref}の |\unichar| 命令を利用して出力する。
   このため、{\pLaTeX}でもUnicode文字の出力が可能になる。
 \item PDF文字列中の和文文字やLICR命令の処理は
   \Pkg{hyperref}の側に任せられる。
@@ -356,10 +379,10 @@
 \end{itemize}
 ただし、現状での“unicodeモード”対応動作には以下の制限がある。
 \begin{itemize}
-\item \cXAdj\Pkg{hyperref}の(|pdftitle| 等の)パッケージオプション中での
+\item \Pkg{hyperref}の(|pdftitle| 等の)パッケージオプション中での
   和文文字の処理は失敗する。
   このため、文書情報は |\hypersetup| 命令で指定する必要がある。
-\item \cXAdj{\pLaTeX}における“unicodeモード”対応動作は試験的機能の
+\item {\pLaTeX}における“unicodeモード”対応動作は試験的機能の
   扱いであるため、その旨の警告が表示される。
   この警告は |force-unicode| オプションを指定すれば抑止できる。
 \end{itemize}

Modified: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def	2022-05-13 21:35:45 UTC (rev 63289)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def	2022-05-13 21:35:58 UTC (rev 63290)
@@ -11,7 +11,7 @@
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesFile{pxjahyper-ajm.def}[2022/04/15 v1.0a]
+\ProvidesFile{pxjahyper-ajm.def}[2022/05/10 v1.1]
 
 %% avoid multiple loading
 \csname pxjahyperajmLoaded\endcsname

Modified: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty	2022-05-13 21:35:45 UTC (rev 63289)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty	2022-05-13 21:35:58 UTC (rev 63290)
@@ -10,7 +10,7 @@
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxjahyper-enc}[2022/04/15 v1.0a]
+\ProvidesPackage{pxjahyper-enc}[2022/05/10 v1.1]
 \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-13 21:35:45 UTC (rev 63289)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def	2022-05-13 21:35:58 UTC (rev 63290)
@@ -10,7 +10,7 @@
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesFile{pxjahyper-uni.def}[2022/04/15 v1.0a]
+\ProvidesFile{pxjahyper-uni.def}[2022/05/10 v1.1]
 \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-13 21:35:45 UTC (rev 63289)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty	2022-05-13 21:35:58 UTC (rev 63290)
@@ -10,7 +10,7 @@
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxjahyper}[2022/04/15 v1.0a]
+\ProvidesPackage{pxjahyper}[2022/05/10 v1.1]
 \def\pxhy at pkgname{pxjahyper}
 \providecommand{\bxDebug}[1]{}
 
@@ -37,7 +37,7 @@
 \newif\ifpxhy at bigcode
 \let\pxhy at bigcode@given\relax
 \newif\ifpxhy at papersize
-\newif\ifpxhy at textcmd
+\newif\ifpxhy at charcmds
 \chardef\pxhy at driver@none=0
 \chardef\pxhy at driver@dvipdfmx=1
 \chardef\pxhy at driver@dvips=2
@@ -48,8 +48,11 @@
 \newif\ifpxhy at otfutf
 \newif\ifpxhy at otfcid
 \newif\ifpxhy at otfmacros
+\newif\ifpxhy at Uchar@avail
+\newif\ifpxhy at ucs@avail
 \let\pxhy at jsclasses@name\relax
 \newif\ifpxhy at jlreq@cls
+\newif\ifpxhy at fallback@geta
 
 %--------------------------------------- Package options
 
@@ -66,13 +69,16 @@
 \DeclareOption{nodvidriver}{%
   \let\pxhy at driver\pxhy at driver@none
 }
+\DeclareOption{resetdvidriver}{%
+  \let\pxhy at driver\@undefined
+}
 \DeclareOption{autodvidriver}{%
   \let\pxhy at driver\@undefined
 }
-%% modes
-\DeclareOption{auto}{%
-  \let\pxhy at driver\@undefined %FIXME
+\DeclareOption{auto}{% DEPRECATED
+  \let\pxhy at driver\@undefined
 }
+%% operation modes
 \DeclareOption{tounicode}{%
   \pxhy at tounicodetrue
 }
@@ -100,6 +106,12 @@
 \DeclareOption{nopapersize}{%
   \pxhy at papersizefalse
 }
+\DeclareOption{charcmds}{%
+  \pxhy at charcmdstrue
+}
+\DeclareOption{nocharcmds}{%
+  \pxhy at charcmdsfalse
+}
 \pxhy at bigcodetrue
 \DeclareOption{bigcode}{%
   \pxhy at bigcodetrue
@@ -140,12 +152,22 @@
 \DeclareOption{nootfmacros}{%
   \pxhy at otfmacrosfalse
 }
+\DeclareOption{fallback-geta}{%
+  \pxhy at fallback@getatrue
+}
+\DeclareOption{fallback-delete}{%
+  \pxhy at fallback@getafalse
+}
 \DeclareOption{force-unicode}{%
   \let\pxhy at force@unicode=t
 }
+\DeclareOption{disable-Ux}{% for debug
+  \let\pxhy at disable@Ux=t
+}
 %% dispatch
 \ExecuteOptions{%
-  auto,tounicode,papersize,jacommentline,disablecmds,otfutf,otfcid%
+  resetdvidriver,tounicode,papersize,charcmds,jacommentline,%
+  disablecmds,otfutf,otfcid,fallback-geta%
 }
 \ProcessOptions*
 
@@ -188,6 +210,10 @@
   \ifx\Hy at driver\pxhy at tmpa
     \let\pxhy at driver\pxhy at driver@dvips
   \fi
+  \ifnum\pxhy at driver=\pxhy at driver@none \ifx\Hy at driver\@undefined\else
+    \PackageWarningNoLine\pxhy at pkgname
+     {Unknown hyperref driver: \Hy at driver}
+  \fi\fi
 \fi
 
 %% Check the engine.
@@ -220,6 +246,11 @@
   \expandafter\endinput
 \fi
 
+%% pxhy at Uchar@avail switch
+\pxhy at check\Uchar{\pxhy at Uchar@availtrue}
+%% pxhy at ucs@avail switch
+\pxhy at check\ucs{\pxhy at ucs@availtrue}
+
 %% Check the document class.
 % jlreq
 \ifpxhy at etex
@@ -247,16 +278,6 @@
      {bigcode is invalid without upTeX}
   \fi
 \fi\fi
-%% pxhy at papersize switch
-\ifnum\pxhy at driver=\pxhy at driver@none
-  \pxhy at papersizefalse
-\fi
-%% pxhy at textcmd switch
-\ifnum\pxhy at driver=\pxhy at driver@none
-  \pxhy at textcmdfalse
-\else
-  \pxhy at textcmdtrue
-\fi
 %% pxhy at uniescape switch
 \ifnum\pxhy at driver=\pxhy at driver@dvips \ifx t\pxhy at nouniescape@given\else
   \pxhy at uniescapetrue
@@ -271,17 +292,8 @@
 \fi
 \ifpxhy at hy@unicode
   \pxhy at uniescapefalse
-  \pxhy at otfutftrue
+  %\pxhy at otfutftrue
 \fi
-% otfmacros requires upTeX or out2uni.
-\ifpxhy at uptex\else\ifpxhy at uniescape\else\ifpxhy at hy@unicode\else
-  \pxhy at otfmacrosfalse
-  \ifx t\pxhy at otfmacros@given
-    \PackageWarningNoLine\pxhy at pkgname
-     {Option 'otfmacros' is invalid\MessageBreak
-      unless upTeX is used or 'out2uni' is specified}
-  \fi
-\fi\fi\fi
 % otfcid requrires otfutf.
 \ifpxhy at otfutf \else \ifpxhy at otfcid
   \PackageInfo\pxhy at pkgname
@@ -297,6 +309,12 @@
   \pxhy at otfmacrosfalse
 \fi\fi
 
+%% in nodvidriver mode
+\ifnum\pxhy at driver=\pxhy at driver@none
+  \pxhy at papersizefalse
+  \pxhy at charcmdsfalse
+\fi
+
 \bxDebug{****pxjahyper env^^J%
 pxhy at ptex = \ifpxhy at ptex true\else false\fi^^J%
 pxhy at uptex = \ifpxhy at uptex true\else false\fi^^J%
@@ -303,13 +321,19 @@
 pxhy at etex = \ifpxhy at etex true\else false\fi^^J%
 pxhy at etoolbox = \ifpxhy at etoolbox true\else false\fi^^J%
 pxhy at hook@system = \the\pxhy at hook@system^^J%
-ifpxhy at hy@unicode = \ifpxhy at hy@unicode true\else false\fi^^J%
-pxhy at bigcode = \ifpxhy at bigcode true\else false\fi^^J%
-pxhy at driver = \the\pxhy at driver^^J%
 pxhy at tounicode = \ifpxhy at tounicode true\else false\fi^^J%
 pxhy at uniescape = \ifpxhy at uniescape true\else false\fi^^J%
+pxhy at bigcode = \ifpxhy at bigcode true\else false\fi^^J%
 pxhy at papersize = \ifpxhy at papersize true\else false\fi^^J%
-pxhy at textcmd = \ifpxhy at textcmd true\else false\fi^^J%
+pxhy at charcmds = \ifpxhy at charcmds true\else false\fi^^J%
+pxhy at driver = \the\pxhy at driver^^J%
+ifpxhy at hy@unicode = \ifpxhy at hy@unicode true\else false\fi^^J%
+pxhy at jacommentline = \ifpxhy at jacommentline true\else false\fi^^J%
+pxhy at disablecmds = \ifpxhy at disablecmds true\else false\fi^^J%
+pxhy at otfutf = \ifpxhy at otfutf true\else false\fi^^J%
+pxhy at otfcid = \ifpxhy at otfcid true\else false\fi^^J%
+pxhy at otfmacros = \ifpxhy at otfmacros true\else false\fi^^J%
+pxhy at fallback@geta = \ifpxhy at fallback@geta true\else false\fi^^J%
 }
 
 %--------------------------------------- Helpers
@@ -363,6 +387,13 @@
 \pxhy at get@jchar{\jis"222E}
 \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
+
 %% \pxhy at hook@after at package{<package-name>}{<code>}
 \@onlypreamble\pxhy at hook@after at package
 \def\pxhy at hook@after at package#1#2{%
@@ -418,6 +449,12 @@
 \def\pxhy at if@opt at a#1@[@#2#3\pxhy at mk{#2}
 \def\pxhy at if@opt at b#1#2]{#1{#2}}
 
+%% \pxhy at xdetokenize{<text>}
+\let\pxhy at xdetokenize\detokenize
+\pxhy at check\expanded{%
+  \def\pxhy at xdetokenize#1{\detokenize\expandafter{\expanded{#1}}}%
+}
+
 \fi
 %--------------------------------------- Load bxjatoucs
 
@@ -428,7 +465,7 @@
 \let\pxhy at bxjatoucs@failure\relax
 
 %% \pxhy at try@load at bxjatoucs
-% Tries to load bxjatoucs. If it failed, then it sets the reason
+% Tries to load bxjatoucs. If that fails, then it sets the reason
 % message to \pxhy at bxjatoucs@failure.
 \@onlypreamble\pxhy at try@load at bxjatoucs
 \def\pxhy at try@load at bxjatoucs{%
@@ -487,7 +524,7 @@
 
 % When the magnification is in effect (i.e. \mag<>1000), hyperref
 % emits a papersize special with wrong value. (dvipdfmx interprets
-% the lengths in the special as 'true' length.) So here a papersize
+% the lengths in the special as 'true' lengths.) So here a papersize
 % special with adjusted values will be output.
 \ifnum\mag=1000 \else
   \expandafter\ifx\csname ifHy at setpagesize\expandafter\endcsname
@@ -677,6 +714,31 @@
     \unichar{"#1}%
   }
 
+\else\ifpxhy at Uchar@avail           %<*Uchar>
+  \ifpxhy at uptex
+
+    %% \pxhy at Ux
+    \def\pxhy at Ux{\pxhy at uchex}
+    \pxhy at utfXVIfalse
+    \def\pxhy at uchex@out#1{\Uchar"#1 }
+
+  \else\ifpxhy at ucs@avail
+
+    %% \pxhy at Ux
+    \def\pxhy at Ux{\pxhy at uchex}
+    \pxhy at utfXVIfalse
+    \def\pxhy at uchex@out#1{%
+      \expandafter\pxhy at uchex@out at a\ucs"#1\pxhy at mk{#1}%
+    }
+    \def\pxhy at uchex@out at a#1\pxhy at mk#2{%
+      \ifnum#1<\z@
+        \@nameuse{U+#2}%
+        \pxhy at print@geta
+      \else \Uchar#1
+      \fi
+    }
+
+  \fi\fi
 \else\ifpxhy at uptex              %<*upTeX>
 
   %% \pxhy at Ux
@@ -723,6 +785,11 @@
   \expandafter\pxhy at next\pxhy at marker
   %END--
 
+\fi\fi\fi                       %</>
+
+\AtEndOfPackage{%
+\ifx\pxhy at posthook\@undefined\else
+  \bxDebug{add to \string\pdfstringdefPostHook}%
   % Add \pxhy at posthook to \pdfstringdefPostHook.
   \begingroup
     \toks@\expandafter{\pdfstringdefPostHook{#1}}
@@ -734,11 +801,12 @@
     }%
     \pxhy at next
   \endgroup
+\fi
+}
 
-\fi\fi                          %</>
-
 \ifpxhy at uniescape               %<*uniescape>
 
+  \let\pxhy at posthook\@undefined
   %% \pxhy at Ux
   \def\pxhy at Ux{\pxhy at uchex}%
   % \pxhy at uchex converts to UTF-16
@@ -750,6 +818,12 @@
 
 \fi                             %</uniescape>
 
+%% 'disable-Ux' (for debug)
+\ifx t\pxhy at disable@Ux
+  \let\pxhy at Ux\@undefined
+  \let\pxhy at posthook\@undefined
+\fi
+
 %% Makes \Ux be the code input command in PDF strings.
 \ifx\pxhy at Ux\@undefined\else
   \pdfstringdefDisableCommands{%
@@ -782,7 +856,7 @@
   \pxhy at utfXVIfalse
   \def\pxhy at uchex@out#1{%
     \@nameuse{U+#1}% issue a warning
-    \pxhy at geta
+    \pxhy at print@geta
   }
 \else
   \let\pxhy at UTF\pxhy at Ux
@@ -821,7 +895,7 @@
 %% \pxhy at CID{<cid>}
 \def\pxhy at CID#1{%
   \expandafter\expandafter\expandafter\pxhy at cid@aux
-      \bxjaCidToUcsHex{#1}\pxhy at mk{\detokenize{#1}}%
+      \bxjaCidToUcsHex{#1}\pxhy at mk{\pxhy at xdetokenize{#1}}%
 }
 %% \pxhy at fast@CID{<cid>}
 \def\pxhy at fast@CID#1{%
@@ -831,7 +905,7 @@
 \ifx\pxhy at Ux\@undefined
   \def\pxhy at cid@aux#1\pxhy at mk#2{%
     \@nameuse{CID+#2}% issue a warning
-    \pxhy at geta
+    \pxhy at print@geta
   }
 \else
 \def\pxhy at cid@aux#1\pxhy at mk#2{%
@@ -839,7 +913,7 @@
     \pxhy at Ux{#1}%
   \else
     \@nameuse{CID+#2}%
-    \pxhy at geta
+    \pxhy at print@geta
   \fi
 }
 \fi
@@ -894,7 +968,7 @@
   \ifpxhy at hy@unicode PU\else PD1\fi
 }
 
-\ifpxhy at textcmd                 %<*textcmd>
+\ifpxhy at charcmds                %<*charcmds>
 
 %%<+> \pxDeclarePdfTextCommand{\CS}{<jis>}{<ucs>}
 \@onlypreamble\pxDeclarePdfTextCommand
@@ -1395,7 +1469,7 @@
 \fi                             %</unicode>
 %%%%%%%%%%%%%%%%%%%% done
 
-\ifpxhy at textcmd                 %<*textcmd>
+\ifpxhy at charcmds                %<*charcmds>
 
   %% \pxhy at disable@tc at commands
   \def\pxhy at disable@tc at commands{%
@@ -1446,7 +1520,7 @@
 %--------------------------------------- 'jacommentline'
 \ifpxhy at jacommentline
 
-% The 'jacomemntline' feature outputs at the top of the
+% The 'jacommentline' feature outputs at the top of the
 % hyperref outline file (*.out) a comment line including
 % some Japanese characters.
 



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