diff options
Diffstat (limited to 'Master/texmf-dist/tex/platex/base/platexrelease.sty')
-rw-r--r-- | Master/texmf-dist/tex/platex/base/platexrelease.sty | 871 |
1 files changed, 816 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/platex/base/platexrelease.sty b/Master/texmf-dist/tex/platex/base/platexrelease.sty index 8710e500eb0..4199b306e55 100644 --- a/Master/texmf-dist/tex/platex/base/platexrelease.sty +++ b/Master/texmf-dist/tex/platex/base/platexrelease.sty @@ -18,7 +18,7 @@ \edef\p@known@latexreleaseversion {2020-02-02} \edef\platexreleaseversion - {2020-02-02} + {2020-04-12} \newif\if@plincludeinrelease \@plincludeinreleasefalse \def\plIncludeInRelease#1{% @@ -69,8 +69,16 @@ %% File: platexrelease.dtx \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{platexrelease} - [2018/05/22 v1.0m latexrelease support for pLaTeX Kernel + [2020/03/28 v1.0n latexrelease support for pLaTeX Kernel (including releases up to \platexreleaseversion)] +\ifx\p@warn@latexrelease\@undefined\else +\let\p@warn@latexrelease\relax +\fi +\ifx\latexreleaseversion\@undefined\else + \PackageWarningNoLine{platexrelease}{% + Package `latexrelease' is already loaded;\MessageBreak + load `platexrelease' earlier} +\fi \RequirePackageWithOptions{latexrelease} \ifnum\expandafter\@parse@version\latexreleaseversion//00\@nil >\expandafter\@parse@version\p@known@latexreleaseversion//00\@nil @@ -134,6 +142,12 @@ of this package available from CTAN} some critical bugs. We advise you to\MessageBreak select another format date} \plIncludeInRelease{2017/10/28}{\PackageWarning}{pLaTeX Info}% + % * <2020-04-12> + % * <2020-02-02>+3 + % * <2020-02-02>+2 + % * <2020-02-02>+1 + % * <2020-02-02> + % * <2019-10-01>+1 % * <2019-10-01> % * <2019-04-06> % * <2018-12-01> @@ -189,6 +203,26 @@ of this package available from CTAN} % * <2006/11/10> \plEndIncludeInRelease %% File: plfonts.dtx +\plIncludeInRelease{2020/04/12}{\inlist@} + {Detokenize}% +\def\inlist@#1#2{% + \edef\reserved@a{% + \unexpanded{\def\in@@##1<}% + \detokenize{#1}% + \unexpanded{>##2##3\in@@{\ifx\in@##2\in@false\else\in@true\fi}\in@@}% + \detokenize{#2}% + \unexpanded{<}% + \detokenize{#1}% + \unexpanded{>\in@\in@@}}% + \reserved@a} +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\inlist@} + {ASCII Corporation original}% +\def\inlist@#1#2{% + \def\in@@##1<#1>##2##3\in@@{% + \ifx\in@##2\in@false\else\in@true\fi}% + \in@@#2<#1>\in@\in@@} +\plEndIncludeInRelease \plIncludeInRelease{2017/04/08}{\ystrutbox} {Add \ystrutbox}% \newbox\ystrutbox @@ -335,6 +369,87 @@ of this package available from CTAN} } \let\DeclareFontEncoding@saved\@undefined \plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\ensure@KanjiEncodingPair} + {Check \KanjiEncodingPair}% +\def\ensure@KanjiEncodingPair#1{% + \edef\reserved@a{\csname #1@enc@\k@encoding\endcsname}% + \edef\reserved@b{\csname c#1@encoding\endcsname}% + \ifcat\relax\reserved@a + \@latex@error + {KANJI Encoding pair for `\k@encoding' undefined}% + {Use \string\KanjiEncodingPair, falling back to `\reserved@b'...}% + \expandafter\edef\reserved@a{\reserved@b}% + \fi} +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\ensure@KanjiEncodingPair} + {ASCII Corporation original}% +\let\ensure@KanjiEncodingPair\@undefined +\plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\DeclareKanjiSubstitution} + {Use \default@k@family etc.}% +\def\DeclareKanjiSubstitution#1#2#3#4{% + \expandafter\ifx\csname T@#1\endcsname\relax + \@latex@error{KANJI Encoding scheme `#1' unknown}\@eha + \else + \begingroup + \def\reserved@a{#1}% + \toks@{}% + \def\cdp@elt##1##2##3##4{% + \def\reserved@b{##1}% + \ifx\reserved@a\reserved@b + \addto@hook\toks@{\cdp@elt{#1}{#2}{#3}{#4}}% + \else + \addto@hook\toks@{\cdp@elt{##1}{##2}{##3}{##4}}% + \fi}% + \cdp@list + \xdef\cdp@list{\the\toks@}% + \endgroup + \global\@namedef{D@#1}{\def\default@k@family{#2}% !!! + \def\default@k@series{#3}% !!! + \def\default@k@shape{#4}}% !!! + \fi} +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\DeclareKanjiSubstitution} + {ASCII Corporation original}% +\def\DeclareKanjiSubstitution#1#2#3#4{% + \expandafter\ifx\csname T@#1\endcsname\relax + \@latex@error{KANJI Encoding scheme `#1' unknown}\@eha + \else + \begingroup + \def\reserved@a{#1}% + \toks@{}% + \def\cdp@elt##1##2##3##4{% + \def\reserved@b{##1}% + \ifx\reserved@a\reserved@b + \addto@hook\toks@{\cdp@elt{#1}{#2}{#3}{#4}}% + \else + \addto@hook\toks@{\cdp@elt{##1}{##2}{##3}{##4}}% + \fi}% + \cdp@list + \xdef\cdp@list{\the\toks@}% + \endgroup + \global\@namedef{D@#1}{\def\default@family{#2}% + \def\default@series{#3}% + \def\default@shape{#4}}% + \fi} +\plEndIncludeInRelease +% !!! Special case BEGIN +% required for any emulation date +% copied from (u)pldefs.ltx +\def\pltx@tempa{JY1}\ifx\pltx@tempa\k@encoding +\DeclareKanjiSubstitution{JY1}{mc}{m}{n} +\DeclareKanjiSubstitution{JT1}{mc}{m}{n} +\else\def\pltx@tempa{JY2}\ifx\pltx@tempa\k@encoding +\DeclareKanjiSubstitution{JY2}{mc}{m}{n} +\DeclareKanjiSubstitution{JT2}{mc}{m}{n} +\fi\fi +% emulate execution of \enc@update in \selectfont +% before (u)pldefs.ltx is loaded +\csname D@\f@encoding\endcsname +% emulate execution of \kenc@update in \selectfont +% inside (u)pldefs.ltx +\csname D@\k@encoding\endcsname +% !!! Special case END \plIncludeInRelease{2019/10/01}{\DeclareErrorKanjiFont} {No side effects please}% \def\DeclareErrorKanjiFont#1#2#3#4#5{% @@ -363,6 +478,210 @@ of this package available from CTAN} \gdef\f@size{#5}% \gdef\f@baselineskip{#5pt}} \plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\wrong@fontshape} + {Japanese \wrong@fontshape}% +\def\wrong@al@fontshape{% + \csname D@\f@encoding\endcsname % install defaults if in math + \edef\reserved@a{\csname\curr@fontshape\endcsname}% + \ifx\last@fontshape\reserved@a + \errmessage{Corrupted NFSS tables}% + \error@fontshape + \else + \let\f@shape\default@shape + \expandafter\ifx\csname\curr@fontshape\endcsname\relax + \let\f@series\default@series + \expandafter + \ifx\csname\curr@fontshape\endcsname\relax + \let\f@family\default@family + \begingroup + \try@load@fontshape + \endgroup + \fi \fi + \fi + \@font@warning{Font shape `\expandafter\string\reserved@a' + \expandafter\@gobble\string\@undefined\MessageBreak + using `\curr@fontshape' instead\@wrong@font@char}% + \global\let\last@fontshape\reserved@a + \gdef\@defaultsubs{% + \@font@warning{Some font shapes were not available, defaults + substituted.\@gobbletwo}}% + \global\expandafter\expandafter\expandafter\let + \expandafter\reserved@a + \csname\curr@fontshape\endcsname + \xdef\font@name{% + \csname\curr@fontshape/\f@size\endcsname}% + \pickup@font} +\def\wrong@ja@fontshape{% + \csname D@\f@encoding\endcsname % install defaults if in math + \edef\reserved@a{\csname\curr@fontshape\endcsname}% + \ifx\last@fontshape\reserved@a + \errmessage{Corrupted NFSS tables}% + \error@fontshape + \else + \let\f@shape\default@k@shape % !!! + \expandafter\ifx\csname\curr@fontshape\endcsname\relax + \let\f@series\default@k@series % !!! + \expandafter + \ifx\csname\curr@fontshape\endcsname\relax + \let\f@family\default@k@family % !!! + \begingroup + \try@load@fontshape + \endgroup + \fi \fi + \fi + \@font@warning{Font shape `\expandafter\string\reserved@a' + \expandafter\@gobble\string\@undefined\MessageBreak + using `\curr@fontshape' instead\@wrong@font@char}% + \global\let\last@fontshape\reserved@a + \gdef\@defaultsubs{% + \@font@warning{Some font shapes were not available, defaults + substituted.\@gobbletwo}}% + \global\expandafter\expandafter\expandafter\let + \expandafter\reserved@a + \csname\curr@fontshape\endcsname + \xdef\font@name{% + \csname\curr@fontshape/\f@size\endcsname}% + \pickup@font} +\def\wrong@fontshape{% + \edef\tmp@item{{\f@encoding}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kenc@list}% + \ifin@ + \wrong@ja@fontshape + \else + \wrong@al@fontshape + \fi +} +\plEndIncludeInRelease +\plIncludeInRelease{2015/01/01}{\wrong@fontshape} + {LaTeX2e original (2015)}% +\def\wrong@fontshape{% + \csname D@\f@encoding\endcsname % install defaults if in math + \edef\reserved@a{\csname\curr@fontshape\endcsname}% + \ifx\last@fontshape\reserved@a + \errmessage{Corrupted NFSS tables}% + \error@fontshape + \else + \let\f@shape\default@shape + \expandafter\ifx\csname\curr@fontshape\endcsname\relax + \let\f@series\default@series + \expandafter + \ifx\csname\curr@fontshape\endcsname\relax + \let\f@family\default@family + \begingroup + \try@load@fontshape + \endgroup + \fi \fi + \fi + \@font@warning{Font shape `\expandafter\string\reserved@a' + \expandafter\@gobble\string\@undefined\MessageBreak + using `\curr@fontshape' instead\@wrong@font@char}% + \global\let\last@fontshape\reserved@a + \gdef\@defaultsubs{% + \@font@warning{Some font shapes were not available, defaults + substituted.\@gobbletwo}}% + \global\expandafter\expandafter\expandafter\let + \expandafter\reserved@a + \csname\curr@fontshape\endcsname + \xdef\font@name{% + \csname\curr@fontshape/\f@size\endcsname}% + \pickup@font} +\let\wrong@al@fontshape\@undefined +\let\wrong@ja@fontshape\@undefined +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\wrong@fontshape} + {LaTeX2e original (old)}% +\def\wrong@fontshape{% + \csname D@\f@encoding\endcsname + \edef\reserved@a{\csname\curr@fontshape\endcsname}% + \ifx\last@fontshape\reserved@a + \errmessage{Corrupted NFSS tables}% + \error@fontshape + \else + \let\f@shape\default@shape + \expandafter\ifx\csname\curr@fontshape\endcsname\relax + \let\f@series\default@series + \expandafter + \ifx\csname\curr@fontshape\endcsname\relax + \let\f@family\default@family + \fi \fi + \fi + \@font@warning{Font shape + `\expandafter\string\reserved@a' + \expandafter\@gobble\string\@undefined + \MessageBreak + using `\curr@fontshape' instead\@wrong@font@char}% + \global\let\last@fontshape\reserved@a + \gdef\@defaultsubs{% + \@font@warning{Some font shapes were not available, + defaults substituted.\@gobbletwo}}% + \global\expandafter\expandafter\expandafter\let + \expandafter\reserved@a + \csname\curr@fontshape\endcsname + \xdef\font@name{% + \csname\curr@fontshape/\f@size\endcsname}% + \pickup@font} +\let\wrong@al@fontshape\@undefined +\let\wrong@ja@fontshape\@undefined +\plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\do@subst@correction} + {Japanese font substitution}% +\def\pltx@do@subst@correction@al{% + \xdef\subst@correction{% + \font@name + \global\expandafter\font + \csname \curr@fontshape/\f@size\endcsname + \noexpand\fontname\font + \relax}% + \aftergroup\subst@correction +} +\def\pltx@do@subst@correction@yoko{% + \xdef\subst@correction{% + \font@name + \global\expandafter\jfont + \csname \curr@fontshape/\f@size\endcsname + \noexpand\fontname\jfont + \relax}% + \aftergroup\subst@correction +} +\def\pltx@do@subst@correction@tate{% + \xdef\subst@correction{% + \font@name + \global\expandafter\tfont + \csname \curr@fontshape/\f@size\endcsname + \noexpand\fontname\tfont + \relax}% + \aftergroup\subst@correction +} +\def\do@subst@correction{% + \edef\tmp@item{{\f@encoding}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kyenc@list}% + \ifin@\pltx@do@subst@correction@yoko + \else + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\ktenc@list}% + \ifin@\pltx@do@subst@correction@tate\else + \pltx@do@subst@correction@al + \fi + \fi +} +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\do@subst@correction} + {LaTeX2e original}% +\def\do@subst@correction{% + \xdef\subst@correction{% + \font@name + \global\expandafter\font + \csname \curr@fontshape/\f@size\endcsname + \noexpand\fontname\font + \relax}% + \aftergroup\subst@correction +} +\let\pltx@do@subst@correction@al\@undefined +\let\pltx@do@subst@correction@yoko\@undefined +\let\pltx@do@subst@correction@tate\@undefined +\plEndIncludeInRelease \plIncludeInRelease{2019/10/01}{\userelfont} {Make robust}% \DeclareRobustCommand\userelfont{\@knjcmdtrue} @@ -372,6 +691,120 @@ of this package available from CTAN} \def\userelfont{\@knjcmdtrue} \expandafter \let \csname userelfont \endcsname \@undefined \plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\selectfont} + {Check \KanjiEncodingPair}% +\DeclareRobustCommand\selectfont{% + \let\tmp@error@fontshape\error@fontshape + \let\error@fontshape\error@kfontshape + \edef\tmp@item{{\k@encoding}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kyenc@list}% + \ifin@ + \let\cy@encoding\k@encoding + \ensure@KanjiEncodingPair{t}% + \edef\ct@encoding{\csname t@enc@\k@encoding\endcsname}% + \else + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\ktenc@list}% + \ifin@ + \let\ct@encoding\k@encoding + \ensure@KanjiEncodingPair{y}% + \edef\cy@encoding{\csname y@enc@\k@encoding\endcsname}% + \else + \@latex@error{KANJI Encoding scheme `\k@encoding' unknown}\@eha + \fi + \fi + \let\font\tfont + \let\k@encoding\ct@encoding + \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}% + \pickup@font + \font@name + \let\font\jfont + \let\k@encoding\cy@encoding + \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}% + \pickup@font + \font@name + \expandafter\def\expandafter\k@encoding\tmp@item + \kenc@update + \let\error@fontshape\tmp@error@fontshape + \if@knjcmd \@knjcmdfalse + \expandafter\ifx + \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname\relax + \expandafter\ifx + \csname rel@\k@encoding/\k@family/\k@series/all\endcsname\relax + \else + \csname rel@\k@encoding/\k@family/\k@series/all\endcsname + \fi + \else + \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname + \fi + \fi + \let\font\afont + \xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}% + \pickup@font + \font@name + \enc@update + \ifx\f@linespread\baselinestretch \else + \set@fontsize\baselinestretch\f@size\f@baselineskip + \fi + \size@update} +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\selectfont} + {ASCII Corporation original}% +\DeclareRobustCommand\selectfont{% + \let\tmp@error@fontshape\error@fontshape + \let\error@fontshape\error@kfontshape + \edef\tmp@item{{\k@encoding}}% + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\kyenc@list}% + \ifin@ + \let\cy@encoding\k@encoding + \edef\ct@encoding{\csname t@enc@\k@encoding\endcsname}% + \else + \expandafter\expandafter\expandafter + \inlist@\expandafter\tmp@item\expandafter{\ktenc@list}% + \ifin@ + \let\ct@encoding\k@encoding + \edef\cy@encoding{\csname y@enc@\k@encoding\endcsname}% + \else + \@latex@error{KANJI Encoding scheme `\k@encoding' unknown}\@eha + \fi + \fi + \let\font\tfont + \let\k@encoding\ct@encoding + \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}% + \pickup@font + \font@name + \let\font\jfont + \let\k@encoding\cy@encoding + \xdef\font@name{\csname\curr@kfontshape/\f@size\endcsname}% + \pickup@font + \font@name + \expandafter\def\expandafter\k@encoding\tmp@item + \kenc@update + \let\error@fontshape\tmp@error@fontshape + \if@knjcmd \@knjcmdfalse + \expandafter\ifx + \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname\relax + \expandafter\ifx + \csname rel@\k@encoding/\k@family/\k@series/all\endcsname\relax + \else + \csname rel@\k@encoding/\k@family/\k@series/all\endcsname + \fi + \else + \csname rel@\k@encoding/\k@family/\k@series/\k@shape\endcsname + \fi + \fi + \let\font\afont + \xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}% + \pickup@font + \font@name + \enc@update + \ifx\f@linespread\baselinestretch \else + \set@fontsize\baselinestretch\f@size\f@baselineskip + \fi + \size@update} +\plEndIncludeInRelease \plIncludeInRelease{2017/04/08}{\set@fontsize} {Construct \ystrutbox}% \def\set@fontsize#1#2#3{% @@ -488,22 +921,38 @@ of this package available from CTAN} \expandafter \let \csname adjustbaseline \endcsname \@undefined \plEndIncludeInRelease \ifx\fontseriesforce\@undefined % old + \def\pltx@latex@level{0} \else % 2020-02-02 - \ifx\@forced@seriestrue\@undefined % patch level 0, 1, 2 - \@latex@error - {Please update LaTeX2e!^^J\space\space - At least LaTeX2e 2020-02-02 patch level 3 is required} - {LaTeX2e 2020-02-02 patch level 2 has a bug.} + \ifx\@forced@seriestrue\@undefined + \ifnum\patch@level<1\relax % patch level 0 + \def\pltx@latex@level{1}% use \@reserveda + \else % patch level 1, 2 + \def\pltx@latex@level{2} + \fi + \else + \ifx\series@maybe@drop@one@m\@undefined % patch level 3, 4 + \def\pltx@latex@level{3} + \else + \ifx\series@maybe@drop@one@m@x\@undefined % patch level 5 + \def\pltx@latex@level{4} + % anticipating LaTeX2e 'develop' branch (after 23b7244) + % this temporary code will be removed in the future + %\let\series@maybe@drop@one@m@x\series@maybe@drop@one@m + %\def\series@maybe@drop@one@m#1{% + % \expandafter\series@maybe@drop@one@m@x\expandafter{#1}} + \else + \def\pltx@latex@level{5} + \fi + \fi \fi - % actually we'd like to check the below too, - % but commented out for TL19 frozen since - % platex-dev format generation fails - %\ifx\series@maybe@drop@one@m\@undefined % patch level 0--4 - % \@latex@error - % {Please update LaTeX2e!^^J\space\space - % At least LaTeX2e 2020-02-02 patch level 5 is required} - % {LaTeX2e 2020-02-02 patch level 2 and 4 has a bug.} - %\fi +\fi +\edef\pltx@reset@catcode@trick{\catcode`\noexpand\~=\the\catcode`\~\relax} +\def\pltx@temp@catcode@ix{\catcode`\~=9\relax} +\def\pltx@temp@catcode@xiv{\catcode`\~=14\relax} +\ifnum\pltx@latex@level<3\relax + \pltx@temp@catcode@xiv % hide if-tokens +\else + \pltx@temp@catcode@ix % reveal if-tokens \fi \ifx\fontseriesforce\@undefined % old \DeclareRobustCommand\romanseries[1]{\edef\f@series{#1}} @@ -555,18 +1004,32 @@ of this package available from CTAN} \fi \fi } -\ifx\series@maybe@drop@one@m\@undefined % patch level 0--4 \def\set@target@series@kanji#1{% \edef\k@series{#1}% - \edef\k@series{\expandafter\series@drop@one@m\k@series mm\series@drop@one@m}% -} -\else % patch level 5 -\def\set@target@series@kanji#1{% - \edef\k@series{#1}% - \expandafter\series@maybe@drop@one@m\expandafter{\k@series}\k@series + \series@maybe@drop@one@m\k@series\k@series } \fi +\newif\if@shape@roman@kanji +\plIncludeInRelease{2020/04/12}{\fontshape} + {No \k@shape update if unavailable}% +\ifx\fontshapeforce\@undefined % old +\DeclareRobustCommand\romanshape[1]{\edef\f@shape{#1}} +\DeclareRobustCommand\kanjishape[1]{\edef\k@shape{#1}} +\DeclareRobustCommand\fontshape[1]{% + \set@safe@kanji@shape{#1}{}% + \edef\f@shape{#1}% +} +\else % 2020-02-02 +\DeclareRobustCommand\romanshape[1]{\merge@font@shape{#1}} +\DeclareRobustCommand\kanjishape[1]{\merge@kanji@shape{#1}} +\DeclareRobustCommand\fontshape[1]{% + \@shape@roman@kanjitrue + \kanjishape{#1}\romanshape{#1}% + \@shape@roman@kanjifalse} \fi +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\fontshape} + {ASCII Corporation / TeXJP original}% \ifx\fontshapeforce\@undefined % old \DeclareRobustCommand\romanshape[1]{\edef\f@shape{#1}} \DeclareRobustCommand\kanjishape[1]{\edef\k@shape{#1}} @@ -576,6 +1039,23 @@ of this package available from CTAN} \DeclareRobustCommand\kanjishape[1]{\merge@kanji@shape{#1}} \DeclareRobustCommand\fontshape[1]{\kanjishape{#1}\romanshape{#1}} \fi +\plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\fontshapeforce} + {No \k@shape update if unavailable}% +\ifx\fontshapeforce\@undefined % old +\let\romanshapeforce\@undefined +\let\kanjishapeforce\@undefined +\else % 2020-02-02 +\DeclareRobustCommand\romanshapeforce[1]{\edef\f@shape{#1}} +\DeclareRobustCommand\kanjishapeforce[1]{\edef\k@shape{#1}} +\DeclareRobustCommand\fontshapeforce[1]{% + \set@safe@kanji@shape{#1}{}% + \edef\f@shape{#1}% +} +\fi +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\fontshapeforce} + {ASCII Corporation / TeXJP original}% \ifx\fontshapeforce\@undefined % old \let\romanshapeforce\@undefined \let\kanjishapeforce\@undefined @@ -584,6 +1064,54 @@ of this package available from CTAN} \DeclareRobustCommand\kanjishapeforce[1]{\edef\k@shape{#1}} \DeclareRobustCommand\fontshapeforce[1]{\kanjishapeforce{#1}\romanshapeforce{#1}} \fi +\plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\merge@kanji@shape@} + {No \k@shape update if unavailable}% +\ifx\fontseriesforce\@undefined % old +\let\merge@kanji@shape\@undefined +\let\merge@kanji@shape@\@undefined +\else % 2020-02-02 +\def\merge@kanji@shape#1{% + \expandafter\expandafter\expandafter + \merge@kanji@shape@ + \csname shape@\k@shape @#1\endcsname + {#1}% + \@nil +} +\def\merge@kanji@shape@#1#2#3\@nil{% + \def\reserved@a{#3}% + \ifx\reserved@a\@empty + \if@shape@roman@kanji + \set@safe@kanji@shape{#2}{}% + \else + \edef\k@shape{#2}% + \fi + \else + \begingroup\let\f@encoding\k@encoding\let\f@family\k@family + \maybe@load@fontshape\endgroup + \edef\reserved@a{\k@encoding /\k@family /\k@series/#1}% + \ifcsname \reserved@a\endcsname + \edef\k@shape{#1}% + \else + \ifcsname \k@encoding /\k@family /\k@series/#2\endcsname + \edef\k@shape{#2}% + {\let\curr@fontshape\curr@kfontshape\@font@shape@subst@warning}% + \else + \if@shape@roman@kanji + \set@safe@kanji@shape{#3}% + {{\let\curr@fontshape\curr@kfontshape\@font@shape@subst@warning}}% + \else + \edef\k@shape{#3}% + {\let\curr@fontshape\curr@kfontshape\@font@shape@subst@warning}% + \fi + \fi + \fi + \fi +} +\fi +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\merge@kanji@shape@} + {ASCII Corporation / TeXJP original}% \ifx\fontseriesforce\@undefined % old \let\merge@kanji@shape\@undefined \let\merge@kanji@shape@\@undefined @@ -617,6 +1145,28 @@ of this package available from CTAN} \fi } \fi +\plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\set@safe@kanji@shape} + {No \k@shape update if unavailable}% +\def\set@safe@kanji@shape#1#2{% + \edef\reserved@b{\k@encoding /\k@family /\k@series/#1}% + \ifcsname \reserved@b\endcsname + \edef\k@shape{#1}% + #2% + \else + \@kanji@shape@nochange@info{\reserved@b}% + \fi +} +\def\@kanji@shape@nochange@info#1{% + \@font@info{Kanji font shape `#1' undefined\MessageBreak + No change}% +} +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\set@safe@kanji@shape} + {ASCII Corporation original}% +\let\set@safe@kanji@shape\@undefined +\let\@kanji@shape@nochange@info\@undefined +\plEndIncludeInRelease \plIncludeInRelease{2020/02/02}{\usefont} {Don't call \fontseries or \fontshape}% \DeclareRobustCommand\usekanji[4]{\kanjiencoding{#1}% @@ -672,6 +1222,37 @@ of this package available from CTAN} \expandafter \let \csname useroman \endcsname \@undefined \expandafter \let \csname usefont \endcsname \@undefined \plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\normalfont} + {Use \@defaultfamilyhook}% +\ifx\@defaultfamilyhook\@undefined % old +\DeclareRobustCommand\normalfont{% + \kanjiencoding{\kanjiencodingdefault}% + \edef\k@family{\kanjifamilydefault}% + \edef\k@series{\kanjiseriesdefault}% + \edef\k@shape{\kanjishapedefault}% + \romanencoding{\encodingdefault}% + \edef\f@family{\familydefault}% + \edef\f@series{\seriesdefault}% + \edef\f@shape{\shapedefault}% + \selectfont} +\else % 2020-02-02 PL2 +\DeclareRobustCommand\normalfont{% + \fontencoding\encodingdefault + \edef\f@family{\familydefault}% + \edef\f@series{\seriesdefault}% + \edef\f@shape{\shapedefault}% + \@defaultfamilyhook + \selectfont} +\g@addto@macro\@defaultfamilyhook{% + \kanjiencoding{\kanjiencodingdefault}% + \edef\k@family{\kanjifamilydefault}% + \edef\k@series{\kanjiseriesdefault}% + \edef\k@shape{\kanjishapedefault}% +} +\fi +\adjustbaseline +\let\reset@font\normalfont +\plEndIncludeInRelease \plIncludeInRelease{2020/02/02}{\normalfont} {Don't call \fontseries or \fontshape}% \DeclareRobustCommand\normalfont{% @@ -720,39 +1301,60 @@ of this package available from CTAN} \edef\kanjidef@ult{\kanjifamilydefault}% } \fi -\ifx\bfseries@rm\@undefined\else % 2020-02-02 -\DeclareRobustCommand\bfseries{% - \not@math@alphabet\bfseries\mathbf - \expand@font@defaults - % changed \fontseries -> \romanseries - \ifx\f@family\rmdef@ult \romanseries\bfseries@rm - \else\ifx\f@family\sfdef@ult \romanseries\bfseries@sf - \else\ifx\f@family\ttdef@ult \romanseries\bfseries@tt - \else \romanseries\bfdefault - \fi\fi\fi +\ifx\bfseries@rm\@undefined % old +\let\pltx@fontseries@saved\@undefined +\let\pltx@patch@bfseries\@undefined +\let\pltx@patch@mdseries\@undefined +\else % 2020-02-02 +\let\pltx@fontseries@saved\fontseries +\def\pltx@patch@bfseries\not@math@alphabet#1#2#3\selectfont{% + \long\expandafter\def\csname bfseries \endcsname{% + \not@math@alphabet#1#2% should be \bfseries\mathbf + % \fontseries of pLaTeX tries to change both Latin and Japanese; + % here we want only Latin, so use \romanseries + \let\fontseries\romanseries + #3% contains \fontseries and \@setbfseriesdefaultshook + \let\fontseries\pltx@fontseries@saved % recover % changed \fontseries -> \kanjiseries \ifx\k@family\mcdef@ult \kanjiseries\bfseries@mc \else\ifx\k@family\gtdef@ult \kanjiseries\bfseries@gt \else \kanjiseries\bfdefault \fi\fi - \selectfont + \selectfont + }% } -\DeclareRobustCommand\mdseries{% - \not@math@alphabet\mdseries\relax - \expand@font@defaults - % changed \fontseries -> \romanseries - \ifx\f@family\rmdef@ult \romanseries\mdseries@rm - \else\ifx\f@family\sfdef@ult \romanseries\mdseries@sf - \else\ifx\f@family\ttdef@ult \romanseries\mdseries@tt - \else \romanseries\mddefault - \fi\fi\fi +\ifx\@setbfseriesdefaultshook\@undefined\else +\g@addto@macro\@setbfseriesdefaultshook{% + \let\bfseries@mc\bfdef@ult + \let\bfseries@gt\bfdef@ult +} +\fi +\expandafter\expandafter\expandafter + \pltx@patch@bfseries\csname bfseries \endcsname +\def\pltx@patch@mdseries\not@math@alphabet#1#2#3\selectfont{% + \long\expandafter\def\csname mdseries \endcsname{% + \not@math@alphabet#1#2% should be \mdseries\relax + % \fontseries of pLaTeX tries to change both Latin and Japanese; + % here we want only Latin, so use \romanseries + \let\fontseries\romanseries + #3% contains \fontseries and \@setmdseriesdefaultshook + \let\fontseries\pltx@fontseries@saved % recover % changed \fontseries -> \kanjiseries \ifx\k@family\mcdef@ult \kanjiseries\mdseries@mc \else\ifx\k@family\gtdef@ult \kanjiseries\mdseries@gt \else \kanjiseries\mddefault \fi\fi \selectfont + }% } +\ifx\@setmdseriesdefaultshook\@undefined\else +\g@addto@macro\@setmdseriesdefaultshook{% + \let\mdseries@mc\mddef@ult + \let\mdseries@gt\mddef@ult +} +\fi +\expandafter\expandafter\expandafter + \pltx@patch@mdseries\csname mdseries \endcsname \fi \ifx\prepare@family@series@update\@undefined % old \let\prepare@family@series@update@kanji\@undefined @@ -760,9 +1362,9 @@ of this package available from CTAN} \let\update@series@target@value@kanji\@undefined \else % 2020-02-02 \def\prepare@family@series@update#1#2{% - \if@forced@series - \romanfamily#2% % changed \fontfamily -> \romanfamily - \else +~\if@forced@series +~ \romanfamily#2% % changed \fontfamily -> \romanfamily +~\else \expand@font@defaults \let\target@series@value\@empty \def\target@meta@family@value{#1}% @@ -777,15 +1379,15 @@ of this package available from CTAN} \ifx \f@series\target@series@value \else \maybe@load@fontshape - \let\f@series\target@series@value + \series@maybe@drop@one@m\target@series@value\f@series \fi \fi - \fi +~\fi } \def\prepare@family@series@update@kanji#1#2{% - \if@forced@series - \kanjifamily#2% - \else +~\if@forced@series +~ \kanjifamily#2% +~\else \expand@font@defaults \let\target@series@value\@empty \def\target@meta@family@value{#1}% @@ -801,10 +1403,10 @@ of this package available from CTAN} \else \begingroup\let\f@encoding\k@encoding\let\f@family\k@family \maybe@load@fontshape\endgroup - \let\k@series\target@series@value + \series@maybe@drop@one@m\target@series@value\k@series \fi \fi - \fi +~\fi } \def\@meta@family@list@kanji{\@elt{mc}\@elt{gt}} \def\update@series@target@value@kanji#1{% @@ -817,9 +1419,14 @@ of this package available from CTAN} \csname mdseries@\target@meta@family@value\endcsname \expandafter\let\expandafter\reserved@c \csname bfseries@\target@meta@family@value\endcsname - \expandafter\ifx\csname mdseries@#1\endcsname\k@series + \expandafter\series@maybe@drop@one@m + \csname mdseries@#1\endcsname\reserved@d + \ifx\reserved@d\k@series \let\target@series@value\reserved@b - \else\expandafter\ifx\csname bfseries@#1\endcsname\k@series + \else + \expandafter\series@maybe@drop@one@m + \csname bfseries@#1\endcsname\reserved@d + \ifx\reserved@d\k@series \let\target@series@value\reserved@c \else\ifx\k@series\mddef@ult \let\target@series@value\reserved@b \else\ifx\k@series\bfdef@ult \let\target@series@value\reserved@c @@ -850,6 +1457,144 @@ of this package available from CTAN} {\not@math@alphabet\gtfamily\mathgt \prepare@family@series@update@kanji{gt}\gtdefault\selectfont} \fi +%% +\ifnum\pltx@latex@level>0\relax % 2020-02-02 +\ifnum\pltx@latex@level<3\relax % 2020-02-02 patch level 0--2 (no flags) +\DeclareRobustCommand\romanseries[1]{\merge@font@series{#1}} +\DeclareRobustCommand\kanjiseries[1]{\merge@kanji@series{#1}} +\DeclareRobustCommand\fontseries[1]{\kanjiseries{#1}\romanseries{#1}} +\DeclareRobustCommand\romanseriesforce[1]{\edef\f@series{#1}} +\DeclareRobustCommand\kanjiseriesforce[1]{\edef\k@series{#1}} +\DeclareRobustCommand\fontseriesforce[1]{\kanjiseriesforce{#1}\romanseriesforce{#1}} +\fi +\ifnum\pltx@latex@level=1\relax % 2020-02-02 patch level 0 (\@reserveda) +\def\merge@kanji@series@#1#2#3\@nil{% + \def\@reserveda{#3}% + \ifx\@reserveda\@empty + \set@target@series@kanji{#2}% + \else + \begingroup\let\f@encoding\k@encoding\let\f@family\k@family + \maybe@load@fontshape\endgroup + \edef\@reserveda{\k@encoding /\k@family /#1/\k@shape}% + \ifcsname \@reserveda \endcsname + \set@target@series@kanji{#1}% + \else + \ifcsname \k@encoding /\k@family /#2/\k@shape \endcsname + \set@target@series@kanji{#2}% + {\let\curr@fontshape\curr@kfontshape\@font@shape@subst@warning}% + \else + \set@target@series@kanji{#3}% + {\let\curr@fontshape\curr@kfontshape\@font@shape@subst@warning}% + \fi + \fi + \fi +} +\def\merge@kanji@shape@#1#2#3\@nil{% + \def\@reserveda{#3}% + \ifx\@reserveda\@empty + \edef\k@shape{#2}% + \else + \begingroup\let\f@encoding\k@encoding\let\f@family\k@family + \maybe@load@fontshape\endgroup + \edef\@reserveda{\k@encoding /\k@family /\k@series/#1}% + \ifcsname \@reserveda\endcsname + \edef\k@shape{#1}% + \else + \ifcsname \k@encoding /\k@family /\k@series/#2\endcsname + \edef\k@shape{#2}% + {\let\curr@fontshape\curr@kfontshape\@font@shape@subst@warning}% + \else + \edef\k@shape{#3}% + {\let\curr@fontshape\curr@kfontshape\@font@shape@subst@warning}% + \fi + \fi + \fi +} +\fi +\ifnum\pltx@latex@level<4\relax % 2020-02-02 patch level 0--4 (drop m) +\def\set@target@series@kanji#1{% + \edef\k@series{#1}% + \edef\k@series{\expandafter\series@drop@one@m\k@series mm\series@drop@one@m}% +} +\else\ifnum\pltx@latex@level=4\relax % 2020-02-02 patch level 5 (old syntax) +\def\set@target@series@kanji#1{% + \edef\k@series{#1}% + \expandafter\series@maybe@drop@one@m\expandafter{\k@series}\k@series +} +\fi\fi +\ifnum\pltx@latex@level<5\relax % 2020-02-02 patch level 0--5 +\def\prepare@family@series@update#1#2{% +~\if@forced@series +~ \romanfamily#2% % changed \fontfamily -> \romanfamily +~\else + \expand@font@defaults + \let\target@series@value\@empty + \def\target@meta@family@value{#1}% +~ \expandafter\edef\csname ??def@ult\endcsname{\f@family}% + \let\@elt\update@series@target@value + \@meta@family@list +~ \@elt{??}% + \let\@elt\relax + \romanfamily#2% % changed \fontfamily -> \romanfamily + \ifx\target@series@value\@empty + \else + \ifx \f@series\target@series@value + \else + \maybe@load@fontshape + \let\f@series\target@series@value + \fi + \fi +~\fi +} +\def\prepare@family@series@update@kanji#1#2{% +~\if@forced@series +~ \kanjifamily#2% +~\else + \expand@font@defaults + \let\target@series@value\@empty + \def\target@meta@family@value{#1}% +~ \expandafter\edef\csname ??def@ult\endcsname{\k@family}% + \let\@elt\update@series@target@value@kanji + \@meta@family@list@kanji +~ \@elt{??}% + \let\@elt\relax + \kanjifamily#2% + \ifx\target@series@value\@empty + \else + \ifx \k@series\target@series@value + \else + \begingroup\let\f@encoding\k@encoding\let\f@family\k@family + \maybe@load@fontshape\endgroup + \let\k@series\target@series@value + \fi + \fi +~\fi +} +\def\@meta@family@list@kanji{\@elt{mc}\@elt{gt}} +\def\update@series@target@value@kanji#1{% + \def\reserved@a{#1}% + \ifx\target@meta@family@value\reserved@a % rm -> rm do nothing + \else + \expandafter\ifx\csname#1def@ult\endcsname\k@family + \let\@elt\@gobble + \expandafter\let\expandafter\reserved@b + \csname mdseries@\target@meta@family@value\endcsname + \expandafter\let\expandafter\reserved@c + \csname bfseries@\target@meta@family@value\endcsname + \expandafter\ifx\csname mdseries@#1\endcsname\k@series + \let\target@series@value\reserved@b + \else\expandafter\ifx\csname bfseries@#1\endcsname\k@series + \let\target@series@value\reserved@c + \else\ifx\k@series\mddef@ult \let\target@series@value\reserved@b + \else\ifx\k@series\bfdef@ult \let\target@series@value\reserved@c + \fi\fi\fi\fi + \fi + \fi +} +\fi +\fi +%% +\pltx@reset@catcode@trick \plIncludeInRelease{2020/02/02}{\DeclareEmphSequence} {Nested emph}% \ifx\DeclareEmphSequence\@undefined % old @@ -2097,6 +2842,22 @@ of this package available from CTAN} \@ifstar\@sverb\@verb} \fi \plEndIncludeInRelease +\plIncludeInRelease{2020/04/12}{\do@noligs} + {Allow \xkanjiskip while avoiding ligature}% +\def\do@noligs#1{% + \catcode`#1\active + \begingroup + \lccode`\~`#1\relax + \lowercase{\endgroup\def~{\leavevmode\vadjust{}\char`#1}}} +\plEndIncludeInRelease +\plIncludeInRelease{0000/00/00}{\do@noligs} + {LaTeX2e original}% +\def\do@noligs#1{% + \catcode`#1\active + \begingroup + \lccode`\~`#1\relax + \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}} +\plEndIncludeInRelease \plIncludeInRelease{2017/10/28}{\@startline} {Inhibit JFM glue at the beginning}% \gdef\@startline{% |