Hi team, Hope you are doing good!
Please help me to find the right GREP
Actually! I need to look behind the characters, I have a recuirment to give a space between normal text and superscript.
please look the attached image, i have to put the space before every superscript
Note: Some times the superscript characters will be more than one, for example : (1,2,5,*) or (1,2) or (†3)
superscript will come same as attached image
Common hints to find the right palce:
please help me to find the GREP and solve this issue
Thanks in advance
Did you try this? It works for me
I am looking for any character (.) formatted as superscript (supérieur/exposant in French) and I replace it by a nonbreaking space (~S) and what has been found ($0)
This is not an answer to your question but a suggestion to improve your superscripts. I suggest you try increasing the font weight for the superscripts. If the body copy is Normal try Medium or Semibold for teh superscripts. Most fonts include a superscripted 1 or 2 even if there isn’t a full superscript available. Set one of those then type a normal digit. Scale and baseline shift the normal digit and increase its weight untul it looks a close as it can to the superscript. Make that your character style.
Above you see Helvetica Neue 55 Roman. Have a look at the 22 on the left. The left 2 is the built in superscipted 2. The right 2 has been horizontally and verticaly scaled, baseline shifted, and promoted to Helvetica Neue 65 Medium. Now look at the 22 on the right. Again, the left 2 is the built in superscript. The right 2 was baseline shifted and scaled proportionally, but the font weight is unchanged.
I prefer to use horizontal and vertical scaling for superscripts because if the font size changes then the superscripts will scale, too. I would still need to adjust baselineshift, but only that.
Now in your particular case, if I read your screen capture correctly, you can do this easier and better by selecting Superscript/Superior in the Postion section of the Opentype options menu. That is, if this is Myriad Pro, as I suspect.
I would do it slightly different.
Instead of GREP find pattern:
I'd do GREP find pattern:
Why? Because of that:
Note: In my screenshots above I assume that the superscripted characters have a character style applied with name "Superscript".
( ACP )
Of course, you are absolutely right!
Your solution is working Perfectly with characters.
But! there is one issue
In some cases the superscript come along with dragger and asterisk symbol
Example: 1,*,✝ or 3,*,✝, 2
I just want to give a space before 1st superscript character
How to give a space for this kind of issue
Thanks in advance
It should work with the star and the dagger. Pattern
would also catch them. As long as all of the glyphs share the same formatting; e.g. applied character style "Superscript".
( ACP )