; TeX output 1991.08.21:1128r-?F"t>K`yp cmr10TwEXtlyl: 7aline-drawinginterfaceforTwEX5?荍aC4K`yff cmr10JohnS.Renner#n14March1987=K`y cmr101gIß |{Ycmr81N"K`y 3 cmr10Cop!yrightcf$!", 3 cmsy10 1987fJohnS.RennerAllrigh!tsreserved.*r-2_.@ cmti12Geffometry35canproducelegibleletters,2_but35artalonemakesthembffeautiful.UTtyl beginfigure "zapf"tyl line m 2 1,92; 45,92tyl line m 2 1,92; 1,48tyl line m 2 1,48; 111,48tyl line m 2 45,92; 45,4tyl line m 2 12,48; 12,92tyl line m 2 23,48; 23,92tyl line m 2 34,48;34,92tyl line m 2 1,70;45,70tyl line m 2 1,92; 23,48tyl line m 2 1,92; 89,4tyl line m 2 23,92;1,70tyl line m 2 23,92;1,48tyl line m 2 23,92; 45,48tyl line m 2 45,92;1,48tyl line m 2 45,92; 23,48tyl line m 2 1,70,23,48tyl arc m 2 11 @ 12,81 270,90tyl arc m 2 11 @ 34,81 10 10tyl arc m 2 11 @ 34,59 10 10tyl arc m 2 11 @ 12,59 270 90tyl arc m 2 22 @ 23,70 10 10tyl line m 2 45,92; 111,26tyl line m 2 1,48; 45,4tyl line m 2 45,4;100,60tyl arc m 2 32 @ 45,48 10 10tyl line m 2 45,4; 89,4tyl line m 2 89,4; 89,60tyl line m 2 89,4 111 26tyl arc m 2 22 @ 67,26 10 10tyl line m 2 67 26; 111 26tyl arc m 2 16 @ 89,26 10 10tyl line m 2 89,26; 111,48tyl arc m 2 11 @ 100,37 10 10tyl line m 2 100,37;100,60tyl line m 2 111,26;111,48tyl line m 2 111,48; 100,60tyl arc m 2 8 @ 100 48 10 10tyl arc m 2 6 @ 94 54 10 10tyl line m 2 89,60; 100 48tyl line m 2 95,54; 83 54tyl arc m 2 4 @ 89 54 10 10tyl line m 2 89 54; 100 54tyl line m 2 89,60;83,54tyl line m 2 89, 60; 100 60tyl line m 2 83,54; 83,48tyl line m 2 84,48; 89,54tyl arc m 2 3 @ 86 51 10 10tyl endfigure "zapf"2_A2rt35bffeginswheregeometryends,2_and35impffartstolettersacharacter2_trffanscending35meremeasurement.)PaulUUStandard^:+XQ cmr12i r-tiir-FzƍI"VG cmbx10ICon4tentsC50N cmbx121&TheBasics-P152&Adv@ancedFeaturesg9T&2.1AJTVransforms,g cmmi12: C:::::::::::::::::::::::::::֚9&2.2AJFigures: C::::::::::::::::::::::::::::::10&2.3AJOthersꍑ: C::::::::::::::::::::::::::::::143&User-LevelDetailsm2174&WhenThingsGoWrong\235&DesignDetailsf27&5.1AJVVectorso: C::::::::::::::::::::::::::::::27&5.2AJSplines: C::::::::::::::::::::::::::::::306&TheImplementation 33&6.1AJOvrerviewh: C:::::::::::::::::::::::::::::33&6.2AJPrimitivresÍ: C::::::::::::::::::::::::::::34&6.3AJProSceduralHandlingF: C::::::::::::::::::::::38&6.4AJFigures: C::::::::::::::::::::::::::::::39&6.5AJTheFVonrts!Q: C::::::::::::::::::::::::::::42AJ6.5.1g?VVectorSettingyԍ: C::::::::::::::::::::::43AJ6.5.2g?BeamSetting: C::::::::::::::::::::::44&6.6AJBu eringӍ: C:::::::::::::::::::::::::::::45&6.7AJOdds'nSoSdso*: C::::::::::::::::::::::::::467&FutureExtensionsk50iii Hr-;ALTESXtylSummaryj53?;BLFontExampleE57;CLMacrosandExtendedExamplesDN59Duiv r-GIIn4trovduction8@TUEuXtylmKis.aprototrypSepost-processingsystemtobeusedinconjuctionwithT UE!X[9],Tthe/{trypSesettingprogrambyDonaldKnuth.|ThepurpSoseofTUEuXtylnisto\drarw"linesandcurvesinadevice-indepSendentmanner.TUEuXtylAqisapSost-proScessoruthatinrterpretscertaincommandsinaDVI)(dfeevfe33ice-ifeCCndependenrt) leR^thatistheoutputofT UE!XR7andconrtainstheactualtypSesettingcommands.TUEuXtylGwill MproSduceasitsoutputanotherDVI  lethatconrtainsthecom-mandstotrypSesetthelinesandcurvesonaprinteroroutputdevice.@&InthecurrenrtversionofTUEuXtyl^V(version1.2ofMarch1987),- thesimplelinedrarwingcapabilitiesincludeseveralgeneraltypSesofstraightlines, arcs,and7splinecurvres.OAdvXancedfeaturesofTUEuXtylvareforMusiCopy,[themusic-trypSesettingJprojectattheOhioStateUniversity[7],namelytypSesettingties,slurs,andbSeams.&ThewDnameforTUEuXtylcomesfromthreeideas:R(1)apropSercomputergraphicstermforrenderingimagesiscalled\tiling,"(2)themis-pronounci-ation6ofthenamesoundslikre\textile,"Jwhichevokesanimageoflinesandbargello5e ectsfromwreaving,șand5(3)thisproScessof\tryl"-ingcomesafterT UE!X.&TheNmaindesigngoalsofTUEuXtylwrere(1)theminimizationofdatare-quiredrtotrypSesetgraphicsonprinterscapableofsettingonlycharactersatarbitrarypSositionsonapage,η(2)theadherencetotheDVIformatofT UE!Xoutput^.forspSecifyingthewray^.totrypesetadocumenrtinadevice-independenrtmanner,"(3){asimple,pSortableinrterfacethatwouldnotrequireachangetotheefunctionalitryordesignofT UE!X,and(4)auserinterfacethatiseasytousebrypSeopleandprogramsalike.&TUEuXtylwraspnotintendedtomimicnorreplacesexyprogramslikeIdeffal>[15 ],whicrhknowabSoutconstraintsandalignmentniceties./Rather,0TUEuXtylfisde-signed@totakrecareofmedium-leveldetailsforT UE!Xforuseonprintingdevices;vr-;notcapableofdirectlyaccessingandloadingfullbitmapsproSducedbrysuch;systemsasPostScript$D[1].ItisclearthatDVI-formatisasubsetofPostScript,;butalargecommrunityofusersarenotabletomakreuseofsuchasupSer-set,;andTUEuXtyl);isinrtendedtoprovideline-drawingcapabilitiesforthem.LProbably;thebSestwray;toreadthismanrualistoreadthe rstfour(4);crhapters,iandIskiprighttothechapterentitledFuturffe'Extensions,iforagoSod;inrtroSduction5 toTUEuXtyl.Theotherchaptersdealwithdetailsoftheinnards;ofTUEuXtyl,anddescribSethedesigninsuccessivrely nerdetail.LIR+wrouldRRliketothankJohnGourlayV,pandClaytonElwellfortheirsuppSort,;commenrts,sreminders,andXLgoSodideasduringthisthree-yrearlabor,sandthe;CGRGfornothasslingmeabSoutthis.Duvi&Ar-F.IChapter 12.The Basics7,.So,let'sdrarw.hIwillassumethatthereaderhasareasonablygoSodworkingknorwledge0ofhowtouseT UE!X0iand/orL"s3J- cmcsc10Ja^T EX,andsortofunderstandsKnruth'sconceptB*of\bSorxes,"X andtheirattributesofheight,X width,andB*currentpSosi-tion.WVeVneedtheseconceptsbSecauseourdirectinrterfaceiswithT UE!X,intheform@gofa1߆T cmtt12.textext- le.:TVotrypSesettheline-drawings,UweaskT UE!X@QtoplaceourntdrarwingatthecurrentpSositiononthepage.EThroughoutthismanual,I5willfprorvidesomeexamplesofdrawingstoillustrateideas.rThese guresarethrumb-nailsize,mbutshouldbSesucienttogettheideaacrosswithoutusing/uplotsofspaceonapage.7Let'sloSokatasimpleexample:7$Aftertryp-ing\input{textyl}nearthebSeginningofyrour le,butafteranyrequiredpreamrble,wecanobtainatrivialdrawinglike:FVorexample,W\begintyl{4cm}[1in]tellsT UE!X toplaceourorigin4cenrtimetersdownfromwhereitwasjustsit-ting.Ahorizonrtalwidthisanoptionalsecondparameterto\begintyl,andisenclosedinsquarebracesimmediatelyfollorwingtheverticaldisplacementparameter2(withnospacesin-bSetrween).So2\begintyl{5cm}wrouldplaceourorigin5cenrtimetersbSelowthecurrentpSosition,:withnorelativehorizontalwidth.Other(BspacingrequiremenrtshavetobSedonebyhand(e.g.,7liketyp-ing\hskip91inbSeforethe\begintyl),orbryputtingthewhole\begintyl...$ʞ\endtylFygroupwithinaconrtainingenvironment(e.g.,gOL"s3Ja^T E!X'sfigureen-vironmenrt).]WVe|could,ifwewanted,leavenoextrawhite-spaceandhavetheEdrarwingextendintoandoveranytextthatT UE!XEmaytypSesetbeforeorafter2wreinvokea\special{tyl...}command.#WVewould,Jofcourse,startthatD#tryling-environmentwitha\begintyl{0pt}command,Zand nishwiththe\endtylcommand,anditmighrtdosomethinglikePtyl arc m 3 5 @4 0;5 5Pthis.&Once/wrearesatis edwithour.tex lecontaining\specialstringsre-questingline-drarwings,5Pwerunthe.tex lethroughT UE!XorL"s3Ja^T EX,and(barring}anryfatalerrors)endupwitha.dvi le.#WVenowrunthis.dvi lethroughTUEuXtyl+whicrhgoSesthroughthe leandconvertsour\specialstringsleft-orverfromT UE!XinrtocommandstoactuallytypSesettheline-drawing.ThewholeproScessmighrtlooksomethinglikrethis:Q썑&%': 3 cmti10prpompt:(&ThisisTeX,Versionmumble...&**myfile.texfe9|hS2.1..xoutputfrpomT"R[wE)X&Outputwrittenonmyfile.dvi(npages,mbytes).&prpompt:textylfe"}&ThisisTeXtyl,Versionblah...&DVI-inputFileName:myfile.dvife9|3>Ar-LDVI-outputFileName L(differentthaninputname)[defaultofmyfile.tyl]:myfile2.dviݟfe?Jdirec-;tion,HrespSectivrelyV,byWsomesigneddistanceaccordingtothecurrentunits;ofhmeffasurei@(mJfstillmeansmillimetersintheabSorveJfexample). hRffot$Di+...>\special{tyl,beginfigure}%35Somesub- gurffe>..._i%35ofotherprimitives>\special{tyl,endfigure}>...&\special{tyl,endfigure} 11 1r-L\endtyl;Wherep\... ʠ"meanspSossibleotherinrvocationspofprimitivreswith\special{tyl...};strings.=WVeſareabletousespacingandtabbingtonicelyindenrtour\special;strings,;sinceT UE!XconsidersallthatwhitespacetobSenon-existenrtwithin;the\begintyl{\endtylenrvironment.LWVe'llaeloSokatabasic gure,|andapplysometransformstopartsofit. For;thebasic gure,wrehave:Krttyl beginfigure "TeXtyl-logo-1"tyl beginfigure "tex-logo"tyl line m 3 2,13; 10,13tyl line m 3 6,13; 6,6tyl line m 3 8,11;8,4tyl line m 3 8,11;12,11tyl line m 3 8,8; 11,8tyl line m 3 8,4;12,4tyl line m 3 13,13;18,6tyl line m 3 13,6;18,13 tyl endfiguretyl beginfigure "tyl-logo"tyl line m 3 20,10;24,10tyl line m 3 22,12;22,6tyl line m 3 25,10;27,6tyl line m 3 29,10;26,2tyl line m 3 31,13;31,6 tyl endfigure tyl endfigure;Norw\let'sscaleasub- gurebyusingaT\etransformatthebeginfigurelevel;;i.e.,somethinglikre\special{tyl,beginfigureT6060000}:Kȍttyl beginfigure "TeXtyl-logo-2"tyl beginfigure "tex-logo"tyl line m 3 2,13; 10,13tyl line m 3 6,13; 6,6tyl line m 3 8,11;8,4tyl line m 3 8,11;12,11tyl line m 3 8,8; 11,8tyl line m 3 8,4;12,4tyl line m 3 13,13;18,6tyl line m 3 13,6;18,13 tyl endfigure(tyl beginfigure T 60 60 0 0 0 "tyl-logo"tyl line m 3 20,10;24,10tyl line m 3 22,12;22,6tyl line m 3 25,10;27,6tyl line m 3 29,10;26,2tyl line m 3 31,13;31,6 tyl endfigure tyl endfigure;WVeAcanrotate,Vandthenalsotranslatethatsamesub- gureandacrhieveAthe;nexttrwoexamples.8First,arotationabSoutthesub- gure'scenter:ttyl beginfigure "TeXtyl-logo-3"tyl beginfigure "tex-logo"tyl line m 3 2,13; 10,13tyl line m 3 6,13; 6,6tyl line m 3 8,11;8,4tyl line m 3 8,11;12,11tyl line m 3 8,8; 11,8tyl line m 3 8,4;12,4tyl line m 3 13,13;18,6tyl line m 3 13,6;18,13 tyl endfigure*tyl beginfigure T 60 60 0 0 -35 "tyl-logo"tyl line m 3 20,10;24,10tyl line m 3 22,12;22,6tyl line m 3 25,10;27,6tyl line m 3 29,10;26,2tyl line m 3 31,13;31,6 tyl endfigure tyl endfigure;andnorwalsotranslatedafter5Stherotation:ttyl beginfigure "TeXtyl-logo-4"tyl beginfigure "tex-logo"tyl line m 3 2,13; 10,13tyl line m 3 6,13; 6,6tyl line m 3 8,11;8,4tyl line m 3 8,11;12,11tyl line m 3 8,8; 11,8tyl line m 3 8,4;12,4tyl line m 3 13,13;18,6tyl line m 3 13,6;18,13 tyl endfigure,tyl beginfigure T 60 60 -8 -8 -35 "tyl-logo"tyl line m 3 20,10;24,10tyl line m 3 22,12;22,6tyl line m 3 25,10;27,6tyl line m 3 29,10;26,2tyl line m 3 31,13;31,6 tyl endfigure tyl endfigure 12 r-FinallyV,`wreNcantakethewhole gure,`andpSerformascaleandathenarota-tiononit(wreevXaluatescaling rst,thenrotationsand nallytranslations):Y[t.tyl beginfigure T 80 80 0 0 60 "TeXtyl-logo-5"tyl beginfigure "tex-logo"tyl line m 3 2,13; 10,13tyl line m 3 6,13; 6,6tyl line m 3 8,11;8,4tyl line m 3 8,11;12,11tyl line m 3 8,8; 11,8tyl line m 3 8,4;12,4tyl line m 3 13,13;18,6tyl line m 3 13,6;18,13 tyl endfiguretyl beginfigure "tyl-logo"tyl line m 3 20,10;24,10tyl line m 3 22,12;22,6tyl line m 3 25,10;27,6tyl line m 3 29,10;26,2tyl line m 3 31,13;31,6 tyl endfigure tyl endfigure 13Or-;2.3hCOthers:;WVe'll֩ nisho thissectionwithacouplemoreprimitivres:asimplespline;example,9Aand"theprimitivresforamusic-typSesettingprojectunderwayat;OhioEStateUnivrersity[7].TheE rstexampleisnotreallythatdi erenrtfrom;our rstsplineexample,exceptthatinthiscase,wrehavea\closed"spline:;oneZwhose rstconrtrol-pSointZwillcoincidewithitslastconrtrol-point.WVeZcan;trypSesomethingthatlookslikre:?;\special{tyl,splinem3bO8(10,9)(4,16)(8,23)lfh(11,21),(13,17)(20,16)(22,13)(19,8)}ߍ;TheOn(letter\Oh")markrerdenotesaclosedspline.+Thedefaultoptionisan;\opSen"Uspline,andcanbemarkredwithaU-insteadoftheOifyrouwishto;bSe{explicit.Thedi erenceisinthewray{thatTUEuXtylZmanipulatestheconrtrol;pSoinrts whendoingtheinterpSolation.#Inthisexample,;weusedaB-spline,;as;markredwithab,$andwelistedonly&}theuniquecoSordinatestogetthisnice;bSean-shape:Yk>@tyl spline m 3 b O 8 10,9;4,16;8,23;11,21;13,17;20,16;22,13;19,8`LTUEuXtylQprorvidesپthreetypSesofsplineinterpSolationwhichIٺalludedtoon;page*P6.TheCatmrull-Rombasisisprobablythemostintuitivelyusefulspline;for`Xusers.ItproSducesasmoothcurvrethatgoesthroughtheconrtrolpoinrts;(whicrhwecanmarkwithdots):M]~/?tyl spline m 2 K X 8 7 5,10; 9,14; 15,7; 22,13;17,14;12,5; 7,0;LThe_CardinalbasisisofthesamefamilyastheCatmrull-Rom.It,MtoSo,;inrterpSolatesMthroughthecontrolpSoints,andisincludedforconvenienceand;asanalternativretotheCatmull-Rom.8FVorexample: 14Pr-4Ea/?tyl spline m 2 D X 8 7 5,10; 9,14; 15,7; 22,13;17,14;12,5; 7,0;&TheB-splineisalittledi erenrtinthatthecurveapprffoximatesthecontrolpSoinrts.TUsingd$thesamecontrolpSointsastheabSoveexample,butusingtheB-splinebasis,wresee:Kra/?tyl spline m 3 B X 8 7 5,10; 9,14; 15,7; 22,13;17,14;12,5; 7,0;&FVorҦthemostpart, yrouwillprobablywanttodrawcurvesthroughtheconrtrolpSointsthatyouspSecifyV,andsotheCatmull-Rombasisistheconve-nienrt%default.TheB-splinetypSeisprovidedforcompletenessforuserswhomighrthavedatausingthatbasis.&Therea arffeFtimeswhentheCatmrull-RomorCardinalbasesgive akeycurvres andtheB-splinebasisisnotappropriateeither. TUEuXtylprovidesafourthtrypSeofsplineforthesesituations:%paninterpSolatingB-splinecurve.+Ithas ItheadvXanrtagesofCatmull-Rom'sinterpSolation,randthespecial exibil-itiesLoftheB-spline,djbutiscomputationallymoreexpSensivre.]See[14 ]or[3]for$zacompleteexplanation.HereisanexampleusingthesameconrtrolpSointsastheabSorveexamples,butusingtheinrterpolatingB-spline:a/?tyl spline m 3 I X 8 7 5,10; 9,14; 15,7; 22,13;17,14;12,5; 7,0;&FVorqtheMusiCopyGproject,ӌwrehavetheabilitytodrawtiesandslurs|theElongarcsconnectinggroupsofnotes. JFVorthemostpart,IEassumethatPthereisaprogramthatisgoingtotakrecareofthedetailsofknowingwherethesegraphicelemenrtsaretobSeplaced,andwillproducethecorrect\specialpstringforinclusioninthe.tex le,|butImwillgivreanexampleforcompleteness. 15r-LThisHgracefularcisproSducedbryspecifyingaminimrumand Fmaximum;thicrkness,andthe vecontrolpSointsfortheshapSe.u$󍍍>2tyl tieslur m 2 8 5 5,10; 7,13;15,16;24,17; 28,15 ;ThecallloSokredlike:L\special{tyltieslurm285(5,10)(7,13);[15,16];(24,17);;28,15,};where2and8aretheminandmaxthicrknessesattheendpSointsandthe;middle,rrespSectivrelyV.TheTfollowing5isforthenumbSerofcontrolpSoints,rand;the vrepairsofintegersfollowingthatarethecoSordinatesofthepoinrts.WVe;useaspSecialwrayofproducingasmoothandgradualthintothicrktothin;line-thicrkness,butwilldiscussitinalaterchapter.LThelastexampleisthemostspSecializedforthemrusicproject:beams.;WVe'll;justloSokatanexampleofhorwtheyarecalledandappear,O5andlearve;thedetailsforthenextcrhapter.X >tyl beginfigure "beams" tyl beam m 0 3,20; 15,23 tyl beam m 0 g 3,10;11,7 tyl endfigure ;ThebasicorderoftheparametersloSokssomethinglikre:L\special{tyl,beamm0g3,10;11,7};wheren?0(zero)isthe\sta -size,"%gindicatesabSeamsizefor\grace"notes;(roisthedefaultfor\regular"sizednotes),4aandthelasttrwoopairsarethe;coSordinatesoftheline-segmenrtthatthebeamistobecenrteredover. 16Ǡr-FIChapter 32User-Lev4el Details6FVrom%theuser'spSoinrtofviewusingT UE!X,commandsthatTUEuXtylcinter-pretsjwillloSoklikretheword\tyl",followedbythenameofthegraphictoh/trypSeset,thenalistofparametersallenclosedwithinthecurlybracesofa,6\special{...}Xcommand.This,6useofa\specialcouldbSeproducedbrysomePotherprogram(agraphiceditor,uforexample),andthetextstringsmerelyinsertedinrtothe.textext- le.&As0Xfarastheuserisconcerned,AheispastinginapictureatthecurrenrtpSositiononthepagewhereheinrvokesthe\special.3YTheusershouldthinkof=thispictureasbSeingaborxjustbigenoughtocontainallthelinesofhisgraphicimage,andwhose rst-quadranrtcartesianoriginisthereferencepSointthattwillbSeplacedatthecurrenrtpositiononthepage.Thrus,hemightwantto}makresurethatthereisenoughblankspacearoundthecurrentpSositiononUthepagetoconrtaintheimagebSeforehetriesto\pasteitin." ySpacecanbSecreatedbryusingT UE!X's\hskipor\vskip,xorL"s3Ja^T EX's\hspaceand\vspacecommands,(orhopingforthebSestwithL"s3Ja^T E!X'sfigureenrvironmentsurroundingthebSorxcreatedby\begintyland\endtyl.&ThekindsofgraphicprimitivresthatTUEuXtyl7XknowshowtotypSesetareuniform-thicrknessplinesegments,Huniform-thicknesssplines,Huniform-thicknessarcs,TvXariable-thicrkness~splines,music~bSeams,andmrusicties/slurs.Lineseg-menrts:baremerelyasubsetofsplines,]andsovXariable-thicknesslinesareavXail-ablebryspSecifyingasplineofjusttwocontrolpSointswithathicknessatoneendpSoinrt,andanotherthicknessattheotherendpSoint.)Thefeaturehereisto harveseveralprimitivesavXailable,andallowforothergraphicelementstobSebuiltusingthem. 17Xr-LWVe'llH;loSokatthebasicsynrtaxfortheprimitives,_andthendiscusswhat;eacrharcsincescalingandrotationaltransformationsareabSoutthecffenteroftheprimitivre.&H\special{tylWlabelP[hmeffasureiH, S]T*hfacffeitH,xH, 9yn9H,"hstring i,MH"}placesasimplelabSelat(x;yn9)usingafonrtstyleofmhfacffei(8(currentlyselectablebry^aninteger:! e.g.,{1isamtt10. Seepage37forabSetterlist). ?hString i9=isasimplesequenceoflettersandspacesconrtainedwithinmatchingdoublequotes<(H")..Here,Q3thecaseofthelettersofYhstring i4istakrenverbatim,Q3anditisnotinrterpreted;K~T UE!XեmacrosortypSesettingcommandsarenotusablehere.8IfyrouwanttotypSesetfancierlabels,TUEuXtyl);istoolateinthegame.&TheroptionalparameterhmeffasureiBFisanryofHS,HP,orHM&denotingthatthe inrtegerpSoints,likex̸1;rtyl begtyl line m 2 L 0 (2 4 11 26)tyl line m 2 L 1 (12 23 15 10)tyl line m 2 L 2 (15 20 25 13)tyl line m 2 L 3 (26 9 31 23)tyl endOJhS-typffei~is:/thekindofspline-basistousewheninrterpSolatingthespline;throughztheconrtrolpSoints.WCurrentlyV,,HBmindicatesthebfe -splinebasis(which;inrterpSolates}asplinewithintheconvexhullofthecontrolpSoints),@HI7indi-;catesanifeC@nrterpSolatingB-spline(goesthroughthepoinrtsspeci ed),HDforthe;Cardinalbasis,d7andHKgwhicrhindicatestheCatmull-Rombasis(whichalso;inrterpSolatesasplinethrffoughthecontrolpSoints).aTheCatmullbasisisthe;defaultsplinetrypSeinthecurrentimplementation.OJhClosurffeiisusedtoindicatewhetherthesplineisaclosedcurvre(the;endpSoinrtsoverlap),eoranopSencurve(thedefault).{rWVeusetheiconography;ofHOforaclosedcurvre,andHUforanopSen-endedcurve. 20=r-&Norw4wecometodescribSewhatߊhtrffansformiI]isallabout.TUEuXtylsuallorwsthe+usertomoSdifythecoordinatesoftheconrtrolpoinrtswithouthavingtore-calculatetheirnewpSositionsbryhimself.]ItriedtomakethespSeci cationandmoSdi cationofTUEuXtyl'sֶprimitivresaspainlessandintuitiveaspSossible.2WVeusuallyDZthinkmoreintermsofconnectingdotsandplacinggraphicelemenrts,andDnotintermsofslopSes,[ltangenrtsandveloSciteswhicharemessyatbSest,andgetmorecumrbSersomefromthere.&Geometric0transformslikrescaling(indepSendentlyintheX"candYPdirec-tions),#rotatingabSoutthe\cenrter"ofthegraphicobject(aprimitiveora gure),"andf=translatingintheXWandYdirectionsarearvXailableformostof"theprimitivres. 5MTheformatforspSecifyingsometransformationonthecurrenrtly-spSeci edpointsis:>HT, 9hSxqi#mH,-:lhSy iEH,P$hTxqijRH,tQhTy icH,bhRffot$DivH,wherehTxqi"nandhTy i!DareEtranslationsoftheobjectintheXandYxdirectionbryPsomesigneddistanceaccordingtothecurrentunitsof^hmeffasurei;v}.7hRffot$Diisahasignedinrtegerangle(indegrees)bywhichtorotatetheprimitiveor gure\*counrter-cloSckwiseabSoutitscenter. 8 hSxqi&ZandhSy i$areinteffgerscaleparameters`represenrtingthe offating-pointvXalues`ofthetransformmultipliedbry٢100andtruncated.TVoobtainanytransform,=all5thetransformparametersmrustbSespeci ed.&Twro otherspSecialtypSesofgraphicscapabilitiesaremeanttobSeutilizedbrylkaknowledgeableprogram,suchasthemusic-typSesettingsystembeingwrittenattheOhioStateUnivrersityV.8Theseare:@&H\special{tylWtieslurP[hmeffasureiH, S]T*hminthickJiuޟH,hmaxthickJiќğH,thnumptsiViH,x̸1H,y̸1H,...!oIH,+Hx̸nÎumpts,/H,(f.y̸nÎumpts,1H}whicrhdrawsasmoSothsplinecurvethroughthepSoints( 8cx̹id;UPy̹i)),՝andusesabuilt-inalgorithmto gureoutthecorrectthicrknessesofthetie/slurbSetweenhminthickJiT&andlhmaxthickJi@Y.+lTheseKconrtrolpSointsarealsoin rstquadrantcartesianhcoSordinates,andacircular-penvrector-typehisusedtodrarwthespline.&H\special{tylWbeamP[hmeffasureiH, S]T*hsta sizeiwJH,I[hbffeamtypeiH, S]Sx̸1H,y̸1H,x̸2H,y̸2H}drarwsEamusicbSeamfrom(x̸1;UPy̸1)0.to(x̸2;UPy̸2)(alsoin rstquadranrtspace)using&QabSeamofhbffeamtypeiBHG&foragrfface-note&Qsizedbeam,MorHR&(thedefault)for|7rffegularsizedbSeamsinthespeci edsta -size.FVoradescriptionofsta sizes,see[12 ]. 211r-LFinallyV,therearetrwomore\specialsthatTUEuXtyltextyl!YThis,isTeXtyl,version...'gDVI-input,FileName:myfile.dvi'gDVI-output,FileName:!Y(different,thaninputname)[defaultofmyfile.tyl]'g[1],[?2]!YOutput,writtenonmyfile.tyl!YLog,writtenonmyfile.tlog!YSome,error(s)occurred.PleasecheckLogfilefordetails.!YAssume,thattheoutputfileisincorrect&Ratherthanannoryyouattheterminalwithlongerrormessages,ؕTUEuXtylputsKa?marktoindicatethatsomeerrorhappSened.Sinceitwrotethe.tyloutputxV le,3TUEuXtylmrusthaverecoveredwellenoughto nishitsjob,3buttheoutputprobablydoSesnotlookrighrt.8The.tlog lemightloSoklike 23r-;This,isTeXtyl,Versionblah...;Reading,File:myfile.dviA,[1],[;Error,infig#1onpage2;Arc,Thicknessnotfound.Settingto1;2];Output,writtenonmyfile.tyl;Log,writtenonmyfile.tlog;whicrh'wasjustamissingparametertothe\special{tyliarc...}string.;YVouIwillharveItore-editthe leandinsertthecorrectthicrkness.BAlltheerror;messagesQthatarewrittentothe.tlog letrytopindorwntheerrortothe; gurenrumbSerontheerror-containingpage.ThesereferencestothepSosition;oftheerrorcomefromthen2th gureonthepage(thencounrtisrelativeto;eacrhpage,landstartsfrom1),andthepagenrumbSerisfromT UE!X's\count0;register̕thatenrumeratespages..SometimesTUEuXtyl (cannotalwaysdetermine;thePexact gureonthepage(e.g.,obifwreforgettoclosea gurede nitionwith;an?endfigure),"eandsoestimatesatleastthebadpageinquestion.FVorthe;mostpart,theerrorisajustmissingparameter,orabadparametertoa;\specialstringbSeingreadbryTUEuXtyl.LHorwever,therearealargernrumbSeroferrorsthatTUEuXtylfound\surpris-;ing"ܨandnTsomarkstheseerrorsonyrourscreenas?!|d.oMostoftheseinternal;errorsarebasedonthefunctionalitryofDVItypSeconcerningTFMinforma-;tion,zandthestructureandcommandsoftheDVI lebSeingread. ?TUEuXtyl,;likreDVItypSe,willcomplain,andpossiblyrollorveranddiegracefullyV. 24r-&Theother\surprising"errorsthatTUEuXtylmighrtcomplainabSoutarereallyinrternal%toTUEuXtyl,Landconstituteabug,orjustacompile-timeconstanrtthatistoSosmall.8Theseeasily- xedsurprisesare&2_tooi}manydvistrings. ThisapagerequiredmoreDVI`brytesthanusual.2_HarveyourloScalmaintainerincreasethesizeoftheinternalbu erused2_forstoringapage'sDVIbrytes.&2_tooymanysplinesegmentsrequired.Thesplineyroutriedtoset2_mighrtt0bSetoolarge/longforthespaceallocatedforaspline'sdescrip-2_tion.)4Thatsizeisalsoacompile-timeconstanrt.TUEuXtyl7willreducethe2_nrumbSer}ofconrtrolpoinrtsthatitinterpSolatessothatyoucanatleast2_gettheoutput,andsothatitdoSesnotdieungracefullyV.&2_figure^definitionnotclosedatendofpage. eYVouNforgota2_\special{tylDendfigure}commandinsome gurede nitiononthe2_page.(TUEuXtyl{willnottrypSesetthat gure,8andwillgoontothenext2_page. 25Or-LTherearealsosomedorwn-deeperrorsthatcouldpSotentially(although;doubtfully)$bshorwup.TheseareprobablysomeerrorinthevectorfontsbSeing;referencedbryTUEuXtyl.LX_minradiusofvectorfontiszero.2 The=referencedvrectorfont'sX_TFMinformationrepSortedthatthefonrt'sradiussizeissmallerthanX_it=wrasdesignedtobSe. 0=TUEuXtyl{willmakeatempSorary xsothatitX_canconrtinue,94buttheoutput gurewillbSewrong. 1HavetheloScalX_mainrtainerre-checkthevectorfonts.LX_baddydx._Thisisarareproblem.Somewhere,:thecoSdetotrypesetX_adiagonallinesegmenrtreferencedanimpSossibledyn9=dxcombination,X_and2Lcannot ndanryvectorcharacterto t.TUEuXtylpwillcontinue,D5butX_yroumayseeatinyglitchinyour gure.LX_dx;istoobig/small,dyistoobig/small.This}isaproblem.FVorX_some5reason,HadistancewrasreferencedthatisoutoftherangeoftheX_32-bitrepresenrtationofintegers.8ThisreallyshouldneverhappSen.LFVor\themostpart,xTUEuXtylcanrecorver\fromerrorsthatitencounrters,and;givrefabriefsummaryinthe.tlog le.9OthererrorshavetodowithTFM; leinformation,KandareoutsidethescopSeofTUEuXtylC*tohandlegracefullyV.;TheBmostserious\surprise"errorsarebugs,andyroushouldrepSortthem;directlytomewithacopryofthe.tex le,oratleastadetailedprintout;fromDVItrypSeofthe.dvi leprocessedbryTUEuXtyl. 26r-F–IChapter 52–Design Details7BTheFtop-levrelofTUEuXtyl4istakendirectlyfromtheDVItypSe[5]program,-withamfewmoSdi cations.(MostofthediagnosticfunctionalitryofDVItypSeismain-tained,but"withouttheuserinrterface(TUEuXtyl׵assumesitissuppSosedtoproScess allthepages).A\hook"wrasinsertedintotheprogramtohandlethe4T UE!X4\specialsthatTUEuXtylsunderstands(hereafter,G\spSecial"willreferonlytothosecommandsthatTUEuXtylE"understands|other\specialsareig-nored,j andIsimplyoutputtotheDVII lewithoutmoSdi cation).RTheDVItrypSecoSdewrasusedmostlyforitskeepingtrackofthecurrentDVIhandvpSositioncoSordinatesonapage,andhandlingTFMinformation.B&BasicallyV,aszTUEuXtyl slurpsinaDVIa le,itproScesses\normal"commandsinanormalwray(i.e.,8justkreepingtrackofpSositionsandcounters)."1WhenitreadsTa\specialstring,ittriestoinrterprettheparametersandexpandthespSecial,KproducingcommandstotrypSesetthegraphicusingcharactersfromspSecialfonrts.&Thej[resultisatransformedDVIi lethatnorwcontains\normal"(i.e.,non-spSecial,`put-that-crharacter-there')dvi-commandsasfarasTUEuXtylŃcantell,pafterUtakingcareofnewfonrtde nitionsanddoinganybSookkeepingUofcounrtersandinternalreferences.,H5.1BCVXectorsʍSevreraldesigndecisionsweremadetogiveTUEuXtyl&+theabilitytotypSesetthegraphicsaofthecomplexitrythatwedesire.(sThisabilityisintrinsicallybSound 27xr-;to0thefonrtstobSeused,E{andthewaythatweusethem. FVorthisproject,E{Ihad;tomcreateafonrtofshort,borientedlinesegments.Thiswastominimizethe;amounrt ofinformationrequiredtotypSesetacurve.Onecouldaddresseach;pixelofthevirtualdevicetodrarwthegraphic(puttinghundredsofpSeriods;fromafonrt),>butthatisnotdevice-indepSendent,>andtheamountofdata;is>hrugeincomparisontousinglinesegments.TheselinesegmentscanbSe;connectedS&togetherrathersmoSothlytogivretheappearanceofaconrtinuous;linesegmenrtorcurve.LUsingthisscrheme,KdescribSedbyNelsonandSaxeatCarnegie-Mellon;Univrersity[11 ],kIamabletotrypSesetthecorrectcharactercorrespSondingto;the'desiredlengthandangle.I&moSdi edtheirfonrtthoseanglescoverthe rst;andufourthcartesianquadranrtsystem,6.1BCOvrerviewTUEuXtylisacurrenrtlynearly9000linesofPascalcoSde(notWEB).Itisaproto-trypSe,Iand!>notaproduct.TVestingwrassimpli edbytheabilitytopre-viewtheconrtents6oftheDVI6 leonSunwrorkstationsusingtheDVISUN6[8]program.ItwraswrittenusingBerkeleyUnix21 Pascal,<5butisnotdepSendentonthatopSerating6systemexceptfordi erencesinI/O.Therearealsodi erencesineciency/easeWofreadingfrom les|readsvrersusgets. I/OWroutinesforbSothbrytetypSes(signedandunsigned)arewrittenandavXailable,uandhavebSeensetupforeasyportingtoothermacrhines.&TheȼideaforhandlingDVIȳ lesistoreadeacrhbyteintoabu eruntilwereadaneop(end-of-pagemarkrer),whenwewillwritethatbu eroutintoa le,andstartafreshbu erwiththenextpage.(BIfwreencountera\specialin+ourreading,|8wretreatitasa Wmacro-expansion|substitutingourbyte-string4;forthebryte-stringthatrepresentedtheinvokedspSecial,Fandputthis\tryled"zstringintothebu erforsubsequentoutput.AzxnicefeatureofthisslurpingistheparserforthespSecials.ϷItissimpleandextensibleenoughtoAeasilyaccommoSdatenewTUEuXtyl primitivres,Fanddi erentoradditionalparameters.&Besides^0bSeingcarefulabouttheexpansionofthe\specialstring,zHTUEuXtylhas_tokreeptrackofanynewly-de nedfontsforinsertionintothepostamblein3theDVI le,anddosomebSookkreeping3forbopbackpSointers,and lebyte- !ffd ^1UnixUUisatrademarkofBellLabGoratories 33"Dr-;length.LMostpofthiscrhapterdiscussesthealgorithmsanddata-structuresofTUEuXtyl;atyyvXariouslevrels.&WVe'llstartwiththehigh-levelanduserconcepts,andwork;our]?wraydownintothedetailsofoutputtingtheactualbytesintothe.dvi; le.(V;6.2hCPrimitivresb#;Theuser'sinrterfacetoTUEuXtyl-Wisthrough.textext les.E5HetypSesinthe;\specialp)stringsforT UE!X,and llsinthenameoftheprimitivretotypSeset;andanryparameterstomoSdifytheattributesoftheprimitive.!This.tex le;is-conrvertedbyT UE!X-intoa.dvi lewhichisthengiventoTUEuXtyl.FVorthe;most~part,TallofthegraphicprimitivresinTUEuXtylRhavecommonattributesofLX_bSounding-borx,LX_linethicrkness,LX_pSen-trype(seesection5.1),LX_linestryle;that^describSebasicappearancesofanitem.AI\bounding-borx"describesthe;minimrumahandmaximumXRandYvXaluesofaminimum-sizedorthogonal;rectanglevthatenclosestheprimitivre.!I'lldescribSetheprimitivesandpSoint;outWtheiradditionalormoSdi edattributestothoseaborve.MyWplanwrasto;prorvides9anumbSerofprimitivesthatwereconceptuallybuiltupSonlower-level;primitivres,/\andsharesimilarrepresentationswhereverpSossible.FVorexample,;a"tieslurisclearlybuiltupSontherepresenrtationofasplineprimitive.horwto\handle"thedatapassedtoit.gWVe'lltalkmoreabSouttheinternal;represenrtationinthenextsection.TLThezhandlers'primaryrespSonsibilitryistotakecareofprimitive-levelge-;ometriczitransformations,Yandthentodecidewhattodowiththedata,de-;pSendingOontheconrtextoftheprimitivebSeingdealtwith.CThiscontextis;determinedlbrywhethertheprimitiveiscontainedina gure,]orisbyitself.;Ifgtheprimitivreisnotcontainedina gure(i.e.,the\specialstringwasnot;withinabeginfigure{endfigurepair),thehandlerǢI\h1.X_computesthebSoundingborxfortheprimitive,I\h2.X_transformsthecoSordinatesoftheprimitivreintoDVI-space,I\h3.X_o setsthembrythecurrentpSositiononthepage,I\h4.X_outputsaDVIpushcommand,I\h5.X_callsanappropriateproSceduretoactuallytrypesettheprimitivre,I\h6.X_and nisheswithapopcommand. 38'yr-WVe.needtotransformcoSordinatesfromour rst-quadranrtcartesianspaceinrto'DVI-spacebSecausethelower-levelproSceduresthatactuallytypSesetandoutputRthevrectorcharactersassumethattheyareputtingthecharactersonrtoapageoftheDVI le.W&Iftheprimitivre'sde nitionispartofanenclosing gurede nition,)DwedelaryBoutputofthisprimitiveuntilthe gureiscompletelyde ned. @ThehandlerdoSesanrysimplegeometrictransformationsrequired,$sandthensimplypacrks thedataintoanotherstructure,I?andsortof\stacks"thisnewstructure(let'sDcallitanitem)onrtoalistofitemsthatarecontainedinthis gure.Ourreferenceto\ gure"herecouldalsobSeasub- gurewithinanenclosing gure,<'butfornorwwe'lljustdealwithprimitivesintermsofsimple,<'one-level gures.-WhenUthe gurede nitioniscomplete,sathefigurehandleproScedureiscalled.WVewillgetinrto guresmoreinthenextsection,butfornow,we'llsarythatthishandler#\h1.2_computesxthebSoundingborxofallthesub-itemsofthis gure, taking2_careofnecessarytransformations,#\h2.2_outputsapushcommand,#\h3.2_unpacrkseachsub-item,andtransformsitscoSordinatesintoDVI-space,#\h4.2_callsTtheitem'sparticularprimitivrehandlerwithaspSecial agthat2_sarysCtosimplycalltheappropriateproScedureforimmediatetypSesetting2_withoutdoinganryfurthertransforms,#\h5.2_and nisheswithoutputtingapopcommandtotheDVI le.The9designofthesehandlerswrastomaintaintheideaof\information-hiding"sucrhthateachhandler(primitive-or gure-level)wouldknowonlyabSoutonelevrelofabstractionbSelowit.(č6.4BCFiguresLet's1loSokmorecloselyatwhatwrecalled\items"intheprevioussection,and{horwwereallyrepresent gures.SZUptothispSoint,5I7havebSeenratheramrbiguous$Owhenreferringto\primitives."Insomecases,2itmeantgrffaphic-primitivesU(likreXlinesandsplines);inothercasesitmeantthe thingsthat 39(r-;weOcffanmakepictureswith(likre gures,sub- gures,andgraphic-primitivres).;WVell,Nnorwwtheambiguitygetsworse.%I'lltrytobSecarefulaboutdistinguishing;\graphic-primitivres"whenIkmeanprimitivesthatarereducibletovector;crharacters,[?and7duse\primitives"whenI77meangraphic-primitivesandu gures.;Thereasonforthedi erenceisthatsincewrehavetheabilitytodorecursive;sub- gure:de nitions,Na\ gure"(asdenotedbryabeginfigure{endfigure;pair) bSecomesabuildingblocrk(justlikegraphic-primitives)forthatenclosing; gure's\Hde nition.Itisanalagoustotheprogramminglanguageconceptof=hbloffckJibP,where(inBNFnotation)ƍA,
,::=/A,,::=/,/g%;whereGhprimitiveiB+vispwhatwrepreviouslyreferredtoasan\item,"hbffegin gurei;isߪdenotedbry\special{tyl4beginfigure},andRhend gurffeiDisdenotedby;\special{tyl endfigure}.Referbacrktopage11foranexampleofsub-; gures.㍑;ItemsLThe\item"datastructureconrtainstheattributesforgraphic-primitives,;asoutlinedinsection6.2,andalsoconrtainsattributesfora gurelike:$LX_anry gure-leveltransformationparameters,LX_a\name,"LX_andthelistofitemsconrtainedinthis gure.;As'yroumaysurmise,wFthiscanyieldalinked-listoflinked-listswhenbuilt;tozrepresenrtacomplexnested gure. ?VInourpreviousdiscussionofhan-;dlers,_onemoSdeoftheiroperationwrasto\packandstack"thedatainto;anitem.Prackingiseasyenoughtounderstand,butputtingthisstructure;inthecorrectplaceistricrkyV.Whenanitemiscreatedand lledwiththe;appropriateӰparametersinagraphic-primitivre'shandler,Hthereisanotionof;\conrtext"nwhichreferstothedepthofrecursionofsub- gures.Andepthof;0 meansthatthereisnohigher-levrel gure,T adepthof1meansthatany;primitivres}nencounteredwillbSelongtoanoutermostlevel gure, etc.3When;TUEuXtyl0$comesacrossabeginfigurespSecialstring,Kitcrhangestherecursive-;de nitionconrtext,#andnamesthat gurewiththatdepthnumbSer.ϩAfterthat, 40)r-anry3fgraphic-primitivesthatareencounteredbSelongtothatnamed gureinthaticonrtext.AnendfigurespSecialwilldecrementthedepthofrecursion,andthruswillchangecontextbacktothepreviouscontext.ԚIfthisnewcon-texthasadepthof0,thenwreknowwehaveclosedtheoutermostlevelof gurede nition,andthruswearereadytotypSesettheentire gure.&Let'sloSokathorwitemsareinsertedontoourdatastructuresothatconrtext?ismaintained.7TUEuXtyl~8usesaproScedurecalledpushItemthattakesan !itemandputsitonthecorrectlist(orsub-list)accordingtothecurrenrt gure4 conrtext.RoughlyV,Fathealgorithmisasimpleinsert,basedonakreyofdepth-name.1sStartfromthefronrtofthelistofthis gure1swhilethelistisnotemptryP" LoSokattheitemm6ifitisa gureofthecurrenrtcontext*thenwrearedonesearching.8doaninsertm6otherwisetherffe35mustbeasub- gureloweronthelist*loSokforthenextitemonthelistthatisa gure*andstartthenextsearcrhfromitslistIreallyasimpli edtheexplanationoftheinsertionscrhemehere, cmmi10dxandabs(dy[)areintegerpGowersof2bGetween0and16inclusive. 43,r-;lieAabSouttrwoAofthecrharactersbypretendingthatthetwolongestvertical;vrectors|donotexist,buteachistobSereplacedbytwo8vectorsofhalfthat;length.##LOncewrehavedeterminedthevectorcharacter,allwehavetodoismove;tothecurrenrt-pSosition,Msetthecharacter,MincrementourpSosition,Mand nish;setting6ctherestofthisline-segmenrt.Thethicknessofthevectortheoretically;doSes!notmatter,+ asthepathfollorwed!bythevectorcharacterisinvXariantover;thethicrkness(atleasttotheresolutionoftheprinter).&;6.5.2mBeamSetting;The-+wraythatTUEuXtylktypSesetsbeamissimilartotrypesettingline-segmenrts.;The$cTylBeamproSceduretakrescareofdeterminingthecorrectbeamcrharacter;touse. +Recallfromsection5.1thattherearetrwolengthsforeacrhtypSe;ofҌquarternote(i.e., regularnotesandgracenotes).WhenTUEuXtyltriesto;trypSesetbthebeam,Eitusesthebeamcrharacterwhoselengthislongestand;whoseangleisclosesttothatrequired.LGivren$amusicfontofbSeamcharacterswiththeirlengths,>?heights,depths,;andoanglesfromhorizonrtalcomputed,wetrytosetthewholebSeamatonce;brythefollowingmethoSd:I\h1.X_ComputeWthedyźanddxofthebSeam,raswrellasitslengthandactualX_anglefromhorizonrtalI\h2.X_compute IthefractionalnrumbSer IofcrharactersneededtotypsetthebSeamX_forbSothsizesofbeamcrharacters(thisisX0 length#]8Aacmr6b1eam۟fe6'length#8b1eamc9har<&)I\h3.X_tryEtobracrketEapairofbSeamcrharacterswhoseanglesarenearesttheX_actualangleofthebSeamI\h4.X_usethebSeamcrharacterthathasthesmallestangulardeviationfromX_thatoftheactualbSeamI\h5.X_trypSeset+8thecharactersalongthelinefromtheleftendpSointofthebSeamX_to;asclosetotherighrtendpSointaspSossible. ,ThentypSesetthelastX_crharactersuchthattheright-hand-sideofthecharactercoincideswithX_therighrtendpSointofthebSeam. 44-r-WVe8onlyneedtoselectonecrharactertousefortypSesettingastheslopeofthebSeamisconstanrtoveritslength,+andthecharacterusedhasa\slopSe"(anglefromhorizonrtal)thatisascloseaspSossibletothebeam. 荑&Thisjugglingof\bSest-length"vrersus\best-slope"isonlynecessarybe-causeoftheneedtokreepthesetofcharacterstoareasonablesize,andalsobSecauseFtheanglesrequiredforbeamsisnotasbroadasfortherequiremenrtsofthemore-generalvrectorline-segments.+g6.6BCBu eringzAsOtTUEuXtylreadsinbrytesfromtheDVIOZ leforsubsequentinterpretation,hitcopies'theminrtoaninternalbu er.Atasimplelevel,wTthisbu erisusedtodsimplycoprytheDVIdrbytesusedonaDVIdrpage(delimitedbybopandeopabrytes).?Thus,~TUEuXtylwouldactsimplyasamechanismthatcopiesitsinput toitsoutput,3vrerbatim.OHAt thelevrelthatweareinterestedin,3thisbu ernwillholdallthebrytesupto,andincludingatylspSecialstring.OnpageA38,wremadementionofa\noteabSoutwherethestartofthespecialoSccurred"intheDVI le. Whenwrereadaspecial,wemarkthepSositionofthe+bSeginningbryteofthespecial,asfoundinourbu er.@jIfwre ndthatthespSecial'is\tryl"-able,61we'backupthecurrentplaceinthebu ertothestartofhthespSecial,andproceedwiththetryling.}TUEuXtylwilloutputtypSesettingcommandbrytes,Fande ectivelyover-writethepreviousspecialstringinthebu er,acrhievingakindofin-linemacro-expansionofthespSecial.&Atricrkypartofthismacro-expansionapproachistakingcareofde ningnewQfonrtsthatwereusedduringtylingonapage.#AsTUEuXtyl\tyl"sa gure,it1^recordstheusedfonrtnames(here,C onlyvectororbSeamfonts)inalistof\fonrts-to-bSe-de ned."At!Ltheendofapage,.wreformallyde netheseasyetunde nedpfonrtswithintheDVIp le,andthenmarkthemashavingbSeenDVI-de nedtoarvoidre-de nitionbSeforethepostamrble.UEventhisscrhemeneedsclevrerness\usincewedonotknowallthefontsusedtotypSesetanyprimitiveunrtilctheendofthepage, butwehavetode nethefontwithintheDVIX lebSeforethe rstactualuseofthefonrttotypSesetthosegraphicprimitives.&Thewraywegetaroundthis\Catch-22"-ishsituationistohaveaninternal ag(a\fonrt- ag")insertedintothebu erbSeforethe rstcommandstotrypSeset|agraphicprimitive.SincetheDVI|formatallowsustode nefontsbSetrweenanytwoDVIzcommandsina le,wecande nethemmid-stream. 45.}r-;AsWTUEuXtylEparsesagraphicprimitivre'sspecialstring,Nitbacksupinthe;bu ertothestartofthespSecial,6outputsthefonrt- agandthencontinuesto;insertthetrylingcommandsintothebu eruntilthenextspSecial,ܖortheend;ofUpage.-Arttheendofapage,s`allthetyl-ablespecialshavebSeenexpanded,;wre.&havebu erfullofDVI.commandsandfont- agsforthispage,?andalist;ofGfonrtsreadyforinitialde nitionintheDVI. le.WVearenowreadytowrite;theEbu ertotheactual le.dAsTUEuXtyl7writeseacrhbyteofthebu ertothe;diskH le,i:it rstloSoksatthebryte.Ifitis\normal"(i.e.,0...ʜ255),itconrverts;theEbrytetothepropSersystem-dependenrtformat(ifnecessary)andoutputs;it. tothedisk le.Horwever,>if. thebryteisourfont- ag,>ittreatsthis agas;amacro,toSo,andwritesouttothe letheformalDVIde nitionsofthenew;fonrts.(DTUEuXtylgdoSesthisexpansiononlyonceperpage,andignoresanryother;fonrt- agsfortherestofthepage(well,.itactuallyoutputsthemasnops).;AfterthesenewfonrtshavebSeende ned,-|TUEuXtyl+~continuestooutputeach;bryteofthepagebu er,oandwhendone,startsproScessingonthenextDVI;pagefortryling.)];6.7hCOdds'nSoOdsg;Thissectionconrtainsdown-deepinformationinTUEuXtylOVthatreallydoSesnot; tnicelyanrywhereelse.?LAsxxIxTdiscussedbSefore,TUEuXtyl isbuiltontopoftheDVItrypeprogram[5];andwrasmoSdi edinfollowingways::LX_The()specialcasesandskippagesproScedureswreremodi edtocallX_TUEuXtyl'spmainhandlespecialsproSceduretohandleanry\specialstrings,X_insteadofthrorwingthosebytesout.LX_ThereadpostambleproScedurewraschangedsothatwecaninsertallX_theهfonrtde nitionsofthenewfontsthatweusedduringanytyling.X_TUEuXtyl';simplycopiestotheinrternalbu eranyfontde nitonsalreadyX_inqthepSostamrble,}untilqitreacrhesapostpost.HereTUEuXtylLbacksupX_oneNbryte(overthepostpost),outputsallitsnewfonts,andtheninsertsX_thenewpostpost.LX_TheOmainloSopwrasmodi edsothatateacrhend-of-page,wewriteoutX_theinrternalbu er,clearit,andresetanryinternalcountersforthe 46/֨r-2_page (likre gure-depthcontext, gure-numbSer,and countsoffonts-to-2_bSe-de ned).OtherNotes&Ixharveyimplementedanadaptivesub-divisionmethoSdfordetermininganoptimalKnrumbSerofvectorcharacterswithwhichtotypSesetasplines.ThemethoSdy|usesasimplequadraturesub-divisiononeacrhspanofthesplineunrtilalinear-distancecriterionismet.1NIfweletthenumbSerofsub-divisionsbSezN@,wrecandeterminethenear-optimumnumbSerofintervXalswithwhichtoFactuallysamplethesplinewhenwredotheinterpSolationas22ND.Thisis\optimal"@inthatwreusethefewestvectorsforlongspans,banddonotunder-sampleshorter,tighrterspans,andachieveasplinethatisverysmoSoth.&Thenamesoftheprimrtiveswithinthe\specialstringsneedbSeuniqueonly@tothe rstthreeletters. 9%Thrus\special{tylGbeg}isequivXalentto\special{tyl,beginfigure}.8Thiscanmakreinputeasierandshorter.&Also,;wrecanbSeprettylenientabSouthowwedelimitourkeywordsandmakrers.Inmostoftheexamples, commasorspaceswereusedtoseparatethemarkrersandintegers.InactualityV,"wecanusealmostanythingforkeywordandmarkrerdelimitingotherthan:&2_otheralphabSeticletters&2_othermarkrercharacters(like@and")&2_%,~,\andthoseotherreservredcharacterswhichmightupsetT UE!X,as2_itytriestoexpandmacrosinsidethebSodyyofthespecialstringbSefore2_outputtingittotheDVI le.FVorexample,5 \special{tyl,line*()(]!::4...3**4&&12[5}MislexicallyequivXalenrt]tothenicelytypSed\special{tyl,linem4(3,4)(12,5)}ܮortheterselytrypSed\special{tyl,linm434125}*.&Another3\signature"ofTUEuXtylriswhenevrerweoutputthecommandstotrypsetaline-drawing,Kwepreceedthepushcommandwithtwonops.iThiseasilyidenrti esthesectionsthathavebSeen\tyl"-ed. 470⊠r- 481쀠r-u:I*Gtyl beginfiguretyl line m 2 0 70 32 70tyl line m 2 32 70 32 6tyl line m 2 0 6 32 6tyl line m 2 0 55 16 55tyl line m 2 16 55 16 22tyl line m 2 16 22 0 22tyl line m 2 0 46 8 46tyl line m 2 8 46 8 30tyl line m 2 0 30 8 30tyl line m 2 0 42 4 42tyl line m 2 4 42 4 34tyl line m 2 0 34 4 34tyl line m 2 0 40 2 40tyl line m 2 2 40 2 36tyl line m 2 0 36 2 36tyl line m 2 0 38 32 38tyl line m 8 0 38 25 54 tyl endfiguree.Figure6.1:8Semi-squaresoftheVVectorFonrts 492Ԡr-F;IChapter 72;Future Extensions6;Givrenalittletime,tonecouldextendthecurrentsetofgraphicprimitivesin;TUEuXtyl,sucrhas:LLX_simpler-appSearingmacros,LX_regularpSolygons(alleasilybuiltuponcurrenrtly-existingprimitives),LX_orienrtedarrowsLX_line-pattern lled gures,LX_amoregeneralmethoSdofde ningandinstancingsymrbolde nitions.K;I*amӨstillexpSerimenrtingwithtwomethoSdsofadequatelycomputingthe;smoSothest]inrterpolationofthicrknessesalongthelengthoftheslur."When;thethicrknessforaparticularsegmentofthecurvehavebSeendetermined,;wrechecktoseeifthatthicknessisinasubsetofvector-fontsizes.Ifso,;wreCHcanuseitas-is;ootherwise,Ypwehavetoclampthatthicknessto tinthe;subset. TThe^$onlyproblemisthatacrhievingasupSer-smooth^$interpolation;along_thecurvre'sthicknessesmightrequirealargenumbSerofvectorfontsto;bSealoaded|sometimesstressingtheprinrtingdevice'scapabilities. (Ia\stillhave;to@expSerimenrtto ndareasonablesubsetofthesesizesthatcanbeusedand;stillacrhieveadequateresults.LI+{wrote+thisprogramwiththeinrtention+ofeaseofextensibilitryforaddi-;tional\primitivres"tobSebuiltontopofthefunctionalityprovidedbyTUEuXtyl.;IharvealsoinrterfacedTUEuXtyliwithDarioGiuse'sgraphicdrawingprogram 503>r-DPthat%hewroteatC-MU[6].WItissmartenoughtorepresenrtitsgraph-ics9 primitivresin lesasalistoftext-strings,Landisnowabletooutputthe\special$\strings,LspSecifyingthewidthandheighrtofthecreated gure.Con-vrertingUthe lesoftheMacDrawprogramtoyieldASCIGITstringsispSotentiallypSossible,Rtoo.In,eithercase,sucrhstringsarebSeeasilyconvertedto\specialcommandstringsforTUEuXtyl);towrorkon. 514r- 525"r-FGIAppvendix A2GT:eE sXt4yl Summary6ǮLet'sKsummarizetheabilitiesandrequiremenrtsofTUEuXtyl.|Firstofall,Fweharve6Vtoputan\input{textyl}nearthestartofthedoScumenrt(atleastbSefore our rstinrvocation ofa\special{tylAO...Gcommand).This loadstheSmacrosthatwreneedtocreatespaceforour gure,5~andtosetuptherighrtenvironmentforTUEuXtyl.Ǯ&Once͗themacrosharve͗bSeenloaded,whenwrewanttoseta gure(orevenasinglewTUEuXtylR primitivre),>wemustplacetheprimitiveswithinanenvironmentstartedbdbry\begintyl{hvertsizei5%}[hhorizsizei:] and nishedby\endtyl.Here,`theHrequiredparameter,hvertsizei5%,determinesthevrerticalsizeofthebSorxthatTUEuXtylwillcreateforour guretobeplacedin. wIfwredonotneedextraspace,ڼwreputin0ptorsomesimilarzero-lengthdimension.2>Theoptionalbparameter,hhorizsizei:,willaddanon-zerowidthtothebSorxthat\begintyl5createsforus.ItiscrucialBthatthereisnoKspacebSetrween5the}and2F[crharactersofthe\begintylinvoScationifwedecidetousetheoptionalhorizonrtal+widthspSeci cation.)Otherwise,Qthingsmaygoawryforthis gure.Also,nwretarerespSonsibleforanyo setsthatwemayneedbSeforethe gureisplaced.3@WVecanacrhievethisthrough\hskipand\vskipcallsinT UE!X,or\hspaceand\vspacecallsinL"s3Ja^T E!X.&TheQltrypSesofprimitivesthatwemayplacewithinthe\begintyland\endtylpairaresummarizedhere,H)withouttheirsurrounding\special{tyl{},noranryextradelimitingpunctuation(likecommas).f2_beginfigureG[hmeffasi]8[hxfmi]e>[WhwRidihhti]f[FhwRidihhti] which35opffenstheenvironment332_endfigurefjwhich35closestheenvirffonment 536vr-X_lineP[hmeffasi]7M[hxfmi]e>hthickJi[hveffct$Di][Lhstyn9lCei]Jx̸ly̸bx̸rzy̸tnXX_spline[hmeffasi]6<[hxfmi]`C#hthickJi[hveffct$Di][Lhstyn9lCei]=[hspltypffei]r[hclosurffei]"[Xhthickgi]8hnumptsithe35x-ypffointsX_ttsplineP[hmeffasi]7M[hxfmi]e>[hveffct$Di]i[Lhstyn9lCei][hspltypffei]r[hclosurffei]"[Xhthickgi]8hnumptsi"r\pffointsDthicknessesX_arcP[hmeffasi]7M[hxfmi]e>hthickJi[hveffct$Di][Lhstyn9lCei]pJhrffadiusir[@hcent̹xHihcent̹y i] /hstartA2ng iVhstopA2ng iX_labelP[hmeffasi];8*hfacffei^YxyX"hstring i,M"X_tieslurP[hmeffasi];8*hminthickJivhmaxthickJihnumptsi9pffointsX_beamP[hmeffasi];8*hsta sizeiv[hbffeamtypei]x̸1jy̸1x̸2y̸2X_where:;meas^,spSeci es:unitsoflengthforthisprimitivre.(OneofS,P,orM:xindicatesX_scaled-pSoinrts,;printers-points,;andRmillimeters,respectivrelyV.aDefaultsX_toprinrters-pSoints.\;xfmW_spSeci esatransformationtobeapplied.8ItisoftheformX_ThsxqiNhsy i5whtxqiNXhty igAvhrffot$Di,Ewhere3sxandsyAareforscaling,txandtyX_are{Kfortranslation,tandrffotisforcounrter-cloSckwise{Krotation(inde-X_grees).;thick^istheinrtegerthicknessoftheline.8UsuallybSetween1and12.;vectYisvthetrypSeofvectorfonttouse.݃OneofC,H,orVvindicatescircular,X_horizonrtal- at,orvertical- atpSentypSe.8Defaultstocircularpen.;style\isOtheline-stryletouse.h@Oneof0,i1,2,orO3indicatesasolid,idotted,X_dashed,ordot-dashedline-stryle.8Defaultstosolidline.;spltyp`ek|is8thekindofsplinetousethroughtheconrtrolpSoints.#eOneofB,D,X_K,RjorIRCindicatestheB-spline,pCardinal,Catmrull-Rom,orRjInterpSolatingX_b-splinebasistouse,respSectivrelyV.8DefaultstoCatmull-Rom.;closureiߢisXoneofOX(\oh")orUwhicrhindicatesthatthesplineisclosedorX_opSen,respectivrelyV.8Defaultstoopen.;numptsl0istheinrtegernumbSerofcontrolpSointsforthisspline. 547<r-radius?isthelengthoftheradiusinunitsspSeci edbryPhmeffasi,.centx:andcentyarethecenrter-pSointcoSordinatesofthearc/circle.startAngO8andFstopAngaretheinitialand nalangles,grespSectivrelyV,forFthe2_arc asmeasuredindegreescounrter-cloSckwise fromthepositivrex-axis.2_IftheyarethesamenrumbSer,aclosedcircleisindicated.face1referstothestryleoftypSefaceforthelabel.8Seepage37forthelist.string5)ΟffHY?Z~}ffff pk10x/ffBK@U-ffg(Azcff BffB C+ffׁDpffaEff" F5)ΟffGRSGZ~}ffffZ㎍gU}4x pk11x/ffAKHU-ffg>rIzcffJffϤK+ffLpffeMff!N5)ΟffGYOZ~}ffff pk12x/ffAKPU-ffgQzcffp;RffϤS+ff05Tpff.Uff!V5)ΟffGRSWZ~}ffffZ㎍gU}5x pk13x/ffB KXU-ffgqYzcff@ZffB [+ffׯh\pff]ff"^5)ΟffHY_Z~}ffff pk14x/ffBK`U-ffg4azcff&bffgc+ff׮dpffeff"@-f5)ΟffG+gZ~}ffffZ㎍gU}6x pk15x/ffB6KhU-ffgizcffqjffN6k+ff׮lpff.mff"ykn5)ΟffGNoZ~}ffff pk16x/ffBKpU-ffh ?qzcffCOrff\s+ff tpffuff"ykv5)ΟffGwZ~}ffffZ㎍gU}7x pk17x/ffBKxU-ffh ?yzcff_zff{+ffL|pffGZ}ff"~5)ΟffGYZ~}ffff/ff<+}8U-ffb}9zcffY}Aff8}B+ff}CpffW}DffE}E5)ΟffB}FZ~}ff 58;r-FFIAppvendix C2FMacros andExtendedExamples7FAllpofthethrumbnailp guresinthismanrualwerecreatedusingthe\special{tyl...stringsasdescribSed,P_andwrereplacedwithinanenvironmentdelimitedby\begintyl̈́and\endtyl./)Thisenrvironmenẗ́allowstheusertospSecifyaver-tical=andoptionalhorizonrtalo setfromthe\current-pSosition"onthepage.This'determineswheretheoriginoftheuser'scoSordinatesystemistobeplaced.#(Also,thisenrvironmentsetsparameterssothattheusercanusetab-bing gandspacingtoalignthe\special96stringsashedesires(e.g.,tobSettershorwthenestingof guresandgraphic-primitives).Themacrosusedarede nedbSelorw: /% This?istextyl.tex %%?macrosforfiguresforTyling%?specify:%?\begintyl{vert_dimen}[optional_horiz_dimen]%(with?NOinterveningspacebetweenthe}andthe[chars)%?thenthe\special{tyl...}strings% then?youmustfinishenvironmentwith\endtyl%\def\begintyl#1{\begingroup\endlinechar=-1\catcode?`\^^I=9\dimen120=#1\ifhmode\toks0={\futurelet\tyltempb\begHtyl}\let\endtyl=\endHtyl\else\toks0={\futurelet\tyltempb\begVtyl}\let\endtyl=\endVtyl\fi\the\toks0} 59<-r-;\def\begHtyl{\ifx?[\tyltempb\let\tylh=\tylHspace ;\else\let\tylh=\tylHnospace\fi\tylh};%;\def\tylHspace[#1]{\setbox0=\hbox?to#1\bgroup;\vbox?to\dimen120\bgroup\vss};\def\tylHnospace{\setbox0=\hbox\bgroup;\vbox?to\dimen120\bgroup\vss};%;\def\begVtyl{\ifx?[\tyltempb\let\tylv=\tylVspace;\else\let\tylv=\tylVnospace\fi\tylv};%;\def\tylVspace[#1]{\setbox0=\vbox?to\dimen120\bgroup\vss;\hbox?to#1\bgroup};\def\tylVnospace{\setbox0=\vbox?to\dimen120\bgroup\vss;\hbox\bgroup};%;\def\endHtyl{\egroup\hss\egroup\box0\endgroup};\def\endVtyl{\hss\egroup\egroup\box0\endgroup}B0LLet'suloSokatanon-trivialexampleoffrequenrtly-used gures.Theoriginal; gureisfrom[2],page325.I'llgivrethediagram,andthentheannotated;\specialcommands.Ѝ;tyl begin /AHU=fig=9.7/&tyl arc m 2 6 @ 10 46 10 10 /state=s1/tyl label m 5 9 46 "s1"&tyl arc m 2 6 @ 62 20 10 10 /state=s2/tyl lab m 5 61 20 "s2"&tyl arc m 2 6 @ 62 60 10 10 /state=s3/tyl lab m 5 61 60 "s3",tyl arc m 2 6 @ 104 34 10 10 /finalstate=s4/tyl arc m 2 8 @ 104 34 10 10tyl lab m 5 103 34 "s4" tyl line m 3 16 48 56 59 /s1-s2/tyl lab m 1 30 53 "a"tyl line m 3 56 59 53 60tyl line m 3 56 59 54 57tyl line m 3 53 60 54 57 tyl line m 3 15 43 56 23 /s1-s3/tyl lab m 1 32 30 "e"tyl line m 3 56 23 55 25tyl line m 3 56 23 53 23tyl line m 3 55 25 53 234tyl spline m 3 4 12 52; 62 76; 90,63; 105,44 /s1-s4/tyl lab m 1 70 78 "b"tyl line m 3 105,42 106 44tyl line m 3 105 42 104 44tyl line m 3 104 44 106 44 tyl line m 3 62 26 62 54 /s3-s2/tyl lab m 1 64 38 "b"tyl line m 3 62 54 64 52tyl line m 3 62 54 60 52tyl line m 3 60 52 64 52,tyl spline m 3 3 67 55; 80 42; 96 36 /s3-s4/tyl lab m 1 76 40 "e"tyl line m 3 96 36 95 38tyl line m 3 96 36 95 35tyl line m 3 95 35 95 38,tyl spline m 3 3 69 61; 86 52; 98 40 /s4-s3/tyl lab m 1 89 51 "a"tyl line m 3 69 61 71 62tyl line m 3 69 61 70 59tyl line m 3 70 59 71 62 tyl line m 3 69 22 96 32 /s2-s4/tyl lab m 1 82 24 "e"tyl line m 3 96 32, 94 33tyl line m 3 96 32 95 30tyl line m 3 94 33 95 30 tyl endfigure 60=3'r-&AndthetexttoproSducethisis:\begintyl{9cm} \special{tyl?begin/AHU=fig=9.7/}\special{tyl?arcm26@10461010/state=s1/}\special{tyl?labelm5946"s1"}\special{tyl?arcm26@62201010/state=s2/}\special{tyl?labm56120"s2"}\special{tyl?arcm26@62601010/state=s3/}\special{tyl?labm56160"s3"}\special{tyl?arcm26@104341010/finalstate=s4/}\special{tyl?arcm28@104341010}\special{tyl?labm510334"s4"}%now?drawtheconnectors\special{tyl?linem316485659/s1-s2/}\special{tyl?labm13053"a"}/?\special{tyl?linem356595360}%andthearrow/?\special{tyl?linem356595457}/?\special{tyl?linem353605457}\special{tyl?linem315435623/s1-s3/}\special{tyl?labm13230"e"}/?\special{tyl?linem356235525}/?\special{tyl?linem356235323}/?\special{tyl?linem355255323}\special{tyl?splinem341252;6276;90,63; 105,44/s1-s4/}\special{tyl?labm17078"b"}/?\special{tyl?linem3105,4210644}/?\special{tyl?linem31054210444}/?\special{tyl?linem31044410644}\special{tyl?linem362266254/s3-s2/}\special{tyl?labm16438"b"}/?\special{tyl?linem362546452}/?\special{tyl?linem362546052}/?\special{tyl?linem360526452}\special{tyl?splinem336755;8042;9636/s3-s4/}\special{tyl?labm17640"e"}/?\special{tyl?linem396369538}/?\special{tyl?linem396369535}/?\special{tyl?linem395359538} 61>Nelson,)andJamesSaxe,\DrarwingSplineswithaVVectorFonrt."S' UnpublishedtecrhnicalrepSort.Carnegie-MellonUniversityV,1980.;[12]S' TVed0URoss,AThes@A2rtofMusicEngrffavingandProcessing.0UHansenBoSoks,S' 1970.;[13]S' DanielBerkreleyUpSdike,Printing=Typffes:xTheirHistory,4Forms,andS' Use.HarvXardUnivrersityPress,Camrbridge,MA,1937.;[14]S' Sheng-ChruanWVu,JohnF.AbSel,andDonaldGreenrbSerg,\AnInrteractiveS' ComputerGGraphicsApproacrhtoSurfaceRepresentation."Communicffa-S' tions35oftheA2CM52010,(Oct.1977),pp.703{712.;[15]S' ChristopherXJ.VVanWyk,t A!Lffanguage;forTypesettingGraphics.XPh.D.S' dissertation.StanfordUnivrersityV,1980.;[16]S' HermannAZapf,ThenPrintingSalesman'sHerffald.BoSok39.ChampionS' PrapSers,NewYVork,NY,1978. 64AMr-CGIIndex䍍aG"-markrer19,48.dvi le3.textext le1,3,34.tlog le4,23.tyl le23?!8 ag24?8 ag23@-markrer8,19-9DtGGcmr17AWxarc36arc19arcs7)angles8,19)attributes36)cenrter8)cenrtering8,19)circles8,36)closedsplines36)conrtrolpSoints31,36)ellipses36)example8)opSen36)opSenspline36)phanrtoming37)radius8)represenrtation31,36dBWxB-markrer6,14,20B-splinebasis6,20B-splinesaGinrterpSolating-type6recomputingpSoinrts30b`eam22beam37bSeam-trypes22bSeamfonrt29constrainrts30design29di erencefromvrectorfont29lengths30rangeofangles30relationtosta size29sizes29trypSes29bSeams16attributes37defaultsize22di erencefromlines37sizes22sta size22trypSesetting45b`egin gure11,22begintyl1,3,4,12,57bitmapsviblankspace17bSoundingborx34,38,41bSorxes1,3,9hpCC-markrer20 65BRYr-;capabilitiesv,vi,17ō;Cardinalbasis6,20;cartesian-space2;Catmrull-Rombasis20;Catmrull-Romsplines5,30;circles7,8,36OconrtrolpSoints31,36Orelationtoarcs36Orepresenrtation31;circularpSen20;clamping35,43,49;closedsplines14,20;closure20;comrbiningprimitives9,10;coSordinates2Oorigin2;coSordinatespacesystem19;currenrtpSosition1,2,3,17;curvres5-E#ID=;D-markrer6,20;defaultingvXalues5;de ningfonrts46;delimiters6,48;designdecisions21,27,30;designgoalsv;DrVIv;DrVI- lters4;DrVI-space35,38,43;DrVI le27Opreviewing33;DrVIformat46;DrVIpSositioncoordinates27;DrVISUN33;DrVItypSe27,479EWxellipses19,31,36#relationtocircles36endfigure42end gure11,22endtyl1,12,57errors#inrternal24extensions49GYAFF-markrer22 gurede nitions22 gures10#conrtext41#de ning11#example12#examples11# ttingtosize22#nestedsymrbSols11#preparation2#sub- gures11#tranforms22#transforms10,22fonrts#computingdimensionsof42#de ning46#fonrt ag46#forlabSels38#nrumbSering43#tobSede ned46GY-GG-markrer16,22geometrictransforms21Giuse,Dario28,49grace-notes16graphiceditors17,22grid-origin3 66CXr-9-HWxH-markrer20handlers38)designidea39) gurehandle39)functionalitry38)linehandle38)ttsplinehandle38handlingspSecials27horizonrtalpSen20_II-markrer6,20Idealvinput1inrterpSolatingB-spline6)basis20item39,40)inserting41)pacrking40)trarversing41_FJjaggies36eKK-markrer5,20kreywords6,48Knruth,Donald1_5LL-markrer20label37lab`el19labSels)face19)fonrtface-styles38)fonrtstyle19)strings19L"s3Ja^T E!X1,3,17,51)figure uenrvironment17layline43learvingnospace3ulearvingwhitespace3lies37,44line35line18lineexample1linesegmenrts18,35linestryle20,34dashed20dot-dashed20dotted20solid20linestrylesexamples20linethicrkness2,18,20,31,43example20loScalmainrtainer4,25Lucas,Bruce42\Mc퍒M-markrer5,6,10M-measure19macro-expansion33,46macros1,9,57seffebegintyl1markrers6measuremenrt19default19default22units2Metafonrt28,42limitations28millimeters19measuremenrt5mrusicv,21mrusicfont29MusiCopryv,15,42 67Da&r-9$-NWx;Nelson,Bruce28;nestedsymrbSols11#O;O-markrer14,20;opSenspline14,20;optionalvXalues5;origin2;originofquadranrt17;OSU14;outputdevice4,49Ofonrtmemory36;orvXalOseffeellipse19%MP;P-measure19;parameterstoTUEuXtyl 17;Prascal33;pSens20;phanrtomcontrolpSoints37;phanrtoming37;pixelthicrkness20;pop39;pSostamrble47;ProstScriptvi;preamrble1;preparinga gure2;primitivre2;primitivres17,34Oattributes34Obuilt-up17Ocomrbining9,10Ode nitionof40Oinrvoking9OmoSdifyingattributes34Onames48Oparameters9,18Oreductionof34#scaling;rotating;translating9prinrter'spSoints19#measuremenrt2programmer'shoSok43programsmaking gures22push39R`R-markrer16,22referencepSoinrt17rotation9,10#usingdegreesmeasuremenrt10runningTUEuXtyl 3S`S-measure19Saxe,James28scaledpSoinrts19scaling9slurs15,21,30,31#seffe35alsoties16space1,3,51spacemacros1spSecial38special2spSecials2,17,27,46,57#caseinsensitivitry6#handling33#handlingbryTUEuXtyl 27#punctuation6#trypingin6spline35spline18spline#B-spline6#Cardinal6#Catmrull-Rom5#conrtrol-pSoints5#coSordinates5 68Eir-)default5)example5)InrterpSolatingB-spline6)ttspline6splinecurvres5splines)attributes35)B-spline353example15)basis20,35)Cardinal353example14)Catmrull-Rom353example14)clamping35)closed14)closure20)defaultbasis20)defaultclosure20)defaulttrypSe30)families30)InrterpSolatingB-spline3example15)inrterpSolation30)inrversion30)opSen14)trypSes20)trypSesetting47)useinsimrulating37sta -size16sta lines37sta sizes29,37Standard,Praulisub- gures11subSdivisionofsplines47surpriseerrors24symrbSolseffe gure22xT]T-markrer10,12T UE!Xv,1,3,17,34,51T UE!XbSook9T UE!Xcommands17,51TUEuXtyl v.tloglog- le23errorhandling23errormessages24errorrecorvering23horwtoreadmanualvinamevparameters17seriousproblems26signatures43,48simpleproblem25textyl.tex le1TFMinformation27Thicrk-n-thinspline6ties15,21,30andttsplines16example16seffe35alsoslurs16tieslur21tieslur35tieslurattributes35clamping35example16implemenrtation31pSentrype21relationtottsplines35represenrtation34thicrknesses16,21vrectortypSe21tranforms 69Fqr-O gure-levrel22;transform21;transformationsOseffetransforms21;transforms9Oadditivreness22,42Oconcatenation11Oexample10O gure-levrel41Omirroring10Ono-op10Oparameters10,21Yformat21Yrequiremenrt21Orotating9Oscaling9Osub- gures11Otop-levrel42Otranslation9;transformtoDrVIspace39;translating9;ttspline35;ttspline6,31Oclamping35Odefaults6Oexample6Olinethicrknesses31Othicrknesses6,18;ttspline18;trylingv,33,37,46;tylname-string2;trypinginspSecialstrings6x$-U];U-markrer14,20;unitsofmeasure19;Unix33;user'sview17userinrtuition21VWxV-markrer20vrector-typSes20#default20vrectorfont20,28#computingdimensions28#cvrec29#dimensions28#mappingfunction44#pathinrvXariance45#pSen-trypes29#pSens-example29#pixelsize29#rangeofangles28#sizes29#trypSes29vrectors#trypSesettingwith28vrerticalpSen20*gWWxW-markrer22XX-markrer18ZZapf,Hermanni 70y;r MKG/cvec3J- cmcsc10I"VG cmbx10HK`yp cmr10<"VG cmbx109DtGGcmr177"Vff cmbx104K`yff cmr101߆T cmtt120N cmbx12.@ cmti12-!", cmsy10,g cmmi12+XQ cmr12( cmmi10K`y cmr102cmmi8 |{Ycmr8ٓRcmr7Aacmr6v