9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] bib tool for troff and html conversion revisited
@ 2001-12-17  8:27 Fco.J.Ballesteros
  2001-12-17 12:27 ` Ralph Corderoy
  0 siblings, 1 reply; 2+ messages in thread
From: Fco.J.Ballesteros @ 2001-12-17  8:27 UTC (permalink / raw)
  To: 9fans

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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] bib tool for troff and html conversion revisited
  2001-12-17  8:27 [9fans] bib tool for troff and html conversion revisited Fco.J.Ballesteros
@ 2001-12-17 12:27 ` Ralph Corderoy
  0 siblings, 0 replies; 2+ messages in thread
From: Ralph Corderoy @ 2001-12-17 12:27 UTC (permalink / raw)
  To: 9fans

Hi,

> 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?

It's also worth looking at GNU groff's latest work on HTML output if
it's something you need a lot.

Cheers,


Ralph.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-17 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-17  8:27 [9fans] bib tool for troff and html conversion revisited Fco.J.Ballesteros
2001-12-17 12:27 ` Ralph Corderoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).