; TeX output 2001.10.31:1004solUsGGecrm1728LehpacykageBCGGecss1728enumerate!", cmsy10 ecrm1200DawvidlCarlislescarlisle@cs.man.ac.uk!ߍxTeraductionlfranaiseparJean-PierreDrucbSert2K cmsy8y2!1999/03/05!x! u ecbx0900Rsum鎟 Vo$. ecrm0900Cepac ununununununununun m> unU ununununqNFEXU ii.m> deuxqm> exempleU a)unydedeuxundeU deuxlexempleU b)deuxU dedeux*VIA-1]XunIA-2]Xdeux΍\begin{enumerate}[EXNi.]\itemNununununununun!unNunununununun\label{LA}\itemNdeux\begin{enumerate}[exempleNa)]\itemNundedeux rundedeux\label{LB}\itemNdeuxdedeux\end{enumerate}\end{enumerate}\begin{enumerate}[{A}-1]\itemNun\label{LC}\itemNdeux\end{enumerate}b\XLescommandes%qL ectt1000\labelet\refpGeuventtreutilisescommedansl'environ- Inementn&6 ecss1000enumeratestandard.\refproGduitseulementlavqaleurducompteur,etInon^}l'tiquettecomplte.L'achageestfaitdanslemmestyleque\item,quiaIt?dterminparlaprsencedel'undescaractresA?aIi1?dansl'argumentIoptionnel.pDansl'exempleci-dessus\ref{LA},\ref{LB}et\ref{LC}proGduisentIU i*,iiaet1respGectivement.I&ffr @ -:q% cmsy6K"ecrm0800Ce(cÒhieralenumrodeversionv3.00,rvisle1999/03/05. Z-:yKDernire(misejourle20/01/2000(1*soI2`Macros~L'T2ecrm07001S* cmsy9h+ow cmss9pack9age#g i5\@enlabIInternaltokenregisterusedtobuildupthelabGelcommandfromtheoptional Iargument.L2S\newtoks\@enLab\@enQmarkIThisU justexpandstoa``?'.q\refwillproGducethis,ifnocounterisprinted.L3S\def\@enQmark{?}XThe#nextfourmacrosbuildupthecommandthatwillprinttheitemlabGel. IThey'eachgobbleonetokenorgroupfromtheoptionalargument,0Landaddcorre-IspGonding8_tokenstotheregister\@enLab.gTheyeachendwithacallto\@enloop,IwhichU startstheproGcessingofthenexttoken.\@enLabelIAdd$thecountertothelabGel.]#2willbeoneofthe`special'tokensA?aIi1,IandU isthrownaway*.q#1willbGeacommandlike\Roman.L4S\def\@enLabel#1#2{% L5]J\edef\@enThe{\noexpand#1{\@enumctr}}%L6]J\@enLab\expandafter{\the\@enLab\csnameNthe\@enumctr\endcsname}%L7]J\@enloop}\@enSpace \@enSp@ceIAddpaspacetothelabGel.ßThetrickybitistogobblethespacetoken,wXasyoucan InotU dothiswithamacroargument.L8S\def\@enSpace{\afterassignment\@enSp@ce\let\@tempa=N}L9S\def\@enSp@ce{\@enLab\expandafter{\the\@enLab\space}\@enloop}\@enGroupIAddU a{?}grouptothelabGel.I10S\def\@enGroup#1{\@enLab\expandafter{\the\@enLab{#1}}\@enloop}\@enOtherIAddU anythingelsetothelabGelI11S\def\@enOther#1{\@enLab\expandafter{\the\@enLab#1}\@enloop}|B\@enloop \@enloop@IThe bGodyofthemainloop.LFEatingtokensthiswayinsteadofusing\@tforlets Iyouseespacesand.]f ecbx1000allbraces.(T\@tforwouldtreataand{a}asspGecial,NbutnotI{{a}}.I12S\def\@enloop{\futurelet\@entemp\@enloop@}I13S\def\@enloop@{% I14]J\ifxNA\@entemp*\def\@tempa{\@enLabel\Alph r}\elseI15]J\ifxNa\@entemp*\def\@tempa{\@enLabel\alph r}\elseI16]J\ifxNi\@entemp*\def\@tempa{\@enLabel\roman}\elseI17]J\ifxNI\@entemp*\def\@tempa{\@enLabel\Roman}\elseI18]J\ifxN1\@entemp*\def\@tempa{\@enLabel\arabic}\elseI19]J\ifxN\@sptoken\@entemp\let\@tempa\@enSpace*\elseI20]J\ifxN\bgroup\@entemp+\let\@tempa\@enGroup*\elseI21]J\ifxN\@enum@\@entemp+\let\@tempa\@gobble/= \elseI22L\let\@tempa\@enOtherIHoGokU forpossibleextensionsI23L\@enhookI24\fi\fi\fi\fi\fi\fi\fi\fi(2 soIProGcessU thecurrenttoken,thenloGokatthenext. I25]J\@tempa}5|B\@enhookIHoGokforpossibleextensions.*SomepackqagesmaywanttoextendthenumbGerof IspGecialcharactersthatareassociatedwithcounterrepresentations.ThisfeatureIwaserrequestedtoenableRussianalphabGeticcounting,ibuthereIengiveanexampleIofU afoGotnotesymbolcounter,triggeredby*.XT*oenableanewcountertypGebasedonaletter,youjustneedtoaddanewI\ifxιclausebyanalogywiththecoGdeabove.}Soforexampletomake*triggerIfoGotnoteU symbolcounting.qapackqageshoulddothefollowing.XInitialiseU thehoGok,incasethepackqageisloadedbeforeenumerate.,#MN\providecommand\@enhook{},#XAddtothehoGokanew\ifxclausethatassociates*withthe\fnsymbolIcounterU command.MN\g@addto@macro\@enhook{% W+\ifxN*\@entemp`\def\@tempa{\@enLabel\fnsymbol}%W+\fi},#IThiscoGdesequenceshouldworkwhetheritisloadedbeforeorafterthisenumerate Ipackqage.qAnyU numbGerofnewcountertypGesmaybGeaddedinthisway*.XAtthispGointwejustneedinitialisethehoGok,takingcarenottooverwriteanyIdenitionsU anotherpackqagemayalreadyhaveadded. I26S\providecommand\@enhook{}5 \enumerateIThe&hnewenumerateenvironment.WThis&histhersthalfoftheoriginalenumer-Iate3environment. 7Ifthereisanoptionalargument,kWcall\@@enum@todenetheIlabGelڭcommands,otherwisecall\@enum@whichisthesecondhalfoftheoriginalIdenition.I27S\def\enumerate{% I28]J\ifnumN\@enumdepth>3\@toodeep\elseI29p\advance\@enumdepthN\@neI30p\edef\@enumctr{enum\romannumeral\the\@enumdepth}\fiI31]J\@ifnextchar[{\@@enum@}{\@enum@}}5|B\@@enum@IHandleU theoptionalargument..I32S\def\@@enum@[#1]{%IInitialiseëtheloGopwhichwillbreakaparttheoptionalargument.AThecommandto IprintEthelabGelisbuiltupin\@enlab.W\@enThewillbeusedtodene\theenum b> cmmi10n.I33]J\@enLab{}\let\@enThe\@enQmarkIThe\@enum@bGelowisneverexpanded,itisusedtodetecttheendofthetoken Ilist.I34]J\@enloop#1\@enum@IIssueU awarningifwedidnotndoneofthe`spGecial'tokens.I35]J\ifx\@enThe\@enQmark\@warning{TheNcounterwillnotbeprinted.% I36a֘^^J\space\@spaces\@spaces\@spacesNThelabelis:\the\@enLab}\fiIDeneU \labelenumnand\theenumn.I37]J\expandafter\edef\csnameNlabel\@enumctr\endcsname{\the\@enLab}% I38]J\expandafter\let\csnameNthe\@enumctr\endcsname\@enThe(3soISet$thecounterto7sothatwegetthewidthof`vii'ifromannumbGeringisin IforceU thenset\leftmarginn.qtothewidthofthelabGelplus\labelsep.I39]J\csnameNc@\@enumctr\endcsname7 I40]J\expandafter\settowidthI41ZV\csnameNleftmargin\romannumeral\@enumdepth\endcsnameI42ZV{\the\@enLab\hspace{\labelsep}}%IFinallyU call\@enum@whichisthesecondhalfoftheoriginaldenition.I43]J\@enum@}5\@enum@IAllZthelistparametershaveZnowbGeendened,socall\list.2Thisistakenstraight IfromU theoriginaldenitionof\enumerate.I44S\def\@enum@{\list{\csnameNlabel\@enumctr\endcsname}%I45{\usecounter{\@enumctr}\def\makelabel##1{\hss\llap{##1}}}}I46Sh)5" cmmi9=pack9age#g i(4$w; .]f ecbx1000+ow cmss9* cmsy9)5" cmmi9'T2ecrm0700&6 ecss1000%qL ectt1000$&Lt$ffffecbx1440"qL ectt0900!D ecss0900 u ecbx0900. ecrm0900"ecrm0800q% cmsy6K cmsy8 ecrm1200!", cmsy10BCGGecss1728UsGGecrm1728 1 ecrm1000 b> cmmi10(p