; TeX output 1996.10.04:1451soKDtGGcmr17The7t߆TG cmtt12showlabelspacqkage!", cmsy10 XQ cmr12NormanGrary1߆T cmtt12norman@astro.gla.ac.uk&37 1996/05/12%XK`y cmr10ThisUUistheshowlabGelsclassoption. XThisclassoptionintroGducesnonewcommands,*itjusthelpsyoukeeptrackIofallthelabGelsbyputtingthenameofthenewlabelintothemarginwheneverIeitherthe'ExXusestoproGduceequationnumbGers.NvIdon'thabi-ItuallyPuseAMS-L5ffA͉TU>'ExX,OsoI3won'tdiscoveranybugsorweaknesseswithitssup-IpGort8here,pandI'dconsequentlybegladtobeinformedofanythatappear.poTheI\usepackage{showlabels}UUmustappGear': cmti10afterhanyAMSstu isloaded.XF*or!reasonablyobviousreasons, _thispackqagewillnotworkatallwellwiththeIp0J cmsl10multicolVpackqage,'andCforpGossiblylessobviousreasons,itwon'tworkwiththeIleqnoQBoptioneither(atsomepGointitshouldbemodi edtoatleastrecogniseandIwarnUUofthecon ictineithercase).!čI!Nff cmbx121aLTheffdriver leINothingUUfancy*.Ls1S% cmsy9h&ow cmss9driveroi Ls2S"ߤN cmtt9\documentclass{ltxdoc}Ls3S\EnableCrossrefsISomecommonlyusedabbreviationsforoptionnames, lenames,countersand Ipackqages.Ls4S\newcommand\Lopt[1]{\textsf{#1}}Ls5S\newcommand\file[1]{\texttt{#1}}Ls6S\newcommand\Lcount[1]{\textsl{\small#1}}Ls7S\newcommand\pstyle[1]{\textsl{#1}}Ls8S\date{\docdate}I&effr @ -:q% cmsy6L|{Ycmr8ThisP lehasvÎersionnumb}I20S\wlog{Documentation}XBeforeUUwedoanythingelse, ndoutifwe'reusingAMS-L5ffA͉TU>'ExX...I21S\newif\ifSL@noAMSI22S\expandafter\ifx\csnamemaketag@@@\endcsname\relaxI23]\SL@noAMStrueI24S\elseI25]\SL@noAMSfalseI26]\typeout{withAMS-LaTeXequationtags}I27S\fiy\@eqnnumIThis3replacementfor\@eqnnumwillproGduceanote,stickingintothemarginbGeside ItheequationnumbGer,showingtheequation'slabel.6\SL@labeln@meisinitialisedIto \relax,rede nedwithinthe\labelmacro,andresetto\relaxhere.Ifit'sIalreadyƉequalto\relaxhere,theequationnumbGerƉhasn'tbeenlabelled,andsoI`???'>:isputinthemargin.Don'tdothisfortheAMS-L5ffA͉TU>'ExXcaseasitartfullyIincorpGoratesUUthe\maketag@@@mechanismintoarede ned\@eqnnum.I28S\ifSL@noAMS I29]\let\@@eqnnum=\@eqnnumI30]\def\@eqnnum{\@@eqnnumI31]\ifx\SL@labeln@me\relaxI32f\SL@eqnlrtext{???}%I33]\elseI34f\SL@eqnlrtext{\SL@labeln@me}%I35f\global\def\SL@labeln@me{\relax}%I36]\fi}IAndinitialisethevqalueof\labeln@meto\relax,ُsothat\@eqnnumstartso IbGehavingUUtherightway*.I37]\global\def\SL@labeln@me{\relax}XOtherwiseedoasimilarthingforAMS-L5ffA͉TU>'ExX's\maketag@@@,iwhichiswhatitIusestoformtagsinequations.hAllwehavetodoishoGokintothe\maketag@@@Imacro,UUanduse\df@label,whichispre-de nedwiththecurrentlabGelname.I38S\else I39]\let\@maketag@@@=\maketag@@@I40]\def\maketag@@@#1{\@maketag@@@{#1}%2 soI41]\ifx\df@label\@empty I42S%X\SL@eqnlrtext{???}%I43]\elseI44f\SL@eqnlrtext{\df@label}%I45]\fi}I46S\fiXF*or|thebGene tof\prlabelname,de ne\SL@gobblethreetodonothingother IthanUUeatthreetokens.I47S\def\SL@gobblethree#1#2#3{}b\prlabelnameIExpansionislabGelnamewithallcatcodes`other'(AppendixDatrickeryabounds!).IUseUU\r@#1,ratherthenjust\#1toavoidUUde ninganynewcontrolsequences.I48S\def\prlabelname#1{% I49S\expandafter\expandafter\expandafter\SL@gobblethreeI50f\expandafter\string\csnamer@#1\endcsname}\@makecaptionISimplereplacementforthe\@makecaptioncommand.ؓThissimplyissuesthe Ioriginal\@makecaptioncommandafterrede ning\label.]ThisdoGesnotputtheIlabGel nameinthemargin(that'stoocomplicatedforthemoment),9)butinsteadIinsertsUUitaspartofthecaption.I51S\let\@@makecaption\@makecaption I52S\long\def\@makecaption#1#2{{\def\label##1{{\small\ttI53S\{\prlabelname{##1}\}\space}\SL@label{##1}}%I...andUUfollowsitwiththeoriginal,saved,\@makecaption.I54S\@@makecaption{#1}{#2}}}"\labelIThis9isthecentralbitofthispackqage.rDepGendingonthemode,putthecurrent IlabGell:nameinthemargininoneofavqarietyofways.vFirstofall,qissuethesavedI\SL@labelUUcommand.I55S\let\SL@label\label I56S\def\label#1{\@bsphack\SL@label{#1}%IInkmathsmoGde,3producekalabGelnamealongsidetheequationnumber.CyIfkwe'renotIusingӟAMS-L5ffA͉TU>'ExX,1thensaveӟthelabGelnamein\SL@labelname.Ifwear}'eusingIAMS-L5ffA͉TU>'ExX,3then*wedon'thavetoworry*,3bGecauseit'ssavedin\df@labelforus.I57]\ifmmode I58f\ifSL@noAMSI59p2\xdef\SL@labeln@me{\prlabelname{#1}}%I60f\fiIOtherwise,0createkabGoxwithzeroheightanddepth,0andthesamewidthasthe Ipage.cPutallthisinbraces,)tocontainthesettingof\box0(whichprobablyIshouldn'tUUbGenecessary).I61]\else I62f{\setbox0=\vboxto0pt{\vssI63p2\hboxto\columnwidth{\SL@lrtext{#1}}}%I64f\dp0=0ptIandattachitbGelowthelastone,using\nointerlineskipifwe'reinvertical ImoGde,UUor\vadjustotherwise.I65f\ifvmodeI66p2\nointerlineskip\box0\nobreak3soI67f\else I68p2\vadjust{\box0\nobreak}%I69f\fi}%IThat'sUUit.qFinisho the\ifmmodeandgivethepartnerto\@bsphack. I70]\fiI71]\@esphack}鍍 L\margintextISetUUtheactualtextofthelabGel.I72S\def\SL@margintext#1{{\small\sl\{#1\}}}XButuzwhereisthemarginaltextactuallyset?7ItcanbGeintheleftmargin,}the Irightone,orcanalternate.u\SL@lrtext,usedinthe\vboxabGove,isset,underIthe\controlof\if@outerlabelsbGelow,]tooneof\SL@lefttext,\SL@righttextIorUU\SL@alternatetext.F\SL@righttextb\SL@lefttextI73S\def\SL@righttext#1{\hfill\rlap{\quad\SL@margintext{#1}}} I74S\def\SL@lefttext#1{\llap{\SL@margintext{#1}\quad}\hfill}FIThecoGdefor\SK@alternatetextdoesn'tworkperfectly*,asitsometimesmanagesItow0getthingsonthewrongsideofthetextnearthetopofanewpage.XThisisaIvenialUUslip,however,asthispackqageshouldneverbGeusedina nalversion.t\SL@alternatetext I75S\def\SL@alternatetext{% I76]\if@outerlabelsI77f\ifodd\c@pageI78p2\let\SL@next\SL@righttext\elseI79p2\let\SL@next\SL@lefttext\fiI80]\elseI81f\ifodd\c@pageI82p2\let\SL@next\SL@lefttext\elseI83p2\let\SL@next\SL@righttext\fiI84]\fiI85]\SL@next}IThe)casewherethetwoGcolumn)optionissetisslightlydi erent.cTherewehaveto Iswitch65bGetweenplacingthenoteintheleftandrightmargins,ThiscodeASSUMESthatequationnumbersIaregoingtobGeontherighthandsideofthepage.xItshouldprobablycheckforItheUUexistenceoftheleqnooption(how?). \SL@eqnrighttextf\SL@eqnlefttextI93S\def\SL@eqnrighttext#1{\rlap{\quad\SL@margintext{#1}}} I94S\def\SL@eqnlefttext#1{\hboxto0pt{\kern-\columnwidthI95S\llap{\SL@margintext{#1}\quad}\hss}}INow1dotheanaloguesfortheequationnumbGers,8inthecaseofthealternatepage Iselection...Ʋ\SL@eqnalternatetextI96S\def\SL@eqnalternatetext{%I97]\if@outerlabelsI98f\ifodd\c@pageI99p2\let\SL@next\SL@eqnrighttext\elseE100p2\let\SL@next\SL@eqnlefttext\fiE101]\elseE102f\ifodd\c@pageE103p2\let\SL@next\SL@eqnlefttext\elseE104p2\let\SL@next\SL@eqnrighttext\fiE105]\fiE106]\SL@next}I...andUUthetwoGcolumnUUoptiont\SL@eqntwocoltextE107S\def\SL@eqntwocoltext{%E108]\if@firstcolumnE109f\let\SL@next\SL@eqnlefttextE110]\elseE111f\let\SL@next\SL@eqnrighttextE112]\fiE113]\SL@next}XT*okeeptrackofthings,declarethe\if@outerlabelsswitch,andsetittrue IbyUUdefault.E114S\newif\if@outerlabelsE115S\@outerlabelstrueXW*e selectbGetween thevqariouspossibilitiesusingtheouter1andinneroptionsIand,UUimplicitly*,thetwosideUUoption.E116S\DeclareOption{outer}{\@outerlabelstrue}E117S\DeclareOption{inner}{\@outerlabelsfalse}XProGcessUUanyoptionsthathavebGeenset.E118S\ProcessOptionsIand$usethevqaluesof\if@outerlabelsandif@twosidewhichmayhavebGeen Isetbythoseoptions, toset\SL@lrtexttobGetheappropriatecontrolsequence.IThepresenceofthetwoGcolumnoptionmeansthatweignoretheinnerandouterIoptions.E119S\if@twocolumn5.soE120]\let\SL@lrtext\SL@twocoltext E121]\let\SL@eqnlrtext\SL@eqntwocoltextE122S\elseE123]\if@outerlabelsE124f\if@twosideE125]\let\SL@lrtext\SL@alternatetextE126]\let\SL@eqnlrtext\SL@eqnalternatetextE127f\elseE128p2\let\SL@lrtext\SL@righttextE129p2\let\SL@eqnlrtext\SL@eqnrighttextE130f\fiE131]\elseE132f\if@twosideE133]\let\SL@lrtext\SL@alternatetextE134]\let\SL@eqnlrtext\SL@eqnalternatetextE135f\elseE136p2\let\SL@lrtext\SL@lefttextE137p2\let\SL@eqnlrtext\SL@eqnlefttextE138f\fiE139]\fiE140S\fiXThat'sUUus.E141Sh=pack9age#g i68;&ow cmss9% cmsy9$5" cmmi9"ߤN cmtt9!Nff cmbx12p0J cmsl10': cmti10m#R cmss10