3 Replies Latest reply on Oct 10, 2014 3:14 AM by Eugene Tyson

    Remove Forced Breaks at Table of Contents Stage

    homeboy4 User Group Manager

      I have forced breaks in chapter headings that I want to remove automatically when I create the table of contents. How can I do that? Some sort of GREP style?

        • 1. Re: Remove Forced Breaks at Table of Contents Stage
          Eugene Tyson Adobe Community Professional & MVP

          GREP style won't work here - as it cannot add or remove text.

           

          I never add a forced line break to chapter headings, instead I select the words I want to keep together and apply a "no break" style to the characters.

           

          This can be applied with a GREP style.

           

          In the Heading Style add into the GREP Style section

           

          Character Style: No Break (create a new style and only tick No Break)

          (\s\w+){3}$

           

          Then when you create your Table of Contents you won't have any weird breaks.

          • 2. Re: Remove Forced Breaks at Table of Contents Stage
            Obi-wan Kenobi Adobe Community Professional

            Hi Eugene,

             

            This is not because you use a "no break" feature that the text will pass to the next line!

            In terms of the original question, a simple search and replace on forced breaks in the paragraph style (with no replacement) will do it.

            It's not automatic but it takes 1 click and 1 second (that said, I think in all modesty be the fastest "clicker" in the West!  ).

            • 3. Re: Remove Forced Breaks at Table of Contents Stage
              Eugene Tyson Adobe Community Professional & MVP

              The no Break Solution works for me in almost all of my publications, well over 100 per year.

               

              It may not suit everyone, but it's one possible workaround that can come in handy for other people.

               

              Yes you can search and replace for the forced breaks, but if you avoid using them then it's better.

               

              The problem with forced breaks occurs for me in the "running headers" a forced break will incur an added space in the running head of each page, which is not desireable, and a forced break in converting to epub, and double spaces in all running heads is a nightmare.

               

              Invoking a no break rule for say the last 3 or 4 or 5 words in a heading only at the end will mean that there are no extraneous spaces, or forced breaks in TOC and the epub conversion goes perfectly well.

               

              That's just my particular workflow - it may not suit everyone.