Path: utzoo!utgpu!cunews!micor!latour!ecicrl!clewis From: clewis@ferret.ocunix.on.ca (Chris Lewis) Newsgroups: comp.text Subject: Re: troff for uncooperative systems Message-ID: <1280@ecicrl.ocunix.on.ca> Date: 6 Feb 91 06:22:44 GMT References: <20836@know.pws.bull.com> Organization: Elegant Communications Inc., Ottawa, Canada Lines: 83 In article <20836@know.pws.bull.com> C506634@UMCVMB.MISSOURI.EDU (Eric Edwards) writes: >In Message-ID: <1241@ecicrl.ocunix.on.ca> > clewis@ferret.ocunix.on.ca (Chris Lewis) said: >>In article <20723@know.pws.bull.com> C506634@UMCVMB.MISSOURI.EDU (Eric Edwards) >>>I've come across a bunch of troff files that I would like to print out. >>>Unfortunately, I don't have a convienent Unix box with a laser printer. >>The simplest approach would be to >> 1) ensure that the remote unix machine has a troff of some sort. > Got that. >> 2) ensure that the remote unix machine can print on HP's or >> Postscript printers. > No can do. It outputs to CATFOR typesetters only. I think you mean just "CAT" (aka Wang C/A/T Phototypesetters) >> 3) run troff on the remote system and produce postscript or HPPCL. >> 4) put the result on a floppy (or, via network connection) >> 5) print it on your Laserwriters or the HP's. >>(2) is probably the hard part. If the remote UNIX system has CAT troff, >>psroff (which I wrote) will produce postscript or HPPCL. With psroff you [oops, meant ---------------------------------------------------Postscript you >>wouldn't need to worry about the fonts either. >How portable is psroff? Is there any hope that I could get it to compile under >CMS, MS-DOS, MacOS or AmigaDOS? Weeeelll, my original suggestion is that you install psroff on the UNIX system. I think that machine's owners would be quite appreciative of it. You'd only be using your machine for the actual printing itself. However, since you insist ;-) Most of psroff won't be very useful to you on non-UNIX systems because you won't have CAT troff. Therefore, the idea is to run troff on the UNIX machine, capture the output with something like this: troff -t > CATfile and transport it to the machine you choose. On this second machine, you've compiled the "troff2ps" program from the psroff distribution, and then you run the equivalent of this: troff2ps -Tps < CATfile | w Troff2ps is quite portable amongst UNIX systems, and the more machine dependent bits are bells and whistles you won't need (eg: Postscript commentary about what the name of your machine is and the Postscript optimizer - you can safely comment out such cruft if it doesn't compile). So, if you have a good C compiler, carefully configure the defs.h file, and do a bit of suitable chopping (I'll assist if you desire), you'll be able to get it to compile. I recommend your postscript printers because you won't have to deal with all the font downloading crap for Laserjets and can just deconfigure it. The final remaining gotcha is that the width tables on the UNIX system, with which the UNIX troff will be calculating character placement, won't match the widths on your printer. Psroff comes with stuff to install new widths on the UNIX system for troff to use via the "-T" or "-F" options (what kind of UNIX is it?). So, for best results, you'll have to install the widths. I could ship you the requisite width tables in binary if you desire, but you'll have to get the UNIX administrator to install them (unless their troff supports the -F option). The widths already on the remote UNIX machine may be good enough for your purposes. If you figure that this is feasible, we can continue this discussion via e-mail. >(in case you're wondering. Yes, I do have a C compiler for CMS) That's not altogether surprising, there are several CMS C compilers available, I used one back in '82, and I believe that one was around since around '78. -- Chris Lewis, Phone: (613) 832-0541, Internet: clewis@ferret.ocunix.on.ca UUCP: uunet!mitel!cunews!latour!ecicrl!clewis Moderator of the Ferret Mailing List (ferret-request@eci386) Psroff enquiries: psroff-request@eci386, current patchlevel is *7*.