[latex3-commits] [git/LaTeX3-latex3-latex2e] gh385: fix for #385 (5a789507)
Frank Mittelbach
frank.mittelbach at latex-project.org
Mon Oct 26 15:38:17 CET 2020
Repository : https://github.com/latex3/latex2e
On branch : gh385
Link : https://github.com/latex3/latex2e/commit/5a78950704290766617cb68dc86655782c21afff
>---------------------------------------------------------------
commit 5a78950704290766617cb68dc86655782c21afff
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Mon Oct 26 15:38:17 2020 +0100
fix for #385
>---------------------------------------------------------------
5a78950704290766617cb68dc86655782c21afff
base/changes.txt | 5 +++
base/ltmiscen.dtx | 37 ++++++++++++++++++++--
.../github-0069.lvt => testfiles/github-0385.lvt} | 11 ++++---
.../{tlb-utf8-bom.tlg => github-0385.tlg} | 28 ++++++++++++----
.../tlb-latexrelease-rollback-003-often.luatex.tlg | 4 +++
.../tlb-latexrelease-rollback-003-often.tlg | 4 +++
.../tlb-latexrelease-rollback-003-often.xetex.tlg | 4 +++
base/testfiles/tlb-rollback-004-often.luatex.tlg | 2 ++
base/testfiles/tlb-rollback-004-often.tlg | 2 ++
base/testfiles/tlb-rollback-004-often.xetex.tlg | 2 ++
10 files changed, 85 insertions(+), 14 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 6d70494b..fea79a9c 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2020-10-26 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltmiscen.dtx (subsection{Environments}):
+ \enddocument should always start out in vmode (gh/385)
+
================================================================================
All changes above are only part of the development branch for the next release.
================================================================================
diff --git a/base/ltmiscen.dtx b/base/ltmiscen.dtx
index 9acbcccd..2cf445c8 100644
--- a/base/ltmiscen.dtx
+++ b/base/ltmiscen.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
- [2020/10/23 v1.1w LaTeX Kernel (Misc. Environments)]
+ [2020/10/26 v1.1x LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
@@ -214,6 +214,7 @@
% \changes{v1.1i}{2000/05/19}
% {Reset \cs{AtEndDocument} for latex/3060}
% \begin{macrocode}
+ \@kernel at before@enddocument
\UseOneTimeHook{enddocument}%
\@kernel at after@enddocument
% \end{macrocode}
@@ -280,14 +281,15 @@
%
% \begin{macro}{\@kernel at after@enddocument,
% \@kernel at after@enddocument at afterlastpage}
-%
-% The two kernel hooks above are used by the shipout code.
+% Two of the kernel hooks above are used by the shipout code and
+% are initially empty.
% \begin{macrocode}
\let\@kernel at after@enddocument\@empty
\let\@kernel at after@enddocument at afterlastpage\@empty
% \end{macrocode}
% \end{macro}
%
+%
% \begin{macro}{\@enddocument at kernel@warnings}
%
% \begin{macrocode}
@@ -403,6 +405,35 @@
%<*2ekernel>
% \end{macrocode}
%
+% \begin{macro}{\@kernel at before@enddocument}
+% The \cs{@kernel at before@enddocument} hook is slightly different
+% because we initialize it with \cs{par} so that \cs{enddocument} always
+% returns to vertical mode as its first action.
+% \changes{v1.1x}{2020/10/26}{\cs{enddocument} should always start out in
+% vmode (gh/385)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2021/05/01}%
+%<latexrelease> {\@kernel at before@enddocument}{kernel before hook}%
+\def\@kernel at before@enddocument{\par}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% The rollback code renders it harmless.
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@kernel at before@enddocument}{kernel before hook}%
+%<latexrelease>
+%<latexrelease>\let\@kernel at before@enddocument\@empty
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
%
%
% \begin{macro}{\@testdef}
diff --git a/base/testfiles-legacy/github-0069.lvt b/base/testfiles/github-0385.lvt
similarity index 63%
copy from base/testfiles-legacy/github-0069.lvt
copy to base/testfiles/github-0385.lvt
index 87ec5f67..2b640259 100644
--- a/base/testfiles-legacy/github-0069.lvt
+++ b/base/testfiles/github-0385.lvt
@@ -1,17 +1,18 @@
+
+
\documentclass{article}
\input{test2e}
\showoutput
+\AtEndDocument{\label{foo}}
+
\begin{document}
\START
-\verb*|x x|
-
-\begin{verbatim*}
- A B C
-\end{verbatim*}
+\hfill lorem
+\hfill ipsum
\end{document}
diff --git a/base/testfiles/tlb-utf8-bom.tlg b/base/testfiles/github-0385.tlg
similarity index 53%
copy from base/testfiles/tlb-utf8-bom.tlg
copy to base/testfiles/github-0385.tlg
index ad1ff6cc..cf36329b 100644
--- a/base/testfiles/tlb-utf8-bom.tlg
+++ b/base/testfiles/github-0385.tlg
@@ -1,6 +1,5 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-(tlb-utf8-bom.lvt)
Completed box being shipped out [1]
\vbox(633.0+0.0)x407.0
.\glue 16.0
@@ -10,18 +9,35 @@ Completed box being shipped out [1]
...\hbox(0.0+0.0)x345.0
..\glue 25.0
..\glue(\lineskip) 0.0
-..\vbox(550.0+0.0)x345.0, glue set 539.94232fil
+..\vbox(550.0+0.0)x345.0, glue set 527.9436fil
...\write-{}
...\glue(\topskip) 3.05556
-...\hbox(6.94444+0.0)x345.0, glue set 311.63887fil
+...\hbox(6.94444+0.0)x345.0, glue set 305.52773fill
....\hbox(0.0+0.0)x15.0
-....\OT1/cmr/m/n/10 h
-....\OT1/cmr/m/n/10 e
+....\glue 0.0 plus 1.0fill
+....\OT1/cmr/m/n/10 l
+....\OT1/cmr/m/n/10 o
....\OT1/cmr/m/n/10 r
....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 m
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\baselineskip) 5.32141
+...\hbox(6.67859+1.94444)x345.0, glue set 303.83327fill
+....\hbox(0.0+0.0)x15.0
+....\glue 0.0 plus 1.0fill
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 p
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 u
+....\OT1/cmr/m/n/10 m
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
+...\write1{\newlabel{foo}{{}{\thepage }}}
+...\glue -1.94444
...\glue 0.0 plus 1.0fil
...\glue 0.0
...\glue 0.0 plus 0.0001fil
@@ -30,4 +46,4 @@ Completed box being shipped out [1]
...\glue 0.0 plus 1.0fil
...\OT1/cmr/m/n/10 1
...\glue 0.0 plus 1.0fil
-(tlb-utf8-bom.aux)
+(github-0385.aux)
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
index e1262657..ccd0bdf3 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -382,6 +382,8 @@ Skipping: [....-..-..] Add \labelformat and \Ref on input line ....
Applying: [....-..-..] Add \labelformat and \Ref on input line ....
Skipping: [....-..-..] Use Hooks on input line ....
Applying: [....-..-..] Use Hooks on input line ....
+Skipping: [....-..-..] kernel before hook on input line ....
+Applying: [....-..-..] kernel before hook on input line ....
Skipping: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Skipping: [....-..-..] Use hook system on input line ....
@@ -886,6 +888,8 @@ Applying: [....-..-..] Add \labelformat and \Ref on input line ....
Already applied: [....-..-..] Add \labelformat and \Ref on input line ....
Skipping: [....-..-..] Use Hooks on input line ....
Applying: [....-..-..] Use Hooks on input line ....
+Skipping: [....-..-..] kernel before hook on input line ....
+Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Skipping: [....-..-..] Use hook system on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
index bc2ef53f..424c9ceb 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -380,6 +380,8 @@ Skipping: [....-..-..] Add \labelformat and \Ref on input line ....
Applying: [....-..-..] Add \labelformat and \Ref on input line ....
Skipping: [....-..-..] Use Hooks on input line ....
Applying: [....-..-..] Use Hooks on input line ....
+Skipping: [....-..-..] kernel before hook on input line ....
+Applying: [....-..-..] kernel before hook on input line ....
Skipping: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Skipping: [....-..-..] Use hook system on input line ....
@@ -878,6 +880,8 @@ Applying: [....-..-..] Add \labelformat and \Ref on input line ....
Already applied: [....-..-..] Add \labelformat and \Ref on input line ....
Skipping: [....-..-..] Use Hooks on input line ....
Applying: [....-..-..] Use Hooks on input line ....
+Skipping: [....-..-..] kernel before hook on input line ....
+Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Skipping: [....-..-..] Use hook system on input line ....
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
index 73d794c5..acd09b2d 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -380,6 +380,8 @@ Skipping: [....-..-..] Add \labelformat and \Ref on input line ....
Applying: [....-..-..] Add \labelformat and \Ref on input line ....
Skipping: [....-..-..] Use Hooks on input line ....
Applying: [....-..-..] Use Hooks on input line ....
+Skipping: [....-..-..] kernel before hook on input line ....
+Applying: [....-..-..] kernel before hook on input line ....
Skipping: [....-..-..] Mask line endings on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Skipping: [....-..-..] Use hook system on input line ....
@@ -887,6 +889,8 @@ Applying: [....-..-..] Add \labelformat and \Ref on input line ....
Already applied: [....-..-..] Add \labelformat and \Ref on input line ....
Skipping: [....-..-..] Use Hooks on input line ....
Applying: [....-..-..] Use Hooks on input line ....
+Skipping: [....-..-..] kernel before hook on input line ....
+Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Skipping: [....-..-..] Use hook system on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.luatex.tlg b/base/testfiles/tlb-rollback-004-often.luatex.tlg
index 3bbff5ed..66e78f24 100644
--- a/base/testfiles/tlb-rollback-004-often.luatex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.luatex.tlg
@@ -776,6 +776,8 @@ LaTeX Info: Redefining \Ref on input line ....
Already applied: [....-..-..] Add \labelformat and \Ref on input line ....
Skipping: [....-..-..] Use Hooks on input line ....
Applying: [....-..-..] Use Hooks on input line ....
+Skipping: [....-..-..] kernel before hook on input line ....
+Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Skipping: [....-..-..] Use hook system on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.tlg b/base/testfiles/tlb-rollback-004-often.tlg
index f367ea1d..5f32b364 100644
--- a/base/testfiles/tlb-rollback-004-often.tlg
+++ b/base/testfiles/tlb-rollback-004-often.tlg
@@ -774,6 +774,8 @@ LaTeX Info: Redefining \Ref on input line ....
Already applied: [....-..-..] Add \labelformat and \Ref on input line ....
Skipping: [....-..-..] Use Hooks on input line ....
Applying: [....-..-..] Use Hooks on input line ....
+Skipping: [....-..-..] kernel before hook on input line ....
+Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Skipping: [....-..-..] Use hook system on input line ....
diff --git a/base/testfiles/tlb-rollback-004-often.xetex.tlg b/base/testfiles/tlb-rollback-004-often.xetex.tlg
index e6b5920e..dcdd620a 100644
--- a/base/testfiles/tlb-rollback-004-often.xetex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.xetex.tlg
@@ -774,6 +774,8 @@ LaTeX Info: Redefining \Ref on input line ....
Already applied: [....-..-..] Add \labelformat and \Ref on input line ....
Skipping: [....-..-..] Use Hooks on input line ....
Applying: [....-..-..] Use Hooks on input line ....
+Skipping: [....-..-..] kernel before hook on input line ....
+Applying: [....-..-..] kernel before hook on input line ....
Applying: [....-..-..] Mask line endings on input line ....
Already applied: [....-..-..] Mask line endings on input line ....
Skipping: [....-..-..] Use hook system on input line ....
More information about the latex3-commits
mailing list.