tech-userlevel archive

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

Re: Summary of man-page formatting



>>  - switch to something else (anything else?)
> As a general purpose doc tool [TeX] is fine,

Only for typeset doc.  For read-as-text doc - which, at least
personally, is far more important - it is, well, see below.  (For
almost all purposes, if I'm faced with typeset documentation,
regardless of PS vs PDF vs whatever format, my first step is to convert
it to plain text, manually if necessary.)

> and it doesn't take much arguing to convince people that it produces
> better results than anything *roff can ever do, but it doesn't format
> existing *roff docs.

I suspect it could be made to.

TeX is general-purpose enough that it wouldn't be very hard to make it
generate text docs, basically a DVI backend that is to TeX what nroff
is to troff.  And, while I'm not aware of any, it is general-purpose
enough that a macro package could probably be written to handle at
least mandoc.  Making it handle the full generality of nroff would,
even if possible, probably be far more work than it's worth.
(Actually, TeX is general-purpose enough that it is probably possible,
maybe excepting running into various limits.)

Assuming a TeX mandoc macro package were to somehow magically exist,
would TeX be a suitable replacement?  Maybe.  It is unlikely to be as
fast as a specialized tool, so, for manpages, I see no benefit to it
over mandoc.  Over groff, I would call TeX a win on arcanity and
licensing grounds.  (Not that TeX language is trivial.  But my (only
partially informed) opinion is that it's less arcane than *roff.)

But, of course, that's predicated on someone going to the trouble to
(a) build a DVI-to-text backend (not hard, if it doesn't yet exist,
certainly no harder than pdftotext -layout) and (b) build a macro
package to teach it to handle mandoc language (difficulty unsure; my
TeX memories are too rusty for me to more than guess, but my guess is
about a week, for me, after convincing TeX to run on my machines and
relearning it - not that I have even a week to dedicate to that).

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index