From owner-freebsd-doc Thu Dec 14 21:09:04 1995 Return-Path: owner-doc Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id VAA23465 for doc-outgoing; Thu, 14 Dec 1995 21:09:04 -0800 (PST) Received: from jhome.DIALix.COM (root@jhome.DIALix.COM [192.203.228.69]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id VAA23454 for ; Thu, 14 Dec 1995 21:08:55 -0800 (PST) Received: (from julian@localhost) by jhome.DIALix.COM (8.7.3/8.7.3) id NAA02461 for doc@freebsd.org; Fri, 15 Dec 1995 13:08:43 +0800 (WST) From: Julian Elischer Message-Id: <199512150508.NAA02461@jhome.DIALix.COM> Subject: Re: Did the troff to HTML c (fwd) To: doc@freebsd.org Date: Fri, 15 Dec 1995 13:08:42 +0800 (WST) X-Mailer: ELM [version 2.4 PL24 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-doc@freebsd.org Precedence: bulk maybe we can use this to keep our man-pages on the www page up-to-date. --forwrded message..-- The troff to html translation is marginal. I was able to translate the first page of an ms document. I could translate the first page of a man document as well. Another document translated completely. The quality of the translation is mediocre. Paragraphs are run together. Try file://~/.html/cvs.html to see cvs(5) man page after the translation. This was the best transation I received. The program is called troff2html. It is in /tools unsupported/bin. It is a perl program. The complete source is in /net/opshub/export/unsupported/src/troff2html. I'll let someone else work further with the translation, if anyone desires. Try running with the "-man" or "-ms" macros. Here is the README file. A Troff to HTML Converter ========================= I have used troff (and -ms macros) for many years and wanted to be able to convert my source documents into html format. I couldn't find a troff converter but did try a couple of converters for the -ms macros. I found that these often translated things different to the way I wanted them handled and that they had poor support for the troff features I often use, such as source file includes and font changes. Therefore I decided on a two-stage process: troff2html ========== This translates raw troff into html. Troff escapes are handled internally but troff requests are translated into sequences of perl commands in a control file (troff.req). This control file is easily edited to change the behaviour of requests or to add new ones, i.e. those I haven't dealt with. ms.pl ===== This translates the -ms macros into html. It maintains an html state stack. The -ms macros are represented as sequences of perl commands in a control file (troff.ms). Once again, this control file is easily edited. mv.pl ===== This translates the -mv macros into html (see control file troff.mv). man.pl ====== This translates the -man macros into html (see control file troff.man). And Finally =========== The result of this is an extremely adaptable package. Additional macro packages, e.g. -me macros, are easily added with their own control file. Preprocessors, like refer, can be used with the troff source because their output is recognised. Personal macros can also be added easily. Where are they? =============== A compressed tar archive of version 1.0 can be found at URL http://web.dcs.bbk.ac.uk/~mick/html Mick Farmer -- Kevin Dalley dalley@tfs.com ----- End of forwarded message from dalley@desrv.tfs.com -----