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

Nested style question

Return to Member Forum

  • Author
    Posts
    • #58202
      Aleta El Sheikh
      Participant

      I have a paragraph style for jump lines to which I apply a nested character style through the first word. But sometimes it's a 2-word story jump (Long Story, from page 2) and in that case I have to apply the character style manually to the second word and comma. Since I don't see an option for applying the style through the comma, is there a way to do it in Grep? If so, how would that look?

    • #58203

      Do you mean you want to replace the nested style with a GREP style? That can be done in a number of ways, the exact way depends on your 'normal' ways. This one, for example, will apply its character style up to and including the first comma, regardless of the number of characters/words:

      ^w+,

      If there may or may not be a comma, you can use this — it detects the text that ought to follow:

      ^.+(?= from page)

      … You can also “cheat” and tack the two words together with a fixed space ;)

    • #58204
      Aleta El Sheikh
      Participant

      Having never used GREP styles before, I thought erroneously that they could be applied to nested styles. But they can only be applied to find/change and therefore isn't the solution I want.

      So I'm going to create and apply a new paragraph style with a nested style that will apply to 2-word jumps. I wish there was a way to apply my character style through the comma so I can use one style for all jumps, but it's not a big deal. Anyway, now that I have a better grip on the GREP feature, I'll start using it in other ways.

    • #58205

      Are you mixing up GREP Find and Replace and GREP styles? The latter is sort of automatic 'replace' (of character styles only), and can be set in your Paragraph Style — only once, since it's “in” a style, and then your formatting Char Style will be applied automagically. It's sort of like your nested styles, but better because it allows far more exact control. And yes: you'd typically use one or the other.

      (All of this is only if you have CS4 or newer, of course.)

    • #58249

      You can certainly create a nested style the stops at the comma, just type a comma in the drop down field. Although it appears like you're limited by the optioon on the drop down, you're not. You can enter just about anything into that field, including whole words and the shorthand codes for special characeters (ie: ^t is a Tab).

    • #58253
      Aleta El Sheikh
      Participant

      Vasha, thanks for letting me know this. I typed the comma as you suggested and it worked perfectly. (I didn't know you could do that.) Now I can use one paragraph style for all my jumps no matter how many words they are.

    • #58270
      Susan Knopf
      Member

      As a related hint, if you want to apply a character style to one or more words (but not always the same number of words) at the beginning of a paragraph but don't have a comma as the stopping point, here are two ways to do it:

      1. Use the Drop Caps and Nested Styles to apply the opening style “through 1 Word” and then put non-breaking spaces between each pair of words you want to include in the style. ID will consider all the words connected by the non-breaking spaces as one word and apply the style to all.

      2. Use the Drop Caps and Nested Styles to apply the opening style “through 1 non-breaking space” and then insert a non-breaking space where you want the style to stop.

      Thanks for asking this question—it made me figure out a way to make my work easier.

      Sue

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