XDVI(1) XDVI(1) NAME xdvi−DVIPreviewerfortheXWindowSystem SYNOPSIS xdvi[+[page]][−sshrink][−Sdensity][−nogrey][−gammag][−ppixels][−marginsdimen] [−sidemargindimen][−topmargindimen][−offsetsdimen][−xoffsetdimen][−yoffsetdimen] [−paperpapertype][−altfontfont][−l][−rv][−expert][−mgs[n]size][−hush] [−hushspecials][−hushchars][−hushchecksums][−fgcolor][−bgcolor][−hlcolor][−bd color][−crcolor][−bwwidth][−displayhost:display][−geometrygeometry][−icongeometry geometry][−iconic][−keep][−copy][−thorough][−version]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. OPTIONS Inadditiontospecifyingthedvifile(withorwithoutthe.dviextension),xdvisupportsthefollowingcommandlineoptions.Iftheoptionbeginswitha‘+’insteadofa‘−’,theoptionisrestoredtoitsdefaultvalue.Bydefault,theseoptionscanbesetviatheresourcenamesgivenin parenthesesinthedescriptionofeachoption. +pageSpecifiesthefirstpagetoshow.If+isgivenwithoutanumber,thelastpageisassumed; thefirstpageisthedefault. −altfontfont (.altFont)Declaresadefaultfonttousewhenthefontinthedvifilecannotbefound. Thisisuseful,forexample,withPostScript<tm>fonts. −backgroundcolor (.background)Determinesthecolorofthebackground.Sameas-bg. −bdcolor (.borderColor)Determinesthecolorofthewindowborder. −bgcolor (.background)Determinesthecolorofthebackground. −bordercolorcolor Sameas-bd. −borderwidthwidth (.borderWidth)Specifiesthewidthoftheborderofthewindow.Sameas-bw. −bwwidth (.borderWidth)Specifiesthewidthoftheborderofthewindow. −copy(.copy)Alwaysusethecopyoperationwhenwritingcharacterstothedisplay.Thisoptionmaybenecessaryforcorrectoperationonacolordisplay,butoverstrikecharacters willbeincorrect.Ifgreyscaleanti-aliasingisinuse,the−copyoperationwilldisablethe useofcolorplanesandmakeoverstrikescomeoutincorrectly.Seealso−thorough. XVersion11 2May1994 1 XDVI(1) XDVI(1) −crcolor (.cursorColor)Determinesthecolorofthecursor.Thedefaultisthecolorofthepage border. −densitydensity (.densityPercent)Determinesthedensityusedwhenshrinkingbitmapsforfonts.A highervalueproducesalighterfont.Thedefaultvalueis40.Sameas−S. −displayhost:display Specifiesthehostandscreentobeusedfordisplayingthedvifile.BydefaultthisisobtainedfromtheenvironmentvariableDISPLAY. −expert (.expert)Preventthebuttonsfromappearing.Seealsothe‘x’keystroke. −fgcolor (.foreground)Determinesthecolorofthetext(foreground). −foregroundcolor Sameas-fg. −gammagamma (.gamma)Controlstheinterpolationofcolorsinthegreyscaleanti-aliasingcolorpalette. Defaultvalueis1.0.For0<gamma<1,thefontswillbelighter(morelikethebackground),andforgamma>1,thefontswillbedarker(moreliketheforeground).Negativevaluesbehavethesameway,butuseaslightlydifferentalgorithm. −geometrygeometry (*geometry)Specifiestheinitialgeometryofthewindow. −hlcolor (.highlight)Determinesthecolorofthepageborder.Thedefaultistheforegroundcolor. −hush (.Hush)Causesxdvitosuppressallsuppressablewarnings. −hushchars (.hushLostChars)Causesxdvitosuppresswarningsaboutreferencestocharacters whicharenotdefinedinthefont. −hushchecksums (.hushChecksums)Causesxdvitosuppresswarningsaboutchecksummismatchesbetweenthedvifileandthefontfile. −hushspecials (.hushSpecials)Causesxdvitosuppresswarningsabout\specialstringsthatitcannot process. −icongeometrygeometry (.iconGeometry)Specifiestheinitialpositionfortheicon. −iconic (.iconic)Causesthexdviwindowtostartintheiconicstate.Thedefaultistostart withthewindowopen. −keep(.keepPosition)Setsaflagtoindicatethatxdvishouldnotmovetothehomeposition whenmovingtoanewpage.Seealsothe‘k’keystroke. −l(.listFonts)Causesthenamesofthefontsusedtobelisted. −marginsdimen (.Margin)Specifiesthesizeofboththetopmarginandsidemargin.Thisshouldbea decimalnumberoptionallyfollowedby‘‘cm’’,e.g.,1.5or3cm,givingameasurementin inchesorcentimeters.Itdeterminesthe‘‘home’’positionofthepagewithinthewindow XVersion11 2May1994 2 XDVI(1) XDVI(1) asfollows.Iftheentirepagefitsinthewindow,thenthemarginsettingsareignored.If, evenafterremovingthemarginsfromtheleft,right,top,andbottom,thepagestillcannotfitinthewindow,thenthepageisputinthewindowsuchthatthetopandleftmarginsarehidden,andpresumablytheupperleft-handcornerofthetextonthepagewill beintheupperleft-handcornerofthewindow.Otherwise,thetextiscenteredinthe window.Seealso−sidemargin,−topmargin,andthekeystroke‘M.’ −mgssize Sameas−mgs1. −mgs[n]size (.magnifierSize[n])Specifiesthesizeofthewindowtobeusedforthe‘‘magnifyingglass’’ forButtonn.Thesizemaybegivenasaninteger(indicatingthatthemagnifyingglassis tobesquare),oritmaybegivenintheformwidthxheight.SeetheMOUSEACTIONS section.Defaultsare200x150,400x250,700x500,1000x800,and1200x1200. −nogrey (.grey)Turnsofftheuseofgreyscaleanti-aliasingwhenprintingshrunkenbitmaps.(In thiscase,thelogicofthecorrespondingresourceisthereverse:−nogreycorrespondsto grey:off;+nogreytogrey:on.)Seealsothe‘G’keystroke. −offsetsdimen (.Offset)Specifiesthesizeofboththehorizontalandverticaloffsetsoftheoutputonthe page.Thisshouldbeadecimalnumberoptionallyfollowedby‘‘cm’’,e.g.,1.5or3cm, givingameasurementininchesorcentimeters.BydecreeoftheStanfordTeXProject, thedefaultTeXpageoriginisalways1inchoveranddownfromthetop-leftpagecorner, evenwhennon-Americanpapersizesareused.Therefore,thedefaultoffsetsare1.0inch. Seealso−xoffsetand−yoffset. −ppixels (.pixelsPerInch)Definesthesizeofthefontstouse,inpixelsperinch.Thedefaultvalueis600. −paperpapertype (.paper)Specifiesthesizeoftheprintedpage.Thismaybeoftheformwidthxheight(or widthxheightcm),wherewidthisthewidthininches(orcm)andheightistheheightin inches(orcm),respectively.Therearealsosynonymswhichmaybeused:us(8.5x11), usr(11x8.5),legal(8.5x14),foolscap(13.5x17),aswellastheISOsizesa1-a7,b1-b7, c1-c7,a1r-a7r(a1-a7rotated),etc.Thedefaultsizeis8.5x11inches. −rv(.reverseVideo)Causesthepagetobedisplayedwithwhitecharactersonablackbackground,insteadofviceversa. −sshrink (.shrinkFactor)Definestheinitialshrinkfactor.Thedefaultvalueis3. −Sdensity (.densityPercent)Determinesthedensityusedwhenshrinkingbitmapsforfonts.A highervalueproducesalighterfont.Thedefaultvalueis40.Sameas−density. −sidemargindimen (.sideMargin)Specifiesthesidemargin(see−margins). −thorough (.thorough)xdviwillusuallytrytoensurethatoverstrikecharacters(e.g.,\notin)are printedcorrectly.Onmonochromedisplays,thisisalwayspossiblewithonelogicaloperation,eitherandoror.Oncolordisplays,however,thismaytaketwooperations,oneto settheappropriatebitsandonetoclearotherbits.Ifthisisthecase,thenbydefault xdviwillinsteadusethecopyoperation,whichdoesnothandleoverstrikingcorrectly. The−thoroughoptionchoosestheslowerbutmorecorrectchoice.Seealso−copy. XVersion11 2May1994 3 XDVI(1) XDVI(1) −topmargindimen (.topMargin)Specifiesthetopandbottommargins(see−margins). −version Printinformationontheversionofxdvi. −xoffsetdimen (.xOffset)Specifiesthesizeofthehorizontaloffsetoftheoutputonthepage.See-off-sets. −yoffsetdimen (.yOffset)Specifiesthesizeoftheverticaloffsetoftheoutputonthepage.See-offsets. KEYSTROKES xdvirecognizesthefollowingkeystrokeswhentypedinitswindow.Eachmayoptionallybeprecededbya(positiveornegative)number,whoseinterpretationwilldependontheparticular keystroke.Also,the‘‘Home’’,‘‘Prior’’,‘‘Next’’,andarrowcursorkeysaresynonymsfor‘ˆ ’,‘b’,‘f’, ‘l’,‘r’,‘u’,and‘d’keys,respectively. qQuitstheprogram.Control-Candcontrol-Dwilldothis,too. 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. RForcesthedvifiletobereread.Thisallowsyoutopreviewmanyversionsofthesamefile whilerunningxdvionlyonce. kNormallywhenxdviswitchespages,itmovestothehomepositionaswell.The‘k’ keystroketogglesa‘keep-position’flagwhich,whenset,willkeepthesamepositionwhen movingbetweenpages.Also‘0k’and‘1k’clearandsetthisflag,respectively.Seealso XVersion11 2May1994 4 XDVI(1) XDVI(1) 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. MOUSEACTIONS Iftheshrinkfactorissettoanynumberotherthanone,thenclickinganymousebuttonwillpop upa‘‘magnifyingglass’’whichshowstheunshrunkimageinthevicinityofthemouseclick.This subwindowdisappearswhenthemousebuttonisreleased.Differentmousebuttonsproducedifferentsizedwindows,asindicatedbythe−mgsoption.Movingthecursorwhileholdingthebuttondownwillmovethemagnifyingglass. Also,thescrollbars(ifpresent)behaveinthestandardway:pushingButton2inascrollbar movesthetoporleftedgeofthescrollbartothatpointandoptionallydragsit;pushingButton1 movestheimageuporrightbyanamountequaltothedistancefromthebuttonpresstotheupperleft-handcornerofthewindow;pushingButton3movestheimagedownorleftbythesame amount. ENVIRONMENT UsestheenvironmentvariableDISPLAYtospecifywhichbitmapdisplayterminaltouse. TheenvironmentvariableXDVIFONTSdeterminesthepath(s)searchedforfontsinthefollowing manner.Thestringconsistsofoneormorestringsseparatedbycolons.Ineachsuchstring,the substring%fischangedtothefontname;%dischangedtothemagnification;and%pis changedtothefontfileformat(‘‘pk’’or‘‘gf’’).Ifno%fappearsinthestring,thenthestring ‘‘/%f.%d%p’’isaddedontheend.Forexample,ifthestringis‘‘/usr/local/tex/fonts’’and thefontiscmr10at300dotsperinch,thenitsearchesfor /usr/local/tex/fonts/cmr10.300pkand/usr/local/tex/fonts/cmr10.300gf,inthatorder. AnextracolonanywhereinXDVIFONTScausesthesystemdefaultpathstobetriedatthat point.Ifthefontisnotfoundinthedesiredsize,thenxdviwilltrytofindthenearestsize.If thefontcannotbefoundatall,thenxdviwilltrytovarythepointsizeofthefont(withinacertainrange),andifthisfails,thenitwillusethefontspecifiedasthealternatefont(cf.−altfont). Inaddition,a%Fspecifierisavailable;itisasynonymfor%f,butitdoesnotinhibitputtingthe string‘‘/%f.%d%p’’attheend.Finally,a%bspecifierisavailable;itisconvertedtothecurrent resolutionbeingused(i.e.,thevalueofthe−pparameterorthe.pixelsperinchresource. ForcompatibilitywithTeX,youmayalsouseTEXFONTSinplaceofXDVIFONTS,althoughin thatcasethevariableshouldnotincludeany‘‘%’’specifiers.ThereasonforrecognizingTEX-FONTSisthatcertainversionsofTeXalsosupporttheconventionregardinganextracolonin thefontpath;therefore,userswhocreatetheirownfontscanputboththeir.tfmandrasterfiles inthesamedirectoryanddo‘‘setenvTEXFONTS:MFdir’’or‘‘setenvTEXFONTS MFdir:’’inordertogetbothTeXandxdvitosearchtheirdirectoryinadditiontothesystem standarddirectories.TheXDVIFONTSvariableoverridestheTEXFONTSvariable,sothaton thosesiteswhereTEXFONTSmustbesetexplicitly,andthereforethisfeatureisnotuseful,the XDVIFONTSvariablemaybesettoanemptystring(i.e.,‘‘setenvXDVIFONTS’’)tocause xdvitoignoreTEXFONTS. xdvialsorecognizesthePKFONTSandTEXPKSvariables,whicharecheckedafterXDVI-FONTSbutbeforeTEXFONTS. TheXDVISIZESvariablemaybesettoindicatewhichsizesoffontsareavailable.Itshouldconsistofalistofnumbersseparatedbycolons.Ifthelistbeginswithacolon,thesystemdefault sizesareused,aswell.Sizesareexpressedindotsperinchandmustbeintegers.Thecurrentdefaultsetofsizesis300:328.6:360:432:518.4:600:622:657.2:720:746.4:864:1036.8: 1244:1492.8.xdviwillalsotrytheactualsizeofthefontbeforetryinganyofthegivensizes. XVersion11 2May1994 5 XDVI(1) XDVI(1) Virtualfontsarealsosupported,althoughxdvidoesnothaveanybuilt-infontstowhichthey canrefer.Thesearchpathfor.vffilescanbespecifiedwiththeenvironmentvariableXDVIVFS inasimilarmannertothatfortheXDVIFONTSvariable.xdviwillalsochecktheVFFONTS variableiftheXDVIFONTSvariableisnotset.Virtualfontsaresearchedforimmediatelyafter lookingforthefontasanormalfontintheexactsizespecified. FILES . /mit/sipb/lib/tex/fonts/pk /usr/athena/lib/tex/fonts/pkFontpixelfiles. . /mit/sipb/lib/tex/fonts/vf /usr/athena/lib/tex/fonts/vfVirtualfontfiles. SEEALSO X(1). AUTHORS EricCooper,CMU,didaversionfordirectoutputtoaQVSS.ModifiedforXbyBobScheifler, MITLaboratoryforComputerScience.ModifiedforX11byMarkEichin,MITSIPB.Additionalenhancementsbymanyothers. XVersion11 2May1994 6