]> git.lyx.org Git - lyx.git/blob - development/Win32/packaging/dtl/dv2dt.man
* Enable man2ps to work without hard-coding the locations of groff or dpost.
[lyx.git] / development / Win32 / packaging / dtl / dv2dt.man
1 .\" ====================================================================
2 .\"  @Troff-man-file{
3 .\"     author          = "Nelson H. F. Beebe and Geoffrey Tobin",
4 .\"     version         = "0.6.0",
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
12 .\"                        USA",
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",
19 .\"     supported       = "no",
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
26 .\"                        DVI file.
27 .\"
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.",
34 .\"  }
35 .\" ====================================================================
36 .if t .ds Te T\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X
37 .if n .ds Te TeX
38 .if t .ds Xe X\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'T
39 .if n .ds Xe XeT
40 .TH DV2DT 1 "08 March 1995" "Version 0.6.0"
41 .\"======================================================================
42 .SH NAME
43 dv2dt \- convert a binary TeX DVI file to DTL text representation
44 .\"======================================================================
45 .SH SYNOPSIS
46 .B dv2dt
47 .I input-DVI-file
48 .I output-DTL-file
49 .PP
50 If the filenames are omitted, then
51 .I stdin
52 and
53 .I stdout
54 are assumed.
55 .\"======================================================================
56 .SH DESCRIPTION
57 .B dv2dt
58 converts a binary \*(Te\& DVI file to an editable
59 text file in DTL
60 .RI ( "DVI Text Language" )
61 format.  The companion
62 .BR dt2dv (1)
63 utility can convert the DTL file back to a binary
64 DVI file.
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
74 as in the
75 .BR dvitype (1)
76 literate program source code.
77 .PP
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
83 designation like
84 .I b[+n]
85 means that the operation code byte is followed by
86 a parameter
87 .I b
88 which uses
89 .I n
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
98 .I "0 set_char_0"
99 Set character 0 from current font.
100 .TP
101 .I .\|.\|.
102 .TP
103 .I "127 set_char_127"
104 Set character 127 from current font.
105 .TP
106 .I "128 set1  c[1]"
107 Set 1-byte unsigned character (uchar) number
108 .IR c .
109 .TP
110 .I "129 set2  c[2]"
111 Set 2-byte uchar number
112 .IR c .
113 .TP
114 .I "130 set3  c[3]"
115 Set 3-byte uchar number
116 .IR c .
117 .TP
118 .I "131 set4  c[+4]"
119 Set 4-byte signed character (schar) number
120 .IR c .
121 .TP
122 .I "132 set_rule  a[+4]  b[+4]"
123 Set rule, height
124 .IR a ,
125 width
126 .IR b .
127 .TP
128 .I "133 put1  c[1]"
129 Put 1-byte uchar
130 .IR c .
131 .TP
132 .I "134 put2  c[2]"
133 Put 2-byte uchar
134 .IR c .
135 .TP
136 .I "135 put3  c[3]"
137 Put 3-byte uchar
138 .IR c .
139 .TP
140 .I "136 put4  c[+4]"
141 Put 4-byte schar
142 .IR c .
143 .TP
144 .I "137 put_rule  a[+4]  b[+4]"
145 Put rule, height
146 .IR a ,
147 width
148 .IR b .
149 .TP
150 .I "138 nop"
151 Do nothing.
152 .TP
153 .I "139 bop  c0[+4]  .\|.\|.  c9[+4]  p[+4]"
154 Beginning of page.  The parameters
155 .I "c0  .\|.\|.  c9"
156 are the \*(Te\& page counters, the contents of
157 \*(Te\& count registers
158 .IR "\ecount0  .\|.\|.  \ecount9" .
159 The parameter
160 .I p
161 is the byte offset from the beginning of the DVI
162 file of the previous
163 .I bop
164 operation code byte.  The first such command in
165 the file has
166 .IR "p = \-1" .
167 .TP
168 .I "140 eop"
169 End of page.
170 .TP
171 .I "141 push"
172 Push
173 .RI ( h,v,w,x,y,z )
174 onto stack.
175 .TP
176 .I "142 pop"
177 Pop
178 .RI ( h,v,w,x,y,z )
179 from stack.
180 .TP
181 .I "143 right1  b[+1]"
182 Move right
183 .I b
184 units.
185 .TP
186 .I "144 right2  b[+2]"
187 Move right
188 .I b
189 units.
190 .TP
191 .I "145 right3  b[+3]"
192 Move right
193 .I b
194 units.
195 .TP
196 .I "146 right4  b[+4]"
197 Move right
198 .I b
199 units.
200 .TP
201 .I "147 w0"
202 Move right
203 .I w
204 units.
205 .TP
206 .I "148 w1  b[+1]"
207 Move right
208 .I b
209 units, and set
210 .IR "w = b" .
211 .TP
212 .I "149 w2  b[+2]"
213 Move right
214 .I b
215 units, and set
216 .IR "w = b" .
217 .TP
218 .I "150 w3  b[+3]"
219 Move right
220 .I b
221 units, and set
222 .IR "w = b" .
223 .TP
224 .I "151 w4  b[+4]"
225 Move right
226 .I b
227 units, and set
228 .IR "w = b" .
229 .TP
230 .I "152 x0"
231 Move right
232 .I x
233 units.
234 .TP
235 .I "153 x1  b[+1]"
236 Move right
237 .I b
238 units, and set
239 .IR "x = b" .
240 .TP
241 .I "154 x2  b[+2]"
242 Move right
243 .I b
244 units, and set
245 .IR "x = b" .
246 .TP
247 .I "155 x3  b[+3]"
248 Move right
249 .I b
250 units, and set
251 .IR "x = b" .
252 .TP
253 .I "156 x4  b[+4]"
254 Move right
255 .I b
256 units, and set
257 .IR "x = b" .
258 .TP
259 .I "157 down1  a[+1]"
260 Move down
261 .I a
262 units.
263 .TP
264 .I "158 down2  a[+2]"
265 Move down
266 .I a
267 units.
268 .TP
269 .I "159 down3  a[+3]"
270 Move down
271 .I a
272 units.
273 .TP
274 .I "160 down4  a[+4]"
275 Move down
276 .I a
277 units.
278 .TP
279 .I "161 y0"
280 Move right
281 .I y
282 units.
283 .TP
284 .I "162 y1  a[+1]"
285 Move right
286 .I a
287 units, and set
288 .IR "y = a" .
289 .TP
290 .I "163 y2  a[+2]"
291 Move right
292 .I a
293 units, and set
294 .IR "y = a" .
295 .TP
296 .I "164 y3  a[+3]"
297 Move right
298 .I a
299 units, and set
300 .IR "y = a" .
301 .TP
302 .I "165 y4  a[+4]"
303 Move right
304 .I a
305 units, and set
306 .IR "y = a" .
307 .TP
308 .I "166 z0"
309 Move right
310 .I z
311 units.
312 .TP
313 .I "167 z1  a[+1]"
314 Move right
315 .I a
316 units, and set
317 .IR "z = a" .
318 .TP
319 .I "168 z2  a[+2]"
320 Move right
321 .I a
322 units, and set
323 .IR "z = a" .
324 .TP
325 .I "169 z3  a[+3]"
326 Move right
327 .I a
328 units, and set
329 .IR "z = a" .
330 .TP
331 .I "170 z4  a[+4]"
332 Move right
333 .I a
334 units, and set
335 .IR "z = a" .
336 .TP
337 .I "171 fnt_num_0"
338 Set current font number
339 .IR "(f) = 0" .
340 .TP
341 .I .\|.\|.
342 .TP
343 .I "234 fnt_num_63"
344 Set
345 .IR "f = 63" .
346 .TP
347 .I "235 fnt1  k[1]"
348 Set
349 .IR "f = k" .
350 .TP
351 .I "236 fnt2  k[2]"
352 Set
353 .IR "f = k" .
354 .TP
355 .I "237 fnt3  k[3]"
356 Set
357 .IR "f = k" .
358 .TP
359 .I "238 fnt4  k[+4]"
360 Set
361 .IR "f = k" .
362 .TP
363 .I "239 xxx1  k[1]  x[k]"
364 Special string
365 .I x
366 with
367 .I k
368 bytes.
369 .TP
370 .I "240 xxx2  k[2]  x[k]"
371 Special string
372 .I x
373 with
374 .I k
375 bytes.
376 .TP
377 .I "241 xxx3  k[3]  x[k]"
378 Special string
379 .I x
380 with
381 .I k
382 bytes.
383 .TP
384 .I "242 xxx4  k[4]  x[k]"
385 Special string
386 .I x
387 with (unsigned)
388 .I k
389 bytes.
390 .TP
391 .I "243 fnt_def1  k[1] c[4] s[4] d[4] a[1] l[1] n[a+l]"
392 Define font
393 .IR k .
394 The parameters are:
395 .RS
396 .TP \w'\fIm\fP'u+3n
397 .I c
398 Checksum for TFM file.
399 .TP
400 .I s
401 Scale factor, in DVI units.
402 .TP
403 .I d
404 Design size, in DVI units.
405 .TP
406 .I a
407 Length of the ``area'' or directory.
408 .TP
409 .I l
410 Length of the font name.
411 .TP
412 .I n
413 Area and font name string(s).
414 .RE
415 .TP
416 .I "244 fnt_def2  k[2] c[4] s[4] d[4] a[1] l[1] n[a+l]"
417 Define font
418 .IR k .
419 .TP
420 .I "245 fnt_def3  k[3] c[4] s[4] d[4] a[1] l[1] n[a+l]"
421 Define font
422 .IR k .
423 .TP
424 .I "246 fnt_def4  k[+4] c[4] s[4] d[4] a[1] l[1] n[a+l]"
425 Define font
426 .IR k .
427 .TP
428 .I "247 pre  i[1]  num[4]  den[4]  mag[4]  k[1]  x[k]"
429 Begin preamble.  The parameters are:
430 .RS
431 .TP \w'\fInum\fP'u+3n
432 .I i
433 DVI format.  Standard \*(Te\& has
434 .IR "ID = 2" ,
435 and \*(Te\&-\*(Xe\& has
436 .IR "ID = 3" .
437 .TP
438 .I num
439 Numerator of 100 nm / DVI unit.
440 .TP
441 .I den
442 Denominator of 100 nm / DVI unit.
443 .TP
444 .I mag
445 1000 * magnification.
446 .TP
447 .I k
448 Comment length.
449 .TP
450 .I x
451 Comment string.
452 .RE
453 .TP
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:
456 .RS
457 .TP \w'\fInum\fP'u+3n
458 .I p
459 Pointer to final bop.
460 .TP
461 .I "num, den, mag"
462 Duplicates of values in preamble.
463 .TP
464 .I l
465 Height-plus-depth of tallest page, in DVI units.
466 .TP
467 .I u
468 Width of widest page, in DVI units.
469 .TP
470 .I s
471 Maximum stack depth needed to process this DVI file.
472 .TP
473 .I t
474 Total number of pages
475 .RI ( bop
476 commands) present.
477 .RE
478 .TP
479 .I "249 post_post  q[4] i[1] 223 .\|.\|. 223"
480 End postamble.  The parameters are:
481 .RS
482 .TP \w'\fI223\fP'u+3n
483 .I q
484 Byte offset from the beginning of the DVI file to
485 the
486 .I post
487 command that started the postamble.
488 .TP
489 .I i
490 DVI format ID, as in the preamble.
491 .TP
492 .I
493 223
494 At least four
495 .I 223
496 bytes.
497 .RE
498 .TP
499 .I "250"
500 Undefined.
501 .TP
502 .I .\|.\|.
503 .TP
504 .I "255"
505 Undefined.
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.
518 .TP
519 .I (text)
520 Series of set_char commands, for printable ASCII text.
521 .TP
522 .I \e(
523 Literal ASCII left parenthesis in (text).
524 .TP
525 .I \e)
526 Literal ASCII right parenthesis in (text).
527 .TP
528 .I \e\e
529 Literal ASCII backslash in (text).
530 .TP
531 .I \e"
532 Literal ASCII double quote in (text).
533 .TP
534 .I \eXY
535 Set_char for character with hexadecimal code XY,
536 not in parentheses, but by itself for readability.
537 .TP
538 .I "s1, s2, s2, s3"
539 Set, with (1,2,3,4)-byte charcodes.
540 .TP
541 .I sr
542 .IR set_rule .
543 .TP
544 .I "p1, p2, p2, p3"
545 Put, with (1,2,3,4)-byte charcodes.
546 .TP
547 .I pr
548 .IR put_rule .
549 .TP
550 .I nop
551 .I nop
552 (do nothing).
553 .TP
554 .I bop
555 .I bop
556 (beginning of page).
557 .TP
558 .I eop
559 .I eop
560 (end of page).
561 .TP
562 .I [
563 Push.
564 .TP
565 .I ]
566 Pop.
567 .TP
568 .I "r1, r2, r3, r4"
569 Right, with (1,2,3,4)-byte argument.
570 .TP
571 .I "w0, w1, w2, w3, w4"
572 As in DVI.
573 .TP
574 .I "x0, x1, x2, x3, x4"
575 As in DVI.
576 .TP
577 .I "d1, d2, d3, d4"
578 Down, with (1,2,3,4)-byte argument.
579 .TP
580 .I "y0, y1, y2, y3, y4"
581 As in DVI.
582 .TP
583 .I "z0, z1, z2, z3, z4"
584 As in DVI.
585 .TP
586 .I fn
587 .I fnt_num
588 (set current font to font number in 0 to 63).
589 .TP
590 .I "f1, f2, f3, f4"
591 .I fnt
592 (set current font to (1,2,3,4)-byte font number).
593 .TP
594 .I special
595 .I xxx
596 (special commands with (1,2,3,4)-byte string length).
597 .TP
598 .I fd
599 .I fnt_def
600 (assign a number to a named font).
601 .TP
602 .I pre
603 Preamble.
604 .TP
605 .I post
606 .I post
607 (begin postamble).
608 .TP
609 .I post_post
610 .I post_post
611 (end postamble).
612 .TP
613 .I opcode
614 Undefined DVI command (250 to 255).
615 .\"======================================================================
616 .SH "SAMPLE DTL FILE"
617 The following 2-line \*(Te\& file
618 .RS
619 .nf
620 Hello.
621 \ebye
622 .fi
623 .RE
624 when processed with the commands
625 .RS
626 .nf
627 tex hello.tex
628 dv2dt hello.dvi hello.dtl
629 .fi
630 .RE
631 produces this DTL file:
632 .RS
633 .nf
634 variety sequences-6
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
637 [
638 d3 -917504
639 ]
640 d4 42152922
641 [
642 d4 -41497562
643 [
644 r3 1310720
645 fd1 0 11374260171 655360 655360 0 5 '' 'cmr10'
646 fn0
647 (Hello.)
648 ]
649 ]
650 d3 1572864
651 [
652 r4 15229091
653 (1)
654 ]
655 eop
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
659 .fi
660 .RE
661 The command
662 .RS
663 .nf
664 dt2dv hello.dtl hello.dvi
665 .fi
666 .RE
667 will reconstruct the original DVI file.
668 .\"======================================================================
669 .SH "SEE ALSO"
670 .BR dt2dv (1),
671 .BR dvitype (1),
672 .BR tex (1).
673 .\"======================================================================
674 .SH FILES
675 .TP \w'\fI*.dvi\fP'u+3n
676 .I *.dvi
677 binary \*(Te\& DVI file.
678 .TP
679 .I *.dtl
680 text representation of a \*(Te\& DVI file in
681 .I "DVI Text Language"
682 format.
683 .\"======================================================================
684 .SH AUTHOR
685 .B dv2dt
686 and
687 .BR dt2dv (1)
688 were written by
689 .RS
690 .nf
691 Geoffrey Tobin
692 Department of Electronic Engineering
693 La Trobe University
694 Bundoora, Victoria 3083
695 Australia
696 Tel: +61 3 479 3736
697 FAX: +61 3 479 3025
698 Email: <G.Tobin@ee.latrobe.edu.au>
699 .fi
700 .RE
701 .PP
702 These manual pages were primarily written by
703 .RS
704 .nf
705 Nelson H. F. Beebe, Ph.D.
706 Center for Scientific Computing
707 Department of Mathematics
708 University of Utah
709 Salt Lake City, UT 84112
710 Tel: +1 801 581 5254
711 FAX: +1 801 581 4148
712 Email: <beebe@math.utah.edu>
713 .fi
714 .RE
715 .\"==============================[The End]==============================