tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: roff from 4.4BSD [Re: groff/-mandoc replacement]

On Tue, Mar 03, 2009 at 08:48:43AM +0000, Andrew Doran wrote:
> I tried this recently and it appears to render manual pages correctly,
> albeit with the odd complaint. On the downside it's doesn't have html output
> or PostScript (not really a big deal), and needs some work to handle our
> macros. On the plus side it's written in C and has all the tools expected of
> roff.

The problem is that it's troff/nroff, not ditroff.  So it's a considerable
pain to add new output formats; PostScript is possible but requires what
is essentially a compiler that takes the C/A/T typesetter codes as input
and produces PostScript as output.  HTML would be considerably harder, I
think, because of the lack of arbitrary text placement in HTML.

Without PostScript support you can't even generate PDF output from manual
pages.  This seems like a very considerable nuisance to me.

Chris Lewis' 'psroff' (long abandoned, I think) is a C/A/T to other
printer output converter which does PostScript and HP LaserJet as output
and has a wrapper for C/A/T troff which somehow emulates a few ditroff
features like minimal graphics.  I recall that it was pretty good, maybe
as good as Adobe's commercial TranScript package, which I think is no
longer available at all.

I suppose we could use psroff and the 4.4 troff to handle 'real roff'
documents, and mdocml to handle HTML output.  This starts to look like
quite a gonkulator and it would need a bunch of clever (and hopefully
clean) shell scripting to tie it together -- but I'm sure it'd be much
smaller than groff and not need C++, too.

I looked at the Plan 9 roff last time this came up, but IIRC it too is
C/A/T, not ditroff, isn't it?  It also relies on a bunch of Plan 9
libraries which are of questionable utility for anything else in our

Thor Lancelot Simon                               
    "Even experienced UNIX users occasionally enter rm *.* at the UNIX
     prompt only to realize too late that they have removed the wrong
     segment of the directory structure." - Microsoft WSS whitepaper

Home | Main Index | Thread Index | Old Index