Skip to main content
TdeV1
Inspiring
May 20, 2014
Answered

Is there a fast way to wrap unstructured text into [Para] tags?

  • May 20, 2014
  • 1 reply
  • 535 views

I'm trying out my new Frame 12 by trying to produce an ebook in several formats. I'm using the out-of-copyright Agatha Christie's A MYSTERIOUS AFFAIR AT STYLES.

Is there a fast way to wrap each paragraph with a [Para] tag?

Thanks in advance.

This topic has been closed for replies.
Correct answer Russ Ward

TdeV1,

With your extended description, I see now exactly what you mean. I face similar situations frequently, where I have multiple paragraphs that I need to paste into a single element, then split each paragraph into its own element.

Unfortunately, FM has no native functionality to automate this, despite how it must be reasonably common need. In my case, I am an FDK developer and hacked together a little plugin that does it. ExtendScript could also be used. If you don't want to do programming, then the other option is a conversion table. You would have to paste the content into a completely unstructured document, run the conversion process to structure it, then copy the newly-wrapped elements into your DITA topic. You can't run the conversion process on a document that currently has any structure.

So to sum up, you need to either do some programming/scripting or learn how to build a conversion table. If the latter interests you, look up conversion tables in the Structure Developers Guide. In this case, it would be an exceptionally simple conversion table, maybe even just a single row. If you have to do this process repeatedly, I think it would be worth your time to investigate.

Russ

1 reply

Arnis Gubins
Inspiring
May 21, 2014

Are you trying to wrap the text with unstructured paragraph tags or with structured elements? It's not clear from your query.

TdeV1
TdeV1Author
Inspiring
May 21, 2014

Hi Arnis,

The text is in an unstructured fm document called Chapter1. It has all been tagged with paratag "Body".

I created a new file from Structured > Chapter > Show Sample and deleted everything below the first [Para] below [Head] "The Quake Came Wednesday Morning".

(In the Structure View there is

Chapter

  Head

    Para

    Para

      Section

        Head

        Para

When I append (paste) several dozen paragraphs from the unstructured Chapter1, it all appears in the structured view under one single (additional) Para element.

I am able to wrap each paragraph in an element named [Para], one paragraph at a time, which seems utterly tedious. This is why I'm wondering if there is an easier way to wrap each paragraph.

Since you might ask:

The reason that I have pasted inside the a sample of a structured chapter in place of an empty structured chapter is that I have NO idea how to answer the questions asked about new element attributes, so it's easier to work with an existing document.

I have the Version 9 STRUCTURED APPLICATION DEVELOPER REFERENCE and I was working with it last summer with my version 8 Frame, but it is not very easy to decipher. Any places where I could look this stuff up would be helpful!

Thanks.

Arnis Gubins
Inspiring
May 21, 2014

I'm moving this thread to the Structured Forum as you'll get a more pertinent respone there.