8 Replies Latest reply on Jun 7, 2015 12:14 PM by Randy Hagan

    Table of Contents adding unwanted paragraph.

    Precise Formwork Level 1

      Hi Guys,


      I'm having some problems with my Table of Contents (TOC). I'm using CS5.5 and I'm referencing paragraph styles but unfortunately I'm getting paragraph breaks. I've somehow managed to remove these breaks but I cannot see where this has happened with no differences in my TOC formatting.

      Screen Shot 2015-05-24 at 11.30.40.pngThis is the actual cross-reference, which is in a table and there is a paragraph required between D: and Scope of Works. Unfortunately this is required and no way around this.


      Screen Shot 2015-05-24 at 11.32.21.png

      This is how the TOC is currently showing; see how Q, R and S are exactly how I desire. Don't know how I've managed to get this.


      If possible I would like to remove the orange underline between the page number and have all page numbers parallel; though this is not essential at this stage. It would just be nice to get it all working as Q, R and S and understand what's causing this.


      Thanks guys.

        • 1. Re: Table of Contents adding unwanted paragraph.
          Precise Formwork Level 1

          The TOC is doing as instructed as there are Paragraph Breaks between the letter and the subject e.g. A:

          Parties to the Contract.


          How could I list the Text Anchor Name as the data to be input as the TOC Paragraph?

          • 2. Re: Table of Contents adding unwanted paragraph.
            vladan saveljic Level 4

            when you make your TOC you have to do second step

            grep find:







            don't update your TOC automatically after this.
            regard to the orange line and alignment you should make paragraph style with these caracteristic and apply it in the toc style.

            take a look here:

            Creating a table of contents

            • 3. Re: Table of Contents adding unwanted paragraph.
              Precise Formwork Level 1

              Thanks Premio, I can't see any of them options available in CS 5.5. I've done a find/ change and nothing seems to spring up there.


              What I don't understand is why certain items are showing a page number to the letter column and others are not as in the example I used.


              Seems very peculiar atm.

              • 4. Re: Table of Contents adding unwanted paragraph.
                Peter Spier Most Valuable Participant (Moderator)

                You need to get rid of the paragraph break after the letter and colon in the text body, preferably without sing a forced line break. It might be enough to change the space between the first two words after the colon to non-breaking.

                • 5. Re: Table of Contents adding unwanted paragraph.
                  Precise Formwork Level 1

                  Thanks Pete, no paragraph break between them in the TOCs. Don't know why it's working on some but not the others?Screen Shot 2015-06-07 at 08.00.01.png

                  • 6. Re: Table of Contents adding unwanted paragraph.
                    Precise Formwork Level 1

                    I tried so many combinations it's unreal. I changed the actual text in the paragraphs to replace a colon with a hyphen (a comprimise), selected same style under 'Entry Style' and that's a bit better though it is not great by no means.


                    Sections P and Q are heavily cross-referenced and take up a considerable amount of the document but do not appear in my TOC. The referenced paragraph styles are used in the first headings but strangely do not appear.

                    • 7. Re: Table of Contents adding unwanted paragraph.
                      Peter Spier Most Valuable Participant (Moderator)

                      The colon/hyphen is irrelevant, as is presence or absence of paragraph breaks in the TOC itself since what is in the TOC is generated from what you have in the body of the book. The TOC picks up the paragraph text as it is written in the body. The only way the Run-in  selection is going to help is if you have one paragraph style applied to the letter/colon combination, a hard return, and a different paragraph style applied to the following lines.


                      I suspect at this point you have things so twisted and inconsistent that you should first go through the body of the book and make sure all the headings are consistent in construction and styling (and that includes being sure they have the same style assigned if there is more than one copy of a style being used in various style groups), then redefine the TOC parameters.

                      • 8. Re: Table of Contents adding unwanted paragraph.
                        Randy Hagan Adobe Community Professional

                        I think I may have a simpler, manual fix for you.


                        Peter speaks the truth about going through your document to: 1) ensure you are applying consistent document styling through the document and you assemble consistent ToC style(s) that do what you want to do. Unless you're sure that styles are consistently applied and properly tagged, you're going to be chasing your tail and it'll never work right without a lot of extra effort. It stinks to go through a full specs/proposal package and reapply styles to the entire document, but it's the only way to ensure you have a consistent baseline and repeatable result.


                        Once that's done, we can go on to 2) build a ToC style that encompasses what you want to accomplish. To illustrate, A) I re-typed Sections D-F for the illustration below:


                        Section Hed and Copy Styles.png

                        FWIW, Document Section Hed style is Minion Pro Bold, 14/14; Copy Under Section Hed style is Minion Pro 10/11, 3 pt space before/after the paragraph. I then selected the Type>Show Hidden Characters menu command because it lets us clearly see and change text formatting in the document.


                        B) I copied the D: section information, and pasted it below the three sections, to have some copy for seeing how my ToC style will look.


                        Section Hed and Copy Styles 2.png

                        C) I created a new style, and named it ToC Entry for Section Hed. Specs are listed in the screen capture below:


                        Section Hed and Copy Styles 3.png


                        Arial Bold, 14/14, Left-align tab at .25 inch, and a 1 point paragraph rule below in Arrest-Me-Red .0625 inch offset from the baseline. As we can see, there's a problem in that there is now two underlines for the selected section hed. Checking the Preview box in the lower-left of the Paragraph Style Options dialog box lets you see your mistakes in real time. Click the OK button to return to the text in your layout.


                        D) Highlight the paragraph return (Enter or Return, for Windows and Mac versions, respectively) after D: and replace it with a Forced Line Break. You can do that by either selecting the Type>Insert Line Break>Forced Line Break menu command, or by using the keyboard shortcut Shift+Enter (Windows) or Shift+Return (Mac), as shown below:


                        Section Hed and Copy Styles 4.png

                        The result looks better, in that there's now only one line under the Section Hed, though we can clearly see that there are two lines of text. That's because the line break moves all the following text below, but InDesign still considers it one paragraph. This is the key to solving your problem. I've taken the liberty of replacing the returns after the letters with line breaks. For this to work, you should too.


                        E) Now we generate the ToC through the Layout> Table of Contents... menu command. Importantly, we want to use our ToC Entry for Section Hed style, rather than the generic TOC Body Text style created by InDesign, as shown below. We'll use our Document Section Hed style for generating the ToC copy.


                        Section Hed and Copy Styles 5.png


                        If your panel looks like the example above, then click the OK button.


                        F) We're almost done. Highlight one of the line breaks and press Cmd+C on a Mac or Ctrl+C on a Windows system to copy it. Select all the text with either the Edit>Select All menu command, or the keyboard shortcut Cmd+A for Macs, Ctrl+A for Windows. Then either select the Edit>Find/Change... menu command or using the keyboard shortcut Cmd/Ctrl+F.


                        Click your cursor in the Find what: edit box and press Cmd/Ctrl+V to paste the forced line break character in the box. You'll see that translates into ^n when pasted into the box. In the Change to: edit box, we'll click the ampersand/@ button to the right and select the White Space>Em Space flyaway menu command. Section Hed and Copy Styles 6a.png


                        That's shown in the edit box as ^m. Click the OK button, and the end result should look much like this:


                        Section Hed and Copy Styles 7.png

                        Would this work for you? There are ways to automate parts of this, but being able to first do it manually helps clarify what needs to be done to make this work.