texlive[52531] Master/texmf-dist: pxjahyper (25oct19)
commits+karl at tug.org
commits+karl at tug.org
Fri Oct 25 23:02:06 CEST 2019
Revision: 52531
http://tug.org/svn/texlive?view=revision&revision=52531
Author: karl
Date: 2019-10-25 23:02:06 +0200 (Fri, 25 Oct 2019)
Log Message:
-----------
pxjahyper (25oct19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md
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
Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md 2019-10-25 21:01:54 UTC (rev 52530)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README-ja.md 2019-10-25 21:02:06 UTC (rev 52531)
@@ -35,6 +35,11 @@
更新履歴
--------
+ * Version 0.4 〈2019/10/25〉
+ - PDF 文字列中で `\CID` をサポート(`otfcid` オプション)
+ - (試験的) PDF 文字列中で japanese-otf の文字入力マクロをサポート
+ (`otfmacros` オプション)
+
* Version 0.3e 〈2019/06/20〉
- hyperref の `unicode` 指定が後から変更された場合はエラーを出す。
Modified: trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md 2019-10-25 21:01:54 UTC (rev 52530)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/README.md 2019-10-25 21:02:06 UTC (rev 52531)
@@ -36,6 +36,7 @@
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〉
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 2019-10-25 21:01:54 UTC (rev 52530)
+++ trunk/Master/texmf-dist/doc/platex/pxjahyper/pxjahyper.tex 2019-10-25 21:02:06 UTC (rev 52531)
@@ -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 @@
符号値は16進数で指定する。
-なお、\Pkg{OTF}パッケージの |\UTF| 命令は、PDF文字列中では
+なお、\Pkg{japanese-otf}パッケージの |\UTF| 命令は、PDF文字列中では
out2uni用の出力を行うように設計されているが、
本パッケージを {\upLaTeX} で用いた場合は、
|\UTF| も(PDF文字列中では)|\Ux| と同じ動作
Modified: trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty 2019-10-25 21:01:54 UTC (rev 52530)
+++ trunk/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty 2019-10-25 21:02:06 UTC (rev 52531)
@@ -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 at pkgname{pxjahyper}
@@ -30,6 +30,7 @@
%% globals
\newif\ifpxhy at ptex
\newif\ifpxhy at uptex
+\newif\ifpxhy at etex
\let\pxhy at jcode\@undefined
\newif\ifpxhy at tounicode
\newif\ifpxhy at zerox
@@ -40,6 +41,8 @@
\let\pxhy at driver\@undefined
\newif\ifpxhy at hy@unicode
\newif\ifpxhy at jacommentline
+\newif\ifpxhy at otfcid
+\newif\ifpxhy at otfmacros
%--------------------------------------- Package options
@@ -82,6 +85,21 @@
\DeclareOption{nojacommentline}{%
\pxhy at jacommentlinefalse
}
+\pxhy at otfcidtrue
+\DeclareOption{otfcid}{%
+ \pxhy at otfcidtrue
+ \let\pxhy at otfcid@given=t
+}
+\DeclareOption{nootfcid}{%
+ \pxhy at otfcidfalse
+}
+\DeclareOption{otfmacros}{%
+ \pxhy at otfmacrostrue
+ \let\pxhy at otfcid@given=t
+}
+\DeclareOption{nootfmacros}{%
+ \pxhy at otfmacrosfalse
+}
\ExecuteOptions{%
auto,tounicode,noout2uni,jacommentline%
}
@@ -125,11 +143,13 @@
\fi
%% Check the engine.
+\@onlypreamble\pxhy at check
\def\pxhy at check#1#2{%
\edef\pxhy at tmpa{\string#1}%
\edef\pxhy at tmpb{\meaning#1}%
\ifx\pxhy at tmpa\pxhy at tmpb #2\fi
}
+\pxhy at check\eTeXversion{\pxhy at etextrue}
\pxhy at check\kanjiskip{\pxhy at ptextrue}
\pxhy at check\forcecjktoken{\pxhy at uptextrue}
\ifpxhy at ptex\else
@@ -182,6 +202,15 @@
\pxhy at fatal{hyperref 'unicode' mode is not supported}{}%
\expandafter\endinput
\fi
+% otfcid requires upTeX or out2uni.
+\ifpxhy at uptex\else\ifpxhy at zerox\else
+ \pxhy at otfcidfalse
+ \ifx t\pxhy at otfcid@given
+ \PackageWarningNoLine\pxhy at pkgname
+ {Option 'otfcid' is invalid unless upTeX is used\MessageBreak
+ or 'out2uni' is specified}
+ \fi
+\fi\fi
\iffalse
\typeout{%
@@ -196,8 +225,14 @@
%--------------------------------------- Helpers
-%% pxhy at end
+%% packages
+\ifpxhy at etex
+ \RequirePackage{etoolbox}[2011/01/03]%v2.1
+\fi
+
+%% unique tokens
\def\pxhy at end{\pxhy at end@}
+\let\pxhy at mk\indent % unexpandable
%% \pxhy at out@special{<text>}
\def\pxhy at out@special#1{%
@@ -401,6 +436,91 @@
%Note: if out2uni is off then \Ux remains undefined.
\fi\fi %</upTeX>
+%--------------------------------------- Support for 'otfcid'
+\ifpxhy at otfcid
+
+%% variables
+\@onlypreamble\pxhy at otfcid@disabled
+\let\pxhy at otfcid@disabled\relax
+
+%% preparation
+\ifpxhy at etex
+ % check if bxjatoucs is available
+ \IfFileExists{bxjatoucs.sty}{%
+ \let\bxjatoucsCheckAvail=t
+ \RequirePackage{bxjatoucs}[]
+ \undef\bxjatoucsCheckAvail
+ }{}
+ \ifundef\bxjaCidToUcs{%
+ \def\pxhy at otfcid@disabled{%
+ package 'bxjatoucs' is unavailable%
+ }%
+ }{}
+\else
+ \def\pxhy at otfcid@disabled{%
+ e-TeX extension is unavailable%
+ }
+\fi
+%% annihilate the ajmacros's own pdfstring process
+\ifpxhy at otfmacros\ifx\pxhy at otfcid@disabled\relax
+ \let\ajRedefine at ajCommands\relax
+ \AtBeginDocument{\let\ajRedefine at ajCommands\relax}
+\fi\fi
+
+%% \pxhy at CID{<cid>}
+\def\pxhy at CID#1{%
+ \expandafter\expandafter\expandafter\pxhy at cid@aux
+ \bxjaCidToUcsHex{#1}\pxhy at mk{\detokenize{#1}}%
+}
+%% \pxhy at fast@CID{<cid>}
+\def\pxhy at fast@CID#1{%
+ \expandafter\expandafter\expandafter\pxhy at cid@aux
+ \bxjaFastCidToUcsHex{#1}\pxhy at mk{\number#1}%
+}
+\def\pxhy at cid@aux#1\pxhy at mk#2{%
+ \ifnum"#1>\z@
+ \pxhy at uchex{#1}%
+ \else
+ \@nameuse{CID+#2}%
+ \fi
+}
+
+%% \pxhy at dispatch@otfcid
+\@onlypreamble\pxhy at dispatch@otfcid
+\def\pxhy at dispatch@otfcid{%
+ \pdfstringdefDisableCommands{%
+ \let\CID\pxhy at CID
+ }%
+ \ifpxhy at otfmacros
+ \ifx\ajSnowman\@undefined\else % ajmacros is loaded
+ \makeatletter
+ \InputIfFileExists{pxjahyper-ajm.def}{%
+ \PackageInfo\pxhy at pkgname
+ {Loaded 'pxjahyper-ajm.def'\@gobble}%
+ }{%
+ \PackageWarning\pxhy at pkgname
+ {File 'pxjahyper-ajm.def' not found\@gobble}%
+ }%
+ \makeatother
+ \fi
+ \fi
+}
+
+%% begin-document hook
+\AtBeginDocument{%
+ \@ifpackageloaded{otf}{%
+ \ifx\pxhy at otfcid@disabled\relax % available!
+ \pxhy at dispatch@otfcid
+ \else
+ \PackageWarningNoLine\pxhy at pkgname
+ {Option 'otfcid' is disabled, because\MessageBreak
+ \pxhy at otfcid@disabled}%
+ \pxhy at otfcidfalse
+ \fi
+ }{}%
+}
+
+\fi
%--------------------------------------- Redefine text commands for PD1
\ifnum\pxhy at driver=\pxhy at driver@dvipdfmx %<*dvipdfmx>
More information about the tex-live-commits
mailing list