; TeX output 1997.02.17:1403soXK`y cmr10This' leisbuiltforL5ffٓRcmr7A͉TU>'ExX2 b> cmmi10"({0,0sowemakesureanerrorisgeneratedwhenitis IusedUUwithanotherformatLs1S cmsy9ho cmr9+ow cmss9pack9age%ѾiߤN cmtt9\NeedsTeXFormat{LaTeX2e}XNowUUannouncethepackqagenameanditsversion:Ls2Shdtxi Ls3S\ProvidesFile{changebar.dtx}Ls4Sh5" cmmi9=dtxiLs5Sh+pack9age%Ѿi\ProvidesPackage{changebar}Ls6 [1996/03/26v3.2cIndicatechangeswithmarginalbars]!čINff cmbx121aLAffdriverforthisdos3cumentIThenextbitofcoGdecontainsthedocumentationdriver leforTU>'ExX,i.e.,the leIthatVwillproGducethedocumentationyouarecurrentlyreading.ItwillbGeextractedIfromUUthis lebythe- cmcsc10docstripprogram.Ls7ShdriveroiLs8S\documentclass{ltxdoc}IW*eUUdowantUUanindex,usinglinenumbGersLs9S\EnableCrossrefsI10S\CodelineIndexIThisUUdoGcumentusessomeextraItrealizesthisbybmakingTuseofthe\specialcommandssuppAortedb9y`dvidrivers'./CurrentlybfourTdi eren9tdriversaresuppAorted.pMorecaneasilybeadded.!čI2aLIntros3ductionIIMPOR*TANT^NOTE:oJustaswithcrossreferencesandlabGels,youusuallyneed ItoQ,proGcessthedocumenttwice(andsometimesthreetimes)toensurethattheIchangebars5comeoutcorrectly*."gHowever,awarningwillbGegivenifanotherpassIisUUrequired.XFEA*TURES:Iffffr @ -:q% cmsy6L%|{Ycmr8ThisX lehasvÎersionnumb'ExX2"qasXGargument.zspGecifythedriverthatwillbGeusedtoprintthedoGcumentIcanUUbGeindicated.qThedrivermaybGeoneof:XbDVItoLN03XbDVItoPSXbDVIpsXbemTU>'ExXIThedriversarerepresentedinthenormaltypGewritermethodoftypingtheseInames,UUorbythesameentirelyinlowercase.XThe_pGositionofthebarsmayeitherbeontheinneredgeofthepage(theleftIcolumnVonarectoorsingle-sidedpage,therightcolumnofaversopage)byuseIoffthe$m#R cmss10innerbarspackqageoption(thedefault),jorontheouteredgeofthepagebyIuseUUofthetheouterbarspackqageoption.XThexpackqagealsoimplementstracingforitsowndebugging. .0ThepackqageIoptionsUUtraceonandtraceo controltracing.6I3.2gMacrosde nedbythepack@ageuTIAllfmaterialbGetweenfthemacros\cbstartand\cbendisbarred.Thenestingof3P\cbstart!|\cbendImultiplechangebarsisallowed.gThemacro\cbstarthasanoptionalparameterIthatspGeci esthewidthofthebar.Thesyntaxis\cbstart[h.': cmti10dimensionci5].IfnoIwidth±isspGeci ed,thecurrentvqalueoftheparameter\changebarwidthisused.INoteithat\cbstartand\cbendcanbGeusedanywherebutmustbGecorrectlyInestedFrwith oatsandfoGotnotes.EThatis,onecannothaveFroneendofthebarIinside-Ra oatinginsertionandtheotheroutside,5RbutthatwouldbGeameaninglessIthingUUtodoanyhow.XApartfromthemacros\cbstartand\cbendapropGerL5ffA͉TU>'ExXenvironmentisychangebar3ؠsoIde ned.^TheadvqantageofusingtheenvironmentwheneverpGossibleisthatL5ffA͉TU>'ExX IwillUUdoalltheworkofcheckingthecorrectnestingofdi erentenvironments.XThe|macro\cbdeleteputsasquarebarinthemargintoindicatethatsomey\cbdeleteItext wasremovedfromthedoGcument.zThemacrohasanoptionalargumenttoIspGecifytothewidthofthebar.Whennoargumentisspeci edthecurrentvqalueofItheUUparameter\deletebarwidthwillbGeused.XTheUUmacro\nochangebarsdisablesthechangebarcommands.b\nochangebars6I3.3gChangebarparametersuTIThewidthofthechangebarsiscontrolledwiththeL5ffA͉TU>'ExXlengthparameter 6\changebarwidthI\changebarwidth. ItsvqaluecanbGechangedwiththe\setlengthcommand.IChanging-thevqalueof\changebarwidtha ectsallsubsequentchangebarssub-IjectUUtothescopingrulesof\setlength.XThewidthofthedeletebarsiscontrolledwiththeL5ffA͉TU>'ExXlengthparameter 6\deletebarwidthI\deletebarwidth. ItsvqaluecanbGechangedwiththe\setlengthcommand.IChanging0thevqalueof\changebarwidtha ectsallsubsequentdeletebarssub8jectItoUUthescopingrulesof\setlength.XTheseparationbGetweenthetextandthechangebarsisdeterminedbythevqalueb\changebarsepIofUUtheL5ffA͉TU>'ExXlengthparameter\changebarsep.XWhen[oneofthesuppGorteddvitoPostScripttranslatorsisusedthe`blackness'bchangebargreyIoffthebarscanbGecontrolled.TheL5ffA͉TU>'ExXcounterchangebargreyisusedforthisIpurpGose.qItsUUvqaluecanbechangedwithacommandlike:[X\setcounter{changebargrey}{85} ITheUSvqalueofthecounterisapGercentage,wherethevqalue0yieldsblackbars,theIvqalueUU100yieldswhitebars.XTheZgchangebarswillbGeprintedinthe`inside'marginofyourdoGcument.ThisyouterbarsImeans(theyappGearontheleftsideofthepage.bWhentwoside(Ͳisine ectthebarsIwillHbGeprintedontherightsideofevenpages.^ThisbGehaviourcanbGechangedbyIincludingUUthecommand\outerbarstrueinyourdoGcument.!čI4aLDe cienciesffandbugsXbThe8macrosblindlyusespGecialspoints\cb@minpointthrough\cb@maxpoint.bIf4thiscon ictswithanothersetofmacros,theresultswillbGeunpredictable.b(What#isreallyneededisa\newspecialpoint,analogousto\newcountbetc.UU|it'snotprovidedbGecausetheuseofthepointsisratherrare.)XbThereisalimitof(\cb@maxpoint?瞸\cb@minpoint@`+1)=2barspGerpage(twobspGecialpointsperbar).UsingmorethanthisnumbGeryeildsunpredictablebresults(butthatcouldbGecalledafeatureforapagewithsomanybars).bThisUUlimitationcouldbGeincreasedifdesired.XbInternalJmacronamesarealloftheform\cb@xxxx.9Nocheckingforcon ictsbwithUUothermacrosisdone.XbThisUUimplementationdoGesnotworkwithtwo(ormore)columnprinting.4$rsoXbThe6algorithmsmayfailifa oatinginsertionissplitovermultiplepages.CIn bL5ffA͉TU>'ExX oatsarenotsplitbutfoGotnotesmaybe.HThesimplest xtothisisbtopreventfoGotnotesfrombeingsplitbutthismaymakeTU>'ExXveryunhappy*.XbThe]\cbendnormallygets\attached"tothetokenafteritratherthanthebonebGeforeit.Thismayleadtoalongerbarthanintended.F*orexample,bconsiderTthesequence`word1\cbendword2'.'ExXproGcessesaheadofthepagebreakbeforeinvokingtheoutputrou- Itine,itK4ispGossiblethatthe\cbendisprocessed,andthe agunset,bGeforetheIoutputGAroutineiscalled.mIfthishappGens,JspecialGAactionisrequiredtogenerateanIarti cialadendandbGegintobeaddedtopagenandn@+1adrespectively*,dgasitisnotIpGossibletousea agtosignaltheoutputroutinethatabarcrossesapagebreak.XThe]methoGdusedbythesemacrosistocreatealistofthebeginningandendIpGoints,nofeachbarinthedoGcumenttogetherwiththepagenumbGercorrespondingItoeachpGoint.UThen,Dasapageiscompleted,amoGdi edoutputroutinecheckstheIlistktodetermineifanybarsbGegunonorbeforethecurrentpageareterminatedIon subsequentpages,andhandlesthosebarsappropriately*.lTo buildthelist,IinformationabGouteachchangebariswrittentothe.aux leasbarsareproGcessed.IThisinformationisre-readwhenthedoGcumentisnextprocessed.KThus,toensure53bsoIthat?changebarsarecorrect,D$thedoGcumentmustbGeprocessedtwice.jLuckily*,D$this IisUUgenerallyrequiredforL5ffA͉TU>'ExXanyway*.XThisapproachissucientlygeneraltoallownestedbars,Rbarsin oatingin-Isertions,cgand`barsaround oatinginsertions.Barsinside oatsandfoGotnotesareIhandledSinthesamewaySasbarsinregulartext. Barsthatencompass oatsorIfoGotnotesarehandledbycreatinganadditionalbarthat oatswiththe oatingImaterial._MoGdi cationsd2totheappropriateL5ffA͉TU>'ExXmacroscheckd2forthisconditionIandUUaddtheextrabar.!čI6aLTheffimplementationIW*e bGeginbyidentifyingourselvesbywritingamessageinthetranscriptoftheIsession.6I6.1gDeclarationsAndInitializationsuTb\cb@maxpointIThe4originalversionofchangebar.styonlysuppGortedtheDVItoLN03specials.IThe LN03printerhasamaximumnumbGerofpointsthatcanbede nedonapage.IAlsoforsomePostScriptprintersthenumbGerofpointsthatcanbede nedcanIbGe3limitedbytheamountofmemoryused.fTherefore,:_theconsecutivenumbGeringIofopGointshastoberesetwhenthemaximumisreached.ThismaximumcanbGeIadaptedUUtotheprintersneeds.I34Shpack9age#g i I35S\def\cb@maxpoint{80}b\cb@minpointIWhencPresettingthepGointnumbGerweneedtoknowwhattoresetitto,thisisIminimumnumbGerisstoredin\cb@minpoint.BThismn9umbQerhastobeODDIbGecausefthealgorithmthatdecideswhetherabarhastobecontinuedfonthenextIpageUUdepGendsonthis.I36S\def\cb@minpoint{1}3P\cb@nilISometimesnavoidvqalueforapGointhastobGereturnedbyoneofthemacros.F*orIthisUUpurpGose\cb@nilisused.I37S\def\cb@nil{0}\cb@nextpoint \cb@currentpointIThee3numbGerofthenextspecialpointisstoredinthecountregister\cb@nextpointIand1initiallyequalto\cb@minpoint.ZThenumbGer1ofthecurrentpointisstoredIinUU\cb@currentpoint.I38S\newcount\cb@nextpoint I39S\cb@nextpoint=\cb@minpointI40S\newcount\cb@currentpointy\cb@page \cb@pagecountITheAmacrosneedtokeeptrackofthenumbGerofpagesoutputsofar.kHT*othisend Ithe~counter\cb@pagecountisused.TWhenapagenumbGerisreadfromthehistoryIlist,itisstoredinthecounter\cb@page.}Thecountercb@pagecountisinitiallyI0;UUitgetsincrementedduringthecallto\@makebox(seesection6.5).I41S\newcount\cb@page I42S\newcount\cb@pagecountI43S\cb@pagecount=06Bso$outerbarsIAUUswitchisprovidedtocontrolwherethechangebarswillbGeprinted.I44S\newif\ifouterbars$@cb@traceIAUUswitchtoenabletracingoftheactionsofthispackqageI45S\newif\if@cb@trace\cb@positionsIThisHmacrocalculatesthe(horizontal)pGositionsofthechangebars.Thecalcula- Itionstaketwosideintoaccount.DAlsothesettingoftheswitchouterbarsischecked.XBecauseDZthemarginscandi erforevenandoGddpagesandbecausechangebarsIarewsometimesondi erentsidesofthepapGerweneedtwodimensionstostoretheIresult.XSince|thechangebarsaredrawnwiththePostScriptcommandlinetoandInotsasTU>'ExX-likerulesthereferencepGointslieonthecenterofthechangebar,Itherefore!thecalculationhastoaddorsubtracthalfofthewidthofthebartoIkeepUU\changebarsepwhitespacebGetweenthebarandthebGodyUUtext.I46S\newdimen\cb@odd I47S\newdimen\cb@evenIFirstthepGositionforoddpagesiscalculated.JInthiscasetheuseofthetwosideIoptionUUdoGesnote ectthepositioningofthechangebars.I48S\def\cb@positions{% I49]ڹ\global\cb@odd=\hoffsetI50]ڹ\global\advance\cb@oddby\oddsidemarginI51]ڹ\ifouterbarsI52f\global\advance\cb@oddby\textwidthI53f\global\advance\cb@oddby\changebarsepI54f\global\advance\cb@oddby0.5\changebarwidthI55]ڹ\elseI56f\global\advance\cb@oddby-\changebarsepI57f\global\advance\cb@oddby-0.5\changebarwidthI58]ڹ\fiIOnevenpagestheuseofthetwosideoptionresultsinadi erentplacementofthe Ibars.I59]ڹ\global\cb@even=\hoffsetI60]ڹ\global\advance\cb@evenby\evensidemarginI61]ڹ\if@twosideI62f\ifouterbarsI63p2\global\advance\cb@evenby-\changebarsepI64p2\global\advance\cb@evenby-0.5\changebarwidthI65f\elseI66p2\global\advance\cb@evenby\textwidthI67p2\global\advance\cb@evenby\changebarsepI68p2\global\advance\cb@evenby0.5\changebarwidthI69f\fiI70]ڹ\elseI71f\ifouterbarsI72p2\global\advance\cb@evenby\textwidthI73p2\global\advance\cb@evenby\changebarsepI74p2\global\advance\cb@evenby0.5\changebarwidthI75f\elseI76p2\global\advance\cb@evenby-\changebarsepI77p2\global\advance\cb@evenby-0.5\changebarwidth7OsoI78f\fi I79]ڹ\fi}\cb@removedimIInCPostScriptcoGdelengthspeci cationsarewithoutdimensions.Thereforeweneed Iawaytoremovetheletters`pt'fromtheresultoftheopGeration\the\hdimenci#`.IThisUUcanbGedonebyde ningacommandthathasadelimitedargumentlike:[X\def\cb@removedim#1pt{#1}IW*eencounteroneproblemthough,UthecategorycoGdeoftheletters`pt'is12whenIproGducedastheoutputfrom\the\hdimenci#`.@ThusthecharactersthatdelimitItheNargumentof\cb@removedimalsohavetohavecategorycoGde12.oT*okeeptheIchangesUUloGcalthemacro\cb@removedimisde nedinagroup. ׍I80S{\catcode`\p=12\catcode`\t=12\gdef\cb@removedim#1pt{#1}}ZI6.2gOptionPro`cessinguTITheusershouldselectthespGecialsthatshouldbeusedbyspecifyingthedriverInameUUasanoptiontothe\usepackagecall.qPossiblechoicesare:g[XbDVItoLN03XbDVItoPSXbDVIpsXbemTU>'ExXXTheuambitionisthatthedrivernamesshouldbGecase-insensitive,}butthefol- IlowingTcoGdedoesn'tachieveTthis:q|itonlypermitstheformsgivenaboveTandtheirIlower-caseUUequivqalents. ׍I81S\DeclareOption{DVItoLN03}{\global\chardef\cb@driver@setup=0\relax} I82S\DeclareOption{dvitoln03}{\global\chardef\cb@driver@setup=0\relax}I83S\DeclareOption{DVItoPS}{\global\chardef\cb@driver@setup=1\relax}I84S\DeclareOption{dvitops}{\global\chardef\cb@driver@setup=1\relax}I85S\DeclareOption{DVIps}{\global\chardef\cb@driver@setup=2\relax}I86S\DeclareOption{dvips}{\global\chardef\cb@driver@setup=2\relax}I87S\DeclareOption{emTeX}{\global\chardef\cb@driver@setup=3\relax}I88S\DeclareOption{emtex}{\global\chardef\cb@driver@setup=3\relax}׍XThe$newfeaturesofL5ffA͉TU>'ExX2"/SmakeitpGossibletoimplementtheouterbars Ioption.I89S\DeclareOption{outerbars}{\outerbarstrue}I90S\DeclareOption{innerbars}{\outerbarsfalse}XItGisalsopGossibletospecifythatthechangebarsshouldalways޲beprintedonIeithertheleftortherightsideofthetext.F*orthiswehavetheoptionsleftbarsIandrightbars.sSpGecifyingeither:oftheseoptionswilloverruleapGossibletwosideIoptionUUatthedoGcumentlevel. ׍I91S\DeclareOption{leftbars}{%I92]ڹ\def\cb@positions{%I93f\global\cb@odd\hoffsetI94f\global\advance\cb@oddby\oddsidemarginI95f\global\advance\cb@oddby-\changebarsep8 [FsoI96f\global\advance\cb@oddby-0.5\changebarwidth I97f\global\cb@even\hoffsetI98f\global\advance\cb@evenby\evensidemarginI99f\global\advance\cb@evenby-\changebarsepE100f\global\advance\cb@evenby-0.5\changebarwidthE101f}}E102S\DeclareOption{rightbars}{%E103]ڹ\def\cb@positions{%E104f\global\cb@odd=\hoffsetE105f\global\advance\cb@oddby\oddsidemarginE106f\global\advance\cb@oddby\textwidthE107f\global\advance\cb@oddby\changebarsepE108f\global\advance\cb@oddby0.5\changebarwidthE109f\global\cb@even\hoffsetE110f\global\advance\cb@evenby\evensidemarginE111f\global\advance\cb@evenby\textwidthE112f\global\advance\cb@evenby\changebarsepE113f\global\advance\cb@evenby0.5\changebarwidthE114f}}E115S\DeclareOption{traceon}{\@cb@tracetrue}E116S\DeclareOption{traceoff}{\@cb@tracefalse}ISignalUUanerrorifanunknownoptionwasspGeci ed.E117S\DeclareOption*{\OptionNotUsed\PackageErrorE118p2{Unrecognisedoption`\CurrentOption'}%E119p2{knownoptionsaredvitoln03,dvitops,dvipsE120yw^andemtex,\MessageBreakE121yw^outerbars,innerbars,leftbarsandrightbars.}}XThe'defaultistohave'thechangebarsontheleftsideofthetextonoGddpages.E122S\ExecuteOptions{innerbars,traceoff,dvips}E123S\ProcessOptions\relax6I6.3gUserLevelCommandsAndParametersuT3P\driverITheusercanselectthespGecialsthatshouldbeusedbycallingthecommand I\driver{hdrivername[i9}.qPossibleUUchoicesare:XbDVItoLN03XbDVItoPSXbDVIpsXbemTU>'ExXIThisUUcommandcanonlybGeusedinthepreambleofthedocument.XThe~.argumentshouldbGecase-insensitive,6soitisturnedintoastringcontainingIall2uppGercasecharacters.FT*okeepsomede nitionsloGcal,everythingisdonewithinIaUUgroup.E124S\if@compatibility E125]ڹ\def\driver#1{%E126f\bgroup\edef\next{\def\noexpand\tempa{#1}}%E127p2\uppercase\expandafter{\next}%9 gsoE128p2\def\LN{DVITOLN03}% E129p2\def\DVItoPS{DVITOPS}%E130p2\def\DVIPS{DVIPS}%E131p2\def\emTeX{EMTEX}%IThe'ExXenvironmentUUisnotpossible.E219S\newcommand\cbend{\cb@end}$\cbdeleteIThemacro\cbdeleteinsertsa`deletebar'inthemargin.YIttoGohasanoptionalIargumentctodeterminethewidthofthebar._vThedefaultwidth(andlength)ofitIareUUstoredin\deletebarwidth.E220S\newcommand\cbdelete{\@ifnextchar[{\cb@delete} E221 0{\cb@delete[\deletebarwidth]}}12 so\cb@deleteIDeletebarsgareimplementedasaspGecial`changebar'.@Thebarisstartedand IimmediatelyUUended.qItisaslongasitiswide.E222S\def\cb@delete[#1]{\vboxto\z@{\vss\cb@start[#1]\vskip#1\cb@end}}\changebar\endchangebarIThemacros\changebarand\endchangebarhavethesamefunctionas\cbstartIand\cbendbuttheycanbGeusedasaL5ffA͉TU>'ExXenvironmenttoenforcecorrectInesting.qTheyUUcannotH-bGeusedinthetabularxandtabbingenvironments.E223S\newenvironment{changebar}% E224x{\@ifnextchar[{\cb@start}%E225jB{\cb@start[\changebarwidth]}}%E226x{\cb@end}\nochangebarsIT*odisablechangebarsaltogetherwithouthavingtoremovethemfromthedoGc- Iumentthemacro\nochangebarsisprovided.}ItmakesnoGopsfromacoupleofIinternalUUmacros.E227S\newcommand\nochangebars{% E228]ڹ\def\cb@start[##1]{}%E229]ڹ\def\cb@delete[##1]{}%E230]ڹ\let\cb@end\relax}f\changebarwidthIThe8defaultwidthofthechangebarsisstoredinthedimenregister\changebarwidth.E231S\newlength{\changebarwidth}E232S\setlength{\changebarwidth}{2pt}f\deletebarwidthIThe8defaultwidthofthedeletebarsisstoredinthedimenregister\deletebarwidth.E233S\newlength{\deletebarwidth}E234S\setlength{\deletebarwidth}{4pt}\changebarsepIThedefaultseparationbGetweenallbarsandthetextisstoredinthedimenregister I\changebarsep.E235S\newlength{\changebarsep}E236S\setlength{\changebarsep}{30pt}changebargreyIWhen thedoGcumentisprintedusingoneofthePostScriptdriversthebarsdonot IneedV/tobGeblack;VwithPostScriptispGossibletohavegreybars.tVThepGecentageofIgreynessbofthebarisstoredinthecountregister\changebargrey.ItcanhaveIvqaluesUUbGetween0(meaningwhite)and100(meaningblack).E237S\newcounter{changebargrey} E238S\setcounter{changebargrey}{65}6I6.4gMacrosforb`eginningandendingbarsuT$\cb@startIThis=macrostartsachangebar.pItassignsanewvqaluetothecurrentpGointandIadvqancesothecounterforthenextpGointtobGeassigned.ItpushesthisinfoontoI\cb@currentlist)andthensetsthepGointbycalling\cb@setBeginPointwiththeIpGointUUnumber.qFinally*,UUitwritestheaux le.E239S\def\cb@start[#1]{% E240]ڹ\cb@currentpoint=\cb@nextpoint13xsoI\cb@pushUUexpGectsthewidthofthebartobestoredin\@tempdima.E241]ڹ\@tempdima#1\relax E242]ڹ\cb@push\cb@currentlistE243]ڹ\ifvmodeE244f\cb@setBeginPoint\cb@currentpointE245]ڹ\elseE246ap\vboxto\z@{%IWhenweareinhorizontalmoGdewejumpupalinetosetthestartingpGointofthe Ichangebar.E247kJ\vskip-\ht\strutboxE248kJ\cb@setBeginPoint\cb@currentpointE249kJ\vskip\ht\strutbox}\fiE250]ڹ\cb@writeAux\cb@advancePoint} \cb@advancePointIThenmacro\cb@advancePointadvqancesthecountregister\cb@nextpoint.$When ItheUUmaximumnumbGerisreached,thenumbGeringisreset.E251S\def\cb@advancePoint{%E252]ڹ\global\advance\cb@nextpointby2\relaxE253]ڹ\ifnum\cb@nextpoint>\cb@maxpointE254f\global\cb@nextpoint=\cb@minpoint\relaxE255]ڹ\fi}3P\cb@endIThis:macroendsachangebar.RvItpGopsthecurrentpGointandnestinglevelo I\cb@currentlistandsetstheendpGointbycalling\cb@setEndPointwiththeIparameterPcorrespGondingtothebQeginningyhpointnumbGer.p,Itwritesthe.aux leIandUUjoinsthepGoints.E256S\def\cb@end{% E257]ڹ\cb@pop\cb@currentlistE258]ڹ\ifnum\cb@currentpoint=\cb@nilE259f\PackageWarning{Changebar}%E260p2{Badlynestedchangebars;Expecterroneousresults}%E261]ڹ\elseE262f\cb@setEndPoint\cb@currentpointE263f\global\advance\cb@currentpointby1\cb@writeAuxE264]ڹ\fi}t\cb@setBeginPointITheXmacro\cb@setBeginPointassignsapGositiontopointnumbGer#1.{Itdeter- ImineswetherthepGointisonanevenoranoGddpageandusestherightdimensionItopGositionthepoint.sKeepinmindthatthevqalueof\cb@pagecountisonelessIthanUUthevqalueof\c@pageunlessthelatterhasbGeenresetbytheuser.E265S\def\cb@setBeginPoint#1{% E266]ڹ\ifodd\cb@pagecountE267f\cb@defpoint{#1}{\cb@even}%E268]ڹ\elseE269f\cb@defpoint{#1}{\cb@odd}%E270]ڹ\fi}f\cb@setEndPointIThemacro\cb@setEndPointassignsapGositiontopoint#1}[+1.RIttheninstructs IthePgdrivertoconnectpGoints#1and#1/+1Pgwithabar.p"ThemacroassumesthatItheUUwidthofbarisstoredin\@tempdima.E271S\def\cb@setEndPoint#1{%14soE272]ڹ\@tempcnta=#1\advance\@tempcntaby1\relax E273]ڹ\ifodd\cb@pagecountE274f\cb@defpoint{\@tempcnta}{\cb@even}%E275]ڹ\elseE276f\cb@defpoint{\@tempcnta}{\cb@odd}%E277]ڹ\fiE278]ڹ\cb@connect{#1}{\@tempcnta}{\@tempdima}}%b\cb@writeAuxIThemacro\cb@writeAuxwritesinformationabGoutachangebarpointtotheaux- Iiliarye le.["ThenumbGereofthepoint,thepagenumbGerandthewidthofthebarareIwrittenkoutasargumentsto\cb@barpoint. ThislattermacrowillbGeexpandedIwhen$theauxiliary leisreadin./ThemacroassumesthatthewidthofbarisIstoredUUin\@tempdima.XThe16coGdeisonlyexecutedwhenauxiliary lesareenabled,8oasthere'snosenseIinUUtryingtowritetoanunopGened le.E279S\def\cb@writeAux{% E280]ڹ\if@fileswE281f\begingroupE282p2\edef\point{\the\cb@currentpoint}%E283p2\edef\level{\the\@tempdima}%E284p2\let\the=0%E285p2\edef\cb@temp{\write\@auxoutE286yw^{\string\cb@barpoint{\point}{\the\cb@pagecount}{\level}}}%E287p2\cb@tempE288f\endgroupE289]ڹ\fi}6I6.5gMacrosforMakingItWorkAcrossPageBreaksuT$\@makecol y\@vtryfcIMoGdi estheL5ffA͉TU>'ExXmacrostoendthechangebarsspanningthecurrentpage(if Iany)wandrestartthemonthenextpage.DoGesthefollowing:QItresetsspGecialIpGoints,=forthispage.~Addsbeginbarstotopofbox255.~ThebarscarriedoverIfromJthepreviouspage,andhencetobGerestartedonthispage,haveJbGeensavedIin°\cb@beginSaves,andarethenexecuted.@Thenitbuildsthelist\cb@spanlist,Ithencalls\cb@processActivetoproGcesstheelementsonthelist,GthenitexecutesItheUUoriginal\@makecol(savedUUas\cb@makecol).E290S\let\cb@makecol\@makecol E291S\def\@makecol{%E292]ڹ\setbox\@cclv\vbox{%E293f\cb@resetpointsE294f\cb@beginSavesE295f\unvbox\@cclvE296f\boxmaxdepth\maxdepth}%E297]ڹ\gdef\cb@beginSaves{}E298]ڹ\global\advance\cb@pagecountby1\relaxE299]ڹ\cb@buildActive\cb@processActiveE300]ڹ\cb@makecol}IWhen*L5ffA͉TU>'ExXmakesapagewithonly oatsitdoGesn'tuse\@makecol;linsteadit IcallsUU\@vtryfc,sowehavetomoGdifythismacroaswell.E301S\let\cb@vtryfc\@vtryfcE302S\def\@vtryfc{%15ߠsoE303]ڹ\setbox\@outputbox\vbox{% E304f\cb@resetpointsE305f\cb@beginSavesE306f\unvbox\@cclvE307f\boxmaxdepth\maxdepth}%E308]ڹ\gdef\cb@beginSaves{}E309]ڹ\global\advance\cb@pagecountby1\relaxE310]ڹ\cb@buildActive\cb@processActiveE311]ڹ\cb@vtryfc}t\cb@processActiveIProGcesseseachelementonspanlist.Eachelementrepresentsabarthatcrosses ItheNpagebreak.>pTherecouldbGemorethanoneifbarsarenested.W*orksasfolows:jpoptopelementofspanlistjifpointnull(i.e.,listempty)thendonejelse|rdoanendbaronbox255|rsavestartfornewbarattopofnextpagein\cb@startSaves|rpushactivepointbackontohistorylist(needtoreprocessonnextpage).E312S\def\cb@processActive{%E313]ڹ\cb@pop\cb@spanlistE314]ڹ\ifnum\cb@currentpoint=\cb@nilE315]ڹ\elseE316f\setbox\@cclv\vbox{%E317p2\unvbox\@cclvE318p2\boxmaxdepth\maxdepthE319p2\advance\cb@pagecountby-1\relaxE320p2\cb@setEndPoint\cb@currentpoint}%E321f\cb@saveBeginPoint\cb@currentpointE322f\cb@push\cb@historyE323f\cb@processActiveE324]ڹ\fi}9\cb@saveBeginPointISavesa\specialtobGeginapointinexpandedmacro\cb@beginSaves.NThisis IthenyAusedtostartallspanningbarsatthetopofthenextpage.݋ItisalmosttheIsameUUas\cb@setBeginPoint.쨍E325S\def\cb@saveBeginPoint#1{% E326]ڹ\ifodd\cb@pagecountE327f\xdef\cb@beginSaves{\cb@defpoint{#1}{\cb@even}\cb@beginSaves}%E328]ڹ\elseE329f\xdef\cb@beginSaves{\cb@defpoint{#1}{\cb@odd}\cb@beginSaves}%E330]ڹ\fi}E331S\def\cb@beginSaves{}K`%initiallyemptyf\cb@buildActiveIInitializesUUthespanlisttonull.E332S\def\cb@buildActive{\cb@initlist\cb@spanlist\cb@pushNextActive}9\cb@pushNextActiveIPopstopofhistorylist.vIfpGointisonfuturepage,,pushbackontohistorylist. IIffpGointoncurrentorpreviouspageandoGdd,j\cb@pagecountE338p2\cb@push\cb@historyE339f\elseE340p2\ifodd\cb@currentpointE341yw^\cb@push\cb@spanlistE342p2\elseE343yw^\cb@pop\cb@spanlistE344p2\fiE345p2\cb@pushNextActiveE346f\fiE347]ڹ\fi}6I6.6gMacrosForManagingTheListsofBarp`ointsuTIThe4macrosmakeuseofthreelistscorrespGondingto\specialdefpoints.cEach IlistUUtakestheform?... XEachM"elementisoftheformxxxnyyypzzzlwherexxxisthenumbGeroftheIspGecial-7point,5=yyyisthepageonwhichthispGointisset,5=andzzzisthedimensionIusedUUwhenconnectingthispGoint.XThelist\cb@historyisbuiltfromtheloginformationandinitiallylistsallItheUUpGoints.qAspagesareprocessed,pointsarepoppedo thelistanddiscarded.XThelist\cb@spanlistisatempGorarylistusedbytheoutputroutineandIcontainsqthelistofallbarscrossingthecurrentpage(theremaybGemorethanoneIwithUUnestedbars).qItisbuiltbypGoppingelementso thehistorylist.XTheFlist\cb@currentlistcontainsallthecurrentbars.lAF\cb@startpushesIanelementontothislist."A\cb@endpGopsthetopelemento thelistandusesItheUUinfototerminatethebar.XF*orpGerformanceandmemoryreasons,jthehistorylist,whichcanbGeveryIlong,%/isspGecialcasedanda leisusedtostorethislistratherthananinternalImacro.BTheȣ\external"interfacetothislistisidenticaltowhatisdescribGedabove.IHowever,whenfLthehistorylistispGopped,afLlinefromthe leis rstreadandIappGendedUUtothemacro\cb@history.b\cb@initlistIAUUmacroto(globally)initializealist.E348S\def\cb@initlist#1{\xdef#1{}} L\cb@history $\cb@write y\cb@readIW*eUUneedtoinitialisealisttostoretheentriesreadfromtheexternalhistory le.E349S\cb@initlist\cb@historyIW*eUUalsoneedtoalloGcateareadandawritestreamforthehistory le.E350S\newwrite\cb@write E351S\newread\cb@readIAndUUweopGenthehistroy leforwriting.E352S\immediate\openout\cb@write=\jobname.cb\relaxb\cb@spanlistIAlloGcateUUalistforthebarsthatspanthecurrentpage.E353S\cb@initlist\cb@spanlist17Ŵsof\cb@currentlistIAnd+3wealloGcateanextralistthatisneededtoimplementnestingwithouthaving ItoUUrelyonTU>'ExX'sgroupingmechanism. >E354S\cb@initlist\cb@currentlistp3P\cb@popIThis\opGopsthetopelemento thenamedlistandputsthepointvqalueintoI\cb@currentpoint,_thepagevqalueinto\cb@pageandthebarwidthintoI\@tempdima.If8thelistisempty*,qreturnsavoidvqalue(\cb@nil)in\cb@currentpointIandUUsets\cb@page=0.|E355S\def\cb@pop#1{% E356]ڹ\ifx#1\cb@historyE357f\ifeof\cb@readE358f\elseE359p2{\endlinechar=-1\read\cb@readto\@tempE360tȹ\xdef\cb@history{\cb@history\@temp}%E361p2}%E362f\fiE363]ڹ\fiE364]ڹ\ifx#1\@emptyE365f\cb@currentpoint=\cb@nil\cb@page=0\relaxE366]ڹ\elseE367f\expandafter\cb@carcdr#1e#1%E368]ڹ\fi}\cb@carcdrIUsedUUto`decoGde'alistentry*. >E369S\def\cb@carcdr#1n#2p#3l#4e#5{%E370]ڹ\cb@currentpoint=#1\cb@page=#2\relax\@tempdima=#3\xdef#5{#4}}y\cb@pushIPushes\cb@currentpoint,b\cb@pageand\@tempdimaontothetopofthenamed Ilist.|E371S\def\cb@push#1{%E372]ڹ\xdef#1{\the\cb@currentpointn\the\cb@pagep\the\@tempdimal#1}}b\cb@barpointIF*orpGopulatingthehistory le.EWritesonelineto.cb lewhichisequivqalentto IoneUUhelementظi0describGedUUabove. >E373S\def\cb@barpoint#1#2#3{\immediate\write\cb@write{#1n#2p#3l}}I6.7gMacrosForCheckingThatThe.auxFileIsStableuT \AtBeginDocumentIWhilereadingthe.aux- leL5ffA͉TU>'ExXhascreatedthehistorylistinaseparate le.IW*eneedtoclosethat leandopGenitforreading.GAlsothe`initialistion'oftheI\specialkcommandshastotakeplace.?WhilewearemoGdifyingthemacrowealsoIincludeUUthecomputationofthepGossiblepositionsofthechangebarsXF*orUUtheseactionsweneedtoaddtotheL5ffA͉TU>'ExXbGegin-documentUUhook.E374S\AtBeginDocument{% E375]ڹ\cb@setup@specialsE376]ڹ\cb@positionsE377]ڹ\immediate\closeout\cb@writeE378]ڹ\immediate\openin\cb@read=\jobname.cb}p 6\AtEndDocumentIDoGesa\clearpageto ushrestofdocument.u(NotethatIbelievethereiscon- Itentioninthisarea:U arethereinfactsituationsinwhichtheend-doGcumenthoGoksIneedJtobGecalledb}'eforetheJ nal\clearpage?|thedocumentationofLaT*eX18яsoIitselfTimpliesthatthereare.)pVThencloses.cb leandreopGensitforchecking. IInits Nhistorylist(tobGereadfrom le).Lets\cb@barpoint=\cb@checkhistoryIforUUchecking.E379S\AtEndDocument{% E380]ڹ\clearpageE381]ڹ\cb@initlist\cb@historyE382]ڹ\immediate\closein\cb@readE383]ڹ\immediate\openin\cb@read=\jobname.cb%E384]ڹ\let\cb@barpoint=\cb@checkHistory} \cb@checkHistoryIPops\rthetopofthehistorylist(\jobname.cb)andcheckstoseeifthepGointand IpagenumbGersarethesameasthearguments#1and#2respGectively*.6PrintsaIwarningUUmessageifdi erent.E385S\def\cb@checkHistory#1#2#3{% E386]ڹ\cb@pop\cb@historyE387]ڹ\ifnum#1=\cb@currentpoint\relaxE388f\ifnum#2=\cb@page\relaxIBothUUpageandpGointnumbGersareequal;donothing,E389f\elseIbutUUgenerateawarningwhenpagenumbGersdon'tmach,orE390p2\cb@error E391f\fiE392]ڹ\elseIwhenUUpGointnumbGersdon'tmach.E393f\cb@errorE394]ڹ\fi}$\cb@errorIWhenamismatchbGetweenthechangebarinformationintheauxiliary leandthe IhistoryUUlistisdetectedawarningisissued;furthercheckingisdisabled.E395S\def\cb@error{%E396]ڹ\PackageWarning{Changebar}%E397f{Changebarinfohaschanged.\MessageBreakE398kJReruntogetthebarsright}E399]ڹ\gdef\cb@checkHistory##1##2##3{}%E400]ڹ\let\cb@barpoint=\cb@checkHistory}6I6.8gMacrosForMakingItWorkWithNestedFloats/Fo`otnotesuT\end@floatIThisoisareplacementfortheL5ffA͉TU>'ExX-macroofthesamename.+%AllitdoGesischeckto Isee]zifchangebarsareactiveand, ifso,itputschangebarsaroundthebGoxcontainingItheUU oat.qThenitcallstheoriginalL5ffA͉TU>'ExX\end@float.E401S\let\cb@endfloat=\end@floatE402S\def\end@float{% E403]ڹ\cb@pop\cb@currentlistE404]ڹ\ifnum\cb@currentpoint=\cb@nilE405]ڹ\elseE406f\cb@push\cb@currentlistE407f\global\@tempdima=\@tempdimaE408f\egroup19ݽsoE409f\global\setbox\@currbox=% E410yw^\vbox\bgroup\cb@start[\@tempdima]\unvbox\@currbox\cb@endE411]ڹ\fiE412]ڹ\cb@endfloat}IThis'onlyworksifthisnewversionof\end@floatisreallyused.bWithL5ffA͉TU>'ExX2.09 ItheUUdoGcumentstylesusedtocontain:[X\let\endfigure\end@floatIInExthatcasethisbindinghastobGerepeatedaftertherede nitionof\end@float.IHowever,qthe9 L5ffA͉TU>'ExX2"-²class9 lesuse\newenvironmenttode nethe gureandItableUUenvironments.qInthatcasethereisnoneedtorebind\endfigure. 6\@footnotetextIReplacementfortheL5ffA͉TU>'ExXmacroofthesamename.SimplycheckstoseeifIchangebarsareactiveandifsowrapsthemacroargument(i.e.,thefoGotnote)inIchangebars.E413S\let\cb@footnote=\@footnotetextE414S\long\def\@footnotetext#1{% E415]ڹ\cb@pop\cb@currentlistE416]ڹ\ifnum\cb@currentpoint=\cb@nilE417f\cb@footnote{#1}%E418]ڹ\elseE419f\cb@push\cb@currentlistE420f\edef\cb@temp{\the\@tempdima}%E421f\cb@footnote{\cb@start[\cb@temp]#1\cb@end}%E422]ڹ\fi} \@mpfootnotetextIReplacement8fortheL5ffA͉TU>'ExXmacroofthesamename.Samethingas\@footnotetext.E423S\let\cb@mpfootnote=\@mpfootnotetextE424S\long\def\@mpfootnotetext#1{% E425]ڹ\cb@pop\cb@currentlistE426]ڹ\ifnum\cb@currentpoint=\cb@nilE427f\cb@mpfootnote{#1}%E428]ڹ\elseE429f\cb@push\cb@currentlistE430f\edef\cb@temp{\the\@tempdima}%E431f\cb@mpfootnote{\cb@start[\cb@temp]#1\cb@end}%E432]ڹ\fi}E433Sh=pack9age#g i!čIIndexINumbGersinitalics5indicatethepagewherethemacroisdescribed, "theunderlinedInumbGersindicatethenumberofthelineofcodewherethemacroisde ned,allIotherUUnumbGersindicatewhereamacroisused.:!ߍmmJSymCbKols I\@SpecialMainIndexT}.g}.΍}.}.}.}.}.}.}.}. (21,T23I\@auxout}.΍}.}.}.}.}.}.}.}.285ߍª\@bsphackl}.΍}.}. 12,T15,18 `ª@cb@tracel}.΍}.}.}.}.}.}.}.}. 7 feª\@cb@tracefalsez}.΍}.}.116ª\@cb@tracetrueB}.΍}.}.}.115ߍ253,T258,314,ZUX335,337,387,ZUX388,'%404,416,426}.΍}.}.}.}.}.}.}.}.}.}.}.}.}. 80I\PackageError- }.΍}.}.}.}.117I\PackageWarningz}.΍}.}.g}. 5t197,T207,259,396I\pointP}.΍}.}.}.}.}.}. 282,T286I\PrintDescribeEnvyꍑ}. 13I\ProcessOptionsz}.΍}.}.123I\ProvidesFile- }.΍}.}.}.}.}. 3I\ProvidesPackage}.΍}.}. 5I\pstyleƈ}.΍}.}.}.}.}.}.}.}.}. 29|RI\raggedleft}.΍}.}.}.}.}.}. 13I\read }.΍}.}.}.}.}.}.}.}.}.}.}.359I\relaxP}.΍}. 881{88,T123,g132,176,195,g205,214,216,g230,241,252,g254,272,298,બ309,319,352, બ365,'%370,387,388 !S Y ª\setbox&292,303,316,409ª\setcounter}.΍}.}.}.}.}.}.238ª\setlength |232,T234,236ª\smallP}.΍}.}.}.}.}.}.}.}.}.}. 28ª\spaceP}.΍}.}.}. 157,T160,બ164{166, 8170{બ173,G2180{183,બ187{189,3191,192ª\special}.΍}. 154,T157,બ160,163,169,બ179,'%186,200,203ª\SpecialMainIndexyꍑ}.બ}.΍}.}.}.}.}.}.}.}.$D21{23ª\SpecialVarMainIndexબ}.΍}.}.}.}.}.}.}.}. (15,T22ª\SpecialVarUsageIndexબ}.΍}.}.}.}.}.}.}.}. (14,T18ª\stringƈ}.΍}.}.}.}.}.}.}.}.}.286ª\strutboxl}.΍}.}.}. 247,T249 !Tª\t3>}.΍}.}.}.}.}.}.}.}.}.}.}.}.}. 80ª\tempaP}.΍}.}.}. f126,T133{136ª\textsfƈ}.΍}.}.}.}.}.}.}. T25,T26ª\textslƈ}.΍}.}.}.}.}.}.}. T28,T29ª\textttƈ}.΍}.}.}.}. 16,T19,27ª\textwidth@0}.΍}.}.}.}.}.}.952,T66,72,106,111 cmmi10K`y cmr10ٓRcmr7O