home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 5
/
FreshFish_July-August1994.bin
/
bbs
/
text
/
pastex-1.3-3of8.lha
/
PasTeX
/
macros
/
supertab
/
supertabular.doc
< prev
next >
Wrap
Text File
|
1992-07-10
|
23KB
|
507 lines
% @stylefile{Super tabular
% shortpackagename = {supertab},
% longpackagename = {supertabular},
% baseformats = {\LaTeX 2.09},
% version = {3.6h},
% date = {1992-07-03},
% author = {Theo Jurriens,
% TAJ@HGRRUG5,
% P.O Box 800,
% 9700 AV Groningen},
% abstract = {This file provides the supertabular environment, which
% is an extension to the standard tabular environment.
% Large tabulars are automatically split across pages.
% Seperate commands for the table-head and table-tail
% are provided, in order to repeat these on each page.}
% infauthor = {Johannes Braams,
% J.L.Braams@research.ptt.nl,
% PTT Research,
% P.O. Box 421,
% 2260 AK Leidschendam}
% infdate = {1990-10-16}}
%
%----------------------------------------------------------------------------
%
% supertabular sty
% original idea: Theo Jurriens 1988
% TAJ@hgrrug5 P.O Box 800, 9700 AV Groningen
%
% revised by: Johannes Braams
% J.L.Braams@research.ptt.nl PTT Research Leidschendam (NL)
%
% 10.07.92 - Still a problem in the combination of supertabular with array.sty
% V 3.6h I overlooked the fact that array doesn't use \@tabulacr anymore
% and it behaves differently with respect to \@startparbox.
% 03.07.92 - A problem in the combination of supertabular with array.sty
% V 3.6g It can be solved by removing the \string from \def\tableformat
% and passing \tableformat expanded to \tabular.
% 11.02.92 - Bug found by Michael Heissmeier when p{...} is used.
% V 3.6f A change in LaTeX.tex didn't find its way into supertabular.
% 01.08.91 - Take height of tabletail into account when computing the
% V 3.6e maximum tableheight; add tolerance on first (partial) page
% of the supertabular.
% 27.06.91 - Cured bug that made the first part of the table one line
% V 3.6d shorter than the others. Appeared when supertabular was
% used in a twocolumn environment.
% 26.06.91 - Made \@process@tablecaption a global macro. Previous caption
% V 3.6c turned up on a table without one.
% 27.05.91 - Replaced \clearpage with \newpage to make supertabulars work
% V 3.6b in a twocolumn environment. This also prevents all floats
% from being printed.
% 15.02.91 - Because of the check for the use of tablefirsthead the
% V 3.6a combination of an \hline in the head and an \hline as the first
% thing in the data went wrong. The \futurelet in the definition
% of \hline found \fi instead of \hline, so no \doublerulesep
% was added.
% Also had to modify the way the environments were defined.
% The blank space (from the CR after the argument of \supertabular)
% has to be gobbled. This can only be done using a construction
% like \def\command#1 {...}. So removed the use of \newenvironment
% 04.02.91 - Added the commands \topcaption, \bottomcaption and \tablecaption
% V 3.6 to include a caption within the supertabular environment. The
% default behaviour is to put the caption before the actual start
% of the table.
% - Also added \tablefirsthead and \tablelasttail to let the
% user specify a different head for the first page of the table
% and for consecutive pages as well as different tails for first
% pages and the last one. If these commands are not used, the
% default behaviour will be to use the value of \tablehead end
% \tabletail
% - Removed the need for the \noalign{\global\let\\=\@stabularcr}
% commands by storing and resetting \@stabularcr
%
% 16.10.90 Added the supertabular* environment that was in an earlier
% V 3.5 version (2.0) by the original author
% Reintroduced the version numbering
%
% revised by: Gabriele Kruljac
% kruljac@ds0mpi11 Max-Planck-Institute Stuttgart
%
%
% 06.06.89 Correction: now care is taken of probably existing onecolumn
% head (title or tables ...) in twocolumn sty.
%
% 10.05.89 Correction: the new \\ definition has been added to the
% begin of each `sub'-tabular
% Added: algorithm to produce the tabulars in twocolumn style
%
% 06.04.89 Correction: put \global statement in \end{supertabular}
% into \noalign
%
% 22.02.89 Correction: restore the original meaning of \\ with
% \end{supertabular}
%
% (Feb 89) The whole algorithm has been changed, so that I can use
% the most features of a normal tabular:
% \\ for new line, including \\[#1]
% p{...} in the preamble ...
% Account is taken to \baselinestretch and \arraystretch
% -I'm not counting the lines because of too much rounding errors
% but instead I add the (estimated) used space in pt.
% -The tablehead is taken into this algorithm of proofing, so
% I really know how much space the head uses.
% -When no p-arg is given I add a variable \midlineheight to
% calculate the used space. To calculate \midlineheight I
% take the \baselineskip, which is active when the supertabular
% starts (\baselineskip includes the \value of \baselinestretch)
% and multiply it with \arraystretch.
% -When a p-arg is given the text will be stored in a box. So
% I know the height I have to add. Also I reduce the maximum
% pagesize, so that the last parbox on a page can get up to
% max 4 lines without producing an overfull vbox.
% -To do so I had to make some additions to LaTeX's tabular
% commands. These new commands got a leading `s'.
%
% Weak points:
% -When the material of a normal entry (not a p-arg) becomes
% larger than the estimated \midlineheight, overfull vboxes
% will be produced at all.
% -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.
% -if accidentally the last line of the tabular produces
% a newpage, on the next page the tabletail will be written
% 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 \maxsize by
% \noalign{\global\maxsize=...pt} after the first \\ of the
% supertabular.
%
%------------------------------------------------------------------------------
% Added the user-commands \topcaption and \bottomcaption which set the boolean
% @topcaption to determine where to put the tablecaption. The default
% is to put the caption on the top of the table
%
\newif\if@topcaption \@topcaptiontrue
\def\topcaption{\@topcaptiontrue\tablecaption}
\def\bottomcaption{\@topcaptionfalse\tablecaption}
%
% Added the command \tablecaption, with the use of the definition
% of the \caption and \@caption commands from latex.tex.
% This command has to function exactly like \caption does except it
% has to store its argument (and the optional argument) for later
% processing WITHIN the supertabular environment
% JB
%
\long\def\tablecaption{\refstepcounter{table} \@dblarg{\@xtablecaption}}
\long\def\@xtablecaption[#1]#2{%
\long\gdef\@process@tablecaption{\@stcaption{table}[#1]{#2}}}
\global\let\@process@tablecaption\relax
%
%
% 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 \@makecaption of article.sty and
% friends that a caption ALWAYS gets a \vskip 10pt at the top and