Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Combining text variables and grep styles – does it work?

Return to Member Forum

  • Author
    Posts
    • #55189
      hancilt
      Member

      I have trouble applying grep style to a text that is automatically generated as text variable. This is the situation:

      Chapter name and first level subtitles within chapters are used to create a complex running header. Both chaper name and subtitles are defined into a text variables. Then on master page I have link to the approapriate variable to set the header to run and change as the subtitles do….

      So far OK. The trouble is that the subtitles start with a number and I do not want that number to appear in the header. So I thought that creating a grep style for the header that would make all the numbers invisible (0,1pt large with no collor) would make the trick.

      NO, it seems that if the text in the header is generated from a variable the grep style is NOT applied. (if I just type the same thing on the master page, the number are invisible as expected…

      Have anybody seen this behavior or has an idea how to fix it?

      thank you

    • #55190

      Not possible … GREP styles only work on “real” text. Internally, a text variable is represented by one single (albeit wide) character.

      It's the same as with Initial Caps and Nested Styles — these also “see” an entire variable as a single character. It's also the reason that automatic headers run amok when they're too wide for their own frame.

      I wonder if this got solved in CS5.

    • #55194
      hancilt
      Member

      Thanks. That explains it. It would be really nice to have fixed in next version….

    • #55196
      Anonymous
      Inactive

      I've had to do some very similar things.

      The good news is that you can build your headers with many Text Variables, but use Running Head Character Styles instead

      You'll need to generate a few blank Character Styles (with no info inserted all blank fields)

      Then in your text on the Chapter headings, use Nested Styles to invoke a character style in the text.

      So that Chapter has a text style perhaps called “Chapter Text” and that the number has a character style perhaps called “Chap No.”

      When you include this in the Nested Style for your Chapter Headings then the Char Style is applied via the nested method.

      You can then build Variables that pick up the “Chapter Text” style but not the “Chap No.”

      I know you don't need the chapter number in the running head, but you might need to in the future.

      This is how I've made very complex Running Head variables.

      I've done even more complex things than that.

    • #55197
      hancilt
      Member

      Ingenious indeed. thanks, I have completely missed the possiblity to base variable on character style: that makes the trick.

Viewing 4 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads