From owner-freebsd-doc Fri Dec 15 07:46:35 1995 Return-Path: owner-doc Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA28461 for doc-outgoing; Fri, 15 Dec 1995 07:46:35 -0800 (PST) Received: from spot.lodgenet.com (lodgenet.iw.net [204.157.148.88]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA28443 for ; Fri, 15 Dec 1995 07:46:29 -0800 (PST) Received: from jake.lodgenet.com (jake.lodgenet.com [204.124.120.30]) by spot.lodgenet.com (8.6.12/8.6.12) with ESMTP id JAA29816; Fri, 15 Dec 1995 09:46:12 -0600 Received: from localhost (localhost [127.0.0.1]) by jake.lodgenet.com (8.6.12/8.6.12) with SMTP id KAA08659; Fri, 15 Dec 1995 10:16:49 -0600 Message-Id: <199512151616.KAA08659@jake.lodgenet.com> X-Authentication-Warning: jake.lodgenet.com: Host localhost didn't use HELO protocol X-Mailer: exmh version 1.6.2 7/18/95 To: Julian Elischer cc: doc@freebsd.org Subject: Re: Did the troff to HTML c (fwd) In-reply-to: Your message of "Fri, 15 Dec 1995 13:08:42 +0800." <199512150508.NAA02461@jhome.DIALix.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 15 Dec 1995 10:16:48 -0600 From: "Eric L. Hernes" Sender: owner-doc@freebsd.org Precedence: bulk I've got perl script that I hacked out of plexus that does a pretty fair job of translating man pages to html on the fly. It even cross references #include files from sections 2 and 3. I'm using it to serve man pages for FreeBSD, linux, SCO, perl, tcl, and X11. Its pretty ugly right now, but it is functional. If anyone is interested, I can send a copy. eric. Julian Elischer writes: >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 ----- -- erich@lodgenet.com erich@rrnet.com