From 6c3a92a60f9e87866c2ebf6e34e98efb7ab20958 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 12 Nov 2021 23:10:30 +0000 Subject: firstaid (12nov21) git-svn-id: svn://tug.org/texlive/trunk@61042 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/firstaid/changes.txt | 10 ++ .../latex2e-first-aid-for-external-files.pdf | Bin 245736 -> 238410 bytes .../latex2e-first-aid-for-external-files.dtx | 134 ++++----------------- .../texmf-dist/tex/latex/firstaid/filehook-ltx.sty | 26 ++-- .../latex2e-first-aid-for-external-files.ltx | 58 ++------- Master/tlpkg/bin/c2lx | 2 +- Master/tlpkg/libexec/ctan2tds | 1 + 7 files changed, 57 insertions(+), 174 deletions(-) diff --git a/Master/texmf-dist/doc/latex/firstaid/changes.txt b/Master/texmf-dist/doc/latex/firstaid/changes.txt index f84c9dbc5b7..6f8268c6b6c 100644 --- a/Master/texmf-dist/doc/latex/firstaid/changes.txt +++ b/Master/texmf-dist/doc/latex/firstaid/changes.txt @@ -1,3 +1,13 @@ +2021-11-11 Frank Mittelbach + + * latex2e-first-aid-for-external-files.dtx: + Drop first aid no longer needed. + +2021-10-22 Frank Mittelbach + + * latex2e-first-aid-for-external-files.dtx (subsection{The \pkg{CJK} package first aid}): + With its 2021/10/26 release the firstaid for CJK is no longer needed. + 2021-06-28 Frank Mittelbach * latex2e-first-aid-for-external-files.dtx: diff --git a/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf b/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf index 5b395e4e100..d505fa379bf 100644 Binary files a/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf and b/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf differ diff --git a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx index b15a63d7ec3..fb8d3401373 100644 --- a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx +++ b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx @@ -111,8 +111,8 @@ % \end{macrocode} % % \begin{macrocode} -\def\LaTeXFirstAidDate{2021/06/28} -\def\LaTeXFirstAidVersion{v1.0o} +\def\LaTeXFirstAidDate{2021/11/11} +\def\LaTeXFirstAidVersion{v1.0q} % \end{macrocode} % % \begin{macrocode} @@ -227,9 +227,9 @@ % % \begin{macrocode} \newcommand\AtBeginOfFile [2] - {\AddToHook{file/before/#1}{#2}} + {\AddToHook{file/#1/before}{#2}} \newcommand\AtEndOfFile [2] - {\AddToHook{file/after/#1}{#2}} + {\AddToHook{file/#1/after}{#2}} % \end{macrocode} % % Some commands offered a starred form @@ -238,8 +238,8 @@ {\IfBooleanTF{#1}% {\@ifpackageloaded{#2}% {#3}% - {\AddToHook{package/before/#2}{#3}}}% - {\AddToHook{package/before/#2}{#3}}% + {\AddToHook{package/#2/before}{#3}}}% + {\AddToHook{package/#2/before}{#3}}% } % \end{macrocode} % @@ -248,8 +248,8 @@ {\IfBooleanTF{#1}% {\@ifpackageloaded{#2}% {#3}% - {\AddToHook{package/after/#2}{#3}}}% - {\AddToHook{package/after/#2}{#3}}% + {\AddToHook{package/#2/after}{#3}}}% + {\AddToHook{package/#2/after}{#3}}% } % \end{macrocode} % @@ -260,25 +260,25 @@ {\IfBooleanTF{#1}% {\@ifclassloaded{#2}% {#3}% - {\AddToHook{class/before/#2}{#3}}}% - {\AddToHook{class/before/#2}{#3}}% + {\AddToHook{class/#2/before}{#3}}}% + {\AddToHook{class/#2/before}{#3}}% } \DeclareDocumentCommand \AtEndOfClassFile {smm} {\IfBooleanTF{#1}% {\@ifclassloaded{#2}% {#3}% - {\AddToHook{class/after/#2}{#3}}}% - {\AddToHook{class/after/#2}{#3}}% + {\AddToHook{class/#2/after}{#3}}}% + {\AddToHook{class/#2/after}{#3}}% } % \end{macrocode} % % \begin{macrocode} \newcommand\AtBeginOfIncludeFile [2] - {\AddToHook{include/before/#1}{#2}} + {\AddToHook{include/#1/before}{#2}} \newcommand\AtEndOfIncludeFile [2] - {\AddToHook{include/end/#1}{#2}} + {\AddToHook{include/#1/end}{#2}} \newcommand\AfterIncludeFile [2] - {\AddToHook{include/after/#1}{#2}} + {\AddToHook{include/#1/after}{#2}} % \end{macrocode} % % \begin{macrocode} @@ -302,7 +302,7 @@ % If the package gets updated one can easily take that out simply % through %\begin{verbatim} -% \RemoveFromHook{file/after/biditools.sty}[firstaid] +% \RemoveFromHook{file/biditools.sty/after}[firstaid] %\end{verbatim} % This makes it easy to test new bidi code while the first aid code % is still in the kernel. @@ -312,7 +312,7 @@ % \end{macrocode} % % \begin{macrocode} -\AddToHook{file/after/biditools.sty}[firstaid]{% +\AddToHook{file/biditools.sty/after}[firstaid]{% \FirstAidNeededT{biditools}{sty}% {2020/05/13 v2 Programming tools for bidi package}% {% @@ -347,7 +347,7 @@ % Again a case of a no longer correct \cs{endgroup} in document. % Here the fix is simply though. % \begin{macrocode} -\AddToHook{file/after/dinbrief.cls}[firstaid]{% +\AddToHook{file/dinbrief.cls/after}[firstaid]{% \FirstAidNeededT{dinbrief}{cls}{2000/03/02 LaTeX2e class}% {\AddToHook{env/document/begin}{\begingroup}}% } @@ -369,7 +369,7 @@ % % \begin{macrocode} \ExplSyntaxOn -\AddToHook{file/after/pgfpages.sty}[firstaid]{% +\AddToHook{file/pgfpages.sty/after}[firstaid]{% % \end{macrocode} % Undo overwriting \cs{shipout}: % \begin{macrocode} @@ -396,7 +396,7 @@ % % \begin{macrocode} \ExplSyntaxOn -\AddToHook{file/after/pgfmorepages.sty}[firstaid]{ +\AddToHook{file/pgfmorepages.sty/after}[firstaid]{ \cs_set_nopar:Npn \pgfhookintoshipout { \cs_set_eq:NN \pgfpages@originalshipout \tex_shipout:D \cs_set_eq:NN \tex_shipout:D \pgfpages@interceptshipout @@ -455,69 +455,10 @@ % % % -% -% -% \subsection{The \pkg{CJK} package first aid} -% % \begin{macrocode} %<*kernel> % \end{macrocode} % -% The package redefines \cs{selectfont} to add some code but -% otherwise uses the old definition. So we make a copy of the -% newer kernel definition and restore it after the package got -% loaded. The extra code that the package needs can go into the -% newly provided hook instead. -% -% \begin{macrocode} -\DeclareCommandCopy\CJK@selectfont\selectfont -% \end{macrocode} -% -% \begin{macrocode} -\AddToHook{file/after/CJK.sty}[firstaid]{% - \FirstAidNeededT{CJK}{sty}% - {2015/04/18 4.8.4}% - {% - \DeclareCommandCopy\selectfont\CJK@selectfont -% \end{macrocode} -% -% \begin{macrocode} - \AddToHook{selectfont}[CJK]{% - \expandafter\ifx\csname CJK@\curr@fontshape\endcsname \relax - \else - \CJK@bold@false - \csname CJK@\curr@fontshape\endcsname - \fi - }% - }% -} -% \end{macrocode} -% -% -% -% \subsection{\cs{footref} first aid} -% -% A few classes unconditionally define \cs{footref}. Until that has -% changed we provide some first aid to let them do this. -% -% --- This seems to be resolved now --- -% -% \begin{macrocode} -%\AddToHook{file/after/scrkbase.sty}[firstaid]{% -% \FirstAidNeededT{scrkbase}{sty}% -% {2020/09/21 v3.32 KOMA-Script package (KOMA-Script-dependent basics and keyval usage)}% -% {\let\footref\@undefined} -% } -% \end{macrocode} -% -% \begin{macrocode} -%\AddToHook{class/before/memoir}[firstaid]{% -% % for version {2020/10/04 v3.7n configurable book, report, article document class}% -% \let\footref\@undefined -%} -% \end{macrocode} -% -% % % % @@ -536,7 +477,7 @@ % This firstaid therefore jumps over the problematical point by % pushing the count allocation to a safe value if necessary. % \begin{macrocode} -\AddToHook{file/after/bigfoot.sty}{% +\AddToHook{file/bigfoot.sty/after}{% \ifnum\count10<\insc@unt \global\count10=\insc@unt \fi @@ -566,7 +507,7 @@ % moment \pkg{ulem} gets adjusted. % % \begin{macrocode} -\AddToHook{file/after/ulem.sty}[firstaid]{% +\AddToHook{file/ulem.sty/after}[firstaid]{% \def\@hspace#1{\begingroup\setlength\skip@{#1}% \edef\x{\endgroup\hskip\the\skip@\relax}\x}% } @@ -585,7 +526,7 @@ % \cs{unskip}. % % \begin{macrocode} -\AddToHook{file/after/varwidth.sty}[firstaid]{% +\AddToHook{file/varwidth.sty/after}[firstaid]{% \FirstAidNeededT{varwidth}{sty}% {2009/03/30 ver 0.92; \space Variable-width minipages}% {% @@ -679,35 +620,6 @@ \ExplSyntaxOff % \end{macrocode} % -% The next fixes Github issue 605 (by inserting a \cs{scan\_stop:} -% before doing the check for hmode). -% \begin{macrocode} -\ExplSyntaxOn -\cs_set_protected:Npn \para_end: { - \scan_stop: - \mode_if_horizontal:TF { - \mode_if_inner:F { - \tex_unskip:D - \hook_use:n{para/end} - \@kernel@after@para@end - \mode_if_horizontal:TF { - \if_int_compare:w 0 < \tex_lastnodetype:D - \tex_kern:D \c_zero_dim - \fi: - \tex_par:D - \hook_use:n{para/after} - \@kernel@after@para@after - } - { \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} } - } - } - \tex_par:D -} -\cs_set_eq:NN \par \para_end: -\cs_set_eq:NN \@@par \para_end: -\cs_set_eq:NN \endgraf \para_end: -\ExplSyntaxOff -% \end{macrocode} % % \begin{macrocode} % diff --git a/Master/texmf-dist/tex/latex/firstaid/filehook-ltx.sty b/Master/texmf-dist/tex/latex/firstaid/filehook-ltx.sty index 2c80f60003b..8ae26decc4f 100644 --- a/Master/texmf-dist/tex/latex/firstaid/filehook-ltx.sty +++ b/Master/texmf-dist/tex/latex/firstaid/filehook-ltx.sty @@ -53,43 +53,43 @@ \newcommand\AtEndOfClasses [1] {\AddToHook{class/after}{#1}} \newcommand\AtBeginOfFile [2] - {\AddToHook{file/before/#1}{#2}} + {\AddToHook{file/#1/before}{#2}} \newcommand\AtEndOfFile [2] - {\AddToHook{file/after/#1}{#2}} + {\AddToHook{file/#1/after}{#2}} \DeclareDocumentCommand \AtBeginOfPackageFile {smm} {\IfBooleanTF{#1}% {\@ifpackageloaded{#2}% {#3}% - {\AddToHook{package/before/#2}{#3}}}% - {\AddToHook{package/before/#2}{#3}}% + {\AddToHook{package/#2/before}{#3}}}% + {\AddToHook{package/#2/before}{#3}}% } \DeclareDocumentCommand \AtEndOfPackageFile {smm} {\IfBooleanTF{#1}% {\@ifpackageloaded{#2}% {#3}% - {\AddToHook{package/after/#2}{#3}}}% - {\AddToHook{package/after/#2}{#3}}% + {\AddToHook{package/#2/after}{#3}}}% + {\AddToHook{package/#2/after}{#3}}% } \DeclareDocumentCommand \AtBeginOfClassFile {smm} {\IfBooleanTF{#1}% {\@ifclassloaded{#2}% {#3}% - {\AddToHook{class/before/#2}{#3}}}% - {\AddToHook{class/before/#2}{#3}}% + {\AddToHook{class/#2/before}{#3}}}% + {\AddToHook{class/#2/before}{#3}}% } \DeclareDocumentCommand \AtEndOfClassFile {smm} {\IfBooleanTF{#1}% {\@ifclassloaded{#2}% {#3}% - {\AddToHook{class/after/#2}{#3}}}% - {\AddToHook{class/after/#2}{#3}}% + {\AddToHook{class/#2/after}{#3}}}% + {\AddToHook{class/#2/after}{#3}}% } \newcommand\AtBeginOfIncludeFile [2] - {\AddToHook{include/before/#1}{#2}} + {\AddToHook{include/#1/before}{#2}} \newcommand\AtEndOfIncludeFile [2] - {\AddToHook{include/end/#1}{#2}} + {\AddToHook{include/#1/end}{#2}} \newcommand\AfterIncludeFile [2] - {\AddToHook{include/after/#1}{#2}} + {\AddToHook{include/#1/after}{#2}} \endinput %% %% End of file `filehook-ltx.sty'. diff --git a/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx b/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx index 249c312b517..cf96c582e7e 100644 --- a/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx +++ b/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx @@ -34,8 +34,8 @@ %% %% The LaTeX Project and any individual authors listed elsewhere %% in this file. -\def\LaTeXFirstAidDate{2021/06/28} -\def\LaTeXFirstAidVersion{v1.0o} +\def\LaTeXFirstAidDate{2021/11/11} +\def\LaTeXFirstAidVersion{v1.0q} \ProvidesFile{latex2e-first-aid-for-external-files.ltx} [\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space LaTeX kernel fixes to external files and packages] @@ -52,7 +52,7 @@ \exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3} } \ExplSyntaxOff -\AddToHook{file/after/biditools.sty}[firstaid]{% +\AddToHook{file/biditools.sty/after}[firstaid]{% \FirstAidNeededT{biditools}{sty}% {2020/05/13 v2 Programming tools for bidi package}% {% @@ -66,41 +66,26 @@ \bidi@afterenddocumentchecklabelsrerunhook}% }% } -\AddToHook{file/after/dinbrief.cls}[firstaid]{% +\AddToHook{file/dinbrief.cls/after}[firstaid]{% \FirstAidNeededT{dinbrief}{cls}{2000/03/02 LaTeX2e class}% {\AddToHook{env/document/begin}{\begingroup}}% } \ExplSyntaxOn -\AddToHook{file/after/pgfpages.sty}[firstaid]{% +\AddToHook{file/pgfpages.sty/after}[firstaid]{% \cs_gset_eq:NN \shipout \pgfpages@originalshipout \cs_set_eq:NN \pgfpages@originalshipout \tex_shipout:D \cs_set_eq:NN \tex_shipout:D \pgfpages@interceptshipout } \ExplSyntaxOff \ExplSyntaxOn -\AddToHook{file/after/pgfmorepages.sty}[firstaid]{ +\AddToHook{file/pgfmorepages.sty/after}[firstaid]{ \cs_set_nopar:Npn \pgfhookintoshipout { \cs_set_eq:NN \pgfpages@originalshipout \tex_shipout:D \cs_set_eq:NN \tex_shipout:D \pgfpages@interceptshipout } } \ExplSyntaxOff -\DeclareCommandCopy\CJK@selectfont\selectfont -\AddToHook{file/after/CJK.sty}[firstaid]{% - \FirstAidNeededT{CJK}{sty}% - {2015/04/18 4.8.4}% - {% - \DeclareCommandCopy\selectfont\CJK@selectfont - \AddToHook{selectfont}[CJK]{% - \expandafter\ifx\csname CJK@\curr@fontshape\endcsname \relax - \else - \CJK@bold@false - \csname CJK@\curr@fontshape\endcsname - \fi - }% - }% -} -\AddToHook{file/after/bigfoot.sty}{% +\AddToHook{file/bigfoot.sty/after}{% \ifnum\count10<\insc@unt \global\count10=\insc@unt \fi @@ -109,11 +94,11 @@ \expandafter\FN@allmarks\expandafter{\number\numexpr#1+\@ne}% \fi}% } -\AddToHook{file/after/ulem.sty}[firstaid]{% +\AddToHook{file/ulem.sty/after}[firstaid]{% \def\@hspace#1{\begingroup\setlength\skip@{#1}% \edef\x{\endgroup\hskip\the\skip@\relax}\x}% } -\AddToHook{file/after/varwidth.sty}[firstaid]{% +\AddToHook{file/varwidth.sty/after}[firstaid]{% \FirstAidNeededT{varwidth}{sty}% {2009/03/30 ver 0.92; \space Variable-width minipages}% {% @@ -191,31 +176,6 @@ \group_end: } \ExplSyntaxOff -\ExplSyntaxOn -\cs_set_protected:Npn \para_end: { - \scan_stop: - \mode_if_horizontal:TF { - \mode_if_inner:F { - \tex_unskip:D - \hook_use:n{para/end} - \@kernel@after@para@end - \mode_if_horizontal:TF { - \if_int_compare:w 0 < \tex_lastnodetype:D - \tex_kern:D \c_zero_dim - \fi: - \tex_par:D - \hook_use:n{para/after} - \@kernel@after@para@after - } - { \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} } - } - } - \tex_par:D -} -\cs_set_eq:NN \par \para_end: -\cs_set_eq:NN \@@par \para_end: -\cs_set_eq:NN \endgraf \para_end: -\ExplSyntaxOff \endinput %% %% End of file `latex2e-first-aid-for-external-files.ltx'. diff --git a/Master/tlpkg/bin/c2lx b/Master/tlpkg/bin/c2lx index 523ab47f0e9..845144a1e6a 100755 --- a/Master/tlpkg/bin/c2lx +++ b/Master/tlpkg/bin/c2lx @@ -19,7 +19,7 @@ cp /dev/null /tmp/first if test "x$1" = xe; then shift; label=l2e - pkgs="amsmath cyrillic graphics tools latex" + pkgs="amsmath cyrillic graphics tools latex firstaid" elif test "x$1" = xdev; then shift; label=ldev pkgs="latex-amsmath-dev latex-firstaid-dev latex-graphics-dev" diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 9495cc2c077..1bc24a822ef 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -728,6 +728,7 @@ chomp (my $ctan_root = `tlpkginfo --ctan-root`); 'latex-doc', "die 'skipping, use latex'", 'latex-doc-dev', "die 'skipping, use latex-base-dev'", 'latex-essential', "die 'skipping, nonfree'", + 'latex-firstaid', "die 'skipping, use firstaid'", 'latex-fonts', "&MAKEflatten", 'latex-graphics', "die 'skipping, use graphics'", 'latex-help-texinfo', "die 'skipping, use latex2e-help-texinfo'", -- cgit v1.2.3