Copy link to clipboard
Copied
I have a paragraph style set up with a grep for registration symbols so they automatically are superscripted but sometimes the symbol is too close to the letter before it and manually adjusting the kerning would take too long because of how many there are. Is there another grep to add to increase the space before the symbol automatically.
Copy link to clipboard
Copied
Instead of using GREP in your ParaStyle definition - which will unnecessarily slow you down - it's simply a one / constant character that doesn't need to by styled dynamically - assign CharStyle globally.
Copy link to clipboard
Copied
One approach would be to find the last character followed by the registration mark (which should be in a positive lookahead) and add a positive tracking value.
Not knowing the symbol, or all the possible preceeding characters I can't say whether you would want to use the dot (.), \w or [\l\u] as your wildcard.
Copy link to clipboard
Copied
Find/Change all instances from [reg mark] to [hair space][reg mark]. This remains consistent across font sizes and styles, and easy to modify/undo. Even if you apply a character style for the other method, the spacing can vary with font and size. (If a hair space isn't enough, try a 1/6 space.)
This can be used for almost all superscript characters — TM, R, asterisks, footnote numbers, etc.
Copy link to clipboard
Copied
I like that better than tracking.
Only problem I can see is if the space would interfere with some other operation that requires the mark to be part of the preceding word.
Copy link to clipboard
Copied
NoBreak option?
Copy link to clipboard
Copied
Thinking more of some GREP search, but no break applied to the hair space would be a good idea, I think, on general principle.
Copy link to clipboard
Copied
I think the space would be a problem only in some very narrow accessibility issues; I can't imagine it breaking across a line or the like. Applying a nobreak across the combination might be good suspenders-and-belt practice, especially in shorter marketing materials.
Copy link to clipboard
Copied
manually adjusting the kerning would take too long because of how many there are
Hi @bocdesigninc , If you want to actually kern the insertion point before the registration mark, rather than add a white space before and track, I think you would need a script in order to get all the insertion points. Something like this would find the registration marks and set the kerning of the proceeding insertion point to 50—change 50 in the first line to whatever value you need:
//kerning amount
var k = 50
var res = getTextSearch("®")
for (var i = 0; i < res.length; i++){
res[i].parentStory.insertionPoints[res[i].index].kerningValue = k;
};
/**
* Gets results of a text search as an array
* @ param text to search for
* @ return result array
*/
function getTextSearch(fp){
app.findTextPreferences = app.changeTextPreferences = app.findChangeTextOptions = null;
app.findChangeTextOptions.properties = {includeHiddenLayers:true, includeLockedLayersForFind:true, includeLockedStoriesForFind:true, includeMasterPages:true}
app.findTextPreferences.findWhat = fp;
return app.activeDocument.findText()
}
Copy link to clipboard
Copied
My approach is to use a selected whitespace instead of kerning, not a combination. Both approaches have their merits but combining them is, IMHO, unnecessary churn.
Copy link to clipboard
Copied
Hi James, the script doesn’t combine tracking and kerning, or add a white space—it uses a find function to get at the index of the insertion point in front of the reg mark—no white space character is being added.
I don’t think there is a way to use the Find/Change dialog to search for, or apply a Character Style, to an insertion point. If there is you do not need the script. I was taking @bocdesigninc’s question literally—they want to kern not track.