[latex3-commits] [git/LaTeX3-latex3-latex2e] gh444: starting to emulate everysel (0a2b487e)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri Dec 4 20:24:51 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : gh444
Link       : https://github.com/latex3/latex2e/commit/0a2b487e7272cfbc6921d3d042861e61c49a9bc4

>---------------------------------------------------------------

commit 0a2b487e7272cfbc6921d3d042861e61c49a9bc4
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri Dec 4 20:24:51 2020 +0100

    starting to emulate everysel


>---------------------------------------------------------------

0a2b487e7272cfbc6921d3d042861e61c49a9bc4
 base/changes.txt    | 11 +++++++++++
 base/format.ins     |  2 ++
 base/ltfilehook.dtx | 14 ++++++++++----
 base/ltfinal.dtx    | 43 ++++++++++++++++++++++++++++++++++++++++++-
 base/ltfsstrc.dtx   | 47 ++++++++++++++++++++++++-----------------------
 5 files changed, 89 insertions(+), 28 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index b175bd9a..e205561a 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -8,6 +8,17 @@ are not part of the distribution.
 
 2020-12-04  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
+	* ltfilehook.dtx (subsection{Declaring a file substitution}):
+	Don't drop file substitution declarations when rolling back
+	just render them no-ops
+
+2020-12-04  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltfinal.dtx (subsection{File substitutions}):
+	Emulate everysel package
+
+2020-12-04  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
 	* ltfsstrc.dtx (subsection{General font loading}):
 	Add a hook to \selectfont to be executed after the switch to the
 	new font. This implements the functionality formerly in the everysel
diff --git a/base/format.ins b/base/format.ins
index 8796d16d..2b27c5d5 100644
--- a/base/format.ins
+++ b/base/format.ins
@@ -240,6 +240,8 @@ the system are in the document `cfgguide.tex'.
 \generate{\file{structuredlog.sty}{\from{ltfilehook.dtx}{structuredlog}}}
 
 
+\generate{\file{everysel-ltx.sty}{\from{ltfinal.dtx}{everysel-ltx}}} % emulating everysel
+
 
 
 % luatex support (TeX part)
diff --git a/base/ltfilehook.dtx b/base/ltfilehook.dtx
index 1f938290..d849b7a8 100644
--- a/base/ltfilehook.dtx
+++ b/base/ltfilehook.dtx
@@ -31,8 +31,8 @@
 %%% From File: ltfilehook.dtx
 %
 %    \begin{macrocode}
-\providecommand\ltfilehookversion{v1.0c}
-\providecommand\ltfilehookdate{2020/10/18}
+\providecommand\ltfilehookversion{v1.0d}
+\providecommand\ltfilehookdate{2020/12/04}
 %    \end{macrocode}
 %
 %<*driver>
@@ -850,12 +850,18 @@
 %<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
 %
+%    We are not fully rolling back the file substitutions in case a
+%    rollback encounters a package that contains them, but is itself
+%    not setup for rollback. So we just bypass them and hope for the
+%    best.
+% \changes{v1.0d}{2020/12/04}{Don't drop file substitution commands on
+%    rollback}
 %    \begin{macrocode}
 %<latexrelease>\IncludeInRelease{0000/00/00}%
 %<latexrelease>          {\declare at file@substitution}{File substitution}%
 %<latexrelease>
-%<latexrelease>\let \declare at file@substitution   \@undefined
-%<latexrelease>\let \undeclare at file@substitution \@undefined
+%<latexrelease>\let \declare at file@substitution   \@gobbletwo
+%<latexrelease>\let \undeclare at file@substitution \@gobble
 %<latexrelease>
 %<latexrelease>\EndIncludeInRelease
 %<*2ekernel>
diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index aa421972..4b9ee6c4 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltfinal.dtx}
-             [2020-09-26 v2.2j LaTeX Kernel (Final Settings)]
+             [2020/12/04 v2.2k LaTeX Kernel (Final Settings)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltfinal.dtx}
@@ -90,6 +90,47 @@
 % \changes{v2.0s}{2016/10/15}{Tidy up status of char 127}
 % \changes{v2.2i}{2020/08/21}{Integration of new hook management interface}
 %
+%
+%
+% \subsection{File substitutions}
+%
+%
+%    The \cs{selectfont} command got a hook (with the 2021/05 release) which
+%    was originally provided by the \pkg{everysel}
+%    package. Now that it is in the kernel this package is no longer
+%    needed (or only in a simplified manner).
+%
+%    If it is requested we replace it with a simplified package
+%    (until) it gets updated at which point this line can be removed.
+% \changes{v2.2k}{2020/12/04}{Emulate everysel package}
+%    \begin{macrocode}
+%<*2ekernel>
+\declare at file@substitution{everysel.sty}{everysel-ltx.sty}
+%</2ekernel>
+%    \end{macrocode}
+%
+%
+%
+%    \begin{macrocode}
+%<*everysel-ltx>
+\ProvidesPackage{everysel-ltx}
+   [2020/12/04 v1.0a
+     Emulation of the original everysel^^Jpackage with kernel methods]
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\ERROR needs content   
+%    \end{macrocode}
+%
+%
+%    \begin{macrocode}
+%</everysel-ltx>
+%    \end{macrocode}
+%
+%
+%
+%
+%
 % \subsection{Debugging}
 %
 % By default, \LaTeX{} shows statistics:
diff --git a/base/ltfsstrc.dtx b/base/ltfsstrc.dtx
index 81f2db07..7fef4531 100644
--- a/base/ltfsstrc.dtx
+++ b/base/ltfsstrc.dtx
@@ -420,24 +420,25 @@
 %    \end{macrocode}
 %  \end{macro}
 %
+
+%    \begin{macrocode}
+%<*2ekernel|latexrelease|package>
+%<latexrelease>\IncludeInRelease{2021/05/01}%
+%<latexrelease>                 {\selectfont}{Add hook to \string\selectfont}%
+%    \end{macrocode}
+%
 %
-% \changes{v1.0j}{1990/02/18}
-%      {Redefine unprotected version \cs{p at selectfont}
-%                           instead of \cs{selectfont}.}
 %
 %
 % \begin{macro}{\selectfont}
+% \changes{v1.0j}{1990/02/18}
+%      {Redefine unprotected version \cs{p at selectfont}
+%                           instead of \cs{selectfont}.}
 % \changes{v1.1a}{1989/12/16}{Changed order of calls.}
 % \changes{v2.3f}{1994/05/12}{Use \cs{DeclareRobustCommand}}
 %    The macro |\selectfont| is called whenever a font change must
 %    take place.
 %    \begin{macrocode}
-%<*2ekernel|latexrelease|package>
-%<latexrelease>\IncludeInRelease{2021/05/01}%
-%<latexrelease>                 {\selectfont}{Add hook to \string\selectfont}%
-%    \end{macrocode}
-%
-%    \begin{macrocode}
 \DeclareRobustCommand\selectfont
         {%
 %    \end{macrocode}
@@ -539,6 +540,20 @@
 %    \begin{macrocode}
 %<+debug> \poptracing
     }
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%  \begin{macro}{selectfont}
+%    Declare the hook used in selecfont
+%    \begin{macrocode}
+\NewHook{selectfont}
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%
+%    \begin{macrocode}
 %</2ekernel|latexrelease|package>
 %<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
@@ -561,22 +576,8 @@
 %<latexrelease>
 %<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
-% \end{macro}
 %    
 %
-%  \begin{macro}{selectfont}
-%    Declare the hook used in selecfont
-%    \begin{macrocode}
-%<*2ekernel>
-\NewHook{selectfont}
-%</2ekernel>
-%    \end{macrocode}
-%  \end{macro}
-%
-%
-
-
-
 %
 %  \begin{macro}{\set at fontsize}
 %    The macro |\set at fontsize| does the actual work. First it assigns





More information about the latex3-commits mailing list.