IEEEtran.cls 275 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348
  1. %%
  2. %% IEEEtran.cls 2015/08/26 version V1.8b
  3. %%
  4. %% This is the IEEEtran LaTeX class for authors of the Institute of
  5. %% Electrical and Electronics Engineers (IEEE) Transactions journals and
  6. %% conferences.
  7. %%
  8. %% Support sites:
  9. %% http://www.michaelshell.org/tex/ieeetran/
  10. %% http://www.ctan.org/pkg/ieeetran
  11. %% and
  12. %% http://www.ieee.org/
  13. %%
  14. %% Based on the original 1993 IEEEtran.cls, but with many bug fixes
  15. %% and enhancements (from both JVH and MDS) over the 1996/7 version.
  16. %%
  17. %%
  18. %% Contributors:
  19. %% Gerry Murray (1993), Silvano Balemi (1993),
  20. %% Jon Dixon (1996), Peter N"uchter (1996),
  21. %% Juergen von Hagen (2000), and Michael Shell (2001-2014)
  22. %%
  23. %%
  24. %% Copyright (c) 1993-2000 by Gerry Murray, Silvano Balemi,
  25. %% Jon Dixon, Peter N"uchter,
  26. %% Juergen von Hagen
  27. %% and
  28. %% Copyright (c) 2001-2015 by Michael Shell
  29. %%
  30. %% Current maintainer (V1.3 to V1.8b): Michael Shell
  31. %% See:
  32. %% http://www.michaelshell.org/
  33. %% for current contact information.
  34. %%
  35. %% Special thanks to Peter Wilson (CUA) and Donald Arseneau
  36. %% for allowing the inclusion of the \@ifmtarg command
  37. %% from their ifmtarg LaTeX package.
  38. %%
  39. %%*************************************************************************
  40. %% Legal Notice:
  41. %% This code is offered as-is without any warranty either expressed or
  42. %% implied; without even the implied warranty of MERCHANTABILITY or
  43. %% FITNESS FOR A PARTICULAR PURPOSE!
  44. %% User assumes all risk.
  45. %% In no event shall the IEEE or any contributor to this code be liable for
  46. %% any damages or losses, including, but not limited to, incidental,
  47. %% consequential, or any other damages, resulting from the use or misuse
  48. %% of any information contained here.
  49. %%
  50. %% All comments are the opinions of their respective authors and are not
  51. %% necessarily endorsed by the IEEE.
  52. %%
  53. %% This work is distributed under the LaTeX Project Public License (LPPL)
  54. %% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
  55. %% distributed and modified. A copy of the LPPL, version 1.3, is included
  56. %% in the base LaTeX documentation of all distributions of LaTeX released
  57. %% 2003/12/01 or later.
  58. %% Retain all contribution notices and credits.
  59. %% ** Modified files should be clearly indicated as such, including **
  60. %% ** renaming them and changing author support contact information. **
  61. %%
  62. %% File list of work: IEEEtran.cls, IEEEtran_HOWTO.pdf, bare_adv.tex,
  63. %% bare_conf.tex, bare_jrnl.tex, bare_conf_compsoc.tex,
  64. %% bare_jrnl_compsoc.tex
  65. %%
  66. %% Major changes to the user interface should be indicated by an
  67. %% increase in the version numbers. If a version is a beta, it will
  68. %% be indicated with a BETA suffix, i.e., 1.4 BETA.
  69. %% Small changes can be indicated by appending letters to the version
  70. %% such as "IEEEtran_v14a.cls".
  71. %% In all cases, \Providesclass, any \typeout messages to the user,
  72. %% \IEEEtransversionmajor and \IEEEtransversionminor must reflect the
  73. %% correct version information.
  74. %% The changes should also be documented via source comments.
  75. %%*************************************************************************
  76. %%
  77. %
  78. % Available class options
  79. % e.g., \documentclass[10pt,conference]{IEEEtran}
  80. %
  81. % *** choose only one from each category ***
  82. %
  83. % 9pt, 10pt, 11pt, 12pt
  84. % Sets normal font size. The default is 10pt.
  85. %
  86. % conference, journal, technote, peerreview, peerreviewca
  87. % determines format mode - conference papers, journal papers,
  88. % correspondence papers (technotes), or peer review papers. The user
  89. % should also select 9pt when using technote. peerreview is like
  90. % journal mode, but provides for a single-column "cover" title page for
  91. % anonymous peer review. The paper title (without the author names) is
  92. % repeated at the top of the page after the cover page. For peer review
  93. % papers, the \IEEEpeerreviewmaketitle command must be executed (will
  94. % automatically be ignored for non-peerreview modes) at the place the
  95. % cover page is to end, usually just after the abstract (keywords are
  96. % not normally used with peer review papers). peerreviewca is like
  97. % peerreview, but allows the author names to be entered and formatted
  98. % as with conference mode so that author affiliation and contact
  99. % information can be easily seen on the cover page.
  100. % The default is journal.
  101. %
  102. % draft, draftcls, draftclsnofoot, final
  103. % determines if paper is formatted as a widely spaced draft (for
  104. % handwritten editor comments) or as a properly typeset final version.
  105. % draftcls restricts draft mode to the class file while all other LaTeX
  106. % packages (i.e., \usepackage{graphicx}) will behave as final - allows
  107. % for a draft paper with visible figures, etc. draftclsnofoot is like
  108. % draftcls, but does not display the date and the word "DRAFT" at the foot
  109. % of the pages. If using one of the draft modes, the user will probably
  110. % also want to select onecolumn.
  111. % The default is final.
  112. %
  113. % letterpaper, a4paper, cspaper
  114. % determines paper size: 8.5in X 11in, 210mm X 297mm or 7.875in X 10.75in.
  115. % Changing the paper size in the standard journal and conference modes
  116. % will not alter the typesetting of the document - only the margins will
  117. % be affected. In particular, documents using the a4paper option will
  118. % have reduced side margins (A4 is narrower than US letter) and a longer
  119. % bottom margin (A4 is longer than US letter). For both cases, the top
  120. % margins will be the same and the text will be horizontally centered.
  121. % For the compsoc conference and draft modes, it is the margins that will
  122. % remain constant, and thus the text area size will vary, with changes in
  123. % the paper size.
  124. % The cspaper option is the special ``trim'' paper size (7.875in x 10.75in)
  125. % used in the actual publication of Computer Society journals. Under
  126. % compsoc journal mode, this option does not alter the typesetting of the
  127. % document. Authors should invoke the cspaper option only if requested to
  128. % do so by the editors of the specific journal they are submitting to.
  129. % For final submission to the IEEE, authors should generally use US letter
  130. % (8.5 X 11in) paper unless otherwise instructed. Note that authors should
  131. % ensure that all post-processing (ps, pdf, etc.) uses the same paper
  132. % specificiation as the .tex document. Problems here are by far the number
  133. % one reason for incorrect margins. IEEEtran will automatically set the
  134. % default paper size under pdflatex (without requiring any change to
  135. % pdftex.cfg), so this issue is more important to dvips users. Fix
  136. % config.ps, config.pdf, or ~/.dvipsrc for dvips, or use the
  137. % dvips -t papersize option instead as needed. For the cspaper option,
  138. % the corresponding dvips paper name is "ieeecs".
  139. % See the testflow documentation
  140. % http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/testflow
  141. % for more details on dvips paper size configuration.
  142. % The default is letterpaper.
  143. %
  144. % oneside, twoside
  145. % determines if layout follows single sided or two sided (duplex)
  146. % printing. The only notable change is with the headings at the top of
  147. % the pages.
  148. % The default is oneside.
  149. %
  150. % onecolumn, twocolumn
  151. % determines if text is organized into one or two columns per page. One
  152. % column mode is usually used only with draft papers.
  153. % The default is twocolumn.
  154. %
  155. % comsoc, compsoc, transmag
  156. % Use the format of the IEEE Communications Society, IEEE Computer Society
  157. % or IEEE Transactions on Magnetics, respectively.
  158. %
  159. % romanappendices
  160. % Use the "Appendix I" convention when numbering appendices. IEEEtran.cls
  161. % now defaults to Alpha "Appendix A" convention - the opposite of what
  162. % v1.6b and earlier did.
  163. %
  164. % captionsoff
  165. % disables the display of the figure/table captions. Some IEEE journals
  166. % request that captions be removed and figures/tables be put on pages
  167. % of their own at the end of an initial paper submission. The endfloat
  168. % package can be used with this class option to achieve this format.
  169. %
  170. % nofonttune
  171. % turns off tuning of the font interword spacing. Maybe useful to those
  172. % not using the standard Times fonts or for those who have already "tuned"
  173. % their fonts.
  174. % The default is to enable IEEEtran to tune font parameters.
  175. %
  176. %
  177. %----------
  178. % Available CLASSINPUTs provided (all are macros unless otherwise noted):
  179. % \CLASSINPUTbaselinestretch
  180. % \CLASSINPUTinnersidemargin
  181. % \CLASSINPUToutersidemargin
  182. % \CLASSINPUTtoptextmargin
  183. % \CLASSINPUTbottomtextmargin
  184. %
  185. % Available CLASSINFOs provided:
  186. % \ifCLASSINFOpdf (TeX if conditional)
  187. % \CLASSINFOpaperwidth (macro)
  188. % \CLASSINFOpaperheight (macro)
  189. % \CLASSINFOnormalsizebaselineskip (length)
  190. % \CLASSINFOnormalsizeunitybaselineskip (length)
  191. %
  192. % Available CLASSOPTIONs provided:
  193. % all class option flags (TeX if conditionals) unless otherwise noted,
  194. % e.g., \ifCLASSOPTIONcaptionsoff
  195. % point size options provided as a single macro:
  196. % \CLASSOPTIONpt
  197. % which will be defined as 9, 10, 11, or 12 depending on the document's
  198. % normalsize point size.
  199. % also, class option peerreviewca implies the use of class option peerreview
  200. % and classoption draft implies the use of class option draftcls
  201. \ProvidesClass{IEEEtran}[2015/08/26 V1.8b by Michael Shell]
  202. \typeout{-- See the "IEEEtran_HOWTO" manual for usage information.}
  203. \typeout{-- http://www.michaelshell.org/tex/ieeetran/}
  204. \NeedsTeXFormat{LaTeX2e}
  205. % IEEEtran.cls version numbers, provided as of V1.3
  206. % These values serve as a way a .tex file can
  207. % determine if the new features are provided.
  208. % The version number of this IEEEtrans.cls can be obtained from
  209. % these values. i.e., V1.4
  210. % KEEP THESE AS INTEGERS! i.e., NO {4a} or anything like that-
  211. % (no need to enumerate "a" minor changes here)
  212. \def\IEEEtransversionmajor{1}
  213. \def\IEEEtransversionminor{8}
  214. % hook to allow easy changeover to IEEEtran.cls/tools.sty error reporting
  215. \def\@IEEEclspkgerror{\ClassError{IEEEtran}}
  216. % These do nothing, but provide them like in article.cls
  217. \newif\if@restonecol
  218. \newif\if@titlepage
  219. % class option conditionals
  220. \newif\ifCLASSOPTIONonecolumn \CLASSOPTIONonecolumnfalse
  221. \newif\ifCLASSOPTIONtwocolumn \CLASSOPTIONtwocolumntrue
  222. \newif\ifCLASSOPTIONoneside \CLASSOPTIONonesidetrue
  223. \newif\ifCLASSOPTIONtwoside \CLASSOPTIONtwosidefalse
  224. \newif\ifCLASSOPTIONfinal \CLASSOPTIONfinaltrue
  225. \newif\ifCLASSOPTIONdraft \CLASSOPTIONdraftfalse
  226. \newif\ifCLASSOPTIONdraftcls \CLASSOPTIONdraftclsfalse
  227. \newif\ifCLASSOPTIONdraftclsnofoot \CLASSOPTIONdraftclsnofootfalse
  228. \newif\ifCLASSOPTIONpeerreview \CLASSOPTIONpeerreviewfalse
  229. \newif\ifCLASSOPTIONpeerreviewca \CLASSOPTIONpeerreviewcafalse
  230. \newif\ifCLASSOPTIONjournal \CLASSOPTIONjournaltrue
  231. \newif\ifCLASSOPTIONconference \CLASSOPTIONconferencefalse
  232. \newif\ifCLASSOPTIONtechnote \CLASSOPTIONtechnotefalse
  233. \newif\ifCLASSOPTIONnofonttune \CLASSOPTIONnofonttunefalse
  234. \newif\ifCLASSOPTIONcaptionsoff \CLASSOPTIONcaptionsofffalse
  235. \newif\ifCLASSOPTIONcomsoc \CLASSOPTIONcomsocfalse
  236. \newif\ifCLASSOPTIONcompsoc \CLASSOPTIONcompsocfalse
  237. \newif\ifCLASSOPTIONtransmag \CLASSOPTIONtransmagfalse
  238. \newif\ifCLASSOPTIONromanappendices \CLASSOPTIONromanappendicesfalse
  239. % class info conditionals
  240. % indicates if pdf (via pdflatex) output
  241. \newif\ifCLASSINFOpdf \CLASSINFOpdffalse
  242. % V1.6b internal flag to show if using a4paper
  243. \newif\if@IEEEusingAfourpaper \@IEEEusingAfourpaperfalse
  244. % V1.6b internal flag to show if using cspaper
  245. \newif\if@IEEEusingcspaper \@IEEEusingcspaperfalse
  246. % IEEEtran class scratch pad registers
  247. % dimen
  248. \newdimen\@IEEEtrantmpdimenA
  249. \newdimen\@IEEEtrantmpdimenB
  250. \newdimen\@IEEEtrantmpdimenC
  251. % count
  252. \newcount\@IEEEtrantmpcountA
  253. \newcount\@IEEEtrantmpcountB
  254. \newcount\@IEEEtrantmpcountC
  255. % token list
  256. \newtoks\@IEEEtrantmptoksA
  257. % we use \CLASSOPTIONpt so that we can ID the point size (even for 9pt docs)
  258. % as well as LaTeX's \@ptsize to retain some compatability with some
  259. % external packages
  260. \def\@ptsize{0}
  261. % LaTeX does not support 9pt, so we set \@ptsize to 0 - same as that of 10pt
  262. \DeclareOption{9pt}{\def\CLASSOPTIONpt{9}\def\@ptsize{0}}
  263. \DeclareOption{10pt}{\def\CLASSOPTIONpt{10}\def\@ptsize{0}}
  264. \DeclareOption{11pt}{\def\CLASSOPTIONpt{11}\def\@ptsize{1}}
  265. \DeclareOption{12pt}{\def\CLASSOPTIONpt{12}\def\@ptsize{2}}
  266. \DeclareOption{letterpaper}{\setlength{\paperwidth}{8.5in}%
  267. \setlength{\paperheight}{11in}%
  268. \@IEEEusingAfourpaperfalse
  269. \@IEEEusingcspaperfalse
  270. \def\CLASSOPTIONpaper{letter}%
  271. \def\CLASSINFOpaperwidth{8.5in}%
  272. \def\CLASSINFOpaperheight{11in}}
  273. \DeclareOption{a4paper}{\setlength{\paperwidth}{210mm}%
  274. \setlength{\paperheight}{297mm}%
  275. \@IEEEusingAfourpapertrue
  276. \@IEEEusingcspaperfalse
  277. \def\CLASSOPTIONpaper{a4}%
  278. \def\CLASSINFOpaperwidth{210mm}%
  279. \def\CLASSINFOpaperheight{297mm}}
  280. % special paper option for compsoc journals
  281. \DeclareOption{cspaper}{\setlength{\paperwidth}{7.875in}%
  282. \setlength{\paperheight}{10.75in}%
  283. \@IEEEusingcspapertrue
  284. \@IEEEusingAfourpaperfalse
  285. \def\CLASSOPTIONpaper{ieeecs}%
  286. \def\CLASSINFOpaperwidth{7.875in}%
  287. \def\CLASSINFOpaperheight{10.75in}}
  288. \DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse
  289. \CLASSOPTIONonesidetrue\CLASSOPTIONtwosidefalse}
  290. \DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue
  291. \CLASSOPTIONtwosidetrue\CLASSOPTIONonesidefalse}
  292. \DeclareOption{onecolumn}{\CLASSOPTIONonecolumntrue\CLASSOPTIONtwocolumnfalse}
  293. \DeclareOption{twocolumn}{\CLASSOPTIONtwocolumntrue\CLASSOPTIONonecolumnfalse}
  294. % If the user selects draft, then this class AND any packages
  295. % will go into draft mode.
  296. \DeclareOption{draft}{\CLASSOPTIONdrafttrue\CLASSOPTIONdraftclstrue
  297. \CLASSOPTIONdraftclsnofootfalse}
  298. % draftcls is for a draft mode which will not affect any packages
  299. % used by the document.
  300. \DeclareOption{draftcls}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclstrue
  301. \CLASSOPTIONdraftclsnofootfalse}
  302. % draftclsnofoot is like draftcls, but without the footer.
  303. \DeclareOption{draftclsnofoot}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclstrue
  304. \CLASSOPTIONdraftclsnofoottrue}
  305. \DeclareOption{final}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclsfalse
  306. \CLASSOPTIONdraftclsnofootfalse}
  307. \DeclareOption{journal}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse
  308. \CLASSOPTIONjournaltrue\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse}
  309. \DeclareOption{conference}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse
  310. \CLASSOPTIONjournalfalse\CLASSOPTIONconferencetrue\CLASSOPTIONtechnotefalse}
  311. \DeclareOption{technote}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse
  312. \CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotetrue}
  313. \DeclareOption{peerreview}{\CLASSOPTIONpeerreviewtrue\CLASSOPTIONpeerreviewcafalse
  314. \CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse}
  315. \DeclareOption{peerreviewca}{\CLASSOPTIONpeerreviewtrue\CLASSOPTIONpeerreviewcatrue
  316. \CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse}
  317. \DeclareOption{nofonttune}{\CLASSOPTIONnofonttunetrue}
  318. \DeclareOption{captionsoff}{\CLASSOPTIONcaptionsofftrue}
  319. \DeclareOption{comsoc}{\CLASSOPTIONcomsoctrue\CLASSOPTIONcompsocfalse\CLASSOPTIONtransmagfalse}
  320. \DeclareOption{compsoc}{\CLASSOPTIONcomsocfalse\CLASSOPTIONcompsoctrue\CLASSOPTIONtransmagfalse}
  321. \DeclareOption{transmag}{\CLASSOPTIONtransmagtrue\CLASSOPTIONcomsocfalse\CLASSOPTIONcompsocfalse}
  322. \DeclareOption{romanappendices}{\CLASSOPTIONromanappendicestrue}
  323. % default to US letter paper, 10pt, twocolumn, one sided, final, journal
  324. \ExecuteOptions{letterpaper,10pt,twocolumn,oneside,final,journal}
  325. % overrride these defaults per user requests
  326. \ProcessOptions
  327. %% -- Command Argument Scanning Support Functions --
  328. % Sets the category codes for punctuation to their normal values.
  329. % For local use with argument scanning.
  330. \def\IEEEnormalcatcodespunct{\catcode`\!=12 \catcode`\,=12 \catcode`\:=12
  331. \catcode`\;=12 \catcode`\`=12 \catcode`\'=12 \catcode`\"=12 \catcode`\.=12
  332. \catcode`\/=12 \catcode`\?=12 \catcode`\*=12 \catcode`\+=12 \catcode`\-=12
  333. \catcode`\<=12 \catcode`\>=12 \catcode`\(=12 \catcode`\)=12 \catcode`\[=12
  334. \catcode`\]=12 \catcode`\==12 \catcode`\|=12}
  335. % Sets the category codes for numbers to their normal values.
  336. % For local use with argument scanning.
  337. \def\IEEEnormalcatcodesnum{\catcode`\0=12 \catcode`\1=12 \catcode`\2=12
  338. \catcode`\3=12 \catcode`\4=12 \catcode`\5=12 \catcode`\6=12 \catcode`\7=12
  339. \catcode`\8=12 \catcode`\9=12}
  340. % combined action of \IEEEnormalcatcodespunct and \IEEEnormalcatcodesnum
  341. \def\IEEEnormalcatcodes{\IEEEnormalcatcodespunct\IEEEnormalcatcodesnum}
  342. % usage: \@IEEEextracttoken*{}
  343. % \@IEEEextracttoken fully expands its argument (which it then stores in
  344. % \@IEEEextracttokenarg) via \edef and then the meaning of the first
  345. % nonbrace (but including the empty group) token found is assigned via \let
  346. % to \@IEEEextractedtoken as well as stored in the macro
  347. % \@IEEEextractedtokenmacro. Tokens that would otherwise be discarded during
  348. % the acquisition of the first are stored in \@IEEEextractedtokensdiscarded,
  349. % however their original relative brace nesting depths are not guaranteed to
  350. % be preserved.
  351. % If the argument is empty, or if a first nonbrace token does not exist (or
  352. % is an empty group), \@IEEEextractedtoken will be \relax and
  353. % \@IEEEextractedtokenmacro and \@IEEEextractedtokensdiscarded will be empty.
  354. %
  355. % For example:
  356. % \@IEEEextracttoken{{{ab}{cd}}{{ef}g}}
  357. % results in:
  358. %
  359. % \@IEEEextracttokenarg ==> a macro containing {{ab}{cd}}{{ef}g}
  360. % \@IEEEextractedtoken ==> the letter a
  361. % \@IEEEextractedtokenmacro ==> a macro containing a
  362. % \@IEEEextractedtokensdiscarded ==> a macro containing bcd{ef}g
  363. %
  364. % the *-star form, \@IEEEextracttoken*, does not expand its argument
  365. % contents during processing.
  366. \def\@IEEEextracttoken{\@ifstar{\let\@IEEEextracttokendef=\def\@@IEEEextracttoken}{\let\@IEEEextracttokendef=\edef\@@IEEEextracttoken}}
  367. \def\@@IEEEextracttoken#1{\@IEEEextracttokendef\@IEEEextracttokenarg{#1}\relax
  368. \def\@IEEEextractedtokensdiscarded{}\relax % initialize to empty
  369. % if the macro is unchanged after being acquired as a single undelimited argument
  370. % with anything after it being stripped off as a delimited argument
  371. % we know we have one token without any enclosing braces. loop until this is true.
  372. \let\@IEEEextracttokencurgroup\@IEEEextracttokenarg
  373. \loop
  374. % trap case of an empty argument as this would cause a problem with
  375. % \@@@IEEEextracttoken's first (nondelimited) argument acquisition
  376. \ifx\@IEEEextracttokencurgroup\@empty
  377. \def\@IEEEextractedtokenmacro{}\relax
  378. \else
  379. \expandafter\@@@IEEEextracttoken\@IEEEextracttokencurgroup\@IEEEgeneralsequenceDELIMITER\relax
  380. \fi
  381. \ifx\@IEEEextractedtokenmacro\@IEEEextracttokencurgroup
  382. \else
  383. \let\@IEEEextracttokencurgroup=\@IEEEextractedtokenmacro
  384. \repeat
  385. % we can safely do a \let= here because there should be at most one token
  386. % the relax is needed to handle the case of no token found
  387. \expandafter\let\expandafter\@IEEEextractedtoken\@IEEEextractedtokenmacro\relax}
  388. \def\@@@IEEEextracttoken#1#2\@IEEEgeneralsequenceDELIMITER{\def\@IEEEextractedtokenmacro{#1}\relax
  389. \def\@@IEEEextractedtokensdiscarded{#2}\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter
  390. \@IEEEextractedtokensdiscarded\expandafter\expandafter\expandafter
  391. {\expandafter\@@IEEEextractedtokensdiscarded\@IEEEextractedtokensdiscarded}}
  392. %%
  393. %% -- End of Command Argument Scanning Support Functions --
  394. % Computer Society conditional execution command
  395. \long\def\@IEEEcompsoconly#1{\relax\ifCLASSOPTIONcompsoc\relax#1\relax\fi\relax}
  396. % inverse
  397. \long\def\@IEEEnotcompsoconly#1{\relax\ifCLASSOPTIONcompsoc\else\relax#1\relax\fi\relax}
  398. % compsoc conference
  399. \long\def\@IEEEcompsocconfonly#1{\relax\ifCLASSOPTIONcompsoc\ifCLASSOPTIONconference\relax#1\relax\fi\fi\relax}
  400. % compsoc not conference
  401. \long\def\@IEEEcompsocnotconfonly#1{\relax\ifCLASSOPTIONcompsoc\ifCLASSOPTIONconference\else\relax#1\relax\fi\fi\relax}
  402. % comsoc verify that newtxmath, mtpro2, mt11p or mathtime has been loaded
  403. \def\@IEEEcomsocverifymathfont{\typeout{-- Verifying Times compatible math font.}\relax
  404. \@ifpackageloaded{newtxmath}{\typeout{-- newtxmath loaded, OK.}}{\@@IEEEcomsocverifymathfont}}
  405. \def\@@IEEEcomsocverifymathfont{\@ifpackageloaded{mtpro2}{\typeout{-- mtpro2 loaded, OK.}}{\@@@IEEEcomsocverifymathfont}}
  406. \def\@@@IEEEcomsocverifymathfont{\@ifpackageloaded{mt11p}{\typeout{-- mt11p2 loaded, OK.}}{\@@@@IEEEcomsocverifymathfont}}
  407. \def\@@@@IEEEcomsocverifymathfont{\@ifpackageloaded{mathtime}{\typeout{-- mathtime loaded, OK.}}{\@IEEEcomsocenforcemathfont}}
  408. % comsoc, if a Times math font was not loaded by user, enforce it
  409. \def\@IEEEcomsocenforcemathfont{\typeout{** Times compatible math font not found, forcing.}\relax
  410. \IfFileExists{newtxmath.sty}{\typeout{-- Found newtxmath, loading.}\RequirePackage{newtxmath}}{\@@IEEEcomsocenforcemathfont}}
  411. \def\@@IEEEcomsocenforcemathfont{\IfFileExists{mtpro2.sty}{\typeout{-- Found mtpro2, loading.}\RequirePackage{mtpro2}}{\@@@IEEEcomsocenforcemathfont}}
  412. \def\@@@IEEEcomsocenforcemathfont{\IfFileExists{mt11p.sty}{\typeout{-- Found mt11p, loading.}\RequirePackage{mt11p}}{\@@@@IEEEcomsocenforcemathfont}}
  413. \def\@@@@IEEEcomsocenforcemathfont{\IfFileExists{mathtime.sty}{\typeout{-- Found mathtime, loading.}\RequirePackage{mathtime}}{\@@@@@IEEEcomsocenforcemathfont}}
  414. % if no acceptable Times math font package found, error with newtxmath requirement
  415. \def\@@@@@IEEEcomsocenforcemathfont{\typeout{** No Times compatible math font package found. newtxmath is required.}\RequirePackage{newtxmath}}
  416. \ifCLASSOPTIONcomsoc
  417. % ensure that if newtxmath is used, the cmintegrals option is also invoked
  418. \PassOptionsToPackage{cmintegrals}{newtxmath}
  419. % comsoc requires a Times like math font
  420. % ensure this requirement is satisfied at document start
  421. \AtBeginDocument{\@IEEEcomsocverifymathfont}
  422. \fi
  423. % The IEEE uses Times Roman font, so we'll default to Times.
  424. % These three commands make up the entire times.sty package.
  425. \renewcommand{\sfdefault}{phv}
  426. \renewcommand{\rmdefault}{ptm}
  427. \renewcommand{\ttdefault}{pcr}
  428. % V1.7 compsoc nonconference papers, use Palatino/Palladio as the main text font,
  429. % not Times Roman.
  430. \@IEEEcompsocnotconfonly{\renewcommand{\rmdefault}{ppl}}
  431. % enable the selected main text font
  432. \normalfont\selectfont
  433. \ifCLASSOPTIONcomsoc
  434. \typeout{-- Using IEEE Communications Society mode.}
  435. \fi
  436. \ifCLASSOPTIONcompsoc
  437. \typeout{-- Using IEEE Computer Society mode.}
  438. \fi
  439. % V1.7 conference notice message hook
  440. \def\@IEEEconsolenoticeconference{\typeout{}%
  441. \typeout{** Conference Paper **}%
  442. \typeout{Before submitting the final camera ready copy, remember to:}%
  443. \typeout{}%
  444. \typeout{ 1. Manually equalize the lengths of two columns on the last page}%
  445. \typeout{ of your paper;}%
  446. \typeout{}%
  447. \typeout{ 2. Ensure that any PostScript and/or PDF output post-processing}%
  448. \typeout{ uses only Type 1 fonts and that every step in the generation}%
  449. \typeout{ process uses the appropriate paper size.}%
  450. \typeout{}}
  451. % we can send console reminder messages to the user here
  452. \AtEndDocument{\ifCLASSOPTIONconference\@IEEEconsolenoticeconference\fi}
  453. % warn about the use of single column other than for draft mode
  454. \ifCLASSOPTIONtwocolumn\else%
  455. \ifCLASSOPTIONdraftcls\else%
  456. \typeout{** ATTENTION: Single column mode is not typically used with IEEE publications.}%
  457. \fi%
  458. \fi
  459. % V1.7 improved paper size setting code.
  460. % Set pdfpage and dvips paper sizes. Conditional tests are similar to that
  461. % of ifpdf.sty. Retain within {} to ensure tested macros are never altered,
  462. % even if only effect is to set them to \relax.
  463. % if \pdfoutput is undefined or equal to relax, output a dvips special
  464. {\@ifundefined{pdfoutput}{\AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}}{%
  465. % pdfoutput is defined and not equal to \relax
  466. % check for pdfpageheight existence just in case someone sets pdfoutput
  467. % under non-pdflatex. If exists, set them regardless of value of \pdfoutput.
  468. \@ifundefined{pdfpageheight}{\relax}{\global\pdfpagewidth\paperwidth
  469. \global\pdfpageheight\paperheight}%
  470. % if using \pdfoutput=0 under pdflatex, send dvips papersize special
  471. \ifcase\pdfoutput
  472. \AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}%
  473. \else
  474. % we are using pdf output, set CLASSINFOpdf flag
  475. \global\CLASSINFOpdftrue
  476. \fi}}
  477. % let the user know the selected papersize
  478. \typeout{-- Using \CLASSINFOpaperwidth\space x \CLASSINFOpaperheight\space
  479. (\CLASSOPTIONpaper)\space paper.}
  480. \ifCLASSINFOpdf
  481. \typeout{-- Using PDF output.}
  482. \else
  483. \typeout{-- Using DVI output.}
  484. \fi
  485. % The idea hinted here is for LaTeX to generate markleft{} and markright{}
  486. % automatically for you after you enter \author{}, \journal{},
  487. % \journaldate{}, journalvol{}, \journalnum{}, etc.
  488. % However, there may be some backward compatibility issues here as
  489. % well as some special applications for IEEEtran.cls and special issues
  490. % that may require the flexible \markleft{}, \markright{} and/or \markboth{}.
  491. % We'll leave this as an open future suggestion.
  492. %\newcommand{\journal}[1]{\def\@journal{#1}}
  493. %\def\@journal{}
  494. % pointsize values
  495. % used with ifx to determine the document's normal size
  496. \def\@IEEEptsizenine{9}
  497. \def\@IEEEptsizeten{10}
  498. \def\@IEEEptsizeeleven{11}
  499. \def\@IEEEptsizetwelve{12}
  500. % FONT DEFINITIONS (No sizexx.clo file needed)
  501. % V1.6 revised font sizes, displayskip values and
  502. % revised normalsize baselineskip to reduce underfull vbox problems
  503. % on the 58pc = 696pt = 9.5in text height we want
  504. % normalsize #lines/column baselineskip (aka leading)
  505. % 9pt 63 11.0476pt (truncated down)
  506. % 10pt 58 12pt (exact)
  507. % 11pt 52 13.3846pt (truncated down)
  508. % 12pt 50 13.92pt (exact)
  509. %
  510. % we need to store the nominal baselineskip for the given font size
  511. % in case baselinestretch ever changes.
  512. % this is a dimen, so it will not hold stretch or shrink
  513. \newdimen\@IEEEnormalsizeunitybaselineskip
  514. \@IEEEnormalsizeunitybaselineskip\baselineskip
  515. %% ******* WARNING! *******
  516. %%
  517. %% Authors should not alter font sizes, baselineskip ("leading"),
  518. %% margins or other spacing values in an attempt to squeeze more
  519. %% material on each page.
  520. %%
  521. %% The IEEE's own typesetting software will restore the correct
  522. %% values when re-typesetting/proofing the submitted document,
  523. %% possibly resulting in unexpected article over length charges.
  524. %%
  525. %% ******* WARNING! *******
  526. % 9pt option defaults
  527. \ifx\CLASSOPTIONpt\@IEEEptsizenine
  528. \typeout{-- This is a 9 point document.}
  529. \def\normalsize{\@setfontsize{\normalsize}{9}{11.0476pt}}
  530. \setlength{\@IEEEnormalsizeunitybaselineskip}{11.0476pt}
  531. \normalsize
  532. \abovedisplayskip 1.5ex plus 3pt minus 1pt
  533. \belowdisplayskip \abovedisplayskip
  534. \abovedisplayshortskip 0pt plus 3pt
  535. \belowdisplayshortskip 1.5ex plus 3pt minus 1pt
  536. \def\small{\@setfontsize{\small}{8.5}{10pt}}
  537. \def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
  538. \def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
  539. \def\tiny{\@setfontsize{\tiny}{5}{6pt}}
  540. % sublargesize is the same as large - 10pt
  541. \def\sublargesize{\@setfontsize{\sublargesize}{10}{12pt}}
  542. \def\large{\@setfontsize{\large}{10}{12pt}}
  543. \def\Large{\@setfontsize{\Large}{12}{14pt}}
  544. \def\LARGE{\@setfontsize{\LARGE}{14}{17pt}}
  545. \def\huge{\@setfontsize{\huge}{17}{20pt}}
  546. \def\Huge{\@setfontsize{\Huge}{20}{24pt}}
  547. \fi
  548. %
  549. % 10pt option defaults
  550. \ifx\CLASSOPTIONpt\@IEEEptsizeten
  551. \typeout{-- This is a 10 point document.}
  552. \def\normalsize{\@setfontsize{\normalsize}{10}{12.00pt}}
  553. \setlength{\@IEEEnormalsizeunitybaselineskip}{12pt}
  554. \normalsize
  555. \abovedisplayskip 1.5ex plus 4pt minus 2pt
  556. \belowdisplayskip \abovedisplayskip
  557. \abovedisplayshortskip 0pt plus 4pt
  558. \belowdisplayshortskip 1.5ex plus 4pt minus 2pt
  559. \def\small{\@setfontsize{\small}{9}{10pt}}
  560. \def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
  561. \def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
  562. \def\tiny{\@setfontsize{\tiny}{5}{6pt}}
  563. % sublargesize is a tad smaller than large - 11pt
  564. \def\sublargesize{\@setfontsize{\sublargesize}{11}{13.4pt}}
  565. \def\large{\@setfontsize{\large}{12}{14pt}}
  566. \def\Large{\@setfontsize{\Large}{14}{17pt}}
  567. \def\LARGE{\@setfontsize{\LARGE}{17}{20pt}}
  568. \def\huge{\@setfontsize{\huge}{20}{24pt}}
  569. \def\Huge{\@setfontsize{\Huge}{24}{28pt}}
  570. \fi
  571. %
  572. % 11pt option defaults
  573. \ifx\CLASSOPTIONpt\@IEEEptsizeeleven
  574. \typeout{-- This is an 11 point document.}
  575. \def\normalsize{\@setfontsize{\normalsize}{11}{13.3846pt}}
  576. \setlength{\@IEEEnormalsizeunitybaselineskip}{13.3846pt}
  577. \normalsize
  578. \abovedisplayskip 1.5ex plus 5pt minus 3pt
  579. \belowdisplayskip \abovedisplayskip
  580. \abovedisplayshortskip 0pt plus 5pt
  581. \belowdisplayshortskip 1.5ex plus 5pt minus 3pt
  582. \def\small{\@setfontsize{\small}{10}{12pt}}
  583. \def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}}
  584. \def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}}
  585. \def\tiny{\@setfontsize{\tiny}{6}{7pt}}
  586. % sublargesize is the same as large - 12pt
  587. \def\sublargesize{\@setfontsize{\sublargesize}{12}{14pt}}
  588. \def\large{\@setfontsize{\large}{12}{14pt}}
  589. \def\Large{\@setfontsize{\Large}{14}{17pt}}
  590. \def\LARGE{\@setfontsize{\LARGE}{17}{20pt}}
  591. \def\huge{\@setfontsize{\huge}{20}{24pt}}
  592. \def\Huge{\@setfontsize{\Huge}{24}{28pt}}
  593. \fi
  594. %
  595. % 12pt option defaults
  596. \ifx\CLASSOPTIONpt\@IEEEptsizetwelve
  597. \typeout{-- This is a 12 point document.}
  598. \def\normalsize{\@setfontsize{\normalsize}{12}{13.92pt}}
  599. \setlength{\@IEEEnormalsizeunitybaselineskip}{13.92pt}
  600. \normalsize
  601. \abovedisplayskip 1.5ex plus 6pt minus 4pt
  602. \belowdisplayskip \abovedisplayskip
  603. \abovedisplayshortskip 0pt plus 6pt
  604. \belowdisplayshortskip 1.5ex plus 6pt minus 4pt
  605. \def\small{\@setfontsize{\small}{10}{12pt}}
  606. \def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}}
  607. \def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}}
  608. \def\tiny{\@setfontsize{\tiny}{6}{7pt}}
  609. % sublargesize is the same as large - 14pt
  610. \def\sublargesize{\@setfontsize{\sublargesize}{14}{17pt}}
  611. \def\large{\@setfontsize{\large}{14}{17pt}}
  612. \def\Large{\@setfontsize{\Large}{17}{20pt}}
  613. \def\LARGE{\@setfontsize{\LARGE}{20}{24pt}}
  614. \def\huge{\@setfontsize{\huge}{22}{26pt}}
  615. \def\Huge{\@setfontsize{\Huge}{24}{28pt}}
  616. \fi
  617. % V1.8a compsoc font sizes
  618. % compsoc font sizes use bp "Postscript" point units (1/72in)
  619. % rather than the traditional pt (1/72.27)
  620. \ifCLASSOPTIONcompsoc
  621. % -- compsoc defaults --
  622. % ** will override some of these values later **
  623. % 9pt
  624. \ifx\CLASSOPTIONpt\@IEEEptsizenine
  625. \def\normalsize{\@setfontsize{\normalsize}{9bp}{11bp}}
  626. \setlength{\@IEEEnormalsizeunitybaselineskip}{11bp}
  627. \normalsize
  628. \abovedisplayskip 1.5ex plus 3bp minus 1bp
  629. \belowdisplayskip \abovedisplayskip
  630. \abovedisplayshortskip 0bp plus 3bp
  631. \belowdisplayshortskip 1.5ex plus 3bp minus 1bp
  632. \def\small{\@setfontsize{\small}{8.5bp}{10bp}}
  633. \def\footnotesize{\@setfontsize{\footnotesize}{8bp}{9bp}}
  634. \def\scriptsize{\@setfontsize{\scriptsize}{7bp}{8bp}}
  635. \def\tiny{\@setfontsize{\tiny}{5bp}{6bp}}
  636. % sublargesize is the same as large - 10bp
  637. \def\sublargesize{\@setfontsize{\sublargesize}{10bp}{12bp}}
  638. \def\large{\@setfontsize{\large}{10bp}{12bp}}
  639. \def\Large{\@setfontsize{\Large}{12bp}{14bp}}
  640. \def\LARGE{\@setfontsize{\LARGE}{14bp}{17bp}}
  641. \def\huge{\@setfontsize{\huge}{17bp}{20bp}}
  642. \def\Huge{\@setfontsize{\Huge}{20bp}{24bp}}
  643. \fi
  644. %
  645. % 10pt
  646. \ifx\CLASSOPTIONpt\@IEEEptsizeten
  647. \def\normalsize{\@setfontsize{\normalsize}{10bp}{12bp}}
  648. \setlength{\@IEEEnormalsizeunitybaselineskip}{12bp}
  649. \normalsize
  650. \abovedisplayskip 1.5ex plus 4bp minus 2bp
  651. \belowdisplayskip \abovedisplayskip
  652. \abovedisplayshortskip 0pt plus 4bp
  653. \belowdisplayshortskip 1.5ex plus 4bp minus 2bp
  654. \def\small{\@setfontsize{\small}{9bp}{10bp}}
  655. \def\footnotesize{\@setfontsize{\footnotesize}{8bp}{9bp}}
  656. \def\scriptsize{\@setfontsize{\scriptsize}{7bp}{8bp}}
  657. \def\tiny{\@setfontsize{\tiny}{5bp}{6bp}}
  658. % sublargesize is a tad smaller than large - 11bp
  659. \def\sublargesize{\@setfontsize{\sublargesize}{11bp}{13.5bp}}
  660. \def\large{\@setfontsize{\large}{12bp}{14bp}}
  661. \def\Large{\@setfontsize{\Large}{14bp}{17bp}}
  662. \def\LARGE{\@setfontsize{\LARGE}{17bp}{20bp}}
  663. \def\huge{\@setfontsize{\huge}{20bp}{24bp}}
  664. \def\Huge{\@setfontsize{\Huge}{24bp}{28bp}}
  665. \fi
  666. %
  667. % 11pt
  668. \ifx\CLASSOPTIONpt\@IEEEptsizeeleven
  669. \def\normalsize{\@setfontsize{\normalsize}{11bp}{13.5bp}}
  670. \setlength{\@IEEEnormalsizeunitybaselineskip}{13.5bp}
  671. \normalsize
  672. \abovedisplayskip 1.5ex plus 5bp minus 3bp
  673. \belowdisplayskip \abovedisplayskip
  674. \abovedisplayshortskip 0pt plus 5bp
  675. \belowdisplayshortskip 1.5ex plus 5bp minus 3bp
  676. \def\small{\@setfontsize{\small}{10bp}{12bp}}
  677. \def\footnotesize{\@setfontsize{\footnotesize}{9bp}{10.5bp}}
  678. \def\scriptsize{\@setfontsize{\scriptsize}{8bp}{9bp}}
  679. \def\tiny{\@setfontsize{\tiny}{6bp}{7bp}}
  680. % sublargesize is the same as large - 12bp
  681. \def\sublargesize{\@setfontsize{\sublargesize}{12bp}{14bp}}
  682. \def\large{\@setfontsize{\large}{12bp}{14bp}}
  683. \def\Large{\@setfontsize{\Large}{14bp}{17bp}}
  684. \def\LARGE{\@setfontsize{\LARGE}{17bp}{20bp}}
  685. \def\huge{\@setfontsize{\huge}{20bp}{24bp}}
  686. \def\Huge{\@setfontsize{\Huge}{24bp}{28bp}}
  687. \fi
  688. %
  689. % 12pt
  690. \ifx\CLASSOPTIONpt\@IEEEptsizetwelve
  691. \def\normalsize{\@setfontsize{\normalsize}{12bp}{14bp}}%
  692. \setlength{\@IEEEnormalsizeunitybaselineskip}{14bp}%
  693. \normalsize
  694. \abovedisplayskip 1.5ex plus 6bp minus 4bp
  695. \belowdisplayskip \abovedisplayskip
  696. \abovedisplayshortskip 0pt plus 6bp
  697. \belowdisplayshortskip 1.5ex plus 6bp minus 4bp
  698. \def\small{\@setfontsize{\small}{10bp}{12bp}}
  699. \def\footnotesize{\@setfontsize{\footnotesize}{9bp}{10.5bp}}
  700. \def\scriptsize{\@setfontsize{\scriptsize}{8bp}{9bp}}
  701. \def\tiny{\@setfontsize{\tiny}{6bp}{7bp}}
  702. % sublargesize is the same as large - 14bp
  703. \def\sublargesize{\@setfontsize{\sublargesize}{14bp}{17bp}}
  704. \def\large{\@setfontsize{\large}{14bp}{17bp}}
  705. \def\Large{\@setfontsize{\Large}{17bp}{20bp}}
  706. \def\LARGE{\@setfontsize{\LARGE}{20bp}{24bp}}
  707. \def\huge{\@setfontsize{\huge}{22bp}{26bp}}
  708. \def\Huge{\@setfontsize{\Huge}{24bp}{28bp}}
  709. \fi
  710. %
  711. % -- override defaults: compsoc journals use special normalsizes --
  712. \ifCLASSOPTIONconference
  713. %
  714. % compsoc conferences
  715. % 9pt
  716. \ifx\CLASSOPTIONpt\@IEEEptsizenine
  717. \def\normalsize{\@setfontsize{\normalsize}{9bp}{10.8bp}}
  718. \setlength{\@IEEEnormalsizeunitybaselineskip}{10.8bp}
  719. \normalsize
  720. \abovedisplayskip 1.5ex plus 3bp minus 1bp
  721. \belowdisplayskip \abovedisplayskip
  722. \abovedisplayshortskip 0bp plus 3bp
  723. \belowdisplayshortskip 1.5ex plus 3bp minus 1bp
  724. \fi
  725. % 10pt
  726. \ifx\CLASSOPTIONpt\@IEEEptsizeten
  727. \def\normalsize{\@setfontsize{\normalsize}{10bp}{11.2bp}}
  728. \setlength{\@IEEEnormalsizeunitybaselineskip}{11.2bp}
  729. \normalsize
  730. \abovedisplayskip 1.5ex plus 4bp minus 2bp
  731. \belowdisplayskip \abovedisplayskip
  732. \abovedisplayshortskip 0pt plus 4bp
  733. \belowdisplayshortskip 1.5ex plus 4bp minus 2bp
  734. \fi
  735. % 11pt
  736. \ifx\CLASSOPTIONpt\@IEEEptsizeeleven
  737. \def\normalsize{\@setfontsize{\normalsize}{11bp}{13.2bp}}
  738. \setlength{\@IEEEnormalsizeunitybaselineskip}{13.2bp}
  739. \normalsize
  740. \abovedisplayskip 1.5ex plus 5bp minus 3bp
  741. \belowdisplayskip \abovedisplayskip
  742. \abovedisplayshortskip 0pt plus 5bp
  743. \belowdisplayshortskip 1.5ex plus 5bp minus 3bp
  744. \fi
  745. % 12pt
  746. \ifx\CLASSOPTIONpt\@IEEEptsizetwelve
  747. \def\normalsize{\@setfontsize{\normalsize}{12bp}{14.4bp}}
  748. \setlength{\@IEEEnormalsizeunitybaselineskip}{14.4bp}
  749. \normalsize
  750. \abovedisplayskip 1.5ex plus 6bp minus 4bp
  751. \belowdisplayskip \abovedisplayskip
  752. \abovedisplayshortskip 0pt plus 6bp
  753. \belowdisplayshortskip 1.5ex plus 6bp minus 4bp
  754. \fi
  755. %
  756. % compsoc nonconferences
  757. \else
  758. % 9pt
  759. \ifx\CLASSOPTIONpt\@IEEEptsizenine
  760. \def\normalsize{\@setfontsize{\normalsize}{9bp}{10.8bp}}
  761. \setlength{\@IEEEnormalsizeunitybaselineskip}{10.8bp}
  762. \normalsize
  763. \abovedisplayskip 1.5ex plus 3bp minus 1bp
  764. \belowdisplayskip \abovedisplayskip
  765. \abovedisplayshortskip 0bp plus 3bp
  766. \belowdisplayshortskip 1.5ex plus 3bp minus 1bp
  767. \fi
  768. % 10pt
  769. \ifx\CLASSOPTIONpt\@IEEEptsizeten
  770. % the official spec is 9.5bp with 11.4bp leading for 10pt,
  771. % but measurements of proofs suggest upto 11.723bp leading
  772. % here we'll use 11.54bp which gives 61 lines per column
  773. % with the standard compsoc margins
  774. \def\normalsize{\@setfontsize{\normalsize}{9.5bp}{11.54bp}}
  775. \setlength{\@IEEEnormalsizeunitybaselineskip}{11.54bp}
  776. \normalsize
  777. \abovedisplayskip 1.5ex plus 4bp minus 2bp
  778. \belowdisplayskip \abovedisplayskip
  779. \abovedisplayshortskip 0pt plus 4bp
  780. \belowdisplayshortskip 1.5ex plus 4bp minus 2bp
  781. \fi
  782. % 11pt
  783. \ifx\CLASSOPTIONpt\@IEEEptsizeeleven
  784. \def\normalsize{\@setfontsize{\normalsize}{11bp}{13.2bp}}
  785. \setlength{\@IEEEnormalsizeunitybaselineskip}{13.2bp}
  786. \normalsize
  787. \abovedisplayskip 1.5ex plus 5bp minus 3bp
  788. \belowdisplayskip \abovedisplayskip
  789. \abovedisplayshortskip 0pt plus 5bp
  790. \belowdisplayshortskip 1.5ex plus 5bp minus 3bp
  791. \fi
  792. % 12pt
  793. \ifx\CLASSOPTIONpt\@IEEEptsizetwelve
  794. \def\normalsize{\@setfontsize{\normalsize}{12bp}{14.4bp}}
  795. \setlength{\@IEEEnormalsizeunitybaselineskip}{14.4bp}
  796. \normalsize
  797. \abovedisplayskip 1.5ex plus 6bp minus 4bp
  798. \belowdisplayskip \abovedisplayskip
  799. \abovedisplayshortskip 0pt plus 6bp
  800. \belowdisplayshortskip 1.5ex plus 6bp minus 4bp
  801. \fi
  802. \fi\fi
  803. % V1.6 The Computer Modern Fonts will issue a substitution warning for
  804. % 24pt titles (24.88pt is used instead, but the default and correct
  805. % Times font will scale exactly as needed) increase the substitution
  806. % tolerance to turn off this warning.
  807. %
  808. % V1.8a, the compsoc bp font sizes can also cause bogus font substitution
  809. % warnings with footnote or scriptsize math and the $\bullet$ itemized
  810. % list of \IEEEcompsocitemizethanks. So, increase this to 1.5pt or more.
  811. \def\fontsubfuzz{1.7bp}
  812. % warn the user in case they forget to use the 9pt option with
  813. % technote
  814. \ifCLASSOPTIONtechnote%
  815. \ifx\CLASSOPTIONpt\@IEEEptsizenine\else%
  816. \typeout{** ATTENTION: Technotes are normally 9pt documents.}%
  817. \fi%
  818. \fi
  819. % V1.7
  820. % Improved \textunderscore to provide a much better fake _ when used with
  821. % OT1 encoding. Under OT1, detect use of pcr or cmtt \ttfamily and use
  822. % available true _ glyph for those two typewriter fonts.
  823. \def\@IEEEstringptm{ptm} % Times Roman family
  824. \def\@IEEEstringppl{ppl} % Palatino Roman family
  825. \def\@IEEEstringphv{phv} % Helvetica Sans Serif family
  826. \def\@IEEEstringpcr{pcr} % Courier typewriter family
  827. \def\@IEEEstringcmtt{cmtt} % Computer Modern typewriter family
  828. \DeclareTextCommandDefault{\textunderscore}{\leavevmode
  829. \ifx\f@family\@IEEEstringpcr\string_\else
  830. \ifx\f@family\@IEEEstringcmtt\string_\else
  831. \ifx\f@family\@IEEEstringptm\kern 0em\vbox{\hrule\@width 0.5em\@height 0.5pt\kern -0.3ex}\else
  832. \ifx\f@family\@IEEEstringppl\kern 0em\vbox{\hrule\@width 0.5em\@height 0.5pt\kern -0.3ex}\else
  833. \ifx\f@family\@IEEEstringphv\kern -0.03em\vbox{\hrule\@width 0.62em\@height 0.52pt\kern -0.33ex}\kern -0.03em\else
  834. \kern 0.09em\vbox{\hrule\@width 0.6em\@height 0.44pt\kern -0.63pt\kern -0.42ex}\kern 0.09em\fi\fi\fi\fi\fi\relax}
  835. % set the default \baselinestretch
  836. \def\baselinestretch{1}
  837. \ifCLASSOPTIONdraftcls
  838. \def\baselinestretch{1.5}% default baselinestretch for draft modes
  839. \fi
  840. % process CLASSINPUT baselinestretch
  841. \ifx\CLASSINPUTbaselinestretch\@IEEEundefined
  842. \else
  843. \edef\baselinestretch{\CLASSINPUTbaselinestretch} % user CLASSINPUT override
  844. \typeout{** ATTENTION: Overriding \string\baselinestretch\space to
  845. \baselinestretch\space via \string\CLASSINPUT.}
  846. \fi
  847. \small\normalsize % make \baselinestretch take affect
  848. % store the normalsize baselineskip
  849. \newdimen\CLASSINFOnormalsizebaselineskip
  850. \CLASSINFOnormalsizebaselineskip=\baselineskip\relax
  851. % and the normalsize unity (baselinestretch=1) baselineskip
  852. % we could save a register by giving the user access to
  853. % \@IEEEnormalsizeunitybaselineskip. However, let's protect
  854. % its read only internal status
  855. \newdimen\CLASSINFOnormalsizeunitybaselineskip
  856. \CLASSINFOnormalsizeunitybaselineskip=\@IEEEnormalsizeunitybaselineskip\relax
  857. % store the nominal value of jot
  858. \newdimen\IEEEnormaljot
  859. \IEEEnormaljot=0.25\baselineskip\relax
  860. % set \jot
  861. \jot=\IEEEnormaljot\relax
  862. % V1.6, we are now going to fine tune the interword spacing
  863. % The default interword glue for Times under TeX appears to use a
  864. % nominal interword spacing of 25% (relative to the font size, i.e., 1em)
  865. % a maximum of 40% and a minimum of 19%.
  866. % For example, 10pt text uses an interword glue of:
  867. %
  868. % 2.5pt plus 1.49998pt minus 0.59998pt
  869. %
  870. % However, the IEEE allows for a more generous range which reduces the need
  871. % for hyphenation, especially for two column text. Furthermore, the IEEE
  872. % tends to use a little bit more nominal space between the words.
  873. % The IEEE's interword spacing percentages appear to be:
  874. % 35% nominal
  875. % 23% minimum
  876. % 50% maximum
  877. % (They may even be using a tad more for the largest fonts such as 24pt.)
  878. %
  879. % for bold text, the IEEE increases the spacing a little more:
  880. % 37.5% nominal
  881. % 23% minimum
  882. % 55% maximum
  883. % here are the interword spacing ratios we'll use
  884. % for medium (normal weight)
  885. \def\@IEEEinterspaceratioM{0.35}
  886. \def\@IEEEinterspaceMINratioM{0.23}
  887. \def\@IEEEinterspaceMAXratioM{0.50}
  888. % for bold
  889. \def\@IEEEinterspaceratioB{0.375}
  890. \def\@IEEEinterspaceMINratioB{0.23}
  891. \def\@IEEEinterspaceMAXratioB{0.55}
  892. % compsoc nonconference papers use Palatino,
  893. % tweak settings to better match the proofs
  894. \ifCLASSOPTIONcompsoc
  895. \ifCLASSOPTIONconference\else
  896. % for medium (normal weight)
  897. \def\@IEEEinterspaceratioM{0.28}
  898. \def\@IEEEinterspaceMINratioM{0.21}
  899. \def\@IEEEinterspaceMAXratioM{0.47}
  900. % for bold
  901. \def\@IEEEinterspaceratioB{0.305}
  902. \def\@IEEEinterspaceMINratioB{0.21}
  903. \def\@IEEEinterspaceMAXratioB{0.52}
  904. \fi\fi
  905. % command to revise the interword spacing for the current font under TeX:
  906. % \fontdimen2 = nominal interword space
  907. % \fontdimen3 = interword stretch
  908. % \fontdimen4 = interword shrink
  909. % since all changes to the \fontdimen are global, we can enclose these commands
  910. % in braces to confine any font attribute or length changes
  911. \def\@@@IEEEsetfontdimens#1#2#3{{%
  912. \setlength{\@IEEEtrantmpdimenB}{\f@size pt}% grab the font size in pt, could use 1em instead.
  913. \setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}%
  914. \fontdimen2\font=\@IEEEtrantmpdimenA\relax
  915. \addtolength{\@IEEEtrantmpdimenA}{-#2\@IEEEtrantmpdimenB}%
  916. \fontdimen3\font=-\@IEEEtrantmpdimenA\relax
  917. \setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}%
  918. \addtolength{\@IEEEtrantmpdimenA}{-#3\@IEEEtrantmpdimenB}%
  919. \fontdimen4\font=\@IEEEtrantmpdimenA\relax}}
  920. % revise the interword spacing for each font weight
  921. \def\@@IEEEsetfontdimens{{%
  922. \mdseries
  923. \@@@IEEEsetfontdimens{\@IEEEinterspaceratioM}{\@IEEEinterspaceMAXratioM}{\@IEEEinterspaceMINratioM}%
  924. \bfseries
  925. \@@@IEEEsetfontdimens{\@IEEEinterspaceratioB}{\@IEEEinterspaceMAXratioB}{\@IEEEinterspaceMINratioB}%
  926. }}
  927. % revise the interword spacing for each font shape
  928. % \slshape is not often used for IEEE work and is not altered here. The \scshape caps are
  929. % already a tad too large in the free LaTeX fonts (as compared to what the IEEE uses) so we
  930. % won't alter these either.
  931. \def\@IEEEsetfontdimens{{%
  932. \normalfont
  933. \@@IEEEsetfontdimens
  934. \normalfont\itshape
  935. \@@IEEEsetfontdimens
  936. }}
  937. % command to revise the interword spacing for each font size (and shape
  938. % and weight). Only the \rmfamily is done here as \ttfamily uses a
  939. % fixed spacing and \sffamily is not used as the main text of IEEE papers.
  940. \def\@IEEEtunefonts{{\selectfont\rmfamily
  941. \tiny\@IEEEsetfontdimens
  942. \scriptsize\@IEEEsetfontdimens
  943. \footnotesize\@IEEEsetfontdimens
  944. \small\@IEEEsetfontdimens
  945. \normalsize\@IEEEsetfontdimens
  946. \sublargesize\@IEEEsetfontdimens
  947. \large\@IEEEsetfontdimens
  948. \LARGE\@IEEEsetfontdimens
  949. \huge\@IEEEsetfontdimens
  950. \Huge\@IEEEsetfontdimens}}
  951. % if the nofonttune class option is not given, revise the interword spacing
  952. % now - in case IEEEtran makes any default length measurements, and make
  953. % sure all the default fonts are loaded
  954. \ifCLASSOPTIONnofonttune\else
  955. \@IEEEtunefonts
  956. \fi
  957. % and again at the start of the document in case the user loaded different fonts
  958. \AtBeginDocument{\ifCLASSOPTIONnofonttune\else\@IEEEtunefonts\fi}
  959. % -- V1.8a page setup commands --
  960. % The default sample text for calculating margins
  961. % Note that IEEE publications use \scriptsize for headers and footers.
  962. \def\IEEEdefaultsampletext{\normalfont\normalsize gT}
  963. \def\IEEEdefaultheadersampletext{\normalfont\scriptsize T}% IEEE headers default to uppercase
  964. \def\IEEEdefaultfootersampletext{\normalfont\scriptsize gT}
  965. % usage: \IEEEsettextwidth{inner margin}{outer margin}
  966. % Sets \textwidth to allow the specified inner and outer margins
  967. % for the current \paperwidth.
  968. \def\IEEEsettextwidth#1#2{\@IEEEtrantmpdimenA\paperwidth
  969. \@IEEEtrantmpdimenB#1\relax
  970. \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB
  971. \@IEEEtrantmpdimenB#2\relax
  972. \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB
  973. \textwidth\@IEEEtrantmpdimenA}
  974. % usage: \IEEEsetsidemargin{mode: i, o, c, a}{margin/offset}
  975. % Sets \oddsidemargin and \evensidemargin to yield the specified margin
  976. % of the given mode.
  977. % The available modes are:
  978. % i = inner margin
  979. % o = outer margin
  980. % c = centered, with the given offset
  981. % a = adjust the margins using the given offset
  982. % For the offsets, positive values increase the inner margin.
  983. % \textwidth should be set properly for the given margins before calling this
  984. % function.
  985. \def\IEEEsetsidemargin#1#2{\@IEEEtrantmpdimenA #2\relax
  986. \@IEEEextracttoken{#1}\relax
  987. % check for mode errors
  988. \ifx\@IEEEextractedtokenmacro\@empty
  989. \@IEEEclspkgerror{Empty mode type in \string\IEEEsetsidemargin\space (line \the\inputlineno).\MessageBreak
  990. Defaulting to `i'}{Valid modes for \string\IEEEsetsidemargin\space are: i, o, c and a.}\relax
  991. \let\@IEEEextractedtoken=i\relax
  992. \def\@IEEEextractedtokenmacro{i}\relax
  993. \else
  994. \ifx\@IEEEextractedtokensdiscarded\@empty\else
  995. \typeout{** WARNING: \string\IEEEsetsidemargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
  996. \fi
  997. \fi
  998. % handle each mode
  999. \if\@IEEEextractedtoken a\relax
  1000. \advance\oddsidemargin by \@IEEEtrantmpdimenA\relax
  1001. \else
  1002. \if\@IEEEextractedtoken c\relax
  1003. \oddsidemargin\paperwidth
  1004. \advance\oddsidemargin by -\textwidth
  1005. \divide\oddsidemargin by 2\relax
  1006. \advance\oddsidemargin by -1in\relax
  1007. \advance\oddsidemargin by \@IEEEtrantmpdimenA\relax
  1008. \else
  1009. \if\@IEEEextractedtoken o\relax
  1010. \oddsidemargin\paperwidth
  1011. \advance\oddsidemargin by -\textwidth
  1012. \advance\oddsidemargin by -\@IEEEtrantmpdimenA
  1013. \advance\oddsidemargin by -1in\relax
  1014. \else
  1015. \if\@IEEEextractedtoken i\relax
  1016. \else
  1017. \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetsidemargin\space (line \the\inputlineno).\MessageBreak
  1018. Defaulting to `i'}%
  1019. {Valid modes for \string\IEEEsetsidemargin\space are: i, o, c and a.}%
  1020. \fi
  1021. \oddsidemargin\@IEEEtrantmpdimenA
  1022. \advance\oddsidemargin by -1in\relax
  1023. \fi\fi\fi
  1024. % odd and even side margins both mean "inner" for single sided pages
  1025. \evensidemargin\oddsidemargin
  1026. % but are mirrors of each other when twosided is in effect
  1027. \if@twoside
  1028. \evensidemargin\paperwidth
  1029. \advance\evensidemargin by -\textwidth
  1030. \advance\evensidemargin by -\oddsidemargin
  1031. % have to compensate for both the builtin 1in LaTex offset
  1032. % and the fact we already subtracted this offset from \oddsidemargin
  1033. \advance\evensidemargin -2in\relax
  1034. \fi}
  1035. % usage: \IEEEsettextheight[sample text]{top text margin}{bottom text margin}
  1036. % Sets \textheight based on the specified top margin and bottom margin.
  1037. % Takes into consideration \paperheight, \topskip, and (by default) the
  1038. % the actual height and depth of the \IEEEdefaultsampletext text.
  1039. \def\IEEEsettextheight{\@ifnextchar [{\@IEEEsettextheight}{\@IEEEsettextheight[\IEEEdefaultsampletext]}}
  1040. \def\@IEEEsettextheight[#1]#2#3{\textheight\paperheight\relax
  1041. \@IEEEtrantmpdimenA #2\relax
  1042. \advance \textheight by -\@IEEEtrantmpdimenA% subtract top margin
  1043. \@IEEEtrantmpdimenA #3\relax
  1044. \advance \textheight by -\@IEEEtrantmpdimenA% subtract bottom margin
  1045. \advance \textheight by \topskip% add \topskip
  1046. % subtract off everything above the top, and below the bottom, baselines
  1047. \settoheight{\@IEEEtrantmpdimenA}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1048. \advance \textheight by -\@IEEEtrantmpdimenA
  1049. \settodepth{\@IEEEtrantmpdimenA}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1050. \advance \textheight by -\@IEEEtrantmpdimenA}
  1051. \newdimen\IEEEquantizedlength
  1052. \IEEEquantizedlength 0sp\relax
  1053. \newdimen\IEEEquantizedlengthdiff
  1054. \IEEEquantizedlengthdiff 0sp\relax
  1055. \def\IEEEquantizedlengthint{0}
  1056. % usage: \IEEEquantizelength{mode: d, c, i}{base unit}{length}
  1057. % Sets the length \IEEEquantizedlength to be an integer multiple of the given
  1058. % (nonzero) base unit such that \IEEEquantizedlength approximates the given
  1059. % length.
  1060. % \IEEEquantizedlengthdiff is a length equal to the difference between the
  1061. % \IEEEquantizedlength and the given length.
  1062. % \IEEEquantizedlengthint is a macro containing the integer number of base units
  1063. % in \IEEEquantizedlength.
  1064. % i.e., \IEEEquantizedlength = \IEEEquantizedlengthint * base unit
  1065. % The mode determines how \IEEEquantizedlength is quantized:
  1066. % d = always decrease (always round down \IEEEquantizeint)
  1067. % c = use the closest match
  1068. % i = always increase (always round up \IEEEquantizeint)
  1069. % In anycase, if the given length is already quantized,
  1070. % \IEEEquantizedlengthdiff will be set to zero.
  1071. \def\IEEEquantizelength#1#2#3{\begingroup
  1072. % work in isolation so as not to externally disturb the \@IEEEtrantmp
  1073. % variables
  1074. % load the argument values indirectly via \IEEEquantizedlengthdiff
  1075. % in case the user refers to our \@IEEEtrantmpdimenX, \IEEEquantizedlength,
  1076. % etc. in the arguments. we also will work with these as counters,
  1077. % i.e., in sp units
  1078. % A has the base unit
  1079. \IEEEquantizedlengthdiff #2\relax\relax\relax\relax
  1080. \@IEEEtrantmpcountA\IEEEquantizedlengthdiff
  1081. % B has the input length
  1082. \IEEEquantizedlengthdiff #3\relax\relax\relax\relax
  1083. \@IEEEtrantmpcountB\IEEEquantizedlengthdiff
  1084. \@IEEEtrantmpdimenA\the\@IEEEtrantmpcountA sp\relax
  1085. \@IEEEtrantmpdimenB\the\@IEEEtrantmpcountB sp\relax
  1086. % \@IEEEtrantmpcountC will have the quantized int
  1087. % \IEEEquantizedlength will have the quantized length
  1088. % \@IEEEtrantmpdimenC will have the quantized diff
  1089. % initialize them to zero as this is what will be
  1090. % exported if an error occurs
  1091. \@IEEEtrantmpcountC 0\relax
  1092. \IEEEquantizedlength 0sp\relax
  1093. \@IEEEtrantmpdimenC 0sp\relax
  1094. % extract mode
  1095. \@IEEEextracttoken{#1}\relax
  1096. % check for mode errors
  1097. \ifx\@IEEEextractedtokenmacro\@empty
  1098. \@IEEEclspkgerror{Empty mode type in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak
  1099. Defaulting to `d'}{Valid modes for \string\IEEEquantizelength\space are: d, c and i.}\relax
  1100. \let\@IEEEextractedtoken=d\relax
  1101. \def\@IEEEextractedtokenmacro{d}\relax
  1102. \else
  1103. \ifx\@IEEEextractedtokensdiscarded\@empty\else
  1104. \typeout{** WARNING: \string\IEEEquantizelength\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
  1105. \fi
  1106. \fi
  1107. % check for base unit is zero error
  1108. \ifnum\@IEEEtrantmpcountA=0\relax
  1109. \@IEEEclspkgerror{Base unit is zero in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak
  1110. \string\IEEEquantizedlength\space and \string\IEEEquantizedlengthdiff\space are set to zero}{Division by zero is not allowed.}\relax
  1111. \else% base unit is nonzero
  1112. % \@IEEEtrantmpcountC carries the number of integer units
  1113. % in the quantized length (integer length \ base)
  1114. \@IEEEtrantmpcountC\@IEEEtrantmpcountB\relax
  1115. \divide\@IEEEtrantmpcountC by \@IEEEtrantmpcountA\relax
  1116. % \IEEEquantizedlength has the (rounded down) quantized length
  1117. % = base * int
  1118. \IEEEquantizedlength\@IEEEtrantmpdimenA\relax
  1119. \multiply\IEEEquantizedlength by \@IEEEtrantmpcountC\relax
  1120. % \@IEEEtrantmpdimenC has the difference
  1121. % = quantized length - length
  1122. \@IEEEtrantmpdimenC\IEEEquantizedlength\relax
  1123. \advance\@IEEEtrantmpdimenC by -\@IEEEtrantmpdimenB\relax
  1124. % trap special case of length being already quantized
  1125. % to avoid a roundup under i option
  1126. \ifdim\@IEEEtrantmpdimenC=0sp\relax
  1127. \else % length not is already quantized
  1128. % set dimenA to carry the upper quantized (absolute value) difference:
  1129. % quantizedlength + base - length
  1130. \advance\@IEEEtrantmpdimenA by \IEEEquantizedlength\relax
  1131. \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB\relax
  1132. % set dimenB to carry the lower quantized (absolute value) difference:
  1133. % length - quantizedlength
  1134. \advance\@IEEEtrantmpdimenB by -\IEEEquantizedlength\relax
  1135. % handle each mode
  1136. \if\@IEEEextractedtoken c\relax
  1137. % compare upper and lower amounts, select upper if lower > upper
  1138. \ifdim\@IEEEtrantmpdimenB>\@IEEEtrantmpdimenA\relax
  1139. % use upper
  1140. \advance\IEEEquantizedlength by \the\@IEEEtrantmpcountA sp\relax
  1141. \advance\@IEEEtrantmpcountC by 1\relax
  1142. \@IEEEtrantmpdimenC\@IEEEtrantmpdimenA
  1143. \else% <=. uselower
  1144. % no need to do anything for lower, use output values already setup
  1145. \fi
  1146. \else% not mode c
  1147. \if\@IEEEextractedtoken i\relax
  1148. % always round up under i mode
  1149. \advance\IEEEquantizedlength by \the\@IEEEtrantmpcountA sp\relax
  1150. \advance\@IEEEtrantmpcountC by 1\relax
  1151. \@IEEEtrantmpdimenC\@IEEEtrantmpdimenA
  1152. \else
  1153. \if\@IEEEextractedtoken d\relax
  1154. \else
  1155. \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak
  1156. Defaulting to `d'}%
  1157. {Valid modes for \string\IEEEquantizelength\space are: d, c, and i.}\relax
  1158. \fi % if d
  1159. % no need to do anything for d, use output values already setup
  1160. \fi\fi % if i, c
  1161. \fi % if length is already quantized
  1162. \fi% if base unit is zero
  1163. % globally assign the results to macros we use here to escape the enclosing
  1164. % group without needing to call \global on any of the \@IEEEtrantmp variables.
  1165. % \@IEEEtrantmpcountC has the quantized int
  1166. % \IEEEquantizedlength has the quantized length
  1167. % \@IEEEtrantmpdimenC has the quantized diff
  1168. \xdef\@IEEEquantizedlengthintmacro{\the\@IEEEtrantmpcountC}\relax
  1169. \@IEEEtrantmpcountC\IEEEquantizedlength\relax
  1170. \xdef\@IEEEquantizedlengthmacro{\the\@IEEEtrantmpcountC}\relax
  1171. \@IEEEtrantmpcountC\@IEEEtrantmpdimenC\relax
  1172. \xdef\@IEEEquantizedlengthdiffmacro{\the\@IEEEtrantmpcountC}\relax
  1173. \endgroup
  1174. % locally assign the outputs here from the macros
  1175. \expandafter\IEEEquantizedlength\@IEEEquantizedlengthmacro sp\relax
  1176. \expandafter\IEEEquantizedlengthdiff\@IEEEquantizedlengthdiffmacro sp\relax
  1177. \edef\IEEEquantizedlengthint{\@IEEEquantizedlengthintmacro}\relax}
  1178. \newdimen\IEEEquantizedtextheightdiff
  1179. \IEEEquantizedtextheightdiff 0sp\relax
  1180. % usage: \IEEEquantizetextheight[base unit]{mode: d, c, i}
  1181. % Sets \textheight to be an integer multiple of the current \baselineskip
  1182. % (or the optionally specified base unit) plus the first (\topskip) line.
  1183. % \IEEEquantizedtextheightdiff is a length equal to the difference between
  1184. % the new quantized and original \textheight.
  1185. % \IEEEquantizedtextheightlpc is a macro containing the integer number of
  1186. % lines per column under the quantized \textheight. i.e.,
  1187. % \textheight = \IEEEquantizedtextheightlpc * \baselineskip + \topskip
  1188. % The mode determines how \textheight is quantized:
  1189. % d = always decrease (always round down the number of lines per column)
  1190. % c = use the closest match
  1191. % i = always increase (always round up the number of lines per column)
  1192. % In anycase, if \textheight is already quantized, it will remain unchanged,
  1193. % and \IEEEquantizedtextheightdiff will be set to zero.
  1194. % Depends on: \IEEEquantizelength
  1195. \def\IEEEquantizetextheight{\@ifnextchar [{\@IEEEquantizetextheight}{\@IEEEquantizetextheight[\baselineskip]}}
  1196. \def\@IEEEquantizetextheight[#1]#2{\begingroup
  1197. % use our \IEEEquantizedtextheightdiff as a scratch pad
  1198. % we need to subtract off \topskip before quantization
  1199. \IEEEquantizedtextheightdiff\textheight
  1200. \advance\IEEEquantizedtextheightdiff by -\topskip\relax
  1201. \IEEEquantizelength{#2}{#1}{\IEEEquantizedtextheightdiff}
  1202. % add back \topskip line
  1203. \advance\IEEEquantizedlength by \topskip
  1204. \@IEEEtrantmpcountC\IEEEquantizedlengthint\relax
  1205. \advance\@IEEEtrantmpcountC by 1\relax
  1206. % globally assign the results to macros we use here to escape the enclosing
  1207. % group without needing to call \global on any of the \@IEEEtrantmp variables.
  1208. \xdef\@IEEEquantizedtextheightlpcmacro{\the\@IEEEtrantmpcountC}\relax
  1209. \@IEEEtrantmpcountC\IEEEquantizedlength\relax
  1210. \xdef\@IEEEquantizedtextheightmacro{\the\@IEEEtrantmpcountC}\relax
  1211. \@IEEEtrantmpcountC\IEEEquantizedlengthdiff\relax
  1212. \xdef\@IEEEquantizedtextheightdiffmacro{\the\@IEEEtrantmpcountC}\relax
  1213. \endgroup
  1214. % locally assign the outputs here from the macros
  1215. \textheight\@IEEEquantizedtextheightmacro sp\relax
  1216. \IEEEquantizedtextheightdiff\@IEEEquantizedtextheightdiffmacro sp\relax
  1217. \edef\IEEEquantizedtextheightlpc{\@IEEEquantizedtextheightlpcmacro}}
  1218. % usage: \IEEEsettopmargin[sample text]{mode: t, b, c, a, q}{margin/offset}
  1219. % Sets \topmargin based on the specified vertical margin.
  1220. % Takes into consideration the base 1in offset, \headheight, \headsep,
  1221. % \topskip, and (by default) the the actual height (or, for the bottom, depth)
  1222. % of the \IEEEdefaultsampletext text.
  1223. % The available modes are:
  1224. % t = top margin
  1225. % b = bottom margin
  1226. % c = vertically centered, with the given offset
  1227. % a = adjust the vertical margins using the given offset
  1228. % q = adjust the margins using \IEEEquantizedtextheightdiff and the given offset
  1229. % For the offsets, positive values increase the top margin.
  1230. % \headheight, \headsep, \topskip and \textheight should be set properly for the
  1231. % given margins before calling this function.
  1232. \def\IEEEsettopmargin{\@ifnextchar [{\@IEEEsettopmargin}{\@IEEEsettopmargin[\IEEEdefaultsampletext]}}
  1233. \def\@IEEEsettopmargin[#1]#2#3{\@IEEEtrantmpdimenA #3\relax
  1234. \@IEEEextracttoken{#2}\relax
  1235. % check for mode errors
  1236. \ifx\@IEEEextractedtokenmacro\@empty
  1237. \@IEEEclspkgerror{Empty mode type in \string\IEEEsettopmargin\space (line \the\inputlineno).\MessageBreak
  1238. Defaulting to `t'}{Valid modes for \string\IEEEsettopmargin\space are: t, b, c, a and q.}\relax
  1239. \let\@IEEEextractedtoken=t\relax
  1240. \def\@IEEEextractedtokenmacro{t}\relax
  1241. \else
  1242. \ifx\@IEEEextractedtokensdiscarded\@empty\else
  1243. \typeout{** WARNING: \string\IEEEsettopmargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
  1244. \fi
  1245. \fi
  1246. % handle each mode
  1247. \if\@IEEEextractedtoken a\relax
  1248. \advance\topmargin by \@IEEEtrantmpdimenA\relax
  1249. \else
  1250. \if\@IEEEextractedtoken q\relax
  1251. % we need to adjust by half the \IEEEquantizedtextheightdiff value
  1252. \@IEEEtrantmpdimenB\IEEEquantizedtextheightdiff\relax
  1253. \divide\@IEEEtrantmpdimenB by 2\relax
  1254. % a positive \IEEEquantizedtextheightdiff means we need to reduce \topmargin
  1255. % because \textheight has been lenghtened
  1256. \advance\topmargin by -\@IEEEtrantmpdimenB\relax
  1257. \advance\topmargin by \@IEEEtrantmpdimenA\relax
  1258. \else
  1259. \if\@IEEEextractedtoken c\relax
  1260. \topmargin\paperheight
  1261. \advance\topmargin by -\textheight
  1262. % \textheight includes \topskip, but we should not count topskip whitespace here, backout
  1263. \advance \topmargin by \topskip
  1264. \settoheight{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1265. \advance\topmargin by -\@IEEEtrantmpdimenB\relax
  1266. \settodepth{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1267. \advance\topmargin by -\@IEEEtrantmpdimenB\relax
  1268. \divide\topmargin by 2\relax
  1269. \advance\topmargin by \@IEEEtrantmpdimenA\relax
  1270. \else
  1271. \if\@IEEEextractedtoken b\relax
  1272. \topmargin\paperheight
  1273. \advance\topmargin by -\textheight
  1274. % \textheight includes \topskip, but we should not count topskip whitespace here, backout
  1275. \advance \topmargin by \topskip
  1276. \settodepth{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1277. \advance\topmargin by -\@IEEEtrantmpdimenB\relax
  1278. \advance\topmargin by -\@IEEEtrantmpdimenA\relax
  1279. \else
  1280. \if\@IEEEextractedtoken t\relax
  1281. \else
  1282. \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsettopmargin\space (line \the\inputlineno).\MessageBreak
  1283. Defaulting to `t'}%
  1284. {Valid modes for \string\IEEEsettopmargin\space are: t, b, c, a and q.}\relax
  1285. \fi
  1286. \topmargin\@IEEEtrantmpdimenA\relax
  1287. \settoheight{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1288. \advance\topmargin by \@IEEEtrantmpdimenB\relax
  1289. \fi\fi % if t, b, c
  1290. % convert desired top margin into actual \topmargin
  1291. % this is not done for the q or a modes because they are only adjustments
  1292. \advance \topmargin by -\topskip
  1293. \advance \topmargin by -1in
  1294. \advance \topmargin by -\headheight
  1295. \advance \topmargin by -\headsep
  1296. \fi\fi % if q, a
  1297. }
  1298. % usage: \IEEEsetheadermargin[header sample][text sample]{mode: t, b, c, a}{margin/offset}
  1299. % Differentially adjusts \topmargin and \headsep (such that their sum is unchanged)
  1300. % based on the specified header margin.
  1301. % Takes into consideration the base 1in offset, \headheight, \topskip, and (by default)
  1302. % the actual height (or depth) of the \IEEEdefaultheadersampletext and
  1303. % \IEEEdefaultsampletext text.
  1304. % The available modes are:
  1305. % t = top margin (top of the header text to the top of the page)
  1306. % b = bottom margin (bottom of the header text to the top of the main text)
  1307. % c = vertically centered between the main text and the top of the page,
  1308. % with the given offset
  1309. % a = adjust the vertical position using the given offset
  1310. % For the offsets, positive values move the header downward.
  1311. % \headheight, \headsep, \topskip and \topmargin should be set properly before
  1312. % calling this function.
  1313. \def\IEEEsetheadermargin{\@ifnextchar [{\@IEEEsetheadermargin}{\@IEEEsetheadermargin[\IEEEdefaultheadersampletext]}}
  1314. \def\@IEEEsetheadermargin[#1]{\@ifnextchar [{\@@IEEEsetheadermargin[#1]}{\@@IEEEsetheadermargin[#1][\IEEEdefaultsampletext]}}
  1315. \def\@@IEEEsetheadermargin[#1][#2]#3#4{\@IEEEtrantmpdimenA #4\relax
  1316. \@IEEEextracttoken{#3}\relax
  1317. % check for mode errors
  1318. \ifx\@IEEEextractedtokenmacro\@empty
  1319. \@IEEEclspkgerror{Empty mode type in \string\IEEEsetheadermargin\space (line \the\inputlineno).\MessageBreak
  1320. Defaulting to `t'}{Valid modes for \string\IEEEsetheadermargin\space are: t, b, c, and a.}\relax
  1321. \let\@IEEEextractedtoken=t\relax
  1322. \def\@IEEEextractedtokenmacro{t}\relax
  1323. \else
  1324. \ifx\@IEEEextractedtokensdiscarded\@empty\else
  1325. \typeout{** WARNING: \string\IEEEsetheadermargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
  1326. \fi
  1327. \fi
  1328. % handle each mode
  1329. \if\@IEEEextractedtoken a\relax
  1330. % No need to do anything here and can pass through the adjustment
  1331. % value as is. The end adjustment of \topmargin and \headsep will
  1332. % do all that is needed
  1333. \else
  1334. \if\@IEEEextractedtoken c\relax
  1335. % get the bottom margin
  1336. \@IEEEtrantmpdimenB\headsep\relax
  1337. \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1338. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
  1339. \advance\@IEEEtrantmpdimenB by \topskip
  1340. \settoheight{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax
  1341. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
  1342. % at this point \@IEEEtrantmpdimenB has the actual header bottom margin
  1343. % subtract from it the top header margin
  1344. \advance\@IEEEtrantmpdimenB -1in\relax % take into consideration the system 1in offset of the top margin
  1345. \advance\@IEEEtrantmpdimenB by -\topmargin
  1346. \advance\@IEEEtrantmpdimenB by -\headheight
  1347. \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1348. \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC
  1349. % at this point \@IEEEtrantmpdimenB has the difference between the bottom and top margins
  1350. % we need to adjust by half this amount to center the header
  1351. \divide\@IEEEtrantmpdimenB by 2\relax
  1352. % and add to offset
  1353. \advance\@IEEEtrantmpdimenA by \@IEEEtrantmpdimenB
  1354. \else
  1355. \if\@IEEEextractedtoken b\relax
  1356. \@IEEEtrantmpdimenB\headsep\relax
  1357. \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1358. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
  1359. \advance\@IEEEtrantmpdimenB by \topskip
  1360. \settoheight{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax
  1361. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
  1362. % at this point \@IEEEtrantmpdimenB has the actual header bottom margin
  1363. % get the difference between the actual and the desired
  1364. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenA
  1365. \@IEEEtrantmpdimenA\@IEEEtrantmpdimenB
  1366. \else
  1367. \if\@IEEEextractedtoken t\relax
  1368. \else
  1369. \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetheadermargin\space (line \the\inputlineno).\MessageBreak
  1370. Defaulting to `t'}%
  1371. {Valid modes for \string\IEEEsetheadermargin\space are: t, b, c and a.}\relax
  1372. \fi
  1373. \@IEEEtrantmpdimenB 1in\relax % take into consideration the system 1in offset of the top margin
  1374. \advance\@IEEEtrantmpdimenB by \topmargin
  1375. \advance\@IEEEtrantmpdimenB by \headheight
  1376. \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1377. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
  1378. % at this point \@IEEEtrantmpdimenB has the actual header top margin
  1379. % get the difference between the desired and the actual
  1380. \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB
  1381. \fi\fi % if t, b, c
  1382. \fi % if a
  1383. % advance \topmargin by the needed amount and reduce \headsep by the same
  1384. % so as not to disturb the location of the main text
  1385. \advance\topmargin by \@IEEEtrantmpdimenA\relax
  1386. \advance\headsep by -\@IEEEtrantmpdimenA\relax
  1387. }
  1388. % usage: \IEEEsetfootermargin[footer sample][text sample]{mode: t, b, c, a}{margin/offset}
  1389. % Adjusts \footskip based on the specified footer margin.
  1390. % Takes into consideration the base 1in offset, \paperheight, \headheight,
  1391. % \headsep, \textheight and (by default) the actual height (or depth) of the
  1392. % \IEEEdefaultfootersampletext and \IEEEdefaultsampletext text.
  1393. % The available modes are:
  1394. % t = top margin (top of the footer text to the bottom of the main text)
  1395. % b = bottom margin (bottom of the footer text to the bottom of page)
  1396. % c = vertically centered between the main text and the bottom of the page,
  1397. % with the given offset
  1398. % a = adjust the vertical position using the given offset
  1399. % For the offsets, positive values move the footer downward.
  1400. % \headheight, \headsep, \topskip, \topmargin, and \textheight should be set
  1401. % properly before calling this function.
  1402. \def\IEEEsetfootermargin{\@ifnextchar [{\@IEEEsetfootermargin}{\@IEEEsetfootermargin[\IEEEdefaultfootersampletext]}}
  1403. \def\@IEEEsetfootermargin[#1]{\@ifnextchar [{\@@IEEEsetfootermargin[#1]}{\@@IEEEsetfootermargin[#1][\IEEEdefaultsampletext]}}
  1404. \def\@@IEEEsetfootermargin[#1][#2]#3#4{\@IEEEtrantmpdimenA #4\relax
  1405. \@IEEEextracttoken{#3}\relax
  1406. % check for mode errors
  1407. \ifx\@IEEEextractedtokenmacro\@empty
  1408. \@IEEEclspkgerror{Empty mode type in \string\IEEEsetfootermargin\space (line \the\inputlineno).\MessageBreak
  1409. Defaulting to `t'}{Valid modes for \string\IEEEsetfootermargin\space are: t, b, c, and a.}\relax
  1410. \let\@IEEEextractedtoken=t\relax
  1411. \def\@IEEEextractedtokenmacro{t}\relax
  1412. \else
  1413. \ifx\@IEEEextractedtokensdiscarded\@empty\else
  1414. \typeout{** WARNING: \string\IEEEsetfootermargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
  1415. \fi
  1416. \fi
  1417. % handle each mode
  1418. \if\@IEEEextractedtoken a\relax
  1419. % No need to do anything here and can pass through the adjustment
  1420. % value as is. The end adjustment of \footskip will do all that
  1421. % is needed
  1422. \else
  1423. \if\@IEEEextractedtoken c\relax
  1424. % calculate the bottom margin
  1425. \@IEEEtrantmpdimenB 1in\relax % system 1in offset
  1426. \advance\@IEEEtrantmpdimenB\topmargin\relax
  1427. \advance\@IEEEtrantmpdimenB\headheight\relax
  1428. \advance\@IEEEtrantmpdimenB\headsep\relax
  1429. \advance\@IEEEtrantmpdimenB\textheight\relax
  1430. \advance\@IEEEtrantmpdimenB\footskip\relax
  1431. \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1432. \advance\@IEEEtrantmpdimenC by \@IEEEtrantmpdimenB
  1433. \@IEEEtrantmpdimenB\paperheight
  1434. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
  1435. % at this point \@IEEEtrantmpdimenB has the actual footer bottom margin
  1436. % now subtract off the footer top margin
  1437. \advance\@IEEEtrantmpdimenB -\footskip\relax
  1438. \settodepth{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax
  1439. \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC
  1440. \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1441. \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC
  1442. % at this point \@IEEEtrantmpdimenB has the difference between the bottom
  1443. % and top footer margins
  1444. % our adjustment must be half this value to center the footer
  1445. \divide\@IEEEtrantmpdimenB by 2\relax
  1446. % add to the offset
  1447. \advance\@IEEEtrantmpdimenA by \@IEEEtrantmpdimenB
  1448. \else
  1449. \if\@IEEEextractedtoken b\relax
  1450. % calculate the bottom margin
  1451. \@IEEEtrantmpdimenB 1in\relax % system 1in offset
  1452. \advance\@IEEEtrantmpdimenB\topmargin\relax
  1453. \advance\@IEEEtrantmpdimenB\headheight\relax
  1454. \advance\@IEEEtrantmpdimenB\headsep\relax
  1455. \advance\@IEEEtrantmpdimenB\textheight\relax
  1456. \advance\@IEEEtrantmpdimenB\footskip\relax
  1457. \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1458. \advance\@IEEEtrantmpdimenC by \@IEEEtrantmpdimenB
  1459. \@IEEEtrantmpdimenB\paperheight
  1460. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
  1461. % at this point \@IEEEtrantmpdimenB has the actual footer bottom margin
  1462. % get the difference between the actual and the desired
  1463. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenA
  1464. \@IEEEtrantmpdimenA\@IEEEtrantmpdimenB
  1465. \else
  1466. \if\@IEEEextractedtoken t\relax
  1467. \else
  1468. \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetfootermargin\space (line \the\inputlineno).\MessageBreak
  1469. Defaulting to `t'}%
  1470. {Valid modes for \string\IEEEsetfootermargin\space are: t, b, c and a.}\relax
  1471. \fi
  1472. \@IEEEtrantmpdimenB\footskip\relax
  1473. \settodepth{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax
  1474. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
  1475. \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
  1476. \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
  1477. % at this point \@IEEEtrantmpdimenB has the actual footer top margin
  1478. % get the difference between the desired and the actual
  1479. \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB
  1480. \fi\fi % if t, b, c
  1481. \fi % if a
  1482. % advance \footskip by the needed amount
  1483. \advance\footskip by \@IEEEtrantmpdimenA\relax
  1484. }
  1485. % -- End V1.8a page setup commands --
  1486. % V1.6
  1487. % LaTeX is a little to quick to use hyphenations
  1488. % So, we increase the penalty for their use and raise
  1489. % the badness level that triggers an underfull hbox
  1490. % warning. The author may still have to tweak things,
  1491. % but the appearance will be much better "right out
  1492. % of the box" than that under V1.5 and prior.
  1493. % TeX default is 50
  1494. \hyphenpenalty=750
  1495. \ifCLASSOPTIONcompsoc
  1496. \hyphenpenalty 500
  1497. \fi
  1498. % If we didn't adjust the interword spacing, 2200 might be better.
  1499. % The TeX default is 1000
  1500. \hbadness=1350
  1501. % The IEEE does not use extra spacing after punctuation
  1502. \frenchspacing
  1503. % V1.7 increase this a tad to discourage equation breaks
  1504. \binoppenalty=1000 % default 700
  1505. \relpenalty=800 % default 500
  1506. % v1.8a increase these to discourage widows and orphans
  1507. \clubpenalty=1000 % default 150
  1508. \widowpenalty=1000 % default 150
  1509. \displaywidowpenalty=1000 % default 50
  1510. % margin note stuff
  1511. \marginparsep 10pt
  1512. \marginparwidth 20pt
  1513. \marginparpush 25pt
  1514. % if things get too close, go ahead and let them touch
  1515. \lineskip 0pt
  1516. \normallineskip 0pt
  1517. \lineskiplimit 0pt
  1518. \normallineskiplimit 0pt
  1519. % The distance from the lower edge of the text body to the
  1520. % footline
  1521. \footskip 0.4in
  1522. % normally zero, should be relative to font height.
  1523. % put in a little rubber to help stop some bad breaks (underfull vboxes)
  1524. \parskip 0ex plus 0.2ex minus 0.1ex
  1525. \parindent 1.0em
  1526. \ifCLASSOPTIONcompsoc
  1527. \parindent 1.5em
  1528. \fi
  1529. \headheight 12pt
  1530. \headsep 18pt
  1531. % use the normal font baselineskip
  1532. % so that \topskip is unaffected by changes in \baselinestretch
  1533. \topskip=\@IEEEnormalsizeunitybaselineskip
  1534. % V1.8 \maxdepth defaults to 4pt, but should be font size dependent
  1535. \maxdepth=0.5\@IEEEnormalsizeunitybaselineskip
  1536. \textheight 58pc % 9.63in, 696pt
  1537. % set the default top margin to 58pt
  1538. % which results in a \topmargin of -49.59pt for 10pt documents
  1539. \IEEEsettopmargin{t}{58pt}
  1540. % tweak textheight to a perfect integer number of lines/column.
  1541. % standard is: 9pt/63 lpc; 10pt/58 lpc; 11pt/52 lpc; 12pt/50 lpc
  1542. \IEEEquantizetextheight{c}
  1543. % tweak top margin so that the error is shared equally at the top and bottom
  1544. \IEEEsettopmargin{q}{0sp}
  1545. \columnsep 1pc
  1546. \textwidth 43pc % 2 x 21pc + 1pc = 43pc
  1547. % set the default side margins to center the text
  1548. \IEEEsetsidemargin{c}{0pt}
  1549. % adjust margins for default conference mode
  1550. \ifCLASSOPTIONconference
  1551. \textheight 9.25in % The standard for conferences (668.4975pt)
  1552. \IEEEsettopmargin{t}{0.75in}
  1553. % tweak textheight to a perfect integer number of lines/page.
  1554. % standard is: 9pt/61 lpc; 10pt/56 lpc; 11pt/50 lpc; 12pt/48 lpc
  1555. \IEEEquantizetextheight{c}
  1556. % tweak top margin so that the error is shared equally at the top and bottom
  1557. \IEEEsettopmargin{q}{0sp}
  1558. \fi
  1559. % compsoc text sizes, margins and spacings
  1560. \ifCLASSOPTIONcompsoc
  1561. \columnsep 12bp
  1562. % CS specs for \textwdith are 6.875in
  1563. % \textwidth 6.875in
  1564. % however, measurements from proofs show they are using 3.5in columns
  1565. \textwidth 7in
  1566. \advance\textwidth by \columnsep
  1567. % set the side margins to center the text
  1568. \IEEEsetsidemargin{c}{0pt}
  1569. % top/bottom margins to center
  1570. % could just set \textheight to 9.75in for all the different paper sizes
  1571. % and then quantize, but we'll do it the long way here to allow for easy
  1572. % future per-paper size adjustments
  1573. \IEEEsettextheight{0.625in}{0.625in}% 11in - 2 * 0.625in = 9.75in is the standard text height for compsoc journals
  1574. \IEEEsettopmargin{t}{0.625in}
  1575. \if@IEEEusingcspaper
  1576. \IEEEsettextheight{0.5in}{0.5in}% 10.75in - 2 * 0.5in = 9.75in
  1577. \IEEEsettopmargin{t}{0.5in}
  1578. \fi
  1579. \if@IEEEusingAfourpaper
  1580. \IEEEsettextheight{24.675mm}{24.675mm}% 297mm - 2 * 24.675mm = 247.650mm (9.75in)
  1581. \IEEEsettopmargin{t}{24.675mm}
  1582. \fi
  1583. % tweak textheight to a perfect integer number of lines/page.
  1584. % standard is: 9pt/65 lpc; 10pt/61 lpc; 11pt/53 lpc; 12pt/49 lpc
  1585. \IEEEquantizetextheight{c}
  1586. % tweak top margin so that the error is shared equally at the top and bottom
  1587. \IEEEsettopmargin{q}{0sp}
  1588. % compsoc conference
  1589. \ifCLASSOPTIONconference
  1590. % compsoc conference use a larger value for columnsep
  1591. \columnsep 0.25in
  1592. \IEEEsettextwidth{0.75in}{0.75in}
  1593. % set the side margins to center the text (0.75in for letterpaper)
  1594. \IEEEsetsidemargin{c}{0pt}
  1595. % compsoc conferences want 1in top and bottom margin
  1596. \IEEEsettextheight{1in}{1in}
  1597. \IEEEsettopmargin{t}{1in}
  1598. % tweak textheight to a perfect integer number of lines/page.
  1599. % standard is: 9pt/58 lpc; 10pt/53 lpc; 11pt/48 lpc; 12pt/46 lpc
  1600. \IEEEquantizetextheight{c}
  1601. % tweak top margin so that the error is shared equally at the top and bottom
  1602. \IEEEsettopmargin{q}{0sp}
  1603. \fi
  1604. \fi
  1605. % draft mode settings override that of all other modes
  1606. % provides a nice 1in margin all around the paper and extra
  1607. % space between the lines for editor's comments
  1608. \ifCLASSOPTIONdraftcls
  1609. % we want 1in side margins regardless of paper type
  1610. \IEEEsettextwidth{1in}{1in}
  1611. \IEEEsetsidemargin{c}{0pt}
  1612. % want 1in top and bottom margins
  1613. \IEEEsettextheight{1in}{1in}
  1614. \IEEEsettopmargin{t}{1in}
  1615. % digitize textheight to be an integer number of lines.
  1616. % this may cause the top and bottom margins to be off a tad
  1617. \IEEEquantizetextheight{c}
  1618. % tweak top margin so that the error is shared equally at the top and bottom
  1619. \IEEEsettopmargin{q}{0sp}
  1620. \fi
  1621. % process CLASSINPUT inner/outer margin
  1622. % if inner margin defined, but outer margin not, set outer to inner.
  1623. \ifx\CLASSINPUTinnersidemargin\@IEEEundefined
  1624. \else
  1625. \ifx\CLASSINPUToutersidemargin\@IEEEundefined
  1626. \edef\CLASSINPUToutersidemargin{\CLASSINPUTinnersidemargin}
  1627. \fi
  1628. \fi
  1629. \ifx\CLASSINPUToutersidemargin\@IEEEundefined
  1630. \else
  1631. % if outer margin defined, but inner margin not, set inner to outer.
  1632. \ifx\CLASSINPUTinnersidemargin\@IEEEundefined
  1633. \edef\CLASSINPUTinnersidemargin{\CLASSINPUToutersidemargin}
  1634. \fi
  1635. \IEEEsettextwidth{\CLASSINPUTinnersidemargin}{\CLASSINPUToutersidemargin}
  1636. \IEEEsetsidemargin{i}{\CLASSINPUTinnersidemargin}
  1637. \typeout{** ATTENTION: Overriding inner side margin to \CLASSINPUTinnersidemargin\space and
  1638. outer side margin to \CLASSINPUToutersidemargin\space via \string\CLASSINPUT.}
  1639. \fi
  1640. % process CLASSINPUT top/bottom text margin
  1641. % if toptext margin defined, but bottomtext margin not, set bottomtext to toptext margin
  1642. \ifx\CLASSINPUTtoptextmargin\@IEEEundefined
  1643. \else
  1644. \ifx\CLASSINPUTbottomtextmargin\@IEEEundefined
  1645. \edef\CLASSINPUTbottomtextmargin{\CLASSINPUTtoptextmargin}
  1646. \fi
  1647. \fi
  1648. \ifx\CLASSINPUTbottomtextmargin\@IEEEundefined
  1649. \else
  1650. % if bottomtext margin defined, but toptext margin not, set toptext to bottomtext margin
  1651. \ifx\CLASSINPUTtoptextmargin\@IEEEundefined
  1652. \edef\CLASSINPUTtoptextmargin{\CLASSINPUTbottomtextmargin}
  1653. \fi
  1654. \IEEEsettextheight{\CLASSINPUTtoptextmargin}{\CLASSINPUTbottomtextmargin}
  1655. \IEEEsettopmargin{t}{\CLASSINPUTtoptextmargin}
  1656. \typeout{** ATTENTION: Overriding top text margin to \CLASSINPUTtoptextmargin\space and
  1657. bottom text margin to \CLASSINPUTbottomtextmargin\space via \string\CLASSINPUT.}
  1658. \fi
  1659. % default to center header and footer text in the margins
  1660. \IEEEsetheadermargin{c}{0pt}
  1661. \IEEEsetfootermargin{c}{0pt}
  1662. % adjust header and footer positions for compsoc journals
  1663. \ifCLASSOPTIONcompsoc
  1664. \ifCLASSOPTIONjournal
  1665. \IEEEsetheadermargin{b}{\@IEEEnormalsizeunitybaselineskip}
  1666. \IEEEsetfootermargin{t}{\@IEEEnormalsizeunitybaselineskip}
  1667. \fi
  1668. \fi
  1669. % V1.8a display lines per column info message on user's console
  1670. \def\IEEEdisplayinfolinespercolumn{\@IEEEtrantmpdimenA=\textheight
  1671. % topskip represents only one line even if > baselineskip
  1672. \advance\@IEEEtrantmpdimenA by -1\topskip
  1673. \@IEEEtrantmpcountA=\@IEEEtrantmpdimenA
  1674. \@IEEEtrantmpcountB=\@IEEEtrantmpdimenA
  1675. \divide\@IEEEtrantmpcountB by \baselineskip
  1676. % need to add one line to include topskip (first) line
  1677. \advance\@IEEEtrantmpcountB by 1
  1678. % save lines per column value as text
  1679. \edef\@IEEEnumlinespercolumninfotxt{\the\@IEEEtrantmpcountB}
  1680. % backout topskip advance to allow direct \@IEEEtrantmpcountA comparison
  1681. \advance\@IEEEtrantmpcountB by -1
  1682. % restore value as text height (without topskip) rather than just as number of lines
  1683. \multiply\@IEEEtrantmpcountB by \baselineskip
  1684. % is the column height an integer number of lines per column?
  1685. \ifnum\@IEEEtrantmpcountA=\@IEEEtrantmpcountB
  1686. \edef\@IEEEnumlinespercolumnexactinfotxt{exact}
  1687. \else
  1688. \@IEEEtrantmpdimenA\@IEEEtrantmpcountA sp\relax
  1689. \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpcountB sp\relax
  1690. \edef\@IEEEnumlinespercolumnexactinfotxt{approximate, difference = \the\@IEEEtrantmpdimenA}
  1691. \fi
  1692. \typeout{-- Lines per column: \@IEEEnumlinespercolumninfotxt\space (\@IEEEnumlinespercolumnexactinfotxt).}}
  1693. % delay execution till start of document to allow for user changes
  1694. \AtBeginDocument{\IEEEdisplayinfolinespercolumn}
  1695. % LIST SPACING CONTROLS
  1696. % Controls the amount of EXTRA spacing
  1697. % above and below \trivlist
  1698. % Both \list and IED lists override this.
  1699. % However, \trivlist will use this as will most
  1700. % things built from \trivlist like the \center
  1701. % environment.
  1702. \topsep 0.5\baselineskip
  1703. % Controls the additional spacing around lists preceded
  1704. % or followed by blank lines. the IEEE does not increase
  1705. % spacing before or after paragraphs so it is set to zero.
  1706. % \z@ is the same as zero, but faster.
  1707. \partopsep \z@
  1708. % Controls the spacing between paragraphs in lists.
  1709. % The IEEE does not increase spacing before or after paragraphs
  1710. % so this is also zero.
  1711. % With IEEEtran.cls, global changes to
  1712. % this value DO affect lists (but not IED lists).
  1713. \parsep \z@
  1714. % Controls the extra spacing between list items.
  1715. % The IEEE does not put extra spacing between items.
  1716. % With IEEEtran.cls, global changes to this value DO affect
  1717. % lists (but not IED lists).
  1718. \itemsep \z@
  1719. % \itemindent is the amount to indent the FIRST line of a list
  1720. % item. It is auto set to zero within the \list environment. To alter
  1721. % it, you have to do so when you call the \list.
  1722. % However, the IEEE uses this for the theorem environment
  1723. % There is an alternative value for this near \leftmargini below
  1724. \itemindent -1em
  1725. % \leftmargin, the spacing from the left margin of the main text to
  1726. % the left of the main body of a list item is set by \list.
  1727. % Hence this statement does nothing for lists.
  1728. % But, quote and verse do use it for indention.
  1729. \leftmargin 2em
  1730. % we retain this stuff from the older IEEEtran.cls so that \list
  1731. % will work the same way as before. However, itemize, enumerate and
  1732. % description (IED) could care less about what these are as they
  1733. % all are overridden.
  1734. \leftmargini 2em
  1735. %\itemindent 2em % Alternative values: sometimes used.
  1736. %\leftmargini 0em
  1737. \leftmarginii 1em
  1738. \leftmarginiii 1.5em
  1739. \leftmarginiv 1.5em
  1740. \leftmarginv 1.0em
  1741. \leftmarginvi 1.0em
  1742. \labelsep 0.5em
  1743. \labelwidth \z@
  1744. % The old IEEEtran.cls behavior of \list is retained.
  1745. % However, the new V1.3 IED list environments override all the
  1746. % @list stuff (\@listX is called within \list for the
  1747. % appropriate level just before the user's list_decl is called).
  1748. % \topsep is now 2pt as the IEEE puts a little extra space around
  1749. % lists - used by those non-IED macros that depend on \list.
  1750. % Note that \parsep and \itemsep are not redefined as in
  1751. % the sizexx.clo \@listX (which article.cls uses) so global changes
  1752. % of these values DO affect \list
  1753. %
  1754. \def\@listi{\leftmargin\leftmargini \topsep 2pt plus 1pt minus 1pt}
  1755. \let\@listI\@listi
  1756. \def\@listii{\leftmargin\leftmarginii\labelwidth\leftmarginii%
  1757. \advance\labelwidth-\labelsep \topsep 2pt}
  1758. \def\@listiii{\leftmargin\leftmarginiii\labelwidth\leftmarginiii%
  1759. \advance\labelwidth-\labelsep \topsep 2pt}
  1760. \def\@listiv{\leftmargin\leftmarginiv\labelwidth\leftmarginiv%
  1761. \advance\labelwidth-\labelsep \topsep 2pt}
  1762. \def\@listv{\leftmargin\leftmarginv\labelwidth\leftmarginv%
  1763. \advance\labelwidth-\labelsep \topsep 2pt}
  1764. \def\@listvi{\leftmargin\leftmarginvi\labelwidth\leftmarginvi%
  1765. \advance\labelwidth-\labelsep \topsep 2pt}
  1766. % The IEEE uses 5) not 5.
  1767. \def\labelenumi{\theenumi)} \def\theenumi{\arabic{enumi}}
  1768. % The IEEE uses a) not (a)
  1769. \def\labelenumii{\theenumii)} \def\theenumii{\alph{enumii}}
  1770. % The IEEE uses iii) not iii.
  1771. \def\labelenumiii{\theenumiii)} \def\theenumiii{\roman{enumiii}}
  1772. % The IEEE uses A) not A.
  1773. \def\labelenumiv{\theenumiv)} \def\theenumiv{\Alph{enumiv}}
  1774. % exactly the same as in article.cls
  1775. \def\p@enumii{\theenumi}
  1776. \def\p@enumiii{\theenumi(\theenumii)}
  1777. \def\p@enumiv{\p@enumiii\theenumiii}
  1778. % itemized list label styles
  1779. \def\labelitemi{$\scriptstyle\bullet$}
  1780. \def\labelitemii{\textbf{--}}
  1781. \def\labelitemiii{$\ast$}
  1782. \def\labelitemiv{$\cdot$}
  1783. % **** V1.3 ENHANCEMENTS ****
  1784. % Itemize, Enumerate and Description (IED) List Controls
  1785. % ***************************
  1786. %
  1787. %
  1788. % The IEEE seems to use at least two different values by
  1789. % which ITEMIZED list labels are indented to the right
  1790. % For The Journal of Lightwave Technology (JLT) and The Journal
  1791. % on Selected Areas in Communications (JSAC), they tend to use
  1792. % an indention equal to \parindent. For Transactions on Communications
  1793. % they tend to indent ITEMIZED lists a little more--- 1.3\parindent.
  1794. % We'll provide both values here for you so that you can choose
  1795. % which one you like in your document using a command such as:
  1796. % setlength{\IEEEilabelindent}{\IEEEilabelindentB}
  1797. \newdimen\IEEEilabelindentA
  1798. \IEEEilabelindentA \parindent
  1799. \newdimen\IEEEilabelindentB
  1800. \IEEEilabelindentB 1.3\parindent
  1801. % However, we'll default to using \parindent
  1802. % which makes more sense to me
  1803. \newdimen\IEEEilabelindent
  1804. \IEEEilabelindent \IEEEilabelindentA
  1805. % This controls the default amount the enumerated list labels
  1806. % are indented to the right.
  1807. % Normally, this is the same as the paragraph indention
  1808. \newdimen\IEEEelabelindent
  1809. \IEEEelabelindent \parindent
  1810. % This controls the default amount the description list labels
  1811. % are indented to the right.
  1812. % Normally, this is the same as the paragraph indention
  1813. \newdimen\IEEEdlabelindent
  1814. \IEEEdlabelindent \parindent
  1815. % This is the value actually used within the IED lists.
  1816. % The IED environments automatically set its value to
  1817. % one of the three values above, so global changes do
  1818. % not have any effect
  1819. \newdimen\IEEElabelindent
  1820. \IEEElabelindent \parindent
  1821. % The actual amount labels will be indented is
  1822. % \IEEElabelindent multiplied by the factor below
  1823. % corresponding to the level of nesting depth
  1824. % This provides a means by which the user can
  1825. % alter the effective \IEEElabelindent for deeper
  1826. % levels
  1827. % There may not be such a thing as correct "standard IEEE"
  1828. % values. What the IEEE actually does may depend on the specific
  1829. % circumstances.
  1830. % The first list level almost always has full indention.
  1831. % The second levels I've seen have only 75% of the normal indentation
  1832. % Three level or greater nestings are very rare. I am guessing
  1833. % that they don't use any indentation.
  1834. \def\IEEElabelindentfactori{1.0} % almost always one
  1835. \def\IEEElabelindentfactorii{0.75} % 0.0 or 1.0 may be used in some cases
  1836. \def\IEEElabelindentfactoriii{0.0} % 0.75? 0.5? 0.0?
  1837. \def\IEEElabelindentfactoriv{0.0}
  1838. \def\IEEElabelindentfactorv{0.0}
  1839. \def\IEEElabelindentfactorvi{0.0}
  1840. % value actually used within IED lists, it is auto
  1841. % set to one of the 6 values above
  1842. % global changes here have no effect
  1843. \def\IEEElabelindentfactor{1.0}
  1844. % This controls the default spacing between the end of the IED
  1845. % list labels and the list text, when normal text is used for
  1846. % the labels.
  1847. % compsoc uses a larger value here, but we'll set that later
  1848. % in the class so that this code block area can be extracted
  1849. % as-is for IEEEtrantools.sty
  1850. \newdimen\IEEEiednormlabelsep
  1851. \IEEEiednormlabelsep 0.6em
  1852. % This controls the default spacing between the end of the IED
  1853. % list labels and the list text, when math symbols are used for
  1854. % the labels (nomenclature lists). The IEEE usually increases the
  1855. % spacing in these cases
  1856. \newdimen\IEEEiedmathlabelsep
  1857. \IEEEiedmathlabelsep 1.2em
  1858. % This controls the extra vertical separation put above and
  1859. % below each IED list. the IEEE usually puts a little extra spacing
  1860. % around each list. However, this spacing is barely noticeable.
  1861. % compsoc uses a larger value here, but we'll set that later
  1862. % in the class so that this code block area can be extracted
  1863. % as-is for IEEEtrantools.sty
  1864. \newskip\IEEEiedtopsep
  1865. \IEEEiedtopsep 2pt plus 1pt minus 1pt
  1866. % This command is executed within each IED list environment
  1867. % at the beginning of the list. You can use this to set the
  1868. % parameters for some/all your IED list(s) without disturbing
  1869. % global parameters that affect things other than lists.
  1870. % i.e., renewcommand{\IEEEiedlistdecl}{\setlength{\labelsep}{5em}}
  1871. % will alter the \labelsep for the next list(s) until
  1872. % \IEEEiedlistdecl is redefined.
  1873. \def\IEEEiedlistdecl{\relax}
  1874. % This command provides an easy way to set \leftmargin based
  1875. % on the \labelwidth, \labelsep and the argument \IEEElabelindent
  1876. % Usage: \IEEEcalcleftmargin{width-to-indent-the-label}
  1877. % output is in the \leftmargin variable, i.e., effectively:
  1878. % \leftmargin = argument + \labelwidth + \labelsep
  1879. % Note controlled spacing here, shield end of lines with %
  1880. \def\IEEEcalcleftmargin#1{\setlength{\leftmargin}{#1}%
  1881. \addtolength{\leftmargin}{\labelwidth}%
  1882. \addtolength{\leftmargin}{\labelsep}}
  1883. % This command provides an easy way to set \labelwidth to the
  1884. % width of the given text. It is the same as
  1885. % \settowidth{\labelwidth}{label-text}
  1886. % and useful as a shorter alternative.
  1887. % Typically used to set \labelwidth to be the width
  1888. % of the longest label in the list
  1889. \def\IEEEsetlabelwidth#1{\settowidth{\labelwidth}{#1}}
  1890. % When this command is executed, IED lists will use the
  1891. % IEEEiedmathlabelsep label separation rather than the normal
  1892. % spacing. To have an effect, this command must be executed via
  1893. % the \IEEEiedlistdecl or within the option of the IED list
  1894. % environments.
  1895. \def\IEEEusemathlabelsep{\setlength{\labelsep}{\IEEEiedmathlabelsep}}
  1896. % A flag which controls whether the IED lists automatically
  1897. % calculate \leftmargin from \IEEElabelindent, \labelwidth and \labelsep
  1898. % Useful if you want to specify your own \leftmargin
  1899. % This flag must be set (\IEEEnocalcleftmargintrue or \IEEEnocalcleftmarginfalse)
  1900. % via the \IEEEiedlistdecl or within the option of the IED list
  1901. % environments to have an effect.
  1902. \newif\ifIEEEnocalcleftmargin
  1903. \IEEEnocalcleftmarginfalse
  1904. % A flag which controls whether \IEEElabelindent is multiplied by
  1905. % the \IEEElabelindentfactor for each list level.
  1906. % This flag must be set via the \IEEEiedlistdecl or within the option
  1907. % of the IED list environments to have an effect.
  1908. \newif\ifIEEEnolabelindentfactor
  1909. \IEEEnolabelindentfactorfalse
  1910. % internal variable to indicate type of IED label
  1911. % justification
  1912. % 0 - left; 1 - center; 2 - right
  1913. \def\@IEEEiedjustify{0}
  1914. % commands to allow the user to control IED
  1915. % label justifications. Use these commands within
  1916. % the IED environment option or in the \IEEEiedlistdecl
  1917. % Note that changing the normal list justifications
  1918. % is nonstandard and the IEEE may not like it if you do so!
  1919. % I include these commands as they may be helpful to
  1920. % those who are using these enhanced list controls for
  1921. % other non-IEEE related LaTeX work.
  1922. % itemize and enumerate automatically default to right
  1923. % justification, description defaults to left.
  1924. \def\IEEEiedlabeljustifyl{\def\@IEEEiedjustify{0}}%left
  1925. \def\IEEEiedlabeljustifyc{\def\@IEEEiedjustify{1}}%center
  1926. \def\IEEEiedlabeljustifyr{\def\@IEEEiedjustify{2}}%right
  1927. % commands to save to and restore from the list parameter copies
  1928. % this allows us to set all the list parameters within
  1929. % the list_decl and prevent \list (and its \@list)
  1930. % from overriding any of our parameters
  1931. % V1.6 use \edefs instead of dimen's to conserve dimen registers
  1932. % Note controlled spacing here, shield end of lines with %
  1933. \def\@IEEEsavelistparams{\edef\@IEEEiedtopsep{\the\topsep}%
  1934. \edef\@IEEEiedlabelwidth{\the\labelwidth}%
  1935. \edef\@IEEEiedlabelsep{\the\labelsep}%
  1936. \edef\@IEEEiedleftmargin{\the\leftmargin}%
  1937. \edef\@IEEEiedpartopsep{\the\partopsep}%
  1938. \edef\@IEEEiedparsep{\the\parsep}%
  1939. \edef\@IEEEieditemsep{\the\itemsep}%
  1940. \edef\@IEEEiedrightmargin{\the\rightmargin}%
  1941. \edef\@IEEEiedlistparindent{\the\listparindent}%
  1942. \edef\@IEEEieditemindent{\the\itemindent}}
  1943. % Note controlled spacing here
  1944. \def\@IEEErestorelistparams{\topsep\@IEEEiedtopsep\relax%
  1945. \labelwidth\@IEEEiedlabelwidth\relax%
  1946. \labelsep\@IEEEiedlabelsep\relax%
  1947. \leftmargin\@IEEEiedleftmargin\relax%
  1948. \partopsep\@IEEEiedpartopsep\relax%
  1949. \parsep\@IEEEiedparsep\relax%
  1950. \itemsep\@IEEEieditemsep\relax%
  1951. \rightmargin\@IEEEiedrightmargin\relax%
  1952. \listparindent\@IEEEiedlistparindent\relax%
  1953. \itemindent\@IEEEieditemindent\relax}
  1954. % v1.6b provide original LaTeX IED list environments
  1955. % note that latex.ltx defines \itemize and \enumerate, but not \description
  1956. % which must be created by the base classes
  1957. % save original LaTeX itemize and enumerate
  1958. \let\LaTeXitemize\itemize
  1959. \let\endLaTeXitemize\enditemize
  1960. \let\LaTeXenumerate\enumerate
  1961. \let\endLaTeXenumerate\endenumerate
  1962. % provide original LaTeX description environment from article.cls
  1963. \newenvironment{LaTeXdescription}
  1964. {\list{}{\labelwidth\z@ \itemindent-\leftmargin
  1965. \let\makelabel\descriptionlabel}}
  1966. {\endlist}
  1967. \newcommand*\descriptionlabel[1]{\hspace\labelsep
  1968. \normalfont\bfseries #1}
  1969. % override LaTeX's default IED lists
  1970. \def\itemize{\@IEEEitemize}
  1971. \def\enditemize{\@endIEEEitemize}
  1972. \def\enumerate{\@IEEEenumerate}
  1973. \def\endenumerate{\@endIEEEenumerate}
  1974. \def\description{\@IEEEdescription}
  1975. \def\enddescription{\@endIEEEdescription}
  1976. % provide the user with aliases - may help those using packages that
  1977. % override itemize, enumerate, or description
  1978. \def\IEEEitemize{\@IEEEitemize}
  1979. \def\endIEEEitemize{\@endIEEEitemize}
  1980. \def\IEEEenumerate{\@IEEEenumerate}
  1981. \def\endIEEEenumerate{\@endIEEEenumerate}
  1982. \def\IEEEdescription{\@IEEEdescription}
  1983. \def\endIEEEdescription{\@endIEEEdescription}
  1984. % V1.6 we want to keep the IEEEtran IED list definitions as our own internal
  1985. % commands so they are protected against redefinition
  1986. \def\@IEEEitemize{\@ifnextchar[{\@@IEEEitemize}{\@@IEEEitemize[\relax]}}
  1987. \def\@IEEEenumerate{\@ifnextchar[{\@@IEEEenumerate}{\@@IEEEenumerate[\relax]}}
  1988. \def\@IEEEdescription{\@ifnextchar[{\@@IEEEdescription}{\@@IEEEdescription[\relax]}}
  1989. \def\@endIEEEitemize{\endlist}
  1990. \def\@endIEEEenumerate{\endlist}
  1991. \def\@endIEEEdescription{\endlist}
  1992. % DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS
  1993. % AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS
  1994. % IEEEtran itemized list MDS 1/2001
  1995. % Note controlled spacing here, shield end of lines with %
  1996. \def\@@IEEEitemize[#1]{%
  1997. \ifnum\@itemdepth>3\relax\@toodeep\else%
  1998. \ifnum\@listdepth>5\relax\@toodeep\else%
  1999. \advance\@itemdepth\@ne%
  2000. \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
  2001. % get the IEEElabelindentfactor for this level
  2002. \advance\@listdepth\@ne% we need to know what the level WILL be
  2003. \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
  2004. \advance\@listdepth-\@ne% undo our increment
  2005. \def\@IEEEiedjustify{2}% right justified labels are default
  2006. % set other defaults
  2007. \IEEEnocalcleftmarginfalse%
  2008. \IEEEnolabelindentfactorfalse%
  2009. \topsep\IEEEiedtopsep%
  2010. \IEEElabelindent\IEEEilabelindent%
  2011. \labelsep\IEEEiednormlabelsep%
  2012. \partopsep 0ex%
  2013. \parsep 0ex%
  2014. \itemsep 0ex%
  2015. \rightmargin 0em%
  2016. \listparindent 0em%
  2017. \itemindent 0em%
  2018. % calculate the label width
  2019. % the user can override this later if
  2020. % they specified a \labelwidth
  2021. \settowidth{\labelwidth}{\csname labelitem\romannumeral\the\@itemdepth\endcsname}%
  2022. \@IEEEsavelistparams% save our list parameters
  2023. \list{\csname\@itemitem\endcsname}{%
  2024. \@IEEErestorelistparams% override any list{} changes
  2025. % to our globals
  2026. \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel
  2027. \IEEEiedlistdecl% let user alter parameters
  2028. #1\relax%
  2029. % If the user has requested not to use the
  2030. % IEEElabelindent factor, don't revise \IEEElabelindent
  2031. \ifIEEEnolabelindentfactor\relax%
  2032. \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent%
  2033. \fi%
  2034. % Unless the user has requested otherwise,
  2035. % calculate our left margin based
  2036. % on \IEEElabelindent, \labelwidth and
  2037. % \labelsep
  2038. \ifIEEEnocalcleftmargin\relax%
  2039. \else\IEEEcalcleftmargin{\IEEElabelindent}%
  2040. \fi}\fi\fi}%
  2041. % DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS
  2042. % AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS
  2043. % IEEEtran enumerate list MDS 1/2001
  2044. % Note controlled spacing here, shield end of lines with %
  2045. \def\@@IEEEenumerate[#1]{%
  2046. \ifnum\@enumdepth>3\relax\@toodeep\else%
  2047. \ifnum\@listdepth>5\relax\@toodeep\else%
  2048. \advance\@enumdepth\@ne%
  2049. \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
  2050. % get the IEEElabelindentfactor for this level
  2051. \advance\@listdepth\@ne% we need to know what the level WILL be
  2052. \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
  2053. \advance\@listdepth-\@ne% undo our increment
  2054. \def\@IEEEiedjustify{2}% right justified labels are default
  2055. % set other defaults
  2056. \IEEEnocalcleftmarginfalse%
  2057. \IEEEnolabelindentfactorfalse%
  2058. \topsep\IEEEiedtopsep%
  2059. \IEEElabelindent\IEEEelabelindent%
  2060. \labelsep\IEEEiednormlabelsep%
  2061. \partopsep 0ex%
  2062. \parsep 0ex%
  2063. \itemsep 0ex%
  2064. \rightmargin 0em%
  2065. \listparindent 0em%
  2066. \itemindent 0em%
  2067. % calculate the label width
  2068. % We'll set it to the width suitable for all labels using
  2069. % normalfont 1) to 9)
  2070. % The user can override this later
  2071. \settowidth{\labelwidth}{9)}%
  2072. \@IEEEsavelistparams% save our list parameters
  2073. \list{\csname label\@enumctr\endcsname}{\usecounter{\@enumctr}%
  2074. \@IEEErestorelistparams% override any list{} changes
  2075. % to our globals
  2076. \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel
  2077. \IEEEiedlistdecl% let user alter parameters
  2078. #1\relax%
  2079. % If the user has requested not to use the
  2080. % IEEElabelindent factor, don't revise \IEEElabelindent
  2081. \ifIEEEnolabelindentfactor\relax%
  2082. \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent%
  2083. \fi%
  2084. % Unless the user has requested otherwise,
  2085. % calculate our left margin based
  2086. % on \IEEElabelindent, \labelwidth and
  2087. % \labelsep
  2088. \ifIEEEnocalcleftmargin\relax%
  2089. \else\IEEEcalcleftmargin{\IEEElabelindent}%
  2090. \fi}\fi\fi}%
  2091. % DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS
  2092. % AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS
  2093. % IEEEtran description list MDS 1/2001
  2094. % Note controlled spacing here, shield end of lines with %
  2095. \def\@@IEEEdescription[#1]{%
  2096. \ifnum\@listdepth>5\relax\@toodeep\else%
  2097. % get the IEEElabelindentfactor for this level
  2098. \advance\@listdepth\@ne% we need to know what the level WILL be
  2099. \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
  2100. \advance\@listdepth-\@ne% undo our increment
  2101. \def\@IEEEiedjustify{0}% left justified labels are default
  2102. % set other defaults
  2103. \IEEEnocalcleftmarginfalse%
  2104. \IEEEnolabelindentfactorfalse%
  2105. \topsep\IEEEiedtopsep%
  2106. \IEEElabelindent\IEEEdlabelindent%
  2107. % assume normal labelsep
  2108. \labelsep\IEEEiednormlabelsep%
  2109. \partopsep 0ex%
  2110. \parsep 0ex%
  2111. \itemsep 0ex%
  2112. \rightmargin 0em%
  2113. \listparindent 0em%
  2114. \itemindent 0em%
  2115. % Bogus label width in case the user forgets
  2116. % to set it.
  2117. % TIP: If you want to see what a variable's width is you
  2118. % can use the TeX command \showthe\width-variable to
  2119. % display it on the screen during compilation
  2120. % (This might be helpful to know when you need to find out
  2121. % which label is the widest)
  2122. \settowidth{\labelwidth}{Hello}%
  2123. \@IEEEsavelistparams% save our list parameters
  2124. \list{}{\@IEEErestorelistparams% override any list{} changes
  2125. % to our globals
  2126. \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel
  2127. \IEEEiedlistdecl% let user alter parameters
  2128. #1\relax%
  2129. % If the user has requested not to use the
  2130. % labelindent factor, don't revise \IEEElabelindent
  2131. \ifIEEEnolabelindentfactor\relax%
  2132. \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent%
  2133. \fi%
  2134. % Unless the user has requested otherwise,
  2135. % calculate our left margin based
  2136. % on \IEEElabelindent, \labelwidth and
  2137. % \labelsep
  2138. \ifIEEEnocalcleftmargin\relax%
  2139. \else\IEEEcalcleftmargin{\IEEElabelindent}\relax%
  2140. \fi}\fi}
  2141. % v1.6b we use one makelabel that does justification as needed.
  2142. \def\@IEEEiedmakelabel#1{\relax\if\@IEEEiedjustify 0\relax
  2143. \makebox[\labelwidth][l]{\normalfont #1}\else
  2144. \if\@IEEEiedjustify 1\relax
  2145. \makebox[\labelwidth][c]{\normalfont #1}\else
  2146. \makebox[\labelwidth][r]{\normalfont #1}\fi\fi}
  2147. % compsoc uses a larger value for the normal labelsep
  2148. % and also extra spacing above and below each list
  2149. \ifCLASSOPTIONcompsoc
  2150. \IEEEiednormlabelsep 1.2em
  2151. \IEEEiedtopsep 6pt plus 3pt minus 3pt
  2152. \fi
  2153. % VERSE and QUOTE
  2154. % V1.7 define environments with newenvironment
  2155. \newenvironment{verse}{\let\\=\@centercr
  2156. \list{}{\itemsep\z@ \itemindent -1.5em \listparindent \itemindent
  2157. \rightmargin\leftmargin\advance\leftmargin 1.5em}\item\relax}
  2158. {\endlist}
  2159. \newenvironment{quotation}{\list{}{\listparindent 1.5em \itemindent\listparindent
  2160. \rightmargin\leftmargin \parsep 0pt plus 1pt}\item\relax}
  2161. {\endlist}
  2162. \newenvironment{quote}{\list{}{\rightmargin\leftmargin}\item\relax}
  2163. {\endlist}
  2164. % \titlepage
  2165. % provided only for backward compatibility. \maketitle is the correct
  2166. % way to create the title page.
  2167. \def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  2168. \else \newpage \fi \thispagestyle{empty}\c@page\z@}
  2169. \def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi}
  2170. % standard values from article.cls
  2171. \arraycolsep 5pt
  2172. \arrayrulewidth .4pt
  2173. \doublerulesep 2pt
  2174. \tabcolsep 6pt
  2175. \tabbingsep 0.5em
  2176. %% FOOTNOTES
  2177. %
  2178. %\skip\footins 10pt plus 4pt minus 2pt
  2179. % V1.6 respond to changes in font size
  2180. % space added above the footnotes (if present)
  2181. \skip\footins 0.9\baselineskip plus 0.4\baselineskip minus 0.2\baselineskip
  2182. % V1.6, we need to make \footnotesep responsive to changes
  2183. % in \baselineskip or strange spacings will result when in
  2184. % draft mode. Here is a little LaTeX secret - \footnotesep
  2185. % determines the height of an invisible strut that is placed
  2186. % *above* the baseline of footnotes after the first. Since
  2187. % LaTeX considers the space for characters to be 0.7\baselineskip
  2188. % above the baseline and 0.3\baselineskip below it, we need to
  2189. % use 0.7\baselineskip as a \footnotesep to maintain equal spacing
  2190. % between all the lines of the footnotes. The IEEE often uses a tad
  2191. % more, so use 0.8\baselineskip. This slightly larger value also helps
  2192. % the text to clear the footnote marks. Note that \thanks in IEEEtran
  2193. % uses its own value of \footnotesep which is set in \maketitle.
  2194. {\footnotesize
  2195. \global\footnotesep 0.8\baselineskip}
  2196. \skip\@mpfootins = \skip\footins
  2197. \fboxsep = 3pt
  2198. \fboxrule = .4pt
  2199. % V1.6 use 1em, then use LaTeX2e's \@makefnmark
  2200. % Note that the IEEE normally *left* aligns the footnote marks, so we don't need
  2201. % box resizing tricks here.
  2202. \long\def\@makefntext#1{\parindent 1em\indent\hbox{\@makefnmark}#1}% V1.6 use 1em
  2203. % V1.7 compsoc does not use superscipts for footnote marks
  2204. \ifCLASSOPTIONcompsoc
  2205. \def\@IEEEcompsocmakefnmark{\hbox{\normalfont\@thefnmark.\ }}
  2206. \long\def\@makefntext#1{\parindent 1em\indent\hbox{\@IEEEcompsocmakefnmark}#1}
  2207. \fi
  2208. % The IEEE does not use footnote rules
  2209. \def\footnoterule{}
  2210. % V1.7 for compsoc, the IEEE uses a footnote rule only for \thanks. We devise a "one-shot"
  2211. % system to implement this.
  2212. \newif\if@IEEEenableoneshotfootnoterule
  2213. \@IEEEenableoneshotfootnoterulefalse
  2214. \ifCLASSOPTIONcompsoc
  2215. \def\footnoterule{\relax\if@IEEEenableoneshotfootnoterule
  2216. \kern-5pt
  2217. \hbox to \columnwidth{\hfill\vrule width 0.5\columnwidth height 0.4pt\hfill}
  2218. \kern4.6pt
  2219. \global\@IEEEenableoneshotfootnoterulefalse
  2220. \else
  2221. \relax
  2222. \fi}
  2223. \fi
  2224. % V1.6 do not allow LaTeX to break a footnote across multiple pages
  2225. \interfootnotelinepenalty=10000
  2226. % V1.6 discourage breaks within equations
  2227. % Note that amsmath normally sets this to 10000,
  2228. % but LaTeX2e normally uses 100.
  2229. \interdisplaylinepenalty=2500
  2230. % default allows section depth up to /paragraph
  2231. \setcounter{secnumdepth}{4}
  2232. % technotes do not allow /paragraph
  2233. \ifCLASSOPTIONtechnote
  2234. \setcounter{secnumdepth}{3}
  2235. \fi
  2236. % neither do compsoc conferences
  2237. \@IEEEcompsocconfonly{\setcounter{secnumdepth}{3}}
  2238. \newcounter{section}
  2239. \newcounter{subsection}[section]
  2240. \newcounter{subsubsection}[subsection]
  2241. \newcounter{paragraph}[subsubsection]
  2242. % used only by IEEEtran's IEEEeqnarray as other packages may
  2243. % have their own, different, implementations
  2244. \newcounter{IEEEsubequation}[equation]
  2245. % as shown when called by user from \ref, \label and in table of contents
  2246. \def\theequation{\arabic{equation}} % 1
  2247. \def\theIEEEsubequation{\theequation\alph{IEEEsubequation}} % 1a (used only by IEEEtran's IEEEeqnarray)
  2248. \ifCLASSOPTIONcompsoc
  2249. % compsoc is all arabic
  2250. \def\thesection{\arabic{section}}
  2251. \def\thesubsection{\thesection.\arabic{subsection}}
  2252. \def\thesubsubsection{\thesubsection.\arabic{subsubsection}}
  2253. \def\theparagraph{\thesubsubsection.\arabic{paragraph}}
  2254. \else
  2255. \def\thesection{\Roman{section}} % I
  2256. % V1.7, \mbox prevents breaks around -
  2257. \def\thesubsection{\mbox{\thesection-\Alph{subsection}}} % I-A
  2258. % V1.7 use I-A1 format used by the IEEE rather than I-A.1
  2259. \def\thesubsubsection{\thesubsection\arabic{subsubsection}} % I-A1
  2260. \def\theparagraph{\thesubsubsection\alph{paragraph}} % I-A1a
  2261. \fi
  2262. % From Heiko Oberdiek. Because of the \mbox in \thesubsection, we need to
  2263. % tell hyperref to disable the \mbox command when making PDF bookmarks.
  2264. % This done already with hyperref.sty version 6.74o and later, but
  2265. % it will not hurt to do it here again for users of older versions.
  2266. \@ifundefined{pdfstringdefPreHook}{\let\pdfstringdefPreHook\@empty}{}%
  2267. \g@addto@macro\pdfstringdefPreHook{\let\mbox\relax}
  2268. % Main text forms (how shown in main text headings)
  2269. % V1.6, using \thesection in \thesectiondis allows changes
  2270. % in the former to automatically appear in the latter
  2271. \ifCLASSOPTIONcompsoc
  2272. \ifCLASSOPTIONconference% compsoc conference
  2273. \def\thesectiondis{\thesection.}
  2274. \def\thesubsectiondis{\thesectiondis\arabic{subsection}.}
  2275. \def\thesubsubsectiondis{\thesubsectiondis\arabic{subsubsection}.}
  2276. \def\theparagraphdis{\thesubsubsectiondis\arabic{paragraph}.}
  2277. \else% compsoc not conferencs
  2278. \def\thesectiondis{\thesection}
  2279. \def\thesubsectiondis{\thesectiondis.\arabic{subsection}}
  2280. \def\thesubsubsectiondis{\thesubsectiondis.\arabic{subsubsection}}
  2281. \def\theparagraphdis{\thesubsubsectiondis.\arabic{paragraph}}
  2282. \fi
  2283. \else% not compsoc
  2284. \def\thesectiondis{\thesection.} % I.
  2285. \def\thesubsectiondis{\Alph{subsection}.} % B.
  2286. \def\thesubsubsectiondis{\arabic{subsubsection})} % 3)
  2287. \def\theparagraphdis{\alph{paragraph})} % d)
  2288. \fi
  2289. % just like LaTeX2e's \@eqnnum
  2290. \def\theequationdis{{\normalfont \normalcolor (\theequation)}}% (1)
  2291. % IEEEsubequation used only by IEEEtran's IEEEeqnarray
  2292. \def\theIEEEsubequationdis{{\normalfont \normalcolor (\theIEEEsubequation)}}% (1a)
  2293. % redirect LaTeX2e's equation number display and all that depend on
  2294. % it, through IEEEtran's \theequationdis
  2295. \def\@eqnnum{\theequationdis}
  2296. % V1.7 provide string macros as article.cls does
  2297. \def\contentsname{Contents}
  2298. \def\listfigurename{List of Figures}
  2299. \def\listtablename{List of Tables}
  2300. \def\refname{References}
  2301. \def\indexname{Index}
  2302. \def\figurename{Fig.}
  2303. \def\tablename{TABLE}
  2304. \@IEEEcompsocconfonly{\def\figurename{Figure}}
  2305. \def\partname{Part}
  2306. \def\appendixname{Appendix}
  2307. \def\abstractname{Abstract}
  2308. % IEEE specific names
  2309. \def\IEEEkeywordsname{Index Terms}
  2310. \def\IEEEproofname{Proof}
  2311. % LIST OF FIGURES AND TABLES AND TABLE OF CONTENTS
  2312. %
  2313. \def\@pnumwidth{1.55em}
  2314. \def\@tocrmarg{2.55em}
  2315. \def\@dotsep{4.5}
  2316. \setcounter{tocdepth}{3}
  2317. % adjusted some spacings here so that section numbers will not easily
  2318. % collide with the section titles.
  2319. % VIII; VIII-A; and VIII-A.1 are usually the worst offenders.
  2320. % MDS 1/2001
  2321. \def\tableofcontents{\section*{\contentsname}\@starttoc{toc}}
  2322. \def\l@section#1#2{\addpenalty{\@secpenalty}\addvspace{1.0em plus 1pt}%
  2323. \@tempdima 2.75em \begingroup \parindent \z@ \rightskip \@pnumwidth%
  2324. \parfillskip-\@pnumwidth {\bfseries\leavevmode #1}\hfil\hbox to\@pnumwidth{\hss #2}\par%
  2325. \endgroup}
  2326. % argument format #1:level, #2:labelindent,#3:labelsep
  2327. \def\l@subsection{\@dottedtocline{2}{2.75em}{3.75em}}
  2328. \def\l@subsubsection{\@dottedtocline{3}{6.5em}{4.5em}}
  2329. % must provide \l@ defs for ALL sublevels EVEN if tocdepth
  2330. % is such as they will not appear in the table of contents
  2331. % these defs are how TOC knows what level these things are!
  2332. \def\l@paragraph{\@dottedtocline{4}{6.5em}{5.5em}}
  2333. \def\l@subparagraph{\@dottedtocline{5}{6.5em}{6.5em}}
  2334. \def\listoffigures{\section*{\listfigurename}\@starttoc{lof}}
  2335. \def\l@figure{\@dottedtocline{1}{0em}{2.75em}}
  2336. \def\listoftables{\section*{\listtablename}\@starttoc{lot}}
  2337. \let\l@table\l@figure
  2338. % Definitions for floats
  2339. %
  2340. % Normal Floats
  2341. % V1.8 floatsep et al. revised down by 0.15\baselineskip
  2342. % to account for the sideeffects of \topskip compensation
  2343. \floatsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
  2344. \textfloatsep 1.55\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip
  2345. \@fptop 0pt plus 1fil
  2346. \@fpsep 0.75\baselineskip plus 2fil
  2347. \@fpbot 0pt plus 1fil
  2348. \def\topfraction{0.9}
  2349. \def\bottomfraction{0.4}
  2350. \def\floatpagefraction{0.8}
  2351. % V1.7, let top floats approach 90% of page
  2352. \def\textfraction{0.1}
  2353. % Double Column Floats
  2354. \dblfloatsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
  2355. \dbltextfloatsep 1.55\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip
  2356. % Note that it would be nice if the rubber here actually worked in LaTeX2e.
  2357. % There is a long standing limitation in LaTeX, first discovered (to the best
  2358. % of my knowledge) by Alan Jeffrey in 1992. LaTeX ignores the stretchable
  2359. % portion of \dbltextfloatsep, and as a result, double column figures can and
  2360. % do result in an non-integer number of lines in the main text columns with
  2361. % underfull vbox errors as a consequence. A post to comp.text.tex
  2362. % by Donald Arseneau confirms that this had not yet been fixed in 1998.
  2363. % IEEEtran V1.6 will fix this problem for you in the titles, but it doesn't
  2364. % protect you from other double floats. Happy vspace'ing.
  2365. \@dblfptop 0pt plus 1fil
  2366. \@dblfpsep 0.75\baselineskip plus 2fil
  2367. \@dblfpbot 0pt plus 1fil
  2368. \def\dbltopfraction{0.8}
  2369. \def\dblfloatpagefraction{0.8}
  2370. \setcounter{dbltopnumber}{4}
  2371. \intextsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
  2372. \setcounter{topnumber}{2}
  2373. \setcounter{bottomnumber}{2}
  2374. \setcounter{totalnumber}{4}
  2375. % article class provides these, we should too.
  2376. \newlength\abovecaptionskip
  2377. \newlength\belowcaptionskip
  2378. % but only \abovecaptionskip is used above figure captions and *below* table
  2379. % captions
  2380. \setlength\abovecaptionskip{0.5\baselineskip}
  2381. % compsoc journals are a little more generous
  2382. \ifCLASSOPTIONcompsoc\ifCLASSOPTIONjournal
  2383. \setlength\abovecaptionskip{0.75\baselineskip}
  2384. \fi\fi
  2385. \setlength\belowcaptionskip{0pt}
  2386. % V1.6 create hooks in case the caption spacing ever needs to be
  2387. % overridden by a user
  2388. \def\@IEEEfigurecaptionsepspace{\vskip\abovecaptionskip\relax}%
  2389. \def\@IEEEtablecaptionsepspace{\vskip\abovecaptionskip\relax}%
  2390. % 1.6b revise caption system so that \@makecaption uses two arguments
  2391. % as with LaTeX2e. Otherwise, there will be problems when using hyperref.
  2392. \def\@IEEEtablestring{table}
  2393. % V1.8 compensate for \topskip so top of top figures align with tops of the first lines of main text
  2394. % here we calculate a space equal to the amount \topskip exceeds the main text height
  2395. % we hook in at \@floatboxreset
  2396. \def\@IEEEfiguretopskipspace{\ifdim\prevdepth=-1000pt\relax
  2397. \setlength{\@IEEEtrantmpdimenA}{1\topskip}\relax
  2398. \addtolength{\@IEEEtrantmpdimenA}{-0.7\@IEEEnormalsizeunitybaselineskip}\relax
  2399. \vspace*{\@IEEEtrantmpdimenA}\fi}
  2400. % V1.8 compensate for \topskip at the top of top tables so caption text is on main text baseline
  2401. % use a strut set on the caption baseline within \@makecaption
  2402. \def\@IEEEtabletopskipstrut{\ifdim\prevdepth=-1000pt\rule{0pt}{\topskip}\fi}
  2403. % the \ifdim\prevdepth checks are always expected to be true for IEEE style float caption ordering
  2404. % because top of figure content and top of captions in tables is the first thing on the vertical
  2405. % list of these floats
  2406. % thanks to Donald Arseneau for his 2000/11/11 post "Re: caption hacking" with info on this topic.
  2407. \ifCLASSOPTIONcompsoc
  2408. % V1.7 compsoc \@makecaption
  2409. \ifCLASSOPTIONconference% compsoc conference
  2410. \long\def\@makecaption#1#2{%
  2411. % test if is a for a figure or table
  2412. \ifx\@captype\@IEEEtablestring%
  2413. % if a table, do table caption
  2414. \footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize {#1.}\nobreakspace\scshape #2}\par\addvspace{0.5\baselineskip}\egroup%
  2415. \@IEEEtablecaptionsepspace
  2416. % if not a table, format it as a figure
  2417. \else
  2418. \@IEEEfigurecaptionsepspace
  2419. \setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace #2}%
  2420. \ifdim \wd\@tempboxa >\hsize%
  2421. % if caption is longer than a line, let it wrap around
  2422. \setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace}%
  2423. \parbox[t]{\hsize}{\normalfont\footnotesize \noindent\unhbox\@tempboxa#2}%
  2424. % if caption is shorter than a line, center
  2425. \else%
  2426. \hbox to\hsize{\normalfont\footnotesize\hfil\box\@tempboxa\hfil}%
  2427. \fi\fi}
  2428. %
  2429. \else% nonconference compsoc
  2430. \long\def\@makecaption#1#2{%
  2431. % test if is a for a figure or table
  2432. \ifx\@captype\@IEEEtablestring%
  2433. % if a table, do table caption
  2434. \footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\sffamily\footnotesize #1}\\{\normalfont\sffamily\footnotesize #2}\par\addvspace{0.5\baselineskip}\egroup%
  2435. \@IEEEtablecaptionsepspace
  2436. % if not a table, format it as a figure
  2437. \else
  2438. \@IEEEfigurecaptionsepspace
  2439. \setbox\@tempboxa\hbox{\normalfont\sffamily\footnotesize {#1.}\nobreakspace #2}%
  2440. \ifdim \wd\@tempboxa >\hsize%
  2441. % if caption is longer than a line, let it wrap around
  2442. \setbox\@tempboxa\hbox{\normalfont\sffamily\footnotesize {#1.}\nobreakspace}%
  2443. \parbox[t]{\hsize}{\normalfont\sffamily\footnotesize \noindent\unhbox\@tempboxa#2}%
  2444. % if caption is shorter than a line, left justify
  2445. \else%
  2446. \hbox to\hsize{\normalfont\sffamily\footnotesize\box\@tempboxa\hfil}%
  2447. \fi\fi}
  2448. \fi
  2449. %
  2450. \else% traditional noncompsoc \@makecaption
  2451. \long\def\@makecaption#1#2{%
  2452. % test if is a for a figure or table
  2453. \ifx\@captype\@IEEEtablestring%
  2454. % if a table, do table caption
  2455. \footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize #1}\\{\normalfont\footnotesize\scshape #2}\par\addvspace{0.5\baselineskip}\egroup%
  2456. \@IEEEtablecaptionsepspace
  2457. % if not a table, format it as a figure
  2458. \else
  2459. \@IEEEfigurecaptionsepspace
  2460. % 3/2001 use footnotesize, not small; use two nonbreaking spaces, not one
  2461. \setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace #2}%
  2462. \ifdim \wd\@tempboxa >\hsize%
  2463. % if caption is longer than a line, let it wrap around
  2464. \setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace}%
  2465. \parbox[t]{\hsize}{\normalfont\footnotesize\noindent\unhbox\@tempboxa#2}%
  2466. % if caption is shorter than a line, center if conference, left justify otherwise
  2467. \else%
  2468. \ifCLASSOPTIONconference \hbox to\hsize{\normalfont\footnotesize\hfil\box\@tempboxa\hfil}%
  2469. \else \hbox to\hsize{\normalfont\footnotesize\box\@tempboxa\hfil}%
  2470. \fi\fi\fi}
  2471. \fi
  2472. % V1.7 disable captions class option, do so in a way that retains operation of \label
  2473. % within \caption
  2474. \ifCLASSOPTIONcaptionsoff
  2475. \long\def\@makecaption#1#2{\vspace*{2em}\footnotesize\bgroup\par\addvspace{0.5\baselineskip}\centering{\footnotesize #1}\par\addvspace{0.5\baselineskip}\egroup%
  2476. \let\@IEEEtemporiglabeldefsave\label
  2477. \let\@IEEEtemplabelargsave\relax
  2478. \def\label##1{\gdef\@IEEEtemplabelargsave{##1}}%
  2479. \setbox\@tempboxa\hbox{#2}%
  2480. \let\label\@IEEEtemporiglabeldefsave
  2481. \ifx\@IEEEtemplabelargsave\relax\else\label{\@IEEEtemplabelargsave}\fi}
  2482. \fi
  2483. % V1.7 define end environments with \def not \let so as to work OK with
  2484. % preview-latex
  2485. \newcounter{figure}
  2486. \def\thefigure{\@arabic\c@figure}
  2487. \def\fps@figure{tbp}
  2488. \def\ftype@figure{1}
  2489. \def\ext@figure{lof}
  2490. \def\fnum@figure{\figurename\nobreakspace\thefigure}
  2491. % V1.8 within figures add \@IEEEfiguretopskipspace compensation to LaTeX2e's \@floatboxreset
  2492. \def\figure{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@float{figure}}
  2493. \def\endfigure{\end@float}
  2494. % V1.8 also add \@IEEEfiguretopskipspace compensation to \figure*
  2495. \@namedef{figure*}{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@dblfloat{figure}}
  2496. \@namedef{endfigure*}{\end@dblfloat}
  2497. \newcounter{table}
  2498. \ifCLASSOPTIONcompsoc
  2499. \def\thetable{\arabic{table}}
  2500. \else
  2501. \def\thetable{\@Roman\c@table}
  2502. \fi
  2503. \def\fps@table{tbp}
  2504. \def\ftype@table{2}
  2505. \def\ext@table{lot}
  2506. \def\fnum@table{\tablename\nobreakspace\thetable}
  2507. % V1.6 The IEEE uses 8pt text for tables
  2508. % within tables alter LaTeX2e's \@floatboxreset to use \footnotesize
  2509. \def\table{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@float{table}}
  2510. \def\endtable{\end@float}
  2511. % v1.6b double column tables need to default to footnotesize as well.
  2512. \@namedef{table*}{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@dblfloat{table}}
  2513. \@namedef{endtable*}{\end@dblfloat}
  2514. %% -- Command Argument Scanning Support Functions --
  2515. %% V1.8a
  2516. % usage: \@IEEEstripouterbraces*{}
  2517. % \@IEEEstripouterbraces fully expands its argument (which it then stores
  2518. % in \@IEEEstripouterbracesarg) via \edef, then removes any outer enclosing
  2519. % braces, and finally stores the result in the macro
  2520. % \@IEEEstrippedouterbraces.
  2521. %
  2522. % For example:
  2523. % \@IEEEstripouterbraces{{{{ab}c}}}
  2524. % results in:
  2525. %
  2526. % \@IEEEstripouterbracesarg ==> a macro containing {{{ab}c}}
  2527. % \@IEEEstrippedouterbraces ==> a macro containing {ab}c
  2528. %
  2529. % the *-star form,\@IEEEstripouterbraces*, does not expand the argument
  2530. % contents during processing
  2531. \def\@IEEEstripouterbraces{\@ifstar{\let\@IEEEstripouterbracesdef=\def\@@IEEEstripouterbraces}{\let\@IEEEstripouterbracesdef=\edef\@@IEEEstripouterbraces}}
  2532. \def\@@IEEEstripouterbraces#1{\@IEEEstripouterbracesdef\@IEEEstripouterbracesarg{#1}\relax
  2533. % If the macro is unchanged after being acquired as a single delimited
  2534. % argument, we know we have one sequence of tokens without any enclosing
  2535. % braces. Loop until this is true.
  2536. \loop
  2537. \expandafter\@@@IEEEstripouterbraces\@IEEEstripouterbracesarg\@IEEEgeneralsequenceDELIMITER
  2538. \ifx\@IEEEstrippedouterbraces\@IEEEstripouterbracesarg
  2539. \else
  2540. \let\@IEEEstripouterbracesarg\@IEEEstrippedouterbraces
  2541. \repeat}
  2542. \def\@@@IEEEstripouterbraces#1\@IEEEgeneralsequenceDELIMITER{\def\@IEEEstrippedouterbraces{#1}}
  2543. % usage: \@IEEEextractgroup*{}
  2544. % \@IEEEextractgroup fully expands its argument (which it then stores in
  2545. % \@IEEEextractgrouparg) via \edef and then assigns the first "brace group"
  2546. % of tokens to the macro \@IEEEextractedgroup.
  2547. % The remaining groups, if any, are stored in the macro
  2548. % \@IEEEextractedgroupremain. If the argument does not contain the requisite
  2549. % groups, the respective macros will be defined to be empty.
  2550. % There is an asymmetry in that \@IEEEextractedgroup is stripped of its first
  2551. % outer grouping while \@IEEEextractedgroupremain retains even the outer
  2552. % grouping (if present) that originally identified it as a group.
  2553. %
  2554. % For example:
  2555. % \@IEEEextractgroup{{{ab}}{c{de}}}
  2556. % results in:
  2557. %
  2558. % \@IEEEextractgrouparg ==> a macro containing {{ab}}{c{de}}
  2559. % \@IEEEextractedgroup ==> a macro containing {ab}
  2560. % \@IEEEextractedgroupremain ==> a macro containing {c{de}}
  2561. %
  2562. % The *-star form, \@IEEEextractgroup*, does not expand its argument
  2563. % contents during processing.
  2564. \def\@IEEEextractgroup{\@ifstar{\let\@IEEEextractgroupdef=\def\@@IEEEextractgroup}{\let\@IEEEextractgroupdef=\edef\@@IEEEextractgroup}}
  2565. \def\@@IEEEextractgroup#1{\@IEEEextractgroupdef\@IEEEextractgrouparg{#1}\relax
  2566. % trap the case of an empty extracted group as this would cause problems with
  2567. % \@IEEEextractgroupremain's argument acquisition
  2568. \ifx\@IEEEextractgrouparg\@empty
  2569. \def\@IEEEextractedgroup{}\relax
  2570. \def\@IEEEextractedgroupremain{}\relax
  2571. \else
  2572. % We have to use some dirty tricks here. We want to insert {} around
  2573. % whatever remains after the first group so that TeX's argument scanner
  2574. % will preserve any originally enclosing braces as well as provide an
  2575. % empty argument to acquire even if there isn't a second group.
  2576. % In this first of two dirty tricks, we put a } at the end of the structure
  2577. % we are going to extract from. The \ifnum0=`{\fi keeps TeX happy to allow
  2578. % what would otherwise be an unbalanced macro definition for
  2579. % \@@IEEEextractgroup to be acceptable to it.
  2580. \ifnum0=`{\fi\expandafter\@IEEEextractgroupremain\@IEEEextractgrouparg}\relax
  2581. \fi}
  2582. % In the second part of the dirty tricks, we insert a leading { right after
  2583. % the first group is acquired, but before the remainder is. Again, the
  2584. % \ifnum0=`}\fi keeps TeX happy during definition time, but will disappear
  2585. % during run time.
  2586. \def\@IEEEextractgroupremain#1{\def\@IEEEextractedgroup{#1}\expandafter\@@IEEEextractgroupremain\expandafter{\ifnum0=`}\fi}
  2587. \def\@@IEEEextractgroupremain#1{\def\@IEEEextractedgroupremain{#1}}
  2588. % \@IEEEextracttoken relocated at top because margin setting commands rely on it
  2589. % usage: \@IEEEextracttokengroups*{}
  2590. % \@IEEEextracttokengroups fully expands its argument (which it then stores
  2591. % in \@IEEEextracttokengroupsarg) and then assigns the first "brace group" of
  2592. % tokens (with the outermost braces removed) to the macro
  2593. % \@IEEEextractedfirstgroup.
  2594. % The meaning of the first nonbrace (but including the empty group) token
  2595. % within this first group is assigned via \let to \@IEEEextractedfirsttoken
  2596. % as well as stored in the macro \@IEEEextractedfirsttokenmacro. If a first
  2597. % nonbrace token does not exist (or is an empty group), these will be \relax
  2598. % and empty, respectively. Tokens that would otherwise be discarded during
  2599. % the acquisition of the first token in the first group are stored in
  2600. % \@IEEEextractedfirsttokensdiscarded, however their original relative brace
  2601. % nesting depths are not guaranteed to be preserved.
  2602. % The first group within this first group is stored in the macro
  2603. % \@IEEEextractedfirstfirstgroup.
  2604. % Likewise for the next group after the first: \@IEEEextractednextgroup,
  2605. % \@IEEEextractednextfirstgroup, \@IEEEextractednextgroupfirsttoken,
  2606. % \@IEEEextractednextgroupfirsttokenmacro, and
  2607. % \@IEEEextractednextfirsttokensdiscarded.
  2608. % All tokens/groups after the first group, including any enclosing braces,
  2609. % are stored in the macro \@IEEEextractedafterfirstgroupremain which will
  2610. % be empty if none exist.
  2611. %
  2612. % For example:
  2613. % \@IEEEextracttokengroups{{{ab}{cd}}{{ef}g}}
  2614. % will result in:
  2615. %
  2616. % \@IEEEextracttokengroupsarg ==> a macro containing {{ab}{cd}}{{ef}g}
  2617. % \@IEEEextractedfirstgroup ==> a macro containing {ab}{cd}
  2618. % \@IEEEextractedafterfirstgroupremain ==> a macro containing {{ef}g}
  2619. % \@IEEEextractedfirsttoken ==> the letter a
  2620. % \@IEEEextractedfirsttokenmacro ==> a macro containing a
  2621. % \@IEEEextractedfirsttokensdiscarded ==> a macro containing bcd
  2622. % \@IEEEextractedfirstfirstgroup ==> a macro containing ab
  2623. % \@IEEEextractednextgroup ==> a macro containing {ef}g
  2624. % \@IEEEextractednextfirsttoken ==> the letter e
  2625. % \@IEEEextractednextfirsttokenmacro ==> a macro containing e
  2626. % \@IEEEextractednextfirsttokensdiscarded ==> a macro containing fg
  2627. % \@IEEEextractednextfirstgroup ==> a macro containing ef
  2628. %
  2629. % If given an empty argument, \@IEEEextractedfirsttoken and
  2630. % \@IEEEextractednextfirsttoken will be set to \relax
  2631. % and all the macros will be empty.
  2632. % the *-star form, \@IEEEextracttokengroups*, does not expand its argument
  2633. % contents during processing.
  2634. %
  2635. % Depends on: \@IEEEextractgroup, \@IEEEextracttoken
  2636. \def\@IEEEextracttokengroups{\@ifstar{\let\@IEEEextracttokengroupsdef=\def\@@IEEEextracttokengroups}{\let\@IEEEextracttokengroupsdef=\edef\@@IEEEextracttokengroups}}
  2637. \def\@@IEEEextracttokengroups#1{\@IEEEextracttokengroupsdef\@IEEEextracttokengroupsarg{#1}\relax
  2638. % begin extraction, these functions are safe with empty arguments
  2639. % first group
  2640. \expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextracttokengroupsarg}\relax
  2641. \let\@IEEEextractedfirstgroup\@IEEEextractedgroup
  2642. \let\@IEEEextractedafterfirstgroupremain\@IEEEextractedgroupremain
  2643. \expandafter\@IEEEextracttoken\expandafter*\expandafter{\@IEEEextractedfirstgroup}\relax
  2644. \let\@IEEEextractedfirsttoken\@IEEEextractedtoken
  2645. \let\@IEEEextractedfirsttokenmacro\@IEEEextractedtokenmacro
  2646. \let\@IEEEextractedfirsttokensdiscarded\@IEEEextractedtokensdiscarded
  2647. % first first group
  2648. \expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractedfirstgroup}\relax
  2649. \let\@IEEEextractedfirstfirstgroup\@IEEEextractedgroup
  2650. % next group
  2651. \expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractedafterfirstgroupremain}\relax
  2652. \let\@IEEEextractednextgroup\@IEEEextractedgroup
  2653. \expandafter\@IEEEextracttoken\expandafter*\expandafter{\@IEEEextractednextgroup}\relax
  2654. \let\@IEEEextractednextfirsttoken\@IEEEextractedtoken
  2655. \let\@IEEEextractednextfirsttokenmacro\@IEEEextractedtokenmacro
  2656. \let\@IEEEextractednextfirsttokensdiscarded\@IEEEextractedtokensdiscarded
  2657. % next first group
  2658. \expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractednextgroup}\relax
  2659. \let\@IEEEextractednextfirstgroup\@IEEEextractedgroup}
  2660. %% -- End of Command Argument Scanning Support Functions --
  2661. %%
  2662. %% START OF IEEEeqnarray DEFINITIONS
  2663. %%
  2664. %% Inspired by the concepts, examples, and previous works of LaTeX
  2665. %% coders and developers such as Donald Arseneau, Fred Bartlett,
  2666. %% David Carlisle, Tony Liu, Frank Mittelbach, Piet van Oostrum,
  2667. %% Roland Winkler and Mark Wooding.
  2668. %% I don't make the claim that my work here is even near their calibre. ;)
  2669. \newif\if@IEEEeqnarrayboxnojot% flag to indicate if the environment was called as the star form
  2670. \@IEEEeqnarrayboxnojotfalse
  2671. \newif\if@advanceIEEEeqncolcnt% tracks if the environment should advance the col counter
  2672. % allows a way to make an \IEEEeqnarraybox that can be used within an \IEEEeqnarray
  2673. % used by IEEEeqnarraymulticol so that it can work properly in both
  2674. \@advanceIEEEeqncolcnttrue
  2675. \newcount\@IEEEeqnnumcols % tracks how many IEEEeqnarray cols are defined
  2676. \newcount\@IEEEeqncolcnt % tracks how many IEEEeqnarray cols the user actually used
  2677. % The default math style used by the columns
  2678. \def\IEEEeqnarraymathstyle{\displaystyle}
  2679. % The default text style used by the columns
  2680. % default to using the current font
  2681. \def\IEEEeqnarraytextstyle{\relax}
  2682. % like the iedlistdecl but for \IEEEeqnarray
  2683. \def\IEEEeqnarraydecl{\relax}
  2684. \def\IEEEeqnarrayboxdecl{\relax}
  2685. % V1.8 flags to indicate that equation numbering is to persist
  2686. \newif\if@IEEEeqnumpersist%
  2687. \@IEEEeqnumpersistfalse
  2688. \newif\if@IEEEsubeqnumpersist%
  2689. \@IEEEsubeqnumpersistfalse
  2690. %
  2691. % V1.8 flags to indicate if (sub)equation number of last line was preadvanced
  2692. \newif\if@IEEEeqnumpreadv%
  2693. \@IEEEeqnumpreadvfalse
  2694. \newif\if@IEEEsubeqnumpreadv%
  2695. \@IEEEsubeqnumpreadvfalse
  2696. \newcount\@IEEEsubeqnnumrollback% saves previous value of IEEEsubequation number in case we need to restore it
  2697. % \yesnumber is the opposite of \nonumber
  2698. % a novel concept with the same def as the equationarray package
  2699. % However, we give IEEE versions too since some LaTeX packages such as
  2700. % the MDWtools mathenv.sty redefine \nonumber to something else.
  2701. % This command is intended for use in non-IEEEeqnarray math environments
  2702. \providecommand{\yesnumber}{\global\@eqnswtrue}
  2703. % IEEEyes/nonumber
  2704. % V1.8 add persistant * forms
  2705. % These commands can alter the type of equation an IEEEeqnarray line is.
  2706. \def\IEEEyesnumber{\@ifstar{\global\@IEEEeqnumpersisttrue\global\@IEEEsubeqnumpersistfalse\@IEEEyesnumber}{\@IEEEyesnumber}}
  2707. \def\@IEEEyesnumber{\global\@eqnswtrue
  2708. \if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
  2709. \ifnum\c@IEEEsubequation>0\relax
  2710. \stepcounter{equation}\setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
  2711. \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
  2712. \fi
  2713. % even if we reached this eqn num via a preadv, it is legit now
  2714. \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse
  2715. \fi}
  2716. \def\IEEEnonumber{\@ifstar{\global\@IEEEeqnumpersistfalse\global\@IEEEsubeqnumpersistfalse\global\@eqnswfalse}{\global\@eqnswfalse}}
  2717. \def\IEEEyessubnumber{\@ifstar{\global\@IEEEsubeqnumpersisttrue\@IEEEyessubnumber}{\@IEEEyessubnumber}}
  2718. %
  2719. \def\@IEEEyessubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
  2720. \ifnum\c@IEEEsubequation>0\relax% if it already is a subequation, we are good to go as-is
  2721. \else% if we are a regular equation we have to watch out for two cases
  2722. \if@IEEEeqnumpreadv% if this equation is the result of a preadvance, backout and bump the sub eqnnum
  2723. \global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\addtocounter{IEEEsubequation}{1}\relax
  2724. \else% non-preadvanced equations just need initialization of their sub eqnnum
  2725. \setcounter{IEEEsubequation}{1}\relax
  2726. \fi
  2727. \fi% fi already is subequation
  2728. \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
  2729. \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
  2730. \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore
  2731. \global\@eqnswtrue
  2732. \fi}
  2733. \def\IEEEnosubnumber{\@ifstar{\global\@IEEEsubeqnumpersistfalse\@IEEEnosubnumber}{\@IEEEnosubnumber}}
  2734. %
  2735. \def\@IEEEnosubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
  2736. \if@eqnsw % we do nothing unless we know we will display because we play with the counters here
  2737. % if it currently is a subequation, bump up to the next equation number and turn off the subequation
  2738. \ifnum\c@IEEEsubequation>0\relax\addtocounter{equation}{1}\setcounter{IEEEsubequation}{0}\relax
  2739. \fi
  2740. \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore
  2741. \gdef\@currentlabel{\p@equation\theequation}\relax
  2742. \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
  2743. \fi
  2744. \fi}
  2745. % allows users to "push away" equations that get too close to the equation numbers
  2746. \def\IEEEeqnarraynumspace{\hphantom{\ifnum\c@IEEEsubequation>0\relax\theIEEEsubequationdis\else\theequationdis\fi}}
  2747. % provides a way to span multiple columns within IEEEeqnarray environments
  2748. % will consider \if@advanceIEEEeqncolcnt before globally advancing the
  2749. % column counter - so as to work within \IEEEeqnarraybox
  2750. % usage: \IEEEeqnarraymulticol{number cols. to span}{col type}{cell text}
  2751. \long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}\relax
  2752. % check if column is defined for the precolumn definition
  2753. % We have to be careful here because TeX scans for & even within an \iffalse
  2754. % where it does not expand macros. So, if we used only one \ifx and a #3
  2755. % appeared in the false branch and the user inserted another alignment
  2756. % structure that uses & in the \IEEEeqnarraymulticol{}, TeX will not see that
  2757. % there is an inner alignment in the false branch yet still will see any &
  2758. % there and will think that they apply to the outer alignment resulting in an
  2759. % incomplete \ifx error.
  2760. % So, here we use separate checks for the pre and post parts in order to keep
  2761. % the #3 outside of all conditionals.
  2762. \relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax
  2763. \csname @IEEEeqnarraycolPRE#2\endcsname
  2764. \else% if not, error and use default type
  2765. \@IEEEclspkgerror{Invalid column type "#2" in \string\IEEEeqnarraymulticol.\MessageBreak
  2766. Using a default centering column instead}%
  2767. {You must define IEEEeqnarray column types before use.}%
  2768. \csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname
  2769. \fi
  2770. % The ten \relax are to help prevent misleading error messages in case a user
  2771. % accidently inserted a macro that tries to acquire additional arguments.
  2772. #3\relax\relax\relax\relax\relax\relax\relax\relax\relax\relax
  2773. % check if column is defined for the postcolumn definition
  2774. \expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax
  2775. \csname @IEEEeqnarraycolPOST#2\endcsname
  2776. \else% if not, use the default type
  2777. \csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname
  2778. \fi
  2779. % advance column counter only if the IEEEeqnarray environment wants it
  2780. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by #1\relax\fi}
  2781. % like \omit, but maintains track of the column counter for \IEEEeqnarray
  2782. \def\IEEEeqnarrayomit{\omit\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by 1\relax\fi}
  2783. % provides a way to define a letter referenced column type
  2784. % usage: \IEEEeqnarraydefcol{col. type letter/name}{pre insertion text}{post insertion text}
  2785. \def\IEEEeqnarraydefcol#1#2#3{\expandafter\def\csname @IEEEeqnarraycolPRE#1\endcsname{#2}%
  2786. \expandafter\def\csname @IEEEeqnarraycolPOST#1\endcsname{#3}%
  2787. \expandafter\def\csname @IEEEeqnarraycolDEF#1\endcsname{1}}
  2788. % provides a way to define a numerically referenced inter-column glue types
  2789. % usage: \IEEEeqnarraydefcolsep{col. glue number}{glue definition}
  2790. \def\IEEEeqnarraydefcolsep#1#2{\expandafter\def\csname @IEEEeqnarraycolSEP\romannumeral #1\endcsname{#2}%
  2791. \expandafter\def\csname @IEEEeqnarraycolSEPDEF\romannumeral #1\endcsname{1}}
  2792. \def\@IEEEeqnarraycolisdefined{1}% just a macro for 1, used for checking undefined column types
  2793. % expands and appends the given argument to the \@IEEEtrantmptoksA token list
  2794. % used to build up the \halign preamble
  2795. \def\@IEEEappendtoksA#1{\edef\@@IEEEappendtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA #1}}%
  2796. \@@IEEEappendtoksA}
  2797. % also appends to \@IEEEtrantmptoksA, but does not expand the argument
  2798. % uses \toks8 as a scratchpad register
  2799. \def\@IEEEappendNOEXPANDtoksA#1{\toks8={#1}%
  2800. \edef\@@IEEEappendNOEXPANDtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA\the\toks8}}%
  2801. \@@IEEEappendNOEXPANDtoksA}
  2802. % define some common column types for the user
  2803. % math
  2804. \IEEEeqnarraydefcol{l}{$\IEEEeqnarraymathstyle}{$\hfil}
  2805. \IEEEeqnarraydefcol{c}{\hfil$\IEEEeqnarraymathstyle}{$\hfil}
  2806. \IEEEeqnarraydefcol{r}{\hfil$\IEEEeqnarraymathstyle}{$}
  2807. \IEEEeqnarraydefcol{L}{$\IEEEeqnarraymathstyle{}}{{}$\hfil}
  2808. \IEEEeqnarraydefcol{C}{\hfil$\IEEEeqnarraymathstyle{}}{{}$\hfil}
  2809. \IEEEeqnarraydefcol{R}{\hfil$\IEEEeqnarraymathstyle{}}{{}$}
  2810. % text
  2811. \IEEEeqnarraydefcol{s}{\IEEEeqnarraytextstyle}{\hfil}
  2812. \IEEEeqnarraydefcol{t}{\hfil\IEEEeqnarraytextstyle}{\hfil}
  2813. \IEEEeqnarraydefcol{u}{\hfil\IEEEeqnarraytextstyle}{}
  2814. % vertical rules
  2815. \IEEEeqnarraydefcol{v}{}{\vrule width\arrayrulewidth}
  2816. \IEEEeqnarraydefcol{vv}{\vrule width\arrayrulewidth\hfil}{\hfil\vrule width\arrayrulewidth}
  2817. \IEEEeqnarraydefcol{V}{}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth}
  2818. \IEEEeqnarraydefcol{VV}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth\hfil}%
  2819. {\hfil\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth}
  2820. % horizontal rules
  2821. \IEEEeqnarraydefcol{h}{}{\leaders\hrule height\arrayrulewidth\hfil}
  2822. \IEEEeqnarraydefcol{H}{}{\leaders\vbox{\hrule width\arrayrulewidth\vskip\doublerulesep\hrule width\arrayrulewidth}\hfil}
  2823. % plain
  2824. \IEEEeqnarraydefcol{x}{}{}
  2825. \IEEEeqnarraydefcol{X}{$}{$}
  2826. % the default column type to use in the event a column type is not defined
  2827. \IEEEeqnarraydefcol{@IEEEdefault}{\hfil$\IEEEeqnarraymathstyle}{$\hfil}
  2828. % a zero tabskip (used for "-" col types)
  2829. \def\@IEEEeqnarraycolSEPzero{0pt plus 0pt minus 0pt}
  2830. % a centering tabskip (used for "+" col types)
  2831. \def\@IEEEeqnarraycolSEPcenter{1000pt plus 0pt minus 1000pt}
  2832. % top level default tabskip glues for the start, end, and inter-column
  2833. % may be reset within environments not always at the top level, e.g., \IEEEeqnarraybox
  2834. \edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPcenter}% default start glue
  2835. \edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPcenter}% default end glue
  2836. \edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue
  2837. % creates a vertical rule that extends from the bottom to the top a a cell
  2838. % Provided in case other packages redefine \vline some other way.
  2839. % usage: \IEEEeqnarrayvrule[rule thickness]
  2840. % If no argument is provided, \arrayrulewidth will be used for the rule thickness.
  2841. \newcommand\IEEEeqnarrayvrule[1][\arrayrulewidth]{\vrule\@width#1\relax}
  2842. % creates a blank separator row
  2843. % usage: \IEEEeqnarrayseprow[separation length][font size commands]
  2844. % default is \IEEEeqnarrayseprow[0.25\normalbaselineskip][\relax]
  2845. % blank arguments inherit the default values
  2846. % uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers
  2847. \def\IEEEeqnarrayseprow{\relax\@ifnextchar[{\@IEEEeqnarrayseprow}{\@IEEEeqnarrayseprow[0.25\normalbaselineskip]}}
  2848. \def\@IEEEeqnarrayseprow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprow[#1]}{\@@IEEEeqnarrayseprow[#1][\relax]}}
  2849. \def\@@IEEEeqnarrayseprow[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}%
  2850. \ifx\@IEEEeqnarrayseprowARGONE\@empty%
  2851. % get the skip value, based on the font commands
  2852. % use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3
  2853. % assign within a bogus box to confine the font changes
  2854. {\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}%
  2855. \else%
  2856. {\setbox0=\hbox{#2\relax\global\skip5=#1}}%
  2857. \fi%
  2858. \@IEEEeqnarrayhoptolastcolumn\IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax}
  2859. % creates a blank separator row, but omits all the column templates
  2860. % usage: \IEEEeqnarrayseprowcut[separation length][font size commands]
  2861. % default is \IEEEeqnarrayseprowcut[0.25\normalbaselineskip][\relax]
  2862. % blank arguments inherit the default values
  2863. % uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers
  2864. \def\IEEEeqnarrayseprowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols
  2865. % advance column counter only if the IEEEeqnarray environment wants it
  2866. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2867. \@ifnextchar[{\@IEEEeqnarrayseprowcut}{\@IEEEeqnarrayseprowcut[0.25\normalbaselineskip]}}
  2868. \def\@IEEEeqnarrayseprowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprowcut[#1]}{\@@IEEEeqnarrayseprowcut[#1][\relax]}}
  2869. \def\@@IEEEeqnarrayseprowcut[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}%
  2870. \ifx\@IEEEeqnarrayseprowARGONE\@empty%
  2871. % get the skip value, based on the font commands
  2872. % use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3
  2873. % assign within a bogus box to confine the font changes
  2874. {\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}%
  2875. \else%
  2876. {\setbox0=\hbox{#2\relax\global\skip5=#1}}%
  2877. \fi%
  2878. \IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax}
  2879. % draws a single rule across all the columns optional
  2880. % argument determines the rule width, \arrayrulewidth is the default
  2881. % updates column counter as needed and turns off struts
  2882. % usage: \IEEEeqnarrayrulerow[rule line thickness]
  2883. \def\IEEEeqnarrayrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols
  2884. % advance column counter only if the IEEEeqnarray environment wants it
  2885. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2886. \@ifnextchar[{\@IEEEeqnarrayrulerow}{\@IEEEeqnarrayrulerow[\arrayrulewidth]}}
  2887. \def\@IEEEeqnarrayrulerow[#1]{\leaders\hrule height#1\hfil\relax% put in our rule
  2888. % turn off any struts
  2889. \IEEEeqnarraystrutsize{0pt}{0pt}[\relax]\relax}
  2890. % draws a double rule by using a single rule row, a separator row, and then
  2891. % another single rule row
  2892. % first optional argument determines the rule thicknesses, \arrayrulewidth is the default
  2893. % second optional argument determines the rule spacing, \doublerulesep is the default
  2894. % usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing]
  2895. \def\IEEEeqnarraydblrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols
  2896. % advance column counter only if the IEEEeqnarray environment wants it
  2897. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2898. \@ifnextchar[{\@IEEEeqnarraydblrulerow}{\@IEEEeqnarraydblrulerow[\arrayrulewidth]}}
  2899. \def\@IEEEeqnarraydblrulerow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerow[#1]}%
  2900. {\@@IEEEeqnarraydblrulerow[#1][\doublerulesep]}}
  2901. \def\@@IEEEeqnarraydblrulerow[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}%
  2902. % we allow the user to say \IEEEeqnarraydblrulerow[][]
  2903. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2904. \@IEEEeqnarrayrulerow[\arrayrulewidth]%
  2905. \else%
  2906. \@IEEEeqnarrayrulerow[#1]\relax%
  2907. \fi%
  2908. \def\@IEEEeqnarraydblrulerowARG{#2}%
  2909. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2910. \\\IEEEeqnarrayseprow[\doublerulesep][\relax]%
  2911. \else%
  2912. \\\IEEEeqnarrayseprow[#2][\relax]%
  2913. \fi%
  2914. \\\multispan{\@IEEEeqnnumcols}%
  2915. % advance column counter only if the IEEEeqnarray environment wants it
  2916. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2917. \def\@IEEEeqnarraydblrulerowARG{#1}%
  2918. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2919. \@IEEEeqnarrayrulerow[\arrayrulewidth]%
  2920. \else%
  2921. \@IEEEeqnarrayrulerow[#1]%
  2922. \fi%
  2923. }
  2924. % draws a double rule by using a single rule row, a separator (cutting) row, and then
  2925. % another single rule row
  2926. % first optional argument determines the rule thicknesses, \arrayrulewidth is the default
  2927. % second optional argument determines the rule spacing, \doublerulesep is the default
  2928. % usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing]
  2929. \def\IEEEeqnarraydblrulerowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols
  2930. % advance column counter only if the IEEEeqnarray environment wants it
  2931. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2932. \@ifnextchar[{\@IEEEeqnarraydblrulerowcut}{\@IEEEeqnarraydblrulerowcut[\arrayrulewidth]}}
  2933. \def\@IEEEeqnarraydblrulerowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerowcut[#1]}%
  2934. {\@@IEEEeqnarraydblrulerowcut[#1][\doublerulesep]}}
  2935. \def\@@IEEEeqnarraydblrulerowcut[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}%
  2936. % we allow the user to say \IEEEeqnarraydblrulerow[][]
  2937. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2938. \@IEEEeqnarrayrulerow[\arrayrulewidth]%
  2939. \else%
  2940. \@IEEEeqnarrayrulerow[#1]%
  2941. \fi%
  2942. \def\@IEEEeqnarraydblrulerowARG{#2}%
  2943. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2944. \\\IEEEeqnarrayseprowcut[\doublerulesep][\relax]%
  2945. \else%
  2946. \\\IEEEeqnarrayseprowcut[#2][\relax]%
  2947. \fi%
  2948. \\\multispan{\@IEEEeqnnumcols}%
  2949. % advance column counter only if the IEEEeqnarray environment wants it
  2950. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2951. \def\@IEEEeqnarraydblrulerowARG{#1}%
  2952. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2953. \@IEEEeqnarrayrulerow[\arrayrulewidth]%
  2954. \else%
  2955. \@IEEEeqnarrayrulerow[#1]%
  2956. \fi%
  2957. }
  2958. % inserts a full row's worth of &'s
  2959. % relies on \@IEEEeqnnumcols to provide the correct number of columns
  2960. % uses \@IEEEtrantmptoksA, \count0 as scratch registers
  2961. \def\@IEEEeqnarrayhoptolastcolumn{\@IEEEtrantmptoksA={}\count0=1\relax%
  2962. \loop% add cols if the user did not use them all
  2963. \ifnum\count0<\@IEEEeqnnumcols\relax%
  2964. \@IEEEappendtoksA{&}%
  2965. \advance\count0 by 1\relax% update the col count
  2966. \repeat%
  2967. \the\@IEEEtrantmptoksA%execute the &'s
  2968. }
  2969. \newif\if@IEEEeqnarrayISinner % flag to indicate if we are within the lines
  2970. \@IEEEeqnarrayISinnerfalse % of an IEEEeqnarray - after the IEEEeqnarraydecl
  2971. \edef\@IEEEeqnarrayTHEstrutheight{0pt} % height and depth of IEEEeqnarray struts
  2972. \edef\@IEEEeqnarrayTHEstrutdepth{0pt}
  2973. \edef\@IEEEeqnarrayTHEmasterstrutheight{0pt} % default height and depth of
  2974. \edef\@IEEEeqnarrayTHEmasterstrutdepth{0pt} % struts within an IEEEeqnarray
  2975. \edef\@IEEEeqnarrayTHEmasterstrutHSAVE{0pt} % saved master strut height
  2976. \edef\@IEEEeqnarrayTHEmasterstrutDSAVE{0pt} % and depth
  2977. \newif\if@IEEEeqnarrayusemasterstrut % flag to indicate that the master strut value
  2978. \@IEEEeqnarrayusemasterstruttrue % is to be used
  2979. % saves the strut height and depth of the master strut
  2980. \def\@IEEEeqnarraymasterstrutsave{\relax%
  2981. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax%
  2982. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax%
  2983. % remove stretchability
  2984. \dimen0\skip0\relax%
  2985. \dimen2\skip2\relax%
  2986. % save values
  2987. \edef\@IEEEeqnarrayTHEmasterstrutHSAVE{\the\dimen0}%
  2988. \edef\@IEEEeqnarrayTHEmasterstrutDSAVE{\the\dimen2}}
  2989. % restores the strut height and depth of the master strut
  2990. \def\@IEEEeqnarraymasterstrutrestore{\relax%
  2991. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutHSAVE\relax%
  2992. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutDSAVE\relax%
  2993. % remove stretchability
  2994. \dimen0\skip0\relax%
  2995. \dimen2\skip2\relax%
  2996. % restore values
  2997. \edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}%
  2998. \edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}}
  2999. % globally restores the strut height and depth to the
  3000. % master values and sets the master strut flag to true
  3001. \def\@IEEEeqnarraystrutreset{\relax%
  3002. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax%
  3003. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax%
  3004. % remove stretchability
  3005. \dimen0\skip0\relax%
  3006. \dimen2\skip2\relax%
  3007. % restore values
  3008. \xdef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  3009. \xdef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  3010. \global\@IEEEeqnarrayusemasterstruttrue}
  3011. % if the master strut is not to be used, make the current
  3012. % values of \@IEEEeqnarrayTHEstrutheight, \@IEEEeqnarrayTHEstrutdepth
  3013. % and the use master strut flag, global
  3014. % this allows user strut commands issued in the last column to be carried
  3015. % into the isolation/strut column
  3016. \def\@IEEEeqnarrayglobalizestrutstatus{\relax%
  3017. \if@IEEEeqnarrayusemasterstrut\else%
  3018. \xdef\@IEEEeqnarrayTHEstrutheight{\@IEEEeqnarrayTHEstrutheight}%
  3019. \xdef\@IEEEeqnarrayTHEstrutdepth{\@IEEEeqnarrayTHEstrutdepth}%
  3020. \global\@IEEEeqnarrayusemasterstrutfalse%
  3021. \fi}
  3022. % usage: \IEEEeqnarraystrutsize{height}{depth}[font size commands]
  3023. % If called outside the lines of an IEEEeqnarray, sets the height
  3024. % and depth of both the master and local struts. If called inside
  3025. % an IEEEeqnarray line, sets the height and depth of the local strut
  3026. % only and sets the flag to indicate the use of the local strut
  3027. % values. If the height or depth is left blank, 0.7\normalbaselineskip
  3028. % and 0.3\normalbaselineskip will be used, respectively.
  3029. % The optional argument can be used to evaluate the lengths under
  3030. % a different font size and styles. If none is specified, the current
  3031. % font is used.
  3032. % uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2
  3033. \def\IEEEeqnarraystrutsize#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsize{#1}{#2}}{\@IEEEeqnarraystrutsize{#1}{#2}[\relax]}}
  3034. \def\@IEEEeqnarraystrutsize#1#2[#3]{\def\@IEEEeqnarraystrutsizeARG{#1}%
  3035. \ifx\@IEEEeqnarraystrutsizeARG\@empty%
  3036. {\setbox0=\hbox{#3\relax\global\skip3=0.7\normalbaselineskip}}%
  3037. \skip0=\skip3\relax%
  3038. \else% arg one present
  3039. {\setbox0=\hbox{#3\relax\global\skip3=#1\relax}}%
  3040. \skip0=\skip3\relax%
  3041. \fi% if null arg
  3042. \def\@IEEEeqnarraystrutsizeARG{#2}%
  3043. \ifx\@IEEEeqnarraystrutsizeARG\@empty%
  3044. {\setbox0=\hbox{#3\relax\global\skip3=0.3\normalbaselineskip}}%
  3045. \skip2=\skip3\relax%
  3046. \else% arg two present
  3047. {\setbox0=\hbox{#3\relax\global\skip3=#2\relax}}%
  3048. \skip2=\skip3\relax%
  3049. \fi% if null arg
  3050. % remove stretchability, just to be safe
  3051. \dimen0\skip0\relax%
  3052. \dimen2\skip2\relax%
  3053. % dimen0 = height, dimen2 = depth
  3054. \if@IEEEeqnarrayISinner% inner does not touch master strut size
  3055. \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  3056. \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  3057. \@IEEEeqnarrayusemasterstrutfalse% do not use master
  3058. \else% outer, have to set master strut too
  3059. \edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}%
  3060. \edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}%
  3061. \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  3062. \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  3063. \@IEEEeqnarrayusemasterstruttrue% use master strut
  3064. \fi}
  3065. % usage: \IEEEeqnarraystrutsizeadd{added height}{added depth}[font size commands]
  3066. % If called outside the lines of an IEEEeqnarray, adds the given height
  3067. % and depth to both the master and local struts.
  3068. % If called inside an IEEEeqnarray line, adds the given height and depth
  3069. % to the local strut only and sets the flag to indicate the use
  3070. % of the local strut values.
  3071. % In both cases, if a height or depth is left blank, 0pt is used instead.
  3072. % The optional argument can be used to evaluate the lengths under
  3073. % a different font size and styles. If none is specified, the current
  3074. % font is used.
  3075. % uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2
  3076. \def\IEEEeqnarraystrutsizeadd#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsizeadd{#1}{#2}}{\@IEEEeqnarraystrutsizeadd{#1}{#2}[\relax]}}
  3077. \def\@IEEEeqnarraystrutsizeadd#1#2[#3]{\def\@IEEEeqnarraystrutsizearg{#1}%
  3078. \ifx\@IEEEeqnarraystrutsizearg\@empty%
  3079. \skip0=0pt\relax%
  3080. \else% arg one present
  3081. {\setbox0=\hbox{#3\relax\global\skip3=#1}}%
  3082. \skip0=\skip3\relax%
  3083. \fi% if null arg
  3084. \def\@IEEEeqnarraystrutsizearg{#2}%
  3085. \ifx\@IEEEeqnarraystrutsizearg\@empty%
  3086. \skip2=0pt\relax%
  3087. \else% arg two present
  3088. {\setbox0=\hbox{#3\relax\global\skip3=#2}}%
  3089. \skip2=\skip3\relax%
  3090. \fi% if null arg
  3091. % remove stretchability, just to be safe
  3092. \dimen0\skip0\relax%
  3093. \dimen2\skip2\relax%
  3094. % dimen0 = height, dimen2 = depth
  3095. \if@IEEEeqnarrayISinner% inner does not touch master strut size
  3096. % get local strut size
  3097. \expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax%
  3098. \expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax%
  3099. % add it to the user supplied values
  3100. \advance\dimen0 by \skip0\relax%
  3101. \advance\dimen2 by \skip2\relax%
  3102. % update the local strut size
  3103. \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  3104. \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  3105. \@IEEEeqnarrayusemasterstrutfalse% do not use master
  3106. \else% outer, have to set master strut too
  3107. % get master strut size
  3108. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax%
  3109. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax%
  3110. % add it to the user supplied values
  3111. \advance\dimen0 by \skip0\relax%
  3112. \advance\dimen2 by \skip2\relax%
  3113. % update the local and master strut sizes
  3114. \edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}%
  3115. \edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}%
  3116. \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  3117. \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  3118. \@IEEEeqnarrayusemasterstruttrue% use master strut
  3119. \fi}
  3120. % allow user a way to see the struts
  3121. \newif\ifIEEEvisiblestruts
  3122. \IEEEvisiblestrutsfalse
  3123. % inserts an invisible strut using the master or local strut values
  3124. % uses scratch registers \skip0, \skip2, \dimen0, \dimen2
  3125. \def\@IEEEeqnarrayinsertstrut{\relax%
  3126. \if@IEEEeqnarrayusemasterstrut
  3127. % get master strut size
  3128. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax%
  3129. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax%
  3130. \else%
  3131. % get local strut size
  3132. \expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax%
  3133. \expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax%
  3134. \fi%
  3135. % remove stretchability, probably not needed
  3136. \dimen0\skip0\relax%
  3137. \dimen2\skip2\relax%
  3138. % dimen0 = height, dimen2 = depth
  3139. % allow user to see struts if desired
  3140. \ifIEEEvisiblestruts%
  3141. \vrule width0.2pt height\dimen0 depth\dimen2\relax%
  3142. \else%
  3143. \vrule width0pt height\dimen0 depth\dimen2\relax\fi}
  3144. % creates an invisible strut, useable even outside \IEEEeqnarray
  3145. % if \IEEEvisiblestrutstrue, the strut will be visible and 0.2pt wide.
  3146. % usage: \IEEEstrut[height][depth][font size commands]
  3147. % default is \IEEEstrut[0.7\normalbaselineskip][0.3\normalbaselineskip][\relax]
  3148. % blank arguments inherit the default values
  3149. % uses \dimen0, \dimen2, \skip0, \skip2
  3150. \def\IEEEstrut{\relax\@ifnextchar[{\@IEEEstrut}{\@IEEEstrut[0.7\normalbaselineskip]}}
  3151. \def\@IEEEstrut[#1]{\relax\@ifnextchar[{\@@IEEEstrut[#1]}{\@@IEEEstrut[#1][0.3\normalbaselineskip]}}
  3152. \def\@@IEEEstrut[#1][#2]{\relax\@ifnextchar[{\@@@IEEEstrut[#1][#2]}{\@@@IEEEstrut[#1][#2][\relax]}}
  3153. \def\@@@IEEEstrut[#1][#2][#3]{\mbox{#3\relax%
  3154. \def\@IEEEstrutARG{#1}%
  3155. \ifx\@IEEEstrutARG\@empty%
  3156. \skip0=0.7\normalbaselineskip\relax%
  3157. \else%
  3158. \skip0=#1\relax%
  3159. \fi%
  3160. \def\@IEEEstrutARG{#2}%
  3161. \ifx\@IEEEstrutARG\@empty%
  3162. \skip2=0.3\normalbaselineskip\relax%
  3163. \else%
  3164. \skip2=#2\relax%
  3165. \fi%
  3166. % remove stretchability, probably not needed
  3167. \dimen0\skip0\relax%
  3168. \dimen2\skip2\relax%
  3169. \ifIEEEvisiblestruts%
  3170. \vrule width0.2pt height\dimen0 depth\dimen2\relax%
  3171. \else%
  3172. \vrule width0.0pt height\dimen0 depth\dimen2\relax\fi}}
  3173. % enables strut mode by setting a default strut size and then zeroing the
  3174. % \baselineskip, \lineskip, \lineskiplimit and \jot
  3175. \def\IEEEeqnarraystrutmode{\IEEEeqnarraystrutsize{0.7\normalbaselineskip}{0.3\normalbaselineskip}[\relax]%
  3176. \baselineskip=0pt\lineskip=0pt\lineskiplimit=0pt\jot=0pt}
  3177. % equation and subequation forms to use to setup hyperref's \@currentHref
  3178. \def\@IEEEtheHrefequation{equation.\theHequation}
  3179. \def\@IEEEtheHrefsubequation{equation.\theHequation\alph{IEEEsubequation}}
  3180. \def\IEEEeqnarray{\@IEEEeqnumpersisttrue\@IEEEsubeqnumpersistfalse\@IEEEeqnarray}
  3181. \def\endIEEEeqnarray{\end@IEEEeqnarray}
  3182. \@namedef{IEEEeqnarray*}{\@IEEEeqnumpersistfalse\@IEEEsubeqnumpersistfalse\@IEEEeqnarray}
  3183. \@namedef{endIEEEeqnarray*}{\end@IEEEeqnarray}
  3184. % \IEEEeqnarray is an enhanced \eqnarray.
  3185. % The star form defaults to not putting equation numbers at the end of each row.
  3186. % usage: \IEEEeqnarray[decl]{cols}
  3187. \def\@IEEEeqnarray{\relax\@ifnextchar[{\@@IEEEeqnarray}{\@@IEEEeqnarray[\relax]}}
  3188. % We have to be careful here to normalize catcodes just before acquiring the
  3189. % cols as that specification may contain punctuation which could be subject
  3190. % to document catcode changes.
  3191. \def\@@IEEEeqnarray[#1]{\begingroup\IEEEnormalcatcodes\@@@IEEEeqnarray[#1]}
  3192. \def\@@@IEEEeqnarray[#1]#2{\endgroup
  3193. % default to showing the equation number or not based on whether or not
  3194. % the star form was involked
  3195. \if@IEEEeqnumpersist\global\@eqnswtrue
  3196. \else% not the star form
  3197. \global\@eqnswfalse
  3198. \fi% if star form
  3199. % provide a basic hyperref \theHequation if this has not already been setup (hyperref not loaded, or no section counter)
  3200. \@ifundefined{theHequation}{\def\theHequation{\arabic{equation}}}{}\relax
  3201. % provide dummy hyperref commands in case hyperref is not loaded
  3202. \providecommand{\Hy@raisedlink}[1]{}\relax
  3203. \providecommand{\hyper@anchorstart}[1]{}\relax
  3204. \providecommand{\hyper@anchorend}{}\relax
  3205. \providecommand{\@currentHref}{}\relax
  3206. \@IEEEeqnumpreadvfalse% reset eqnpreadv flag
  3207. \@IEEEsubeqnumpreadvfalse% reset subeqnpreadv flag
  3208. \@IEEEeqnarrayISinnerfalse% not yet within the lines of the halign
  3209. \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default
  3210. \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise
  3211. \IEEEvisiblestrutsfalse% diagnostic mode defaults to off
  3212. % no extra space unless the user specifically requests it
  3213. \lineskip=0pt\relax
  3214. \lineskiplimit=0pt\relax
  3215. \baselineskip=\normalbaselineskip\relax%
  3216. \jot=\IEEEnormaljot\relax%
  3217. \mathsurround\z@\relax% no extra spacing around math
  3218. \@advanceIEEEeqncolcnttrue% advance the col counter for each col the user uses,
  3219. % used in \IEEEeqnarraymulticol and in the preamble build
  3220. %V1.8 Here we preadvance to the next equation number.
  3221. % If the user later wants a continued subequation, we can roll back.
  3222. \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation%
  3223. \stepcounter{equation}\@IEEEeqnumpreadvtrue% advance equation counter before first line
  3224. \setcounter{IEEEsubequation}{0}% no subequation yet
  3225. \let\@IEEEcurrentlabelsave\@currentlabel% save current label as we later change it globally
  3226. \let\@IEEEcurrentHrefsave\@currentHref% save current href label as we later change it globally
  3227. \def\@currentlabel{\p@equation\theequation}% redefine the ref label
  3228. \def\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
  3229. \IEEEeqnarraydecl\relax% allow a way for the user to make global overrides
  3230. #1\relax% allow user to override defaults
  3231. \let\\\@IEEEeqnarraycr% replace newline with one that can put in eqn. numbers
  3232. \global\@IEEEeqncolcnt\z@% col. count = 0 for first line
  3233. \@IEEEbuildpreamble{#2}\relax% build the preamble and put it into \@IEEEtrantmptoksA
  3234. % put in the column for the equation number
  3235. \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first
  3236. \toks0={##}%
  3237. % advance the \@IEEEeqncolcnt for the isolation col, this helps with error checking
  3238. \@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}%
  3239. % add the isolation column
  3240. \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}%
  3241. % advance the \@IEEEeqncolcnt for the equation number col, this helps with error checking
  3242. \@IEEEappendtoksA{&\global\advance\@IEEEeqncolcnt by 1\relax}%
  3243. % add the equation number col to the preamble
  3244. \@IEEEappendtoksA{\tabskip\z@skip\hb@xt@\z@\bgroup\hss\the\toks0\egroup}%
  3245. % note \@IEEEeqnnumcols does not count the equation col or isolation col
  3246. % set the starting tabskip glue as determined by the preamble build
  3247. \tabskip=\@IEEEBPstartglue\relax
  3248. % begin the display alignment
  3249. \@IEEEeqnarrayISinnertrue% commands are now within the lines
  3250. $$\everycr{}\halign to\displaywidth\bgroup
  3251. % "exspand" the preamble
  3252. \span\the\@IEEEtrantmptoksA\cr}
  3253. % enter isolation/strut column (or the next column if the user did not use
  3254. % every column), record the strut status, complete the columns, do the strut if needed,
  3255. % restore counters (to backout any equation setup for a next line that was never used)
  3256. % to their correct values and exit
  3257. \def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup
  3258. \if@IEEEsubeqnumpreadv\global\advance\c@IEEEsubequation\m@ne\fi
  3259. \if@IEEEeqnumpreadv\global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\fi
  3260. \global\let\@currentlabel\@IEEEcurrentlabelsave% restore current label
  3261. \global\let\@currentHref\@IEEEcurrentHrefsave% restore current href label
  3262. $$\@ignoretrue}
  3263. % IEEEeqnarray uses a modifed \\ instead of the plain \cr to
  3264. % end rows. This allows for things like \\*[vskip amount]
  3265. % These "cr" macros are modified versions of those for LaTeX2e's eqnarray
  3266. % the {\ifnum0=`} braces must be kept away from the last column to avoid
  3267. % altering spacing of its math, so we use & to advance to the next column
  3268. % as there is an isolation/strut column after the user's columns
  3269. \def\@IEEEeqnarraycr{\@IEEEeqnarrayglobalizestrutstatus&% save strut status and advance to next column
  3270. {\ifnum0=`}\fi
  3271. \@ifstar{%
  3272. \global\@eqpen\@M\@IEEEeqnarrayYCR
  3273. }{%
  3274. \global\@eqpen\interdisplaylinepenalty \@IEEEeqnarrayYCR
  3275. }%
  3276. }
  3277. \def\@IEEEeqnarrayYCR{\@testopt\@IEEEeqnarrayXCR\z@skip}
  3278. \def\@IEEEeqnarrayXCR[#1]{%
  3279. \ifnum0=`{\fi}%
  3280. \@@IEEEeqnarraycr
  3281. \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}}%
  3282. \def\@@IEEEeqnarraycr{\@IEEEtrantmptoksA={}% clear token register
  3283. \advance\@IEEEeqncolcnt by -1\relax% adjust col count because of the isolation column
  3284. \ifnum\@IEEEeqncolcnt>\@IEEEeqnnumcols\relax
  3285. \@IEEEclspkgerror{Too many columns within the IEEEeqnarray\MessageBreak
  3286. environment}%
  3287. {Use fewer \string &'s or put more columns in the IEEEeqnarray column\MessageBreak
  3288. specifications.}\relax%
  3289. \else
  3290. \loop% add cols if the user did not use them all
  3291. \ifnum\@IEEEeqncolcnt<\@IEEEeqnnumcols\relax
  3292. \@IEEEappendtoksA{&}%
  3293. \advance\@IEEEeqncolcnt by 1\relax% update the col count
  3294. \repeat
  3295. % this number of &'s will take us the the isolation column
  3296. \fi
  3297. % execute the &'s
  3298. \the\@IEEEtrantmptoksA%
  3299. % handle the strut/isolation column
  3300. \@IEEEeqnarrayinsertstrut% do the strut if needed
  3301. \@IEEEeqnarraystrutreset% reset the strut system for next line or IEEEeqnarray
  3302. &% and enter the equation number column
  3303. \if@eqnsw% only if we display something
  3304. \Hy@raisedlink{\hyper@anchorstart{\@currentHref}}% start a hyperref anchor
  3305. \global\@IEEEeqnumpreadvfalse\relax% displaying an equation number means
  3306. \global\@IEEEsubeqnumpreadvfalse\relax% the equation counters point to valid equations
  3307. % V1.8 Here we setup the counters, currentlabel and status for what would be the *next*
  3308. % equation line as would be the case under the current settings. However, there are two problems.
  3309. % One problem is that there might not ever be a next line. The second problem is that the user
  3310. % may later alter the meaning of a line with commands such as \IEEEyessubnumber. So, to handle
  3311. % these cases we have to record the current values of the (sub)equation counters and revert back
  3312. % to them if the next line is changed or never comes. The \if@IEEEeqnumpreadv, \if@IEEEsubeqnumpreadv
  3313. % and \@IEEEsubeqnnumrollback stuff tracks this.
  3314. % The logic to handle all this is surprisingly complex, but a nice feature of the approach here is
  3315. % that the equation counters and labels remain valid for what the line would be unless a
  3316. % \IEEEyessubnumber et al. later changes it. So, any hyperref links are always correct.
  3317. \ifnum\c@IEEEsubequation>0\relax% handle subequation
  3318. \theIEEEsubequationdis\relax
  3319. \if@IEEEsubeqnumpersist% setup for default type of next line
  3320. \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax
  3321. \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
  3322. \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
  3323. \else
  3324. % if no subeqnum persist, go ahead and setup for a new equation number
  3325. \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation
  3326. \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax
  3327. \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
  3328. \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
  3329. \fi
  3330. \else% display a standard equation number
  3331. \theequationdis\relax
  3332. \setcounter{IEEEsubequation}{0}\relax% not really needed
  3333. \if@IEEEsubeqnumpersist% setup for default type of next line
  3334. % subequations that follow plain equations carry the same equation number e.g, 5, 5a rather than 5, 6a
  3335. \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax
  3336. \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
  3337. \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
  3338. \else
  3339. % if no subeqnum persist, go ahead and setup for a new equation number
  3340. \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation
  3341. \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax
  3342. \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
  3343. \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
  3344. \fi
  3345. \fi%
  3346. \Hy@raisedlink{\hyper@anchorend}% end hyperref anchor
  3347. \fi% fi only if we display something
  3348. % reset the flags to indicate the default preferences of the display of equation numbers
  3349. \if@IEEEeqnumpersist\global\@eqnswtrue\else\global\@eqnswfalse\fi
  3350. \if@IEEEsubeqnumpersist\global\@eqnswtrue\fi% ditto for the subequation flag
  3351. % reset the number of columns the user actually used
  3352. \global\@IEEEeqncolcnt\z@\relax
  3353. % the real end of the line
  3354. \cr}
  3355. % \IEEEeqnarraybox is like \IEEEeqnarray except the box form puts everything
  3356. % inside a vtop, vbox, or vcenter box depending on the letter in the second
  3357. % optional argument (t,b,c). Vbox is the default. Unlike \IEEEeqnarray,
  3358. % equation numbers are not displayed and \IEEEeqnarraybox can be nested.
  3359. % \IEEEeqnarrayboxm is for math mode (like \array) and does not put the vbox
  3360. % within an hbox.
  3361. % \IEEEeqnarrayboxt is for text mode (like \tabular) and puts the vbox within
  3362. % a \hbox{$ $} construct.
  3363. % \IEEEeqnarraybox will auto detect whether to use \IEEEeqnarrayboxm or
  3364. % \IEEEeqnarrayboxt depending on the math mode.
  3365. % The third optional argument specifies the width this box is to be set to -
  3366. % natural width is the default.
  3367. % The * forms do not add \jot line spacing
  3368. % usage: \IEEEeqnarraybox[decl][pos][width]{cols}
  3369. \def\IEEEeqnarrayboxm{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
  3370. \def\endIEEEeqnarrayboxm{\end@IEEEeqnarraybox}
  3371. \@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
  3372. \@namedef{endIEEEeqnarrayboxm*}{\end@IEEEeqnarraybox}
  3373. \def\IEEEeqnarrayboxt{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
  3374. \def\endIEEEeqnarrayboxt{\end@IEEEeqnarraybox}
  3375. \@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
  3376. \@namedef{endIEEEeqnarrayboxt*}{\end@IEEEeqnarraybox}
  3377. \def\IEEEeqnarraybox{\@IEEEeqnarrayboxnojotfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
  3378. \@IEEEeqnarraybox}
  3379. \def\endIEEEeqnarraybox{\end@IEEEeqnarraybox}
  3380. \@namedef{IEEEeqnarraybox*}{\@IEEEeqnarrayboxnojottrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
  3381. \@IEEEeqnarraybox}
  3382. \@namedef{endIEEEeqnarraybox*}{\end@IEEEeqnarraybox}
  3383. % flag to indicate if the \IEEEeqnarraybox needs to put things into an hbox{$ $}
  3384. % for \vcenter in non-math mode
  3385. \newif\if@IEEEeqnarrayboxHBOXSW%
  3386. \@IEEEeqnarrayboxHBOXSWfalse
  3387. \def\@IEEEeqnarraybox{\relax\@ifnextchar[{\@@IEEEeqnarraybox}{\@@IEEEeqnarraybox[\relax]}}
  3388. % We have to be careful here to normalize catcodes just before acquiring the
  3389. % cols as that specification may contain punctuation which could be subject
  3390. % to document catcode changes.
  3391. \def\@@IEEEeqnarraybox[#1]{\relax\begingroup\IEEEnormalcatcodes\@ifnextchar[{\@@@IEEEeqnarraybox[#1]}{\@@@IEEEeqnarraybox[#1][b]}}
  3392. \def\@@@IEEEeqnarraybox[#1][#2]{\relax\@ifnextchar[{\@@@@IEEEeqnarraybox[#1][#2]}{\@@@@IEEEeqnarraybox[#1][#2][\relax]}}
  3393. % #1 = decl; #2 = t,b,c; #3 = width, #4 = col specs
  3394. \def\@@@@IEEEeqnarraybox[#1][#2][#3]#4{\endgroup\@IEEEeqnarrayISinnerfalse % not yet within the lines of the halign
  3395. \@IEEEeqnarraymasterstrutsave% save current master strut values
  3396. \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default
  3397. \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise
  3398. \IEEEvisiblestrutsfalse% diagnostic mode defaults to off
  3399. % no extra space unless the user specifically requests it
  3400. \lineskip=0pt\relax%
  3401. \lineskiplimit=0pt\relax%
  3402. \baselineskip=\normalbaselineskip\relax%
  3403. \jot=\IEEEnormaljot\relax%
  3404. \mathsurround\z@\relax% no extra spacing around math
  3405. % the default end glues are zero for an \IEEEeqnarraybox
  3406. \edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPzero}% default start glue
  3407. \edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPzero}% default end glue
  3408. \edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue
  3409. \@advanceIEEEeqncolcntfalse% do not advance the col counter for each col the user uses,
  3410. % used in \IEEEeqnarraymulticol and in the preamble build
  3411. \IEEEeqnarrayboxdecl\relax% allow a way for the user to make global overrides
  3412. #1\relax% allow user to override defaults
  3413. \let\\\@IEEEeqnarrayboxcr% replace newline with one that allows optional spacing
  3414. \@IEEEbuildpreamble{#4}\relax% build the preamble and put it into \@IEEEtrantmptoksA
  3415. % add an isolation column to the preamble to stop \\'s {} from getting into the last col
  3416. \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first
  3417. \toks0={##}%
  3418. % add the isolation column to the preamble
  3419. \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}%
  3420. % set the starting tabskip glue as determined by the preamble build
  3421. \tabskip=\@IEEEBPstartglue\relax
  3422. % begin the alignment
  3423. \everycr{}%
  3424. % use only the very first token to determine the positioning
  3425. \@IEEEextracttoken{#2}\relax
  3426. \ifx\@IEEEextractedtokensdiscarded\@empty\else
  3427. \typeout{** WARNING: IEEEeqnarraybox position specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
  3428. \fi
  3429. % \@IEEEextractedtoken has the first token, the rest are ignored
  3430. % if we need to put things into and hbox and go into math mode, do so now
  3431. \if@IEEEeqnarrayboxHBOXSW \leavevmode \hbox \bgroup $\fi%
  3432. % use the appropriate vbox type
  3433. \if\@IEEEextractedtoken t\relax\vtop\else\if\@IEEEextractedtoken c\relax%
  3434. \vcenter\else\vbox\fi\fi\bgroup%
  3435. \@IEEEeqnarrayISinnertrue% commands are now within the lines
  3436. \ifx#3\relax\halign\else\halign to #3\relax\fi%
  3437. \bgroup
  3438. % "exspand" the preamble
  3439. \span\the\@IEEEtrantmptoksA\cr}
  3440. % carry strut status and enter the isolation/strut column,
  3441. % exit from math mode if needed, and exit
  3442. \def\end@IEEEeqnarraybox{\@IEEEeqnarrayglobalizestrutstatus% carry strut status
  3443. &% enter isolation/strut column
  3444. \@IEEEeqnarrayinsertstrut% do strut if needed
  3445. \@IEEEeqnarraymasterstrutrestore% restore the previous master strut values
  3446. % reset the strut system for next IEEEeqnarray
  3447. % (sets local strut values back to previous master strut values)
  3448. \@IEEEeqnarraystrutreset%
  3449. % ensure last line, exit from halign, close vbox
  3450. \crcr\egroup\egroup%
  3451. % exit from math mode and close hbox if needed
  3452. \if@IEEEeqnarrayboxHBOXSW $\egroup\fi}
  3453. % IEEEeqnarraybox uses a modifed \\ instead of the plain \cr to
  3454. % end rows. This allows for things like \\[vskip amount]
  3455. % This "cr" macros are modified versions those for LaTeX2e's eqnarray
  3456. % For IEEEeqnarraybox, \\* is the same as \\
  3457. % the {\ifnum0=`} braces must be kept away from the last column to avoid
  3458. % altering spacing of its math, so we use & to advance to the isolation/strut column
  3459. % carry strut status into isolation/strut column
  3460. \def\@IEEEeqnarrayboxcr{\@IEEEeqnarrayglobalizestrutstatus% carry strut status
  3461. &% enter isolation/strut column
  3462. \@IEEEeqnarrayinsertstrut% do strut if needed
  3463. % reset the strut system for next line or IEEEeqnarray
  3464. \@IEEEeqnarraystrutreset%
  3465. {\ifnum0=`}\fi%
  3466. \@ifstar{\@IEEEeqnarrayboxYCR}{\@IEEEeqnarrayboxYCR}}
  3467. % test and setup the optional argument to \\[]
  3468. \def\@IEEEeqnarrayboxYCR{\@testopt\@IEEEeqnarrayboxXCR\z@skip}
  3469. % IEEEeqnarraybox does not automatically increase line spacing by \jot
  3470. \def\@IEEEeqnarrayboxXCR[#1]{\ifnum0=`{\fi}%
  3471. \cr\noalign{\if@IEEEeqnarrayboxnojot\else\vskip\jot\fi\vskip#1\relax}}
  3472. % usage: \@IEEEbuildpreamble{column specifiers}
  3473. % starts the halign preamble build
  3474. % the assembled preamble is put in \@IEEEtrantmptoksA
  3475. \def\@IEEEbuildpreamble#1{\@IEEEtrantmptoksA={}% clear token register
  3476. \let\@IEEEBPcurtype=u%current column type is not yet known
  3477. \let\@IEEEBPprevtype=s%the previous column type was the start
  3478. \let\@IEEEBPnexttype=u%next column type is not yet known
  3479. % ensure these are valid
  3480. \def\@IEEEBPcurglue={0pt plus 0pt minus 0pt}%
  3481. \def\@IEEEBPcurcolname{@IEEEdefault}% name of current column definition
  3482. % currently acquired numerically referenced glue
  3483. % use a name that is easier to remember
  3484. \let\@IEEEBPcurnum=\@IEEEtrantmpcountA%
  3485. \@IEEEBPcurnum=0%
  3486. % tracks number of columns in the preamble
  3487. \@IEEEeqnnumcols=0%
  3488. % record the default end glues
  3489. \edef\@IEEEBPstartglue{\@IEEEeqnarraycolSEPdefaultstart}%
  3490. \edef\@IEEEBPendglue{\@IEEEeqnarraycolSEPdefaultend}%
  3491. \edef\@IEEEedefMACRO{#1}\relax% fully expand the preamble to support macro containers
  3492. % now parse the user's column specifications
  3493. % \ignorespaces is used as a delimiter, need at least one trailing \relax because
  3494. % \@@IEEEbuildpreamble looks into the future
  3495. \expandafter\@@IEEEbuildpreamble\@IEEEedefMACRO\ignorespaces\relax\relax}
  3496. % usage: \@@IEEEbuildpreamble{current column}{next column}
  3497. % parses and builds the halign preamble
  3498. \def\@@IEEEbuildpreamble#1#2{\let\@@nextIEEEbuildpreamble=\@@IEEEbuildpreamble%
  3499. % use only the very first token to check the end
  3500. \@IEEEextracttokengroups{#1}\relax
  3501. \ifx\@IEEEextractedfirsttoken\ignorespaces\let\@@nextIEEEbuildpreamble=\@@IEEEfinishpreamble\else%
  3502. % identify current and next token type
  3503. \@IEEEgetcoltype{#1}{\@IEEEBPcurtype}{1}% current, error on invalid
  3504. \@IEEEgetcoltype{#2}{\@IEEEBPnexttype}{0}% next, no error on invalid next
  3505. % if curtype is a glue, get the glue def
  3506. \if\@IEEEBPcurtype g\@IEEEgetcurglue{#1}{\@IEEEBPcurglue}\fi%
  3507. % if curtype is a column, get the column def and set the current column name
  3508. \if\@IEEEBPcurtype c\@IEEEgetcurcol{#1}\fi%
  3509. % if curtype is a numeral, acquire the user defined glue
  3510. \if\@IEEEBPcurtype n\@IEEEprocessNcol{#1}\fi%
  3511. % process the acquired glue
  3512. \if\@IEEEBPcurtype g\@IEEEprocessGcol\fi%
  3513. % process the acquired col
  3514. \if\@IEEEBPcurtype c\@IEEEprocessCcol\fi%
  3515. % ready prevtype for next col spec.
  3516. \let\@IEEEBPprevtype=\@IEEEBPcurtype%
  3517. % be sure and put back the future token(s) as a group
  3518. \fi\@@nextIEEEbuildpreamble{#2}}
  3519. % usage: \@@IEEEfinishpreamble{discarded}
  3520. % executed just after preamble build is completed
  3521. % warn about zero cols, and if prevtype type = u, put in end tabskip glue
  3522. % argument is not used
  3523. \def\@@IEEEfinishpreamble#1{\ifnum\@IEEEeqnnumcols<1\relax
  3524. \@IEEEclspkgerror{No column specifiers declared for IEEEeqnarray}%
  3525. {At least one column type must be declared for each IEEEeqnarray.}%
  3526. \fi%num cols less than 1
  3527. %if last type undefined, set default end tabskip glue
  3528. \if\@IEEEBPprevtype u\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue}\fi}
  3529. % usage: \@IEEEgetcoltype{col specifier}{\output}{error more}
  3530. % Identify and return the column specifier's type code in the given
  3531. % \output macro:
  3532. % n = number
  3533. % g = glue (any other char in catagory 12)
  3534. % c = letter
  3535. % e = \ignorespaces (end of sequence)
  3536. % u = undefined
  3537. % error mode: 0 = no error message, 1 = error on invalid char
  3538. \def\@IEEEgetcoltype#1#2#3{%
  3539. % use only the very first token to determine the type
  3540. \@IEEEextracttoken{#1}\relax
  3541. % \@IEEEextractedtoken has the first token, the rest are discarded
  3542. \let#2=u\relax% assume invalid until know otherwise
  3543. \ifx\@IEEEextractedtoken\ignorespaces\let#2=e\else
  3544. \ifcat\@IEEEextractedtoken\relax\else% screen out control sequences
  3545. \if0\@IEEEextractedtoken\let#2=n\else
  3546. \if1\@IEEEextractedtoken\let#2=n\else
  3547. \if2\@IEEEextractedtoken\let#2=n\else
  3548. \if3\@IEEEextractedtoken\let#2=n\else
  3549. \if4\@IEEEextractedtoken\let#2=n\else
  3550. \if5\@IEEEextractedtoken\let#2=n\else
  3551. \if6\@IEEEextractedtoken\let#2=n\else
  3552. \if7\@IEEEextractedtoken\let#2=n\else
  3553. \if8\@IEEEextractedtoken\let#2=n\else
  3554. \if9\@IEEEextractedtoken\let#2=n\else
  3555. \ifcat,\@IEEEextractedtoken\let#2=g\relax
  3556. \else\ifcat a\@IEEEextractedtoken\let#2=c\relax\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
  3557. \if#2u\relax
  3558. \if0\noexpand#3\relax\else\@IEEEclspkgerror{Invalid character in column specifications}%
  3559. {Only letters, numerals and certain other symbols are allowed \MessageBreak
  3560. as IEEEeqnarray column specifiers.}\fi\fi}
  3561. % usage: \@IEEEgetcurcol{col specifier}
  3562. % verify the letter referenced column exists
  3563. % and return its name in \@IEEEBPcurcolname
  3564. % if column specifier is invalid, use the default column @IEEEdefault
  3565. \def\@IEEEgetcurcol#1{\expandafter\ifx\csname @IEEEeqnarraycolDEF#1\endcsname\@IEEEeqnarraycolisdefined%
  3566. \def\@IEEEBPcurcolname{#1}\else% invalid column name
  3567. \@IEEEclspkgerror{Invalid column type "#1" in column specifications.\MessageBreak
  3568. Using a default centering column instead}%
  3569. {You must define IEEEeqnarray column types before use.}%
  3570. \def\@IEEEBPcurcolname{@IEEEdefault}\fi}
  3571. % usage: \@IEEEgetcurglue{glue specifier}{\output}
  3572. % identify the predefined (punctuation) glue value
  3573. % and return it in the given output macro
  3574. \def\@IEEEgetcurglue#1#2{%
  3575. % ! = \! (neg small) -0.16667em (-3/18 em)
  3576. % , = \, (small) 0.16667em ( 3/18 em)
  3577. % : = \: (med) 0.22222em ( 4/18 em)
  3578. % ; = \; (large) 0.27778em ( 5/18 em)
  3579. % ' = \quad 1em
  3580. % " = \qquad 2em
  3581. % . = 0.5\arraycolsep
  3582. % / = \arraycolsep
  3583. % ? = 2\arraycolsep
  3584. % * = 1fil
  3585. % + = \@IEEEeqnarraycolSEPcenter
  3586. % - = \@IEEEeqnarraycolSEPzero
  3587. % Note that all em values are referenced to the math font (textfont2) fontdimen6
  3588. % value for 1em.
  3589. %
  3590. % use only the very first token to determine the type
  3591. \@IEEEextracttoken{#1}\relax
  3592. \ifx\@IEEEextractedtokensdiscarded\@empty\else
  3593. \typeout{** WARNING: IEEEeqnarray predefined inter-column glue type specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
  3594. \fi
  3595. % get the math font 1em value
  3596. % LaTeX2e's NFSS2 does not preload the fonts, but \IEEEeqnarray needs
  3597. % to gain access to the math (\textfont2) font's spacing parameters.
  3598. % So we create a bogus box here that uses the math font to ensure
  3599. % that \textfont2 is loaded and ready. If this is not done,
  3600. % the \textfont2 stuff here may not work.
  3601. % Thanks to Bernd Raichle for his 1997 post on this topic.
  3602. {\setbox0=\hbox{$\displaystyle\relax$}}%
  3603. % fontdimen6 has the width of 1em (a quad).
  3604. \@IEEEtrantmpdimenA=\fontdimen6\textfont2\relax%
  3605. % identify the glue value based on the first token
  3606. % we discard anything after the first
  3607. \if!\@IEEEextractedtoken\@IEEEtrantmpdimenA=-0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  3608. \if,\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  3609. \if:\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.22222\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  3610. \if;\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.27778\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  3611. \if'\@IEEEextractedtoken\@IEEEtrantmpdimenA=1\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  3612. \if"\@IEEEextractedtoken\@IEEEtrantmpdimenA=2\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  3613. \if.\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.5\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else
  3614. \if/\@IEEEextractedtoken\edef#2{\the\arraycolsep}\else
  3615. \if?\@IEEEextractedtoken\@IEEEtrantmpdimenA=2\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else
  3616. \if *\@IEEEextractedtoken\edef#2{0pt plus 1fil minus 0pt}\else
  3617. \if+\@IEEEextractedtoken\edef#2{\@IEEEeqnarraycolSEPcenter}\else
  3618. \if-\@IEEEextractedtoken\edef#2{\@IEEEeqnarraycolSEPzero}\else
  3619. \edef#2{\@IEEEeqnarraycolSEPzero}%
  3620. \@IEEEclspkgerror{Invalid predefined inter-column glue type "#1" in\MessageBreak
  3621. column specifications. Using a default value of\MessageBreak
  3622. 0pt instead}%
  3623. {Only !,:;'"./?*+ and - are valid predefined glue types in the\MessageBreak
  3624. IEEEeqnarray column specifications.}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
  3625. % usage: \@IEEEprocessNcol{digit}
  3626. % process a numerical digit from the column specification
  3627. % and look up the corresponding user defined glue value
  3628. % can transform current type from n to g or a as the user defined glue is acquired
  3629. \def\@IEEEprocessNcol#1{\if\@IEEEBPprevtype g%
  3630. \@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak
  3631. specifications. Ignoring consecutive glue specifiers\MessageBreak
  3632. after the first}%
  3633. {You cannot have two or more glue types next to each other\MessageBreak
  3634. in the IEEEeqnarray column specifications.}%
  3635. \let\@IEEEBPcurtype=a% abort this glue, future digits will be discarded
  3636. \@IEEEBPcurnum=0\relax%
  3637. \else% if we previously aborted a glue
  3638. \if\@IEEEBPprevtype a\@IEEEBPcurnum=0\let\@IEEEBPcurtype=a%maintain digit abortion
  3639. \else%acquire this number
  3640. % save the previous type before the numerical digits started
  3641. \if\@IEEEBPprevtype n\else\let\@IEEEBPprevsavedtype=\@IEEEBPprevtype\fi%
  3642. \multiply\@IEEEBPcurnum by 10\relax%
  3643. \advance\@IEEEBPcurnum by #1\relax% add in number, \relax is needed to stop TeX's number scan
  3644. \if\@IEEEBPnexttype n\else%close acquisition
  3645. \expandafter\ifx\csname @IEEEeqnarraycolSEPDEF\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname\@IEEEeqnarraycolisdefined%
  3646. \edef\@IEEEBPcurglue{\csname @IEEEeqnarraycolSEP\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname}%
  3647. \else%user glue not defined
  3648. \@IEEEclspkgerror{Invalid user defined inter-column glue type "\number\@IEEEBPcurnum" in\MessageBreak
  3649. column specifications. Using a default value of\MessageBreak
  3650. 0pt instead}%
  3651. {You must define all IEEEeqnarray numerical inter-column glue types via\MessageBreak
  3652. \string\IEEEeqnarraydefcolsep \space before they are used in column specifications.}%
  3653. \edef\@IEEEBPcurglue{\@IEEEeqnarraycolSEPzero}%
  3654. \fi% glue defined or not
  3655. \let\@IEEEBPcurtype=g% change the type to reflect the acquired glue
  3656. \let\@IEEEBPprevtype=\@IEEEBPprevsavedtype% restore the prev type before this number glue
  3657. \@IEEEBPcurnum=0\relax%ready for next acquisition
  3658. \fi%close acquisition, get glue
  3659. \fi%discard or acquire number
  3660. \fi%prevtype glue or not
  3661. }
  3662. % process an acquired glue
  3663. % add any acquired column/glue pair to the preamble
  3664. \def\@IEEEprocessGcol{\if\@IEEEBPprevtype a\let\@IEEEBPcurtype=a%maintain previous glue abortions
  3665. \else
  3666. % if this is the start glue, save it, but do nothing else
  3667. % as this is not used in the preamble, but before
  3668. \if\@IEEEBPprevtype s\edef\@IEEEBPstartglue{\@IEEEBPcurglue}%
  3669. \else%not the start glue
  3670. \if\@IEEEBPprevtype g%ignore if back to back glues
  3671. \@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak
  3672. specifications. Ignoring consecutive glue specifiers\MessageBreak
  3673. after the first}%
  3674. {You cannot have two or more glue types next to each other\MessageBreak
  3675. in the IEEEeqnarray column specifications.}%
  3676. \let\@IEEEBPcurtype=a% abort this glue
  3677. \else% not a back to back glue
  3678. \if\@IEEEBPprevtype c\relax% if the previoustype was a col, add column/glue pair to preamble
  3679. \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi
  3680. \toks0={##}%
  3681. % make preamble advance col counter if this environment needs this
  3682. \if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi
  3683. % insert the column defintion into the preamble, being careful not to expand
  3684. % the column definition
  3685. \@IEEEappendtoksA{\tabskip=\@IEEEBPcurglue}%
  3686. \@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}%
  3687. \@IEEEappendtoksA{\@IEEEBPcurcolname}%
  3688. \@IEEEappendNOEXPANDtoksA{\endcsname}%
  3689. \@IEEEappendtoksA{\the\toks0}%
  3690. \@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax%
  3691. \relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}%
  3692. \@IEEEappendtoksA{\@IEEEBPcurcolname}%
  3693. \@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax%
  3694. \relax\relax\relax\relax\relax\endgroup}%
  3695. \advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble
  3696. \else% error: non-start glue with no pending column
  3697. \@IEEEclspkgerror{Inter-column glue specifier without a prior column\MessageBreak
  3698. type in the column specifications. Ignoring this glue\MessageBreak
  3699. specifier}%
  3700. {Except for the first and last positions, glue can be placed only\MessageBreak
  3701. between column types.}%
  3702. \let\@IEEEBPcurtype=a% abort this glue
  3703. \fi% previous was a column
  3704. \fi% back-to-back glues
  3705. \fi% is start column glue
  3706. \fi% prev type not a
  3707. }
  3708. % process an acquired letter referenced column and, if necessary, add it to the preamble
  3709. \def\@IEEEprocessCcol{\if\@IEEEBPnexttype g\else
  3710. \if\@IEEEBPnexttype n\else
  3711. % we have a column followed by something other than a glue (or numeral glue)
  3712. % so we must add this column to the preamble now
  3713. \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi%col separator for those after the first
  3714. \if\@IEEEBPnexttype e\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue\relax}\else%put in end glue
  3715. \@IEEEappendtoksA{\tabskip=\@IEEEeqnarraycolSEPdefaultmid\relax}\fi% or default mid glue
  3716. \toks0={##}%
  3717. % make preamble advance col counter if this environment needs this
  3718. \if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi
  3719. % insert the column definition into the preamble, being careful not to expand
  3720. % the column definition
  3721. \@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}%
  3722. \@IEEEappendtoksA{\@IEEEBPcurcolname}%
  3723. \@IEEEappendNOEXPANDtoksA{\endcsname}%
  3724. \@IEEEappendtoksA{\the\toks0}%
  3725. \@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax%
  3726. \relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}%
  3727. \@IEEEappendtoksA{\@IEEEBPcurcolname}%
  3728. \@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax%
  3729. \relax\relax\relax\relax\relax\endgroup}%
  3730. \advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble
  3731. \fi%next type not numeral
  3732. \fi%next type not glue
  3733. }
  3734. %%
  3735. %% END OF IEEEeqnarray DEFINITIONS
  3736. %%
  3737. % set up the running headers and footers
  3738. %
  3739. % header and footer font and size specifications
  3740. \def\@IEEEheaderstyle{\normalfont\scriptsize}
  3741. \def\@IEEEfooterstyle{\normalfont\scriptsize}
  3742. %
  3743. % compsoc uses sans-serif headers and footers
  3744. \ifCLASSOPTIONcompsoc
  3745. \def\@IEEEheaderstyle{\normalfont\sffamily\scriptsize}
  3746. \def\@IEEEfooterstyle{\normalfont\sffamily\scriptsize}
  3747. \fi
  3748. % standard page style, ps@headings
  3749. \def\ps@headings{% default to standard twoside headers, no footers
  3750. % will change later if the mode requires otherwise
  3751. \def\@oddhead{\hbox{}\@IEEEheaderstyle\rightmark\hfil\thepage}\relax
  3752. \def\@evenhead{\@IEEEheaderstyle\thepage\hfil\leftmark\hbox{}}\relax
  3753. \let\@oddfoot\@empty
  3754. \let\@evenfoot\@empty
  3755. \ifCLASSOPTIONtechnote
  3756. % technote twoside
  3757. \def\@oddhead{\hbox{}\@IEEEheaderstyle\leftmark\hfil\thepage}\relax
  3758. \def\@evenhead{\@IEEEheaderstyle\thepage\hfil\leftmark\hbox{}}\relax
  3759. \fi
  3760. \ifCLASSOPTIONdraftcls
  3761. % draft footers
  3762. \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax
  3763. \def\@evenfoot{\@IEEEfooterstyle DRAFT\hfil\@date}\relax
  3764. \fi
  3765. % oneside
  3766. \if@twoside\else
  3767. % standard one side headers
  3768. \def\@oddhead{\hbox{}\@IEEEheaderstyle\leftmark\hfil\thepage}\relax
  3769. \let\@evenhead\@empty
  3770. \ifCLASSOPTIONdraftcls
  3771. % oneside draft footers
  3772. \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax
  3773. \let\@evenfoot\@empty
  3774. \fi
  3775. \fi
  3776. % turn off headers for conferences
  3777. \ifCLASSOPTIONconference
  3778. \let\@oddhead\@empty
  3779. \let\@evenhead\@empty
  3780. \fi
  3781. % turn off footers for draftclsnofoot
  3782. \ifCLASSOPTIONdraftclsnofoot
  3783. \let\@oddfoot\@empty
  3784. \let\@evenfoot\@empty
  3785. \fi}
  3786. % title page style, ps@IEEEtitlepagestyle
  3787. \def\ps@IEEEtitlepagestyle{% default title page headers, no footers
  3788. \def\@oddhead{\hbox{}\@IEEEheaderstyle\leftmark\hfil\thepage}\relax
  3789. \def\@evenhead{\@IEEEheaderstyle\thepage\hfil\leftmark\hbox{}}\relax
  3790. \let\@oddfoot\@empty
  3791. \let\@evenfoot\@empty
  3792. % will change later if the mode requires otherwise
  3793. \ifCLASSOPTIONdraftcls
  3794. % draft footers
  3795. \ifCLASSOPTIONdraftclsnofoot\else
  3796. % but only if not draftclsnofoot
  3797. \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax
  3798. \def\@evenfoot{\@IEEEfooterstyle DRAFT\hfil\@date}\relax
  3799. \fi
  3800. \else
  3801. % all nondraft mode footers
  3802. \if@IEEEusingpubid
  3803. % for title pages that are using a pubid
  3804. % do not repeat pubid on the title page if using a peer review cover page
  3805. \ifCLASSOPTIONpeerreview\else
  3806. % for noncompsoc papers, the pubid uses footnotesize and
  3807. % is at the same vertical position as where the last baseline would normally be
  3808. \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
  3809. \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
  3810. \ifCLASSOPTIONcompsoc
  3811. % for compsoc papers, the pubid is at the same vertical position as the normal footer
  3812. \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
  3813. \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
  3814. \fi
  3815. \fi
  3816. \fi
  3817. \fi
  3818. % turn off headers for conferences
  3819. \ifCLASSOPTIONconference
  3820. \let\@oddhead\@empty
  3821. \let\@evenhead\@empty
  3822. \fi}
  3823. % peer review cover page style, ps@IEEEpeerreviewcoverpagestyle
  3824. \def\ps@IEEEpeerreviewcoverpagestyle{% default peer review cover no headers, no footers
  3825. \let\@oddhead\@empty
  3826. \let\@evenhead\@empty
  3827. \let\@oddfoot\@empty
  3828. \let\@evenfoot\@empty
  3829. % will change later if the mode requires otherwise
  3830. \ifCLASSOPTIONdraftcls
  3831. % draft footers
  3832. \ifCLASSOPTIONdraftclsnofoot\else
  3833. % but only if not draftclsnofoot
  3834. \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax
  3835. \def\@evenfoot{\@IEEEfooterstyle DRAFT\hfil\@date}\relax
  3836. \fi
  3837. \else
  3838. % all nondraft mode footers
  3839. \if@IEEEusingpubid
  3840. % for peer review cover pages that are using a pubid
  3841. % for noncompsoc papers, the pubid uses footnotesize and
  3842. % is at the same vertical position as where the last baseline would normally be
  3843. \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
  3844. \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
  3845. \ifCLASSOPTIONcompsoc
  3846. % for compsoc papers, the pubid is at the same vertical position as the normal footer
  3847. \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
  3848. \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
  3849. \fi
  3850. \fi
  3851. \fi}
  3852. %% Defines the command for putting the header.
  3853. %% Note that all the text is forced into uppercase, if you have some text
  3854. %% that needs to be in lower case, for instance et. al., then either manually
  3855. %% set \leftmark and \rightmark or use \MakeLowercase{et. al.} within the
  3856. %% arguments to \markboth.
  3857. %% V1.7b add \protect to work with Babel
  3858. \def\markboth#1#2{\def\leftmark{\MakeUppercase{\protect#1}}%
  3859. \def\rightmark{\MakeUppercase{\protect#2}}}
  3860. \def\today{\ifcase\month\or
  3861. January\or February\or March\or April\or May\or June\or
  3862. July\or August\or September\or October\or November\or December\fi
  3863. \space\number\day, \number\year}
  3864. %% CITATION AND BIBLIOGRAPHY COMMANDS
  3865. %%
  3866. %% V1.6 no longer supports the older, nonstandard \shortcite and \citename setup stuff
  3867. %
  3868. %
  3869. % Modify Latex2e \@citex to separate citations with "], ["
  3870. \def\@citex[#1]#2{%
  3871. \let\@citea\@empty
  3872. \@cite{\@for\@citeb:=#2\do
  3873. {\@citea\def\@citea{], [}%
  3874. \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
  3875. \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
  3876. \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
  3877. \G@refundefinedtrue
  3878. \@latex@warning
  3879. {Citation `\@citeb' on page \thepage \space undefined}}%
  3880. {\hbox{\csname b@\@citeb\endcsname}}}}{#1}}
  3881. % V1.6 we create hooks for the optional use of Donald Arseneau's
  3882. % cite.sty package. cite.sty is "smart" and will notice that the
  3883. % following format controls are already defined and will not
  3884. % redefine them. The result will be the proper sorting of the
  3885. % citation numbers and auto detection of 3 or more entry "ranges" -
  3886. % all in IEEE style: [1], [2], [5]--[7], [12]
  3887. % This also allows for an optional note, i.e., \cite[mynote]{..}.
  3888. % If the \cite with note has more than one reference, the note will
  3889. % be applied to the last of the listed references. It is generally
  3890. % desired that if a note is given, only one reference is listed in
  3891. % that \cite.
  3892. % Thanks to Mr. Arseneau for providing the required format arguments
  3893. % to produce the IEEE style.
  3894. \def\citepunct{], [}
  3895. \def\citedash{]--[}
  3896. % V1.7 default to using same font for urls made by url.sty
  3897. \AtBeginDocument{\csname url@samestyle\endcsname}
  3898. % V1.6 class files should always provide these
  3899. \def\newblock{\hskip .11em\@plus.33em\@minus.07em}
  3900. \let\@openbib@code\@empty
  3901. % V1.8b article.cls is now providing these too
  3902. % we do not use \@mkboth, nor alter the page style
  3903. \newenvironment{theindex}
  3904. {\if@twocolumn
  3905. \@restonecolfalse
  3906. \else
  3907. \@restonecoltrue
  3908. \fi
  3909. \twocolumn[\section*{\indexname}]%
  3910. \parindent\z@
  3911. \parskip\z@ \@plus .3\p@\relax
  3912. \columnseprule \z@
  3913. \columnsep 35\p@
  3914. \let\item\@idxitem}
  3915. {\if@restonecol\onecolumn\else\clearpage\fi}
  3916. \newcommand\@idxitem{\par\hangindent 40\p@}
  3917. \newcommand\subitem{\@idxitem \hspace*{20\p@}}
  3918. \newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
  3919. \newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
  3920. % Provide support for the control entries of IEEEtran.bst V1.00 and later.
  3921. % V1.7 optional argument allows for a different aux file to be specified in
  3922. % order to handle multiple bibliographies. For example, with multibib.sty:
  3923. % \newcites{sec}{Secondary Literature}
  3924. % \bstctlcite[@auxoutsec]{BSTcontrolhak}
  3925. \def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
  3926. \def\@bstctlcite[#1]#2{\@bsphack
  3927. \@for\@citeb:=#2\do{%
  3928. \edef\@citeb{\expandafter\@firstofone\@citeb}%
  3929. \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}%
  3930. \@esphack}
  3931. % \IEEEnoauxwrite{} allows for citations that do not add to or affect
  3932. % the order of the existing citation list. Can be useful for \cite
  3933. % within \thanks{}.
  3934. \DeclareRobustCommand{\IEEEnoauxwrite}[1]{\relax
  3935. \if@filesw
  3936. \@fileswfalse
  3937. #1\relax\relax\relax\relax\relax
  3938. \@fileswtrue
  3939. \else
  3940. #1\relax\relax\relax\relax\relax
  3941. \fi}
  3942. % V1.6 provide a way for a user to execute a command just before
  3943. % a given reference number - used to insert a \newpage to balance
  3944. % the columns on the last page
  3945. \edef\@IEEEtriggerrefnum{0} % the default of zero means that
  3946. % the command is not executed
  3947. \def\@IEEEtriggercmd{\newpage}
  3948. % allow the user to alter the triggered command
  3949. \long\def\IEEEtriggercmd#1{\long\def\@IEEEtriggercmd{#1}}
  3950. % allow user a way to specify the reference number just before the
  3951. % command is executed
  3952. \def\IEEEtriggeratref#1{\@IEEEtrantmpcountA=#1%
  3953. \edef\@IEEEtriggerrefnum{\the\@IEEEtrantmpcountA}}%
  3954. % trigger command at the given reference
  3955. \def\@IEEEbibitemprefix{\@IEEEtrantmpcountA=\@IEEEtriggerrefnum\relax%
  3956. \advance\@IEEEtrantmpcountA by -1\relax%
  3957. \ifnum\c@enumiv=\@IEEEtrantmpcountA\relax\@IEEEtriggercmd\relax\fi}
  3958. \def\@biblabel#1{[#1]}
  3959. % compsoc journals and conferences left align the reference numbers
  3960. \@IEEEcompsoconly{\def\@biblabel#1{[#1]\hfill}}
  3961. % controls bib item spacing
  3962. \def\IEEEbibitemsep{0pt plus .5pt}
  3963. \@IEEEcompsocconfonly{\def\IEEEbibitemsep{0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}}
  3964. \def\thebibliography#1{\section*{\refname}%
  3965. \addcontentsline{toc}{section}{\refname}%
  3966. % V1.6 add some rubber space here and provide a command trigger
  3967. \footnotesize\vskip 0.3\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip%
  3968. \list{\@biblabel{\@arabic\c@enumiv}}%
  3969. {\settowidth\labelwidth{\@biblabel{#1}}%
  3970. \leftmargin\labelwidth
  3971. \advance\leftmargin\labelsep\relax
  3972. \itemsep \IEEEbibitemsep\relax
  3973. \usecounter{enumiv}%
  3974. \let\p@enumiv\@empty
  3975. \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  3976. \let\@IEEElatexbibitem\bibitem%
  3977. \def\bibitem{\@IEEEbibitemprefix\@IEEElatexbibitem}%
  3978. \def\newblock{\hskip .11em plus .33em minus .07em}%
  3979. % originally:
  3980. % \sloppy\clubpenalty4000\widowpenalty4000%
  3981. % by adding the \interlinepenalty here, we make it more
  3982. % difficult, but not impossible, for LaTeX to break within a reference.
  3983. % The IEEE almost never breaks a reference (but they do it more often with
  3984. % technotes). You may get an underfull vbox warning around the bibliography,
  3985. % but the final result will be much more like what the IEEE will publish.
  3986. % MDS 11/2000
  3987. \ifCLASSOPTIONtechnote\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty100%
  3988. \else\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty500\fi%
  3989. \sfcode`\.=1000\relax}
  3990. \let\endthebibliography=\endlist
  3991. % TITLE PAGE COMMANDS
  3992. %
  3993. %
  3994. % \IEEEmembership is used to produce the sublargesize italic font used to indicate author
  3995. % IEEE membership. compsoc uses a large size sans slant font
  3996. \def\IEEEmembership#1{{\@IEEEnotcompsoconly{\sublargesize}\normalfont\@IEEEcompsoconly{\sffamily}\textit{#1}}}
  3997. % \IEEEauthorrefmark{} produces a footnote type symbol to indicate author affiliation.
  3998. % When given an argument of 1 to 9, \IEEEauthorrefmark{} follows the standard LaTeX footnote
  3999. % symbol sequence convention. However, for arguments 10 and above, \IEEEauthorrefmark{}
  4000. % reverts to using lower case roman numerals, so it cannot overflow. Do note that you
  4001. % cannot use \footnotemark[] in place of \IEEEauthorrefmark{} within \author as the footnote
  4002. % symbols will have been turned off to prevent \thanks from creating footnote marks.
  4003. % \IEEEauthorrefmark{} produces a symbol that appears to LaTeX as having zero vertical
  4004. % height - this allows for a more compact line packing, but the user must ensure that
  4005. % the interline spacing is large enough to prevent \IEEEauthorrefmark{} from colliding
  4006. % with the text above.
  4007. % V1.7 make this a robust command
  4008. % V1.8 transmag uses an arabic author affiliation symbol
  4009. \ifCLASSOPTIONtransmag
  4010. \DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize #1}}}
  4011. \else
  4012. \DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or%
  4013. \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger%
  4014. \or \ddagger\ddagger \else\textsuperscript{\expandafter\romannumeral#1}\fi}}}}
  4015. \fi
  4016. % FONT CONTROLS AND SPACINGS FOR CONFERENCE MODE AUTHOR NAME AND AFFILIATION BLOCKS
  4017. %
  4018. % The default font styles for the author name and affiliation blocks (confmode)
  4019. \def\@IEEEauthorblockNstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize}
  4020. \def\@IEEEauthorblockAstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\@IEEEcompsocconfonly{\itshape}\normalsize}
  4021. % The default if the user does not use an author block
  4022. \def\@IEEEauthordefaulttextstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize}
  4023. % adjustment spacing from title (or special paper notice) to author name blocks (confmode)
  4024. % can be negative
  4025. \def\@IEEEauthorblockconfadjspace{-0.25em}
  4026. % compsoc conferences need more space here
  4027. \@IEEEcompsocconfonly{\def\@IEEEauthorblockconfadjspace{0.75\@IEEEnormalsizeunitybaselineskip}}
  4028. % spacing between name and affiliation blocks (confmode)
  4029. % This can be negative.
  4030. % The IEEE doesn't want any added spacing here, but I will leave these
  4031. % controls in place in case they ever change their mind.
  4032. % Personally, I like 0.75ex.
  4033. %\def\@IEEEauthorblockNtopspace{0.75ex}
  4034. %\def\@IEEEauthorblockAtopspace{0.75ex}
  4035. \def\@IEEEauthorblockNtopspace{0.0ex}
  4036. \def\@IEEEauthorblockAtopspace{0.0ex}
  4037. \ifCLASSOPTIONtransmag
  4038. % transmag uses one line of space above first affiliation block
  4039. \def\@IEEEauthorblockAtopspace{1\@IEEEnormalsizeunitybaselineskip}
  4040. \fi
  4041. % baseline spacing within name and affiliation blocks (confmode)
  4042. % must be positive, spacings below certain values will make
  4043. % the position of line of text sensitive to the contents of the
  4044. % line above it i.e., whether or not the prior line has descenders,
  4045. % subscripts, etc. For this reason it is a good idea to keep
  4046. % these above 2.6ex
  4047. \def\@IEEEauthorblockNinterlinespace{2.6ex}
  4048. \def\@IEEEauthorblockAinterlinespace{2.75ex}
  4049. % This tracks the required strut size.
  4050. % See the \@IEEEauthorhalign command for the actual default value used.
  4051. \def\@IEEEauthorblockXinterlinespace{2.7ex}
  4052. % variables to retain font size and style across groups
  4053. % values given here have no effect as they will be overwritten later
  4054. \gdef\@IEEESAVESTATEfontsize{10}
  4055. \gdef\@IEEESAVESTATEfontbaselineskip{12}
  4056. \gdef\@IEEESAVESTATEfontencoding{OT1}
  4057. \gdef\@IEEESAVESTATEfontfamily{ptm}
  4058. \gdef\@IEEESAVESTATEfontseries{m}
  4059. \gdef\@IEEESAVESTATEfontshape{n}
  4060. % saves the current font attributes
  4061. \def\@IEEEcurfontSAVE{\global\let\@IEEESAVESTATEfontsize\f@size%
  4062. \global\let\@IEEESAVESTATEfontbaselineskip\f@baselineskip%
  4063. \global\let\@IEEESAVESTATEfontencoding\f@encoding%
  4064. \global\let\@IEEESAVESTATEfontfamily\f@family%
  4065. \global\let\@IEEESAVESTATEfontseries\f@series%
  4066. \global\let\@IEEESAVESTATEfontshape\f@shape}
  4067. % restores the saved font attributes
  4068. \def\@IEEEcurfontRESTORE{\fontsize{\@IEEESAVESTATEfontsize}{\@IEEESAVESTATEfontbaselineskip}%
  4069. \fontencoding{\@IEEESAVESTATEfontencoding}%
  4070. \fontfamily{\@IEEESAVESTATEfontfamily}%
  4071. \fontseries{\@IEEESAVESTATEfontseries}%
  4072. \fontshape{\@IEEESAVESTATEfontshape}%
  4073. \selectfont}
  4074. % variable to indicate if the current block is the first block in the column
  4075. \newif\if@IEEEprevauthorblockincol \@IEEEprevauthorblockincolfalse
  4076. % the command places a strut with height and depth = \@IEEEauthorblockXinterlinespace
  4077. % we use this technique to have complete manual control over the spacing of the lines
  4078. % within the halign environment.
  4079. % We set the below baseline portion at 30%, the above
  4080. % baseline portion at 70% of the total length.
  4081. % Responds to changes in the document's \baselinestretch
  4082. \def\@IEEEauthorstrutrule{\@IEEEtrantmpdimenA\@IEEEauthorblockXinterlinespace%
  4083. \@IEEEtrantmpdimenA=\baselinestretch\@IEEEtrantmpdimenA%
  4084. \rule[-0.3\@IEEEtrantmpdimenA]{0pt}{\@IEEEtrantmpdimenA}}
  4085. % blocks to hold the authors' names and affilations.
  4086. % Makes formatting easy for conferences
  4087. %
  4088. % use real definitions in conference mode
  4089. % name block
  4090. \def\IEEEauthorblockN#1{\relax\@IEEEauthorblockNstyle% set the default text style
  4091. \gdef\@IEEEauthorblockXinterlinespace{0pt}% disable strut for spacer row
  4092. % the \expandafter hides the \cr in conditional tex, see the array.sty docs
  4093. % for details, probably not needed here as the \cr is in a macro
  4094. % do a spacer row if needed
  4095. \if@IEEEprevauthorblockincol\expandafter\@IEEEauthorblockNtopspaceline\fi
  4096. \global\@IEEEprevauthorblockincoltrue% we now have a block in this column
  4097. %restore the correct strut value
  4098. \gdef\@IEEEauthorblockXinterlinespace{\@IEEEauthorblockNinterlinespace}%
  4099. % input the author names
  4100. #1%
  4101. % end the row if the user did not already
  4102. \crcr}
  4103. % spacer row for names
  4104. \def\@IEEEauthorblockNtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockNtopspace}}
  4105. %
  4106. % affiliation block
  4107. \def\IEEEauthorblockA#1{\relax\@IEEEauthorblockAstyle% set the default text style
  4108. \gdef\@IEEEauthorblockXinterlinespace{0pt}%disable strut for spacer row
  4109. % the \expandafter hides the \cr in conditional tex, see the array.sty docs
  4110. % for details, probably not needed here as the \cr is in a macro
  4111. % do a spacer row if needed
  4112. \if@IEEEprevauthorblockincol\expandafter\@IEEEauthorblockAtopspaceline\fi
  4113. \global\@IEEEprevauthorblockincoltrue% we now have a block in this column
  4114. %restore the correct strut value
  4115. \gdef\@IEEEauthorblockXinterlinespace{\@IEEEauthorblockAinterlinespace}%
  4116. % input the author affiliations
  4117. #1%
  4118. % end the row if the user did not already
  4119. \crcr
  4120. % V1.8 transmag does not use any additional affiliation spacing after the first author
  4121. \ifCLASSOPTIONtransmag\gdef\@IEEEauthorblockAtopspace{0pt}\fi}
  4122. % spacer row for affiliations
  4123. \def\@IEEEauthorblockAtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockAtopspace}}
  4124. % allow papers to compile even if author blocks are used in modes other
  4125. % than conference or peerreviewca. For such cases, we provide dummy blocks.
  4126. \ifCLASSOPTIONconference
  4127. \else
  4128. \ifCLASSOPTIONpeerreviewca\else
  4129. % not conference, peerreviewca or transmag mode
  4130. \ifCLASSOPTIONtransmag\else
  4131. \def\IEEEauthorblockN#1{#1}%
  4132. \def\IEEEauthorblockA#1{#1}%
  4133. \fi
  4134. \fi
  4135. \fi
  4136. % we provide our own halign so as not to have to depend on tabular
  4137. \def\@IEEEauthorhalign{\@IEEEauthordefaulttextstyle% default text style
  4138. \lineskip=0pt\relax% disable line spacing
  4139. \lineskiplimit=0pt\relax%
  4140. \baselineskip=0pt\relax%
  4141. \@IEEEcurfontSAVE% save the current font
  4142. \mathsurround\z@\relax% no extra spacing around math
  4143. \let\\\@IEEEauthorhaligncr% replace newline with halign friendly one
  4144. \tabskip=0pt\relax% no column spacing
  4145. \everycr{}% ensure no problems here
  4146. \@IEEEprevauthorblockincolfalse% no author blocks yet
  4147. \def\@IEEEauthorblockXinterlinespace{2.7ex}% default interline space
  4148. \vtop\bgroup%vtop box
  4149. \halign\bgroup&\relax\hfil\@IEEEcurfontRESTORE\relax ##\relax
  4150. \hfil\@IEEEcurfontSAVE\@IEEEauthorstrutrule\cr}
  4151. % ensure last line, exit from halign, close vbox
  4152. \def\end@IEEEauthorhalign{\crcr\egroup\egroup}
  4153. % handle bogus star form
  4154. \def\@IEEEauthorhaligncr{{\ifnum0=`}\fi\@ifstar{\@@IEEEauthorhaligncr}{\@@IEEEauthorhaligncr}}
  4155. % test and setup the optional argument to \\[]
  4156. \def\@@IEEEauthorhaligncr{\@testopt\@@@IEEEauthorhaligncr\z@skip}
  4157. % end the line and do the optional spacer
  4158. \def\@@@IEEEauthorhaligncr[#1]{\ifnum0=`{\fi}\cr\noalign{\vskip#1\relax}}
  4159. % flag to prevent multiple \and warning messages
  4160. \newif\if@IEEEWARNand
  4161. \@IEEEWARNandtrue
  4162. % if in conference or peerreviewca modes, we support the use of \and as \author is a
  4163. % tabular environment, otherwise we warn the user that \and is invalid
  4164. % outside of conference or peerreviewca modes.
  4165. \def\and{\relax} % provide a bogus \and that we will then override
  4166. \renewcommand{\and}[1][\relax]{\if@IEEEWARNand\typeout{** WARNING: \noexpand\and is valid only
  4167. when in conference or peerreviewca}\typeout{modes (line \the\inputlineno).}\fi\global\@IEEEWARNandfalse}
  4168. \ifCLASSOPTIONconference%
  4169. \renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
  4170. \fi
  4171. \ifCLASSOPTIONpeerreviewca
  4172. \renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
  4173. \fi
  4174. % V1.8 transmag uses conference author format
  4175. \ifCLASSOPTIONtransmag
  4176. \renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
  4177. \fi
  4178. % page clearing command
  4179. % based on LaTeX2e's \cleardoublepage, but allows different page styles
  4180. % for the inserted blank pages
  4181. \def\@IEEEcleardoublepage#1{\clearpage\if@twoside\ifodd\c@page\else
  4182. \hbox{}\thispagestyle{#1}\newpage\if@twocolumn\hbox{}\thispagestyle{#1}\newpage\fi\fi\fi}
  4183. % V1.8b hooks to allow adjustment of space above title
  4184. \def\IEEEtitletopspace{0.5\baselineskip}
  4185. % an added extra amount to allow for adjustment/offset
  4186. \def\IEEEtitletopspaceextra{0pt}
  4187. % user command to invoke the title page
  4188. \def\maketitle{\par%
  4189. \begingroup%
  4190. \normalfont%
  4191. \def\thefootnote{}% the \thanks{} mark type is empty
  4192. \def\footnotemark{}% and kill space from \thanks within author
  4193. \let\@makefnmark\relax% V1.7, must *really* kill footnotemark to remove all \textsuperscript spacing as well.
  4194. \footnotesize% equal spacing between thanks lines
  4195. \footnotesep 0.7\baselineskip%see global setting of \footnotesep for more info
  4196. % V1.7 disable \thanks note indention for compsoc
  4197. \@IEEEcompsoconly{\long\def\@makefntext##1{\parindent 1em\noindent\hbox{\@makefnmark}##1}}%
  4198. \normalsize%
  4199. \ifCLASSOPTIONpeerreview
  4200. \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
  4201. \thispagestyle{IEEEpeerreviewcoverpagestyle}\@thanks%
  4202. \else
  4203. \if@twocolumn%
  4204. \ifCLASSOPTIONtechnote%
  4205. \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
  4206. \else
  4207. \twocolumn[{\IEEEquantizevspace{\@maketitle}[\IEEEquantizedisabletitlecmds]{0pt}[-\topskip]{\baselineskip}{\@IEEENORMtitlevspace}{\@IEEEMINtitlevspace}\@IEEEaftertitletext}]%
  4208. \fi
  4209. \else
  4210. \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
  4211. \fi
  4212. \thispagestyle{IEEEtitlepagestyle}\@thanks%
  4213. \fi
  4214. % pullup page for pubid if used.
  4215. \if@IEEEusingpubid
  4216. \enlargethispage{-\@IEEEpubidpullup}%
  4217. \fi
  4218. \endgroup
  4219. \setcounter{footnote}{0}\let\maketitle\relax\let\@maketitle\relax
  4220. \gdef\@thanks{}%
  4221. % v1.6b do not clear these as we will need the title again for peer review papers
  4222. % \gdef\@author{}\gdef\@title{}%
  4223. \let\thanks\relax}
  4224. % V1.8 parbox to format \@IEEEtitleabstractindextext
  4225. \long\def\@IEEEtitleabstractindextextbox#1{\parbox{1\textwidth}{#1}}
  4226. % V1.8 compsoc is partial width
  4227. \ifCLASSOPTIONcompsoc
  4228. % comparison with proofs suggests it's in the range of 92.1-92.3%
  4229. \long\def\@IEEEtitleabstractindextextbox#1{\parbox{0.922\textwidth}{\@IEEEcompsocnotconfonly{\rightskip\@flushglue\leftskip\z@skip}#1}}
  4230. \fi
  4231. % formats the Title, authors names, affiliations and special paper notice
  4232. % THIS IS A CONTROLLED SPACING COMMAND! Do not allow blank lines or unintentional
  4233. % spaces to enter the definition - use % at the end of each line
  4234. \def\@maketitle{\newpage
  4235. \bgroup\par\vskip\IEEEtitletopspace\vskip\IEEEtitletopspaceextra\centering%
  4236. \ifCLASSOPTIONtechnote% technotes, V1.8a abstract and index terms are not treated differently for compsoc technotes
  4237. {\bfseries\large\@IEEEcompsoconly{\Large\sffamily}\@title\par}\vskip 1.3em{\lineskip .5em\@IEEEcompsoconly{\large\sffamily}\@author
  4238. \@IEEEspecialpapernotice\par}\relax
  4239. \else% not a technote
  4240. \vskip0.2em{\Huge\ifCLASSOPTIONtransmag\bfseries\LARGE\fi\@IEEEcompsoconly{\sffamily}\@IEEEcompsocconfonly{\normalfont\normalsize\vskip 2\@IEEEnormalsizeunitybaselineskip
  4241. \bfseries\Large}\@IEEEcompsocnotconfonly{\vskip 0.75\@IEEEnormalsizeunitybaselineskip}\@title\par}\relax
  4242. \@IEEEcompsocnotconfonly{\vskip 0.5\@IEEEnormalsizeunitybaselineskip}\vskip1.0em\par%
  4243. % V1.6 handle \author differently if in conference mode
  4244. \ifCLASSOPTIONconference%
  4245. {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
  4246. \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par}\relax
  4247. \else% peerreviewca, peerreview or journal
  4248. \ifCLASSOPTIONpeerreviewca
  4249. % peerreviewca handles author names just like conference mode
  4250. {\@IEEEcompsoconly{\sffamily}\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
  4251. \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par
  4252. {\@IEEEcompsoconly{\vskip 1.5em\relax
  4253. \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill
  4254. \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
  4255. \else% journal, peerreview or transmag
  4256. \ifCLASSOPTIONtransmag
  4257. % transmag also handles author names just like conference mode
  4258. % it also uses \@IEEEtitleabstractindextex, but with one line less
  4259. % space above, and one more below
  4260. {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
  4261. \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par
  4262. {\vspace{0.5\baselineskip}\relax\@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\vspace{-1\baselineskip}\par}}\relax
  4263. \else% journal or peerreview
  4264. {\lineskip.5em\@IEEEcompsoconly{\sffamily}\sublargesize\@author\@IEEEspecialpapernotice\par
  4265. {\@IEEEcompsoconly{\vskip 1.5em\relax
  4266. \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill
  4267. \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
  4268. \fi
  4269. \fi
  4270. \fi
  4271. \fi\par\addvspace{0.5\baselineskip}\egroup}
  4272. % V1.7 Computer Society "diamond line" which follows index terms for nonconference papers
  4273. % V1.8a full width diamond line for single column use
  4274. \def\@IEEEcompsocdiamondlinei{\vrule depth 0pt height 0.5pt width 4cm\nobreak\hspace{7.5pt}\nobreak
  4275. \raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak
  4276. \hspace{7.5pt}\nobreak\vrule depth 0pt height 0.5pt width 4cm\relax}
  4277. % V1.8a narrower width diamond line for double column use
  4278. \def\@IEEEcompsocdiamondlineii{\vrule depth 0pt height 0.5pt width 2.5cm\nobreak\hspace{7.5pt}\nobreak
  4279. \raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak
  4280. \hspace{7.5pt}\nobreak\vrule depth 0pt height 0.5pt width 2.5cm\relax}
  4281. % V1.8a bare core without rules to base a last resort on for very narrow linewidths
  4282. \def\@IEEEcompsocdiamondlineiii{\mbox{}\nobreak\hspace{7.5pt}\nobreak
  4283. \raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak
  4284. \hspace{7.5pt}\nobreak\mbox{}\relax}
  4285. % V1.8a allow \IEEEcompsocdiamondline to adjust for different linewidths.
  4286. % Use \@IEEEcompsocdiamondlinei if its width is less than 0.66\linewidth (0.487 nominal for single column)
  4287. % if not, fall back to \@IEEEcompsocdiamondlineii if its width is less than 0.75\linewidth (0.659 nominal for double column)
  4288. % if all else fails, try to make a custom diamondline based on the abnormally narrow linewidth
  4289. \def\IEEEcompsocdiamondline{\settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlinei}\relax
  4290. \ifdim\@IEEEtrantmpdimenA<0.66\linewidth\relax\@IEEEcompsocdiamondlinei\relax
  4291. \else
  4292. \settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlineii}\relax
  4293. \ifdim\@IEEEtrantmpdimenA<0.75\linewidth\relax\@IEEEcompsocdiamondlineii\relax
  4294. \else
  4295. \settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlineiii}\relax
  4296. \@IEEEtrantmpdimenB=\linewidth\relax
  4297. \addtolength{\@IEEEtrantmpdimenB}{-1\@IEEEtrantmpdimenA}\relax
  4298. \vrule depth 0pt height 0.5pt width 0.33\@IEEEtrantmpdimenB\@IEEEcompsocdiamondlineiii\vrule depth 0pt height 0.5pt width 0.33\@IEEEtrantmpdimenB\relax
  4299. \fi\fi}
  4300. % V1.7 standard LateX2e \thanks, but with \itshape under compsoc. Also make it a \long\def
  4301. % We also need to trigger the one-shot footnote rule
  4302. \def\@IEEEtriggeroneshotfootnoterule{\global\@IEEEenableoneshotfootnoteruletrue}
  4303. \long\def\thanks#1{\footnotemark
  4304. \protected@xdef\@thanks{\@thanks
  4305. \protect\footnotetext[\the\c@footnote]{\@IEEEcompsoconly{\itshape
  4306. \protect\@IEEEtriggeroneshotfootnoterule\relax}\ignorespaces#1}}}
  4307. \let\@thanks\@empty
  4308. % V1.7 allow \author to contain \par's. This is needed to allow \thanks to contain \par.
  4309. \long\def\author#1{\gdef\@author{#1}}
  4310. % in addition to setting up IEEEitemize, we need to remove a baselineskip space above and
  4311. % below it because \list's \pars introduce blank lines because of the footnote struts.
  4312. \def\@IEEEsetupcompsocitemizelist{\def\labelitemi{$\bullet$}%
  4313. \setlength{\IEEElabelindent}{0pt}\setlength{\labelsep}{1.2em}\setlength{\parskip}{0pt}%
  4314. \setlength{\partopsep}{0pt}\setlength{\topsep}{0.5\baselineskip}\vspace{-1\baselineskip}\relax}
  4315. % flag for fake non-compsoc \IEEEcompsocthanksitem - prevents line break on very first item
  4316. \newif\if@IEEEbreakcompsocthanksitem \@IEEEbreakcompsocthanksitemfalse
  4317. \ifCLASSOPTIONcompsoc
  4318. % V1.7 compsoc bullet item \thanks
  4319. % also, we need to redefine this to destroy the argument in \IEEEquantizevspace
  4320. \long\def\IEEEcompsocitemizethanks#1{\relax\@IEEEbreakcompsocthanksitemfalse\footnotemark
  4321. \protected@xdef\@thanks{\@thanks
  4322. \protect\footnotetext[\the\c@footnote]{\itshape\protect\@IEEEtriggeroneshotfootnoterule
  4323. {\let\IEEEiedlistdecl\relax\protect\begin{IEEEitemize}[\protect\@IEEEsetupcompsocitemizelist]\ignorespaces#1\relax
  4324. \protect\end{IEEEitemize}}\protect\vspace{-1\baselineskip}}}}
  4325. \DeclareRobustCommand*{\IEEEcompsocthanksitem}{\item}
  4326. \else
  4327. % non-compsoc, allow for dual compilation via rerouting to normal \thanks
  4328. \long\def\IEEEcompsocitemizethanks#1{\thanks{#1}}
  4329. % redirect to "pseudo-par" \hfil\break\indent after swallowing [] from \IEEEcompsocthanksitem[]
  4330. \DeclareRobustCommand{\IEEEcompsocthanksitem}{\@ifnextchar [{\@IEEEthanksswallowoptionalarg}%
  4331. {\@IEEEthanksswallowoptionalarg[\relax]}}
  4332. % be sure and break only after first item, be sure and ignore spaces after optional argument
  4333. \def\@IEEEthanksswallowoptionalarg[#1]{\relax\if@IEEEbreakcompsocthanksitem\hfil\break
  4334. \indent\fi\@IEEEbreakcompsocthanksitemtrue\ignorespaces}
  4335. \fi
  4336. % V1.6b define the \IEEEpeerreviewmaketitle as needed
  4337. \ifCLASSOPTIONpeerreview
  4338. \def\IEEEpeerreviewmaketitle{\@IEEEcleardoublepage{empty}%
  4339. \ifCLASSOPTIONtwocolumn
  4340. \twocolumn[{\IEEEquantizevspace{\@IEEEpeerreviewmaketitle}[\IEEEquantizedisabletitlecmds]{0pt}[-\topskip]{\baselineskip}{\@IEEENORMtitlevspace}{\@IEEEMINtitlevspace}}]
  4341. \else
  4342. \newpage\@IEEEpeerreviewmaketitle\@IEEEstatictitlevskip
  4343. \fi
  4344. \thispagestyle{IEEEtitlepagestyle}}
  4345. \else
  4346. % \IEEEpeerreviewmaketitle does nothing if peer review option has not been selected
  4347. \def\IEEEpeerreviewmaketitle{\relax}
  4348. \fi
  4349. % peerreview formats the repeated title like the title in journal papers.
  4350. \def\@IEEEpeerreviewmaketitle{\bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEcompsoconly{\sffamily}%
  4351. \normalfont\normalsize\vskip0.2em{\Huge\@title\par}\vskip1.0em\par
  4352. \par\addvspace{0.5\baselineskip}\egroup}
  4353. % V1.6
  4354. % this is a static rubber spacer between the title/authors and the main text
  4355. % used for single column text, or when the title appears in the first column
  4356. % of two column text (technotes).
  4357. \def\@IEEEstatictitlevskip{{\normalfont\normalsize
  4358. % adjust spacing to next text
  4359. % v1.6b handle peer review papers
  4360. \ifCLASSOPTIONpeerreview
  4361. % for peer review papers, the same value is used for both title pages
  4362. % regardless of the other paper modes
  4363. \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip
  4364. \else
  4365. \ifCLASSOPTIONconference% conference
  4366. \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip%
  4367. \else%
  4368. \ifCLASSOPTIONtechnote% technote
  4369. \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip%
  4370. \else% journal uses more space
  4371. \vskip 2.5\baselineskip plus 0.75\baselineskip minus 0.375\baselineskip%
  4372. \fi
  4373. \fi
  4374. \fi}}
  4375. % set the nominal and minimum values for the quantized title spacer
  4376. % the quantization algorithm will not allow the spacer size to
  4377. % become less than \@IEEEMINtitlevspace - instead it will be lengthened
  4378. % default to journal values
  4379. \def\@IEEENORMtitlevspace{2.5\baselineskip}
  4380. \def\@IEEEMINtitlevspace{2\baselineskip}
  4381. % conferences and technotes need tighter spacing
  4382. \ifCLASSOPTIONconference% conference
  4383. \def\@IEEENORMtitlevspace{1\baselineskip}
  4384. \def\@IEEEMINtitlevspace{0.75\baselineskip}
  4385. \fi
  4386. \ifCLASSOPTIONtechnote% technote
  4387. \def\@IEEENORMtitlevspace{1\baselineskip}
  4388. \def\@IEEEMINtitlevspace{0.75\baselineskip}
  4389. \fi
  4390. % V1.8a
  4391. \def\IEEEquantizevspace{\begingroup\@ifstar{\@IEEEquantizevspacestarformtrue\@IEEEquantizevspace}{\@IEEEquantizevspacestarformfalse\@IEEEquantizevspace}}
  4392. % \IEEEquantizevspace[output dimen register]{object}[object decl]
  4393. % {top baselineskip}
  4394. % [offset][prevdepth][lineskip limit][lineskip]
  4395. % {unit height}{nominal vspace}{minimum vspace}
  4396. %
  4397. % Calculates and creates the vspace needed to make the combined height with
  4398. % the given object an integer multiple of the given unit height. This command
  4399. % is more general than the older \@IEEEdynamictitlevspace it replaces.
  4400. %
  4401. % The star form has no effect at present, but is reserved for future use.
  4402. %
  4403. % If the optional argument [output dimen register] is given, the calculated
  4404. % vspace height is stored in the given output dimen (or skip) register
  4405. % and no other action is taken, otherwise the object followed by a vspace*
  4406. % of the appropriate height is evaluated/output.
  4407. %
  4408. % The optional object decl (declarations) is code that is evaluated just
  4409. % before the object's height is evaluated. Its intented purpose is to allow
  4410. % for the alteration or disabling of code within the object during internal
  4411. % height evaluation (e.g., \long\def\thanks#1{\relax} ).
  4412. % This special code is not invoked if/when the object is rendered at the end.
  4413. %
  4414. % The nominal vspace is the target value of the added vspace and the minimum
  4415. % vspace is the lower allowed limit. The vspacer will be the value that achieves
  4416. % integral overall height, in terms of the given unit height, that is closest
  4417. % to the nominal vspace and that is not less than the specified minimum vspace.
  4418. %
  4419. % The line spacing algorithm of TeX is somewhat involved and requires special
  4420. % care with regard to the first line of a vertical list (which is indicated
  4421. % when \prevdepth is -1000pt or less). top baselineskip specifies the
  4422. % baselineskip or topskip used prior to the object. If the height of the
  4423. % first line of the object is greater than the given top baselineskip, then
  4424. % the top baselineskip is subtracted from the height of the first line and
  4425. % that difference is considered along with the rest of the object height
  4426. % (because the object will be shifted down by an amount =
  4427. % top line height - top baselineskip). Otherwise, the height of the first line
  4428. % of the object is ignored as far as the calculations are concerned.
  4429. % This algorithm is adequate for objects that appear at the top of a page
  4430. % (e.g., titles) where \topskip spacing is used.
  4431. %
  4432. % However, as explained on page 78 of the TeXbook, interline spacing is more
  4433. % complex when \baselineskip is being used (indicated by \prevdepth >
  4434. % -1000pt). The four optional parameters offset, prevdepth, lineskip limit and
  4435. % lineskip are assumed to be equal to be 0pt, \prevdepth, \lineskiplimit and
  4436. % \lineskip, respectively, if they are omitted.
  4437. %
  4438. % The prevdepth is the depth of the line before the object, the lineskip limit
  4439. % specifies how close the top of the object can come to the bottom of the
  4440. % previous line before \baselineskip is ignored and \lineskip is inserted
  4441. % between the object and the line above it. Lineskip does not come into
  4442. % play unless the first line of the object is high enough to "get too close"
  4443. % (as specified by lineskiplimit) to the line before it. The the prevdepth,
  4444. % lineskip limit, and lineskip optional parameters are not needed for the
  4445. % first object/line on a page (i.e., prevdepth <= -1000pt) where the simplier
  4446. % \topskip spacing rules are in effect.
  4447. %
  4448. % Offset is a manual adjustment that is added to the height calculations of
  4449. % object irrespective of the value of \prevdepth. It is useful when the top
  4450. % baselineskip will result in a noninteger unit height object placement even
  4451. % if the object itself has integral height. e.g., a footnotesize baselineskip
  4452. % is used before the object, thus an offset of, say -3pt, can be given as a
  4453. % correction.
  4454. % Common combinations of these parameters include:
  4455. %
  4456. % top baselineskip: (and default values for offset, prevdepth, etc.)
  4457. % \topskip % for objects that appear at the top of a page
  4458. % \maxdimen % always ignore the height of the top line
  4459. % 0pt % always consider any positive height of the top line
  4460. %
  4461. % for objects to appear inline in normal text:
  4462. % top baselineskip = \baselineskip
  4463. %
  4464. % set prevdepth = -1000pt and top baselineskip = 0pt to consider the
  4465. % overall height of the object without any other external skip
  4466. % consideration
  4467. \newif\if@IEEEquantizevspacestarform % flag to indicate star form
  4468. \newif\if@IEEEquantizevspaceuseoutdimenreg % flag to indicate output dimen register is to be used
  4469. % Use our own private registers because the object could contain a
  4470. % structure that uses the existing tmp scratch pad registers
  4471. \newdimen\@IEEEquantizeheightA
  4472. \newdimen\@IEEEquantizeheightB
  4473. \newdimen\@IEEEquantizeheightC
  4474. \newdimen\@IEEEquantizeprevdepth % need to save this early as can change
  4475. \newcount\@IEEEquantizemultiple
  4476. \newbox\@IEEEquantizeboxA
  4477. \def\@IEEEquantizevspace{\@ifnextchar [{\@IEEEquantizevspaceuseoutdimenregtrue\@@IEEEquantizevspace}{\@IEEEquantizevspaceuseoutdimenregfalse\@@IEEEquantizevspace[]}}
  4478. \long\def\@@IEEEquantizevspace[#1]#2{\relax
  4479. % acquire and store
  4480. % #1 optional output dimen register
  4481. % #2 object
  4482. \edef\@IEEEquantizeoutdimenreg{#1}\relax
  4483. % allow for object specifications that contain parameters
  4484. \@IEEEtrantmptoksA={#2}\relax
  4485. \long\edef\@IEEEquantizeobject{\the\@IEEEtrantmptoksA}\relax
  4486. \@ifnextchar [{\@@@IEEEquantizevspace}{\@@@IEEEquantizevspace[\relax]}}
  4487. \long\def\@@@IEEEquantizevspace[#1]#2{\relax
  4488. % acquire and store
  4489. % [#1] optional object decl, is \relax if not given by user
  4490. % #2 top baselineskip
  4491. % allow for object decl specifications that have parameters
  4492. \@IEEEtrantmptoksA={#1}\relax
  4493. \long\edef\@IEEEquantizeobjectdecl{\the\@IEEEtrantmptoksA}\relax
  4494. \edef\@IEEEquantizetopbaselineskip{#2}\ivIEEEquantizevspace}
  4495. % acquire optional argument set and store
  4496. % [offset][prevdepth][lineskip limit][lineskip]
  4497. \def\ivIEEEquantizevspace{\@ifnextchar [{\@vIEEEquantizevspace}{\@vIEEEquantizevspace[0pt]}}
  4498. \def\@vIEEEquantizevspace[#1]{\edef\@IEEEquantizeoffset{#1}\@ifnextchar [{\@viIEEEquantizevspace}{\@viIEEEquantizevspace[\prevdepth]}}
  4499. \def\@viIEEEquantizevspace[#1]{\@IEEEquantizeprevdepth=#1\relax\@ifnextchar [{\@viiIEEEquantizevspace}{\@viiIEEEquantizevspace[\lineskiplimit]}}
  4500. \def\@viiIEEEquantizevspace[#1]{\edef\@IEEEquantizelineskiplimit{#1}\@ifnextchar [{\@viiiIEEEquantizevspace}{\@viiiIEEEquantizevspace[\lineskip]}}
  4501. \def\@viiiIEEEquantizevspace[#1]{\edef\@IEEEquantizelineskip{#1}\@ixIEEEquantizevspace}
  4502. % main routine
  4503. \def\@ixIEEEquantizevspace#1#2#3{\relax
  4504. \edef\@IEEEquantizeunitheight{#1}\relax
  4505. \edef\@IEEEquantizenomvspace{#2}\relax
  4506. \edef\@IEEEquantizeminvspace{#3}\relax
  4507. % \@IEEEquantizeoutdimenreg
  4508. % \@IEEEquantizeobject
  4509. % \@IEEEquantizeobjectdecl
  4510. % \@IEEEquantizetopbaselineskip
  4511. % \@IEEEquantizeoffset
  4512. % \@IEEEquantizeprevdepth
  4513. % \@IEEEquantizelineskiplimit
  4514. % \@IEEEquantizelineskip
  4515. % \@IEEEquantizeunitheight
  4516. % \@IEEEquantizenomvspace
  4517. % \@IEEEquantizeminvspace
  4518. % get overall height of object
  4519. \setbox\@IEEEquantizeboxA\vbox{\begingroup\@IEEEquantizeobjectdecl\@IEEEquantizeobject\relax\endgroup}\relax
  4520. \@IEEEquantizeheightA\ht\@IEEEquantizeboxA\relax
  4521. % get height of first line of object
  4522. \setbox\@IEEEquantizeboxA\vtop{\begingroup\@IEEEquantizeobjectdecl\@IEEEquantizeobject\relax\endgroup}\relax
  4523. \@IEEEquantizeheightB\ht\@IEEEquantizeboxA\relax
  4524. \ifdim\@IEEEquantizeprevdepth>-1000pt\relax % prevdepth > -1000pf means full baselineskip\lineskip rules in effect
  4525. % lineskip spacing rule takes effect if height of top line > baselineskip - prevdepth - lineskiplimit,
  4526. % otherwise the baselineskip rule is in effect and the height of the first line does not matter at all.
  4527. \@IEEEquantizeheightC=\@IEEEquantizetopbaselineskip\relax
  4528. \advance\@IEEEquantizeheightC-\@IEEEquantizeprevdepth\relax
  4529. \advance\@IEEEquantizeheightC-\@IEEEquantizelineskiplimit\relax % this works even though \@IEEEquantizelineskiplimit is a macro because TeX allows --10pt notation
  4530. \ifdim\@IEEEquantizeheightB>\@IEEEquantizeheightC\relax
  4531. % lineskip spacing rule is in effect i.e., the object is going to be shifted down relative to the
  4532. % baselineskip set position by its top line height (already a part of the total height) + prevdepth + lineskip - baselineskip
  4533. \advance\@IEEEquantizeheightA\@IEEEquantizeprevdepth\relax
  4534. \advance\@IEEEquantizeheightA\@IEEEquantizelineskip\relax
  4535. \advance\@IEEEquantizeheightA-\@IEEEquantizetopbaselineskip\relax
  4536. \else
  4537. % height of first line <= \@IEEEquantizetopbaselineskip - \@IEEEquantizeprevdepth - \@IEEEquantizelineskiplimit
  4538. % standard baselineskip rules are in effect, so don't consider height of first line
  4539. \advance\@IEEEquantizeheightA-\@IEEEquantizeheightB\relax
  4540. \fi
  4541. %
  4542. \else % prevdepth <= -1000pt, simplier \topskip type rules in effect
  4543. \ifdim\@IEEEquantizeheightB>\@IEEEquantizetopbaselineskip
  4544. % height of top line (already included in the total height) in excess of
  4545. % baselineskip is the amount it will be downshifted
  4546. \advance\@IEEEquantizeheightA-\@IEEEquantizetopbaselineskip\relax
  4547. \else
  4548. % height of first line is irrelevant, remove it
  4549. \advance\@IEEEquantizeheightA-\@IEEEquantizeheightB\relax
  4550. \fi
  4551. \fi % prevdepth <= -1000pt
  4552. %
  4553. % adjust height for any manual offset
  4554. \advance\@IEEEquantizeheightA\@IEEEquantizeoffset\relax
  4555. % add in nominal spacer
  4556. \advance\@IEEEquantizeheightA\@IEEEquantizenomvspace\relax
  4557. % check for nonzero unitheight
  4558. \@IEEEquantizeheightB=\@IEEEquantizeunitheight\relax
  4559. \ifnum\@IEEEquantizeheightB=0\relax
  4560. \@IEEEclspkgerror{IEEEquantizevspace unit height cannot be zero. Assuming 10pt.}%
  4561. {Division by zero is not allowed.}
  4562. \@IEEEquantizeheightB=10pt\relax
  4563. \fi
  4564. % get integer number of lines
  4565. \@IEEEquantizemultiple=\@IEEEquantizeheightA\relax
  4566. \divide\@IEEEquantizemultiple\@IEEEquantizeheightB\relax
  4567. % set A to contain the excess height over the \@IEEEquantizemultiple of lines
  4568. % A = height - multiple*unitheight
  4569. \@IEEEquantizeheightC\@IEEEquantizeheightB\relax
  4570. \multiply\@IEEEquantizeheightC\@IEEEquantizemultiple\relax
  4571. \advance\@IEEEquantizeheightA-\@IEEEquantizeheightC\relax
  4572. % set B to contain the height short of \@IEEEquantizemultiple+1 of lines
  4573. % B = unitheight - A
  4574. \advance\@IEEEquantizeheightB-\@IEEEquantizeheightA\relax
  4575. % choose A or B based on which is closer
  4576. \@IEEEquantizeheightC\@IEEEquantizenomvspace\relax
  4577. \ifdim\@IEEEquantizeheightA<\@IEEEquantizeheightB\relax
  4578. % C = nomvspace - A, go with lower
  4579. \advance\@IEEEquantizeheightC-\@IEEEquantizeheightA\relax
  4580. \else
  4581. % C = nomvspace + B, go with upper
  4582. \advance\@IEEEquantizeheightC\@IEEEquantizeheightB\relax
  4583. \fi
  4584. % if violate lower bound, use next integer bound
  4585. \ifdim\@IEEEquantizeheightC<\@IEEEquantizeminvspace\relax
  4586. % A + B = unitheight
  4587. \advance\@IEEEquantizeheightC\@IEEEquantizeheightA\relax
  4588. \advance\@IEEEquantizeheightC\@IEEEquantizeheightB\relax
  4589. \fi
  4590. % export object and spacer outside of group
  4591. \global\let\@IEEEquantizeobjectout\@IEEEquantizeobject\relax
  4592. \global\@IEEEquantizeheightC\@IEEEquantizeheightC\relax
  4593. \endgroup
  4594. \if@IEEEquantizevspaceuseoutdimenreg
  4595. \@IEEEquantizeoutdimenreg=\@IEEEquantizeheightC\relax
  4596. \else
  4597. \@IEEEquantizeobjectout\relax
  4598. \vskip\@IEEEquantizeheightC\relax
  4599. \fi}
  4600. % user command to disable all global assignments, possible use within object decl
  4601. \def\IEEEquantizedisableglobal{\let\global\relax
  4602. \let\gdef\def
  4603. \let\xdef\edef}
  4604. % user command to allow for the disabling of \thanks and other commands, possible use within object decl
  4605. \def\IEEEquantizedisabletitlecmds{\long\def\thanks##1{\relax}\relax
  4606. \long\def\IEEEcompsocitemizethanks##1{\relax}\def\newpage{\relax}}
  4607. % V1.6
  4608. % we allow the user access to the last part of the title area
  4609. % useful in emergencies such as when a different spacing is needed
  4610. % This text is NOT compensated for in the dynamic sizer.
  4611. \let\@IEEEaftertitletext=\relax
  4612. \long\def\IEEEaftertitletext#1{\def\@IEEEaftertitletext{#1}}
  4613. % V1.7 provide a way for users to enter abstract and keywords
  4614. % into the onecolumn title are. This text is compensated for
  4615. % in the dynamic sizer.
  4616. \let\@IEEEtitleabstractindextext=\relax
  4617. \long\def\IEEEtitleabstractindextext#1{\def\@IEEEtitleabstractindextext{#1}}
  4618. % V1.7 provide a way for users to get the \@IEEEtitleabstractindextext if
  4619. % not in compsoc or transmag journal mode - this way abstract and keywords
  4620. % can still be placed in their conventional position if not in those modes.
  4621. \def\IEEEdisplaynontitleabstractindextext{%
  4622. % display for all conference formats
  4623. \ifCLASSOPTIONconference\@IEEEtitleabstractindextext\relax
  4624. \else% non-conferences
  4625. % V1.8a display for all technotes
  4626. \ifCLASSOPTIONtechnote\@IEEEtitleabstractindextext\relax
  4627. % V1.8a add diamond line after abstract and index terms for compsoc technotes
  4628. \@IEEEcompsoconly{\noindent\hfill\IEEEcompsocdiamondline\hfill\hbox{}\par}\relax
  4629. \else % non-conferences and non-technotes
  4630. \ifCLASSOPTIONcompsoc% display if not compsoc and not transmag
  4631. \else
  4632. \ifCLASSOPTIONtransmag
  4633. \else% not compsoc journal nor transmag journal
  4634. \@IEEEtitleabstractindextext\relax
  4635. \fi
  4636. \fi
  4637. \fi
  4638. \fi}
  4639. % command to allow alteration of baselinestretch, but only if the current
  4640. % baselineskip is unity. Used to tweak the compsoc abstract and keywords line spacing.
  4641. \def\@IEEEtweakunitybaselinestretch#1{{\def\baselinestretch{1}\selectfont
  4642. \global\@tempskipa\baselineskip}\ifnum\@tempskipa=\baselineskip%
  4643. \def\baselinestretch{#1}\selectfont\fi\relax}
  4644. % abstract and keywords are in \small, except
  4645. % for 9pt docs in which they are in \footnotesize
  4646. % Because 9pt docs use an 8pt footnotesize, \small
  4647. % becomes a rather awkward 8.5pt
  4648. \def\@IEEEabskeysecsize{\small}
  4649. \ifx\CLASSOPTIONpt\@IEEEptsizenine
  4650. \def\@IEEEabskeysecsize{\footnotesize}
  4651. \fi
  4652. % compsoc journals use \footnotesize, compsoc conferences use normalsize
  4653. \@IEEEcompsoconly{\def\@IEEEabskeysecsize{\footnotesize}}
  4654. \@IEEEcompsocconfonly{\def\@IEEEabskeysecsize{\small}}
  4655. % V1.6 have abstract and keywords strip leading spaces, pars and newlines
  4656. % so that spacing is more tightly controlled.
  4657. \def\abstract{\normalfont
  4658. \if@twocolumn
  4659. \@IEEEabskeysecsize\bfseries\textit{\abstractname}---\relax
  4660. \else
  4661. \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
  4662. \fi\@IEEEgobbleleadPARNLSP}
  4663. % V1.6 The IEEE wants only 1 pica from end of abstract to introduction heading when in
  4664. % conference mode (the heading already has this much above it)
  4665. \def\endabstract{\relax\ifCLASSOPTIONconference\vspace{0ex}\else\vspace{1.34ex}\fi\par\if@twocolumn\else\endquotation\fi
  4666. \normalfont\normalsize}
  4667. \def\IEEEkeywords{\normalfont
  4668. \if@twocolumn
  4669. \@IEEEabskeysecsize\bfseries\textit{\IEEEkeywordsname}---\relax
  4670. \else
  4671. \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
  4672. \fi\@IEEEgobbleleadPARNLSP}
  4673. \def\endIEEEkeywords{\relax\ifCLASSOPTIONtechnote\vspace{1.34ex}\else\vspace{0.67ex}\fi
  4674. \par\if@twocolumn\else\endquotation\fi%
  4675. \normalfont\normalsize}
  4676. % V1.7 compsoc keywords index terms
  4677. \ifCLASSOPTIONcompsoc
  4678. \ifCLASSOPTIONconference% compsoc conference
  4679. \def\abstract{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\bfseries
  4680. \if@twocolumn
  4681. \@IEEEabskeysecsize\noindent\textit{\abstractname}---\relax
  4682. \else
  4683. \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
  4684. \fi\@IEEEgobbleleadPARNLSP}
  4685. \def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\bfseries
  4686. \if@twocolumn
  4687. \@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent
  4688. \textit{\IEEEkeywordsname}---\relax
  4689. \else
  4690. \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
  4691. \fi\@IEEEgobbleleadPARNLSP}
  4692. \else% compsoc not conference
  4693. \def\abstract{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily
  4694. \if@twocolumn
  4695. \@IEEEabskeysecsize\noindent\textbf{\abstractname}---\relax
  4696. \else
  4697. \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
  4698. \fi\@IEEEgobbleleadPARNLSP}
  4699. \def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily
  4700. \if@twocolumn
  4701. \@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent
  4702. \textbf{\IEEEkeywordsname}---\relax
  4703. \else
  4704. \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
  4705. \fi\@IEEEgobbleleadPARNLSP}
  4706. \fi
  4707. \fi
  4708. % V1.8 transmag keywords index terms
  4709. % no abstract name, use indentation
  4710. \ifCLASSOPTIONtransmag
  4711. \def\abstract{\normalfont\parindent 1em\relax
  4712. \if@twocolumn
  4713. \@IEEEabskeysecsize\bfseries\indent
  4714. \else
  4715. \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize
  4716. \textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
  4717. \fi\@IEEEgobbleleadPARNLSP}
  4718. \def\IEEEkeywords{\normalfont\parindent 1em\relax
  4719. \if@twocolumn
  4720. \@IEEEabskeysecsize\vspace{1\baselineskip}\bfseries\indent\textit{\IEEEkeywordsname}---\relax
  4721. \else
  4722. \bgroup\par\vspace{1\baselineskip}\centering\@IEEEabskeysecsize
  4723. \textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
  4724. \fi\@IEEEgobbleleadPARNLSP}
  4725. \fi
  4726. % gobbles all leading \, \\ and \par, upon finding first token that
  4727. % is not a \ , \\ or a \par, it ceases and returns that token
  4728. %
  4729. % used to strip leading \, \\ and \par from the input
  4730. % so that such things in the beginning of an environment will not
  4731. % affect the formatting of the text
  4732. \long\def\@IEEEgobbleleadPARNLSP#1{\let\@IEEEswallowthistoken=0%
  4733. \let\@IEEEgobbleleadPARNLSPtoken#1%
  4734. \let\@IEEEgobbleleadPARtoken=\par%
  4735. \let\@IEEEgobbleleadNLtoken=\\%
  4736. \let\@IEEEgobbleleadSPtoken=\ %
  4737. \def\@IEEEgobbleleadSPMACRO{\ }%
  4738. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadPARtoken%
  4739. \let\@IEEEswallowthistoken=1%
  4740. \fi%
  4741. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadNLtoken%
  4742. \let\@IEEEswallowthistoken=1%
  4743. \fi%
  4744. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPtoken%
  4745. \let\@IEEEswallowthistoken=1%
  4746. \fi%
  4747. % a control space will come in as a macro
  4748. % when it is the last one on a line
  4749. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPMACRO%
  4750. \let\@IEEEswallowthistoken=1%
  4751. \fi%
  4752. % if we have to swallow this token, do so and taste the next one
  4753. % else spit it out and stop gobbling
  4754. \ifx\@IEEEswallowthistoken 1\let\@IEEEnextgobbleleadPARNLSP=\@IEEEgobbleleadPARNLSP\else%
  4755. \let\@IEEEnextgobbleleadPARNLSP=#1\fi%
  4756. \@IEEEnextgobbleleadPARNLSP}%
  4757. % TITLING OF SECTIONS
  4758. \def\@IEEEsectpunct{:\ \,} % Punctuation after run-in section heading (headings which are
  4759. % part of the paragraphs), need little bit more than a single space
  4760. % spacing from section number to title
  4761. % compsoc conferences use regular period/space punctuation
  4762. \ifCLASSOPTIONcompsoc
  4763. \ifCLASSOPTIONconference
  4764. \def\@IEEEsectpunct{.\ }
  4765. \fi\fi
  4766. \def\@seccntformat#1{\csname the#1dis\endcsname\hskip 0.5em\relax}
  4767. \ifCLASSOPTIONcompsoc
  4768. % compsoc journals need extra spacing
  4769. \ifCLASSOPTIONconference\else
  4770. \def\@seccntformat#1{\csname the#1dis\endcsname\hskip 1em\relax}
  4771. \fi\fi
  4772. %v1.7 put {} after #6 to allow for some types of user font control
  4773. %and use \@@par rather than \par
  4774. \def\@sect#1#2#3#4#5#6[#7]#8{%
  4775. \ifnum #2>\c@secnumdepth
  4776. \let\@svsec\@empty
  4777. \else
  4778. \refstepcounter{#1}%
  4779. % load section label and spacer into \@svsec
  4780. \protected@edef\@svsec{\@seccntformat{#1}\relax}%
  4781. \fi%
  4782. \@tempskipa #5\relax
  4783. \ifdim \@tempskipa>\z@% tempskipa determines whether is treated as a high
  4784. \begingroup #6{\relax% or low level heading
  4785. \noindent % subsections are NOT indented
  4786. % print top level headings. \@svsec is label, #8 is heading title
  4787. % The IEEE does not block indent the section title text, it flows like normal
  4788. {\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\@@par}}%
  4789. \endgroup
  4790. \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else
  4791. \protect\numberline{\csname the#1\endcsname}\fi#7}%
  4792. \else % printout low level headings
  4793. % svsechd seems to swallow the trailing space, protect it with \mbox{}
  4794. % got rid of sectionmark stuff
  4795. \def\@svsechd{#6{\hskip #3\relax\@svsec #8\@IEEEsectpunct\mbox{}}%
  4796. \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else
  4797. \protect\numberline{\csname the#1\endcsname}\fi#7}}%
  4798. \fi%skip down
  4799. \@xsect{#5}}
  4800. % section* handler
  4801. %v1.7 put {} after #4 to allow for some types of user font control
  4802. %and use \@@par rather than \par
  4803. \def\@ssect#1#2#3#4#5{\@tempskipa #3\relax
  4804. \ifdim \@tempskipa>\z@
  4805. %\begingroup #4\@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup
  4806. % The IEEE does not block indent the section title text, it flows like normal
  4807. \begingroup \noindent #4{\relax{\hskip #1}{\interlinepenalty \@M #5\@@par}}\endgroup
  4808. % svsechd swallows the trailing space, protect it with \mbox{}
  4809. \else \def\@svsechd{#4{\hskip #1\relax #5\@IEEEsectpunct\mbox{}}}\fi
  4810. \@xsect{#3}}
  4811. %% SECTION heading spacing and font
  4812. %%
  4813. % arguments are: #1 - sectiontype name
  4814. % (for \@sect) #2 - section level
  4815. % #3 - section heading indent
  4816. % #4 - top separation (absolute value used, neg indicates not to indent main text)
  4817. % If negative, make stretch parts negative too!
  4818. % #5 - (absolute value used) positive: bottom separation after heading,
  4819. % negative: amount to indent main text after heading
  4820. % Both #4 and #5 negative means to indent main text and use negative top separation
  4821. % #6 - font control
  4822. % You've got to have \normalfont\normalsize in the font specs below to prevent
  4823. % trouble when you do something like:
  4824. % \section{Note}{\ttfamily TT-TEXT} is known to ...
  4825. % The IEEE sometimes REALLY stretches the area before a section
  4826. % heading by up to about 0.5in. However, it may not be a good
  4827. % idea to let LaTeX have quite this much rubber.
  4828. \ifCLASSOPTIONconference%
  4829. % The IEEE wants section heading spacing to decrease for conference mode
  4830. \def\section{\@startsection{section}{1}{\z@}{1.5ex plus 1.5ex minus 0.5ex}%
  4831. {0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}%
  4832. \def\subsection{\@startsection{subsection}{2}{\z@}{1.5ex plus 1.5ex minus 0.5ex}%
  4833. {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}%
  4834. \else % for journals
  4835. \def\section{\@startsection{section}{1}{\z@}{3.0ex plus 1.5ex minus 1.5ex}% V1.6 3.0ex from 3.5ex
  4836. {0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}%
  4837. \def\subsection{\@startsection{subsection}{2}{\z@}{3.5ex plus 1.5ex minus 1.5ex}%
  4838. {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}%
  4839. \fi
  4840. % for both journals and conferences
  4841. % decided to put in a little rubber above the section, might help somebody
  4842. \def\subsubsection{\@startsection{subsubsection}{3}{\parindent}{0ex plus 0.1ex minus 0.1ex}%
  4843. {0ex}{\normalfont\normalsize\itshape}}%
  4844. \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{0ex plus 0.1ex minus 0.1ex}%
  4845. {0ex}{\normalfont\normalsize\itshape}}%
  4846. % compsoc
  4847. \ifCLASSOPTIONcompsoc
  4848. \ifCLASSOPTIONconference
  4849. % compsoc conference
  4850. \def\section{\@startsection{section}{1}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}%
  4851. {1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}{\normalfont\large\bfseries}}%
  4852. \def\subsection{\@startsection{subsection}{2}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}%
  4853. {1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}{\normalfont\sublargesize\bfseries}}%
  4854. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}%
  4855. {0ex}{\normalfont\normalsize\bfseries}}%
  4856. \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{0ex plus 0.1ex minus 0.1ex}%
  4857. {0ex}{\normalfont\normalsize}}%
  4858. \else% compsoc journals
  4859. % use negative top separation as compsoc journals do not indent paragraphs after section titles
  4860. \def\section{\@startsection{section}{1}{\z@}{-3.5ex plus -2ex minus -1.5ex}%
  4861. {0.7ex plus 1ex minus 0ex}{\normalfont\sublargesize\sffamily\bfseries\scshape}}%
  4862. % Note that subsection and smaller may not be correct for the Computer Society,
  4863. % I have to look up an example.
  4864. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.5ex plus -1.5ex minus -1.5ex}%
  4865. {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\sffamily\bfseries}}%
  4866. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex plus -1ex minus -1ex}%
  4867. {0.5ex plus 0.5ex minus 0ex}{\normalfont\normalsize\sffamily\itshape}}%
  4868. \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{-0ex plus -0.1ex minus -0.1ex}%
  4869. {0ex}{\normalfont\normalsize}}%
  4870. \fi\fi
  4871. % transmag
  4872. \ifCLASSOPTIONtransmag
  4873. \def\subsection{\@startsection{subsection}{2}{0.75\parindent}{3.5ex plus 1.5ex minus 1.5ex}%
  4874. {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}%
  4875. \def\subsubsection{\@startsection{subsubsection}{3}{1.25\parindent}{0.1ex plus 0.1ex minus 0.1ex}%
  4876. {0.1ex}{\normalfont\normalsize\itshape}}%
  4877. \fi
  4878. % V1.8a provide for a raised line Introduction section for use with Computer
  4879. % Society papers. We have to remove any spacing glue after the section
  4880. % heading and then remove the blank line for the new paragraph after it.
  4881. % LaTeX's section handler alters \everypar and we need to propogate those
  4882. % changes outside of the \parbox lest there be spacing problems at the top
  4883. % of the next section.
  4884. \def\IEEEraisesectionheading#1{\noindent\raisebox{1.5\baselineskip}[0pt][0pt]{\parbox[b]{\columnwidth}{#1\unskip\global\everypar=\everypar}}\vspace{-1\baselineskip}\vspace{-\parskip}\par}
  4885. %% ENVIRONMENTS
  4886. % "box" symbols at end of proofs
  4887. \def\IEEEQEDclosed{\mbox{\rule[0pt]{1.3ex}{1.3ex}}} % for a filled box
  4888. % V1.6 some journals use an open box instead that will just fit around a closed one
  4889. \def\IEEEQEDopen{{\setlength{\fboxsep}{0pt}\setlength{\fboxrule}{0.2pt}\fbox{\rule[0pt]{0pt}{1.3ex}\rule[0pt]{1.3ex}{0pt}}}}
  4890. \ifCLASSOPTIONcompsoc
  4891. \def\IEEEQED{\IEEEQEDopen} % default to open for compsoc
  4892. \else
  4893. \def\IEEEQED{\IEEEQEDclosed} % otherwise default to closed
  4894. \fi
  4895. %V1.8 flag to indicate if QED symbol is to be shown
  4896. \newif\if@IEEEQEDshow \@IEEEQEDshowtrue
  4897. \def\IEEEproofindentspace{2\parindent}% V1.8 allow user to change indentation amount if desired
  4898. % v1.7 name change to avoid namespace collision with amsthm. Also add support
  4899. % for an optional argument.
  4900. \def\IEEEproof{\@ifnextchar[{\@IEEEproof}{\@IEEEproof[\IEEEproofname]}}
  4901. \def\@IEEEproof[#1]{\@IEEEQEDshowtrue\par\noindent\hspace{\IEEEproofindentspace}{\itshape #1: }}
  4902. \def\endIEEEproof{\if@IEEEQEDshow\hspace*{\fill}\nobreakspace\IEEEQED\fi\par}
  4903. % qedhere for equation environments, similar to AMS \qedhere
  4904. \def\IEEEQEDhereeqn{\global\@IEEEQEDshowfalse\eqno\let\eqno\relax\let\leqno\relax
  4905. \let\veqno\relax\hbox{\IEEEQED}}
  4906. % IEEE style qedhere for IEEEeqnarray and other environments
  4907. \def\IEEEQEDhere{\global\@IEEEQEDshowfalse\IEEEQED}
  4908. % command to disable QED at end of IEEEproof
  4909. \def\IEEEQEDoff{\global\@IEEEQEDshowfalse}
  4910. %\itemindent is set to \z@ by list, so define new temporary variable
  4911. \newdimen\@IEEEtmpitemindent
  4912. \ifCLASSOPTIONcompsoc
  4913. % V1.8a compsoc uses bold theorem titles, a period instead of a colon, vertical spacing, and hanging indentation
  4914. % V1.8 allow long theorem names to break across lines.
  4915. % Thanks to Miquel Payaro for reporting this.
  4916. \def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\relax
  4917. \topsep 0.2\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip
  4918. \rmfamily\trivlist\hangindent\parindent%
  4919. \item[]\textit{\bfseries\noindent #1\ #2.} \itemindent\@IEEEtmpitemindent\relax}
  4920. \def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\relax
  4921. \topsep 0.2\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip
  4922. \rmfamily\trivlist\hangindent\parindent%
  4923. % V1.6 The IEEE is back to using () around theorem names which are also in italics
  4924. % Thanks to Christian Peel for reporting this.
  4925. \item[]\textit{\bfseries\noindent #1\ #2\ (#3).} \itemindent\@IEEEtmpitemindent\relax}
  4926. % V1.7 remove bogus \unskip that caused equations in theorems to collide with
  4927. % lines below.
  4928. \def\@endtheorem{\endtrivlist\vskip 0.25\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip}
  4929. \else
  4930. %
  4931. % noncompsoc
  4932. %
  4933. % V1.8 allow long theorem names to break across lines.
  4934. % Thanks to Miquel Payaro for reporting this.
  4935. \def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily\trivlist%
  4936. \item[]\textit{\indent #1\ #2:} \itemindent\@IEEEtmpitemindent\relax}
  4937. \def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily \trivlist%
  4938. % V1.6 The IEEE is back to using () around theorem names which are also in italics
  4939. % Thanks to Christian Peel for reporting this.
  4940. \item[]\textit{\indent #1\ #2\ (#3):} \itemindent\@IEEEtmpitemindent\relax}
  4941. % V1.7 remove bogus \unskip that caused equations in theorems to collide with
  4942. % lines below.
  4943. \def\@endtheorem{\endtrivlist}
  4944. \fi
  4945. % V1.6
  4946. % display command for the section the theorem is in - so that \thesection
  4947. % is not used as this will be in Roman numerals when we want arabic.
  4948. % LaTeX2e uses \def\@thmcounter#1{\noexpand\arabic{#1}} for the theorem number
  4949. % (second part) display and \def\@thmcountersep{.} as a separator.
  4950. % V1.7 intercept calls to the section counter and reroute to \@IEEEthmcounterinsection
  4951. % to allow \appendix(ices} to override as needed.
  4952. %
  4953. % special handler for sections, allows appendix(ices) to override
  4954. \gdef\@IEEEthmcounterinsection#1{\arabic{#1}}
  4955. % string macro
  4956. \edef\@IEEEstringsection{section}
  4957. % redefine the #1#2[#3] form of newtheorem to use a hook to \@IEEEthmcounterinsection
  4958. % if section in_counter is used
  4959. \def\@xnthm#1#2[#3]{%
  4960. \expandafter\@ifdefinable\csname #1\endcsname
  4961. {\@definecounter{#1}\@newctr{#1}[#3]%
  4962. \edef\@IEEEstringtmp{#3}
  4963. \ifx\@IEEEstringtmp\@IEEEstringsection
  4964. \expandafter\xdef\csname the#1\endcsname{%
  4965. \noexpand\@IEEEthmcounterinsection{#3}\@thmcountersep
  4966. \@thmcounter{#1}}%
  4967. \else
  4968. \expandafter\xdef\csname the#1\endcsname{%
  4969. \expandafter\noexpand\csname the#3\endcsname \@thmcountersep
  4970. \@thmcounter{#1}}%
  4971. \fi
  4972. \global\@namedef{#1}{\@thm{#1}{#2}}%
  4973. \global\@namedef{end#1}{\@endtheorem}}}
  4974. %% SET UP THE DEFAULT PAGESTYLE
  4975. \pagestyle{headings}
  4976. \pagenumbering{arabic}
  4977. % normally the page counter starts at 1
  4978. \setcounter{page}{1}
  4979. % however, for peerreview the cover sheet is page 0 or page -1
  4980. % (for duplex printing)
  4981. \ifCLASSOPTIONpeerreview
  4982. \if@twoside
  4983. \setcounter{page}{-1}
  4984. \else
  4985. \setcounter{page}{0}
  4986. \fi
  4987. \fi
  4988. % standard book class behavior - let bottom line float up and down as
  4989. % needed when single sided
  4990. \ifCLASSOPTIONtwoside\else\raggedbottom\fi
  4991. % if two column - turn on twocolumn, allow word spacings to stretch more and
  4992. % enforce a rigid position for the last lines
  4993. \ifCLASSOPTIONtwocolumn
  4994. % the peer review option delays invoking twocolumn
  4995. \ifCLASSOPTIONpeerreview\else
  4996. \twocolumn
  4997. \fi
  4998. \sloppy
  4999. \flushbottom
  5000. \fi
  5001. % \APPENDIX and \APPENDICES definitions
  5002. % This is the \@ifmtarg command from the LaTeX ifmtarg package
  5003. % by Peter Wilson (CUA) and Donald Arseneau
  5004. % \@ifmtarg is used to determine if an argument to a command
  5005. % is present or not.
  5006. % For instance:
  5007. % \@ifmtarg{#1}{\typeout{empty}}{\typeout{has something}}
  5008. % \@ifmtarg is used with our redefined \section command if
  5009. % \appendices is invoked.
  5010. % The command \section will behave slightly differently depending
  5011. % on whether the user specifies a title:
  5012. % \section{My appendix title}
  5013. % or not:
  5014. % \section{}
  5015. % This way, we can eliminate the blank lines where the title
  5016. % would be, and the unneeded : after Appendix in the table of
  5017. % contents
  5018. \begingroup
  5019. \catcode`\Q=3
  5020. \long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}
  5021. \long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4}
  5022. \endgroup
  5023. % end of \@ifmtarg defs
  5024. % V1.7
  5025. % command that allows the one time saving of the original definition
  5026. % of section to \@IEEEappendixsavesection for \appendix or \appendices
  5027. % we don't save \section here as it may be redefined later by other
  5028. % packages (hyperref.sty, etc.)
  5029. \def\@IEEEsaveoriginalsectiononce{\let\@IEEEappendixsavesection\section
  5030. \let\@IEEEsaveoriginalsectiononce\relax}
  5031. % neat trick to grab and process the argument from \section{argument}
  5032. % we process differently if the user invoked \section{} with no
  5033. % argument (title)
  5034. % note we reroute the call to the old \section*
  5035. \def\@IEEEprocessthesectionargument#1{%
  5036. \@ifmtarg{#1}{%
  5037. \@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis}%
  5038. \addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection}}{%
  5039. \@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis\\* #1}%
  5040. \addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection: #1}}}
  5041. % we use this if the user calls \section{} after
  5042. % \appendix-- which has no meaning. So, we ignore the
  5043. % command and its argument. Then, warn the user.
  5044. \def\@IEEEdestroythesectionargument#1{\typeout{** WARNING: Ignoring useless
  5045. \protect\section\space in Appendix (line \the\inputlineno).}}
  5046. % remember \thesection forms will be displayed in \ref calls
  5047. % and in the Table of Contents.
  5048. % The \sectiondis form is used in the actual heading itself
  5049. % appendix command for one single appendix
  5050. % normally has no heading. However, if you want a
  5051. % heading, you can do so via the optional argument:
  5052. % \appendix[Optional Heading]
  5053. \def\appendix{\relax}
  5054. \renewcommand{\appendix}[1][]{\@IEEEsaveoriginalsectiononce\par
  5055. % v1.6 keep hyperref's identifiers unique
  5056. \gdef\theHsection{Appendix.A}%
  5057. % v1.6 adjust hyperref's string name for the section
  5058. \xdef\Hy@chapapp{appendix}%
  5059. \setcounter{section}{0}%
  5060. \setcounter{subsection}{0}%
  5061. \setcounter{subsubsection}{0}%
  5062. \setcounter{paragraph}{0}%
  5063. \gdef\thesection{A}%
  5064. \gdef\thesectiondis{}%
  5065. \gdef\thesubsection{\Alph{subsection}}%
  5066. \gdef\@IEEEthmcounterinsection##1{A}
  5067. \refstepcounter{section}% update the \ref counter
  5068. \@ifmtarg{#1}{\@IEEEappendixsavesection*{\appendixname}%
  5069. \addcontentsline{toc}{section}{\appendixname}}{%
  5070. \@IEEEappendixsavesection*{\appendixname\nobreakspace\\* #1}%
  5071. \addcontentsline{toc}{section}{\appendixname: #1}}%
  5072. % redefine \section command for appendix
  5073. % leave \section* as is
  5074. \def\section{\@ifstar{\@IEEEappendixsavesection*}{%
  5075. \@IEEEdestroythesectionargument}}% throw out the argument
  5076. % of the normal form
  5077. }
  5078. % appendices command for multiple appendices
  5079. % user then calls \section with an argument (possibly empty) to
  5080. % declare the individual appendices
  5081. \def\appendices{\@IEEEsaveoriginalsectiononce\par
  5082. % v1.6 keep hyperref's identifiers unique
  5083. \gdef\theHsection{Appendix.\Alph{section}}%
  5084. % v1.6 adjust hyperref's string name for the section
  5085. \xdef\Hy@chapapp{appendix}%
  5086. \setcounter{section}{-1}% we want \refstepcounter to use section 0
  5087. \setcounter{subsection}{0}%
  5088. \setcounter{subsubsection}{0}%
  5089. \setcounter{paragraph}{0}%
  5090. \ifCLASSOPTIONromanappendices%
  5091. \gdef\thesection{\Roman{section}}%
  5092. \gdef\thesectiondis{\Roman{section}}%
  5093. \@IEEEcompsocconfonly{\gdef\thesectiondis{\Roman{section}.}}%
  5094. \gdef\@IEEEthmcounterinsection##1{A\arabic{##1}}
  5095. \else%
  5096. \gdef\thesection{\Alph{section}}%
  5097. \gdef\thesectiondis{\Alph{section}}%
  5098. \@IEEEcompsocconfonly{\gdef\thesectiondis{\Alph{section}.}}%
  5099. \gdef\@IEEEthmcounterinsection##1{\Alph{##1}}
  5100. \fi%
  5101. \refstepcounter{section}% update the \ref counter
  5102. \setcounter{section}{0}% NEXT \section will be the FIRST appendix
  5103. % redefine \section command for appendices
  5104. % leave \section* as is
  5105. \def\section{\@ifstar{\@IEEEappendixsavesection*}{% process the *-form
  5106. \refstepcounter{section}% or is a new section so,
  5107. \@IEEEprocessthesectionargument}}% process the argument
  5108. % of the normal form
  5109. }
  5110. % V1.7 compoc uses nonbold drop cap and small caps word style
  5111. \ifCLASSOPTIONcompsoc
  5112. \def\IEEEPARstartFONTSTYLE{\mdseries}
  5113. \def\IEEEPARstartWORDFONTSTYLE{\scshape}
  5114. \def\IEEEPARstartWORDCAPSTYLE{\relax}
  5115. \fi
  5116. %
  5117. %
  5118. % \IEEEPARstart
  5119. % Definition for the big two line drop cap letter at the beginning of the
  5120. % first paragraph of journal papers. The first argument is the first letter
  5121. % of the first word, the second argument is the remaining letters of the
  5122. % first word which will be rendered in upper case.
  5123. % In V1.6 this has been completely rewritten to:
  5124. %
  5125. % 1. no longer have problems when the user begins an environment
  5126. % within the paragraph that uses \IEEEPARstart.
  5127. % 2. auto-detect and use the current font family
  5128. % 3. revise handling of the space at the end of the first word so that
  5129. % interword glue will now work as normal.
  5130. % 4. produce correctly aligned edges for the (two) indented lines.
  5131. %
  5132. % We generalize things via control macros - playing with these is fun too.
  5133. %
  5134. % V1.7 added more control macros to make it easy for IEEEtrantools.sty users
  5135. % to change the font style.
  5136. %
  5137. % the number of lines that are indented to clear it
  5138. % may need to increase if using decenders
  5139. \providecommand{\IEEEPARstartDROPLINES}{2}
  5140. % minimum number of lines left on a page to allow a \@IEEEPARstart
  5141. % Does not take into consideration rubber shrink, so it tends to
  5142. % be overly cautious
  5143. \providecommand{\IEEEPARstartMINPAGELINES}{2}
  5144. % V1.7 the height of the drop cap is adjusted to match the height of this text
  5145. % in the current font (when \IEEEPARstart is called).
  5146. \providecommand{\IEEEPARstartHEIGHTTEXT}{T}
  5147. % the depth the letter is lowered below the baseline
  5148. % the height (and size) of the letter is determined by the sum
  5149. % of this value and the height of the \IEEEPARstartHEIGHTTEXT in the current
  5150. % font. It is a good idea to set this value in terms of the baselineskip
  5151. % so that it can respond to changes therein.
  5152. \providecommand{\IEEEPARstartDROPDEPTH}{1.1\baselineskip}
  5153. % V1.7 the font the drop cap will be rendered in,
  5154. % can take zero or one argument.
  5155. \providecommand{\IEEEPARstartFONTSTYLE}{\bfseries}
  5156. % V1.7 any additional, non-font related commands needed to modify
  5157. % the drop cap letter, can take zero or one argument.
  5158. \providecommand{\IEEEPARstartCAPSTYLE}{\MakeUppercase}
  5159. % V1.7 the font that will be used to render the rest of the word,
  5160. % can take zero or one argument.
  5161. \providecommand{\IEEEPARstartWORDFONTSTYLE}{\relax}
  5162. % V1.7 any additional, non-font related commands needed to modify
  5163. % the rest of the word, can take zero or one argument.
  5164. \providecommand{\IEEEPARstartWORDCAPSTYLE}{\MakeUppercase}
  5165. % This is the horizontal separation distance from the drop letter to the main text.
  5166. % Lengths that depend on the font (e.g., ex, em, etc.) will be referenced
  5167. % to the font that is active when \IEEEPARstart is called.
  5168. \providecommand{\IEEEPARstartSEP}{0.15em}
  5169. % V1.7 horizontal offset applied to the left of the drop cap.
  5170. \providecommand{\IEEEPARstartHOFFSET}{0em}
  5171. % V1.7 Italic correction command applied at the end of the drop cap.
  5172. \providecommand{\IEEEPARstartITLCORRECT}{\/}
  5173. % width of the letter output, set globally. Can be used in \IEEEPARstartSEP
  5174. % or \IEEEPARstartHOFFSET, but not the height lengths.
  5175. \newdimen\IEEEPARstartletwidth
  5176. \IEEEPARstartletwidth 0pt\relax
  5177. % definition of \IEEEPARstart
  5178. % THIS IS A CONTROLLED SPACING AREA, DO NOT ALLOW SPACES WITHIN THESE LINES
  5179. %
  5180. % The token \@IEEEPARstartfont will be globally defined after the first use
  5181. % of \IEEEPARstart and will be a font command which creates the big letter
  5182. % The first argument is the first letter of the first word and the second
  5183. % argument is the rest of the first word(s).
  5184. \def\IEEEPARstart#1#2{\par{%
  5185. % if this page does not have enough space, break it and lets start
  5186. % on a new one
  5187. \@IEEEtranneedspace{\IEEEPARstartMINPAGELINES\baselineskip}{\relax}%
  5188. % V1.7 move this up here in case user uses \textbf for \IEEEPARstartFONTSTYLE
  5189. % which uses command \leavevmode which causes an unwanted \indent to be issued
  5190. \noindent
  5191. % calculate the desired height of the big letter
  5192. % it extends from the top of \IEEEPARstartHEIGHTTEXT in the current font
  5193. % down to \IEEEPARstartDROPDEPTH below the current baseline
  5194. \settoheight{\@IEEEtrantmpdimenA}{\IEEEPARstartHEIGHTTEXT}%
  5195. \addtolength{\@IEEEtrantmpdimenA}{\IEEEPARstartDROPDEPTH}%
  5196. % extract the name of the current font in bold
  5197. % and place it in \@IEEEPARstartFONTNAME
  5198. \def\@IEEEPARstartGETFIRSTWORD##1 ##2\relax{##1}%
  5199. {\IEEEPARstartFONTSTYLE{\selectfont\edef\@IEEEPARstartFONTNAMESPACE{\fontname\font\space}%
  5200. \xdef\@IEEEPARstartFONTNAME{\expandafter\@IEEEPARstartGETFIRSTWORD\@IEEEPARstartFONTNAMESPACE\relax}}}%
  5201. % define a font based on this name with a point size equal to the desired
  5202. % height of the drop letter
  5203. \font\@IEEEPARstartsubfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenA\relax%
  5204. % save this value as a counter (integer) value (sp points)
  5205. \@IEEEtrantmpcountA=\@IEEEtrantmpdimenA%
  5206. % now get the height of the actual letter produced by this font size
  5207. \settoheight{\@IEEEtrantmpdimenB}{\@IEEEPARstartsubfont\IEEEPARstartCAPSTYLE{#1}}%
  5208. % If something bogus happens like the first argument is empty or the
  5209. % current font is strange, do not allow a zero height.
  5210. \ifdim\@IEEEtrantmpdimenB=0pt\relax%
  5211. \typeout{** WARNING: IEEEPARstart drop letter has zero height! (line \the\inputlineno)}%
  5212. \typeout{ Forcing the drop letter font size to 10pt.}%
  5213. \@IEEEtrantmpdimenB=10pt%
  5214. \fi%
  5215. % and store it as a counter
  5216. \@IEEEtrantmpcountB=\@IEEEtrantmpdimenB%
  5217. % Since a font size doesn't exactly correspond to the height of the capital
  5218. % letters in that font, the actual height of the letter, \@IEEEtrantmpcountB,
  5219. % will be less than that desired, \@IEEEtrantmpcountA
  5220. % we need to raise the font size, \@IEEEtrantmpdimenA
  5221. % by \@IEEEtrantmpcountA / \@IEEEtrantmpcountB
  5222. % But, TeX doesn't have floating point division, so we have to use integer
  5223. % division. Hence the use of the counters.
  5224. % We need to reduce the denominator so that the loss of the remainder will
  5225. % have minimal affect on the accuracy of the result
  5226. \divide\@IEEEtrantmpcountB by 200%
  5227. \divide\@IEEEtrantmpcountA by \@IEEEtrantmpcountB%
  5228. % Then reequalize things when we use TeX's ability to multiply by
  5229. % floating point values
  5230. \@IEEEtrantmpdimenB=0.005\@IEEEtrantmpdimenA%
  5231. \multiply\@IEEEtrantmpdimenB by \@IEEEtrantmpcountA%
  5232. % \@IEEEPARstartfont is globaly set to the calculated font of the big letter
  5233. % We need to carry this out of the local calculation area to to create the
  5234. % big letter.
  5235. \global\font\@IEEEPARstartfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenB%
  5236. % Now set \@IEEEtrantmpdimenA to the width of the big letter
  5237. % We need to carry this out of the local calculation area to set the
  5238. % hanging indent
  5239. \settowidth{\global\@IEEEtrantmpdimenA}{\@IEEEPARstartfont
  5240. \IEEEPARstartCAPSTYLE{#1\IEEEPARstartITLCORRECT}}}%
  5241. % end of the isolated calculation environment
  5242. \global\IEEEPARstartletwidth\@IEEEtrantmpdimenA\relax%
  5243. % add in the extra clearance we want
  5244. \advance\@IEEEtrantmpdimenA by \IEEEPARstartSEP\relax%
  5245. % add in the optional offset
  5246. \advance\@IEEEtrantmpdimenA by \IEEEPARstartHOFFSET\relax%
  5247. % V1.7 don't allow negative offsets to produce negative hanging indents
  5248. \@IEEEtrantmpdimenB\@IEEEtrantmpdimenA
  5249. \ifnum\@IEEEtrantmpdimenB < 0 \@IEEEtrantmpdimenB 0pt\fi
  5250. % \@IEEEtrantmpdimenA has the width of the big letter plus the
  5251. % separation space and \@IEEEPARstartfont is the font we need to use
  5252. % Now, we make the letter and issue the hanging indent command
  5253. % The letter is placed in a box of zero width and height so that other
  5254. % text won't be displaced by it.
  5255. \hangindent\@IEEEtrantmpdimenB\hangafter=-\IEEEPARstartDROPLINES%
  5256. \makebox[0pt][l]{\hspace{-\@IEEEtrantmpdimenA}%
  5257. \raisebox{-\IEEEPARstartDROPDEPTH}[0pt][0pt]{\hspace{\IEEEPARstartHOFFSET}%
  5258. \@IEEEPARstartfont\IEEEPARstartCAPSTYLE{#1\IEEEPARstartITLCORRECT}%
  5259. \hspace{\IEEEPARstartSEP}}}%
  5260. {\IEEEPARstartWORDFONTSTYLE{\IEEEPARstartWORDCAPSTYLE{\selectfont#2}}}}
  5261. % determines if the space remaining on a given page is equal to or greater
  5262. % than the specified space of argument one
  5263. % if not, execute argument two (only if the remaining space is greater than zero)
  5264. % and issue a \newpage
  5265. %
  5266. % example: \@IEEEtranneedspace{2in}{\vfill}
  5267. %
  5268. % Does not take into consideration rubber shrinkage, so it tends to
  5269. % be overly cautious
  5270. % Based on an example posted by Donald Arseneau
  5271. % Note this macro uses \@IEEEtrantmpdimenB internally for calculations,
  5272. % so DO NOT PASS \@IEEEtrantmpdimenB to this routine
  5273. % if you need a dimen register, import with \@IEEEtrantmpdimenA instead
  5274. \def\@IEEEtranneedspace#1#2{\penalty-100\begingroup%shield temp variable
  5275. \@IEEEtrantmpdimenB\pagegoal\advance\@IEEEtrantmpdimenB-\pagetotal% space left
  5276. \ifdim #1>\@IEEEtrantmpdimenB\relax% not enough space left
  5277. \ifdim\@IEEEtrantmpdimenB>\z@\relax #2\fi%
  5278. \newpage%
  5279. \fi\endgroup}
  5280. % IEEEbiography ENVIRONMENT
  5281. % Allows user to enter biography leaving place for picture (adapts to font size)
  5282. % As of V1.5, a new optional argument allows you to have a real graphic!
  5283. % V1.5 and later also fixes the "colliding biographies" which could happen when a
  5284. % biography's text was shorter than the space for the photo.
  5285. % MDS 7/2001
  5286. % V1.6 prevent multiple biographies from making multiple TOC entries
  5287. \newif\if@IEEEbiographyTOCentrynotmade
  5288. \global\@IEEEbiographyTOCentrynotmadetrue
  5289. % biography counter so hyperref can jump directly to the biographies
  5290. % and not just the previous section
  5291. \newcounter{IEEEbiography}
  5292. \setcounter{IEEEbiography}{0}
  5293. % photo area size
  5294. \def\@IEEEBIOphotowidth{1.0in} % width of the biography photo area
  5295. \def\@IEEEBIOphotodepth{1.25in} % depth (height) of the biography photo area
  5296. % area cleared for photo
  5297. \def\@IEEEBIOhangwidth{1.14in} % width cleared for the biography photo area
  5298. \def\@IEEEBIOhangdepth{1.25in} % depth cleared for the biography photo area
  5299. % actual depth will be a multiple of
  5300. % \baselineskip, rounded up
  5301. \def\@IEEEBIOskipN{4\baselineskip}% nominal value of the vskip above the biography
  5302. \newenvironment{IEEEbiography}[2][]{\normalfont\@IEEEcompsoconly{\sffamily}\footnotesize%
  5303. \unitlength 1in\parskip=0pt\par\parindent 1em\interlinepenalty500%
  5304. % we need enough space to support the hanging indent
  5305. % the nominal value of the spacer
  5306. % and one extra line for good measure
  5307. \@IEEEtrantmpdimenA=\@IEEEBIOhangdepth%
  5308. \advance\@IEEEtrantmpdimenA by \@IEEEBIOskipN%
  5309. \advance\@IEEEtrantmpdimenA by 1\baselineskip%
  5310. % if this page does not have enough space, break it and lets start
  5311. % with a new one
  5312. \@IEEEtranneedspace{\@IEEEtrantmpdimenA}{\relax}%
  5313. % nominal spacer can strech, not shrink use 1fil so user can out stretch with \vfill
  5314. \vskip \@IEEEBIOskipN plus 1fil minus 0\baselineskip%
  5315. % the default box for where the photo goes
  5316. \def\@IEEEtempbiographybox{{\setlength{\fboxsep}{0pt}\framebox{%
  5317. \begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}\centering PLACE\\ PHOTO\\ HERE \end{minipage}}}}%
  5318. %
  5319. % detect if the optional argument was supplied, this requires the
  5320. % \@ifmtarg command as defined in the appendix section above
  5321. % and if so, override the default box with what they want
  5322. \@ifmtarg{#1}{\relax}{\def\@IEEEtempbiographybox{\mbox{\begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}%
  5323. \centering%
  5324. #1%
  5325. \end{minipage}}}}% end if optional argument supplied
  5326. % Make an entry into the table of contents only if we have not done so before
  5327. \if@IEEEbiographyTOCentrynotmade%
  5328. % link labels to the biography counter so hyperref will jump
  5329. % to the biography, not the previous section
  5330. \setcounter{IEEEbiography}{-1}%
  5331. \refstepcounter{IEEEbiography}%
  5332. \addcontentsline{toc}{section}{Biographies}%
  5333. \global\@IEEEbiographyTOCentrynotmadefalse%
  5334. \fi%
  5335. % one more biography
  5336. \refstepcounter{IEEEbiography}%
  5337. % Make an entry for this name into the table of contents
  5338. \addcontentsline{toc}{subsection}{#2}%
  5339. % V1.6 properly handle if a new paragraph should occur while the
  5340. % hanging indent is still active. Do this by redefining \par so
  5341. % that it will not start a new paragraph. (But it will appear to the
  5342. % user as if it did.) Also, strip any leading pars, newlines, or spaces.
  5343. \let\@IEEEBIOORGparCMD=\par% save the original \par command
  5344. \edef\par{\hfil\break\indent}% the new \par will not be a "real" \par
  5345. \settoheight{\@IEEEtrantmpdimenA}{\@IEEEtempbiographybox}% get height of biography box
  5346. \@IEEEtrantmpdimenB=\@IEEEBIOhangdepth%
  5347. \@IEEEtrantmpcountA=\@IEEEtrantmpdimenB% countA has the hang depth
  5348. \divide\@IEEEtrantmpcountA by \baselineskip% calculates lines needed to produce the hang depth
  5349. \advance\@IEEEtrantmpcountA by 1% ensure we overestimate
  5350. % set the hanging indent
  5351. \hangindent\@IEEEBIOhangwidth%
  5352. \hangafter-\@IEEEtrantmpcountA%
  5353. % reference the top of the photo area to the top of a capital T
  5354. \settoheight{\@IEEEtrantmpdimenB}{\mbox{T}}%
  5355. % set the photo box, give it zero width and height so as not to disturb anything
  5356. \noindent\makebox[0pt][l]{\hspace{-\@IEEEBIOhangwidth}\raisebox{\@IEEEtrantmpdimenB}[0pt][0pt]{%
  5357. \raisebox{-\@IEEEBIOphotodepth}[0pt][0pt]{\@IEEEtempbiographybox}}}%
  5358. % now place the author name and begin the bio text
  5359. \noindent\textbf{#2\ }\@IEEEgobbleleadPARNLSP}{\relax\let\par=\@IEEEBIOORGparCMD\par%
  5360. % 7/2001 V1.5 detect when the biography text is shorter than the photo area
  5361. % and pad the unused area - preventing a collision from the next biography entry
  5362. % MDS
  5363. \ifnum \prevgraf <\@IEEEtrantmpcountA\relax% detect when the biography text is shorter than the photo
  5364. \advance\@IEEEtrantmpcountA by -\prevgraf% calculate how many lines we need to pad
  5365. \advance\@IEEEtrantmpcountA by -1\relax% we compensate for the fact that we indented an extra line
  5366. \@IEEEtrantmpdimenA=\baselineskip% calculate the length of the padding
  5367. \multiply\@IEEEtrantmpdimenA by \@IEEEtrantmpcountA%
  5368. \noindent\rule{0pt}{\@IEEEtrantmpdimenA}% insert an invisible support strut
  5369. \fi%
  5370. \par\normalfont}
  5371. % V1.6
  5372. % added biography without a photo environment
  5373. \newenvironment{IEEEbiographynophoto}[1]{%
  5374. % Make an entry into the table of contents only if we have not done so before
  5375. \if@IEEEbiographyTOCentrynotmade%
  5376. % link labels to the biography counter so hyperref will jump
  5377. % to the biography, not the previous section
  5378. \setcounter{IEEEbiography}{-1}%
  5379. \refstepcounter{IEEEbiography}%
  5380. \addcontentsline{toc}{section}{Biographies}%
  5381. \global\@IEEEbiographyTOCentrynotmadefalse%
  5382. \fi%
  5383. % one more biography
  5384. \refstepcounter{IEEEbiography}%
  5385. % Make an entry for this name into the table of contents
  5386. \addcontentsline{toc}{subsection}{#1}%
  5387. \normalfont\@IEEEcompsoconly{\sffamily}\footnotesize\interlinepenalty500%
  5388. \vskip 4\baselineskip plus 1fil minus 0\baselineskip%
  5389. \parskip=0pt\par%
  5390. \noindent\textbf{#1\ }\@IEEEgobbleleadPARNLSP}{\relax\par\normalfont}
  5391. % provide the user with some old font commands
  5392. % got this from article.cls
  5393. \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
  5394. \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
  5395. \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
  5396. \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
  5397. \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
  5398. \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
  5399. \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
  5400. \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
  5401. \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
  5402. % SPECIAL PAPER NOTICE COMMANDS
  5403. %
  5404. % holds the special notice text
  5405. \def\@IEEEspecialpapernotice{\relax}
  5406. % for special papers, like invited papers, the user can do:
  5407. % \IEEEspecialpapernotice{(Invited Paper)} before \maketitle
  5408. \def\IEEEspecialpapernotice#1{\ifCLASSOPTIONconference%
  5409. \def\@IEEEspecialpapernotice{{\sublargesize\textit{#1}\vspace*{1em}}}%
  5410. \else%
  5411. \def\@IEEEspecialpapernotice{{\\*[1.5ex]\sublargesize\textit{#1}}\vspace*{-2ex}}%
  5412. \fi}
  5413. % PUBLISHER ID COMMANDS
  5414. % to insert a publisher's ID footer
  5415. % V1.6 \IEEEpubid has been changed so that the change in page size and style
  5416. % occurs in \maketitle. \IEEEpubid must now be issued prior to \maketitle
  5417. % use \IEEEpubidadjcol as before - in the second column of the title page
  5418. % These changes allow \maketitle to take the reduced page height into
  5419. % consideration when dynamically setting the space between the author
  5420. % names and the maintext.
  5421. %
  5422. % the amount the main text is pulled up to make room for the
  5423. % publisher's ID footer
  5424. % The IEEE uses about 1.3\baselineskip for journals,
  5425. % dynamic title spacing will clean up the fraction
  5426. \def\@IEEEpubidpullup{1.3\baselineskip}
  5427. \ifCLASSOPTIONtechnote
  5428. % for technotes it must be an integer of baselineskip as there can be no
  5429. % dynamic title spacing for two column mode technotes (the title is in the
  5430. % in first column) and we should maintain an integer number of lines in the
  5431. % second column
  5432. % There are some examples (such as older issues of "Transactions on
  5433. % Information Theory") in which the IEEE really pulls the text off the ID for
  5434. % technotes - about 0.55in (or 4\baselineskip). We'll use 2\baselineskip
  5435. % and call it even.
  5436. \def\@IEEEpubidpullup{2\baselineskip}
  5437. \fi
  5438. % V1.7 compsoc does not use a pullup
  5439. \ifCLASSOPTIONcompsoc
  5440. \def\@IEEEpubidpullup{0pt}
  5441. \fi
  5442. % holds the ID text
  5443. \def\@IEEEpubid{\relax}
  5444. % flag so \maketitle can tell if \IEEEpubid was called
  5445. \newif\if@IEEEusingpubid
  5446. \global\@IEEEusingpubidfalse
  5447. % issue this command in the page to have the ID at the bottom
  5448. % V1.6 use before \maketitle
  5449. \def\IEEEpubid#1{\def\@IEEEpubid{#1}\global\@IEEEusingpubidtrue}
  5450. % command which will pull up (shorten) the column it is executed in
  5451. % to make room for the publisher ID. Place in the second column of
  5452. % the title page when using \IEEEpubid
  5453. % Is smart enough not to do anything when in single column text or
  5454. % if the user hasn't called \IEEEpubid
  5455. % currently needed in for the second column of a page with the
  5456. % publisher ID. If not needed in future releases, please provide this
  5457. % command and define it as \relax for backward compatibility
  5458. % v1.6b do not allow command to operate if the peer review option has been
  5459. % selected because \IEEEpubidadjcol will not be on the cover page.
  5460. % V1.7 do nothing if compsoc
  5461. \def\IEEEpubidadjcol{\ifCLASSOPTIONcompsoc\else\ifCLASSOPTIONpeerreview\else
  5462. \if@twocolumn\if@IEEEusingpubid\enlargethispage{-\@IEEEpubidpullup}\fi\fi\fi\fi}
  5463. % Special thanks to Peter Wilson, Daniel Luecking, and the other
  5464. % gurus at comp.text.tex, for helping me to understand how best to
  5465. % implement the IEEEpubid command in LaTeX.
  5466. %% Lockout some commands under various conditions
  5467. % general purpose bit bucket
  5468. \newsavebox{\@IEEEtranrubishbin}
  5469. % flags to prevent multiple warning messages
  5470. \newif\if@IEEEWARNthanks
  5471. \newif\if@IEEEWARNIEEEPARstart
  5472. \newif\if@IEEEWARNIEEEbiography
  5473. \newif\if@IEEEWARNIEEEbiographynophoto
  5474. \newif\if@IEEEWARNIEEEpubid
  5475. \newif\if@IEEEWARNIEEEpubidadjcol
  5476. \newif\if@IEEEWARNIEEEmembership
  5477. \newif\if@IEEEWARNIEEEaftertitletext
  5478. \@IEEEWARNthankstrue
  5479. \@IEEEWARNIEEEPARstarttrue
  5480. \@IEEEWARNIEEEbiographytrue
  5481. \@IEEEWARNIEEEbiographynophototrue
  5482. \@IEEEWARNIEEEpubidtrue
  5483. \@IEEEWARNIEEEpubidadjcoltrue
  5484. \@IEEEWARNIEEEmembershiptrue
  5485. \@IEEEWARNIEEEaftertitletexttrue
  5486. %% Lockout some commands when in various modes, but allow them to be restored if needed
  5487. %%
  5488. % save commands which might be locked out
  5489. % so that the user can later restore them if needed
  5490. \let\@IEEESAVECMDthanks\thanks
  5491. \let\@IEEESAVECMDIEEEPARstart\IEEEPARstart
  5492. \let\@IEEESAVECMDIEEEbiography\IEEEbiography
  5493. \let\@IEEESAVECMDendIEEEbiography\endIEEEbiography
  5494. \let\@IEEESAVECMDIEEEbiographynophoto\IEEEbiographynophoto
  5495. \let\@IEEESAVECMDendIEEEbiographynophoto\endIEEEbiographynophoto
  5496. \let\@IEEESAVECMDIEEEpubid\IEEEpubid
  5497. \let\@IEEESAVECMDIEEEpubidadjcol\IEEEpubidadjcol
  5498. \let\@IEEESAVECMDIEEEmembership\IEEEmembership
  5499. \let\@IEEESAVECMDIEEEaftertitletext\IEEEaftertitletext
  5500. % disable \IEEEPARstart when in draft mode
  5501. % This may have originally been done because the pre-V1.6 drop letter
  5502. % algorithm had problems with a non-unity baselinestretch
  5503. % At any rate, it seems too formal to have a drop letter in a draft
  5504. % paper.
  5505. \ifCLASSOPTIONdraftcls
  5506. \def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** ATTENTION: \noexpand\IEEEPARstart
  5507. is disabled in draft mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse}
  5508. \fi
  5509. % and for technotes
  5510. \ifCLASSOPTIONtechnote
  5511. \def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** WARNING: \noexpand\IEEEPARstart
  5512. is locked out for technotes (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse}
  5513. \fi
  5514. % lockout unneeded commands when in conference mode
  5515. \ifCLASSOPTIONconference
  5516. % when locked out, \thanks, \IEEEbiography, \IEEEbiographynophoto, \IEEEpubid,
  5517. % \IEEEmembership and \IEEEaftertitletext will all swallow their given text.
  5518. % \IEEEPARstart will output a normal character instead
  5519. % warn the user about these commands only once to prevent the console screen
  5520. % from filling up with redundant messages
  5521. \def\thanks#1{\if@IEEEWARNthanks\typeout{** WARNING: \noexpand\thanks
  5522. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNthanksfalse}
  5523. \def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** WARNING: \noexpand\IEEEPARstart
  5524. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse}
  5525. % LaTeX treats environments and commands with optional arguments differently.
  5526. % the actual ("internal") command is stored as \\commandname
  5527. % (accessed via \csname\string\commandname\endcsname )
  5528. % the "external" command \commandname is a macro with code to determine
  5529. % whether or not the optional argument is presented and to provide the
  5530. % default if it is absent. So, in order to save and restore such a command
  5531. % we would have to save and restore \\commandname as well. But, if LaTeX
  5532. % ever changes the way it names the internal names, the trick would break.
  5533. % Instead let us just define a new environment so that the internal
  5534. % name can be left undisturbed.
  5535. \newenvironment{@IEEEbogusbiography}[2][]{\if@IEEEWARNIEEEbiography\typeout{** WARNING: \noexpand\IEEEbiography
  5536. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEbiographyfalse%
  5537. \setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax}
  5538. % and make biography point to our bogus biography
  5539. \let\IEEEbiography=\@IEEEbogusbiography
  5540. \let\endIEEEbiography=\end@IEEEbogusbiography
  5541. \renewenvironment{IEEEbiographynophoto}[1]{\if@IEEEWARNIEEEbiographynophoto\typeout{** WARNING: \noexpand\IEEEbiographynophoto
  5542. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEbiographynophotofalse%
  5543. \setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax}
  5544. \def\IEEEpubid#1{\if@IEEEWARNIEEEpubid\typeout{** WARNING: \noexpand\IEEEpubid
  5545. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEpubidfalse}
  5546. \def\IEEEpubidadjcol{\if@IEEEWARNIEEEpubidadjcol\typeout{** WARNING: \noexpand\IEEEpubidadjcol
  5547. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEpubidadjcolfalse}
  5548. \def\IEEEmembership#1{\if@IEEEWARNIEEEmembership\typeout{** WARNING: \noexpand\IEEEmembership
  5549. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEmembershipfalse}
  5550. \def\IEEEaftertitletext#1{\if@IEEEWARNIEEEaftertitletext\typeout{** WARNING: \noexpand\IEEEaftertitletext
  5551. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEaftertitletextfalse}
  5552. \fi
  5553. % provide a way to restore the commands that are locked out
  5554. \def\IEEEoverridecommandlockouts{%
  5555. \typeout{** ATTENTION: Overriding command lockouts (line \the\inputlineno).}%
  5556. \let\thanks\@IEEESAVECMDthanks%
  5557. \let\IEEEPARstart\@IEEESAVECMDIEEEPARstart%
  5558. \let\IEEEbiography\@IEEESAVECMDIEEEbiography%
  5559. \let\endIEEEbiography\@IEEESAVECMDendIEEEbiography%
  5560. \let\IEEEbiographynophoto\@IEEESAVECMDIEEEbiographynophoto%
  5561. \let\endIEEEbiographynophoto\@IEEESAVECMDendIEEEbiographynophoto%
  5562. \let\IEEEpubid\@IEEESAVECMDIEEEpubid%
  5563. \let\IEEEpubidadjcol\@IEEESAVECMDIEEEpubidadjcol%
  5564. \let\IEEEmembership\@IEEESAVECMDIEEEmembership%
  5565. \let\IEEEaftertitletext\@IEEESAVECMDIEEEaftertitletext}
  5566. % need a backslash character for typeout output
  5567. {\catcode`\|=0 \catcode`\\=12
  5568. |xdef|@IEEEbackslash{\}}
  5569. % hook to allow easy disabling of all legacy warnings
  5570. \def\@IEEElegacywarn#1#2{\typeout{** ATTENTION: \@IEEEbackslash #1 is deprecated (line \the\inputlineno).
  5571. Use \@IEEEbackslash #2 instead.}}
  5572. % provide some legacy IEEEtran commands
  5573. \def\IEEEcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEcompsoctitleabstractindextext}{IEEEtitleabstractindextext}\IEEEtitleabstractindextext}
  5574. \def\IEEEdisplaynotcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEdisplaynotcompsoctitleabstractindextext}{IEEEdisplaynontitleabstractindextext}\IEEEdisplaynontitleabstractindextext}
  5575. % provide some legacy IEEEtran environments
  5576. % V1.8a no more support for these legacy commands
  5577. %\def\authorblockA{\@IEEElegacywarn{authorblockA}{IEEEauthorblockA}\IEEEauthorblockA}
  5578. %\def\authorblockN{\@IEEElegacywarn{authorblockN}{IEEEauthorblockN}\IEEEauthorblockN}
  5579. %\def\authorrefmark{\@IEEElegacywarn{authorrefmark}{IEEEauthorrefmark}\IEEEauthorrefmark}
  5580. %\def\PARstart{\@IEEElegacywarn{PARstart}{IEEEPARstart}\IEEEPARstart}
  5581. %\def\pubid{\@IEEElegacywarn{pubid}{IEEEpubid}\IEEEpubid}
  5582. %\def\pubidadjcol{\@IEEElegacywarn{pubidadjcol}{IEEEpubidadjcol}\IEEEpubidadjcol}
  5583. %\def\specialpapernotice{\@IEEElegacywarn{specialpapernotice}{IEEEspecialpapernotice}\IEEEspecialpapernotice}
  5584. % and environments
  5585. %\def\keywords{\@IEEElegacywarn{keywords}{IEEEkeywords}\IEEEkeywords}
  5586. %\def\endkeywords{\endIEEEkeywords}
  5587. % V1.8 no more support for legacy IED list commands
  5588. %\let\labelindent\IEEElabelindent
  5589. %\def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin}
  5590. %\def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth}
  5591. %\def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep}
  5592. %\def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc}
  5593. %\def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl}
  5594. %\def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr}
  5595. % V1.8 no more support for QED and proof stuff
  5596. %\def\QED{\@IEEElegacywarn{QED}{IEEEQED}\IEEEQED}
  5597. %\def\QEDclosed{\@IEEElegacywarn{QEDclosed}{IEEEQEDclosed}\IEEEQEDclosed}
  5598. %\def\QEDopen{\@IEEElegacywarn{QEDopen}{IEEEQEDopen}\IEEEQEDopen}
  5599. %\AtBeginDocument{\def\proof{\@IEEElegacywarn{proof}{IEEEproof}\IEEEproof}\def\endproof{\endIEEEproof}}
  5600. % V1.8 no longer support biography or biographynophoto
  5601. %\def\biography{\@IEEElegacywarn{biography}{IEEEbiography}\IEEEbiography}
  5602. %\def\biographynophoto{\@IEEElegacywarn{biographynophoto}{IEEEbiographynophoto}\IEEEbiographynophoto}
  5603. %\def\endbiography{\endIEEEbiography}
  5604. %\def\endbiographynophoto{\endIEEEbiographynophoto}
  5605. % V1.7 and later no longer supports \overrideIEEEmargins
  5606. %\def\overrideIEEEmargins{%
  5607. %\typeout{** WARNING: \string\overrideIEEEmargins \space no longer supported (line \the\inputlineno).}%
  5608. %\typeout{** Use the \string\CLASSINPUTinnersidemargin, \string\CLASSINPUToutersidemargin \space controls instead.}}
  5609. \endinput
  5610. %%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of IEEEtran.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  5611. % That's all folks!