; TeX output 1997.03.06:1732so#]DtGGcmr17The7tGGcmss17kqeyvalpackage!", cmsy10XQ cmr12DarvidCarlislepScarlisle@cs.man.ac.uk&37 1995/09/21.!Kt : cmbx9Abstractэoo cmr9ADL5Aacmr6A TuAEXDpac9k|rageimplementingasystemallowingthesettingofparam- betersT(or`namedargumen9ts'witha cmsy9hj cmti9keyUi=hvalue i"syntax.oEg:p ߤN cmtt9\foo[height=3in,shadow=true]{bar}XK`y cmr10Thispackqageimplementsasystemofde ningandusingsetsofparameters, IwhichUUaresetusingthesyntax !", cmsy10h!': cmti10key}i !=hvalue[i+.XF*oreachkeywordinsuchaset,ͳthereexistsafunctionwhichiscalledwheneverItheparameterappGearsinaparameterlist.=F*orinstanceiftheset"aftersomesuggestionsfromTimothyV*anIZandt. Ls9S\def\KV@split#1=#2=#3\relax{% I10]\KV@@sp@def\@tempa{#1}%I11]\ifx\@tempa\@empty\elseI12f\expandafter\let\expandafter\@tempcI13p2\csname\KV@prefix\@tempa\endcsnameI14f\ifx\@tempc\relaxI15p2\KV@err{\@tempa\spaceundefined}%I16f\elseI17p2\ifx\@empty#3\@emptyI18yw^\KV@defaultI19p2\elseI20yw^\KV@@sp@def\@tempb{#2}%I21yw^\expandafter\@tempc\expandafter{\@tempb}\relaxI22p2\fiI23f\fiI24]\fi} L\KV@defaultIRunUUthedefaultcoGde,orraiseanerror. I25S\def\KV@default{%I26]\expandafter\let\expandafter\@tempbI27f\csname\KV@prefix\@tempa@default\endcsnameI28]\ifx\@tempb\relaxI29f\KV@err{Novaluespecifiedfor\@tempa}%I30]\elseI31f\@tempb\relaxI32]\fi}3P\KV@errIErrorUUmessages. I33S\def\KV@err#1{\errmessage{key-val:#1}}3so L\KV@@sp@def $\KV@@sp@b $\KV@@sp@cI\KV@@sp@defhcmdi.htoken8x9listظiL>islike\def,ZexceptthataspacetokenatthebGegin- Iningorendofhtoken"$listظi7isremovedbGeforemakingtheassignment.htoken#listظiImayͫnotcontainthetoken\@nil,unlessitiswithinabracegroup.ThenamesIof:gthesecommandswerechangedatversion1.05toensurethattheydonotclashIwithUU`internal'macrosinakeyfamily`sp'.XTheUUfollowingthreelinesareequivqalenttoI\def\KV@@sp@def#1#2{\KV@@sp@b#2\@nil\@nil~\@nil\relax#1}IWhereUU~isanexplicitspacetoken.I34S\def\@tempa#1{% I35S\def\KV@@sp@def##1##2{\KV@@sp@b##2\@nil\@nil#1\@nil\relax##1}}I36S\@tempa{}I37S\def\KV@@sp@b#1#2\@nil{\KV@@sp@c#1#2}I38S\def\KV@@sp@c#1\@nil#2\relax#3{\def#3{#1}} L\define@keyIDe nethecommandassoGciatedtothekey#2inthefamily#1.LFirstlooksfora IdefaultUUargument(thedefaultvqalueforthekey)I39S\def\define@key#1#2{%I40]\@ifnextchar[{\KV@def{#1}{#2}}{\@namedef{KV@#1@#2}####1}}3P\KV@defIMakeUUthede nitionsofthecommand,andthedefaultvqalue.I41S\def\KV@def#1#2[#3]{%I42]\@namedef{KV@#1@#2@default\expandafter}\expandafterI43f{\csnameKV@#1@#2\endcsname{#3}}%I44]\@namedef{KV@#1@#2}##1}I45Sh5" cmmi9=pack9age#g i4$D;%ow cmss9$Nff cmbx12"