texlive[44641] Master/texmf-dist: pxchfon (19jun17)

commits+karl at tug.org commits+karl at tug.org
Mon Jun 19 23:08:05 CEST 2017


Revision: 44641
          http://tug.org/svn/texlive?view=revision&revision=44641
Author:   karl
Date:     2017-06-19 23:08:05 +0200 (Mon, 19 Jun 2017)
Log Message:
-----------
pxchfon (19jun17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/platex/pxchfon/README-ja.md
    trunk/Master/texmf-dist/doc/platex/pxchfon/README.md
    trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.pdf
    trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex
    trunk/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
    trunk/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty

Modified: trunk/Master/texmf-dist/doc/platex/pxchfon/README-ja.md
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/platex/pxchfon/README.md
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex
===================================================================
--- trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex	2017-06-19 21:07:53 UTC (rev 44640)
+++ trunk/Master/texmf-dist/doc/platex/pxchfon/pxchfon.tex	2017-06-19 21:08:05 UTC (rev 44641)
@@ -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 @@
 オプションは次のものが用意されている。
 
 \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 @@
     現在では、この暫定仕様は廃止されている。}
 \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 @@
   \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 @@
 \end{verbatim}\end{quote}
 \end{itemize}
 
-以下は試験的なプリセット設定である。
+なお、以上の設定で登場したフォントのうち、
+「HG丸ゴシックM-PRO」
+は欧文が等幅でないので |alphabet| オプション指定と
+ともに使うことができない。
+
+%-------------------
+\subsection{試験的なプリセット設定}
+
+以下は試験的に実装されたプリセット設定である。
+これらについては将来的な仕様変更・廃止の可能性がある
+ことに注意されたい。
 \Note 具体的な設定内容は未確定のため割愛する。
-\Note 種々の事情のため、現状の実装では日本語用の設定のために
-繁体中国語等の日本語以外のフォントも利用している。
-従って、言語別OTF版のフォントファイルを利用する場合は、
-原則的に全てのCJK言語の版を用意する必要がある。
 
 \begin{itemize}
 \item |sourcehan-otc|\Means
@@ -669,11 +711,18 @@
 
 \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 @@
 \appendix
 %===========================================================
 \section{dvipdfmx以外のDVIウェアでの使用}
+\label{sec:Other-Drivers}
 
 本パッケージの核心の機能である
 「使用フォントを文書中で指定する」
@@ -881,7 +931,7 @@
 dvipdfmx以外のDVIウェアに読ませた場合、
 フォント置換が無視され、
 そのソフトウェアで設定されたフォントで出力されるはずである。
-ただ、ソフトウェアによっては、警告やエラーが出る可能性もある。
+%ただ、ソフトウェアによっては、警告やエラーが出る可能性もある。
 
 %-------------------
 \subsection{欧文フォントも置き換えた場合(\texttt{alphabet} 指定時)}

Modified: trunk/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty	2017-06-19 21:07:53 UTC (rev 44640)
+++ trunk/Master/texmf-dist/tex/platex/pxchfon/pxchfon.sty	2017-06-19 21:08:05 UTC (rev 44641)
@@ -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 at pkgname{pxchfon}
 
-%%%% definitions
+%% preparations
 \def\pxcz at error{\PackageError\pxcz at pkgname}
 \def\pxcz at warn{\PackageWarning\pxcz at pkgname}
 \def\pxcz at info{\PackageInfo\pxcz at pkgname}
+
+%--------------------------------------- general
+
+%% variables
 \newif\ifpxcz at ok
 \newif\ifpxcz at 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 at main@preset\relax % make pxjafont bombout
   \endinput\fi}{}
 
-%%%% check for upTeX
+%% \ifpxcz at uptex
 \newif\ifpxcz at uptex \pxcz at uptexfalse
 \edef\pxcz at tmpa{\string\ucs}\edef\pxcz at tmpb{\meaning\ucs}
 \ifx\pxcz at tmpa\pxcz at tmpb \pxcz at uptextrue \fi
 
-%%%% process options
+%% \ifpxcz at otf@deluxe
+\newif\ifpxcz at otf@deluxe \pxcz at otf@deluxefalse
+\@ifpackagewith{otf}{deluxe}{\pxcz at otf@deluxetrue}{}
+\@ifpackagewith{pxotf}{deluxe}{\pxcz at otf@deluxetrue}{}
+
+%% \ifpxcz at otf@multi
+\newif\ifpxcz at otf@multi \pxcz at otf@multifalse
+\@ifpackagewith{otf}{multi}{\pxcz at otf@multitrue}{}
+
+%--------------------------------------- handle options
+
+%% variables
+\newif\ifpxcz at enabled \pxcz at enabledtrue
 \let\pxcz at alphabet=n
+\newif\ifpxcz at otf \pxcz at otftrue
+\newif\ifpxcz at cmap@alpha
+\newif\ifpxcz at mmivjis
+\newif\ifpxcz at everypage
+\newif\ifpxcz at oneweight
+\newif\ifpxcz at uniquify
+\let\pxcz at directunicode\relax
+\let\pxcz at main@preset\relax
+\let\pxcz at file@preset\relax
+\newif\ifpxcz at file@preset at tl
+\newif\ifpxcz at alpha
+\newif\ifpxcz at rel
+\newif\ifpxcz at dumpmap
+\newif\ifpxcz at dumpmap@tl
+
+%% process options
+% drivers
+\DeclareOption{nodvidriver}{\pxcz at enabledfalse}
+\DeclareOption{dvips}{\pxcz at enabledfalse}
+\DeclareOption{dviout}{\pxcz at enabledfalse}
+\DeclareOption{xdvi}{\pxcz at enabledfalse}
+\DeclareOption{dvipdfmx}{\pxcz at enabledtrue}
+% (no)alphabet / relfont
 \DeclareOption{alphabet}{\let\pxcz at alphabet=t}
 \DeclareOption{noalphabet}{\let\pxcz at alphabet=f}
 \DeclareOption{relfont}{\let\pxcz at alphabet=r}
-\newif\ifpxcz at otf \pxcz at otftrue
+% (no)otf
 \DeclareOption{otf}{\pxcz at otftrue}
 \DeclareOption{nootf}{\pxcz at otffalse}
 \DeclareOption{utf}{\pxcz at otftrue}
 \DeclareOption{noutf}{\pxcz at otffalse}
-\newif\ifpxcz at cmap@alpha
+% (no)usecmapforalphabet
 \DeclareOption{usecmapforalphabet}{\pxcz at cmap@alphatrue}
 \DeclareOption{nousecmapforalphabet}{\pxcz at cmap@alphafalse}
-\newif\ifpxcz at mmivjis
+% (no)prefer2004jis / (no)jis2004
 \DeclareOption{prefer2004jis}{\pxcz at mmivjistrue}
 \DeclareOption{noprefer2004jis}{\pxcz at mmivjisfalse}
-\newif\ifpxcz at everypage
+\DeclareOption{jis2004}{\pxcz at mmivjistrue}
+\DeclareOption{nojis2004}{\pxcz at mmivjisfalse}
+% (no)everypage
 \DeclareOption{everypage}{\pxcz at everypagetrue}
 \DeclareOption{noeverypage}{\pxcz at everypagefalse}
-\newif\ifpxcz at oneweight
+% (no)oneweight
 \DeclareOption{oneweight}{\pxcz at oneweighttrue}
 \DeclareOption{nooneweight}{\pxcz at oneweightfalse}
-\newif\ifpxcz at uniquify
-\chardef\pxcz at directunicode=0
-\DeclareOption{directunicode*}{\chardef\pxcz at directunicode=2 }
-\DeclareOption{directunicode}{\chardef\pxcz at directunicode=1 }
-\DeclareOption{nodirectunicode}{\chardef\pxcz at directunicode=0 }
+% (no)directunicode / directunicode*
+\chardef\pxcz at directunicode@none=0
+\chardef\pxcz at directunicode@otf=1
+\chardef\pxcz at directunicode@all=2
+\chardef\pxcz at directunicode@full=3
+\let\pxcz at directunicode\pxcz at directunicode@none
+\DeclareOption{directunicode*}{\let\pxcz at directunicode\pxcz at directunicode@all}
+\DeclareOption{directunicode}{\let\pxcz at directunicode\pxcz at directunicode@otf}
+\DeclareOption{nodirectunicode}{\let\pxcz at directunicode\pxcz at directunicode@none}
+% (no)dumpmap
+\DeclareOption{dumpmap}{\pxcz at dumpmaptrue}
+\DeclareOption{nodumpmap}{\pxcz at dumpmapfalse}
+% (no)dumpmaptl
+\DeclareOption{dumpmaptl}{\pxcz at dumpmap@tltrue}
+\DeclareOption{nodumpmaptl}{\pxcz at dumpmap@tlfalse}
 % preset spec options
 \def\pxcz at all@main at 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 at main@preset\relax
 \def\pxcz at do#1{\DeclareOption{#1}{\def\pxcz at main@preset{#1}}}
 \@for\pxcz at x:=\pxcz at all@main at preset\do{%
   \expandafter\pxcz at do\expandafter{\pxcz at x}}
@@ -90,20 +142,21 @@
 \def\pxcz at opt@@unicodeS{unicode*}
 \DeclareOption*{%
   \ifx\CurrentOption\pxcz at opt@@unicode
-    \chardef\pxcz at directunicode=3
+    \let\pxcz at directunicode\pxcz at directunicode@full
   \else\ifx\CurrentOption\pxcz at opt@@unicodeS
     \pxcz at uniquifytrue
-    \chardef\pxcz at directunicode=3
+    \let\pxcz at directunicode\pxcz at directunicode@full
   \else
     \pxcz at parse@opt\CurrentOption
     \ifpxcz at ok\else \@unknownoptionerror \fi
   \fi\fi}
-\let\pxcz at file@preset\relax
-\newif\ifpxcz at file@preset at tl
+\@onlypreamble\pxcz at parse@opt
 \def\pxcz at parse@opt#1{%
   \expandafter\pxcz at parse@opt at a#1\@nnil}
+\@onlypreamble\pxcz at parse@opt at a
 \def\pxcz at parse@opt at a{%
   \futurelet\pxcz at tok\pxcz at parse@opt at b}
+\@onlypreamble\pxcz at parse@opt at b
 \def\pxcz at parse@opt at b{%
   \pxcz at okfalse
   \let\pxcz at tmpa\remove at to@nnil
@@ -112,21 +165,21 @@
   \else\ifx*\pxcz at tok
     \pxcz at file@preset at tlfalse \let\pxcz at tmpa\pxcz at parse@opt at c
   \fi\fi \pxcz at tmpa}
+\@onlypreamble\pxcz at parse@opt at c
 \def\pxcz at parse@opt at c#1#2\@nnil{%
   \edef\pxcz at file@preset{#2}}
 % dispatch
 \ProcessOptions*
-% 'everypage' needs 'atbegshi' package
+%% 'everypage' needs 'atbegshi' package
 \ifpxcz at everypage
 \RequirePackage{atbegshi}
 \fi
 
-%% \ifpxcz at alpha
+%% set 'pxcz at alpha'
 \@tempswafalse
 \if\pxcz at main@preset\relax
   \if\pxcz at file@preset\relax \@tempswatrue \fi
 \fi
-\newif\ifpxcz at alpha
 \if      t\pxcz at alphabet \pxcz at alphatrue
 \else\if f\pxcz at alphabet \pxcz at alphafalse
 \else\if r\pxcz at alphabet \pxcz at alphafalse
@@ -141,8 +194,7 @@
   \pxcz at alphafalse}
 \fi
 
-%% \ifpxcz at rel
-\newif\ifpxcz at rel
+%% set 'pxcz at rel'
 \if r\pxcz at alphabet \pxcz at reltrue
 \else \pxcz at relfalse
 \fi
@@ -161,18 +213,10 @@
 \else \pxcz at alphafontfalse
 \fi\fi
 
-%% \ifpxcz at otf@deluxe
-\newif\ifpxcz at otf@deluxe \pxcz at otf@deluxefalse
-\@ifpackagewith{otf}{deluxe}{\pxcz at otf@deluxetrue}{}
-\@ifpackagewith{pxotf}{deluxe}{\pxcz at otf@deluxetrue}{}
+%--------------------------------------- preset-triggered setup
 
-%% \ifpxcz at otf@multi
-\newif\ifpxcz at otf@multi \pxcz at otf@multifalse
-\@ifpackagewith{otf}{multi}{\pxcz at otf@multitrue}{}
-
-%%------------------ preset-triggered setup
-
 %% \pxcz at if@main at preset{<name>}{<code>}
+\@onlypreamble\pxcz at if@main at preset
 \def\pxcz at if@main at preset#1{%
   \edef\pxcz at tmpa{#1}%
   \ifx\pxcz at main@preset\pxcz at tmpa \expandafter\@firstofone
@@ -179,18 +223,26 @@
   \else \expandafter\@gobble
   \fi}
 %% setup
+\def\pxcz at preset@setup at sourcehan{%
+  \ifnum\pxcz at directunicode=\pxcz at directunicode@all \else
+    \let\pxcz at directunicode\pxcz at directunicode@full
+    \pxcz at uniquifyfalse
+  \fi}
 \pxcz at if@main at preset{sourcehan}{%
-  \chardef\pxcz at directunicode=3 \pxcz at uniquifyfalse}
+  \pxcz at preset@setup at sourcehan}
 \pxcz at if@main at preset{sourcehan-otc}{%
-  \chardef\pxcz at directunicode=3 \pxcz at uniquifyfalse}
+  \pxcz at preset@setup at sourcehan}
 \pxcz at if@main at preset{noto}{%
-  \chardef\pxcz at directunicode=3 \pxcz at uniquifyfalse}
+  \pxcz at preset@setup at sourcehan}
 \pxcz at if@main at preset{noto-otc}{%
-  \chardef\pxcz at directunicode=3 \pxcz at uniquifyfalse}
+  \pxcz at preset@setup at sourcehan}
+\pxcz at if@main at preset{yu-win10+}{%
+  \let\pxcz at directunicode\pxcz at directunicode@full
+  \pxcz at uniquifyfalse}
 
-%%------------------ user interface
+%--------------------------------------- user interface
 
-%%%%<*> \setminchofont/\setgothicfont/etc.
+%%<*> \setminchofont/\setgothicfont/etc.
 \newcommand*\setminchofont{\pxcz at setfont{mnl,mnr,mnb}}
 \newcommand*\setgothicfont{\pxcz at setfont{gtr,gtb,gtx,gtu}}
 \newcommand*\setlightminchofont{\pxcz at setfont{mnl}}
@@ -207,8 +259,10 @@
 \newcommand*\setschinesegothicfont{\pxcz at setfont{scg}}
 \newcommand*\settchineseminchofont{\pxcz at setfont{tcm}}
 \newcommand*\settchinesegothicfont{\pxcz at setfont{tcg}}
+\@onlypreamble\pxcz at setfont
 \def\pxcz at setfont#1{\@ifnextchar[%]
   {\pxcz at setfont@a{#1}}{\pxcz at setfont@a{#1}[]}}
+\@onlypreamble\pxcz at setfont@a
 \def\pxcz at setfont@a#1[#2]#3{%
   \@for\pxcz at x:={#1}\do{%
     \ifx @#2@\@namedef{pxcz at FS/\pxcz at x}{#3}%
@@ -218,7 +272,7 @@
   kom,kog,scm,scg,tcm,tcg%
 }\do{\@namedef{pxcz at FS/\pxcz at x}{}}
 
-%%------------------ '\asUTF'
+%--------------------------------------- '\asUTF'
 % NB. This feature is superseded by the \diruni command.
 \ifpxcz at uptex
 
@@ -237,7 +291,7 @@
 }
 
 \fi
-%%------------------ fontmap internals
+%--------------------------------------- fontmap internals
 
 %% \pxcz at noembed
 % The value given to \set...font to mean 'no-embed'.
@@ -251,7 +305,7 @@
 % CMap name for halfwidth fonts.
 \def\pxcz at cmap@hwuni{UniJIS-UCS2-HW-H}
 
-%%%% <*> \usecmapforalphabet/\nousecmapforalphabet
+%%<*> \usecmapforalphabet/\nousecmapforalphabet
 \def\usecmapforalphabet{%
   \global\let\pxcz at cmap@uni\pxcz at cmap@hwuni}
 \def\nousecmapforalphabet{%
@@ -280,33 +334,34 @@
   \csname pxcz at FS/#1\endcsname}
 
 %%<+> \JaFontReplacementHook{<code>}
+\@onlypreamble\JaFontReplacementHook
 \newcommand*\JaFontReplacementHook{%
   \g at addto@macro\pxcz at user@hook}
 \let\pxcz at user@hook\@empty
-\@onlypreamble\JaFontReplacementHook
 
 %%<+> \JaFontUserDefinedMap
+\@onlypreamble\JaFontUserDefinedMap
 \newcommand*\JaFontUserDefinedMap{%
   \g at addto@macro\pxcz at user@map}
 \let\pxcz at user@map\@empty
 \@namedef{pxcz at FS/*}{\pxcz at empty}
-\@onlypreamble\JaFontUserDefinedMap
 
 %%<+> \usefontmapline{<map-line>}
+\@onlypreamble\usefontmapline
 \newcommand*\usefontmapline[1]{%
   \JaFontUserDefinedMap{\pxcz at addtospec@alt\pxcz at mapline{#1}}}
-\@onlypreamble\usefontmapline
 
 %%<+> \usefontmapfile{<map-file>}
+\@onlypreamble\usefontmapfile
 \newcommand*\usefontmapfile[1]{%
   \JaFontUserDefinedMap{\pxcz at addtospec@alt\pxcz at mapfile{#1}}}
-\@onlypreamble\usefontmapfile
 
-%%------------------ map entry handling
+%--------------------------------------- map entry handling
 
 %%<*> \setnewglyphcmapprefix{<str>}
 \def\pxcz at pfx@jis at dflt{2004-}
 \def\pxcz at pfx@jis at star{JISX0213-2004-}
+\@onlypreamble\setnewglyphcmapprefix
 \newcommand*\setnewglyphcmapprefix{%
   \@ifstar{\pxcz at set@pfx at jis\pxcz at pfx@jis at star}%
    {\pxcz at set@pfx at jis}}
@@ -324,6 +379,7 @@
 \let\pxcz at switch@realfont\relax
 
 %% \pxcz at do@switch at realfont
+\@onlypreamble\pxcz at do@switch at realfont
 \def\pxcz at do@switch at realfont{%
   \edef\pxcz at reset@mmivjis{%
     \ifpxcz at mmivjis \noexpand\pxcz at mmivjistrue
@@ -360,6 +416,19 @@
 \def\pxcz at NC@otf at dif#1jp{%
   #1\ifcase\pxcz at entry@type\or kr\or sc\fi}
 
+%% \pxcz at YW
+\def\pxcz at YW#1{%
+  \ifx#1/\expandafter\pxcz at YW@mc at dif
+  \else \expandafter\pxcz at YW@gt at dif
+  \fi}
+\def\pxcz at YW@gt at dif#1:{%
+  \ifnum\pxcz at entry@type=\tw@ :1:\else:0:\fi}
+\def\pxcz at YW@mc at dif#1.ttf{%
+  \ifnum\pxcz at entry@type=\tw@ \@nameuse{pxcz at YWG/#1}\else#1.ttf\fi}
+\@namedef{pxcz at YWG/yuminl}{:1:YuGothL.ttc}
+\@namedef{pxcz at YWG/yumin}{:1:YuGothR.ttc}
+\@namedef{pxcz at YWG/yumindb}{:1:YuGothM.ttc}
+
 %% primary macros
 \let\pxcz at unidirect\@empty
 \let\pxcz at unidirectX\@empty
@@ -366,15 +435,15 @@
 \let\pxcz at unidirect@wopt\@empty
 \let\pxcz at unidirectX@wopt\@empty
 \let\pxcz at unidirectX@lopt\@gobble
-\ifnum\pxcz at directunicode>\z@
+\ifnum\pxcz at directunicode<\pxcz at directunicode@otf\else
 \def\pxcz at unidirect#1-#2-#3{\pxcz at cmap@directuni}
 \def\pxcz at unidirect@wopt{ -w 1}
 \fi
-\ifnum\pxcz at directunicode>\@ne
+\ifnum\pxcz at directunicode<\pxcz at directunicode@all\else
 \let\pxcz at unidirectX\pxcz at unidirect
 \let\pxcz at unidirectX@wopt\pxcz at unidirect@wopt
 \fi
-\ifnum\pxcz at directunicode>\tw@
+\ifnum\pxcz at directunicode<\pxcz at directunicode@full\else
 \def\pxcz at unidirectX@lopt#1{ -l #1}
 \fi
 %% secondary macros
@@ -392,7 +461,11 @@
 \let\pxcz at entry@@fwid\pxcz at entry@@jpXX
 \fi
 
+%% \pxcz at spec
+\let\pxcz at spec\@empty
+
 %% \pxcz at addtospec{<id>}
+\@onlypreamble\pxcz at addtospec
 \def\pxcz at addtospec#1{%
   \bgroup \let\Entry\pxcz at Entry
     \let\ \space \let\*\pxcz at pfx@jis
@@ -400,7 +473,9 @@
     \let\@hwid\pxcz at entry@@hwid \let\@fwid\pxcz at entry@@fwid
     \let\@jp\pxcz at entry@@jp \let\@jpXX\pxcz at entry@@jpXX
     \@nameuse{pxcz at ME/#1}\egroup}
+\@onlypreamble\pxcz at Entry
 \def\pxcz at Entry#1{%
+  \def\pxcz at entry@sym{#1}%
   \expandafter\let\expandafter\FONT\csname pxcz at FS/#1\endcsname
   \let\FONTo\FONT \let\FONTs\FONT
   \ifx\FONT\pxcz at noembed
@@ -418,13 +493,28 @@
   \fi\fi
   \ifx\FONT\@empty \expandafter\@gobbletwo
   \else \expandafter\pxcz at entry@a \fi}
+\@onlypreamble\pxcz at entry@a
 \def\pxcz at entry@a#1#2{%
   \chardef\pxcz at entry@type=#1\relax
-  \xdef\pxcz at spec{%
-    \pxcz at spec\noexpand\special{\pxcz at mapline{#2}}}}
-\let\pxcz at spec\@empty
+  \pxcz at check@entry \ifpxcz at ok
+    \xdef\pxcz at spec{%
+      \pxcz at spec\noexpand\special{\pxcz at mapline{#2}}}%
+  \fi}
 
+%% \pxcz at check@entry
+\@onlypreamble\pxcz at check@entry
+\def\pxcz at sym@@mgr{mgr}
+\def\pxcz at check@entry{%
+  \pxcz at oktrue
+  \ifnum\pxcz at entry@type=\@ne
+    \ifx\pxcz at entry@sym\pxcz at sym@@mgr
+      \expandafter\ifx\csname pxcz at FS/gtr\endcsname\relax\else
+        \pxcz at okfalse \fi
+    \fi
+  \fi}
+
 %% \pxcz at do@file at preset
+\@onlypreamble\pxcz at do@file at preset
 \def\pxcz at do@file at preset{%
   \ifpxcz at file@preset at tl
     \pxcz at do@file at preset@a{ptex-}%
@@ -436,6 +526,7 @@
   \else
     \pxcz at do@file at preset@a{}%
   \fi}
+\@onlypreamble\pxcz at do@file at preset@a
 \def\pxcz at do@file at preset@a#1{%
   \pxcz at addtospec@alt\pxcz at mapfile{#1\pxcz at file@preset.map}}
 
@@ -445,7 +536,7 @@
 \def\pxcz at mapfile#1{pdf:mapfile #1}
 \def\pxcz at mapline#1{pdf:mapline #1}
 
-%%------------------ map entry definitions
+%--------------------------------------- map entry definitions
 
 %% \pxcz at mapentry{<id>}{<text>}
 \def\pxcz at mapentry#1{%
@@ -452,7 +543,7 @@
   \expandafter\pxcz at mapentry@a\csname pxcz at ME/#1\endcsname}
 \def\pxcz at 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 at user@map
 }
 
-%%------------------ '\diruni'
+%--------------------------------------- '\diruni'
 
 %% variables
 \newif\ifpxcz at diruni@ok
@@ -664,7 +755,7 @@
   \@ifpackageloaded{otf}{% directunicode needs otf
     \ifnum\pxcz at directunicode>\z@ \pxcz at diruni@oktrue \fi
   }{%else
-    \ifnum\pxcz at directunicode>\@ne
+    \ifnum\pxcz at directunicode<\pxcz at directunicode@all\else
       \pxcz at diruni@oktrue % directunicode* does not need otf
       \AtBeginDocument{% to laod otf later causes inconsistency
         \@ifpackageloaded{otf}{\pxcz at diruni@okfalse}{}}%
@@ -799,7 +890,7 @@
     \let\diruni\pxcz at err@diruni
   \fi}
 
-%%------------------ 'alphabet' option
+%--------------------------------------- 'alphabet' option
 
 %% \pxcz at decl@shape{<fam>}{<ser>}{<font>}
 \@onlypreamble\pxcz at decl@shape
@@ -847,7 +938,7 @@
     % if mnr is replaced but gtr is not then ...
     \expandafter\ifx\csname pxcz at FS/gtr\endcsname\@empty
       {\expandafter\let\csname pxcz at FS/gtr\endcsname\pxcz at x
-        \pxcz at Entry{gtr}{r-cfjas-r- at PXcjk0@ \pxcz at cmap@uni\space \FONT}}%
+        \pxcz at Entry{gtr}1{r-cfjas-r- at PXcjk0@ \pxcz at cmap@uni\space \FONT}}%
   \fi\fi
   \@ifpackagewith{otf}{deluxe}{\pxcz at err@dxotf{otf}}{}%
   \@ifpackagewith{pxotf}{deluxe}{\pxcz at err@dxotf{pxotf}}{}%
@@ -855,9 +946,10 @@
 \fi                 %---- </otfdx>
 \fi                 %---- </alphabet>
 
-%%------------------ begin-document hook
+%--------------------------------------- begin-document hook
 
-%%%% \pxcz at set@page at hook{<text>}
+%% \pxcz at set@page at hook{<text>}
+\@onlypreamble\pxcz at set@page at hook
 \ifpxcz at everypage
 \def\pxcz at set@page at 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 at check@alldefined
 \def\pxcz at check@alldefined#1{%
   \pxcz at oktrue
   \@for\pxcz at x:={#1}\do{%
@@ -919,10 +1012,23 @@
   \fi
   \pxcz at check@extra
   \pxcz at addtospec{USR}%
-  \pxcz at set@page at hook{\pxcz at spec}%
+  \ifpxcz at enabled
+    \pxcz at set@page at hook{\pxcz at spec}%
+  \else\ifx\pxcz at spec\@empty\else
+    \PackageWarningNoLine\pxcz at pkgname
+     {Font mapping is disabled, since the driver in use\MessageBreak
+      is not dvipdfmx}%
+  \fi\fi
+  \ifpxcz at dumpmap
+    \pxcz at do@dumpmap
+  \fi
+  \ifpxcz at dumpmap@tl
+    \pxcz at do@dumpmap at tl
+  \fi
 }
 
 %% \pxcz at decl@relfont
+\@onlypreamble\pxcz at decl@relfont
 \def\pxcz at decl@relfont#1#2#3{%
   \DeclareRelationFont{\k at encoding}{#1}{m}{}{OT1}{#2}{m}{}%
   \DeclareRelationFont{\k at encoding}{#1}{bx}{}{OT1}{#2}{bx}{}%
@@ -932,14 +1038,76 @@
   \pxcz at info{Relation font set for \k at encoding/#1}%
 }
 
-%%------------------ preset japanese font mappings
+%--------------------------------------- dump font map
+% if some dumpmap is enabled...
+\ifnum 0\ifpxcz at dumpmap 1\fi
+        \ifpxcz at dumpmap@tl 1\fi >\z@
 
+%% variables
+\let\pxcz at dump@text\relax
+\let\pxcz at spec@save\relax
+\newwrite\pxcz at fout
+
+%% \pxcz at add@to at dump@text
+\def\pxcz at add@to at dump@text#1{%
+  \edef\pxcz at dump@text{\pxcz at dump@text#1}}
+
+%% \pxcz at dump@special{<string>}
+\@onlypreamble\pxcz at dump@special
+\def\pxcz at dump@special#1{%
+  \pxcz at dump@special at a#1\bxcz at end}
+\@onlypreamble\pxcz at dump@special at a
+\def\pxcz at dump@special at a#1 #2\bxcz at end{%
+  \@nameuse{pxcz at dump@special@#1}\@gobble{#2}}
+\@namedef{pxcz at dump@special at pdf:mapline}#1#2{%
+  \pxcz at add@to at dump@text{#2^^J}}
+
+%% \pxcz at dump@spec at to{<file-name>}
+\@onlypreamble\pxcz at dump@spec at to
+\def\pxcz at dump@spec at to#1{%
+  \def\pxcz at dump@text{\@percentchar\space#1^^J}%
+  \let\special\pxcz at dump@special
+  \pxcz at spec \let\special\relax
+  \pxcz at add@to at dump@text{\@percentchar\space EOF}%
+  \immediate\openout\pxcz at fout=#1\relax
+  \immediate\write\pxcz at fout{\pxcz at dump@text}%
+  \immediate\closeout\pxcz at fout}
+
+%% \pxcz at do@dumpmap
+\@onlypreamble\pxcz at do@dumpmap
+\def\pxcz at do@dumpmap{%
+  \begingroup
+    \pxcz at dump@spec at to{\jobname.map}%
+  \endgroup}
+
+%% \pxcz at do@dumpmap at tl
+\@onlypreamble\pxcz at do@dumpmap at tl
+\def\pxcz at do@dumpmap at tl{%
+  \begingroup
+    \let\pxcz at spec@save\pxcz at spec
+    \pxcz at do@dumpmap at tl@a{STD}{ptex-\jobname}%
+    \pxcz at do@dumpmap at tl@a{UPSTD}{uptex-\jobname}%
+    \pxcz at do@dumpmap at tl@a{OTF}{otf-\jobname}%
+    \pxcz at do@dumpmap at tl@a{UPOTF}{otf-up-\jobname}%
+    \global\let\pxcz at spec\pxcz at spec@save
+  \endgroup}
+\@onlypreamble\pxcz at do@dumpmap at tl@a
+\def\pxcz at do@dumpmap at tl@a#1#2{%
+  \global\let\pxcz at spec\@empty
+  \pxcz at addtospec{#1}%
+  \pxcz at dump@spec at to{#2.map}}
+
+\fi
+%--------------------------------------- preset japanese font mappings
+
 %% \pxcz at declare@preset{<name>}{<text>}
+\@onlypreamble\pxcz at declare@preset
 \def\pxcz at declare@preset#1{%
   \expandafter\pxcz at decl@preset at a\csname pxcz at the@preset@#1\endcsname}
 \def\pxcz at decl@preset at a#1{\@onlypreamble#1\def#1}
 
 %% \pxcz at declare@preset at alias{<name1>}{<name2>}
+\@onlypreamble\pxcz at declare@preset at alias
 \def\pxcz at declare@preset at alias#1#2{%
   \expandafter\pxcz at decl@preset at alias@a\csname pxcz at the@preset@#1%
   \expandafter\endcsname\csname pxcz at the@preset@#2\endcsname}
@@ -946,10 +1114,12 @@
 \def\pxcz at decl@preset at alias@a#1#2{\@onlypreamble#1\let#1#2}
 
 %% \pxcz at declare@depre at preset
+\@onlypreamble\pxcz at declare@depre at preset
 \def\pxcz at declare@depre at preset#1{%
   \pxcz at declare@deprecated{#1}%
   \pxcz at declare@preset{#1}}
 %% \pxcz at declare@depre at preset@alias
+\@onlypreamble\pxcz at declare@depre at preset@alias
 \def\pxcz at declare@depre at preset@alias#1{%
   \pxcz at declare@deprecated{#1}%
   \pxcz at declare@preset at alias{#1}}
@@ -980,7 +1150,7 @@
   \fi
   \csname pxcz at the@preset@#1\endcsname}
 
-%%%% definitions of main preset mappings
+%% definitions of main preset mappings
 \pxcz at declare@preset{noembed}{%
   \usecmapforalphabet
   \pxcz at uniweight{Ryumin-Light}{GothicBBB-Medium}}
@@ -1071,6 +1241,10 @@
   \pxcz at multiweight{yuminl.ttf}{yumin.ttf}%
    {yumindb.ttf}{:0:YuGothR.ttc}{:0:YuGothB.ttc}%
    {:0:YuGothB.ttc}{:0:YuGothM.ttc}{:0:YuGothM.ttc}}
+\pxcz at declare@preset{yu-win10+}{%
+  \pxcz at multiweight{\pxcz at YW/yuminl.ttf}{\pxcz at YW/yumin.ttf}%
+   {\pxcz at YW/yumindb.ttf}{\pxcz at YW:0:YuGothR.ttc}{\pxcz at YW:0:YuGothB.ttc}%
+   {\pxcz at YW:0:YuGothB.ttc}{\pxcz at YW:0:YuGothM.ttc}{\pxcz at YW:0:YuGothM.ttc}}
 \pxcz at declare@preset{yu-osx}{%
   \usecmapforalphabet
   \pxcz at multiweight{YuMin-Medium.otf}{YuMin-Medium.otf}%
@@ -1147,11 +1321,11 @@
 \pxcz at declare@preset at alias{hiragino-elcapitan}{hiragino-elcapitan-pro}
 \pxcz at declare@preset at alias{morisawa}{morisawa-pro}
 
-%%%% ... and invokes the specified one!
+%% ... and invokes the specified one!
 \if\pxcz at main@preset\relax\else
 \pxcz at use@preset{\pxcz at main@preset}
 \fi
 
-%%------------------ all done
+%--------------------------------------- all done
 \endinput
 %% EOF

Modified: trunk/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty	2017-06-19 21:07:53 UTC (rev 44640)
+++ trunk/Master/texmf-dist/tex/platex/pxchfon/pxjafont.sty	2017-06-19 21:08:05 UTC (rev 44641)
@@ -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



More information about the tex-live-commits mailing list