texlive[45554] Master/texmf-dist: pxjahyper (17oact17)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 17 22:42:12 CEST 2017


Revision: 45554
          http://tug.org/svn/texlive?view=revision&revision=45554
Author:   karl
Date:     2017-10-17 22:42:12 +0200 (Tue, 17 Oct 2017)
Log Message:
-----------
pxjahyper (17oact17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/platex/pxjahyper/LICENSE
    trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf
    trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex
    trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
    trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/platex/pxjahyper/README

Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/LICENSE	2017-10-17 04:44:29 UTC (rev 45553)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/LICENSE	2017-10-17 20:42:12 UTC (rev 45554)
@@ -1,9 +1,6 @@
-$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
+Copyright (c) 2017 Takayuki YATO (aka. "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

Deleted: trunk/Master/texmf-dist/doc/platex/pxjahyper/README
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README	2017-10-17 04:44:29 UTC (rev 45553)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README	2017-10-17 20:42:12 UTC (rev 45554)
@@ -1,25 +0,0 @@
-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>
-  - 最初の公開版

Added: trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md	2017-10-17 20:42:12 UTC (rev 45554)
@@ -0,0 +1,51 @@
+PXjahyper パッケージバンドル
+============================
+
+LaTeX: pLaTeX 上での hyperref のサポート
+
+(u)pLaTeX 上で hyperref を用いて日本語の文書情報を含む PDF 文書を作成する
+場合に必要となる以下の機能を提供する。
+
+  * PDF 文字列内の和文文字のサポート
+  * mag 指定に対するサポート
+
+### 前提環境
+
+  * フォーマット: LaTeX
+  * エンジン: pTeX、upTeX、pTeX-ng
+  * DVIウェア: dvipdfmx
+  * 依存パッケージ:
+      - hyperref
+
+### インストール
+
+  - `*.sty` → $TEXMF/tex/platex/PXjahyper
+
+### ライセンス
+
+本パッケージは MIT ライセンスの下で配布される。
+
+
+pxjahyper パッケージ ー 本体
+----------------------------
+
+詳細についてはマニュアル `pxjahyper.pdf` を参照されたい。
+
+
+更新履歴
+--------
+
+  * Version 0.3a 〈2017/10/17〉
+      - `bigcode` を既定に変更。
+      - (試験的) upLaTeX で hyperref の `unicode` 指定を可能にする。
+
+  * Version 0.3  〈2012/05/28〉
+      - papersize special の調整機能を追加。
+      - `\Ux` を追加。
+
+  * Version 0.2  〈2012/05/27〉
+      - 最初の公開版。
+
+--------------------
+Takayuki YATO (aka. "ZR")  
+https://github.com/zr-tex8r


Property changes on: trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md	2017-10-17 20:42:12 UTC (rev 45554)
@@ -0,0 +1,45 @@
+PXjahyper Package
+=================
+
+LaTeX: Hyperref support for pLaTeX
+
+This package adjusts the behavior of hyperref on (u)pLaTeX so that authors
+can properly create PDF documents that contain document information in
+Japanese.
+
+  * Support for PDF strings containing Japanese characters.
+  * Support for magnification settings.
+
+### System Requirements
+
+  * TeX format: LaTeX.
+  * TeX engine: pTeX, upTeX, pTeX-ng.
+  * DVI-ware: dvipdfmx.
+  * Dependent packages:
+      - hyperref
+
+### Installation
+
+  - `*.sty` → $TEXMF/tex/platex/PXjahyper
+
+### License
+
+This package is distributed under the MIT License.
+
+
+The pxjahyper Package ー main
+-----------------------------
+
+Please refer to the manual `pxjahyper.pdf` (in Japanese) for detail.
+
+
+Revision History
+----------------
+
+  * Version 0.3a 〈2017/10/17〉
+  * Version 0.3  〈2012/05/28〉
+  * Version 0.2  〈2012/05/27〉
+
+--------------------
+Takayuki YATO (aka. "ZR")  
+https://github.com/zr-tex8r


Property changes on: trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex	2017-10-17 04:44:29 UTC (rev 45553)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex	2017-10-17 20:42:12 UTC (rev 45554)
@@ -3,7 +3,8 @@
 \documentclass[a4paper]{jsarticle}
 \usepackage{shortvrb}
 \MakeShortVerb{\|}
-\newcommand{\PkgVersion}{0.2}
+\newcommand{\PkgVersion}{0.3a}
+\newcommand{\PkgDate}{2017/10/17}
 \newcommand{\Pkg}[1]{\textsf{#1}}
 \newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$}
 \newcommand{\Note}{\par\noindent ※}
@@ -14,15 +15,15 @@
 \providecommand{\upLaTeX}{u\pLaTeX}
 %-----------------------------------------------------------
 \begin{document}
-\title{\Pkg{pxjahyper} パッケージ(v\PkgVersion)}
+\title{\Pkg{pxjahyper} パッケージ}
 \author{八登崇之\ (Takayuki YATO; aka.~``ZR'')}
-\date{2012/05/27}
+\date{v\PkgVersion\quad[\PkgDate]}
 \maketitle
 
 %===========================================================
 \section{概要}
 
-pLaTeX + hyperref + dvipdfmxの組み合わせで
+(u){\pLaTeX} + hyperref + dvipdfmxの組み合わせで
 日本語を含む「しおり」をもつPDF文書を作成する
 場合に必要となる機能を提供する。
 \begin{itemize}
@@ -34,24 +35,14 @@
   する場合を除き、JIS~X~0208にない文字は出力できない
   (hyperrefの警告が出る)。
 \item {\TeX} の版面拡大機能が使われている
-  (|\mag| が 1000 でない;典型的には\Pkg{jsclasses}の
+  (|\mag| が1000でない;典型的には\Pkg{jsclasses}の
   文書クラスで基底フォントサイズが10\,pt以外である)
-  場合に、\Pkg{hyperref}が出力する papersize special の
+  場合に、\Pkg{hyperref}が出力するpapersize specialの
   紙面サイズの値が不正になるが、この場合に |\mag| 値を
-  考慮して求めた正しいサイズによる papersize special を
+  考慮して求めた正しいサイズによるpapersize specialを
   改めて出力する。
 \end{itemize}
 
-\paragraph{前提フォーマット}
-{\pLaTeX} および {\upLaTeX}。
-
-\paragraph{依存パッケージ}
-\begin{itemize}
-\item \Pkg{hyperref}パッケージ
-\item \Pkg{hyperref}が依存するパッケージ
-  (\Pkg{atbegshi}等)。
-\end{itemize}
-
 %===========================================================
 \section{パッケージの読込}
 
@@ -73,15 +64,16 @@
   {\upLaTeX} では使用不可。
 \item |noout2uni|(既定)\Means
   |out2uni| の否定。
-\item |bigcode|\Means
-  {\upTeX}でのToUnicode CMapとして既定の UTF8-UCS の代わりに\ 
-  UTF8-UTF16 を用いる。
+\item |bigcode|(既定)\Means
+  {\upTeX}でのToUnicode CMapとして既定のUTF8-UCSの代わりに\ 
+  UTF8-UTF16を用いる。
   (当該のファイルが存在する必要がある。)
-\item |nobigcode|(既定)\Means
+\item |nobigcode|\Means
   |bigcode| の否定。
+  \Note 0.3a版より既定を |bigcode| に変更した。
 \item |dvipdfmx|\Means
   dvipdfmxを前提とした動作を行う。
-\item |none|\Means
+\item |nodriver|/|none|\Means
   dvipdfmxを前提とした動作を抑止する。
   現状では、この場合には本パッケージは実質的に何の動作も行わない。
 \item |auto|(既定)\Means

Modified: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty	2017-10-17 04:44:29 UTC (rev 45553)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty	2017-10-17 20:42:12 UTC (rev 45554)
@@ -1,10 +1,16 @@
-%
-% pxjahyper.sty
-%
+%%
+%% This is file 'pxjahyper.sty'.
+%%
+%% Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+%%   GitHub:   https://github.com/zr-tex8r
+%%   Twitter:  @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
 
 %% package declaration
 \NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxjahyper}[2012/05/27 v0.2]
+\ProvidesPackage{pxjahyper}[2017/10/17 v0.3a]
 
 %% error messages
 \def\pxhy at pkgname{pxjahyper}
@@ -14,6 +20,7 @@
 \def\pxhy at fatal#1#2{%
   \pxhy at error{#1}{#2Package loading is aborted right now.}%
 }
+\providecommand{\bxDebug}[1]{}
 
 %% packages
 \RequirePackage{atbegshi}
@@ -28,8 +35,9 @@
 \chardef\pxhy at driver@none=0
 \chardef\pxhy at driver@dvipdfmx=1
 \let\pxhy at driver\@undefined
+\newif\ifpxhy at hy@unicode
 
-%------------------- option handling
+%--------------------------------------- Package options
 
 \DeclareOption{dvipdfmx}{%
   \let\pxhy at driver\pxhy at driver@dvipdfmx
@@ -37,6 +45,9 @@
 \DeclareOption{dvipdfm}{%
   \let\pxhy at driver\pxhy at driver@dvipdfmx
 }
+\DeclareOption{nodvidriver}{%
+  \let\pxhy at driver\pxhy at driver@none
+}
 \DeclareOption{none}{%
   \let\pxhy at driver\pxhy at driver@none
 }
@@ -62,11 +73,11 @@
   \pxhy at bigcodefalse
 }
 \ExecuteOptions{%
-  auto,tounicode,noout2uni,nobigcode%
+  auto,tounicode,noout2uni,bigcode%
 }
 \ProcessOptions*
 
-%------------------- environment check
+%--------------------------------------- Environment check
 
 %% The hyperref package must be loaded in advance.
 \@ifpackageloaded{hyperref}{}{%else
@@ -73,11 +84,11 @@
   \pxhy at fatal{'hyperref' not yet loaded}{}%
   \endinput
 }
-%% hyperref option 'unicode' must not be set.
+
+%% Check for the hyperref option 'unicode'.
 \expandafter\ifx\csname ifHy at unicode\expandafter\endcsname
- \csname iftrue\endcsname
-  \pxhy at fatal{hyperref 'unicode' mode is not supported}{}%
-  \expandafter\endinput
+    \csname iftrue\endcsname
+  \pxhy at hy@unicodetrue
 \fi
 
 %% Check hyperref driver.
@@ -135,6 +146,11 @@
 \ifpxhy at zerox
   \pxhy at tounicodefalse
 \fi
+% hyperref 'unicode' is allowed only on upLaTeX.
+\ifpxhy at hy@unicode\ifpxhy at uptex\else
+  \pxhy at fatal{hyperref 'unicode' mode is not supported}{}%
+  \expandafter\endinput
+\fi\fi
 
 \iffalse
 \typeout{%
@@ -147,7 +163,7 @@
 }
 \fi
 
-%------------------- helpers
+%--------------------------------------- Helpers
 
 %% pxhy at end
 \def\pxhy at end{\pxhy at end@}
@@ -179,7 +195,7 @@
   \let\pxhy at forcecjktoken\relax
 \fi
 
-%------------------- output 'tounicode' special
+%--------------------------------------- Output 'tounicode' special
 \ifpxhy at tounicode
 
   \ifnum\pxhy at driver=\pxhy at driver@dvipdfmx %<*dvipdfmx>
@@ -196,7 +212,7 @@
   \fi                           %</dvipdfmx>
 
 \fi
-%------------------- papersize special adjustment
+%--------------------------------------- Papersize special adjustment
 
 % When the magnification is in effect (i.e. \mag<>1000), hyperref
 % emits a papersize special with wrong value. (dvipdfmx interprets
@@ -229,9 +245,8 @@
   \fi
 \fi
 
-%------------------- 
+%--------------------------------------- Hooks to pdfstringdef
 
-
 \def\pxhy at uc@REPL{FFFD}
 \def\pxhy at uc@XNAC{FDD1} % not-a-char codepoint used as marker
 \let\pxhy at burst\romannumeral
@@ -355,7 +370,7 @@
   %Note: if out2uni is off then \Ux remains undefined.
 \fi\fi                          %</upTeX>
 
-%------------------- Redefine text commands for PD1
+%--------------------------------------- Redefine text commands for PD1
 
 \ifnum\pxhy at driver=\pxhy at driver@dvipdfmx %<*dvipdfmx>
 
@@ -443,7 +458,7 @@
   \fi
 \fi                             %</upTeX>
 
-%-------------------
+%%%%%%%%%%%%%%%%%%%% the definitions
 
 % JIS X 0213 does not distinguish the following pairs:
 %  - circumflex(U+02C6) and asciicircum(U+005E)
@@ -612,6 +627,54 @@
   \fi
 \fi
 
-%------------------- all done
+%--------------------------------------- Enable hyperref unicode
+\ifpxhy at hy@unicode
+
+\bxDebug{Setup for hyperref 'unicode'}
+
+%% The following code is taken from hyperref.sty.
+%%%%BEGIN
+  \def\HyPsd at Char#1{%
+    \ifnum`#1<128 %
+      \@backslashchar 000#1%
+    \else
+      \ifnum`#1<65536 %
+        \expandafter\HyPsd at CharTwoByte\number`#1!%
+      \else
+        \expandafter\expandafter\expandafter\HyPsd at CharSurrogate
+        \intcalcSub{`#1}{65536}!%
+      \fi
+    \fi
+  }%
+  \def\HyPsd at CharTwoByte#1!{%
+    \expandafter\expandafter\expandafter\HyPsd at CharOctByte
+    \IntCalcDiv#1!256!!%
+    \expandafter\expandafter\expandafter\HyPsd at CharOctByte
+    \IntCalcMod#1!256!!%
+  }%
+  \def\HyPsd at CharOctByte#1!{%
+    \@backslashchar
+    \IntCalcDiv#1!64!%
+    \intcalcDiv{\IntCalcMod#1!64!}{8}%
+    \IntCalcMod#1!8!%
+  }%
+  \def\HyPsd at CharSurrogate#1!{%
+    \@backslashchar 33%
+    \IntCalcDiv#1!262144!%
+    \expandafter\expandafter\expandafter\HyPsd at CharOctByte
+    \intcalcDiv{\IntCalcMod#1!262144!}{1024}!%
+    \@backslashchar 33%
+    \expandafter\expandafter\expandafter\IntCalcAdd
+    \intcalcDiv{\IntCalcMod#1!1024!}{256}!4!%
+    \expandafter\expandafter\expandafter\HyPsd at CharOctByte
+    \IntCalcMod#1!256!!%
+  }%
+%%%%END
+
+%% disable the verification of bxjscls
+\let\jsCheckHyperrefUnicode\@empty
+
+\fi
+%--------------------------------------- All done
 \endinput
 %% EOF



More information about the tex-live-commits mailing list