1 .\" This file is public domain.
2 .\" Originally written 1995, Geoffrey Tobin.
3 .\" The author has expressed the hope that any modification will retain enough content to remain useful. He would also appreciate being acknowledged as the original author in the documentation.
4 .\" This declaration added 2008/11/14 by Clea F. Rees with the permission of Geoffrey Tobin.
5 .\" ====================================================================
7 .\" author = "Nelson H. F. Beebe and Geoffrey Tobin",
9 .\" date = "08 March 1995",
10 .\" time = "19:52:00 GMT +11",
11 .\" filename = "dv2dt.man",
12 .\" address = "Center for Scientific Computing
13 .\" Department of Mathematics
14 .\" University of Utah
15 .\" Salt Lake City, UT 84112
17 .\" telephone = "+1 801 581 5254",
18 .\" FAX = "+1 801 581 4148",
19 .\" checksum = "32328 715 2191 12898",
20 .\" email = "beebe@math.utah.edu (Internet)",
21 .\" codetable = "ISO/ASCII",
22 .\" keywords = "DVI, TeX",
24 .\" docstring = "This file contains the UNIX manual pages
25 .\" for the dv2dt utility, a program for
26 .\" converting a binary TeX DVI file to an
27 .\" editable text representation in DTL (DVI Text
28 .\" Language). The companion dt2dv utility can
29 .\" convert the output DTL file back to a binary
32 .\" The checksum field above contains a CRC-16
33 .\" checksum as the first value, followed by the
34 .\" equivalent of the standard UNIX wc (word
35 .\" count) utility output of lines, words, and
36 .\" characters. This is produced by Robert
37 .\" Solovay's checksum utility.",
39 .\" ====================================================================
40 .if t .ds Te T\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X
42 .if t .ds Xe X\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'T
44 .TH DV2DT 1 "08 March 1995" "Version 0.6.0"
45 .\"======================================================================
47 dv2dt \- convert a binary TeX DVI file to DTL text representation
48 .\"======================================================================
54 If the filenames are omitted, then
59 .\"======================================================================
62 converts a binary \*(Te\& DVI file to an editable
64 .RI ( "DVI Text Language" )
67 utility can convert the DTL file back to a binary
69 .\"======================================================================
70 .SH "DVI COMMAND DESCRIPTION"
71 \*(Te\& DVI files contain a compact binary
72 description of typeset pages, as a stream of
73 operation code bytes, each immediately followed by
74 zero or more parameter bytes. The format of DVI
75 files is fully described in Donald E. Knuth,
76 .IR "\*(Te\&: The Program" ,
77 Addison-Wesley (1986), ISBN 0-201-13437-3, as well
80 literate program source code.
82 For convenience, we provide a summary of DVI
83 commands here. In the following list, operation
84 code bytes are given as unsigned decimal values,
85 followed by their symbolic names (not present in
86 the DVI file), and a short description. A
89 means that the operation code byte is followed by
94 bytes, and is signed. Without the plus sign, the
95 parameter is unsigned. Signed integer parameter
96 values are always represented in two's complement
97 arithmetic, which is the system followed by most
98 computers manufactured today, including all
99 personal computers and workstations.
100 .if n .TP \w'\fI128_set1__c[1]\fP'u+3n
101 .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
103 Set character 0 from current font.
107 .I "127 set_char_127"
108 Set character 127 from current font.
111 Set 1-byte unsigned character (uchar) number
115 Set 2-byte uchar number
119 Set 3-byte uchar number
123 Set 4-byte signed character (schar) number
126 .I "132 set_rule a[+4] b[+4]"
148 .I "137 put_rule a[+4] b[+4]"
157 .I "139 bop c0[+4] .\|.\|. c9[+4] p[+4]"
158 Beginning of page. The parameters
160 are the \*(Te\& page counters, the contents of
161 \*(Te\& count registers
162 .IR "\ecount0 .\|.\|. \ecount9" .
165 is the byte offset from the beginning of the DVI
168 operation code byte. The first such command in
185 .I "143 right1 b[+1]"
190 .I "144 right2 b[+2]"
195 .I "145 right3 b[+3]"
200 .I "146 right4 b[+4]"
342 Set current font number
367 .I "239 xxx1 k[1] x[k]"
374 .I "240 xxx2 k[2] x[k]"
381 .I "241 xxx3 k[3] x[k]"
388 .I "242 xxx4 k[4] x[k]"
395 .I "243 fnt_def1 k[1] c[4] s[4] d[4] a[1] l[1] n[a+l]"
402 Checksum for TFM file.
405 Scale factor, in DVI units.
408 Design size, in DVI units.
411 Length of the ``area'' or directory.
414 Length of the font name.
417 Area and font name string(s).
420 .I "244 fnt_def2 k[2] c[4] s[4] d[4] a[1] l[1] n[a+l]"
424 .I "245 fnt_def3 k[3] c[4] s[4] d[4] a[1] l[1] n[a+l]"
428 .I "246 fnt_def4 k[+4] c[4] s[4] d[4] a[1] l[1] n[a+l]"
432 .I "247 pre i[1] num[4] den[4] mag[4] k[1] x[k]"
433 Begin preamble. The parameters are:
435 .TP \w'\fInum\fP'u+3n
437 DVI format. Standard \*(Te\& has
439 and \*(Te\&-\*(Xe\& has
443 Numerator of 100 nm / DVI unit.
446 Denominator of 100 nm / DVI unit.
449 1000 * magnification.
458 .I "248 post p[4] num[4] den[4] mag[4] l[4] u[4] s[2] t[2]"
459 Begin postamble. The parameters are:
461 .TP \w'\fInum\fP'u+3n
463 Pointer to final bop.
466 Duplicates of values in preamble.
469 Height-plus-depth of tallest page, in DVI units.
472 Width of widest page, in DVI units.
475 Maximum stack depth needed to process this DVI file.
478 Total number of pages
483 .I "249 post_post q[4] i[1] 223 .\|.\|. 223"
484 End postamble. The parameters are:
486 .TP \w'\fI223\fP'u+3n
488 Byte offset from the beginning of the DVI file to
491 command that started the postamble.
494 DVI format ID, as in the preamble.
510 .\"======================================================================
511 .SH "DTL COMMAND DESCRIPTION"
512 A DTL file contains one line per command, with a
513 limit of 1024 characters per line. Each command
514 contains a symbolic operation name, followed by
515 zero or more parameter values. The parameter
516 value descriptions are not repeated here; they can
517 be found in the previous section.
518 .TP \w'\fIw0,_w1,_w2,_w3,_w4\fP'u+3n
519 variety <variety-name>
520 This command specifies the name of the DTL file
521 type; it has no DVI file equivalent.
524 Series of set_char commands, for printable ASCII text.
527 Literal ASCII left parenthesis in (text).
530 Literal ASCII right parenthesis in (text).
533 Literal ASCII backslash in (text).
536 Literal ASCII double quote in (text).
539 Set_char for character with hexadecimal code XY,
540 not in parentheses, but by itself for readability.
543 Set, with (1,2,3,4)-byte charcodes.
549 Put, with (1,2,3,4)-byte charcodes.
573 Right, with (1,2,3,4)-byte argument.
575 .I "w0, w1, w2, w3, w4"
578 .I "x0, x1, x2, x3, x4"
582 Down, with (1,2,3,4)-byte argument.
584 .I "y0, y1, y2, y3, y4"
587 .I "z0, z1, z2, z3, z4"
592 (set current font to font number in 0 to 63).
596 (set current font to (1,2,3,4)-byte font number).
600 (special commands with (1,2,3,4)-byte string length).
604 (assign a number to a named font).
618 Undefined DVI command (250 to 255).
619 .\"======================================================================
620 .SH "SAMPLE DTL FILE"
621 The following 2-line \*(Te\& file
628 when processed with the commands
632 dv2dt hello.dvi hello.dtl
635 produces this DTL file:
639 pre 2 25400000 473628672 1000 27 ' TeX output 1995.03.02:2334'
640 bop 1 0 0 0 0 0 0 0 0 0 -1
649 fd1 0 11374260171 655360 655360 0 5 '' 'cmr10'
660 post 42 25400000 473628672 1000 43725786 30785863 2 1
661 fd1 0 11374260171 655360 655360 0 5 'cmr10'
662 post_post 152 2 223 223 223 223
668 dt2dv hello.dtl hello.dvi
671 will reconstruct the original DVI file.
672 .\"======================================================================
677 .\"======================================================================
679 .TP \w'\fI*.dvi\fP'u+3n
681 binary \*(Te\& DVI file.
684 text representation of a \*(Te\& DVI file in
685 .I "DVI Text Language"
687 .\"======================================================================
696 Department of Electronic Engineering
698 Bundoora, Victoria 3083
702 Email: <G.Tobin@ee.latrobe.edu.au>
706 These manual pages were primarily written by
709 Nelson H. F. Beebe, Ph.D.
710 Center for Scientific Computing
711 Department of Mathematics
713 Salt Lake City, UT 84112
716 Email: <beebe@math.utah.edu>
719 .\"==============================[The End]==============================