Need help with dvi troff

Chris Torek chris at MIMSY.UMD.EDU
Wed Aug 2 08:10:39 AEST 1989


Device-Independent troff (ditroff) does not write TeX dvi (DeVice
Independent) files.  Indeed, the output from ditroff is different for
every device, and not device-independent at all.  The `di' in `ditroff'
really means that ditroff can read a typesetter machine description
file, and base its calculations and output thereon.  Thus, you need a
ditroff -> device conversion program for each device, and each ditroff
-> device program is quite different; none are very similar (or even at
all similar) to TeX dvi -> device programs.

Given this description, it might sound like one could write a machine
description file for ditroff that caused it to produce TeX dvi files.
This is not the case.  One *could* write a machine description file
that produced files that could be transformed into dvi files, although
the quality of the transcription might suffer.  The basic problem here
is that TeX works in 32 bit representations called `scaled points'
that are 1/65536th of a point, while ditroff works in the eventual
output device's resolution and keeps all its quantities as 16-bit
values.  Any attempt to use TeX-like resolutions would cause overflow.
To allow full use of TeX's 16383 point magnitudes---the `expected'
32767 point magnitude from signed 32 bit scaled point values does not
materialise due to worries about overflow---one would have to give
ditroff a 1/4 point resolution, which is far too low to hide rounding
errors (an error of 1 would be slightly more than 1 pixel at 300 dpi).

Of course, no one uses such large values, but the basic problem remains.
It is better to use ditroff in its intended manner, although this makes
previewing more difficult (one needs one previewer per output format,
or else one must preview something other than the eventual output).
In short, let ditroff produce dvd (`DeVice Dependent') files, and
let TeX produce dvi files, and try not to mix them up.

Chris



More information about the Comp.sys.pyramid mailing list