; TeX output 1997.02.22:2206soTDtGGcmr17The7t߆TG cmtt12supertabularenqvironment!", cmsy10SXQ cmr12JohannesBraamsandTheoJurriens37 1997/02/209 INff cmbx121aLIntros3ductionIK`y cmr10The&qpackqageXBelowisadescriptionofthenewcommandsandenvironmentsthatthispack-IageUUprovides.XThecommand\tablefirstheadtakesoneargument,itde nesthecontents 6 ߤN cmtt9\tablefirstheadIofUUthe rstoGccurenceofthetabularhead.ITheUUuseofthiscommandisoptional.qDon'tforgettoclosetheheadbya\\.XThecommand\tableheadtakesoneargument,itde nesthecontentsofall$\tableheadIsubsequentUUoGcurrencesofthetabularhead.IDon'tUUforgettoclosetheheadbya\\XThe{command\tabletailtakesoneargument,aitde nessomethingwhich$\tabletailIshouldUUbGeinsertedbeforeeach\end{tabular},exceptthelast.XThecommand\tablelasttailtakesoneargument,7itde nessomething\tablelasttailỈffr @ -:q% cmsy6L|{Ycmr8ThisX lehasvÎersionnumb'ExX'sstandard\caption \topcaption\bottomcaptionb\tablecaptionIcommand.kTheyAIprovideacaptionforthesupGer-table,ELeitheratthetoporattheIbGottomofthetable.When\tablecaptionisusedthecaptionwillbeplacedatItheUUdefaultloGcation,whichisatthetop.XThe\nenvironmentssupGertabularandsupGertabular*canbGeusedmuchliketheLsupertabularbsupertabular*IstandardUUL5ffA͉TU>'ExXenvironmentsUUtabularxandtabular*.XTheallowedmaximimumheightofapartofthesupGertabularonapagecanbeb\shrinkheightIadjustedzusingthecommand\shrinkheight.M6Ittakesoneargument,thelengthIwith3whichtoshrink(pGositivevqalue)orgrow(negativevqalue)theallowedheight. WOI3aLWfeakffps3ointsX !", cmsy10bWhen@thematerialofanormalentry(notap-arg)bGecomeslargerthanthebestimatedUU\ST@lineht,overfullUU\vboxeswillbGeproducedatall.NXbWhen thelastp-argonapagegetsmorethan4lines(probablyevenmorebthana3lines)itwillresultinanoverfulla\vbox..Alsosomecombinationsofb\baselinestretchE\arraystretchandalargefontmayleadtoonelinebtoGoUUmuch.XbifaccidentallythelastlineofthetabularproGducesanewpage,onthenextbpage)thetabletailwillbGewrittenimmediatelyafterthetablehead.cLDepend-bing'onthecontents'thismayresultinanerrormessageregardingmisplacedb\noalign.'wbAquickcbutnotveryelegantsolution:shrinktheallowedheightofthebtableb&withthecommand\shrinkheight{...pt}afterthe rst\\ofthebsupGertabular. WOI4aLExamplesIHereoisanexampleofasupGertabular.Y*ouwill ndthede nitionsafteroftheIsupGertabular.dzcff͟ff͟fdNumbGer5N>NumbGer^2iNumbGer^4 I@ff㡲NumbGer!͟ffffͤfffd1KVffNr1rff1͟ff1͟ff ͤ fffd2KV ffNr4r ff16͟ ff2͟ ffͤ fffd3KV ffNr9r ff81͟ ff6͟ ffͤӏ9ff,q4KV9ffIr16rӏ9ff256͟ӏ9ff24͟ӏ9ff9󍍐ͤ fffd5KV ffIr25r ff625͟ ff120͟ ffͤ fffd6KV ffIr36r ff|1296͟ ff720͟ ffͤ fffd7KV ffIr49r ff|2401͟ ff5040͟ ffͤ fffd8KV ffIr64r ff|4096͟ ff40320͟ ffͤ fffd9KV ffIr81r ff|6561͟ ff362880͟ ffͤ fffd10KV ffDr100r ffw10000͟ ff3628800͟ fffffdͤ ffdvןfd"q[ cmsl9con9tinuedTonnextpage͡ ffff2 ysoff@"fdͤ ffΟfdcon9tinuedTfrompreviouspagemá ffff@"͟ff͟fdNumbGer5N>NumbGer^2iNumbGer^4 I@ff4NumbGer!`ffff@"ͤ fffd11KV ffDr121r ffw14641͟ ff@39916800͟ ff ͤӏ9ff,q12KV9ffDr144rӏ9ffw20736͟ӏ9ff@479001600͟ӏ9ff9ff@"͟ ff.؄ ffb弟 ffn ff  ffͤ (sff}13KV(sffDr169r (sffw28561͟ (sff6.22702080E+9͟ (sff(s獍ͤ fffd14KV ffDr196r ffw38416͟ ff8.71782912E+10͟ ffͤ fffd15KV ffDr225r ffw50625͟ ff1.30767437E+12͟ ffͤ fffd16KV ffDr256r ffw65536͟ ff2.09227899E+13͟ ffͤӏ9ff,q17KV9ffDr289rӏ9ffw83521͟ӏ9ff3.55687428E+14͟ӏ9ff9󍍐ͤ fffd18KV ffDr324r ffr104976͟ ff6.40237370E+15͟ ffͤ fffd19KV ffDr361r ffr130321͟ ff1.21645100E+17͟ ffͤ fffd20KV ffDr400r ffr160000͟ ff2.43290200E+18͟ ffff@"zʣT*ableUU1:qThistableissplitacrosspagesXAndUUhereis(partof)theuserinputforthetableabGove:[X\begin{center} [X\tablefirsthead{%eY\hlineeY\multicolumn{1}{|c}{\tbspNumber}&eY\multicolumn{1}{c}{Number$^2$}&eYNumber$^4$&eY\multicolumn{1}{c|}{Number!}\\eY\hline}[X\tablehead{%eY\hlineeY\multicolumn{4}{|l|}{\small\slcontinuedfrompreviouspage}\\eY\hlineeY\multicolumn{1}{|c}{\tbspNumber}&eY\multicolumn{1}{c}{Number$^2$}&eYNumber$^4$&eY\multicolumn{1}{c|}{Number!}\\eY\hline}[X\tabletail{%eY\hlineeY\multicolumn{4}{|r|}{\small\slcontinuedonnextpage}\\eY\hline}[X\tablelasttail{\hline}[X\bottomcaption{Thistableissplitacrosspages}[X\begin{supertabular}{|r@{\hspace{6.5mm}}|r@{\hspace{5.5mm}}|r|r|}[X1,&1 s,&%̰1&3r1X\\[X2,&4 s,&!16&3r2X\\[X3,&9 s,&!81&3r6X\\[X4,&X16 s,&Y256&/?24\\[5mm][X...3Uso[X19 s,&,361&130321&1.21645100E+17\\ [X20 s,&,400&160000&2.43290200E+18\\[X\end{supertabular}[X\end{center}XHere=isanotherexamplewhithapcolumn-de nition.+/Thetableheadisthe IsameasabGove.dThetabletailisadouble\hline;~\arraystretchissetto1.5IandUUthefontsizeis\small.T*ableUU2:qThistableshouldalsobGesplitaccrosspages.4'sof86kff(͟66ff͟ !o cmr9Num9bAer2Num9bAer-=Aacmr62cyNum9bAer-=4$Num9bAer!;Q66ffYff(ͤ66ffU۟ 1KV6ffI31r66ff1LhereTisarelativ9eshortentry(\b66ffͤ6&ffU۟ 2KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ff&ͤ6&ffU۟ 3KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6&ffU۟ 4KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6ffU۟ 5KVffI31r6ff1LhereTisarelativ9eshortentry(\b6ffͤ6&ffU۟ 6KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6&ffU۟ 7KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6&ffU۟ 8KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6&ffU۟ 9KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6&ffݟ 10KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6&ffݟ 11KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6ffݟ 12KVffI31r6ff1LhereTisarelativ9eshortentry(\b6ffͤ6&ffݟ 13KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6&ffݟ 14KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffYff( ɍͤ6ff p con9tinuedTonnextpage͡ffYff(5*soef86ff( ɍͤ6ffΟ con9tinuedTfrompreviouspage 6ffYff(͟66ff͟ Num9bAer2Num9bAer-=2cyNum9bAer-=4$Num9bAer!;Q66ffff(ͤ6&ffݟ 15KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ff&ͤ6&ffݟ 16KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6&ffݟ 17KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffͤ6&ffݟ 18KV&ffI31r6&ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\b6&ffYff(ff(nXHereisthesametableagain,ıbutthistimeusingthesupGertabular*environment IandUUstretchingthetabletothefullwidthofthetext.@T*ableUU3:qThistableshouldalsobGesplitaccrosspages.1ōIO&hffc͟66ff͟ Num9bAer[nNum9bAer-=2xNum9bAer-=4ANum9bAer!8Q66ffYffcͤ66ff'd 16ff1͟66ff׶1μxhereTisarelativ9eshortentryb̟66ffͤ6&ff'd 2&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ff&ͤ6&ff'd 3&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6&ff'd 4&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6ff'd 5ff1͟6ff׶1μxhereTisarelativ9eshortentryb̟6ffͤ6&ff'd 6&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6&ff'd 7&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6&ff'd 8&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6&ff'd 9&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffYffc ɍͤ6ff}ڟ con9tinuedTonnextpage͡ffYffc67sodbIF`ffc ɍͤ6ffΟ con9tinuedTfrompreviouspageyffYffc͟66ff͟ Num9bAer[nNum9bAer-=2xNum9bAer-=4ANum9bAer!8Q66ffffcͤ6&ff#4f 10&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ff&ͤ6&ff#4f 11&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6ff#4f 12ff1͟6ff׶1μxhereTisarelativ9eshortentryb̟6ffͤ6&ff#4f 13&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6&ff#4f 14&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6&ff#4f 15&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6&ff#4f 16&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6&ff#4f 17&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffͤ6&ff#4f 18&ff1͟6&ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟6&ffYffcffcϘ%I5aLKnownffproblemsXbWhenca oatoGccursonthesamepageasthestartofasupertabularyoucan bexpGectUUunexpectedresults.bWhen:the oatwasde nedonthesamepageyoumightendupwiththeb rstUUpartofthesupGertabularonapagebyitsown.XbY*oushouldnotusethesupGertabularinsidera oating-environmentsuchasbtableAasthiswillresultinTU>'ExXtryingtoputthewholesupGertabularononebpage.XbInUUsomeinstancesyoumightstillendupwithoverfull\vboxmessages.XbSometimesdthelastpageofthesupGertabularcontainsjustanemptyheadanbtail.!čI6aLTheffImplementation7FUsoLs1S$ cmsy9h%ow cmss9pack9age#g i Ls2S\newcount\c@tracingstLs3S\DeclareOption{errorshow}{\c@tracingst\z@}Ls4S\DeclareOption{pageshow}{\c@tracingst\tw@}Ls5S\DeclareOption{debugshow}{\c@tracingst5\relax}Ls6S\ProcessOptions L\topcaption 6\bottomcaptionITheuser-commands\topcaptionand\bottomcaptionsetthe ag@topcaption ItoWdeterminewheretoputthetablecaption.yThedefaultistoputthecaptiononItheUUtopofthetableLs7S\newif\if@topcaption\@topcaptiontrue Ls8S\def\topcaption{\@topcaptiontrue\tablecaption}Ls9S\def\bottomcaption{\@topcaptionfalse\tablecaption}\tablecaptionIThisjcommandhastofunctionexactlylike\captiondoGes,exceptithastostoreits Iargumentd(andtheoptionalargument)forlaterproGcessingwithinFDzthesupertabularIenvironment.I10S\long\def\tablecaption{% I11]\refstepcounter{table}\@dblarg{\@xtablecaption}}I12S\long\def\@xtablecaption[#1]#2{%I13]\long\gdef\@process@tablecaption{\ST@caption{table}[#1]{#2}}}I14S\global\let\@process@tablecaption\relax\ifST@starIThisswitchisusedintheinternalmacrostoremembGerwhichkindofenvironment IwasUUstarted.I15S\newif\ifST@star"\ST@wdIF*or?thesupGertabular*environmentitisnecessarytostoretheintendedwidthofItheUUtabular.I16S\newdimen\ST@wd L\ST@captionIThis0isarede nitionofLaT*eX'scaption,7makecaptioniscalledwithinagroupsoIas4nottoreturntoglobally*.Tgalsoa xismadeforthe`feature'ofthemakecaptionIofUUarticle.styandfriendsthatacaptionALWA*YSUUgetsaXat thetopandNONE atthebGottom.XIfauserwants toprecedehistablewithIaUUcaptionthisresultsinacollision.I17S\long\def\ST@caption#1[#2]#3{\par% I18]\addcontentsline{\csnameext@#1\endcsname}{#1}%I19:{\protect\numberline{%I20\csnamethe#1\endcsname}{\ignorespaces#2}}I21]\begingroupI22f\@parboxrestoreI23f\normalsizeI24f\if@topcaption\vskip-10\p@\fiI25f\@makecaption{\csnamefnum@#1\endcsname}{\ignorespaces#3}\parI26f\if@topcaption\vskip10\p@\fiI27]\endgroup}\tablehead f\tablefirstheadI\tableheadUUactivqatesthenewtabular\crcommands.I28S\newcommand\tablehead[1]{%I29]\gdef\@tablehead{%8 RsoI30]\noalign{% I31p2\global\let\@savcr=\\I32p2\global\let\\=\cr}%I33f#1%I34f\noalign{\global\let\\=\@savcr}}}I35S\tablehead{}I36S\newcommand\tablefirsthead[1]{\gdef\@table@first@head{#1}},#\tabletail 6\tablelasttailIIftheuserusesanextraamountoftabular-data(like\multicolumn)in I\tabletailTU>'ExXstartsloGopingbecauseofthede nitionof\ST@cr.iSomakeI\\ actlikejusta\crinsidethistailtopreventtheloGop.SaveandrestoretheIvqalueUUof\\rI37S\newcommand\tabletail[1]{% I38]\gdef\@tabletail{%I39f\noalign{%I40p2\global\let\@savcr=\\I41p2\global\let\\=\cr}%I42f#1%I43f\noalign{\global\let\\=\@savcr}}}I44S\tabletail{}I45S\newcommand\tablelasttail[1]{\gdef\@table@last@tail{#1}}\sttraceon L\sttraceoffIThere?nowisapGossiblitytofollowthedecisionssupGertabularmakesabGoutbreaking ItheUTtabular.qThishastobGeenabledwhenconvertingUTthis lewithdocstriptoaI.styUU le. aI46S\newcommand\sttraceon{\c@tracingst5\relax} I47S\newcommand\sttraceoff{\c@tracingst\z@}$\ST@traceIAUUmacrothatgetsthetracemessageasitsargumentI48S\newcommand\ST@trace[2]{% I49]\ifnum\c@tracingst>#1\relaxI50f\GenericWarningI51p2{(supertabular)\@spaces\@spaces}I52p2{Packagesupertabular:#2}%I53]\fiI54]}b\ST@pageleftIThis>registerholdstheestimateoftheamountofspaceleftoveronthecurrent Ipage.qThisUUisusedinthedecisionwhentostartanewpage. aI55S\newdimen\ST@pageleft\shrinkheightIAUUcommandtodiminishthevqalueof\ST@pageleftifnecessary*.I56S\newcommand*\shrinkheight[1]{% I57]\noalign{\global\ST@pageleft=#1\relax}}\ST@headht \ST@tailhtITheHregisterST@headhtwillholdtheheightofthe rstheadofasupGertabular Ienvironment;UUtheregister\ST@tailhtwillholdtheheightoftabletail(ifany)I58S\newdimen\ST@headht I59S\newdimen\ST@tailht\ST@pagesofarITheregister\ST@pagesofarisusedtostoretheestimateoftheamountofpage IalreadyUU lledup.I60S\newdimen\ST@pagesofar9 ^so\ST@pboxhtITheUUmeasured(total)heightofaparbGox-argumentI61S\newdimen\ST@pboxht\ST@linehtITheUUestimatedheightofanormalline.I62S\newdimen\ST@lineht$\ST@toaddIWhenCatabularrowisendedwith\\[...]weneedtotempGorarilystorethe IoptionalUUargumentin\ST@toadd.I63S\newdimen\ST@toadd$\ST@dimenIAUUprivqatescratchdimensionregister.I64S\newdimen\ST@dimeny\ST@pboxIAUUbGoxregistertotemporarilystorethecontentsUUofaparbox.I65S\newbox\ST@pbox\ST@tabularcr 6\ST@xtabularcr \ST@argtabularcrIThese arerede nitionsof\@tabularcrand\@xtabularcr.HThisisneededto IincludeUU\ST@crinthede nitionof\@xtabularcr.XAll rede nedmacroshave namesthataresimilartotheoriginalnames,exceptIwithUUaleading'ST'I66S\def\ST@tabularcr{% I67]{\ifnum0=`}\fiI68]\@ifstar{\ST@xtabularcr}{\ST@xtabularcr}}I69S\def\ST@xtabularcr{%I70]\@ifnextchar[{\ST@argtabularcr}{\ifnum0=`{\fi}\cr\ST@cr}}I71S\def\ST@argtabularcr[#1]{%I72]\ifnum0=`{\fi}%I73]\ifdim#1>\z@I74f\unskip\ST@xargarraycr{#1}I75]\elseI76f\ST@yargarraycr{#1}%I77]\fi}f\ST@xargarraycr f\ST@yargarraycrIIn]thiscaseweneedtocopythevqalueoftheoptionalargumentof\\inourprivqate IregisterUU\ST@toadd.I78S\def\ST@xargarraycr#1{%I79]\@tempdima#1\advance\@tempdima\dp\@arstrutboxI80]\vrule\@height\z@\@depth\@tempdima\@width\z@\crI81]\noalign{\global\ST@toadd=#1}\ST@cr}XHereUUweneedtoinsert\ST@crI82S\def\ST@yargarraycr#1{%I83]\cr\noalign{\vskip#1\global\ST@toadd=#1}\ST@cr}\ST@startpboxIThemacrosthatdealwithparbGoxcolumnsneedtoberede ned,becauseweneed ItoUUknowthesizeoftheparbGox.I84S\def\ST@startpbox#1{%IT*oUUachieveourgoalweneedtosavethetextinbGox.I85]\setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore}10 iso 6\ST@astartpboxIOurUUversionof\@astartpbox.I86S\def\ST@astartpbox#1{% I87]\bgroup\hsize#1%I88]\setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore} L\ST@endpbox b\ST@aendpboxIOurUUversionof\@endpboxand\@aendpbox.I89S\def\ST@endpbox{%I90]\@finalstrut\@arstrutbox\par\egroupI91]\ST@dimen=\ht\ST@pboxI92]\advance\ST@dimenby\dp\ST@pboxI93]\ifnum\ST@pboxht<\ST@dimenI94f\global\ST@pboxht=\ST@dimenI95]\fiI96]\ST@dimen=\z@I97]\box\ST@pbox\hfil}I98S\def\ST@aendpbox{%I99]\@finalstrut\@arstrutbox\par\egroupE100]\ST@dimen=\ht\ST@pboxE101]\advance\ST@dimenby\dp\ST@pboxE102]\ifnum\ST@pboxht<\ST@dimenE103f\global\ST@pboxht=\ST@dimenE104]\fiE105]\ST@dimen=\z@E106]\unvbox\ST@pbox\egroup\hfil} \estimate@linehtIEstimatesUUtheheightofnormallinetaking\arraystretchintoaccount.E107S\def\estimate@lineht{%E108]\ST@lineht=\arraystretch\baslineskpE109]\global\advance\ST@linehtby1\p@E110]\ST@trace\tw@{Averagelineheight:\the\ST@lineht}%E111]} \@calfirstpagehtIEstimates6$thespaceleftonthecurrentpageanddecideswhetherthetabularcan IbGeUUstartedonthispageoronanewpage.E112S\def\@calfirstpageht{%E113]\ST@trace\tw@{Calculatingheightoftabularonfirstpage}%ITheXTU>'ExXregister\pagetotalcontainstheheightofthepagesofar,theL5ffA͉TU>'ExX IregisterUU\@colroomcontainstheheightofthecolumn.E114]\global\ST@pagesofar\pagetotalE115]\global\ST@pageleft\@colroomE116]\ST@trace\tw@{Heightoftext=\the\pagetotal;\MessageBreakE117DHeigthofpage=\the\ST@pageleft}%IWhenweareintwoGcolumnmodeTU>'ExXmaystillbecollectingmaterialforthe rst IcolumnPalthoughthereseemstobGenospaceleft.'InthiscasewehavetocheckIagainstUUtwotimes\ST@pageleft.E118]\if@twocolumn E119f\ST@trace\tw@{twocolumnmode}%E120f\if@firstcolumnE121kJ\ST@trace\tw@{Firstcolumn}%E122p2\ifnum\ST@pagesofar>\ST@pageleftE123yw^\global\ST@pageleft=2\ST@pageleft11 ssoE124yw^\ifnum\ST@pagesofar>\ST@pageleft E125\newpage\@calnextpagehtE126\ST@trace\tw@{startingnewpage}%E127yw^\elseIInȋthiscasewe'reinthesecondcolumn,sowehavetocompGensateforthematerial IinUUthe rstcolumn.E128\ST@trace\tw@{Secondcolumn}%E129\global\advance\ST@pageleft-\ST@pagesofarE130\global\advance\ST@pageleft-\@colroomE131yw^\fiE132p2\fiE133f\fiE134]\elseIInUUonecolumnmoGdethereisasimpledecision.E135f\ST@trace\tw@{onecolumnmode}%E136f\ifnum\ST@pagesofar>\ST@pageleftE137p2\ST@trace\tw@{startingnewpage}%E138p2\newpage\@calnextpagehtIWhen*.wearenotstartinganewpagesubtractthesizeofthematerialalreadyon IitUUfromtheavqailablespace.E139f\elseE140p2\global\advance\ST@pageleftby-\ST@pagesofarE141p2\global\ST@pagesofar\z@E142f\fiE143]\fiE144]\ST@trace\tw@{Availableheight:\the\ST@pageleft}%INow:weneedtoknowtheheightoftheheadofthetable.iuInordertomeasure IthisUUwetypGesetitinanormaltabularxenvironment.E145]\ifx\@@tablehead\@emptyE146f\ST@headht=\z@E147]\elseE148f\setbox\@tempboxa=\vbox{\@arrayparboxrestoreE149p2\ST@restoreE150p2\expandafter\tabular\expandafter{\ST@tableformat}%E151p2\@@tablehead\endtabular}%E152f\ST@headht=\ht\@tempboxa\advance\ST@headht\dp\@tempboxaE153]\fiE154]\ST@trace\tw@{Heightofhead:\the\ST@headht}%IT*ogwdecidewhentostartanewpage,kweneedtoknowtheverticalsizeofthetail IofUUthetable.E155]\ifx\@tabletail\@emptyE156f\ST@tailht=\z@E157]\elseE158f\setbox\@tempboxa=\vbox{\@arrayparboxrestoreE159p2\ST@restoreE160p2\expandafter\tabular\expandafter{\ST@tableformat}E161yw^\@tabletail\endtabular}E162f\ST@tailht=\ht\@tempboxa\advance\ST@tailht\dp\@tempboxaE163]\fi12 ~soIW*eaddtheaverageheightofalinetothisbGecausewhenwedecidetocontinue ItheUUtabularweneedtohaveenoughspaceleftforonelineandthetail.E164]\advance\ST@tailhtby\ST@lineht E165]\ST@trace\tw@{Heightoftail:\the\ST@tailht}%E166]\ST@trace\tw@{Maximumheightoftabular:\the\ST@pageleft}%E167]\@tempdima\ST@headhtINowgwedecidewhetherwecancontinueonthecurrentpageorwhetherweneedItostartonanewpage./bW*eassumethattheminimumheightofatabularistheIheighthofthehead,mthetailandonelineofdata.IfthatdoGesn't tanewpageisIstarted.E168]\advance\@tempdima\ST@linehtE169]\advance\@tempdima\ST@tailhtE170]\ST@trace\tw@{Minimumheightoftabular:\the\@tempdima}%E171]\ifnum\@tempdima>\ST@pageleftE172f\ST@trace\tw@{startingnewpage}%E173f\newpage\@calnextpagehtE174]\fiE175S}f\@calnextpagehtIThiscalculatesthemaximumheightofthetabularonallsubsequentpagesoftheIsupGertabularUUenvironment.E176S\def\@calnextpageht{%E177]\ST@trace\tw@{Calculatingheightoftabularonnextpage}%E178]\global\ST@pageleft\@colroomE179]\global\ST@pagesofar=\z@E180]\ST@trace\tw@{Maximumheightoftabular:\the\ST@pageleft}%E181]}f\x@supertabularITheXbGodyofthebeginningofbothenvironmentsisstoredinasinglemacroastheIcoGdeUUisshared.qIfthecaptionshouldcomeatthetopweinsertithere.E182S\def\x@supertabular{%E183]\if@topcaption\@process@tablecaption\fiISaveUUtheoriginalde nitionof\\.E184]\global\let\@oldcr=\\ISavethecurrentvqalueof\baselineskip,asweneeditinthecalculationofthe IaverageUUheightofaline.E185]\def\baslineskp{\baselineskip}%IW*e havetocheckwhetherarray.stywasloaded,7bGecausesomeoftheinternal ImacrosUUhavedi erentnames.E186]\ifx\undefined\@classixISaveUUold\@tabularcrandinsertthede nitionof\@stabularcr.E187f\let\@@tabularcr\@tabularcr E188f\let\@tabularcr\ST@tabularcrIActivqateUUthenewparbGoxalgorithm.E189f\let\org@startpbox=\@startpbox E190f\let\org@endpbox=\@endpboxE191f\let\@@startpbox=\ST@startpboxE192f\let\@@endpbox=\ST@endpboxE193]\else13+soIWhenUUarray.stywasloadedthingsareabitdi erent. E194f\let\@@tabularcr\@arraycr E195f\let\@arraycr\ST@tabularcrE196f\let\org@startpbox=\@startpboxE197f\let\org@endpbox=\@endpboxE198f\let\@startpbox=\ST@astartpboxE199f\let\@endpbox=\ST@aendpboxE200]\fiXCheckd iftheheadofthetableshouldbGedi erentforthe rstandsubsequent Ipages.E201]\ifx\@table@first@head\undefinedE202f\let\@@tablehead=\@tableheadE203]\elseE204f\let\@@tablehead=\@table@first@headE205]\fiINowwecanestimatetheaveragelineheightandtheheightofthe rstpageof ItheUUsupGertabular.E206]\estimate@linehtE207]\@calfirstpagehtE208]}\supertabularIW*estartbyloGokingforanoptionalargument,PwhichwillbGedulyignoredasit IseemsUUtomakenosensetotrytoalignamultipagetableinthemiddle...E209S\def\supertabular{%E210]\@ifnextchar[{\@supertabular}%]E211x{\@supertabular[]}}IW*eUUcannowsavethepreambleofthetabularinamacro.E212S\def\@supertabular[#1]#2{%E213]\def\ST@tableformat{#2}%E214]\ST@trace\tw@{Startinganewsupertabular}%IThenUUremembGerthatthisisnotasupertabular*environment.E215]\global\ST@starfalseIMostofthefollowingcoGdeissharedbetweenthesupertabular&andsupertabular* Ienvironments.qSoUUtoavoidUUduplicationitisstoredinamacro.E216]\x@supertabularIFinallyUUstartanormaltabularxenvironment.E217]\expandafter\tabular\expandafter{\ST@tableformat}% E218]\@@tablehead} 6\supertabular*IW*eUUstartbyloGokingfortheoptionalargumentofthetabularenvironment.E219S\@namedef{supertabular*}#1{%E220]\@ifnextchar[{\@nameuse{@supertabular*}{#1}}%E221x{\@nameuse{@supertabular*}{#1}[]}%]E222]}IW*eUUstartbysavingtheintendedwidthandthepreambleofthetabular*.E223S\@namedef{@supertabular*}#1[#2]#3{%E224]\ST@trace\tw@{Startinganewsupertabular*}%E225]\def\ST@tableformat{#3}%E226]\ST@wd=#1\relaxE227]\global\ST@startrue14soINowUUwecancallthecommoncoGdeforbothenvironments.E228]\x@supertabularIAndUUwecanstartanormaltabular*environment.E229]\expandafter\csnametabular*\expandafter\endcsname E230]\expandafter{\expandafter\ST@wd\expandafter}%E231]\expandafter{\ST@tableformat}%E232]\@@tablehead}% \endsupertabular t\endsupertabular*IThisUUclosesbGothenvironments.E233S\def\endsupertabular{%E234]\ifx\@table@last@tail\undefinedE235f\@tabletailE236]\elseE237f\@table@last@tailE238]\fiE239]\csnameendtabular\ifST@star*\fi\endcsnameIRestoreUUtheoriginalde nitionof\@tabularcrE240]\ST@restoreICheckifwehavetoinsertacaptionandrestoretodefaultbGehaviourofputting IcaptionsUUatthetop.E241]\if@topcaption E242]\elseE243f\@process@tablecaptionE244f\@topcaptiontrueE245]\fiXRestoreSthemeaningof\\totheoneithadbGeforethestartofthisenvironment. IAlsoUUre-initializesomecontrol-sequencesE246]\global\let\\\@oldcrE247]\let\@table@first@head\undefinedE248]\let\@table@last@tail\undefinedE249]\global\let\@process@tablecaption\relaxE250]\ST@trace\tw@{Endedasupertabular\ifST@star*\fi}%E251]}XTheUUde nitionoftheendingofthesupGertabular*environmentissimple:E252S\expandafter\let\csnameendsupertabular*\endcsname\endsupertabular L\ST@restoreIThisK>macrorestorestheorignalde nitionsofthemacrosthathandleparbGoxentriesIandUUthemacrosthathandletheendoftherow.E253S\def\ST@restore{% E254]\ifx\undefined\@classixE255f\let\@tabularcr\@@tabularcrE256f\let\@@startpbox\org@startpboxE257f\let\@@endpbox\org@endpboxE258]\elseE259f\let\@arraycr\@@tabularcrE260f\let\@startpbox\org@startpboxE261f\let\@endpbox\org@endpboxE262]\fiE263]}158so"\ST@crIThis>macroiscalledbyeach\\insidethetabularenvironment.HItupGdatesthe IestimatePooftheamountofspaceleftonthecurrentpageandstartsanewpageifInecessary*.E264S\def\ST@cr{% E265]\noalign{%E266f\ifnum\ST@pboxht<\ST@linehtIIfEthereisanon-emptyline,butanemptyparbGox,then\ST@pboxhtmightbGe Inon-zero,DbuttoGosmalltherebybreakingthealgorithm.oThereforeweestimateItheUUheightofthelinetobGe\ST@linehtinthiscase.E267p2\global\advance\ST@pageleft-\ST@lineht E268f\elseIWhenNtheparbGoxwasnotemptywetakeintoaccountitsheight(plusabitextra).E269kJ\ST@trace\thr@@{Addedparboxwithheight\the\ST@pboxht}%E270p2\global\advance\ST@pageleft-\ST@pboxhtE271p2\global\advance\ST@pageleft-0.1\ST@pboxhtE272p2\global\ST@pboxht\z@E273f\fiI\ST@toaddUUisthevqalueoftheoptionalargumentof\\.E274f\global\advance\ST@pageleft-\ST@toaddE275f\global\ST@toadd=\z@E276f\ST@trace\thr@@{Spaceleftfortabular:\the\ST@pageleft}%E277]}IWhenUUthereisnotenoughspaceleftwestartanewpage.E278]\ifnum\ST@pageleft<\ST@tailhtE279f\ST@newpageE280]\elseXThislineisnecessarybGecausethetableheadhastobeinserted*after*the I\if\else\fi-clause.F*orM@thispurpGose\st@nextisused.Inthemiddleoftablepro-IcessingUUitshoudbGean*empty*macro(*not*\relax).q(15.2.91)E281f\noalign{\global\let\ST@next\@empty}% E282]\fi\ST@next} L\ST@newpageIThisUUmacropGerformstheactionsnecessarytostartanewpage.E283S\def\ST@newpage{%E284]\noalign{\ST@trace\tw@{Startingnewpage,writingtail}}%IOutput"\tabletail,-closethetabularenvironment,output"allmaterialandstart IaUUfreshnewpage.E285]\@tabletailE286]\ifST@starE287f\csnameendtabular*\endcsnameE288]\elseE289f\endtabularE290]\fiE291]\newpage\@calnextpagehtE292]\let\ST@next\@tableheadE293]\ST@trace\tw@{writinghead}%E294]\ifST@starE295f\expandafter\csnametabular*\expandafter\endcsnameE296f\expandafter{\expandafter\ST@wd\expandafter}%16ѠsoE297f\expandafter{\ST@tableformat}% E298]\elseE299f\expandafter\tabular\expandafter{\ST@tableformat}%E300]\fi}E301Sh#5" cmmi9=pack9age#g i17; %ow cmss9$ cmsy9#5" cmmi9"q[ cmsl9!o cmr9 ߤN cmtt9': cmti10m#R cmss10