; TeX output 1997.03.05:1634soDtGGcmr17The7tGGcmss17shoqwkeyspackage!", cmsy10XQ cmr12DarvidCarlisle37 1996/11/01:ōINff cmbx121aLIntros3duction  ff1S  ffߤN cmtt9sec:intro0F ffffff1S I'ExXbGoxofzerowidth,XwhichmaypGossiblyover-printothertext.yThe\ref,I\pagerefͲand\citecommandsprinttheirargumentsinsmalltypGe,raisedjustIabGove theline,likethis:)# cff Cscmtt8sec:introfe&@$)#1.AZThispackqageworkswiththe!m#R cmss10 eqnoption,thepackqagesIinUUtheAMS-L5ffٓRcmr7A͉TU>'ExXcollection,andthevarioref,UUnatbibandharvardUUpackqages.!čI2aLPackageffOptions 獍 ff'  ffoptions' ffffff'掎 34ISomepGeoplehavecommentedthattheprintingofthe\refand\citekeysislessIuseful=Bthantheprintingofthe\labelkeysandsoshowkeysnowsuppGortstwoIoptionsUUthatcanbGegiveninthe\usepackagecommand:I""V cmbx10notrefl!to'stoptherede nitionof\refand\pageref,[andrelatedcommandsbfromUUthevariorefpackqage.Inotcitepزtosstoptherede nitionof\citeandrelatedcommandsfromtheharvardbandUUnatbibpackqages.ISoifthepackqageisloadedwith\usepackage[notref]{showkeys}then\refwillIhaveitsstandardde nition,A&but\labelwillprintitskeyargument(usuallyinItheUUmargin).XIf you ndtheprintedkeysdistracting,Nbutdon'twanttousetheabGoveoptionsItoUUstopthemaltogetheryoumayuse:IcolorfPrintUUthekeysinadistinguishingcolour.qThedefaultvqalueisalightgrey*.IThecoloursmaybGechangedbyrede ningthefollowingtwocoloursaftertheIpackqageisloaded.Zrefkey(alsousedfor\cite)andlabelkey(alsousedforI\bibitem).qTheUUdefaultsare:Rs,\definecolor{refkey}{gray}{.75} Rs,\definecolor{labelkey}{gray}{.75}Iffffr @ -:q% cmsy6L|{Ycmr8ThisX lehasvÎersionnumbI3aLMoreffExamples 獍fff,|  ffexamples+̰ ffffff,| 34ITheonlyothersimilarpackqagethatIcould ndinthemacroindex, p cffDMJ:mife p[3],wasIshowlabels.sty,5 cffGN:slfe@5[1].dAfter.the rstdraftofthispackqagewaswritten,5I-found cffanon:skfe[2]IonbsmyloGcalinstallation!"Ibpthinkthecurrentpackqageismorerobustthan cffanon:skfe[2],ebutIIUUthoughtthatshowkeyswasratheragoGodUUname,soIhavestolenitforthis le.xl)rff  ffe^1,„ ffffffU81.bThisUUhas\labelimmediatelyafter\item.U82.bThisUUhasthe\labelattheend.S)rff  ffe^2,„ ffffffxl5h}AUUminipage:-䍒ieu cmex108 ie>ie>ie>ie>ie>ie>ie>ie>ie< ie>ie>ie>ie>ie>ie>ie>ie>ie:َ:LWithinfenvironmentslikethisminipage,*W*ecanLnotuse\marginpar^1|s,HsotheappGearanceisslightlyLdi erent. &Here<isthatenumerateenvironmentLagain::ffl  ffm&e^1 fffffflز1.LThisUUhas\labelimmediatelyafter\item.2.LThisUUhasthe\labelattheend.:ffl  ffm&e^2 ffffffl8[XDisplayedUUmath(withoutequationcounter).xlX0=0ff$  ffdispX ffffff$XSomeUUtextreferingtothemathsonpage cffdispfe2,andtheitem cffe^1fe 1.XIfshowkeysthinksthatthecurrentenvironmentisgoingtoproGducean\equa-ItionnumbGer",thenitdoesnotshowthelabelwherethe\labelcommandoccurs,IbutPJtriestoputitinthemargin,QLasshownwithequation ffeq:xxfe@1.pThepackqage`knows'IabGoutTthestandardequationandeqnarrayenvironments,THandTalsoallthenum-IbGeredUUalignmentenvironmentso eredbytheAMSL5ffA͉TU>'ExXpackqage,amsmath.X1=18(1) ffl ffeq:xx ffffffl{tp2q=c28(2) ff' ffeqnar:a' ffffff'掎p3q=c3p4q=c48(3) ff'  ffeqnar:b' ffffff'掎I[ʉffr J= "5-:Aacmr61LActually\marginparXisnotusedatallinthispacÎkagenow.2 ȠsoD㎍l9IWithin afigureenvironment,7Rthe \labelmustnotcomebGeforethe\caption Icommand.h\If9youplace\labelinsidetheargumentof\captionthelabGelwillbeIshownUUlikethis: FigureUU1:qWithinthecaptionargument. ffl ffcap:a fffffflIIfyouplace\labelimmediatelyafterthe\captioncommanditwillbGeshownIlikeUUthis:jFigureUU2:qImmediatelyafterthecaptionargument.ffl  ffcap:b fffffflIIfyouplacethe\labelcommandatsomerandompGointafterthe\captionIcommand,UUitmaybGeshownlike:qFigureUU3:qInverticalmoGdenotimmediatelyafterabox. ǍF ffl ffcap:c fffffflIReferencesFffl  ffGN:sl fffffflI[1]X;GiltNeiger,#': cmti10showlab}'els.sty,Undatedpackqage,similartothisone,butshows X;labGelsUUinline,a ectingtheformatingofthedocument. ff'  ffanon:sk' ffffff'掎I[2]X;Annonymous,[rshowkeys.sty,Packqage,datedZ914May1988.V*erysimilartothisX;one,UUalsouses\marginparinouterverticalmoGde.ٰff#&P  ffDMJ:mi"Y ffffff#&PI[3]X;DavidM.Jones,&TKß'E-XߵMacr}'oIndex,AcatalogueofTU>'ExXmacros,includingX;L5ffA͉TU>'ExXUUpackqages,avqailablefromallgoGodUUTU>'ExXarchives.!čI4aLTheffMacrosLs1S% cmsy9h&ow cmss9pack9age#g iXFirstwehandletheoptions.NNormallyallrelatedcomandsarede nedtoshowItheirUU`keys'.qButsincev3.03onecanspGecify:Xnotref$tostoptherede nitionof\ref(and\pageref,andrelatedcommandsIfromUUvariorefpackqage)Xnotcitetostoptherede nitionof\citeandrelatedcommandsfromtheIharvardUUandnatbibpackqages. Ls2S\DeclareOption{notref}{\let\SK@ref\@empty}Ls3S\DeclareOption{notcite}{\let\SK@cite\@empty}b\SK@refcolor 6\SK@labelcolorIColourUUcommands.qNormallyno-op.Ls4S\let\SK@refcolor\relaxLs5S\let\SK@labelcolor\relaxXcoloroptionloadsthecolorɤpackqageandde nesthecolours.d Delayedtothe IendUUofthepackqageaspackqageloadingnotallowedinthisoptionsection.Ls6S\DeclareOption{color}{\AtEndOfPackage{%Ls7]\RequirePackage{color}%Ls8]\definecolor{refkey}{gray}{.75}%Ls9]\definecolor{labelkey}{gray}{.75}%I10]\def\SK@refcolor{\color{refkey}}%I11]\def\SK@labelcolor{\color{labelkey}}}}3ƠsoXAllowNfinaltobGespeci edinthedocumentclassoptionstosupresstheloading IofUUthispackqage. aI12S\DeclareOption{final}{\endinput} I13S\DeclareOption{draft}{}rI14S\ProcessOptions,#$\SK@label L\SK@bibitemb\SK@lbibitemITheUUsavedoriginalde nitionsI15S\let\SK@label\label I16S\let\SK@bibitem\@bibitemI17S\let\SK@lbibitem\@lbibitem,#"\labelITheUUnewde nition,printtheargument,andthendotheoldde nition.I18S\def\label#1{%I19]\@bsphackI20]\SK@\SK@@label{#1}%I21]\begingroupI22f\SK@label{#1}%I23]\endgroupI24]\@esphack},#$\@bibitem \@lbibitemIF*or*\bibitem,pGositiontheshowkeys*codeasforastandardlistwith\itemand I\label.I25S\def\@bibitem#1{%I26]\SK@bibitem{#1}\SK@\SK@@label{#1}\ignorespaces}rI27S\def\@lbibitem[#1]#2{%I28]\SK@lbibitem[#1]{#2}\SK@\SK@@label{#2}\ignorespaces},#,`\SK@IGrab&holdof#2via\meaningsocharacterslike&and^donotcauseproblems Ilater,UUandpasstheresultontothecommand#1.I29S\def\SK@#1#2{%I30]\protected@edef\@tempa{#2}%I31]\expandafter#1\meaning\@tempa\SK@},#\SK@@labelIStripFbo theinitialsegmentofthe\meaningoutput,I`andthenputtheresteither Iin1Ba\marginparorinabGoxofsize0pt,8yhopefullynotdisturbingthesurroundingItext.I32S\def\SK@@label#1>#2\SK@{%aINeedtoworkgloballyasinsomecaseslikealignments,andfleqn,thecounterIwillUUbGeprintedinadi erentgrouptothe\labelcommand.I33]\gdef\SK@lab{\smash{\SK@labelcolor\fbox{% I34\normalfont\small\ttfamily#2}}}%I35]\ifvmodeI36f\if@inlabelaIIfthe\labelisstraightafter\item(\bibitemishandledbythiscaseaswell) IthenitheitemlabGelhasnotbeenaddedtothepageyet.MItishangingaroundinItheObGox\@labelswaitingfortheparagraphtostart.pSojustneedtoattatchtheIlabGelUUtothisbox.I37p2\global\setbox\@labels\hbox{% I38yw^\llap{\SK@lab\SK@lab@relaxI39\kern\@totalleftmargin\kern\marginparsep}%I40yw^\box\@labels}%4*soI41f\elseIIf'weinsertabGoxintothemainverticallist,donotwanttochange\prevdepth IasmthatwouldafectverticalspacinginthedoGcument.,(ThebGoxitselfshouldnotIcause?{anydi erenceinbreakpGointsasthereisanoGdethereanywaycomingfromItheUU\writetotheaux le.I42p2\dimen@\prevdepth I43p2\nointerlineskipITheinnerverticalmoGdecasesaremainlydesignedtodotherightthingwith oatIcaptions,UUbutseemtoworkOKinothercasesaswell.I44p2\ifinner I45yw^\skip@\lastskip\unskipIIn7RinnerverticalmoGde,=RattachthelabGeltotherightoftheimmediatelyprecedingIbGox,]if[itisaboxbeforethecurrentpoint.OtherwisejustputitinaboxofzeroIdimensions,fwithbnointerlineskip.(ThismayslightlymovethesurroundingtextI(butUUpGerhapsnotnowthat\prevdepthisrestored.)I46yw^\advance\skip@\lastskip\unskip I47yw^\setbox\z@\lastboxI48yw^\ifvoid\z@I49\llap{\SK@lab\SK@lab@relax\kern\marginparsep}%I50yw^\elseI51\hbox{\box\z@\kern\marginparsep\SK@labx}%I52yw^\fiI53yw^\vskip\skip@I54p2\elseIInIzouterverticalmoGde,Kpreviouslyuseda\vadjustatthestartofthenextpara- Igraph#(andbGeforethatused\marginpar).aEThesemethodssometimescauseextraIspace,"Pegifparagraphstartswithamathdisplay*,sonowjustinsertthebGoxIdirectly*,UUtakingcarenottochange\prevdepth.I55yw^\llap{\SK@lab\SK@lab@relax\kern\marginparsep}% I56p2\fiIRestoreUU\prevdepth.I57p2\prevdepth\dimen@I58f\fiI59]\elseIIfweareinannumbGeredequation-styleenvironment,donothingasthecoGdeto IprintHthenumbGerwillalsoprintthelabGel,otherwisejuststickthelabGelattheIcurrentUUpGoint,inabGoxofzerodimensions.I60f\csnameSK@\@currenvir\endcsname I61f\ifSK@equation\elseI62p2\ifmmodeI63yw^\SK@labxI64p2\elseIInnerUUhorizontalmoGde.qNotmuchwecando,juststickithere.I65yw^\ifinnerI66\rlap\SK@labI67p2\else55soIInUUouterhorizontalmoGdeuse\vadjusttogettothemargin.I68\vadjust{\llap{\SK@lab\kern\marginparsep}}% I69yw^\fiI70yw^\SK@lab@relaxI71p2\fiI72f\fiI73]\fi}b\iftagsleft@IMakeUUsurethatthisAMSL5ffA͉TU>'ExXcommandreallyisan\if..I74S\AtBeginDocument{%I75]\let\SK@eqnnum\@eqnnumI76]\def\@tempa{\let\iftagsleft@\iffalse}%I77]\ifx\iftagsleft@\undefined\@tempa\fi%\tag@form@ 3P\eqnnumIPerhaps}ifleqnoisopGerative,I]shouldde ne\@eqnnumwiththe`left'version,but IitUUdoGesnotreallymatter.I78]\let\SK@tagform@\tagform@I79]\iftagsleft@I80f\def\tagform@#1{%I81p2\ifx\df@label\@emptyI82yw^\SK@lab@relaxI83p2\elseI84yw^\expandafter\SK@@label\meaning\df@label\SK@I85p2\fiI86p2\llap{\SK@lab\kern\marginparsep}%I87p2\SK@lab@relax\SK@tagform@{#1}}%I88f\def\@eqnnum{%I89p2\llap{\SK@lab\kern\displaywidth\kern\marginparsep}%I90p2\SK@lab@relax\SK@eqnnum}%I91]\elseI92f\def\tagform@#1{%I93p2\ifx\df@label\@emptyI94yw^\SK@lab@relaxI95p2\elseI96yw^\expandafter\SK@@label\meaning\df@label\SK@I97p2\fiI98p2\SK@tagform@{#1}%I99p2\rlap{\kern\marginparsep\SK@lab}\SK@lab@relax}%E100f\def\@eqnnum{\SK@eqnnum\rlap{\kern\marginparsep\SK@lab}%E101\SK@lab@relax}%E102]\fi}y\SK@labxIPrintUUthelabGel,andthengloballyresettheprintcommandto\relax.E103S\def\SK@labx{\rlap\SK@lab\global\let\SK@lab\relax}\SK@lab@relaxIClearUUthelabGel.E104S\def\SK@lab@relax{\global\let\SK@lab\relax}\SK@lab@relaxb\SK@equation b\SK@eqnarrayIThekfollowingenvironmentsprintanequationnumbGer,so\labelshouldnotprint IitsargumentatthepGointwhereitappGears. NotethiswillfailtoshowthelabGelIif)youareinaneqnarrayenvironment,2anduse\labeltogetherwith\nonumber6@AsoIThisՐmightjustabGoutmakesenseifyouaregoingtouse\pageref,butthatis ItoGoUUbad... ^QE105S\newif\ifSK@equation E106S\let\SK@equation\SK@equationtrueE107S\let\SK@eqnarray\SK@equationtrue󍍍$\eqnarrayIWhenWtheAMS>packqagesareloadedshowkeysassumesenvironmentswork`TheIAMSKway'`Howevereqnarray(unlikeequation)isnotrede ned,^sohereweneedItoUUremovesomeoftheAMShacks. ^QE108S\toks@\expandafter{\eqnarray}E109S\edef\eqnarray{\let\noexpand\tagform@\noexpand\SK@tagform@\the\toks@}󍍍$\SK@align L\SK@alignatb\SK@xalignat\SK@xxalignat\SK@gatherb\SK@multline L\SK@flalignITheUUAMSenvironments ^QE110S\let\SK@align\SK@equationtrueE111S\let\SK@alignat\SK@equationtrueE112S\let\SK@xalignat\SK@equationtrueE113S\let\SK@xxalignat\SK@equationtrueE114S\let\SK@gather\SK@equationtrueE115S\let\SK@multline\SK@equationtrueE116S\let\SK@flalign\SK@equationtrue󍍍3P\SK@defIThissmacrorede nesacommand#1.Thenewde nitioncanmakeuseoftheIoldXde nitionas\SK@old2name."If#1isreallya\protect'edcommandwiththeIreal&Dde nitionina`sp}'ace['&Dcommandthenthe`space'versionisusedastheoldIde nition.<'NeedttotestthisforeachcommandassomepackqagemayhavechangedIthegstatusofacommandtobGeing`protected'."Thenewde nitionismadeasifwithI\DeclareRobustCommand,UUbutwith\defsyntaxfortheargumentspGeci cation. ^QE117S\def\SK@def#1{%E118]\edef\@tempa{\expandafter\@gobble\string#1}%E119]\@ifundefined{\@tempa\space}%E120f{\expandafter\let\csnameSK@\@tempa\endcsname#1}%E121f{\expandafter\let\csnameSK@\@tempa\expandafter\endcsnameE122T\csname\@tempa\space\endcsname}%E123]\expandafter\def\expandafter#1\expandafter{%E124yw^\expandafter\protect\csname\@tempa\space\endcsname}%E125]\expandafter\def\csname\@tempa\space\endcsname}XThefnextsectionrede nes\refand\pageref(unlessthenotrefoptionwasIgiven). ^QE126S\ifx\SK@ref\@empty^QIEvenifnotrefoptionisused,sneedtofudgethevariorefngcommandsastheyuseI\labelUUinternally*.E127S\AtBeginDocument{% E128]\ifx\vpageref\@undefined\elseE129f\SK@def\@@vpageref#1[#2]#3{{%E130p2\let\label\SK@labelE131p2\SK@@@vpageref#1[#2]{#3}}}%E132f\DeclareRobustCommand\vref[1]{%E133p2\unskip~\ref{#1}%E134p2{\let\label\SK@labelE135t\SK@@@vpageref\unskip[\unskip\space]{#1}}}%E136]\fi}E137S\else7Jso,`\ref y\pagerefISave1#therede nitionto\begin{document}sothatthispackqagecanworkwith Ipackqagesthatrede ne\cite.D+T*estedwithharvardandnatbibpackages.D+AlsoaddIcoGdeUUatthispointtosupportvqarioref. 齍E138S\AtBeginDocument{% E139]\SK@def\ref#1{\SK@\SK@@ref{#1}\SK@ref{#1}}%E140]\SK@def\pageref#1{\SK@\SK@@ref{#1}\SK@pageref{#1}}%E141]\ifx\vpageref\@undefined\else齍IvqariorefUUsuppGort.E142f\SK@def\@@vpageref#1[#2]#3{{%E143p2\let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pagerefE144p2\leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref#1[#2]{#3}}}%E145f\DeclareRobustCommand\vref[1]{%E146p2\unskip~\ref{#1}%E147p2{\let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pagerefE148t\SK@@@vpageref\unskip[\unskip\space]{#1}}}%E149]\fi}zE150S\fi8XNowUUrede ne\citeunlessnotciteoptiongiven.E151S\ifx\SK@cite\@emptyE152S\AtBeginDocument{% E153]\ifx\HAR@checkdef\@undefined\elseE154p2\expandafter\let\expandafterE155~0\SK@HAR@bi\csname\string\harvarditem\endcsnameE156p2\expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{%E157yw^\SK@HAR@bi[#1]{#2}{#3}{#4}\SK@\SK@@label{#4}}%E158]\fi}E159S\else8'|\citeE160S\AtBeginDocument{%E161]\ifx\HAR@checkdef\@undefined齍IStandardUU(non-harvqard)suppGort,includingextracitecommandsfromnatbib.E162f\SK@def\cite#1#{\SK@citea{#1}}%E163f\SK@def\citeauthor#1{\SK@\SK@@ref{#1}\SK@citeauthor{#1}}%E164f\SK@def\citefullauthor#1{\SK@\SK@@ref{#1}\SK@citefullauthor{#1}}%E165f\SK@def\citeyear#1{\SK@\SK@@ref{#1}\SK@citeyear{#1}}%E166]\else齍IIn{Xtheharvqardstyledonotn0rede neindividualcitecommands.Justrede neone IinternalUUcommandthatisusedinallthecitationforms.E167f\SK@def\HAR@checkdef#1#2{%E168p2\expandafter\SK@\expandafter\SK@@ref\expandafter{#1}%E169p2\SK@HAR@checkdef{#1}{#2}}%E170p2\expandafter\let\expandafterE171~0\SK@HAR@bi\csname\string\harvarditem\endcsnamezE172p2\expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{%E173yw^\SK@HAR@bi[#1]{#2}{#3}{#4}\SK@\SK@@label{#4}}%E174]\fi}E175S\def\SK@citea#1#2{%E176]\SK@\SK@@ref{#2}\SK@cite#1{#2}}8 VsoE177S\fiy\SK@@refIThisLismuchLsimplerthantheprintingofthelabGel,)NasweknowthatwecanbGein IhorizontalUUmoGde.E178S\def\SK@@ref#1>#2\SK@{% E179]\leavevmode\vboxto\z@{%E180f\vssE181f\SK@refcolorE182f\rlap{\vrule\raise.75em%E183t\hbox{\underbar{\normalfont\footnotesize\ttfamily#2}}}}}E184Sh$5" cmmi9=pack9age#g i9a; &ow cmss9% cmsy9$5" cmmi9#': cmti10""V cmbx10!m#R cmss10 Cscmtt8