; TeX output 1997.01.22:1745y?gKDtGGcmr17LdKGXQ cmr12AT[-E;gX`2gG cmmi12"for7tclassandpacqkagewriters#CCopryrightN9hc!", cmsy10 R1995TheLDD"|{Ycmr8A_ٺT UE!X3ProjectoAllrighrtsreserved+-28NorvembSer19961č>Nff cmbx12Contents>"V cmbx101MIn9troQduction2 MK`y cmr101.1dW*ritingUUclassesandpackqagesforL5ffٓRcmr7A͉TU>'ExX2 b> cmmi10".pۍ.............2M1.2dOverviewk...............................3M1.3dF*urtherUUinformation .........................3>2MW ritingTclassesandpac9k\rages4M2.1dOldUUversionsMԍ..............................4M2.2dUsingUU`doGcstrip'and`doc'......................4M2.3dIsUUitaclassorapackqage?$......................5M2.4dCommandUUnames ...........................5M2.5dBoxUUcommandsandcolourU......................6M2.6dDe ningUUtextandmathcharactersٍ.................6M2.7dGeneralUUstyle.............................7>3MTheTstructureofaclassorpac9k\rage[9M3.1dIdenti cationT獍.............................10M3.2dUsingUUclassesandpackqagesT......................10M3.3dDeclaringUUoptions ...........................11M3.4dAUUminimalclass lez..........................13M3.5dExample:qaUUloGcalletterclass).....................14M3.6dExample:qaUUnewsletterclassč.....................14>4MCommandsTforclassandpac9k\ragewritersq15M4.1dIdenti cationT獍.............................16M4.2dLoadingUU les#(..............................17M4.3dOptionUUdeclaration1>..........................17M4.4dCommandsUUwithinoptioncoGde獍...................18M4.5dMovingUUoptionsaround........................19M4.6dDelayingUUcoGde.............................20M4.7dOptionUUproGcessing@..........................211*y?M4.8dSafeUU lecommandsƕ..........................23 M4.9dRepGortingUUerrors,etcɍ.........................24M4.10dDe ningUUcommandsj"..........................25M4.11dMovingUUarguments?x..........................26>5MMiscellaneousTcommands,etc27M5.1dLayoutUUparameters?y..........................27M5.2dCaseUUchanging̍.............................27M5.3dTheUU`opGenany'optioninthe`book'classK..............28M5.4dBetterUUuser-de nedmathdisplayenvironments -..........28>6MUpgradingTL*f$cmbx7AT<8E3sX2.09classesandpac9k\ragesfC29M6.1dT*ryUUit rst!T򍍑..............................29M6.2dT*roubleshoGoting?............................29M6.3dF*ontUUcommands............................29M6.4dObsoleteUUcommands.........................31'č>1VLIntros3duction>ThisjdoGcumentisanintroGductiontowritingclassesandpackqagesforL5ffA͉TU>'ExX,with>spGecialWattentiongiventoupgradingexistingL5ffA͉TU>'ExX2.09packqagestoL5ffA͉TU>'ExX2"(.>Thelattersub8jectisalsocoveredinanarticlebyJohannesBraamspublished>inUUTUGbGoat15.3.!6>N cmbx121.1\Writingclassesandpack@agesforLAl#2@cmbx8A~/TESXa2!DF cmmib10"uT>L5ffA͉TU>'ExX߻isadoGcumentpreparationsystemthatenablesthedocumentwriterto>concentrate5onthecontentsoftheirtext,mwithoutbGotheringtoomuch5about>theoPformattingofit.F*orexample,uchaptersareindicatedby'ratherUUthanbyselecting18ptbGold.>TheD lethatcontainstheinformationabGouthowtoturnlogicalstructure(like>`\chapter')Zkintoformatting(like`18ptbGoldraggedright')isado}'cumentclass.>Inaddition,Esomefeatures(suchascolourorincludedgraphics)areindepGendent>ofUUthedoGcumentclassandthesearecontainedinp}'ackages.>Oneofthelargestdi erencesbGetweenL5ffA͉TU>'ExX2.09andL5ffATU>'ExX2",isinthecom->mandsusedtowritepackqagesandclasses.&]InL5ffA͉TU>'ExX2.09,therewasverylittle>suppGortforwriting.sty les,C{andsowritershadtoresorttousinglow-level>commands.>L5ffA͉TU>'ExX2"fprovideshigh-levelcommandsforstructuringpackqages.9Itisalsomuch>easier9tobuildclassesandpackqagesontopofeachother,?forexamplewritinga>loGcal-technicalreportclasscetechr(fortheChemicalEngineeringdepartment)>basedUUonarticle.2y?>1.2\Overview?܍>This\doGcumentcontainsanoverviewofhowtowriteclassesandpackqagesfor >L5ffA͉TU>'ExX.7Itk%doGesnot]introduceallofthecommandsnecessarytowritepackqages:>thesecanbGefoundineitherL雍Q)t}\cmti7ATKß'E-X:AF_Do}'cumentFPreparationSystemorThe>L雍QATKß'E-XBComp}'anion.TButitdoGesdescribethenewcommandsforstructuring>classesUUandpackqages.Dۍ>SectionT2.7zcontains`7somegeneraladviceabGoutwritingclassesandpackqages.WItpdescribGesthedi erencebetweenpclassesandpackqages,wthecommandWnaming conventions,theuseofdocanddocstrip,howTU>'ExX'sprimitiveW leandbGoxcommandsinteractwithL5ffA͉TU>'ExX.ItalsocontainssomehintsWabGoutUUgeneralL5ffA͉TU>'ExXstyle.ʈ>SectionT3q(ԲdescribGesthestructureofclassesandpackqages.NThisincludesbuild-Wingclassesandpackqagesontopofotherclassesandpackqages,mdeclaringWoptionsUUanddeclaringcommands.qItalsocontainsexampleclasses.>SectionT4q(ԲlistsUUthenewclassandpackqagecommands.>SectionT6q(ԲgivesPdetailedadviceonhowtoupgradeexistingL5ffA͉TU>'ExX2.09classesWandUUpackqagestoL5ffA͉TU>'ExX2"(.!>1.3\Furtherinformation?܍>F*orGageneralintroGductiontoL5ffA͉TU>'ExX,includingthenewfeaturesofL5ffATU>'ExX2"(",you>shouldUUreadL雍QATKß'E-X:ADo}'cumentPreparationSystembyUULeslieLampGort[3].ʈ>AqmoredetaileddescriptionofthenewfeaturesofL5ffA͉TU>'ExX,andanoverviewof>moreNthan150packqages,ListobGefoundinTheyL雍QATKß'E-XComp}'anionKbyNMichel>GoGossens,UUF*rankMittelbachandAlexanderSamarin[1].>TheƝL5ffA͉TU>'ExXsystemisbasedonTU>'EX,"whichisdescribGedinTheTKß'E-Xb}'ook*by>DonaldUUE.Knuth[2].>ThereareanumbGerofdocumentation leswhichaccompanyeverycopyof>L5ffA͉TU>'ExX.AcopyofL雍QATKß'E-XNews3willcomeoutwitheachsix-monthlyreleaseof>L5ffA͉TU>'ExX,and~Risfoundinthe lesltnews*.tex.Theauthor'sguideL雍QATKß'E-X2",Pfor>AuthorsfdescribGesthenewL5ffA͉TU>'ExXdocumentfeatures;3-itisinusrguide.tex.>ThePguideL雍QATKß'E-X2"+DF;ont!Sele}'ctiondescribGestheL5ffA͉TU>'ExXfontselectionschemefor>class- andpackqage-writers;"itisinfntguide.tex.XCon guringL5ffA͉TU>'ExXiscovered>by{?theguideCon gur}'ationMoptionsforL雍QATKß'E-X2".nin{?cfgguide.texwhilstthe>philosophybGehindourpolicyonmodifyingL5ffA͉TU>'ExXisdescribedinMo}'difying>L雍QATKß'E-XinUUmodguide.tex.>W*eDaregraduallyturningthesourcecoGdeforL5ffA͉TU>'ExXintoaL5ffATU>'ExXdoGcument>L雍QATKß'E-X:8thew+pr}'ogram.g^This6doGcumentincludesanindexofL5ffA͉TU>'ExXcommandsand>canUUbGetypesetfromsource2e.tex.379y?>F*orj_moreinformationabGoutTU>'ExXandL5ffA͉TU>'EX,]pleasecontactyourloGcalTU>'ExXUsers >Group,UUortheinternationalTU>'ExXUsersGroup.qHerearesomeusefuladdresses.mW*o cmr9TuAEXUsersGroup,01850UnionStreet#1637,SanF:rancisco,CA94123, WUSAWF:ax:T+14159828559*Email:p+ߤN cmtt9tug@tug.orgWUKTTUG,1EymoreClose,SellyOak,BirminghamB294LB,UKWF:ax:p+44T1214762159*Email:uktug-enquiries@tex.ac.uk%>2VLWfritingffclassesandpackages?>This sectioncovers somegeneralpGointsconcernedwithwritingL5ffA͉TU>'ExXclasses>andUUpackqages. q>2.1\Oldversionsx>IfXyouareupgradinganexistingL5ffA͉TU>'ExX2.09style lethenwerecommendfreezing>the<2.09versionandnolongermaintainingit.|ExpGeriencewiththevqarious>dialects9ofL5ffA͉TU>'ExXwhichexistedintheearly1990'ssuggeststhatmaintaining>packqagesvPfordi erentversionsofL5ffA͉TU>'ExXisalmostimpGossible.ԷItwill,~ofcourse,>bGeWnecessaryforsomeorganisationstomaintainbothversionsinparallelfor>someXtimebutthisisnotessentialforthosepackqagesandclassessuppGortedby>individuals:theyqGshouldsuppGortonlythenewstandardL5ffA͉TU>'ExX2"(,xDnotobsolete>versionsUUofL5ffA͉TU>'ExX.>2.2\Using`do`cstrip'and`doc'x>IfSyouaregoingtowritealargeclassorpackqageforL5ffA͉TU>'ExXthenyoushould>consider`usingthedocsoftware`whichcomeswithL5ffA͉TU>'ExX.L5ffATU>'EX`classesand>packqageswrittenusingthiscanbGeprocessedintwoways: (theycanbGerun>throughL5ffA͉TU>'ExX,+toproGducedocumentation;andtheycanbeprocessedwith>docstrip,UUtoproGducethe.clsor.sty le.6$>Thedocsoftwarecanautomaticallygenerateindexesofde nitions,Uindexes>ofcommanduse,Wandchange-loglists.Itisveryusefulformaintainingand>doGcumentingUUlargeTU>'ExXsources.>The6doGcumentedsourcesoftheL5ffA͉TU>'ExXkernelitself,etc,KareIdocdoGcuments;M/theyareinthe.dtx lesinthedistribution.mY*oucan,>infact,?typGesetthesourcecodeofthekernelasonelongdocument,?complete>withUUindex,byrunningL5ffA͉TU>'ExXonsource2e.tex.>F*orHmoreinformationondocanddocstrip,consultthe lesdocstrip.dtx,>doc.dtx,//and%ThehL雍QATKß'E-XComp}'anion.aF*orexamplesofitsuse,//loGokatthe.dtx> les.4HKy?>2.3\Isitaclassorapack@age?Q>The{ rstthingtodowhenyouwanttoputsomenewL5ffA͉TU>'ExXcommandsina le >is1todecidewhetheritshouldbGeado}'cument+classRorapackage.`\Theruleof>thumbUUis:vWIfIthecommandscouldbGeusedwithanydocumentclass,thenmakeWthemUUapackqage;andifnot,thenmakethemaclass.v>Therearetwoma8jortypGesofclass:thoselikearticle,reportorletter,>whichwarefree-standing;andthosewhichareextensionsorvqariationsofother>classes|forgexample,theprocdoGcumentclass,whichisbuiltonthearticle>doGcumentUUclass.|>Thus,y,a companymighthavealoGcalownletclassforprintingletterswith>theirownheadednote-papGer.Suchaclasswouldbuildontopoftheexist->ingletterclassbutitcannotbGeusedwithanyotherdocumentclass,sowe>haveUUownlet.clsratherthanownlet.sty.>TheBgraphicspackqage,}incontrast,}providescommandsforincludingimages>into^aL5ffA͉TU>'ExXdoGcument.ZSincethesecommandscanbGeusedwithanydoGcument>class,UUwehavegraphics.styratherthangraphics.cls.ԓ>2.4\CommandnamesQ>L5ffA͉TU>'ExXUUhasthreetypGesofcommand.>Thereˬaretheauthorcommands,Asuchas\section,\emphand\times:^umost>ofUUthesehaveUUshortnames,allinlowerUUcase.>Therearealsotheclassandpackqagewritercommands:Kmostofthesehavelong>mixed-caseUUnamessuchasthefollowing.vL,\InputIfFileExists s,\RequirePackage\PassOptionsToClassv>Finally*,thereJcaretheinternalcommandsusedintheL5ffA͉TU>'ExXimplementation,such>as5\@tempcnta,,\@ifnextcharand\@eha: mostofthesecommandscontain@>in":theirname,UswhichmeanstheycannotbGeusedindocuments,Usonlyinclass>andUUpackqage les.>Unfortunately*,forhistoricalreasonsthedistinctionbGetweenthesecommandsis>oftenblurred.F*orexample,\hboxisaninternalcommandwhichshouldonly>bGenusedintheL5ffA͉TU>'ExXkernel,u5whereas\m@neistheconstant1andcouldhave>bGeenUU\MinusOne.>However, (thisruleofthumbisstilluseful:Pifacommandhas@initsnamethen>itq'ExXlanguage|anditsbehaviourmaychange>incfuturereleases!Do}'cumentjPreparationSystem,1othen(vyoucanrelyonfuturereleasesofL5ffA͉TU>'ExX2">suppGortingUUthecommand.5UРy?>2.5\BoxcommandsandcolouruT>Even|ifyoudonotintendtousecolourinyourowndoGcuments,#bytakingnoteof >thepGointsinthissectionyoucanensurethatyourclassorpackqageiscompatible>withthecolorpackqage.ThismaybGene tpeopleusingyourclassorpackqage>whoUUhaveaccesstocolourprinters.>The/simplestway/toensure`coloursafety'istoalwaysuseL5ffA͉TU>'ExXbGoxcommands>ratherbthanTU>'ExXprimitives,#thatisuse\sboxratherthan\setbox,\mboxrather>than\hboxand\parboxortheminipageenvironmentratherthan\vbox.QThe>L5ffA͉TU>'ExX4bGoxcommandshavenewoptionswhichmeanthattheyarenowaspGow->erfulUUastheTU>'ExXprimitives.>AsCJanexampleofwhatcangowrong,Fconsiderthatin{\ttfamily?htextظi }the>font isrestoredjustb}'eforeKthe },SwhereasinthesimilarloGokingconstruction>{\color{green}?htextظi }[βthecolourisrestoredjustaftero[the nal}.3Normally>thiswdistinctiondoGesnotmatteratall;butconsideraprimitiveTU>'ExXboxassign->mentUUsuchas:L,\setbox0=\hbox{\color{green}- cmsy9h.j cmti9textilI}>Now]0thecolour-restoreoGccursafterthe}andsoisnotPstoredinthebox.Exactly>what bade ectsthiscanhave depGendsonhowcolourisimplemented:8itcan>range(fromgettingthewrongcoloursintherestofthedoGcument,$tocausing>errorsUUinthedvi-driverusedtoprintthedoGcument.>Alsofofinterestisthecommand\normalcolor.Thisisnormallyjust\relax>(i.e.,'doGesnothing)butyoucanuseitratherlike\normalfonttosetregionsof>theUUpagesuchascaptionsorsectionheadingstothe`maindoGcumentcolour'.!6>2.6\De ningtextandmathcharactersuT>BecauseL5ffA͉TU>'ExX2"*ÆsuppGortsdi erentencodings,ide nitionsofcommandsforpro->ducing^symbGols,accents,compGosite^glyphs,etc.mustbGede nedusingthecom->mands+providedforthispurpGoseanddescribedinL雍QATKß'E-X2"+>F;ontpartofthesystemisstillunderdevelopmentsosuchtasksshouldbGeundertaken>withUUgreatcaution.>Also,\DeclareRobustCommand\shouldbGeusedforencoding-independentcom->mandsUUofthistypGe.>Note@thatitisnolongerpGossibletorefertothemathfontset-upoutsidemath>moGde:,forjexample,neither\textfont?1nor\scriptfont2areguaranteedto>bGeUUde nedinothermodes.6by?>2.7\GeneralstyleuT>ThenewsystemprovidesmanycommandsdesignedtohelpyouproGducewell- >structuredclassandpackqage lesthatarebGothrobustandportable. 5This>sectionUUoutlinessomewaysUUtomakeintelligentuseofthese.6>2.7.1a#LoadingTother les>L5ffA͉TU>'ExXUUprovidesthesecommands:/ow cmss9NewTdescription 1995/12/01L,\LoadClass%̰\LoadClassWithOptions L,\RequirePackage,\RequirePackageWithOptions>forHusingclassesorpackqagesinsideotherclassesorpackqages.$W*erecommend>stronglythatyouusethem,ratherthantheprimitive\inputcommand,fora>numbGerUUofreasons.>FilesUUloadedwith\input?h lename[i5fwillnotbGelistedinthe\listfileslist.>IfIapackqageisalwaysloadedwith\RequirePackage...or\usepackagethen, >evennifitsloadingisrequestedseveraltimes,contrast,ifitisloadedwith\inputthenitcanbGeloadedmorethanonce;>suchanextraloadingmaywastetimeandmemoryanditmayproGducestrange>results.>Ifapackqageprovidesoption-proGcessingthen,0again,strangeresultsarepossi->bleRifthepackqageis\inputratherthanloadedbymeansof\usepackageor>\RequirePackage....>Ifthepackqagefoo.styloadsthepackqagebaz.stybyuseof\input?baz.sty>thenUUtheuserwillgetawarning:L,LaTeXWarning:Youhaverequestedpackage`foo', butthepackageprovides`baz'.>Thus,UUforseveralreasons,using\inputtoloadpackqagesisnotagoGodUUidea.>Unfortunately*,qif8youareupgradingthe lemyclass.stytoaclass lethenyou>havetomakesurethatanyold leswhichcontain\input?myclass.stystill>work.>Thisݲwasalsotrueforthestandardclasses(article,bookandreport),sincea>lotofexistingL5ffA͉TU>'ExX2.09doGcumentstylescontain\input?article.sty.}The>approachwhichweusetosolvethisistoprovideminimal lesarticle.sty,>book.styUUandreport.sty,whichsimplyloadtheappropriateclass les.>F*orUUexample,article.stycontainsjustthefollowinglines:7oy?L,\NeedsTeXFormat{LaTeX2e} L,\@obsoletefile{article.cls}{article.sty}L,\LoadClass{article}>Y*our"maywishtodothesameor,yUifyouthinkthatitissafetodoso,yUyoumay >decideUUtojustremoveUUmyclass.sty.6>2.7.2a#Mak9eTitrobustuT>W*econsideritgoGodpractice,8whenwritingpackqagesandclasses,touseL5ffA͉TU>'ExX>commandsUUasmuchUUaspGossible.>Thus,͊insteadOofusing\def...werecommendusingoneof\newcommand,>\renewcommandqor\providecommand;\CheckCommandisalsouseful.H&Doingthis>makessitlesslikelythatyouwillinadvertentlyrede neacommand,{ givingun->expGectedUUresults.>Whenoyoude neanenvironment,use\newenvironmentor\renewenvironment>insteadUU\def\foo{...}and\def\endfoo{...}.>Ifyouneedtosetorchangethevqalueofahdimenci-orhskipi#=ղregister,e7use>\setlength.>T*o'ExXcommandssuchas\sbox,A\mboxand\parbox>ratherUUthan\setbox,\hboxand\vbox.>Use(F\PackageError,\PackageWarningor\PackageInfo(ortheequivqalent>classUUcommands)ratherthan\@latexerr,\@warningor\wlog.>ItisstillpGossibletodeclareoptionsbyde ning\ds@hoptionci)Handcalling>\@options;but,werecommendthe\DeclareOptionand\ProcessOptions>commands~instead.CThesearemorepGowerful~anduselessmemory*.Sorather>thanUUusing:L,\def\ds@draft{\overfullrule5pt} L,\@options>youUUshoulduse:L,\DeclareOption{draft}{\setlength{\overfullrule}{5pt}}L,\ProcessOptions\relax>The2advqantageofthiskindofpracticeisthatyourcoGdeismorereadableand, >moreimpGortant,thatitislesslikelytobreakwhenusedwithfutureversionsof>L5ffA͉TU>'ExX.8 zy?>2.7.3a#Mak9eTitpQortable>It>isalsosensibletomakeyour lesareaspGortableaspossible.j+T*oensurethis; >theyD@shouldcontainonlyvisible7-bittext;Iandthe lenamesshouldcontainat>most eightcharacters(plusthethreeletterextension).XAlso,ofcourse,itm9ust>nothavethesamenameasa leinthestandardL5ffA͉TU>'ExXdistribution,however>similarUUitscontentsUUmaybGetooneofthese les.f>ItisalsousefulifloGcalclassesorpackqageshaveacommonpre x,forexample>theUniversityofNowhereclassesmightbGeginwithunw. Thishelpstoavoid>everyUUUniversityhavingitsownthesisclass,allcalledthesis.cls.>If"yourelyonsomefeaturesoftheL5ffA͉TU>'ExXkernel, `oronapackqage, `pleasespGecify>therelease-dateyouneed. F*orexample,F_thepackqageerrorcommandswere>introGducedUUintheJune1994releaseso,ifyouusethemthenyoushouldput:捑L,\NeedsTeXFormat{LaTeX2e}[1994/06/01]>2.7.4a#UsefulThoQoks>SomepackqagesanddoGcumentstyleshadtorede nethecommand\document>or\enddocumenttoachievetheirgoal.yThisisnolongernecessary*.Youcan>nowiusethe`hoGoks'\AtBeginDocumentand\AtEndDocument(seeSection4.6).>Again,R6usingQnthesehoGoksmakesitlesslikelythatyourcoGdebreakswithfuture>versionsbofL5ffA͉TU>'ExX.LItalsomakesitmorelikelythatyourpackqagecanwork>togetherUUwithsomeoneelse's.>However,$notethatcoGdeinthe\AtBeginDocumenthookispartofthepream-NewTdescription 1996/12/01>ble.ThusgbtherearerestrictionsonwhatcanbGeputthere;iinparticular,no>typGesetttingUUcanbedone.%)>3VLTheffstructureofaclassorpackage>L5ffA͉TU>'ExX2"gTclassesandpackqageshavemorestructurethanL5ffA͉TU>'ExX2.09style les>did.qTheUUoutlineofaclassorpackqage leis:@3>Iden9ti cationTheWV lesaysthatitisaL5ffA͉TU>'ExX2",Vpackqageorclass,WandgivesaWshortUUdescriptionofitself.f>PreliminaryTdeclarations.Here\the ledeclaressomecommandsandcanalsoWloadother les.SUsuallythesecommandswillbGejustthoseneededfortheWcoGdeUUusedinthedeclaredoptions.>Optionsj^TheUU ledeclaresandproGcessesitsoptions.>MoreTdeclarationsThisEiswherethe ledoGesmostofitswork: declaringnewWvqariables,UUcommandsandfonts;andloadingother les.9 y?>3.1\Identi cation퍑>The rstthingaclassorpackqage ledoGesisidentifyitself.SPackqage lesdothis >asUUfollows:sL,\NeedsTeXFormat{LaTeX2e} L,\ProvidesPackage{hpackage i&}[hdate i]hotherNF*orUUexample:L,\NeedsTeXFormat{LaTeX2e}L,\ProvidesPackage{latexsym}[1994/06/01StandardLaTeXpackage]s>ClassUU lesdothisasfollows:L,\NeedsTeXFormat{LaTeX2e}L,\ProvidesClass{hclass-name i3ʟ}[hdate i]hotherNF*orUUexample:L,\NeedsTeXFormat{LaTeX2e}L,\ProvidesClass{article}[1994/06/01StandardLaTeXclass]s>TheJhdate[i":shouldJbGegivenintheform`0- cmcsc10yyyy/mm/dd'.ǥThisdateischecked >wheneverauserspGeci esadateintheir\documentclassor\usepackagecom->mand.qF*orUUexample,ifyouwrote:sL,\documentclass{article}[1995/12/23]>thenusersatadi erentloGcationwouldgetawarningthattheircopyofarticle>wasUUoutofdate.>The:descriptionofaclassisdisplayed:whentheclassisused.RwThedescription>ofSapackqageisputintothelog le.Thesedescriptionsarealsodisplayedby>thed\listfilescommand.wThephraseStandard?LaTeXdJm9ust >notbGeused>intheidenti cationbannerofany leotherthanthoseinthestandardL5ffA͉TU>'ExX>distribution.![>3.2\Usingclassesandpack@ages퍑>TheO rstma8jordi erencebGetweenOL5ffA͉TU>'ExX2.09style lesandL5ffATU>'ExX2"+packqages>and[classesisthatL5ffA͉TU>'ExX2"-`suppGortsmo}'dularity,]inthesenseofbuilding les>fromUUsmallbuilding-bloGcksratherthanusinglargesingle les.>AUUL5ffA͉TU>'ExXpackqageorclasscanloadapackqageasfollows:10 y?L,\RequirePackage[hoptionsi$]{hpackage i&}[hdate il]֍>F*orUUexample:֍L,\RequirePackage{ifthen}[1994/06/01]>Thisycommandhasthesamesyntaxastheauthorcommand\usepackage.(Ital- >lowsCpackqagesorclassestousefeaturesprovidedbyotherpackqages.F*orexample,>byaloadingtheifthenpackqage,oapackqagewritercanusethe`if...then...else...'>commandsUUprovidedbythatpackqage.ύ>AUUL5ffA͉TU>'ExXclasscanloadoneotherclassasfollows:L,\LoadClass[hoptionsi$]{hclass-name i3ʟ}[hdate il]֍>F*orUUexample:L,\LoadClass[twocolumn]{article}>Thislcommandhasthesamesyntaxastheauthorcommand\documentclass. >ItallowsclassestobGebasedonthesyntaxandappGearanceofanotherclass.IF*or>example,L>byloadingthearticleclass,aclasswriteronlyhastochangethe>bitsUUofarticletheydon'tlike,ratherthanwritinganewclassfromscratch.ύ>TheifollowingcommandscanbGeusedinthecommoncasethatyouwanttoNewTfeature 1995/12/01>simply`Cloadaclassorpackqage lewithexactlythoseoptionsthatarebGeing>usedUUbythecurrentclass.L,\LoadClassWithOptions{hclass-name i3ʟ}[hdate il] L,\RequirePackageWithOptions{hpackage i&}[hdate il]֍>F*orUUexample:L,\LoadClassWithOptions{article}L,\RequirePackageWithOptions{graphics}[1995/12/01]!>3.3\Declaringoptionsl#>The^otherma8jordi erencebGetween^L5ffA͉TU>'ExX2.09stylesandL5ffATU>'ExX2".Hpackqages >and classesisinoptionhandling.`4Packqages andclassescannowdeclareoptions>andDthesecanbGespeci edbyauthors;;forexample,jthetwocolumnoptionis>declaredUUbythearticleclass.ύ>AnUUoptionisdeclaredasfollows:11 Dy?L,\DeclareOption{hoption9i!+}{hcode i}@>F*orbexample,ethedvipsoption(slightlysimpli ed)tothegraphicspackqageis >implementedUUas:@L,\DeclareOption{dvips}{\input{dvips.def}}>Thiswmeansthatwhenanauthorwrites\usepackage[dvips]{graphics},xthe> ledvips.defisloaded.IAsanotherexample, thea4paperoptionisdeclared>inUUthearticleclasstosetthe\paperheightand\paperwidthlengths:@L,\DeclareOption{a4paper}{% ZY\setlength{\paperheight}{297mm}%ZY\setlength{\paperwidth}{210mm}%L,}@>Sometimesbauserwillrequestanoptionwhichtheclassorpackqagehasnot>explicitly"declared.`BydefaultthiswillproGduceawarning(forclasses)orerror>(forUUpackqages);thisbGehaviourcanbGealteredasfollows:@L,\DeclareOption*{hcode i}>F*orexample,tomakethepackqagefredproGduceawarningratherthananerror>forUUunknownoptions,youcouldspGecify:@L,\DeclareOption*{% ZY\PackageWarning{fred}{Unknownoption`\CurrentOption'}%L,}@>Then,Y?if%Canauthorwrites\usepackage[foo]{fred},theywillgetawarning>Package?fredWarning: Unknownoption`foo'.{Asanotherexample,Ƞthe>fontencvpackqagetriestoloada lehENCsi!Xenc.defwheneverthehENCsi$3option>isUUused.qThiscanbGedonebywriting:@L,\DeclareOption*{%ZY\input{\CurrentOptionenc.def}%L,}@>It٦ispGossibletopassoptionsontoanotherpackqageorclass,cusingthecommand>\PassOptionsToPackageor\PassOptionsToClass./TF*orexample,topassevery>unknownUUoptionontothearticleclass,youcanuse:@L,\DeclareOption*{%ZY\PassOptionsToClass{\CurrentOption}{article}%L,}12 y?>IfyoudothisthenyoushouldmakesureyouloadtheclassatsomelaterpGoint, >otherwiseUUtheoptionswillneverbGeprocessed!>Sofar,އwehaveexplainedonlyhowtodeclareoptions,އnothowtoexecutethem.>T*oUUproGcesstheoptionswithwhichthe lewascalled,youshoulduse:L,\ProcessOptions\relax>This+executesthehc}'ode[i"+foreachoptionthatwasbGothspeci edanddeclared>(seeUUSection4.7fordetailsofhowthisisdone).>F*orUUexample,ifthejanepackqage lecontains:L,\DeclareOption{foo}{\typeout{Sawfoo.}} L,\DeclareOption{baz}{\typeout{Sawbaz.}}L,\DeclareOption*{\typeout{What's\CurrentOption?}}L,\ProcessOptions\relax>andanauthorwrites\usepackage[foo,bar]{jane},thentheywillseethe >messagesUUSaw?foo.qDzandWhat'sbar?!6>3.4\Aminimalclass leuT>MostRoftheworkofaclassorpackqageisinde ningnewcommands,Sorchanging>theӰappGearanceofdocuments.Thisisdoneinthebodyofthepackqage,Gusing>commandsUUsuchas\newcommandor\setlength.>L5ffA͉TU>'ExX2"ezprovidesVseveralnewcommandstohelpclassandpackqagewriters;these>areUUdescribGedindetailinSection4.>ThereTqarethreethingsthateveryclass lemustGIcontain:qUtheseareade nition>of*\normalsizeandvqaluesfor\textwidthand\textheight.Soaminimal>doGcumentUUclass le^1Ȳlookslikethis:L,\NeedsTeXFormat{LaTeX2e} L,\ProvidesClass{minimal}[1995/10/30StandardLaTeXminimalclass]L,\renewcommand{\normalsize}{\fontsize{10pt}{12pt}\selectfont}L,\setlength{\textwidth}{6.5in}L,\setlength{\textheight}{8in}>However,GthisZclass lewillnotsuppGortfootnotes,Gmarginals, oats,etc.nor >willitprovideanyofthe2-letterfontcommandssuchas\rm;&thusmostclasses>willUUcontainmorethanthisminimum!>ffffv J= "5-:Aacmr61LܿThisXclassisnoÎwinthestandarddistribution,as1Cscmtt8minimal.cls.13y?>3.5\Example:alo`calletterclass.:>AOcompanyOmayhaveitsownletterclass,forsettinglettersinthecompany >style. Thissectionshowsasimpleimplementationofsuchaclass,Falthougha>realUUclasswouldneedmorestructure.捑>TheUUclassbGeginsbyannouncingitselfasneplet.cls.&L,\NeedsTeXFormat{LaTeX2e} L,\ProvidesClass{neplet}[1995/04/01NonExistentPressletterclass]&>Then thisnextbitpassesanyoptionsontotheletterclass,Rwhichisloaded>withUUthea4paperoption.L,\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}} L,\ProcessOptions\relaxL,\LoadClass[a4paper]{letter}&>In>ordertousethecompanyletterhead,Citrede nesthefirstpagepagestyle: >thisUUisthepagestylethatisusedonthe rstpageofletters.L,\renewcommand{\ps@firstpage}{%ZY\renewcommand{\@oddhead}{hletterheadNAndUUthat'sit! *G>3.6\Example:anewsletterclass.:>AVsimplenewslettercanbGetypesetwithL5ffA͉TU>'ExX,Wjusingavqariantofthearticle >class.qTheUUclassbGeginsbyannouncingitselfassmplnews.cls.L,\NeedsTeXFormat{LaTeX2e}L,\ProvidesClass{smplnews}[1995/04/01TheSimpleNewsnewsletterclass]L,\newcommand{\headlinecolor}{\normalcolor}&>It$passesmostspGeci edoptionsontothearticleclass:eapartfromthe >onecolumnz&option,Zwhichisswitchedo ,Zandthegreenoption,whichsetsthe>headlineUUingreen.L,\DeclareOption{onecolumn}{\OptionNotUsed} L,\DeclareOption{green}{\renewcommand{\headlinecolor}{\color{green}}}L,\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}L,\ProcessOptions\relax14y?>ItUUthenloadstheclassarticlewiththeoptiontwocolumn.#鍑L,\LoadClass[twocolumn]{article}#鍑>Since>thenewsletteristobGeprintedincolour,C1itnowloadsthecolorpackqage. >TheclassdoGesnotspecifyadevicedriveroptionsincethisshouldbespeci ed>byUUtheuserofthesmplnewsclass.L,\RequirePackage{color}#鍑>Theclassthenrede nes\maketitletoproGducethetitlein72ptHelveticabold>oblique,UUintheappropriatecolour.L,\renewcommand{\maketitle}{% ZY\twocolumn[%hF\fontsize{72}{80}\fontfamily{phv}\fontseries{b}%hF\fontshape{sl}\selectfont\headlinecolorhF\@titleZY]%L,}#鍑>ItUUrede nes\sectionandswitcheso sectionnumbGering.L,\renewcommand{\section}{%ZY\@startsectionhF{section}{1}{0pt}{-1.5explus-1exminus-.2ex}%hF{1explus.2ex}{\large\sffamily\slshape\headlinecolor}%L,}L,\setcounter{secnumdepth}{0}#鍑>ItUUalsosetsthethreeessentialthings.L,\renewcommand{\normalsize}{\fontsize{9}{10}\selectfont}L,\setlength{\textwidth}{17.5cm}L,\setlength{\textheight}{25cm}#鍑>InNbpractice,Oaclasswouldneedmorethanthis:nMitwouldprovidecommandsfor >issue numbGers,Zauthorsofarticles,pagestylesandsoon;%butthisskeletongives>aUUstart.qTheltnewsclass leisnotmuchUUmorecomplexthanthisone.%F>4VLCommandsffforclassandpackagewriters>ThissectiondescribGesbrie yeachofthenewcommandsforclassandpackqage>writers.6T*o ndoutabGoutotheraspectsofthenewsystem,?youshouldalsoread>L雍QATKß'E-X: AvDo}'cument̄PreparationSystem,ATheL雍QATKß'E-XCompanionWBandL雍QATKß'E-X2">forAuthors.15!y?>4.1\Identi cation5L>The rstgroupofcommandsdiscussedherearethoseusedtoidentifyyourclass >orUUpackqage le.o$@ff&1ͤLτ ffΟ1\NeedsTeXFormatT{hformat-name i;}[hrelease-date i6]͡ ff5ff&阍>ThisLcommandtellsTU>'ExXthatthis leshouldbGeprocessedusingaformatwith>namehformat-name[iEN. kY*oucanusetheoptionalargumenthr}'elease-date[iDto>furtherzgspGecifytheearliestreleasedateoftheformatthatisneeded.When>the{@releasedateoftheformatisolderthantheonespGeci edawarningwillbe>generated.WThestandardhformat-name[iFisLaTeX2e.Thedate,ifpresent,must>bGeUUintheformyyyy/mm/dd.>Example:䍑L,\NeedsTeXFormat{LaTeX2e}[1994/06/01] `$ffy1ͤLτ ffΟ1\ProvidesClassT{hclass-name i3ʟ}[hrelease-info'i56]? ff ͤLτ ffΟ1\ProvidesPackageT{hpackage-name i?}[hrelease-info'i56]͡ ff5ffy厎ō>This#declaresthatthecurrent lecontainsthede nitionsforthedoGcumentclass>hclass-name[iyeCorUUpackqagehp}'ackage-name[iH,W.>TheUUoptionalhr}'elease-infoi<ﺲ,ifused,mustcontain:?荍MWtheUUreleasedateofthisversionofthe le,intheformyyyy/mm/dd;MWoptionallyLfollowedbyaspaceandashortdescription,NZpGossiblyincludingWaUUversionnumbGer.>ThedabGovesyntaxshouldbGefollowedexactlysothatthisinformationcanbGe>used"by\LoadClassor\documentclass(forclasses)or\RequirePackageor>\usepackageUU(forpackqages)totestthatthereleaseisnottoGoold.>Thec wholeofthishr}'elease-infoiB`informationisdisplayedc by\listfilesand>shouldUUthereforenotbGetoolong.>Example:䍑L,\ProvidesClass{article}[1994/06/01v1.0StandardLaTeXclass] L,\ProvidesPackage{ifthen}[1994/06/01v1.0StandardLaTeXpackage]o$@ffi1ͤLτ ffΟ1\ProvidesFileT{h le-name i,D}[hrelease-info'i56]͡ ff5ffi阍>Thisfissimilartothetwofpreviouscommandsexceptthatherethefull lename,>including/theextension,%mustbGegiven.UItisusedfordeclaringany lesother>thanUUmainclassandpackqage les.>Example:16yy?L,\ProvidesFile{T1enc.def}[1994/06/01v1.0StandardLaTeXfile]>NotethatthephraseStandard?LaTeXm9ust,notbGeusedintheidenti cation >bannerUUofany leotherthanthoseinthestandardL5ffA͉TU>'ExXdistribution.!6>4.2\Loading lesuT>ThisogroupofcommandscanbGeusedtocreateyourowndoGcumentclassorNewTfeature 1995/12/01>packqageUUbybuildingonexistingclassesorpackqages."($ff! 1ͤLτ ffΟ1\RequirePackageT[hoptions-listi4o=]{hpackage-name i?}[hrelease-info'i56]͡ ff ͤLτ ffΟ1\RequirePackageWithOptionsT{hpackage-name i?}[hrelease-info'i56] ff5ff! ō>PackqagesUUandclassesshouldusethesecommandstoloadotherpackages.>Theuseof\RequirePackageisthesameastheauthorcommand\usepackage.>Examples:L,\RequirePackage{ifthen}[1994/06/01] L,\RequirePackageWithOptions{graphics}[1995/12/01]"a$ffI؟1ͤLτ ffΟ1\LoadClassT[hoptions-listi4o=]{hclass-name i3ʟ}[hrelease-info'i56]͡ ffͤLτ ffΟ1\LoadClassWithOptionsT{hclass-name i3ʟ}[hrelease-info'i56] ff5ffI؎>Theseucommandsareforuseonlyinclass les, les;UUtheycanbGeusedatmostoncewithinaclass le.>Theuseof\LoadClassisthesameastheuseof\documentclasstoloadaclass> le.>Examples:L,\LoadClass{article}[1994/06/01] L,\LoadClassWithOptions{article}[1995/12/01]>ThetwoWithOptionsversionssimplyloadtheclass(orpackqage) lewithex-NewTfeature1995/12/01 >actly-thoseoptionsthatarebGeingusedbythecurrent le(classorpackqage).>SeeUUbGelow,in4.5,forfurtherdiscussionoftheiruse.!6>4.3\OptiondeclarationuT>Thefollowingcommandsdealwiththedeclarationandhandlingofoptionsto>doGcumentUUclassesandpackqages.17y?>TherearesomecommandsdesignedespGeciallyforusewithinthehc}'ode[i"argu- >mentUUofthesecommands(seebGelow).o$@ffA1ͤLτ ffΟ1\DeclareOptionT{hoption-name i:*}{hcode i}͡ ff5ffA阍>Thismakeshoption-name[iFxa`declaredoption'oftheclassorpackqageinwhich>itUUisput.>Thethc}'ode[i argumenttcontainsthecoGdetobeexecutedifthatoptionisspeci ed>forUUtheclassorpackqage;itcancontainanyvqalidL5ffA͉TU>'ExX2"+Tconstruct.>Example:L,\DeclareOption{twoside}{\@twosidetrue}o$@ffxH(1ͤLτ ffΟ1\DeclareOption*T{hcode i}͡ ff5ffxH(阍>Thisdeclaresthehc}'ode[i"=tobGeexecutedforeveryoptionwhichisspGeci edfor,>butotherwisenotexplicitlydeclaredby*,atheclassorpackqage;thiscoGdeiscalled>theUU`defaultoptioncoGde'anditcancontainanyvqalidL5ffA͉TU>'ExX2"+Tconstruct.>Ifaclass lecontainsno\DeclareOption*then,bydefault,allspGeci edbut>undeclaredlLoptionsforthatclasswillbGesilentlypassedtoallpackqages(aswill>theUUspGeci edanddeclaredoptionsforthatclass).>Ifapackqage lecontainsno\DeclareOption*then,hbydefault,heachspGeci ed>butUUundeclaredoptionforthatpackqagewillproGduceanerror.!6>4.4\Commandswithinoptionco`deuT>ThesextwocommandscanbGeusedonlywithinthehc}'ode[i%argumentofei->ther\DeclareOptionor\DeclareOption*.cOthercommandscommonlyused>withinUUtheseargumentscanbGefoundinthenextfewsubsections.o$@ffN&51ͤLτ ffΟ1\CurrentOption͡ ff5ffN&5阍>ThisUUexpandstothenameofthecurrentoption.$@ffN&51ͤLτ ffΟ1\OptionNotUsed͡ ff5ffN&5>ThisUUcausesthecurrentoptiontobGeaddedtothelistof`unusedoptions'.>Y*ouecannowincludehashmarks(#)withinthesehc}'ode[i#argumentswithoutNewTfeature 1995/06/01 >spGecialUUtreatment(formerly*,ithadbeennecessarytodoublethem).18y?>4.5\Movingoptionsaround*Ս>These[twocommandsarealsoveryusefulwithinthehc}'ode[i&؋argumentof >\DeclareOptionUUor\DeclareOption*:"OE$ffRq1ͤLτ ffΟ1\PassOptionsToPackageT{hoptions-listi4o=}{hpackage-name i?}͡ ff ͤLτ ffΟ1\PassOptionsToClassT{hoptions-listi4o=}{hclass-name i3ʟ}? ff5ffRq>Thecommand\PassOptionsToPackagepassestheoptionsinhoptions-listظi?to>packqagehp}'ackage-name[iH .Thismeansthatitaddsthehoption-listظiof[optionsusedbyanyfuture\RequirePackageor\usepackagecommandfor>packqageUUhp}'ackage-name[iH,W.>Example:DL,\PassOptionsToPackage{foo,bar}{fred} L,\RequirePackage[baz]{fred}D>isUUthesameas:L,\RequirePackage[foo,bar,baz]{fred}>Similarly*,<\PassOptionsToClass{maybGeusedinaclass letopassoptionsto >anotherUUclasstobGeloadedwith\LoadClass.>Thehwe ectsanduseofthesetwohwcommandsshouldbGecontrastedwiththoseofNewTdescription 1995/12/01>theUUfollowingtwo(doGcumentedabGove,in4.2):DL,\LoadClassWithOptions L,\RequirePackageWithOptions>Thezecommand\RequirePackageWithOptionsissimilarto\RequirePackage,>butitalwaysloadstherequiredpackqagewithexactlythesameoptionlistas>thatbGeingusedbythecurrentclassorpackqage,2ratherthanwithanyoption>explicitlyUUsuppliedorpassedonby\PassOptionsToPackage.>ThemainpurpGoseof\LoadClassWithOptionsistoallowoneclasstosimply>buildUUonanother,forexample:DGs,\LoadClassWithOptions{article}>ThisUUshouldbGecomparedwiththeslightlydi erentconstructionGs,\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} Gs,\ProcessOptions\relaxGs,\LoadClass{article}19岠y?>As9usedabGove,2the9e ectsaremoreorlessthesame,butthe rstisalotless >toUUtypGe;alsothe\LoadClassWithOptionsmethodrunsslightlyquicker.=>If,2however,the)Mclassdeclaresoptionsofitsownthenthetwoconstructionsare>di erent.qCompare,UUforexample:_֍Gs,\DeclareOption{landscape}{\@landscapetrue} Gs,\ProcessOptions\relaxGs,\LoadClassWithOptions{article}_֍>with:Gs,\DeclareOption{landscape}{\@landscapetrue}Gs,\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}Gs,\ProcessOptions\relaxGs,\LoadClass{article}_֍>Inthe rstexample,/the2m#R cmss10articleclasswillbGeloadedwithoptionlandscape >preciselywhenthecurrentclassiscalledwiththisoption.B0Bycontrast,+inthe>secondexampleitwillneverbGecalledwithoptionlandscapeasinthatcase>article.ispassedoptionsonlybythedefaultoptionhandler,butthishandleris>notUUusedforlandscapebGecausethatoptionisexplicitlydeclared.!>4.6\Delayingco`deG>These)5 rsttwo)5commandsarealsointendedprimarilyforusewithinthehc}'ode[i>argumentUUof\DeclareOptionor\DeclareOption*."OE$ffxH(1ͤLτ ffΟ1\AtEndOfClassT{hcode i}? ff ͤLτ ffΟ1\AtEndOfPackageT{hcode i}͡ ff5ffxH(>Thesecommandsdeclarehc}'ode[i bthatissavedawayinternallyandthenexecuted>afterUUproGcessingthewholeofthecurrentclassorpackqage le.=>RepGeatedAuseofthesecommandsispermitted:IGthecodeintheargumentsis>storedUU(andlaterexecuted)intheorderoftheirdeclarations."a$ff}1ͤLτ ffΟ1\AtBeginDocumentT{hcode i}͡ ff ͤLτ ffΟ1\AtEndDocumentT{hcode i}? ff5ff}>Thesecommandsdeclarehc}'ode[i ˲tobGesavedinternallyandexecutedwhileL5ffA͉TU>'ExX>isUUexecuting\begin{document}or\end{document}.=>Thehc}'ode[i UspGeci edintheargumentto\AtBeginDocumentisexecutednearthe>endğofthe\begin{document}coGde,after,thefontselectiontableshavebGeenset>up./?It}isthereforeausefulplacetoputcoGdewhichneedstobeexecutedafter20Ԡy?>everything=hasbGeenpreparedfortypGesettingandwhenthenormalfontforthe >doGcumentUUisthecurrentfont.>The\AtBeginDocumenthoGokshouldnotbeusedforcodethatdoesanytypGe-NewTdescription 1995/12/01>settingUUsincethetypGesetresultwouldbGeunpredictable.>TheҸhc}'ode[i$yspGeci edintheargumentto\AtEndDocumentisexecutedatthe>bGeginning|`ofthe\end{document}code,"b}'eforebGefore anyleftover oatingenvironmentsareproGcessed.YIfsomeofthehc}'ode[i!۲is>toFbGeexecutedafterthesetwoFprocesses,youFshouldincludea\clearpageat>theUUappropriatepGointinhc}'ode[iC*.>RepGeatedAuseofthesecommandsispermitted:IGthecodeintheargumentsis>storedUU(andlaterexecuted)intheorderoftheirdeclarations.o$@ffr/[1ͤLτ ffΟ1\AtBeginDviT{hspecialsi%h}͡ ff5ffr/[NewTfeature 1994/12/01阍>TheselcommandssavelinabGoxregisterthingswhicharewrittentothe.dvi le>atUUthebGeginningofthe`shipout'ofthe rstpageofthedocument.>ThisURshouldnotbGeusedforanythingthatwilladdanytypGesetmaterialtothe>.dviUU le.>RepGeatedUUuseofthiscommandispermitted.!6>4.7\Optionpro`cessing"O$@ffR˟1ͤLτ ffΟ1\ProcessOptions͡ ff5ffRˎ阍>ThisUUcommandexecutesthehc}'ode[i!foreachselectedoption.>W*e9shall rstdescribGehow\ProcessOptionsworksinapackqage le,?)andthen>howUUthisdi ersinaclass le.>T*ounderstandindetailwhat\ProcessOptionsdoGesinapackqage le,youhave>toUUknowthedi erencebGetweenlo}'cal]޲andUUglobaloptions.MWLoQcaloptionsarethosewhichhavebGeenexplicitlyspeci edforthisWparticularUUpackqageinthehoptions!i.̲argumentofanyofthese:m\PassOptionsToPackage{hoptions!i("}\usepackage[hoptions!i]m\RequirePackage[hoptions!i("]MWGlobalu optionsareanyotheroptionsthatarespGeci edbytheauthorinWtheUUhoptions!i.̲argumentUUof\documentclass[hoptions!i("].>F*orUUexample,suppGosethatadocumentbegins:21۠y?L,\documentclass[german,twocolumn]{article} L,\usepackage{gerhardt}>whilstUUpackqagegerhardtcallspackqagefredwith:L,\PassOptionsToPackage{german,dvips,a4paper}{fred}L,\RequirePackage[errorshow]{fred}>then:MWfred'sUUloGcaloptionsaregerman,dvips,a4paperanderrorshow;MWfred'sUUonlyglobaloptionistwocolumn.>WhenUU\ProcessOptionsiscalled,thefollowinghappGen.MWFirst,L:forIeachoptionsofardeclaredinfred.styby\DeclareOption,L:it WloGoksntoseeifthatoptioniseitheraglobaloralocaloptionforfred:ifWitUUisthenthecorrespGondingcodeisexecuted.WThismfisdoneintheorderinwhichtheseoptionsweredeclaredinfred.sty.MWThen,Cfor?feachremaininglo}'calGoption,the?fcommand\ds@hoptionci'# isexe-WcutedifithasbGeende nedsomewhere(otherthanbya\DeclareOption);Wotherwise,6qthe.`defaultoptioncoGde'isexecuted.dIfnodefaultoptioncodeWhasUUbGeendeclaredthenanerrormessageisproduced.WThisUUisdoneintheorderinwhichtheseoptionswerespGeci ed.>ThroughoutXthisproGcess,Rthesystemensuresthatthecodedeclaredforanoption>isUUexecutedatmostonce.>ReturningUUtotheexample,iffred.stycontains:L,\DeclareOption{dvips}{\typeout{DVIPS}} L,\DeclareOption{german}{\typeout{GERMAN}}L,\DeclareOption{french}{\typeout{FRENCH}}L,\DeclareOption*{\PackageWarning{fred}{Unknown`\CurrentOption'}}L,\ProcessOptions\relax>thenUUtheresultofproGcessingthisdocumentwillbe:L,DVIPSL,GERMANL,PackagefredWarning:Unknown`a4paper'.L,PackagefredWarning:Unknown`errorshow'.22'y?>NoteUUthefollowing:MWthecoGdeforthedvipsoptionisexecutedbeforethatforthegerman Woption,=:bGecause73thatistheorderinwhichtheyaredeclaredinfred.sty;MWthecoGdeforthegermanoptionisexecutedonlyonce,WwhenthedeclaredWoptionsUUarebGeingprocessed;MWthea4paperanderrorshowoptionsproGducethewarningfromthecodeWdeclaredby\DeclareOption*(intheorderinwhichtheywerespGeci ed),WwhilstthetwocolumnoptiondoGesnot:thisisbecausetwocolumnisaWglobalUUoption.>Indaclass le,\ProcessOptionsworksinthesameway*,exceptthat:alloptions>areloGcal;andthedefaultvqaluefor\DeclareOption*is\OptionNotUsedrather>thanUUanerror.>Notethat,DbGecause\ProcessOptionshasa*-form,itiswisetofollowtheNewTdescription 1995/12/01>non-startformwith\relax,asinthepreviousexamples,sincethisprevents>unnecessaryUUloGokaheadandpossiblymisleadingerrormessagesbeingissued.o$@ff41ͤLτ ffΟ1\ProcessOptions*T\@options͡ ff5ff4阍>ThisEWislike\ProcessOptionsbutitexecutestheoptionsintheorderspGeci ed>inIthecallingcommands,LAratherthanintheorderofdeclarationintheclassor>packqage.qF*orUUapackqagethismeansthattheglobaloptionsareproGcessed rst.>The=\@optionscommandfromL5ffA͉TU>'ExX2.09hasbGeenmadeequivqalenttothisin>orderUUtoeasethetaskofupGdatingolddocumentstylestoL5ffA͉TU>'ExX2"+Tclass les.o$@ff׈1ͤLτ ffΟ1\ExecuteOptionsT{hoptions-listi4o=}͡ ff5ff׈阍>F*oreachoptioninthehoptions-listظi<,'inorder,thiscommandsimplyexecutes>the command\ds@hoptionci&;(ifthiscommandisnotde ned,thenthatoptionis>silentlyUUignored).>It:canbGeusedtoprovidea`defaultoptionlist'justbefore\ProcessOptions.>F*or9example,suppGosethatinaclass leyouwanttosetupthedefaultdesign>toUUbGe:qtwo-sidedprinting;11ptfonts;intwocolumns.qThenitcouldspGecify:L,\ExecuteOptions{11pt,twoside,twocolumn}!6>4.8\Safe lecommandsuT>These commandsdealwith leinput;theyensurethatthenon-existenceofa>requestedUU lecanbGehandledinauser-friendlyway*.23 9y?$@ff͙W1ͤLτ ffΟ1\IfFileExistsT{h le-name i,D}{htrue i O}{hfalse iѥ}͡ ff5ff͙W阍>IfUUthe leexiststhenthecoGdespeci edinhtrue[i isexecuted.>IfUUthe ledoGesnotexistthenthecodespeci edinhfalse[i"2isexecuted.>ThisUUcommanddoGesnotH-inputthe le.o$@ff9E1ͤLτ ffΟ1\InputIfFileExistsT{h le-name i,D}{htrue i O}{hfalse iѥ}͡ ff5ff9E>Thisinputsthe leh le-name[i8theUUcoGdespeci edinhtrue[i isexecuted.>IfUUthe ledoGesnotexistthenthecodespeci edinhfalse[i"2isexecuted.>ItUUisimplementedusing\IfFileExists.!6>4.9\Rep`ortingerrors,etcuT>ThesemcommandsshouldbGeusedbythirdpartyclassesandpackqagestorepGort>errors,UUortoprovideinformationtoauthors."($ff;1ͤLτ ffΟ1\ClassErrorT{hclass-name i3ʟ}{herror-texti.1}{hhelp-texti*6}? ff ͤLτ ffΟ1\PackageErrorT{hpackage-name i?}{herror-texti.1}{hhelp-texti*6}͡ ff5ff;>TheseproGduceanerrormessage.oTheherr}'or-textظi9&isdisplayedandthe?error>promptUUisshown.qIftheusertypGesh,theywillbeshownthehhelp-textظi0.>Within theherr}'or-textظi9eIJandhhelp-textظi1>Ʋ:#\\protectcanbGeusedtostopacom->mandfromexpanding;Y\MessageBreakcausesaline-break;and\spaceprints>aUUspace.>Note$thattheherr}'or-textظi9̲willhave$afullstopaddedtoit,sodonotputone>intoUUtheargument.>F*orUUexample:L,\newcommand{\foo}{FOO} L,\PackageError{ethel}{%ZYYourhovercraftisfullofeels,\MessageBreakZYand\protect\foo\spaceis\fooL,}{%ZYOhdear!Something'sgonewrong.\MessageBreakZY\space\spaceTrytyping\spaceZY\spacetoproceed,ignoring\protect\foo.L,}>proGducesUUthisdisplay:24y?L,!PackageethelError:Yourhovercraftisfullofeels, L,(ethel)K`and\fooisFOO.L,Seetheethelpackagedocumentationforexplanation.>IfUUtheusertypGesh,thiswillbeshown:L,Ohdear!Something'sgonewrong.UTrytyping s,toproceed,ignoring\foo.8a$ff1ͤLτ ffΟ1\ClassWarningT{hclass-name i3ʟ}{hwarning-texti:;}7gá ffͤLτ ffΟ1\PackageWarningT{hpackage-name i?}{hwarning-texti:;}"&Q ffͤLτ ffΟ1\ClassWarningNoLineT{hclass-name i3ʟ}{hwarning-texti:;}? ffͤLτ ffΟ1\PackageWarningNoLineT{hpackage-name i?}{hwarning-texti:;}͡ ffͤLτ ffΟ1\ClassInfoT{hclass-name i3ʟ}{hinfo-texti)R}V9顄 ffͤLτ ffΟ1\PackageInfoT{hpackage-name i?}{hinfo-texti)R}@w ff5ffꎎ0ō>ThefourWarningcommandsaresimilartotheerrorcommands,FPexceptthat >theyUUproGduceonlyawarningonthescreen,withnoerrorprompt.>The rsttwo,Warning versions,also showthelinenumbGerwherethewarning>oGccurred,UUwhilstthesecondtwo,UUWarningNoLineversions,donot.>The_ftwoInfocommandsaresimilarexceptthattheylogtheinformationonly>in?thetranscript le,includingthelinenumbGer.There?arenoNoLineversions>ofUUthesetwo.>Withinthehwarning-textظiHyŲandhinfo-textظi1:.\protectcanbGeusedtostopa>commandfromexpanding;Z\MessageBreakcausesaline-break;and\space>printsobaspace.%!Also,`theseshouldnotendwithafullstopasoneisautomatically>added.!6>4.10cDe ningcommandsuT>L5ffA͉TU>'ExX2"gpprovides4someextramethoGdsof(re)de ningcommandsthatarein->tendedUUforuseinclassandpackqage les.>Thee*-formsofthesecommandsshouldbGeusedtode necommandsthatareNewTfeature 1994/12/01>not,}inuTU>'ExXterms,long.ThiscanbGeusefulforerror-trappingwithcommands>whoseUUargumentsarenotintendedtocontainwholeparagraphsoftext."($ff)91ͤLτ ffΟ1\DeclareRobustCommandT{hcmdpi`}[hnum9ib][hdefaulti"M]{hde nition9i-} c ff ͤLτ ffΟ1\DeclareRobustCommand*T{hcmdpi`}[hnum9ib][hdefaulti"M]{hde nition9i-}͡ ff5ff)9ō>Thisjcommandtakesthesameargumentsas\newcommandbutitdeclaresa>robustvcommand,evenifsomecoGdewithinthehde nitionci4&isfragile.'Y*oucanuse>thisfNcommandtode nenewrobustcommands,ortorede neexistingcommands25#y?>and&makethemrobust.A%logisputintothetranscript leifacommandis >rede ned.>F*orUUexample,if\seqisde nedasfollows:L,\DeclareRobustCommand{\seq}[2][n]{% U\ifmmode_#1_{1}\ldots#1_{#2}%U\else_\PackageWarning{fred}{Youcan'tuse\protect\seq\spaceintext}%U\fiL,}>Then9thecommand\seqcanbGeusedinmovingarguments,+qeventhough>\ifmmodeUUcannot,forexample:L,\section{Stuffaboutsequences$\seq{x}$}>NoteAmalsothatthereisnoneedtoputa\relaxbGeforethe\ifmmodeatthe>bGeginningdofthede nition;l]thisisbecausetheprotectiongivenbythis\relax>againstUUexpansionatthewrongtimewillbGeprovidedinternally*."($ffl1ͤLτ ffΟ1\CheckCommandT{hcmdpi`}[hnum9ib][hdefaulti"M]{hde nition9i-} c ff ͤLτ ffΟ1\CheckCommand*T{hcmdpi`}[hnum9ib][hdefaulti"M]{hde nition9i-}͡ ff5ffl>ThisFtakesthesameargumentsas\newcommandbut,Iratherthande nehcmdi=,>itjustchecksthatthecurrentde nitionofhcmdi&0²isexactlyasgivenby>hde nitionciok.qAnUUerrorisraisedifthesede nitionsdi er.>ThislcommandisusefulforcheckinglthestateofthesystembGeforeyourpackqage>startsalteringthede nitionsofcommands..Itallowsyoutocheck,inparticular,>thatUUnootherpackqagehasrede nedthesamecommand.!6>4.11cMovingargumentsuT>Then4settingofprotectwhilstproGcessing(i.e.moving)movingargumentshasNewTdescription 1994/12/01>bGeenmreimplemented,2ashasthemethodofwritinginformationfromthe.aux le>toother lessuchasthe.toc le.;_DetailscanbGefoundinthe leltdefns.dtx.>W*eUUhopGethatthesechangeswillnota ectmanypackqages.260(y?>5VLMiscellaneousffcommands,etcU>5.1\Layoutparameters"k$ffD 1ͤLτ ffΟ1\paperheight͡ ff ͤLτ ffΟ1\paperwidth c ff5ffD ō>TheseStwoparametersareusuallysetbytheclasstobGethesizeofthepaperbe- >ingv0used.'fThisshouldbGeactualpapersize,unlike\textwidthand\textheight>whichUUarethesizeofthemaintextbGodyUUwithinthemargins.!.>5.2\Casechanging( $ffqah1ͤLτ ffΟ1\MakeUppercaseT{htexti}͡ ff ͤLτ ffΟ1\MakeLowercaseT{htexti}͡ ff5ffqah>TU>'ExXprovidestwoprimitives\uppercaseand\lowercaseforchangingthecaseNewTfeature 1995/06/01>ofǚtext.ȕThesearesometimesusedindoGcumentclasses,$*forexampletoset>informationUUinrunningheadsinallcapitals.nw>Unfortunately*,X}these$TU>'ExXprimitivesdonotchangethecaseofcharactersac->cessedbycommandslike\aeor\aa.DT*oovercomethisproblem,L5ffA͉TU>'ExXprovides>twoUUnewcommands\MakeUppercaseand\MakeLowercasetodothis.>F*orUUexample:*50c\uppercase{aBcD\ae\AA\ss\OE}ABCD;aA P\lowercase{aBcD\ae\AA\ss\OE}abGcd;aAl\MakeUppercase{aBcD\ae\AA\ss\OE}ABCD;aASS l\MakeLowercase{aBcD\ae\AA\ss\OE}abGcda>Thecommands\MakeUppercaseand\MakeLowercasethemselvesarerobust, >butUUtheyhaveUUmovingarguments.>TheAcommandsusetheTU>'ExXprimitives\uppercaseand\lowercase,}andso>have;anumbGer;ofunexpected`features'.zInparticular,theychangethecaseof>everything(exceptcharactersinthenamesofcontrol-sequences)intheirtext>argument:qthisUUincludesmathematics,environmentnames,andlabGelnames.>F*orUUexample:L,\MakeUppercase{$x+y$in\ref{foo}}>proGducesUUX²+8Y9andthewarning:L,LaTeXWarning:Reference`FOO'onpage...undefinedon...279Xy?>Inthelongrun,ҳwewouldliketouseall-capsfontsratherthananycommand >like%\MakeUppercasebutthisisnotpGossibleatthemomentbGecausesuchfonts>doUUnotexist.>InZorderthatuppGer/lower-casingZwillworkreasonablywell,andinordertoNewTdescription 1995/12/01>provideRanycorrecthyphenation,QL5ffA͉TU>'ExX2"-0Mmust*use,QthroughoutadoGcument,>the|osame xedtableforchangingcase.Thetableusedisdesignedforthefont>encoGdingT1;JthisworkswellwiththestandardTU>'ExXfontsforallLatinalphabGets>butUUwillcauseproblemswhenusingotheralphabGets.!6>5.3\The`op`enany'optioninthe`book'classuT>ThewopenanyoptionallowschapterandsimilaropGeningstooccuronlefthandNewTdescription 1996/06/01>pages.UPreviouslythisoptiona ectedonly\chapterand\backmatter.Itnow>alsoUUa ects\part,\frontmatterand\mainmatter.>5.4\Betteruser-de nedmathdisplayenvironmentso$@ffo9O1ͤLτ ffΟ1\ignorespacesafterend͡ ff5ffo9O阍>SuppGose"thatyouwanttode neanenvironmentfordisplayingtextthatisNewTfeature 1996/12/01>numbGeredUUasanequation.qAstraightforwardUUwaytodothisisasfollows:Gs,\newenvironment{texteqn} PX{\begin{equation}_\begin{minipage}{0.9\linewidth}}ZY{\end{minipage}U\end{equation}}>However,if youhavetriedthisthenyouwillprobablyhavenoticedthatitdoGes >notYworkpGerfectlywhenusedinthemiddleofaparagraphbecauseaninter-word>spaceUUappGearsatthebeginningofthe rstlineaftertheenvironment.>Thereisnowanextracommand(withaverylongname)avqailablethatyoucan>useUUtoavoidUUthisproblem;itshouldbGeinsertedasshownhere:Gs,\newenvironment{texteqn} PX{\begin{equation}_\begin{minipage}{0.9\linewidth}}ZY{\end{minipage}U\end{equation}U\ignorespacesafterend}28Cky?>6VLUpgradingffL++AnTL32EdX2.09classesandpackages>This-sectiondescribGesthechangesyoumayneedtomakewhenyouupgradean >existingL5ffA͉TU>'ExXstyletoapackqageorclassbutweshallstartinoptimisticmoGde.>Many existingstyle leswillrunwithL5ffA͉TU>'ExX2".iwithoutanymoGdi cationto>the leitself.!WheneverythingisrunningOK,pleaseputanoteinthenewly>created}packqageorclass letorecordthatitrunswiththenewstandardL5ffA͉TU>'ExX;>thenUUdistributeittoyourusers.!6>6.1\Tryit rst!uT>The> rstthingyoushoulddoistotestyourstylein`compatibilitymoGde'.jOThe>only6 changeyouneedtomakeinordertodothisis,nSpGossibly*,to6 changethe>extensionofthe leto.cls:youshouldmakethischangeonlyifyour le>was{usedasamaindoGcumentstyle.Now,ŞwithoutanyothermoGdi cations,>rununL5ffA͉TU>'ExX2",>onunadoGcumentthatusesyour le.Thisassumesthatyouhavea>suitableB[collectionof lesthattestsallthefunctionalityprovidedbyyourstyle> le.q(IfUUyouhaven't,nowisthetimetomakeone!)>Y*ounowneedtochangethetestdoGcument lessothattheyareL5ffA͉TU>'ExX2">doGcuments:kseeHL雍QATKß'E-X2",! forAuthors#forHdetailsofhowtodothisandthentry>them! again.'Y*ouhave! nowtriedthetestdoGcumentsinbGothL5ffA͉TU>'ExX2"-native>moGdeUUandL5ffA͉TU>'ExX2.09compatibilitymode.!6>6.2\Troublesho`otinguT>IfUUyour ledoGesnotworkwithL5ffA͉TU>'ExX2"(,therearetwolikelyreasons.MWL5ffA͉TU>'ExX:gnowhasarobust,rwell-de neddesigner'sinterfaceforselectingfonts,WwhichUUisverydi erentfromtheL5ffA͉TU>'ExX2.09internals.MWY*ourystyle lemayhaveusedsomeL5ffA͉TU>'ExX2.09internalcommandswhichWhaveUUchanged,orwhichhavebGeenremoved.>Whenayouaredebuggingyour le,youwillprobablyneedmoreinformation>thanIkisnormallydisplayedIkbyL5ffA͉TU>'ExX2"*. NThisisachievedbyresettingthe>countererrorcontextlinesfromitsdefaultvqalueof1toamuchhigher>vqalue,UUe.g.999.!6>6.3\FontcommandsuT>Some5fontandsizecommandsarenowde nedbythedoGcumentclassrather>than9+bytheL5ffA͉TU>'ExXkernel.hdIfyouareupgradingaL5ffA͉TU>'ExX2.09doGcumentstyleto29M8y?>aclassthatdoGesnotloadoneofthestandardclasses,thenyouwillprobably >needUUtoaddde nitionsforthesecommands.o$@ffG1ͤLτ ffΟ1\rmT\sf\tt\bf\it\sl\sc͡ ff5ffG阍>Noneƚoftheseshort-formfontselectioncommandsarede nedintheL5ffA͉TU>'ExX2">kernel.qTheyUUarede nedbyallthestandardclass les.{ʍ>Ifyouwanttode netheminyourclass le,thereareseveralreasonableways>toUUdothis.>OneUUpGossiblede nitionis:BL,\newcommand{\rm}{\rmfamily} L,...L,\newcommand{\sc}{\scshape}B>This^wouldmakethefontcommandsorthogonal;cforexample{\bf\it?text} >wouldWproGducebolditalic,Xqthus:v5F C cmbxti10text².y>ItwillalsomakethemproGduceanerror>ifUUusedinmathmoGde.>AnotherUUpGossiblede nitionis:BL,\DeclareOldFontCommand{\rm}{\rmfamily}{\mathrm} L,...L,\DeclareOldFontCommand{\sc}{\scshape}{\mathsc}B>Thiswillmake\rmactlike\rmfamilyintextmoGde(seeabove)anditwillmake >\rmUUselectthe\mathrmmathalphabGetinmathmode.>ThusUU${\rm?math}=X+1$willproGduce`math9=X²+81'.>IfƗyoudonotwantfontselectiontobGeorthogonalthenyoucanfollowthe>standardUUclassesandde ne:BL,\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} L,...L,\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\mathsc}B>Thismeans,Boforexample,that{\bf\it?text}willproGducemediumweight >(ratherUUthanbGold)italic,thus:qtext."a$ffD 1ͤLτ ffΟ1\normalsize c ffͤLτ ffΟ1\@normalsize͡ ff5ffD ō>Themcommand\@normalsizeisretainedforcompatibilitywithL5ffA͉TU>'ExX2.09pack->ages5whichmayhaveuseditsvqalue;?butrede ningitinaclass lewillhaveno>e ectUUsinceitisalwaysUUresettohaveUUthesamemeaningas\normalsize.{ʍ>This\@normalsize;UUforexample(aratherincompleteone):30Zy?L,\renewcommand{\normalsize}{\fontsize{10}{12}\selectfont}>NoteUUthat\normalsizeisde nedbytheL5ffA͉TU>'ExXkerneltobGeanerrormessage."=}$ff1ͤLτ ffΟ1\tinyT\footnotesize\small\large͡ ff ͤLτ ffΟ1\LargeT\LARGE\huge\Huge+} ff5ffō>None^^oftheseother`standard'size-changingcommandsarede nedinthekernel: >eachyneedstobGede nedinaclass leifyouneedit.2Theyareallde nedby>theUUstandardclasses.>This*meansyoushoulduse\renewcommandfor\normalsizeand\newcommand>forUUtheothersize-changingcommands.!6>6.4\ObsoletecommandsuT>Some packqageswillnotworkwithL5ffA͉TU>'ExX2"(`5,normallybGecausetheyreliedonan>internalL5ffA͉TU>'ExXcommandwhichwasneversuppGortedandhasnowchanged,or>bGeenUUremoved.>InmanycasestherewillnowbGearobust,high-levelmeansofachievingwhat>previously|requiredlow-level|commands.PleaseconsultSection4toseeifyou>canUUnowusetheL5ffA͉TU>'ExX2"+Tclassandpackqagewriterscommands.>Also,of|course,ifyourpackqageorclassrede nedanyofthekernelcom->mands>(i.e.thosede nedinthe leslatex.tex,8slitex.tex,lfonts.tex,>sfonts.tex)thenyouwillneedtocheckitverycarefullyagainstthenewkernel>incasetheimplementationhaschangedorthecommandnolongerexistsinthe>L5ffA͉TU>'ExX2eUUkernel.>T*oGoLmanyoftheinternalcommandsofL5ffA͉TU>'ExX2.09havebGeenre-implemented>or^iremovedtobGeabletolistthemallhere.Y*oumustcheckanythatyouhave>usedUUorchanged.>W*eT/shall,however,listT/someofthemoreimpGortantcommandswhichareno>longerUUsuppGorted.0$&ffvٟ1ͤLτ ffΟ1\tenrmT\elvrm\twlrm...Ww ff ͤLτ ffΟ1\tenbfT\elvbf\twlbf...Ww ffͤLτ ffΟ1\tensfT\elvsf\twlsf...Ww ffE͟LτEff1L.L.L.v;sEff5ffvَ)2׍>Thea(approximately)seventyinternalcommandsofthisformarenolongerde-> ned.QIf&yourclassorpackqageusesthemthenple}'ase3replacethemwithnew>fontUUcommandsdescribGedinL雍QATKß'E-X2",:F;ontSele}'ction.>F*orUUexample,thecommand\twlsfshouldbGereplacedby:31 dˠy?L,\fontsize{12}{14}\normalfont\sffamily\selectfontߍ>AnotherpGossibilityistousetherawfontspackqage,VdescribGedinL雍QATKß'E-X2"-i7for >Authors.>Also,remembGerFthatmanyofthefontspreloadedbyL5ffA͉TU>'ExX2.09arenolonger>preloaded.o$@ffhu1ͤLτ ffΟ1\vptT\vipt\viipt...Ww ff5ffhu阍>TheseQDweretheinternalsize-selectingcommandsinL5ffA͉TU>'ExX2.09.pl(Theycanstill>bGe;usedinL5ffA͉TU>'ExX2.09compatibilitymode.)7Pleaseusethecommand\fontsize>instead:qseeUUL雍QATKß'E-X2",:F;ontSele}'ctionforUUdetails.>F*orUUexample,\vptshouldbGereplacedby:ߍL,\fontsize{5}{6}\normalfont\selectfonto$@ff m1ͤLτ ffΟ1\prm,T\pbf,\ppounds,\pLaTeX...Ww ff5ff m阍>L5ffA͉TU>'ExXkP2.09usedseveralcommandsbGeginningwith\pinordertoprovide`pro->tected'commands.DSF*orexample,\LaTeXrwasde nedtobGe\protect\pLaTeX,>andb\pLaTeXGwasde nedtoproGducetheL5ffA͉TU>'ExXlogo.NvThismade\LaTeXrobust,>evenUUthough\pLaTeXwasnot.>ThesecommandshavenowbGeenreimplementedusing\DeclareRobustCommand>(describGedshinSection4.10).Ifyourpackqagerede nedoneofthe\p-commands>thenX1youmustremovetherede nitionanduse\DeclareRobustCommandtore->de neUUthenon-\pcommand.'E$@ff?s1ͤLτ ffΟ1\footheight͡ ff ͤLτ ffΟ1\@maxsep ffͤLτ ffΟ1\@dblmaxsep͡ ff5ff?sō>These]parametersarenotusedbyL5ffA͉TU>'ExX2",ֲsotheyhavebGeenremoved,_except>inUUL5ffA͉TU>'ExX2.09compatibilitymoGde.qClassesshouldnolongersetthem.$S>References,>[1]M;MichelGoGossens,ՇF*rankMittelbach,ՇandAlexanderSamarin.TheL雍QATKß'E-XM;Comp}'anion.nAddison-W*esley,UUReading,Massachusetts,UU1994.>[2]M;Donald]E.Knuth.TheTKß'E-Xb}'ook.Addison-W*esley,_Reading,Massachusetts,M;1986.nRevisedUUtocoverUUTU>'ExX3,1991.>[3]M;LeslieeLampGort.L雍QATKß'E-X:ADo}'cumentPreparationSystem.Addison-W*esley,M;Reading,UUMassachusetts,secondedition,1994.32!py?>L++AnTL32EdXn 2(6DFff cmmib10"}RSummaryffsheet:32ups3datingoldstyles>SectionUUreferencesbGelowaretoL雍QATKß'E-X2",:forClassandPackageWriters.J81.WShould5itbGecomeaclassorapackqage?gISeeSection2.3forhowtoanswer WthisUUquestion.J82.WIf4itusesanotherstyle le,nthenyouwillneedtoobtainanupGdatedversionWof!,thisother le.LLoGokatSection2.7.1forinformationonhowtoloadWotherUUclassandpackqage les.J83.WT*ryUUit:qseeSection6.1.J84.WIt-Qworked?dpExcellent,5RbutthereareprobablystillsomethingsyoushouldWchangeinordertomakeyour leintoawell-structuredL5ffA͉TU>'ExX2"*[ lethatisWbGoth cmmi10K`y cmr10ٓRcmr7