[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: guard for run-in headings issue #131 (87d0983f)

David Carlisle d.p.carlisle at gmail.com
Thu Sep 2 01:00:29 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/87d0983feb74dcd5c971cdb2c34881f07ab61038

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

commit 87d0983feb74dcd5c971cdb2c34881f07ab61038
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Thu Sep 2 00:00:29 2021 +0100

    guard for run-in headings issue #131


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

87d0983feb74dcd5c971cdb2c34881f07ab61038
 base/doc/ltnews34.tex                    |  8 ++--
 required/tools/changes.txt               |  2 +-
 required/tools/longtable.dtx             |  3 +-
 required/tools/testfiles/github-0131.lvt | 28 ++++++++++++++
 required/tools/testfiles/github-0131.tlg | 64 ++++++++++++++++++++++++++++++++
 5 files changed, 100 insertions(+), 5 deletions(-)

diff --git a/base/doc/ltnews34.tex b/base/doc/ltnews34.tex
index 2479a640..49c79722 100644
--- a/base/doc/ltnews34.tex
+++ b/base/doc/ltnews34.tex
@@ -569,12 +569,14 @@ fixed.
 %
 \githubissue{614}
 
-\subsection{\pkg{longtable}: Improve behavour after a section heading}
+\subsection{\pkg{longtable}: Improve behavior 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.
+a paragraph which follows a table which starts a section. Similarly a test for
+\cs{if at noskipsec} added so that a table follows a run-in heading
+rather than appearing before it.
 %
-\githubissue{173}
+\githubissue[s]{131 and 173}
 
 \subsection{???}
 
diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index 002e8554..aa5a3419 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -7,7 +7,7 @@ are not part of the distribution.
 
 2021-09-01  David Carlisle  <David.Carlisle at latex-project.org>
 
-	* longtable.dtx: add \@nobreakfalse for github/173
+	* longtable.dtx: add \@nobreakfalse for github/173 and \if at noskipsec for gh/131
 
 2021-07-12  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
diff --git a/required/tools/longtable.dtx b/required/tools/longtable.dtx
index 64280877..b66aef07 100644
--- a/required/tools/longtable.dtx
+++ b/required/tools/longtable.dtx
@@ -1031,12 +1031,13 @@
 %
 % \begin{macro}{\longtable}
 % \changes{v4.17}{2021/09/01}
-%                {\cs{@nobreakfalse} gh/173}
+%                {\cs{@nobreakfalse} gh/173 \cs{ifnoskipsec} test for gh/131}
 % Called by "\begin{longtable}". This implementation does not work in
 % multiple column formats. "\par" added at V3.04.
 %    \begin{macrocode}
 \def\longtable{%
   \par
+  \if at noskipsec\mbox{}\par\fi
   \@nobreakfalse
   \ifx\multicols\@undefined
   \else
diff --git a/required/tools/testfiles/github-0131.lvt b/required/tools/testfiles/github-0131.lvt
new file mode 100644
index 00000000..c225a032
--- /dev/null
+++ b/required/tools/testfiles/github-0131.lvt
@@ -0,0 +1,28 @@
+\documentclass{article}
+\usepackage{longtable}
+\input{test2e}
+\begin{document}
+
+\START
+\showoutput
+\showboxdepth=3
+
+\subsubsection{Title 3}
+
+\begin{longtable}[]{@{}llll@{}}
+12 & 12 & 12 & 12\tabularnewline
+\end{longtable}
+
+\paragraph{Title 4}
+
+\begin{longtable}[]{@{}llll@{}}
+12 & 12 & 12 & 12\tabularnewline
+\end{longtable}
+
+\paragraph{Title 5}
+
+\begin{longtable}[]{@{}llll@{}}
+12 & 12 & 12 & 12\tabularnewline
+\end{longtable}
+
+\end{document}
\ No newline at end of file
diff --git a/required/tools/testfiles/github-0131.tlg b/required/tools/testfiles/github-0131.tlg
new file mode 100644
index 00000000..aa9424ae
--- /dev/null
+++ b/required/tools/testfiles/github-0131.tlg
@@ -0,0 +1,64 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0 []
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 397.5132fil
+...\write-{}
+...\glue(\topskip) 3.05556
+...\hbox(6.94444+0.0)x345.0, glue set 276.1462fil []
+...\write1{\@writefile{toc}{\protect \contentsline {subsubsection}{\protect \numberline {0.0.1}Title 3}{\thepage }{}\protected at file@percent }}
+...\penalty 10000
+...\glue 6.45831 plus 0.86108
+...\penalty 0
+...\glue 12.0 plus 4.0 minus 4.0
+...\penalty 10000
+...\hbox(8.39996+3.60004)x345.0, glue set 134.49991fill []
+...\penalty 10000
+...\penalty 0
+...\glue 12.0 plus 4.0 minus 4.0
+...\glue -12.0 plus -4.0 minus -4.0
+...\penalty -300
+...\glue 12.0 plus 4.0 minus 4.0
+...\glue -12.0 plus -4.0 minus -4.0
+...\glue 13.99301 plus 4.30554 minus 0.86108
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.05556
+...\hbox(6.94444+0.0)x345.0, glue set 301.28488fil []
+...\penalty 0
+...\glue 12.0 plus 4.0 minus 4.0
+...\penalty 10000
+...\hbox(8.39996+3.60004)x345.0, glue set 134.49991fill []
+...\penalty 10000
+...\penalty 0
+...\glue 12.0 plus 4.0 minus 4.0
+...\glue -12.0 plus -4.0 minus -4.0
+...\penalty -300
+...\glue 12.0 plus 4.0 minus 4.0
+...\glue -12.0 plus -4.0 minus -4.0
+...\glue 13.99301 plus 4.30554 minus 0.86108
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 5.05556
+...\hbox(6.94444+0.0)x345.0, glue set 301.28488fil []
+...\penalty 0
+...\glue 12.0 plus 4.0 minus 4.0
+...\penalty 10000
+...\hbox(8.39996+3.60004)x345.0, glue set 134.49991fill []
+...\penalty 10000
+...\penalty 0
+...\glue 12.0 plus 4.0 minus 4.0
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0
+...\hbox(6.44444+0.0)x345.0, glue set 170.0fil []
+(github-0131.aux)





More information about the latex3-commits mailing list.