In Generate Index check Between Page Numbers it may be there's _ after ,
Nope. Can't figure out where it's coming from.
I can go through the whole index and "fix" the character styles of all the page numbers, but there's got to be a better way than that.
You can search with Find/Change grep
Find what: (?<=,)_
change to : blank
Find format: select index style
note: when i copy the little line from your sample and paste in grep it covert to white space. but you can copy the line from the index and paste after (?<=,)
The comma's are underlined as well as the spaces, so this is consistent with a stray Underline code that gets applied to default text -- either directly or through a character style.
Make sure you have nothing selected and check if a character style or Underline is set as a default.
To remove it: use the Find Format dialog and check "Underlined" in the Find, *un*check "Underlined" in the Change parts. Or, if there is nothing you would want to underline in this index, select the entire text and press the Underline toggle or the hot key (Ctrl/Cmd + Shift + U)twice -- once to 'set', again to 'clear'.
Can you send us a little ID file with a part of text and the corresponding generated index?
If it is an "underlined"!
In this case, I have reproduced the problem but, here, this "underlined" can not be deleted directly by a search-and-replace.
Because, to do it, I have introduced a grep style associated with a character style:
Grep style: ,
[comma + space]
Char style: with only "Underlined" applied
This may help some people in other situations.
Well, thanks everybody! I went to bed after my last post. But before I turned off the lights I trashed a character style I'd been using. It was an underline style.
This morning when I generated an index the problem was gone.
What's so strange is that that style was not used anywhere in the index formatting. It just sort of creeped in all by itself!
Now I've got to go back into my document and replace all those underlines manually.