From 8123464ce27bdf9b1fde8215b58398b26c1498a1 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 13 Feb 2021 22:17:20 +0000
Subject: platex (13feb21)

git-svn-id: svn://tug.org/texlive/trunk@57730 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/platex/base/platexrelease.sty   | 217 ++++++++++++++++++++-
 1 file changed, 216 insertions(+), 1 deletion(-)

(limited to 'Master/texmf-dist/tex/platex/base/platexrelease.sty')

diff --git a/Master/texmf-dist/tex/platex/base/platexrelease.sty b/Master/texmf-dist/tex/platex/base/platexrelease.sty
index b54874f3f00..5c4d898c4f0 100644
--- a/Master/texmf-dist/tex/platex/base/platexrelease.sty
+++ b/Master/texmf-dist/tex/platex/base/platexrelease.sty
@@ -71,7 +71,7 @@
 %% File: platexrelease.dtx
 \NeedsTeXFormat{pLaTeX2e}
 \ProvidesPackage{platexrelease}
-          [2020/03/28 v1.0n latexrelease support for pLaTeX Kernel
+          [2021/02/13 v1.0o latexrelease support for pLaTeX Kernel
               (including releases up to \platexreleaseversion)]
 \ifx\p@warn@latexrelease\@undefined\else
 \let\p@warn@latexrelease\relax
@@ -88,6 +88,8 @@
     Version of `latexrelease' is newer than\MessageBreak
     what `platexrelease' knows}
 \fi
+\edef\sourcepLaTeXdate{%
+  \expandafter\@parse@version\pfmtversion//00\@nil}
 \DeclareOption*{%
   \def\@plIncludeInRelease#1[#2]{\@plIncludeInRele@se{#1}}%
   \let\requestedplpatchdate\CurrentOption}
@@ -144,6 +146,7 @@ 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-10-01>+2 (prepare for LaTeX2e <2021-05-01>)
   % * <2020-10-01>+1
   % * <2020-10-01>
   % * <2020-04-12>
@@ -709,7 +712,106 @@ of this package available from CTAN}
 \plEndIncludeInRelease
 \plIncludeInRelease{2020/04/12}{\selectfont}
                    {Check \KanjiEncodingPair}%
+\ifx\delayed@f@adjustment\@undefined % --- for <= 2020-10-01 BEGIN
+%%
+\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}
+%%
+\else        % --- for <= 2020-10-01 END & for >= 2021-05-01 BEGIN
+%%
 \DeclareRobustCommand\selectfont{%
+  % !! sync with ltfsstrc.dtx 2020/12/22 v3.0n BEGIN
+  \ifx\delayed@k@adjustment\@empty
+  \else
+    \let\k@shape@saved\k@shape
+    \let\k@series@saved\k@series
+    \delayed@k@adjustment
+    \begingroup\let\f@encoding\k@encoding\let\f@family\k@family
+      \maybe@load@fontshape\endgroup
+    \ifcsname \k@encoding/\k@family/\k@series/\k@shape \endcsname
+    \else
+      \let\k@shape\k@shape@saved
+      \let\k@series\k@series@saved
+      \let\delayed@merge@kanji@shape\merge@kanji@shape
+      \let\delayed@merge@kanji@series\merge@kanji@series
+      \delayed@k@adjustment
+      \let\delayed@merge@kanji@shape\merge@kanji@shape@without@substitution
+      \let\delayed@merge@kanji@series\merge@kanji@series@without@substitution
+    \fi
+    \let\delayed@k@adjustment\@empty
+  \fi
+  \ifx\delayed@f@adjustment\@empty
+  \else
+    \let\f@shape@saved\f@shape
+    \let\f@series@saved\f@series
+    \delayed@f@adjustment
+    \maybe@load@fontshape
+    \ifcsname \f@encoding/\f@family/\f@series/\f@shape \endcsname
+    \else
+      \let\f@shape\f@shape@saved
+      \let\f@series\f@series@saved
+      \let\delayed@merge@font@shape\merge@font@shape
+      \let\delayed@merge@font@series\merge@font@series
+      \delayed@f@adjustment
+      \let\delayed@merge@font@shape\merge@font@shape@without@substitution
+      \let\delayed@merge@font@series\merge@font@series@without@substitution
+    \fi
+    \let\delayed@f@adjustment\@empty
+  \fi
+  % !! sync with ltfsstrc.dtx 2020/12/22 v3.0n END
   \let\tmp@error@fontshape\error@fontshape
   \let\error@fontshape\error@kfontshape
   \edef\tmp@item{{\k@encoding}}%
@@ -759,11 +861,14 @@ of this package available from CTAN}
   \xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}%
   \pickup@font
   \font@name
+  \UseHook{selectfont}% since LaTeX2e 2021-05-01
   \enc@update
   \ifx\f@linespread\baselinestretch \else
     \set@fontsize\baselinestretch\f@size\f@baselineskip
   \fi
   \size@update}
+%%
+\fi          % --- for >= 2021-05-01 END
 \plEndIncludeInRelease
 \plIncludeInRelease{0000/00/00}{\selectfont}
                    {ASCII Corporation original}%
@@ -970,22 +1075,47 @@ of this package available from CTAN}
 \else
   \pltx@temp@catcode@ix  % reveal if-tokens
 \fi
+\ifx\delayed@f@adjustment\@undefined   % old
+  \let\delayed@k@adjustment\@undefined
+\else                                  % 2021-05-01
+  \let\delayed@k@adjustment\@empty
+\fi
 \ifx\fontseriesforce\@undefined  % old
 \DeclareRobustCommand\romanseries[1]{\edef\f@series{#1}}
 \DeclareRobustCommand\kanjiseries[1]{\edef\k@series{#1}}
 \DeclareRobustCommand\fontseries[1]{\kanjiseries{#1}\romanseries{#1}}
 \else                            % 2020-02-02
+\ifx\delayed@f@adjustment\@undefined % --- for <= 2020-10-01 BEGIN
 \DeclareRobustCommand\romanseries[1]{\@forced@seriesfalse\merge@font@series{#1}}
 \DeclareRobustCommand\kanjiseries[1]{\@forced@seriesfalse\merge@kanji@series{#1}}
 \DeclareRobustCommand\fontseries[1]{\kanjiseries{#1}\romanseries{#1}}
+\else        % --- for <= 2020-10-01 END & for >= 2021-05-01 BEGIN
+\DeclareRobustCommand\romanseries[1]{\@forced@seriesfalse
+    \expandafter\def\expandafter\delayed@f@adjustment\expandafter
+        {\delayed@f@adjustment\delayed@merge@font@series{#1}}}
+\DeclareRobustCommand\kanjiseries[1]{\@forced@seriesfalse
+    \expandafter\def\expandafter\delayed@k@adjustment\expandafter
+        {\delayed@k@adjustment\delayed@merge@kanji@series{#1}}}
+\DeclareRobustCommand\fontseries[1]{\kanjiseries{#1}\romanseries{#1}}
+\fi          % --- for >= 2021-05-01 END
 \fi
 \ifx\fontseriesforce\@undefined  % old
 \let\romanseriesforce\@undefined
 \let\kanjiseriesforce\@undefined
 \else                            % 2020-02-02
+\ifx\delayed@f@adjustment\@undefined % --- for <= 2020-10-01 BEGIN
 \DeclareRobustCommand\romanseriesforce[1]{\@forced@seriestrue\edef\f@series{#1}}
 \DeclareRobustCommand\kanjiseriesforce[1]{\@forced@seriestrue\edef\k@series{#1}}
 \DeclareRobustCommand\fontseriesforce[1]{\kanjiseriesforce{#1}\romanseriesforce{#1}}
+\else        % --- for <= 2020-10-01 END & for >= 2021-05-01 BEGIN
+\DeclareRobustCommand\romanseriesforce[1]{\@forced@seriestrue
+    \expandafter\def\expandafter\delayed@f@adjustment\expandafter
+      {\delayed@f@adjustment\edef\f@series{#1}}}
+\DeclareRobustCommand\kanjiseriesforce[1]{\@forced@seriestrue
+    \expandafter\def\expandafter\delayed@k@adjustment\expandafter
+      {\delayed@k@adjustment\edef\k@series{#1}}}
+\DeclareRobustCommand\fontseriesforce[1]{\kanjiseriesforce{#1}\romanseriesforce{#1}}
+\fi          % --- for >= 2021-05-01 END
 \fi
 \ifx\fontseriesforce\@undefined  % old
 \let\merge@kanji@series\@undefined
@@ -1025,6 +1155,28 @@ of this package available from CTAN}
     \series@maybe@drop@one@m\k@series\k@series
 }
 \fi
+\ifx\merge@font@series@without@substitution\@undefined % old
+\let\merge@kanji@series@without@substitution\@undefined
+\let\merge@kanji@series@without@substitution@\@undefined
+\let\delayed@merge@kanji@series\@undefined
+\else                                                  % 2021-05-01
+\def\merge@kanji@series@without@substitution#1{%
+  \expandafter\expandafter\expandafter
+  \merge@kanji@series@without@substitution@
+    \csname series@\k@series @#1\endcsname
+    {#1}%
+    \@nil
+}
+\def\merge@kanji@series@without@substitution@#1#2#3\@nil{%
+  \def\reserved@a{#3}%
+  \ifx\reserved@a\@empty
+    \set@target@series@kanji{#2}%
+  \else
+    \set@target@series@kanji{#1}%
+  \fi
+}
+\let\delayed@merge@kanji@series\merge@kanji@series@without@substitution
+\fi
 \newif\if@shape@roman@kanji
 \plIncludeInRelease{2020/04/12}{\fontshape}
                    {No \k@shape update if unavailable}%
@@ -1036,12 +1188,25 @@ of this package available from CTAN}
   \edef\f@shape{#1}%
 }
 \else                            % 2020-02-02
+\ifx\delayed@f@adjustment\@undefined % --- for <= 2020-10-01 BEGIN
 \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}
+\else        % --- for <= 2020-10-01 END & for >= 2021-05-01 BEGIN
+\DeclareRobustCommand\romanshape[1]{%
+    \expandafter\def\expandafter\delayed@f@adjustment\expandafter
+        {\delayed@f@adjustment\delayed@merge@font@shape{#1}}}
+\DeclareRobustCommand\kanjishape[1]{%
+    \expandafter\def\expandafter\delayed@k@adjustment\expandafter
+        {\delayed@k@adjustment\delayed@merge@kanji@shape{#1}}}
+\DeclareRobustCommand\fontshape[1]{%
+  \@shape@roman@kanjitrue
+  \kanjishape{#1}\romanshape{#1}%
+  \@shape@roman@kanjifalse}
+\fi          % --- for >= 2021-05-01 END
 \fi
 \plEndIncludeInRelease
 \plIncludeInRelease{0000/00/00}{\fontshape}
@@ -1062,12 +1227,27 @@ of this package available from CTAN}
 \let\romanshapeforce\@undefined
 \let\kanjishapeforce\@undefined
 \else                            % 2020-02-02
+\ifx\delayed@f@adjustment\@undefined % --- for <= 2020-10-01 BEGIN
 \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}%
 }
+\else        % --- for <= 2020-10-01 END & for >= 2021-05-01 BEGIN
+\DeclareRobustCommand\romanshapeforce[1]{%
+    \expandafter\def\expandafter\delayed@f@adjustment\expandafter
+        {\delayed@f@adjustment\edef\f@shape{#1}}}
+\DeclareRobustCommand\kanjishapeforce[1]{%
+    \expandafter\def\expandafter\delayed@k@adjustment\expandafter
+        {\delayed@k@adjustment\edef\k@shape{#1}}}
+\DeclareRobustCommand\fontshapeforce[1]{%
+    \expandafter\def\expandafter\delayed@k@adjustment\expandafter
+        {\delayed@k@adjustment\set@safe@kanji@shape{#1}{}}%
+    \expandafter\def\expandafter\delayed@f@adjustment\expandafter
+        {\delayed@f@adjustment\edef\f@shape{#1}}%
+}
+\fi          % --- for >= 2021-05-01 END
 \fi
 \plEndIncludeInRelease
 \plIncludeInRelease{0000/00/00}{\fontshapeforce}
@@ -1162,6 +1342,28 @@ of this package available from CTAN}
 }
 \fi
 \plEndIncludeInRelease
+\ifx\merge@font@shape@without@substitution\@undefined  % old
+\let\merge@kanji@shape@without@substitution\@undefined
+\let\merge@kanji@shape@without@substitution@\@undefined
+\let\delayed@merge@kanji@shape\@undefined
+\else                                                  % 2021-05-01
+\def\merge@kanji@shape@without@substitution#1{%
+  \expandafter\expandafter\expandafter
+  \merge@kanji@shape@without@substitution@
+    \csname shape@\k@shape @#1\endcsname
+    {#1}%
+    \@nil
+}
+\def\merge@kanji@shape@without@substitution@#1#2#3\@nil{%
+  \def\reserved@a{#3}%
+  \ifx\reserved@a\@empty
+    \edef\k@shape{#2}%
+  \else
+    \edef\k@shape{#1}%
+  \fi
+}
+\let\delayed@merge@kanji@shape\merge@kanji@shape@without@substitution
+\fi
 \plIncludeInRelease{2020/04/12}{\set@safe@kanji@shape}
                    {No \k@shape update if unavailable}%
 \def\set@safe@kanji@shape#1#2{%
@@ -1185,6 +1387,7 @@ of this package available from CTAN}
 \plEndIncludeInRelease
 \plIncludeInRelease{2020/02/02}{\usefont}
                    {Don't call \fontseries or \fontshape}%
+\ifx\set@target@series\@undefined
 \DeclareRobustCommand\usekanji[4]{\kanjiencoding{#1}%
     \edef\k@family{#2}%
     \edef\k@series{#3}%
@@ -1195,6 +1398,18 @@ of this package available from CTAN}
     \edef\f@series{#3}%
     \edef\f@shape{#4}\selectfont
     \ignorespaces}
+\else
+\DeclareRobustCommand\usekanji[4]{\kanjiencoding{#1}%
+    \edef\k@family{#2}%
+    \set@target@series@kanji{#3}%
+    \edef\k@shape{#4}\selectfont
+    \ignorespaces}
+\DeclareRobustCommand\useroman[4]{\romanencoding{#1}%
+    \edef\f@family{#2}%
+    \set@target@series{#3}%
+    \edef\f@shape{#4}\selectfont
+    \ignorespaces}
+\fi
 \DeclareRobustCommand\usefont[4]{%
   \edef\tmp@item{{#1}}%
   \expandafter\expandafter\expandafter
-- 
cgit v1.2.3

