[comp.sys.mac.hypercard] Exporting Formatted Text from HC2.0

colinr@extro.ucc.su.oz.au (Colin Rose) (04/02/91)

Greetings one and all.

                   EXPORTING FORMATTED TEXT

   In Hypercard, you can format text: ie whole fields or text 
within fields can be specified to be italic, bold, fontsize etc.
That is GREAT, but how do I export this information to a
MS Word file, or other.

    It seems Hypercard will only write to ASCII-style files, 
which cannot accept such formatting information (bold, italic etc).
If this is so, it would seem to be a very silly ommission from 
the upgrade. Any ideas ?

                                       Colin Rose
                                       Dept. of Economics
                                       University of Sydney
                                       colinr@extro.ucc.su.oz.au
                                       *************************

nobody@blia.sharebase.com (Nobody at all) (04/03/91)

In article <1991Apr2.081825.17264@metro.ucc.su.OZ.AU> colinr@extro.ucc.su.oz.au (Colin Rose) writes:
>Greetings one and all.
>
>                   EXPORTING FORMATTED TEXT
>
>   In Hypercard, you can format text: ie whole fields or text 
>within fields can be specified to be italic, bold, fontsize etc.
>That is GREAT, but how do I export this information to a
>MS Word file, or other.
>
>    It seems Hypercard will only write to ASCII-style files, 
>which cannot accept such formatting information (bold, italic etc).
>If this is so, it would seem to be a very silly ommission from 
>the upgrade. Any ideas ?
>

Word processors use 'style-sheets' to ease formatting ... you know ...

	title line is centered, BOLD, font X, size Y

	chapter names are BOLD, left justified, new page,

	sections are space above/below, underlined

	body text is filled (justified) with margins x,y

	enumerated lists use hanging intents

and on it goes.  I normally use Word 4.0, but found quickly that custom
style sheets MUST be imported from other documents, so ...

for this kind of problem, I've switched to PageMaker 4.0 which allows one
to add style sheets to the application itself.

Knowing that style sheet XYZ has BOLD, font X, size Y, one can export
ASCII text in this manner:

	open file TheFIle
	write "<XYZ>" to TheFile
	write return to TheFile

	-- items henceforthe are formatted by the definition of
	-- the XYZ style sheet

	..
	..

	-- when done, revert to normal "unformatted control"

	write "<no style>" to TheFile 
        write return to TheFile


In this manner, I am using HC to acquire line items for custom invoice
printing in which the HC data is PLACED into the form.

-------

J. Beard	jeffb@sharebase.com

leue@galen.crd.ge.com (Bill Leue) (04/04/91)

Other people have more or less said this, but just to make it explicit:
One way to export styled text from HC is to use of the text-only
markup file formats like RTF or SGML.  I think that somewhere in the
byzantine Microsoft documentation is a guide to RTF format.

Of course, you still have to decide how to map the styled text in
your fields into this format.  That process should be amenable to
standard scripting techniques, the exact details of which are left
as an exercise for the reader :-)

-Bill Leue
leue@crd.ge.com

eallen@mercury.sybase.com (Ed Allen) (04/12/91)

In article <18203@crdgw1.crd.ge.com> leue@galen.crd.ge.com (Bill Leue) writes:
>Other people have more or less said this, but just to make it explicit:
>One way to export styled text from HC is to use of the text-only
>markup file formats like RTF or SGML.  I think that somewhere in the
>byzantine Microsoft documentation is a guide to RTF format.
>
>Of course, you still have to decide how to map the styled text in
>your fields into this format.  That process should be amenable to
>standard scripting techniques, the exact details of which are left
>as an exercise for the reader :-)
>
>-Bill Leue
>leue@crd.ge.com


 To get you started there is an RTF stack for old HyperCard that helped you
with writing RTF codes into a field with the text and then exporting an
RTF file.  I found it in the BMUG software library, awhile back.  You could
develop this to read the style info from your styled text field and compose
the RTF field.

Ed Allen
Eallen@sybase.com





m
a
k
e

t
h
e

l
i
n
e

c
o
u
n
t
er happy.