I found once this option for setting the right spacing for the french ' as in l'avenir:
Create a char style (I called it apostroph) with the only option "tracking=60".
In the para style enter the following code
with the char style "apostroph"
Maybe with some adapting it works for the superscripts too.
In order to move the first subscript away from the character preceding it you need to find a way to identify that character, and as far as I can tell there is no way with GREP to differentiate formatting in the query, which means there is no way to do this with a GREP style. It might be doable by scripting, but I don't write scripts.
I came up with a two-step find change, but it cannot be run multiple times without applying unwanted tracking on each subsequent run and I can't find a valid expression to prevent that. I suppose it could be a three-step, though, to remove the first tracking application and that might work. Here's the strategy:
Find the subscripts, add a hairspace in front, and apply a character style with tracking and No Break to the whitespace.
In order to prevent the reapplication of the tracking between subsequent subscript character if you re-run the query, you need to start by removing any subscript hairspaces:
Find: ~| (that's the pipe symbol) and set the Find Format to subscript.
Change: leave blank and leave the change format blank
Now find your subscripts and add a hairspace in front:
Find: .+ and set the Find Format to subscript
Change: ~|$0 leave the change format blank
Now add the tracking and No Break (so your words can't break across lines at the subscripts) to the hairspace you just inserted
Create a character style whose only attributes are No Break and tracking that seems to be appropriate to move the subscript as much as you want. Since you want to increase the space, it may not be necessary to actually add any tracking at all, but this same method will work to tighten the spacing using a negative tracking value, and you still will want to apply the No Break, even if the hairspace is sufficient by itself.
Find: ~| and set the Find Format to subscript
Change: leave blank or set to $0 and set Change Format to the new character style
Also, there is a VERY BIG downside to adding the whitespace. While it gives you what you want visually, it destroys the searchability for these words in both ID and a PDF. If someone over in scripting can find a way to identify the transition from normal to subscript and apply the tracking/kerning without whitespace, that would be a lot better.
OK, that's essentially the same thing I've done, but with the non-joiner instead of the hairspace. If the non-joiner doesn't break the searchability, that's better, but you still have the same problems of duplicating the spacing if you run the query a second time.
No. Test it... You only accumulate NJ. To avoid it, you can modify the grep research as well to treat multiples researches. Simple.
Sorry, that's not good enough. You need a system that does not require different queries for the first and subsequent runs.
You could modify the GREP style, though, to apply the tracking to ~j(?<=[^~j]) so it only applied to the one before the actual subscript, but you'd need to be very careful about paragraph styles because there's a potential to add space with non-joiners that are not followed by subscripts.
OK, I just reread the second query you posted and it would work on the first or subsequent runs, so I take back my comment.
Well, I think this will do it
But a few questions/comments:
- To make life easy, I just need to this Find/Change once, after the Word document is imported.
- If I want this applied to the entire document (and not just any particular paragraph style), I just skip Obi-Wan's step 2 right?
- The GREP confuses me, although it works on my end. How does the Find/Change know to change to the newly defined Character style? All I see is "~j$0" in the Replace field. How does it know to go to "Virtual Space"? Again, it does seem to work, I just don't get it.
Thanks to both Peter and Obi-wan. I was able to see what is going on now and it seems to work. I still have some trial and error, but looking good so far