[latex3-commits] [git/LaTeX3-latex3-latex2e] gh944: fix for #944 (385cc002)

Frank Mittelbach frank.mittelbach at latex-project.org
Sun Nov 6 23:05:12 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh944
Link       : https://github.com/latex3/latex2e/commit/385cc002e6053341fbb677dd366356a294a840aa

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

commit 385cc002e6053341fbb677dd366356a294a840aa
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sun Nov 6 23:05:12 2022 +0100

    fix for #944


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

385cc002e6053341fbb677dd366356a294a840aa
 base/ltmiscen.dtx              | 10 +++++++++-
 base/ltvers.dtx                | 21 ++++++++++++++-------
 base/testfiles/github-0944.lvt | 27 +++++++++++++++++++++++++++
 base/testfiles/github-0944.tlg | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+), 8 deletions(-)

diff --git a/base/ltmiscen.dtx b/base/ltmiscen.dtx
index b7b2bf5e..69a7ac69 100644
--- a/base/ltmiscen.dtx
+++ b/base/ltmiscen.dtx
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltmiscen.dtx}
-             [2021/06/05 v1.1z LaTeX Kernel (Misc. Environments)]
+             [2022/11/06 v1.2a LaTeX Kernel (Misc. Environments)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltmiscen.dtx}
@@ -270,9 +270,17 @@
 %    This is one of the few places where we already add data and rules
 %    to a hook already in the kernel.
 % \changes{v1.0w}{1994/11/30}{(DPC) Use \cs{@dofilelist}}
+% \changes{v1.2a}{2022/11/06}{Repeat release info at the end (gh/944)}
 %    \begin{macrocode}
 \AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
 \AddToHook{enddocument/info}[kernel/warnings]{\@enddocument at kernel@warnings}
+\AddToHook{enddocument/info}[kernel/release]{%
+   \let\show at release@info\wlog
+   \show at release@info{ ***********}%
+   \the\LaTeXReleaseInfo
+   \show at release@info{ ***********}}
+
+\DeclareHookRule{enddocument/info}{kernel/release}{before}{kernel/filelist}
 \DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings}
 %    \end{macrocode}
 %  \end{macro}
diff --git a/base/ltvers.dtx b/base/ltvers.dtx
index a170ce98..573093f8 100644
--- a/base/ltvers.dtx
+++ b/base/ltvers.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltvers.dtx}
-             [2022/02/28 v1.1i LaTeX Kernel (Version Info)]
+             [2022/11/06 v1.1j LaTeX Kernel (Version Info)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltvers.dtx}
@@ -178,20 +178,27 @@
 %   by a loader (\texttt{.ini} file)}
 % \changes{v1.0v}{2015/08/23}{Allow negative patchlevel for pre-release}
 % \changes{v1.1e}{2020/01/31}{Allow for upcoming format as pre-release 0}
+% \changes{v1.1j}{2022/11/06}{Repeat release info at the end (gh/944)}
 %    \begin{macrocode}
+
+\newtoks\LaTeXReleaseInfo
+\everyjob\expandafter{\the\everyjob\the\LaTeXReleaseInfo}
+\let\show at release@info\typeout
+
+
   \ifnum0\ifnum\patch at level=0 \ifx\development at branch@name\@empty 1\fi\fi>0 %
-    \everyjob\expandafter{\the\everyjob
-      \typeout{\fmtname\space <\fmtversion>}}
+    \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo
+      \show at release@info{\fmtname\space <\fmtversion>}}
     \immediate
     \write16{\fmtname \space<\fmtversion>}
   \else\ifnum\patch at level>0
-    \everyjob\expandafter{\the\everyjob
-      \typeout{\fmtname\space <\fmtversion> patch level \patch at level}}
+    \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo
+      \show at release@info{\fmtname\space <\fmtversion> patch level \patch at level}}
     \immediate
     \write16{\fmtname\space <\fmtversion> patch level \patch at level}
   \else
-    \everyjob\expandafter{\the\everyjob
-      \typeout{\fmtname\space <\fmtversion>
+    \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo
+      \show at release@info{\fmtname\space <\fmtversion>
                pre-release-\number-\patch at level\space
                \ifx\development at branch@name\@undefined  \else
                  \ifx\development at branch@name\@empty  \else
diff --git a/base/testfiles/github-0944.lvt b/base/testfiles/github-0944.lvt
new file mode 100644
index 00000000..7a8efe68
--- /dev/null
+++ b/base/testfiles/github-0944.lvt
@@ -0,0 +1,27 @@
+
+\documentclass{article}
+\input{test2e}
+
+% where does the version info show up? This test will fail on each release change unless we remove variable parts:
+
+\def\fmtname{-formatname-}
+\def\fmtversion{-formatversion-}
+
+\makeatletter
+\def\patch at level{-2}
+\def\development at branch@name{-release-version-test-}
+\makeatother
+
+\listfiles
+
+
+\begin{document}
+
+\START
+
+\ShowHook{enddocument/info}
+
+X \ref{unknown} % get a warning
+
+\end{document}
+
diff --git a/base/testfiles/github-0944.tlg b/base/testfiles/github-0944.tlg
new file mode 100644
index 00000000..e76d6d97
--- /dev/null
+++ b/base/testfiles/github-0944.tlg
@@ -0,0 +1,32 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+-> The hook 'enddocument/info':
+> Code chunks:
+>     kernel/filelist -> \@dofilelist 
+>     kernel/warnings -> \@enddocument at kernel@warnings 
+>     kernel/release -> \let \show at release@info \wlog \show at release@info { ***********}\the \LaTeXReleaseInfo \show at release@info { ***********}
+> Document-level (top-level) code (executed last):
+>     ---
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     kernel/warnings|kernel/filelist with relation >
+>     kernel/release|kernel/filelist with relation <
+> Execution order (after applying rules):
+>     kernel/release, kernel/filelist, kernel/warnings.
+<recently read> }
+l. ...\ShowHook{enddocument/info}
+LaTeX Warning: Reference `unknown' on page 1 undefined on input line ....
+[1
+] (github-0944.aux)
+ ***********
+-formatname- <-formatversion-> pre-release-2 (-release-version-test- branch)
+ ***********
+ *File List*
+ article.cls    ....-..-.. v... Standard LaTeX document class
+  size10.clo    ....-..-.. v... Standard LaTeX file (size option)
+  test2e.tex
+   expl3.sty    ....-..-.. L3 programming layer (loader) 
+l3backend-dvips.def    ....-..-.. L3 backend support: dvips
+ ***********
+LaTeX Warning: There were undefined references.





More information about the latex3-commits mailing list.