summaryrefslogtreecommitdiff
path: root/dviware/beebe/doc/dvi.1l
blob: beaf1bdb8f99411ca9d3c3d0b9e2c2adb79bc068 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
\" NB: make sure tabs in two tables below have not be turned into blanks
\" Look for the lines beginning ".ta 1.2in"
.TH dvi 1L "21 October 1987"

.SH NAME

dvixxx \- TeX DVI to device xxx translator family

.SH SYNOPSIS

.na
\fBdvixxx\fP
[\fB\-a\fP]
[\fB\-b\fP]
[\fB\-c#\fP]
[\fB\-d#\fP]
[\fB\-e\fP\fIVAR=value\fP].\|.\|.
.if n .ti +0.5i
[\fB\-f\fP\fIfontsubfile\fP]
[\fB\-l\fP]
[\fB\-m#\fP]
.ti +0.5i
[\fB\-o#\fP].\|.\|.
[\fB\-o#:#\fP].\|.\|.
[\fB\-o#:#:#\fP].\|.\|.
.ti +0.5i
[\fB\-p\fP]
[\fB\-q\fP]
[\fB\-r#\fP]
[\fB\-s#\fP]
[\fB\-v\fP]
.if n .ti +0.5i
[\fB\-x#\fP\fIunits\fP]
[\fB\-y#\fP\fIunits\fP]
[\fB\-z\fP]
\fBdvifile1\fP
[\fB dvifile2\fP].\|.\|.

\fIxxx\fP\fR = output device identifier suffix (see below)\fP
.ad

.SH DESCRIPTION

Several TeX DVI translators are available.  They all expect
the name of the DVI file on the command line, and the
extension \fI.dvi\fP can always be omitted.  As illustrated
below, they issue a one-line identifier message and, if no
command line arguments are given, type a Unix-style
\fIusage\fP message.  Some of them may have additional help
files.  On case-sensitive file systems, file names may be
expected to be entirely in lower case, so you should type
\fIdvialw\fP instead of \fIDVIALW\fP.

For all except \fIdvibit\fP, which is intended for interactive display,
the output file will be given the name of the \fI.dvi\fP file, but with
suffix \fI.dvi-xxx\fP, where \fIxxx\fP is the three-character mnemonic
for the translator program.  If long filenames are not supported,
then \fI.xxx\fP is used.  For \fIdvibit\fP, output is on \fIstdout\fP,
which defaults to the terminal; it may be redirected in the usual Unix
fashion by \fI>filename\fP on the command line (e.g. \fIdvibit foo
>foo.out\fP).

As each \fI.dvi\fP file is processed, a list of errors is printed
on the standard error unit, \fIstderr\fP; this list is also saved
in a file with suffix \fI.dvi-err\fP (or \fI.err\fP, if long filenames
are not supported). This file is not created if there are no errors.  As
each page is printed, the physical page number and the TeX page
number(s) are printed without a following character return; after the
last page, the string ``[OK]'' is printed, followed by a newline. This
gives a convenient progress report to the terminal. If it is not wanted,
then the error output can be redirected into a file (possibly the null
device) (e.g. \fIdvixxx foo &foo.err\fP), or the \fB\-q\fP (quiet)
option can be given to suppress it.

.SH DEVICES SUPPORTED

The available translators are as follows:
.TP \w'dvityp_or_dvitype'u+2n
\fIdvialw\fP
PostScript (Apple LaserWriter)
.TP
\fIdvibit\fP
Version 3.10 BBN BitGraph terminal
.TP
\fIdvican\fP
Canon LBP-8 A2 laser printer
.TP
\fIdvigd\fP
Golden Dawn Golden Laser 100 printer
.TP
\fIdviimp\fP
Imagen imPRESS-language laser printer family
.TP
\fIdvijep\fP
Hewlett-Packard LaserJet Plus
.TP
\fIdvijet\fP
Hewlett-Packard LaserJet
.TP
\fIdvil3p\fP
DEC LN03 Plus laser printer
.TP
\fIdvil75\fP
DEC LA75 144 dpi printer
.TP
\fIdvim72\fP
Apple Imagewriter 72 dpi printer
.TP
\fIdvimac\fP
Apple Imagewriter 144 dpi printer
.TP
\fIdvimpi\fP
MPI Sprinter 72 dpi printer
.TP
\fIdvio72\fP
OKIDATA Pacemark 2410 72 dpi printer
.TP
\fIdvioki\fP
OKIDATA Pacemark 2410 144 dpi printer
.TP
\fIdviprx\fP
Printronix 60h x 72v dpi printer
.TP
\fIdvitos\fP
Toshiba P-1351 180 dpi printer
.TP
\fIdvityp\fP or \fIdvitype\fP
DVI Translator for human-readable output

.SH OPTIONS

The order of command options and DVI file names is \fInot\fP
significant; all switch values apply to all DVI files.  DVI files are
processed in order from left to right.

Letter case is \fIignored\fP in option switches: \fB\-A\fP
and \fB\-a\fP are equivalent.
.TP
.B \-a
Implement virtual font caching, if possible.
When a font file is opened, a buffer is allocated
to contain the entire file, and the file is then
read with one system call.  This is important
primarily on networked file systems, where the
many random-access calls in the font file for
small amounts of data entail substantial network
overhead.  With the entire file cached in local
memory, this overhead is removed.   The
additional memory required for the font file
buffers amounts to 100K to 200K bytes (assuming
the compact \fI\.pk\fP font file format), which is
not excessive.  If memory cannot be allocated for
a font file, then normal buffering of small
blocks is used.  A trace option (\fB\-d64\fP) is
provided to monitor the font caching; see below.
.TP
.B \-b
Backwards order printing from the default.  For example, laser printers
using the  Canon LBP-CX print  engine  normally receive  pages  in
reverse  order  because  they  stack printed side  up.  Some  have page
handling  mechanisms that stack them face  down, and in such  a case
\fB\-b\fP will ensure that they  come out in  order 1, 2, .\|.\|.
instead  of n, n-1, n-2, .\|.\|.
.TP
.B \-c#
Print # copies of each output page.  Page copies
are printed consecutively; this does
\fInot\fP
give multiple collated copies of the entire job.
.TP
.B \-d#
Produce debugging output on \fIstderr\fP if a non-zero value is given.
Multiple \fB\-d\fP switches may be specified, and one may also add
values of the following possible options to obtain the switch value:
.RS
.TP
.I 1
(\fIdvijet\fP only) print page bitmap in hexadecimal;
.TP
.I 2
display page coordinates and metrics of
each output character, and print each
character bitmap in hexadecimal;
.TP
.I 4
(\fIdvijep\fP only) display updated page
coordinate of each character after each call
to  \fIfixpos()\fP;
.TP
.I 8
print filename and open mode of
each
\fIsuccessful\fP
file opening;
.TP
.I 16
print filename and open mode of
each
\fIunsuccessful\fP
file opening;
.TP
.I 32
show discarded off-page text;
.TP
.I 64
trace virtual font caching;
.TP
.I 128
trace character setting (\fIlots\fP of output).
.RE
.PP
.RS
For example, either \fB\-d8 \-d16\fP or
\fB\-d24\fP will trace all attempted file openings.
.RE
.TP
.B \-eVAR=value
Define an environment variable on the command line (see the later
section ENVIRONMENT VARIABLES).  The acceptable values for
\fIVAR\fP
are
\fIDVIHELP,\fP
\fIFONTLIST,\fP
\fITEXFONTS\fP,
and
\fITEXINPUTS\fP.
Under normal use of the
translators, these can be set by TOPS-20 and
VAX VMS
\fBdefine VAR: value\fP
commands, or by Unix
csh
\fBsetenv VAR value\fP
or sh
\fBVAR=value\fP
commands.   When the
translator is invoked by another program, such as
a print spooler, on some systems it may not be
possible to set a
particular value of an environment variable for
the subprocess, so this option gets around this
limitation.  On most Unix systems, it should
be possible to use the call
\fBsystem("VAR=value; dvixxx filename")\fP.
.TP
.B \-f\fIfontsubfile\fP
Define an alternate font substitution file which
is to be used instead of the default ones (see below).
.TP
.B \-l
Inhibit logging.
.TP
.B \-m#
Reset magnification to #.  The default for low resolution printers is
\fB\-m603,\fP corresponding to 1/1.2^5 magnification of 300-dot/inch
fonts.  By TeX conventions, magnification 1000 corresponds to a
200-dot/inch output device.  The default magnification is always
adjusted according to the output device resolution in order to give a
normal page size, so this parameter should rarely be required.  Legal
values are int((1000 or 1440 or 1500) x 1.2^(k/2) [k = -16 .\|.\|. 16];
other values will be set to the nearest in this family.  Not all fonts
will be available in this wide range, and most installations will
probably have only a half dozen or so magnifications.

Magnification values less than 25 are taken to be a TeX magstep
parameter which is applied to the standard magnification for that
device.  For example, \fB\-m-0.5\fP selects a smaller size, and
\fB\-m2\fP selects a size 1.44 times larger than normal.
.TP
.B "\-o# \fIor\fP \-o#:# \fIor\fP \-o#:#:#"
Specify a page number, or range of page numbers, to be selected for
output.  In the third form, the last number is the page number step
size; it is normally 1.  This option may be specified any number of
times.  If it is not specified, then all pages will be printed.  Pages
are numbered in order 1, 2, 3, .\|.\|. in the file, but any page number
recorded by TeX on the printed page will in general be different.
Negative page numbers count backward; \-1 is the last page in the
document, \-2 the second last page, and so on.

As pages are selected for printing, [#{#} will be printed on
\fIstderr\fP, where the first # is the sequential page number in the
file, and the second # is a string of values of the TeX counters,
\\count0 through \\count9, separated by dots, with trailing zero
counters dropped. \\count0 usually records the printed page number.
When the page is completely output, a closing \fI]\fP will be printed on
\fIstderr\fP. Any error messages from processing of that page will
therefore occur between the square brackets.  For example, \fB\-o1:3
\-o12 \-o17:23 \-o\-3:\-1\fP would select pages 1, 2, 3, 12, 17, 18, 19,
20, 21, 22, and 23, plus the last three pages.

Pages are processed in the order found in the DVI file; there is
intentionally no attempt made to sort them according to the \\count0
values, since different macro packages may use this counter for
different purposes, and in the case of floating tables and figures,
the pages may not be in order anyway.

Pages will always be printed in an order appropriate for the device so
that the first document page occurs first face up in the document
stack; the \fB\-b\fP option can be used to reverse this order.  For
example, some Hewlett-Packard LaserJet Plus printers are equipped with
a page flipper which stacks output face down; for these, the \fB\-b\fP
option will ensure that the pages come out in the expected order.

Specification of a page number step size is useful for producing duplex
(two-sided) printing.  For example, with laser printers using the Canon
LBP-CX engine, the first run could specify \fB\-o1:9999:2,\fP which
would stack output face up, beginning with the last page, and ending
with page 1 on top.  The printed pages can then be reinserted in the
input tray \fIface up\fP, page 1 on the top, exactly as they were found
in the output tray, with the top of the page in the tray closest to the
end which is inserted first into the printer.  A second run with \fB\-b
\-o2:9999:2\fP would then print pages 2, 4, .\|.\|., on the backs of
pages 1, 3, .\|.\|.; note the \fB\-b\fP option to get backwards order on
the second run.

There is a bug in Microsoft C's \fIsscanf()\fP on the IBM PC; it does
not correctly parse input on the format \fI"%d:%d:%d"\fP in
\fIoption()\fP for the page number switch.  It correctly returns the
numbers, but instead of returning the number of such items parsed, it
returns \-1, which should only happen if none are parsed.  A work
around seems to be to supply a trailing colon on the switch, so that
you write \fB\-o17:\fP instead of \fB\-o17\fP.
.TP
.B \-p
Inhibit font preloading.  This may produce output a few seconds
earlier when all pages are output, but should have negligible effect
on the execution time, and consequently, should normally not be
specified.  When individual pages are being printed with the
\fB\-o#\fP option, preloading is necessary (and will be forced) to
ensure that all fonts are defined before they are referenced.
.TP
.B \-q
Quiet mode.  Status displays to \fIstderr\fP are suppressed, unless
warning or error messages are issued.  For interactive devices
(\fIdvibit\fP), warning messages are suppressed.
.TP
.B \-r#
(Device = HP LaserJet only).  Specify the Laser Jet output resolution
in dots per inch.  \fI#\fP must be one of 75, 100, 150, or 300.  The
actual plot file is identical in each case; only the size on the
output page is changed, because the resolution change is effected by
printing 1 x 1, 2 x 2, 3 x 3, or 4 x 4 pixel blocks.
.TP
.B \-r
(Device = Golden Laser 100 only).  Select
run-length encoding of the output file.  This
reduces disk space typically by 10% to 40%, but
increases host CPU time for the preparation of
the output file.
.TP
.B \-r
(Device  = Apple ImageWriter only).   Select  run-length
encoding of the output file.
.TP
.B \-r
(Device = Toshiba P-1351 only).  Select
run-length encoding of the output file.  This
reduces disk space typically by 10% to 40%, but
increases host CPU time for the preparation of
the output file, and because of poor logic in the
printer, may double the print time!  The print
quality is also substantially worse, so this
option is generally
\fInot\fP
recommended.
.TP
.B \-s#
(Device = Apple LaserWriter only).  Force
characters larger than # pixels wide or high to
be reloaded each time they are required.  The
Version 23.0 PostScript interpreter has a bug
which manifests itself in fatal
\fIVM error\fP
messages when large characters are sent.  A
reasonable default value has been set for this
which should normally avoid the problem.
Specifying
.B \-s0
will cause reloading of
every character each time it is used.
.TP
.B \-v
(Device = Apple LaserWriter  only).  Force reloading  of
all required fonts at start of each page.
.TP
.B \-x#\fIunits\fP
The  \fB\-x\fP options specify the left margin of the TeX page on the
output page in any of the indicated units.  Letter case is not
significant in the units field, which must \fInot\fP be separated from
the number by any space. \fI#\fP may be fractional.  For example,
\fB\-x1.0in\fP, \fB\-x2.54cm\fP, \fB\-x72.27pt\fP, and \fB\-x6.0225pc\fP
all specify a one-inch left margin. Negative values are permissible, and
may be used to shift the output page left (possibly truncating it on the
left) in order to display a wide TeX page.

The \fIunits\fP field is mandatory, and may be one of
.RS
.TP
.B bp
big point (1in = 72bp)
.TP
.B cc
cicero (1cc = 12dd)
.TP
.B cm
centimeter (1in = 2.54cm)
.TP
.B dd
didot point (1157dd = 1238pt)
.TP
.B in
inch
.TP
.B mm
millimeter (10mm = 1cm)
.TP
.B pc
pica (1pc = 12pt)
.TP
.B pt
point (72.27pt = 1in)
.TP
.B sp
scaled point (65536sp = 1pt)
.RE
.TP
.B \-y#\fIunits\fP
The \fB\-y\fP options specify the top margin of the TeX page on the
output page.  Letter case is not significant in the units field, which
must \fInot\fP be separated from the number by any space.  # may be
fractional.  For example, \fB\-y1.0in\fP, \fB\-y2.54cm\fP,
\fB\-y72.27pt\fP, and \fB\-y6.0225pc\fP all specify a one-inch top
margin.  Negative values are permissible, and may be used to shift the
output page up (possibly truncating it on the top) in order to display a
long TeX page.

By decree of the Stanford TeX Project, the default TeX page origin
is always 1 inch over and down from the top-left page corner, even
when non-American paper sizes are used.  This corresponds to the switch
settings \fB\-x1in \-y1in\fP; these values are assumed unless
overridden.
.TP
.B \-z
(TOPS-20 or 4.xBSD Unix only).  For each DVI file processed, type
in an EXEC command \fBDVISPOOL: dvifilename\fP (on Unix,
\fBDVISPOOL dvifilename\fP) followed by a newline.  The user
should have defined \fIDVISPOOL:\fP (or \fIDVISPOOL\fP) to be a
program or shell script which sends the translation of the DVI
file to the appropriate output spooler.

.SH SAMPLE EXECUTION

Here is a sample execution of LaTeX and DVIALW extracted from
a TOPS-20 PHOTO log:

.nf
@latex biblio.ltx
This is TeX, Tops-20 Version 1.1 (preloaded format=lplain 84.9.29)
(APS:<BEEBE.PLOT79.DOCUMENTATION>BIBLIO.LTX.28
LaTeX Version 2.06a - Release 7 July 84
(APS:<TEX.LATEX>REPORT.STY.2
Document Style 'report'. Version 0.91 - released 25 June 1984
(APS:<TEX.LATEX>REP11.STY.2))
(APS:<BEEBE.PLOT79.DOCUMENTATION>MYBIBLIO.STY.1 Mybibliography
environment style - Version 0.0 - 15-May-86)
(APS:<BEEBE.PLOT79.DOCUMENTATION>BIBLIO.AUX.12) [0]
(APS:<BEEBE.PLOT79.DOCUMENTATION>BIBLIO1.LTX.3 [1] [2] [3] [4]
[5]) [6]
(APS:<BEEBE.PLOT79.DOCUMENTATION>BIBLIO.AUX.13)
(see the transcript file for additional information)
Output written on APS:<BEEBE.PLOT79.DOCUMENTATION>BIBLIO.DVI.1
(7 pages, 13960 bytes).
Transcript written on APS:<BEEBE.PLOT79.DOCUMENTATION>BIBLIO.LST.1.

@dvialw -x0.3in -y0.2in biblio bt:example
[TeX82 DVI Translator Version 2.0 for PostScript [Apple LaserWriter
laser printer]]
[Input from DVI file biblio.dvi]
[Output on file biblio.dvi-alw]
[7 pages]
[1500 magnification]
[7{6}] [6{5}] [5{4}] [4{3}] [3{2}] [2{1}] [1{0}]  [OK]
[Input from DVI file bt:example.dvi]
[Output on file bt:example.dvi-alw]
[1 pages]
[1500 magnification]
[1{1}]  [OK]

.fi

When the TOPS-20 version of TeX finishes execution, it
normally simulates terminal input of a line of the form

.nf
TeXspool: dvifile
.fi

without supplying a final carriage return.
The default value of the logical name \fITeXspool:\fP points to a
dummy program which does nothing, so if you just type a carriage
return yourself, the line is effectively ignored.  This is
reasonable in that it usually takes several trips through \TeX
before you have a \fI.dvi\fP file worth printing.  If you like,
you can redefine \fITeXspool:\fP to point to your favorite DVI
translator, for example,

.nf
define TeXspool: sys:dvialw.exe
.fi

Then when you type a carriage return when TeX finishes, it
will run the translator immediately, saving you a line of typing.
If you do not want the translator to run, just cancel the line by
typing \fBCtl-U\fP or \fBCtl-C\fP.

A sample invocation of DVITYPE is as follows:

.nf
@dvitype
DVIFILE    : story.dvi
OUTPUT     : tty:
This is DVItype, Tops-20 Version 2.8
Output level (default=3, ? for help):
Starting page (default=*):
Maximum number of pages (default=1000000):
Assumed device resolution in pixels per inch (default=300/1):
New magnification (default=0 to keep the old one):
Options selected:
  Starting page = *
  Maximum number of pages = 1000000
  Output level = 3 (the works)
  Resolution =  300.00000000 pixels per inch
numerator/denominator=25400000/473628672
magnification=1000;       0.00006334 pixels per DVI unit
' TeX output 1986.06.20:1039'
Postamble starts at byte 569.
maxv=43725786, maxh=30785863, maxstackdepth=3, totalpages=1
Font 33: amsl10---loaded at size 655360 DVI units
Font 23: ambx10---loaded at size 655360 DVI units
 .\|.\|.and so on.\|.\|.
.fi

.SH FONT SUBSTITUTION

If no \fB\-f\fP\fIfontsubfile\fP option is given, and font substitution
is required, if the current DVI file is \fIfoo.dvi\fP, then the
files \fIfoo.sub\fP, \fItexfonts.sub\fP, and
\fItexinputs:texfonts.sub\fP will be tried in order.  The first two
will be found on the current directory, and the last is the
system default.  This gives the option of document-specific,
user-specific, and system-specific substitutions, and the
\fB\-f\fP option allows all of these to be overridden.

Font substitution lines have the form:

.nf
.ta (\w'oldname.oldmag'u+2n) +(\w'->'u+2n) +(\w'subname.submag'u+2n)
% comment
oldname.oldmag	->	subname.submag	% comment
oldname oldmag	->	subname submag	% comment
oldname	->	subname	% comment
.fi

Examples are:

.nf
.ta (\w'oldname.oldmag'u+2n) +(\w'->'u+2n) +(\w'subname.submag'u+2n)
% These provide replacements for some LaTeX invisible fonts:
iamr10 1500	->	amr10 1500	% comment
iamr10.1500	->	amr10.1500	% comment
iamssb8	->	amssb8	% comment
.fi

The first  two  forms request  substitution  of a  particular  font  and
magnification.  The third  form substitutes an  entire font family;  the
closest available magnification to the  required one will be used.   Any
dots in  the  non-comment  portion  will be  converted  to  spaces,  and
therefore, cannot be part of a name field.

The first matching substitution will be selected, so
magnification-specific substitutions should be given first,
before family substitutions.

Comments are introduced by percent and continue to end-of-line,
just as for TeX.  One whitespace character is equivalent to
any amount of whitespace.  Whitespace and comments are optional.

.SH SCREEN CONTROL

At present, \fIdvibit\fP is the only family member which supports
interactive viewing of the TeX output.  The following
description therefore applies only to it, but the functionality
should be adhered to in any new interactive device drivers.

All switches, including the page selection (\fB\-o\fP) and page
origin (\fB\-x\fP and \fB\-y\fP) switches, work normally.  In order
to avoid unnecessary waste of screen space, you probably will
want to specify \fB\-x0in\fP and \fB\-y0in\fP to remove the default
one-inch left and top margins.  The \fB\-q\fP option is probably also
advisable to avoid warning messages, such as from font substitutions.

At beginning of page, a command and status menu is displayed at
the top of the screen.  When the end-of-page command is reached
in the DVI file, or as soon as keyboard input is available, the
driver will enter the end-of-page routine.  Any keyboard input
command is then read and acted upon; unrecognized input is
discarded with a warning beep.  The advantage of checking for
keyboard input during the main DVI reading loop is that unwanted
display can be avoided.  This is valuable if you are
repositioning the page, or skimming a document.  The EMACS text
editor uses much the same display algorithm---do nothing more to
the screen if a user command will probably invalidate it anyway.

The input can select
.RS
.TP \w'\(bu'u+2n
\(bu
redisplay of the current page, possibly shifting it up,
down, left, or right, to see more of it, or to restore a
display trashed by an unexpected system message or
transmission line error;
.TP
\(bu
continuation to the next page in the page list selected
by default or by the \fB\-o\fP option;
.TP
\(bu
backing up to the previous page (useful if you overshoot);
.TP
\(bu
display of an arbitrary page by typing its sequence number;
.TP
\(bu
termination of execution.
.RE

Although the menu  on the top line displays only a subset of
the possible commands, a number of synonyms are provided for user
convenience.  In particular, arrow keys in VT52 and VT100 modes
are recognized, as are EMACS control-character commands to move
the cursor or page display.  Commands are provided for  both
coarse and fine adjustment of page position.

Here is the current command list.  Input is immediate; no
terminating carriage return is necessary.  Consequently, typing
error correction is supported only for the digit string command;
it ends at the first non-digit typed.

.RS
.TP
.B D
Move the display down by 1/8 of screen size.
.TP
.B U
Move the display up by 1/8 of screen size.
.TP
.B L
Move the display left by 1/8 of screen size.
.TP
.B R
Move the display right by 1/8 of screen size.
.TP
.B "d \fRor\fP Ctl-N \fRor\fP down-arrow"
Move the display down by 1/64 of screen size.
.TP
.B "u \fRor\fP Ctl-P \fRor\fP up-arrow"
Move the display up by 1/64 of screen size.
.TP
.B "l \fRor\fP Ctl-B \fRor\fP left-arrow"
Move the display left by 1/64 of screen size.
.TP
.B "r \fRor\fP Ctl-F \fRor\fP right-arrow"
Move the display right by 1/64 of screen size.
.TP
.B ". \fRor\fP Ctl-L"
Redisplay current page.
.TP
.B @
Redisplay current page with \fIstartup\fP page positioning.
.TP
.B "CARET \fRor\fP BACKSPACE"
Redisplay previous page.
.TP
.B nnn
nnn is a digit string; DELETE/RUBOUT and BACKSPACE keys correct
typing errors in it.  Move to \fBnnn\fP-th page, where document
pages are numbered 1, 2, .\|.\|..  The TeX page numbers are
displayed in the status window. This is a recursive display; if
you respond at end-of-page with a \fInext-page\fP command,
display will revert to the page sequence you were viewing when
you first issued the \fBnnn\fP command.
.TP
.B "SPACE \fRor\fP RETURN \fRor\fP Ctl-V"
Display next page.
.TP
.B "Q \fRor\fP q \fRor\fP X \fRor\fP x"
Quit or exit.  The screen will be cleared and the terminal
restored to its normal font and emulation mode.
.TP
.B Z
Zoom up one magstep (1.2 times larger) from current size.
.TP
.B z
Zoom down one magstep (1.2 times smaller) from current size.

It is likely that some font magnifications will be unavailable
for zooming, so do not be alarmed if some characters are
displayed as blanks when you do this.  You can use the font
substitution mechanism (\fB\-f\fP option above) to work around
this, or you can ask your font administrator to generate the
required magnifications.  When font substitution happens because
of an unavailable magnification, characters of an incorrect size
are used with the spacing required for the font which TeX used,
so output is likely to look peculiar.

To avoid exhausting the terminal's font memory, larger characters
as sent as raster bitmaps each time they are used, rather than as
downloaded fonts, making the screen display much slower.  The
size limit is large enough that this should not be necessary
except at large magnifications.
.RE

.SH SPECIALS

The TeX \fB\\special{}\fP command is intended to allow the
specification in a \fI.tex\fP file of a request to the DVI
driver, usually for the insertion of graphical material at that
point in the document.  It is currently implemented only for
\fIdvialw\fP; other drivers will simply issue a warning message.

The TeX \fB\\special{}\fP command is expected to look like one
of the following:

.nf
    \\special{overlay filename}          % absolute positioning
    \\special{include filename}          % relative positioning
    \\special{insert filename}           % relative positioning
.fi

In the first case, the PostScript file to be included will be
mapped onto the page at precisely the coordinates it specifies.
In the other two cases, the upper-left corner of the bounding box
will be placed at the current point.  The PostScript file must
then contain (usually near the start) a comment of the form

.nf
%%BoundingBox: llx lly urx ury
.fi

specifying the bounding  box lower-left and  upper-right coordinates  in
standard PostScript units (1/72 inch).  Alternatively, if the comment

.nf
%%BoundingBox: (atend)
.fi

is found in  the file,  the last  1000 characters  of the  file will  be
searched to find a comment of the form:

.nf
%%BoundingBox: llx lly urx ury
.fi

If the PostScript file cannot be opened, or the
\fB\\special{}\fP command string cannot be recognized, or for
relative positioning, the bounding box cannot be determined, a
warning message is issued and the \fB\\special\fP command is
ignored.

Otherwise, the section of the PostScript file between the
comment lines

.nf
%begin(plot)
%end(plot)
.fi

is copied to the output file surrounded by

.nf
save
300 72 div 300 72 div scale % revert to standard 1/72 inch units
% if relative positioning, then
% (xcp(in 1/72in)-llx) (ycp(in 1/72in)-ury) translate
 .\|.\|.PostScript file contents.\|.\|.
restore
.fi

Plot files produced by PLOT79 have all the expected commands in
them to allow their use in TeX \fB\\special{}\fP commands.
The two PLOT79 parameters which influence the size of the plot
are

.RS
.TP \w'\(bu'u+2n
\(bu
the device size specified in the call to \fISETSZ()\fP; it
defaults to 11in if \fISETSZ()\fP is not called.
.TP
\(bu
the device space specified in the call to \fISETDS2()\fP or
\fISETDS3()\fP; it defaults in the CORE system to the unit
square, but if the PLOT79 framing routines are called, they
will reset the device space to a horizontal or vertical
frame in proportions of the local standard paper size (1 :
8.5/11 in the USA).
.RE

For example, if a device size of 5in is specified for a
standard horizontal frame, the bounding box will be declared to
be 5in wide and (8.5/11)*5in = 3.8636in high, so a
TeX manuscript requiring the plot could have the following
commands at the start of a new paragraph:

.nf
\\special{include plotfilename}
\\vspace*{3.9in}
.fi

.SH ENVIRONMENT VARIABLES

The behavior of the DVI translators can be influenced by
definition of logical names on TOPS-20 and VAX VMS, or
environment variables in Unix and PC DOS.  Compiled-in
internal defaults will be provided for any of these which are not
defined.   They \fImust\fP be entirely in upper-case, since that
is conventional on Unix systems.  The names currently recognized
are as follows:
.TP \w'TEXINPUTS'u+2n
DVIHELP
This variable defines an alternate help string which  is
typed when the  user makes  an input  error.  It  should
direct  the  user  to  additional  documentation.    For
example, on TOPS-20, it might be ``try HELP
DVI or XINFO DVI''.
.TP
FONTLIST
Normally, the drivers are prepared to search first for \fI.pk\fP,
then \fI.gf\fP, then \fI.pxl\fP font files. This variable can be used to
change this search order, or remove one or more of the possibilities.
It is expected to contain at least one of the strings ``PK'', ``GF'',
or ``PXL'', possibly separated by arbitrary punctuation and other text.
This flexibility is necessary because some operating systems expect
environment variables to conform to some syntax, such as that of a file
name.  Letter case is \fInot\fP significant.    Some acceptable strings
are ``PXL-then-PK-then-GF'', ``pk.gf'', ``use-only-PXL-fonts'', and
``PXL/GF/PK''.
.TP
TERM
This variable is used only for \fIdvibit\fP; if it does not
evaluate to either ``bitgraph'' or ``bg'', \fIdvibit\fP will
refuse to run.  On Unix, this is the conventional way of
defining terminal types with the \fItermcap\fP or
\fIterminfo\fP systems.  This variable is ignored on VAX
VMS, since the VMS C library sets it to a value which can
never be ``bitgraph'' or ``bg''.
.TP
TEXFONTS
This defines the directory path for finding font  files. Its value is
\fIprepended\fP to the name of a \TeX font to  get a full file
specification.  A typical value in Unix for \fITEXFONTS\fP would be
\fI/usr/local/lib/tex/fonts/\fP.  On TOPS-20, font \fIcmr10\fP on a
300-dot/inch device might correspond to the files
\fItexfonts:cmr10.300gf\fP, \fItexfonts:cmr10.300pk\fP, or
\fItexfonts:cmr10.1500pxl\fP.
.TP
TEXINPUTS
This defines the directory path for finding files  which
are not in the current working directory.
It is \fIprepended\fP to file names.  A typical value in Unix
would be \fI/usr/local/lib/tex/macros/\fP.

.SH IBM PC CAVEATS

The latest version of the drivers has been compiled with
Microsoft C Version 4.0.  With Version 3.0, some \fI.dvi\fP files
experienced a fatal \fIfloating-point stack overflow\fP
error both with and without a floating-point coprocessor; this
can only be due to code generation errors, and it disappeared
with Version 4.0.

PC DOS by default has only a small number of available open
files, and this number is not adequate for the drivers with
the value of five for \fIMAXOPEN\fP set in \fImachdefs.h\fP.
You need to increase the limits by entering the lines

.nf
FILES=10
BUFFERS=10
.fi

in the \fIconfig.sys\fP file in the boot directory, then
reboot the system to have the new values take effect.
Larger values are of course possible, though \fIFILES=20\fP
is the limit with current versions of PC DOS.  Run-time
performance can be quite sensitive to these settings, so you
may wish to experiment.

If there is no \fIconfig.sys\fP file, or the settings of
\fIFILES\fP and \fIBUFFERS\fP are too small, you will find the
disk whirring madly while the driver attempts to open font files
with neighboring magnifications, and then it will finally die
with a message \fIunable to open .err file\fP.  Use of the
\fB\-d24\fP option may be useful in tracking how many files can
successfully be opened.

The drivers have been loaded with the default Microsoft
floating-point library; the compiler generates calls to
library routines which test a flag initialized at startup
time which indicates the presence or absence of the
floating-point coprocessor chip.  If it is available, the
library routines will automatically use it.  You can force
the chip to be ignored by defining an arbitrary non-empty
string value for the environment variable
\fINO87\fP, for example

.nf
set NO87=no-8087-available
.fi

When the DVI translator runs, the value of this variable should
be typed on the screen as the first output line.  On a Leading
Edge PC, this typeout does not appear, for unknown reasons.  On a
4.77MHz IBM PC XT, the translators run twice (!) as slowly when
\fINO87\fP is defined.

The reason that you might need to know this is that the method
employed by the library routines for detecting the presence or
absence of an 8087 (or 80287) chip is not infallible, thanks to
design flaws of some PC's and possibly also the Intel chips.  It
is conceivable that the library might think a coprocessor chip is
present, when in fact it is not, and the first floating-point
instruction executed would hang the machine.

.SH FILES

The values of \fItexinputs:\fP and \fItexfonts:\fP below are
system-dependent. On Unix systems, typical values are
\fI/usr/local/lib/tex/macros/\fP and \fI/usr/local/lib/tex/fonts/\fP.

.TP \w'texinputs:texfonts.sub'u+2n
.I *.dvi
TeX DeVice Independent output file
.TP
.I *.dvi-err
TeX DVIxxx translator error log
.TP
.I *.err
TeX DVIxxx translator error log when long extensions are not available
.TP
.I *.dvi-xxx
TeX DVIxxx translator output file
.TP
.I *.xxx
TeX DVIxxx translator output file when long extensions are not
available
.TP
.I *.sub
DVI file-specific font substitution file
.TP
.I DVISPOOL
Environment variable (4.xBSD Unix only) defining program or shell script
which sends translation of DVI file to the appropriate output spooler.
.TP
.I DVISPOOL:
Logical name (TOPS-20 only) defining program which sends translation
of DVI file to the appropriate output spooler.
.TP
.I texfonts.sub
Job-wide font substitution file
.TP
.I texfonts:*.*pxl
TeX default font rasters
.TP
.I texfonts:*.*gf
TeX default font rasters
.TP
.I texfonts:*.*pk
TeX default font rasters
.TP
.I texinputs:dvialw.ps
PostScript header file containing standard macro definitions prefixed
to PostScript output from dvialw
.TP
.I texinputs:texfonts.sub
System-wide font substitution file

.SH "SEE ALSO"

dvitype(1),
latex(1),
tex(1),
tr2tex(1),
\fILocal LaTeX Guide\fP,
\fIA TeX DVI Driver Family\fP.

.SH BUGS

Bugs in either the software or its documentation
should be reported by electronic or postal mail to

.nf
Nelson H.F. Beebe
Center for Scientific Computation
220 South Physics Building
University of Utah
Salt Lake City, UT 84112
USA

Tel: (801) 581-5254
EMAIL: Beebe@Science.Utah.Edu (Internet)
.fi

An active electronic mailing list for news about the DVI driver family
development is maintained by the author at the above net address.  Send
requests there if you wish to be on it.

.SH AUTHORS

David Fuchs at Stanford University wrote \fIdvitype\fP in
\fIweb\fP
and defined the DVI file format.

Mark Senn at Purdue University wrote a preliminary version of the BBN
BitGraph driver in C, using \fIdvitype\fP as a model.  Stephan v.
Bechtolsheim and Bob Brown at Purdue, Robert Wells at BBN, and Jim
Schaad and Richard Furuta at the University of Washington, improved
it.

Contributions for PostScript devices came from Neal Holtz at Carleton
University.  Simon Barnes of Schlumberger Cambridge Research Ltd., and
Robin Rohlicek at BBN provided useful additions to the BBN BitGraph
driver which have been generalized and incorporated in Version 2.07.

The transformation to about a dozen other device drivers,
the massive code rearrangement for many new features and
easy identification of host- and device-dependent sections, plus
support for \fI\.pk\fP and \fI\.gf\fP
compact font files, was carried out at the University of Utah by
Nelson H.F.  Beebe.  He also wrote the documents
\fIA TeX DVI Driver Family\fP
and
\fIUsing LaTeX at the University of Utah College of Science DEC-20\fP.
The first describes all of these drivers in detail,
and the second is the
\fILocal LaTeX Guide\fP.

Lon Willett at Utah adapted \fIdvijep\fP to make \fIdviimp\fP for the
Imagen laser printer family.

John Sauter adapted one of the low-resolution printer drivers to produce
\fIdvil75\fP for the DEC LA75 printer, and \fIdvil3p\fP for the DEC LN03
Plus laser printer.

Norman Naugle and colleagues at Texas A&M implemented the
family on several new systems.