Skip to content

Commit

Permalink
use everypar for strut in \LT@startpbox, issue #1128
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrike Fischer committed Aug 25, 2023
1 parent 235e1a0 commit 40bdb42
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 3 deletions.
4 changes: 3 additions & 1 deletion base/doc/ltnews38.tex
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ \section{Changes to packages in the \pkg{amsmath} category}
\section{Changes to packages in the \pkg{graphics} category}

\section{Changes to packages in the \pkg{tools} category}
\subsection{\pkg{longtable}: correct p-column definition}


In general the \pkg{longtable} implementation follows
the \pkg{array} usage but the package didn't take over a change made 1992 in \pkg{array} which adjusted the handling of the strut inserted at the begin of p-columns. As a consequence there are a number of inconsistencies in the output of p-columns between \pkg{tabular} and \pkg{longtable}. This has been corrected, \pkg{longtable} uses now for the strut the same definition as \pkg{array}. \githubissue{1128}
%\medskip

\begin{thebibliography}{9}
Expand Down
5 changes: 5 additions & 0 deletions required/tools/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ are not part of the distribution.
All changes above are only part of the development branch for the next release.
================================================================================

2023-08-25 Ulrike Fischer <Ulrike.Fischer@latex-project.org>

* longtable.dtx: use \everypar to insert the strut in \LT@startpbox
to match the array use, github/1128

#########################
# 2023-06-01 Release
#########################
Expand Down
8 changes: 6 additions & 2 deletions required/tools/longtable.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
%<driver> \ProvidesFile{longtable.drv}
% \fi
% \ProvidesFile{longtable.dtx}
[2021-09-01 v4.17 Multi-page Table package (DPC)]
[2025-08-25 v4.18 Multi-page Table package (DPC)]
%
% \iffalse
%<*driver>
Expand Down Expand Up @@ -2206,12 +2206,16 @@
\bgroup
% \end{macrocode}
% \changes{v4.12}{2019/02/06}{Color group to match array package}
% \changes{v4.18}{2023/08/25}{Use \cs{everypar} to match array package, github 1128}%
% \begin{macrocode}
\color@begingroup
\let\@footnotetext\LT@p@ftntext
\setlength\hsize{#1}%
\@arrayparboxrestore
\vrule \@height \ht\@arstrutbox \@width \z@}
\everypar{%
\vrule \@height \ht\@arstrutbox \@width \z@
\everypar{}}%
}
% \end{macrocode}
% \end{macro}
%
Expand Down
16 changes: 16 additions & 0 deletions required/tools/testfiles/github-1128.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
\documentclass{article}
\input{regression-test}
\usepackage{longtable,array}
\begin{document}
\START \showoutput
\begin{tabular}{lp{1cm}}
\hline
some text & \medskip xxx
\end{tabular}

\begin{longtable}{lp{1cm}}
\hline
some text & \medskip xxx
\end{longtable}

\end{document}
146 changes: 146 additions & 0 deletions required/tools/testfiles/github-1128.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
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
....\hbox(0.0+0.0)x345.0
..\glue 25.0
..\glue(\lineskip) 0.0
..\vbox(550.0+0.0)x345.0, glue set 477.3491fil
...\write-{}
...\glue(\topskip) 0.0
...\hbox(15.89998+10.89998)x345.0, glue set 234.99161fil
....\hbox(0.0+0.0)x15.0
....\hbox(15.89998+10.89998)x95.00839
.....\mathon
.....\vbox(15.89998+10.89998)x95.00839
......\rule(0.4+0.0)x95.00839
......\hbox(8.39996+18.0)x95.00839
.......\glue(\tabskip) 0.0
.......\hbox(8.39996+18.0)x54.55565
........\rule(8.39996+3.60004)x0.0
........\glue 6.0
........\glue 0.00002
........\OT1/cmr/m/n/10 s
........\OT1/cmr/m/n/10 o
........\OT1/cmr/m/n/10 m
........\OT1/cmr/m/n/10 e
........\glue 3.33333 plus 1.66666 minus 1.11111
........\OT1/cmr/m/n/10 t
........\OT1/cmr/m/n/10 e
........\OT1/cmr/m/n/10 x
........\OT1/cmr/m/n/10 t
........\glue 0.0 plus 1.0fil
........\glue 6.0
.......\glue(\tabskip) 0.0
.......\hbox(8.39996+18.0)x40.45274
........\glue 6.0
........\vbox(0.0+18.0)x28.45274
.........\glue 6.0 plus 2.0 minus 2.0
.........\glue 0.0
.........\glue(\parskip) 0.0
.........\glue(\parskip) 0.0
.........\hbox(8.39996+3.60004)x28.45274, glue set 12.61934fil
..........\hbox(0.0+0.0)x0.0
..........\rule(8.39996+*)x0.0
..........\OT1/cmr/m/n/10 x
..........\OT1/cmr/m/n/10 x
..........\OT1/cmr/m/n/10 x
..........\penalty 10000
..........\rule(0.0+3.60004)x0.0
..........\penalty 10000
..........\glue(\parfillskip) 0.0 plus 1.0fil
..........\glue(\rightskip) 0.0
........\glue 0.0 plus 1.0fil
........\glue 6.0
.......\glue(\tabskip) 0.0
.....\mathoff
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
...\penalty 0
...\glue 12.0 plus 4.0 minus 4.0
...\penalty 10000
...\penalty 10000
...\hbox(0.4+0.0)x345.0, glue set 124.9958fill
....\glue(\tabskip) 0.0 plus 1.0fill
....\hbox(0.4+0.0)x54.55565, glue set 95.00839fill
.....\leaders 0.0 plus 1.0fill
......\rule(0.4+0.0)x*
....\glue(\tabskip) 0.0
....\hbox(0.0+0.0)x40.45274
....\glue(\tabskip) 0.0 plus 1.0fill
...\penalty -51
...\glue -0.4
...\glue(\lineskip) 0.0
...\hbox(0.4+0.0)x345.0, glue set 124.9958fill
....\glue(\tabskip) 0.0 plus 1.0fill
....\hbox(0.4+0.0)x54.55565, glue set 95.00839fill
.....\leaders 0.0 plus 1.0fill
......\rule(0.4+0.0)x*
....\glue(\tabskip) 0.0
....\hbox(0.0+0.0)x40.45274
....\glue(\tabskip) 0.0 plus 1.0fill
...\penalty 10000
...\glue(\lineskip) 0.0
...\hbox(8.39996+18.0)x345.0, glue set 124.9958fill
....\glue(\tabskip) 0.0 plus 1.0fill
....\hbox(8.39996+18.0)x54.55565
.....\rule(8.39996+3.60004)x0.0
.....\glue 6.0
.....\glue 0.00002
.....\OT1/cmr/m/n/10 s
.....\OT1/cmr/m/n/10 o
.....\OT1/cmr/m/n/10 m
.....\OT1/cmr/m/n/10 e
.....\glue 3.33333 plus 1.66666 minus 1.11111
.....\OT1/cmr/m/n/10 t
.....\OT1/cmr/m/n/10 e
.....\OT1/cmr/m/n/10 x
.....\OT1/cmr/m/n/10 t
.....\glue 0.0 plus 1.0fil
.....\glue 6.0
....\glue(\tabskip) 0.0
....\hbox(8.39996+18.0)x40.45274
.....\glue 6.0
.....\vbox(0.0+18.0)x28.45274
......\glue 6.0 plus 2.0 minus 2.0
......\glue 0.0
......\glue(\parskip) 0.0
......\glue(\parskip) 0.0
......\hbox(8.39996+3.60004)x28.45274, glue set 12.61934fil
.......\hbox(0.0+0.0)x0.0
.......\rule(8.39996+*)x0.0
.......\OT1/cmr/m/n/10 x
.......\OT1/cmr/m/n/10 x
.......\OT1/cmr/m/n/10 x
.......\penalty 10000
.......\rule(0.0+3.60004)x0.0
.......\penalty 10000
.......\glue(\parfillskip) 0.0 plus 1.0fil
.......\glue(\rightskip) 0.0
.....\glue 0.0 plus 1.0fil
.....\glue 6.0
....\glue(\tabskip) 0.0 plus 1.0fill
...\penalty 10000
...\penalty 0
...\glue 12.0 plus 4.0 minus 4.0
...\glue -5.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
....\glue 0.0 plus 1.0fil
....\OT1/cmr/m/n/10 1
....\glue 0.0 plus 1.0fil
(github-1128.aux)

0 comments on commit 40bdb42

Please sign in to comment.