; TeX output 1997.02.17:1048so|DtGGcmr17User's7tGuidetothe-G cmcsc10CamelCitator!", cmsy10gXQ cmr12FVrankG.Bennett,Jr.2K cmsy8yExXUUfeatures]%.............................V6X1.3oProGcessingUUdocumentsԿ.........................V8I2XNotesTforImplemen9torsV9X2.1oGettingUUstarted.............................V9X2.2oTheUU&'ExX3pro8ject.TheCamelengineo ersahighlyI exibleyetstraightforwardsyntaxforenteringcitationkeysintoaL5ffA͉TU>'ExXdoGcu-Iment.qzTheCamelengineisdesignedtosuppGortawiderangeofcitationstyles.IDoGcumentsKpreparedforCamelcanbeconvertedKintovirtuallyanysuppGortedIbibliography1orcitationstyle,usuallybyeditingonlyafewtogglesatthetopofItheUUdoGcument.^2XWithin'ExX3pro8ject,anextensivesurveyofbibliographicstyleswasIcarriedoutbyDavidRhead.$PedroAphalo,T*askCoGordinatorforbibliographicIsuppGort6ontheL5ffA͉TU>'ExX3Pro8ject,n rstproposedadoptingauni edsyntaxforallIbibliographicstyles.HCamelitselfisthebrainchildofF*rankBennett,andisbasedIupGonhisearlierworkontheLfhezMx loI TU>oExX)Dstyleengineforlegalmaterials.0ThispackqageIcompletely`supGercedesLfhezMx loI TU>oExX(,andthatearlierstylepackqagewillnolongerbGeIsuppGorted.qTheUUnewpackqageshouldbereferredtoas\theCamelcitator".^3XThebcoreCamelpackqageprovideshoGoksforthedevelopmentofstyleoptionsIthatsatisfyallbibliographicrequirementsthathavecometotheattentionofItheL5ffA͉TU>'ExX3bibliographyteam.+ThefoundationhasbGeenlaid,butmuchworkIremainstobGedoneindraftingCamelmodulestomeetallknownbibliographicIrequirements inall elds(andinalllanguages)forwhichL5ffA͉TU>'ExXisused.@ThisworkIwill;involvethedraftingormoGdi cationof.bst lesinthereversepGolishnotationIusedMbyBiDb32TU>ExX,andofCamelstylemoGduleswritteninTU>'ExX.[IfyouwanttoIcontributetoapro8jectthatwilldramaticallyenhancetheutilityofL5ffA͉TU>'ExXasanIauthor'sproGductivitytool,igetinvolved!M+Thedevelopers'emailaddressesareasIfollows:X !", cmsy10bF*rankUUBennett:qfb@soas.ac.uk.XbPedroUUAphalo:qaphalo@cc.joensuu.fi.IJffr J= "5-:1LD.Knuth,XTheTEZvXbook176(1990). > "5-:2LThis~ispExX]and] itsuseinpreparingbibliographieswithstandard-issueL5ffA͉TU>'EX.)IfyouIneedtolearnmoreabGoutBiDb32TU>ExX,anumberofexcellentsourcesofinformationareIavqailable.^4 PThetreatmentgiventotheprogramminglanguagetendstobGequiteIbrief,jrbutf9youshouldnotbGeputo bythis;nthelanguageis,jrinfact,quitesimpleItoUUuse,andtheCamelprogramminglibrarymakesthingseveneasier.I*N cmbx121.1gCommandsuTIThe}\citationstylecommandisusedtotellbGothBiDb32TU>ExX}kandtheCamelengine\citationstyleIhow2yourcitationsshouldbGeformatted;itsargumentisthenameofaCamelImoGdule(containedina.cst,Ca.citanda.bst le)suchas`law'. InthisIdffr J= "5-:4LL.<Lamporwwt, L")- cmcsc10A_kTEZvX:b>adocumentpreparationsystem (1994);_M.Goosens,J4F.Mittel- ba}ch, Dand YA.Samarin,TheL"A_kTEZvXCompwwanion:TheL"ATEZvXCompwwanion(1994);OrenPÎatash-nik,(B2iibQTAi=EMXing(CTJAN%do}rValternativ9e< doAcTtop zLτffffiLτff1\forcefootnotesrVoptional< doAcTtop zLτffLτff1\newinterword{hnickname i.}{htexti}rVoptional< doAcTtop zLτffLτff1\printbibliography{hnickname i.}rVoptional< an9ywhereLτffLτff1\source[hoptionsi$]{hnickname i.}[hpage')numbersi=]rVn/a< an9ywhereLτffffi?21[soIrespGect,it8issimilartoa\documentclass",butforcitationsinsteadofwhole IdoGcuments.qThisUUdeclarationmaybGemakemorethanonce.^5XThiscommandisusedtoindicatethe.bib lesfromwhichcitationentriesb\citationdataIshouldbGedrawn. NAsinthe\bibliographycommandofstandardL5ffA͉TU>'ExX,xtheI\citationdata/-commandtakesoneoption,ewhichisacomma-separatedlistofIbibliographiesa$foruseinthedoGcuments.5Eacha$referstoa.bib le,deachofwhichIshouldUUbGeinthepathofyourlocalBiDb32TU>ExX.XWhilewehopGethatyou ndBiDb32TU>ExXthemostsatisfactorymeansofformatting߀H\bibliographymanagerIyourF5citations,|oyoumightprefertousesomeothersoftwareproGductfortheseparateItaskIofmanagingalargecitationdatabase.NgCamelhasbGeendesignedsothatIit5canbGeusedwithanumber5ofsuchutilities. WfIfyouareusinganexternalIbibiliographyrmanager,z6youshoulddeclarethenameofthepackqageatthetopofIthedoGcumentusingthe\bibliographymanagercommand.UWSupportedmanagers,IandUUtheircorrespGondingnicknamesforthiscommand,are:XbReferenceUUManager(referencemanager)XbPapyrusUU(papyrus)XbProCiteUU(procite)XbEndNoteUU(endnote)XThedetailsonhowtojoinexternalbibliographymanagerswithCamelare IbGelowUUatpage8.XIfRyouusethe\bibliographymanagercommand,youshouldnotusetheI\citationdataK}command.nThisisnotfelttobGeaseriouslimitation;NifyouuseaIbibliographyemanager,i youmightaswellput-': cmti10allmofyourcitationsintoitanyway*,IandUUuseitasthesolesourceofcitationsinyourdoGcuments.XY*ou^maywishtoproGduceabibliographyclassi edintosubheadingsbysub8jectf\citationsubjectIorbytypGeofmaterial.T*odothis,ia rst-levelheaderisused.WhereItheʹ\printbibliographycommandisissued,thepartsandsub-partsofthebibil-IiographyUUwillbGeproducedintheorderinwhichtheyweredeclared.XF*or`MsometypGesofcitation,c youmaywishtoproGduceatablethatshowsmoreIdetailabGoutcitationsmade.WithCamel,XsimplyaddanoptionalargumenttoItheUW\citationsubjectcommandapplicabletoyourdesiredtablewhichincludesIano=argumentofthreeletters(givingtheextensionoftherawdataoutputI le),'ExX.U)ItisusedtoidentifythecitationIin0the.bibdata les,gandtoprovidealogicaldescriptionofany` ne-tuning'ofIthecitationformthattheusermightdesire.@Becauseitisfrequentlyused,@andImustbGeaccessibletoauthorswithmoreinterestinthecontentofwhattheyareIwritingthantheinnerworkingsofL5ffA͉TU>'ExX,muche orthasgoneintomakingtheIcommandUUassimpletouseaspGossible.6IOptionsuTIThekvqalidoptionsthatmaybGeplacedinsidethe rstsetofsquarebracesareshownIbGelow.I^LΉffeB fdffkfdSinglecharacteroptionsffffeBffffeBff ?fdaUU|! SupressTprin9tingofauthor'snameinthedoAcument.eܟffff ?fdtUU|! SuppressTprin9tingofthetitleinthedoAcument.eܟffff ?fdlUU|! F:orceTautomaticallygeneratedabbreviationstolo9werTcase.eܟffff ?fdnUU|! Suppress#prin9tingofthecitationinthedoAcument(equiv|ralentto\nocitein ! standardTL5A TuAEX).eܟffff ?fdfUU|! F:orceTthefullformofthecitationtobAeprin9tedinthedocumen9t.eܟff%ff ?fdhUU|! Suppress hautomatedfoAotnotegenerationandtheuseofin9terwords hforthecur- ! ren9tandfollowingcitations.BThisoptionshouldnotbAeusedinthemiddleofa! stringTofcitationslink9edwithinterwords.eܟ%ffffeB fdffeBffZfdStringoptionsffffeBffffeB:Ffffds=UU|! AssoAciate\thecitationwiththespeci edsubject.Thisoptioncanbefreelyspec- ! i ed,but}onlyhassigni cancewhenaclassi edbibliograph9yisbAeingproduced.! WhenthesesubjecttagsarebAeingusedforthatpurpose,theym9ustbedeclared! atthetopofthedoAcumen9t, andagivensourcemustbAeassociatedwiththe! same*subjectthroughoutthedoAcumen9t;specifying*adi erentsubjectfromthat! usedTinthe rstuseofthecitationwillproAduceanerrormessagefromL5A TuAEX.eܟ:FffF/;fffdv=UU|! Giv9ePpavolumenumbAerforuseinthecitation.BOOKP>entriesinaBiWbBTuAdEXP>database ! ma9ybAegivenavolumenumbAer.0SuchcitationsareassumedtobAemulti-volume! w9orks,andavolumenumbAershouldbesuppliedwhencitingthem;thev9olume! n9umbAerugiveninaBOOK entryitselfignored,|andanerrormessagewillbAe! proAducedTifanexplicitv9olumenumbAerisnotgivenusingthisoption.eܟ/;ff;fffd!=UU|! PrecedeTthecitationwiththein9terwordTgivenintheargument.eܟffffeB _XThese>optionsmaybGeenteredintheoptionbracesinanyorder,vwiththesingleIrequirementUUthatacommamustseparatealloptions.^7XThe$"numbGerofpossiblecitationformsthatcanbegeneratedusingthesecom-Imanduoptionsisverylarge,' andvqariesfromonestyletoanother.^}ThebGestwayofIfamiliarizing"ryourselfwiththemisto nishreadingthenextsectionofthisguide,IandQthendoalittleexpGerimentationwiththevqariousoptions.\qThiswillserveyouIX-ffr J= "5-:7LSeparatingcommasarerequiredfromvÎersion1.0r,bExXorotherdatabasethatyouareusing.WIfyouhaveaseriesIofcitationstomake,anddonotneedtogiveseparateoptionstoanyofthem,youIcanUUenterthemasacomma-delimitedstring,inthefollowingmanner:b\source[s=stooges]{joe,curly,moe}6IPinpQoin9tsuTIF*orvXmostcitations,pinpGointreferencesaresimplytypGedbetweenvXthesecondpairofIsquareo>braces,uusingnormalpunctuationmarks(?,&-).Spacingo>isirrelevqant,Isolongasthepunctuationmarksareentered.AvqalidsimplepinpGointcitationImightUUloGokasfollows:b\source{major}[2,?7,9&23]XInsomeveryspGecialsituations,SCamelneedsmoreinformationtohandleIpinpGoint1referencescorrectly*.[Supposeyouareenteringacitationforastatute,IandyouintendtoproGduceatableshowingwherereferencestoeachcitedsectionofIthestatutearemadeinthetext.VIfyourcitationincludesreferencestomorethanIone@sectionofthestatute,CamelwillproGduceatableentryforeachcitedsectionIautomatically*.nButTTwhatifyouarecitingar}'angeofsections?CamelcannotIknowS-whethertherangeiscontinuous,orhasgapsinitwhereprovisionshaveIbGeenIrepealed.NY*outhereforeneedtotellCamelexplicitlyabouteachsectionInumbGer|butyoudon'twantthenumbGerstobeprintedinthetext.xT*ofeedIcitationnumbGerstothetable,butsuppressprintinginthedoGcument,separatetheInumbGersUto\hidden"fromtherestwitha\fence"intheformofthe|character.IAUUtypicalcitationofthiskindmightloGoklikethis:b\source{SaleofGoodsAct}[19-25?|20,21,22,23,24]5soXThereǮaretwoǮothersituations,DalsorelatedonlytotheproGductionoftables, IwhereH$spGecialmarkingsmayneedtobeincludedinthepinpointingstring.maTheseIare(a)whereyouwantmaterialtoappGearonlyinthetext,*and(b)whereyouIwant'materialtoappGearonlyinthetable.bThe rstcasemayarisewhereyouareIcitingsubsectionsofastatute.qInthissituation,youcanenclosein^charactersIany0textthatyouwanttowithholdfromthetable.e_A0simplecitationofthiskindImightUUloGokasfollows:b\source{VehicleCode}[23(A)^(3)(a)(i)^]XWherematerialshouldappGearonlyinthetable,enclosethatpinpointmaterial Iin_characters.lThismightbGenecessarywhere,forexample,youarecitingtwoIsubsectionsUUofthesamestatute.qAnexamplemightloGokasfollows:b\source{LawofPropertyAct}[70(1)(f)?&_70(1)_(g)]XFinally*,sthereF:isonemorefeaturethatappliesonlyto`parallelcitations'to Ilawcases.cIfalawcasetowhichyouarereferringisrepGortedinmorethanoneIloGcation(seebelow), andyouwanttogiveapinpGointtoeachloGcation, youcandoIsoUUbyusingthethe=signbGetweenthepinpGointstrings.qF*orexample:b\source{bloggvkermit}[20-25?=125-26]XIf0moreparallelpinpGointsaregiventhanexistintheBiDb32TU>ExXentryforthecase Inicknamesbloggvkermit,CtheextrapinpGointswillbGeignored.Similarly*,CifyouIgiveqQfewerpinpGointsthanthereareparallelsintheBiDb32TU>ExXqJentry*,xPthepGortionsofItheentrywithnomatchingpinpGointswillbGeomitted.Nowarningsareissued,IalthoughUUtheycouldbGeifthereisademandforit.󶍍I1.2gBS1ibTESXfeaturesuTIA*numbGer*ofenhancementsforprocessingBiDb32TU>ExX*entrieshavebGeenincorporatedIinto9theCamelBiDb32TU>ExX9Kprogrammer'slibrary*.ZTheseenhancementsaredrawnIupGon bythelaw.bststyle,yandshouldalsobGeusedbysubsequentCamelstyleImoGdules.These>featuresaredescribedbrie yhere.PleaseseetheBiDb32TU>ExX/docu-ImentationUUformoreinformationontheformatofBiDb32TU>ExXentriesetcetera.󶍑ICasesIA(new)$entrytypGe,^@CASE,hasbeenadded.5ThisentrytypGeshouldbeusedforIrepGortedTlawcases.oAlthoughcitationformsvqarywidelybetweenTjurisdictions,ICamelbasestheformattingofthecitationontheinformationcontainedintheIcitation,UUratherthanatagindicatingthejurisdiction.XAresultLofthisapproachisthatthereareno`required' eldsintheusualIsense QthatBiDb32TU>ExX ?willcomplainifsomethingismissing.YqInstead,isasetof`core'I elds`foreachofthreedi erentformattingstyles.VF*orsomeonefamiliarwithlegalIresources,UUthisisactuallyquiteintuitivelyUUstraightforward.XF*orrepGortedU.S.lawcases,(thecore eldsaretitle,volume,journal,pagesIand year.Y4Inaddition,[youmaywishtospGecifycourt.^8էProceduralhistoriesmayInotUUbGerepresentedintheBiDb32TU>ExXentry*.I Qffr J= "5-:8LThisXisnotyÎetimplemented,butcanbExXfentries.IAlwaysusetheyear eld(or,ifappropriate,thecasedate eld).NMonthsmaybGeIenteredϼasnumbGersorasathree-characterstring.ThefollowingdateformsareIallUUvqalid:fyear={10jun1995}, fyear={jun101995},fyear={jun1995},fyear={1995},fyear={10/06/95},IP9arallelTcitationsuTIF*or[@CASE0entries,̍itispGossibletoentermultiplecitationsinasingleBiDb32TU>ExX0entry Iusingzashortformofcitationina eldcalledcites,Cseparatingentrieswitha=Icharacter.^10LܲThere areseveralvqalidsyntaxesforthis eld,SwhichcloselyfollowItheUUcitationformatusedintheBlueBoGokfortherelevqantsources.qTheyare:fcites={[1995]1AllER25=[1995]2WLR125}, fcites={123Cal.3d237(1995)=124S.W.2d235(1995)},XY*oucanstringtogetheranarbitrarynumbGerofparallelcitationsinthisway.^11 IBessuretoreadthenotesonpinpGointing,Sabove,SforsdetailsonhowtospGecifyIpinpGointUUreferencestoparallelcitations.IX-ffr J= "5-:9LI'mnotsurewhetherthiswÎorkswithparallelsyet.Ifitdow-:10LItXactuallydo'ExX,onerunofBiDb32TU>EX,andasecondIrun|dofL5ffA͉TU>'ExX.BecauseCamelabsorbsallcitationinformationatthestartofIthedoGcument(atthepointofthe\citationdataor\bibliographymanagerIcommands),@therenisnoneedforthethirdL5ffA͉TU>'ExXrunrequiredinthestandardIL5ffA͉TU>'ExXXsetup.KY*oumay,however,needXadditionalrunsofL5ffA͉TU>'ExXtoresolveotherIcross-referencesUUinthedoGcument,ortoworkoutmisspGellingsandothererrors.6IProQducingTtablesuTIWhentheo=andi=optionsareusedforoneormoredeclaredcitationsub-Ijects,*those̮sub8jectswillbGeexcludedfromthebibliography*.Instead,CamelIwill,writeanexternaltable leaccordingtothespGeci cationsgivenintheI\citationsubjectcѲcommand.!FAnysuch lesmustthenbGeprocessedintoproperlyIformattedUTlistsusingmakeindexbGeforetheywillappearintheprinteddocument.^12IOnaUNIXorDOSsystemyouwouldtypGethefollowingforatabledeclaredwithItheUUexpGortextension.atbandtheinputextension.art:bmakeindex-scamel.ist-oTh lename i/.artTh lename i.atbIIf]thesub8jectassoGciatedwiththistableisarticle,_thetablecanthenbeplacedIinUUthedoGcumentforthenextL5ffA͉TU>'ExXrunusingthecommand:Xb\printcitationtable{article}.XWhentheoptionpisusedwiththe\citationsubjectcommandandthe Ii=숲ando=options,TthetablewillincludeanysectionorothernumbGersgivenasIoptionalqargumentsto\sourcecommandsinthedoGcument. BecausemakeindexIsortsalphabGetically*,)notnumerically,)thesectionnumbGersmaybGeoutoftheirIpropGerUUorderinthemakeindex-processed le.qThismustbecorrectedbyhand.ISffr J=w-:12LThe÷doExXWandtheCamelstyleengine.^13 Beforeyoustart,myouIshould'LhaveasoundknowledgeofBiDb32TU>ExX'primitives,[andoftheprogrammer'sIfunctionlibrarycontainedinthe lecamel.dtx.?+AYbibliographystyleconsistsofaI.bstꬲ le,a.cst leanda.cit le.N:The.bst leshouldproGduceentriessuitableIforUUdigestionbyCamelforalloftheBiDb32TU>ExXentrytypGessupportedbythestyle.XThemoGdulesoftheCamelsystemworktogetherinanintegratedfashiontoIformatcitations.GURawcitationdetailsarekeptin.bibdatabases.GUThefunctionofIthebCamelsystemistomassagethosedetailsintoformattedcitations,andincludeIthemٲinappropriateloGcationsintypesetpages.WhenadocumentinvokingtheICamelpackqageencountersa\citationstylecommand,>therelevqant.cstandI.citN> lesareloaded.\AMcorrespGonding\bibstyleentryisalsowrittenontheI.aux׻ le.Aי\citationdatacommandcausesarelevqant\bibdatacommandtoIbGewrittenthereaswell.+PIfa\bibliographymanagerdeclarationisusedinstead,6aI\bibdataޔentrycallingonthe lecamel.bibiswrittento.aux.J2Whena\sourceIcommandWisencounteredduringproGcessing,codeWcontainedincamel.stywritesIa0\citationentryforthatcitationonthe.aux le.e^Inthisway*,7anorthoGdoxsetIofUUentriesand lesforusewithBiDb32TU>ExXisgenerated.XIfaanexternalbibliographymanagerisused,the lecamel.bibmustbGecon-Ivertedintoavqalid.bib le,=pusingwhatevertoGolsfor ndingandreplacingkeyIentriesUUthedatabasemanagerhastoo er.XBiDb32TU>ExXmust(thenbGerunonthedocument.CThisreadstheentriesonthe.auxI le,͇opGensthe.bibdatabases,readsthem,andwritestheresultofitsruminationsIonѽa.bbl le.AtthispGoint,0theopGerationofCameldivergessharplyfromIthatofconventionalL5ffA͉TU>'ExXbibliographytoGols. ,QWithCamel,MBiDb32TU>EXpisusedIto1generate\lexibibentriesonthe.bbl le.\SuchentriesparsethecitationIintoURlogicaltypGesettingunits,QbutthetypGefacesusedwithintheunits,QandtheIpunctuationthatappGearsbetweenthem,(isnotdeterminedbyBiDb32TU>ExX.ThetasksIofopunctuationandtypGefaceselectionarecarriedoutonthesecondrunofL5ffA͉TU>'ExXIonthedoGcument,usingthedetailsspeci edinthe.cit lefortheCamelcitationIstyleUUbGeingused.XIt1tisworthspGendingsometimeponderingthisprogramming ow;thereareIgoGod5reasonsforspreadingtheformattingworkoveranumbGerofdi erentmoGdulesIinthisway*,anditisimpGortanttounderstandthedesignbeforeembarkingontheIdraftingUUofastyle.6I2.2gThe.߆T cmtt12.cst leITheUU.cst leshouldcontain,atleast,thefollowingmacros:I\@law@print:ThisisthemacrothatactuallyprintsthecitationsinthedoGcumentbandIinthebibliography*. ItsstructureisdiscussedbGelowinthecommentedIX-ffr J=w-:13LAsGofthiswriting,*hoÎwever,I'veGnotreceivÎedanyfeedbackonthewhetherthisdo'ExX,MandIdoGcumentation<(isessentialifproblemsthatarisearetobGesortedoutquicklyandIeciently*.XConcerningthe\@law@wordlistmacro,Z2itisbGesttoexaminetheexistingImacro*inlaw.dtx,3andreadtheuserdoGcumentationonthe\newinterwordcom-Imand.;EWiththisinformation,҂youshouldbGeabletomakeanychangesyourequireIinthebGehaviourofthelisttosuityournewstyle.BY*oushouldnotomititemsfromIthewlist|thisisimpGortanttomaintaincompatibilitybGetweenstyles.Y*oumayIwanttoaddtothelist,;andthisiswelcomed|dropanotetoF*rankBennettonIfb@soas.ac.uktoassurethatyournewadditionisincorpGoratedintothelaw.dtxIlist,UUwhichisusedasamoGdel,sootherswillincludeitintheirstylestoGo.XDraftingxthe\@law@printmacromaybGediculttoapproachat rst.qIfyouIexamineݾtheexampleinthelaw.dtx le,youmaybGesomewhatintimidatedbyIthesizeandcomplexityofthemacrolistedthere.ButinfactformoststylesIthisnmacroshouldbGereasonablysimpletowrite;thelaw.dtxexampleiscomplexIbGecauseitautomatesaverycomplexsetofstylerulesapplyingtolegalmaterials.XEssentially*,whatz\@law@printdoGesisprintacitationinaparticularformIaccording)toasetofconditionsthatcanbGerecognizedfromtogglesine ectwhenIthe/macroisrunbytheCamelengine.e-ThetogglesthatmaybGedrawnupGonareIdescribGed{here.nF*orfurtherinformation,studytheexampleinlaw.dtx|bearingIinUUmindthatyourownmacrowillprobablybGesimplertodraft.6I2.3gTogglesandho`oksforthe.cit leuTI2.3.1l#CitationThistoryIThisUUistrueduringthe rstexpansionofacitationnicknameinthetext. \if@law@firstuseofcite XThisjissettotruewhere(a)theauthor,title,source,pagejandcitationtrailerb\if@justaboveIareidenticalinthelastcitationusedinafoGotnoteandinthecurrentcitation,"(b)Ithe,lastcitationusedinafoGotnotewastheonlycitationinthatfootnote,4Dand(c)Iay:pinpGointwasnotusedinthepreviouscitationor,3iftherewassuchapinpGoint,IaUUpinpGointisalsousedinthecurrentcitation.XThisiissettotruewhere(a)\@law@justaboveissettrueand(b)apinpGointf\if@l@quiteexactIwasUUusedinbGothcitations,and(c)thepinpointsmatchexactly*.6I2.3.2l#F ormattingTtogglesuTIIfMthisistruethecitationshouldprint.Otherwiseitshouldnot.Itshouldalso \if@law@printciteItriggerUUsuppressionoffoGotnoteforcing.XIfUUthisistruethenameoftheauthorprints.9\if@law@printauthorXIfUUthisistruethetitleoftheworkprints.t\if@law@printtitle10 wsoXIfqthisistruethecitationshouldbGeprintedinitsfullform.Thisissettruef\if@law@longcite IbyUUthefoptiontothe\sourcecommand.6I2.3.3l#t9ypQefacesuTIThisisthetypGefacesetinthe.cit leforauthornames.1It,5andallother\@ltok@Ʋ\@ltok@authormainfaceIcontrolUUstringsaretokenregistersthatmustbGeexpandedusing\the.XThisfisthetypGefaceselectedbyenclosingtextintheauthorpGortionoftheS\@ltok@authoroptionfaceIcitationYwithin\\commandsinthecurrentcitation'stypGe(i.e.asde nedinitsI\newcitestyleUUentry).XTheUUtypGefaceusedforthetitleportionofthecitation.߀H\@ltok@titlemainfaceXTheUUalternative\\typGefacewithinthetitleargumentto\lexibib. \@ltok@titleoptionfaceXTheUUtypGefaceusedforthesourceportionofthecitation.̙\@ltok@citefirstmainfaceXTheUUalternativeforthesourcepGortionofthecitation.&\@ltok@citefirstoptionfaceXTheseo1twocommandsshouldbGede nedasfollowsinyour\@law@printcom-f\@law@firstslash \@law@secondslashImandbGeforecitationelementsareexpanded.aThiscouldbedonewithinCamelIitself,UUbutthisgivesyoualittlemorehands-oncontrolinstyledesignmaybGe.b\def\@law@firstslash{\begingroup\def\\{\@law@secondslash}%b\the\ltokspecialface}%b\def\@law@secondslash{\endgroup\def\\{\@law@firstslash}}%b\def\\{\@law@firstslash}%I2.3.4l#CitationTdetailsuTIThisactuallycontainsthetextthatisusedto ageitheranoteorapagenum- \@ltok@whereitsatIbGer(i.e.{\?note\}or{\?page\}).Thisisusedonlywherecitationcross-IreferencingUUisrequired.XThis&storesthecitationtypGeusedtodeclarethecitationwith\lexibib.bMThisf\@ltok@stylenameIismainlyusedforinternalpurpGosesbyCamel,butifyou'reprintingastyleorIproGofUUsheet,orarejusttryingtodebugastyle,youmayhaveauseforit.XThisUUstoresthenicknameofthecitation. 6\@ltok@nicknameXThisUUstorestheauthorpGortionofthecitation.b\@ltok@authorXThisUUstoresthetitlepGortionofthecitation. \@ltok@nameXThisUUstoresthesourcepGortionofthecitation.f\@ltok@citefirstXThisUUstoresthepagenumbGerUU(notH-thepinpoint!)qofthecitation. 6\@ltok@citepageXThisUUstoresthecitationtrailer. 6\@ltok@citelastXThisstoreseitherthepageorthefoGotnotenumberatwhichthecitation rst9\@ltok@pageorfootnoIoGccurred.I2.3.5l#BridgesuTIThisncontainsthepunctuationbridge,@declaredinthe.cit leforthecurrent \@ltok@atotIcitation|typGe,,thatistobeplacedbetween|theauthorandthetitleelementsofItheUUcitation.XThis,containsthebridgethatistobGeplacedbetween,thetitleandthesource.\@ltok@ttoconeXThis$#containsthe(singular)bridgethatgoGesbetween$#thesourceandthepage\@ltok@conetopInumbGer.XThisdcontainsthealternativepluralbridgethatgoGesbetweendthesourceand߀H\@ltok@conetoppluralItheUUpagenumbGer.XThiscontainsthebridgethatgoGesbetweenapagereferencegivingthelocation \@ltok@ptop11 soIofUUanarticle,forexample,andthepinpGointreference. XThiscontainsthebridgethatgoGesbetweenanypagenumbGersandthecitation\@ltok@ptoctwoItrailer.XThis0vcontainsthebridgethatgoGesbetween0vanabbreviatedcitation(i.e.Id.or 6\@ltok@atbridgeIsomesuch)UUandapinpGoint.XThisUUcontainsthepluralbridgeforabbreviatedcitations.Ʋ\@ltok@atbridgeplural6I2.3.6l#PinpQoin9tTprintinguTITheCpinpGointinformationiscontainedinthetokenregister\@ltok@argtwo.T*ob\@law@barkillIprintthepinpGoint,3.youshouldalwaysusethefollowingform,3.whichwillinduceItheUUcorrectbGehaviourofthestringexpansionenginewithinCamel.b\@law@barkill\the\@ltok@argtwo\relax6I2.4gThe.cit leIThe.cit leshouldcontaininstancesofthe\newcitestylecommandandasso-Iciated:arguments.RiThisde nesaCamelstyleinstanceforeachoftheentrytypGesIsuppGorted|bythestyle's.bst le.LIfyou nditnecessarytoaddanewentrytypGeItodthestylede nedinthe.bst leforyourstyle,hyoumustalsode neaCamelIstyleUUinstanceinthe.cit leapplyingtothisnewentrytypGe.12  WsoXTheQcargumentstothe\newcitestylecommandhavethefunctionsdescribGed IinUUthefollowingfoGotnotedillustration:ˍXxbffG̠6 ;ffz܍\newcitestyle{article-=a*}% {rsirsr-=b6A-=c}% {[a],\-=d G[t],\-=d ] [c]\-=d[p],\-=d(pl),\-=d[rp]\-=d[e]:[id]\at~-=d(pl)\at~-=d[xrf]}% {6}-=e%{{#1}-=f7{#2}-=f{#3}-=f{#4}-=f{#5}-=f{(#6)}-=f}% ffff} @ .`-:/t}\cmti7aLThisXgivÎesthenameofthecitationtemplatetobasetoffunctionsforthemanipulationof eldspushedontothestackinIthe?8entrytypGefunctionsthemselves.jhThisapproachincreasesthetransparencyofIyour٦coGde,cbecauseyoucanseeintheentrytypGefunctionitselfexactlywhat eldsIarefbGeingused,kandwhatlogicalandformattingoperationsarebeingcarriedoutIonUUthem.XUsingtthelibraryishighlyrecommended.2Ifyou ndthatyourequirefunctionsIthat9narenotpresentlyavqailableinthelibrary*,r6youcanmakeyoursolutionsavqailableItoothersbyadheringtoafewdesignguidelines,andpassingthefunctiononItoEfb@soas.ac.ukforinclusionintheCameldistribution.C9TheguidelinesareIactuallygquitesimple.Nolibraryfunctionshoulddirectlymanipulatea eld,ktbutIshould-insteadexpGectto ndthe eldonthestackwhenitisinvoked.dNolibraryIfunctionHshouldmakeassumptionsabGoutthesettingofvqariables;LanyparametersIshouldױalsobGepassedtothestackbeforethelibraryfunctionisinvoked.WhenI nished,{a@libraryfunctionshouldalways@leavea xednumbGerofitemsontheIstack,iin a xedorder.Y:AndalibraryfunctionshouldnotpassdatatosubsequentIfunctionsintheformofvqariables. 4Finally*,Q'afunctionshouldbGedocumentedIconcerning(a)thenumbGerofitemsitexpectsto ndonthestack,4andinwhat13\soIorder,(b)ZthenumbGerZofitemsitleavesZonthestack,andinwhatorder,and(c) ItheUUe ectofanytogglestringsthatmaybGefedtothefunction.XY*oumay nditnecessary,(indraftingafunction,todivideitsopGerationintoIsub-functions.kAsьbGetweensub-functions,thebanonpassingdatathroughvqari-IablesUUneednotbGefollowed,UUsolongasthesetoffunctionsadherestotherule.6I2.5.2l#AbQoutTcross-referencinguTIAbGoutUUcross-referencing,OrenPatashnikwrote:bNowcomethecross-referencingfunctions(theseareinvokedbGecauseboneentryinthedatabase le(s)cross-referencesanother, bygivingthebother Aentry'sdatabasekeyinacrossref eld).Thisfeatureallowsbone^ormoretitledthingsthatarepartofalargertitledthingtocross-breferenceUUthelargerthing.qThesestylesallowfor vepGosibilities:k81.xanUUarticlemaycross-referenceanarticle;k82.xaUUcross-referencetoabQookUUmaybGemadeinanentryfor:x(a)3aUUbQook;x](b)3anUUin9bQook;oryzN(c)3anUUincollection;andk83.xanUUinproQceedingsmaycross-referenceaproceedings.bEachUUoftheseisexplainedinmoredetaillater.XThisGistheauthoritativestatementonthepropGeruseofcross-referencingwithin IaVi.bib le.ThefurthercommentsIV(havetoo erhereareanon-authoritativegloss,Ibut}doaccuratelyre ecttheassumptionsIomadeinwritingthe.bstcoGdefortheIlaw.dtxUU le.Iarticle:uAcross-referencefromonearticleentrytoanothermaybGeusedforbspGecial#issuesofajournal,Wsuchasthosededicatedtoasingletopic.xThebreferencedentryshouldincludealldetailsrelevqanttotheissueasawhole,bincludingvolume,journalandbooktitle(thislastforthenameortopicbdescriptionofaspGecialissue),andtype(thisdefaultsto\Special?issue").Ibook:f1Thislcross-referenceisnotrecognizedbythelaw.dtxstyle. Itcouldlogi-bcallybGeusedforaseries,ǐbutthisislittletroubletotypeintotheoriginalb@bookQentryitself,-andaseriesisnotsomethingthatshouldappGearsepa-bratelyUUonthereferencelist.Iinbook:pThis!isusedforcross-referencingachapterorothersubGdivisionwithinabworkUUbyasingleauthortothatwork.Iincollection:1Thisisusedforcross-referencingaworkbymultipleauthors.bTheN7typGefaceconventionsusedintheBlueBoGokstyledi erforinbookandbincollection'citations,asde nedhere,sothisdistinctionshouldbGehon-boredUUinbuildingadatabase.Iinproceedings:qThis*isusedonlycross-referencingarticlesappGearingtoapro-bceedingsUUvolumetothatvolume.14"soI3aLTheffCitationEngine:320߆Tff cmtt12camel.styI3.1gInitializationuTI3.1.1l#Hello!IT*oUUstartthingso ontherightfoGot,wetelltheworldwhoweare. Ls1Sh1ow cmss9lexitex!i Ls2S\NeedsTeXFormat{LaTeX2e}[1994/12/01]\ProvidesPackage{camel}Ls3S[1997/02/17v1.0tGeneralbibliographyengine(FrankBennett)]Ls4S\@ifclassloaded{ltxdoc}{}{\RequirePackage{index}[1995/09/28]}Ls5S\RequirePackage{keyval}[1995/09/21]Ls6S\RequirePackage{overword}lI3.1.2l#CustomizableTtextelemen9tsuT"\supraIThefollowingde nitionspGeci esthestringusedtorefertoacitethatoccursina IpreviousbfoGotnote,orinaprecedingcitationtothesamesourcewithinthesameIfoGotnote.VItisnotusedincross-referencingcasesandstatutes.TheextrainternalIbracesonlyservetolimitthescopGeof\em.BAnitalicspace(\/)isnotadded,sinceIthisUUmightbGefollowedbyapGeriod.Ls7S\def\supra{,{\emsupra}}%&IThe\Idmacrode nedhereisusedinreferringtoimmediatelyprecedingworks,IingthesameorinaprecedingfoGotnote.IfthecontextdemandsthatId.bGelowerIcase2whenitoGccurs,jKtheusercanswitchittolowercasebyentering\lowcaseIimmediately+bGeforeanin-textcitationdeclarationorcitationnickname..ThelowerIcase umacrothusinvokedturnsitselfo afterid.&hasprinted,8sonogroupingisIrequired.Ls8S\def\Id{{\em\@law@lettercaseId.}}% IThese+!twotokensholdthetextusedtoindicatethenoteorpagenumbGerwhereaIpreviousUUreferenceoGccurs.qTheseareonlyusedinshort-formcitations.Ls9S\newtoks\@ltok@userconetop% I10S\newtoks\@ltok@userconetopplural%I11S\newtoks\@ltok@userptop%I12S\newtoks\@ltok@userptoctwo%I13S\newtoks\@ltok@useratbridge%I14S\newtoks\@ltok@useratbridgeplural%I15S\newtoks\@ltok@usercitefirstI16S\newtoks\@ltok@usercitepageI17S\newtoks\@ltok@usercitelastI18S\newtoks\@ltok@infoot\@ltok@infoot={\note\}I19S\newtoks\@ltok@onpage\@ltok@onpage={\page\} IThe~followingtokensareusedinmakingproGofsheets.=Changethecontentofthese ItoUUtaste.I20S\newtoks\@ltok@proofcitelastI21XdD\@ltok@proofcitelast{{Editor,publisherandstuff,1994}}I22S\newtoks\@ltok@proofpageI23XdD\@ltok@proofpage{{12345}}I24S\newtoks\@ltok@proofciteoneI25XdD\@ltok@proofciteone{{Source}}I26S\newtoks\@ltok@prooftitle15/soI27XdD\@ltok@prooftitle{{Titleofwork}} I28S\newtoks\@ltok@proofauthorI29XdD\@ltok@proofauthor{{Author'sname}}6I3.1.3l#UserTselectableswitc9hesuTIThebBlueBoGok^14 Hallowsustorefertostatutesinalongformorashortformin IsubsequentAreferences.NThelongformconsistsofthenameoftheAct(ifany)plusIitsusourcedetailsandthesectionnumbGer.'TheushortformconsistsofthesourceIdetailsalone.^15 ҲI'mallinfavourofsavingink;thedefaultisforshortformstatuteIcitations.3Y*oupcanhaveplongformsubsequentcitesbysetting\statuteverboseonIatPthetopofyourdoGcument.p:Ifyouneedsomeotherform,Qletmeknow;R;statutesIarejcomplex,pPandratherthantryingtodoeverythingfromtheget-go,thisreallyIhasUUtobGedemandled.I30S\global\let\@law@delim\relax I31S\global\let\@law@pingroup\relaxI32S\global\let\@law@pinstart\relaxI33S\global\let\@law@pinend\relaxI34S\newif\if@law@statuteverboseI35S\def\statuteverboseon{\@law@statuteverbosetrue}I36S\def\statuteverboseoff{\@law@statuteverbosefalse}I37S\statuteverboseofff\forcefootnotesIThismfunlittleitemisusedtotogglethe\sourcemacrostocreateafoGotnoteif InoneBswastypGedliterallyintothetext.9 Great nger-saverforshortiefoGotnotes.IConceived;onawhim,)@implementingthisturnedouttobGenon-trivial._iI-hopeyouI ndUUituseful!I38S\newif\if@law@forcefootnotes I39S\def\forcefootnotes{\global\@law@forcefootnotestrue}I40S\def\noforcefootnotes{\global\@law@forcefootnotesfalse}6I3.1.4l#ShorthandingTessen9tialsuTITheׂfollowingde nitionsareestablishedasameansofcuttingtextusingthe_, I^5and|characters. Althoughwemakethemactivehere,mtheyarenot(readasIactive3characters.GCamelshouldinnowayinterferewithstylesthatrequiretheseIcharacterstobGesetactive.TheactivecharacterscreatedhereareusedonlyforI\internalUUpurpGoses".I41S{ I42XdD\catcode`\_=13I43XdD\catcode`\^=13I44XdD\catcode`\|=13I45XdD\gdef\@law@barkill{\def\@law@comma{,}%I46*f\def\@law@ampersand{\\&}%I47*f\def\@law@dash{--}%I48*f\def\@law@delim{}\def_##1_{}\def|##1\relax{}\def^{}}%I49XdD\gdef\@law@barnil{\def_{}\def^##1^{}\def|{}}I50XdD\gdef\@law@barinfull{\def^{}}I51XdD\gdef\@law@barinshort{\def^##1^{}}Iffffr J=w-:14LAUnif}ormSystemofCitwwationX(19thed.1989). >w-:15LSeeXId. U`atX25.16;soI52S}I53S\def\bridges#1#2#3#4#5#6{% I54XdD\@ltok@userconetop{#1}%I55XdD\@ltok@userconetopplural{#2}%I56XdD\@ltok@userptop{#3}%I57XdD\@ltok@userptoctwo{#4}%I58XdD\@ltok@useratbridge{#5}%I59XdD\@ltok@useratbridgeplural{#6}%I60S}6I3.1.5l#MiscellaneousTothermacrosuTISometimesqitmightbGenicetoavoidusing--forsomereason,9soamacroisde ned Ihere.1fSame2thingforexclamationpGoints.OnepGossibleuseforthelatteristoavoidIerrorsUUwhenanexpGortedtableissortedbymakeindex.I61S\def\dash{--} I62S\def\exclaim{!}%IThe\IdmacrocontainsitsownpGeriod. ThereforeapGeriodsuppliedbytheuserIbGecomesp redundant.'Thismacroisrede nedtogobblethisextraperiodwhenInecessary*.I63S\def\@law@gobble{} I64S\def\@law@argtwolist{}IIfVyouareintosoftwarehistory*,WyoumighthavecausetorefertoLfhezMx loI TU>oExX(Y,WsoitsIlogo&andtheLfhezMx li Bib%%qlogo(alsoR.I.P*.)arede nedhere.G Theyare\protectedjustIlikeUUtheL5ffA͉TU>'ExXlogo.I65S\def\p@LexiTeX{{\reset@font\rm\\unskip\hbox{L% I66XdD\kern-.06em\hbox{\sce}%I67XdD\kern-.05em\hbox{\scx}%I68XdD\kern-.05em\lower.65ex\hbox{I}%I69XdD\kern-.18emT%I70XdD\kern-.1667em\lower.65ex\hbox{E}%I71XdD\kern-.125emX}}}%I72S\def\LexiTeX{\protect\p@LexiTeX}%I73S\def\p@LexiBib{{\reset@font\rm\\unskip\hbox{L%I74XdD\kern-.06em\hbox{\sce}%I75XdD\kern-.05em\hbox{\scx}%I76XdD\kern-.05em\hbox{\sci}%I77XdD\kern-.06em{\scB}%I78XdD\kern-.05em\hbox{\sci}%I79XdD\kern-.05em{\scb}}}}%I80S\def\LexiBib{\protect\p@LexiBib}%6I3.1.6l#NewTen9vironmentuTITherefisjustonenewenvironmentfinCamel,k\andallitdoGesissetthelist-input ItoggleUUtotrue,sothatinputcitationswillfeedintomemorybutnotprint.I81S\newenvironment{lexilist}%I82S{\message{Loadingcitationdata}\@law@listinputtingtrue}%I83XdD{\@law@listinputtingfalse}17HcsoI3.1.7l#T ok9enTregistersuTITheUUfollowingareusedastempGorarytokenregistersinvqariousplaces.I84S\newtoks\@ltok@a I85S\newtoks\@ltok@bI86S\newtoks\@ltok@argtwoI87S\newtoks\@ltok@pagesstringITheDfollowingtokenregistersareusedfortempGorarystorageoftypGefaceinforma- Ition.I88S\newtoks\@ltok@authormainfaceI89S\newtoks\@ltok@authoroptionfaceI90S\newtoks\@ltok@titlemainfaceI91S\newtoks\@ltok@titleoptionfaceI92S\newtoks\@ltok@citefirstmainfaceI93S\newtoks\@ltok@citefirstoptionfaceI94S\newtoks\ltokspecialfaceIOnetokenregisterisneededtostorethenameofthecurrentcitetypGe(asdeclared Iusingq\newcitestyleinthe.cit le).%Withthisstringinhand,iallofthetypGefaceIandUUpunctuationbridgeinformationcanbGerecoveredUUforthattypeofcitation.I95S\newtoks\@ltok@citetype%IT*okens$tostoreinfoonwhetheraciteisinafoGotnoteorinthemaintext,XandItheUUnameofthecitestyle,incaseweneedit.I96S\newtoks\@ltok@whereitsat I97S\newtoks\@ltok@stylenameIHo-hum.HNowٖwe'regoingtoneedabunchoftokenregisterstostashtheinforma-Itionskforacite. T*okenregistershavetobGeusedinprocessing,zinordertoprovideIexpansionUUcontrol.I98S\newtoks\@ltok@nickname I99S\newtoks\@ltok@authorE100S\newtoks\@ltok@nameE101S\newtoks\@ltok@citefirstE102S\newtoks\@ltok@citepageE103S\newtoks\@ltok@citelastE104S\newtoks\@ltok@pageorfootnoE105S\newtoks\@ltok@hereinafterE106S\newtoks\@ltok@bigsourceciteE107S\newtoks\@ltok@bigsourcepageIW*eUUalsoneedtokenregistersforcitationbridgeinformation.E108S\newtoks\@ltok@atotE109S\newtoks\@ltok@ttoconeE110S\newtoks\@ltok@conetopE111S\newtoks\@ltok@conetoppluralE112S\newtoks\@ltok@ptopE113S\newtoks\@ltok@ptoctwoE114S\newtoks\@ltok@atbridgeE115S\newtoks\@ltok@atbridgepluralE116S\newtoks\@ltok@plistmacroIAJcountermisrequiredtokeeptrackofthenumbGerofcitesinafootnote,sandto IstoreUUthenumbGerUUthatoccurredinthepreviousfootnote.18RʠsoE117S\newcounter{citesinfoot} E118S\newcounter{citeslastfoot}E119S\newcounter{law@paranormal}E120S\newcounter{law@parapin}E121S\newcounter{law@paracounter}6I3.1.8l#P9eek-word-aheadTmacrouTIThis=macrowillnotworkifitisplacedafterthestringof\newifsbGelow.:Ihaven't Iapclueastowhy*.I'mleeryofwhetherthiswillcauseproblemswithotherstyles.IIfUUyouhaveproblems,contactmeonfb@soas.ac.uk.I3.1.9l#IfTinitializationsuTIW*eneedatogglesowecanturntheprintroutineonando ;1thisisnecessaryforIlistWinputting,$andformakingphantomreferencestosourcesinordertohandleIweirdUUcitationforms.E122S\newif\if@law@biblabels E123S\newif\if@law@usepagesE124S\newif\if@law@tableE125S\newif\if@law@usepinpointsE126S\newif\if@law@maketableE127S\newif\if@law@printciteITheUUnextoneisusedbythelist-inputenvironment.E128S\newif\if@law@listinputtingE129S\newif\if@law@bibentryIW*eAaalsoneedtoknowwhetheracitationisbGeingusedforthe rsttime.k!Insome Istyles,UUthe rstcitationistreatedspGecially*.E130S\newif\if@law@firstuseofciteIThenextifwillbGeusedtotoggletheprintroutinebetweenlongandshortcitation Iforms.E131S\newif\if@law@longciteIThisUUwilltelluswhetherweareinafoGotnoteornot.E132S\newif\if@law@infootITheWnext\ifwillletusknowifthesameworkwascitedimmediatelybGeforethe Icurrentycite,andifso,whetherweshouldpayanyattentiontoapagereference,IifUUgiven.qTheseareadjustedby\law@justabovecheck.E133S\newif\if@justabove E134S\newif\if@l@quiteexactIThenextconditionwillcontrolthewayprintoutputisdoneinshortcitationIforms;y6it–shouldsettofalseforarticlesandbGooks,and–totrueforcasesandIstatutes.E135S\newif\if@nosupraIThepnextisusedtosignalthepresenceof++astheargumentlinkingareferenceItoXQapage/sectionnumbGerXQargument.zThistogglespluralbridgeson,YandtellstheI letoutputroutinethat, forstatutes,eachsectionnumbGershouldbeattachedtoaIcompletecopyofthecitationinformation.T4ThesecopiesarelaterreassembledinIaUUsetoftableentriesbymakeindex.19]soE136S\newif\if@law@printauthor% E137S\newif\if@law@printtitle%E138S\newif\if@law@requiresubjects%E139S\newif\if@law@subjectfound%6I3.1.10qMacroTinitializationsuTIThe@followingisagrab-bagofsmallmacroswithsimplefunctions.jThereismore Ito3sayabGoutwhatothermacrosusethemforthanabouttheythemselves,:soI'veIputUUtheminthefrontmatterofthecoGde.XFirst|Pisalittlesomethingtoforcealowercase|Pid.淲ifnecessary*.TheopGerationIof \normcaseisobviousenough;itde nesthecase-switchingmacrotoano-op.I\lowcasemUworksbysettingthecasetoggletoforcealowercaseletter.TheuseofI\aftergroupallowseverythingtobGeturnedbackonwithoutlosingthelowercaseIletter.qThisUUwasdesignedbytrialanderror;theremaybGeabetterway*.E140S\def\normcase{\def\@law@lettercase{}} E141S\def\lowcase{\def\@law@lettercase##1{%E142]{\aftergroup\normcase\lowercase{##1}}}}E143S\normcaseIThe"followingthreede nitionsareusedinpreparingtoprintacitationusing I\@law@printSandinprintingpinpGointreferences,respGectively*.The rstextractsIademandforpluralbridges,ifpresent.ZThesecondisano-op.ThethirdistheIpluralUUbridges agitself.E144S\def\@law@multicheck#1\@law@multiflag#2\query#3\end{#2}% E145S\def\@law@multiflag#1\query{}%E146S\def\@law@multiset{\global\@ltok@conetop\@ltok@conetopplural%E147p\global\@ltok@atbridge\@ltok@atbridgeplural}ITher\newinterwordmacrosimpleaddsitsargumentstothe\@law@wordlist ImacroUUcreatedbytheCamelstylemoGdule(i.e.the*.cit le).E148S\def\newinterword{\begingroup\catcode`\_=13\catcode`\^=13%E149]\@law@newinterword}E150S\def\newinterword#1#2{\global\@ltok@a=\expandafter{\@law@wordlist}%E151]\global\@ltok@b={#1}\global\@ltok@c={#2}%E152]\xdef\@law@temp{\noexpand\\\noexpand{\the\@ltok@b\noexpand}%E153f\noexpand{\the\@ltok@c\noexpand}\the\@ltok@a}%E154]\global\let\@law@wordlist\@law@temp\endgroup}ITheCamelnicknamemacrosarenowkeptoutofthenamespacebyexecuting Ithemvia\csname\endcsname, andaddingapre xthatmakesthemacroinacces-Isible`CbydirectreferencewithinthedoGcument.ThischangewasrecommendedbyIa8user|sorryoutthere,=I7can'tremembGerwho!hNotethatanynicknamecannowIcontainWmnumbGersandotherstu ,Wwhichishandyforcases,WwhichshouldbGeorga-Inizedaccordingtodecidingcourtanddate.ZIfin-textreferencesarebGeingforcedIintokfoGotnotes,q thefootnotetogglesaresettotruehere;vthefootnoteitselfiscre-Iatedlater,afteranyoptionalargumentshavebGeengobbled.4NotethatfootnoteIforcingwillonlytakee ectfor\sourcecitations,notforin-textdeclarations.M^W*eIneed}>anewcounterforfoGotnotes,9sothatwecankeeptrackoffoGotnotenumbGersIwhileUUproGcessingforcedfootnotesoutsideofthefootnoteenvironment.E155S\newcount\c@law@footnote% E156S\def\volno{\message{(Novolumefor\the\@ltok@nickname)}}%20hݠsoS\@law@getsubjectheaderIThis"macroisusedtograbtheheaderappropriatetoagivendeclaredsub8ject. IThe5sub8jects,oheadersandotherrelatedinformationarekeptinasinglelistmacroIforUUquickaccess. E157S\def\@law@headersearchend{\camelrefname} E158S\def\@law@abandonheadersearch#1\@law@headersearchend{}E159S\def\@law@headersearch#1#2#3#4{%E160]\def\@law@temptwo{#1}%E161]\ifx\@law@temp\@law@temptwo%E162ap\let\@law@headersearchend\relax%E163ap\let\\=\@law@abandonheadersearch%E164ap{}#3%E165]\fi}E166S\def\@law@getsubjectheader#1{%E167]{\def\@law@temp{#1}%E168]\let\\=\@law@headersearch\@law@subjectlist\@law@headersearchend}}E169S\let\@law@bibformatsearchend\relaxE170S\def\@law@abandonbibformatsearch#1\@law@bibformatsearchend{}E171S\def\@law@bibformatsearch#1#2#3#4{%E172]\def\@law@temptwo{#1}%E173]\ifx\@law@temp\@law@temptwo%E174ap\let\\=\@law@abandonbibformatsearch%E175ap{}#4%E176]\fi}E177S\def\@law@getbibformat#1{%E178]{\def\@law@temp{#1}%E179]\let\\=\@law@bibformatsearch\@law@subjectlist\@law@bibformatsearchend}}Ʋ\@law@confirmsubjectIThisoparserchecksowhetheragivensub8jectexistsinthelistofdeclaredsubjects. IItUUtakesnoaction,onlyissuesawarning.E180S\def\@law@subjectsearchend{%E181]\ifx\@law@citesubject\empty%E182ap\@camel@error{Nosubjectdeclared.^^JE183fAfterdeclaringasubjectorsubjectsusingE184f\string\citationsubject,^^JE185fyouhaveneglectedtogiveasubject(usingthes=option)^^JE186fforoneofyour\string\source\spacecommands}\@ehc%E187]\else%E188ap\@camel@error{Undeclaredsubject`\@law@citesubject'.^^JE189fAnundeclaredsubjecthasbeengivenasanargumenttoE190fa\string\source\spacecommand.^^J s,Youmustfirst%E191fdeclaresubjectsusing\string\citationsubject}\@ehc%E192]\fi}E193S\def\@law@abandonsubjectsearch#1\@law@subjectsearchend{}E194S\def\@law@subjectsearch#1#2#3#4{%E195]\def\@law@temptwo{#1}%E196]\ifx\@law@citesubject\@law@temptwo%E197ap\let\@law@subjectsearchend\relax%E198ap\let\\=\@law@abandonsubjectsearch%E199]\fi}E200S\def\@law@confirmsubject{%E201]{\let\\=\@law@subjectsearch\@law@subjectlist\@law@subjectsearchend}}&\@law@maybeaddcitesubjectIThisq8macroaddsthenicknameofthecurrentcitationtothelistofnicknames Iunderthecurrentcitationsub8ject.ItwillonlydothisifthenicknamedoGesnot21wsoIalready?existinthelist.1Thee ectistokeepthelistsincitationorder.Note IthatgacitationmaybGelistedundermorethanonecitationsub8ject.ThismaybGeIuseful,UUsoitisnotprevented. E202S\def\@law@citesubjectcheckend{% E203]\expandafter\let\expandafter\@law@temptwo%E204ap\csname@law@\@law@citesubject@citelist\endcsname%E205]\@ltok@a=\expandafter{\@law@temptwo}%E206]\expandafter\xdef%E207]\csname@law@\@law@citesubject@citelist\endcsname{%E208f\the\@ltok@a\noexpand\\%E209]\noexpand{\the\@ltok@nickname\noexpand}}}E210S\def\@law@abandoncitesubjectcheck#1\@law@citesubjectcheckend{}E211S\def\@law@citesubjectcheck#1{%E212]\def\@law@temptwo{#1}%E213]\ifx\@law@nickname\@law@temptwo%E214ap\let\@law@citesubjectcheckend\relax%E215ap\let\\=\@law@abandoncitesubjectcheck%E216]\fi}E217S\def\@law@maybeaddcitesubject{%E218]{\let\\=\@law@citesubjectcheck%E219]\csname@law@\@law@citesubject@citelist\endcsname%E220ap\@law@citesubjectcheckend}}(IThere{aretobGethreesetsofspecializedparsingmacrosinLexiT*eX,allthreeof Iwhichareusedontheoptionstothe\sourcecommand.=[OneparserreadsalistofIoptions.)The}secondreadsacomma,&,and}-delimitedlistandwritesthecontentsIasamacroargument.dThethirdreadsthesamecomma,%/&and-delimitedlistIandUUprintsitdirectlyontheoutputafteraslightamountofformattingwork. L\@law@ploneIDoGesUUacomparison,executestheassociatedoptionifthereisamatch.E221Sh+oldpa9rse&Ri7'ExXdemandsthatmacrosbGeused,it'snotmuchofaIjobUUtochangethings;bGemyguest.E295S{\catcode`\_=\active% E296XdD\catcode`\^=\active%E297S\gdef\@law@checkins{%E298]\def^##1{\lowercase{##1}}\def_##1{{\em{##1}}}%24rsoE299]\let\@law@tempthree=\\% E300]\let\@law@nomatch=\@law@wlnomatch%E301]\let\\=\@law@scanlist\@law@wordlist%E302]\let\\=\@law@tempthree}E303S\gdef\@law@checkpre{%E304]\let\@law@tempthree=\\%E305]\let^\relax\let_\@gobble%E306]\let\@law@nomatch=\@law@wlnomatch%E307]\let\\=\@law@scanlist\@law@wordlist%E308]\let\\=\@law@tempthree}E309S}3P\sourceIThe!frontendofthe\sourcecommandisverymuchadlatypicalLaT*eX!optional Icommandfde nitionstu .@W*ejustcarrythingsalittlefurtherbGecausethereareItwoUUpGossibleoptionstothe\sourcecommand. UE310S\gdef\source{% E311]\if@law@requiresubjects%E312f\gdef\@law@citesubject{}%E313]\fi%E314]\@law@printcitetrue%E315]\@law@printauthortrue%E316]\@law@printtitletrue%E317]\setcounter{law@parapin}{0}%E318]\setcounter{law@paracounter}{0}%E319]\@ifnextchar[{\@lexicite}{\@lexicite[]}}E320S\def\@lexicite[#1]#2{\@ifnextcharcareful[{%E321]\addtocounter{law@parapin}{1}\@@lexicite{#1}{#2}}%E322]{\@@lexicitenobrace{#1}{#2}}}UIOnceZwe'vegatheredupanyoptionalarguments,it'stimetousethe\@ifoverword Icommand.QIfwe nda\sourcecommandafterthenextword,westashtheIcurrent cite, wecheckthewordseparatingthetwo\sourcecommandsagainstanIinternallist,returntheresultto\@SBSword,andpushtherawcitationdetailsandIthe@SBSwordbridgeontoatempGorarystack.U>Otherwise,weclearthe\@SBSword,Ipushthecurrentcitedetails,dumpthestack,andputthewordwefound,togetherIwithUUanyseparatingspace,backontheoutputstream.E323S\def\@ifnextcharcareful#1#2#3{% E324]\gdef\@prenextcharspace{}%E325]\let\reserved@e=#1\def\reserved@a{#2}\def\reserved@b{#3}\futureletE326f\reserved@c\@ifnchcareful}E327S\def\@ifnchcareful{\ifx\reserved@c\@sptoken\let\reserved@d\@xifnchcarefulE328p2\else\ifx\reserved@c\reserved@e\let\reserved@d\reserved@a\elseE329\let\reserved@d\reserved@b\fiE330p2\fi\reserved@d}E331S\def\:{\@xifnchcareful}E332S\expandafter\def\:{%E333XdD\gdef\@prenextcharspace{}\futurelet\reserved@c\@ifnch}E334S\def\@@lexicite#1#2[#3]{%E335]\@ifoverword\source%E336f{\@law@checkins\@@@lexicite{#1}{#2}{#3}}%E337f{\gdef\@SBSword{}\@@@lexicite{#1}{#2}{#3}%E338p2\@law@citedump{}%E339p2\@preoverwordspace%E340p2\expandafter\@law@gobble%25XsoE341p2\@overword{}}% E342f{\gdef\@SBSword{}\@@@lexicite{#1}{#2}{#3}%E343p2\@law@citedump{}%E344p2\@preoverwordspace%E345p2\expandafter\@law@gobble%E346p2\@overword{}}}E347S\def\@@lexicitenobrace#1#2{%E348]\@ifoverword\source{\@law@checkins\@@@lexicite%E349p2{#1}{#2}{}}%E350f{\gdef\@SBSword{}\@@@lexicite%E351p2{#1}{#2}{}%E352f\@law@citedump{}%E353f\@prenextcharspace%E354f\expandafter\@law@gobble%E355f\@overword{}}E356f{\gdef\@SBSword{}\@@@lexicite%E357p2{#1}{#2}{}%E358f\@law@citedump{}%E359f\@prenextcharspace%E360f\expandafter\@law@gobble%E361f\@overword{}}}IT*ogpushcitationdetails,lweuseatokenassignmentwith\expandafter,lthenan I\edefUUoftheregistercontentsUUtogetonelevelofexpansionintoamacro.E362S\def\@law@citestack{}%E363S\gdef\@SBSword{}%E364S\def\@@@lexicite#1#2#3{%E365XdD\@ltok@a=\expandafter{\@law@citestack}%E366XdD\@ltok@b={\@realcite{#1}{#2}{#3}}%E367XdD\@ltok@c=\expandafter{\@SBSword}%E368XdD\edef\@law@citestack{\the\@ltok@a\the\@ltok@b\the\@ltok@c}}$\footnoteIW*ekhneeda agtotelluswhetherweareinafoGotnote.ThisallowsustopreventIfoGotnoteforcingifwe'realr}'eadyinafootnote.L5ffA͉TU>'ExXitselfshouldprobablytakeIcareofthis,butfornowweneedtogiveitahelpinghandbyreinvokingthecriticalIcommandwithApGologiestotheL5ffA͉TU>'ExX3teamandeverything, butIreallytrulyIdoUUneedthesehoGoks.XSome=;thoughtsonthetrackingofpreviouscitations.jThisishardlytransparent,IandevenIrtheauthorhavetroublefollowingit.-Somethingfortidyingupsomeday*.ICurrentciteissetonlyatthetopofafoGotnote. TheideaapparentlyisthatweIneed,toremembGerthelastciteinthelastfootnotealways.pProblems,towatchIhereܸare(a)whathappGensforthevery rstfootnote,and(b)whathappensintheImainetext."ThereshouldprobablybGecompleteisolationofthesecontextrecordsIforUUmaintextreferencesandfoGotnotereferences.E369S\long\def\@footnotetext#1{\insert\footins{%E370XdD\@law@infoottrue%PR%HooksforcitationmanagerE371XdD\ifnum\the\c@citesinfoot=1\relax%=l%E372]\global\let\@law@lastcite\@law@currentcite% s,%E373XdD\else%p%E374]\gdef\@law@lastcite{\@dummy}%K`%E375XdD\fi%r%E376XdD\global\setcounter{citesinfoot}{0}%EndofhooksE377f\reset@font\footnotesize26|soE378f\interlinepenalty\interfootnotelinepenalty E379f\splittopskip\footnotesepE380f\splitmaxdepth\dp\strutbox\floatingpenalty\@MME381f\hsize\columnwidth\@parboxrestoreE382f\let\@tempa\protectE383f\def\protect{\noexpand\protect\noexpand}%E384f\edef\@currentlabel{\csnamep@footnote\endcsname\@thefnmark}%E385f\let\protect\@tempaE386f\color@begingroupE387p2\normalcolorE388p2\@makefntext{%E389yw^\rule\z@\footnotesep\ignorespaces#1%E390f\@finalstrut\strutbox}E391f\color@endgroup}}IW*e;requireasimpleparsertoallowmultiplecitationkeysinthescopGeofasingle I\source$command.aW*eignoreanypinpGointgivenafterthe\sourcecommand;5ifIyou'reusingpinpGoints,writeindividual\sourcecommandsintoyourtext.ThisIkeepspthingsrelativelycleanandsimple, vforfuturelinkingtointelligenteditors.IThevoidingof\@ltok@argtwoisgoingtobGeredundantiftherearemorethantwoIkeysinthescopGe,ʙbutwhattheheck,ʙit'ssimplethisway*.7InterveningpunctuationIisassumedtobGethe\default",hwhichissigni edbythe;character.)NotethatIany=%leadingoptionswillcarrythroughtoallEofthecitationsinthekeystring!IIf"youwanttosuppresstheauthor,V say*,for"onlyonecitation,V you'dbGetteruseIa)separate\sourcecommandforthatcitation,^andlinkittothestringwithanIinter-word.E392S\def\@law@clparseplain#1,{% E393]\@ifnextchar,%E394f{\def\@law@temp{\@law@onerealcite{#1}}%E395kJ\expandafter\@law@temp\@gobble}%E396f{\@law@onerealcite{#1}%E397f{\long\def\@overword{;}\@law@checkins%E398kJ\@SBSword\gdef\@SBSword{}}%E399f\@@parse}}XWhenEcitationsaredumpGed,Lweneedtodecidewhatsortofdelimitersthey Ireceive.B/IffoGotnoteforcingisine ect,+weneedtoprotectagainstthepGossibilityIthat~[we'realreadyinafoGotnote.The\@citedumpcommandshouldberede nedIforstylesthatbracketcitationstringsin,Ώsay*,squarebrackets.9ThefollowingcoGde,ItheI\@law@printcitecommandandthecontentsIofthelexicite.tex leareItheonlychunksofthestylethatneedmoGdi cationtogeneratedi erent|pGerhapsIradicallyךdi erent|styles.GThestrategyusedheretoforcefoGotnotescouldequallyIwell~FbGeusedtoplacethecitationstringina\marginpar,ina oatingbox,onaIfacingUUpageorwhathaveUUyou.qSomanypGossibilities,solittletime...E400S\def\@law@citedump{% E401]\if@law@infoot%E402f\begingroup\@law@citestack\endgroup%E403]\else%E404f\if@law@forcefootnotes%E405p2\footnote{\begingroup\@law@citestack\@law@gobble.\endgroup}%E406f\else%E407p2\begingroup\@law@citestack\endgroup%E408f\fi%27soE409]\fi% E410S\def\@law@citestack{}}ITheٲactualcitesshouldbGeexpandedonlyafterithasbeendeterminedthatthe Iend}sofacitationstringhasbGeenreached. TheexpansionsequenceforindividualIcitationsUUbGeginshere.E411S\def\@realcite#1#2#3{%E412]\ifcat$#1$\else%E413ap\setkeys{cameloptions}{#1}E414]\fi%E415]\if@law@requiresubjects%E416ap\@law@confirmsubject%E417]\fi%E418]\global\@ltok@argtwo{}%E419]\ifcat$#3$\else%E420f{\let\@law@parse=\@law@alparseplain\@law@parse#3,,}%E421]\fi%E422]{\let\@law@parse=\@law@clparseplain\@law@parse#2,,}%E423]}IThe\@law@onerealcitemacrowritesthecitationkeyonthe.aux leforonwardIuseUUbyBiDb32TU>ExX,andinitiatescitationexpansion.E424S\def\@law@onerealcite#1{%E425]\@ifundefined{@lnick@#1}%E426ap{\expandafter\def\csname@lnick@#1\endcsname{%E427f{\small\bf\tt}E428f\@latex@warningE429kJ{Citation`#1'onpage\thepage\spaceundefined}}}%E430f{\relax}%E431]\if@filesw%E432ap\immediate\write\@auxout{\string\citation{#1}}%E433ap\@ifundefined{@law@managerouthook}%E434f\relax%E435f{\immediate\write\@bibout{\@law@managerouthook{#1}}}%E436]\fi%E437S\global\@law@firstuseofcitefalse%E438S\csname@lnick@#1\endcsname}y\bibitemITheObibitemsubGcommandsarerede ned,Psincewedon'tneedtoexportthenick-InameUUasecondtimewhenusingCamel.E439S\def\@lbibitem[#1]{\item[\@biblabel{#1}\hfill]\ignorespaces}E440S\def\@bibitem{\item\ignorespaces}Ʋ\bibliographymanagerIThismacroprovidessuppGortforexternalbibliographymanagers.9Ifaknownman-IagerŐisdeclared,Qthekeyiswrittenonanephemeral lewiththenamecamel.bib.IIf-themanageristhensetuptoreplacekeyswithvqalidBiDb32TU>ExX-}.bibentries,5}andIisirunoverithis le,theresulting lecanbGeusedasaninput leforBiDb32TU>ExX.ISimple.qClean.L5ffA͉TU>'ExX.E441S\def\@law@subjectlist{}E442S\def\citationstyle#1{%E443]\ifx\@law@subjectlist\empty%E444f\def\@law@citesubject{all}E445f\expandafter\gdef\csname@law@all@citelist\endcsname{}%28ҬsoE446f\def\@law@subjectlist{\\{all}{}{\camelrefname}{}}% E447]\fi%E448]\if@filesw%E449ap\immediate\write\@auxout{\string\bibstyle{#1}}%E450]\fi%E451]\def\@law@savecat{\catcode`@}%E452ap\makeatletter%E453ap\input{#1.cst}%E454ap\input{#1.cit}%E455ap\catcode`\@=\@law@savecat%E456]\@ifundefined{@law@bblfile}%E457f{\relax}%E458f{\begin{lexilist}E459t\@input{\@law@bblfile}E460kJ\end{lexilist}}}E461S\def\citationdata#1{%E462]\def\bibliographymanager{\@camel@error{\string\bibliographymanager\spaceE463p2following\string\citationdata.^^JE464fYoucanuseonlyoneof\string\citationdata\spaceandE465f\string\bibliographymanager\space^^JatthestartofadocumentE466forafteraE467f\string\printthebibliography\spacecommand}\@ehc}%E468]\if@filesw%E469ap\immediate\write\@auxout{\string\bibdata{#1}}%E470]\fi%E471]\@ifundefined{@law@wordlist}%E472f{\gdef\@law@bblfile{\jobname.bbl}}%E473f{\begin{lexilist}E474t\@input{\jobname.bbl}E475kJ\end{lexilist}}}E476S\def\@camel@error#1#2{%E477ap\GenericError{%E478p2\space\space\space\@spaces\@spaces\@spacesE479ap}{%E480p2CamelError:#1%E481ap}{%E482p2SeetheCamelmanualforexplanation.%E483ap}{#2}%E484S}E485S{\catcode`\%=12\gdef\@law@percent{%}}E486S\def\bibliographymanager#1{%E487]\def\citationdata{\@camel@error{\string\citationdata\spaceE488p2following\string\bibliographymanager.^^JE489fYoucanuseonlyoneof\string\citationdata\spaceandE490f\string\bibliographymanager\space^^JatthestartofaE491fdocumentorafteraE492f\string\printthebibliography\spacecommand.}\@ehc}%E493]\if@filesw%E494ap\immediate\write\@auxout{\string\bibdata{camel}}%E495]\fi%E496]\@ifundefined{@law@wordlist}%E497f{\gdef\@law@bibfile{\jobname.bbl}}%E498f{\begin{lexilist}%E499yw^\@input{\jobname.bbl}29soE500kJ\end{lexilist}}% E501]\newwrite\@bibout%E502]\immediate\openout\@biboutcamel.bib%E503]\gdef\@law@temp{#1}%E504]\gdef\@law@temptwo{procite}%E505]\ifx\@law@temp\@law@temptwo%E506f\def\@law@managerouthook##1{(##1)}%E507]\fi%E508]\gdef\@law@temptwo{endnote}%E509]\ifx\@law@temp\@law@temptwo%E510f\def\@law@managerouthook##1{[##1]}%E511]\fi%E512]\gdef\@law@temptwo{papyrus}%E513]\ifx\@law@temp\@law@temptwo%E514f\def\@law@managerouthook##1{\@law@percent\@law@percent##1\@law@percent\@law@percent}%E515]\fi%E516]\gdef\@law@temptwo{referencemanager}%E517]\ifx\@law@temp\@law@temptwo%E518f\def\@law@managerouthook##1{\{##1\}}%E519]\fi%E520]\gdef\@law@temptwo{tib}%E521]\ifx\@law@temp\@law@temptwo%E522f\def\@law@managerouthook##1{[.##1.]}%E523]\fi}y\lexibibIThis; isusedbyLfhezMx li Bib(atodeclarecitationsinalexilistenvironment.iUseofa IsingleUUmacropGermits\theholdinganditsfriendstoworkmoresimply*.E524S\def\lexibib#1{\csnamenew#1\endcsname}%XW*eneedtoinitializethelistmacrousedasaworkspacebythelistmacroIhandlers.E525S\def\@law@templistmacro{} E526S\def\@law@tempplistmacro{}ITheseUUmacrosareusedfor\if-branchinginvqariousformattingroutines.E527S\def\@law@case{case}E528S\def\@law@statute{statute}E529S\def\@law@article{article}E530S\def\@law@book{book}6I3.2gMainmacrosuTI3.2.1l#Utilit9yTmacrosIThiswsectioncontainslargermacrosthatpGerformma8jortasksandsmallerbitsof IcoGdeUUthatarecomplexintheiroperation.9\@law@unstashparasIWhenthisisimplemented,theabGovechainoffutureletmacroswillbGelinkedtoIthisb\@law@unstashparasroutine,fFwhichfetchesanyparallelitems,fFandthen(inI\@law@setup)UUpGerformstherestashofthecitationifnecessary*. L\@law@clean\@law@cleanupIThis isaroughsetofroutines;2ifanyone hasasuggestiononhowtomoreelegantlyIclean5mostofL5ffA͉TU>'ExX'scontrolsequencesforexpGort,-lIwouldbGemostgratefultoIhear}fromthem.Thee ectoftheseroutinesistoconvert}controlsequencesthat30soImightebGesenttotheoutput lesintoharmlessstrings.ThisisnecessarybGecause Ithe lecannotbGewrittenatthetime\@law@cleanupiscalled; thepagereferencesIwouldqbGeincorrect.Thede nitionsarelocal;bracketingqthecleancommandandIits^argumentswillleavethecleanedtextinthemacro,butrestorecommandstringsIto opGerationwhenL5ffA͉TU>'ExXpassesoutofthecurrentgroup.4The\ifcatconditionatIthepstart(thismethoGdoftokenregistercheckingwassuggestedbyBerndRaichle|Iwho|scoldedmeforbGotheringtheL5ffA͉TU>'ExX3listwiththisquestion!))ismeanttocatchIempty stringsfedtotheroutineinthefastestpGossibleway*.7YWithoutanychecking,Ithings~canblowup.BTheuseof\@law@barnil(somewhereinthemiddle)makesIthe$vertical-barcharacterturnwimpishanddisappGear,Xzwhichiswhatwewant.IOtherwiseUUitprintsweirdstu whenitisfedbackinthroughtheexternaltable.E531S{\catcode`\_=13\catcode`\^=13\catcode`\|=13% E532S\gdef\@law@clean#1#2{%E533XdD\def\protect##1{\string##1\space}%E534XdD\ifcat$\the#1$%E535ap\edef#2{}%E536]\else%E537XdD\def^{\string^}%E538XdD\def_{\string_}%E539XdD\@law@barnil%E540XdD\def\volno{\string\volno}%E541XdD\def\exclaim{\string\exclaim}%E542XdD\def\hbox{\string\hbox}%E543XdD\def\&{\string\&}\def\%{\string\%}%E544XdD\def\hskip{\string\hskip}%E545XdD\def\jintercharskip{\string\jintercharskip}%E546XdD\def\char{\string\char}%E547XdD\def~{\string~}\def\/{\string\/}%E548XdD\def\\{\string\\}\def\{\string\}\def\sc{\string\sc\space}%E549XdD\def\rm{\string\rm\space}\def\bf{\string\bf\space}%E550XdD\def\em{\string\em\space}%E551XdD\def\={\string\=}%E552XdD\def\`{\string\`}\def\'{\string\'}%E553XdD\def\^{\string\^}\def\"{\string\"}\def\~{\string\~}%E554XdD\def\.{\string\.}\def\u{\string\u}\def\v{\string\v}%E555XdD\def\H{\string\H\space}\def\t{\string\t\space}%E556XdD\def\c{\string\c\space}%E557XdD\def\d{\string\d\space}\def\b{\string\b\space}%E558XdD\def\oe{\string\oe\space}%E559XdD\def\ae{\string\ae\space}\def\aa{\string\aa\space}%E560XdD\def\o{\string\o\space}%E561XdD\def\l{\string\l\space}\def\ss{\string\ss\space}%E562XdD\def\OE{\string\OE\space}\def\AE{\string\AE\space}%E563XdD\def\AA{\string\AA\space}%E564XdD\def\O{\string\O\space}\def\L{\string\L\space}%E565XdD\def\dag{\string\dag\space}\def\ddag{\string\ddag\space}%E566XdD\def\S{\string\S\space}%E567XdD\def\P{\string\P\space}%E568XdD\def\TeX{\string\TeX\space}\def\LaTeX{\string\LaTeX\space}%E569XdD\def\LexiTeX{\string\LexiTeX\space}%E570XdD\def\BibTeX{\string\BibTeX\space}\def\-{\string\-}%E571S\xdef\@law@temp{\the#1}%E572S\xdef#2{\expandafter\expandafter\expandafter\@gobble%31 6soE573S\expandafter\string\csname\@law@temp\endcsname}% E574S\fi}E575S}IThis2routinerunsthecleaningroutineoneverytokenregisterthatwewanttosend Itotheexternal les.iTheresultisstoredinamacro,bsinceweneedtheregistersIforthenextcitation,andbGecauseitwillbesafetofullyexpandthecontentsafterIcleaning.E576S\def\@law@cleanup{% E577S\@law@clean\@ltok@authormainface\@law@authormainfacetemp%E578S\@law@clean\@ltok@authoroptionface\@law@authoroptionfacetemp%E579S\@law@clean\@ltok@author\@law@authortemp%E580S\@law@clean\@ltok@titlemainface\@law@titlemainfacetemp%E581S\@law@clean\@ltok@titleoptionface\@law@titleoptionfacetemp%E582S\@law@clean\@ltok@argtwo\@law@argtwotemp%E583S\@law@clean\@ltok@name\@law@nametemp%E584S\@law@clean\@ltok@citepage\@law@citepagetemp%E585S\@law@clean\@ltok@citefirstmainface\@law@citefirstmainfacetemp%E586S\@law@clean\@ltok@citefirstoptionface\@law@citefirstoptionfacetemp%E587S\@law@clean\@ltok@citefirst\@law@citefirsttemp%E588S\@law@clean\@ltok@conetop\@law@conetoptemp%E589S\@law@clean\@ltok@citelast\@law@citelasttemp%E590S\@law@clean\@ltok@ptop\@law@ptoptemp}6I3.2.2l#DeclarationTofcitationt9ypQesuTIThissectioncontainsmacrosusedincreatingthecitationdeclarationmacros IactuallyUUenteredinthedoGcumentbytheuser.I@newcitee/anditsfriends Thelfollowingmacrosareusedtode nethemacroIsuitesthatrelatetoparticularcitationtypGes.ThesearenormallyinvokedbyIentriesJinthelexicite.tex le,butthe\newcitestylemacroisaccessiblewithinIthe?=doGcumentaswell.The\newcitestylemacroexpGectsthefollowingarguments:U81.btheUUnicknameofthecitationstyletobGecreated;U82.ba8listoftypGefaceandcitetypGeoptions,qinthesyntaxrequiredby\@newciteoptions;U83.baUUlistofcitebridges,inthesyntaxrequiredby\@newcitebridges;U84.banryintegergivingthenumbGerofargumentsthe nishedcite-generationmacrobwillUUaccept;andU85.banMargumentconsistingofabalancedlistofsixargumentsindicatingwhichbofUUthesixpGossibleCamelargumentswillbeused.IThelasttwoofthesearefedto\newcommandasformattingargumentsintheIcreationofcitationstylemacros.#_InopGeration,TthetokenregisterassignmentsIpGerformedby\@newcitebridgesand\@law@parsefacesarememorizedbyfreez-IingO:theminmacroswhosenamesarederivedfromthenameofthecitationstyle.IThe_+freezingopGerationiscarriedoutbyalistoftokenassignmentswithintheIstorageXmacros.yThemacrosare\xdefed,buttheexpansionofeverythingex-Icept&theexistingcontents&oftheregisters(insertedatonelevelofexpansionIusing&\the)isprevented&with\noexpands.+:Themacrocontainingthefacesis32!ĠsoIcreated`inside\newcitestyleitselftosave`anargumentpGositioninthede nition Iof\@law@parsefaces;)we'veusedupseven,andthereareonlytwotogo.oThisIcouldukbGedonewithlistmacrosaswell,3butthismethodprobablyrunsalittlefasterIbGecauseitdoesthejobdirectly*.BThetrade-o isthatthehcitetyp}'e/name[iKefacesImacros5containalotofnon-informativetext(thenamesofthetokenregisters);IbuttherearenotmanycitationtypGes,6soitisprobablyworththecost.4inmemory*.XNote$thatasofthisrelease,.qcitationdeclarationsde nedwith\newcitestyleIalwaysbGegin&with\new.5ThiswillhelpsimplifytheintegrationofBiDb32TU>ExXandICamel.E591S\def\newcitestyle#1#2#3{% E592S\@ifundefined{@law@citeload}%E593XdD{\def\@law@citeload{Loadingcitationclasses:#1...}}%E594XdD{\message{\@law@citeload#1}\def\@law@citeload{...\space}}%E595XdD\@newcitebridges#1#3%E596]\expandafter\@law@parsefaces#2%E597]\expandafter\xdef\csname#1faces\endcsname{%E598ap\noexpand\global\noexpand\@ltok@authormainface\noexpand{%E599f\the\@ltok@authormainface\noexpand}%E600ap\noexpand\global\noexpand\@ltok@authoroptionface\noexpand{%E601f\the\@ltok@authoroptionface\noexpand}%E602ap\noexpand\global\noexpand\@ltok@titlemainface\noexpand{%E603f\the\@ltok@titlemainface\noexpand}%E604ap\noexpand\global\noexpand\@ltok@titleoptionface\noexpand{%E605f\the\@ltok@titleoptionface\noexpand}%E606ap\noexpand\global\noexpand\@ltok@citefirstmainface\noexpand{%E607f\the\@ltok@citefirstmainface\noexpand}%E608ap\noexpand\global\noexpand\@ltok@citefirstoptionface\noexpand{%E609f\the\@ltok@citefirstoptionface\noexpand}%E610ap\noexpand\global\noexpand\@ltok@citetype\noexpand{%E611f\the\@ltok@citetype\noexpand}}%E612XdD\expandafter\gdef\csnamenew#1\endcsname##1##2##3##4##5##6##7%E613]{\@newcite{#1}{##1}{##2}{##3}{##4}{##5}{##6}{##7}}}ITheffollowingareparsingroutinesthatarecalledby\newcitestyle. XIn I\@law@parsefaces,s^the:)sevenargumentsarethestringoflettersinthesecondIargumentof\newcitestyle.ThisfunctionhasbGeendrasticallysimpli edoverIthen rstrelease.^%I_shouldhavendoneitthiswayninthe rstplaceandsavednmyselfIaUUlotofaggravqation.qThecoGdeshouldrunalotfastertoboot.E614S\def\@law@parsefaces#1#2#3#4#5#6#7{% E615XdD\@law@parseoneoption\@ltok@authormainface#1%E616XdD\@law@parseoneoption\@ltok@authoroptionface#2%E617XdD\@law@parseoneoption\@ltok@titlemainface#3%E618XdD\@law@parseoneoption\@ltok@titleoptionface#4%E619XdD\@law@parseoneoption\@ltok@citefirstmainface#5%E620XdD\@law@parseoneoption\@ltok@citefirstoptionface#6%E621XdD\@law@parselastoption\@ltok@citetype#7}E622S%E623S\def\@law@parseoneoption#1#2{%E624]\if#2s\global#1{\sc}\fi%E625]\if#2i\global#1{\em}\fi%E626]\if#2b\global#1{\bf}\fi%E627]\if#2r\global#1{\rm}\fi%E628]\if#2S\global#1{\sc}\fi%33"soE629]\if#2I\global#1{\em}\fi% E630]\if#2B\global#1{\bf}\fi%E631]\if#2R\global#1{\rm}\fi}E632S%E633S\def\@law@parselastoption#1#2{%E634]\if#2a\global#1{article}\fi%E635]\if#2b\global#1{book}\fi%E636]\if#2c\global#1{case}\fi%E637]\if#2s\global#1{statute}\fi%E638]\if#2A\global#1{article}\fi%E639]\if#2B\global#1{book}\fi%E640]\if#2C\global#1{case}\fi%E641]\if#2S\global#1{statute}\fi}מIBridges@parestoredliterally*,Dwithoutparsing,soit'seasytostashthemdirectlyin Ia;0singlemacrothatisfedthearguments.iTheassignmentsherearestoredbytheIsameUUmethoGdoutlinedinthedescriptionof\newcitestyle,above. מE642S\newtoks\@ltok@c% E643S\newtoks\@ltok@d%E644S\newtoks\@ltok@e%E645S\newtoks\@ltok@f%E646S\newtoks\@ltok@g%E647S\newtoks\@ltok@h%E648S\newtoks\@ltok@i%E649S\newtoks\@ltok@j%E650S\def\@newcitebridges#1[a]#2[t]#3[c]#4[p]#5(pl)#6[rp]#7[e]:[id]#8(pl)#9[xrf]{%E651S\@ltok@c{#2}%E652S\@ltok@d{#3}%E653S\@ltok@e{#4}%E654S\@ltok@f{#5}%E655S\@ltok@g{#6}%E656S\@ltok@h{#7}%E657S\@ltok@i{#8}%E658S\@ltok@j{#9}%E659]\expandafter\xdef\csname#1bridges\endcsname{%E660ap\noexpand\global\noexpand\@ltok@atot\noexpand{\the\@ltok@c\noexpand}%E661ap\noexpand\global\noexpand\@ltok@ttocone\noexpand{\the\@ltok@d\noexpand}%E662ap\noexpand\global\noexpand\@ltok@conetop\noexpand{\the\@ltok@e\noexpand}%E663ap\noexpand\global\noexpand\@ltok@conetopplural\noexpand{\the\@ltok@g\noexpand}%E664ap\noexpand\global\noexpand\@ltok@ptop\noexpand{\the\@ltok@f\noexpand}%E665ap\noexpand\global\noexpand\@ltok@ptoctwo\noexpand{\the\@ltok@h\noexpand}%E666ap\noexpand\global\noexpand\@ltok@atbridge\noexpand{\the\@ltok@i\noexpand}%E667ap\global\@ltok@atbridgeplural\noexpand{\the\@ltok@j\noexpand}}}%pI3.2.3l#DeclarationTofcitationnic9knamesuTIThefollowingmacrosarecalledbythemacrosgeneratedbythe\newcitestyle Imacro)"anditsarguments.-Theire ectistocreatenicknamemacroswhichcanIthenbGecalledbytheuserwiththe\sourcecommand,withthenicknameasIasingleargumentinbraces.Thismacroiscalledby\newhcitation)"wtyp}'e>6name[iZ.IWhilethismacroalwaystakessevenarguments, someofthesemaybGemaskedo Ifromtheuser,iffewerthanthefullpGossiblesixargumentswerecalledforintheI nalargumentfedto\newcitestyleincreatingtheparticular\newhcitation(typ}'eIname[iiOmacro(thatisdoingthecalling.'ExXbGook.^17x+378ThisandtheothermacrosinthissetdotheirworkonIoneUlistmacro,\@law@templistmacro,inUordertoavoidUtheneedforlotsofI\expandafters.E744S\def\@law@addargument#1\tocitelist{% E745]\@law@leftappendargument#1\to\@law@templistmacro}E746S\long\def\@law@leftappendargument#1\to#2{\@ltok@a={\\{#1}}%E747]\@ltok@b=\expandafter{#2}%E748]\xdef#2{\the\@ltok@a\the\@ltok@b}}IThisUUmacroaddsthecontentsUUofonetokenregistertothetempGorarylistmacro.E749S\def\@law@addtoken#1\tocitelist{\@law@leftappendtoken#1\to\@law@templistmacro}E750S\long\def\@law@leftappendtoken#1\to#2{%E751]\xdef\@law@temp{\noexpand\\\noexpand{\the#1\noexpand}}%E752ap\@ltok@a=\expandafter{\@law@temp}%E753]\@ltok@b=\expandafter{#2}%E754]\xdef#2{\the\@ltok@a\the\@ltok@b}}IThis8macrocutsonetoken-registeritem#1fromtheendoflistmacro\@law@templistmacro. IThelopGo portionisalmoststraightoutoftheT*eXbook,exceptthatitstorestheIloppGedUUelementinatokenregisterinsteadofamacro.E755S\def\@law@cut#1\fromcitelist{\@law@lop\@law@templistmacro\to#1} E756S\def\@law@lop#1\to#2{\expandafter\@law@lopoff#1\@law@lopoff#1#2}%E757S\long\def\@law@lopoff\\#1#2\@law@lopoff#3#4{\global#4={#1}\gdef#3{#2}}E758S\def\@law@pincut#1\frompinlist{\@law@pinlop\@law@argtwolist\to#1}E759S\def\@law@pinlop#1\to#2{\expandafter\@law@pinlopoff#1\@law@pinlopoff#1#2}%E760S\long\def\@law@pinlopoff\@law@pingroup\@law@pinstart#1\@law@pinend#2\@law@pinlopoff#3#4{\global#4={#1}\gdef#3{#2}}Iffffr J=w-:17LD.Knuth,Xsupranote1.37&Eso9\@law@addpargument f\@law@addptoken \@law@pcutIThe5followingninemacrosareusedtomanipulatealistmacrocontainingparallel IcitationUUdetails,andsetsoftokenregistersintowhichthelistisextracted.E761S\def\@law@fetchparas{% E762]\ifnum\the\c@law@paranormal>\the\c@law@paracounter\relax%E763f\@law@pcut\@law@tempplist\fromlist%E764f\expandafter\@law@extractparas\@law@tempplist%E765]\fi}E766S\def\@law@extractparas#1#2#3#4#5#6#7#8{%E767]\ifcat$\the\@ltok@useratbridge$%E768]\else%E769f\@ltok@userconetop={#1}%E770f\@ltok@userconetopplural={#2}%E771f\@ltok@userptop={#3}%E772f\@ltok@useratbridge={#4}%E773f\@ltok@useratbridgeplural={#5}%E774]\fi%E775]\global\@ltok@usercitefirst={#6}%E776]\global\@ltok@usercitepage={#7}%E777]\global\@ltok@usercitelast={#8}}E778S\def\@law@shiftparas{%E779]\ifnum\the\c@law@paranormal>\the\c@law@paracounter\relax%E780f\ifcat$\the\@ltok@useratbridge$%E781f\else%E782p2\global\@ltok@conetop\@ltok@userconetop%E783p2\global\@ltok@conetopplural\@ltok@userconetopplural%E784p2\global\@ltok@ptop\@ltok@userptop%E785p2\global\@ltok@ptoctwo\@ltok@userptoctwo%E786p2\global\@ltok@atbridge\@ltok@useratbridge%E787p2\global\@ltok@atbridgeplural\@ltok@useratbridgeplural%E788f\fi%E789p2\global\@ltok@citefirst\@ltok@usercitefirst%E790p2\global\@ltok@citepage\@ltok@usercitepage%E791p2\global\@ltok@citelast\@ltok@usercitelast%E792]\fi}E793S\def\@law@addpargument#1\tolist{%E794]\addtocounter{law@paranormal}{1}%E795]\@law@rightappendpargument#1\to\@law@tempplistmacro}E796S\long\def\@law@rightappendpargument#1\to#2{\@ltok@a={\\{#1}}%E797]\@ltok@b=\expandafter{#2}%E798]\xdef#2{\the\@ltok@b\the\@ltok@a}}E799S\def\@law@addptoken#1\tolist{\@law@leftappendptoken#1\to\@law@tempplistmacro}E800S\long\def\@law@leftappendptoken#1\to#2{%E801]\xdef\@law@temp{\noexpand\\\noexpand{\the#1\noexpand}}%E802ap\@ltok@a=\expandafter{\@law@temp}%E803]\@ltok@b=\expandafter{#2}%E804]\xdef#2{\the\@ltok@a\the\@ltok@b}}E805S\def\@law@pcut#1\fromlist{\@law@plop\@law@tempplistmacro\to#1}E806S\def\@law@plop#1\to#2{\expandafter\@law@plopoff#1\@law@plopoff#1#2}%E807S\long\def\@law@plopoff\\#1#2\@law@plopoff#3#4{\gdef#4{#1}\gdef#3{#2}}XThis+3macroturnso thegobblingfeature(itmaybGeturnedonduringexe- Icution,if—Id.isused),erasesanypinpGointreferenceinformationthatishangingIaround,!and ifweareinafoGotnote,itincrementsthecounterthatwassettozero38'SsoIatthestartofthefoGotnote.OThealternatetypGefacecanbechangedforalldocumentsbyeditingtheIrelevqant.cst le._^GroupingbracesenclosingallopGerationswithin\@law@setupImeanlthanweirdstu turnedonthesolepurpGoseofexportingtotablesandIprintingtthecitationwillturnitselfo whentheprintroutineis nished.&AtroutineI(\@law@justabovecheck)isrunto gureoutwhatthecitationcontextis|howIaecross-referenceshouldbGeformatted|andonceit'sfoundoutwhatitneedstoIknow"abGoutthelastcitation,VinformationonthecurrentcitationistuckedawayIforreferencebythisthecontext-checkingroutinenexttimearound.(AyseriesofIcheckseispGerformedsothatsuper uousbridgesforwhichthereisnocorrespondingIargument+canbGeerased.cThena lewriteisperformedtotheappropriateexportI le,-cif-creationofthattablehasbGeentoggledon.xOAnd nallytheprintroutineIiscalled.xThe\@law@gobblethatfollowstheendofthegroupisusedtoeataIsupGer uous8periodifnecessary*.oItisbroughttolife,ifappropriate,bytheprintIroutine.qNoteUUthespGecialcatcodeofthe|characterduringthisde nition.E904S{\catcode`\|=13%E905S\long\gdef\@law@setup{%ITheTfollowingopGerationsrestashthecitationdetailsifnecessary;bbythispGointIweowillhavegrabbGedanyparallelcitationdetailsthatweneeded.ThebackslashIcharacterUUisrede nedasaself-resettingfont-switchingmacro.E906S{\def\@law@firstslash{\begingroup\def\\{\@law@secondslash}%E907ap\the\ltokspecialface}%41*zsoE908]\def\@law@secondslash{\endgroup\def\\{\@law@firstslash}}% E909]\def\\{\@law@firstslash}%IThisUUcarriesoutthenecessarychecksUUonthecontextofthecurrentcitation.E910S\@law@justabovecheck%INow"\thatthe\@law@justabovecheckmacrohasbGeenrun,Uitistimetosetup Ifor"thenextcomparison.`T*akenotethatthissourcewascited,- andofanyspGeci cIpageUUreferenceitcontains,IFweareinafoGotnoteE911S\if@law@infoot% E912ap\xdef\@law@currentcite{\the\@ltok@author\the\@ltok@name\the\@ltok@citefirst%E913ap\the\@ltok@citepage\the\@ltok@citelast}%E914ap\xdef\@law@lastpage{\the\@ltok@argtwo}%E915S\fi%E916]\begingroup%E917]\@law@tidybridges%E918]\ifx\@law@citesubject\empty%E919ap\relax%E920]\else%E921f\if@law@bibentry%E922f\else%E923p2\ifnum\the\c@law@paranormal=0\relax%E924yw^\csnamewrite@one@\@law@citesubject@entry\endcsname%E925p2\fi%E926f\fi%E927]\fi%E928]\endgroup%E929S\@law@print}}}E930S\def\@law@conetopsetup{%E931]\gdef\@law@temp{}%E932]\ifx\@law@argtwolist\@law@temp%E933]\else%E934f\@law@pincut\@ltok@argtwo\frompinlist%E935f\expandafter\@law@multicheck\the\@ltok@argtwo%E936f\@law@multiflag\query\end%E937]\fi}E938S\def\@law@tidybridges{%IAJnumbGerJoffurthertidying-upoperationsareappropriateregardlessoftheform IinwhichthecitationwillbGeprinted.X/Ifcertainelementsaremissing,theirrelatedIbridgesmustbGeerasedifthecitationisnotgoingtolookawful.ThisisalsoIwheretheauthorortitlearesuppressedinrespGonseto agsgiventothe\sourceIcommand.E939]\if@law@printauthor\else\global\@ltok@author{}\fi% E940]\if@law@printtitle\else\global\@ltok@name{}\fi%E941]\ifcat$\the\@ltok@author$%E942f\global\@ltok@atot{}%E943]\fi%E944]\ifcat$\the\@ltok@name$%E945kJ\global\@ltok@ttocone{}%E946]\fi%E947]\ifcat$\the\@ltok@citefirst$%E948f\global\@ltok@ttocone{}%E949]\fi%E950]\ifcat$\the\@ltok@citelast$%42+ssoE951ap\global\@ltok@ptoctwo{}% E952]\else%E953f\xdef\@law@temp{\the\@ltok@citelast}%E954f\gdef\@law@temptwo{()}%E955f\ifx\@law@temp\@law@temptwo%E956kJ\global\@ltok@citelast{}%E957kJ\global\@ltok@ptoctwo{}%E958f\fi%E959]\fi%E960]\ifcat$\the\@ltok@citepage$%E961f\global\@ltok@ptop{}%E962]\fi%E963]\ifcat$\the\@ltok@argtwo$%E964kJ\global\@ltok@ptop{}%E965kJ\ifcat$\the\@ltok@citepage$%E966p2\global\@ltok@conetop{}%E967kJ\fi%E968]\fi%INowwerunaseriesofcheckstodeterminetheclassofcitationwearedealing Iwith,dandeaiftablesforthattypGeofcitationhavebGeenturnedon,danexportisIpGerformed;if{aciteforexportistoastatute,@thenthespecialroutinesforhandlingIpageUUreferencesisbroughtintoplay*. E969]\ifcat$\the\@ltok@argtwo$% E970ap\global\@ltok@ptop{}%E971ap\global\@ltok@atbridge{}%E972ap\ifcat$\the\@ltok@citepage$%E973kJ\global\@ltok@conetop{}%E974f\fi%IAnd herethe\@law@setuproutinecomestoanend;epunttotheprintroutine, IpGossiblyUUfollowedbyagobble,ifId.qDzisprinted. E975]\fi}㉍I3.3gOutputroutinesuTIOnce5thecitationhasbGeenunpacked5andthebasictidyingupappropriatetoallIappGearancesIOofthecitationhasbeencarriedout,KitistimetoshipitscontentsIOtoItheUUvqariousoutputroutines.㉍I3.3.1l#TheTprin9tmacroIThis2[sectioncontainsthecoGdefortheprintroutineanditssuppGortingmacros.IW*eUUbGeginwiththesupportingstu . Ʋ\@law@justabovecheckICheck`ifimmediatelyprecedingciteisthesameasthisone.kThismacroiscalledIimmediatelybGeforethecitationisprinted. Therearelotsofconditions,buttheIstructure3isjustastraightforward3nestingof\ifstatements,:each3ofwhichsetsaItoggleUUortogglesappropriately*.qIntheend,thismacrotellsus:XbWhethergtheimmediately-precedingcitationistothesamework;andifitis XbWhetherƹtheprecedingcitehadnopinpGointpagereference;CandifithadoneXbWhetherUUthepagesreferredtobythetwocitesareexactlyidentical.43,soIT*ryjthat][withWordPerfect!RIfCamelisn'tgettingthedecisionsright,letme Iknow.E976S\def\@law@justabovecheck{% E977]\xdef\@law@temptwo{\the\@ltok@author\the\@ltok@name%E978\the\@ltok@citefirst\the\@ltok@citepage%E979\the\@ltok@citelast}%E980]\ifx\@law@lastcite\@law@temptwo%E981f\ifnum\the\c@citesinfoot=1\relax%E982kJ\@law@justabovecheckdetails%E983f\else%E984p2\ifx\@law@currentcite\@law@temptwo%E985t\@law@justabovecheckdetails%E986p2\else%E987t\@justabovefalse%E988p2\fi%E989f\fi%E990]\else%E991f\ifnum\the\c@citesinfoot>1\relax%E992p2\ifx\@law@currentcite\@law@temptwo%E993t\@law@justabovecheckdetails%E994p2\else%E995t\@justabovefalse%E996p2\fi%E997f\fi%E998]\fi}E999S\def\@law@justabovecheckdetails{%A1000f\ifx\@law@lastpage\empty%A1001kJ\@justabovetrue%A1002kJ\@l@quiteexactfalse%A1003f\else%A1004kJ\ifcat$\the\@ltok@argtwo$%A1005t\@justabovefalse%A1006p2\else%A1007t\@justabovetrue%A1008yw^\xdef\@law@temp{\the\@ltok@argtwo}%A1009yw^\ifx\@law@temp\@law@lastpage%A1010~0\@l@quiteexacttrue%A1011yw^\else%A1012~0\@l@quiteexactfalse%A1013yw^\fi%A1014p2\fi%A1015f\fi}A1016Sh=lexitex!i6I3.3.2l#ProQofTsheetmasterdocumen9tuTIThepfollowingshortdoGcumentwillgenerateproGofsheetsforalloftheprimaryIstylesoonthesystem.Withthestandarddistribution,v0thisproGducestwelvepagesIofUUoutput.44-ӠsoI3.4gPro`ofsheetsuTIThe,followingmacrosproGduceaproofsheetthatshowsallofthepermutationsof IalcitationthatI8canthinkof. ThisisusefulforthosewhohaveltodesignnewIcitation0styles.vThisisaprettystraightforwardexercise,gexceptforthetaskofIfeedingacitedeclarationexactlytherightarguments;thisrequiresre-de nitionIofUU\newcitestyleandthere-parsingofthelexicite.tex le.XIfyou ndpGermutationsthatarenotrepresentedhere,letmeknowandI'llIaddUUthem.덍I3.5gMacrosfordataexp`ort \citationsubjectIThismacrotogglesontherequirementthateverycitationbGeassignedtoasub8jectIcategory*,andaddsasub8jecttothesubjectlist,withalloftheinformationneededItoUUcreateaclassi edbibliography*.qThisinformationconsistsof:iU81.bThenicknameforthecategory*,Pusedastheargumenttothes=optioninbeachUUcitation;U82.bTheUUtitleforuseinthebibliography*.IAnoptionalargumentoftcreatesatable,AandmustbGeaccompaniedbyo=andIi=optionsgivingtheextensionsoftheinputandoutput les,andbyh=andIoptionallyUmaybGeaccompaniedbyanoptionofptoincludepGoinpointsUintheItable.XNOTE:}De nitionof\@law@finishbGelowisjustbeingchucked}intoasapatch.IThiscoGdeshouldallbegoneoveranreorganizedsometimewhenthereistimeforIit. A1017Shlexitex!i A1018S\def\@law@finish#1\@law@nomatch{}A1019S\def\@law@slone#1#2{\def\@law@listitem{#1}%A1020]\ifx\@law@optionitem\@law@listitem#2%A1021]\let\\=\@law@finish\fi}}$\@law@endITheUUinternalendingcharacterisalsocommontoallparsers.A1022S\def\@law@end{,}f\@law@slnomatchIIf"whenweexecutethelistofoptionswedonot ndamatch,wewantanerror ImessageAtogototheterminal.k2ThisisthemacrothatgivestheappropriateerrorImessage.A1023S\def\@law@slnomatch{\@camel@error{CitationWarning:Invalid A1024foption`\@law@optionitem'A1025fgivento\string\citationsubject.^^J%A1026apValidoptionsare:^^JA1027f2(forceasecond-levelheaderforasubject)^^JA1028fp(toincludepinpointsinanexportedtable)^^JA1029fi=(usethethree-letterextensionin^^JA1030:exportingatable)^^JA1031fo= s,(usethethree-letterextensionin^^JA1032importingatable)^^J%A1033SToavoiderrorsinformatting,usecommasintheoptionstring^^J%A1034Sonlywheretheyarelogicallynecessarytothesenseofthe^^J%A1035Sstring.}\@ehc}45.Ġso \longestlabelforIThisSmacrosetreturnsabGoxtheexactwidthofthelongeststringgivenasalabGel ItoUUcitationsofaspGeci edsub8jectclass.A1036S\newlength{\templen} A1037S\newlength{\lawlengthone}A1038S\newlength{\lawlengthtwo}A1039S\def\@law@getlabel#1{\settowidth\lawlengthone{\csname@law@#1@lab\endcsname}%A1040]\ifnum\lawlengthone>\lawlengthtwo%A1041f\settowidth\lawlengthtwo{\csname@law@#1@lab\endcsname}%A1042]\fi}A1043S\def\longestlabelfor#1{%A1044ap\setlength\lawlengthone{0pt}%A1045ap\setlength\lawlengthtwo{0pt}%A1046ap\let\\=\@law@getlabel%A1047ap\csname@law@#1@citelist\endcsname}ҙ\@law@subjectoptionlistITheblistofoptionsissimpleandexpansible.ThesyntaxofthelasttwolinesisIrequiredrifeverythingistoworkasexpGected.& TheitemsinthehelpmessageshouldIprobablybGedrawnfromhere, toprovideahoGokforexpansionifotherstyleswantItoUUtinkerwiththeoptionsto\source.A1048S\def\@law@subjectoptionlist{%A1049XdD\\{1}{\gdef\@law@level{1}}%A1050XdD\\{2}{\gdef\@law@level{2}}%A1051XdD\\{p}{\global\@law@usepinpointstrue}%A1052XdD\\{P}{\gdef\@law@bibformat{\global\@law@usepagestrue}}%A1053XdD\\{o}{\gdef\@law@parsemacro##1{\gdef\@law@outputext{##1}}%A1054yw^\let\@law@parse\@law@slparsecomma}%A1055XdD\\{i}{\gdef\@law@parsemacro##1{%A1056\ifcat$##1$\else%A1057\global\@law@maketabletrue%A1058\expandafter\gdef\csname\@law@tempinputext\endcsname{##1}%A1059\fi}%A1060yw^\let\@law@parse\@law@slparsecomma}%A1061XdD\\{=}{\let\@law@parse\@law@slparsebumequal}%A1062XdD\\{,}{}%A1063XdD\\{\end}{\let\@law@nomatch\relax\let\@law@parse\relax}%A1064f\@law@nomatch}Ʋ\@law@parselastcheck \@law@parsecommaƲ\@law@parselastcheck \@law@parseplainIW*eYfswitchbGetweenthreepGossibleformsforthe\@law@parsemacro,ZjandwealsoIneedUUtohaveUUaspGecialwayUUofendingwhenthedelimiterisfoundinthelist.A1065S\def\@law@slparsecomma=#1,{%A1066]\@law@parsemacro{#1}\let\@law@parse\@law@slparseplain%A1067]\@@parse}A1068S\def\@law@slparsebumequal#1,{\let\@law@parse\@law@slparseplain\@@parse}A1069S\def\@law@slparseplain#1{% A1070]\let\@law@nomatch=\@law@slnomatch%A1071]\def\@law@optionitem{#1}\let\\=\@law@slone\@law@subjectoptionlist\@@parse}A1072S\def\citationsubject{%A1073]\@ifnextchar[{\@citationsubject}{\@citationsubject[1]}}A1074S{\catcode`\|=13%A1075S\gdef\@citationsubject[#1]#2#3{%A1076]\global\let\@law@level\relax%A1077]\global\@law@usepinpointsfalse%46/soA1078]\global\@law@maketablefalse% A1079]\global\@law@requiresubjectstrue%A1080]\gdef\@law@bibformat{}%A1081]\def\@law@temp{#2}%A1082]{\let\@law@parse=\@law@slparseplain\@law@parse#1,\end}%A1083]\expandafter\gdef\csnamewrite@one@#2@entry\endcsname{}%A1084]\if@law@maketable%A1085]\expandafter\def\csnamethe#2table\endcsname{%A1086f\@restonecoltrue%A1087f\if@twocolumn\@restonecolfalse\fi%A1088f\section*{#3}%A1089f\@mkboth%A1090p2{\uppercase{#3}}%A1091p2{\uppercase{#3}}%A1092f\thispagestyle{plain}%A1093f\parindent\z@\parskip\z@plus.3\p@\relax%A1094f\let\item\citationtableitem}A1095]\expandafter\def\csnameendthe#2table\endcsname{%A1096f\if@restonecol\onecolumn%A1097f\else\clearpage%A1098f\fi}%A1099]\def\itemspace{%A1100f\par\vskip10\p@plus5\p@minus3\p@\relax}A1101]\newindex{#2}{\@law@outputext}{\csname#2inputext\endcsname}{#3}%A1102]\if@law@usepinpoints%A1103p2\expandafter\gdef\csnamewrite@one@#2@entry\endcsname{%A1104yw^{\ifcat$\the\@ltok@argtwo$\@ltok@argtwo{\@law@delim}\fi%A1105\@ltok@pagesstring\@ltok@argtwo%A1106\def\@law@comma{\@law@exportapage}%A1107\def\@law@ampersand{\@law@exportapage}%A1108\def\@law@dash{\@law@exportapage}%A1109\def|{\@law@exportapage}%A1110\def\@law@exportapage####1\@law@delim{%A1111]\@ltok@argtwo{####1}%A1112]\def\@law@temp{\index[#2]}%A1113]\edef\@law@temptwo{%A1114L\noexpand{\string\bibitem%A1115~0\string\source[b,Z=\the\@ltok@nickname]%A1116~0\noexpand{\the\@ltok@nickname\noexpand}%A1117\ifcat$\the\@ltok@argtwo$\else>####1\fi\string|maybe\noexpand}}%A1118]\expandafter\@law@temp\@law@temptwo}A1119]\expandafter\@law@exportapage\the\@ltok@pagesstring}}%A1120]\else%A1121p2\expandafter\gdef\csnamewrite@one@#2@entry\endcsname{%A1122t\def\@law@temp{\index[#2]}%A1123yw^\edef\@law@temptwo{%A1124\noexpand{\string\bibitem%A1125\string\source[b,Z=\csname@law@\the\@ltok@nickname@lab\endcsname]%A1126~0\string{\the\@ltok@nickname\string}\string|maybe\noexpand}}%A1127t\expandafter\@law@temp\@law@temptwo}%A1128]\fi%A1129]\fi%A1130ap\@ltok@a=\expandafter{\@law@subjectlist}%A1131ap\@ltok@c=\expandafter{\@law@bibformat}%470\soA1132ap\if@law@usepinpoints% A1133kJ\edef\@law@temp{\noexpand\\\noexpand{#2\noexpand}%A1134\noexpand{p\noexpand}%A1135\noexpand{#3\noexpand}A1136\noexpand{\the\@ltok@c\noexpand}}%A1137kJ\@ltok@b=\expandafter{\@law@temp}%A1138ap\else%A1139kJ\edef\@law@temp{\noexpand\\\noexpand{#2\noexpand}A1140\noexpand{\@law@level\noexpand}A1141\noexpand{#3\noexpand}A1142\noexpand{\the\@ltok@c\noexpand}}%A1143kJ\@ltok@b=\expandafter{\@law@temp}%A1144ap\fi%A1145f\edef\@law@subjectlist{\the\@ltok@a\the\@ltok@b}}}9\printbibliographyIT*oprintbibliographies,^weuseasinglecommandwithtwomoGdesbuiltintoit.A1146S\def\printbibliography{\@ifnextchar[{\@printbibliography}{\@printbibliography[]}}A1147S\def\@printbibliography[#1]#2{%A1148]\global\@law@forcefootnotesfalse%A1149]\gdef\@law@temp{#1}\gdef\@law@temptwo{labels=false}%A1150]\let\camelrefname\refname%A1151]\expandafter\ifx\csname#2inputext\endcsname\relax%A1152f\global\@law@tablefalse%A1153]\else%A1154f\global\@law@tabletrue%A1155]\fi%A1156]\begingroup%A1157f\def\refname{\@law@getsubjectheader{#2}}%A1158p2\@law@usepagesfalse%A1159p2\@law@getbibformat{#2}A1160p2\let\maybe\@gobble%A1161p2\let\camelfill\relax%A1162p2\let\camelarrow\relax%A1163]\ifx\@law@temp\@law@temptwo%A1164yw^\advance\@totalleftmargin-\labelsep%A1165yw^\advance\linewidth\labelsep%A1166yw^\def\@biblabel##1{}%A1167]\fi%A1168p2\if@law@table%A1169yw^\if@law@usepages%A1170\let\maybe\relax%A1171\let\camelfill\dotfill%A1172\let\camelarrow\rightarrow%A1173yw^\fi%A1174p2\else%A1175yw^\longestlabelfor{#2}%A1176yw^\ifdim\lawlengthtwo=0pt%A1177\advance\@totalleftmargin-\labelsep%A1178\advance\linewidth\labelsep%A1179\def\@biblabel##1{}%A1180yw^\fi%A1181p2\fi%A1182f\if@law@requiresubjects%A1183p2\@law@dobibliography{#2}%481̸soA1184f\else% A1185p2\gdef\@law@temp{#2}\gdef\@law@temptwo{all}%A1186p2\ifx\@law@temp\@law@temptwo%A1187yw^\@law@dobibliography{#2}%A1188p2\else%A1189p2\message{^^J===================================================^^J%A1190:Camelbibliography^^JA1191pDocumenttype:without-subjects^^JA1192pBibliographytype:subject-specific(#2)^^JA1193pAction:impossibletask,ignoring...^^J%A1194:===================================================^^J}A1195p2\fi%A1196f\fi%A1197]\endgroup}A1198S\def\@law@dobibliography#1{%A1199f\begin{thebibliography}{\if@law@biblabels\longestlabelfor{#1}\rule{\lawlengthtwo}{5pt}\fi}A1200p2\if@law@table%A1201yw^\if@law@usepages%A1202\addtolength{\parsep}{-.5\parsep}%A1203\addtolength{\itemsep}{-.5\itemsep}%A1204yw^\fi%A1205p2\fi%A1206p2\if@law@requiresubjects%A1207p2\@law@requiresubjectsfalse%A1208yw^\if@law@tableA1209p2\message{^^J===================================================^^J%A1210:Camelbibliography^^JA1211pDocumenttype:subject-classifiedcites^^JA1212pBibliographytype:subject-specificexternal(#1)^^JA1213pAction:generating^^J%A1214:===================================================^^J}A1215\@input{\jobname.\csname#1inputext\endcsname}A1216yw^\else%A1217yw^\gdef\@law@temp{#1}\gdef\@law@temptwo{all}%A1218yw^\ifx\@law@temp\@law@temptwo%A1219p2\message{^^J===================================================^^J%A1220:Camelbibliography^^JA1221pDocumenttype:subject-classifiedcites^^JA1222pBibliographytype:allcitations^^JA1223pAction:headeronly(notyetimplemented)^^J%A1224:===================================================^^J}A1225yw^\else%A1226p2\message{^^J===================================================^^J%A1227:Camelbibliography^^JA1228pDocumenttype:subject-classifiedcites^^JA1229pBibliographytype:subject-specificinternal(#1)^^JA1230pAction:generating^^J%A1231:===================================================^^J}A1232{\let\\\@law@bibslash%A1233\csname@law@#1@citelist\endcsname}A1234yw^\fi%A1235yw^\fi%A1236p2\else%492ְsoA1237p2\message{^^J===================================================^^J% A1238:Camelbibliography^^JA1239pDocumenttype:without-subjects^^JA1240pBibliographytype:allcitations^^JA1241pAction:generating^^J%A1242:===================================================^^J}A1243yw^{\let\\\@law@bibslash%A1244yw^\csname@law@#1@citelist\endcsname}%A1245p2\fi%A1246kJ\end{thebibliography}}A1247S\def\@law@bibslash#1{\bibitem[\csname@law@#1@lab\endcsname]\source[b]{#1}.}A1248Sh=lexitex!i6I3.5.1l#CitationTst9ylede nitionsuTINoestylesareincludedhere.Seetheseparatestyle lesintheCamelarchivefor Ithesmatching.bst,.cstand.cit lesthatmakeupeachCamelstylevqariation.IThesemaybGedistributedas.doc les,-andshouldbeavqailableonCT*ANunderI/macros/latex/contrib/supported/camel.6I3.6gIndexstylesIThiscoGde,1andthetablewritingcode,1isprovisional;(]thisshouldbemademoreIgeneral.qLessUUofahackthantheoriginalLfhezMx loI TU>oExX+scoGde,though!A1249Shcamelindex.Wi A1250Sactual'#'A1251Squote'!'A1252Slevel'>'A1253SpreambleA1254S"\n"A1255SpostambleA1256S"\n"A1257Sitem_0X"\n"A1258Sitem_x1,"\n\\subitem"A1259Sitem_x2,"\n\\subsubitem"A1260Sdelim_n"\$\\rightarrow\$"A1261Sdelim_0"\~\\camelfill"A1262Sdelim_1"\$\\camelarrow\$"A1263S%ThenextlineswillproducesomewarningswhenA1264S%runningMakeindexastheytrytocovertwodifferentA1265S%versionsoftheprogram:A1266Slethead_prefix,"{\\bf\\hfil"A1267Slethead_suffix,"\\hfil}\\nopagebreak\n"A1268Slethead_flag!1A1269Sheading_prefix,"{\\bf\\hfil"A1270Sheading_suffix,"\\hfil}\\nopagebreak\n"A1271Sheadings_flag!0A1272S\ifx\on@line\undefinedA1273]\def\on@line{oninputline\the\inputlineno}A1274]\errhelp{SupportforinputlinenumbershasbeenaddedA1275 tolatex.tex.^^J^^J%A1276 PleaseupdatetoanewerLaTeXrelease.}A1277]\errmessage{ObsoleteLaTeXrelease(olderthanDec.91)}503̠soA1278S\fi A1279Sh=camelindex.Wi >I4aLAffB0iYb8TLzEdXLibraryIConsiderableSmoGdi cationofanexisting.bst lemayberequiredtomakeit Igive/outputthatcanbGedigestedbyCamel. Y*oumay ndthatitisactu-IallyFeasiertodraftyouentrytypGefunctionsfromscratch,!usingthefollow-IingdlibraryofBiDb32TU>ExXfunctions. Seethe lelaw.dtxforanexampleofen-ItrytypGesbasedonthislibrary*,=andforanexampleofhowtotiethelibraryIandfyourownfunctionstogetherthroughadriver leentry*.5? EachIfunctionsde nedusingtheFUNCTIONopGeratorisaccompaniedbyabriefde-Iscription7ofwhatitisintendedtodo,onfollowedbyabGoxinthefollowingform:4X-Iff`fdfffdExpQected:Iq1.]TWhatTthefunctionexpAectsto ndonthestac9k,numbAered]TfromTthetop(mostrecen9tlypushed)tothebAottomitem.`Fzff ff`Fz ffff jfdLeft:Iq1.]TWhatTthefunctionwilllea9veTonthestac9k,numbAeredinthe]TsameTfashion.`Fzff ff`Fz ffffݟfdT oggles:Iq1.]Ttogglename:pWhatTthee ectofan9ytogglesisonthe]TbAeha9viourTofthefunction.`Fzffff`4X-XHappyUUreading.I4.1gHello!uTIAsUUever,westartbytellingtheworldwhoweare. tA1280Shbstheader)̋iA1281SFUNCTION{hello}A1282S{A1283Shjse Ei"============================================"A1284Shjse Ei"foryourCamelstyleandextractagain."A1285Shjse Ei"withstandardBibTeX,modifythe.insfile"A1286Shjse Ei"Warning:localizedforjBibTeX. s.Foruse\"A1287S"============================================"A1288S"bibliographypackage,version1.0korlater"A1289S"UsewithLaTeX2eandtheCamelprototypeX"A1290S"--------------------------------------------"A1291S"documentationlastupdated:5December1994"A1292S"codelastupdated:22March19958"A1293S"version:3r1.0ic9N"A1294S"Camelstylepackage.qf"A1295S"Thisisthe`law'styleforBibTeXandthe s,"A1296S"============================================"A1297Sstack$A1298S}A1299Sh=bstheader)̋iI4.2gVariableinitializationsuTIThisUUcommandtakesthreebracedarguments,whichinorderare:&`ENTRYэU81.bAUUlistof eldnames;514soU82.bAUUlistofintegervqariables;andU83.bAUUlistofstringvqariables.IThe eldnamescreatedhereincludesomenotfoundinthestandardBiDb32TU>ExX Istyles.?TheDuseofbGoththestandardandthesenewitemsisfullydocumentedIelsewhere,sonocommentaryisgivenhere.SucetosaythateachitemintheIlistUUcreatesa eldthatsubsequentcoGdecanworkon.A1300Shbstlib9rary( i A1301SENTRY fieldnamesA1302S{addressA1303SannoteA1304SauthorA1305SbooktitleA1306SchapterA1307SeditionA1308SeditorA1309ShowpublishedA1310SinstitutionA1311SjournalA1312SkeyA1313SmonthA1314SnoteA1315SnumberA1316SorganizationA1317SpagesA1318SpublisherA1319SschoolA1320SseriesA1321StitleA1322StypeA1323SvolumeA1324SyearA1325SdateA1326SjurisdictionA1327ScourtA1328SdivisionA1329SdivnoA1330ScasedateA1331StranslatorA1332SbooktranslatorA1333ScitesA1334SunitsA1335S}XNonearede ned. !Notethatanyintegersorstringsde nedwiththeENTR*Yentryintegers IcommandUUarecreatedfore}'achentryinthecitationlist.A1336S{}XThere~arenogeneralstringvqariables,either.SuchvariablesmightbGede nedbentrystrings Ifor5_useinbuildingkeylabGelsforuseinsorting,;orinanend-of-documentbibliog-IraphyUUstyle.A1337S{labelextra.labelsort.label}525ysoXAfewstringmacrosareneededtoholdthingstempGorarilyremovedfromtheSTRINGS Istack.BiDb32TU>ExXĺonlyallowstensuchstringvqariables;mthenamedvariablesinthisIlist5willslowlybGereducedinnumbGerthroughredesignofthefunctionsthatrequireIthem.qMeanwhile,UUlet'shopGewedon't ndasuddenneedformore...A1338SSTRINGS{stuvscrubdate A1339XdDvolume.varyear.varnumber.varjournal.varpages.var}XTheȅfollowinglistofintegersisprobablyalsolargerthanitneedstobGe.BAgain,3PINTEGERSIoptimization ofstackusagewillleadtotheeliminationofsomeofthesevqariables.A1340SINTEGERS{itemcountdate.specialscharcountabc A1341 nameptrnamesleftnumnamesa.logical}XThese:functionsprovidestringsusedintheparsingofJapaneselegalcitations.yFUNCTIONSIIfsthelanguageofsuchcitationsisnotEnglish,thesestringsmayneedtobGeedited.A1342SFUNCTION{dc..}{"DistrictCourt"} A1343SFUNCTION{sc..}{"SupremeCourt"}6I4.3gFunctionde nitionsuTI4.3.1l#LogicTandmeasuremen9tITheseEhavebGeencopiedverbatimfromOrenPatashnik's1988release.Hiscom-/>not />and4or ImentaryDonthesefunctionsreads:ihThesethr}'eefunctionspoponeortwo(integer)Iar}'gumentsMfromthestackandpushasingleone,[either8ExXarprimitivescanonlyconvertinthisdirectionforsinglecharacters.Ac-Icordingly*,UUweneedtobGeabletoraisebyapGoweroften.536ɠsofI߀ff`fd fffdExpQected:Iq1.]TATsinglein9teger.`Fz ff  ff`Fz ff ff jfdLeft:Iq1.]TATsinglein9teger.`Fz ff ff`Fz ff ffݟfdT oggles:Iq1.]Tnone`Fz ffff`(&fA1359SFUNCTION{times.ten} A1360XdD{duplicate$duplicate$duplicate$duplicate$duplicate$A1361apduplicate$duplicate$duplicate$duplicate$A1362ap+++++++++A1363XdD}XBiDb32TU>ExXprovidesabuilt-incommandformeasuringthelengthofastringinfcharacter.length I\text0units".MSometimesit'snicetoknowthelengthofastringinchar}'acters!; thisIfunctionUUprovidesthatfacility*.#-I߀ff`fd fffdExpQected:Iq1.]TATstring.`Fz ff ff`Fz ff ff jfdLeft:Iq1.]TAnTin9tegergivingthenumbAerofcharactersinthestring.`Fz ff ff`Fz ff ffݟfdT oggles:Iq1.]Tnone`Fz ffff`A1364SFUNCTION{character.length} A1365f{'u:=A1366p2#0'charcount:=A1367p2{uempty$not}A1368yw^{uA1369Shjse Ei*Oduplicate$A1370Sheng li*O#2A1371Shjse Ei*Ois.kanji.str${#3}{#2}if$A1372global.max$substring$'u:=A1373charcount#1+'charcount:=A1374yw^}while$A1375p2charcountA1376f}XThisqKfunctionchecksqKforasubstringatthebGeginningorattheendofagiven 6first.in.second Istring.#This;Tfacilityisneeded,tforexample,toprovideanautomatedmeansofItogglingtheformattingofthecourtdivisionstringforJapanesecases.PIntheIde ntionUUbGelow,tisthesubstringlength,anduisthestringlength.;X-Iff`fd fffdExpQected:Iq1.]TATstringtoggle.`Fz ff ffIq2.]TATstring(thestringinwhic9htoloAok).`Fz ff ffIq3.]TATstring(thesubstringtoloAokfor).`Fz ff ff`Fz ffff jfdLeft:Iq1.]TATsinglein9teger(0or1),indicatingwhetherthesubstringwas ]TfoundTatthespAeci edlocationinthestringforsearc9h.`Fzff ff`Fz ff ffݟfdT oggles:Iq1.]Tend:pTheTfunctionloAoksattheendofthegiv9enstring.`Fz ff ffIq2.]Tstart:pTheTfunctionloAoksatthestartofthegiv9enstring.`Fz ffff`?fA1377SFUNCTION{first.in.second} A1378f{'s:=A1379p2duplicate$empty$A1380p2{pop$pop$#0#0}A1381p2{swap$duplicate$character.length'a:=A1382yw^swap$duplicate$character.length'b:=547gsoA1383yw^ba< A1384yw^{pop$pop$#0#0}A1385yw^{s"end"=A1386{ba-#1+global.max$substring$=A1387]{ba-#1+#1}A1388]{#0#0A1389]}if$A1390}A1391{s"start"=A1392]{#1asubstring$=A1393{#1#1}A1394{#0A1395}if$A1396]}A1397]{s"reverse"=A1398{ba-#1+'b:=A1399D{b#0>}A1400D{duplicate$A1401:basubstring$A1402:'s:=A1403:swap$duplicate$s=A1404*f{pop$pop$b#0'b:=#1}A1405*f{b#1=A1406{pop$pop$#0#0'b:=#0}A1407{swap$b#1-'b:=A1408}if$A1409*f}if$A1410D}while$A1411}A1412{ba-#1+'b:=#1'c:=A1413D{cb<}A1414D{duplicate$A1415:casubstring$A1416:'s:=A1417:swap$duplicate$s=A1418*f{pop$pop$cb'c:=#1}A1419*f{bc-#1=A1420{pop$pop$#0b'c:=#0}A1421{swap$c#1+'c:=A1422}if$A1423*f}if$A1424D}while$A1425}if$A1426]}if$A1427}if$A1428yw^}if$A1429p2}if$A1430f}XThis@Yfunctionreturnsoneofthreestrings,`letter',`numeral'@Yor`other`tget.character.type ItoSindicatethetypGeofthecharacterit ndsonthestack. Thiswaswrit-Iten2foruseinthegather.charsfunction, butmay ndotherusesaswell.558wsofIff`fd fffdExpQected:Iq1.]TEitherT*orasinglec9haractertobAescannedfor.`Fz ff  ffIq2.]TATsinglec9haractertobAeexaminedbythefunction.`Fz ff ff`Fz ffff jfdLeft:Iq1.]TEitherTletter,numeralorother,thesigni canceofwhic9h ]TdepAendsTuponthetoggleused.`Fzff ff`Fz ffffݟfdT oggles:Iq1.]T*causesthec9haractertobAeidenti edasanumeral,andletter ]TorTsomethingelse.`Fzff"ffIq2.]TAn9yTcharacterotherthan*causesthatcharactertobAe ]Tiden9ti edTasother,andanyothercharacterstobAeidenti ed]TasTletter.`Fz"ffff`G A1431SFUNCTION{get.character.type} A1432]{duplicate$"*"=A1433kJ{pop$duplicate$empty$A1434yw^{pop$"other"}A1435yw^{chr.to.int$duplicate$A1436duplicate$#47>swap$#58swap$duplicate$#91swap$#123_+soA1579apwhile$ A1580XdD}XThe;hfollowingfunctionwasdesignedfordateparsing,@butmay ndotherusesLgather.chars Iaswell.IIt ndsthe rstletterornumeralinagivenstring,thenproGceedstobuildIasubstringuntilithitsadi erentcharactertypGeortheendofthestring,watwhichIpGointUUitstopsparsingandterminates.:-IȀff`fd fffdExpQected:Iq1.]TATstringforparsing.`Fz ff ff`Fz ffff jfdLeft:Iq1.]TATstringtogglesho9wingthecharactertypAeofthe rst]ThomogenousTsubstringinthestringforparsing.`FzffffIq2.]TATstringofc9haractersfromthefrontofthegivenstringwhich]TareTlettersorn9umbAersTonly:.`Fzff ffIq3.]TTheTremainderofthestring.`Fz ff  ff`Fz ff ffݟfdT oggles:Iq1.]Tnone`Fz ffff`?&fA1581SFUNCTION{gather.chars}A1582]{A1583f"forward"=A1584f{swap$duplicate$character.length'a:=A1585p2't:=A1586p2duplicate$A1587p2{t#1#1substring$swap$get.character.typeA1588yw^"other"=A1589yw^tempty$notand}A1590p2{t#2global.max$substring$'t:=duplicate$A1591p2}while$A1592p2duplicate$t#1#1substring$swap$get.character.typeA1593p2t#1#1substring$swap$A1594p2""swap$duplicate$'u:=A1595p2t#2global.max$substring$'t:=A1596p2{u=}A1597p2{*swap$A1598yw^u*'u:=A1599yw^u#1#1substring$swap$A1600yw^u#1#1substring$A1601yw^u#2global.max$substring$'u:=A1602yw^t#1#1substring$swap$get.character.typeA1603yw^t#1#1substring$swap$A1604yw^duplicate$u=A1605yw^{t#2global.max$substring$'t:= s,}A1606yw^{swap$pop$A1607yw^}if$A1608p2}while$A1609p2swap$pop$tswap$uA1610f}A1611f{swap$duplicate$character.length'a:=A1612p2't:=A1613p2duplicate$A1614p2{ta#1substring$swap$get.character.typeA1615yw^"other"=A1616yw^tempty$notand}A1617p2{a#1-'a:=62?j4soA1618yw^t#1asubstring$'t:= A1619p2}while$A1620p2duplicate$ta#1substring$swap$get.character.typeA1621p2ta#1substring$swap$A1622p2""swap$duplicate$'u:=A1623p2a#1-'a:=A1624p2t#1asubstring$'t:=A1625p2{u=}A1626p2{swap$*swap$A1627yw^u*'u:=A1628yw^u#1#1substring$swap$A1629yw^u#1#1substring$A1630yw^u#2global.max$substring$'u:=A1631yw^ta#1substring$swap$get.character.typeA1632yw^ta#1substring$swap$A1633yw^duplicate$u=A1634yw^{a#1-'a:=t#1asubstring$'t:= s,}A1635yw^{swap$pop$A1636yw^}if$A1637p2}while$A1638p2swap$pop$tswap$uA1639f}if$A1640]}XW*eusethisfunctionfromthestandardstyles.0Itaddsatieifthestringitis߀Htie.or.space.connect IappliedUUtoisthreecharactersorlessinlength.)-Iـff`fd fffdExpQected:Iq1.]TATstring`Fz ff ffIq2.]TATsecondstring`Fz ff ff`Fz ff ff jfdLeft:Iq1.]TOneTstring`Fz ff ff`Fz ff ffݟfdT oggles:Iq1.]Tnone`Fz ffff`.&fA1641XdDFUNCTION{tie.or.space.connect} A1642XdD{duplicate$text.length$#3ExXsuppliesforthispurpose.XThisCisbasedonOrenPatashnik'soriginalfunctionofthesamename.ExXnameformat)into\First?VonLast,Junior",separatedbybcommasandwithanandbGeforethelast(butendingwithet~al.iftheblastĄofmultipleauthorsisothers).UThisfunction'sargumentshouldbalwayshcontainatleastonename.5xTheformat.authorsfunctionreturnsbtheɠresultofformat.names(author)iftheauthorispresent,orelseitbreturnsUUthenullstring.XThis functionisusedtoformatanyname eldthatisthrownatit.YItisbasedIon1the1988release,gbutwithmoGdi cationstopermittoggling,gsincetheBlueIBoGokrequiresdi erentauthorformatsfordi erenttypGesofmaterial.-/ThetogglingIstrategyUUshouldalsomakemoGdi cationofthisstyleaprettysimplematter.64AsoffIff`fd fffdExpQected:Iq1.]TTheTcon9tentsofonename eld`Fz ff  ffIq2.]TstringTtoggle(eitherfirstinitial,lastonlyorfull)`Fz ff ff`Fz ffff jfdLeft:Iq1.]TATsinglestring,con9tainingaformattednameornames,or ]Tempty$`Fzff ff`Fz ff ffݟfdT oggles:Iq1.]T rstinitial:pYieldsTtheform\F.Bennett,Jr."`Fz ff ffIq2.]Tlastonly:pYieldsTtheform\Bennett"`Fz ff ffIq3.]Tfull:pyieldsT\F:rankBennett,Jr."`Fz ffff`?fA1675SFUNCTION{format.names} A1676f{swap$duplicate$empty$A1677yw^{swap$pop$}A1678yw^{'s:=A1679'u:=A1680#1'nameptr:=A1681snum.names$'numnames:=A1682numnames'namesleft:=A1683{namesleft#0>}A1684]{u"lastonly"=A1685{snameptr"{vv~}{ll}"format.name$'t:=}A1686{u"firstinitial" s,=A1687D{snameptr"{f.~}{vv~}{ll}{,jj}"format.name$'t:=}A1688D{u"full"=A1689:{snameptr"{ff~}{vv~}{ll}{,jj}"format.name$'t:=}A1690:{"styleerror;invalidornon-existenttoggle"warning$}A1691:if$A1692D}A1693Dif$A1694}A1695if$A1696nameptr#1>A1697D{namesleft#1>A1698:{","*t*}A1699:{numnames#2>A1700*f{","*}A1701*f'skip$A1702*fif$A1703*ft"others"=A1704{"et~al."*}A1705{"and"*t*}A1706*fif$A1707:}A1708Dif$A1709D}A1710D'tA1711if$A1712nameptr#1+'nameptr:=A1713namesleft#1-'namesleft:=A1714]}A1715while$A1716yw^}A1717p2if$A1718f}65BsoIDates TheqstylecoGdeforparsingandformattingdatesismuchmorecomplex Ithanthatfornames.}ThisisduetotheneedtobuildthenecessarytoGolsoutofIBiDb32TU>ExXprimitives,'sincenobuilt-intoGolsforthistaskaresupplied.DJTherearetwoIdate:formattingroutinesbGelow.ExXstyles,MunderIaXnewname.|TheLfhezMx li Bib)Eversionofformat.dateisunderpinnedbyawholesetIofUUnewfunctions,andallowsgreat exibilityinthesyntaxforenteringdates.6XOldformatroutine The:format.datefunctionisforthemonthandyear, format.month.yearIbut>wegiveawarningifthere'sanemptyyearbutthemonthisthere,18andweIreturnUUtheemptystringifthey'rebGothempty*.^19XThisisnotchangedovertheformat.datefunctionintheoriginalstandardIBiDb32TU>ExX>styles.-It>isretained,yalthoughthedistributedLfhezMx li Bib*styleswon'tbGeImakingUUuseofit.#-I߀ff`fd fffdExpQected:Iq1.]Tnone`Fz ff ff`Fz ff ff jfdLeft:Iq1.]TATsinglestring.`Fz ff ff`Fz ff ffݟfdT oggles:Iq1.]Tnone`Fz ffff`(&fA1719XdDFUNCTION{format.month.year} A1720XdD{yearempty$A1721kJ{monthempty$A1722p2{""}A1723p2{"there'samonthbutnoyearin"cite$*warning$A1724yw^monthA1725p2}A1726tif$A1727kJ}A1728kJ{monthempty$A1729p2'yearA1730p2{month""*year*}A1731tif$A1732kJ}A1733apif$A1734XdD}XNew;dateparsingroutines The-Xformat.datefunctiondepGendsupona InumbGer)ofsupportingfunctions.jBSomeoftheseareofgeneralutility*,andareIpresentedUUabGove.qThosepresentedherearespGeci ctothisparticularfunction.XThisUUaddsaleading19toayearenteredintwo-digitform.fillout.a.year#-I߀ff`fd fffdExpQected:Iq1.]TATsinglestring.`Fz ff ff`Fz ff ff jfdLeft:Iq1.]TATsinglestring.`Fz ff ff`Fz ff ffݟfdT oggles:Iq1.]Tnone`Fz ffff`(&fA1735SFUNCTION{fillout.a.year} A1736XdD{duplicate$character.length#2=A1737ap{"19"swap$*}A1738ap'skip$Iffffr J=w-:19LThisXcommenÎtbyOrenPatashnik.66CsoA1739apif$ A1740XdD}XThisCfunctionisasimpleparser,&usedinconvertingCdatabaseentriesthathave parse.month IbGeen0Videnti edasprobableabbreviatedmonthentriesintonumericalstringform.)X-Iff`fdfffdExpQected:Iq1.]TATsinglestring,whic9hshouldconsistofexactlythree]TalphabAeticTc9haracters.`Fzff ff`Fz ff ff jfdLeft:Iq1.]TATsinglestringofn9umbAers.`Fz ff ff`Fz ff ffݟfdT oggles:Iq1.]Tnone`Fz ffff`-fA1741SFUNCTION{parse.month}A1742XdD{duplicate$"jan"=A1743ap{pop$"1"}A1744ap{duplicate$"feb"=A1745kJ{pop$"2"}A1746kJ{duplicate$"mar"=A1747t{pop$"3"}A1748t{duplicate$"apr"=A1749~0{pop$"4"}A1750~0{duplicate$"may"=A1751 {pop$"5"}A1752 {duplicate$"jun"=A1753L{pop$"6"}A1754L{duplicate$"jul"=A1755x{pop$"7"}A1756x{duplicate$"aug"=A1757{pop$"8"}A1758{duplicate$"sep"=A1759p{pop$"9"}A1760p{duplicate$"oct"=A1761{pop$"10"}A1762{duplicate$"nov"=A1763W({pop$"11"}A1764W({duplicate$"dec"=A1765T{pop$"12"}A1766T{"invalidmonthin"cite$*warning$A1767="passingtexttoCamelverbatim"warning$A1768="t"'scrubdate:=A1769T}if$A1770W(}if$A1771}if$A1772p}if$A1773}if$A1774x}if$A1775L}if$A1776 }if$A1777~0}if$A1778t}if$A1779kJ}if$A1780ap}if$A1781XdD}\eThisetakesanumericalstringandconvertsittoeitheranabbrviatedora format.month.name67DsoIspGelled-outUUmonthname./-IӀff`fd fffdExpQected:Iq1.]TATtogglestring.`Fz ff  ffIq2.]TATn9umericalstring.`Fz ff ff`Fz ff ff jfdLeft:Iq1.]TATstring.`Fz ff ff`Fz ff ffݟfdT oggles:Iq1.]Tlong: Themon9thnameplacedonthestackwillbAespelledout.`Fz ff ffIq2.]Tshort:pTheTmon9thnamewillbAeabbreviated.`Fz ffff`4&fA1782SFUNCTION{format.month.name} A1783XdD{swap$duplicate$empty$A1784ap{pop$pop$""}A1785ap{swap$"long"=A1786kJ{duplicate$"1"=A1787t{"January"}A1788t{duplicate$ s,"2"=A1789~0{"February"}A1790~0{duplicate$ s,"3"=A1791 {"March"}A1792 {duplicate$"4"=A1793L{"April"}A1794L{duplicate$ s,"5"=A1795x{"May"}A1796x{duplicate$"6"=A1797{"June"}A1798{duplicate$ s,"7"=A1799p{"July"}A1800p{duplicate$ s,"8"=A1801{"August"}A1802{duplicate$ s,"9"=A1803W({"September"}A1804W({duplicate$ s,"10"=A1805T{"October"}A1806T{duplicate$ s,"11"=A1807={"November"}A1808={duplicate$ s,"12"=A1809ܰ{"December"}A1810ܰ{"invalidmonthin"cite$*warning$""A1811#"passingtexttoCamelverbatim"warning$A1812#"t"'scrubdate:=A1813ܰ}if$A1814=}if$A1815T}if$A1816W(}if$A1817}if$A1818p}if$A1819}if$A1820x}if$A1821L}if$A1822 }if$A1823~0}if$A1824t}if$A1825kJ}A1826kJ{duplicate$"1"=68EgsoA1827t{"Jan."} A1828t{duplicate$ s,"2"=A1829~0{"Feb."}A1830~0{duplicate$ s,"3"=A1831 {"Mar."}A1832 {duplicate$"4"=A1833L{"Apr."}A1834L{duplicate$ s,"5"=A1835x{"May"}A1836x{duplicate$"6"=A1837{"Jun."}A1838{duplicate$ s,"7"=A1839p{"Jul."}A1840p{duplicate$ s,"8"=A1841{"Aug."}A1842{duplicate$ s,"9"=A1843W({"Sept."}A1844W({duplicate$ s,"10"=A1845T{"Oct."}A1846T{duplicate$ s,"11"=A1847={"Nov."}A1848={duplicate$ s,"12"=A1849ܰ{"Dec."}A1850ܰ{""A1851ܰ}if$A1852=}if$A1853T}if$A1854W(}if$A1855}if$A1856p}if$A1857}if$A1858x}if$A1859L}if$A1860 }if$A1861~0}if$A1862t}if$A1863kJ}if$A1864Sswap$pop$A1865ap}if$A1866XdD}XThisfunctiontakesalabGelledstackofnumericitems,andplacesitscontentsLextract.date Iin:Baformattedstringonthestack.hItisasubroutinecalledbyformat.date,?andIisUUnotintendedforusedirectlyinentrytypGefunctions.XThebGehaviourofthisfunctionisalittletoocomplextodescribeitsinputIand$outputbGehaviourusingourusualdescriptionbox,.sowereverttoprosehere.IThefexpGectationofwhatwillappearonthestackdependsonthecontentsfoftheIinteger2vqariableitemcount.1^F*oreachdateitemcounted,)thefunctionexpGectstoI nd?2twoitemsonthestack:fastringpGossibly aggingthevqariableintowhichtheIitemUUshouldbGeplaced;andanumericalstring.XIf3ritemcountis0,:9wechecktoseewhetherthestreamlinedformatforparallelIcitationsUUhasbGeenused.qIfnot,awarningofanemptydateisissued.XIfitemcountis1,the agstringisignored,andthenumericalitemisassumedItoUUbGeayear.69FǠsoXIfitemcountis2,ʈthe agstringsarebGothignored,andthenumericalitems IareUUassumedtobGeayearandamonth,inthatorder.XIf|Hitemcountis3,the rstitemisassumedtobGeayear.TheassignmentIof3thesecondtwo3itemsdepGends rstuponthecontents3oftheintegervqariableIdate.specials._Ifthisis0,thenthe agsareignored,andthenumericalitemsIareoassumedtobGeadayandamonth,uinthatorder.nIfdate.specialsis1I(`true'),thenthe agofthe rstitemischeckedtoseewhetheritis\month".IfIso,/the rstitemisassignedtothethemonthvqariable,andthenexttothethedayIvqariable.qOtherwiseUUtheassignmentsarereversed.A1867SFUNCTION{extract.date} A1868f{'v:=""'s:=""'t:=""'u:=A1869p2itemcount#0=A1870p2{citesempty$A1871yw^{"somedateorotherisCOMPLETELYemptyin"cite$*A1872warning$}A1873yw^'skip$A1874yw^if$A1875p2}A1876p2{itemcount#1=A1877yw^{pop$fillout.a.year's:=""'u:=""'t:=}A1878yw^{itemcount#2=A1879{pop$swap$pop$swap$duplicate$character.length#4=A1880]{swap$"--"swap$**'s:=""'t:=}A1881]{swap$fillout.a.year's:='t:=A1882]}if$A1883]""'u:=A1884}A1885{itemcount#3=A1886]{date.specialsA1887{pop$fillout.a.year's:=A1888D"month"=A1889D{'t:=A1890:pop$'u:=}A1891D{'u:=A1892:pop$'t:=A1893D}if$A1894}A1895{pop$fillout.a.year's:=A1896Dpop$'u:=A1897Dpop$'t:=A1898}if$A1899]}A1900]{"toomanyitemsfordatein"cite$*warning$A1901]}if$A1902}if$A1903yw^}if$A1904p2}if$A1905p2vduplicate$"month.dd.yy"=A1906p2{pop$s","u"\"t"long"format.month.name}A1907p2{duplicate$"dd.month.yy"=A1908yw^{pop$s"\"t"long"format.month.name"\"u}A1909yw^{duplicate$"mo.dd.yy"=A1910{pop$s","u"\"t"short"format.month.name}70GsoA1911{duplicate$"dd.mo.yy"= A1912]{pop$s"\"t"short"format.month.name"\"u}A1913]{duplicate$"dd.mm.yy"=A1914{pop$s"/"t"/"u}A1915{duplicate$"mm.dd.yy"=A1916D{s"/"u"/"t}A1917D{"yy"=A1918:{""""""""s}A1919:{"invaliddatetoggleinstylefile"warning$A1920:}if$A1921D}if$A1922}if$A1923]}if$A1924}if$A1925yw^}if$A1926p2}if$A1927p2""'v:=A1928p2duplicate$empty$A1929p2{pop$pop$}A1930p2{swap$*'v:=}A1931p2if$A1932p2duplicate$empty$A1933p2{pop$pop$}A1934p2{swap$*vswap$* s,'v:=}A1935p2if$A1936p2duplicate$empty$A1937p2{pop$v}A1938p2{vswap$*}A1939p2if$A1940XdD}XThisUUisusedtopGerformanadditionoperationonastringofnumerals.$topup.date/X-Iff`fd fffdExpQected:Iq1.]TAnTin9tegertobAeadded.`Fz ff  ffIq2.]TATstringconsistingofn9umeralsonly:.`Fz ff ff`Fz ffff jfdLeft:Iq1.]TATstringconsistingofthesumofthein9tegerandthenumeric ]Tstring.`Fzff ff`Fz ff ffݟfdT oggles:Iq1.]Tnone`Fz ffff`3'A1941SFUNCTION{topup.date}A1942XdD{'a:=A1943apduplicate$character.length#2=A1944ap{duplicate$#1#1substring$chr.to.int$#48-A1945kJtimes.tenswap$#2#1substring$chr.to.int$#48-A1946kJ+A1947ap}A1948ap{duplicate$character.length#1=A1949kJ{chr.to.int$#48-}A1950kJ{pop$#0"Ican'tcopewithmorethantwoJapaneseyeardigitsin"A1951tcite$*warning$A1952kJ}if$A1953ap}if$A1954XdDa+int.to.str$A1955XdD}71HɚsoXThisratherspGecializedfunctionconvertsaJapaneseImperialdatewrittenLformat.jdate Iinea xedsyntaxintotheLfhezMx li Bib+internaldatestack,foronwardhandlingbyIextract.date.HfIff`fd/8fffdExpQected:Iq1.]TAstringintheform:s57.9.27,wherethe rstletterindicates ]TtheTImpAerialreignofthey9eargiven,the rstnumericitemis]TtheTy9ear,thesecondthemonth,andthethirdtheday:.pAny]Tnon-alphabAetic,Tnon-n9umericcharactermaybAeusedasa]Tseparator.`Fz/8ff8 ff`Fz ffff jfdLeft:Iq1.]TitemcountTissetto2(onemoreisaddedb9ytheformat.date ]TfunctionTinwhic9hisfunctionisnested).`FzffffIq2.]TSixTstac9kitemsareoutput|seeextract.datefordetailson ]Tstac9kTsyntax.`Fzff ff`Fz ff  ffݟfdT oggles:Iq1.]Tnone`Fz ffff`Nw񍍑A1956SFUNCTION{format.jdate} A1957XdD{duplicate$#2global.max$substring$"*""forward"gather.charsA1958appop$'t:=swap$A1959ap#1#1substring$duplicate$"s"=A1960ap{pop$t#1925topup.date}A1961ap{duplicate$"m"=A1962kJ{pop$t#1867topup.date}A1963kJ{duplicate$"t"=A1964t{pop$t#1911topup.date}A1965t{"h"=A1966~0{t#1988topup.date}A1967~0{"invalidImperialcalendarcodein"cite$*warning$A1968~0}if$A1969t}if$A1970kJ}if$A1971ap}if$A1972apswap$A1973ap"*""forward"gather.charsA1974appop$swap$A1975ap"*""forward"gather.charsA1976appop$swap$pop$'t:=swap$"default"swap$tswap$"default"A1977apswap$"default"A1978ap#2'itemcount:=A1979XdD}QXThisUfunctionmakesuseofgather.charsandothersuppGortingfunctionsto format.date Ibuildastackofdateitems,(whichitthenparsesusingextract.date.P_ThesyntaxIforUUenteringdatesisdescribGedintheuserguide.#-I߀ff`fd fffdExpQected:Iq1.]TATsinglestringinappropriatedatesyn9tax.`Fz ff ff`Fz ff ff jfdLeft:Iq1.]Tnone`Fz ff ff`Fz ff ffݟfdT oggles:Iq1.]Tnone`Fz ffff`'w񍍑A1980SFUNCTION{format.date} A1981]{'v:=A1982fempty.to.null's:=A1983f#0'charcount:=A1984f#0'itemcount:=72ILsoA1985f#0'date.specials:= A1986f{sempty$not}A1987p2{s"*""forward"gather.charsA1988yw^duplicate$"letter"=A1989yw^{pop$duplicate$character.length#1=itemcountnotandA1990{pop$pop$sformat.jdate""'s:=}A1991{duplicate$character.length#3=A1992]{swap$'s:=A1993parse.month"month"#1'date.specials:=}A1994]{swap$'s:=A1995pop$"1""invaliddatein"cite$*warning$A1996"passingtexttoCamelverbatim"warning$A1997"t"'scrubdate:=A1998"default"A1999]}if$A2000}if$A2001yw^}A2002yw^{"numeral"=A2003{duplicate$character.length#1=A2004]{swap$'s:="default"}A2005]{duplicate$character.length#2=A2006{swap$'s:="default"}A2007{duplicate$character.length#4=A2008D{swap$'s:="default"}A2009D{swap$'s:=pop$"1"A2010:"invalidnumericalelementindatefor"cite$*warning$A2011:"passingtexttoCamelverbatim"warning$A2012:"t"'scrubdate:=A2013:"default"A2014D}if$A2015}if$A2016]}if$A2017}A2018{swap$'s:=pop$"1"A2019]"failedtoparsedatein"cite$*warning$A2020]"default"A2021}if$A2022yw^}if$A2023yw^itemcount#1+'itemcount:=A2024p2}while$A2025fvextract.dateA2026fscrubdate"t"=A2027f{pop$yearempty.to.null}A2028f'skip$A2029fif$A2030]}^эIAnyways,here'sthatlinenoise. Extractsciteinfotovqariablesfromaparseable IstringUUonthestack.qSyntaxUUis:qǍd_yearA2146f{numnames#4>A2147yw^{#3'namesleft:=}A2148yw^{numnames'namesleft:=}A2149p2if$A2150p2#1'nameptr:=A2151p2""A2152yw^{namesleft#0>}A2153yw^{nameptrnumnames=A2154]{snameptr"{ff}{vv}{ll}{jj}"format.name$"others"=A2155D{"{\etalchar{+}}"*A2156:#1'et.al.char.used:=A2157D}A2158D{snameptr"{v{}}{l{}}"format.name$*}A2159if$A2160]}A2161]{snameptr"{v{}}{l{}}"format.name$*}A2162if$A2163nameptr#1+'nameptr:=A2164namesleft#1-'namesleft:=A2165yw^}A2166p2while$A2167p2numnames#4>A2168yw^{"{\etalchar{+}}"*A2169#1'et.al.char.used:=A2170yw^}A2171yw^'skip$A2172p2if$A2173f}A2174f{s#1"{v{}}{l{}}"format.name$A2175p2duplicate$text.length$#2}A2270f{nameptr#1>A2271yw^{","*}A2272yw^'skip$A2273p2if$A2274p2snameptr"{vv{}}{ll{}}{ s,ff{}}{jj{}}"format.name$'t:=A2275p2nameptrnumnames=t"others"=andA2276yw^{"etal"*}A2277yw^{tsortify*}A2278p2if$A2279p2nameptr#1+'nameptr:=A2280p2namesleft#1-'namesleft:=A2281f}A2282]while$A2283S}A2284A2285SFUNCTION{sort.format.title}A2286S{'t:=A2287]"A"#2A2288f"An"#3A2289p2"The"#4tchop.wordA2290fchop.wordA2291]chop.wordA2292]sortifyA2293]#1global.max$substring$A2294S}A2295A2296SFUNCTION{author.sort}A2297S{authorempty$A2298f{keyempty$A2299yw^{"tosort,needauthororkeyin"cite$*warning$A2300""78O soA2301yw^} A2302yw^{keysortify}A2303p2if$A2304f}A2305f{authorsort.format.names}A2306]if$A2307S}A2308A2309SFUNCTION{case.sort}A2310S{titleempty$A2311f{keyempty$A2312yw^{"tosort,needtitleorkeyin"cite$*warning$A2313""A2314yw^}A2315yw^{keysortify}A2316p2if$A2317f}A2318f{titlesort.format.title}A2319]if$A2320S}A2321A2322SFUNCTION{author.editor.sort}A2323S{authorempty$A2324f{editorempty$A2325yw^{keyempty$A2326]{"tosort,needauthor,editor,orkeyin"cite$*warning$A2327""A2328]}A2329]{keysortify}A2330if$A2331yw^}A2332yw^{editorsort.format.names}A2333p2if$A2334f}A2335f{authorsort.format.names}A2336]if$A2337S}A2338A2339SFUNCTION{author.organization.sort}A2340S{authorempty$A2341f{organizationempty$A2342yw^{keyempty$A2343]{"tosort,needauthor,organization,orkeyin"cite$*warning$A2344""A2345]}A2346]{keysortify}A2347if$A2348yw^}A2349yw^{"The"#4organizationchop.wordsortify}A2350p2if$A2351f}A2352f{authorsort.format.names}A2353]if$A2354S}79P soA2355 A2356SFUNCTION{editor.organization.sort}A2357S{editorempty$A2358f{organizationempty$A2359yw^{keyempty$A2360]{"tosort,neededitor,organization,orkeyin"cite$*warning$A2361""A2362]}A2363]{keysortify}A2364if$A2365yw^}A2366yw^{"The"#4organizationchop.wordsortify}A2367p2if$A2368f}A2369f{editorsort.format.names}A2370]if$A2371S}A2372A2373SFUNCTION{presort}A2374S{type$"book"=A2375]type$"inbook"=A2376]orA2377f'author.editor.sortA2378f{type$"proceedings"=A2379yw^'editor.organization.sortA2380yw^{type$"manual"=A2381]'author.organization.sortA2382]{type$"case"=A2383'case.sortA2384{type$"statute"=A2385D'case.sortA2386D'author.sortA2387if$A2388}A2389]if$A2390]}A2391if$A2392yw^}A2393p2if$A2394f}A2395]if$A2396]"X"A2397]*A2398]year"yy"format.datesortifyA2399]*A2400]"X"A2401]*A2402]titleempty.to.nullA2403]sort.format.titleA2404]*A2405]#1entry.max$substring$A2406]'sort.key$:=A2407S}A240880QYsoA2409SITERATE{presort} A2410A2411SSORTA2412A2413SFUNCTION{begin.bib}A2414S{et.al.char.usedA2415f{"\newcommand{\etalchar}[1]{$^{#1}$}"write$newline$}A2416f'skip$A2417]if$A2418]preamble$empty$A2419f'skip$A2420f{preamble$write$newline$}A2421]if$A2422S}A2423A2424SEXECUTE{begin.bib}A2425A2426SITERATE{call.type$}A2427Sh=bsttrailer' i!čI5aLAff.bib leA2428ShbibciA2429S@string{asr..="Am.~Soc.\Rev."}A2430S@book{bluebook,A2431XdDtitle={AUniformSystemofCitation},A2432XdDedition={19th},A2433XdDyear=1989A2434S}A2435S@book{knuth,A2436XdDtitle={The{\TeX}book},A2437XdDyear=1990,A2438XdDauthor={D.E.Knuth}A2439S}A2440S@book{leunen,A2441XdDauthor={M.-C.vanLeunen},A2442XdDtitle={AHandbookforScholars},A2443XdDyear=1979A2444S}A2445S@book{latex-book,A2446XdDtitle={\LaTeX:adocumentpreparationsystem},A2447XdDyear=1994,A2448XdDauthor={LeslieLamport}A2449S}A2450S@inbook{companion-bibs,A2451XdDtitle={BibliographyGeneration},A2452XdDchapter=13,A2453XdDpages={371},A2454XdDcrossref={latex-companion}A2455S}A2456S@book{latex-companion,A2457XdDauthor={M.GoosensandFrankMittelbachandA.Samarin},A2458XdDtitle={The\LaTeX\Companion},81R!TsoA2459XdDbooktitle={The\LaTeX\Companion}, A2460XdDyear=1994A2461S}A2462S@techreport{oren-user,A2463XdDauthor={OrenPatashnik},A2464XdDtitle={\BibTeXing},A2465XdDyear=1988,A2466XdDtype={CTANdocument}A2467S}A2468S@techreport{oren-hackers,A2469XdDauthor={OrenPatashnik},A2470XdDtitle={Designing\BibTeX\Styles},A2471XdDtype={CTANdocument},A2472XdDyear=1988A2473S}A2474S@book{maki-constitution,A2475XdDauthor={Maki,JohnMcGilvrey},A2476XdDtitle={CourtandConstitutioninJapan:SelectedSupremeCourtDecisions,A2477t1948-1960},A2478XdDpublisher={WashingtonUniversityPress},A2479XdDyear=1964A2480S}A2481S@booklet{sansom-constitution,A2482XdDauthor={Sansom,{Sir}GeorgeBailey},A2483XdDtitle={TheFirstJapaneseConstitution:ALecture},A2484XdDnote={deliveredbeforetheA2485tAsiaticSocietyofJapan},A2486XdDyear=1938A2487S}A2488S@article{macauley,A2489XdDauthor={StuartMacauley},A2490XdDtitle={Non-ContractualRelationsA2491SinBusiness:APreliminaryStudy},A2492XdDvolume={28},A2493XdDjournal=asr..,A2494XdDpages={55},A2495XdDyear={1963}A2496S}A2497S@mastersthesis{homma-derivative,A2498XdDtitle={TheDerivativeSuitunderJapaneseLawasaMeasureofA2499:CorporateGovernance},A2500XdDauthor={MasahiroHomma},A2501XdDinstitution={SchoolofOrientalandAfricanStudies},A2502XdDtype={LL.M.thesis},A2503XdDyear={1994}A2504S}A2505S@case{bradshaw-v-us,A2506XdDtitle={BradshawvUnitedStates},A2507XdDcites={231Ct.Cl.144(1982)=683F.2d365(1982)}A2508S}A2509S@incollection{haley-land-lease,A2510XdDtitle={Japan'sNewLandandHouseLeaseLaw},A2511XdDauthor={JohnOwenHaley},A2512XdDcrossref={policy-failure},82S)soA2513XdDpages=149, A2514S}A2515S@book{policy-failure,A2516XdDtitle={LandIssuesinJapan:APolicyFailure?},A2517XdDbooktitle={LandIssuesinJapan:APolicyFailure?},A2518XdDyear=1992A2519S}A2520S@article{appleyard-heed,A2521XdDauthor={BryanAppleyard},A2522XdDtitle={WhyMajorshouldheedthepress},A2523XdDpages=21,A2524XdDjournal={TheIndependent},A2525XdDyear={7jul1995},A2526XdDplace={London}A2527S}A2528S@statute{sga,A2529XdDtitle={SaleofGoodsAct},A2530XdDyear={1979},A2531XdDjurisdiction={england}A2532S}A2533S@case{heap,A2534XdDtitle={HeapvMotorists'AdvisoryAgencyLtd},A2535XdDyear=1923,A2536XdDjournal={KB},A2537XdDnumber=1,A2538XdDpages=577A2539S}A2540S@case{halsall-v-brizell,A2541XdDtitle={HalsallvBrizell},A2542XdDcites={[1957]Ch169=[1957]1AllER371}A2543S}A2544Sh=bibciI6aLTheffDriverFileA2545Shinstaller"iA2546S\def\batchfile{camel.ins}A2547S\inputdocstrip.texA2548S\preambleA2549A2550SCopyright(C)1992--95FrankBennett,Jr.A2551SAllrightsreserved.A2552A2553SThisfileispartoftheCamelpackage.A2554S\endpreambleA2555A2556S\def\batchfile{camel.dst}Y%ignoredindistributionA2557S\inputdocstrip.texB&4%ignoredindistributionA2558A2559S\Ask\answer{%A2560kJ**************************************************************A2561]^^J*lzPLEASENOTEA2562]^^J*A2563]^^J*CamelrequiresalargeBibTeX,withawizard-defined83T2soA2564]^^J*functionspaceofover6,000. s,Thefunctionspacein A2565]^^J*standardBibTeXisonly3,000,soifyourBibTeXhasneverA2566]^^J*beenenlarged,itwillprobablyneedtoberecompiled.A2567]^^J*A2568]^^J*Ifthisseemsterriblycryptic,justgoaheadandgiveA2569]^^J*itago. s,Feelfreetowritemeonfb@soas.ac.ukifyouA2570]^^J*haveproblems.A2571]^^J*A2572]^^J*Inadditiontocamel.dtx,youwillalsoneedthekeyvalA2573]^^J*andoverwordpackages,alsoavailablefromCTAN. s,YouA2574]^^J*shouldhaveanup-to-datecopyofindex.dtxaswell.A2575]^^J*A2576]^^J*Also,toprintthe.dtxfilesintheCamelbundle,youA2577]^^J*shouldusetheusualgind.istfileformakingtheindexes;A2578]^^J*camel.istisusedforspecialpurposesoutlinedintheA2579]^^J*manual.A2580]^^J*A2581]^^J*ShallIunpackmythings?A2582]^^J*A2583]^^J*Ifyouwantmetogoahead,answer`y'below,otherwise`n'.A2584]^^J*A2585]^^J**************************************************************}A2586A2587S\keepsilentA2588A2589S\preambleA2590A2591SThisfileispartoftheCamelpackage.A2592S---------------------------------------A2593SThisisageneratedfile.A2594A2595SIMPORTANTNOTICE:A2596A2597SYouarenotallowedtochangethisfile. s,YoumayhowevercopyA2598SthisfiletoafilewithadifferentnameandthenchangetheA2599Scopyif(a)youdonotchargeforthemodifiedcode,(b)youA2600SacknowledgeCamelanditsauthor(s)inthenewfile,ifitA2601Sisdistributedtoothers,and(c)youattachthesesameA2602Sconditionstothenewfile.A2603A2604STheaboveconditionsdonotapplytothedemonstrationA2605Sfiletest.tex.A2606A2607SYouarenotallowedtodistributethisfilealone. s,YouarenotA2608SallowedtotakemoneyforthedistributionoruseofthisfileA2609S(orachangedversion)exceptforanominalchargeforcopyingA2610Setc.A2611A2612SYouareallowedtodistributethisfileundertheconditionthatA2613Sitisdistributedwithallofitscontents,intact.A2614A2615SForerrorreports,orofferstohelpmakeCamelamorepowerful,A2616Sfriendlier,andbetterpackage,pleasecontactmeonA2617S`fb'atsoas.ac.uk84U;soA2618 A2619S\endpreambleA2620A2621A2622S{\ifx\answer\yA2623A2624S\generate{\file{camel.sty}{\from{camel.dtx}{lexitex}}A2625\file{camel.ist}{\from{camel.dtx}{camelindex}}A2626\file{camel.bib}{\from{camel.dtx}{bib}}A2627\file{test.tex} s,{\from{camel.dtx}{testtex}}}A2628A2629S\fi}A2630A2631S\keepsilentA2632A2633A2634S\ifToplevel{A2635S\Msg{***********************************************************}A2636S\Msg{*}A2637S\Msg{*Tofinishtheinstallation,youhavetomovethefollowing}A2638S\Msg{*fileintoadirectorysearchedbyTeX:}A2639S\Msg{*}A2640S\Msg{*\space\spacecamel.sty}A2641S\Msg{*}A2642S\Msg{*Youalsoneedtomovethefollowingfileintoadirectory}A2643S\Msg{*searchedbymakeindex:}A2644S\Msg{*}A2645S\Msg{*\space\spacecamel.ist}A2646S\Msg{*}A2647S\Msg{*NotethatCameldoesnotworkbyitself;stylemodules}A2648S\Msg{*(suchaslaw.dtx)aresuppliedseparately. s,Theycan}A2649S\Msg{*befoundonCTANintheCamelsubdirectory.}A2650S\Msg{*}A2651S\Msg{***********************************************************}A2652S}A2653Sh=installer"iA2654ShtesttexviA2655S\documentclass{article}A2656S\usepackage{camel}A2657A2658Sh+testtex!?