summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-25 21:02:06 +0000
committerKarl Berry <karl@freefriends.org>2019-10-25 21:02:06 +0000
commit819440293cec3930d0029a4b0a6edbcf4ec1b4e7 (patch)
tree14e73e47d73fe12d71351a7c3f9768663739a8de
parentfbe4cbb5fcf9a3c08edacde11d586b3b20443dba (diff)
pxjahyper (25oct19)
git-svn-id: svn://tug.org/texlive/trunk@52531 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/README-ja.md5
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/README.md1
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdfbin96162 -> 101012 bytes
-rw-r--r--Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex13
-rw-r--r--Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty124
5 files changed, 138 insertions, 5 deletions
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md b/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
index dd708626871..a1a74ace8bc 100644
--- a/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
+++ b/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
@@ -35,6 +35,11 @@ pxjahyper パッケージ ー 本体
更新履歴
--------
+ * Version 0.4 〈2019/10/25〉
+ - PDF 文字列中で `\CID` をサポート(`otfcid` オプション)
+ - (試験的) PDF 文字列中で japanese-otf の文字入力マクロをサポート
+ (`otfmacros` オプション)
+
* Version 0.3e 〈2019/06/20〉
- hyperref の `unicode` 指定が後から変更された場合はエラーを出す。
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/README.md b/Master/texmf-dist/doc/platex/pxjahyper/README.md
index 60c28b0e996..6a86fc13492 100644
--- a/Master/texmf-dist/doc/platex/pxjahyper/README.md
+++ b/Master/texmf-dist/doc/platex/pxjahyper/README.md
@@ -36,6 +36,7 @@ Please refer to the manual `pxjahyper.pdf` (in Japanese) for detail.
Revision History
----------------
+ * Version 0.4 〈2019/10/25〉
* Version 0.3e 〈2019/06/20〉
* Version 0.3d 〈2018/07/15〉
* Version 0.3c 〈2018/01/25〉
diff --git a/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf b/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.pdf
index 03ef9411852..82948f375d6 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 41b1b1c7f53..e4633e8da37 100644
--- a/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex
+++ b/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex
@@ -3,8 +3,8 @@
\documentclass[a4paper]{jsarticle}
\usepackage{shortvrb}
\MakeShortVerb{\|}
-\newcommand{\PkgVersion}{0.3e}
-\newcommand{\PkgDate}{2019/06/20}
+\newcommand{\PkgVersion}{0.4}
+\newcommand{\PkgDate}{2019/10/25}
\newcommand{\Pkg}[1]{\textsf{#1}}
\newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$}
\newcommand{\Note}{\par\noindent ※}
@@ -64,6 +64,13 @@
{\upLaTeX} では使用不可。
\item |noout2uni|(既定)\Means
|out2uni| の否定。
+\item |otfcid|(既定)\Means
+ \Pkg{japanese-otf}パッケージの |\CID| をPDF文字列中で
+ 使えるようにする。
+ 具体的には、当該のAJ1のグリフに“対応”するUnicode文字が
+ あればそれを出力し、なければ(警告を出した上で)削除する。
+\item |nootfcid| \Means
+ |otfcid| の否定。
\item |bigcode|(既定)\Means
{\upTeX}でのToUnicode CMapとして既定のUTF8-UCSの代わりに\
UTF8-UTF16を用いる。
@@ -98,7 +105,7 @@ PDF文字列以外では |\Ux| は以前の定義(または未定義)に戻
符号値は16進数で指定する。
-なお、\Pkg{OTF}パッケージの |\UTF| 命令は、PDF文字列中では
+なお、\Pkg{japanese-otf}パッケージの |\UTF| 命令は、PDF文字列中では
out2uni用の出力を行うように設計されているが、
本パッケージを {\upLaTeX} で用いた場合は、
|\UTF| も(PDF文字列中では)|\Ux| と同じ動作
diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty
index 68166215ecd..8a429bdad9c 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}[2019/06/20 v0.3e]
+\ProvidesPackage{pxjahyper}[2019/10/25 v0.4]
%% error messages
\def\pxhy@pkgname{pxjahyper}
@@ -30,6 +30,7 @@
%% globals
\newif\ifpxhy@ptex
\newif\ifpxhy@uptex
+\newif\ifpxhy@etex
\let\pxhy@jcode\@undefined
\newif\ifpxhy@tounicode
\newif\ifpxhy@zerox
@@ -40,6 +41,8 @@
\let\pxhy@driver\@undefined
\newif\ifpxhy@hy@unicode
\newif\ifpxhy@jacommentline
+\newif\ifpxhy@otfcid
+\newif\ifpxhy@otfmacros
%--------------------------------------- Package options
@@ -82,6 +85,21 @@
\DeclareOption{nojacommentline}{%
\pxhy@jacommentlinefalse
}
+\pxhy@otfcidtrue
+\DeclareOption{otfcid}{%
+ \pxhy@otfcidtrue
+ \let\pxhy@otfcid@given=t
+}
+\DeclareOption{nootfcid}{%
+ \pxhy@otfcidfalse
+}
+\DeclareOption{otfmacros}{%
+ \pxhy@otfmacrostrue
+ \let\pxhy@otfcid@given=t
+}
+\DeclareOption{nootfmacros}{%
+ \pxhy@otfmacrosfalse
+}
\ExecuteOptions{%
auto,tounicode,noout2uni,jacommentline%
}
@@ -125,11 +143,13 @@
\fi
%% Check the engine.
+\@onlypreamble\pxhy@check
\def\pxhy@check#1#2{%
\edef\pxhy@tmpa{\string#1}%
\edef\pxhy@tmpb{\meaning#1}%
\ifx\pxhy@tmpa\pxhy@tmpb #2\fi
}
+\pxhy@check\eTeXversion{\pxhy@etextrue}
\pxhy@check\kanjiskip{\pxhy@ptextrue}
\pxhy@check\forcecjktoken{\pxhy@uptextrue}
\ifpxhy@ptex\else
@@ -182,6 +202,15 @@
\pxhy@fatal{hyperref 'unicode' mode is not supported}{}%
\expandafter\endinput
\fi
+% otfcid requires upTeX or out2uni.
+\ifpxhy@uptex\else\ifpxhy@zerox\else
+ \pxhy@otfcidfalse
+ \ifx t\pxhy@otfcid@given
+ \PackageWarningNoLine\pxhy@pkgname
+ {Option 'otfcid' is invalid unless upTeX is used\MessageBreak
+ or 'out2uni' is specified}
+ \fi
+\fi\fi
\iffalse
\typeout{%
@@ -196,8 +225,14 @@ pxhy@driver = \the\pxhy@driver^^J%
%--------------------------------------- Helpers
-%% pxhy@end
+%% packages
+\ifpxhy@etex
+ \RequirePackage{etoolbox}[2011/01/03]%v2.1
+\fi
+
+%% unique tokens
\def\pxhy@end{\pxhy@end@}
+\let\pxhy@mk\indent % unexpandable
%% \pxhy@out@special{<text>}
\def\pxhy@out@special#1{%
@@ -401,6 +436,91 @@ pxhy@driver = \the\pxhy@driver^^J%
%Note: if out2uni is off then \Ux remains undefined.
\fi\fi %</upTeX>
+%--------------------------------------- Support for 'otfcid'
+\ifpxhy@otfcid
+
+%% variables
+\@onlypreamble\pxhy@otfcid@disabled
+\let\pxhy@otfcid@disabled\relax
+
+%% preparation
+\ifpxhy@etex
+ % check if bxjatoucs is available
+ \IfFileExists{bxjatoucs.sty}{%
+ \let\bxjatoucsCheckAvail=t
+ \RequirePackage{bxjatoucs}[]
+ \undef\bxjatoucsCheckAvail
+ }{}
+ \ifundef\bxjaCidToUcs{%
+ \def\pxhy@otfcid@disabled{%
+ package 'bxjatoucs' is unavailable%
+ }%
+ }{}
+\else
+ \def\pxhy@otfcid@disabled{%
+ e-TeX extension is unavailable%
+ }
+\fi
+%% annihilate the ajmacros's own pdfstring process
+\ifpxhy@otfmacros\ifx\pxhy@otfcid@disabled\relax
+ \let\ajRedefine@ajCommands\relax
+ \AtBeginDocument{\let\ajRedefine@ajCommands\relax}
+\fi\fi
+
+%% \pxhy@CID{<cid>}
+\def\pxhy@CID#1{%
+ \expandafter\expandafter\expandafter\pxhy@cid@aux
+ \bxjaCidToUcsHex{#1}\pxhy@mk{\detokenize{#1}}%
+}
+%% \pxhy@fast@CID{<cid>}
+\def\pxhy@fast@CID#1{%
+ \expandafter\expandafter\expandafter\pxhy@cid@aux
+ \bxjaFastCidToUcsHex{#1}\pxhy@mk{\number#1}%
+}
+\def\pxhy@cid@aux#1\pxhy@mk#2{%
+ \ifnum"#1>\z@
+ \pxhy@uchex{#1}%
+ \else
+ \@nameuse{CID+#2}%
+ \fi
+}
+
+%% \pxhy@dispatch@otfcid
+\@onlypreamble\pxhy@dispatch@otfcid
+\def\pxhy@dispatch@otfcid{%
+ \pdfstringdefDisableCommands{%
+ \let\CID\pxhy@CID
+ }%
+ \ifpxhy@otfmacros
+ \ifx\ajSnowman\@undefined\else % ajmacros is loaded
+ \makeatletter
+ \InputIfFileExists{pxjahyper-ajm.def}{%
+ \PackageInfo\pxhy@pkgname
+ {Loaded 'pxjahyper-ajm.def'\@gobble}%
+ }{%
+ \PackageWarning\pxhy@pkgname
+ {File 'pxjahyper-ajm.def' not found\@gobble}%
+ }%
+ \makeatother
+ \fi
+ \fi
+}
+
+%% begin-document hook
+\AtBeginDocument{%
+ \@ifpackageloaded{otf}{%
+ \ifx\pxhy@otfcid@disabled\relax % available!
+ \pxhy@dispatch@otfcid
+ \else
+ \PackageWarningNoLine\pxhy@pkgname
+ {Option 'otfcid' is disabled, because\MessageBreak
+ \pxhy@otfcid@disabled}%
+ \pxhy@otfcidfalse
+ \fi
+ }{}%
+}
+
+\fi
%--------------------------------------- Redefine text commands for PD1
\ifnum\pxhy@driver=\pxhy@driver@dvipdfmx %<*dvipdfmx>