2 Replies Latest reply on Apr 27, 2012 12:31 PM by Chris Z.

    GREP Style: Find all lowercase letters between

    Chris Z. Level 1

      I'm trying to create a GREP style to deal with a two line signature like this:

       

      —Author Name,

      Quoted Source

       

      I want the author name to be caps/sc and the typeface I am using has an expert set so I need to only replace the lowercase characters of the author name with the sc character style.

       

      So far what I've done is creat a character style that is set as roman. Then for my grep styles I have:

       

      peps.jpg

       

      The italic style applies to the 2nd line (after a forced line break) just fine.

       

      However I cannot get the sc style to apply to my lc characters in between the em dash and the comma. I can get the sc to apply to the entire line if I use "." for any character, but "\l" does nothing for me. . .

       

      Anyone have any sage advice?

       

      Thanks,

      Chris

        • 1. Re: GREP Style: Find all lowercase letters between
          [Jongware] Most Valuable Participant

          Your image is no good, since this

           

          (?<=~_)(?=,)

           

          does nothing at all. From your descripton I gather you tried something like this

           

          (?<=~_)\l+(?=,)

           

          and that *will* work ... as long as there are only lowercases between the dash and the comma.

           

          You cannot selectively apply your style to just the lowercases between dash and comma, it's an all or nothing affair. Since you seem unhappy with applying small caps to all text in between (why?), you can work around it this way.

          Apply the SC style to everything in between but *then* immediately add another line resetting "regular" font for characters that are not lowercase. This ough to do that:

           

          \L+

           

          applying a char style that clears the small caps again. It will be applied to the entire paragraph, but that probably should not matter. You can still apply that italic style in the next line, since GREP styles are applied first to last.

          • 2. Re: GREP Style: Find all lowercase letters between
            Chris Z. Level 1

            Thanks for the help. You led me in the right direction.

             

            I was getting too complicated and I still don't have a firm grasp on what GREP can and cannot do.

             

            I solved the problem with the following GREP styles:

            peps.jpg

             

            The reason that I can't apply sc to the entire first line is because the typeface I'm using is old and includes an expert set. In the expert font, there are only small caps. Uppercase keystrokes are reserved for factions, currency symbols and other non-standard glyphs.

             

            Best,

            Chris