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

Help fixing a GREP style

Tagged: ,

Return to Member Forum

  • Author
    Posts
    • #93719

      I am working on a document that includes the term PSM2 throughout the document. It should be PSM, followed by a superscripted 2 (read-PSM Squared).

      I created a superscript character style, and tried creating a GREP style, using the code [PSM](2), but it doesn’t quite work. Now throughout the document I have PS, followed by superscripted M2. I am sure this is a simple solution, but GREP is not my strong suit, so can anyone help?

    • #93720

      PSM\K2

      (^/)

    • #93732

      This worked like a charm. Thanks!

    • #96889
      Graham Park
      Member

      In your Paragraph Style add a GREP Style to make the 2 superscript using a Positive Lookbehind to apply a Character Style which will be Superscript, then when every you type this PSM the following 2 will automatically be turned to superscript.

      (?<=PSM)2

      Graham

    • #96891

      Graham, I hope you know that “(?<= …)” and “\K” (since CS6) are the same thing, except that \K is more powerful because it allows variable items in the look behind! ;-)

      (^/)

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