Maybe this will help someone…
This is pretty common: you go to delete a paragraph style and the warning pops up asking what to replace it with. This tells you the style is used somewhere. Sometimes that’s OK–your reason for deleting it was that you wanted to replace it with another style. Sometimes, however, when my reason for deleting is that I want to get rid of all the extra, unused styles, it worries me. “What if it is used somewhere it shouldn’t be?” I think.
But I don’t worry much, because usually it’s just that some other style is based on it. Find that other style, problem solved.
Today I had a paragraph style I couldn’t find in a very simplified layout of a 200-page book that I was preparing for export to epub. I knew it wasn’t supposed to be used anywhere and I got obsessed with deleting it. I could have just deleted it and moved on, but I had to know. “What if it messes up the epub’s format and I don’t notice until it’s too late?” I asked myself, somewhat unreasonably (since I’ll be editing the epub’s code directly anyway and using my own css instead of ID’s). But I couldn’t let it go.
First I looked in every other paragraph style, and none were based on anything or calling for any next style. I checked all the object, table of contents and cell styles. No luck.
I hit ctrl-H to show frame edges and found a few empty items on the pasteboard. Had to be one of them, right? It wasn’t.
I made sure all layers were visible, then clicked in every spread in the book to see if there were any hidden objects. There were a few! I deleted them with great, but unwarranted, confidence. The style still wouldn’t show up as unused.
Thinking I must have missed a based-on somewhere, I edited the offending style to use 72pt type, changed the character color to magenta with a 20pt neon green stroke, gave the paragraph a massive yellow border and turned on orange paragraph shading. Surely, I thought, some little paragraph somewhere will now jump out at me. None did.
I deleted all the master pages and applied the [None] master to all pages. No help.
Now too annoyed to give up on the hunt until one of us was deleted forever, I saved a copy of the file and went berserk on it. I deleted every paragraph, cell, object, table and character style, checking periodically to see if the offending style would be deemed “unused.” No. It sat there as the only style other than the built-in ones you can’t delete. I deleted every bit of text in the entire book. Still used somewhere.
I deleted pages, 50 at a time, and when they were all gone except the first one (because you can’t have zero pages), I added a new page and deleted the old first page. The style still taunted me.
I tried restarting ID, but of course that didn’t help.
Then I just started going through the menus, looking for something–anything!–that might have a paragraph style specified in it.
And there it was: Text Variables (in the Type menu). The style was specified as the source for a running header. Deleted that variable and could delete the paragraph style.
Of course if I had just trusted that the style really was not used anywhere, which I KNEW, I could have deleted it and when the warning popped up asking what I wanted to replace it with chosen [No Paragraph Style]. It would have changed the definition of the variable automatically, and I’d never have noticed a thing. I also would have had a much more productive morning.
The moral of the story: check text variables.