diff options
7 files changed, 189 insertions, 83 deletions
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md b/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md index f59730afd74..29926943e2e 100644 --- a/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md +++ b/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md @@ -73,6 +73,14 @@ pxjahyper-enc パッケージ ー 文字コード設定 更新履歴 -------- + * Version 1.1 〈2022/05/10〉 + - オプション `fallback-geta`/`fallback-delete` を追加。 + - `\Uchar` を利用したUnicode文字出力をサポート。 + - オプション `(no)charcmds` を追加。 + - hyperref のドライバ指定が非サポートの場合に警告する。 + - `otfmacros` オプション指定の条件を撤廃する。 + - `autodvidriver` を `resetdvidriver` に変える。 + * Version 1.0a 〈2022/04/15〉 - バグ修正。 diff --git a/Master/texmf-dist/doc/platex/pxjahyper/README.md b/Master/texmf-dist/doc/platex/pxjahyper/README.md index 7ea926e37c7..cc230435358 100644 --- a/Master/texmf-dist/doc/platex/pxjahyper/README.md +++ b/Master/texmf-dist/doc/platex/pxjahyper/README.md @@ -52,6 +52,7 @@ the PDF strings in the output DVI file. 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〉 diff --git a/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex b/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex index 1a1e4cf7da7..e832bdf0888 100644 --- a/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex +++ b/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex @@ -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,26 +136,13 @@ \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を用いる。 %(当該のファイルが存在する必要がある。) \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 @@ Unicode符号値入力用の命令が使っているものである。 その符号値の文字を出力する。 具体的な動作は以下の通り: \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,18 +200,17 @@ Unicode符号値入力用の命令が使っているものである。 \label{ssec:otf-package} \paragraph{\textbackslash UTF命令} -|\UTF| 命令は、PDF文字列中では -out2uni用の出力を行うように設計されている。 +\Pkg{japanese-otf}パッケージの |\UTF| 命令は、PDF文字列中では +out2uni用の出力を行う。 本パッケージで |otfutf| オプションを有効にした場合は、 PDF文字列中の動作が以下のように変更される。 \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 @@ PDF文字列中で |\CID| が“可能な限り”使えるようにする。 (警告を出した上で)ゲタ記号を出力する。 \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 @@ PDF文字列中で |\CID| が“可能な限り”使えるようにする。 具体的な仕様は以下の通り。 \begin{itemize} -\item 現状では、|\Ux| 命令が有効になる場合のみが - サポートされる。 - \Note それ以外の場合は |otfmacros| オプションは無効になる。 +%\item 現状では、|\Ux| 命令が有効になる場合のみが +% サポートされる。 +% \Note それ以外の場合は |otfmacros| オプションは無効になる。 \item Unicode文字で表現可能であればそれを出力し、 なければ代替表現を出力する。 \item Unicode文字を出力する場合の仕様は |\CID| と同じ。 + (|\Ux| が無効の場合はゲタ記号になる。) 代替表現の場合は「普通の文字の出力に置き換えられる」 可能性がある。 \Note 例えば、|\ajLig{ドル}|(“ドル”の組文字)はUnicode文字の @@ -333,7 +356,7 @@ PDF文字列と版面出力の両方に使われるテキスト(節見出し %=========================================================== \section{hyperrefの“unicodeモード”での動作} -\newcommand*{\cXAdj}{\mbox{}\vspace*{-2pt}}% WOW! +\label{sec:Unicode-mode} \Pkg{hyperref}パッケージの |unicode| オプションが有効である場合 (これを“unicodeモード”と呼ぶことにする @@ -347,7 +370,7 @@ PDF文字列と版面出力の両方に使われるテキスト(節見出し \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 @@ PDF文字列と版面出力の両方に使われるテキスト(節見出し \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} diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def index e5173ef493b..20eb4d32d83 100644 --- a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def +++ b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def @@ -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 diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty index 9fc18f26ab0..4106e541d02 100644 --- a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty +++ b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty @@ -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@pkgname{pxjahyper-enc} \providecommand{\bxDebug}[1]{} diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def index 69f21405ff2..cc068deb4f2 100644 --- a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def +++ b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def @@ -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 diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty index 9cf9d4cacf2..772be814d49 100644 --- a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty +++ b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty @@ -10,7 +10,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesPackage{pxjahyper}[2022/04/15 v1.0a] +\ProvidesPackage{pxjahyper}[2022/05/10 v1.1] \def\pxhy@pkgname{pxjahyper} \providecommand{\bxDebug}[1]{} @@ -37,7 +37,7 @@ \newif\ifpxhy@bigcode \let\pxhy@bigcode@given\relax \newif\ifpxhy@papersize -\newif\ifpxhy@textcmd +\newif\ifpxhy@charcmds \chardef\pxhy@driver@none=0 \chardef\pxhy@driver@dvipdfmx=1 \chardef\pxhy@driver@dvips=2 @@ -48,8 +48,11 @@ \newif\ifpxhy@otfutf \newif\ifpxhy@otfcid \newif\ifpxhy@otfmacros +\newif\ifpxhy@Uchar@avail +\newif\ifpxhy@ucs@avail \let\pxhy@jsclasses@name\relax \newif\ifpxhy@jlreq@cls +\newif\ifpxhy@fallback@geta %--------------------------------------- Package options @@ -66,13 +69,16 @@ \DeclareOption{nodvidriver}{% \let\pxhy@driver\pxhy@driver@none } +\DeclareOption{resetdvidriver}{% + \let\pxhy@driver\@undefined +} \DeclareOption{autodvidriver}{% \let\pxhy@driver\@undefined } -%% modes -\DeclareOption{auto}{% - \let\pxhy@driver\@undefined %FIXME +\DeclareOption{auto}{% DEPRECATED + \let\pxhy@driver\@undefined } +%% operation modes \DeclareOption{tounicode}{% \pxhy@tounicodetrue } @@ -100,6 +106,12 @@ \DeclareOption{nopapersize}{% \pxhy@papersizefalse } +\DeclareOption{charcmds}{% + \pxhy@charcmdstrue +} +\DeclareOption{nocharcmds}{% + \pxhy@charcmdsfalse +} \pxhy@bigcodetrue \DeclareOption{bigcode}{% \pxhy@bigcodetrue @@ -140,12 +152,22 @@ \DeclareOption{nootfmacros}{% \pxhy@otfmacrosfalse } +\DeclareOption{fallback-geta}{% + \pxhy@fallback@getatrue +} +\DeclareOption{fallback-delete}{% + \pxhy@fallback@getafalse +} \DeclareOption{force-unicode}{% \let\pxhy@force@unicode=t } +\DeclareOption{disable-Ux}{% for debug + \let\pxhy@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@driver\pxhy@tmpa \let\pxhy@driver\pxhy@driver@dvips \fi + \ifnum\pxhy@driver=\pxhy@driver@none \ifx\Hy@driver\@undefined\else + \PackageWarningNoLine\pxhy@pkgname + {Unknown hyperref driver: \Hy@driver} + \fi\fi \fi %% Check the engine. @@ -220,6 +246,11 @@ \expandafter\endinput \fi +%% pxhy@Uchar@avail switch +\pxhy@check\Uchar{\pxhy@Uchar@availtrue} +%% pxhy@ucs@avail switch +\pxhy@check\ucs{\pxhy@ucs@availtrue} + %% Check the document class. % jlreq \ifpxhy@etex @@ -247,16 +278,6 @@ {bigcode is invalid without upTeX} \fi \fi\fi -%% pxhy@papersize switch -\ifnum\pxhy@driver=\pxhy@driver@none - \pxhy@papersizefalse -\fi -%% pxhy@textcmd switch -\ifnum\pxhy@driver=\pxhy@driver@none - \pxhy@textcmdfalse -\else - \pxhy@textcmdtrue -\fi %% pxhy@uniescape switch \ifnum\pxhy@driver=\pxhy@driver@dvips \ifx t\pxhy@nouniescape@given\else \pxhy@uniescapetrue @@ -271,17 +292,8 @@ \fi \ifpxhy@hy@unicode \pxhy@uniescapefalse - \pxhy@otfutftrue + %\pxhy@otfutftrue \fi -% otfmacros requires upTeX or out2uni. -\ifpxhy@uptex\else\ifpxhy@uniescape\else\ifpxhy@hy@unicode\else - \pxhy@otfmacrosfalse - \ifx t\pxhy@otfmacros@given - \PackageWarningNoLine\pxhy@pkgname - {Option 'otfmacros' is invalid\MessageBreak - unless upTeX is used or 'out2uni' is specified} - \fi -\fi\fi\fi % otfcid requrires otfutf. \ifpxhy@otfutf \else \ifpxhy@otfcid \PackageInfo\pxhy@pkgname @@ -297,19 +309,31 @@ \pxhy@otfmacrosfalse \fi\fi +%% in nodvidriver mode +\ifnum\pxhy@driver=\pxhy@driver@none + \pxhy@papersizefalse + \pxhy@charcmdsfalse +\fi + \bxDebug{****pxjahyper env^^J% pxhy@ptex = \ifpxhy@ptex true\else false\fi^^J% pxhy@uptex = \ifpxhy@uptex true\else false\fi^^J% pxhy@etex = \ifpxhy@etex true\else false\fi^^J% pxhy@etoolbox = \ifpxhy@etoolbox true\else false\fi^^J% pxhy@hook@system = \the\pxhy@hook@system^^J% -ifpxhy@hy@unicode = \ifpxhy@hy@unicode true\else false\fi^^J% -pxhy@bigcode = \ifpxhy@bigcode true\else false\fi^^J% -pxhy@driver = \the\pxhy@driver^^J% pxhy@tounicode = \ifpxhy@tounicode true\else false\fi^^J% pxhy@uniescape = \ifpxhy@uniescape true\else false\fi^^J% +pxhy@bigcode = \ifpxhy@bigcode true\else false\fi^^J% pxhy@papersize = \ifpxhy@papersize true\else false\fi^^J% -pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% +pxhy@charcmds = \ifpxhy@charcmds true\else false\fi^^J% +pxhy@driver = \the\pxhy@driver^^J% +ifpxhy@hy@unicode = \ifpxhy@hy@unicode true\else false\fi^^J% +pxhy@jacommentline = \ifpxhy@jacommentline true\else false\fi^^J% +pxhy@disablecmds = \ifpxhy@disablecmds true\else false\fi^^J% +pxhy@otfutf = \ifpxhy@otfutf true\else false\fi^^J% +pxhy@otfcid = \ifpxhy@otfcid true\else false\fi^^J% +pxhy@otfmacros = \ifpxhy@otfmacros true\else false\fi^^J% +pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J% } %--------------------------------------- Helpers @@ -363,6 +387,13 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \pxhy@get@jchar{\jis"222E} \let\pxhy@geta\pxhy@jchar +%% \pxhy@print@geta +\ifpxhy@fallback@geta + \def\pxhy@print@geta{\pxhy@geta} +\else + \let\pxhy@print@geta\@empty +\fi + %% \pxhy@hook@after@package{<package-name>}{<code>} \@onlypreamble\pxhy@hook@after@package \def\pxhy@hook@after@package#1#2{% @@ -418,6 +449,12 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \def\pxhy@if@opt@a#1@[@#2#3\pxhy@mk{#2} \def\pxhy@if@opt@b#1#2]{#1{#2}} +%% \pxhy@xdetokenize{<text>} +\let\pxhy@xdetokenize\detokenize +\pxhy@check\expanded{% + \def\pxhy@xdetokenize#1{\detokenize\expandafter{\expanded{#1}}}% +} + \fi %--------------------------------------- Load bxjatoucs @@ -428,7 +465,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \let\pxhy@bxjatoucs@failure\relax %% \pxhy@try@load@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@bxjatoucs@failure. \@onlypreamble\pxhy@try@load@bxjatoucs \def\pxhy@try@load@bxjatoucs{% @@ -487,7 +524,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% % 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@setpagesize\expandafter\endcsname @@ -677,6 +714,31 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \unichar{"#1}% } +\else\ifpxhy@Uchar@avail %<*Uchar> + \ifpxhy@uptex + + %% \pxhy@Ux + \def\pxhy@Ux{\pxhy@uchex} + \pxhy@utfXVIfalse + \def\pxhy@uchex@out#1{\Uchar"#1 } + + \else\ifpxhy@ucs@avail + + %% \pxhy@Ux + \def\pxhy@Ux{\pxhy@uchex} + \pxhy@utfXVIfalse + \def\pxhy@uchex@out#1{% + \expandafter\pxhy@uchex@out@a\ucs"#1\pxhy@mk{#1}% + } + \def\pxhy@uchex@out@a#1\pxhy@mk#2{% + \ifnum#1<\z@ + \@nameuse{U+#2}% + \pxhy@print@geta + \else \Uchar#1 + \fi + } + + \fi\fi \else\ifpxhy@uptex %<*upTeX> %% \pxhy@Ux @@ -723,6 +785,11 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \expandafter\pxhy@next\pxhy@marker %END-- +\fi\fi\fi %</> + +\AtEndOfPackage{% +\ifx\pxhy@posthook\@undefined\else + \bxDebug{add to \string\pdfstringdefPostHook}% % Add \pxhy@posthook to \pdfstringdefPostHook. \begingroup \toks@\expandafter{\pdfstringdefPostHook{#1}} @@ -734,11 +801,12 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% }% \pxhy@next \endgroup - -\fi\fi %</> +\fi +} \ifpxhy@uniescape %<*uniescape> + \let\pxhy@posthook\@undefined %% \pxhy@Ux \def\pxhy@Ux{\pxhy@uchex}% % \pxhy@uchex converts to UTF-16 @@ -750,6 +818,12 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \fi %</uniescape> +%% 'disable-Ux' (for debug) +\ifx t\pxhy@disable@Ux + \let\pxhy@Ux\@undefined + \let\pxhy@posthook\@undefined +\fi + %% Makes \Ux be the code input command in PDF strings. \ifx\pxhy@Ux\@undefined\else \pdfstringdefDisableCommands{% @@ -782,7 +856,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \pxhy@utfXVIfalse \def\pxhy@uchex@out#1{% \@nameuse{U+#1}% issue a warning - \pxhy@geta + \pxhy@print@geta } \else \let\pxhy@UTF\pxhy@Ux @@ -821,7 +895,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% %% \pxhy@CID{<cid>} \def\pxhy@CID#1{% \expandafter\expandafter\expandafter\pxhy@cid@aux - \bxjaCidToUcsHex{#1}\pxhy@mk{\detokenize{#1}}% + \bxjaCidToUcsHex{#1}\pxhy@mk{\pxhy@xdetokenize{#1}}% } %% \pxhy@fast@CID{<cid>} \def\pxhy@fast@CID#1{% @@ -831,7 +905,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \ifx\pxhy@Ux\@undefined \def\pxhy@cid@aux#1\pxhy@mk#2{% \@nameuse{CID+#2}% issue a warning - \pxhy@geta + \pxhy@print@geta } \else \def\pxhy@cid@aux#1\pxhy@mk#2{% @@ -839,7 +913,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \pxhy@Ux{#1}% \else \@nameuse{CID+#2}% - \pxhy@geta + \pxhy@print@geta \fi } \fi @@ -894,7 +968,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \ifpxhy@hy@unicode PU\else PD1\fi } -\ifpxhy@textcmd %<*textcmd> +\ifpxhy@charcmds %<*charcmds> %%<+> \pxDeclarePdfTextCommand{\CS}{<jis>}{<ucs>} \@onlypreamble\pxDeclarePdfTextCommand @@ -1395,7 +1469,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \fi %</unicode> %%%%%%%%%%%%%%%%%%%% done -\ifpxhy@textcmd %<*textcmd> +\ifpxhy@charcmds %<*charcmds> %% \pxhy@disable@tc@commands \def\pxhy@disable@tc@commands{% @@ -1446,7 +1520,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% %--------------------------------------- 'jacommentline' \ifpxhy@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. |