mb@rex.cs.tulane.edu (Mark Benard) (08/02/89)
I am trying to use the supposedly device independent troff that Pyramid includes in .attlib. When I do not specify a typesetter, it defaults to aps. When I specify -Talwp, it gives me output which programs like dvi2tty and dvi2ps say is not a dvi file. How do I get a dvi file as output? -- Mark Benard Department of Computer Science INTERNET & BITNET: mb@cs.tulane.edu Tulane University USENET: rex!mb New Orleans, LA 70118
chris@MIMSY.UMD.EDU (Chris Torek) (08/02/89)
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