Xref: utzoo comp.text:7807 comp.text.tex:4545 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!munnari.oz.au!csc.anu.edu.au!csis!ken From: ken@csis.dit.csiro.au (Ken Yap) Newsgroups: comp.text,comp.text.tex Subject: Re: Using TeX for the UNIX man pages Message-ID: <1990Dec28.003306.12375@csis.dit.csiro.au> Date: 28 Dec 90 00:33:06 GMT References: < Organization: CSIRO Division of Information Technology Lines: 81 In article : ||No, the device file would still be device independent -- the contents ||would be tailored for a specific device. Notice that DVI files are ||already now tailored for a specific device (device dependent in your ||sense) in two ways: the first is that each DVI file is for a device with ||a specific set of fonts, and the second is that it is for a device with ||1/65k resolution. If your actual output device does not have that set of ||fonts or that resolution the DVI driver has to make some mapping. This is correct as far as it goes, but slightly misleading. See last paragraph. ||To assist in the mapping betwen the idealized device presumed by current ||DVI files and the actual one is the reason why virtual fonts exist and a ||standard rounding algorithm is being defined. There is a slight historical distortion here. Virtual fonts came onto the scene only recently although Knuth has bemoaned that nobody had implemented this neat and general solution sooner. Before then, people were using installation specific methods to drive phototypesetters and what have you. The standard rounding algorithm, also known as the max_drift rule, is indeed the compromise that the driver makes to adapt to the real device. ||There is another alternative, and it is to produce a DVI file that is ||tailored not for an idealized device but for an actual device, so that ||no mapping is required for that actual device. Since the DVI output ||would still be device independent in format, one could take the DVI file ||tailored for a specific device and map it onto another device, and this ||would be more or less successful depending on how similar the devices ||were. || ||The problem with the 1/65K resolution, CM fonts based idealized device ||for which DVI files are currently tailored is that it is hard to map ||onto lower resolution actual devices, especially those that have fixed ||pitch characters and motions, like a CRT or a line printer. This is true, but no changes need be made to the innards of TeX. All you have to do is force TeX, via fonts and macros, to calculate in multiple of fixed pitch spacing. The other work that needs to be done is to map characters to the closest printable representation, in the same way that nroff overstrikes o and + for a bullet. Virtual fonts can help here. Dvidoc is a start but needs a lot more work. ||This is the *goal*, but the actual TeX mechanism is far more general. ||The virtual device for which by default TeX output is currently tailored ||does indeed map most easily onto a high resolution typesetter, but I ||think that it is possible to describe to TeX different output devices. || ||Note that all this is already true with ditroff, where you have a ||something (DESC) like a TFM that gives you the parameters of the ||intended output device. A ditroff output file is device independent, in ||that it can be printed on any device, but tailored (optimized) for a ||specific device. || ||TeX is used as the old C/A/T troff is being used, as currently TeX DVI ||drivers do what psroff does, mapping a virtual (C/A/Ts are no longer ||manufactured :->) device onto real ones. The only advantage of the CM ||based, 1/65k virtual device assumed by TeX is that it is richer than the ||old C/A/T one. || ||I am not a TeXnician, but I think this is not true. You can do fixed ||pitch printing with TeX, both as to fixed width letters and interword ||and interline spacing, e.g. for code listings. I reckon that it is time ||for TeX to realize its potential as a ditroff, not as a troff tied to ||one specific virtual output device to be mapped more or less neatly onto ||actual devices. But here's the gist of my argument: Piercarlo argues about the 1/65k pt resolution of TeX's ideal device as if it were a limitation. In fact since no actual device exists with this resolution, it is misleading to say that TeX is tailored to "one specific virtual output device". In fact, no such device is likely to be made: near beginning of the TeXbook we read that 1/65k pt is a length comparable to the wavelength of light. In summary: 1. I do not see that rounding from scaled points to real device resolution is any sort of limitation so I don't see that we have to follow the ditroff path, and 2. Quantizing TeX's spacings requires only some work with fonts and macros. Character substitution should use virtual fonts of course.