summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/supertabular
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-02-03 22:32:05 +0000
committerKarl Berry <karl@freefriends.org>2020-02-03 22:32:05 +0000
commit050ec71aa52bf1c4a761871ce842c31a9b70d353 (patch)
tree00bc42120fc3cc3ce138edbffbd9b90ea5fedd9f /Master/texmf-dist/tex/latex/supertabular
parented733e4d8a5cf0e887872e05c3bb7bb25f54a515 (diff)
supertabular (3feb20)
git-svn-id: svn://tug.org/texlive/trunk@53658 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/supertabular')
-rw-r--r--Master/texmf-dist/tex/latex/supertabular/supertabular.sty75
1 files changed, 59 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/supertabular/supertabular.sty b/Master/texmf-dist/tex/latex/supertabular/supertabular.sty
index ac2638c232d..03fcf9cc6ca 100644
--- a/Master/texmf-dist/tex/latex/supertabular/supertabular.sty
+++ b/Master/texmf-dist/tex/latex/supertabular/supertabular.sty
@@ -5,18 +5,18 @@
%% The original source files were:
%%
%% supertabular.dtx (with options: `package')
-%% Copyright (C) 1989-2004 Johannes Braams. All rights reserved.
+%% Copyright (C) 1989-2020 Johannes Braams. All rights reserved.
%%
%% This file was generated from file(s) of the supertabular package.
%% -----------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
@@ -35,7 +35,7 @@
%% Sourcefile `supertabular.dtx'.
%%
%% Copyright (C) 1988 by Theo Jurriens
-%% Copyright (C) 1990-2004 by Johannes Braams texniek at braams.cistron.nl
+%% Copyright (C) 1990-2020 by Johannes Braams texniek at braams.xs4all.nl
%% Kersengaarde 33
%% 2723 BP Zoetermeer NL
%% all rights reserved.
@@ -43,10 +43,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{supertabular}
- [2004/02/20 v4.1e the supertabular environment]
+ [2020/02/02 v4.1g the supertabular environment]
\newcount\c@tracingst
\DeclareOption{errorshow}{\c@tracingst\z@}
-\DeclareOption{pageshow}{\c@tracingst\tw@}
+\DeclareOption{pageshow}{\c@tracingst\thr@@}
\DeclareOption{debugshow}{\c@tracingst5\relax}
\ProcessOptions
\newif\if@topcaption \@topcaptiontrue
@@ -63,6 +63,7 @@
\newskip\ST@rightskip
\newskip\ST@leftskip
\newskip\ST@parfillskip
+\def\ST@captionroom{\z@}
\long\def\ST@caption#1[#2]#3{\par%
\addcontentsline{\csname ext@#1\endcsname}{#1}%
{\protect\numberline{%
@@ -72,7 +73,7 @@
\normalsize
\if@topcaption \vskip -10\p@ \fi
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
- \if@topcaption \vskip 10\p@ \fi
+ \if@topcaption \vskip 10\p@ \gdef\ST@captionroom{20\p@}\fi
\endgroup}
\newcommand\tablehead[1]{%
\gdef\@tablehead{%
@@ -82,7 +83,16 @@
#1%
\noalign{\global\let\\=\@savcr}}}
\tablehead{}
-\newcommand\tablefirsthead[1]{\gdef\@table@first@head{#1}}
+\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
+ }}}
\newcommand\tabletail[1]{%
\gdef\@tabletail{%
\noalign{%
@@ -91,7 +101,16 @@
#1%
\noalign{\global\let\\=\@savcr}}}
\tabletail{}
-\newcommand\tablelasttail[1]{\gdef\@table@last@tail{#1}}
+\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
+ }}}
\newcommand\sttraceon{\c@tracingst5\relax}
\newcommand\sttraceoff{\c@tracingst\z@}
\newcommand\ST@trace[2]{%
@@ -101,6 +120,19 @@
{Package supertabular: #2}%
\fi
}
+\newcommand\ST@save@lineno{%
+ \expandafter\gdef\expandafter\ST@LineNo\expandafter{%
+ \the\inputlineno}}
+\newcommand\ST@trace@cr[2]{%
+ \ifnum\c@tracingst>#1\relax
+ \begingroup
+ \edef\on@line{ on input line \ST@LineNo}%
+ \GenericWarning
+ {(supertabular)\@spaces\@spaces}
+ {Package supertabular: #2}%
+ \endgroup
+ \fi
+ }
\newdimen\ST@pageleft
\newcommand*\shrinkheight[1]{%
\noalign{\global\advance\ST@pageleft-#1\relax}}
@@ -111,13 +143,13 @@
\newdimen\ST@pagesofar
\newdimen\ST@pboxht
\newdimen\ST@lineht
-\newdimen\ST@stretchht
\newdimen\ST@prevht
\newdimen\ST@toadd
\newdimen\ST@dimen
\newbox\ST@pbox
\def\ST@tabularcr{%
{\ifnum0=`}\fi
+ \ST@save@lineno
\@ifstar{\ST@xtabularcr}{\ST@xtabularcr}}
\def\ST@xtabularcr{%
\@ifnextchar[%]
@@ -159,6 +191,15 @@
\fi
\ST@dimen=\z@
\unvbox\ST@pbox\egroup\hfil}
+\def\ST@compute@lineht{%
+ \ST@lineht=\ht\strutbox
+ \ifx\extrarowheight\undefined\else
+ \advance \ST@lineht by \extrarowheight
+ \fi
+ \ST@lineht = \arraystretch\ST@lineht
+ \advance\ST@lineht \arraystretch\dp\strutbox
+ \ST@trace\tw@{Normal Line height: \the\ST@lineht}%
+ }
\def\estimate@lineht{%
\ST@lineht=\arraystretch \baslineskp
\global\advance\ST@lineht by 1\p@
@@ -166,7 +207,7 @@
\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\@calfirstpageht{%
\ST@trace\tw@{Calculating height of tabular on first page}%
\global\ST@pagesofar\pagetotal
@@ -211,6 +252,7 @@
\global\ST@pagesofar\z@
\fi
\fi
+ \if@topcaption\advance\ST@pageleft-\ST@captionroom\fi
\ST@trace\tw@{Available height: \the\ST@pageleft}%
\ifx\@@tablehead\@empty
\ST@headht=\z@
@@ -242,12 +284,14 @@
\ST@trace\tw@{starting new page}%
\newpage\@calnextpageht
\fi
+ \advance\ST@pageleft-\ST@headht
}
\def\@calnextpageht{%
\ST@trace\tw@{Calculating height of tabular on next page}%
\global\ST@pageleft\@colroom
\global\ST@pagesofar=\z@
\ST@trace\tw@{Maximum height of tabular: \the\ST@pageleft}%
+ \advance\ST@pageleft-\ST@headht
}
\def\x@supertabular{%
\let\org@tabular\tabular
@@ -281,7 +325,7 @@
\let\@@tablehead=\@table@first@head
\fi
\let\ST@skippage\ST@skipfirstpart
- \estimate@lineht
+ \ST@compute@lineht
\@calfirstpageht
\noindent
}
@@ -413,16 +457,15 @@
\global\advance\ST@pageleft -\ST@lineht
\global\ST@prevht\ST@lineht
\else
- \ST@trace\thr@@{Added par box with height \the\ST@pboxht}%
+ \ST@trace@cr\thr@@{Added par box with height \the\ST@pboxht}%
\global\advance\ST@pageleft -\ST@pboxht
\global\advance\ST@pageleft -0.1\ST@pboxht
- \global\advance\ST@pageleft -\ST@stretchht
\global\ST@prevht\ST@pboxht
\global\ST@pboxht\z@
\fi
\global\advance\ST@pageleft -\ST@toadd
\global\ST@toadd=\z@
- \ST@trace\thr@@{Space left for tabular: \the\ST@pageleft}%
+ \ST@trace@cr\thr@@{Space left for tabular: \the\ST@pageleft}%
}
\noalign{\global\let\ST@next\@empty}%
\ifnum\ST@pageleft<\z@