summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/platex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-06 21:26:34 +0000
committerKarl Berry <karl@freefriends.org>2017-07-06 21:26:34 +0000
commitf691078fbf5a14c2afb87e0a2598f0654c4bf8e1 (patch)
tree7dda89680ea4c6a61c01308a9033c786b2eb8341 /Master/texmf-dist/tex/platex
parent201746f75cb68b0737d5ae9c77c1b4719cb30881 (diff)
pxbase (6jul17)
git-svn-id: svn://tug.org/texlive/trunk@44756 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/platex')
-rw-r--r--Master/texmf-dist/tex/platex/pxbase/pxbabel.sty59
-rw-r--r--Master/texmf-dist/tex/platex/pxbase/pxbase.sty2
-rw-r--r--Master/texmf-dist/tex/platex/pxbase/pxbasenc.def16
-rw-r--r--Master/texmf-dist/tex/platex/pxbase/pxjsfenc.def2
4 files changed, 65 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/platex/pxbase/pxbabel.sty b/Master/texmf-dist/tex/platex/pxbase/pxbabel.sty
index 7c1f1fd3e34..3f0ab85d309 100644
--- a/Master/texmf-dist/tex/platex/pxbase/pxbabel.sty
+++ b/Master/texmf-dist/tex/platex/pxbase/pxbabel.sty
@@ -10,7 +10,7 @@
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxbabel}[2017/06/19 v1.1a PX Babel interface for CJK]
+\ProvidesPackage{pxbabel}[2017/07/03 v1.1b PX Babel interface for CJK]
\def\pxbb@pkgname{pxbabel}
%--------------------------------------- general
@@ -23,11 +23,6 @@
%% error messages
\bxSetModuleName\pxbb@pkgname
-\def\pxbb@eha{\MessageBreak I aborted loading it.}
-\bxPreamble\def\pxbb@err@nobbl{%
- \PackageError\pxbb@pkgname
- {babel is not yet loaded, load aborted}%
- {This package must be loaded after babel package.}}
\bxPreamble\def\pxbb@warn@nocjk{%
\PackageWarningNoLine\pxbb@pkgname
{No multi-CJK support found, font switch disabled\MessageBreak
@@ -35,7 +30,21 @@
\bxPreamble\def\pxbb@err@noldf#1{%
\PackageError\pxbb@pkgname
{Language definition file #1.ldf not found}%
- {Maybe you misspelled the language option?}}
+ {Maybe you misspelled the language option?\MessageBreak\@ehc}}
+\bxPreamble\def\pxbb@err@nomnl{%
+ \PackageError\pxbb@pkgname
+ {Main language is not specified}%
+ {Here 'japanese' is assumed.\MessageBreak\@ehc}}
+\bxPreamble\def\pxbb@warn@jafam#1{%
+ \PackageWarningNoLine\pxbb@pkgname
+ {!!!!!!!!!!!!!!! IMPORTANT NOTICE !!!!!!!!!!!!!!!\MessageBreak
+ Default Japanese family names have been changed\MessageBreak
+ after this package was loaded. The functionality\MessageBreak
+ of the package may be corrupted!\MessageBreak
+ \if t#1%
+ (You must load 'otf' package before this package.)\MessageBreak
+ \fi
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}}
%--------------------------------------- Processing package options
@@ -84,7 +93,12 @@
\DeclareOption{noprefer2004jis}{\pxbb@prefermmivjisfalse}
\DeclareOption{jis2004}{\pxbb@prefermmivjistrue}
\DeclareOption{nojis2004}{\pxbb@prefermmivjisfalse}
+\newbool{pxbb@stdjaencoding}
+\bxIfExpToEqualX{\mcdefault}{mc}{}{\pxbb@stdjaencodingtrue}% default
+\DeclareOption{stdjaencoding}{\pxbb@stdjaencodingtrue}
+\DeclareOption{nostdjaencoding}{\pxbb@stdjaencodingfalse}
% (<lang_id>, +<lang_id>)
+\bxPreamble\let\pxbb@last@lang\relax
\bxForEachIn\pxbb@cjk@langid@list\do{%
\DeclareOption{#1}{%
\pxbb@set@lang@spec{#1}{#1}%
@@ -138,6 +152,11 @@
% in lumped loading, main is the one specified last
{\let\pxbb@main@lang\pxbb@last@lang}%
}{}
+% if main is unknown, complain
+\ifx\pxbb@main@lang\relax
+ \pxbb@err@nomnl
+ \letcs\pxbb@main@lang{pxbb@langname/japanese}
+\fi
%% resolve the caption language setting
\bxIfExpToEqual{\pxbb@caption@lang}{auto}{%then
@@ -297,6 +316,11 @@
\pxbb@addtoextras@otf@a{cjkmulti}{\UTFM}
\fi % pxbb@switchfont
+%%<*> \pxUTFJ/\UTFJ
+\let\pxUTFJ\UTF
+\AtBeginDocument{%
+ \providecommand*\UTFJ{\pxUTFJ}}
+
\fi %----</otfmulti>
\ifupTeX %----<*upTeX>
@@ -319,6 +343,14 @@
\pxDeclareBasicCJKEncoding{J23}{J33}% UniCNS
\pxDeclareBasicCJKFamily{J23}{!uptchrm-h}{!uptchgt-h}{*gt}{*gt}
\pxDeclareBasicCJKFamily{J33}{!uptchrm-v}{!uptchgt-v}{*gt}{*gt}
+\pxDeclareBasicCJKEncoding{J24}{J34}% UniJIS2004
+\pxDeclareBasicCJKFamily{J24}{!upjpnrm-h}{!upjpngt-h}{*gt}{*gt}
+\pxDeclareBasicCJKFamily{J34}{!upjpnrm-v}{!upjpngt-v}{*gt}{*gt}
+\begingroup \let\pxForceFontDeclaration=f
+\bxForEachIn{J20,J30,J21,J31,J22,J32,J23,J33,J24,J34}\do{%
+ \pxDeclareExtraCJKFamily{#1}{\mcdefault}{*mc}{*mc}%
+ \pxDeclareExtraCJKFamily{#1}{\gtdefault}{*gt}{*gt}}
+\endgroup
\fi
%--------------------------------------- add font switch to Babel \extras
@@ -329,7 +361,8 @@
\bxForEachIn{J20,J24}\do{% all full japanese encodings
\csdef{pxbb@is@fje/#1}{t}}
\edef\pxbb@dflt@ja@enc{% default full japanese encoding
- \ifbool{pxbb@prefermmivjis}{J24}{J20}}
+ \ifbool{pxbb@stdjaencoding}{\cy@encoding}{%else
+ \ifbool{pxbb@prefermmivjis}{J24}{J20}}}
\def\pxbb@set@full@ja@enc{%
\edef\pxbb@full@ja@enc{%
\bxIfcsundefX{pxbb@is@fje/\cy@encoding}%
@@ -368,6 +401,16 @@
\newcommand*\cjklanguagename[1]{%
\@nameuse{pxbb@langname/#1}}
+%--------------------------------------- integrity check
+
+%% check if \mcdefault is not changed
+\let\pxbb@tunc@mcdefault\mcdefault
+\AtBeginDocument{%
+ \bxIfExpToEqualX\pxbb@tunc@mcdefault\mcdefault{}{%else
+ \bxIfExpToEqualX\mcdefault{hmc}%
+ {\pxbb@warn@jafam{t}}%
+ {\pxbb@warn@jafam{f}}}}
+
%--------------------------------------- all done
\endinput
%
diff --git a/Master/texmf-dist/tex/platex/pxbase/pxbase.sty b/Master/texmf-dist/tex/platex/pxbase/pxbase.sty
index 2393933389f..e10ec1c6e20 100644
--- a/Master/texmf-dist/tex/platex/pxbase/pxbase.sty
+++ b/Master/texmf-dist/tex/platex/pxbase/pxbase.sty
@@ -8,7 +8,7 @@
%% This package is distributed under the MIT License.
%%
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxbase}[2017/06/19 v1.1a PX base library]
+\ProvidesPackage{pxbase}[2017/07/03 v1.1b PX base library]
% The pxbase package now does the same thing as the bxbase package.
\RequirePackageWithOptions{bxbase}[2017/05/29]
\endinput
diff --git a/Master/texmf-dist/tex/platex/pxbase/pxbasenc.def b/Master/texmf-dist/tex/platex/pxbase/pxbasenc.def
index 64709af2b9c..55f1ac1130d 100644
--- a/Master/texmf-dist/tex/platex/pxbase/pxbasenc.def
+++ b/Master/texmf-dist/tex/platex/pxbase/pxbasenc.def
@@ -4,7 +4,7 @@
%% file declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesFile{pxbasenc.def}[2017/06/19 v1.1a PX encoding library]
+\ProvidesFile{pxbasenc.def}[2017/07/03 v1.1b PX encoding library]
\def\pxec@pkgname{PXbase} % bundle name
%% code guards
@@ -136,7 +136,7 @@
\pxec@starinvoke\pxec@DeclareExtraCJKFamily}
\@onlypreamble\pxec@DeclareBasicCJKFamily
\def\pxec@DeclareExtraCJKFamily#1#2#3#4{%
- \DeclareKanjiFamily{#1}{#2}{}%
+ \pxDeclareKanjiFamily{#1}{#2}%
\pxec@DeclareBasicCJKShape{#1}{#2}{m}{#3}%
\pxec@DeclareBasicCJKShape{#1}{#2}{bx}{#4}}
@@ -229,6 +229,14 @@
% It should be t except when other values are needed.
\let\pxForceFontDeclaration=t
+%%<+> \pxDeclareKanjiFamily{<enc>}{<fam>}
+\def\pxDeclareKanjiFamily#1#2{%
+ \expandafter\ifx\csname#1+#2\endcsname\relax
+ \DeclareKanjiFamily{#1}{#2}{}%
+ \else\if e\pxForceFontDeclaration
+ \pxec@error{Font family #1/#2 already defined}\@ehc
+ \fi\fi}
+
%%<+> \pxDeclareFontShape{<enc>}{<fam>}{<ser>}{<shape>}{<spec>}
\def\pxDeclareFontShape#1#2#3#4#5{%
\expandafter\ifx\csname #1/#2/#3/#4\endcsname\relax
@@ -308,10 +316,10 @@
\@onlypreamble\pxec@DeclareBasicCJKFamilyNE
\def\pxec@DeclareExtraCJKFamilyNE#1#2#3#4#5#6{%
\pxBothEncodingsFromName\pxec@y\pxec@t{#1}%
- \DeclareKanjiFamily{\pxec@y}{#2}{}%
+ \pxDeclareKanjiFamily{\pxec@y}{#2}%
\pxec@DeclareBasicCJKShape{\pxec@y}{#2}{m}{#3}%
\pxec@DeclareBasicCJKShape{\pxec@y}{#2}{bx}{#4}%
- \DeclareKanjiFamily{\pxec@t}{#2}{}%
+ \pxDeclareKanjiFamily{\pxec@t}{#2}%
\pxec@supdef\pxec@vm{#5}{#3}\pxec@supdef\pxec@vb{#6}{#4}%
\pxec@DeclareBasicCJKShape{\pxec@t}{#2}{m}{\pxec@vm}%
\pxec@DeclareBasicCJKShape{\pxec@t}{#2}{bx}{\pxec@vb}}
diff --git a/Master/texmf-dist/tex/platex/pxbase/pxjsfenc.def b/Master/texmf-dist/tex/platex/pxbase/pxjsfenc.def
index 7a612f2c360..0fc28f2e81f 100644
--- a/Master/texmf-dist/tex/platex/pxbase/pxjsfenc.def
+++ b/Master/texmf-dist/tex/platex/pxbase/pxjsfenc.def
@@ -4,7 +4,7 @@
%% file declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesFile{pxjsfenc.def}[2017/06/19 v1.1a PX JSF encoding]
+\ProvidesFile{pxjsfenc.def}[2017/07/03 v1.1b PX JSF encoding]
%% code guards
\edef\pxec@jsf@restore@codes{%