🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #744

groff/ditroff compatibility

#744
From: James Clark
Date: Thu, 07 Sep 1989 12:57
43 lines
2584 bytes
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
Technical Details
Message-ID: <JJC.89Sep7135705@jclark.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!brutus.cs.uiuc.edu!usc!ginosko!uunet!mcsun!ukc!slxsys!jclark!jjc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!brutus.cs.uiuc.edu!usc!ginosko!uunet!mcsun!ukc!slxsys!jclark!jjc
From: jjc@jclark.UUCP (James Clark)
Newsgroups: comp.text
Subject: groff/ditroff compatibility
Message-ID: <JJC.89Sep7135705@jclark.UUCP>
Date: 7 Sep 89 12:57:11 GMT
Sender: jjc@jclark.uucp (James Clark)
Distribution: comp
Organization: None
Lines: 43