[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh434: remaining documentation for #434 (dc42970c)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Nov 25 12:29:22 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh434
Link       : https://github.com/latex3/latex2e/commit/dc42970cc2e722400b8d085e967d2907120e28ec

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

commit dc42970cc2e722400b8d085e967d2907120e28ec
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Nov 25 12:29:22 2020 +0100

    remaining documentation for #434


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

dc42970cc2e722400b8d085e967d2907120e28ec
 base/changes.txt    |  6 +++++-
 base/ltexpl.dtx     | 23 +++++++++++++++++++++--
 base/ltfilehook.dtx |  8 +++++---
 base/lthooks.dtx    |  7 +++++--
 base/ltshipout.dtx  | 17 +++++++++++++----
 5 files changed, 49 insertions(+), 12 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 829bb61c..021f725c 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -17,7 +17,11 @@ All changes above are only part of the development branch for the next release.
 	in the format to correctly resolve dependencies (gh/434)
 
 	* ltexpl.dtx (subsection{Loader}):
-	Load xparse in latexrelease if necessary (gh/434)
+	Load xparse in latexrelease if necessary and add missing
+	IncludeInRelease guards (gh/434)
+
+	* ltfilehook.dtx, lthooks.dtx, ltxshipout.dtx:
+	Add rollback support for forward case (gh/434)
 
 2020-11-17  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
diff --git a/base/ltexpl.dtx b/base/ltexpl.dtx
index 4ab54d1e..15485477 100644
--- a/base/ltexpl.dtx
+++ b/base/ltexpl.dtx
@@ -186,9 +186,20 @@
         \errmessage{LaTeX requires expl3}%
         \batchmode \read -1 to \reserved at a
 %</2ekernel>
+%    \end{macrocode}
+%    We do not support a roll forward across 2019. You need to start
+%    with 2019 if you want to get to 2020 or beyond. 
+% \changes{v1.2g}{2020/11/24}{Support for roll forward (gh/434)}
+%    \begin{macrocode}
 %<*latexrelease>
-        \@latex at error{LaTeX requires expl3}\@ehd
-        \@gobble
+        \@latex at warning@no at line
+          {You need a format that already contains a recent\MessageBreak
+           expl3 as part of the kernel, e.g. at least a kernel\MessageBreak
+           from 2019 to roll forward to that date!\MessageBreak
+           --- I'm giving up!\MessageBreak\MessageBreak
+           Note that manually loading the expl3 package\MessageBreak
+           from your distribution is not enough}%
+        \@@end  % die
 %</latexrelease>
       }%
       {%
@@ -293,6 +304,10 @@
 %<latexrelease>        {expl3 macros added for the 2020-10-01 release}%
 %    \end{macrocode}
 %
+%    The expl3 activation needs to be inside the release guards as
+%    otherwise rolling forward is broken in old kernels that do not
+%    have expl3 loaded.
+% \changes{v1.2g}{2020/11/24}{Support for roll forward (gh/434)}
 %    \begin{macrocode}
 \ExplSyntaxOn
 %    \end{macrocode}
@@ -328,6 +343,10 @@
 %    \end{macrocode}
 %
 %
+%    Here we can't assume that expl3 is available. It will be if we
+%    roll back but if this code is executed rolling forward it needs
+%    to be pure 2e.
+% \changes{v1.2g}{2020/11/24}{Support for roll forward (gh/434)}
 %    \begin{macrocode}
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{0000/00/00}{\@expl at cs@to at str@@N}%
diff --git a/base/ltfilehook.dtx b/base/ltfilehook.dtx
index 93089a44..83e10d1a 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/11/24}
 %    \end{macrocode}
 %
 %<*driver>
@@ -617,6 +617,9 @@
 %<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
 %
+%    When rolling forward the following expl3 functions may not be defined.
+%    If we roll back the code does nothing.
+% \changes{v1.0d}{2020/11/24}{Support for roll forward (gh/434)}
 %    \begin{macrocode}
 %<latexrelease>\IncludeInRelease{2020/10/01}%
 %<latexrelease>                 {\file_parse_full_name_apply:nN}{Roll forward help}%
@@ -675,7 +678,6 @@
 %<@@=>
 %    \end{macrocode}
 %
-%
 % \subsection{Declaring the file-related hooks}
 %
 %  All hooks starting with \texttt{file/} \texttt{include/},
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index a03ae785..65d8a0ac 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -31,8 +31,8 @@
 %%% From File: lthooks.dtx
 %
 %    \begin{macrocode}
-\def\lthooksversion{v1.0e}
-\def\lthooksdate{2020/10/23}
+\def\lthooksversion{v1.0f}
+\def\lthooksdate{2020/11/24}
 %    \end{macrocode}
 %
 %<*driver>
@@ -1750,6 +1750,9 @@
 \seq_new:N \g_@@_name_stack_seq
 %    \end{macrocode}
 %
+%    Inside \pkg{latexrelease} we also push something on the stack to
+%    support roll forward.
+% \changes{v1.0f}{2020/11/24}{Support for roll forward (gh/434)}
 %    \begin{macrocode}
 %<latexrelease>\seq_gpush:Nn \g__hook_name_stack_seq { }
 %    \end{macrocode}
diff --git a/base/ltshipout.dtx b/base/ltshipout.dtx
index 1c5df781..e226f753 100644
--- a/base/ltshipout.dtx
+++ b/base/ltshipout.dtx
@@ -31,8 +31,8 @@
 %%% From File: ltshipout.dtx
 %
 %    \begin{macrocode}
-\providecommand\ltshipoutversion{v1.0c}
-\providecommand\ltshipoutdate{2020/09/27}
+\providecommand\ltshipoutversion{v1.0d}
+\providecommand\ltshipoutdate{2020/11/24}
 %    \end{macrocode}
 %
 %<*driver>
@@ -1376,7 +1376,9 @@
 %
 %
 %  \begin{macro}{\AtBeginDvi}
-%    
+%    If we roll forward from an earlier kernel \cs{AtBeginDvi} is
+%    defined so we better not use \cs{cs_new_protected:Npn} here.
+% \changes{v1.0d}{2020/11/24}{Support for roll forward (gh/434)}
 %    \begin{macrocode}
 \cs_set_protected:Npn \AtBeginDvi {\@@_add_firstpage_material:Nn \AtBeginDvi}
 %    \end{macrocode}
@@ -1449,8 +1451,15 @@
 %<latexrelease>\IncludeInRelease{0000/00/00}%
 %<latexrelease>                 {\shipout}{The hook management (shipout)}%
 %<latexrelease>
+%    \end{macrocode}
+%    If we roll forward then \cs{tex\_shipout:D} may not be defined in
+%    which case \cs{shipout} does have it original definition and so
+%    we must not \cs{let} it to something else which is \cs{relax}! 
+% \changes{v1.0d}{2020/11/24}{Support for roll forward (gh/434)}
+%    \begin{macrocode}
 %<latexrelease>\ifcsname tex_shipout:D\endcsname
-%<latexrelease>\expandafter\let\expandafter\shipout\csname tex_shipout:D\endcsname
+%<latexrelease>\expandafter\let\expandafter\shipout
+%<latexrelease>                \csname tex_shipout:D\endcsname
 %<latexrelease>\fi
 %<latexrelease>
 %<latexrelease>\let \ShipoutBox\@undefined





More information about the latex3-commits mailing list.