summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-28 20:17:50 +0000
committerKarl Berry <karl@freefriends.org>2022-05-28 20:17:50 +0000
commit282d86452c6ed49026b345932f198ecfce65ea6f (patch)
tree3d6678af46fcb9ba304ff8c5a970a950acf4917c /Master
parent16ccb6bd9869e391eee9bd73b8eac6ccec1f9a07 (diff)
pxjahyper (28may22)
git-svn-id: svn://tug.org/texlive/trunk@63423 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/README-ja.md8
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/README.md1
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdfbin144466 -> 155851 bytes
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex66
-rw-r--r--Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def30
-rw-r--r--Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty2
-rw-r--r--Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def2
-rw-r--r--Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty290
8 files changed, 334 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md b/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
index 29926943e2e..529403a007a 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.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文字出力をサポート。
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/README.md b/Master/texmf-dist/doc/platex/pxjahyper/README.md
index cc230435358..747584df8f6 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.2 〈2022/05/27〉
* Version 1.1 〈2022/05/10〉
* Version 1.0a 〈2022/04/15〉
* Version 1.0 〈2022/04/01〉
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf b/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf
index 74e6267fb41..8b8b713c73f 100644
--- a/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf
+++ b/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex b/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex
index e832bdf0888..24c5b8c200a 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.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 @@ Unicode符号値入力用の命令が使っているものである。
こちらを使う方が無難かもしれない。}
\begin{itemize}
-\item |\Ux{|Unicode符号値16進|}|\Means
+\item |\Ux{|\Meta{Unicode符号値16進}|}|\Means
その符号値の文字を出力する。
具体的な動作は以下の通り:
\begin{itemize}
@@ -187,7 +216,7 @@ Unicode符号値入力用の命令が使っているものである。
は、当該のUnicode文字に対応するJIS符号系の文字を書いたのと同等になる。
JIS符号系にない文字の場合は出力できないので警告を出しだ上で
ゲタ記号(〓)を出力%
- \footnote{|fallback-delete| オプションが有効の場合は何も出力しない。
+ \footnote{設定キー |fallback| の値が |delete| の場合は何も出力しない。
以降で「ゲタ記号を出力」とある場合についても同様。}%
する。
\end{itemize}
@@ -207,7 +236,10 @@ PDF文字列中の動作が以下のように変更される。
\begin{itemize}
\item |\Ux| 命令(\ref{ssec:ux-command}節参照)が有効の場合は、
- |\Ux| と同じ動作になる。
+ |\Ux| と同じ動作
+ \footnote{もし |\Ux| の出力がゲタ記号になる場合は、
+ |\UTF| もゲタ記号になる。}%
+ になる。
\item それ以外の場合は、
常に(警告を出した上で)ゲタ記号を出力する。
%\Note {\pLaTeX}ではtounicodeの機能でUnicode文字を出力できないため。
@@ -294,11 +326,17 @@ PDF文字列中で |\CID| が“可能な限り”使えるようにする。
\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 @@ PDF文字列と版面出力の両方に使われるテキスト(節見出し
\Pkg{hyperref}では基本的なテキスト装飾命令
(多くは{\LaTeX}カーネルが提供するもの)
について、「PDF文字列として扱う場合は自動的に無力化
-%\footnote{例えば、“|\textit{text}|”や“|{\large text}|”は
-% 単に“|text|”と書いたものと見なされる。}
+\footnote{例えば、“|\textit{text}|”や“|{\large text}|”は
+ 単に“|text|”と書いたものと見なされる。}
する」機構を実装している。
これにより、例えば節見出しのテキストに“|\textit{text}|”が
含まれていたとすると、
diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def
index 20eb4d32d83..d362b1df8f2 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/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@DeclareMacro{半角}#1{#1}{}
+\pxhy@DeclareMacro{半角}#1{%
+ `\ifpxhy@ajhankaku@chars
+ `\pxhy@ajHankaku{#1}%
+ `\else #1%
+ `\fi
+}
+\gdef\pxhy@ajHankaku#1{%
+ \pxhy@ajHankaku@a#1\pxhy@end
+}
+\gdef\pxhy@ajHankaku@a#1{%
+ \pxhy@cond\ifx#1\pxhy@end\fi{}{%else
+ \ifcsdef{pxhy@ucs@hw/#1}{\csuse{pxhy@ucs@hw/#1}}{#1}%
+ \pxhy@ajHankaku@a}%
+}
+\def\pxhy@next#1{%
+ \pxhy@cond\ifx#1\pxhy@end\fi{}{%else
+ \csxdef{pxhy@ucs@hw/#1}{\UTF{\expandafter\pxhy@FFhex\meaning\x;}}%
+ \chardef\y=\numexpr\x+1\relax \let\x\y
+ \pxhy@next}%
+}
+\def\pxhy@FFhex#1"#2;{FF#2}
+\chardef\x="61
+\pxhy@next
+ 。「」、・ヲァィゥェォャュョッーアイウエオカキクケ%
+ コサシスセソタチツテトナニヌネノハヒフヘホマミムメ%
+ モヤユヨラリルレロワン゛゜\pxhy@end
+\csgdef{pxhy@ucs@hw/ }{\space}
%%<OK> \○ / \● / \□ / \■ / \◇ / \◆
% Expands to \ajLig{} or \@ajNumber.
diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty
index 4106e541d02..719f51c4e8a 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/05/10 v1.1]
+\ProvidesPackage{pxjahyper-enc}[2022/05/27 v1.2]
\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 cc068deb4f2..53e30988d9c 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/05/10 v1.1]
+\ProvidesFile{pxjahyper-uni.def}[2022/05/27 v1.2]
\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 772be814d49..f2ebcd45715 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/05/10 v1.1]
+\ProvidesPackage{pxjahyper}[2022/05/27 v1.2]
\def\pxhy@pkgname{pxjahyper}
\providecommand{\bxDebug}[1]{}
@@ -24,6 +24,7 @@
}
%% packages
+\RequirePackage{keyval}\relax
\RequirePackage{ltxcmds}[2011/08/22]% v1.21
%% variables
@@ -53,6 +54,24 @@
\let\pxhy@jsclasses@name\relax
\newif\ifpxhy@jlreq@cls
\newif\ifpxhy@fallback@geta
+\newif\ifpxhy@extjis@map
+\newif\ifpxhy@extjis@use
+\newif\ifpxhy@ajhankaku@chars
+
+%%<*> \pxjahypersetup{<key>=<value>,...}
+\newcommand*\pxjahypersetup{%
+ \setkeys{\pxhy@pkgname}%
+}
+%% \pxhy@handle@key{<key>}{<value>}{<name>}
+\def\pxhy@handle@key#1#2#3{%
+ \expandafter\let\expandafter\pxhy@tmpa\csname pxhy@#3\endcsname
+ \ifx\pxhy@tmpa\relax
+ \PackageError\pxhy@pkgname
+ {Invalid value for key '#1':\MessageBreak\@spaces#2}%
+ {\@eha}%
+ \else \pxhy@tmpa
+ \fi
+}
%--------------------------------------- Package options
@@ -153,10 +172,10 @@
\pxhy@otfmacrosfalse
}
\DeclareOption{fallback-geta}{%
- \pxhy@fallback@getatrue
+ \pxjahypersetup{fallback=geta}%
}
\DeclareOption{fallback-delete}{%
- \pxhy@fallback@getafalse
+ \pxjahypersetup{fallback=delete}%
}
\DeclareOption{force-unicode}{%
\let\pxhy@force@unicode=t
@@ -164,10 +183,30 @@
\DeclareOption{disable-Ux}{% for debug
\let\pxhy@disable@Ux=t
}
+%% key-value options
+\DeclareOption*{%
+ \expandafter\pxjahypersetup\expandafter{\CurrentOption}%
+}
+% 'fallback=geta|delete'
+\pxhy@fallback@getatrue
+\define@key{\pxhy@pkgname}{fallback}{%
+ \pxhy@handle@key{fallback}{#1}{kv@fallback@@#1}%
+}
+\let\pxhy@kv@fallback@@geta\pxhy@fallback@getatrue
+\let\pxhy@kv@fallback@@delete\pxhy@fallback@getafalse
+% 'extjis=<bool>'
+\pxhy@extjis@usetrue
+\define@key{\pxhy@pkgname}{extjis}[true]{%
+ \pxhy@handle@key{extjis}{#1}{extjis@use#1}%
+}
+% 'ajhankaku-chars=<bool>'
+\define@key{\pxhy@pkgname}{ajhankaku-chars}[true]{%
+ \pxhy@handle@key{ajhankaku-chars}{#1}{ajhankaku@chars#1}%
+}
%% dispatch
\ExecuteOptions{%
resetdvidriver,tounicode,papersize,charcmds,jacommentline,%
- disablecmds,otfutf,otfcid,fallback-geta%
+ disablecmds,otfutf,otfcid%
}
\ProcessOptions*
@@ -251,6 +290,12 @@
%% pxhy@ucs@avail switch
\pxhy@check\ucs{\pxhy@ucs@availtrue}
+%% pxhy@extjis@map switch
+% Note that 'tounicode' is necessary.
+\ifpxhy@etex \ifpxhy@uptex\else \ifpxhy@tounicode
+ \pxhy@extjis@maptrue
+\fi\fi\fi
+
%% Check the document class.
% jlreq
\ifpxhy@etex
@@ -388,11 +433,9 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
\let\pxhy@geta\pxhy@jchar
%% \pxhy@print@geta
-\ifpxhy@fallback@geta
- \def\pxhy@print@geta{\pxhy@geta}
-\else
- \let\pxhy@print@geta\@empty
-\fi
+\def\pxhy@print@geta{%
+ \ifpxhy@fallback@geta \pxhy@geta \fi
+}
%% \pxhy@hook@after@package{<package-name>}{<code>}
\@onlypreamble\pxhy@hook@after@package
@@ -417,6 +460,11 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
\expandafter\expandafter\expandafter
}
+%% \pxhy@csletcs{<csname1>}{<csname2>}
+\def\pxhy@csletcs#1#2{%
+ \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname
+}
+
%% \pxhy@cond\ifXXX<arg>\fi{<true>}{<false>}
% Does the test "\ifXXX<arg>", with immediate exit from the
% induced if-level.
@@ -730,11 +778,25 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
\def\pxhy@uchex@out#1{%
\expandafter\pxhy@uchex@out@a\ucs"#1\pxhy@mk{#1}%
}
+ \chardef\pxhy@max@asc="7F
\def\pxhy@uchex@out@a#1\pxhy@mk#2{%
\ifnum#1<\z@
+ \ifnum"#2>\pxhy@max@asc
+ \ifpxhy@extjis@use
+ \expandafter\pxhy@uchex@out@b\csname
+ pxhy@uc/\number"#2\endcsname{#2}%
+ \else \pxhy@uchex@out@b\relax{#2}%
+ \fi
+ \else \Uchar"#2
+ \fi
+ \else \Uchar#1
+ \fi
+ }
+ \def\pxhy@uchex@out@b#1#2{%
+ \ifx#1\relax
\@nameuse{U+#2}%
\pxhy@print@geta
- \else \Uchar#1
+ \else #1%
\fi
}
@@ -845,6 +907,45 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
}
\fi
+%--------------------------------------- Fix for high-byte protection
+\ifpxhy@etex
+\begingroup
+% Check for high-byte protection.
+\catcode"EF=\active \catcode`\^=7
+\global\let\pxhy@std@EF=^^ef
+\def\pxhy@next#1 #2\pxhy@end{%
+ \@tempswafalse
+ \def\pxhy@tmpa{#1}\edef\pxhy@tmpb{\string\protected}%
+ \ifx\pxhy@tmpa\pxhy@tmpb \@tempswatrue \fi
+}\expandafter\pxhy@next\meaning\pxhy@std@EF. \pxhy@end
+% Add a hook if protected.
+\if@tempswa
+
+ %% \pxhy@unprotect@high@bytes
+ \let\pxhy@unprotect@high@bytes\@empty
+ \def\pxhy@next#1#2{%
+ \expandafter\gdef\expandafter#1\expandafter{#2}%
+ \edef\pxhy@unprotect@high@bytes{%
+ \unexpanded\expandafter{\pxhy@unprotect@high@bytes}%
+ \unexpanded{\let#2#1}}%
+ \advance\@tempcnta\@ne
+ }
+ \@tempcnta="C2
+ \@whilenum{\@tempcnta<"F5}\do{%
+ \lccode"EF=\@tempcnta
+ \lowercase{\expandafter\pxhy@next\csname
+ pxhy@uhb/\string^^ef\endcsname^^ef}%
+ }
+ \xdef\pxhy@unprotect@high@bytes{%
+ \unexpanded{\ifx^^ef\pxhy@std@EF}%
+ \unexpanded\expandafter{\pxhy@unprotect@high@bytes}%
+ \unexpanded{\fi}%
+ }
+ \ltx@GlobalPrependToMacro\pdfstringdefPreHook{\pxhy@unprotect@high@bytes}
+
+\fi
+\endgroup
+\fi
%--------------------------------------- Support for 'otfutf'
\ifpxhy@otfutf
@@ -961,15 +1062,98 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
\fi
\fi
+%--------------------------------------- Extended JIS mapping
+\ifpxhy@extjis@map %<*extjis-map>
+\begingroup
+
+\def\pxhy@next#1#2#3#4{%
+ \@tempcnta"#1\relax\@tempcntb#3\relax
+ \chardef\pxhy@tmpa\numexpr#4+1\relax
+ \@whilenum{\@tempcntb<\pxhy@tmpa}\do{%
+ \expandafter\xdef\csname pxhy@uc/\the\@tempcnta\endcsname{%
+ \unexpanded{#2}\the\@tempcntb}%
+ \advance\@tempcnta\@ne \advance\@tempcntb\@ne}%
+}
+
+%% add special mapping
+\ifnum \jis"2121="8140 % sjis
+ \pxhy@next{2460}{\207\10}{0}{7}
+ \pxhy@next{2468}{\207\11}{0}{7}
+ \pxhy@next{2470}{\207\12}{0}{3}
+ \pxhy@next{2160}{\207\12}{4}{7}
+ \pxhy@next{2164}{\207\13}{0}{5}
+ \pxhy@next{3349}{\207\13}{7}{7}
+ \pxhy@next{3314}{\207\14}{0}{0}
+ \pxhy@next{3322}{\207\14}{1}{1}
+ \pxhy@next{334D}{\207\14}{2}{2}
+ \pxhy@next{3318}{\207\14}{3}{3}
+ \pxhy@next{3327}{\207\14}{4}{4}
+ \pxhy@next{3303}{\207\14}{5}{5}
+ \pxhy@next{3336}{\207\14}{6}{6}
+ \pxhy@next{3351}{\207\14}{7}{7}
+ \pxhy@next{3357}{\207\15}{0}{0}
+ \pxhy@next{330D}{\207\15}{1}{1}
+ \pxhy@next{3326}{\207\15}{2}{2}
+ \pxhy@next{3323}{\207\15}{3}{3}
+ \pxhy@next{332B}{\207\15}{4}{4}
+ \pxhy@next{334A}{\207\15}{5}{5}
+ \pxhy@next{333B}{\207\15}{6}{6}
+ \pxhy@next{339C}{\207\15}{7}{7}
+ \pxhy@next{339D}{\207\16}{0}{1}
+ \pxhy@next{338E}{\207\16}{2}{3}
+ \pxhy@next{33C4}{\207\16}{4}{4}
+ \pxhy@next{33A1}{\207\16}{5}{5}
+ \pxhy@next{337B}{\207\17}{6}{6}
+ \pxhy@next{301D}{\207\20}{0}{0}
+ \pxhy@next{301F}{\207\20}{1}{1}
+ \pxhy@next{2116}{\207\20}{2}{2}
+ \pxhy@next{33CD}{\207\20}{3}{3}
+ \pxhy@next{2121}{\207\20}{4}{4}
+ \pxhy@next{32A4}{\207\20}{5}{7}
+ \pxhy@next{32A7}{\207\21}{0}{1}
+ \pxhy@next{3231}{\207\21}{2}{3}
+ \pxhy@next{3239}{\207\21}{4}{4}
+ \pxhy@next{337E}{\207\21}{5}{5}
+ \pxhy@next{337D}{\207\21}{6}{6}
+ \pxhy@next{337C}{\207\21}{7}{7}
+ \pxhy@next{222E}{\207\22}{3}{3}
+ \pxhy@next{2211}{\207\22}{4}{4}
+ \pxhy@next{221F}{\207\23}{0}{0}
+ \pxhy@next{22BF}{\207\23}{1}{1}
+ \pxhy@next{FF61}{\24}{1}{7}
+ \pxhy@next{FF68}{\25}{0}{7}
+ \pxhy@next{FF70}{\26}{0}{7}
+ \pxhy@next{FF78}{\27}{0}{7}
+ \pxhy@next{FF80}{\30}{0}{7}
+ \pxhy@next{FF88}{\31}{0}{7}
+ \pxhy@next{FF90}{\32}{0}{7}
+ \pxhy@next{FF98}{\33}{0}{7}
+\else\ifnum\jis"2121="A1A1 % euc
+ \pxhy@next{FF61}{\216\24}{1}{7}
+ \pxhy@next{FF68}{\216\25}{0}{7}
+ \pxhy@next{FF70}{\216\26}{0}{7}
+ \pxhy@next{FF78}{\216\27}{0}{7}
+ \pxhy@next{FF80}{\216\30}{0}{7}
+ \pxhy@next{FF88}{\216\31}{0}{7}
+ \pxhy@next{FF90}{\216\32}{0}{7}
+ \pxhy@next{FF98}{\216\33}{0}{7}
+\fi\fi
+
+%% \pxhy@hkcdot
+\global\pxhy@csletcs{pxhy@hkcdot}{pxhy@uc/\number"FF65}
+
+\endgroup
+\fi %</extjis-map>
%--------------------------------------- Redefine text commands for PD1
+\ifpxhy@charcmds %<*charcmds>
+%% \pxhy@cc@jis@only
+\chardef\pxhy@cc@jis@only=0
%% \pxhy@pdfenc
\edef\pxhy@pdfenc{%
\ifpxhy@hy@unicode PU\else PD1\fi
}
-\ifpxhy@charcmds %<*charcmds>
-
%%<+> \pxDeclarePdfTextCommand{\CS}{<jis>}{<ucs>}
\@onlypreamble\pxDeclarePdfTextCommand
\newcommand*\pxDeclarePdfTextCommand[3]{%
@@ -986,15 +1170,6 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
{\pxhy@revoke@pdf@tcc{#1}{#2}}%
}
-\else %<*!textcmd>
-
-\@onlypreamble\pxDeclarePdfTextCommand
-\newcommand*\pxDeclarePdfTextCommand[3]{}
-\@onlypreamble\pxDeclarePdfTextComposite
-\newcommand*\pxDeclarePdfTextComposite[4]{}
-
-\fi %</textcmd>
-
%% \pxhy@revoke@pdf@tc
\@onlypreamble\pxhy@revoke@pdf@tc
\def\pxhy@revoke@pdf@tc#1{%
@@ -1022,7 +1197,8 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
%% \pxhy@decl@pdf@tc
\@onlypreamble\pxhy@decl@pdf@tc
\def\pxhy@decl@pdf@tc#1#2{%
- \pxhy@get@body{#1}{#2}%
+ \edef\pxhy@next{{#1}{\ifx\pxhy@mt#2\pxhy@mt FFFD\else#2\fi}}%
+ \expandafter\pxhy@get@body\pxhy@next
\ifx\pxhy@body\@undefined
\let\pxhy@next\@secondoftwo
\else
@@ -1043,30 +1219,47 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
\pxhy@get@jchar{\ucs"#2}%
\let\pxhy@body\pxhy@jchar
}%
-\else %<*!upTeX>
- \ifpxhy@uniescape
+\else\ifpxhy@hy@unicode %<*unicode>
+ \def\pxhy@get@body#1#2{%
+ \def\pxhy@body{\unichar{"#2}}%
+ }%
+\else\ifpxhy@uniescape %<*uniescape>
\def\pxhy@get@body#1#2{%
- \ifx\pxhy@end#1\pxhy@end
+ \ifx\pxhy@mt#1\pxhy@mt
\def\pxhy@body{\0x#2}%
\else
\pxhy@get@jchar{\jis"#1}%
\let\pxhy@body\pxhy@jchar
\fi
}%
- \else
+\else %<*!>
+ \chardef\pxhy@cc@jis@only=1
\def\pxhy@get@body#1#2{%
- \ifx\pxhy@end#1\pxhy@end
+ \ifx\pxhy@mt#1\pxhy@mt
\let\pxhy@body\@undefined
\else
\pxhy@get@jchar{\jis"#1}%
\let\pxhy@body\pxhy@jchar
\fi
}%
- \fi
-\fi %</upTeX>
+\fi\fi\fi %</>
%%%%%%%%%%%%%%%%%%%% the definitions
-\ifpxhy@hy@unicode\else %<!*unicode>
+\ifpxhy@hy@unicode %<*unicode>
+
+% The PU encoding has already done the job.
+% I supplement some definitions.
+\def\pxhy@next#1#2{%
+ \expandafter\ifx\csname PU\string#1\endcsname\relax
+ \DeclareTextCommand{#1}{PU}{#2}\fi}
+\pxhy@next{\guillemetleft}{\80\253}%00AB
+\pxhy@next{\guillemetright}{\80\273}%00BB
+\pxhy@next{\textborn}{\9046\005}%2605
+\pxhy@next{\textfinalsigma}{\83\302}%03C2
+\pxhy@next{\textxgeq}{\9042\145}%2265
+\pxhy@next{\textxleq}{\9042\144}%2264
+
+\else %<!*unicode>
% JIS X 0213 does not distinguish the following pairs:
% - circumflex(U+02C6) and asciicircum(U+005E)
@@ -1084,6 +1277,9 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
\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 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
\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 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
\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 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
\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,19 +1661,20 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
% 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@uptex\else
- \ifpxhy@uniescape\else
+\ifnum\pxhy@cc@jis@only>\z@
\DeclareTextCommand{\textendash}{PD1}{--}
\DeclareTextCommand{\textquestiondown}{PD1}{}% empty
\DeclareTextCommand{\textexclamdown}{PD1}{}% empty
+\fi
+\ifnum\pxhy@cc@jis@only>\z@
+ \ifx\pxhy@hkcdot\@undefined\else
+ \DeclareTextCommand{\textperiodcentered}{PD1}{\pxhy@hkcdot}
\fi
\fi
\fi %</unicode>
%%%%%%%%%%%%%%%%%%%% done
-\ifpxhy@charcmds %<*charcmds>
-
%% \pxhy@disable@tc@commands
\def\pxhy@disable@tc@commands{%
\let\yen\textyen
@@ -1486,22 +1690,14 @@ pxhy@fallback@geta = \ifpxhy@fallback@geta true\else false\fi^^J%
%% register to 'disable' list
\ltx@GlobalPrependToMacro\pdfstringdefPreHook{\pxhy@disable@tc@commands}
- \ifpxhy@hy@unicode %<*unicode>
+\else %<*!textcmd>
- %% supplementary definitions
- \def\pxhy@next#1#2{%
- \expandafter\ifx\csname PU\string#1\endcsname\relax
- \DeclareTextCommand{#1}{PU}{#2}\fi}
- \pxhy@next{\guillemetleft}{\80\253}%00AB
- \pxhy@next{\guillemetright}{\80\273}%00BB
- \pxhy@next{\textborn}{\9046\005}%2605
- \pxhy@next{\textfinalsigma}{\83\302}%03C2
- \pxhy@next{\textxgeq}{\9042\145}%2265
- \pxhy@next{\textxleq}{\9042\144}%2264
+\@onlypreamble\pxDeclarePdfTextCommand
+\newcommand*\pxDeclarePdfTextCommand[3]{}
+\@onlypreamble\pxDeclarePdfTextComposite
+\newcommand*\pxDeclarePdfTextComposite[4]{}
- \fi %</unicode>
\fi %</textcmd>
-
%--------------------------------------- Enable hyperref unicode
\ifpxhy@hy@unicode