%% SAVE THIS FILE AS SUPERTAB.STY % Save file as: SUPERTAB.STY Source: FILESERV@SHSU.BITNET %% %% This is file `supertabular.sty', generated %% on <1991/8/1> with the docstrip utility (2.0i). %% %% The original source files were: %% %% supertabular.doc %% %% Copyright (C) 1988-91 by Theo Jurriens, Johanes Braams (90-91). %% All rights reserved. %% %% IMPORTANT NOTICE: %% %% You are not allowed to change this file. You may however copy this file %% to a file with a different name and then change the copy. %% %% You are NOT ALLOWED to distribute this file alone. You are NOT ALLOWED %% to take money for the distribution or use of this file (or a changed %% version) except for a nominal charge for copying etc. %% %% You are allowed to distribute this file under the condition that it is %% distributed together with all files mentioned below. %% %% If you receive only some of these files from someone, complain! %% %% Error Reports in case of UNCHANGED versions to either of %% %% J. Braams %% PTT Research, dr Neher Laboratorium %% P.O. box 421 %% 2260 AK Leidschendam %% The Netherlands %% Internet: %% %% Theo Jurriens %% Rijks Universiteit Groningen %% P.O Box 800, %% 9700 AV Groningen %% The Netherlands %% Internet: %% \newif\if@topcaption \@topcaptiontrue \def\topcaption{\@topcaptiontrue\tablecaption} \def\bottomcaption{\@topcaptionfalse\tablecaption} \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 \long\def\@stcaption#1[#2]#3{\par% \addcontentsline{\csname ext@#1\endcsname}{#1}% {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}} \begingroup \@parboxrestore \normalsize \if@topcaption \vskip -10pt \fi % 'fix' \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \if@topcaption \vskip 10pt \fi % 'fix' \endgroup} \def\@tablehead{} \def\tablehead#1{\gdef\@tablehead{#1}} \def\tablefirsthead#1{\gdef\@table@first@head{#1}} \def\@tabletail{} \def\tabletail#1{% \gdef\@tabletail{\noalign{\global\let\@savcr=\\\global\let\\=\cr}% #1\noalign{\global\let\\=\@savcr}}} \def\tablelasttail#1{\gdef\@table@last@tail{#1}} \newdimen\maxsize % maximum pagesize \newdimen\actsize % actual pagesize \newdimen\twocolsize % needed for correct max height if twocolumn \newdimen\parboxheight % height plus depth of a parbox-argument \newdimen\addspace % stores the value of \\[#1] \newdimen\midlineheight % estimated size of a normal line \newdimen\pargcorrection % to set page height tolerance if p-arg \newdimen\computedimens % computation variable \newbox\tabparbox \def\@stabularcr{{\ifnum0=`}\fi\@ifstar{\@sxtabularcr}{\@sxtabularcr}} \def\@sxtabularcr{\@ifnextchar[{\@sargtabularcr}% {\ifnum0=`{\fi}\cr\nextline}} \def\@sargtabularcr[#1]{\ifnum0=`{\fi}\ifdim #1>\z@ \unskip\@sxargarraycr{#1}\else \@syargarraycr{#1}\fi} \def\@sxargarraycr#1{\@tempdima #1\advance\@tempdima \dp \@arstrutbox% \vrule \@height\z@ \@depth\@tempdima \@width\z@ \cr% \noalign{\global\addspace=#1}\nextline} \def\@syargarraycr#1{\cr\noalign{\vskip #1\global\addspace=#1}\nextline} \def\@sstartpbox#1{\global\advance\maxsize by -\pargcorrection \global\pargcorrection=0pt \setbox\tabparbox% \vtop\bgroup\hsize#1\@arrayparboxrestore} \def\@sendpbox{\par\vskip\dp\@arstrutbox\egroup% \computedimens=\ht\tabparbox% \advance\computedimens by \dp\tabparbox% \ifnum\parboxheight<\computedimens \global\parboxheight=\computedimens \fi \computedimens=0pt \box\tabparbox\hfil} \def\calmidlineheight{\midlineheight=\arraystretch \baslineskp \global\advance\midlineheight by 1pt \global\pargcorrection=4\midlineheight} \def\calpage{\global\actsize=\pagetotal % where am I on the actual page? \twocolsize=\textheight % added 06.06.89 \advance\twocolsize by -\@colroom % " \advance\actsize by \twocolsize % " \global\advance\actsize by \midlineheight \maxsize=\textheight % start a new page when 90% of \multiply \maxsize by 9 % the page are used \divide\maxsize by 10 \advance\actsize 2\midlineheight \ifnum\actsize > \maxsize \clearpage \global\actsize=\pagetotal \fi \maxsize=\textheight % now set \maxsize with tolerance \setbox\@tempboxa=\vbox{\@arrayparboxrestore% \begin{tabular}{\tableformat}\@tabletail\end{tabular}} \global\advance\maxsize by-\ht\@tempboxa} % Here is the definition of supertabular \def\supertabular#1 {% % before it was \edef\tableformat, \def\tableformat{\string#1} % store preamble \global\starfalse % remember this is the normal version \if@topcaption\@process@tablecaption \fi \global\let\@oldcr=\\ \def\baslineskp{\baselineskip} \calmidlineheight% estimate height of a normal line \calpage % calculate max. pagesize and startpoint \let\@@tabularcr\@tabularcr% Added JB 4/2/91 \let\@tabularcr\@stabularcr \let\@@startpbox=\@sstartpbox \let\@@endpbox=\@sendpbox \ifx\@table@first@head\undefined \let\@@tablehead=\@tablehead \else \let\@@tablehead=\@table@first@head \fi% Added JB 4/2/91 \begin{tabular}{\tableformat}% \@@tablehead}% Added JB 15/2/91 \def\endsupertabular{% \ifx\@table@last@tail\undefined% \@tabletail% \else% \@table@last@tail% \fi% Added JB 4/2/91 \end{tabular} \let\@tabularcr\@@tabularcr % Added JB 4/2/91 \if@topcaption \else \@process@tablecaption \@topcaptiontrue \fi \global\let\\=\@oldcr \let\@table@first@head\undefined % For the next occurence \let\@table@last@tail\undefined % of this environment \global\let\@process@tablecaption\relax } \newif\ifstar \newdimen\tabularwidth \@namedef{supertabular*}#1#2 {% modified JB (15.2.91) \def\tableformat{\string#2} % store preamble \tabularwidth=#1 % The total width of the tabular \global\startrue % remember this is the *-version \if@topcaption\@process@tablecaption\fi \def\baslineskp{\baselineskip} \calmidlineheight% estimate height of a normal line \calpage % calculate max. pagesize and startpoint \let\@@tabularcr\@tabularcr% Added JB 4/2/91 \let\@tabularcr\@stabularcr% Added JB 4/2/91 \global\let\@oldcr=\\ \let\@@startpbox=\@sstartpbox \let\@@endpbox=\@sendpbox \ifx\@table@first@head\undefined \let\@@tablehead\@tablehead \else \let\@@tablehead\@table@first@head \fi% Added JB 4/2/91 \begin{tabular*}{\tabularwidth}{\tableformat}% \@@tablehead}% \@namedef{endsupertabular*}{% \ifx\@table@last@tail\undefined% \@tabletail% \else% \@table@last@tail% \fi% Added JB 4/2/91 \end{tabular*} \let\@tabularcr\@@tabularcr % Check if we have to insert a caption \if@topcaption \else \@process@tablecaption % restore to default behaviour \@topcaptiontrue \fi \global\let\\=\@oldcr \let\@table@first@head\undefined % For the next ocurrence \let\@table@last@tail\undefined % of this environment \global\let\@process@tablecaption\relax} \def\nextline{% %%% algorithm to calculate the pagebreaks %%% \noalign{\ifnum\parboxheight<\midlineheight \advance\actsize by \midlineheight \global\advance\actsize by \addspace \else \global\advance\actsize by \parboxheight \divide\parboxheight by 11\relax \global\advance\actsize by \parboxheight% \global\parboxheight=0pt \fi \global\addspace=0pt}% \ifnum\actsize<\maxsize \noalign{\global\let\next\@empty} \else \@tabletail \ifstar% % Added 16-10-90 \end{tabular*}% \else% \end{tabular}% \fi \if@twocolumn% % added 10.05.89 \if@firstcolumn% % \newpage% % \else% % \clearpage% % \fi% % \twocolsize=\textheight% % added 06.06.89 \advance\twocolsize by -\@colroom% % " \global\actsize=\twocolsize% % " \global\advance\actsize by \midlineheight \else % \clearpage % \global\actsize=\midlineheight% \fi % \let\next\@tablehead% % Added 15.2.91 \ifstar% % Added 16-10-90 \begin{tabular*}{\tabularwidth}{\tableformat}% \else% \begin{tabular}{\tableformat}% \fi% \fi\next}% % Added \next 15.2.91 \endinput %% %% End of file `supertabular.sty'.