; TeX output 1997.08.22:1427soTDtGGcmr17The7t߆TG cmtt12supertabularenqvironment!", cmsy10SXQ cmr12JohannesBraamsandTheoJurriens37 1997/05/209 INff cmbx121aLIntros3ductionIK`y cmr10The&qpackqageXBelowzisadescriptionofthenewcommandsandenvironmentsthatthispac-IkqageUUprovides.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,onthenextbpagethetabletailwillbGewrittenimmediatelyafterthetablehead.oDepen-bdingonthecontentsthismayresultinanerrormessageregardingmisplacedb\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 |so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...3Xso[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.􍍍f86'9ff(͟66ff͟ !o cmr9Num9bAer2Num9bAer-=Aacmr62cyNum9bAer-=4$Num9bAer!;Q66ffYff(ͤ66ffU۟ 1KV6ffI31r66ff1LhereTisarelativ9eshortentry(\b66ffͤLτ$٘ffU۟12KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ff$٘ͤLτ$٘ffU۟13KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffU۟14KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤ6ffU۟ 5KVffI31r6ff1LhereTisarelativ9eshortentry(\b6ffͤLτ$٘ffU۟16KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffU۟17KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffU۟18KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffU۟19KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffݟ110KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffݟ111KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤ6ffݟ 12KVffI31r6ff1LhereTisarelativ9eshortentry(\b6ffYff( ɍͤ6ff p con9tinuedTonnextpage͡ffff(4'so0S/f86z7ff( ɍͤ6ffΟ con9tinuedTfrompreviouspage 6ffYff(͟66ff͟ Num9bAer2Num9bAer-=2cyNum9bAer-=4$Num9bAer!;Q66ffff(ͤLτ$٘ffݟ113KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ff$٘ͤLτ$٘ffݟ114KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffݟ115KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffݟ116KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffݟ117KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ffͤLτ$٘ffݟ118KV$٘ffI31rLτ$٘ff1Landhereisalongen9try:,where LlinebreaksandlinebreaksandlineLbreaksTha9vetooAccur(\bLτ$٘ff5ff(ff(S.XHereisthesametableagain,ıbutthistimeusingthesupGertabular*environment IandUUstretchingthetabletothefullwidthofthetext.T*ableUU3:qThistableshouldalsobGesplitaccrosspages.$I35ffc͟66ff͟ Num9bAer[nNum9bAer-=2xNum9bAer-=4ANum9bAer!8Q66ffYffcͤ66ff'd 16ff1͟66ff׶1μxhereTisarelativ9eshortentryb̟66ffͤLτ$٘ff'd12$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ff$٘ͤLτ$٘ff'd13$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤLτ$٘ff'd14$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤ6ff'd 5ff1͟6ff׶1μxhereTisarelativ9eshortentryb̟6ffͤLτ$٘ff'd16$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ff5ffc ɍͤ6ff}ڟ con9tinuedTonnextpage͡ffYffc55]so*I<ffc ɍͤ6ffΟ con9tinuedTfrompreviouspageyffYffc͟66ff͟ Num9bAer[nNum9bAer-=2xNum9bAer-=4ANum9bAer!8Q66ffffcͤLτ$٘ff'd17$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ff$٘ͤLτ$٘ff'd18$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤLτ$٘ff'd19$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤLτ$٘ff#4f110$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤLτ$٘ff#4f111$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤ6ff#4f 12ff1͟6ff׶1μxhereTisarelativ9eshortentryb̟6ffͤLτ$٘ff#4f113$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤLτ$٘ff#4f114$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤLτ$٘ff#4f115$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤLτ$٘ff#4f116$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤLτ$٘ff#4f117$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ffͤLτ$٘ff#4f118$٘ff1͟Lτ$٘ff׶1μxandhereisalongen9try:,where μxlinebreaksandlinebreaksandlineμxbreaksTha9vetooAccurb̟Lτ$٘ff5ffcffcD퍍I5aLKnownffproblemsXbWhenca oatoGccursonthesamepageasthestartofasupertabularyoucan bexpGectUUunexpectedresults.bWhen:the oatwasde nedonthesamepageyoumightendupwiththeb rstUUpartofthesupGertabularonapagebyitsown.XbY*oushouldnotusethesupGertabularinsidera oating-environmentsuchasbtableAasthiswillresultinTU>'ExXtryingtoputthewholesupGertabularononebpage.6CKsoXbInUUsomeinstancesyoumightstillendupwithoverfull\vboxmessages.XbSometimesdthelastpageofthesupGertabularcontainsjustanemptyheadan btail.!čI6aLTheffImplementationLs1S$ 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@topcaptionItoWdeterminewheretoputthetablecaption.yThedefaultistoputthecaptiononItheUUtopofthetableLs7S\newif\if@topcaption\@topcaptiontrueLs8S\def\topcaption{\@topcaptiontrue\tablecaption}Ls9S\def\bottomcaption{\@topcaptionfalse\tablecaption}\tablecaptionIThisjcommandhastofunctionexactlylike\captiondoGes,exceptithastostoreitsIargumentd(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@starIThisswitchisusedintheinternalmacrostoremembGerwhichkindofenvironmentIwasUUstarted.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\normalsize7QsoI24f\if@topcaption\vskip-10\p@\fi I25f\@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{%I30]\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\\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.I46S\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.I55S\newdimen\ST@pageleft\shrinkheightIAUUcommandtodiminishthevqalueof\ST@pageleftifnecessary*.I56S\newcommand*\shrinkheight[1]{% I57]\noalign{\global\advance\ST@pageleft-#1\relax}}8 \sob\setSTheightIAUUcommandtosetthevqalueof\ST@pageleftifnecessary*.I58S\newcommand*\setSTheight[1]{% I59]\noalign{\global\ST@pageleft=#1\relax}}\ST@headht \ST@tailhtITheHregisterST@headhtwillholdtheheightofthe rstheadofasupGertabular Ienvironment;UUtheregister\ST@tailhtwillholdtheheightoftabletail(ifany)I60S\newdimen\ST@headhtI61S\newdimen\ST@tailht\ST@pagesofarITheregister\ST@pagesofarisusedtostoretheestimateoftheamountofpage IalreadyUU lledup.I62S\newdimen\ST@pagesofar\ST@pboxhtITheUUmeasured(total)heightofaparbGox-argumentI63S\newdimen\ST@pboxht\ST@lineht \ST@stretchht \ST@prevhtIThe 0estimatedheightofanormallineisstoredin\ST@lineht.YThedimension Iregister*\ST@stretchhtisusedtostorethedi erencebGetween*the`normal'lineIheight#andthelineheightwhen\arraystretchhasanon-standardvqalue.1ThisIusedF'inthecasewherep-bGoxentriesareaddedtothetabular.D=ThedimensionIregistery\ST@prevhtisusetostoretheheightofthepreviouslinetouseitasanIestimatefortheheightofthenextline.M\ThisisneededforabGetterestimateofIwhenUUtobreakthetabular.I64S\newdimen\ST@lineht I65S\newdimen\ST@stretchhtI66S\newdimen\ST@prevht$\ST@toaddIWhenCatabularrowisendedwith\\[...]weneedtotempGorarilystorethe IoptionalUUargumentin\ST@toadd.I67S\newdimen\ST@toadd$\ST@dimenIAUUprivqatescratchdimensionregister.I68S\newdimen\ST@dimeny\ST@pboxIAUUbGoxregistertotemporarilystorethecontentsUUofaparbox.I69S\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'I70S\def\ST@tabularcr{% I71]{\ifnum0=`}\fiI72]\@ifstar{\ST@xtabularcr}{\ST@xtabularcr}}I73S\def\ST@xtabularcr{%I74]\@ifnextchar[%]I75f{\ST@argtabularcr}%I76f{\ifnum0=`{\fi}\cr\ST@cr}}9 gMsoI77S\def\ST@argtabularcr[#1]{% I78]\ifnum0=`{\fi}%I79]\ifdim#1>\z@I80f\unskip\ST@xargarraycr{#1}I81]\elseI82f\ST@yargarraycr{#1}%I83]\fi}f\ST@xargarraycr f\ST@yargarraycrIIn]thiscaseweneedtocopythevqalueoftheoptionalargumentof\\inourprivqate IregisterUU\ST@toadd.I84S\def\ST@xargarraycr#1{%I85]\@tempdima#1\advance\@tempdima\dp\@arstrutboxI86]\vrule\@height\z@\@depth\@tempdima\@width\z@\crI87]\noalign{\global\ST@toadd=#1}\ST@cr}XHereUUweneedtoinsert\ST@crI88S\def\ST@yargarraycr#1{%I89]\cr\noalign{\vskip#1\global\ST@toadd=#1}\ST@cr}\ST@startpboxIThemacrosthatdealwithparbGoxcolumnsneedtoberede ned,becauseweneed ItoUUknowthesizeoftheparbGox.I90S\def\ST@startpbox#1{%IT*oUUachieveourgoalweneedtosavethetextinbGox.I91]\setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore} 6\ST@astartpboxIOurUUversionof\@astartpbox.I92S\def\ST@astartpbox#1{% I93]\bgroup\hsize#1%I94]\setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore} L\ST@endpbox b\ST@aendpboxIOurUUversionof\@endpboxand\@aendpbox.I95S\def\ST@endpbox{%I96]\@finalstrut\@arstrutbox\par\egroupI97]\ST@dimen=\ht\ST@pboxI98]\advance\ST@dimenby\dp\ST@pboxI99]\ifnum\ST@pboxht<\ST@dimenE100f\global\ST@pboxht=\ST@dimenE101]\fiE102]\ST@dimen=\z@E103]\box\ST@pbox\hfil}E104S\def\ST@aendpbox{%E105]\@finalstrut\@arstrutbox\par\egroupE106]\ST@dimen=\ht\ST@pboxE107]\advance\ST@dimenby\dp\ST@pboxE108]\ifnum\ST@pboxht<\ST@dimenE109f\global\ST@pboxht=\ST@dimenE110]\fiE111]\ST@dimen=\z@E112]\unvbox\ST@pbox\egroup\hfil} \estimate@linehtIEstimates&theheightofnormallinetaking\arraystretchintoaccount.:Also IcomputesUUthedi erencebGetweenUUanormallineanda`stretched'one.10 rgsoE113S\def\estimate@lineht{% E114]\ST@lineht=\arraystretch\baslineskpE115]\global\advance\ST@linehtby1\p@E116]\ST@stretchht\ST@lineht\advance\ST@stretchht-\baslineskpE117]\ifdim\ST@stretchht<\z@\ST@stretchht\z@\fiE118]\ST@trace\tw@{ s,Averagelineheight:\the\ST@lineht}%E119]\ST@trace\tw@{Stretchedlineheight:\the\ST@stretchht}%E120]} \@calfirstpagehtIEstimates6$thespaceleftonthecurrentpageanddecideswhetherthetabularcan IbGeUUstartedonthispageoronanewpage.E121S\def\@calfirstpageht{%E122]\ST@trace\tw@{Calculatingheightoftabularonfirstpage}%ITheXTU>'ExXregister\pagetotalcontainstheheightofthepagesofar,theL5ffA͉TU>'ExXIregisterUU\@colroomcontainstheheightofthecolumn.E123]\global\ST@pagesofar\pagetotalE124]\global\ST@pageleft\@colroomE125]\ST@trace\tw@{Heightoftext=\the\pagetotal;\MessageBreakE126DHeightofpage=\the\ST@pageleft}%IWhenweareintwoGcolumnmodeTU>'ExXmaystillbecollectingmaterialforthe rstIcolumnPalthoughthereseemstobGenospaceleft.'InthiscasewehavetocheckIagainstUUtwotimes\ST@pageleft.E127]\if@twocolumnE128f\ST@trace\tw@{twocolumnmode}%E129f\if@firstcolumnE130kJ\ST@trace\tw@{Firstcolumn}%E131p2\ifnum\ST@pagesofar>\ST@pageleftE132yw^\global\ST@pageleft=2\ST@pageleftE133yw^\ifnum\ST@pagesofar>\ST@pageleftE134\newpage\@calnextpagehtE135\ST@trace\tw@{startingnewpage}%E136yw^\elseIInȋthiscasewe'reinthesecondcolumn,sowehavetocompGensateforthematerialIinUUthe rstcolumn.E137\ST@trace\tw@{Secondcolumn}%E138\global\advance\ST@pageleft-\ST@pagesofarE139\global\advance\ST@pageleft-\@colroomE140yw^\fiE141p2\fiE142f\fiE143]\elseIInUUonecolumnmoGdethereisasimpledecision.E144f\ST@trace\tw@{onecolumnmode}%E145f\ifnum\ST@pagesofar>\ST@pageleftE146p2\ST@trace\tw@{startingnewpage}%E147p2\newpage\@calnextpagehtIWhen*.wearenotstartinganewpagesubtractthesizeofthematerialalreadyon IitUUfromtheavqailablespace.E148f\elseE149p2\global\advance\ST@pageleftby-\ST@pagesofar11 |ZsoE150p2\global\ST@pagesofar\z@ E151f\fiE152]\fiE153]\ST@trace\tw@{Availableheight:\the\ST@pageleft}%INow:weneedtoknowtheheightoftheheadofthetable.iuInordertomeasure IthisUUwetypGesetitinanormaltabularxenvironment.E154]\ifx\@@tablehead\@emptyE155f\ST@headht=\z@E156]\elseE157f\setbox\@tempboxa=\vbox{\@arrayparboxrestoreE158p2\ST@restoreE159p2\expandafter\tabular\expandafter{\ST@tableformat}%E160p2\@@tablehead\endtabular}%E161f\ST@headht=\ht\@tempboxa\advance\ST@headht\dp\@tempboxaE162]\fiE163]\ST@trace\tw@{Heightofhead:\the\ST@headht}%IT*ogwdecidewhentostartanewpage,kweneedtoknowtheverticalsizeofthetail IofUUthetable.E164]\ifx\@tabletail\@emptyE165f\ST@tailht=\z@E166]\elseE167f\setbox\@tempboxa=\vbox{\@arrayparboxrestoreE168p2\ST@restoreE169p2\expandafter\tabular\expandafter{\ST@tableformat}E170yw^\@tabletail\endtabular}E171f\ST@tailht=\ht\@tempboxa\advance\ST@tailht\dp\@tempboxaE172]\fiIW*eaddtheaverageheightofalinetothisbGecausewhenwedecidetocontinue ItheUUtabularweneedtohaveenoughspaceleftforonelineandthetail.E173]\advance\ST@tailhtby\ST@linehtE174]\ST@trace\tw@{Heightoftail:\the\ST@tailht}%E175]\ST@trace\tw@{Maximumheightoftabular:\the\ST@pageleft}%E176]\@tempdima\ST@headhtINowgwedecidewhetherwecancontinueonthecurrentpageorwhetherweneed Itostartonanewpage./bW*eassumethattheminimumheightofatabularistheIheighthofthehead,mthetailandonelineofdata.IfthatdoGesn't tanewpageisIstarted.E177]\advance\@tempdima\ST@lineht E178]\advance\@tempdima\ST@tailhtE179]\ST@trace\tw@{Minimumheightoftabular:\the\@tempdima}%E180]\ifnum\@tempdima>\ST@pageleftE181f\ST@trace\tw@{startingnewpage}%E182f\newpage\@calnextpagehtE183]\fiE184S}f\@calnextpagehtIThiscalculatesthemaximumheightofthetabularonallsubsequentpagesofthe IsupGertabularUUenvironment.E185S\def\@calnextpageht{%E186]\ST@trace\tw@{Calculatingheightoftabularonnextpage}%E187]\global\ST@pageleft\@colroom12 soE188]\global\ST@pagesofar=\z@ E189]\ST@trace\tw@{Maximumheightoftabular:\the\ST@pageleft}%E190]}f\x@supertabularITheXbGodyofthebeginningofbothenvironmentsisstoredinasinglemacroasthe IcoGdeUUisshared.E191S\def\x@supertabular{%IFirstƄsavetheoriginalde nitionof\tabularandthenmakeitpGointtoI\inner@tabular.ThisisdonetoenablesupGertabularcellstocontainatabu-IlarenvironmentŃwithoutgettingunexpGectedresultswhenthesupertabularwouldIbGeUUsplitaccrossthisinnertabularxenvironment.E192]\let\org@tabular\tabular E193]\let\tabular\inner@tabularITheȆsameneedstobGedoneforthetabular*environment.YThecoGdingisslightlyImoreUUverbGose.E194]\expandafter\let E195f\csnameorg@tabular*\expandafter\endcsnameE196f\csnametabular*\endcsnameE197]\expandafter\let\csnametabular*\expandafter\endcsnameE198f\csnameinner@tabular*\endcsnameIIfUUthecaptionshouldcomeatthetopweinsertithere.E199]\if@topcaption\@process@tablecaption\fiISaveUUtheoriginalde nitionof\\.E200]\global\let\@oldcr=\\ISavethecurrentvqalueof\baselineskip,asweneeditinthecalculationofthe IaverageUUheightofaline.E201]\def\baslineskp{\baselineskip}%IW*e havetocheckwhetherarray.stywasloaded,7bGecausesomeoftheinternal ImacrosUUhavedi erentnames.E202]\ifx\undefined\@classixISaveUUold\@tabularcrandinsertthede nitionof\@stabularcr.E203f\let\@@tabularcr\@tabularcr E204f\let\@tabularcr\ST@tabularcrIActivqateUUthenewparbGoxalgorithm.E205f\let\org@startpbox=\@startpbox E206f\let\org@endpbox=\@endpboxE207f\let\@@startpbox=\ST@startpboxE208f\let\@@endpbox=\ST@endpboxE209]\elseIWhenUUarray.stywasloadedthingsareabitdi erent.E210f\let\@@tabularcr\@arraycrE211f\let\@arraycr\ST@tabularcrE212f\let\org@startpbox=\@startpboxE213f\let\org@endpbox=\@endpboxE214f\let\@startpbox=\ST@astartpboxE215f\let\@endpbox=\ST@aendpboxE216]\fi13٠soXCheckd iftheheadofthetableshouldbGedi erentforthe rstandsubsequent Ipages.E217]\ifx\@table@first@head\undefined E218f\let\@@tablehead=\@tableheadE219]\elseE220f\let\@@tablehead=\@table@first@headE221]\fiIThe rstpartofasupGertabularmaybemovedontothenextpageifitdoesn'tI tConthecurrentpageafterall.kSubsequentpartscannotbGemoved;IythereforeweIwillUUhavetoswitchthede nitionof\ST@skippartaround.E222]\let\ST@skippage\ST@skipfirstpartINowwecanestimatetheaveragelineheightandtheheightofthe rstpageofItheUUsupGertabular.E223]\estimate@lineht E224]\@calfirstpagehtE225]}\supertabularIW*estartbyloGokingforanoptionalargument,PwhichwillbGedulyignoredasitIseemsUUtomakenosensetotrytoalignamultipagetableinthemiddle...E226S\def\supertabular{%E227]\@ifnextchar[{\@supertabular}%]E228x{\@supertabular[]}}IW*eUUcannowsavethepreambleofthetabularinamacro.E229S\def\@supertabular[#1]#2{%E230]\def\ST@tableformat{#2}%E231]\ST@trace\tw@{Startinganewsupertabular}%IThenUUremembGerthatthisisnotasupertabular*environment.E232]\global\ST@starfalseIMostofthefollowingcoGdeissharedbetweenthesupertabular&andsupertabular* Ienvironments.qSoUUtoavoidUUduplicationitisstoredinamacro.E233]\x@supertabularIFinallyUUstartanormaltabularxenvironment.E234]\expandafter\org@tabular\expandafter{\ST@tableformat}% E235]\@@tablehead} 6\supertabular*IW*eUUstartbyloGokingfortheoptionalargumentofthetabularenvironment.E236S\@namedef{supertabular*}#1{%E237]\@ifnextchar[{\@nameuse{@supertabular*}{#1}}%E238x{\@nameuse{@supertabular*}{#1}[]}%]E239]}IW*eUUstartbysavingtheintendedwidthandthepreambleofthetabular*.E240S\@namedef{@supertabular*}#1[#2]#3{%E241]\ST@trace\tw@{Startinganewsupertabular*}%E242]\def\ST@tableformat{#3}%E243]\ST@wd=#1\relaxE244]\global\ST@startrueINowUUwecancallthecommoncoGdeforbothenvironments.E245]\x@supertabular14soIAndUUwecanstartanormaltabular*environment.E246]\expandafter\csnameorg@tabular*\expandafter\endcsname E247]\expandafter{\expandafter\ST@wd\expandafter}%E248]\expandafter{\ST@tableformat}%E249]\@@tablehead}% \endsupertabular t\endsupertabular*IThisUUclosesbGothenvironments.E250S\def\endsupertabular{%E251]\ifx\@table@last@tail\undefinedE252f\@tabletailE253]\elseE254f\@table@last@tailE255]\fiE256]\csnameendtabular\ifST@star*\fi\endcsnameIRestoreUUtheoriginalde nitionof\@tabularcrE257]\ST@restoreICheckifwehavetoinsertacaptionandrestoretodefaultbGehaviourofputting IcaptionsUUatthetop.E258]\if@topcaption E259]\elseE260f\@process@tablecaptionE261f\@topcaptiontrueE262]\fiXRestoreSthemeaningof\\totheoneithadbGeforethestartofthisenvironment. IAlsoUUre-initializesomecontrol-sequencesE263]\global\let\\\@oldcrE264]\global\let\@table@first@head\undefinedE265]\global\let\@table@last@tail\undefinedE266]\global\let\@process@tablecaption\relaxE267]\ST@trace\tw@{Endedasupertabular\ifST@star*\fi}%E268]}XTheUUde nitionoftheendingofthesupGertabular*environmentissimple:E269S\expandafter\let\csnameendsupertabular*\endcsname\endsupertabular L\ST@restoreIThismacrorestorestheoriginalde nitionsofthemacrosthathandleparbGox IentriesUUandthemacrosthathandletheendoftherow.E270S\def\ST@restore{%E271]\ifx\undefined\@classixE272f\let\@tabularcr\@@tabularcrE273]\elseE274f\let\@arraycr\@@tabularcrE275]\fiE276]\let\@startpbox\org@startpboxE277]\let\@endpbox\org@endpboxE278]} 6\inner@tabular f\inner@tabular*IInkordertofacilitatecompletetabularenvironmentsktobGeinacellofasuperta- Ibularenvironmentweneedtoadaptthede nitionoftheorginalenvironmentsIsomewhat.qF*orUUtheinnertabularxanumbGerofde nitionsneedstoberestored.E279S\def\inner@tabular{%15soE280]\ST@restore E281]\let\\\@oldcrE282]\org@tabular}E283S\@namedef{inner@tabular*}{%E284]\ST@restoreE285]\let\\\@oldcrE286]\csnameorg@tabular*\endcsname}"\ST@crIThis>macroiscalledbyeach\\insidethetabularenvironment.HItupGdatesthe IestimatePooftheamountofspaceleftonthecurrentpageandstartsanewpageifInecessary*. E287S\def\ST@cr{% E288]\noalign{%E289f\ifnum\ST@pboxht<\ST@linehtIIfEthereisanon-emptyline,butanemptyparbGox,then\ST@pboxhtmightbGe Inon-zero,DbuttoGosmalltherebybreakingthealgorithm.oThereforeweestimateItheUUheightofthelinetobGe\ST@linehtinthiscase.E290p2\global\advance\ST@pageleft-\ST@linehtIAndUUwestorethatfactin\ST@prevht.E291p2\global\ST@prevht\ST@lineht E292f\elseIWhenNtheparbGoxwasnotemptywetakeintoaccountitsheight(plusabitextra).E293kJ\ST@trace\thr@@{Addedparboxwithheight\the\ST@pboxht}% E294p2\global\advance\ST@pageleft-\ST@pboxhtE295p2\global\advance\ST@pageleft-0.1\ST@pboxhtE296p2\global\advance\ST@pageleft-\ST@stretchhtE297p2\global\ST@prevht\ST@pboxhtE298p2\global\ST@pboxht\z@E299f\fiI\ST@toaddUUisthevqalueoftheoptionalargumentof\\.E300f\global\advance\ST@pageleft-\ST@toaddE301f\global\ST@toadd=\z@E302f\ST@trace\thr@@{Spaceleftfortabular:\the\ST@pageleft}%E303]}IWhenw%the\ST@pagelefthasbGecomenegative,thelastrowwassohighthatthe IsupGertabularNdoesn't tonthecurrentpageafterall.]InthiscasewewillskiptheIcurrentppageandstartatthetopofthenextone;}otherwiseTU>'ExXwillmovethisIpartofthetabletoanewpageanyway*,yprobablywithamessageabGoutanoverfullI\vbox.E304]\ifnum\ST@pageleft<\z@ E305f\ST@skippageE306]\elseIWhen $thereisnotenoughspaceleftonthecurrentpage,.westartanewpage.XT*o Icomputestheamountofspaceweusetheheightofthepreviousline(\ST@prevht)IasUUanestimationoftheheightofthenextline.E307f\noalign{\global\@tempdima\ST@tailht E308p2\global\advance\@tempdima\ST@prevht}E309f\ifnum\ST@pageleft<\@tempdimaE310p2\ST@newpageE311f\else16soIThislineisnecessarybGecausethetableheadhastobeinserted*after*the I\if\else\fi-clause.mF*or|7thispurpGose\ST@nextisused.Inthemiddleofta-IbleproGcessingUUitshoudbean*empty*macro(*not*\relax).q(15.2.91)E312p2\noalign{\global\let\ST@next\@empty}% E313f\fiE314]\fiE315]\ST@next}t\ST@skipfirstpartIThisa,macroskipsthecurrentpageandmovestheentiresupGertabularthathas IbGeenUUbuiltupsofartothenextpage.E316S\def\ST@skipfirstpart{%E317]\noalign{%E318f\ST@trace\tw@{Tabulartoohigh,movingtonextpage}%IInorderforthistoworkpropGerlyweneedtoadaptthevqalueof\ST@pageleft. IWhenjthismacroiscalledithasanegativevqalue.W*eshouldaddtheheightofIthe%snextpagetothat(\@colroom). F*romtheresultthe`normal'heightoftheIsupGertabularshouldbesubstracted(\@colroom-\pagetotal).ThiscouldbeIcoGdedUUasfollows:eY\ST@dimen\@colroom eY\advance\ST@dimen-\pagetotaleY\global\advance\ST@pageleft\@colroomeY\global\advance\ST@pageleft-\ST@dimenIWhenLyouexaminethecoGdeyouwillnotethat\@colroomisaddedandUUsubtracted. IThereforeUUthecoGdeaboveUUcanbesimpli edto:E319f\global\advance\ST@pageleft\pagetotalIThenUUwecanset\ST@pagesofarto0andstartthenewpage.E320f\global\ST@pagesofar\z@E321f\newpageXFinallywemakesurethatthismacrocanonlybGeexecutedonceforeach IsupGertabularUUbychangingthede nitionof\ST@skippage.E322f\global\let\ST@skippage\ST@newpageE323f}} L\ST@newpageIThisUUmacropGerformstheactionsnecessarytostartanewpage.E324S\def\ST@newpage{%E325]\noalign{\ST@trace\tw@{Startingnewpage,writingtail}}%IOutput"\tabletail,-closethetabularenvironment,output"allmaterialandstart IaUUfreshnewpage.E326]\@tabletailE327]\ifST@starE328f\csnameendtabular*\endcsnameE329]\elseE330f\endtabularE331]\fiXThenwemakesurethatthemacro\ST@skippagecannolongerbGeexecuted IforUUthissupGertabularbychangingthede nitionofit.E332]\global\let\ST@skippage\ST@newpageE333]\newpage\@calnextpageht17osoE334]\let\ST@next\@tablehead E335]\ST@trace\tw@{writinghead}%E336]\ifST@starE337f\expandafter\csnameorg@tabular*\expandafter\endcsnameE338f\expandafter{\expandafter\ST@wd\expandafter}%E339f\expandafter{\ST@tableformat}%E340]\elseE341f\expandafter\org@tabular\expandafter{\ST@tableformat}%E342]\fi}E343Sh#5" cmmi9=pack9age#g i18p; %ow cmss9$ cmsy9#5" cmmi9"q[ cmsl9!o cmr9 ߤN cmtt9': cmti10m#R cmss10