[latex3-commits] [git/LaTeX3-latex3-latex2e] longtable4.14: apply patch for vertical space when float on an LT page issue #3512 (21d94c90)
David Carlisle
d.p.carlisle at gmail.com
Sat Mar 7 16:35:16 CET 2020
Repository : https://github.com/latex3/latex2e
On branch : longtable4.14
Link : https://github.com/latex3/latex2e/commit/21d94c90562d823683d901800c9e64be09c613e7
>---------------------------------------------------------------
commit 21d94c90562d823683d901800c9e64be09c613e7
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Sat Mar 7 15:35:16 2020 +0000
apply patch for vertical space when float on an LT page issue #3512
>---------------------------------------------------------------
21d94c90562d823683d901800c9e64be09c613e7
required/tools/longtable.dtx | 31 +++++++++++++++++-----
required/tools/testfiles/tlb3512.lvt | 18 +++++++++++++
.../tools/testfiles/tlb3512.tlg | 3 +--
3 files changed, 44 insertions(+), 8 deletions(-)
diff --git a/required/tools/longtable.dtx b/required/tools/longtable.dtx
index f892ecc4..22346edb 100644
--- a/required/tools/longtable.dtx
+++ b/required/tools/longtable.dtx
@@ -1275,9 +1275,12 @@
% \end{macrocode}
% If the foot is non empty, reduce the "\vsize" and "\@colroom"
% accordingly.
+% \changes{v4.14}{2020/02/07}
+% {Rearrange vertical space tests for gh/3512 (floats on same page)}
% \begin{macrocode}
\ifvoid\LT at foot\else
- \advance\vsize-\ht\LT at foot
+% \advance\vsize-\ht\LT at foot
+ \global\advance\vsize-\ht\LT at foot
\global\advance\@colroom-\ht\LT at foot
\dimen@\pagegoal\advance\dimen at -\ht\LT at foot\pagegoal\dimen@
\maxdepth\z@
@@ -1356,8 +1359,15 @@
\fi
% \end{macrocode}
% Force one more go with the \env{longtable} output routine.
+% \changes{v4.14}{2020/02/07}
+% {Rearrange vertical space tests for gh/3512 (floats on same page)}
% \begin{macrocode}
\endgraf\penalty -\LT at end@pen
+ \ifvoid\LT at foot\else
+ \global\advance\vsize\ht\LT at foot
+ \global\advance\@colroom\ht\LT at foot
+ \dimen@\pagegoal\advance\dimen@\ht\LT at foot\pagegoal\dimen@
+ \fi
% \end{macrocode}
% Now close the group to return to the standard routine.
% \begin{macrocode}
@@ -1367,9 +1377,11 @@
% table.\footnote{This can not be the correct. However if it is omitted,
% there is a problem with marginpars, for example on page~3 of this
% document. Any Output Routine Gurus out there?}
+% \changes{v4.14}{2020/02/07}
+% {Rearrange vertical space tests for gh/3512 (floats on same page)}
% \begin{macrocode}
\global\@mparbottom\z@
- \pagegoal\vsize
+% \pagegoal\vsize
\endgraf\penalty\z@\addvspace\LTpost
% \end{macrocode}
% Footnotes. As done in the \package{multicol} package.
@@ -1981,13 +1993,17 @@
% vsplit off a bit of the last chunk, so that the last page did not just
% have head and foot sections, but it is hard to do this in a consistent
% manner.}
+% \changes{v4.14}{2020/02/07}
+% {Rearrange vertical space tests for gh/3512 (floats on same page)}
% \begin{macrocode}
\dimen@\pagegoal
+ \advance\dimen@\ht\LT at foot
\advance\dimen at -\ht\LT at lastfoot
\ifdim\dimen@<\ht\z@
\setbox\@cclv\vbox{\unvbox\z@\copy\LT at foot\vss}%
\@makecol
\@outputpage
+ \global\vsize\@colroom
\setbox\z@\vbox{\box\LT at head}%
% \end{macrocode}
% End of "\ifdim\dimen@<\ht\@cclc".
@@ -2001,14 +2017,17 @@
% Reset "\@colroom".
% \changes{v3.14}{1995/05/02}
% {Reset \cs{@colroom}, for tools/1584}
+% \changes{v4.14}{2020/02/07}
+% {Rearrange vertical space tests for gh/3512 (floats on same page)}
% \begin{macrocode}
- \global\@colroom\@colht
- \global\vsize\@colht
+% \global\@colroom\@colht
+% \global\vsize\@colht
% \end{macrocode}
% Put the last page of the table on to the main vertical list.
+% \changes{v4.14}{2020/02/07}
+% {Remove box from final page gh/3512}
% \begin{macrocode}
- \vbox
- {\unvbox\z@\box\ifvoid\LT at lastfoot\LT at foot\else\LT at lastfoot\fi}%
+ \unvbox\z@\box\ifvoid\LT at lastfoot\LT at foot\else\LT at lastfoot\fi
% \end{macrocode}
% End of "\ifnum\outputpenalty > -\LT at end@pen".
% \begin{macrocode}
diff --git a/required/tools/testfiles/tlb3512.lvt b/required/tools/testfiles/tlb3512.lvt
new file mode 100644
index 00000000..6ceccfc1
--- /dev/null
+++ b/required/tools/testfiles/tlb3512.lvt
@@ -0,0 +1,18 @@
+\documentclass[a4paper,12pt]{article}
+\input{test2e}
+%should be no overfull page warning
+\usepackage{longtable}
+% Viel Text erzeugen
+\newcommand{\baz}{foo foo foo foo foo foo foo foo}
+\newcommand{\qux}{\baz\baz\baz\baz\baz\baz\baz\baz}
+\begin{document}
+\START
+\begin{figure}\vspace{10cm}\end{figure}
+
+\begin{longtable}{llll}
+bar & bar & bar & bar
+\end{longtable}
+
+\qux\qux\qux\qux\qux\qux\qux\qux
+\qux\qux\qux\qux\qux\qux\qux\qux
+\end{document}
diff --git a/base/testfiles/tlb-negfloat-001.tlg b/required/tools/testfiles/tlb3512.tlg
similarity index 80%
copy from base/testfiles/tlb-negfloat-001.tlg
copy to required/tools/testfiles/tlb3512.tlg
index 21c2e49c..1001fbca 100644
--- a/base/testfiles/tlb-negfloat-001.tlg
+++ b/required/tools/testfiles/tlb3512.tlg
@@ -1,5 +1,4 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
[1
-Float Output
-]
+] [2] (github-3512.aux)
More information about the latex3-commits
mailing list.