[latex3-commits] [git/LaTeX3-latex3-latex2e] gh479: ... so we have to define it conditionally in latexrelease.sty (66dd3adf)

PhelypeOleinik phelype.oleinik at latex-project.org
Thu Mar 18 18:02:07 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh479
Link       : https://github.com/latex3/latex2e/commit/66dd3adf8d438ebea2d429dd2c4082810f06dbab

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

commit 66dd3adf8d438ebea2d429dd2c4082810f06dbab
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Thu Mar 18 14:02:07 2021 -0300

    ... so we have to define it conditionally in latexrelease.sty


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

66dd3adf8d438ebea2d429dd2c4082810f06dbab
 base/latexrelease.dtx | 17 +++++++++++------
 base/ltvers.dtx       | 12 ------------
 2 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/base/latexrelease.dtx b/base/latexrelease.dtx
index dfa6cb11..3ccfd1b2 100644
--- a/base/latexrelease.dtx
+++ b/base/latexrelease.dtx
@@ -392,12 +392,17 @@
 % \begin{macro}{\sourceLaTeXdate}
 %   \changes{v1.0l}{2021/01/23}{\cs{sourceLaTeXdate} added}
 %   Store the original \LaTeX{} format version
-%   as a number in the format |YYYYMMDD|.  This macro is
-%   defined in \file{ltvers.dtx} because it has to reflect
-%   the \emph{real} source \LaTeX{} date, not the format date
-%   in force when loading \file{latexrelease.sty} (they may
-%   differ if \file{latexrelease.sty} is being loaded a
-%   second time).
+%   as a number in the format |YYYYMMDD|.  This macro has to
+%   be defined conditionally, so that it isn't changed in case
+%   \file{latexrelease.sty} is loaded twice (for tests), but it
+%   can't be defined in the kernel only, otherwise
+%   \file{latexrelease.sty} wouldn't work in older \LaTeX{} due
+%   to the missing macro.
+%    \begin{macrocode}
+\@ifundefined{sourceLaTeXdate}{%
+  \def\reserved at a#1-#2-#3-{#1#2#3}%
+  \edef\sourceLaTeXdate{\expandafter\reserved at a\fmtversion- }}{}%
+%    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\IncludeInRelease}
diff --git a/base/ltvers.dtx b/base/ltvers.dtx
index 176e2138..3feb6d1a 100644
--- a/base/ltvers.dtx
+++ b/base/ltvers.dtx
@@ -213,18 +213,6 @@
 %</2ekernel>
 %    \end{macrocode}
 %
-% \begin{macro}{\sourceLaTeXdate}
-%   \changes{v1.0l}{2021/01/23}{\cs{sourceLaTeXdate} added}
-%   Store the original \LaTeX{} format version
-%   as a number in the format |YYYYMMDD|:
-%    \begin{macrocode}
-%<*2ekernel>
-\def\reserved at a#1-#2-#3-{#1#2#3}
-\edef\sourceLaTeXdate{\expandafter\reserved at a\fmtversion- }
-%</2ekernel>
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{\IncludeInRelease}
 % \begin{macro}{\EndIncludeInRelease}
 % \begin{macro}{\@IncludeInRelease}





More information about the latex3-commits mailing list.