; TeX output 1997.03.10:1150soDtGGcmr17The7tGGcmss17count1topacqkage!", cmsy10eXQ cmr12MartinScrhr oderUK`y cmr10CrGusemannalleeUU3QD-28213UUBremengMS@Dream.HB.North.DEUU(INTERNET)DȌ 1997/03/09.!Kt : cmbx9Abstractэoo cmr9Thispac9k|ragesetsߤN cmtt9\count1to\count8withthevaluesofR-pageto bsubparagraph.g\count9isusedto agoAddpages.Thev|raluesofthesebcoun9tersbaredisplayedandwrittenintheow cmss9.dvi lebyTuAEXandcanlaterbAebused+toselectthepagesofcertainpartsofthedoAcumen9tforprintingifthebdeviceTdriv9ersuppAortsthis.!čI!Nff cmbx12ContentsAI""V cmbx101XIn9troQductionXX1I2XOptionspa|2I3XRequiredTpac9k\rages:24TheTimplemen9tation1z35Ac9knowledgements8CU4I1aLIntros3ductionIMostC*ofthetimeuserswantC*toprintonlycertainpartsofadoGcument;butthesecan IonlybGeselectedbyusingthepagenumbGersofthesepartswithmostdevicedrivers.IThiscanbGedif cultorimpossibleifpagesindifferentpartsofthedocumenthaveItheUUsamenumbGer|e.g.qinUUthefrontmatterandthe rsttextpages(iiivs.3).XTU>'ExXY(providesaneasysolutiontothisproblem:ymwheneverapageiscompletedIby&theoutputroutineandshippGedoutvia#'ExXdisplaysthesetencountsonyourterminalbwheneverܖouputtingapage,fandittransmitsthemtotheoutput lebasanidenti cationofthatpage.[KThecountsareseparatedbydecimalbpGointsPonyourterminal,Qwithtrailing`.0'patternssuppressed.pQThus,bforRexample,?Qifo\count0=5and\count2=7whenapageisshippGedboutFtothedvi le,andiftheothercountersarezero,TU>'ExXwilltypGeIffr @ -:q% cmsy6L|{Ycmr8TheXvÎersionumb'ExXuses\count0forthepagenumbGer,.and$itkeeps b\count1through\count9equaltozero;Tkthatiswhyyousee`[1]'bwhenpage1isbGeingoutput._InmorecomplexapplicationsthepagebnumbGersQcanhaveQfurtherstructure;tencountsareshippedoutsothatbthereUUwillbGeplentyUUofidenti cation."[1,p.q119]ISurprinsingly*,Luntil'ExXthatusedtheseI\countersGalthoughsomedriversallowtheselectionofpagesbasedonotherI\countsUUthen\count0(e.g.qemTU>'ExX).XThis%packqageisthesolution:HItusesthe&m#R cmss10everyshipackqagetoset\count1toI\count9UUbGeforeeach\shipoutwiththesevqalues:RR}r L͉fffdͤ ff͟fd\count ff1vqalueŸ ffff衍ͤ ff ğfd0 ff1relativeUUpagenumbGer(setbyL5ffA͉TU>'ExX)A_ ff ͤ ff ğfd1 ff1absoluteUUpagenumbGerb ffͤ ff ğfd2 ff1numbGerUUofcurrent\partrww ffͤ ff ğfd3 ff1numbGerUUofcurrent\chapter(0witharticleclass)͟ ffͤ ff ğfd4 ff1numbGerUUofcurrent\sectionb ffͤ ff ğfd5 ff1numbGerUUofcurrent\subsectionR ffͤ ff ğfd6 ff1numbGerUUofcurrent\subsubsectionC7 ffͤ ff ğfd7 ff1numbGerUUofcurrent\paragraphX7 ffͤ ff ğfd8 ff1numbGerUUofcurrent\subparagraphHw ffͤ ff ğfd9 ff11UUonoGddpages,0onevenpages^1RZ ffff莎R `Icount1toalsoworkswithclassesthatdonotde nesomeorallofthesectioningIcommands+gandtheircounters,`like+gletter.AlthoughitisofsomewhatlittleuseIthenUU:-).XAnoteforusersofthispackqage:WhenyouselectthepagesofsomepartofIyour)doGcumentwithalowerstructurethan\chapter,fremembGerthatonly\partsIandv\chaptersstartonanewpage;ifyouwanttoprintacomplete\section,youIshouldValsoselectthe rstpageofthenext\section.=AlsonotethatTU>'ExXshipsIoutthevqaluesofthecountersinsteadoftheirvisualrepresentation(proGducedwithI\thec}'ounter),UUsoappGendixAsets\count4to1inthearticleclass.XAUnoteUYfordevelopGersofdevicedrivers:qPleaseaddsuppGortfor\count1toI9Vtoyourprograms.uItwouldalsobGeniceifuserscouldeasilyselectthenextIpage(s)aafteracertaincount(somethinglike\*.*.*.*.2+1.*"shouldbGepossibleIforselectingallpageswith\count4 !", cmsy107!section=2plusthe rstpageofsectionI3).!čI2aLOptionsITheUUpackqagehasnooptions.I3aLRequiredffpackagesITheUUpackqagerequirestheeveryshipackqage.IX-ffr J= "5-:Aacmr61LIfXyÎouhaveab'ExXhasthe\feature"thatonlythe rstlevelofcounters IassoGciated^withacounterviatheoptionalargumentof{\newcounterisresetwhenIthe?4counterissteppGed;Fsowhenyoustartanewchapter,CthenumbGerforthesub-Isection"isnotreset."/Thisisnormallynoproblem,butwiththispackqage,itis:bIfIthis Mbugisnot xedorworked-around,*then Mwheneveryouuse\subparagraphorIsome;otherlower;sectioningcommand,@andafterthatasectioningcommandthatIisSatleasttwoSlevelshigher(e.g.\subsubsection),RthevqalueofpsubparagraphIwouldnotbGeresetandwouldstillbGedisplayedandshippGedout.SowehavetoIassoGciate%mall-lower-levelsectioningcommandswiththehigherlevels.aThisisdoneIvia7\@addtoresetat\beginfdocumentg.g\@countItoIX@bugfixisunde nedaf-IterUUusetosaveUUsomespace. ׍I20S\newcommand*{\@countItoIX@bugfix}{ I21ap\if@have@partI22p2\@addtoreset{section}Y{part}I23p2\@addtoreset{subsection},{part}I24p2\@addtoreset{subsubsection}{part}I25p2\@addtoreset{paragraph}X{part}I26p2\@addtoreset{subparagraph}{part}I27ap\fiI28ap\if@have@chapterI29p2\@addtoreset{subsection},{chapter}I30p2\@addtoreset{subsubsection}{chapter}I31p2\@addtoreset{paragraph}X{chapter}I32p2\@addtoreset{subparagraph}{chapter}I33ap\fisI5 ACKNOWLEDGEMENTS 4oI34ap\if@have@section I35p2\@addtoreset{subsubsection}{section}I36p2\@addtoreset{paragraph}X{section}I37p2\@addtoreset{subparagraph}{section}I38ap\fiI39ap\if@have@subsectionI40p2\@addtoreset{paragraph}X{subsection}I41p2\@addtoreset{subparagraph}{subsection}I42ap\fiI43ap\if@have@subsubsectionI44p2\@addtoreset{subparagraph}{subsubsection}I45ap\fiI46ap}I47S\AtBeginDocument{\@countItoIX@bugfix\let\@countItoIX@bugfix\undefined}Ʋ\@countItoIX@shipoutI\@countItoIX@shipoutҲisusedforsetting_\count1to\count9ateach\shipout.I48S\newcommand*{\@countItoIX@shipout}{I\count1UUistheabsolutepagenumbGer,UUwhichwehavetomaintainbyourselves.I49ap\global\advance\count1by1I\count2cٲto\count8aresetwiththevqaluesof*\partto\subparagraph,gzifthese IcommandsUUarede ned.^2I50ap\if@have@partB&4\count2\value{part}3r\fi I51ap\if@have@chapter3r\count3\value{chapter}%̰\fiI52ap\if@have@section3r\count4\value{section}%̰\fiI53ap\if@have@subsection%̰\count5\value{subsection}\fiI54ap\if@have@subsubsection\count6\value{subsubsection} s,\fiI55ap\if@have@paragraph*F\count7\value{paragraph}Y\fiI56ap\if@have@subparagraphY\count8\value{subparagraph},\fiI\count9UUissetto1onoGddpagesandto0onevenpages.I57ap\ifodd\count1\count9=1\else\count9=0K`\fiI58ap}I59S\EveryShipout{\@countItoIX@shipout}I60Sh)5" cmmi9=pack9age#g i!čI5aLAcknowledgementsIAs?qusualRebGeccaStielsimproved?qthequalityofthisdocumentation. 0Ifyou IneedXatranslatorfromEnglishorF*ran9caistoGerman,,sendherane-mailtoIRebecca@Andurg.HB.North.DE.IReferencesI[1]X;DonaldIE.Knuth.G"ThetTKß'E-XBo}'ok,volumeIAIrofComputersandT;yp}'esetting.X;Addison-W*esley,UU1986.nEleventhprinting,revised,May1991.I/7ffr J= "5-:2LWJeGshouldprobablyalsocÎheckGthevalueof1secnumdepth,KbutI5don'tthinkthisisnecessary.(sIIndexE45oIIndexINumbGers`writteninitalic:refertothepagewherethecorrespondingentryisde- IscribGed,8the[onesunderlinedfe.#6tothede nition,theresttotheplaceswheretheIentryUUisused.<ǍSymCbKols I\@addtoresetYҍ}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.g}.΍}. 22{26,T29{32,35{37,40,41,44I\@countItoIX@bugfix}.΍}.}.}.}.}.}.}.}.}.}. fJ20 fJfe ?I\@countItoIX@ifs}.΍}.}.}.}.}.}.}.}.}.}.}.}. fJ10 fJfe ?I\@countItoIX@shipoutfč}.΍}.}.}.}.}.}.}.}.}. fJ48 fJfe ?I\@have@chaptertrueT}.΍}.}.}.}.}.}.}.}.}.}.}. fJ12I\@have@paragraphtruefč}.΍}.}.}.}.}.}.}.}.}. fJ16I\@have@parttruez}.΍}.}.}.}.}.}.}.}.}.}.}.}.}. fJ11I\@have@sectiontrueT}.΍}.}.}.}.}.}.}.}.}.}.}. fJ13I\@have@subparagraphtruel}.΍}.}.}.}.}.}. fJ17I\@have@subsectiontrue9}.΍}.}.}.}.}.}.}.}. fJ14I\@have@subsubsectiontrue&֍}.΍}.}.}.}.}.}. fJ15I\@ifundefined- }.΍}.}.}.}.}.}.}.}.}.}.}.}.}. 11{17;dAI\advance}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. fJ49I\AtBeginDocument}.΍}.}.}.}.}.}.}.}.}.}. 19,T47g{CI\countP}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 49{57pEI\else }.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. fJ57I\EveryShipout- }.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. fJ59MFI\fiv}.΍}.}.}.}.}.}.}. 27,T33,38,42,45,50{57QG \globalƈ}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. fJ49.SI\if@have@chapter}.΍}.}.}.}.}.}.}.}. kT4,T28,51\if@have@paragraphT}.΍}.}.}.}.}.}.}.}.}.}.8,T55\if@have@part- }.΍}.}.}.}.}.}.}.}.}.}.}. kT3,T21,50\if@have@section}.΍}.}.}.}.}.}.}.}. kT5,T34,52\if@have@subparagraph9}.΍}.}.}.}.}.}.}.9,T56\if@have@subsection}.΍}.}.}.}.}.}. kT6,T39,53\if@have@subsubsection 4}.΍}.}.}. kT7,T43,54\ifoddP}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. fJ57R+L\letL}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 19,T47Q N\newcommand}.΍}.}.}.}.}.}.}.}.}.}.}.}. X$10,T20,48\newifP}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.L3{9Q€R\RequirePackagez}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}. yz2QAU\undefined@0}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 19,T47QdV\valueP}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 50{563[; * cmsy9)5" cmmi9(p0J cmsl10'Cscmtt8&m#R cmss10%U cmssi10$': cmti10#