On 1/30/07, Harold Fuchs <[EMAIL PROTECTED]> wrote:

On 30/01/07, Pradeep Srinivas <[EMAIL PROTECTED]> wrote:
>
> Members:
>
> Let us assume I have a **plain text** file.  I would like to open this
> text
> file in Writer (no problems here, even a crass moron like me can do
_that_
> much <grin>).
>
> What I would like to know is : Is there a method by which I can insert
> "tags"
> into the plain text file (corresponding to appropriate styles in
Writer),
> which, when getting "imported" or opened by Writer, gets recognised ?
>
> To elucidate, say I have a style that is labeled "small_caps_bold" that
I
> have
> defined in Writer.  Is there a method that I can prepend a tag
> (say) "<small_caps_bold>" to a paragraph in a plain text file, which,
when
> read by Writer can set the correct style till it meets the next tag ?
>
> I had used such a functionality, a very long time ago, in PageMaker...
>
> Any responses would be well appreciated.
> --
> Pradeep Srinivas
> Bangalore, India
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
The best I can think of is to add HTML tags. There are free HTML editors
out
there apart from OpenOffice. I have used one called Arachnophilia (
http://www.arachnoid.com/arachnophilia/). With it you can select a section
of text and click a button to have it surround the selection with HTML
start
and end tags that reflect the meaning of the button. And you can create
your
own buttons and macros.  So you could select a section of text and click a
button labelled "Bold" to have the phrase surrounded by the appropriate
HTML
tags ("<b>" and "</b>" in this example). The program comes as a jar file
or
as a Windows self installer. It will run on anything that has Java
properly
installed.

I guess you could do the same with XML and CSS Style sheets but I don't
know
too much about those. I think the latest Arachnophilia supports XML.

--
Harold Fuchs
London, England

Hello Pradeep,

If I understand correctly your problem Harold's solution is a good start
allowing you to create the tags, but then I am afraid you will have to write
a macro that parses the text file and creates a .odt applying the styles you
want.
I guess the boring part of the macro is to select the text between the tags
in the text file. Applying a style instead is fairly straightforward.

Cheers,

Michele

Reply via email to