; TeX output 1997.03.06:1732s5color push BlackY color popoicolor push Black color popnDtGGcmr17Pqackages7tinthe`graphics'bundle# (XQ cmr12D.PV.Carlisle37 1996/10/291č5Nff cmbx12Contents5"V cmbx101DIn9troQduction152DDriv9erTsuppQort253DColour" 3 DK`y cmr103.1[PackqageUUOptionse...........................color push Black3 color popD3.2[De ningUUColoursc...........................color push Black4 color popD3.3[UsingUUColours荍.............................color push Black4 color popD3.4[NamedUUColoursMÍ............................color push Black5 color popD3.5[PageUUColourԍ..............................color push Black5 color popD3.6[BoxUUBackgrounds1F...........................color push Black5 color popD3.7[PossibleUUProblems[퍍..........................color push Black6 color pop54DTheTGraphicspac9k\ragesЖ6D4.1[PackqageUUOptionse...........................color push Black7 color popD4.2[RotationM㍍................................color push Black7 color popD4.3[ScalingA.................................color push Black8 color popD4.4[IncludingUUGraphicsFiles.......................color push Black8 color popD4.5[OtherUUcommandsinthem#R cmss10graphicspackqage2..............color push Black12 color popD4.6[GlobalUUsettingofkeys0........................color push Black13 color popD4.7[CompatibilityUUbGetweengraphicsandgraphicxY............color push Black14 color pop55DRemainingTpac9k\ragesinthegraphicsbundlede14D5.1[Eps g#B.................................color push Black14 color popD5.2[T*rig#L..................................color push Black14 color popD5.3[Keyvqal.................................color push Black15 color popD5.4[Pstcol#C.................................color push Black15 color popD5.5[LscapGe .................................color push Black15 color pop'č51MLIntros3duction5ThisdoGcumentservesasauser-manualforthepackqagescolor,'graphics,and5graphicx.F*urtherdoGcumentationmaybGeobtainedbyproGcessingthesource5('ExXitself.[Thesefeatures 5must bGesuppliedbythe`driver'usedtoprintthedvi le.Unfortunatelynot5alldriverssuppGortthesamefeatures,+andeventheinternalmethoGdofaccessing5theseextensionsvqariesbGetweendrivers.E#Consequentlyallthesepackqagestake5optionsUUsuchas`dvips'tospGecifywhichdriverisbGeingused.5Y*ou)shouldtosetupasitedefaultfortheseoptions,_forthedriverthatyou5normally(use.SuppGosethatyouwishforthecolorL,packqagetoalwaysdefault5to BusespGecialsforthePostScriptdriver,7}dvipsone.Inthatcasecreatea le5color.cfgUUcontainingtheline:5\ExecuteOptions{dvipsone}5Normally&youwillwantanidentical legraphics.cfgtosetasimilardefault5forUUthegraphicspackqages.5TheUUfollowingdriveroptionsaredeclaredinthepackqages.5color push Black color popNdvips,UUxdvi,dvipdf,dvipsone,dviwindo,emtex,dviwin,Npctexps,UUpctexwin,pctexhp,pctex32,truetex,tcidvi,oztex,Ntextures5IfyouuseadriverthatisnotinthelistabGoveyoumayaddanoptionfor5thatdriverbyputtingtheappropriate\DeclareOptionlineintographics.cfg5and)color.cfg,2bbGeforemakingitthedefaultoptionwith\ExecuteOptions,as5describGedUUabove.5F*orxexampletoaddtheoption`dvi2ps'fortheoriginalUnixdvitopsdriver,5andUUtomakethatthedefault,youjustneedcon guration lesloGokinglike:0color push Black color pop5ߤN cmtt9\DeclareOption{dvi2ps}{\def\Gin@driver{dvi2ps.def}} 5\ExecuteOptions{dvi2ps}5ThereP$isasuitabledvi2ps.def leinthestandarddistribution.Itisnotenabled5byLdefaultasitisnotwelltestedasthedriverisnolongeravqailabletome.UThe5followingUUdriver lesaresimilarlydistributedbutnotenabledbydefault.5color push Black color popNdvi2ps,UUdvialw,dvilaser,dvitops,psprint,pubps,ln5Mostofthesedriver lesaregeneratedfromthesource ledrivers.dtx.\'ExXsomememory)youmay5give,thenodvipsnamesoption.d-Conversely*,4ifyouareusinganotherdriver,4you5may^wishtoaddthesenamestothenamedmoGdelforthatdriver(espGeciallyif5you>areproGcessingadocumentoriginallyproducedondvips).j Inthiscaseyou5couldusethedvipsnamesoption.^HLastlytheusenamesoptionmakesallnames5inUUthenamedmoGdeldirectlyavqailable,asdescribedbelow.5color push Black3Y color pop+s5color push BlackY color popo53.2SDe ningColoursuT5Thecoloursblack,"gwhite,red,green,blue,cyan,magenta,yellowshouldbGe 5prede ned, butvshouldyouwishtomixyourowncoloursusethe\definecolor5command.o@ff1ͤLτ ffΟ1\definecolor{" cmsy9h#j cmti9name i}{hmodelpiA}{hcolourNbGecolouredasanar}'gument. Thisissimilartothefontcommandssuchas5\textbf:@ffq1ͤLτ ffΟ1\textcolor{hname i}{htexti}͡ ff5ffq阍5SoUUtheabGoveUUisessentiallyequivqalentto{\color{hname[i H}text}.653.3.2X#UsingTcolourspQeci cationsdirectly"(ff*1ͤLτ ffΟ1\color[hmodelpiA]{hspeci cation9i8O@}8 ff ͤLτ ffΟ1\textcolor[hmodelpiA]{hspeci cation9i8O@}{htexti}͡ ff5ff*ō5Normally1onewouldpredeclareallthecoloursusedinapackqage,8orinthedoGc-5ument#preamble,butsometimesitisconvenienttodirectlyuseacolourwithout5namingit rst.=T*oachievethis\color(andalltheothercolourcommands)5take˄anoptionalargumentspGecifyingthemodel.CIfthisisusedthenthemanda-5toryUUargumenttakesahc}'olourspeci cationciainsteadofahname[i#_.qF*orexample:5color push Black4Y color pop:s5color push BlackY color popo5\color[rgb]{1,0.2,0.3} 5wouldUUdirectlyselectthatcolour.5ThisUUisparticularlyusefulforaccessingthenamedmoGdel:5\color[named]{BrickRed}UUselectsthedvipscolourBrickRed.5RatherthanrepGeatedlyuse[named]youmayuse\definecolortoprovide5convenientUUaliases:5\definecolor{myred}{named}{WildStrawberry}UU...\color{myred}...5AlternativelywifyouarehappytousetheexistingnamesfromthenamedmoGdel,5you mayusetheusenamespackqageoption,whiche ectivelycalls\definecolor5onVeverycolourinthenamedmoGdel,WIthusallowing\color{WildStrawberry}5inUUadditionto\color[named]{WildStrawbery}.!653.4SNamedColoursuT5UsingbthenamedcolourmoGdelhascertainadvqantagesoverusingothercolour5moGdels.5Firstlyjasthedvi lecontainsarequestforacolourbyname,/theactualmix5ofsprimarycoloursusedtoobtaintherequestedcolourcanbGetunedtothe5characteristicsydofaparticularprinter.Inthedvipsdriverthemeaningsofthe5colour(namesarede nedintheheader lecolor.pro.X Usersareencouragedto5proGducedi erentversionsofthis leforanyprinterstheyuse.xBythismeans5the$"samedvi leshouldproGducecoloursofsimilarappearancewhenprintedon5printersUUwithdi erentcolourcharacteristics.5Secondly*,apart?fromthesocalled`proGcesscolours'thatareproducedbymixing5primarycoloursduringtheprintproGcess,njonemaywanttouse`spGot'or`custom'5colours.SHereaparticularcolournamedoGesnotrefertoamixofprimaries, but5toaparticularink.^ ThepartsofthedoGcumentusingthiscolourwillbeprinted5separatelyUUusingthisnamedinkcolour.!653.5SPageColour"kffK1ͤLτ ffΟ1\pagecolor{hname i}I8I ff ͤLτ ffΟ1\pagecolor[hmodelpiA]{hspeci cation9i8O@}͡ ff5ffKō5TheibackgroundcolourofthewholepagecanbGesetusing\pagecolor.This5takesthesameargumentformsas\colorbutsetsthebackgroundcolourfor5thea#currentandallsubsequentpages.2Itisaglobaldeclaration,dsoyouneedto5useUU\pagecolor{white}to`getbacktonormal'.53.6SBoxBackgroundsuT5TwoϢcommandssimilarto\fboxproGduceboxeswiththebackgroundsshaded5anUUappropriatecolour.5color push Black5Y color popF$s5color push BlackY color popo¦fffv1ͤLτ ffΟ1\colorbox{hname i}{htexti}'+ ff ͤLτ ffΟ1\colorbox[hmodelpiA]{hspeci cation9i8O@}{htexti}V ffͤLτ ffΟ1\fcolorbox{hname16i"d}{hname26i}{htexti}cg ffͤLτ ffΟ1\fcolorbox[hmodelpiA]{hspeci cation16i=}{hspeci cation26i}{htexti}͡ ff5ffv(ō5TheformerproGducesaboxcolouredwithname color push gray 0.75color push gray 0.75 ( color popcolor push BlacklikeUUthis color pop( color pop.^;Thelatterissimilar 5butUUputsaframeofcolourname1[aroundthebGoxcolouredname2.5Thesecommandsusethe\fboxparameters\fboxruleand\fboxseptodeter-5mineUUthethicknessoftherule,andthesizeoftheshadedarea.!653.7SPossibleProblemsuT5TU>'ExXwasnotdesignedwithcolourinmind,QandproGducingcoloursrequiresa5lot ofhelpfromthedriverprogram.YThus,CdepGendingonthedriver,Csomeorall5featuresUUofthecolorxpackqageUUmaynotbGeavqailable.5SomekdriversdonotmaintainaspGecial`colourstack'.:Thesedriversarelikelyto5get\confusedifyounestcolourchanges,orusecoloursin oatingenvironments.5SomeSSdriversdonotmaintaincoloursoverapagebreak,sothatifthepage5breaks+inthemiddleofacolouredparagraph,thelastpartofthetextwill5incorrectlyUUbGeprintedinblack.5Therefisadi erenttypGeofproblemthatwilloccurforalldrivers..xDuetocertain5technicalbdiculties^ٓRcmr71|s,itispGossiblethatatpointswherethecolourchanges,the5sp}'acing Eis&a ected.bCF*orthisreasonthemonochromeoptiondoGesnotcompletely5disable&thecolourcommands,[itrede nesthemtowritetothelog le.This5willhavethesamee ectsonspacing,soyoucanproGducemonochromedrafts5ofUUyourdoGcument,atleastknowingthatthe nalspacingisbGeingshown.'č54MLTheffGraphicspackages5ThereUUaretwoUUgraphicspackqages:0color push Black&kAH cmssbx10graphics color pop_[TheUU`standard'graphicspackqage.0color push Blackgraphicx color pop`#TheUU`extended'or`enhanced'graphicspackqage.5Thetwodi eronlyintheformatofoptionalargumentsforthecommands 5de ned.qTheUQcommandnames,URandthemandatoryargumentsarethesamefor5theUUtwopackqages.5 color push Blackffffv J= "5-:Aacmr61L|{Ycmr8AÎtYleasttwocauses:H1)Thepresenceofa$Cscmtt8\specialK cmsy8h%#fcmti8whatsit[i&eprevents\addvspace`seeing' space+honthecurrenÎtverticallist,@socausingittoincorrectlyaddextraverticalspace.Q2)Ahwhatsit[i$asXthe rstitemina\vtopmoÎvesXthereferencep~ʡ ffͤLτ ffΟ1y=hdimen9i>~ʡ ffͤLτ ffΟ1units=hnumberi+r ff5ffPX%ō5So&:youmayspGecifybothxandy,ZswhichgivethecoGordinateofthecentreof5rotation2relativetothereferencepGointofthebGox,leg[x=2mm,?y=5mm].7Alterna-5tively*,tforٻthemostcommonpGoints,tonemayuseoriginwithalab}'elDcontaining5oneortwoofthefollowing::lrctbBh(Bdenotesthebaseline,asforPST*ricks).5F*orexample,Zcompareadefaultrotationof180^ O!cmsy7+ײ...*Xps: gsave currentpoint currentpoint translate 180 neg rotate neg exch neg exch translateLikeUUThis)N= ps: currentpoint grestore moveto*...=tothee ects㎍5gainedUUbyusingtheoriginkey:5[origin?=c]UUrotatesabGoutthecentreofthebox,...*:Xps: gsave currentpoint currentpoint translate 180 neg rotate neg exch neg exch translateLikeUUThis)N= ps: currentpoint grestore moveto*...r5[origin?=tr]UUrotatesabGoutthetoprighthandcorner...*rXps: gsave currentpoint currentpoint translate 180 neg rotate neg exch neg exch translateLikeUUThis)N= ps: currentpoint grestore moveto*...5color push Black7Y color pop`s5color push BlackY color popo5TheSunitskeyallowsachangefromthedefaultunitsofdegreesanti-cloGckwise. 5GiveUUthenumbGerofunitsinonefullanti-cloGckwiserotation.qF*orexample:5[units?=-360]UUspGeci esdegreesclockwise.5[units=?6.283185]UUspGeci esradians.Pߍ54.3SScaling@54.3.1X#ScalingTb9yscalefactoro@ff1ͤLτ ffΟ1\scalebox{hh-scale i"ʐ}[hv-scale i"Q]{htexti}͡ ff5ff阍5Againrthisisbasicallylike\mboxbutscalesthetext.Ifv-sc}'aleKͲisnotspGeci ed5itdefaultstoh-sc}'ale.VIfitisspGeci edthetextisdistortedasthehorizontaland5verticalUUstretchesaredi erent,Nps: currentpoint currentpoint translate 3 .7 scale neg exch neg exch translateLikeThisZps: currentpoint currentpoint translate 1 3 div 1 .7 div scale neg exch neg exch translate@ .@ff`R1ͤLτ ffΟ1\reflectbox{htexti}͡ ff5ff`R阍5AnUUabbreviationfor\scalebox{-1}[1]{htextظi}.Pߍ54.3.2X#ScalingTtoarequestedsize@ff1ͤLτ ffΟ1\resizebox*{hh-length9i'}{hv-length9i'O4}{htexti}͡ ff5ff5ScaleftextYYsothatthewidthish-length.JIf!isusedaseitherlengthargument, 5the_otherargumentisusedtodetermineascalefactorthatisusedinbGoth5directions./Normally!xv-length۲referstotheheightofthebGox,Tbutinthestar5form, .itjreferstothe`height+depth'.AsnormalforL5ffA͉TU>'ExX2 b> cmmi10".~bGoxlength5arguments,\height,\width,\totalheight,\depthmaybGeusedtoreferto5theUUoriginalsizeofthebGox. 썑5\resizebox{1in}{\height}{Some?text}:qYps: currentpoint currentpoint translate 1.63638 1.00003 scale neg exch neg exch translateSomeUUtexteps: currentpoint currentpoint translate 1 1.63638 div 1 1.00003 div scale neg exch neg exch translateb5\resizebox{1in}{!}{Some?text}:qYps: currentpoint currentpoint translate 1.63638 1.63638 scale neg exch neg exch translateSomeUUtexteps: currentpoint currentpoint translate 1 1.63638 div 1 1.63638 div scale neg exch neg exch translatePߍ54.4SIncludingGraphicsFiles@5Thefunctionsforgraphicsinclusiontrytogivethesameusersyntaxforinclud-5inganykindofgraphics lethatcanbGeunderstoodbythedriver.]Thisrelies5onthe lehavinganextensionthatidenti esthe letypGe.^The`driveroptions'5will5de neacollectionof leextensionsthatthedrivercanhandle,Galthough5thisUUlistmaybGeextendedusingthedeclarationsdescribedbelow.5If|the le'sextensionisunknowntothedriver,-thesystemmaytryadefault5 letypGe.V;ThePostScriptdriver lessetthisdefaulttobGeeps(PostScript),7but5thisUUbGehaviourmaybGecustomisedifotherdefaultsarerequired."(ff_1ͤLτ ffΟ1graphics:01\includegraphics*[hlxlx,llyUi ][hurx,uryUi%I]{h le i}͡ ff ͤLτ ffΟ1graphicx:01\includegraphics*[hkeyN'ExXdimensions.Ifthe5unitsareomittedtheydefaulttobp.1So[1in,1in]and[72,72]areequivqa-5lent.Ifw]onlyoneoptionalargumentappGears,thelowerleftcorneroftheimage5is(^assumedtobGeat[0,0].Otherwise[hllx,lly}i w]maybeusedtospecifythe5coGordinatesUUofthispoint.5graphicxyv9ersion HereEHthestarformisjustforcompatibilitywiththestandard5version.ItSjustaddscliptothelistofkeysspGeci ed.(Also,forincreased5compatibility*,dGiftwo|optionalargumentsareused,dGthe`standard'versionof5\includegraphicsUUisalwaysUUused,evenifthegraphicxpackqageisloaded.)5TheUUallowedkeysarelistedbGelow.Y0color push Blackbb color popFTheG&argumentshouldbGefourdimensions,}0separatedbyspaces.ThesedenoteNtheUU`BoundingBox'oftheprintedregionwithinthe le.0color push Blackbbllx,bblly ,bburx,bbury color pop SetߏthebGoundingbox. tMainlyforcompatibilityNwith:olderpackqages."SpGecifyingbbllx=a,bblly=b,bburx=c,bbury=disNequivqalentUUtospGecifyingbb?=abcd.0color push Blacknat9width,natheight color popNAgain)sanalternativetobb. natheight=h,natwidth=wNisUUequivqalenttobb?=00hw.0color push Blackhiresbb color pop^lBoGolean2vqaluedkey*.f/Ifsettotrue(justspecifyinghiresbbisequivqa-NewTfeature 1996/10/29NlentStohiresbb=true)thenTU>'ExXwillloGokfor%%HiResBoundingBoxlinesNrather79than%%BoundingBox.gItmaybGesettofalsetooverruleadefaultNsettingUUoftruesetbythehiresbbpackqageoption.0color push BlackviewpQort color popfThe.viewportkeytakesfourarguments,justlikebb. HoweverNewTfeature 1995/06/01NinthiscasethevqaluesaretakenrelativetotheoriginspGeci edbytheNbGoundingboxinthe le.3Soto`view'the1insquareinthebottomleftNhandbcorneroftheareaspGeci edbytheboundingbox,eHusetheargumentNviewport=0?07272.0color push Blacktrim color popOlSimilar%toviewpGort,gbutherethefourlengthsspecifytheamounttoNewTfeature 1995/06/01Nremove9oraddtoeachside.h^trim=?12349`crops'thepictureby1bpatNtheUUleft,2bpatthebGottom,3bpontherightand4bpatthetop.0color push Blackangle color popT1RotationUUangle.0color push Blackorigin color popWOriginUUforrotation.qSeethedoGcumentationof\rotatebox.NewTfeature 1995/09/280color push Blackwidth color popVRequiredUUwidth.qThegraphicisscaledtothiswidth.0color push Blackheigh9t color popY%KRequiredUUheight.qThegraphicisscaledtothisheight.5color push Black9Y color pop s5color push BlackY color popo0color push Blacktotalheigh9t color poppSpGecifythetotalheight(height+depth)ofthe gure.'ThiswillNewTfeature 1995/06/01 Ndi er#fromthe`height'ifrotationhasoGccurred.a Inparticularifthe gureNhasUUbGeenrotatedby90^9thenitwillhavezeroheightbutlargedepth.0color push Blackk9eepaspQectratio color popBoGoleansvqaluedkeylike`clip'.!IfsettotruethenspGecifyingNewTfeature 1995/09/27NbGoth*`width'and`height'(or`totalheight')doGesnotdistortthe gurebutNscalesUUsuchthatneitherofthespGeci eddimensionsisexc}'eeded.0color push Blackscale color popQ߲ScaleUUfactor.0color push Blackclip color popK㈲Either`true'or`false'(ornovqalue,'`whichisequivalentto`true').^CliptheNgraphicUUtothebGoundingbox.0color push Blackdraft color popRaUUbGooleanvqaluedkey*,like`clip'.qLoGcallyswitchestodraftmoGde.0color push Blackt9ypQe color popP3SpGecifyUUthegraphicstype.0color push Blackext color popISpGecify the leextension.ThisshouldonlybeusedinconjunctionwithNtype.0color push Blackread color popOjSpGecifypthe leextensionofthe`read le'.ThisshouldonlybeusedinNconjunctionUUwithtype.0color push Blackcommand color popjeCSpGecifyanycommandtobeappliedtothe le.KThisshouldonlybeNusedUUinconjunctionwithtype.5F*or13thekeysspGecifyingtheoriginalsize(i.e,,8mtheboundingbox,8mtrimandview-5pGortskeys)theunitscanbeomitted,:inwhichcasebp(i.e.,PostScriptpGoints)5areUUassumed.5The rstsevenkeysspGecifytheoriginalsizeoftheimage.aThissizeneedsto5bGespeci edinthecasethatthe lecannotbereadbyTU>'ExX,2oritcontainsan5incorrectUUsize`BoundingBox'spGeci cation.5bbllx...\bburyUUaremainlyforcompatibilityforolderpackqages.5bbllx=a,?bblly=b,bburx=c,bbury=d5isUUequivqalentto5bb?=abcd.5natheightandnatwidtharejustshorthandsforsettingthelowerleftcoGordi-5nateUUto00andtheuppGerrightcoordinatetothespeci edwidthandheight.5ThepnextfewkeysspGecifyanyscalingorrotationtobGeappliedtotheimage.B&T*o5get0thesee ectsusingthestandardpackqage,fthe\includegraphicscallmust5bGeUUplacedinsidetheargumentofa\rotateboxor\scaleboxcommand.5TheDkeysarereadleft-to-right,@so[angle=90,?height=1in]meansrotateby590Ydegrees,Z andthenscaletoaheightof1in.}[height=1in,?angle=90]would5resultUUina nalwidthof1in.5Ifthecalcpackqageisalsoloadedthelengthsmayusecalcsyntax,forinstance5to0spGecifyawidthof2cmlessthanthetextwidth:_[width=\textwidth-2cm].5TU>'ExXleavesthespacespGeci edeitherinthe le,orintheoptionalarguments.5If9anypartoftheimageisactuallyoutsidethisarea,ritwillbydefaultoverprint5color push Black10Y color pop s5color push BlackY color popo5thesurroundingtext.TIfthestarformisused,orclipspGeci ed,anypartofthe 5imageUUoutsidethisareawillnotbGeprinted.=5Thelastfourkeyssuppresstheparsingofthe lename.2Iftheyareused,fthe5mainp le1argumentshouldnothavethe leextension.TheycorrespGondtothe5argumentsUUof\DeclareGraphicsRuledescribGedbelow.5T*oseethee ectthatthevqariousoptionshaveconsiderthe lea.ps.This le5containsUUthebGoundingboxspeci cationՍ0color push Black color pop5%%BoundingBox:100100172172Ս5Thatis,Гtheprintedregionconsistsofaone-inchsquare,Г100ptinfromthe5bGottomUUandlefthandedgesofthepaper.5InUUallthefollowingexamplestheinputwillbGeoftheformՍ0color push Black color pop5left---\fbox{\includegraphics{a}}---rightՍ5WithUUdi erentoptionssuppliedto\includegraphics.5NoUUoptionalargument.NK5left|ffONENEff6PSfile="a.ps" llx=100 lly=100 urx=172 ury=172 rwi=720 NENEffffffOꎎO|right5graphics:_8\scalebox{0.5}{\includegraphics{a}}5graphicx:_8\includegraphics[scale=.5]{a}*ٍ5left|qff*[*"*"ff6PSfile="a.ps" llx=100 lly=100 urx=172 ury=172 rwi=360 *"*"ffffff*[*[|right5graphics:_8\includegraphics[115,110][135,145]{a}}5graphicx:_8\includegraphics[bb=?115110135145]{a})䍑5left|fff)!)!ff6PSfile="a.ps" llx=115 lly=110 urx=135 ury=145 rwi=200 3)!ffffff|right5graphics:_8\includegraphics*[115,110][135,145]{a}}5graphicx:_8\includegraphics[bb=?115110135145,clip]{a})䍑5left|fff)!)!ff:PSfile="a.ps" llx=115 lly=110 urx=135 ury=145 rwi=200 clip3)!ffffff|right5graphics:_8\scalebox{0.5}{\includegraphics{a}}UUanddraftoption.5graphicx:_8\includegraphics[scale=.5,?draft]{a}*ٍ5left|qff*[*"*"ff$"ffC׉ff$"UUa.psff$"#UÄ$"ff*"*"ffffff*[*[|right5color push Black11Y color pop s5color push BlackY color popo54.5SOthercommandsinthe(kAH cmssbx10graphicspack@ageo@ffuޟ1ͤLτ ffΟ1\graphicspath{hdir-listi"}͡ ff5ffuގ阍5This!optionaldeclarationmaybGeusedtospecifyalistofdirectoriesinwhichto 5searchMforgraphics les.TheformatisthesameasfortheL5ffA͉TU>'ExX2",Dprimitive5\input@path.^(Ajlistyofdirectories,&>eachina{}group(evenifthereisonlyone5inUUthelist).qF*orexample:5\graphicspath{{eps/}{tiff/}}5wouldcausethesystemtoloGokinthesubdirectoriesepsandtiffofthecurrent5directory*.qThisUUisunixsyntax,onaMacitwouldbGe:5\graphicspath{{:eps:}{:tiff:}}5Notethedi eringconventions,9aninitial:isneededonMacintoshsystemsto5denote.thecurrentfolder,ewhereasonunixaninitial/woulddenotethetop5levelUU`roGot'directory*.5Thedefaultsettingofthispathis\input@paththatis:graphics leswillbGe5foundUUwhereverTU>'ExX lesarefound.@ffFB1ͤLτ ffΟ1\DeclareGraphicsExtensions{hext-listi"}͡ ff5ffFB阍5ThisAspGeci esthebehaviourofthesystemwhenno leextensionisspeci edinNew description1994/12/015theargumentto\includegraphics.]4{hext-listظi%}shouldbGeacommaseparated5listof leextensions.V(WhitespaceisignoredbGetweentheentries.)A lename5isJbproGducedbyappendingoneextensionfromthelist.PIfa leisfound,the5systemactsasifthatextensionhadbGeenspeci ed.Ifnot,ǐthenextextension5inUUext-listH-istried.5NotemthatiftheextensionisnotspGeci edinthe\includegraphicscom-5mand,^7the)=graphics lemustexistatthetimeL5ffA͉TU>'ExXisrun,astheexistence5ofothe leisusedtodeterminewhichextensionfromthelisttochoGose.How-5ever~.ifa leextensionisPOspGeci ed,de.g.\includegraphics{a.ps}insteadof5\includegraphics{a},m#thenh`thegraphics leneednotexistatthetimeL5ffA͉TU>'ExX5is7$used.g(InparticularitmaybGecreatedonthe ybythehc}'ommandi8EspGeci ed5inthe\DeclareGraphicsRulecommanddescribGedbelow.):L5ffA͉TU>'ExXdoeshowever5needtobGeabletodeterminethesizeoftheimagesothissizemustbespeci ed5inUUarguments,orthe`read le'mustexistatthetimeL5ffA͉TU>'ExXisused.@ffm1ͤLτ ffΟ1\DeclareGraphicsRule{hexti}{htype i}{hread- le i'}{hcommandpi.^V}͡ ff5ffm阍5AnyunumbGerofthesedeclarationscanbemade.2Theydeterminehowthesystem5bGehaveskwhena lewithextensionextCisspeci ed.e(Theextensionmaybe5spGeci edexplicitlyor,:iftheargumentto\includegraphicsdoesnothave5anzextension,:itmaybGeadefaultextensionfromtheext-listRspeci edwith5\DeclareGraphicsExtensions.)5ext^%thekM leextensionforwhichthisruleapplies.AsaspGecialcase,pextmaybGe5givenas*todenotethedefaultbGehaviourforallundeclaredextensions(seethe5exampleUUbGelow).5typ}'elyisthe`typGe'of leinvolved.9`All lesofthesametypGewillbeinputwiththe5color push Black12Y color pop ޠs5color push BlackY color popo5sameSpinternalcommand(whichmustbGede nedina`driver le').q%F*orexample 5 lesUUwithextensionsps,eps,ps.gzmayallbGeclassedastypGeeps.4ڍ5r}'ead- le~Ndeterminestheextensionofthe lethatshouldbGereadtodetermine5sizeinformation.JNItmaybGethesameasextbutitmaybGedi erent,forexample5.ps.gz8 lesarenotreadableeasilybyTU>'ExX,qsoyoumaywanttoputthebGounding5bGoxinformationinaseparate lewithextension.ps.bb.UIfr}'ead- leE5isempty*,5{},|thentthesystemwillnottrytoloGcateanexternal leforsizeinfo,andthe5size,mustbGespeci edintheargumentsof\includegraphics.d0Ifthedriver le5spGeci esxMaprocedureforreadingsize lesfortyp}'e, thatwillbeused, otherwise5theproGcedureforreadingeps leswillbeused.Thusthesizeofbitmap les5mayIbGespeci edina lewithaPostScriptstyle%%BoundingBoxline,Lifnoother5spGeci cUUformatisavqailable.5As"aspGecialcase*maybeusedtodenotethesameextensionasthegraphic5 le.+CThis~ismainlyofuseinconjunctionwithusing*astheextension, Hasin5thatUUcasetheparticulargraphicextensionisnotknown.qF*orexample80color push Black color pop9\DeclareGraphicsRule{*}{eps}{*}{}85This:woulddeclareadefaultrule,suchthatallunknownextensionswouldbGe5treatednasEPS les,4andthegraphic lewouldbGereadforaBoundingBox5comment.5c}'ommand_isWausuallyempty*,Wbutifnonemptyitisusedinplaceofthe lename5inžthe\special.AWithinthisargument,v#1maybGeusedtodenotethe lename.5ThusUUusingthedvipsdriver,onemayuse5\DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{`zcat?#1}5ther nalargumentcausesdvipstousethezcatcommandtounzipthe lebGefore5insertingUUitintothePostScriptoutput.5NotethatL5ffA͉TU>'ExXwill ndthegraphics lebysearchingalongTEXINPUTS(and5pGossiblyotherplaces,Qasspeci edwith\graphicspath)howeveritmaybethat5thencommandyouspGecifyinthisargumentcannot ndsuch lesunlessthey5areRinthecurrentdirectory*.gOnsomesystemsitmaybGepossibletomodify5theSdcommandsothatitwill ndany lesthatL5ffA͉TU>'ExXcan nd.q!F*orexampleon5newer7web2cTU>'ExXreleasesonunix,qonemaymoGdifytheabovecommandsothat5theUUlastargumentis:5{`zcat?`kpsewhich-nlatextex#1`}5whichincantationcausesthekpsewhichprogramto ndthe le,Wbysearching5along4L5ffA͉TU>'ExX'spath,Ŭandthenpassthefullpathnametothezcatprogramso5thatK[itcanuncompressthe le.ntAnysuchusesareverysystemdepGendent,MZand5wouldtbGestbeplacedinagraphics.cfg le,{thuskeepingthedoGcumentitself5pGortable. ۙ54.6SGlobalsettingofkeys.5MostvofthekeyvalkeysusedinthegraphicxpackqagemayalsobGesetusingthe5commandUU\setkeysprovidedbythekeyvalpackqage.5F*orinstance, suppGoseyouwantedallthe lestobGeincludedinthecurrentdoGc-5umentYtobGescaledto75%ofthewidthofthelinesoftext,Ythenonecouldissue5color push Black13Y color popNs5color push BlackY color popo5theUUfollowingcommand: 5\setkeys{Gin}{width=0.75\textwidth}5Here}`Gin'isthenameusedforthekeyvalkeysassoGciatedwith`Graphicsin-5clusion'.TAll following\includegraphicscommands(withinthesamegroup5ornSenvironment)willactasif[width=0.75\textwidth]hadbGeenspeci ed,tin5additionUUtoanyotherkeysettingsactuallygivenintheoptionalargument.5Similarlyitomakeall\rotateboxargumentstakeanargumentinradians,none5justUUneedstospGecify:5\setkeys{Grot}{units=6.28318}!654.7SCompatibilityb`etweengraphicsandgraphicxuT5F*oradoGcumentauthor,0therearenotreallyanyproblemsofcompatibilitybGe-5tween_\thetwo_\packqages.Y*oujustchoGosetheinterfacethatyoupGersonallyprefer,5andUUthenusetheappropriatepackqage.5F*or$apackqageorclasswriterthesituationisslightlydi erent.vSuppGosethat5youOarewritingaletterclassthatneedstoprintacompanylogoaspartofthe5letterhead.5AsStheauthoroftheclassyoumaywanttogivetheusersthepGossibilityofusing5eithereinterfaceintheirletters(shouldtheyneedtoincludeanyfurthergraphics5intotheletterbGody).3Inthiscasetheclassshouldloadthegraphicspackqage(not5graphicx,$as(thiswouldcommitanyusersoftheclasstothekeyvalinterface).5ThelogoshouldbGeincludedwith\includegraphicseitherwithno?optional5argumentF(ifthecorrectsizeinformationisinthe le)orb}'oth Boptionalarguments5otherwise.̜Dosnotusetheone3optionalargumentform,{.asthemeaningofthis5argumentwouldchange(andgenerateerrors)iftheuserweretoloadgraphicx5asUUwellasyourclass.'č55MLRemainingffpackagesinthegraphicsbundle55.1SEps guT5Thisisasmallpackqageessentiallya`wrappGer'aroundthegraphicxpackqage,5de ningUUacommand\psfigwhichhasthesyntax5\psfig{file=xxx,...}UUratherthan\includegraphics[...]{xxx}.5ItFalsohasafewmorecommandstomakeitslightlymorecompatiblewiththe5oldUUL5ffA͉TU>'ExX2.09styleofthesamename.!655.2STrig5ThetrigpackqageisnotintendedtobGeuseddirectlyindocuments.TItcalculates5sine,4cosineandtangenttrigonometricfunctions.bTheseareusedtocalculate5thespacetakenupbyarotatedbGox.GThispackqageisalsousedbythefontinst5programUUwhichconvertsPostScript lestoaformusablebyTU>'ExX.5color push Black14Y color pop,s5color push BlackY color popo5AswellasbGeingusedasaL5ffA͉TU>'ExXpackqage,themacrosmaybGeextractedwiththe 5doGcstripoptionsplain,package.*InthiscasetheL5ffA͉TU>'ExXpackqagedeclarationsare5omittedfromthe le,CandthemacrosmaybGedirectlyusedaspartofanother5macroUU le(theyworkwithanyformatbasedonplainTU>'ExX.)!655.3SKeyv@aluT5ThekeyvalpackqageisintendedtobGeusedbyotherpackqages. Itprovidesa5genericwayofsetting`keys'asusedbythegraphicxpackqage,andsplittingup5theUUcommaseparatedlistsofhkey}ibv=hvalue[i%mղpairs.5Likew:thetrigDzpackqage,thesemacrosmaybGeextractedandusedaspartofanother5macro% le,/0basedonplainTU>'ExX,aswellasthestandarduseasaL5ffA͉TU>'ExXpackqage.55.4SPstcoluT5PST*ricks,ɻbyTimothyV*anZandtisanimmenselypGowerfulpackqagethatenables5aփveryfullfeaturedinterfacebGetweenPostScriptandTU>'ExX.QUnfortunatelythe5colour\suppGortinPST*ricksisslightlyincompatiblewiththecolourmechanism5de nedinthecolor;packqage.,Thepstcolpackageisa(hopGefullytemporary)5packqage*thatmoGdi esaverysmallnumbGerofinternalPST*ricksfunctions,Lto5removegIthisincompatibility*.If.fpstricksisloadedviathispackqage,kyoumayuse5any=_coloursde nedby`colorpackqage=_commandswithinpstrickscommands,B*and5viceUUversa.55.5SLscap`euT5ThelscapGepackqagerequiresandtakesthesameoptionsasthegraphicspack-5age.Ita]de nesalandscapeenvironmenta]withinwhichpagebGodiesa]arerotated5throughg90degrees.6ThepageheadandfoGotarenota ected,,theyappearin5theUUstandard(pGortrait)position.5color push Black15Y color pop֍; (kAH cmssbx10'ow cmss9&kAH cmssbx10%#fcmti8$Cscmtt8#j cmti9" cmsy9 N cmbx12': cmti10ߤN cmtt9o cmr9 cmmi10K`y cmr10ٓRcmr7