From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Fco.J.Ballesteros MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011217082715.6D79B199E8@mail.cse.psu.edu> Subject: [9fans] bib tool for troff and html conversion revisited Date: Mon, 17 Dec 2001 09:27:12 +0100 Topicbox-Message-UUID: 37914678-eaca-11e9-9e20-41e7f4b1d025 I found a tool that does all the bib stuff for me, including formatting. Besides I made a silly html converter (see below). I just got the source code of a bibliography tool for troff called bib and used ape to get it working. It can be found at http://plan9.escet.urjc.es/export/troffbib.tgz The format of the bib files is quite straightforward (not like bibtex) and the syntax for citations is easy to remember (and you don't have to remember identifiers to make a citation). I also wanted to get the paper converted to html without human intervention, so I tried both ms2html and troff2html. The troff2html output did not convince me (problems w/ .IP, etc.), and ms2html couldn't handle bib entries (which are not ms macros) Thus I did the following as an experiment: - changed ms2html to accept pseudo device control strings to be passed as-is to the output. - used sam to make silly scripts bib2html tbl2html etc. that replace the involved portions of input with html. I think the output is reasonable given the kludges I made in these *2html scripts. As an example, this is the mkfile rule I use: box.html: box.ms bib box.ms | fig | bib2html | pic2html | tbl2html | ms2html > box.html IMHO the experient result says that this can work nicely; i.e. same nice output of ms2html but still able to format non-ms troff packages. What about going in this direction instead of improving troff2html to handle it all on its own? I mean, such intermediate blah2html filters can translate macros or whatever weird troff construction be used in the source, when the input model can still be matched to the html one. Although my set of scripts would probably fail if the document does not follow the conventions I follow, I placed them at http://plan9.escet.urjc.es/export/troffutil.tgz, just to illustrate what I mean.