diff options
author | Karl Berry <karl@freefriends.org> | 2020-04-12 21:29:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-04-12 21:29:19 +0000 |
commit | 656c2588b2ce9d477986f176d75589bbec400918 (patch) | |
tree | e482ac945b769cf33c28e2178b98b24e39be76c2 /Master/texmf-dist/tex/platex | |
parent | bc586b17cad1faa7785d5765df0889659f314eb0 (diff) |
platex (12apr20)
git-svn-id: svn://tug.org/texlive/trunk@54697 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/platex')
-rw-r--r-- | Master/texmf-dist/tex/platex/base/exppl2e.sty | 100 | ||||
-rw-r--r-- | Master/texmf-dist/tex/platex/base/platexrelease.sty | 871 | ||||
-rw-r--r-- | Master/texmf-dist/tex/platex/base/plcore.ltx | 543 | ||||
-rw-r--r-- | Master/texmf-dist/tex/platex/base/ptrace.sty | 65 |
4 files changed, 1325 insertions, 254 deletions
diff --git a/Master/texmf-dist/tex/platex/base/exppl2e.sty b/Master/texmf-dist/tex/platex/base/exppl2e.sty index b28fa53dbbe..b5fc0cc2f36 100644 --- a/Master/texmf-dist/tex/platex/base/exppl2e.sty +++ b/Master/texmf-dist/tex/platex/base/exppl2e.sty @@ -34,7 +34,7 @@ % case 1: This file must be a normal package \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{exppl2e} - [2020/02/09 v1.1f Experimental pLaTeX2e features] + [2020/02/10 v1.1g Experimental pLaTeX2e features] \PackageWarningNoLine{exppl2e}{% This is the unstable, experimental part of pLaTeX2e.\MessageBreak This package may contain:\MessageBreak @@ -332,107 +332,13 @@ % % \section{\cs{verb}$B@hF,$N9g;zM^@)$H(B\cs{xkanjiskip}} % -% \begin{macro}{\do@noligs} -% |>|$B$J$I$N0lIt$NJ8;z$K$D$$$F!"(B|\xspcode`\>=3|$B$H$7$?$H$-$K(B -% |\texttt{>}|$B$G$OA08e$K(B|\xkanjiskip|$BM3Mh$N%"%-$,F~$k$N$K!"(B -% |\verb+>+|$B$G$O8e$m$K$7$+%"%-$,F~$i$J$$$H$$$&8=>]$KBP=h$7$^$9!#(B -% -% $B85$NDj5A$O(B\file{ltmiscen.dtx}$B$r;2>H$7$F$/$@$5$$!#(B -% p\LaTeX{}$B$G$O!"(B|\kern\z@|$B$r(B|\vadjust{}|$B$KCV$-49$($k$3$H$G(B -% $B!V9g;z=hM}$rM^;_!W$+$D!VOB2$J84V%9%Z!<%9$NA^F~=hM}$OF)2a!W$r<B8=$7$^$9!#(B -% (Issue \#87) -% \begin{macrocode} -\def\do@noligs#1{% - \catcode`#1\active - \begingroup - \lccode`\~`#1\relax - \lowercase{\endgroup\def~{\leavevmode\vadjust{}\char`#1}}} -% \end{macrocode} -% \end{macro} +% 2020/04/12$B$KF3F~:Q$_!#(B % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \section{NFSS$B$N(Bsize function$B$NF|K\8l2=(B} % -% \begin{macro}{\inlist@} -% |\do@subst@correction|$B$NF|K\8l2=$KI,MW$J$N$G!"(B -% $BHf3S$9$k:]$K0z?t!&%j%9%H$H$b(B\cs{detokenize}$B$K$h$C$FJ8;zNs2=$9$k$h$&$K$7$^$7$?!#(B -% \changes{v1.6x}{2020/02/05}{$B0z?t!&%j%9%H$H$b(B\cs{detokenize}$B$K$h$C$FJ8;zNs2=(B} -% \begin{macrocode} -\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} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\do@subst@correction} -% \begin{macro}{\pltx@do@subst@correction@al} -% \begin{macro}{\pltx@do@subst@correction@yoko} -% \begin{macro}{\pltx@do@subst@correction@tate} -% |\font|$B$O2$J8%U%)%s%H$rJV$9$?$a!"(B\LaTeX{}$B$N85$N(B|\do@subst@correction|$B$O(B -% $BOBJ8%U%)%s%H$KBP$7$F;H$($^$;$s$N$G!"OBJ8$KBP1~$5$;$^$9!#(B -% \changes{v1.6x}{2020/02/05}{\cs{do@subst@correction}$B$NF|K\8l2=(B} -% -% $B%*%j%8%J%k$N(B\LaTeX{}$B$NDj5A$O!"2$J8MQ$H$7$F;H$$$^$9!#(B -% \begin{macrocode} -\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 -} -% \end{macrocode} -% $BOBJ82#AHMQ$HOBJ8=DAHMQ$NDj5A$G$O!"$=$l$>$l(B|\jfont|$B$H(B|\tfont|$B$r;H$$$^$9!#(B -% \begin{macrocode} -\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 -} -% \end{macrocode} -% $B$=$7$F!"%(%s%3!<%G%#%s%0$K1~$8$F(B3$B$D$NL?Na$r;H$$J,$1$^$9!#(B -% \begin{macrocode} -\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 -} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} +% 2020/04/12$B$KF3F~:Q$_!#(B % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 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{% diff --git a/Master/texmf-dist/tex/platex/base/plcore.ltx b/Master/texmf-dist/tex/platex/base/plcore.ltx index 13dc9165aa4..6c9eb8ef549 100644 --- a/Master/texmf-dist/tex/platex/base/plcore.ltx +++ b/Master/texmf-dist/tex/platex/base/plcore.ltx @@ -33,19 +33,12 @@ \fi \def\pfmtname{pLaTeX2e} \def\pfmtversion - {2020-02-02} -\def\ppatch@level{3} + {2020-04-12} +\def\ppatch@level{0} \edef\platexBANNER{\noexpand\platexNILa \the\everyjob % LaTeX banner and delayed codes \noexpand\platexNILb} \begingroup - \def\platexNILa#1\typeout#2#3\platexNILb{#1} - \toks0=\expandafter\expandafter\expandafter{\platexBANNER} - \global\everyjob\expandafter{\the\toks0}% -\endgroup -\begingroup - \def\platexNILa#1\typeout#2#3\platexNILb{#2} - \toks0=\expandafter\expandafter\expandafter{\platexBANNER} \ifnum\ppatch@level=0 \toks2={\pfmtname\space<\pfmtversion>\space}% \else\ifnum\ppatch@level>0 @@ -53,15 +46,9 @@ \else \toks2={\pfmtname\space<\pfmtversion>-pre\ppatch@level\space}% \fi\fi - \edef\platexBANNER{\the\everyjob - \noexpand\typeout{\the\toks2 (based on \the\toks0)}} - \global\everyjob\expandafter{\platexBANNER}% -\endgroup -\begingroup - \def\platexNILa#1\typeout#2#3\platexNILb{#3} - \toks0=\expandafter\expandafter\expandafter{\platexBANNER} - \edef\platexBANNER{\the\everyjob \the\toks0} - \global\everyjob\expandafter{\platexBANNER}% + \edef\platexNILa#1\typeout#2#3\platexNILb{% + #1\noexpand\typeout{\the\toks2 (based on #2)}#3} + \global\everyjob\expandafter\expandafter\expandafter{\platexBANNER}% \endgroup \let\platexBANNER=\@undefined \newif\if@plincludeinrelease @@ -134,9 +121,15 @@ \newdimen\cHT \let\afont\font \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@@} + \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} \def\fam@elt{\noexpand\fam@elt} \def\enc@elt{\noexpand\enc@elt} \def\fenc@list{\enc@elt<OML>\enc@elt<T1>\enc@elt<OT1>\enc@elt<OMS>% @@ -292,6 +285,15 @@ \let\default@KM\@empty \@onlypreamble\DeclareKanjiEncodingDefaults \def\KanjiEncodingPair#1#2{\@namedef{t@enc@#1}{#2}\@namedef{y@enc@#2}{#1}} +\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} \def\DeclareFontFamily#1#2#3{% \@ifundefined{T@#1}% {\@latex@error{Encoding scheme `#1' unknown}\@eha}% @@ -347,9 +349,9 @@ \cdp@list \xdef\cdp@list{\the\toks@}% \endgroup - \global\@namedef{D@#1}{\def\default@family{#2}% - \def\default@series{#3}% - \def\default@shape{#4}}% + \global\@namedef{D@#1}{\def\default@k@family{#2}% !!! + \def\default@k@series{#3}% !!! + \def\default@k@shape{#4}}% !!! \fi} \@onlypreamble\DeclareKanjiSubstitution \def\DeclareErrorKanjiFont#1#2#3#4#5{% @@ -362,6 +364,78 @@ \gdef\default@k@shape{#4}% } \@onlypreamble\DeclareErrorKanjiFont +\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 +} \def\DeclareFixedFont#1#2#3#4#5#6{% \begingroup \let\afont\font @@ -389,6 +463,46 @@ \let\font\afont \endgroup } +\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 +} \def\reDeclareMathAlphabet#1#2#3{% \edef#1{\noexpand\protect\expandafter\noexpand\csname% \expandafter\@gobble\string#1\space\space\endcsname}% @@ -466,12 +580,14 @@ \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 @@ -677,23 +793,38 @@ \edef\k@family{#1}\edef\f@family{#1}% \fi\fi} \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.} - \@@end + \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}} @@ -745,26 +876,26 @@ \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 -\fi +\newif\if@shape@roman@kanji \ifx\fontshapeforce\@undefined % old \DeclareRobustCommand\romanshape[1]{\edef\f@shape{#1}} \DeclareRobustCommand\kanjishape[1]{\edef\k@shape{#1}} -\DeclareRobustCommand\fontshape[1]{\kanjishape{#1}\romanshape{#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]{\kanjishape{#1}\romanshape{#1}} +\DeclareRobustCommand\fontshape[1]{% + \@shape@roman@kanjitrue + \kanjishape{#1}\romanshape{#1}% + \@shape@roman@kanjifalse} \fi \ifx\fontshapeforce\@undefined % old \let\romanshapeforce\@undefined @@ -772,7 +903,10 @@ \else % 2020-02-02 \DeclareRobustCommand\romanshapeforce[1]{\edef\f@shape{#1}} \DeclareRobustCommand\kanjishapeforce[1]{\edef\k@shape{#1}} -\DeclareRobustCommand\fontshapeforce[1]{\kanjishapeforce{#1}\romanshapeforce{#1}} +\DeclareRobustCommand\fontshapeforce[1]{% + \set@safe@kanji@shape{#1}{}% + \edef\f@shape{#1}% +} \fi \ifx\fontseriesforce\@undefined % old \let\merge@kanji@shape\@undefined @@ -788,7 +922,11 @@ \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 @@ -800,13 +938,31 @@ \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 +\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}% +} \DeclareRobustCommand\usekanji[4]{\kanjiencoding{#1}% \edef\k@family{#2}% \edef\k@series{#3}% @@ -824,6 +980,7 @@ \ifin@ \usekanji{#1}{#2}{#3}{#4}% \else\useroman{#1}{#2}{#3}{#4}% \fi} +\ifx\@defaultfamilyhook\@undefined % old \DeclareRobustCommand\normalfont{% \kanjiencoding{\kanjiencodingdefault}% \edef\k@family{\kanjifamilydefault}% @@ -833,7 +990,15 @@ \edef\f@family{\familydefault}% \edef\f@series{\seriesdefault}% \edef\f@shape{\shapedefault}% - \selectfont\ignorespaces} + \selectfont} +\else % 2020-02-02 PL2 +\g@addto@macro\@defaultfamilyhook{% + \kanjiencoding{\kanjiencodingdefault}% + \edef\k@family{\kanjifamilydefault}% + \edef\k@series{\kanjiseriesdefault}% + \edef\k@shape{\kanjishapedefault}% +} +\fi \adjustbaseline \let\reset@font\normalfont \ifx\bfseries@rm\@undefined % old @@ -854,49 +1019,70 @@ \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 \let\@meta@family@list@kanji\@undefined \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}% @@ -911,15 +1097,15 @@ \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}% @@ -935,10 +1121,10 @@ \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{% @@ -951,9 +1137,14 @@ \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 @@ -986,23 +1177,144 @@ \fi \DeclareTextFontCommand{\textmc}{\mcfamily} \DeclareTextFontCommand{\textgt}{\gtfamily} -\ifx\DeclareEmphSequence\@undefined % old -\DeclareRobustCommand\em - {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ - \eminnershape \else \gtfamily \itshape \fi}% -\else -\DeclareRobustCommand\em{% % 2020-02-02 - \@nomath\em - \ifx\emfontdeclare@clist\@empty - \ifdim \fontdimen\@ne\font >\z@ - \eminnershape \else \gtfamily \itshape \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 - \edef\em@currfont{\csname\curr@fontshape/\f@size\endcsname}% - \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update + \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 -\def\eminnershape{\mcfamily \upshape}% +\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 \let\romanprocess@table\process@table \def\kanjiprocess@table{% \kanjiencoding{\kanjiencodingdefault}% @@ -1016,6 +1328,23 @@ } \@onlypreamble\romanprocess@table \@onlypreamble\kanjiprocess@table +\ifx\DeclareEmphSequence\@undefined % old +\DeclareRobustCommand\em + {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ + \eminnershape \else \gtfamily \itshape \fi}% +\else +\DeclareRobustCommand\em{% % 2020-02-02 + \@nomath\em + \ifx\emfontdeclare@clist\@empty + \ifdim \fontdimen\@ne\font >\z@ + \eminnershape \else \gtfamily \itshape \fi + \else + \edef\em@currfont{\csname\curr@fontshape/\f@size\endcsname}% + \expandafter\do@emfont@update\emfontdeclare@clist\do@emfont@update + \fi +} +\fi +\def\eminnershape{\mcfamily \upshape}% \DeclareTextCommandDefault{\textunderscore}{% \leavevmode\kern.06em \raise-\iftdir\ifmdir\ybaselineshift @@ -1499,6 +1828,11 @@ \language\l@nohyphenation \@ifstar\@sverb\@verb} \fi +\def\do@noligs#1{% + \catcode`#1\active + \begingroup + \lccode`\~`#1\relax + \lowercase{\endgroup\def~{\leavevmode\vadjust{}\char`#1}}} \gdef\@startline{% \ifnum \@nxttabmar >\@hightab \@badtab @@ -1626,16 +1960,23 @@ \let\document@default@language\m@ne \fi %% File: plvers.dtx -\AtBeginDocument{% - \@ifpackageloaded{latexrelease}{% - \@ifpackageloaded{platexrelease}{}{% +\expandafter\def\expandafter\process@table\expandafter{% + \expandafter\p@warn@latexrelease\process@table} +\begingroup +\toks@\expandafter{\expandafter\p@warn@latexrelease\@begindocumenthook} +\xdef\@begindocumenthook{\the\toks@} +\endgroup +\def\p@warn@latexrelease{% + \ifx\latexreleaseversion\@undefined\else + \ifx\platexreleaseversion\@undefined \@latex@warning@no@line{% Package latexrelease is loaded.\MessageBreak Some patches in pLaTeX2e core may be overwritten.\MessageBreak Consider using platexrelease.\MessageBreak See platex.pdf for detail}% - }% - }{}% + \fi + \fi + \let\p@warn@latexrelease\relax } \endinput %% diff --git a/Master/texmf-dist/tex/platex/base/ptrace.sty b/Master/texmf-dist/tex/platex/base/ptrace.sty index 45d5ecd800d..dda02ecb82a 100644 --- a/Master/texmf-dist/tex/platex/base/ptrace.sty +++ b/Master/texmf-dist/tex/platex/base/ptrace.sty @@ -15,8 +15,10 @@ %% File: plfonts.dtx \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{ptrace} - [2019/09/16 v1.6t Standard pLaTeX package (font tracing)] + [2020/03/26 v1.7e Standard pLaTeX package (font tracing)] \RequirePackageWithOptions{tracefnt} +\plIncludeInRelease{2020/04/12}{\selectfont} + {Check \KanjiEncodingPair}% \DeclareRobustCommand\selectfont{% \let\tmp@error@fontshape\error@fontshape \let\error@fontshape\error@kfontshape @@ -25,12 +27,14 @@ \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 @@ -72,6 +76,65 @@ \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 + \ifnum \tracingfonts>\tw@ + \@font@info{Roman:Switching to \font@name}\fi + \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{% |