[futurebasic] [FB] RTF

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1998 : Group Archive : Group : All Groups

From: rbryce@... (Bob Bryce)
Date: Sat, 28 Nov 1998 02:53:36 -0600 (CST)
I found the discussion on RTF interesting.

George said,
> I am interested in the RTF reader module idea.  My "other machine" app.
>reads and writes RTF and this would boost the cross platform performance.
>(I guess that means I am interested in a RTF writer too.)

Over a number of years I have developed a program for
automatically formatting tagged text which uses the
SIL (Summer Institute of Linguistics) and UBS
(United Bible Society) SFM (Standard Format Markers).

_MacAutoFormat_ takes user info keyed into dialog
boxes; Font name, font size, style name, style num,
space before, space after text, line spacing,
word format (bold, italic, underline), and paragraph
Indent style (left justified, indent, or centered).

When run the program replaces simple tags such as
\p (paragraph), \r (reference), \c (chapter number),
\q (poetry style), \in (indented quote) etc., etc.
and replaces them with more extensive RTF or
Rich Text Format. When the resulting text file is
opened in a word processor such as Microsoft Word
the RTF info is interpreted as formatting, and the
document automatically formats. In case the user
wants to tweak a particular item each style is listed
in the style sheet info for Word.

I guess you can call this an RTF writer. It saves a lot
of grunt work in formatting multiple documents quickly
without the time consuming manual hands on stuff.

MacAutoFormat is posted on the FutureBASIC Support page (www.stiinc

At the moment I'm having some problems with the Batch
filing aspect of this. May just be System 7.6.

Rick wrote awhile back,
>Unfortunately, the publically available RTF spec's are very poorly
>written (at least the last time I looked at them).  This may explain why
>I have yet to see any two RTF readers (even among those written by
>MicroSoft, who invented RTF) which interpret RTF files in exactly the
>same way.

When I started working with RTF I asked Microsoft for
specs. They sent me a mimeografed copy of

"Micosoft Rich Text Specification"
This gives the basic information on RTF documents
\b for bold, \pb for page break etc. etc. etc. for 20 pages.

If the documentation is not clear or doesn't specify
something you want to do, all you have to do is
to format some text in a document the way you want
it to appear (table, header, landscape format, indent style
or whatever you want to check), save it as an RTF doc.
Open the RTF document and click "no" for "Interpret RTF text?"
By looking at the resulting RTF text you should be able to figure out
the RTF coding for what you want to do.

I think that the different interpretations by RTF readers
in word processors would reflect the fact that fonts and
system software differ a little on different computers.
(and probably many other factors too)

Windoze machines are often a little cranky at reading
RTF docs produced on a Mac; Mac has no problems with
reading RTF from a Windoze machine.

Hope this is useful.
If anyone is interested in further RTF discussion feel free
to email me directly.

By the way Digest 28 came in seven parts, most of which
was ASCI jibberish!!

Bob Bryce