summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-12-11 22:50:42 +0000
committerNorbert Preining <preining@logic.at>2012-12-11 22:50:42 +0000
commitc7a00bf32b0701b32131d5710a7d6ca20b6212b9 (patch)
tree4d0a967291cf95943a185da3ac0924012f85c8b0
parent9c2e43824938d7b86a78035bc5318a5fb370d36b (diff)
new platex package pxjahyper (12Dec)
adaptionts for tlpkg-ctan-check and ctan2tds git-svn-id: svn://tug.org/texlive/trunk@28503 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/LICENSE24
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/README25
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdfbin0 -> 32689 bytes
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex144
-rw-r--r--Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty617
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check4
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds3
-rw-r--r--Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/pxjahyper.tlpsrc0
9 files changed, 816 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/LICENSE b/Master/texmf-dist/doc/platex/pxjahyper/LICENSE
new file mode 100644
index 00000000000..d513265cebd
--- /dev/null
+++ b/Master/texmf-dist/doc/platex/pxjahyper/LICENSE
@@ -0,0 +1,24 @@
+$BK\%=%U%H%&%'%"$O(B MIT $B%i%$%;%s%9$N2<$GG[I[$5$l$^$9!#Cx:n8"$O:n<T$G$k!V(BZR$B!W$K(B
+$BB0$7$^$9!#$^$?K\%=%U%H%&%'%"$OL5J]>Z$G$9!#(B
+
+The MIT License
+
+Copyright (c) 2012 ZR
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/README b/Master/texmf-dist/doc/platex/pxjahyper/README
new file mode 100644
index 00000000000..3fd5f809dc8
--- /dev/null
+++ b/Master/texmf-dist/doc/platex/pxjahyper/README
@@ -0,0 +1,25 @@
+PXjahyper パッケージ
+
+pLaTeX + hyperref + dvipdfmx の環境における日本語の「しおり」の作成を
+支援する LaTeX パッケージ
+
+■インストール
+
+ - *.sty, → $TEXMF/tex/latex/PXjahyper
+
+■詳細
+
+詳細は解説文書 pxjahyper.pdf を参照。また作者による下掲のブログ記事に
+情報が載っている。
+
+ hyperref で日本語しおりに endash を出す件について
+ - マクロツイーター 2012/05/27
+ http://d.hatena.ne.jp/zrbabbler/20120527/1338111080
+
+■ 更新履歴
+
+v0.3 <2012/05/28>
+ - papersize special の調整機能を追加
+ - \Ux を追加
+v0.2 <2012/05/27>
+ - 最初の公開版
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf b/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf
new file mode 100644
index 00000000000..bdbda98fee9
--- /dev/null
+++ 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
new file mode 100644
index 00000000000..8d11e876304
--- /dev/null
+++ b/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex
@@ -0,0 +1,144 @@
+% 文字コードは UTF-8
+% platex で組版する
+\documentclass[a4paper]{jsarticle}
+\usepackage{shortvrb}
+\MakeShortVerb{\|}
+\newcommand{\PkgVersion}{0.2}
+\newcommand{\Pkg}[1]{\textsf{#1}}
+\newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$}
+\newcommand{\Note}{\par\noindent ※}
+\newcommand{\Means}{~:\quad}
+\providecommand{\pTeX}{p\TeX}
+\providecommand{\upTeX}{u\pTeX}
+\providecommand{\pLaTeX}{p\LaTeX}
+\providecommand{\upLaTeX}{u\pLaTeX}
+%-----------------------------------------------------------
+\begin{document}
+\title{\Pkg{pxjahyper} パッケージ(v\PkgVersion)}
+\author{八登崇之\ (Takayuki YATO; aka.~``ZR'')}
+\date{2012/05/27}
+\maketitle
+
+%===========================================================
+\section{概要}
+
+pLaTeX + hyperref + dvipdfmxの組み合わせで
+日本語を含む「しおり」をもつPDF文書を作成する
+場合に必要となる機能を提供する。
+\begin{itemize}
+\item dvipdfmx用の「tounicode special」について、
+ 内部漢字コードに応じて適切なものを出力する。
+\item PDF文字列の中でLICR(|\"a| や |\textsection| 等の
+ 文字出力の命令)が正しく機能するようにする。
+ ただし、エンジンが {\pTeX} の場合は、out2uni を利用
+ する場合を除き、JIS~X~0208にない文字は出力できない
+ (hyperrefの警告が出る)。
+\item {\TeX} の版面拡大機能が使われている
+ (|\mag| が 1000 でない;典型的には\Pkg{jsclasses}の
+ 文書クラスで基底フォントサイズが10\,pt以外である)
+ 場合に、\Pkg{hyperref}が出力する papersize special の
+ 紙面サイズの値が不正になるが、この場合に |\mag| 値を
+ 考慮して求めた正しいサイズによる papersize special を
+ 改めて出力する。
+\end{itemize}
+
+\paragraph{前提フォーマット}
+{\pLaTeX} および {\upLaTeX}。
+
+\paragraph{依存パッケージ}
+\begin{itemize}
+\item \Pkg{hyperref}パッケージ
+\item \Pkg{hyperref}が依存するパッケージ
+ (\Pkg{atbegshi}等)。
+\end{itemize}
+
+%===========================================================
+\section{パッケージの読込}
+
+|\usepackage| で読み込む。
+\begin{quote}\small\begin{verbatim}
+\usepackage[オプション,...]{pxjahyper}
+\end{verbatim}\end{quote}
+
+使用可能なオプションは以下の通り。
+\begin{itemize}
+\item |tounicode|(既定)\Means
+ dvipdfmx用の「tounicode special」を出力する。
+\item |notounicode|\Means
+ |tounicode| の否定。
+\item |out2uni|\Means
+ out2uniフィルタ(角藤氏製作)を使うことを前提にした
+ 出力を行う。
+ (|tounicode| が無効になる。)
+ {\upLaTeX} では使用不可。
+\item |noout2uni|(既定)\Means
+ |out2uni| の否定。
+\item |bigcode|\Means
+ {\upTeX}でのToUnicode CMapとして既定の UTF8-UCS の代わりに\
+ UTF8-UTF16 を用いる。
+ (当該のファイルが存在する必要がある。)
+\item |nobigcode|(既定)\Means
+ |bigcode| の否定。
+\item |dvipdfmx|\Means
+ dvipdfmxを前提とした動作を行う。
+\item |none|\Means
+ dvipdfmxを前提とした動作を抑止する。
+ 現状では、この場合には本パッケージは実質的に何の動作も行わない。
+\item |auto|(既定)\Means
+ \Pkg{hyperref}のドライバがdvipdfmx用ならば |dvipdfmx|、
+ それ以外は |none| の動作。
+\end{itemize}
+
+%===========================================================
+\section{機能}
+
+「概要」で述べた機能は(オプション設定に応じて)
+自動的に実施される。
+
+\paragraph{Unicode符号値による入力}
+PDF文字列入力中で、|\Ux| が以下の意味になる。
+PDF文字列以外では |\Ux| は以前の定義(または未定義)に戻る。
+
+\begin{itemize}
+\item |\Ux{|Unicode符号値|}|\Means
+ その符号値の文字を出力する。
+\end{itemize}
+
+符号値は16進数で指定する。
+
+なお、\Pkg{OTF}パッケージの |\UTF| 命令は、PDF文字列中では
+out2uni用の出力を行うように設計されているが、
+本パッケージを {\upLaTeX} で用いた場合は、
+|\UTF| も(PDF文字列中では)|\Ux| と同じ動作
+(つまりtounicode用の出力)になるように変更される。
+
+\paragraph{PDF文字列用の文字命令の定義}
+以下の命令が提供される。(プリアンブルでのみ使用可能。)
+
+\begin{itemize}
+\item |\pxDeclarePdfTextCommand{\制御綴}{|\Meta{JIS符号値}|}{|\Meta
+{Unicode符号値}|}|\Means
+ PDF文字列中の |\制御綴| の動作として、
+ 指定した符号値の文字を出力することを指定する。
+\item |\pxDeclarePdfTextComposite{\制御綴}{|\Meta{引数}|}{|\Meta
+{JIS符号値}|}{|\Meta{Unicode符号値}|}|\Means
+ PDF文字列中の |\制御綴|(アクセント命令)+ \Meta{引数}の
+ 動作として、指定した符号値の文字を出力することを指定する。
+\end{itemize}
+
+これらの命令において、符号値は16進数で指定する。
+「JIS符号値」は {\upLaTeX} では使われないので省略して
+(空にして)もよい
+(或いはそもそも JIS~X~0208 にない文字の場合は省略する)。
+逆に「Unicode符号値」は {\pLaTeX} の動作でかつ「JIS符号値」が
+指定されている場合は省略してよい。
+
+例えば、以下のように定義しておくと、
+PDF文字列中で |\textschwa|(schwa記号)や |\d{t}|(\d{t})が
+使えるようになる。
+\begin{quote}\small\begin{verbatim}
+\pxDeclarePdfTextCommand{\textschwa}{}{0259}
+\pxDeclarePdfTextComposite{\d}{t}{}{1E6D}
+\end{verbatim}\end{quote}
+
+\end{document}
diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty
new file mode 100644
index 00000000000..6ba7380378c
--- /dev/null
+++ b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty
@@ -0,0 +1,617 @@
+%
+% pxjahyper.sty
+%
+
+%% package declaration
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{pxjahyper}[2012/05/27 v0.2]
+
+%% error messages
+\def\pxhy@pkgname{pxjahyper}
+\def\pxhy@warn{\PackageWarningNoLine\pxhy@pkgname}
+\def\pxhy@error{\PackageError\pxhy@pkgname}
+\@onlypreamble\pxhy@fatal
+\def\pxhy@fatal#1#2{%
+ \pxhy@error{#1}{#2Package loading is aborted right now.}%
+}
+
+%% packages
+\RequirePackage{atbegshi}
+
+%% globals
+\newif\ifpxhy@ptex
+\newif\ifpxhy@uptex
+\let\pxhy@jcode\@undefined
+\newif\ifpxhy@tounicode
+\newif\ifpxhy@zerox
+\newif\ifpxhy@bigcode
+\chardef\pxhy@driver@none=0
+\chardef\pxhy@driver@dvipdfmx=1
+\let\pxhy@driver\@undefined
+
+%------------------- option handling
+
+\DeclareOption{dvipdfmx}{%
+ \let\pxhy@driver\pxhy@driver@dvipdfmx
+}
+\DeclareOption{dvipdfm}{%
+ \let\pxhy@driver\pxhy@driver@dvipdfmx
+}
+\DeclareOption{none}{%
+ \let\pxhy@driver\pxhy@driver@none
+}
+\DeclareOption{auto}{%
+ \let\pxhy@driver\@undefined
+}
+\DeclareOption{tounicode}{%
+ \pxhy@tounicodetrue
+}
+\DeclareOption{notounicode}{%
+ \pxhy@tounicodefalse
+}
+\DeclareOption{out2uni}{%
+ \pxhy@zeroxtrue
+}
+\DeclareOption{noout2uni}{%
+ \pxhy@zeroxfalse
+}
+\DeclareOption{bigcode}{%
+ \pxhy@bigcodetrue
+}
+\DeclareOption{nobigcode}{%
+ \pxhy@bigcodefalse
+}
+\ExecuteOptions{%
+ auto,tounicode,noout2uni,nobigcode%
+}
+\ProcessOptions*
+
+%------------------- environment check
+
+%% The hyperref package must be loaded in advance.
+\@ifpackageloaded{hyperref}{}{%else
+ \pxhy@fatal{'hyperref' not yet loaded}{}%
+ \endinput
+}
+%% hyperref option 'unicode' must not be set.
+\expandafter\ifx\csname ifHy@unicode\expandafter\endcsname
+ \csname iftrue\endcsname
+ \pxhy@fatal{hyperref 'unicode' mode is not supported}{}%
+ \expandafter\endinput
+\fi
+
+%% Check hyperref driver.
+\ifx\pxhy@driver\@undefined
+ \def\pxhy@tmpa{hdvipdfm}
+ \ifx\Hy@driver\pxhy@tmpa
+ \let\pxhy@driver\pxhy@driver@dvipdfmx
+ \else
+ \let\pxhy@driver\pxhy@driver@none
+ \fi
+\fi
+
+%% Check the engine.
+\def\pxhy@check#1#2{%
+ \edef\pxhy@tmpa{\string#1}%
+ \edef\pxhy@tmpb{\meaning#1}%
+ \ifx\pxhy@tmpa\pxhy@tmpb #2\fi
+}
+\pxhy@check\kanjiskip{\pxhy@ptextrue}
+\pxhy@check\forcecjktoken{\pxhy@uptextrue}
+\ifpxhy@ptex\else
+ \pxhy@fatal{Unknown engine used!!!}{}
+ \expandafter\endinput
+\fi
+
+%% Check the internal jcode.
+\ifnum \jis"2121="8140
+ \let\pxhy@jcode=s\relax
+\else\ifnum\jis"2121="A1A1
+ \let\pxhy@jcode=e\relax
+\else\ifnum\jis"2121="3000
+ \let\pxhy@jcode=u\relax
+\fi\fi\fi
+\ifx\pxhy@jcode\@undefined
+ \pxhy@fatal{Unknown internal kanji code!!!}{}
+ \expandafter\endinput
+\fi
+
+%% adjustment
+% upTeX not in unicode is not seen as upTeX.
+\if u\pxhy@jcode\else
+ \pxhy@uptexfalse
+\fi
+% out2uni cannot be used with upTeX.
+\ifpxhy@uptex \ifpxhy@zerox
+ \pxhy@warn{out2uni is invalid in upTeX}
+ \pxhy@zeroxfalse
+\fi\fi
+% bigcode cannot be used without upTeX.
+\ifpxhy@uptex\else \ifpxhy@bigcode
+ \pxhy@warn{bigcode is invalid without upTeX}
+ \pxhy@bigcodefalse
+\fi\fi
+% out2uni disables tounicode.
+\ifpxhy@zerox
+ \pxhy@tounicodefalse
+\fi
+
+\iffalse
+\typeout{%
+pxhy@ptex = \ifpxhy@ptex true\else false\fi^^J%
+pxhy@uptex = \ifpxhy@uptex true\else false\fi^^J%
+pxhy@jcode = \meaning\pxhy@jcode^^J%
+pxhy@tounicode = \ifpxhy@tounicode true\else false\fi^^J%
+pxhy@zerox = \ifpxhy@zerox true\else false\fi^^J%
+pxhy@driver = \the\pxhy@driver^^J%
+}
+\fi
+
+%------------------- helpers
+
+%% pxhy@end
+\def\pxhy@end{\pxhy@end@}
+
+%% \pxhy@out@special{<text>}
+\def\pxhy@out@special#1{%
+ \begingroup
+ \toks\z@{\special{#1}}%
+ \toks\tw@\expandafter{\AtBegShi@HookFirst}%
+ \xdef\AtBegShi@HookFirst{\the\toks@\the\toks\tw@}%
+ \endgroup
+}
+
+%% \pxhy@get@jchar{<num>}
+% Let \pxhy@jchar a macro expanding to a single jchar token
+% of the char code <num>.
+\def\pxhy@get@jchar#1{%
+ \begingroup
+ \pxhy@forcecjktoken
+ \kansujichar\@ne=#1\relax
+ \xdef\pxhy@jchar{\kansuji\@ne}%
+ \endgroup
+}
+
+%% \pxhy@forcecjktoken
+\ifpxhy@uptex
+ \let\pxhy@forcecjktoken\forcecjktoken
+\else
+ \let\pxhy@forcecjktoken\relax
+\fi
+
+%------------------- output 'tounicode' special
+\ifpxhy@tounicode
+
+ \ifnum\pxhy@driver=\pxhy@driver@dvipdfmx %<*dvipdfmx>
+ %% dvipdfmx
+ \if e\pxhy@jcode % euc
+ \pxhy@out@special{pdf:tounicode EUC-UCS2}
+ \else\if s\pxhy@jcode % sjis
+ \pxhy@out@special{pdf:tounicode 90ms-RKSJ-UCS2}
+ \else\ifpxhy@bigcode % ucs, bigcode
+ \pxhy@out@special{pdf:tounicode UTF8-UTF16}
+ \else
+ \pxhy@out@special{pdf:tounicode UTF8-UCS2}
+ \fi\fi\fi
+ \fi %</dvipdfmx>
+
+\fi
+%------------------- papersize special adjustment
+
+% 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
+% special with adjusted values will be output.
+\ifnum\mag=1000 \else
+ \expandafter\ifx\csname ifHy@setpagesize\expandafter\endcsname
+ \csname iftrue\endcsname % hyperref setpagesize is on
+ \ifnum0<\mag \ifnum32768>\mag % \mag is in valid range
+ \begingroup
+ \@ifundefined{stockwidth}{}{%else
+ \paperwidth=\stockwidth
+ \paperheight=\stockheight
+ }%
+ \@tempcnta=\mag \advance\@tempcnta100000
+ \def\pxhy@next1#1#2#3#4#5\relax{%
+ \def\pxhy@tmpa{#1#2.#3#4#5}%
+ }%
+ \expandafter\pxhy@next\the\@tempcnta\relax
+ \paperwidth=\pxhy@tmpa\paperwidth
+ \paperheight=\pxhy@tmpa\paperheight
+ \xdef\pxhy@spec@papersize{%
+ papersize=\the\paperwidth,\the\paperheight
+ }%
+ \AtBeginShipoutFirst{%
+ \special{\pxhy@spec@papersize}%
+ }
+ \endgroup
+ \fi\fi
+ \fi
+\fi
+
+%-------------------
+
+
+\def\pxhy@uc@REPL{FFFD}
+\def\pxhy@uc@XNAC{FDD1} % not-a-char codepoint used as marker
+\let\pxhy@burst\romannumeral
+\let\pxhy@nxend\indent
+
+%% \pxhy@uchex{<hex>}
+% The entity of the code-value input function. If the input
+% is a valid code value in hex then it passes the value to
+% \pxhy@uchex@res in 4-6 digits; otherwise passes FFFD to
+% \pxhy@uchex@res.
+\def\pxhy@uchex#1{%
+ \expandafter\pxhy@uchex@a\pxhy@burst-`>#1\pxhy@nxend
+}
+\edef\pxhy@uchex@err{%
+ \noexpand\pxhy@uchex@res{\pxhy@uc@REPL}%
+}
+\def\pxhy@uchex@a#1#2\pxhy@nxend{%
+ \ifnum2<"1#1
+ \expandafter\pxhy@uchex@b\romannumeral-"#1#2\pxhy@nxend{#1#2}%
+ \else \pxhy@uchex@err
+ \fi
+}
+\def\pxhy@uchex@b#1\pxhy@nxend#2{%
+ \ifx\pxhy@empty#1\pxhy@empty
+ \ifnum"#2>"10FFFF
+ \pxhy@uchex@err
+ \else\ifnum"#2>"FFF
+ \pxhy@uchex@res{#2}%
+ \else
+ \pxhy@uchex@c#2"000\pxhy@end
+ \fi\fi
+ \else \pxhy@uchex@err
+ \fi
+}
+\def\pxhy@uchex@c#1#2#3#4#5#6\pxhy@end{%
+ \pxhy@uchex@d#1#2#3#4#5\pxhy@end
+}
+\def\pxhy@uchex@d#1"#2\pxhy@end{%
+ \pxhy@uchex@res{#2#1}%
+}
+
+\ifpxhy@uptex %<*upTeX>
+
+ %% \pxhy@marker: a not-a-char U+FDD1
+ \pxhy@get@jchar{\ucs"\pxhy@uc@XNAC}
+ \edef\pxhy@marker{\pxhy@jchar}
+
+ %% Makes \Ux and \UTF be the code input command in PDF strings.
+ \pdfstringdefDisableCommands{%
+ \let\Ux\pxhy@uchex
+ \let\UTF\pxhy@uchex
+ \let\UTFM\pxhy@uchex
+ \let\UTFK\pxhy@uchex
+ \let\UTFC\pxhy@uchex
+ \let\UTFT\pxhy@uchex
+ }
+
+ %BEGIN-- in the following block #1 means the marker
+ \def\pxhy@next#1{% #1=marker
+ %% \pxhy@uchex@res
+ % Expands to a tag string which will later be converted to
+ % a real character in the postprocess.
+ \def\pxhy@uchex@res##1{#1##1>}%
+ %% \pxhy@posthook
+ % The postprocess of this package. It is registered to
+ % \pdfstringdefPostHook.
+ \def\pxhy@posthook##1{%
+ \expandafter\pxhy@posthook@a##1#1\pxhy@end
+ \pxhy@posthook@b##1%
+ }%
+ \def\pxhy@posthook@a##1#1##2\pxhy@end{%
+ \ifx\pxhy@empty##2\pxhy@empty
+ \expandafter\@gobbletwo
+ \fi
+ }%
+ \def\pxhy@posthook@b##1{%
+ \let\pxhy@str\@empty
+ \expandafter\pxhy@posthook@c##1#1>%
+ \global\let##1=\pxhy@str
+ }%
+ \def\pxhy@posthook@c##1#1##2>{%
+ \ifx\pxhy@empty##2\pxhy@empty
+ \edef\pxhy@str{\pxhy@str##1}%
+ \else
+ \pxhy@get@jchar{"##2}%
+ \edef\pxhy@str{\pxhy@str##1\pxhy@jchar}%
+ \expandafter\pxhy@posthook@c
+ \fi
+ }%
+ }
+ \expandafter\pxhy@next\pxhy@marker
+ %END--
+
+ % Add \pxhy@posthook to \pdfstringdefPostHook.
+ \begingroup
+ \toks@\expandafter{\pdfstringdefPostHook{#1}}
+ \edef\pxhy@next{%
+ \gdef\noexpand\pdfstringdefPostHook##1{%
+ \the\toks@
+ \noexpand\pxhy@posthook{##1}%
+ }%
+ }%
+ \pxhy@next
+ \endgroup
+
+\else\ifpxhy@zerox %<*!upTeX>
+
+ %% \pxhy@uchex@res
+ % Expands to \0x form.
+ \def\pxhy@uchex@res#1{%
+ \0x#1%
+ }
+
+ %% Makes \Ux be the code input command in PDF strings.
+ % (If the otf package is loaded, then \UTF already does
+ % the same thing.)
+ \pdfstringdefDisableCommands{%
+ \let\Ux\pxhy@uchex
+ }
+
+ %Note: if out2uni is off then \Ux remains undefined.
+\fi\fi %</upTeX>
+
+%------------------- Redefine text commands for PD1
+
+\ifnum\pxhy@driver=\pxhy@driver@dvipdfmx %<*dvipdfmx>
+
+%%<+> \pxDeclarePdfTextCommand{\CS}{<jis>}{<ucs>}
+\@onlypreamble\pxDeclarePdfTextCommand
+\newcommand*\pxDeclarePdfTextCommand[3]{%
+ \pxhy@decl@pdf@tc{#2}{#3}%
+ {\DeclareTextCommand{#1}{PD1}}%
+ {\pxhy@revoke@pdf@tc{#1}}%
+}
+
+%%<+> \pxDeclarePdfTextComposite{\CS}{<arg>}{<jis>}{<ucs>}
+\@onlypreamble\pxDeclarePdfTextComposite
+\newcommand*\pxDeclarePdfTextComposite[4]{%
+ \pxhy@decl@pdf@tc{#3}{#4}%
+ {\DeclareTextCompositeCommand{#1}{PD1}{#2}}%
+ {\pxhy@revoke@pdf@tcc{#1}{#2}}%
+}
+
+\else %<*!dvipdfmx>
+
+\@onlypreamble\pxDeclarePdfTextCommand
+\newcommand*\pxDeclarePdfTextCommand[3]{}
+\@onlypreamble\pxDeclarePdfTextComposite
+\newcommand*\pxDeclarePdfTextComposite[4]{}
+
+\fi %</dvipdfmx>
+
+%% \pxhy@revoke@pdf@tc
+\@onlypreamble\pxhy@revoke@pdf@tc
+\def\pxhy@revoke@pdf@tc#1{%
+ \expandafter\let\csname PD1\string#1\endcsname\@undefined
+}
+
+%% \pxhy@revoke@pdf@tcc
+\@onlypreamble\pxhy@revoke@pdf@tc
+\def\pxhy@revoke@pdf@tcc#1#2{%
+ \expandafter\let\csname\string\PD1\string#1-\string#2%
+ \endcsname\@undefined
+}
+
+%% \pxhy@decl@pdf@tc
+\@onlypreamble\pxhy@decl@pdf@tc
+\def\pxhy@decl@pdf@tc#1#2{%
+ \pxhy@get@body{#1}{#2}%
+ \ifx\pxhy@body\@undefined
+ \let\pxhy@next\@secondoftwo
+ \else
+ \def\pxhy@next{%
+ \expandafter\pxhy@decl@pdf@tc@a\pxhy@body\pxhy@end}%
+ \fi
+ \pxhy@next
+}
+\@onlypreamble\pxhy@decl@pdf@tc@a
+\def\pxhy@decl@pdf@tc@a#1\pxhy@end#2#3{%
+ #2{#1}%
+}
+
+%% \pxhy@get@body{<jis>}{<ucs>}
+\@onlypreamble\pxhy@get@body
+\ifpxhy@uptex %<*upTeX>
+ \def\pxhy@get@body#1#2{%
+ \pxhy@get@jchar{\ucs"#2}%
+ \let\pxhy@body\pxhy@jchar
+ }%
+\else %<*!upTeX>
+ \ifpxhy@zerox
+ \def\pxhy@get@body#1#2{%
+ \ifx\pxhy@end#1\pxhy@end
+ \def\pxhy@body{\0x#2}%
+ \else
+ \pxhy@get@jchar{\jis"#1}%
+ \let\pxhy@body\pxhy@jchar
+ \fi
+ }%
+ \else
+ \def\pxhy@get@body#1#2{%
+ \ifx\pxhy@end#1\pxhy@end
+ \let\pxhy@body\@undefined
+ \else
+ \pxhy@get@jchar{\jis"#1}%
+ \let\pxhy@body\pxhy@jchar
+ \fi
+ }%
+ \fi
+\fi %</upTeX>
+
+%-------------------
+
+% JIS X 0213 does not distinguish the following pairs:
+% - circumflex(U+02C6) and asciicircum(U+005E)
+% - tilde(U+02DC) and asciitilde(U+007E)
+% Here I use ASCII characters as done in JIS.
+\DeclareTextCommand{\textcircumflex}{PD1}{\136}
+\DeclareTextCommand{\textasciicircum}{PD1}{\136}
+\DeclareTextCommand{\texttilde}{PD1}{\176}
+\DeclareTextCommand{\textasciitilde}{PD1}{\176}
+
+% Some ad-hoc redefinitions.
+\DeclareTextCommand{\textfi}{PD1}{fi}
+\DeclareTextCommand{\textfl}{PD1}{fl}
+\DeclareTextCommand{\IJ}{PD1}{IJ}
+\DeclareTextCommand{\ij}{PD1}{ij}
+\pxDeclarePdfTextCommand{\textcelsius}{216E}{2103}
+
+%%%%%%%%
+\pxDeclarePdfTextCommand{\textasciibreve}{}{02D8}
+\pxDeclarePdfTextCommand{\textasciicaron}{}{02C7}
+\pxDeclarePdfTextCommand{\textdotaccent}{}{02D9}
+\pxDeclarePdfTextCommand{\texthungarumlaut}{}{02DD}
+\pxDeclarePdfTextCommand{\textogonek}{}{02DB}
+\pxDeclarePdfTextCommand{\textring}{}{02DA}
+\pxDeclarePdfTextCommand{\texttilde}{}{02DC}
+\pxDeclarePdfTextCommand{\textbullet}{}{2022}
+\pxDeclarePdfTextCommand{\textdagger}{2277}{2020}
+\pxDeclarePdfTextCommand{\textdaggerdbl}{2278}{2021}
+\pxDeclarePdfTextCommand{\textellipsis}{2144}{2026}
+\pxDeclarePdfTextCommand{\textemdash}{213D}{2014}
+\pxDeclarePdfTextCommand{\textendash}{}{2013}
+\pxDeclarePdfTextCommand{\textflorin}{}{0192}
+\pxDeclarePdfTextCommand{\textfractionsolidus}{}{2044}
+\pxDeclarePdfTextCommand{\guilsinglleft}{}{2039}
+\pxDeclarePdfTextCommand{\guilsinglright}{}{203A}
+\pxDeclarePdfTextCommand{\textminus}{215D}{2212}
+\pxDeclarePdfTextCommand{\textperthousand}{2273}{2030}
+\pxDeclarePdfTextCommand{\quotedblbase}{}{201E}
+\pxDeclarePdfTextCommand{\textquotedblleft}{2148}{201C}
+\pxDeclarePdfTextCommand{\textquotedblright}{2149}{201D}
+\pxDeclarePdfTextCommand{\textquoteleft}{2146}{2018}
+\pxDeclarePdfTextCommand{\textquoteright}{2147}{2019}
+\pxDeclarePdfTextCommand{\quotesinglbase}{}{201A}
+\pxDeclarePdfTextCommand{\texttrademark}{}{2122}
+\pxDeclarePdfTextCommand{\L}{}{0141}
+\pxDeclarePdfTextCommand{\OE}{}{0152}
+\pxDeclarePdfTextComposite{\v}{S}{}{0160}
+\pxDeclarePdfTextComposite{\"}{Y}{}{0178}
+\pxDeclarePdfTextComposite{\v}{Z}{}{017D}
+\pxDeclarePdfTextCommand{\i}{}{0131}
+\pxDeclarePdfTextCommand{\l}{}{0142}
+\pxDeclarePdfTextCommand{\oe}{}{0153}
+\pxDeclarePdfTextComposite{\v}{s}{}{0161}
+\pxDeclarePdfTextComposite{\v}{z}{}{017E}
+\pxDeclarePdfTextCommand{\texteuro}{}{20AC}
+\pxDeclarePdfTextCommand{\textexclamdown}{}{00A1}
+\pxDeclarePdfTextCommand{\textcent}{2171}{00A2}
+\pxDeclarePdfTextCommand{\textsterling}{2172}{00A3}
+\pxDeclarePdfTextCommand{\textcurrency}{}{00A4}
+\pxDeclarePdfTextCommand{\textyen}{}{00A5}
+\pxDeclarePdfTextCommand{\textbrokenbar}{}{00A6}
+\pxDeclarePdfTextCommand{\textsection}{2178}{00A7}
+\pxDeclarePdfTextCommand{\textasciidieresis}{212F}{00A8}
+\pxDeclarePdfTextCommand{\textcopyright}{}{00A9}
+\pxDeclarePdfTextCommand{\textordfeminine}{}{00AA}
+\pxDeclarePdfTextCommand{\guillemotleft}{}{00AB}
+\pxDeclarePdfTextCommand{\textlogicalnot}{224C}{00AC}
+\pxDeclarePdfTextCommand{\textlnot}{224C}{00AC}
+\pxDeclarePdfTextCommand{\textregistered}{}{00AE}
+\pxDeclarePdfTextCommand{\textasciimacron}{}{00AF}
+\pxDeclarePdfTextCommand{\textdegree}{216B}{00B0}
+\pxDeclarePdfTextCommand{\textplusminus}{215E}{00B1}
+\pxDeclarePdfTextCommand{\texttwosuperior}{}{00B2}
+\pxDeclarePdfTextCommand{\textthreesuperior}{}{00B3}
+\pxDeclarePdfTextCommand{\textacute}{212D}{00B4}
+\pxDeclarePdfTextCommand{\textmu}{}{00B5}
+\pxDeclarePdfTextCommand{\textparagraph}{2279}{00B6}
+\pxDeclarePdfTextCommand{\textperiodcentered}{}{00B7}
+\pxDeclarePdfTextCommand{\textcedilla}{}{00B8}
+\pxDeclarePdfTextCommand{\textonesuperior}{}{00B9}
+\pxDeclarePdfTextCommand{\textordmasculine}{}{00BA}
+\pxDeclarePdfTextCommand{\guillemotright}{}{00BB}
+\pxDeclarePdfTextCommand{\textonequarter}{}{00BC}
+\pxDeclarePdfTextCommand{\textonehalf}{}{00BD}
+\pxDeclarePdfTextCommand{\textthreequarters}{}{00BE}
+\pxDeclarePdfTextCommand{\textquestiondown}{}{00BF}
+\pxDeclarePdfTextComposite{\`}{A}{}{00C0}
+\pxDeclarePdfTextComposite{\'}{A}{}{00C1}
+\pxDeclarePdfTextComposite{\^}{A}{}{00C2}
+\pxDeclarePdfTextComposite{\~}{A}{}{00C3}
+\pxDeclarePdfTextComposite{\"}{A}{}{00C4}
+\pxDeclarePdfTextComposite{\r}{A}{}{00C5}
+\pxDeclarePdfTextCommand{\AE}{}{00C6}
+\pxDeclarePdfTextComposite{\c}{C}{}{00C7}
+\pxDeclarePdfTextComposite{\`}{E}{}{00C8}
+\pxDeclarePdfTextComposite{\'}{E}{}{00C9}
+\pxDeclarePdfTextComposite{\^}{E}{}{00CA}
+\pxDeclarePdfTextComposite{\"}{E}{}{00CB}
+\pxDeclarePdfTextComposite{\`}{I}{}{00CC}
+\pxDeclarePdfTextComposite{\'}{I}{}{00CD}
+\pxDeclarePdfTextComposite{\^}{I}{}{00CE}
+\pxDeclarePdfTextComposite{\"}{I}{}{00CF}
+\pxDeclarePdfTextCommand{\DH}{}{00D0}
+\pxDeclarePdfTextCommand{\DJ}{}{00D0}
+\pxDeclarePdfTextComposite{\~}{N}{}{00D1}
+\pxDeclarePdfTextComposite{\`}{O}{}{00D2}
+\pxDeclarePdfTextComposite{\'}{O}{}{00D3}
+\pxDeclarePdfTextComposite{\^}{O}{}{00D4}
+\pxDeclarePdfTextComposite{\~}{O}{}{00D5}
+\pxDeclarePdfTextComposite{\"}{O}{}{00D6}
+\pxDeclarePdfTextCommand{\textmultiply}{215F}{00D7}
+\pxDeclarePdfTextCommand{\O}{}{00D8}
+\pxDeclarePdfTextComposite{\`}{U}{}{00D9}
+\pxDeclarePdfTextComposite{\'}{U}{}{00DA}
+\pxDeclarePdfTextComposite{\^}{U}{}{00DB}
+\pxDeclarePdfTextComposite{\"}{U}{}{00DC}
+\pxDeclarePdfTextComposite{\'}{Y}{}{00DD}
+\pxDeclarePdfTextCommand{\TH}{}{00DE}
+\pxDeclarePdfTextCommand{\ss}{}{00DF}
+\pxDeclarePdfTextComposite{\`}{a}{}{00E0}
+\pxDeclarePdfTextComposite{\'}{a}{}{00E1}
+\pxDeclarePdfTextComposite{\^}{a}{}{00E2}
+\pxDeclarePdfTextComposite{\~}{a}{}{00E3}
+\pxDeclarePdfTextComposite{\"}{a}{}{00E4}
+\pxDeclarePdfTextComposite{\r}{a}{}{00E5}
+\pxDeclarePdfTextCommand{\ae}{}{00E6}
+\pxDeclarePdfTextComposite{\c}{c}{}{00E7}
+\pxDeclarePdfTextComposite{\`}{e}{}{00E8}
+\pxDeclarePdfTextComposite{\'}{e}{}{00E9}
+\pxDeclarePdfTextComposite{\^}{e}{}{00EA}
+\pxDeclarePdfTextComposite{\"}{e}{}{00EB}
+\pxDeclarePdfTextComposite{\`}{i}{}{00EC}
+\pxDeclarePdfTextComposite{\`}{\i}{}{00EC}
+\pxDeclarePdfTextComposite{\'}{i}{}{00ED}
+\pxDeclarePdfTextComposite{\'}{\i}{}{00ED}
+\pxDeclarePdfTextComposite{\^}{i}{}{00EE}
+\pxDeclarePdfTextComposite{\^}{\i}{}{00EE}
+\pxDeclarePdfTextComposite{\"}{i}{}{00EF}
+\pxDeclarePdfTextComposite{\"}{\i}{}{00EF}
+\pxDeclarePdfTextCommand{\dh}{}{00F0}
+\pxDeclarePdfTextComposite{\~}{n}{}{00F1}
+\pxDeclarePdfTextComposite{\`}{o}{}{00F2}
+\pxDeclarePdfTextComposite{\'}{o}{}{00F3}
+\pxDeclarePdfTextComposite{\^}{o}{}{00F4}
+\pxDeclarePdfTextComposite{\~}{o}{}{00F5}
+\pxDeclarePdfTextComposite{\"}{o}{}{00F6}
+\pxDeclarePdfTextCommand{\textdivide}{2160}{00F7}
+\pxDeclarePdfTextCommand{\o}{}{00F8}
+\pxDeclarePdfTextComposite{\`}{u}{}{00F9}
+\pxDeclarePdfTextComposite{\'}{u}{}{00FA}
+\pxDeclarePdfTextComposite{\^}{u}{}{00FB}
+\pxDeclarePdfTextComposite{\"}{u}{}{00FC}
+\pxDeclarePdfTextComposite{\'}{y}{}{00FD}
+\pxDeclarePdfTextCommand{\th}{}{00FE}
+\pxDeclarePdfTextComposite{\"}{y}{}{00FF}
+%%%%%%%%
+
+% 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@zerox\else
+ \DeclareTextCommand{\textendash}{PD1}{--}
+ \DeclareTextCommand{\textquestiondown}{PD1}{}% empty
+ \DeclareTextCommand{\textexclamdown}{PD1}{}% empty
+ \fi
+\fi
+
+%------------------- all done
+\endinput
+%% EOF
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 54892512eda..aa79c7cfdad 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -351,8 +351,8 @@ my @TLP_working = qw(
pst-vowel pst-vue3d
pst2pdf pstool pstricks pstricks-add pstricks-examples
pstricks-examples-en pstricks_calcnotes
- psu-thesis ptext ptptex punk punk-latex punknova purifyeps
- pxbase pxchfon pxcjkcat pxfonts pxgreeks pxrubrica pxtxalfa python
+ psu-thesis ptext ptptex punk punk-latex punknova purifyeps pxbase
+ pxchfon pxcjkcat pxfonts pxgreeks pxjahyper pxrubrica pxtxalfa python
quattrocento qcm qobitree quoting qstest qsymbols qtree quotchap quotmark
r_und_s ran_toks randbild randomwalk randtext rccol rcs rcs-multi rcsinfo
realboxes realscripts rec-thy recipe recipecard recycle rectopma
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index f032ba13b37..a8e3caeb2e8 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -1191,6 +1191,7 @@ $standarddest = "texmf-dist";
'pst-cox', 'generic',
'pxbase', 'platex',
'pxchfon', 'platex',
+ 'pxjahyper', 'platex',
'pxrubrica', 'platex',
'rsfs', 'plain',
'ruhyphen', 'generic',
@@ -1673,6 +1674,7 @@ $standardtex='\.(.bx|cfg|sty|clo|ldf|cls|def|fd|cmap|4ht)$';
'pxfonts', 'fonts',
'pxbase', 'platex',
'pxchfon', 'platex',
+ 'pxjahyper', 'platex',
'pxrubrica', 'platex',
'recycle', 'fonts',
'rsfs', 'fonts',
@@ -1807,6 +1809,7 @@ $standarddocfmt='latex';
'pstricks', 'generic',
'pxbase', 'platex',
'pxchfon', 'platex',
+ 'pxjahyper', 'platex',
'pxrubrica', 'platex',
'ruhyphen', 'generic',
'splines', 'metapost',
diff --git a/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc b/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc
index eea2cf21a6b..07b8fa2ae8d 100644
--- a/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-langcjk.tlpsrc
@@ -30,6 +30,7 @@ depend ptex
depend pxbase
depend pxchfon
depend pxcjkcat
+depend pxjahyper
depend pxrubrica
depend thailatex
depend uhc
diff --git a/Master/tlpkg/tlpsrc/pxjahyper.tlpsrc b/Master/tlpkg/tlpsrc/pxjahyper.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/pxjahyper.tlpsrc