troff & nroff

Chip Rosenthal chip at chinacat.Unicom.COM
Thu Jul 19 13:18:35 AEST 1990


A couple of weeks back I promised the comp.unix.xenix readers a summary
of my evaluations of DWB for a LaserJet under SCO XENIX 386.  Rick's
summary lays out most of the sensible alternatives.  I'll add a few
nonsensible ones for the very cost conscious folks :-)  My testing was
performed on a system running SCO XENIX 3.2.1.

First off, here are the low-cost options which Rick doesn't cover.  These
will most likely be of interest only to SCO XENIX users.  If you've got
the text processing package, you've got nroff and a crippled troff, but
no reasonable LaserJet capability.  If you are a UNIX user, it would be
silly to spend the money to get a broken troff when you can get a working
one elsewhere for only a little more money.

1)  Use nroff.  You can cobble together a /usr/lib/term/tabXX table which
    will drive the LaserJet.  This will give you access to roman, italic,
    and bold in a single font size.  You can get half-line motions, and
    thus play with equations a bit.  And if you are really perverted, you
    can get the special characters.  The problem is that the XENIX package
    is 7-bit - nroff can't generate 8-bit characters, and col will eat
    them even if it could.  My solution was to generate a 2-byte code for
    the 8-bit characters, the first byte being a flag ('\0177') saying
    set the MSB of the next byte.  A filter follows nroff to do the
    translation.  And "col" is avoided at all costs.

    If this is of interest to you, I can probably dredge up my old nroff
    driver table generator and the "colpr" filter which does the 8-bit
    character hack.

2)  Use otroff.  The SCO text processing package includes a crufty, old
    troff which emits codes for a Wang C/A/T typesetter.  Thus, your
    problem is to convert this stuff to PCL a LaserJet understands.
    Rick's "jetroff" postprocessor does a dandy job of driving a LaserJet,
    but it only understands device independent troff output.  Thus, the
    problem now becomes translating the C/A/T data to dit.

    I am aware of two tools which do this.  One is called "CAT2dit".  It
    was written Greg Sassenrath and posted to the net a while back.
    Unfortunately, this does not provide for communication of font metrics
    between troff, CAT2dit, and jetroff's djet program, and thus the
    results were unusable.  Mike Slifcak hacked on CAT2dit, made it a bit
    smarter about the fonts provided with jetroff, and cleaned it up to
    the point where results are now readable, but in my opinion still
    unacceptable.

    The second tool is "psroff" by Chris Lewis.  I have not used this
    program myself.  However, from the description it sounds like it has
    a lot better font handling capabilities, and if you are faced with
    making the otroff work, you might want to investigate this route.

Those are the crummy approaches.  The sane ones, involve getting a
real DWB, and Rick gave a good rundown.  I have tried three of the
options on his list:

  - Image Network's xroff

  - ISC's Text Processing Workbench + jetroff

  - Elan's eroff + jetroff

In all three cases, I evaluated the UNIX/386 version of the package, and
used the SCO /usr/bin/coffconv utility to convert the coff executables
to x.out format.  All things seemed to work fine, except "pic" whereby
all versions would dump core on particular files.  I have to wonder if
there might be an issue with the floating point emulation when you run
stuff through coffconv.

The cheapest approach is ISC's TPW.  However, it gave me the least
satisfactory results.  You do get a full DWB 2.0 including the nifty
preprocessors.  However, for some reason the inter-character spacing
seemed off a bit.  I assume it was either an ISC bug or an ISC/jetroff
interaction issue (or a relic of the coffconv conversion).  While not
optimal, the results were certainly acceptable.  And thus if you are
looking at the cheapest way to a real troff, this might be a reasonable
approach.  Be warned, however, if you try to run this on XENIX, the
distribution is System V filesystem floppies, and thus you'll need a UNIX
machine to mount them and tar up the files for transport to the XENIX
machine.

I spent quite a bit of time playing around with the Image Network xroff.
Of all the solutions I looked at it is strongest in two areas:  installation
and fonts.  I didn't have to mess around with System V filesystem floppies
or integrating various pieces together.  They *do not* offer an all-singing,
all-dancing install script, you just unload the tape and put files where
you want them.  You will have to manually go in and edit the xroff script
for your setup.  However, if you feel comfortable with minor shell hacking,
then this is no hassle.  Configuration scripts are nice if I want to install
the software where the vendor wants and the way he or she wants.  Maybe
someday I'll find a vendor who know my machine better than me, and their
install script will work fine.  Until that day, I'd prefer the approach
xroff uses.  (One exception to the above is that you are still going to
have to put the tmac.* files in /usr/lib/tmac.  Or do as I did - put in
dummy files which so'ed the real tmac files.)

The other nice point is that Image Network has a very rich collection of
good quality fonts included in their package.  I ended up deleting fonts
because there were so many more than I would ever use.  I did find a
couple of small bugs (the "i" in 13pt Helvetica is hosed), but on the
whole extremely good quality.  By the way, the XENIX version is older than
their UNIX version, and the font assortment is nowhere as nice.

There are a couple of problems with this package.  My biggest problem is
that the backend is closed, which means you can only use their fonts and
postprocessors.  If all you want is there, fine, otherwise you are stuck.
For example, bitmap inclusion is not supported yet.  If the backend were
open, I could have put jetroff there and done it that way, but I couldn't.
Another minor drawback is that this isn't a full DWB, so you don't get
things like checknr and soelim.  Nits, but if you need them you need
them.

The final approach I tried was Elan's eroff.  I've avoided Elan for one
reason.  I thought their font policy was a scam.   You spend almost 900
bucks to get a DWB, and surprise, it's a useless piece of bits because
there are no fonts.  But rejoice!  They've seen the light.  Recently
they've started shipping Times Roman and Helvetica fonts with the package.
I haven't seen them, so I don't know how good they are, but I think it's
important they provide at least something.

Because I didn't have the fonts, I drove the printer with jetroff on the
backend to use it's fonts.  Finally, everything fell into place.  I had
all the features I wanted, was getting reasonable quality output, and all
the various roff things I've collected over the years seemed compatible.

In article <1990Jul13.152632.5779 at pcrat.uucp>
    rick at pcrat.UUCP (Rick Richardson) writes:
>If someone can fill me in on the details I'm missing, I'd appreciate it.

Hokay.

>	- Get SCO Eroff for $895. (408) 425-7222.

Don't bother.  SCO isn't carrying eroff at the moment.  Go right to the
source -- Elan Computer Group at 415-964-2200.  They have 286 XENIX,
386 XENIX, and 386 UNIX versions for $795, $895, and $895, respectively.

>	- Get Image Network's xroff.  Sorry, I don't have a price.
>	  (415) 967-0542.  I have reports that it may be difficult
>	  or impossible to use alternate device postprocessors with
>	  xroff.  They have an X-windows previewer.

It is $950 for the 2-user version.  They have both XENIX and UNIX versions.
The XENIX version appears to be behind the UNIX one.  I didn't play with
the X previewer, but it does sound very nice.  Even though I didn't go with
their product, they were very helpful and were good folks to work with.

So, to make a boring story long, after months of looking around, I decided
that Elan was the way to go.  Now, I'm in the market for some good fonts :-)

-- 
Chip Rosenthal                            |  You aren't some icon carved out
chip at chinacat.Unicom.COM                  |  of soap, sent down here to clean
Unicom Systems Development, 512-482-8260  |  up my reputation.  -John Hiatt



More information about the Comp.unix.i386 mailing list