{
    "content": [
        {
            "type": "text",
            "text": "# dv2dt(1) (man)\n\n**Summary:** dv2dt - convert a binary TeX DVI file to DTL text representation\n\n**Synopsis:** dv2dt input-DVI-file output-DTL-file\nIf the filenames are omitted, then stdin and stdout are assumed.\n\n## See Also\n\n- dt2dv(1)\n- dvitype(1)\n- tex(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (3 lines)\n- **DVI COMMAND DESCRIPTION** (212 lines)\n- **DTL COMMAND DESCRIPTION** (68 lines)\n- **SAMPLE DTL FILE** (36 lines)\n- **SEE ALSO** (2 lines)\n- **FILES** (4 lines)\n- **AUTHOR** (23 lines)\n\n## Full Content\n\n### NAME\n\ndv2dt - convert a binary TeX DVI file to DTL text representation\n\n### SYNOPSIS\n\ndv2dt input-DVI-file output-DTL-file\n\nIf the filenames are omitted, then stdin and stdout are assumed.\n\n### DESCRIPTION\n\ndv2dt converts a binary TeX DVI file to an editable text file in DTL (DVI Text Language) for‐\nmat.  The companion dt2dv(1) utility can convert the DTL file back to a binary DVI file.\n\n### DVI COMMAND DESCRIPTION\n\nTeX DVI files contain a compact binary description of typeset pages, as a stream of operation\ncode  bytes,  each  immediately  followed by zero or more parameter bytes.  The format of DVI\nfiles is fully described in Donald E. Knuth, TeX: The Program,  Addison-Wesley  (1986),  ISBN\n0-201-13437-3, as well as in the dvitype(1) literate program source code.\n\nFor convenience, we provide a summary of DVI commands here.  In the following list, operation\ncode bytes are given as unsigned decimal  values,  followed  by  their  symbolic  names  (not\npresent  in  the DVI file), and a short description.  A designation like b[+n] means that the\noperation code byte is followed by a parameter b which uses n bytes, and is signed.   Without\nthe  plus sign, the parameter is unsigned.  Signed integer parameter values are always repre‐\nsented in two's complement arithmetic, which is the system followed by most  computers  manu‐\nfactured today, including all personal computers and workstations.\n\n0 setchar0     Set character 0 from current font.\n\n...\n\n127 setchar127 Set character 127 from current font.\n\n128 set1  c[1]   Set 1-byte unsigned character (uchar) number c.\n\n129 set2  c[2]   Set 2-byte uchar number c.\n\n130 set3  c[3]   Set 3-byte uchar number c.\n\n131 set4  c[+4]  Set 4-byte signed character (schar) number c.\n\n132 setrule  a[+4]  b[+4]\nSet rule, height a, width b.\n\n133 put1  c[1]   Put 1-byte uchar c.\n\n134 put2  c[2]   Put 2-byte uchar c.\n\n135 put3  c[3]   Put 3-byte uchar c.\n\n136 put4  c[+4]  Put 4-byte schar c.\n\n137 putrule  a[+4]  b[+4]\nPut rule, height a, width b.\n\n138 nop          Do nothing.\n\n139 bop  c0[+4]  ...  c9[+4]  p[+4]\nBeginning  of  page.   The parameters c0  ...  c9 are the TeX page counters,\nthe contents of TeX count registers \\count0  ...  \\count9.  The parameter  p\nis  the  byte  offset from the beginning of the DVI file of the previous bop\noperation code byte.  The first such command in the file has p = -1.\n\n140 eop          End of page.\n\n141 push         Push (h,v,w,x,y,z) onto stack.\n\n142 pop          Pop (h,v,w,x,y,z) from stack.\n\n143 right1  b[+1]\nMove right b units.\n\n144 right2  b[+2]\nMove right b units.\n\n145 right3  b[+3]\nMove right b units.\n\n146 right4  b[+4]\nMove right b units.\n\n147 w0           Move right w units.\n\n148 w1  b[+1]    Move right b units, and set w = b.\n\n149 w2  b[+2]    Move right b units, and set w = b.\n\n150 w3  b[+3]    Move right b units, and set w = b.\n\n151 w4  b[+4]    Move right b units, and set w = b.\n\n152 x0           Move right x units.\n\n153 x1  b[+1]    Move right b units, and set x = b.\n\n154 x2  b[+2]    Move right b units, and set x = b.\n\n155 x3  b[+3]    Move right b units, and set x = b.\n\n156 x4  b[+4]    Move right b units, and set x = b.\n\n157 down1  a[+1] Move down a units.\n\n158 down2  a[+2] Move down a units.\n\n159 down3  a[+3] Move down a units.\n\n160 down4  a[+4] Move down a units.\n\n161 y0           Move right y units.\n\n162 y1  a[+1]    Move right a units, and set y = a.\n\n163 y2  a[+2]    Move right a units, and set y = a.\n\n164 y3  a[+3]    Move right a units, and set y = a.\n\n165 y4  a[+4]    Move right a units, and set y = a.\n\n166 z0           Move right z units.\n\n167 z1  a[+1]    Move right a units, and set z = a.\n\n168 z2  a[+2]    Move right a units, and set z = a.\n\n169 z3  a[+3]    Move right a units, and set z = a.\n\n170 z4  a[+4]    Move right a units, and set z = a.\n\n171 fntnum0    Set current font number (f) = 0.\n\n...\n\n234 fntnum63   Set f = 63.\n\n235 fnt1  k[1]   Set f = k.\n\n236 fnt2  k[2]   Set f = k.\n\n237 fnt3  k[3]   Set f = k.\n\n238 fnt4  k[+4]  Set f = k.\n\n239 xxx1  k[1]  x[k]\nSpecial string x with k bytes.\n\n240 xxx2  k[2]  x[k]\nSpecial string x with k bytes.\n\n241 xxx3  k[3]  x[k]\nSpecial string x with k bytes.\n\n242 xxx4  k[4]  x[k]\nSpecial string x with (unsigned) k bytes.\n\n243 fntdef1  k[1] c[4] s[4] d[4] a[1] l[1] n[a+l]\nDefine font k.  The parameters are:\n\nc   Checksum for TFM file.\n\ns   Scale factor, in DVI units.\n\nd   Design size, in DVI units.\n\na   Length of the ``area'' or directory.\n\nl   Length of the font name.\n\nn   Area and font name string(s).\n\n244 fntdef2  k[2] c[4] s[4] d[4] a[1] l[1] n[a+l]\nDefine font k.\n\n245 fntdef3  k[3] c[4] s[4] d[4] a[1] l[1] n[a+l]\nDefine font k.\n\n246 fntdef4  k[+4] c[4] s[4] d[4] a[1] l[1] n[a+l]\nDefine font k.\n\n247 pre  i[1]  num[4]  den[4]  mag[4]  k[1]  x[k]\nBegin preamble.  The parameters are:\n\ni     DVI format.  Standard TeX has ID = 2, and TeX-XeT has ID = 3.\n\nnum   Numerator of 100 nm / DVI unit.\n\nden   Denominator of 100 nm / DVI unit.\n\nmag   1000 * magnification.\n\nk     Comment length.\n\nx     Comment string.\n\n248 post  p[4] num[4] den[4] mag[4] l[4] u[4] s[2] t[2]\nBegin postamble.  The parameters are:\n\np     Pointer to final bop.\n\nnum, den, mag\nDuplicates of values in preamble.\n\nl     Height-plus-depth of tallest page, in DVI units.\n\nu     Width of widest page, in DVI units.\n\ns     Maximum stack depth needed to process this DVI file.\n\nt     Total number of pages (bop commands) present.\n\n249 postpost  q[4] i[1] 223 ... 223\nEnd postamble.  The parameters are:\n\nq     Byte offset from the beginning of the DVI file  to  the  post  command\nthat started the postamble.\n\ni     DVI format ID, as in the preamble.\n\n223   At least four 223 bytes.\n\n250              Undefined.\n\n...\n\n255              Undefined.\n\n### DTL COMMAND DESCRIPTION\n\nA  DTL  file  contains  one line per command, with a limit of 1024 characters per line.  Each\ncommand contains a symbolic operation name, followed by zero or more parameter  values.   The\nparameter  value  descriptions  are not repeated here; they can be found in the previous sec‐\ntion.\n\nvariety <variety-name>\nThis command specifies the name of the DTL file type; it has no DVI file\nequivalent.\n\n(text)               Series of setchar commands, for printable ASCII text.\n\n\\(                   Literal ASCII left parenthesis in (text).\n\n\\)                   Literal ASCII right parenthesis in (text).\n\n\\\\                   Literal ASCII backslash in (text).\n\n\\\"                   Literal ASCII double quote in (text).\n\n\\XY                  Setchar for character with hexadecimal code XY, not in parentheses, but\nby itself for readability.\n\ns1, s2, s2, s3       Set, with (1,2,3,4)-byte charcodes.\n\nsr                   setrule.\n\np1, p2, p2, p3       Put, with (1,2,3,4)-byte charcodes.\n\npr                   putrule.\n\nnop                  nop (do nothing).\n\nbop                  bop (beginning of page).\n\neop                  eop (end of page).\n\n[                    Push.\n\n]                    Pop.\n\nr1, r2, r3, r4       Right, with (1,2,3,4)-byte argument.\n\nw0, w1, w2, w3, w4   As in DVI.\n\nx0, x1, x2, x3, x4   As in DVI.\n\nd1, d2, d3, d4       Down, with (1,2,3,4)-byte argument.\n\ny0, y1, y2, y3, y4   As in DVI.\n\nz0, z1, z2, z3, z4   As in DVI.\n\nfn                   fntnum (set current font to font number in 0 to 63).\n\nf1, f2, f3, f4       fnt (set current font to (1,2,3,4)-byte font number).\n\nspecial              xxx (special commands with (1,2,3,4)-byte string length).\n\nfd                   fntdef (assign a number to a named font).\n\npre                  Preamble.\n\npost                 post (begin postamble).\n\npostpost            postpost (end postamble).\n\nopcode               Undefined DVI command (250 to 255).\n\n### SAMPLE DTL FILE\n\nThe following 2-line TeX file\nHello.\n\\bye\nwhen processed with the commands\ntex hello.tex\ndv2dt hello.dvi hello.dtl\nproduces this DTL file:\nvariety sequences-6\npre 2 25400000 473628672 1000 27 ' TeX output 1995.03.02:2334'\nbop 1 0 0 0 0 0 0 0 0 0 -1\n[\nd3 -917504\n]\nd4 42152922\n[\nd4 -41497562\n[\nr3 1310720\nfd1 0 11374260171 655360 655360 0 5 '' 'cmr10'\nfn0\n(Hello.)\n]\n]\nd3 1572864\n[\nr4 15229091\n(1)\n]\neop\npost 42 25400000 473628672 1000 43725786 30785863 2 1\nfd1 0 11374260171 655360 655360 0 5 'cmr10'\npostpost 152 2 223 223 223 223\nThe command\ndt2dv hello.dtl hello.dvi\nwill reconstruct the original DVI file.\n\n### SEE ALSO\n\ndt2dv(1), dvitype(1), tex(1).\n\n### FILES\n\n*.dvi   binary TeX DVI file.\n\n*.dtl   text representation of a TeX DVI file in DVI Text Language format.\n\n### AUTHOR\n\ndv2dt and dt2dv(1) were written by\nGeoffrey Tobin\nDepartment of Electronic Engineering\nLa Trobe University\nBundoora, Victoria 3083\nAustralia\nTel: +61 3 479 3736\nFAX: +61 3 479 3025\nEmail: <G.Tobin@ee.latrobe.edu.au>\n\nThese manual pages were primarily written by\nNelson H. F. Beebe, Ph.D.\nCenter for Scientific Computing\nDepartment of Mathematics\nUniversity of Utah\nSalt Lake City, UT 84112\nTel: +1 801 581 5254\nFAX: +1 801 581 4148\nEmail: <beebe@math.utah.edu>\n\n\n\nVersion 0.6.0                               08 March 1995                                   DV2DT(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "dv2dt",
        "section": "1",
        "mode": "man",
        "summary": "dv2dt - convert a binary TeX DVI file to DTL text representation",
        "synopsis": "dv2dt input-DVI-file output-DTL-file\nIf the filenames are omitted, then stdin and stdout are assumed.",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "dt2dv",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dt2dv/1/json"
            },
            {
                "name": "dvitype",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dvitype/1/json"
            },
            {
                "name": "tex",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/tex/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DVI COMMAND DESCRIPTION",
                "lines": 212,
                "subsections": []
            },
            {
                "name": "DTL COMMAND DESCRIPTION",
                "lines": 68,
                "subsections": []
            },
            {
                "name": "SAMPLE DTL FILE",
                "lines": 36,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 23,
                "subsections": []
            }
        ]
    }
}