; TeX output 1996.10.11:1048solDtGGcmr17The7tStarT[-E;gXsourcecosdeXQ cmr12DagLangmryhrDepartmenrtofInformaticsUnivrersityofOslo+R6 cmss12dag@i .uio.noJ VVersion1.0,7thOctobSer1996+čINff cmbx12ContentsI"V cmbx101XTheTStarT<8E3sXformat22 XK`y cmr101.1oStatesFэ..................................V3X1.2oCommandUUhandlingTʍ...........................V3o1.2.1InternalUUformofcommandnames...............V4o1.2.2User-de nedUUcommands"э....................V4o1.2.3CatcoGdeUUmodi cationsԝ.....................V5o1.2.4EnvironmentsV..........................V6X1.3oDoGcumentUUstylesxg............................V7X1.4oF*ontsjg...................................V7o1.4.1F*ontUUde nitionsj.........................V8o1.4.2Prede nedUUfontsd........................V8o1.4.3F*ontUUselectionu..........................V10o1.4.4F*ontUUsizeselection"퍍.......................V10o1.4.5StarTU>'ExXUUcommandsforfontchanges.............V10X1.5oBoGdyUUtext................................V11o1.5.1ParagraphUUbreakingP......................V12o1.5.2ParagraphUUindentation.....................V12o1.5.3ParagraphUUseparation8,.....................V13o1.5.4TheUUdoGcumentheadō......................V13o1.5.5SectioningUUcommands.....................V14o1.5.6Lists...............................V15o1.5.7Displays?.............................V16o1.5.8CoGde󍍑...............................V16o1.5.9F*oGotnotesg............................V17o1.5.10PageUUheadersandfoGoters1...................V18X1.6oCustomization.............................V18o1.6.1Sizes*J...............................V18o1.6.2F*ormats.............................V18o1.6.3CharacterUUset8Z..........................V18o1.6.4Language-spGeci cUUde nitions?(.................V19X1.7oMathUUmoGdeƶ...............................V20o1.7.1LettersT썍..............................V201*soo1.7.2OpGeratorsK............................V21 o1.7.3Relations0............................V21o1.7.4Delimitiersa...........................V21o1.7.5Arrows:.............................V22o1.7.6BigUUsymbGolsj%...........................V22o1.7.7F*unctionUUnames.........................V22o1.7.8GreekUUletters..........................V22o1.7.9CalligraphicUUletters͍.......................V23o1.7.10OtherUUsymbGols?k.........................V23o1.7.11SubscriptsUUandsupGerscripts[..................V23o1.7.12F*ractionsqL............................V23o1.7.13RoGots$..............................V24X1.8o- cmcsc10PostScriptUU guresf..........................V24X1.9oT*ablesD..................................V25o1.9.1T*ableUUrows#...........................V26o1.9.2T*ableUUcolumns.........................V26X1.10oCross-references:.............................V26o1.10.1De ningUUlabGels[ݍ.........................V27o1.10.2ReadingUUthecross-referencelabGel leF.............V28o1.10.3CheckingUUthe'ExX,Qasimpli edandImorezrobustTU>'ExXformatintendedforstudentswritingtheir rstrepGortoressay*.IF*orUUmoreinformationonStarTU>'ExX,seetheother lesaccompanyingthis.XTheUUmainguidelinesforthisimplementationare:X !", cmsy10bStarTU>'ExXUUisimplementedontopofplainTU>'EX.2']soٍzL͉ff fdͤ ff͟fdV alue ff../StateYwu ffff ff ͤ ffCfdx ff../OrdinaryUUbGodytextŔ ff ͤ ffCfdp ff../InsideUUacaption͟ ffͤ ffCfdt ff../InsideUUacaption͟ ffͤ ffCfdr ff../InsideUUa
row)C ffff 9 `WT*ableUU1:qThepGossiblevqaluesofr\StateS&XbAllnamesde nedintheStarTU>'ExXimplementationcontainatleastoneup- bpGercaseYletter,Zlike\Cdefor\NewEnvir.~ThismakesiteasiertodistinguishbthemifromTU>'ExX'sinternalnamesandthenamesde nedinplainTU>'EX,enearlyballUUofwhichconsistoflowercaselettersonly*.XbMost(TU>'ExXmacropackqagestendtousearatherterseprogrammingstyle,1likex\advance\var\@nebThisvimprovesproGcessingspeedandreducesstorage,butmakethecodemore bdicultrtoread.V|SincethisisapackqagewhichaimstobGeeasilyunderstand-bableUUandadaptable,IwilluseamoreverbGosestyle:x\advance \var by 1IT*ooavoidpGossibleconfusion,vgStarTU>'ExXcommandswillbecalled)': cmti10c}'ommandsAinthisIdoGcument,UUwhileTU>'ExXcommandswillbecalledmacr}'os.I*N cmbx121.1gStatesuTIT*oavoidimpropGernesting,™suchasuseofewithina
,™weintroGduceIaglobalstatevqariable.Itsvaluesaregivenintable1.TheinitialstateisbGodyItext: ɍLs2S ߤN cmtt9\let\State=xI1.2gCommandhandlinguTy\CommandIStarTU>'ExX@usesthesyntax<+foritscommandsratherthantheusual\x.jThisisIeasily^aimplementedbymaking.X\Command rstcheckswhetherthecommandimmediatelyfollowsaIin~xwhichcaseitisbGeingde ned./Ifso,\DefineCmdhandlesthat.Otherwise,I\CommandnconvertsthecommandnameintolowercaseandcheckswhetherithasIbGeende ned.Ifso,itiscalled;GotherwiseanerrormessageisproducedandtheIcommandUUisignored. ɍLs3S\def\Command#1>{\ifDefining Ls4f\def\Next{\lowercase{\DefineCmd{#1}}}%Ls5]\elseLs6f\lowercase{\expandafter\ifx\csname>#1\endcsname}\relaxLs7p2\Error{Unknowncommand<#1>ignored.}{}%Ls8p2\let\Next=\relaxLs9f\elseI10p2\def\Next{\lowercase{\csname>#1\endcsname}}%3RsoI11f\fi I12]\fi\Next}ITheUU'ExXcommandsarerepresentedbyaTU>'ExXmacroconstructedby8@\csname. IT*odavoidconfusionwithprede nedTU>'ExXmacros,lganinitial>^1 }ײisinserted;kforIexample,UU

isrepresentedby\csname?>h1\endcsname.'|\CdefIT*o simplifythedeclarationofStarTU>'ExXcommands,themacro\Cdefisde ned.YItItakestwoparameters:m#1isthecommandname(usingnouppGercaselettersandInoUUanglebrackets),UUand#2isthecommandde nition. I14S\def\Cdef#1#2{\expandafter\gdef\csname>#1\endcsname{#2}}"\CcallIIn{caseweneedtocallStarTU>'ExXcommandsfromthisTU>'EXcoGde,`a\CcallmacroIisUUintroGduced. I15S\def\Ccall#1{\csname>#1\endcsname}^I1.2.2l#User-de nedTcommandsuTyIThe8implementationof[Uisalittlesneaky;ԗitjustsetsa ag\ifDefining.IWhenZcthefollowingcommandnameisfound,the\CommandroutinecheckstheIstateUUofthe agandcalls\DefineCmdwhenthe agisraised.^2I16S\newif\ifDefining I17S\Cdef{define}{\Definingtrue}\DefineCmdIThe~ command\DefineCmdisusedtode neanewusercommand;e#1isthenewIcommand}Aname(alreadytranslatedintolowercase)and#2isthede nition.TheImain"jobof\DefineCmdistocheck"whetherthede nitionislegal.`TherearetwoIreasonsUUwhyitmaynotbGelegal:XbTheUUde nitionmaybGenested,asin x......bThisischeckedusingacounter\CallLevelwhichisincrementedwhen- beverWauser-de nedcommandiscalled,Wanddecrementedonreturn;Xseethebde nitionUUofr\Calland\ReturnbGelow. XbTheUUcommandmayalreadybGede ned.IIfUUthede nitionislegal,\FetchDefiscalledtopGerformtheactualde ning. I18S\def\DefineCmd#1{\Definingfalse I19]\ifnum\CallLevel>0I20f\Error{Nesteddefinitionsarenotallowed;}%I21p2{thedefinitionof<#1>isignored.}\let\Next=\relaxIdqffr J= "5-:Aacmr61L|{Ycmr8TheXcÎharacter-Cscmtt8>waschosenasitcannotp "5-:2LܽThismeansthattheusercaninserttextbandthecommandname, andthistextwillb#1\endcsname\relaxI24p2\def\Next{\begingroup\catcode`\^^M=12\FetchDef{#1}}%I25f\elseI26p2\Error{Command<#1>alreadydefined;}{thisdefinitionignored.}%I27p2\def\Next{\begingroup\catcode`\^^M=12\IgnoreDef{#1}}%I28f\fiI29]\fi\Next}$\FetchDefI\FetchDefgde nesthemacrobyusingeverythinguptotheend-of-linemarkas Ithe.de nition.RThisimpliesmoGdifyingthe\catcodeoftheend-of-linecharacterI(^^M).'Alsonotethatcallson\Calland\Returnareinsertedintothede nition.I30S\begingroup\catcode`\^^M=12 I31]\gdef\FetchDef#1#2^^M{\expandafter%I32f\gdef\csname>#1\endcsname{\Call#2\Return}\endgroup}%\IgnoreDefIIalsode ne\IgnoreDefwhichisquitesimilarto\FetchDef,butnocommand Iisde ned.ItisusedtoignoretherestofthelineincasetheusertriesanillegalIde nition.I33]\gdef\IgnoreDef#1#2^^M{\endgroup}% I34S\endgroupIFinally*,UUwemustdeclaretheusercommandlevelcounter\CallLevel:I35S\newcount\CallLevel'|\Call 3P\ReturnIW*emustalsode nethetwocommandsusedforincrementinganddecrementing ItheUUcounter:I36S\def\Call,{\global\advance\CallLevelby s,1} I37S\def\Return{\global\advance\CallLevelby-1}6I1.2.3l#CatcoQdeTmodi cationsuTIStarTU>'ExXjusesonlyonespGecialcharacter:<,/whichjmustbGeactive.wAlltheotherIspGecialcharactersofTU>'ExXandL5ffA͉TU>'EXareassignedsuitable\catcodesturningthemIintoUUordinarycharacters. \SpecialCatCodesI\SpecialCatCodesUUsetsthe\catcodestotheStarTU>'ExXvqalues:I38S\def\SpecialCatCodes{% I39]\catcode`\#=12 s,\catcode`\$=12\catcode`\%=12I40]\catcode`\&=12 s,\catcode`\{=12\catcode`\}=12I41]\catcode`\~=12 s,\catcode`\^=12\catcode`\_=12I42]\catcode`\\=12 s,\catcode`\<=\active}t\StandardCatCodesI\StandardCatCodesrestoresthe\catcodestotheirnormalvqalues.GThisisnec- IessaryUUwhenreadingforinstancestyle les.I43S\def\StandardCatCodes{%I44]\catcode`\\=0 s,\catcode`\{=1\catcode`\}=2I45]\catcode`\$=3 s,\catcode`\&=4\catcode`\#=6I46]\catcode`\^=7 s,\catcode`\_=8\catcode`\~=\activeI47]\catcode`\%=14\catcode`\<=12}5msoI1.2.4l#En9vironmentsuTIAnUUenvironmentisapieceoftextenclosedina...UUpair.$\NewEnvirI\NewEnvir>9isusedtostartanewenvironment.,sIt>9hasthreeparameters:C#1is Ithewnameoftheenvironment,_#2wòistheTU>'ExXcommandsusedtostartthenewIenvironmentP(usuallyjusta\begingroup),Q|and#2istheTU>'ExXcommandsusedtoIterminateUUtheenvironmentUU(usuallyjusta\endgroup).X\NewEnvirsavesinformationabGoutthecurrentenvironment'sname(inI\CurEnv),qthe8Qlineonwhichitstarts(in\CurEnvLine)andwhichcommandisIusedtoexitit(in\CurEnvExit). aItalsokeepstracksoftheouterenvironment'sIname֣(in\PrevEnv)andstartline(in\PrevEnvLine)forbGettererrorreportingIandUUerrorrecovery*. إI48S\def\NewEnvir#1#2#3{#2\relax I49]\let\PrevEnv=\CurEnv s,\PrevEnvLine=\CurEnvLineI50]\def\CurEnv{#1}\def\CurEnvExit{#3}\CurEnvLine=\inputlineno}IW*eUUneeddefaultde nitionsofr\CurEnvand\CurEnvExit: إI51S\def\CurEnv{}\def\CurEnvExit{\relax}إIW*eUUalsoneedtodeclarethetwoUUlinecounters:I52S\newcount\CurEnvLine s,\newcount\PrevEnvLine$\EndEnvirI\EndEnvir1isusedtoterminateanenvironment.;fIt1checkthatthecorrectenviron- ImentJisterminated,Landtriestocorrectusermistakes.nBItchecksforthefollowingIsituations:bXbIfmthenameoftheenvironmentmtobGeterminatedisthesameasthatofthebcurrent[environment,]8everythingisOK,andwecansafelyleavethecurrentbenvironment.JXbIfCthenameoftheterminatedenvironmentCisnotthenameofthecurrentbone,$butpmatchesthenameoftheouterenvironment,$weassumethatthebuser]hasforgottenacommand.Anerrormessageisgiven,_andbGothbtheUUcurrentenvironmentandtheouteroneareterminated.XbIfP&thenameoftheterminatedenvironmentP&matchesneitherthecurrentnorbtheqouterenvironment,lweqassumethattheuserhasjustmisspGelledthecom-bmand.\ThebGestthingwecandointhiscase,0SistogiveanerrormessagebandAignorethecommand.4Iftheuserhadintendedtoterminatethecur-brentEenvironment,${wegeterroneousproGcessingofthefollowingtext,${butthebsituationUUwillnormalizewhentheouterenvironmentUUisterminated.bI53S\def\EndEnvir#1{% I54]\ifTextEqual{#1}{\CurEnv}\let\Next=\CurEnvExitI55]\else\EnvirError{#1}\fiI56]\Next} L\EnvirErrorI\EnvirErrorXisanauxiliarycommandgivingapropGererrormessageandplacing| IinUU\Next|thebGestcommandtorecoverUUfromtheerror. إI57S\def\EnvirError#1{\ifTextEqual{#1}{\PrevEnv}%I58f\Error{<\CurEnv>online\the\CurEnvLine\spaceterminatedbyI59p2.}{Anextrahasbeeninserted.}%I60f\def\Next{\CurEnvExit\CurEnvExit}%6y soL̈́P؟L͉ffSPfdͤ ffΟfdKind"e ffGYAlternate| ff\zBold"{ ff͎FItalic' ff gSize3 ffffSPffSPͤ ffΟfdRUU(Roman) ů ffGYSUU(Standard)0Y ff\zMUU(Medium)͟ ff͎FUUU(Upright)͟ ff gXUU(Extralarge)͟ ff ͤ ffΟfdTUU(T*eletypGe)͡ ffGYAUU(Alternate)͟ ff\zBUU(Bold)7y ff͎FIUU(Italic)7z ff gLUU(Large)џ ff͟ ffA. ff)F ff[ ff3 ff gNUU(Normal)$ ff͟ ffA. ff)F ff[ ff3 ff gSUU(Small)z ffffSP9 `qT*ableUU2:qThe vepartsoftheinternalStarTU>'ExXtextfontnameI61]\else I62f\Error{<\CurEnv>online\the\CurEnvLine\spaceterminatedbyI63p2.}{Thewillbeignored.}%I64f\let\Next=\relaxI65]\fi}6I1.3gDo`cumentstylesuT3P