[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: @nobreakfalse for issue #173 (985b979a)
David Carlisle
d.p.carlisle at gmail.com
Thu Sep 2 00:26:40 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/985b979adb40c920dc988284a703c598c2098729
>---------------------------------------------------------------
commit 985b979adb40c920dc988284a703c598c2098729
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Wed Sep 1 23:26:40 2021 +0100
@nobreakfalse for issue #173
>---------------------------------------------------------------
985b979adb40c920dc988284a703c598c2098729
base/doc/ltnews34.tex | 7 ++-
required/tools/changes.txt | 4 ++
required/tools/longtable.dtx | 7 ++-
required/tools/testfiles/github-0173.lvt | 69 ++++++++++++++++++++++
.../tools/testfiles/github-0173.tlg | 0
5 files changed, 84 insertions(+), 3 deletions(-)
diff --git a/base/doc/ltnews34.tex b/base/doc/ltnews34.tex
index 81dac692..2479a640 100644
--- a/base/doc/ltnews34.tex
+++ b/base/doc/ltnews34.tex
@@ -569,7 +569,12 @@ fixed.
%
\githubissue{614}
-
+\subsection{\pkg{longtable}: Improve behavour after a section heading}
+The \env{longtable} environment now sets the \cs{@nobreakfalse} flag so that
+spacing and indentation changes after a section heading are not triggered by
+a paragraph which follows a table which starts a section.
+%
+\githubissue{173}
\subsection{???}
diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index fd82ec3b..002e8554 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -5,6 +5,10 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2021-09-01 David Carlisle <David.Carlisle at latex-project.org>
+
+ * longtable.dtx: add \@nobreakfalse for github/173
+
2021-07-12 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* array.dtx (section{The Environment Definitions}):
diff --git a/required/tools/longtable.dtx b/required/tools/longtable.dtx
index 778b3b68..64280877 100644
--- a/required/tools/longtable.dtx
+++ b/required/tools/longtable.dtx
@@ -37,7 +37,7 @@
%<driver> \ProvidesFile{longtable.drv}
% \fi
% \ProvidesFile{longtable.dtx}
- [2021-08-13 v4.17 Multi-page Table package (DPC)]
+ [2021-09-01 v4.17 Multi-page Table package (DPC)]
%
% \iffalse
%<*driver>
@@ -974,7 +974,7 @@
% \begin{macro}{\fnum at table}
% \begin{macro}{\tablename}
% \begin{macro}{\ext at table}
-% \changes{v4.16}{2021/05/07}
+% \changes{v4.17}{2021/09/01}
% {ensure \cs{ext at table} is defined gh/637}
% If the "table" counter is not defined (eg in "letter" style), define
% it. (Added in V3.06.)
@@ -1030,11 +1030,14 @@
% \subsection{The \env{longtable} environment}
%
% \begin{macro}{\longtable}
+% \changes{v4.17}{2021/09/01}
+% {\cs{@nobreakfalse} gh/173}
% Called by "\begin{longtable}". This implementation does not work in
% multiple column formats. "\par" added at V3.04.
% \begin{macrocode}
\def\longtable{%
\par
+ \@nobreakfalse
\ifx\multicols\@undefined
\else
\ifnum\col at number>\@ne
diff --git a/required/tools/testfiles/github-0173.lvt b/required/tools/testfiles/github-0173.lvt
new file mode 100644
index 00000000..74ca689a
--- /dev/null
+++ b/required/tools/testfiles/github-0173.lvt
@@ -0,0 +1,69 @@
+\documentclass{article}
+
+%\input{test2e}
+
+\usepackage{longtable}
+
+\def\TESTTABLE{%
+\begin{longtable}[l]{|l|l|l|}
+\caption{Long table before header\strut}
+
+\endfirsthead
+
+\endhead
+
+\endfoot
+
+\endlastfoot
+
+a
+&
+b
+&
+c
+\\
+\hline
+1
+&
+2
+&
+3
+\\
+\hline
+\end{longtable}
+}
+
+
+\def\SOMERULE{\smash{\rule{2pt}{40pt}}}
+\begin{document}
+
+\START
+\showoutput
+\showboxdepth=4
+\section{FOO1}
+
+\TESTTABLE
+
+% FOO2 was closer to longtable than FOO3 will be
+\section{\SOMERULE FOO2}
+
+AAA
+
+\TESTTABLE
+
+% FOO3 was more distant from long table than FOO2
+\section{\SOMERULE FOO3}
+
+AAA
+
+\section{Z}
+
+\TESTTABLE
+
+% Both paras should indent
+
+X
+
+X
+
+\end{document}
\ No newline at end of file
diff --git a/base/testfiles-TU/github-0282.tlg b/required/tools/testfiles/github-0173.tlg
similarity index 100%
copy from base/testfiles-TU/github-0282.tlg
copy to required/tools/testfiles/github-0173.tlg
More information about the latex3-commits
mailing list.