1 .\" ====================================================================
3 .\" author = "Nelson H. F. Beebe and Geoffrey Tobin",
5 .\" date = "08 March 1995",
6 .\" time = "19:52:00 GMT +11",
7 .\" filename = "dv2dt.man",
8 .\" address = "Center for Scientific Computing
9 .\" Department of Mathematics
10 .\" University of Utah
11 .\" Salt Lake City, UT 84112
13 .\" telephone = "+1 801 581 5254",
14 .\" FAX = "+1 801 581 4148",
15 .\" checksum = "32328 715 2191 12898",
16 .\" email = "beebe@math.utah.edu (Internet)",
17 .\" codetable = "ISO/ASCII",
18 .\" keywords = "DVI, TeX",
20 .\" docstring = "This file contains the UNIX manual pages
21 .\" for the dv2dt utility, a program for
22 .\" converting a binary TeX DVI file to an
23 .\" editable text representation in DTL (DVI Text
24 .\" Language). The companion dt2dv utility can
25 .\" convert the output DTL file back to a binary
28 .\" The checksum field above contains a CRC-16
29 .\" checksum as the first value, followed by the
30 .\" equivalent of the standard UNIX wc (word
31 .\" count) utility output of lines, words, and
32 .\" characters. This is produced by Robert
33 .\" Solovay's checksum utility.",
35 .\" ====================================================================
36 .if t .ds Te T\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X
38 .if t .ds Xe X\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'T
40 .TH DV2DT 1 "08 March 1995" "Version 0.6.0"
41 .\"======================================================================
43 dv2dt \- convert a binary TeX DVI file to DTL text representation
44 .\"======================================================================
50 If the filenames are omitted, then
55 .\"======================================================================
58 converts a binary \*(Te\& DVI file to an editable
60 .RI ( "DVI Text Language" )
63 utility can convert the DTL file back to a binary
65 .\"======================================================================
66 .SH "DVI COMMAND DESCRIPTION"
67 \*(Te\& DVI files contain a compact binary
68 description of typeset pages, as a stream of
69 operation code bytes, each immediately followed by
70 zero or more parameter bytes. The format of DVI
71 files is fully described in Donald E. Knuth,
72 .IR "\*(Te\&: The Program" ,
73 Addison-Wesley (1986), ISBN 0-201-13437-3, as well
76 literate program source code.
78 For convenience, we provide a summary of DVI
79 commands here. In the following list, operation
80 code bytes are given as unsigned decimal values,
81 followed by their symbolic names (not present in
82 the DVI file), and a short description. A
85 means that the operation code byte is followed by
90 bytes, and is signed. Without the plus sign, the
91 parameter is unsigned. Signed integer parameter
92 values are always represented in two's complement
93 arithmetic, which is the system followed by most
94 computers manufactured today, including all
95 personal computers and workstations.
96 .if n .TP \w'\fI128_set1__c[1]\fP'u+3n
97 .if t .TP \w'\fI243_fnt_def1__k[1]_c[4]_s[4]_d[4]_a[1]_l[1]_n[a+l]\fP'u+3n
99 Set character 0 from current font.
103 .I "127 set_char_127"
104 Set character 127 from current font.
107 Set 1-byte unsigned character (uchar) number
111 Set 2-byte uchar number
115 Set 3-byte uchar number
119 Set 4-byte signed character (schar) number
122 .I "132 set_rule a[+4] b[+4]"
144 .I "137 put_rule a[+4] b[+4]"
153 .I "139 bop c0[+4] .\|.\|. c9[+4] p[+4]"
154 Beginning of page. The parameters
156 are the \*(Te\& page counters, the contents of
157 \*(Te\& count registers
158 .IR "\ecount0 .\|.\|. \ecount9" .
161 is the byte offset from the beginning of the DVI
164 operation code byte. The first such command in
181 .I "143 right1 b[+1]"
186 .I "144 right2 b[+2]"
191 .I "145 right3 b[+3]"
196 .I "146 right4 b[+4]"
338 Set current font number
363 .I "239 xxx1 k[1] x[k]"
370 .I "240 xxx2 k[2] x[k]"
377 .I "241 xxx3 k[3] x[k]"
384 .I "242 xxx4 k[4] x[k]"
391 .I "243 fnt_def1 k[1] c[4] s[4] d[4] a[1] l[1] n[a+l]"
398 Checksum for TFM file.
401 Scale factor, in DVI units.
404 Design size, in DVI units.
407 Length of the ``area'' or directory.
410 Length of the font name.
413 Area and font name string(s).
416 .I "244 fnt_def2 k[2] c[4] s[4] d[4] a[1] l[1] n[a+l]"
420 .I "245 fnt_def3 k[3] c[4] s[4] d[4] a[1] l[1] n[a+l]"
424 .I "246 fnt_def4 k[+4] c[4] s[4] d[4] a[1] l[1] n[a+l]"
428 .I "247 pre i[1] num[4] den[4] mag[4] k[1] x[k]"
429 Begin preamble. The parameters are:
431 .TP \w'\fInum\fP'u+3n
433 DVI format. Standard \*(Te\& has
435 and \*(Te\&-\*(Xe\& has
439 Numerator of 100 nm / DVI unit.
442 Denominator of 100 nm / DVI unit.
445 1000 * magnification.
454 .I "248 post p[4] num[4] den[4] mag[4] l[4] u[4] s[2] t[2]"
455 Begin postamble. The parameters are:
457 .TP \w'\fInum\fP'u+3n
459 Pointer to final bop.
462 Duplicates of values in preamble.
465 Height-plus-depth of tallest page, in DVI units.
468 Width of widest page, in DVI units.
471 Maximum stack depth needed to process this DVI file.
474 Total number of pages
479 .I "249 post_post q[4] i[1] 223 .\|.\|. 223"
480 End postamble. The parameters are:
482 .TP \w'\fI223\fP'u+3n
484 Byte offset from the beginning of the DVI file to
487 command that started the postamble.
490 DVI format ID, as in the preamble.
506 .\"======================================================================
507 .SH "DTL COMMAND DESCRIPTION"
508 A DTL file contains one line per command, with a
509 limit of 1024 characters per line. Each command
510 contains a symbolic operation name, followed by
511 zero or more parameter values. The parameter
512 value descriptions are not repeated here; they can
513 be found in the previous section.
514 .TP \w'\fIw0,_w1,_w2,_w3,_w4\fP'u+3n
515 variety <variety-name>
516 This command specifies the name of the DTL file
517 type; it has no DVI file equivalent.
520 Series of set_char commands, for printable ASCII text.
523 Literal ASCII left parenthesis in (text).
526 Literal ASCII right parenthesis in (text).
529 Literal ASCII backslash in (text).
532 Literal ASCII double quote in (text).
535 Set_char for character with hexadecimal code XY,
536 not in parentheses, but by itself for readability.
539 Set, with (1,2,3,4)-byte charcodes.
545 Put, with (1,2,3,4)-byte charcodes.
569 Right, with (1,2,3,4)-byte argument.
571 .I "w0, w1, w2, w3, w4"
574 .I "x0, x1, x2, x3, x4"
578 Down, with (1,2,3,4)-byte argument.
580 .I "y0, y1, y2, y3, y4"
583 .I "z0, z1, z2, z3, z4"
588 (set current font to font number in 0 to 63).
592 (set current font to (1,2,3,4)-byte font number).
596 (special commands with (1,2,3,4)-byte string length).
600 (assign a number to a named font).
614 Undefined DVI command (250 to 255).
615 .\"======================================================================
616 .SH "SAMPLE DTL FILE"
617 The following 2-line \*(Te\& file
624 when processed with the commands
628 dv2dt hello.dvi hello.dtl
631 produces this DTL file:
635 pre 2 25400000 473628672 1000 27 ' TeX output 1995.03.02:2334'
636 bop 1 0 0 0 0 0 0 0 0 0 -1
645 fd1 0 11374260171 655360 655360 0 5 '' 'cmr10'
656 post 42 25400000 473628672 1000 43725786 30785863 2 1
657 fd1 0 11374260171 655360 655360 0 5 'cmr10'
658 post_post 152 2 223 223 223 223
664 dt2dv hello.dtl hello.dvi
667 will reconstruct the original DVI file.
668 .\"======================================================================
673 .\"======================================================================
675 .TP \w'\fI*.dvi\fP'u+3n
677 binary \*(Te\& DVI file.
680 text representation of a \*(Te\& DVI file in
681 .I "DVI Text Language"
683 .\"======================================================================
692 Department of Electronic Engineering
694 Bundoora, Victoria 3083
698 Email: <G.Tobin@latrobe.edu.au>
702 These manual pages were primarily written by
705 Nelson H. F. Beebe, Ph.D.
706 Center for Scientific Computing
707 Department of Mathematics
709 Salt Lake City, UT 84112
712 Email: <beebe@math.utah.edu>
715 .\"==============================[The End]==============================