Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Getting rid of a text style that’s used somewhere you can’t find

Return to Member Forum

  • Author
    Posts
    • #14351734
      Olaf Nelson
      Member

      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.

    • #14351736
      Petar Petrenko
      Participant

      I always delete all styles that are not defined by me using “Preserve Style Formating”.

    • #14351754
      David Blatner
      Keymaster

      WOW! Thank you for the entertaining story, Olaf. I know that obsessive feeling well, and the kind of frustration that goes with a mystery like this. I’m so glad you found the solution.

      @Petar: That can work, but it can also leave you with paragraphs set to No Paragraph Style. Sometimes that is okay, but it can cause issues later.

      • #14351801
        Petar Petrenko
        Participant

        Not until now. I always do that after importing text and then applying styles from start to the end.

    • #14351793
      Olaf Nelson
      Member

      I should note that I did things slightly differently than usual this time, and that is what caused this whole saga.
      Normally after I finish a print layout I save a copy of the file and load my epub paragraph and character styles into it. Then I delete the print book’s styles and choose which epub style replaces each one. Doing it that way, the style is automatically changed anywhere it appears in another style, variable, etc. This time, because of some weird workarounds I’d had to employ in the layout, I couldn’t trust the usual method, so I went through the book and manually changed the styles.

    • #14358792

      I finally came across this post today, 2 months later. I absolutely loved it, Olaf!


      @Peter
      : You said “I always delete all styles that are not defined by me using “Preserve Style Formating”.” But that option only appears with Character styles, not Paragraph styles. Deleting an in-use Paragraph Style forces you to choose another style to replace it with, destroying the formatting.

      Instead, the action to take with Paragraph styles that you want to delete, but retain their formatting, is to choose Break Link to Style. The paragraph’s formatting doesn’t change but in the Paragraph Styles panel, it appears as (No Styles)+.

      • #14358796
        Petar Petrenko
        Participant

        No, Anne-Marie, you are wrong. Please, follow these steps:

        1. Select all paragraph styles;
        2. Click on the Recycle bin to delete them;
        3. Choose “Apply to All”;
        4. In “and replace with:” choose “No paragrapgh style.

        Now you will get “Preserve formating”.

    • #14358832

      ah! I never scrolled to the top of that “replace with” to see that No Style was an option. And that’s when the “retain formatting” checkbox appears. Thank you!

      I love it when I learn something new. ;-)

      So the end result is the same as Break Link to Style … except of course the style is deleted.

      Thanks!

      • #14358864
        Petar Petrenko
        Participant

        Hi Anne-Marie,
        I’m gled helping you. I too learn something new almost everyday by reading books about typography, design, following forums (like this one)…
        BTW, I remove styles only when a customer ask for the source at the end of the job (not politely) and it was not part of the contract.

Viewing 5 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads