DV2DT(1) DV2DT(1) NAME dv2dt−convertabinaryTeXDVIfiletoDTLtextrepresentation SYNOPSIS dv2dtinput-DVI-fileoutput-DTL-file Ifthefilenamesareomitted,thenstdinandstdoutareassumed. DESCRIPTION dv2dtconvertsabinaryTEXDVIfiletoaneditabletextfileinDTL(DVITextLanguage)format.Thecompaniondt2dv(1)utilitycanconverttheDTLfilebacktoabinaryDVIfile. DVICOMMANDDESCRIPTION TEXDVIfilescontainacompactbinarydescriptionoftypesetpages,asastreamofoperation codebytes,eachimmediatelyfollowedbyzeroormoreparameterbytes.TheformatofDVIfiles isfullydescribedinDonaldE.Knuth,TEX:TheProgram,Addison-Wesley(1986),ISBN 0-201-13437-3,aswellasinthedvitype(1)literateprogramsourcecode. Forconvenience,weprovideasummaryofDVIcommandshere.Inthefollowinglist,operation codebytesaregivenasunsigneddecimalvalues,followedbytheirsymbolicnames(notpresentin theDVIfile),andashortdescription.Adesignationlikeb[+n]meansthattheoperationcode byteisfollowedbyaparameterbwhichusesnbytes,andissigned.Withouttheplussign,the parameterisunsigned.Signedintegerparametervaluesarealwaysrepresentedintwo’scomplementarithmetic,whichisthesystemfollowedbymostcomputersmanufacturedtoday,including allpersonalcomputersandworkstations. 0setchar0 Setcharacter0fromcurrentfont. ... 127setchar127 Setcharacter127fromcurrentfont. 128set1c[1] Set1-byteunsignedcharacter(uchar)number c. 129set2c[2] Set2-byteucharnumberc. 130set3c[3] Set3-byteucharnumberc. 131set4c[+4] Set4-bytesignedcharacter(schar)numberc. 132setrulea[+4]b[+4] Setrule,heighta,widthb. 133put1c[1] Put1-byteucharc. 134put2c[2] Put2-byteucharc. 135put3c[3] Put3-byteucharc. 136put4c[+4] Put4-bytescharc. 137putrulea[+4]b[+4] Putrule,heighta,widthb. 138nop Donothing. 139bopc0[+4]...c9[+4]p[+4]Beginningofpage.Theparametersc0... c9aretheTEXpagecounters,thecontentsof TEXcountregisters\count0...\count9. Theparameterpisthebyteoffsetfromthe beginningoftheDVIfileofthepreviousbop operationcodebyte.Thefirstsuchcommand inthefilehasp=−1. 140eop Endofpage. 141push Push(h,v,w,x,y,z)ontostack. Version0.6.0 08March1995 1 DV2DT(1) DV2DT(1) 142pop Pop(h,v,w,x,y,z)fromstack. 143right1b[+1] Moverightbunits. 144right2b[+2] Moverightbunits. 145right3b[+3] Moverightbunits. 146right4b[+4] Moverightbunits. 147w0 Moverightwunits. 148w1b[+1] Moverightbunits,andsetw=b. 149w2b[+2] Moverightbunits,andsetw=b. 150w3b[+3] Moverightbunits,andsetw=b. 151w4b[+4] Moverightbunits,andsetw=b. 152x0 Moverightxunits. 153x1b[+1] Moverightbunits,andsetx=b. 154x2b[+2] Moverightbunits,andsetx=b. 155x3b[+3] Moverightbunits,andsetx=b. 156x4b[+4] Moverightbunits,andsetx=b. 157down1a[+1] Movedownaunits. 158down2a[+2] Movedownaunits. 159down3a[+3] Movedownaunits. 160down4a[+4] Movedownaunits. 161y0 Moverightyunits. 162y1a[+1] Moverightaunits,andsety=a. 163y2a[+2] Moverightaunits,andsety=a. 164y3a[+3] Moverightaunits,andsety=a. 165y4a[+4] Moverightaunits,andsety=a. 166z0 Moverightzunits. 167z1a[+1] Moverightaunits,andsetz=a. 168z2a[+2] Moverightaunits,andsetz=a. 169z3a[+3] Moverightaunits,andsetz=a. 170z4a[+4] Moverightaunits,andsetz=a. 171fntnum0 Setcurrentfontnumber(f)=0. ... 234fntnum63 Setf=63. 235fnt1k[1] Setf=k. 236fnt2k[2] Setf=k. 237fnt3k[3] Setf=k. 238fnt4k[+4] Setf=k. 239xxx1k[1]x[k] Specialstringxwithkbytes. 240xxx2k[2]x[k] Specialstringxwithkbytes. Version0.6.0 08March1995 2 DV2DT(1) DV2DT(1) 241xxx3k[3]x[k] Specialstringxwithkbytes. 242xxx4k[4]x[k] Specialstringxwith(unsigned)kbytes. 243fntdef1k[1]c[4]s[4]d[4]a[1]l[1]n[a+l]Definefontk.Theparametersare: cChecksumforTFMfile. sScalefactor,inDVIunits. dDesignsize,inDVIunits. aLengthofthe‘‘area’’ordirectory. lLengthofthefontname. nAreaandfontnamestring(s). 244fntdef2k[2]c[4]s[4]d[4]a[1]l[1]n[a+l]Definefontk. 245fntdef3k[3]c[4]s[4]d[4]a[1]l[1]n[a+l]Definefontk. 246fntdef4k[+4]c[4]s[4]d[4]a[1]l[1]n[a+l]Definefontk. 247prei[1]num[4]den[4]mag[4]k[1]x[k]Beginpreamble.Theparametersare: iDVIformat.StandardTEXhasID= 2,andTEX-XEThasID=3. numNumeratorof100nm/DVIunit. denDenominatorof100nm/DVIunit. mag1000*magnification. kCommentlength. xCommentstring. 248postp[4]num[4]den[4]mag[4]l[4]u[4]s[2]t[2] Beginpostamble.Theparametersare: pPointertofinalbop. num,den,mag Duplicatesofvaluesinpreamble. lHeight-plus-depthoftallestpage,in DVIunits. uWidthofwidestpage,inDVIunits. sMaximumstackdepthneededtoprocessthisDVIfile. tTotalnumberofpages(bopcommands)present. 249postpostq[4]i[1]223...223Endpostamble.Theparametersare: qByteoffsetfromthebeginningofthe DVIfiletothepostcommandthat startedthepostamble. iDVIformatID,asinthepreamble. 223Atleastfour223bytes. 250 Undefined. ... 255 Undefined. Version0.6.0 08March1995 3 DV2DT(1) DV2DT(1) DTLCOMMANDDESCRIPTION ADTLfilecontainsonelinepercommand,withalimitof1024charactersperline.Eachcommandcontainsasymbolicoperationname,followedbyzeroormoreparametervalues.The parametervaluedescriptionsarenotrepeatedhere;theycanbefoundintheprevioussection. variety<variety-name> ThiscommandspecifiesthenameoftheDTLfiletype;ithasnoDVIfile equivalent. (text)Seriesofsetcharcommands,forprintableASCIItext. \(LiteralASCIIleftparenthesisin(text). \)LiteralASCIIrightparenthesisin(text). \\LiteralASCIIbackslashin(text). \"LiteralASCIIdoublequotein(text). \XYSetcharforcharacterwithhexadecimalcodeXY,notinparentheses,but byitselfforreadability. s1,s2,s2,s3Set,with(1,2,3,4)-bytecharcodes. srsetrule. p1,p2,p2,p3Put,with(1,2,3,4)-bytecharcodes. prputrule. nopnop(donothing). bopbop(beginningofpage). eopeop(endofpage). [Push. ]Pop. r1,r2,r3,r4Right,with(1,2,3,4)-byteargument. w0,w1,w2,w3,w4AsinDVI. x0,x1,x2,x3,x4AsinDVI. d1,d2,d3,d4Down,with(1,2,3,4)-byteargument. y0,y1,y2,y3,y4AsinDVI. z0,z1,z2,z3,z4AsinDVI. fnfntnum(setcurrentfonttofontnumberin0to63). f1,f2,f3,f4fnt(setcurrentfontto(1,2,3,4)-bytefontnumber). specialxxx(specialcommandswith(1,2,3,4)-bytestringlength). fdfntdef(assignanumbertoanamedfont). prePreamble. postpost(beginpostamble). postpostpostpost(endpostamble). opcodeUndefinedDVIcommand(250to255). SAMPLEDTLFILE Thefollowing2-lineTEXfile Hello. \bye whenprocessedwiththecommands Version0.6.0 08March1995 4 DV2DT(1) DV2DT(1) texhello.tex dv2dthello.dvihello.dtl producesthisDTLfile: varietysequences-6 pre225400000473628672100027’TeXoutput1995.03.02:2334’ bop1000000000-1 [ d3-917504 ] d442152922 [ d4-41497562 [ r31310720 fd101137426017165536065536005’’’cmr10’ fn0 (Hello.) ] ] d31572864 [ r415229091 (1) ] eop post42254000004736286721000437257863078586321 fd101137426017165536065536005’cmr10’ postpost1522223223223223 Thecommand dt2dvhello.dtlhello.dvi willreconstructtheoriginalDVIfile. SEEALSO dt2dv(1),dvitype(1),tex(1). FILES *.dvibinaryTEXDVIfile. *.dtltextrepresentationofaTEXDVIfileinDVITextLanguageformat. AUTHOR dv2dtanddt2dv(1)werewrittenby GeoffreyTobin DepartmentofElectronicEngineering LaTrobeUniversity Bundoora,Victoria3083 Australia Tel:+6134793736 FAX:+6134793025 Email:<G.Tobin@ee.latrobe.edu.au> Thesemanualpageswereprimarilywrittenby NelsonH.F.Beebe,Ph.D. CenterforScientificComputing DepartmentofMathematics UniversityofUtah SaltLakeCity,UT84112 Tel:+18015815254 Version0.6.0 08March1995 5 DV2DT(1) DV2DT(1) FAX:+18015814148 Email:<beebe@math.utah.edu> Version0.6.0 08March1995 6