14 Replies Latest reply on Jan 17, 2014 7:26 AM by rob day

    Breaking link to all styles in a document

    Nina_Storm Level 1

      InDesign CS5:

      I have a document messed up with wrong styles and overrides.

      I want to go through the document, streamlining and assigning the right styles.

       

      Can I start breaking links to all styles in one action?

      And then loading the correct styles and assign them?

       

      BR Nina Storm

        • 1. Re: Breaking link to all styles in a document
          Daniel Sterchi Adobe Community Professional

          Hi Nina

           

          Yes you can…

          Just delete all the Styles in the Styles Panel. Then InDesign ask you which style you want to choose as a replacement. You can choose basic paragraph. The same with the caracter styles. There you need to select all the text and clear the overrides.

           

          Then you can import the correct styles from an other InDesign Dokument. You open the context menu of the Paragraph Styles, there choose «Load All Textstyles» or if you want to replace only the Paragraphstyles chose «Load Paragraphstyles». InDesign opens a menu with which you can choose which styles you want to load.

           

          Sound like you have a lot of work to do.

           

          Kind Regards

           

          Dani (from Switzerland)

          • 2. Re: Breaking link to all styles in a document
            Nina_Storm Level 1

            Hi Dani,

             

            Thank you for answering.

             

            Well, perhaps I should have pointed out that I wan’t the document to stay unchanged until I start applying correct styles. Unchanged but with no styles until I load my new correct styles.

            I want to unlink all styles - not to replace with basic paragraph.

             

            BR Nina Storm

            • 3. Re: Breaking link to all styles in a document
              Daniel Sterchi Adobe Community Professional

              I'm not sure if I got your question right.

               

              Your text has to be assigned to a style. If you start with a new document InDesign assigns automatically the «built in» basic Paragraph to the new text.

              So if you want to unlink text from style you have choose another style as a replacement.

              You can create a new paragraph style with a color or so and delete all the other styles and link them to your colored style, but your text is assigned to a style.

               

              Kind Regards

               

              Dani (from Switzerland)

              • 4. Re: Breaking link to all styles in a document
                Joel Cherney Adobe Community Professional & MVP

                Your text has to be assigned to a style.

                 

                You know, this isn't actually true. It's true that when you start making new text it's automatically assigned Basic Paragraph.

                 

                However, If you select some text that is assigned a particular style, you can choose the flyout in the paragraph styles menu and choose "Break Link To Style." At that point, your selected text will not revert to [Basic Paragraph], but will become (No Style). If your document is all one story, then you can select all text and Break Link To Styles. If the document is made up of many discrete stories, you'd have to do it one story at a time.

                • 5. Re: Breaking link to all styles in a document
                  Nina_Storm Level 1

                  Thank you Joel, I hoped some action or script exsisted to solve this in an easier way.

                   

                  I have a lot of unthreaded textframes. I think I will solve it for the bodystyles and the headings only, hoping that none of the "overriding" styles will change :-)

                   

                  Happy newyear.

                  • 6. Re: Breaking link to all styles in a document
                    CS6TechWriter Level 1

                    Not sure if that's completely true Joel, for CS6 anyway.

                     

                    Say I close off all InDesign documents and set the default font for all new documents to Arial, 10pt, Regular and the [Basic Paragraph] style to Minion Pro, 12pt, Regular.

                     

                    Now I open a New Document with Document Preset set to [Custom], drag out a text frame and start typing.  I would be typing in the default "style" of Arial, 10pt, Regular and not the [Basic Paragraph] style of Minion Pro, 12pt, Regular.  In fact, the [Basic Paragraph] knows it's being overriden by the default "style" because it now appears as [Basic Paragraph]+ (with a plus sign) in the Paragraph Styles (F11) panel.

                     

                    I've put the word "style" in quotes above because setting the default "style" of Arial, 10pt, Regular by first closing off all documents does not result in any style at all in the Paragraph Styles panel. It's almost outside the realm of Paragraph Styles altogether, in a kind of Style limbo.  Or, it might be described as a Paragraph Style override that has not been Redefined as a fully-fledged Paragraph Style.

                     

                    So, in this case the default "style" for all new documents remains Arial, 10pt, Regular (with no actual Style for it in the Paragraph Styles panel) and the [Basic Paragraph] style remains Minion Pro, 12pt, Regular.

                    • 7. Re: Breaking link to all styles in a document
                      Peter Spier Most Valuable Participant (Moderator)

                      The style applied is still [Basic Paragraph], but the text has an additional local formatting overrride. If the style were truly 10 pt arial removing overrides would keep it at 10 pt arial.

                      • 8. Re: Breaking link to all styles in a document
                        CS6TechWriter Level 1

                        Thanks Peter. I think I almost understand.  This is what I'm suggesting:

                         

                        1. Close off all ID documents and set the default font to Arial, 10pt, Regular. The document now has a Character Style called [None] and a Paragraph Style called [Basic Paragraph] showing no plus sign - if the  (font) settings are also Arial, 10pt, Regular inside [Basic Paragraph].
                        2. Change the [Basic Paragraph] style to Minion Pro, 12pt, Regular.(A plus sign will appear at the end of [Basic Paragraph]+).
                        3. Open a New Document with a [Custom] or "Print" Document Preset using Control-N or Control-Alt-N (to bypass the New Document dialog) with a Primary Text Frame.
                        4. Choose the Type Tool and click inside the text frame.
                        5. Type something and select it.
                        6. You should be typing in Arial, 10pt, Regular = [Basic Paragraph]-overriden = the default "font" or Character settings.
                        7. Alt-click [Basic Paragraph]+
                        8. You've removed the override and the text now changes to Minion Pro, 12pt, Regular.The Paragraph Styles panel now shows a single Paragraph style called [Basic Paragraph] with no plus sign.

                         

                        I gather it's easier (even proper) to simply set the "default font" (default Character settings) the same as the [Basic Paragraph] font settings.

                        • 9. Re: Breaking link to all styles in a document
                          Peter Spier Most Valuable Participant (Moderator)

                          Everything you just said seems true to me.

                           

                          For what it's worth, I think Dave Saunders figured out a way, back when [Basic Paragraph] was introduced to make the default style (No Paragraph Style) or perhaps even remove [Basic Paragraph] from documents altogether, but I don't recall the details after all these years.

                          • 10. Re: Breaking link to all styles in a document
                            Tom Usrey 2 Level 1

                            Peter, you remember correctly. Many versions ago, there was a way to delete [Basic Paragraph]. I think Adobe "fixed" that in the next version so it wasn't possible any more.

                             

                             

                            Here's a bit more info from a 2006 post:

                             

                            M Blackburn - 9:45am Mar 3, 06 PST (#4 of 15) Edited: 03-Mar-2006 at 09:46am

                            There is a way to get rid of Basic Paragraph, pointed out by Teus some time back.

                            Make a new paragraph style based on no paragraph. Edit Basic paragraph to be based on that style.

                            This will change the name of Basic Paragraph, make any change to that name before closing the

                            palette and it will then be deletable.

                            I do this, but it isn't the cure-all it first seemed to be.

                            • 11. Re: Breaking link to all styles in a document
                              rob day Adobe Community Professional & MVP

                              Nina, this is probably too late, but it can be scripted.

                               

                              This AppleScript script selects every paragraph of every strory of the front document and breaks the paragraph style link. It leaves character styles untouched, which I'm guessing you want.

                               

                               

                              tell application "Adobe InDesign CS6"

                                 

                                  --the paragraph styles Break Link menu item

                                  set mybreak to item 1 of every menu action whose id is 8500

                                 

                                  --select every paragraph in the document and try to invoke break link

                                  set myp to object reference of every paragraph of every story of active document

                                  repeat with i from 1 to number of items in myp

                                      select item i of myp

                                      try

                                          invoke mybreak

                                      end try

                                  end repeat

                                 

                              end tell

                              1 person found this helpful
                              • 12. Re: Breaking link to all styles in a document
                                rob day Adobe Community Professional & MVP

                                back when [Basic Paragraph] was introduced to make the default style (No Paragraph Style)

                                 

                                If I select a paragraph and break the link to its  style, and then get the properties of the paragraph via scripting the name of the applied paragraph style is "[None]". If I ask scripting to give me a list of all paragraph styles without any documents open I get {"[No Paragraph Style]", "[Basic Paragraph]"} plus any styles I've made without any docs open.

                                 

                                Obviously the "[None]" style isn't available via the UI but I can make it the default by choosing Break Link to Style without any docs open. In that case any basic text frames I make in new documents will have no paragraph style assigned in the styles panel but will have the properties I set up in the Paragraph and Character panels with no docs open.

                                1 person found this helpful
                                • 13. Re: Breaking link to all styles in a document
                                  Nina_Storm Level 1

                                  Rob - thank you so much. I have worked my way out of the task I mentioned.

                                  But I tried your script on two old documents. One worked like a charm but the other was messed up a bit - though it was consequently styled in the original document. It seemed that some wrong Character Styles was assigned and the baseline grid made it go bananas.

                                  I have no time to investigate closer for now. But I saved it for further use.

                                   

                                  Thanks again.

                                  • 14. Re: Breaking link to all styles in a document
                                    rob day Adobe Community Professional & MVP

                                    The script only disconnects the paragraph styles, so I can imagine applied character styles inside the paragraphs might cause some unexepcted behaviour.

                                     

                                    It could also break the link to any character styles inside of the paragraph first:

                                     

                                    tell application "Adobe InDesign CS6"

                                     

                                        --the paragraph styles Break Link menu item

                                        set myPbreak to item 1 of every menu action whose id is 8500

                                        --the character styles Break Link menu item

                                        set myCbreak to item 1 of every menu action whose id is 8501

                                     

                                        --select every paragraph in the document and try to invoke break link

                                        set myp to object reference of every paragraph of every story of active document

                                        repeat with i from 1 to number of items in myp

                                            select item i of myp

                                            try

                                                invoke myCbreak

                                                invoke myPbreak

                                            end try

                                        end repeat

                                     

                                    end tell