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

GREP Styles superscript

Return to Member Forum

  • Author
    Posts
    • #74708
      Mathilde
      Member

      Hi!
      I’ve made a GREP style changing all numbers to superscript, but I need it to make exceptions for drop caps that are also numbers. Any suggestions?
      Needless to say, I’m pretty new to GREP styles in general.

      Appreciate any help!

    • #74716

      I’m taking it you have the GREP style in your paragraph style sheets?

      Do you have separate paragraph styles for drop cap paragraphs?

      If so, don’t include that GREP style in those.

      Or am I misunderstanding?

    • #74723
      Mathilde
      Member

      Thanks for replying!
      That’s right – I have two different paragraph style sheets, one for drop cap paragraphs and one for regular paragraphs. The problem is that I need the the numbers in the drop cap paragraph to be superscript as well – except from the drop cap itself. The layout/formatting of my document and text is similar to a typical Bible, with lots of ‘verses’ marked with numbers in superscript and then the chapters starting with a drop cap number.

      • #74741

        I’ve done my share of the bibles in the past, but that was in the Quark days.

        I’m not sure how you can get those drop cap numbers to work. I just tried an experiment using a character style for the drop cap (making sure it was normal and not superscript), the GREP ignores it.

        ****

        Did another test–I did something different for the drop cap paragraph style. I deleted the grep thing.

        Then I set up a nested styles for it instead.

        1) None through one character
        2) None up to 1 digit
        3) Superior [character stylesheet] up to one space band
        4) Repeat last 2 styles.

        Note: I had to use a space, as I’m guessing that there will always be a space following the superior figure, or a hard return, which won’t matter if it’s superior. And I’m guessing any punctuation would be before the digits.

        Maybe you can do something like that for the drop cap paragraph styles.

    • #74754
      Mathilde
      Member

      Thank you so much, Dwayne!

      A bit more tedious than I was hoping for, but it works perfectly :)

      • #74755

        I’m glad it works, Mathilde. It was the only thing I could think of after experimenting. Good luck with the job.

    • #75340

      I’m hoping that this is a good place to ask this…..I can post a new topic if that’s needed/preferred.

      My company has a lot of product names that are trademarked and they, of course, would like to us the “TM” symbol on the first instance of every page for every name…and superscripted. You can imagine how tedious it is when there’s 10+ different products mentioned on a single page like in our catalog.

      Is there a simple way to automate superscript of the TM or the Registered Trademark symbols inside the paragraph style? I’m new to GREP and I thought I had set it up right but it doesn’t appear to be working.

      I might be missing something so here is what I did:

      – Inside the Paragraph Style I’m using, I went to GREP and added a new GREP style.
      – In the Apply Style: I went to “New Style”, “Basic Character Formats” and selected “Superscript” under “Position” and clicked OK
      – for “To text:” I selected the Trademark Symbol from the menu.

      When I start typing using the applied Paragraph Style and drop in the TM under Glyphs, it doesn’t automatically superscript.

      Any suggestions? I really hope that there’s a way to automate this because it’s gets to be ridiculous on some of our longer documents.

    • #75346
      Masood Ahmad
      Participant

      @Mathilde, How about creating two GREP styles i.e. one for SuperScript Digit(s) (in between the para) and the other for the Normal Digit(s) at the beginning of the para. Like this:

      GREP Styles:
      Apply Style: Super-Digit
      To Text: \d+

      Apply Style: Normal-Digit
      To Text: ^\d+

      Note: Keep the order as shown.

      Hope that helps :)

    • #75347
      Masood Ahmad
      Participant

      @Christina, Since TradeMark, Registered symbols are already superscript, so there is no need to superscript them again. But doing this will make them Superior/Superscript i.e. very tiny.

      I hope you are inserting the TradeMark, Registered symbols either by Right click or from the Type Menu > Insert Special Character > Symbols > [select the symbol you want to insert]

      It is also possible that you are inserting TM characters (T and M) and then making them superscript, in that case GREP will not recognise them. So you have to tweek your GREP code to read the T and M characters.

      In order to achieve what you want, the code is given below:

      GREP Styles:
      Apply Style: SuperScript character
      To Text: (~d|~r|~2)
      (TradeMark, Registered, Copyright symbols) any of them.

      Hope that helps. If it still doesn’t work, then I would request you to provide me the unicode value for the TradeMark character that you are using.

    • #75355

      Unfortunately with the font that we use for our branding the Trademark and Registered Trademark symbols aren’t already superscript. I’ve made a screenshot and uploaded it here (https://www.dropbox.com/s/m7bg9woqbgfs7n7/Superscript%20GREP.PNG?dl=0) for you to see what’s happening.

      I set up the GREP style in the Paragraph Style that is applied to the text according to the article the David posted, I posted in here when that didn’t work. Then I tried your code Masood, still no change.

      Could it be that it’s just because we’re using a licensed font family (Frutiger) for our branding that the GREP in this case won’t work?

    • #75357
      Masood Ahmad
      Participant

      No, Frutiger font do honour the Superscript/Subscript feature in InDesign. Are the Superscript character style okay, I mean does it have the ‘Superscript’ option selected under the drop-down list for the ‘Position’ under the ‘Basic Character Formats’.

      The code should work as I tried it my end and it is working fine.

      Secondly, there is no need to create two GREP Styles, instead both the symbols can be clubbed together:
      GREP Styles:
      Apply Style: SuperScript
      To Text: (~d|~r)

      Try with some new text in a new file (if still not working) and let us know.

    • #75360

      @masoodahmad I did everything as recommended in a new document and still not working :(. CS6 quirk?

    • #75363
      Masood Ahmad
      Participant

      @Christina, really sorry. Is it possible for you to upload a copy of your InDesign file to your dropbox to analyze.

    • #75364
      Masood Ahmad
      Participant

      or you can send it to me directly at masoodahmad@inbox.com

    • #75369

      @masoodahmad I put the file here: https://www.dropbox.com/s/yratuxxdik1pvka/GREP%20Superscript.zip?dl=0

      Thank you for your help!

    • #75370
      Masood Ahmad
      Participant

      @Christina, my guess was right. There was a problem with the Character Style. The SuperScript character style was having the properties like Font, font size, leading but not the SuperScript value.
      https://www.hightail.com/download/bXBieW42Zy9uSlJqQThUQw

      I have corrected the Character style and renamed it as “SuperScript_Revised”. You can delete and replace the existing Superscript character style with this new one and can rename it accordingly.

      The updated InDesign file is at the location given below:

      https://www.hightail.com/download/bXBieW42Zy9TRTVFQmRVag

    • #75371

      Well now I feel silly! Thanks for your help!

    • #75372
      Masood Ahmad
      Participant

      Don’t be Christina. We all make mistakes. This is how we learn. I am used to with such kind of issues. I love troubleshooting. I’m happy that now you have the solution. Take care.


      @Mathilde
      , please advise whether the codes are working fine for you or not.

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