Skip navigation
Currently Being Moderated

Use substring from paragraph in <$paratext>?

Apr 15, 2013 5:22 PM

Hello all,

 

Does FM (we're using version 11) allow any type of expressions within  variables in order to pull a substring out of a paragraph for use in a Running H/F? I've researched this as much as possible and I've done a search on the forum and the initial responses don't look promising, although those responses seem to be for prior versions...

 

An example would be a  paragraph that looks like this:

 

Tropical Island - A wonderful place to be

 

and we want to pull out only

 

Tropical Island

 

for the Running H/F so that we can take advantage of FM's automatic population of the header on left/right pages similar to a dictionary  using <$paratext[MyTag]> and <$paratext[+,MyTag]>, only that MyTag is  the substring from the paragraph, not the entire paragraph.

 

I greatly appreciate any help or suggestions.

 

Thank you!

 
Replies
  • Currently Being Moderated
    Apr 15, 2013 6:17 PM   in reply to VarioPegged

    For controlled content, think marker instead of variable. FM lets you define up to 8 running h/f markers, Header/Footer $1...Header/Footer $8, that you can insert in your content. Then in the running header/footer on the master pages, use the <$marker1> variable to indicate the first item on the page and the <$marker2> variable for the last. Insert these markers on every Body page. Unfortunately it's a manual operation to populate the markers (Tip:if you highlight the text first and then click on the New Markre button, you save a lot of typing) , but that's the only way you can control getting a subset of the entire text of paragraph.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2013 6:51 PM   in reply to VarioPegged

    Using Extendscript (or Framescript) would be the way to go, provided you have some way of uniquely identifying the fractional part of the paragraph text that you need.

     

    Regarding the expression functionality, how would you imagine that to work in FM? A regex expression of some kind? Would the content always be unique enough to get the desired match?

     

    Note: if you're heading titles were of the type "Item - descriptor", then you could have used two separte paratags in a run-in mode to make it look seamless, but still allow you to use the <$paratext[...]> building blocks.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2013 3:59 AM   in reply to VarioPegged

    You could also implement the

    Topic Phrase - Tag Line

    as two separate paragraphs, with one as a Run-In.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2013 7:33 AM   in reply to VarioPegged

    As Error indicates, if the structure is consistent as you've indicated, then you could be using two paratags instead. The first one would be the "Topic Phrase" and it would be set to run into  (Paragraph Designer > Pagination: Run-in Head Default Punctuation) the following paragraph with the " - " set as the default punctuation to separate the two paragraphs.

     

    Visually they would appear as one line, but Inernally within FM's database they are then two separate paratags. In that case, you could then use your original running h/f variables in the dictionary mode. It probably would be a lot easier to re-tag and split on the "-" then to assign content, populate markers and insert them in the correct locations.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points