diff options
Diffstat (limited to 'macros/latex/contrib/supertabular')
-rw-r--r-- | macros/latex/contrib/supertabular/CATALOG | 6 | ||||
-rw-r--r-- | macros/latex/contrib/supertabular/MANIFEST | 6 | ||||
-rw-r--r-- | macros/latex/contrib/supertabular/README | 4 | ||||
-rw-r--r-- | macros/latex/contrib/supertabular/supertabular.bug (renamed from macros/latex/contrib/supertabular/ChangeLog) | 69 | ||||
-rw-r--r-- | macros/latex/contrib/supertabular/supertabular.dtx | 323 | ||||
-rw-r--r-- | macros/latex/contrib/supertabular/supertabular.pdf | bin | 254349 -> 291267 bytes |
6 files changed, 259 insertions, 149 deletions
diff --git a/macros/latex/contrib/supertabular/CATALOG b/macros/latex/contrib/supertabular/CATALOG index 8c58273050..b6438f4bcf 100644 --- a/macros/latex/contrib/supertabular/CATALOG +++ b/macros/latex/contrib/supertabular/CATALOG @@ -1,7 +1,7 @@ Name: supertabular (also called supertab) -Problems-To: texniek@braams.xs4all.nl +Problems-To: texniek@texniek.nl Author: J.L. Braams and T. Jurriens -Version: 4.1g +Version: 4.2c Description: @@ -23,6 +23,4 @@ ISBN 0-201-54199-8. Address: TeXniek -Kersengaarde 33 -2723 BP Zoetermeer The Netherlands diff --git a/macros/latex/contrib/supertabular/MANIFEST b/macros/latex/contrib/supertabular/MANIFEST index bcd27adbf4..3015e0edd5 100644 --- a/macros/latex/contrib/supertabular/MANIFEST +++ b/macros/latex/contrib/supertabular/MANIFEST @@ -1,6 +1,6 @@ -README - A short introduction -MANIFEST - A list of files -CATALOG - An entry for the macro catalog +00readme.tx - A short introduction +manifest.txt - A list of files +catalog.txt - An entry for the macro catalog Changelog - An overview of the changes to the package supertabular.dtx - The documented version of the code, including a couple of examples of how to use it. Needs supertabular.sty diff --git a/macros/latex/contrib/supertabular/README b/macros/latex/contrib/supertabular/README index ccd7c596a5..9de0746460 100644 --- a/macros/latex/contrib/supertabular/README +++ b/macros/latex/contrib/supertabular/README @@ -13,9 +13,9 @@ The files contained in this bundle are listed in the file MANIFEST Supertabular can be used with LaTeX2e as a package. -Copyright (C) 1989 - 2020 Johannes L. Braams texniek at braams.xs4all.nl +Copyright (C) 1989 - 2024 Johannes L. Braams texniek at texniek.nl This program can be redistributed and/or modified under the terms of the LaTeX Project Public License Distributed from CTAN archives in directory macros/latex/base/lppl.txt; either -version 1 of the License, or any later version. +version 1.3c of the License, or any later version. diff --git a/macros/latex/contrib/supertabular/ChangeLog b/macros/latex/contrib/supertabular/supertabular.bug index 1dedbe6cd4..7c340f0a99 100644 --- a/macros/latex/contrib/supertabular/ChangeLog +++ b/macros/latex/contrib/supertabular/supertabular.bug @@ -1,8 +1,29 @@ -2020-02-02 Johannes Braams <texniek at braams.xs4all.nl> +2021-02-14 Johannes Braams <texniek at texniek.nl> + + * supertabular.dtx: Issue a \penalty-\@M instead of \newpage when + moving the first part of a supertabular to the next page to + prevent the first two rows from opverlapping. + +2021-02-14 Johannes Braams <texniek at texniek.nl> + + * supertabular.dtx: When the tablehead and/or tabletail are not + defeined the internal macros that store their arguments need to + remain empty as well. Otherwise the algorithm will always think + there's a head and tail with a height of 2.5 pt. + +2020-06-27 Johannes Braams <texniek at texniek.nl> + + * supertabular.dtx: the new algorithm for calculating the height + of the row broke old documents, especially when small font sizes + are used. Made the new algorithm optional (calculate versus + estimate) and make sure the row height covers super- and + subscripts. + +2020-02-02 Johannes Braams <texniek at texniek.nl> * supertabular.dtx: Replaced the way the height of normal tabular lines is calculated by basing it on the height and depth of - \strutbox. This also ment being able to take the \extrarowheight + \strutbox. This also meant being able to take the \extrarowheight from the array package into account. Also the height of the first and subsequent heads was not taken into account in the calculation of the available pageheigt. This @@ -14,25 +35,25 @@ \pagesofar. Therefore we substract a little extra from \ST@pageleft. -2020-01-26 Johannes Braams <texniek at braams.xs4all.nl> +2020-01-26 Johannes Braams <texniek at texniek.nl> * supertabular.dtx: Updated the copyright year and rearranged the text around the examples in order to get the first table to split accross a page boundary again. -2019-01-18 Johannes Braams <texniek at braams.xs4all.nl> +2019-01-18 Johannes Braams <texniek at texniek.nl> * supertabular.dtx: The linenumber in the tracing information, that is reported from within \\, is off by one when the optional argument is missing. Therefore the input linenumber is now saved before TeX starts scanning. Problem reported by Frank Mittelbach. -2019-01-16 Johannes Braams <texniek at braams.xs4all.nl> +2019-01-16 Johannes Braams <texniek at texniek.nl> * supertabular.dtx: The option "pageshow" didn't work as it set a too low value in \c@tracingst. Problem reported by Frank Mittelbach. -2019-01-12 Johannes Braams <texniek at braams.xs4all.nl> +2019-01-12 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : The definition for the first table head was different from the definition of the regular table heads. This problem was reported by FMi as it produced an extra table in @@ -44,7 +65,7 @@ themselves although this couteracts the change that was introduced on 08-08-1999. -2001-08-21 Johannes Braams <texniek at braams.xs4all.nl> +2001-08-21 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : The macro \ST@next needs to be defined when \ST@skippage was called. Therefore I moved the default definition @@ -52,7 +73,7 @@ is called; possibly defined by \ST@newpage. This problem was reported by Andrew Dorrell <dorrell@research.canon.com.au>. -1999-08-08 Johannes Braams <texniek at braams.xs4all.nl> +1999-08-08 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : No longer re-initialize the internal variable \@table@first@head and \@table@last@tail. This made it impossible @@ -61,20 +82,20 @@ redeclaring the firsthead and/or lasttail. Reported by Christian Matuszewski <matuszew@informatik.uni-halle.de>. -Fri Nov 7 20:27:27 1997 Johannes Braams <texniek at braams.xs4all.nl> +Fri Nov 7 20:27:27 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : For standard LaTeX we need to change \@@startpbox not \@startpbox. Found by Peter R Wilson - <Peter.Wilson@PSS.Boeing.com> + <Peter.Wilson@PSS.Boeing.com>. -Wed Oct 8 22:35:40 1997 Johannes Braams <texniek at braams.xs4all.nl> +Wed Oct 8 22:35:40 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx: Running the documentation revealed a loop; inside the table tail and head \\ was reset to \@tabularcr instead of to \@@tabularcr (now: \org@tabularcr). First found by Thomas - Esser <te@informatik.uni-hannover.de> + Esser <te@informatik.uni-hannover.de>. -Sat Sep 27 21:35:29 1997 Johannes Braams <texniek at braams.xs4all.nl> +Sat Sep 27 21:35:29 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx: Added the mpsupertabular and mpsupertabular* environments provided by Axel Kielhorn <A.Kielhorn@tu-bs.de>; @@ -84,14 +105,14 @@ Sat Sep 27 21:35:29 1997 Johannes Braams <texniek at braams.xs4all.nl> The calculation of the available height still missed the case where TeX has already begun the second column. -Thu Sep 18 00:31:55 1997 Johannes Braams <texniek at braams.xs4all.nl> +Thu Sep 18 00:31:55 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : The \tablehead and \tabletail commands reset the command \\; they used \cr for it. That should have been \@tabularcr to properly deal with it's optional argument. Found by Axel Kielhorn <A.Kielhorn@tu-bs.de> -Wed Sep 17 23:59:13 1997 Johannes Braams <texniek at braams.xs4all.nl> +Wed Sep 17 23:59:13 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : In two column mode the parameters that determine how much space is left on the page were not correctly @@ -99,7 +120,7 @@ Wed Sep 17 23:59:13 1997 Johannes Braams <texniek at braams.xs4all.nl> completely. Found by Jeffrey Spielberg <jspielberg@infinet-software.com> -Tue May 20 23:46:08 1997 Johannes Braams <texniek at braams.xs4all.nl> +Tue May 20 23:46:08 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : \shrinkheight didn't shrink the available height for a part of the tabular (as documented); it just *set* it @@ -109,26 +130,26 @@ Tue May 20 23:46:08 1997 Johannes Braams <texniek at braams.xs4all.nl> \@table@last@tail are undefined; this shoud be done globally. Found by Axel Kielhorn <A.Kielhorn@tu-bs.de> -Sat Apr 12 23:37:33 1997 Johannes Braams <texniek at braams.xs4all.nl> +Sat Apr 12 23:37:33 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : Added \ST@stretchht and \ST@prevht to improve decision process. \estimate@lineht now also computes the difference between a normal line height and when \arraystretch is in effect. -Thu Apr 10 23:33:07 1997 Johannes Braams <texniek at braams.xs4all.nl> +Thu Apr 10 23:33:07 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx: Had to repaire some documentation errors. (found by Thomas Esser <te@informatik.uni-hannover.de>) -Wed Apr 9 00:29:36 1997 Johannes Braams <texniek at braams.xs4all.nl> +Wed Apr 9 00:29:36 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : Only the first part of a supertabular can be moved to the next page. Therefore we need to change the definition of \ST@skippage in the middle of processing the supertabular data. -Thu Mar 6 21:56:18 1997 Johannes Braams <texniek at braams.xs4all.nl> +Thu Mar 6 21:56:18 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx : Using a tabular environment in the cells of a supertabular gives `interesting' results when the algorithm @@ -136,14 +157,14 @@ Thu Mar 6 21:56:18 1997 Johannes Braams <texniek at braams.xs4all.nl> tabular. A number of changes were necessary to make this work. Found by Axel Kielhorn <i0080108@ws.rz.tu-bs.de> -Thu Feb 20 23:29:18 1997 Johannes Braams <texniek at braams.xs4all.nl> +Thu Feb 20 23:29:18 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx: Renamed \tableformat into \ST@tableformat because the KOPMA-packages also use \tableformat and therefore clashed with babel. Found by Axel Kielhorn <i0080108@ws.rz.tu-bs.de> -Tue Feb 4 23:50:50 1997 Johannes Braams <texniek at braams.xs4all.nl> +Tue Feb 4 23:50:50 1997 Johannes Braams <texniek at texniek.nl> * supertabular.dtx (section{The Implementation}): Removed the use of the page height correction for p-columns; the current algorithm @@ -155,7 +176,7 @@ Tue Feb 4 23:50:50 1997 Johannes Braams <texniek at braams.xs4all.nl> page on a calculated minimum height of the table. The minimum is the head, the tail and 1 line of tabular data. -Thu Nov 28 20:38:53 1996 Johannes Braams <texniek at braams.xs4all.nl> +Thu Nov 28 20:38:53 1996 Johannes Braams <texniek at texniek.nl> * supertabular.dtx: Started a cleanup of the code, made source file a full fledged .dtx file @@ -168,7 +189,7 @@ Thu Nov 28 20:38:53 1996 Johannes Braams <texniek at braams.xs4all.nl> % jurriens at fwn.rug.nl P.O Box 800, 9700 AV Groningen % % revised by: Johannes Braams -% texniek at braams.xs4all.nl TeXniek (NL) +% texniek at texniek.nl TeXniek (NL) % \def\fileversion{3.7c} % \def\filename{supertabular sty} % \def\filedate{1995/10/16} diff --git a/macros/latex/contrib/supertabular/supertabular.dtx b/macros/latex/contrib/supertabular/supertabular.dtx index be31a2d113..6bde17bbfa 100644 --- a/macros/latex/contrib/supertabular/supertabular.dtx +++ b/macros/latex/contrib/supertabular/supertabular.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 1989-2020 Johannes L. Braams. All rights reserved. +% Copyright 1989-2021 Johannes L. Braams. All rights reserved. % % This file is part of the supertabular package. % --------------------------------------------- @@ -25,14 +25,13 @@ % extension .ins) which are part of the distribution. % \fi % -% \CheckSum{1132} +% \CheckSum{1188} % \iffalse %% Sourcefile `supertabular.dtx'. %% %% Copyright (C) 1988 by Theo Jurriens -%% Copyright (C) 1990-2020 by Johannes Braams texniek at braams.xs4all.nl -%% Kersengaarde 33 -%% 2723 BP Zoetermeer NL +%% Copyright (C) 1990-2024 by Johannes Braams texniek at texniek.nl +%% The Netherlands %% all rights reserved. %% %% @@ -43,11 +42,11 @@ %<package>\ProvidesPackage{supertabular} %<driver>\ProvidesFile{supertabular.drv} %\ProvidesFile{supertabular.dtx} - [2020/02/02 v4.1g the supertabular environment] + [2024/07/20 v4.2c the supertabular environment] % %<*driver> \documentclass{ltxdoc} -\usepackage[debugshow]{supertabular} +\usepackage[debugshow,calculate]{supertabular} \newcommand{\tbsp}{\rule{0pt}{18pt}} \begin{document} \providecommand{\Lenv}[1]{\textsf{#1}} @@ -59,17 +58,19 @@ %</driver> % \fi % -% \changes{v4.0a}{1996/11/28}{Cleanup of the code, now a \file{.dtx} -% source file} -% \changes{v4.0c}{1997/02/20}{Replace \cs{tableformat} by -% \cs{ST@tableformat} to prevent a clash with the \pkg{KOMA} -% pacakage} -% \changes{v4.0f}{1997/04/10}{Repaired a few typos in the -% documentation} -% \changes{v4.1a}{1997/09/18}{Repaired a number of typos and added -% contributed mpsupertabular environemnts} -% \changes{v4.1b}{1997/10/08}{Renamed \cs{@@tabularcr} to -% \cs{org@tabularcr}} +% \changes{v4.0a}{1996/11/28}{Cleanup of the code, now a \file{.dtx} +% source file} +% \changes{v4.0c}{1997/02/20}{Replace \cs{tableformat} by +% \cs{ST@tableformat} to prevent a clash with the \pkg{KOMA} +% pacakage} +% \changes{v4.0f}{1997/04/10}{Repaired a few typos in the +% documentation} +% \changes{v4.1a}{1997/09/18}{Repaired a number of typos and added +% contributed mpsupertabular environemnts} +% \changes{v4.1b}{1997/10/08}{Renamed \cs{@@tabularcr} to +% \cs{org@tabularcr}} +% \changes{v4.2a}{2020-06-27}{renamed \cs{ST@lineht} to \cs{ST@rowht}} +% \changes{v4.2c}{2024/07/20}{A few documentation changes} % % \GetFileInfo{supertabular.dtx} % \title{The \texttt{supertabular} environment\thanks{This file @@ -110,7 +111,13 @@ % and why \pkg{supertabular} decides to break the tabular % environment in order to produce a new page. % \item The option \textsf{debugshow} also adds information about -% each line that is added to the tabular. +% each row that is added to the tabular. +% \item The option \textsf{estimate} (the default) has the package +% use the old estimation-based algortihm to establish the height +% of individual rows. +% \item The option \textsf{calculate} has the package use the new +% calculation-based algortihm to establish the height +% of individual rows. % \end{enumerate} % % Below is a description of the new commands and environments that @@ -172,15 +179,15 @@ % % \begin{itemize} % \item When the material of a normal entry (not a p-arg) becomes -% larger than the estimated |\ST@lineht|, overfull |\vbox|es -% will be produced at all. +% larger than the estimated |\ST@rowht|, overfull |\vbox|es +% will be produced. % \item When the last p-arg on a page gets more than 4 lines % (probably even more than 3 lines) it will result in an overfull % |\vbox|. Also some combinations of |\baselinestretch| -% |\arraystretch| and a large font may lead to one line too much. -% \item if accidentally the last line of the tabular produces a +% |\arraystretch| and a large font may lead to one row too much. +% \item if accidentally the last row of the tabular produces a % newpage, on the next page the tabletail will be written -% immediately after the tablehead. Depending on the contents this +% immediately after the tablehead. Depending on the contents, this % may result in an error message regarding misplaced |\noalign|. % % A quick but not very elegant solution: shrink the allowed height @@ -431,6 +438,36 @@ \DeclareOption{errorshow}{\c@tracingst\z@} \DeclareOption{pageshow}{\c@tracingst\thr@@} \DeclareOption{debugshow}{\c@tracingst5\relax} +% \end{macrocode} +% In version 4.1g a new way of determining the height of the +% average row was introduced. Instead of using an estimation, based +% on the value of |\baselineskip| a computation was introduced, +% based on the size of the |\strutbox|. The effect of this new +% method was that the parial tabulars fill the page better, so less +% \texttt{underfull vbox} message would appear. Unfortunately this +% had a negative effect on existing documents (that don;t come out +% like they used to) and especially when a very small font +% (|\tiny| or |\scriptsize| was chosen for the tabular and the +% cells contain subscripts or superscripts. It turned out that the +% heigth and depth of a formula like $5^5_5$ exceeds the size of +% |\strutbox|. The result is that the rows have more height (and/or +% depth) thatn what the algorithm computed. Hence, when more rows +% are added to the partial tabular than fit on the page. Especially +% on the first part thisis a probem as the partial tabular becomes +% too high and doesn't fit in the avialbale space. \TeX\ then +% decides to move it to the next page, resulting in two +% consecutive pages that have a lot of white space on them. +% \changes{v4.2a}{2020-06-27}{Two new options to choose the +% computation algorithhm} +% \begin{macrocode} +\DeclareOption{calculate}{\def\ST@calculate@rowht{\ST@compute@rowht}} +\DeclareOption{estimate}{\def\ST@calculate@rowht{\ST@estimate@rowht}} +%\def\ST@calculate@rowht{\ST@estimate@rowht} +% \end{macrocode} +% The default for the options is to only show errors and use the +% old estmation algorithm (so as not to break old documents). +% \begin{macrocode} +\ExecuteOptions{errorshow,estimate} \ProcessOptions % \end{macrocode} % @@ -510,7 +547,7 @@ % yet be visible in the amount of space occupoed on the page % sofar. Therefore we include the possibility to reduce the height % of the first part of the supertabular. In order to this we need a -% macro that indicates a aption has been put in front of the +% macro that indicates a caption has been put in front of the % table. We do this to reduce the risk that the first part of the % table is too high after all and is pushed onto the next page due % to an overfull |\vbox| condition. @@ -523,7 +560,7 @@ % \begin{macro}{\ST@caption} % This is a redefinition of LaTeX's |\@caption|, |\@makecaption| is % called within a group so as not to return to |\normalsize| -% globally. also a fix is made for the `feature' of the +% globally. Also a fix is made for the `feature' of the % |\@makecaption| of the document class \cls{article} and friends % that a caption \textbf{always} gets a |\vskip 10pt| at the top % and \textbf{none} at the bottom. If a user wants to precede his @@ -554,14 +591,19 @@ % to \cs{@tabularcr}} % \changes{v4.1b}{1997/10/08}{Not \cs{@tabularcr} but % \cs{org@tabularcr}} +% \changes{v4.2b}{2021-02-14}{When the argument is empty the internal +% macro \cs{@tablehead} needs to be empty as well.} % \begin{macrocode} \newcommand\tablehead[1]{% - \gdef\@tablehead{% - \noalign{% - \global\let\@savcr=\\ - \global\let\\=\org@tabularcr}% - #1% - \noalign{\global\let\\=\@savcr}}} + \def\@ST@arg{#1}% + \ifx\@ST@arg\@empty\gdef\@tablehead{}\else + \gdef\@tablehead{% + \noalign{% + \global\let\@savcr=\\ + \global\let\\=\org@tabularcr}% + #1% + \noalign{\global\let\\=\@savcr}}% + \fi} \tablehead{} % \end{macrocode} % It's possible to specify a different tablehead for the first @@ -571,17 +613,22 @@ % document. % \changes{v4.1f}{2019/01/12}{\cs{\@table@first@head} needs the same % definition as \cs{\@tablehead} (found by FMi)} +% \changes{v4.2b}{2021-02-14}{When the argument is empty the internal +% macro \cs{@table@first@head} needs to be empty as well.} % \begin{macrocode} \newcommand\tablefirsthead[1]{% - \gdef\@table@first@head{% - \noalign{% - \global\let\@savcr=\\ - \global\let\\=\org@tabularcr}% - #1% - \noalign{% - \global\let\\=\@savcr - \global\let\@table@first@head\undefined - }}} + \def\@ST@arg{#1}% + \ifx\@ST@arg\@empty\gdef\@table@first@head{}\else + \gdef\@table@first@head{% + \noalign{% + \global\let\@savcr=\\ + \global\let\\=\org@tabularcr}% + #1% + \noalign{% + \global\let\\=\@savcr + \global\let\@table@first@head\undefined + }}% + \fi} % \end{macrocode} % \end{macro} % \end{macro} @@ -598,14 +645,19 @@ % to \cs{@tabularcr}} % \changes{v4.1b}{1997/10/08}{Not \cs{@tabularcr} but % \cs{org@tabularcr}} +% \changes{v4.2b}{2021-02-14}{When the argument is empty the internal +% macro \cs{@tabletail} needs to be empty as well.} % \begin{macrocode} \newcommand\tabletail[1]{% - \gdef\@tabletail{% - \noalign{% - \global\let\@savcr=\\ - \global\let\\=\org@tabularcr}% - #1% - \noalign{\global\let\\=\@savcr}}} + \def\@ST@arg{#1}% + \ifx\@ST@arg\@empty\gdef\@tabletail{}\else + \gdef\@tabletail{% + \noalign{% + \global\let\@savcr=\\ + \global\let\\=\org@tabularcr}% + #1% + \noalign{\global\let\\=\@savcr}}% + \fi} \tabletail{} % \end{macrocode} % It's possible to specify a different tabletail for the last @@ -615,17 +667,22 @@ % document. % \changes{v4.1f}{2019/01/12}{\cs{\@table@last@tail} needs the same % definition as \cs{\@tabletail}} +% \changes{v4.2b}{2021-02-14}{When the argument is empty the internal +% macro \cs{@tabletail} needs to be empty as well.} % \begin{macrocode} \newcommand\tablelasttail[1]{% - \gdef\@table@last@tail{% - \noalign{% - \global\let\@savcr=\\ - \global\let\\=\org@tabularcr}% - #1% - \noalign{% - \global\let\\=\@savcr - \global\let\@table@last@tail\undefined - }}} + \def\@ST@arg{#1}% + \ifx\@ST@arg\@empty\gdef\@table@last@tail{}\else + \gdef\@table@last@tail{% + \noalign{% + \global\let\@savcr=\\ + \global\let\\=\org@tabularcr}% + #1% + \noalign{% + \global\let\\=\@savcr + \global\let\@table@last@tail\undefined + }}% + \fi} % \end{macrocode} % \end{macro} % \end{macro} @@ -660,7 +717,7 @@ % % \begin{macro}{\ST@trace@cr} % A variant of |\ST@trace| that can be called from within |\\| as -% that command is looking for an optional argument will end up +% that command is looking for an optional argument and will end up % scanning the next line. % \begin{macro}{\ST@save@lineno} % \changes{v4.1f}{2019/01/18}{Added a macro to save the current input @@ -752,25 +809,22 @@ % \changes{v4.0b}{1997/02/04}{Removed the use of \cs{ST@pboxcorr}, % correction seems to be no longer necessary} % -% \begin{macro}{\ST@lineht} +% \begin{macro}{\ST@rowht} % \begin{macro}{\ST@stretchht} % \changes{v4.0g}{1997/04/12}{Dimension register added} % \begin{macro}{\ST@prevht} % \changes{v4.0g}{1997/04/12}{Dimension register added} -% The estimated height of a normal line is stored in -% |\ST@lineht|. The dimension register |\ST@stretchht| is used to -% store the difference between the `normal' line height and the -% line height when |\arraystretch| has a non-standard value. This -% is used in the case where p-box entries are added to the -% tabular. The dimension register |\ST@prevht| is use to store the -% height of the previous line to use it as an estimate for the -% height of the next line. This is needed for a better estimate of +% The estimated height of a normal row is stored in +% |\ST@rowht|. The dimension register |\ST@stretchht| was used to +% store the difference between the `normal' row height and the +% row height when |\arraystretch| has a non-standard value. This +% was used in the case where p-box entries are added to the +% tabular. The dimension register |\ST@prevht| is used to store the +% height of the previous row, to use it as an estimate for the +% height of the next row. This is needed for a better estimate of % when to break the tabular. -% \changes{v4.1g}{2020/02/02}{\cs{ST@stretchht} is no longer needed, -% will be removed in a future release} % \begin{macrocode} -\newdimen\ST@lineht -%\newdimen\ST@stretchht +\newdimen\ST@rowht \newdimen\ST@prevht % \end{macrocode} % \end{macro} @@ -907,10 +961,12 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\ST@compute@lineht} -% \changes{v4.1g}{2020/02/02}{New macro \cs{ST@compute@lineht} to -% replacte \cs{estimate@lineht}} -% The height of a line in an array environemnt can be computed as: +% \begin{macro}{\ST@compute@rowht} +% \changes{v4.1g}{2020/02/02}{New macro \cs{ST@compute@rowht} to +% replace \cs{ST@estimate@rowht}} +% \changes{v4.2a}{2020-06-27}{Make sure that \cs{ST@rowht} is large +% enough to take subscripts and superscripts into account} +% The height of a row in an array environemnt can be computed as: % \begin{itemize} % \item the height of the strutbox |\ht\strutbox| (plus % |\extrarowheight| when the \pkg{array} package is loaded), @@ -919,34 +975,60 @@ % by |\arraystretch|. % \end{itemize} % \begin{macrocode} -\def\ST@compute@lineht{% - \ST@lineht=\ht\strutbox +\def\ST@compute@rowht{% +% \end{macrocode} +% Temporarily store a formula with superscript and subscript in a +% box in order to be able to measure its height and depth. +% \begin{macrocode} + \setbox\@tempboxa=\vbox{\@arrayparboxrestore $5^5_5$} +% \end{macrocode} +% Use the largest height of either |\@tempboxa| or |\strutbox|. +% \begin{macrocode} + \ifnum\ht\@tempboxa>\ht\strutbox + \ST@rowht=\ht\@tempboxa + \else + \ST@rowht=\ht\strutbox + \fi +% \end{macrocode} +% If the \textsf{array} pacakge is used we need to add the +% value of |\extrarowheight|. +% \begin{macrocode} \ifx\extrarowheight\undefined\else - \advance \ST@lineht by \extrarowheight + \advance \ST@rowht by \extrarowheight + \fi +% \end{macrocode} +% Also use the largest depth of either |\@tempboxa| or |\strutbox|. +% \begin{macrocode} + \ifnum\dp\@tempboxa>\dp\strutbox + \advance\ST@rowht \dp\@tempboxa + \else + \advance\ST@rowht \dp\strutbox \fi - \ST@lineht = \arraystretch\ST@lineht - \advance\ST@lineht \arraystretch\dp\strutbox - \ST@trace\tw@{Normal Line height: \the\ST@lineht}% +% \end{macrocode} +% And finally multiply by |\arraystretch|. +% \begin{macrocode} + \ST@rowht = \arraystretch\ST@rowht +% \end{macrocode} +% \begin{macrocode} + \ST@trace\tw@{Normal Row height: \the\ST@rowht}% } % \end{macrocode} % \end{macro} % -% \begin{macro}{\estimate@lineht} +% \begin{macro}{\ST@estimate@rowht} % Estimates the height of normal line taking |\arraystretch| into % account. Also computes the difference between a normal line and a % `stretched' one. % \changes{v4.0b}{1997/02/04}{Removed use of \cs{ST@pboxcorr}} % \changes{v4.0g}{1997/04/12}{Added the computation of % \cs{ST@stretchht}} -% This macro will be removed in a future release. +% \changes{v4.2a}{2020-06-27}{removed the computation of +% \cs{ST@stretchht} as it is no longer used} % \begin{macrocode} -\def\estimate@lineht{% - \ST@lineht=\arraystretch \baslineskp - \global\advance\ST@lineht by 1\p@ - \ST@stretchht\ST@lineht\advance\ST@stretchht-\baslineskp - \ifdim\ST@stretchht<\z@\ST@stretchht\z@\fi - \ST@trace\tw@{Average line height: \the\ST@lineht}% - \ST@trace\tw@{Stretched line height: \the\ST@stretchht}% +\def\ST@estimate@rowht{% + \ST@rowht=\arraystretch \baslineskp + \global\advance\ST@rowht by 1\p@ + \ST@trace\tw@{Average Row height: \the\ST@rowht}% } % \end{macrocode} % \end{macro} @@ -1071,23 +1153,23 @@ \ST@tailht=\ht\@tempboxa\advance\ST@tailht\dp\@tempboxa \fi % \end{macrocode} -% We add the average height of a line to this because when we +% We add the average height of a row to this because when we % decide to continue the tabular we need to have enough space left -% for one line and the tail. +% for one row \emph{and} the tail. % \begin{macrocode} - \advance\ST@tailht by \ST@lineht + \advance\ST@tailht by \ST@rowht \ST@trace\tw@{Height of tail: \the\ST@tailht}% \ST@trace\tw@{Maximum height of tabular: \the\ST@pageleft}% \@tempdima\ST@headht % \end{macrocode} % \changes{v4.0b}{1997/02/04}{Base the decision whether to start on a -% new page on the total of headheight, tailht and lineht} +% new page on the total of headheight, tailht and rowht} % Now we decide whether we can continue on the current page or % whether we need to start on a new page. We assume that the % minimum height of a tabular is the height of the head, the tail -% and one line of data. If that doesn't fit a new page is started. +% and one row of data. If that doesn't fit a new page is started. % \begin{macrocode} - \advance\@tempdima\ST@lineht + \advance\@tempdima\ST@rowht \advance\@tempdima\ST@tailht \ST@trace\tw@{Minimum height of tabular: \the\@tempdima}% \ifnum\@tempdima>\ST@pageleft @@ -1164,7 +1246,7 @@ \global\let\@oldcr=\\ % \end{macrocode} % Save the current value of |\baselineskip|, as we need it in the -% calculation of the average height of a line. +% calculation of the average height of a row. % \begin{macrocode} \def\baslineskp{\baselineskip}% % \end{macrocode} @@ -1174,9 +1256,9 @@ \ifx\undefined\@classix % \end{macrocode} % Save old |\@tabularcr| and insert the definition of +% |\ST@tabularcr|. % \changes{v4.1c}{1997/11/07}{For standard \LaTeX\ we need to change % \cs{@@startpbox}, \emph{not} \cs{@startpbox}} -% |\ST@tabularcr|. % \begin{macrocode} \let\org@tabularcr\@tabularcr \let\@tabularcr\ST@tabularcr @@ -1210,20 +1292,20 @@ \fi % \end{macrocode} % The first part of a supertabular may be moved on to the next page -% if it doesn't fit on the current page afterall. Subsequent parts +% if it doesn't fit on the current page after all. Subsequent parts % can not be moved; therefor we will have to switch the definition -% of |\ST@skippart| around. +% of |\ST@skippage| around. % \changes{v4.0e}{1997/04/09}{Make sure that only the first part of a % supertabular can be moved to the next page.} % \begin{macrocode} \let\ST@skippage\ST@skipfirstpart % \end{macrocode} -% Now we can estimate the average line height and the height of the +% Now we can estimate the average row height and the height of the % first page of the \Lenv{supertabular}. % \changes{v4.0i}{1997/09/18}{Added \cs{noindent}} -% \changes{v4.1g}{2020/02/02}{Now call \cs{ST@compute@lineht}} +% \changes{v4.1g}{2020/02/02}{Now call \cs{ST@calculate@rowht}} % \begin{macrocode} - \ST@compute@lineht + \ST@calculate@rowht \@calfirstpageht \noindent } @@ -1544,20 +1626,20 @@ % \begin{macrocode} \def\ST@cr{% \noalign{% - \ifnum\ST@pboxht<\ST@lineht + \ifnum\ST@pboxht<\ST@rowht % \end{macrocode} -% If there is a non-empty line, but an empty parbox, then -% |\ST@pboxht| might be non-zero, but too small thereby breaking -% the algorithm. Therefor we estimate the height of the line to be -% |\ST@lineht| in this case. +% If there is a non-empty row, but an empty parbox, then +% |\ST@pboxht| might be non-zero, but too small, thereby breaking +% the algorithm. Therefor we estimate the height of the row to be +% |\ST@rowht| in this case. % \begin{macrocode} - \global\advance\ST@pageleft -\ST@lineht + \global\advance\ST@pageleft -\ST@rowht % \end{macrocode} % And we store that fact in |\ST@prevht|. -% \changes{v4.0g}{1997/04/12}{store the height of the previous line in +% \changes{v4.0g}{1997/04/12}{store the height of the previous row in % \cs{ST@prevht}} % \begin{macrocode} - \global\ST@prevht\ST@lineht + \global\ST@prevht\ST@rowht \else % \end{macrocode} % When the parbox was not empty we take into account its height @@ -1605,11 +1687,11 @@ \else % \end{macrocode} % When there is not enough space left on the current page, we start -% a new page. To compute the amount of space need we use the -% height of the previous line (|\ST@prevht|) as an estimation of -% the height of the next line. If we are processing a +% a new page. To compute the amount of space needed we use the +% height of the previous row (|\ST@prevht|) as an estimation of +% the height of the next row. If we are processing a % \Lenv{mpsupertabular} we need to take the height of the footnotes -% into account. +% into account as well. % \changes{v4.0g}{1997/04/12}{Leave room for both \cs{ST@tailht} % \emph{and} \cs{ST@prevht}} % \changes{v4.1a}{1997/09/19}{Take care of space needed for @@ -1659,10 +1741,19 @@ % \begin{macrocode} \global\advance\ST@pageleft\pagetotal % \end{macrocode} -% Then we can set |\ST@pagesofar| to $0$ and start the new page. +% Then we can set |\ST@pagesofar| to $0$... % \begin{macrocode} \global\ST@pagesofar\z@ - \newpage +% \end{macrocode} +% ... and start the new page, but in this special case we need to +% trigger the output routine directly by issuing a |\penalty| +% rather than calling |\newpage| as that macro effectively issues a +% |\vskip-\maxdepth| which makes the first two rows of the tabular +% overlap. +% \changes{v4.2b}{2021-02-14}{Issue a \cs{penalty} instead of +% \cs{newpage} to trigger the output routine.} +% \begin{macrocode} + \penalty -\@M % \end{macrocode} % % Finally we make sure that this macro can only be executed once diff --git a/macros/latex/contrib/supertabular/supertabular.pdf b/macros/latex/contrib/supertabular/supertabular.pdf Binary files differindex 444cbfdcd7..a24a8c865c 100644 --- a/macros/latex/contrib/supertabular/supertabular.pdf +++ b/macros/latex/contrib/supertabular/supertabular.pdf |