summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-19 21:08:05 +0000
committerKarl Berry <karl@freefriends.org>2017-06-19 21:08:05 +0000
commit4a7e4115e0329b992349b8454179645f1bda63bb (patch)
treeb65a665883868ad4fa2884949e48cbe78e56d018 /Master
parentf8ed04bfbe02db29955eb79d79e0cd6aaf820485 (diff)
pxchfon (19jun17)
git-svn-id: svn://tug.org/texlive/trunk@44641 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/platex/pxchfon/README-ja.md7
-rw-r--r--Master/texmf-dist/doc/platex/pxchfon/README.md2
-rw-r--r--Master/texmf-dist/doc/platex/pxchfon/pxchfon.pdfbin252930 -> 259299 bytes
-rw-r--r--Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex74
-rw-r--r--Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty316
-rw-r--r--Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty2
6 files changed, 315 insertions, 86 deletions
diff --git a/Master/texmf-dist/doc/platex/pxchfon/README-ja.md b/Master/texmf-dist/doc/platex/pxchfon/README-ja.md
index 606b3e5e1f4..dca3785867e 100644
--- a/Master/texmf-dist/doc/platex/pxchfon/README-ja.md
+++ b/Master/texmf-dist/doc/platex/pxchfon/README-ja.md
@@ -62,8 +62,13 @@ MITライセンスの下で配布される。
更新履歴
--------
+ * Version 1.0a ‹2017/06/19›
+ - ドライバオプションを新設した。
+ - '(no)dumpmap'、'(no)dumpmaptl' オプションを新設した。
+ - オプション 'prefer2004jis' の別名として 'jis2004' を追加した。
+ - (試験的) プリセット `yu-win10+` を追加。
+ - バグ修正。
* Version 1.0 ‹2017/05/31›
- - オプション `directunicode*` を追加。
- 非推奨のプリセットに対してエラーを出す。
- pxjafont パッケージを非推奨とする。
- `directunicode*` については OTF パッケージの読込を不要とした。
diff --git a/Master/texmf-dist/doc/platex/pxchfon/README.md b/Master/texmf-dist/doc/platex/pxchfon/README.md
index 6a8fc89548e..97169e89f1f 100644
--- a/Master/texmf-dist/doc/platex/pxchfon/README.md
+++ b/Master/texmf-dist/doc/platex/pxchfon/README.md
@@ -38,7 +38,7 @@ This package is distributed under the MIT License.
Revision History
----------------
- * Version 1.0 ‹2017/05/31›
+ * Version 1.0 ‹2017/06/19›
- The long-deprecated presets are now abolished.
- The package pxjafont is deprecated.
- Now `directunicode*` does not need japanese-otf.
diff --git a/Master/texmf-dist/doc/platex/pxchfon/pxchfon.pdf b/Master/texmf-dist/doc/platex/pxchfon/pxchfon.pdf
index f386efb77f9..d8eeb01ac59 100644
--- a/Master/texmf-dist/doc/platex/pxchfon/pxchfon.pdf
+++ b/Master/texmf-dist/doc/platex/pxchfon/pxchfon.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex b/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex
index 8cbacb8224a..ae9536ef9b3 100644
--- a/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex
+++ b/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex
@@ -10,8 +10,8 @@
\usepackage{metalogo}
\usepackage{shortvrb}
\MakeShortVerb{\|}
-\newcommand{\PkgVersion}{1.0}
-\newcommand{\PkgDate}{2017/05/31}
+\newcommand{\PkgVersion}{1.0a}
+\newcommand{\PkgDate}{2017/06/19}
\newcommand{\Pkg}[1]{\textsf{#1}}
\newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$}
\newcommand{\Note}{\par\noindent ※}
@@ -69,6 +69,16 @@ dvipdfmx 専用である。
オプションは次のものが用意されている。
\begin{itemize}
+\item ドライバオプション\Means
+ |dvipdfmx|、|dvips|、|dviout|、|xdvi| および |nodvidriver|%
+ \footnote{ドライバ依存動作を明示的に無効化するための指定。}
+ が指定できる。
+ ただし、本パッケージの主要機能である
+ 「フォントマップの文書内での指定」
+ がサポートされるのはdvipdfmxのみである。
+ 他のDVIウェアにおける動作については
+ \ref{sec:Other-Drivers}節を参照。
+ ドライバオプションの既定値は |dvipdfmx| である。
\item \textbf{プリセット指定オプション}(|ipa|、|hiragino| 等)
名前に対応するプリセット指定を有効にする。
詳細については\ref{sec:Preset}節を参照。
@@ -111,6 +121,10 @@ dvipdfmx 専用である。
現在では、この暫定仕様は廃止されている。}
\item |noprefer2004jis|(既定)\Means
|prefer2004jis| の否定。
+\item |(no)jis2004|\Means
+ |(no)prefer2004jis| の別名。
+ \Note グローバルオプションに |jis2004| を指定して\Pkg{OTF}と
+ \Pkg{pxchfon}の両方に適用することを意図している。
\item |oneweight|\Means
\Pkg{OTF}パッケージを単ウェイトで使用する場合に、
プリセット設定で使われるフォントの集合を{\pTeX}標準と同一にする。
@@ -187,6 +201,28 @@ dvipdfmx 専用である。
\ref{sec:Notice}節も参照されたい。}
\item |nousecmapforalphabet|(既定)\Means
|usecmapforalphabet| の否定。
+\item |dumpmap|\Means
+ 「通常マップファイルダンプ出力」を有効にする。
+ すなわち、本パッケージにより文書に設定されるマップ行を、
+ \Meta{ジョブ名}|.map| の名のファイルに書き出す。
+\item |nodumpmap|(既定)\Means
+ |dumpmap| の否定。
+\item |dumpmaptl|\Means
+ 「{\TeX} Liveマップファイルダンプ出力」を有効にする。
+ すなわち、本パッケージにより設定されたフォントマップに対応する
+ kanji-config-updmap用のマップファイルのセット
+ (|ptex-NAME.map|、|otf-NAME.map|、|uptex-NAME.map|、
+ |otf-up-NAME.map| の4つ、ただし |NAME| はジョブ名)
+ を出力する。
+ \Note 例えば、\Pkg{OTF}パッケージが使われない場合は
+ \Pkg{OTF}パッケージ用のマップ行は適用されない。
+ そのため、通常ダンプ出力はそのようなマップ行は書き出されない。
+ これに対して、
+ {\TeX} Live用ダンプ出力は「実際に適用されるか」は無関係で
+ kanji-config-updmapの規則に従うため、
+ \Pkg{OTF}パッケージ用のマップが |otf-*.map| に書き出される。
+\item |nodumpmaptl|(既定)\Means
+ |dumpmaptl| の否定。
\end{itemize}
%===========================================================
@@ -639,12 +675,18 @@ dvipdfmx 専用である。
\end{verbatim}\end{quote}
\end{itemize}
-以下は試験的なプリセット設定である。
+なお、以上の設定で登場したフォントのうち、
+「HG丸ゴシックM-PRO」
+は欧文が等幅でないので |alphabet| オプション指定と
+ともに使うことができない。
+
+%-------------------
+\subsection{試験的なプリセット設定}
+
+以下は試験的に実装されたプリセット設定である。
+これらについては将来的な仕様変更・廃止の可能性がある
+ことに注意されたい。
\Note 具体的な設定内容は未確定のため割愛する。
-\Note 種々の事情のため、現状の実装では日本語用の設定のために
-繁体中国語等の日本語以外のフォントも利用している。
-従って、言語別OTF版のフォントファイルを利用する場合は、
-原則的に全てのCJK言語の版を用意する必要がある。
\begin{itemize}
\item |sourcehan-otc|\Means
@@ -669,10 +711,17 @@ dvipdfmx 専用である。
\end{itemize}
-なお、以上の設定で登場したフォントのうち、
-「HG丸ゴシックM-PRO」
-は欧文が等幅でないので |alphabet| オプション指定と
-ともに使うことができない。
+\Note 種々の事情のため、上記の4つの“Source Han系”のプリセットでは
+現状の実装では日本語用の設定のために
+繁体中国語等の日本語以外のフォントも利用している。
+従って、言語別OTF版のフォントファイルを利用する場合は、
+原則的に全てのCJK言語の版を用意する必要がある。
+
+\begin{itemize}
+\item |yu-win10+|\Means
+ |yu-win10| で引用符“\,”‘\,’の出力が不正になることに
+ 対処したもの。
+\end{itemize}
%-------------------
\subsection{ptex-fontmaps互換のオプション}
@@ -864,6 +913,7 @@ OT1 として扱われるが、実際には OT1 の一部のグリフしか持
\appendix
%===========================================================
\section{dvipdfmx以外のDVIウェアでの使用}
+\label{sec:Other-Drivers}
本パッケージの核心の機能である
「使用フォントを文書中で指定する」
@@ -881,7 +931,7 @@ DVI文書を扱える可能性がある。
dvipdfmx以外のDVIウェアに読ませた場合、
フォント置換が無視され、
そのソフトウェアで設定されたフォントで出力されるはずである。
-ただ、ソフトウェアによっては、警告やエラーが出る可能性もある。
+%ただ、ソフトウェアによっては、警告やエラーが出る可能性もある。
%-------------------
\subsection{欧文フォントも置き換えた場合(\texttt{alphabet} 指定時)}
diff --git a/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty b/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
index b3041e77703..3a60cf7701a 100644
--- a/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
+++ b/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
@@ -8,19 +8,25 @@
%% This package is distributed under the MIT License.
%%
-%%%% package declaration
+%% package declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxchfon}[2017/05/31 v1.0]
+\ProvidesPackage{pxchfon}[2017/06/19 v1.0a]
\def\pxcz@pkgname{pxchfon}
-%%%% definitions
+%% preparations
\def\pxcz@error{\PackageError\pxcz@pkgname}
\def\pxcz@warn{\PackageWarning\pxcz@pkgname}
\def\pxcz@info{\PackageInfo\pxcz@pkgname}
+
+%--------------------------------------- general
+
+%% variables
\newif\ifpxcz@ok
\newif\ifpxcz@utf
-%%%% check for 'pxjafont' package
+%--------------------------------------- environment check
+
+%% check for 'pxjafont' package
% if old version of pxjafont is loaded (probably this package is
% required from pxjafont), then I abort here with an error message
% and in addition cause pxjafont to abort immediately.
@@ -32,38 +38,85 @@
\let\pxjf@main@preset\relax % make pxjafont bombout
\endinput\fi}{}
-%%%% check for upTeX
+%% \ifpxcz@uptex
\newif\ifpxcz@uptex \pxcz@uptexfalse
\edef\pxcz@tmpa{\string\ucs}\edef\pxcz@tmpb{\meaning\ucs}
\ifx\pxcz@tmpa\pxcz@tmpb \pxcz@uptextrue \fi
-%%%% process options
+%% \ifpxcz@otf@deluxe
+\newif\ifpxcz@otf@deluxe \pxcz@otf@deluxefalse
+\@ifpackagewith{otf}{deluxe}{\pxcz@otf@deluxetrue}{}
+\@ifpackagewith{pxotf}{deluxe}{\pxcz@otf@deluxetrue}{}
+
+%% \ifpxcz@otf@multi
+\newif\ifpxcz@otf@multi \pxcz@otf@multifalse
+\@ifpackagewith{otf}{multi}{\pxcz@otf@multitrue}{}
+
+%--------------------------------------- handle options
+
+%% variables
+\newif\ifpxcz@enabled \pxcz@enabledtrue
\let\pxcz@alphabet=n
+\newif\ifpxcz@otf \pxcz@otftrue
+\newif\ifpxcz@cmap@alpha
+\newif\ifpxcz@mmivjis
+\newif\ifpxcz@everypage
+\newif\ifpxcz@oneweight
+\newif\ifpxcz@uniquify
+\let\pxcz@directunicode\relax
+\let\pxcz@main@preset\relax
+\let\pxcz@file@preset\relax
+\newif\ifpxcz@file@preset@tl
+\newif\ifpxcz@alpha
+\newif\ifpxcz@rel
+\newif\ifpxcz@dumpmap
+\newif\ifpxcz@dumpmap@tl
+
+%% process options
+% drivers
+\DeclareOption{nodvidriver}{\pxcz@enabledfalse}
+\DeclareOption{dvips}{\pxcz@enabledfalse}
+\DeclareOption{dviout}{\pxcz@enabledfalse}
+\DeclareOption{xdvi}{\pxcz@enabledfalse}
+\DeclareOption{dvipdfmx}{\pxcz@enabledtrue}
+% (no)alphabet / relfont
\DeclareOption{alphabet}{\let\pxcz@alphabet=t}
\DeclareOption{noalphabet}{\let\pxcz@alphabet=f}
\DeclareOption{relfont}{\let\pxcz@alphabet=r}
-\newif\ifpxcz@otf \pxcz@otftrue
+% (no)otf
\DeclareOption{otf}{\pxcz@otftrue}
\DeclareOption{nootf}{\pxcz@otffalse}
\DeclareOption{utf}{\pxcz@otftrue}
\DeclareOption{noutf}{\pxcz@otffalse}
-\newif\ifpxcz@cmap@alpha
+% (no)usecmapforalphabet
\DeclareOption{usecmapforalphabet}{\pxcz@cmap@alphatrue}
\DeclareOption{nousecmapforalphabet}{\pxcz@cmap@alphafalse}
-\newif\ifpxcz@mmivjis
+% (no)prefer2004jis / (no)jis2004
\DeclareOption{prefer2004jis}{\pxcz@mmivjistrue}
\DeclareOption{noprefer2004jis}{\pxcz@mmivjisfalse}
-\newif\ifpxcz@everypage
+\DeclareOption{jis2004}{\pxcz@mmivjistrue}
+\DeclareOption{nojis2004}{\pxcz@mmivjisfalse}
+% (no)everypage
\DeclareOption{everypage}{\pxcz@everypagetrue}
\DeclareOption{noeverypage}{\pxcz@everypagefalse}
-\newif\ifpxcz@oneweight
+% (no)oneweight
\DeclareOption{oneweight}{\pxcz@oneweighttrue}
\DeclareOption{nooneweight}{\pxcz@oneweightfalse}
-\newif\ifpxcz@uniquify
-\chardef\pxcz@directunicode=0
-\DeclareOption{directunicode*}{\chardef\pxcz@directunicode=2 }
-\DeclareOption{directunicode}{\chardef\pxcz@directunicode=1 }
-\DeclareOption{nodirectunicode}{\chardef\pxcz@directunicode=0 }
+% (no)directunicode / directunicode*
+\chardef\pxcz@directunicode@none=0
+\chardef\pxcz@directunicode@otf=1
+\chardef\pxcz@directunicode@all=2
+\chardef\pxcz@directunicode@full=3
+\let\pxcz@directunicode\pxcz@directunicode@none
+\DeclareOption{directunicode*}{\let\pxcz@directunicode\pxcz@directunicode@all}
+\DeclareOption{directunicode}{\let\pxcz@directunicode\pxcz@directunicode@otf}
+\DeclareOption{nodirectunicode}{\let\pxcz@directunicode\pxcz@directunicode@none}
+% (no)dumpmap
+\DeclareOption{dumpmap}{\pxcz@dumpmaptrue}
+\DeclareOption{nodumpmap}{\pxcz@dumpmapfalse}
+% (no)dumpmaptl
+\DeclareOption{dumpmaptl}{\pxcz@dumpmap@tltrue}
+\DeclareOption{nodumpmaptl}{\pxcz@dumpmap@tlfalse}
% preset spec options
\def\pxcz@all@main@preset{%
noembed,%
@@ -73,7 +126,7 @@
ms-hg,ipa-hg,ipaex-hg,moga-mobo,moga-mobo-ex,moga-maruberi,%
kozuka-pro,kozuka-pr6,kozuka-pr6n,hiragino-pro,hiragino-pron,%
hiragino-elcapitan-pro,hiragino-elcapitan-pron,%
- morisawa-pro,morisawa-pr6n,yu-win,yu-win10,yu-osx,%
+ morisawa-pro,morisawa-pr6n,yu-win,yu-win10,yu-win10+,yu-osx,%
sourcehan-otc,sourcehan,noto-otc,noto%
%(obsolete)
ipa-otf,ipa-otf-dx,kozuka4,kozuka6,kozuka6n,hiragino,%
@@ -81,7 +134,6 @@
ms-dx,ipa-ttf,ipa-ttf-dx,ipav2,ipav2-dx,ipa-dx,hiragino-dx,%
noEmbed,kozuka,hiragino-elcapitan,morisawa}
% But note, 'hiragino' != 'hiragino-pro'
-\let\pxcz@main@preset\relax
\def\pxcz@do#1{\DeclareOption{#1}{\def\pxcz@main@preset{#1}}}
\@for\pxcz@x:=\pxcz@all@main@preset\do{%
\expandafter\pxcz@do\expandafter{\pxcz@x}}
@@ -90,20 +142,21 @@
\def\pxcz@opt@@unicodeS{unicode*}
\DeclareOption*{%
\ifx\CurrentOption\pxcz@opt@@unicode
- \chardef\pxcz@directunicode=3
+ \let\pxcz@directunicode\pxcz@directunicode@full
\else\ifx\CurrentOption\pxcz@opt@@unicodeS
\pxcz@uniquifytrue
- \chardef\pxcz@directunicode=3
+ \let\pxcz@directunicode\pxcz@directunicode@full
\else
\pxcz@parse@opt\CurrentOption
\ifpxcz@ok\else \@unknownoptionerror \fi
\fi\fi}
-\let\pxcz@file@preset\relax
-\newif\ifpxcz@file@preset@tl
+\@onlypreamble\pxcz@parse@opt
\def\pxcz@parse@opt#1{%
\expandafter\pxcz@parse@opt@a#1\@nnil}
+\@onlypreamble\pxcz@parse@opt@a
\def\pxcz@parse@opt@a{%
\futurelet\pxcz@tok\pxcz@parse@opt@b}
+\@onlypreamble\pxcz@parse@opt@b
\def\pxcz@parse@opt@b{%
\pxcz@okfalse
\let\pxcz@tmpa\remove@to@nnil
@@ -112,21 +165,21 @@
\else\ifx*\pxcz@tok
\pxcz@file@preset@tlfalse \let\pxcz@tmpa\pxcz@parse@opt@c
\fi\fi \pxcz@tmpa}
+\@onlypreamble\pxcz@parse@opt@c
\def\pxcz@parse@opt@c#1#2\@nnil{%
\edef\pxcz@file@preset{#2}}
% dispatch
\ProcessOptions*
-% 'everypage' needs 'atbegshi' package
+%% 'everypage' needs 'atbegshi' package
\ifpxcz@everypage
\RequirePackage{atbegshi}
\fi
-%% \ifpxcz@alpha
+%% set 'pxcz@alpha'
\@tempswafalse
\if\pxcz@main@preset\relax
\if\pxcz@file@preset\relax \@tempswatrue \fi
\fi
-\newif\ifpxcz@alpha
\if t\pxcz@alphabet \pxcz@alphatrue
\else\if f\pxcz@alphabet \pxcz@alphafalse
\else\if r\pxcz@alphabet \pxcz@alphafalse
@@ -141,8 +194,7 @@
\pxcz@alphafalse}
\fi
-%% \ifpxcz@rel
-\newif\ifpxcz@rel
+%% set 'pxcz@rel'
\if r\pxcz@alphabet \pxcz@reltrue
\else \pxcz@relfalse
\fi
@@ -161,36 +213,36 @@
\else \pxcz@alphafontfalse
\fi\fi
-%% \ifpxcz@otf@deluxe
-\newif\ifpxcz@otf@deluxe \pxcz@otf@deluxefalse
-\@ifpackagewith{otf}{deluxe}{\pxcz@otf@deluxetrue}{}
-\@ifpackagewith{pxotf}{deluxe}{\pxcz@otf@deluxetrue}{}
-
-%% \ifpxcz@otf@multi
-\newif\ifpxcz@otf@multi \pxcz@otf@multifalse
-\@ifpackagewith{otf}{multi}{\pxcz@otf@multitrue}{}
-
-%%------------------ preset-triggered setup
+%--------------------------------------- preset-triggered setup
%% \pxcz@if@main@preset{<name>}{<code>}
+\@onlypreamble\pxcz@if@main@preset
\def\pxcz@if@main@preset#1{%
\edef\pxcz@tmpa{#1}%
\ifx\pxcz@main@preset\pxcz@tmpa \expandafter\@firstofone
\else \expandafter\@gobble
\fi}
%% setup
+\def\pxcz@preset@setup@sourcehan{%
+ \ifnum\pxcz@directunicode=\pxcz@directunicode@all \else
+ \let\pxcz@directunicode\pxcz@directunicode@full
+ \pxcz@uniquifyfalse
+ \fi}
\pxcz@if@main@preset{sourcehan}{%
- \chardef\pxcz@directunicode=3 \pxcz@uniquifyfalse}
+ \pxcz@preset@setup@sourcehan}
\pxcz@if@main@preset{sourcehan-otc}{%
- \chardef\pxcz@directunicode=3 \pxcz@uniquifyfalse}
+ \pxcz@preset@setup@sourcehan}
\pxcz@if@main@preset{noto}{%
- \chardef\pxcz@directunicode=3 \pxcz@uniquifyfalse}
+ \pxcz@preset@setup@sourcehan}
\pxcz@if@main@preset{noto-otc}{%
- \chardef\pxcz@directunicode=3 \pxcz@uniquifyfalse}
+ \pxcz@preset@setup@sourcehan}
+\pxcz@if@main@preset{yu-win10+}{%
+ \let\pxcz@directunicode\pxcz@directunicode@full
+ \pxcz@uniquifyfalse}
-%%------------------ user interface
+%--------------------------------------- user interface
-%%%%<*> \setminchofont/\setgothicfont/etc.
+%%<*> \setminchofont/\setgothicfont/etc.
\newcommand*\setminchofont{\pxcz@setfont{mnl,mnr,mnb}}
\newcommand*\setgothicfont{\pxcz@setfont{gtr,gtb,gtx,gtu}}
\newcommand*\setlightminchofont{\pxcz@setfont{mnl}}
@@ -207,8 +259,10 @@
\newcommand*\setschinesegothicfont{\pxcz@setfont{scg}}
\newcommand*\settchineseminchofont{\pxcz@setfont{tcm}}
\newcommand*\settchinesegothicfont{\pxcz@setfont{tcg}}
+\@onlypreamble\pxcz@setfont
\def\pxcz@setfont#1{\@ifnextchar[%]
{\pxcz@setfont@a{#1}}{\pxcz@setfont@a{#1}[]}}
+\@onlypreamble\pxcz@setfont@a
\def\pxcz@setfont@a#1[#2]#3{%
\@for\pxcz@x:={#1}\do{%
\ifx @#2@\@namedef{pxcz@FS/\pxcz@x}{#3}%
@@ -218,7 +272,7 @@
kom,kog,scm,scg,tcm,tcg%
}\do{\@namedef{pxcz@FS/\pxcz@x}{}}
-%%------------------ '\asUTF'
+%--------------------------------------- '\asUTF'
% NB. This feature is superseded by the \diruni command.
\ifpxcz@uptex
@@ -237,7 +291,7 @@
}
\fi
-%%------------------ fontmap internals
+%--------------------------------------- fontmap internals
%% \pxcz@noembed
% The value given to \set...font to mean 'no-embed'.
@@ -251,7 +305,7 @@
% CMap name for halfwidth fonts.
\def\pxcz@cmap@hwuni{UniJIS-UCS2-HW-H}
-%%%% <*> \usecmapforalphabet/\nousecmapforalphabet
+%%<*> \usecmapforalphabet/\nousecmapforalphabet
\def\usecmapforalphabet{%
\global\let\pxcz@cmap@uni\pxcz@cmap@hwuni}
\def\nousecmapforalphabet{%
@@ -280,33 +334,34 @@
\csname pxcz@FS/#1\endcsname}
%%<+> \JaFontReplacementHook{<code>}
+\@onlypreamble\JaFontReplacementHook
\newcommand*\JaFontReplacementHook{%
\g@addto@macro\pxcz@user@hook}
\let\pxcz@user@hook\@empty
-\@onlypreamble\JaFontReplacementHook
%%<+> \JaFontUserDefinedMap
+\@onlypreamble\JaFontUserDefinedMap
\newcommand*\JaFontUserDefinedMap{%
\g@addto@macro\pxcz@user@map}
\let\pxcz@user@map\@empty
\@namedef{pxcz@FS/*}{\pxcz@empty}
-\@onlypreamble\JaFontUserDefinedMap
%%<+> \usefontmapline{<map-line>}
+\@onlypreamble\usefontmapline
\newcommand*\usefontmapline[1]{%
\JaFontUserDefinedMap{\pxcz@addtospec@alt\pxcz@mapline{#1}}}
-\@onlypreamble\usefontmapline
%%<+> \usefontmapfile{<map-file>}
+\@onlypreamble\usefontmapfile
\newcommand*\usefontmapfile[1]{%
\JaFontUserDefinedMap{\pxcz@addtospec@alt\pxcz@mapfile{#1}}}
-\@onlypreamble\usefontmapfile
-%%------------------ map entry handling
+%--------------------------------------- map entry handling
%%<*> \setnewglyphcmapprefix{<str>}
\def\pxcz@pfx@jis@dflt{2004-}
\def\pxcz@pfx@jis@star{JISX0213-2004-}
+\@onlypreamble\setnewglyphcmapprefix
\newcommand*\setnewglyphcmapprefix{%
\@ifstar{\pxcz@set@pfx@jis\pxcz@pfx@jis@star}%
{\pxcz@set@pfx@jis}}
@@ -324,6 +379,7 @@
\let\pxcz@switch@realfont\relax
%% \pxcz@do@switch@realfont
+\@onlypreamble\pxcz@do@switch@realfont
\def\pxcz@do@switch@realfont{%
\edef\pxcz@reset@mmivjis{%
\ifpxcz@mmivjis \noexpand\pxcz@mmivjistrue
@@ -360,21 +416,34 @@
\def\pxcz@NC@otf@dif#1jp{%
#1\ifcase\pxcz@entry@type\or kr\or sc\fi}
+%% \pxcz@YW
+\def\pxcz@YW#1{%
+ \ifx#1/\expandafter\pxcz@YW@mc@dif
+ \else \expandafter\pxcz@YW@gt@dif
+ \fi}
+\def\pxcz@YW@gt@dif#1:{%
+ \ifnum\pxcz@entry@type=\tw@ :1:\else:0:\fi}
+\def\pxcz@YW@mc@dif#1.ttf{%
+ \ifnum\pxcz@entry@type=\tw@ \@nameuse{pxcz@YWG/#1}\else#1.ttf\fi}
+\@namedef{pxcz@YWG/yuminl}{:1:YuGothL.ttc}
+\@namedef{pxcz@YWG/yumin}{:1:YuGothR.ttc}
+\@namedef{pxcz@YWG/yumindb}{:1:YuGothM.ttc}
+
%% primary macros
\let\pxcz@unidirect\@empty
\let\pxcz@unidirectX\@empty
\let\pxcz@unidirect@wopt\@empty
\let\pxcz@unidirectX@wopt\@empty
\let\pxcz@unidirectX@lopt\@gobble
-\ifnum\pxcz@directunicode>\z@
+\ifnum\pxcz@directunicode<\pxcz@directunicode@otf\else
\def\pxcz@unidirect#1-#2-#3{\pxcz@cmap@directuni}
\def\pxcz@unidirect@wopt{ -w 1}
\fi
-\ifnum\pxcz@directunicode>\@ne
+\ifnum\pxcz@directunicode<\pxcz@directunicode@all\else
\let\pxcz@unidirectX\pxcz@unidirect
\let\pxcz@unidirectX@wopt\pxcz@unidirect@wopt
\fi
-\ifnum\pxcz@directunicode>\tw@
+\ifnum\pxcz@directunicode<\pxcz@directunicode@full\else
\def\pxcz@unidirectX@lopt#1{ -l #1}
\fi
%% secondary macros
@@ -392,7 +461,11 @@
\let\pxcz@entry@@fwid\pxcz@entry@@jpXX
\fi
+%% \pxcz@spec
+\let\pxcz@spec\@empty
+
%% \pxcz@addtospec{<id>}
+\@onlypreamble\pxcz@addtospec
\def\pxcz@addtospec#1{%
\bgroup \let\Entry\pxcz@Entry
\let\ \space \let\*\pxcz@pfx@jis
@@ -400,7 +473,9 @@
\let\@hwid\pxcz@entry@@hwid \let\@fwid\pxcz@entry@@fwid
\let\@jp\pxcz@entry@@jp \let\@jpXX\pxcz@entry@@jpXX
\@nameuse{pxcz@ME/#1}\egroup}
+\@onlypreamble\pxcz@Entry
\def\pxcz@Entry#1{%
+ \def\pxcz@entry@sym{#1}%
\expandafter\let\expandafter\FONT\csname pxcz@FS/#1\endcsname
\let\FONTo\FONT \let\FONTs\FONT
\ifx\FONT\pxcz@noembed
@@ -418,13 +493,28 @@
\fi\fi
\ifx\FONT\@empty \expandafter\@gobbletwo
\else \expandafter\pxcz@entry@a \fi}
+\@onlypreamble\pxcz@entry@a
\def\pxcz@entry@a#1#2{%
\chardef\pxcz@entry@type=#1\relax
- \xdef\pxcz@spec{%
- \pxcz@spec\noexpand\special{\pxcz@mapline{#2}}}}
-\let\pxcz@spec\@empty
+ \pxcz@check@entry \ifpxcz@ok
+ \xdef\pxcz@spec{%
+ \pxcz@spec\noexpand\special{\pxcz@mapline{#2}}}%
+ \fi}
+
+%% \pxcz@check@entry
+\@onlypreamble\pxcz@check@entry
+\def\pxcz@sym@@mgr{mgr}
+\def\pxcz@check@entry{%
+ \pxcz@oktrue
+ \ifnum\pxcz@entry@type=\@ne
+ \ifx\pxcz@entry@sym\pxcz@sym@@mgr
+ \expandafter\ifx\csname pxcz@FS/gtr\endcsname\relax\else
+ \pxcz@okfalse \fi
+ \fi
+ \fi}
%% \pxcz@do@file@preset
+\@onlypreamble\pxcz@do@file@preset
\def\pxcz@do@file@preset{%
\ifpxcz@file@preset@tl
\pxcz@do@file@preset@a{ptex-}%
@@ -436,6 +526,7 @@
\else
\pxcz@do@file@preset@a{}%
\fi}
+\@onlypreamble\pxcz@do@file@preset@a
\def\pxcz@do@file@preset@a#1{%
\pxcz@addtospec@alt\pxcz@mapfile{#1\pxcz@file@preset.map}}
@@ -445,14 +536,14 @@
\def\pxcz@mapfile#1{pdf:mapfile #1}
\def\pxcz@mapline#1{pdf:mapline #1}
-%%------------------ map entry definitions
+%--------------------------------------- map entry definitions
%% \pxcz@mapentry{<id>}{<text>}
\def\pxcz@mapentry#1{%
\expandafter\pxcz@mapentry@a\csname pxcz@ME/#1\endcsname}
\def\pxcz@mapentry@a#1{\@onlypreamble#1\def#1}
-%%%% map entries
+%% map entries
% \FONT: file name for the 2004JIS font
% \FONTo: file name for the 90JIS font
% \FONTs: \FONT if prefer2004jis, \FONTo otherwise
@@ -653,7 +744,7 @@
\pxcz@user@map
}
-%%------------------ '\diruni'
+%--------------------------------------- '\diruni'
%% variables
\newif\ifpxcz@diruni@ok
@@ -664,7 +755,7 @@
\@ifpackageloaded{otf}{% directunicode needs otf
\ifnum\pxcz@directunicode>\z@ \pxcz@diruni@oktrue \fi
}{%else
- \ifnum\pxcz@directunicode>\@ne
+ \ifnum\pxcz@directunicode<\pxcz@directunicode@all\else
\pxcz@diruni@oktrue % directunicode* does not need otf
\AtBeginDocument{% to laod otf later causes inconsistency
\@ifpackageloaded{otf}{\pxcz@diruni@okfalse}{}}%
@@ -799,7 +890,7 @@
\let\diruni\pxcz@err@diruni
\fi}
-%%------------------ 'alphabet' option
+%--------------------------------------- 'alphabet' option
%% \pxcz@decl@shape{<fam>}{<ser>}{<font>}
\@onlypreamble\pxcz@decl@shape
@@ -847,7 +938,7 @@
% if mnr is replaced but gtr is not then ...
\expandafter\ifx\csname pxcz@FS/gtr\endcsname\@empty
{\expandafter\let\csname pxcz@FS/gtr\endcsname\pxcz@x
- \pxcz@Entry{gtr}{r-cfjas-r-@PXcjk0@ \pxcz@cmap@uni\space \FONT}}%
+ \pxcz@Entry{gtr}1{r-cfjas-r-@PXcjk0@ \pxcz@cmap@uni\space \FONT}}%
\fi\fi
\@ifpackagewith{otf}{deluxe}{\pxcz@err@dxotf{otf}}{}%
\@ifpackagewith{pxotf}{deluxe}{\pxcz@err@dxotf{pxotf}}{}%
@@ -855,9 +946,10 @@
\fi %---- </otfdx>
\fi %---- </alphabet>
-%%------------------ begin-document hook
+%--------------------------------------- begin-document hook
-%%%% \pxcz@set@page@hook{<text>}
+%% \pxcz@set@page@hook{<text>}
+\@onlypreamble\pxcz@set@page@hook
\ifpxcz@everypage
\def\pxcz@set@page@hook#1{%
\AtBeginShipout{\setbox\AtBeginShipoutBox=\vbox{%
@@ -869,7 +961,8 @@
\global\setbox\@begindvibox\vbox{\yoko\unvbox\@begindvibox#1}}
\fi
-%%%% \AtBeginDocument
+%% the begin-document hook
+\@onlypreamble\pxcz@check@alldefined
\def\pxcz@check@alldefined#1{%
\pxcz@oktrue
\@for\pxcz@x:={#1}\do{%
@@ -919,10 +1012,23 @@
\fi
\pxcz@check@extra
\pxcz@addtospec{USR}%
- \pxcz@set@page@hook{\pxcz@spec}%
+ \ifpxcz@enabled
+ \pxcz@set@page@hook{\pxcz@spec}%
+ \else\ifx\pxcz@spec\@empty\else
+ \PackageWarningNoLine\pxcz@pkgname
+ {Font mapping is disabled, since the driver in use\MessageBreak
+ is not dvipdfmx}%
+ \fi\fi
+ \ifpxcz@dumpmap
+ \pxcz@do@dumpmap
+ \fi
+ \ifpxcz@dumpmap@tl
+ \pxcz@do@dumpmap@tl
+ \fi
}
%% \pxcz@decl@relfont
+\@onlypreamble\pxcz@decl@relfont
\def\pxcz@decl@relfont#1#2#3{%
\DeclareRelationFont{\k@encoding}{#1}{m}{}{OT1}{#2}{m}{}%
\DeclareRelationFont{\k@encoding}{#1}{bx}{}{OT1}{#2}{bx}{}%
@@ -932,24 +1038,88 @@
\pxcz@info{Relation font set for \k@encoding/#1}%
}
-%%------------------ preset japanese font mappings
+%--------------------------------------- dump font map
+% if some dumpmap is enabled...
+\ifnum 0\ifpxcz@dumpmap 1\fi
+ \ifpxcz@dumpmap@tl 1\fi >\z@
+
+%% variables
+\let\pxcz@dump@text\relax
+\let\pxcz@spec@save\relax
+\newwrite\pxcz@fout
+
+%% \pxcz@add@to@dump@text
+\def\pxcz@add@to@dump@text#1{%
+ \edef\pxcz@dump@text{\pxcz@dump@text#1}}
+
+%% \pxcz@dump@special{<string>}
+\@onlypreamble\pxcz@dump@special
+\def\pxcz@dump@special#1{%
+ \pxcz@dump@special@a#1\bxcz@end}
+\@onlypreamble\pxcz@dump@special@a
+\def\pxcz@dump@special@a#1 #2\bxcz@end{%
+ \@nameuse{pxcz@dump@special@#1}\@gobble{#2}}
+\@namedef{pxcz@dump@special@pdf:mapline}#1#2{%
+ \pxcz@add@to@dump@text{#2^^J}}
+
+%% \pxcz@dump@spec@to{<file-name>}
+\@onlypreamble\pxcz@dump@spec@to
+\def\pxcz@dump@spec@to#1{%
+ \def\pxcz@dump@text{\@percentchar\space#1^^J}%
+ \let\special\pxcz@dump@special
+ \pxcz@spec \let\special\relax
+ \pxcz@add@to@dump@text{\@percentchar\space EOF}%
+ \immediate\openout\pxcz@fout=#1\relax
+ \immediate\write\pxcz@fout{\pxcz@dump@text}%
+ \immediate\closeout\pxcz@fout}
+
+%% \pxcz@do@dumpmap
+\@onlypreamble\pxcz@do@dumpmap
+\def\pxcz@do@dumpmap{%
+ \begingroup
+ \pxcz@dump@spec@to{\jobname.map}%
+ \endgroup}
+
+%% \pxcz@do@dumpmap@tl
+\@onlypreamble\pxcz@do@dumpmap@tl
+\def\pxcz@do@dumpmap@tl{%
+ \begingroup
+ \let\pxcz@spec@save\pxcz@spec
+ \pxcz@do@dumpmap@tl@a{STD}{ptex-\jobname}%
+ \pxcz@do@dumpmap@tl@a{UPSTD}{uptex-\jobname}%
+ \pxcz@do@dumpmap@tl@a{OTF}{otf-\jobname}%
+ \pxcz@do@dumpmap@tl@a{UPOTF}{otf-up-\jobname}%
+ \global\let\pxcz@spec\pxcz@spec@save
+ \endgroup}
+\@onlypreamble\pxcz@do@dumpmap@tl@a
+\def\pxcz@do@dumpmap@tl@a#1#2{%
+ \global\let\pxcz@spec\@empty
+ \pxcz@addtospec{#1}%
+ \pxcz@dump@spec@to{#2.map}}
+
+\fi
+%--------------------------------------- preset japanese font mappings
%% \pxcz@declare@preset{<name>}{<text>}
+\@onlypreamble\pxcz@declare@preset
\def\pxcz@declare@preset#1{%
\expandafter\pxcz@decl@preset@a\csname pxcz@the@preset@#1\endcsname}
\def\pxcz@decl@preset@a#1{\@onlypreamble#1\def#1}
%% \pxcz@declare@preset@alias{<name1>}{<name2>}
+\@onlypreamble\pxcz@declare@preset@alias
\def\pxcz@declare@preset@alias#1#2{%
\expandafter\pxcz@decl@preset@alias@a\csname pxcz@the@preset@#1%
\expandafter\endcsname\csname pxcz@the@preset@#2\endcsname}
\def\pxcz@decl@preset@alias@a#1#2{\@onlypreamble#1\let#1#2}
%% \pxcz@declare@depre@preset
+\@onlypreamble\pxcz@declare@depre@preset
\def\pxcz@declare@depre@preset#1{%
\pxcz@declare@deprecated{#1}%
\pxcz@declare@preset{#1}}
%% \pxcz@declare@depre@preset@alias
+\@onlypreamble\pxcz@declare@depre@preset@alias
\def\pxcz@declare@depre@preset@alias#1{%
\pxcz@declare@deprecated{#1}%
\pxcz@declare@preset@alias{#1}}
@@ -980,7 +1150,7 @@
\fi
\csname pxcz@the@preset@#1\endcsname}
-%%%% definitions of main preset mappings
+%% definitions of main preset mappings
\pxcz@declare@preset{noembed}{%
\usecmapforalphabet
\pxcz@uniweight{Ryumin-Light}{GothicBBB-Medium}}
@@ -1071,6 +1241,10 @@
\pxcz@multiweight{yuminl.ttf}{yumin.ttf}%
{yumindb.ttf}{:0:YuGothR.ttc}{:0:YuGothB.ttc}%
{:0:YuGothB.ttc}{:0:YuGothM.ttc}{:0:YuGothM.ttc}}
+\pxcz@declare@preset{yu-win10+}{%
+ \pxcz@multiweight{\pxcz@YW/yuminl.ttf}{\pxcz@YW/yumin.ttf}%
+ {\pxcz@YW/yumindb.ttf}{\pxcz@YW:0:YuGothR.ttc}{\pxcz@YW:0:YuGothB.ttc}%
+ {\pxcz@YW:0:YuGothB.ttc}{\pxcz@YW:0:YuGothM.ttc}{\pxcz@YW:0:YuGothM.ttc}}
\pxcz@declare@preset{yu-osx}{%
\usecmapforalphabet
\pxcz@multiweight{YuMin-Medium.otf}{YuMin-Medium.otf}%
@@ -1147,11 +1321,11 @@
\pxcz@declare@preset@alias{hiragino-elcapitan}{hiragino-elcapitan-pro}
\pxcz@declare@preset@alias{morisawa}{morisawa-pro}
-%%%% ... and invokes the specified one!
+%% ... and invokes the specified one!
\if\pxcz@main@preset\relax\else
\pxcz@use@preset{\pxcz@main@preset}
\fi
-%%------------------ all done
+%--------------------------------------- all done
\endinput
%% EOF
diff --git a/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty b/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty
index 3520368fbaf..dce785b4876 100644
--- a/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty
+++ b/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty
@@ -10,7 +10,7 @@
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxjafont}[2017/05/31 v1.0]
+\ProvidesPackage{pxjafont}[2017/06/19 v1.0a]
%% show warning
\PackageWarning{pxchfon}
{The package 'pxjafont' is obsolete and its use is\MessageBreak