[sword-devel] RTF format

Michael Paul Johnson sword-devel@crosswire.org
Thu, 23 Dec 1999 15:36:44 -0700

At 23:12 12/23/1999 +0000, you wrote:

> >At 19:16 12/23/1999 +0000, you wrote:
> >>Hi!
> >>I'm interested to craete a RTF-to-HTML filter.
> >>
> >>Does anybody know where a format description of the RTF format is?
> >
> >http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/specs/rtfsyntax.htm
> >(Best viewed with Microsoft Internet Explorer: select Sync Toc button and browse on down for the rest of the book.)
> >
> >To convert RTF to HTML, the easiest way is to read into Microsoft Word, then Save As an HTML file. The two formats are not conducive to exact equivalent conversion, but a limited subset of both might not be to bad.
>I want to create a RTFHTML filter for SWORD, I think saving to html in MS word
>isn't useful ;-)

Perhaps not...

> >My approach is to always start with GBF, then convert to plain ASCII, RTF, HTML, etc.
>Should I create at first a RTFGBF filter or what ?

No. GBF describes the elements of Bible text (verse numbers, psalm titles, etc.), but says nothing about how they are formatted for presentation. RTF describes formatting and presentation, but says nothing about the elements of Bible text. HTML is intended as a logical format for generic text, with much formatting left to the browser, except that with extensions it can be made much like RTF. HTML knows nothing about the elements of Bible text. Therefore, it is a less difficult problem to go from RTF to HTML than from either of them back to GBF. (Going from GBF to either of the others is easy, in that you can add elements of style to taste.)

A general purpose RTF filter to anything is hard, because it is a very complex page document language. If you can narrow down a reasonable subset of RTF actually used in the modules you are interested in, it may not be bad.


Michael Paul Johnson