[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh418: Make 'enddocument/afteraux' a one-time hook (fixes #418) (c4331858)
PhelypeOleinik
phelype.oleinik at latex-project.org
Sat Oct 24 02:25:32 CEST 2020
Repository : https://github.com/latex3/latex2e
On branch : hotfix/gh418
Link : https://github.com/latex3/latex2e/commit/c4331858a7087f8633c91c35111c4295d0c48c87
>---------------------------------------------------------------
commit c4331858a7087f8633c91c35111c4295d0c48c87
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Fri Oct 23 21:25:32 2020 -0300
Make 'enddocument/afteraux' a one-time hook (fixes #418)
>---------------------------------------------------------------
c4331858a7087f8633c91c35111c4295d0c48c87
base/changes.txt | 5 ++++
base/ltmiscen.dtx | 5 ++--
base/testfiles/github-0418.lvt | 35 ++++++++++++++++++++++
.../{tlb-ealloc-002.tlg => github-0418.tlg} | 35 +++++++++++++++++++++-
4 files changed, 77 insertions(+), 3 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 36a22af1..09f1cb83 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -10,6 +10,11 @@ are not part of the distribution.
All changes above are only part of the development branch for the next release.
================================================================================
+2020-10-23 Phelype Oleinik <phelype.oleinik at latex-project.org>
+
+ * ltmiscen.dtx:
+ Make 'enddocument/afteraux' a one-time hook (gh/418).
+
#########################
# 2020-10-01 PL 1 Release
#########################
diff --git a/base/ltmiscen.dtx b/base/ltmiscen.dtx
index 0c115d3b..9acbcccd 100644
--- a/base/ltmiscen.dtx
+++ b/base/ltmiscen.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
- [2020/08/21 v1.1v LaTeX Kernel (Misc. Environments)]
+ [2020/10/23 v1.1w LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
@@ -239,13 +239,14 @@
% \changes{v1.1k}{2010/08/17}{Use braces around \cs{input} arg (pr/4124)}
% \changes{v1.1l}{2010/08/17}{Change of plan: use \cs{@@input} instead
% (pr/4124)}
+% \changes{v1.1w}{2020/10/23}{Make \texttt{enddocument/afteraux} one-time}
% We use |\@@input| to load the \texttt{.aux} file, so that it doesn't
% show up in the list of files produced by |\listfiles|.
% \begin{macrocode}
\@tempswafalse
\makeatletter \@@input\jobname.aux
\fi
- \UseHook{enddocument/afteraux}%
+ \UseOneTimeHook{enddocument/afteraux}%
% \end{macrocode}
% Next hook is expect to contain only code for writing info
% messages on the terminal.
diff --git a/base/testfiles/github-0418.lvt b/base/testfiles/github-0418.lvt
new file mode 100644
index 00000000..625bec4f
--- /dev/null
+++ b/base/testfiles/github-0418.lvt
@@ -0,0 +1,35 @@
+\RequirePackage{expl3} % force backend loading
+
+\documentclass{article}
+
+\ExplSyntaxOn
+
+\clist_map_inline:nn
+ {
+ begindocument ,
+ begindocument/before ,
+ begindocument/end ,
+ enddocument ,
+ enddocument/afterlastpage ,
+ enddocument/afteraux ,
+ enddocument/info ,
+ enddocument/end
+ }
+ {
+ \AddToHook{#1}
+ {
+ \typeout{---}%
+ \typeout{>>A~(#1)}%
+ \AddToHook{#1}{\typeout{>>B~(#1)}}%
+ \typeout{>>C~(#1)}%
+ }
+ }
+
+\ExplSyntaxOff
+
+\input{test2e}
+\START
+
+\begin{document}
+
+\end{document}
diff --git a/base/testfiles/tlb-ealloc-002.tlg b/base/testfiles/github-0418.tlg
similarity index 59%
copy from base/testfiles/tlb-ealloc-002.tlg
copy to base/testfiles/github-0418.tlg
index 67dd6b68..6ea56372 100644
--- a/base/testfiles/tlb-ealloc-002.tlg
+++ b/base/testfiles/github-0418.tlg
@@ -1,6 +1,10 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-(tlb-ealloc-002.aux)
+---
+>>A (begindocument/before)
+>>B (begindocument/before)
+>>C (begindocument/before)
+(github-0418.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line ....
@@ -15,3 +19,32 @@ LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
+---
+>>A (begindocument)
+>>B (begindocument)
+>>C (begindocument)
+---
+>>A (begindocument/end)
+>>B (begindocument/end)
+>>C (begindocument/end)
+---
+>>A (enddocument)
+>>B (enddocument)
+>>C (enddocument)
+---
+>>A (enddocument/afterlastpage)
+>>B (enddocument/afterlastpage)
+>>C (enddocument/afterlastpage)
+(github-0418.aux)
+---
+>>A (enddocument/afteraux)
+>>B (enddocument/afteraux)
+>>C (enddocument/afteraux)
+---
+>>A (enddocument/info)
+>>B (enddocument/info)
+>>C (enddocument/info)
+---
+>>A (enddocument/end)
+>>B (enddocument/end)
+>>C (enddocument/end)
More information about the latex3-commits
mailing list.