Converting preformatted documents to HTML

Eelco van Asperen (
Wed, 5 Aug 92 16:51:21 +0200

In our HTML files, I frequently want to refer the reader to man-pages
or the GNU documentation. So, I wrote two small scripts to convert
man-pages and GNU Info files to HTML and added a bit of code to
the HTTPD daemon to call these filters if it found a .man or a .info
file. With this, one can write f.e.
"<A HREF=>GCC</A>"
to refer to the (extensive) documentation for the GNU C compiler.
So far, so good.

The Info files are the GNU equivalent of man pages and they
are complete formatted documents that contain references.
The problem I've run into is that HTML does not offer a mode in
which all formatting is preserved *and* tags are recognised.
The LISTING mode does preserve the formatting but does not see the
hypertext references; the NORMAL mode does recognise the references
but destroys the formatting (indentation, line breaks).
Switching from LISTING to NORMAL mode (and back) in the middle of
a paragraph is not feasible either because that will cause a blank line
to be inserted at that point.

It would be handy to have a mode that does preserve formatting and
recognizes SGML tags since there are no doubt other hypertext formats
that could be converted to HTML this way.

Thoughts anyone ?

Eelco van Asperen. || Erasmus University Rotterdam
internet: || Department of Computer Science, room H4-32
New, Improved, a disclaimer: || PObox 1738, 3000 DR Rotterdam, The Netherlands
*** publishing private email is not allowed by the author of this message. ***