[comp.text] groff/ditroff compatibility

jjc@jclark.UUCP (James Clark) (09/07/89)

A number of people have suggested that groff should produce ditroff
compatible output. Initially I wasn't very keen on this since it
involved a lot of extra work, but I want groff to be used and people
seem to want ditroff output format, so I have decided to support it.

I now have two separate versions of groff: one that supports TeX dvi
and PostScript formats and one that supports ditroff output format.
Unfortunately the differences between the two are rather extensive.
For example, the dvi version takes the TeX approach to rounding -- it
leaves it up to the driver to round motions to multiples of the output
device's resolution -- whereas the ditroff version takes the troff
approach and does the rounding to device resolution itself. This
difference manifests itself throughout the program.

Maintaining two separate versions is a lot of additional work; so my
current inclination is to ditch the dvi version and go with the
ditroff version.  I don't think the technical arguments are conclusive
in favour of either output format.  But those whose needs are best met
by dvi output format already have the option of using TeX. I think
groff should serve those who prefer the ditroff approach to device
independent output.  The dvi version had some input incompatibilities
with ditroff caused by the different approach to rounding; I have been
able to eliminate these in the ditroff version. It was also not
possible to support some ditroff features (\S and \H) when producing
dvi output.

My main problem with ditroff compatibility is the font metric format.
The binary ditroff font format is rather inflexible and lacks
important information; in particular, there's no pairwise kerning
information.  I can't live with that. So I have made groff read the
ascii ditroff font format, but with a few (completely optional)
extensions. For example, to make groff do pairwise kerning you just
add a section like this (immediately before or after the charset
section):

kernpairs
A   V   -12
A   W   -8

This provides ditroff compatibility without crippling groff's
capabilities.

James Clark         jjc@jclark.uucp   uunet!mcvax!ukc!jclark!jjc

wnp@attctc.Dallas.TX.US (Wolf Paul) (09/09/89)

In article <JJC.89Sep7135705@jclark.UUCP> jjc@jclark.UUCP (James Clark) writes:
 >I now have two separate versions of groff: one that supports TeX dvi
 >and PostScript formats and one that supports ditroff output format.
 > ...
 >My main problem with ditroff compatibility is the font metric format.
 >The binary ditroff font format is rather inflexible and lacks
 >important information; in particular, there's no pairwise kerning
 >information.  I can't live with that. So I have made groff read the
 >ascii ditroff font format, but with a few (completely optional)
 >extensions. ...
 
Fantastic! And where, pray, can one obtain groff? Even a beta version would
be great to fiddle with :-).

Wolf
-- 
Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101
UUCP:   {texbell, attctc, dalsqnt}!dcs!wnp
DOMAIN: wnp@attctc.dallas.tx.us or wnp%dcs@texbell.swbt.com
        NOTICE: As of July 3, 1989, "killer" has become "attctc".