diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-12 23:10:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-12 23:10:30 +0000 |
commit | 6c3a92a60f9e87866c2ebf6e34e98efb7ab20958 (patch) | |
tree | 34dde95b0334b69d852015609642ee87f5ce39eb /Master/texmf-dist/source/latex | |
parent | e80240b5e5bfb83d84a9e6d81e31b0bfb82d637c (diff) |
firstaid (12nov21)
git-svn-id: svn://tug.org/texlive/trunk@61042 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx | 134 |
1 files changed, 23 insertions, 111 deletions
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} %</kernel> |