Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime!lyle.austin.ibm.com!peterson From: peterson@lyle.austin.ibm.com (James L. Peterson/1000000) Newsgroups: comp.text Subject: Re: International (8 bit clean) troff proposal Message-ID: <4657@awdprime.UUCP> Date: 3 Jan 91 14:55:43 GMT References: <1990Dec27.155046.14520@cbnewsl.att.com> <1991Jan2.024946.10442@blilly.UUCP> <679@silence.princeton.nj.us> Sender: news@awdprime.UUCP Organization: IBM AWD, Austin Lines: 73 In article <679@silence.princeton.nj.us> jay@silence.princeton.nj.us (Jay Plett) writes: >That's misleading. Ditroff output is not only device dependent, it >is dependent on a particular set of width tables for a particular >device. Ditroff and the postprocessor MUST use the same set of >width tables. Ditroff outputs motions that are derived from the >width tables. Moreover, when a character does not exist in the >current font, no font change is encoded in ditroff's output. >Ditroff assumes that the postprocessor will not only have the same >widths, but that it will also use the same strategy for noticing >that a font change is necessary and for finding the same character >in the same font that ditroff found it in. That's not really true. Ditroff dvi codes include the output motions that troff expects as a result of output. This means that the post processor need not have any width tables at all, IF the output device does not automatically move after each output character. Thus, troff dvi will include "46z37o29t" which means to move 46 units, output a 'z', move 37 units, output an 'o', move 29 units, output a 't', ... ALL movement is explicit in the dvi file. Contrast this with TeX dvi which assumes that the postprocessor "knows" the same character widths as TeX did. TeX dvi would include only "zot" and would expect that the postprocessor would know the width of the characters and would move the "right" amount. This means that TeX dvi is smaller (doesn't have to include all the movements that are almost always the same for all the characters), but also means you have no idea where to put characters without the width tables. troff dvi, on the other hand, can easily be interpreted without the character width tables, or with other width tables. The position of each and every character is completely determined by the dvi file. Now if you don't have the right fonts (like you are printing on a different output device than the file was produced for), the characters will look strange, but each and every one will be in exactly the right place. I have used this in two ways: (1) it is easy to write a screen display for troff dvi that will preview a document at different resolution and with different fonts (screen fonts rather than printer fonts). The output is not as readable, but it shows the correct placement of the characters, so you can see margins, tables, and if expanded enough is still quite readable. (2) I can take documents that are meant for a typesetter at one site, ship them across country and print them on a laser printer of different resolution with different fonts with ease. The post processor has to be aware of the difference in font tables and be willing to substitute or ask for font substitutes (but with troff's R, I, B fonts it is fairly easy to substitute. Even the special two-character names are portable.) and it must distinguish between the input resolution (of the dvi file) and the output resolution (of the output device) which may be different, and be prepared to scale accordingly. Neither of these is possible/easy with TeX dvi, unless you have the exact same character font tables. >If the same device will be used, there's no harm in distributing >postprocessor output. It would be rash to distribute ditroff output >and expect it to print correctly, quite possibly even among similar >systems at the same site. > A lot of this statement depends on what "print correctly" means. If you mean print and look like it was formatted for the device that it was printed on, this is a reasonable statement, but if you mean "print correctly" to mean "put each character exactly where troff wanted it to be" (even though the characters are a different font, and probably different widths), troff dvi is great for this. James L. Peterson (peterson@futserv.austin.ibm.com) -- James L. Peterson IBM Advanced Workstations Div. !'s: cs.utexas.edu!ibmchs!peterson 11400 Burnet Road, MS 2812 @'s: @CS.UTEXAS.EDU:peterson@ibmchs.uucp Austin, Texas 78758 !&@: ibmchs!peterson@CS.UTEXAS.EDU