Skip to content

Commit

Permalink
Add first aid for babel to support new case change def.
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Oct 27, 2022
1 parent bc20065 commit 8de0f4e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
5 changes: 5 additions & 0 deletions required/firstaid/changes.txt
@@ -1,3 +1,8 @@
2022-10-27 Joseph Wright <Joseph.Wright@latex-project.org>

* latex2e-first-aid-for-external-files.dtx:
Add first aid for babel to undo a no-longer required patch

2022-10-03 Joseph Wright <Joseph.Wright@latex-project.org>

* latex2e-first-aid-for-external-files.dtx:
Expand Down
33 changes: 29 additions & 4 deletions required/firstaid/latex2e-first-aid-for-external-files.dtx
Expand Up @@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
\def\LaTeXFirstAidDate{2022/06/23}
\def\LaTeXFirstAidVersion{v1.0s}
\def\LaTeXFirstAidDate{2022/10/27}
\def\LaTeXFirstAidVersion{v1.0t}
% \end{macrocode}
%
% \begin{macrocode}
Expand Down Expand Up @@ -340,8 +340,6 @@
% }%
%}
% \end{macrocode}
%
%
%
% \subsection{The \pkg{dinbrief} class first aid}
%
Expand Down Expand Up @@ -406,6 +404,33 @@
\ExplSyntaxOff
% \end{macrocode}
%
% \subsection{The \pkg{babel} package}
%
% Because of the switch from what was already an odd structure to an \pk{ltcmd}
% expandable command, we have to save-and-restore an internal function to undo
% a patch.
% \begin{macrocode}
\AddToHook{file/babel.sty/before}[firstaid]{%
\FirstAidNeededT{babel}{sty}{2022/10/23 3.82 The Babel package}%
{%
\expandafter\let\expandafter\firstaid@MakeLowercase
\csname MakeLowercase \endcsname
\expandafter\let\expandafter\firstaid@MakeTitlecase
\csname MakeTitlecase \endcsname
\expandafter\let\expandafter\firstaid@MakeUppercase
\csname MakeUppercase \endcsname
\AtBeginDocument[firstaid-babel]{%
\expandafter\let\csname MakeLowercase \endcsname
\firstaid@MakeLowercase
\expandafter\let\csname MakeTitlecase \endcsname
\firstaid@MakeTitlecase
\expandafter\let\csname MakeUppercase \endcsname
\firstaid@MakeUppercase
}%
\DeclareHookRule{begindocument}{firstaid-babel}{after}{babel}%
}%
}
% \end{macrocode}
%
% \begin{macrocode}
%</kernel>
Expand Down

0 comments on commit 8de0f4e

Please sign in to comment.