XDVI(1) XDVI(1) NAME xdvi−DVIPreviewerfortheXWindowSystem SYNOPSIS xdvi[+[page]][−sshrink][−Sdensity][−nogrey][−gammag][−install][−noinstall][−p pixels][−marginsdimen][−sidemargindimen][−topmargindimen][−offsetsdimen] [−xoffsetdimen][−yoffsetdimen][−paperpapertype][−altfontfont][−nomakepk]−mfmode mode-def[:dpi][−l][−rv][−expert][−shrinkbuttonnshrink][−mgs[n]size][−warnspecials] [−hush][−hushchars][−hushchecksums][−hushspecials][−safer][−fgcolor][−bgcolor] [−hlcolor][−bdcolor][−crcolor][−bwwidth][−grid1color][−grid2color][−grid3color] [−bwwidth][−displayhost:display][−geometrygeometry][−icongeometrygeometry] [−iconic][−fontfont][−keep][−copy][−thorough][−nopostscript][−noscan] [−allowshell][−noghostscript][−nogssafer][−gsalpha][−interpreterpath][−gspalette palette][−underlink][−browserWWWbrowser][−basebaseURL][−srcMode] [−srcVisibility][−srcTickShapen][−srcTickSizegeometry][−srcCursorn] [−srcJumpButtonbutton][−srcEditorCommandcommandstring][−srcSpecialFormatn] [−debugbitmask][−version][dvifile]dvifile DESCRIPTION xdviisaprogramwhichrunsundertheXwindowsystem.Itisusedtopreviewdvifiles,suchas areproducedbytex(1). Thisprogramhasthecapabilityofshowingthefileshrunkenbyvarious(integer)factors,andalso hasa‘‘magnifyingglass’’whichallowsonetoseeasmallpartoftheunshrunkimagemomentarily. Beforedisplayinganypageorpartthereof,itcheckstoseeifthedvifilehaschangedsincethelast timeitwasdisplayed.Ifthisisthecase,thenxdviwillreinitializeitselfforthenewdvifile.For thisreason,exposingpartsofthexdviwindowwhileTEXisrunningshouldbeavoided.Thisfeatureallowsyoutopreviewmanyversionsofthesamefilewhilerunningxdvionlyonce. Inadditiontousingkeystrokestomovewithinthefile,xdviprovidesbuttonsontherightsideof thewindow,whicharesynonymouswithvarioussequencesofkeystrokes. xdvicanshowPostScript<tm>specialsbyanyofthreemethods.ItwilltryfirsttouseDisplay PostScript<tm>,thenNeWS,thenitwilltrytouseGhostscripttorendertheimages.Allof theseoptionsdependonadditionalsoftwaretoworkproperly;moreover,someofthemmaynotbe compiledintothiscopyofxdvi. Forperformancereasons,xdvidoesnotrenderPostScriptspecialsinthemagnifyingglass. Ifdvifileisnotspecified,afile-selectionwidgetispoppedupforyoutochoosethedvifile. OPTIONS Inadditiontospecifyingthedvifile(withorwithoutthe.dviextension),xdvisupportsthefollowingcommandlineoptions.Iftheoptionbeginswitha‘+’insteadofa‘−’,theoptionisrestoredtoitsdefaultvalue.Bydefault,theseoptionscanbesetviatheresourcenamesgivenin parenthesesinthedescriptionofeachoption. +pageSpecifiesthefirstpagetoshow.If+isgivenwithoutanumber,thelastpageisassumed; thefirstpageisthedefault. −allowshell (.allowShell)ThisoptionenablestheshellescapeinPostScriptspecials.(Forsecurity reasons,shellescapesaredisabledbydefault.)Thisoptionshouldberarelyused;inparticularitshouldnotbeusedjusttouncompressfiles:thatfunctionisdoneautomatically ifthefilenameendsin.Z,.gz,or.bz2Shellescapesarealwaysturnedoffifthe−safer optionisused. −altfontfont (.altFont)Declaresadefaultfonttousewhenthefontinthedvifilecannotbefound. Thisisuseful,forexample,withPostScript<tm>fonts. XVersion11 15February1999 1 XDVI(1) XDVI(1) −backgroundcolor (.background)Determinesthecolorofthebackground.Sameas-bg. −basebaseURL (.urlBase)SetsthebaseURLvaluethatexternallinksgiveninthedvifileareassumed relativeto-normallythisshouldbetheURLofthedocumentitself(?). −bdcolor (.borderColor)Determinesthecolorofthewindowborder. −bgcolor (.background)Determinesthecolorofthebackground. −bordercolorcolor Sameas-bd. −borderwidthwidth (.borderWidth)Specifiesthewidthoftheborderofthewindow.Sameas-bw. −browserWWWbrowser (.wwwBrowser)DefinestheWorldWideWebbrowsertobeusedtohandleexternal URL’s,forexamplemosaic.Ifneitherthecommand-lineoptionnortheXresourceare set,usestheenvironmentvariableWWWBROWSER. −bwwidth (.borderWidth)Specifiesthewidthoftheborderofthewindow. −copy(.copy)Alwaysusethecopyoperationwhenwritingcharacterstothedisplay.Thisoptionmaybenecessaryforcorrectoperationonacolordisplay,butoverstrikecharacters willbeincorrect.Ifgreyscaleanti-aliasingisinuse,the−copyoperationwilldisablethe useofcolorplanesandmakeoverstrikescomeoutincorrectly.Seealso−thorough. −crcolor (.cursorColor)Determinesthecolorofthecursor.Thedefaultisthecolorofthepage border. −debugbitmask (.debugLevel)Ifnonzero,printsadditionalinformationonstandardoutput.The numberistakenasasetofindependentbits.Themeaningofeachbitfollows. 1=bitmaps;2=dvitranslation;4=pkreading;8=batchoperation;16=events;32=file opening;64=PostScriptcommunication;128=Kpathseastat(2)calls;256=Kpathseahash tablelookups;512=Kpathseapathdefinitions;1024=Kpathseapathexpansion; 2048=Kpathseasearches.Totraceeverythinghavingtodowithfilesearchingandopening,use4000.SomeofthesedebuggingoptionsareactuallyprovidedbyKpathsea.See theDebuggingsectionintheKpathseamanual. −densitydensity (.densityPercent)Determinesthedensityusedwhenshrinkingbitmapsforfonts.A highervalueproducesalighterfont.Thedefaultvalueis40.Ifgreyscalingisinusethis argumentdoesnotapply;use−gammainstead.Seealsothe‘S’.keystroke.Sameas −S −displayhost:display Specifiesthehostandscreentobeusedfordisplayingthedvifile.BydefaultthisisobtainedfromtheenvironmentvariableDISPLAY. −expert (.expert)Preventthebuttonsfromappearing.Seealsothe‘x’keystroke. −fgcolor (.foreground)Determinesthecolorofthetext(foreground). XVersion11 15February1999 2 XDVI(1) XDVI(1) −foregroundcolor Sameas-fg. −fontfont (*font)Setsthefontforuseinthebuttons. −gammagamma (.gamma)Controlstheinterpolationofcolorsinthegreyscaleanti-aliasingcolorpalette. Defaultvalueis1.0.For0<gamma<1,thefontswillbelighter(morelikethebackground),andforgamma>1,thefontswillbedarker(moreliketheforeground).Negativevaluesbehavethesameway,butuseaslightlydifferentalgorithm.Forcolorand greyscaledisplays;formonochrome,see−density.Seealsothe‘S’keystroke −grid1color (.grid1Color)Determinesthecoloroflevel1grid(defaultasforeground) −grid2color (.grid2Color)Determinesthecoloroflevel2grid(defaultasforeground) −grid3color (.grid3Color)Determinesthecoloroflevel3grid(defaultasforeground) −geometrygeometry (*geometry)Specifiestheinitialgeometryofthewindow. −gspalettepalette (.palette)SpecifiesthepalettetobeusedwhenusingGhostscriptforrendering PostScriptspecials.PossiblevaluesareColor,Greyscale,andMonochrome.ThedefaultisColor. −gsalpha (.gsAlpha)CausesGhostscripttobecalledwiththex11alphadriverinsteadofthe x11driver.Thex11alphadriverenablesanti-aliasinginPostScriptfigures,foranicer appearance.ItisavailableonnewerversionsofGhostscript.Thisoptioncanalsobe toggledwiththe‘V’keystroke. −hlcolor (.highlight)Determinesthecolorofthepageborder.Thedefaultistheforegroundcolor. −hush (.Hush)Causesxdvitosuppressallsuppressiblewarnings. −hushchars (.hushLostChars)Causesxdvitosuppresswarningsaboutreferencestocharacters whicharenotdefinedinthefont. −hushchecksums (.hushChecksums)Causesxdvitosuppresswarningsaboutchecksummismatchesbetweenthedvifileandthefontfile. −hushspecials (.hushSpecials)Causesxdvitosuppresswarningsabout\specialstringsthatitcannot process. −icongeometrygeometry (.iconGeometry)Specifiestheinitialpositionfortheicon. −iconic (.iconic)Causesthexdviwindowtostartintheiconicstate.Thedefaultistostart withthewindowopen. XVersion11 15February1999 3 XDVI(1) XDVI(1) −install (.install)IfxdviisrunningunderaPseudoColorvisual,then(bydefault)itwillcheck forTrueColorvisualswithmorebitsperpixel,andswitchtosuchavisualifoneexists. Ifnosuchvisualexists,itwillusethecurrentvisualandcolormap.If−installisselected,however,itwillstilluseaTrueColorvisualwithagreaterdepth,ifoneisavailable; otherwise,itwillinstallitsowncolormaponthecurrentvisual.Ifthecurrentvisualis notPseudoColor,thenxdviwillnotswitchthevisualorcolormap,regardlessofitsoptions.Thedefaultvalueoftheinstallresourceisthespecialvalue,maybe.Thereisno +installoption.Seealso−noinstall,andtheGREYSCALINGANDCOLORMAPS section. −interpreterfilename (.interpreter)UsefilenameastheGhostscriptinterpreter.Bydefaultitusesgswin32c. −keep(.keepPosition)Setsaflagtoindicatethatxdvishouldnotmovetothehomeposition whenmovingtoanewpage.Seealsothe‘k’keystroke. −l(.listFonts)Causesthenamesofthefontsusedtobelisted. −marginsdimen (.Margin)Specifiesthesizeofboththetopmarginandsidemargin.Thisdetermines the‘‘home’’positionofthepagewithinthewindowasfollows.Iftheentirepagefitsin thewindow,thenthemarginsettingsareignored.If,evenafterremovingthemargins fromtheleft,right,top,andbottom,thepagestillcannotfitinthewindow,thenthe pageisputinthewindowsuchthatthetopandleftmarginsarehidden,andpresumably theupperleft-handcornerofthetextonthepagewillbeintheupperleft-handcornerof thewindow.Otherwise,thetextiscenteredinthewindow.Thedimensionshouldbea decimalnumberoptionallyfollowedbyanyofthetwo-letterabbreviationsforunitsac-ceptedbyTEX(pt,pc,in,bp,cm,mm,dd,cc,orsp).Bydefault,theunitwillbecm (centimeters).Seealso−sidemargin,−topmargin,andthekeystroke‘M.’ −mfmodemode-def (.mfMode)Specifiesamode-defstring,whichcanbeusedinsearchingforfonts(seeEN-VIRONMENT,below).Generally,whenchangingthemode-def,itisalsonecessaryto changethefontsizetotheappropriatevalueforthatmode.Thisisdonebyaddinga colonandthevalueindotsperinch;forexample,−mfmodeljfour:600.Thismethod overridesanyvaluegivenbythepixelsPerInchresourceorthe−pcommand-lineargu-ment.Themetafontmodeisalsopassedtometafontduringautomaticcreationoffonts. Bydefault,itisunspecified. −mgssize Sameas−mgs1. −mgs[n]size (.magnifierSize[n])Specifiesthesizeofthewindowtobeusedforthe‘‘magnifyingglass’’ forButtonn.Thesizemaybegivenasaninteger(indicatingthatthemagnifyingglassis tobesquare),oritmaybegivenintheformwidthxheight.SeetheMOUSEACTIONS section.Defaultsare200x150,400x250,700x500,1000x800,and1200x1200. −noghostscript (.ghostscript)InhibitstheuseofGhostscriptfordisplayingPostScript<tm>specials. (Forthisoption,thelogicofthecorrespondingresourceisreversed:−noghostscriptcorrespondstoghostscript:off;+noghostscripttoghostscript:on.) −nogrey (.grey)Turnsofftheuseofgreyscaleanti-aliasingwhenprintingshrunkenbitmaps.(For thisoption,thelogicofthecorrespondingresourceisreversed:−nogreycorrespondsto grey:off;+nogreytogrey:on.)Seealsothe‘G’keystroke. XVersion11 15February1999 4 XDVI(1) XDVI(1) −nogssafer (.gsSafer)Normally,ifGhostscriptisusedtorenderPostScriptspecials,theGhostscript interpreterisrunwiththeoption−dSAFER.The−nogssaferoptionrunsGhostscript without−dSAFER.The−dSAFERoptioninGhostscriptdisablesPostScriptoperatorssuchasdeletefile,topreventpossiblymaliciousPostScriptprogramsfromhaving anyeffect.Ifthe−saferoptionisspecified,thenthisoptionhasnoeffect;inthatcase Ghostscriptisalwaysrunwith−dSAFER.(Forthe−nogssaferoption,thelogicofthe correspondingresourceisreversed:−nogssafercorrespondstogsSafer:off;+nogssafer togsSafer:on.) −noinstall (.install)InhibitthedefaultbehaviorofswitchingtoaTrueColorvisualifoneisavailablewithmorebitsperpixelthanthecurrentvisual.Thisoptioncorrespondstoaresourceofinstall:off.Thereisno+noinstalloption.Seealso−install,andthe GREYSCALINGANDCOLORMAPSsection. −nomakepk (.makePk)Turnsoffautomaticgenerationoffontfilesthatcannotbefoundbyother means.(Forthisoption,thelogicofthecorrespondingresourceisreversed:−nomakepk correspondstomakePk:off;+nomakepktomakePK:on.) −nopostscript (.postscript)TurnsoffrenderingofPostScript<tm>specials.Boundingboxes,if known,willbedisplayedinstead.Thisoptioncanalsobetoggledwiththe‘v’keystroke. (Forthisoption,thelogicofthecorrespondingresourceisreversed:−nopostscriptcorrespondstopostscript:off;+postscripttopostscript:on.) −noscan (.prescan)Normally,whenPostScript<tm>isturnedon,xdviwilldoapreliminary scanofthedvifile,inordertosendanynecessaryheaderfilesbeforesendingthe PostScriptcodethatrequiresthem.Thisoptionturnsoffsuchprescanning.(Itwillbe automaticallybeturnedbackonifxdvidetectsanyspecialsthatrequireheaders.)(For the−noscanoption,thelogicofthecorrespondingresourceisreversed:−noscancorrespondstoprescan:off;+noscantoprescan:on.) −offsetsdimen (.Offset)Specifiesthesizeofboththehorizontalandverticaloffsetsoftheoutputonthe page.BydecreeoftheStanfordTEXProject,thedefaultTEXpageoriginisalways1 inchoveranddownfromthetop-leftpagecorner,evenwhennon-Americanpapersizes areused.Therefore,thedefaultoffsetsare1.0inch.Theargumentdimenshouldbea decimalnumberoptionallyfollowedbyanyofthetwo-letterabbreviationsforunitsac-ceptedbyTEX(pt,pc,in,bp,cm,mm,dd,cc,orsp).Bydefault,theunitwillbecm (centimeters).Seealso−xoffsetand−yoffset. −ppixels (.pixelsPerInch)Definesthesizeofthefontstouse,inpixelsperinch.Thedefaultvalueis600.Thisoptionisprovidedonlyforbackwardscompatibility;thepreferredwayof settingthefontsizeisbysettingtheMetafontmodeatthesametime;seethe−mfmode option. −paperpapertype (.paper)Specifiesthesizeoftheprintedpage.Thismaybeoftheformwidthxheightoptionallyfollowedbyaunit,wherewidthandheightaredecimalnumbersgivingthewidth andheightofthepaper,respectively,andtheunitisanyofthetwo-letterabbreviations forunitsacceptedbyTEX(pt,pc,in,bp,cm,mm,dd,cc,orsp).Bydefault,theunit willbecm(centimeters).Therearealsosynonymswhichmaybeused:us(8.5x11in), usr(11x8.5in),legal(8.5x14in),foolscap(13.5x17in),aswellastheISOsizesa1-a7, b1-b7,c1-c7,a1r-a7r(a1-a7rotated),etc.Thedefaultsizeis21x29.7cm(A4size). XVersion11 15February1999 5 XDVI(1) XDVI(1) −rv(.reverseVideo)Causesthepagetobedisplayedwithwhitecharactersonablackbackground,insteadofviceversa. −sshrink (.shrinkFactor)Definestheinitialshrinkfactor.Thedefaultvalueis8.Ifshrinkisgivenas0,thentheinitialshrinkfactoriscomputedsothatthepagefitswithinthewindow (asifthe‘s’keystrokeweregivenwithoutanumber). −Sdensity (.densityPercent)Sameas−density,q.v. −safer (.safer)Thisoptionturnsonallavailablesecurityoptions;itisdesignedforusewhen xdviiscalledbyabrowserthatobtainsadviorTEXfilefromanothersite.Inthepresentcase,thisoptionselects+nogssaferand+allowshell. −shrinkbuttonnshrink (.shrinkButtonn)Specifiesthatthenthbuttonchangingshrinkfactorsshallchangeto shrinkfactorfactor.Thisisnotveryusefullinthenormalrunofthings.xdvikscalesthe scalingfactorsaccordingtoresolution(currently300dpiand600dpi).Herenmaybea numberfrom1to4.Typicalfactorsarepowersof2. −sidemargindimen (.sideMargin)Specifiesthesidemargin(see−margins). −srcMode (.srcMode)Startsxdviinsrcspecialmode(seethesectionSRCSPECIALMODEbelow fordetails).Themodecanbetoggledwith‘Ctrl-s’;whenthemodeison,thecursorhasa differentshape(seethe-srcCursoroptionbelow).Forsecurityreasons,evaluationofsrc specialsisoffbydefault,anditmightbeagoodideatoenableitonlyforselected.dvi filesonthecommandline. −srcVisibility (.srcVisibility)Makesthesourcespecialsvisiblebydrawingsmalltickmarksforeach special.Thiscanbetoggledwiththe‘V’key(seethesectionSRCSPECIALMODEfor moredetails). −srcTickShapen (.srcTickShape)Specifiestheshapeofthesrctickmarks,wherencanbeoneof0,1,2 or3:0isarectangle,1isatriangle,2isanupwardangleand3isadownwardangle. SeethesectionSRCSPECIALMODEformoredetails. −srcTickSizegeometry (.srcTickSize)Specifiesthesizeofthesrctickmarksinpixelswidthxheight,withrespecttomagnificationfactor1.Defaultis40x70,whichisareasonablevaluefor600dpi fonts.Forhigherresolutions,youmightwanttoincreasethesize.Thetwoattributes widthandheightonlyhaveanaturalmeaningfortherectangleshape;forthetriangle, widthisignored;fortheangleshapes,widthishalfthewidthofthelines,andheightis thelengthofthelines.SeethesectionSRCSPECIALMODEformoredetails. −srcCursorn (.srcCursor)TheshapeofthecursorinSRCSPECIALMODE.Forpossiblevalues,see e.g.‘cursorfont.h’. −srcJumpButtonbutton (.srcJumpButton)ThemousebuttonusedinSRCSPECIALMODEtojumptothe nextspecialnearpoint.SeethesectionSRCSPECIALMODEformoredetails. −srcEditorCommandcommandstring (.srcEditorCommand)Specifiestheeditorcommandthatwillbecalledwhentheuser wantstojumptoasrcspecial.ThisshouldbeaCformatstringcontaining2placeholders(aka‘conversionspecifications’):%s(forthefilename)and%u(forthelinenumber) XVersion11 15February1999 6 XDVI(1) XDVI(1) pointedtobythatspecial.Youshouldalwaysenclosebothoftheseconversionspecificationsintoapairofquoteslikethis:’%u’;thiswillensurethattheshellwon’tinterpretthe resultingformatstringdirectly.Thiswayitwilldonoharmwhensomeeviluserputs commandslike‘ls-lR/‘intothesrcspecialsofa.dvifile,insteadoftheordinaryfile-name.Thedefaultforthiscommandstringis: emacsclient--no-wait’+%u’’%s’ whichwillworktogetherwithEmacs.ForXemacsyouwouldhavetousesomethinglike: gnuclient-q+’%u’’%s’ Notethatwhenthecommand-lineoption,you’llhavetoenclosethestringintoanother pairofquotes;don’tenclosethestringinquoteswhenspecifyingitasanXresource. −srcSpecialFormatn (.srcSpecialFormat)Theformatofthe\specialstringsinthedvifile.Theformatscurrentlysupportedare: 0\special{src:filename:linenumber} 1\special{src:linenumber<space>filename} 2\special{src:linenumber<space>*filename} Inthefirstformat,thecolonseparatingthelinenumberfromthefilenameisthelastcolon intheentirestring. Thesecondformatrequiresexactlyonespacebetweenthelinenumberandthefilename. Inthethirdformat,therecanbeanynumberofspaces(including0--butthenofcourse thefilenameshouldn’tstartwithadigit,sousingnospaceatallisusuallynotagood idea). Xdviwillwarnyouaboutspecialsthatdon’tconformtotheformatcurrentlyselected. −thorough (.thorough)xdviwillusuallytrytoensurethatoverstrikecharacters(e.g.,\notin)are printedcorrectly.Onmonochromedisplays,thisisalwayspossiblewithonelogicaloperation,eitherandoror.Oncolordisplays,however,thismaytaketwooperations,oneto settheappropriatebitsandonetoclearotherbits.Ifthisisthecase,thenbydefault xdviwillinsteadusethecopyoperation,whichdoesnothandleoverstrikingcorrectly. The−thoroughoptionchoosestheslowerbutmorecorrectchoice.Seealso−copy. −topmargindimen (.topMargin)Specifiesthetopandbottommargins(see−margins). −underlink (.underLink)Underlinelinks.Defaultistrue. −version Printinformationontheversionofxdvi. −warnspecials (.warnSpecials)Causesxdvitoissuewarningsabout\specialstringsthatitcannot process. XVersion11 15February1999 7 XDVI(1) XDVI(1) −xoffsetdimen (.xOffset)Specifiesthesizeofthehorizontaloffsetoftheoutputonthepage.See−offsets. −yoffsetdimen (.yOffset)Specifiesthesizeoftheverticaloffsetoftheoutputonthepage.See-offsets. KEYSTROKES xdvirecognizesthefollowingkeystrokeswhentypedinitswindow.Eachmayoptionallybeprecededbya(positiveornegative)number,whoseinterpretationwilldependontheparticular keystroke.Also,the‘‘Help’’,‘‘Home’’,‘‘Prior’’,‘‘Next’’,andarrowcursorkeysaresynonymsfor ‘?’,‘ˆ ’,‘b’,‘f’,‘l’,‘r’,‘u’,and‘d’keys,respectively. qQuitstheprogram.Control-Candcontrol-Dwilldothis,too. QQuitstheprogramwithexitstatus2. nMovestothenextpage(ortothenthnextpageifanumberisgiven).Synonymsare‘f’, Space,Return,andLineFeed. pMovestothepreviouspage(orbacknpages).Synonymsare‘b’,control-H,andDelete. gMovestothepagewiththegivennumber.Initially,thefirstpageisassumedtobepage number1,butthiscanbechangedwiththe‘P’keystroke,below.Ifnopagenumberis given,thenitgoestothelastpage. P‘‘Thisispagenumbern.’’Thiscanbeusedtomakethe‘g’keystrokerefertoactualpage numbersinsteadofabsolutepagenumbers. Control-L Redisplaysthecurrentpage. ˆ Movetothe‘‘home’’positionofthepage.Thisisnormallytheupperleft-handcornerof thepage,dependingonthemarginsasdescribedinthe−marginsoption,above. uMovesuptwothirdsofawindow-full. dMovesdowntwothirdsofawindow-full. lMoveslefttwothirdsofawindow-full. rMovesrighttwothirdsofawindow-full. cMovesthepagesothatthepointcurrentlybeneaththecursorismovedtothemiddleof thewindow.Italso(gasp!)warpsthecursortothesameplace. MSetsthemarginssothatthepointcurrentlyunderthecursoristheupperleft-handcor-nerofthetextinthepage.Notethatthiscommanditselfdoesnotmovetheimageat all.Fordetailsonhowthemarginsareused,seethe−marginsoption. sChangestheshrinkfactortothegivennumber.Ifnonumberisgiven,thesmallestfactor thatmakestheentirepagefitinthewindowwillbeused.(Marginsareignoredinthis computation.) SSetsthedensityfactortobeusedwhenshrinkingbitmaps.Thisshouldbeanumberbetween0and100;highernumbersproducelightercharacters.Ifgreyscalingmodeisineffect,thischangesthevalueofgammainstead.Thenewvalueofgammaisthegiven numberdividedby100;negativevaluesareallowed. tTogglestothenextunitinasortedlistofTEXdimensionunitsforthepopupmagnifier ruler. RForcesthedvifiletobereread.Thisallowsyoutopreviewmanyversionsofthesamefile whilerunningxdvionlyonce. kNormallywhenxdviswitchespages,itmovestothehomepositionaswell.The‘k’ keystroketogglesa‘keep-position’flagwhich,whenset,willkeepthesamepositionwhen XVersion11 15February1999 8 XDVI(1) XDVI(1) movingbetweenpages.Also‘0k’and‘1k’clearandsetthisflag,respectively.Seealso the−keepoption. xTogglesexpertmode(inwhichthebuttonsdonotappear).Also‘0x’and‘1x’clearand resetthismode,respectively.Seealsothe−expertoption. GThiskeytogglestheuseofgreyscaleanti-aliasingfordisplayingshrunkenbitmaps.Inad-dition,thekeysequences‘0G’and‘1G’clearandsetthisflag,respectively.Seealsothe −nogreyoption. Ifgivenanumericargumentthatisnot0or1,greyscaleanti-aliasingisturnedon,andthegam-maresourceissettothevaluedividedby100.E.g.,‘150G’turnsongreyscaleandsetsgammato 1.5. DThiskeytogglestheuseofgridoverthedocument.Ifnonumberisgiven,thegridmode toggles.Byprependingnumber,3gridlevelscanbeset.Thegridineachlevelisdrawn inthecolourspecified.Seealsothe−grid1,−grid2,and−grid3options. vThiskeytogglestherenderingofPostScript<tm>specials.Ifrenderingisturnedoff, thenboundingboxesaredisplayedwhenavailable.Inadditionthekeysequences‘0v’ and‘1v’clearandsetthisflag,respectively.Seealsothe−nopostscriptoption. VThiskeytogglesthaanti-aliasingofPostScript<tm>specialswhenGhostscriptisused asrenderer.Inadditionthekeysequences‘0V’and‘1V’clearandsetthisflag,Seealso the+.B−gsalphaoption. FReadanewdvifile.Afile-selectionwidgetispoppedupforyoutochoosethedvifile from. MOUSEACTIONS Iftheshrinkfactorissettoanynumberotherthanone,thenclickingmousebutton3willpopup a‘‘magnifyingglass’’whichshowstheunshrunkimageinthevicinityofthemouseclick.This subwindowdisappearswhenthemousebuttonisreleased.Differentmousebuttonsproducedifferentsizedwindows,asindicatedbythe−mgsoption.Movingthecursorwhileholdingthebuttondownwillmovethemagnifyingglass. Ifthecursorisonahypertextlink(underlinedbydefault),thenthatlinkoverridesthemagnifyingglassforButtons1and2.IfButton1isclickedoveralink,thenxdvijumpstothetargetin thecurrentwindow.IfButton2isclickedoveralink,thenxdviopensanewwindowonthetarget. Moreprecisely,forinternallinks,Button1jumpsinthesamewindowtothelink,whileButton2 startsupanewxdvionthelink.Forexternallinkstodvifiles,Button1changesthecurrentxdvitobereadingthatfile,whileButton2startsanewxdvionthatfile.Forotherfiletypes, mime.typesandmailcapareparsedtodeterminetheviewer;finally,ifnosuitablemailcapentrywasfound,iftheWWWBROWSERenvironmentvariableisset,or−browserwasspecified onthecommandline,itisstarteduponthefile. Thescrollbars(ifpresent)behaveinthestandardway:pushingButton2inascrollbarmovesthe toporleftedgeofthescrollbartothatpointandoptionallydragsit;pushingButton1movesthe imageuporrightbyanamountequaltothedistancefromthebuttonpresstotheupperlefthandcornerofthewindow;pushingButton3movestheimagedownorleftbythesameamount. SIGNALS WhenxdvireceivesaSIGUSR1signal,itrereadsthedvifile. GREYSCALINGANDCOLORMAPS Thegreyscaleanti-aliasingfeatureinxdviwillnotworkatitsbestifthedisplaydoesnothave enoughcolorsavailable.Thiscanhappenifotherapplicationsareusingmostofthecolormap (eveniftheyareiconified).Ifthisoccurs,thenxdviwillprintanerrormessageandturnonthe -copyoption.Thiswillresultinoverstrikecharactersappearingwrong;itmayalsoresultinpoor displayqualityifthenumberofavailablecolorsisverysmall. XVersion11 15February1999 9 XDVI(1) XDVI(1) Typicallythisproblemoccursondisplaysthatallocateeightbitsofvideomemoryperpixel.To seehowmanybitsperpixelyourdisplayuses,typexwininfoinanxtermwindow,andthen clickthemouseontherootwindowwhenasked.The‘‘Depth:’’entrywilltellyouhowmanybits areallocatedperpixel. Displaysusingatleast15bitsperpixelaretypicallyTrueColorvisuals,whichdonothavethis problem,sincetheircolormapispermanentlyallocatedandavailabletoallapplications.(Thevisualclassisalsodisplayedbyxwininfo.)FormoreinformationonvisualclassesseethedocumentationfortheXWindowSystem. Toalleviatethisproblem,therefore,onemay(a)runwithmorebitsperpixel(thismayrequire addingmorevideomemoryorreplacingthevideocard),(b)shutdownotherapplicationsthat maybeusingmuchofthecolormapandthenrestartxdvi,or(c)runxdviwiththe−installoption. OneapplicationwhichisoftenthecauseofthisproblemisNetscape.Inthiscasetherearetwo morealternativestoremedyingthesituation.Onecanrun‘‘netscape-install’’tocause Netscapetoinstallaprivatecolormap.Thiscancausecolorstochangeinbizarrewayswhen themouseismovedtoadifferentwindow.Or,onecanrun‘‘netscape-ncols220’’tolimit Netscapetoasmallernumberofcolors.Asmallernumberwillensurethatotherapplications havemorecolorsavailable,butwilldegradethecolorqualityintheNetscapewindow. ENVIRONMENT Pleaseseethekpathseadocumentation. HANDLINGOFPOSTSCRIPTFIGURES xdvicandisplayPostScriptfilesincludedinthedvifile.Suchfilesarefirstsearchedforinthedirectorywherethedvifileis,andthenusingnormalKpathsearules.Thereisanexceptionto this,however:ifthefilenamebeginswithabacktick(‘),thentheremainingcharactersinthefile namegiveashellcommand(oftenzcat)whichisexecuted;itsstandardoutputisthensenttobe interpretedasPostScript.Notethatthereissomepotentialforsecurityproblemshere;seethe −allowshellcommand-lineoption.Itisbettertousecompressedfilesdirectly(seebelow). Ifafilenameisgiven(asopposedtoashellcommand),ifthatfilenameendsin‘‘.Z’’,‘‘.gz’’,or ‘‘.bz2’’andifthefirsttwobytesofthefileindicatethatitwascompressedwithcompress(1), gzip(1),orbzip2(1)respectively,thenthefileisfirstuncompressedwithuncompress−c,gunzip−c,orbunzip2−c,respectively.Thisispreferredoverusingabackticktocallthecommand directly,sinceyoudonothavetospecify−allowshellandsinceitallowsforpathsearching. SRCSPECIALMODE ADDSOMETHINGHERE,including: -generaldescription(conceptofseparatemode;maybesomethingmoreaboutsecurityissues) -descriptionofkeys/buttonsavailableinsrcspecialmode(Vtogglesvisibilityoftickmarks,X highlightsnextspecialwithoutjumpingtoit,Tchangestheshapesofthemarks,Mousebutton2 jumpstonextspecialunlessuserhasspecifiedanotherbuttonwith-srcJumpButton) -meaningofthetickmarks(referencepoints:thereferencepointistheupper-leftcornerforthe rectangleshape,thetopofthetriangleforthetriangularshape,theinneranglepointfortheupangleandtheouteranglepointforthedownangleshape). -searchingof‘next’specialonpage(xdviwillsearch‘linewise’,i.e.itwilljumptothenextspecial onthecurrentline(totherightofthemouseclick)ifthereisone,andtothefirstspecialonthe nextlineelse). XVersion11 15February1999 10 XDVI(1) XDVI(1) ENVIRONMENT xdvikusesthesameenvironmentvariablesandalgorithmsforfindingfontfilesasTEXand friends.SeethedocumentationfortheKpathsealibraryfordetails(repeatingithereistoo cumbersome).Inaddition,xdvikacceptsthefollowingvariables: DISPLAY Specifieswhichgraphicsdisplayterminaltouse. KPATHSEADEBUG TraceKpathsealookups;setitto-1forcompletetracing. MIMELIBDIR Directorycontainingthemime.typesfile,if˜ /.mime-typesdoesnotexist. MAILCAPDIR Directorycontainingthe.mailcapfile,if˜ /.mailcapdoesnotexist. WWWBROWSER ThebrowserusedtoopenURL’s,ifneitherthe−browseroptionnorthe.wwwBrowserresourceareset.Formoreinformationonhyper-TEXsupport,seethe‘Hypertext’ nodeinthedvipskmanual. TMPDIR ThedirectorytouseforstoringtemporaryfilescreatedwhenuncompressingPostScript files. LIMITATIONS xdviacceptsmanybutnotalltypesofPostScriptspecialsacceptedbydvips.Forexample,it acceptsmostspecialsgeneratedbyepsfandpsfig,Itdoesnot,however,supportbop−hookor eop−hook,nordoesitallowPostScriptcommandstoaffecttherenderingofthingsthatarenot PostScript(forexample,the‘‘NEAT’’androtated‘‘A’’examplesinthedvipsmanual).Theserestrictionsareduetothedesignofxdvi;inalllikelihoodtheywillalwaysremain. LaTEX2ecolorandrotationspecialsarenotcurrentlysupported. FILES Pleaseseethekpathseadocumentation. COPYRIGHTS xdviitselfisCopyrightedbyPaulVojtaanddistributedundertheX-Consortiumlicense.xdvi usesthelibwwwlibraryoftheWorldWideWebConsortium,whichincludescomputersoftware creadedandmadeavailablebyCERN.ItalsousesthekpathsealibrarywhichisdistributedundertheGNULIBRARYGeneralPublicLicense. THISSOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND,EX-PRESSORIMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOFMER-CHANTABILITY,FITNESSFORAPARTICULARPURPOSEANDNONINFRINGEMENT. INNOEVENTSHALLPAULVOJTAORANYOTHERSBELIABLEFORANYCLAIM, DAMAGESOROTHERLIABILITY,WHETHERINANACTIONOFCONTRACT,TORT OROTHERWISE,ARISINGFROM,OUTOFORINCONNECTIONWITHTHESOFT-WAREORTHEUSEOROTHERDEALINGSINTHESOFTWARE. SEEALSO X(1),dvips(1),Kpathseadocumentation AUTHORS EricCooper,CMU,didaversionfordirectoutputtoaQVSS.ModifiedforXbyBobScheifler, MITLaboratoryforComputerScience.ModifiedforX11byMarkEichin,MITSIPB.+Additionalenhancementsbymanyothers.ThecurrentmaintaineroftheoriginalxdviisPaulVojta,U.C. Berkeley;themaintainerofthexdvikvariantisNicolaiLangfeldt,Dept.ofMath,UiO,Norway, withthehelpofmanyothers. XVersion11 15February1999 11