; TeX output 1997.04.14:1210soTDtGGcmr17The7t߆TG cmtt12supertabularenqvironment!", cmsy10SXQ cmr12JohannesBraamsandTheoJurriens37 1997/04/109 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[%]I71f{\ST@argtabularcr}%I72f{\ifnum0=`{\fi}\cr\ST@cr}}I73S\def\ST@argtabularcr[#1]{%I74]\ifnum0=`{\fi}%I75]\ifdim#1>\z@I76f\unskip\ST@xargarraycr{#1}I77]\elseI78f\ST@yargarraycr{#1}%I79]\fi}f\ST@xargarraycr f\ST@yargarraycrIIn]thiscaseweneedtocopythevqalueoftheoptionalargumentof\\inourprivqate IregisterUU\ST@toadd.I80S\def\ST@xargarraycr#1{%I81]\@tempdima#1\advance\@tempdima\dp\@arstrutboxI82]\vrule\@height\z@\@depth\@tempdima\@width\z@\crI83]\noalign{\global\ST@toadd=#1}\ST@cr}XHereUUweneedtoinsert\ST@crI84S\def\ST@yargarraycr#1{%I85]\cr\noalign{\vskip#1\global\ST@toadd=#1}\ST@cr}\ST@startpboxIThemacrosthatdealwithparbGoxcolumnsneedtoberede ned,becauseweneed ItoUUknowthesizeoftheparbGox.I86S\def\ST@startpbox#1{%IT*oUUachieveourgoalweneedtosavethetextinbGox.I87]\setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore}10 iso 6\ST@astartpboxIOurUUversionof\@astartpbox.I88S\def\ST@astartpbox#1{% I89]\bgroup\hsize#1%I90]\setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore} L\ST@endpbox b\ST@aendpboxIOurUUversionof\@endpboxand\@aendpbox.I91S\def\ST@endpbox{%I92]\@finalstrut\@arstrutbox\par\egroupI93]\ST@dimen=\ht\ST@pboxI94]\advance\ST@dimenby\dp\ST@pboxI95]\ifnum\ST@pboxht<\ST@dimenI96f\global\ST@pboxht=\ST@dimenI97]\fiI98]\ST@dimen=\z@I99]\box\ST@pbox\hfil}E100S\def\ST@aendpbox{%E101]\@finalstrut\@arstrutbox\par\egroupE102]\ST@dimen=\ht\ST@pboxE103]\advance\ST@dimenby\dp\ST@pboxE104]\ifnum\ST@pboxht<\ST@dimenE105f\global\ST@pboxht=\ST@dimenE106]\fiE107]\ST@dimen=\z@E108]\unvbox\ST@pbox\egroup\hfil} \estimate@linehtIEstimatesUUtheheightofnormallinetaking\arraystretchintoaccount.E109S\def\estimate@lineht{%E110]\ST@lineht=\arraystretch\baslineskpE111]\global\advance\ST@linehtby1\p@E112]\ST@trace\tw@{Averagelineheight:\the\ST@lineht}%E113]} \@calfirstpagehtIEstimates6$thespaceleftonthecurrentpageanddecideswhetherthetabularcan IbGeUUstartedonthispageoronanewpage.E114S\def\@calfirstpageht{%E115]\ST@trace\tw@{Calculatingheightoftabularonfirstpage}%ITheXTU>'ExXregister\pagetotalcontainstheheightofthepagesofar,theL5ffA͉TU>'ExX IregisterUU\@colroomcontainstheheightofthecolumn.E116]\global\ST@pagesofar\pagetotalE117]\global\ST@pageleft\@colroomE118]\ST@trace\tw@{Heightoftext=\the\pagetotal;\MessageBreakE119DHeightofpage=\the\ST@pageleft}%IWhenweareintwoGcolumnmodeTU>'ExXmaystillbecollectingmaterialforthe rst IcolumnPalthoughthereseemstobGenospaceleft.'InthiscasewehavetocheckIagainstUUtwotimes\ST@pageleft.E120]\if@twocolumn E121f\ST@trace\tw@{twocolumnmode}%E122f\if@firstcolumnE123kJ\ST@trace\tw@{Firstcolumn}%E124p2\ifnum\ST@pagesofar>\ST@pageleftE125yw^\global\ST@pageleft=2\ST@pageleft11 sƠsoE126yw^\ifnum\ST@pagesofar>\ST@pageleft E127\newpage\@calnextpagehtE128\ST@trace\tw@{startingnewpage}%E129yw^\elseIInȋthiscasewe'reinthesecondcolumn,sowehavetocompGensateforthematerial IinUUthe rstcolumn.E130\ST@trace\tw@{Secondcolumn}%E131\global\advance\ST@pageleft-\ST@pagesofarE132\global\advance\ST@pageleft-\@colroomE133yw^\fiE134p2\fiE135f\fiE136]\elseIInUUonecolumnmoGdethereisasimpledecision.E137f\ST@trace\tw@{onecolumnmode}%E138f\ifnum\ST@pagesofar>\ST@pageleftE139p2\ST@trace\tw@{startingnewpage}%E140p2\newpage\@calnextpagehtIWhen*.wearenotstartinganewpagesubtractthesizeofthematerialalreadyon IitUUfromtheavqailablespace.E141f\elseE142p2\global\advance\ST@pageleftby-\ST@pagesofarE143p2\global\ST@pagesofar\z@E144f\fiE145]\fiE146]\ST@trace\tw@{Availableheight:\the\ST@pageleft}%INow:weneedtoknowtheheightoftheheadofthetable.iuInordertomeasure IthisUUwetypGesetitinanormaltabularxenvironment.E147]\ifx\@@tablehead\@emptyE148f\ST@headht=\z@E149]\elseE150f\setbox\@tempboxa=\vbox{\@arrayparboxrestoreE151p2\ST@restoreE152p2\expandafter\tabular\expandafter{\ST@tableformat}%E153p2\@@tablehead\endtabular}%E154f\ST@headht=\ht\@tempboxa\advance\ST@headht\dp\@tempboxaE155]\fiE156]\ST@trace\tw@{Heightofhead:\the\ST@headht}%IT*ogwdecidewhentostartanewpage,kweneedtoknowtheverticalsizeofthetail IofUUthetable.E157]\ifx\@tabletail\@emptyE158f\ST@tailht=\z@E159]\elseE160f\setbox\@tempboxa=\vbox{\@arrayparboxrestoreE161p2\ST@restoreE162p2\expandafter\tabular\expandafter{\ST@tableformat}E163yw^\@tabletail\endtabular}E164f\ST@tailht=\ht\@tempboxa\advance\ST@tailht\dp\@tempboxaE165]\fi12 ~soIW*eaddtheaverageheightofalinetothisbGecausewhenwedecidetocontinue ItheUUtabularweneedtohaveenoughspaceleftforonelineandthetail.E166]\advance\ST@tailhtby\ST@lineht E167]\ST@trace\tw@{Heightoftail:\the\ST@tailht}%E168]\ST@trace\tw@{Maximumheightoftabular:\the\ST@pageleft}%E169]\@tempdima\ST@headhtINowgwedecidewhetherwecancontinueonthecurrentpageorwhetherweneedItostartonanewpage./bW*eassumethattheminimumheightofatabularistheIheighthofthehead,mthetailandonelineofdata.IfthatdoGesn't tanewpageisIstarted.E170]\advance\@tempdima\ST@linehtE171]\advance\@tempdima\ST@tailhtE172]\ST@trace\tw@{Minimumheightoftabular:\the\@tempdima}%E173]\ifnum\@tempdima>\ST@pageleftE174f\ST@trace\tw@{startingnewpage}%E175f\newpage\@calnextpagehtE176]\fiE177S}f\@calnextpagehtIThiscalculatesthemaximumheightofthetabularonallsubsequentpagesoftheIsupGertabularUUenvironment.E178S\def\@calnextpageht{%E179]\ST@trace\tw@{Calculatingheightoftabularonnextpage}%E180]\global\ST@pageleft\@colroomE181]\global\ST@pagesofar=\z@E182]\ST@trace\tw@{Maximumheightoftabular:\the\ST@pageleft}%E183]}f\x@supertabularITheXbGodyofthebeginningofbothenvironmentsisstoredinasinglemacroastheIcoGdeUUisshared.E184S\def\x@supertabular{%IFirstƄsavetheoriginalde nitionof\tabularandthenmakeitpGointtoI\inner@tabular.ThisisdonetoenablesupGertabularcellstocontainatabu-IlarenvironmentŃwithoutgettingunexpGectedresultswhenthesupertabularwouldIbGeUUsplitaccrossthisinnertabularxenvironment.E185]\let\org@tabular\tabular E186]\let\tabular\inner@tabularITheȆsameneedstobGedoneforthetabular*environment.YThecoGdingisslightlyImoreUUverbGose.E187]\expandafter\let E188f\csnameorg@tabular*\expandafter\endcsnameE189f\csnametabular*\endcsnameE190]\expandafter\let\csnametabular*\expandafter\endcsnameE191f\csnameinner@tabular*\endcsnameIIfUUthecaptionshouldcomeatthetopweinsertithere.E192]\if@topcaption\@process@tablecaption\fiISaveUUtheoriginalde nitionof\\.E193]\global\let\@oldcr=\\13RsoISavethecurrentvqalueof\baselineskip,asweneeditinthecalculationofthe IaverageUUheightofaline. zE194]\def\baslineskp{\baselineskip}%zIW*e havetocheckwhetherarray.stywasloaded,7bGecausesomeoftheinternalImacrosUUhavedi erentnames.E195]\ifx\undefined\@classixzISaveUUold\@tabularcrandinsertthede nitionof\@stabularcr.E196f\let\@@tabularcr\@tabularcr E197f\let\@tabularcr\ST@tabularcrIActivqateUUthenewparbGoxalgorithm.E198f\let\org@startpbox=\@startpbox E199f\let\org@endpbox=\@endpboxE200f\let\@@startpbox=\ST@startpboxE201f\let\@@endpbox=\ST@endpboxE202]\elsezIWhenUUarray.stywasloadedthingsareabitdi erent.E203f\let\@@tabularcr\@arraycrE204f\let\@arraycr\ST@tabularcrE205f\let\org@startpbox=\@startpboxE206f\let\org@endpbox=\@endpboxE207f\let\@startpbox=\ST@astartpboxE208f\let\@endpbox=\ST@aendpboxE209]\fizXCheckd iftheheadofthetableshouldbGedi erentforthe rstandsubsequent Ipages.E210]\ifx\@table@first@head\undefinedE211f\let\@@tablehead=\@tableheadE212]\elseE213f\let\@@tablehead=\@table@first@headE214]\fizIThe rstpartofasupGertabularmaybemovedontothenextpageifitdoesn't I tConthecurrentpageafterall.kSubsequentpartscannotbGemoved;IythereforeweIwillUUhavetoswitchthede nitionof\ST@skippartaround.E215]\let\ST@skippage\ST@skipfirstpartzINowwecanestimatetheaveragelineheightandtheheightofthe rstpageofItheUUsupGertabular.E216]\estimate@lineht E217]\@calfirstpagehtE218]}n\supertabularIW*estartbyloGokingforanoptionalargument,PwhichwillbGedulyignoredasit IseemsUUtomakenosensetotrytoalignamultipagetableinthemiddle...E219S\def\supertabular{%E220]\@ifnextchar[{\@supertabular}%]E221x{\@supertabular[]}}zIW*eUUcannowsavethepreambleofthetabularinamacro.E222S\def\@supertabular[#1]#2{%E223]\def\ST@tableformat{#2}%E224]\ST@trace\tw@{Startinganewsupertabular}%14soIThenUUremembGerthatthisisnotasupertabular*environment.E225]\global\ST@starfalseIMostofthefollowingcoGdeissharedbetweenthesupertabular&andsupertabular* Ienvironments.qSoUUtoavoidUUduplicationitisstoredinamacro.E226]\x@supertabularIFinallyUUstartanormaltabularxenvironment.E227]\expandafter\org@tabular\expandafter{\ST@tableformat}% E228]\@@tablehead} 6\supertabular*IW*eUUstartbyloGokingfortheoptionalargumentofthetabularenvironment.E229S\@namedef{supertabular*}#1{%E230]\@ifnextchar[{\@nameuse{@supertabular*}{#1}}%E231x{\@nameuse{@supertabular*}{#1}[]}%]E232]}IW*eUUstartbysavingtheintendedwidthandthepreambleofthetabular*.E233S\@namedef{@supertabular*}#1[#2]#3{%E234]\ST@trace\tw@{Startinganewsupertabular*}%E235]\def\ST@tableformat{#3}%E236]\ST@wd=#1\relaxE237]\global\ST@startrueINowUUwecancallthecommoncoGdeforbothenvironments.E238]\x@supertabularIAndUUwecanstartanormaltabular*environment.E239]\expandafter\csnameorg@tabular*\expandafter\endcsname E240]\expandafter{\expandafter\ST@wd\expandafter}%E241]\expandafter{\ST@tableformat}%E242]\@@tablehead}% \endsupertabular t\endsupertabular*IThisUUclosesbGothenvironments.E243S\def\endsupertabular{%E244]\ifx\@table@last@tail\undefinedE245f\@tabletailE246]\elseE247f\@table@last@tailE248]\fiE249]\csnameendtabular\ifST@star*\fi\endcsnameIRestoreUUtheoriginalde nitionof\@tabularcrE250]\ST@restoreICheckifwehavetoinsertacaptionandrestoretodefaultbGehaviourofputting IcaptionsUUatthetop.E251]\if@topcaption E252]\elseE253f\@process@tablecaptionE254f\@topcaptiontrueE255]\fiXRestoreSthemeaningof\\totheoneithadbGeforethestartofthisenvironment. IAlsoUUre-initializesomecontrol-sequencesE256]\global\let\\\@oldcr15soE257]\let\@table@first@head\undefined E258]\let\@table@last@tail\undefinedE259]\global\let\@process@tablecaption\relaxE260]\ST@trace\tw@{Endedasupertabular\ifST@star*\fi}%E261]}XTheUUde nitionoftheendingofthesupGertabular*environmentissimple:E262S\expandafter\let\csnameendsupertabular*\endcsname\endsupertabular L\ST@restoreIThismacrorestorestheoriginalde nitionsofthemacrosthathandleparbGox IentriesUUandthemacrosthathandletheendoftherow.E263S\def\ST@restore{% E264]\ifx\undefined\@classixE265f\let\@tabularcr\@@tabularcrE266]\elseE267f\let\@arraycr\@@tabularcrE268]\fiE269]\let\@startpbox\org@startpboxE270]\let\@endpbox\org@endpboxE271]} 6\inner@tabular f\inner@tabular*IInwordertofacilitatecompletetabularenvironmentswtobGeinacellofasupertabular Ienvironmentweneedtoadaptthede nitionoftheorginalenvironmentssome-Iwhat.qF*orUUtheinnertabularxanumbGerofde nitionsneedstoberestored.E272S\def\inner@tabular{% E273]\ST@restoreE274]\let\\\@oldcrE275]\org@tabular}E276S\@namedef{inner@tabular*}{%E277]\ST@restoreE278]\let\\\@oldcrE279]\csnameorg@tabular*\endcsname}"\ST@crIThis>macroiscalledbyeach\\insidethetabularenvironment.HItupGdatesthe IestimatePooftheamountofspaceleftonthecurrentpageandstartsanewpageifInecessary*.E280S\def\ST@cr{% E281]\noalign{%E282f\ifnum\ST@pboxht<\ST@linehtIIfEthereisanon-emptyline,butanemptyparbGox,then\ST@pboxhtmightbGe Inon-zero,DbuttoGosmalltherebybreakingthealgorithm.oThereforeweestimateItheUUheightofthelinetobGe\ST@linehtinthiscase.E283p2\global\advance\ST@pageleft-\ST@lineht E284f\elseIWhenNtheparbGoxwasnotemptywetakeintoaccountitsheight(plusabitextra).E285kJ\ST@trace\thr@@{Addedparboxwithheight\the\ST@pboxht}%E286p2\global\advance\ST@pageleft-\ST@pboxhtE287p2\global\advance\ST@pageleft-0.1\ST@pboxhtE288p2\global\ST@pboxht\z@E289f\fi16̠soI\ST@toaddUUisthevqalueoftheoptionalargumentof\\. I%E290f\global\advance\ST@pageleft-\ST@toadd E291f\global\ST@toadd=\z@E292f\ST@trace\thr@@{Spaceleftfortabular:\the\ST@pageleft}%E293]}I%IWhenw%the\ST@pagelefthasbGecomenegative,thelastrowwassohighthatthe IsupGertabularNdoesn't tonthecurrentpageafterall.]InthiscasewewillskiptheIcurrentppageandstartatthetopofthenextone;}otherwiseTU>'ExXwillmovethisIpartofthetabletoanewpageanyway*,yprobablywithamessageabGoutanoverfullI\vbox.E294]\ifnum\ST@pageleft<\z@ E295f\ST@skippageE296]\elseI%IWhenUUthereisnotenoughspaceleftonthecurrentpage,westartanewpage.E297f\ifnum\ST@pageleft<\ST@tailhtE298p2\ST@newpageE299f\elseI%IThislineisnecessarybGecausethetableheadhastobeinserted*after*the I\if\else\fi-clause.F*orM@thispurpGose\ST@nextisused.Inthemiddleoftablepro-IcessingUUitshoudbGean*empty*macro(*not*\relax).q(15.2.91)E300p2\noalign{\global\let\ST@next\@empty}% E301f\fiE302]\fiE303]\ST@next}nt\ST@skipfirstpartIThisa,macroskipsthecurrentpageandmovestheentiresupGertabularthathas IbGeenUUbuiltupsofartothenextpage.E304S\def\ST@skipfirstpart{%E305]\noalign{%E306f\ST@trace\tw@{Tabulartoohigh,movingtonextpage}%I%IInorderforthistoworkpropGerlyweneedtoadaptthevqalueof\ST@pageleft. IWhenjthismacroiscalledithasanegativevqalue.W*eshouldaddtheheightofIthe%snextpagetothat(\@colroom). F*romtheresultthe`normal'heightoftheIsupGertabularshouldbesubstracted(\@colroom-\pagetotal).ThiscouldbeIcoGdedUUasfollows:IeY\ST@dimen\@colroom eY\advance\ST@dimen-\pagetotaleY\global\advance\ST@pageleft\@colroomeY\global\advance\ST@pageleft-\ST@dimenIIWhenLyouexaminethecoGdeyouwillnotethat\@colroomisaddedandUUsubtracted. IThereforeUUthecoGdeaboveUUcanbesimpli edto:E307f\global\advance\ST@pageleft\pagetotalI%IThenUUwecanset\ST@pagesofarto0andstartthenewpage.E308f\global\ST@pagesofar\z@E309f\newpageI%XFinallywemakesurethatthismacrocanonlybGeexecutedonceforeach IsupGertabularUUbychangingthede nitionof\ST@skippage.E310f\global\let\ST@skippage\ST@newpageE311f}}17so L\ST@newpageIThisUUmacropGerformstheactionsnecessarytostartanewpage.E312S\def\ST@newpage{% E313]\noalign{\ST@trace\tw@{Startingnewpage,writingtail}}%IOutput"\tabletail,-closethetabularenvironment,output"allmaterialandstart IaUUfreshnewpage.E314]\@tabletailE315]\ifST@starE316f\csnameendtabular*\endcsnameE317]\elseE318f\endtabularE319]\fiXThenwemakesurethatthemacro\ST@skippagecannolongerbGeexecuted IforUUthissupGertabularbychangingthede nitionofit.E320]\global\let\ST@skippage\ST@newpageE321]\newpage\@calnextpagehtE322]\let\ST@next\@tableheadE323]\ST@trace\tw@{writinghead}%E324]\ifST@starE325f\expandafter\csnameorg@tabular*\expandafter\endcsnameE326f\expandafter{\expandafter\ST@wd\expandafter}%E327f\expandafter{\ST@tableformat}%E328]\elseE329f\expandafter\org@tabular\expandafter{\ST@tableformat}%E330]\fi}E331Sh#5" cmmi9=pack9age#g i18; %ow cmss9$ cmsy9#5" cmmi9"q[ cmsl9!o cmr9 ߤN cmtt9': cmti10m#R cmss10