Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I'm looking for a GREP solution for superscripting a Service Mark

Contributor ,
Aug 24, 2013 Aug 24, 2013

I'm looking for a GREP solution (in InDesign) for superscripting a Service Mark (i.e.., SM). My big issue is I want to remove the space in front, (easy) but not superscript any following punctuation. Ideas?

TOPICS
Scripting
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Aug 26, 2013 Aug 26, 2013

I've worked-out an EVEN better automatic GREP Style (in my body copy paragraph style):

I type my main word and no space at all with sm at the end, and this GREP style does the work (apply a Character style to Superscript):

(sm)\b

Simple, elegant, effective.

r.

Translate
New Here ,
Aug 24, 2013 Aug 24, 2013

Check This:

 

(?=SM) -- Positive lookahead

 

FindText( )(?=SM)

replace with None and format this as superscript....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 25, 2013 Aug 25, 2013

Thank you,

But did you test this?

It doesn't find the search criteria SPACE followed by sm

I think I have a working solution with:

Find: SPACE(sm)

Change to $1

Format as Character style with Superscript

Do you see any problems with this?

rick

Re: I'm looking for a GREP solution for superscripting a Service Mark

created by ELANSEZHIAN in InDesign Scripting - View the full discussion

Check This:

(?=SM) -- Positive lookahead

FindText( )(?=SM)

replace with None and format this as superscript....

Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5623973#5623973

Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:

To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.

Start a new discussion in InDesign Scripting by email or at Adobe Community

For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 25, 2013 Aug 25, 2013

Hi,

The problem could be is not smart enough...

Jarek

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 25, 2013 Aug 25, 2013

This one seems to be working, restricting to word boundaries:

• Search for:

SPACE \b(sm)\b

• Change to:

$1

• Change format to supscripted Character Style

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 26, 2013 Aug 26, 2013
LATEST

I've worked-out an EVEN better automatic GREP Style (in my body copy paragraph style):

I type my main word and no space at all with sm at the end, and this GREP style does the work (apply a Character style to Superscript):

(sm)\b

Simple, elegant, effective.

r.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines