; TeX output 1997.12.22:2023so%DtGGcmr17The7tGGcmss17 x2colpacqkage!", cmsy10XQ cmr12DarvidCarlisle2K cmsy8y37 1997/11/11:ōINff cmbx121aLIntros3ductionIK`y cmr10ThisSspackqagemakestwoindepGendentchangestoL5ffٓRcmr7A͉TU>'ExX'stwocolumnoutputrou- ItineUUto xthefollowingtwolongstanding`features'.X !", cmsy10bIfJ'theTU>'ExXmarksystemisused(forexampleusingthe`headings'pagestyleinbtheVstandardL5ffA͉TU>'ExXclasses)thenanymarksthatoriginateonthe rstcolumnbarehY`lost'asL5ffA͉TU>'ExXconstructsthesecondcolumn.AnexampledoGcumentbshowing9lhowthiscanresultinincorrectpageheadingsmaybGefoundintheblatexUUbugdatabase:b'ExXbook.?BydefaultL5ffA͉TU>'ExXdoesbnotattempttokeepdoubleandsinglecolumn oatsinsequence,soif`Figureb1'isadoublecolumn oatproGducedwithfigure*,thenitmay oatafterb`Figure^2'ifthatisasinglecolumn,figure, oat.F*urther^correspGondencebabGoutUUthismayalsobefoundinthebugdatabase:bhttp://www.uni-mainz.de/cgi-bin/ltxbugs2html?pr=latex/2346!čI2aLNotesffontheImplementationStrategiesIN cmbx122.1gPreservingMarksuTIThestandardL5ffA͉TU>'ExXtwoGcolumnsystemworksinternallybymakingeachcolumnIa]separate`page'thatispassedindepGendentlytoTU>'ExX'spagebreaker.`(UnlikesayIthebm#R cmss10multicolpackqage,eHwhereallcolumnsaregatheredtogetherandthensplitintoIcolumnsʻlater,tusing\vsplit.)CThismeansthattheprimitiveTU>'ExXmarksthatareInormallyܙusedforheaderinformation,aregloballyresetafterthe rstcolumn.IByIdefault]L5ffA͉TU>'ExXdoGesnothingaboutthis.AAgoodsolutionisprovidedbyPietvqanIOostrumUU(buildingonearlierworkofJoGePallas)inhis xmarkspackqage.XAfterthe rstcolumnbGoxhasbeencollectedthemarkinformationforthatIbGoxqissaved,N8sothatany\firstmarkcanbGe`arti cially'usedtosetthepage-Ilevel:marksafterthesecondcolumnhasbGeencollected.w(ThesecondcolumnIfffr @ -:q% cmsy6L|{Ycmr8ThisX lehasvÎersionnumb'ExXdoGesnotprovidea IdirecthKwayofknowingifanymarksareinthepage, \firstmarkalwayshasaIvqalue frompreviouspages,evenifthereisnomarkinthispage.HThesolutionisIto)makeacopyofthebGoxandthen\vsplititsothatanymarksshowupasI\splitfirstmark.XTheuseof\vsplitdoGesmeanthattheoutputroutinewillgloballychangeItheOvqalueof\splitfirstmarkand\splitbotmark.VThe xmarkspackqagegoGestoIsomeDtroubletosaveDandrestorethesevqaluessothattheoutputroutinedoGes ': cmti10notIchangethevqalues.Thispartof xmarksisnotcopiedhereasitisquitecostlyI(having4tobGerunoneverypage)andthereisnoreasonwhyanyonewritingcoGdeIusing^7\vsplitshouldallowtheoutputroutinetobGetriggeredbeforethesplitImarksUUhavebGeenaccessed.6I2.2gPreservingFloatOrderuTIThestandardoutputroutinemaintainstwolistsof oatsthathavebGeen`deferred'Ifori laterconsideration.# Onelistforsinglecolumn oats,^andonefordoublecolumnI oats};(whicharealwaysimmediatelyputontotheirdeferredlist).)ThismechanismImeansOthatL5ffA͉TU>'ExX`knows'whichtypGeof oatiscontainedineachbGoxbythelistIthatҔitisproGcessing,buthavingtwolistsmeansthatthereisnomechanismforIpreservingUUtheorderbGetweenUUthe oatsineachlist.XThebssolutiontothisproblemconsistsoftwobssmallchangestotheoutputrou-Itine.XFirstly*,abandon]the`doublecolumn oatlist'\@dbldeferlistandchangeIevery)%commandwhereitisusedsothatinsteadthesame\@deferlistisusedasIforwsinglecolumn oats.\ThatonechangeensuresthatdoubleandsinglecolumnI oatsstayinthesamesequence,butasL5ffA͉TU>'ExXnolonger`knows'whethera oatisIdouble2Gorsinglecolumn,9Jitwillhappilyinsertadouble oatintoasinglecolumn,IoverprintingUUtheothercolumn,orthemargin.XThe secondchangeistoprovideanalternativemechanismforrecordingtheItwocolumn oats. L5ffA͉TU>'ExXalreadyhasacompactmechanismforrecording oatIinformation,kanܚintegercountregisterassignedtoeach oatrecordsinformationIabGoutUUthe`type'of oat` gure',`table'andthepositioninformation`htp'etc.XTheUQtypGeinformationisstoredinthe`high'bits,URonebitposition(aboveUQ`32')IalloGcatedtoeach oattypGe.1The`low'bitsstoreinformationabGouttheallowedIpGositions,4onebiteachallocatedforh?tbp.wIntheL5ffA͉TU>'ExX2.09system,4thebitIcorrespGondingFsto`16'formeda`boundary'betweenFsthesetwoFssetsofinformation,Iand-itwasneveractuallyusedbythesystem.UNEdSznyter's x oatspackqagenotIunreasonablyyusedthispGositiontostorethedoublecolumninformation,settingIthegbitfordoublecolumn oats.ThenateachpGointintheoutputroutineatIwhich=a oatiscommittedtoacertainregion,B\anadditionalcheckmustbGemadeIto+checkthatthe oatis(orisnot)doublecolumn.cIfitspansthewrongnumbGerIofUUcolumnsitisdeferredratherthanbGeingadded.XUnfortunately/ thebit`16'isnotavqailableinL5ffA͉TU>'ExX2 b> cmmi10").ItisusedtoencoGdeIthe4Aextra oatpGositionpossibility`!'thatwasaddedinthatsystem.fItwouldbGeIpGossibletouseposition`32'andtomovethe agsfor`table',` gure',...guponeIpGosition,toHstartat64,butthiswouldmeanthatinprincipleoneless oattypGeIwould4bGesupported,andmoreimportantlyislikelytobreakanyotherpackqagesIthat0assumeanythingabGouttheoutputroutineinternals.6XSohereI insteaduseIanothermechanismfor aggingdoublecolumn oats:}Bydefaultall oatshave2 soIdepthf60pt.jThispackqagearrangesthatdoublecolumnoneshavedepth1sp.jThis IinformationmaythenbGeusedinthesamemannerasinthe x oatspackqage,toIdeferUUany oatsthatarenotofthecorrectcolumnspanningtypGe. KI3aLImplementationLs1S$ cmsy9h%ow cmss9pack9age#g iPI3.1gPreservingMarksuTIThisisjustachangetothesinglecommand\@outputdblcolsothatitsavesmarkIinformationUUforthe rstcolumnandrestoresitinthesecondcolumn. ZLs2S!ߤN cmtt9\def\@outputdblcol{% Ls3]\if@firstcolumnLs4f\global\@firstcolumnfalseZISaveUUtheleftcolumnLs5f\global\setbox\@leftcolumn\copy\@outputboxXRemembGerUUthemarksfromthe rstcolumnLs6f\splitmaxdepth\maxdimen Ls7f\vbadness\maxdimenLs8f\setbox\@outputbox\vsplit\@outputboxto\maxdimenZXOne}minordi erencefromthecurrent xmarks,passthemarksthroughatoken IregisterUUtostopany#tokenscausinganerrorina\def.Ls9f\toks@\expandafter{\topmark}%I10f\xdef\@firstcoltopmark{\the\toks@}%I11f\toks@\expandafter{\splitfirstmark}%I12f\xdef\@firstcolfirstmark{\the\toks@}%ZXThistestdoGesnotworkiftrulyemptymarkshavebGeeninserted,(butL5ffA͉TU>'ExX Imarks{shouldalways{have(atleast)twobracegroups.9(ExceptbGeforethe rstImarkUUisused,whenthemarksareempty*,butthatisOKhere.)I13f\ifx\@firstcolfirstmark\@empty I14p2\global\let\@setmarks\relaxI15f\elseI16p2\gdef\@setmarks{%I17yw^\let\firstmark\@firstcolfirstmarkI18yw^\let\topmark\@firstcoltopmark}%I19f\fiZXEndUUofchangeI20]\elseI21f\global\@firstcolumntrueI22f\setbox\@outputbox\vbox{%I23kJ\hb@xt@\textwidth{%I24yw^\hb@xt@\columnwidth{\box\@leftcolumn\hss}%I25yw^\hfilI26yw^\vrule\@width\columnsepruleI27yw^\hfilI28t\hb@xt@\columnwidth{\box\@outputbox\hss}}}%I29]\@combinedblfloatsZIOverrideUUcurrent rstandtopwiththoseof rstcolumnifnecessaryI30f\@setmarks3 soIEndUUofchangeI31f\@outputpage I32f\begingroupI33p2\@dblfloatplacementI34p2\@startdblcolumnI35p2\@whilesw\if@fcolmade\fi{\@outputpage\@startdblcolumn}%I36f\endgroupI37]\fi}6I3.2gPreservingFloatOrderuTIChanges\@dbldeferlistto\@deferlistarenotexplicitlynotedbutare agged IbyUUblankcommentlinesaroundthechangedline.I38S\def\end@dblfloat{%I39S\if@twocolumnI40]\@endfloatboxI41]\ifnum\@floatpenalty<\z@I42f\@largefloatcheckXF*orceUUthedepthoftwoUUcolumn oatbGoxes.I43f\global\dp\@currbox1sp%I44f\@cons\@deferlist\@currboxI45]\fi I46f\ifnum\@floatpenalty=-\@Mii\@Esphack\fiI47S\elseI48]\end@floatI49S\fiI50S}XT*est^ifthe oatbGoxhasthewrongwidth.Zu(Actuallyasnotedabove^thetestis IforUUaconventionalUUdepthsettingratherthanforthewidthofthe oat).I51S\def\@testwrongwidth#1{%I52]\ifdim\dp#1=\f@depthI53]\elseI54f\global\@testtrueI55]\fi}XNormallyUUloGokingforsinglecolumn oats,whichhavezerodepth.I56S\let\f@depth\z@XbutUUwhenmakingtwoUUcolumn oatarea,loGokfor oatswith1spdepth.I57S\def\@dblfloatplacement{\global\@dbltopnum\c@dbltopnumber I58ap\global\@dbltoproom\dbltopfraction\@colhtI59ap\@textmin\@colhtI60ap\advance\@textmin-\@dbltoproomI61ap\@fpmin\dblfloatpagefraction\textheightI62ap\@fptop\@dblfptopI63ap\@fpsep\@dblfpsepI64ap\@fpbot\@dblfpbotI65ap\def\f@depth{1sp}}4*soXAlltheremainingchangesarereplacingthedoublecolumndeferlistorinsering Itheextratest\@testwrongwidth{hb}'ox4Di}atsuitableplaces.+ThatisatplceswhereIaUUbGoxistakeno thedeferlist.I66S\def\@doclearpage{% I67kJ\ifvoid\footinsI68t\setbox\@tempboxa\vsplit\@cclvto\z@\unvbox\@tempboxaI69t\setbox\@tempboxa\box\@cclvI70t\xdef\@deferlist{\@toplist\@botlist\@deferlist}%I71t\global\let\@toplist\@emptyI72t\global\let\@botlist\@emptyI73t\global\@colroom\@colhtI74t\ifx\@currlist\@emptyI75t\elseI76\@latexerr{Float(s)lost}\@ehbI77\global\let\@currlist\@emptyI78t\fiI79t\@makefcolumn\@deferlistI80t\@whilesw\if@fcolmade\fi{\@opcol\@makefcolumn\@deferlist}%I81t\if@twocolumnI82~0\if@firstcolumnI83 \xdef\@deferlist{\@dbltoplist\@deferlist}%I84 \global\let\@dbltoplist\@empty I85 \global\@colht\textheightI86 \begingroupI87\@dblfloatplacementI88\@makefcolumn\@deferlistI89\@whilesw\if@fcolmade\fi{\@outputpageI90\@makefcolumn\@deferlist}%I91 \endgroupI92~0\elseI93 \vbox{}\clearpageI94~0\fiI95t\fiI96kJ\elseI97t\setbox\@cclv\vbox{\box\@cclv\vfil}%I98t\@makecol\@opcolI99t\clearpageE100kJ\fiE101S}E102S\def\@startdblcolumn{%E103]\@tryfcolumn\@deferlistE104]\if@fcolmadeE105]\elseE106f\begingroupE107p2\let\reserved@b\@deferlistE108p2\global\let\@deferlist\@emptyE109p2\let\@elt\@sdblcoleltE110p2\reserved@bE111f\endgroupE112]\fiE113S}53%soE114S\def\@addtonextcol{% E115]\begingroupE116ap\@insertfalseE117ap\@setfloattypecountsE118ap\ifnum\@fpstype=8E119ap\elseE120kJ\ifnum\@fpstype=24E121kJ\elseE122t\@flsettextminE123t\@reqcolroom\ht\@currboxE124t\advance\@reqcolroom\@textminE125t\ifdim\@colroom>\@reqcolroomE126~0\@flsetnum\@colnumE127~0\ifnum\@colnum>\z@E128]\@bitor\@currtype\@deferlistE129]\@testwrongwidth\@currboxE130]\if@testE131]\elseE132\@addtotoporbotE133]\fiE134~0\fiE135t\fiE136kJ\fiE137ap\fiE138ap\if@insertE139ap\elseE140kJ\@cons\@deferlist\@currboxE141ap\fiE142]\endgroupE143S}E144S\def\@addtodblcol{%E145]\begingroupE146ap\@insertfalseE147ap\@setfloattypecountsE148ap\@getfpsbit\tw@E149ap\ifodd\@tempcntaE150kJ\@flsetnum\@dbltopnumE151kJ\ifnum\@dbltopnum>\z@E152t\@tempswafalseE153t\ifdim\@dbltoproom>\ht\@currboxE154~0\@tempswatrueE155t\elseE156~0\ifnum\@fpstype<\sixt@@nE157 \advance\@dbltoproom\@textminE158 \ifdim\@dbltoproom>\ht\@currboxE159L\@tempswatrueE160 \fiE161 \advance\@dbltoproom-\@textminE162~0\fiE163t\fiE164t\if@tempswaE165 \@bitor\@currtype\@deferlistXnotUUin x oats?6;ʠsoE166\@testwrongwidth\@currboxE167 \if@test E168 \elseE169\@tempdima-\ht\@currboxE170\advance\@tempdimaE171D-\ifx\@dbltoplist\@empty\dbltextfloatsep\elseE172J\dblfloatsep\fiE173\global\advance\@dbltoproom\@tempdimaE174\global\advance\@colht\@tempdimaE175\global\advance\@dbltopnum\m@neE176\@cons\@dbltoplist\@currboxE177\@inserttrueE178 \fiE179t\fiE180kJ\fiE181ap\fiE182ap\if@insertE183ap\elseE184kJ\@cons\@deferlist\@currboxE185ap\fiE186]\endgroupE187S}E188S\def\@addtocurcol{%E189ap\@insertfalseE190ap\@setfloattypecountsE191ap\ifnum\@fpstype=8E192ap\elseE193kJ\ifnum\@fpstype=24E194kJ\elseE195t\@flsettextminE196t\advance\@textmin\@textfloatsheightE197t\@reqcolroom\@pagehtE198t\ifdim\@textmin>\@reqcolroomE199~0\@reqcolroom\@textminE200t\fiE201t\advance\@reqcolroom\ht\@currboxE202t\ifdim\@colroom>\@reqcolroomE203~0\@flsetnum\@colnumE204~0\ifnum\@colnum>\z@E205 \@bitor\@currtype\@deferlistE206 \if@testE207 \elseE208L\@bitor\@currtype\@botlistE209t\@testwrongwidth\@currboxE210L\if@testE211x\@addtobotE212L\elseE213x\ifodd\count\@currboxE214\advance\@reqcolroom\intextsepE215\ifdim\@colroom>\@reqcolroomE216p\global\advance\@colnum\m@neE217p\global\advance\@textfloatsheight\ht\@currboxE218p\global\advance\@textfloatsheight2\intextsep7C.soE219p\@cons\@midlist\@currbox E220p\if@nobreakE221\nobreakE222\@nobreakfalseE223\everypar{}%E224p\elseE225\addpenalty\interlinepenaltyE226p\fiE227p\vskip\intextsepE228p\box\@currboxE229p\penalty\interlinepenaltyE230p\vskip\intextsepE231p\ifnum\outputpenalty<-\@Mii\vskip-\parskip\fiE232p\outputpenalty\z@E233p\@inserttrueE234\fiE235x\fiE236x\if@insertE237x\elseE238\@addtotoporbotE239x\fiE240L\fiE241 \fiE242~0\fiE243t\fiE244kJ\fiE245ap\fiE246ap\if@insertE247ap\elseE248kJ\@resethfpsE249kJ\@cons\@deferlist\@currboxE250ap\fiE251S}E252S\def\@xtryfc#1{%E253]\@next\reserved@a\@trylist{}{}%E254]\@currtype\count#1%E255]\divide\@currtype\@xxxiiE256]\multiply\@currtype\@xxxiiE257]\@bitor\@currtype\@failedlistE258]\@testfp#1%E259]\@testwrongwidth#1%E260]\ifdim\ht#1>\@colhtE261kJ\@testtrueE262]\fiE263]\if@testE264f\@cons\@failedlist#1%E265]\elseE266f\@ytryfc#1%E267]\fi}E268S\def\@ztryfc#1{%E269]\@tempcnta\count#1%E270]\divide\@tempcnta\@xxxiiE271]\multiply\@tempcnta\@xxxii8 KsoE272]\@bitor\@tempcnta{\@failedlist\@flfail}% E273]\@testfp#1%XnotUUin x oats?E274]\@testwrongwidth#1%E275]\@tempdimb\@tempdimaE276]\advance\@tempdimb\ht#1%E277]\advance\@tempdimb\@fpsepE278]\ifdim\@tempdimb>\@colhtE279f\@testtrueE280]\fiE281]\if@testE282f\@cons\@flfail#1%E283]\elseE284f\@cons\@flsucceed#1%E285f\@tempdima\@tempdimbE286]\fi}E287Sh#5" cmmi9=pack9age#g i9R; %ow cmss9$ cmsy9#5" cmmi9!ߤN cmtt9 ': cmti10m#R cmss10N cmbx12 cmmi10K`y cmr10ٓRcmr7U